|
1 | | -// Copyright (C) 2015-2023 Xtensive LLC. |
| 1 | +// Copyright (C) 2015-2026 Xtensive LLC. |
2 | 2 | // This code is distributed under MIT license terms. |
3 | 3 | // See the License.txt file in the project root for more information. |
4 | 4 | // Created by: Alexey Kulakov |
@@ -474,7 +474,7 @@ public class IssueJira0584_IncorrectMappingOfColumnInQuery : AutoBuildTest |
474 | 474 | { |
475 | 475 | private ProviderKind? previousProviderKind; |
476 | 476 |
|
477 | | - [Test(Description = "Case when calculated column in the midle of selected columns averege")] |
| 477 | + [Test(Description = "Case when calculated column in the middle of selected columns averege")] |
478 | 478 | public void IncludeProviderOptimizationTest01() |
479 | 479 | { |
480 | 480 | EnsureRightDateIsInStorage(ProviderKind.IncludeProvider); |
@@ -526,8 +526,13 @@ public void IncludeProviderOptimizationTest01() |
526 | 526 |
|
527 | 527 | var usefulColumns = masterCredit.Union(masterDebit); |
528 | 528 | var readyForFilterQuery = from joinResult in usefulColumns |
529 | | - .LeftJoinEx(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new {pp, ps}) |
530 | | - .LeftJoinEx(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new {a.pp, a.ps, pm}) |
| 529 | +#if NET10_0_OR_GREATER |
| 530 | + .LeftJoin(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new { pp, ps }) |
| 531 | + .LeftJoin(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new { a.pp, a.ps, pm }) |
| 532 | +#else |
| 533 | + .LeftJoinEx(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new { pp, ps }) |
| 534 | + .LeftJoinEx(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new { a.pp, a.ps, pm }) |
| 535 | +#endif |
531 | 536 | let item = joinResult.pp |
532 | 537 | select new CustomPosting() { |
533 | 538 | Id = item.Id, |
@@ -609,9 +614,15 @@ public void IncludeProviderOptimizationTest02() |
609 | 614 |
|
610 | 615 | var usefulColumns = masterCredit.Union(masterDebit); |
611 | 616 | var readyForFilterQuery = from joinResult in usefulColumns |
612 | | - .LeftJoinEx(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new {pp, ps}) |
613 | | - .LeftJoinEx(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new {a.pp, a.ps, pm}) |
614 | | - let item = joinResult.pp |
| 617 | +#if NET10_0_OR_GREATER |
| 618 | + .LeftJoin(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new { pp, ps }) |
| 619 | + .LeftJoin(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new { a.pp, a.ps, pm }) |
| 620 | +#else |
| 621 | + .LeftJoinEx(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new { pp, ps }) |
| 622 | + .LeftJoinEx(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new { a.pp, a.ps, pm }) |
| 623 | +#endif |
| 624 | + |
| 625 | + let item = joinResult.pp |
615 | 626 | select new CustomPosting { |
616 | 627 | Id = item.Id, |
617 | 628 | Status = item.Status, |
@@ -692,8 +703,13 @@ public void IncludeProviderOptimizationTest03() |
692 | 703 |
|
693 | 704 | var usefulColumns = masterCredit.Union(masterDebit); |
694 | 705 | var readyForFilterQuery = from joinResult in usefulColumns |
695 | | - .LeftJoinEx(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new {pp, ps}) |
696 | | - .LeftJoinEx(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new {a.pp, a.ps, pm}) |
| 706 | +#if NET10_0_OR_GREATER |
| 707 | + .LeftJoin(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new { pp, ps }) |
| 708 | + .LeftJoin(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new { a.pp, a.ps, pm }) |
| 709 | +#else |
| 710 | + .LeftJoinEx(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new { pp, ps }) |
| 711 | + .LeftJoinEx(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new { a.pp, a.ps, pm }) |
| 712 | +#endif |
697 | 713 | let item = joinResult.pp |
698 | 714 | select new CustomPosting { |
699 | 715 | Id = item.Id, |
@@ -776,8 +792,13 @@ public void IncludeProviderOptimizationTest04() |
776 | 792 |
|
777 | 793 | var usefulColumns = masterCredit.Union(masterDebit); |
778 | 794 | var readyForFilterQuery = from joinResult in usefulColumns |
779 | | - .LeftJoinEx(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new {pp, ps}) |
780 | | - .LeftJoinEx(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new {a.pp, a.ps, pm}) |
| 795 | +#if NET10_0_OR_GREATER |
| 796 | + .LeftJoin(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new { pp, ps }) |
| 797 | + .LeftJoin(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new { a.pp, a.ps, pm }) |
| 798 | +#else |
| 799 | + .LeftJoinEx(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new { pp, ps }) |
| 800 | + .LeftJoinEx(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new { a.pp, a.ps, pm }) |
| 801 | +#endif |
781 | 802 | let item = joinResult.pp |
782 | 803 | select new CustomPosting { |
783 | 804 | Id = item.Id, |
@@ -859,8 +880,13 @@ public void IncludeProviderOptimizationTest05() |
859 | 880 |
|
860 | 881 | var usefulColumns = masterCredit.Union(masterDebit); |
861 | 882 | var readyForFilterQuery = from joinResult in usefulColumns |
862 | | - .LeftJoinEx(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new {pp, ps}) |
863 | | - .LeftJoinEx(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new {a.pp, a.ps, pm}) |
| 883 | +#if NET10_0_OR_GREATER |
| 884 | + .LeftJoin(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new { pp, ps }) |
| 885 | + .LeftJoin(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new { a.pp, a.ps, pm }) |
| 886 | +#else |
| 887 | + .LeftJoinEx(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new { pp, ps }) |
| 888 | + .LeftJoinEx(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new { a.pp, a.ps, pm }) |
| 889 | +#endif |
864 | 890 | let item = joinResult.pp |
865 | 891 | select new CustomPosting { |
866 | 892 | Id = item.Id, |
@@ -1028,8 +1054,13 @@ public void JoinAsSourceOfSetOperation() |
1028 | 1054 |
|
1029 | 1055 | var result = |
1030 | 1056 | from r in |
1031 | | - preResult.Join(tp.Distinct(), a => a.MasterAccount, a => a.Account, (a, pm) => new {pp = a, pm}) |
1032 | | - .LeftJoinEx(Query.All<TablePartBase.FinToolKind>(), a => a.pm.FinToolKind, a => a.Id, (a, b) => new {pp = a.pp, pm = a.pm, fk = b}) |
| 1057 | +#if NET10_0_OR_GREATER |
| 1058 | + preResult.Join(tp.Distinct(), a => a.MasterAccount, a => a.Account, (a, pm) => new { pp = a, pm }) |
| 1059 | + .LeftJoin(Query.All<TablePartBase.FinToolKind>(), a => a.pm.FinToolKind, a => a.Id, (a, b) => new { pp = a.pp, pm = a.pm, fk = b }) |
| 1060 | +#else |
| 1061 | + preResult.Join(tp.Distinct(), a => a.MasterAccount, a => a.Account, (a, pm) => new { pp = a, pm }) |
| 1062 | + .LeftJoinEx(Query.All<TablePartBase.FinToolKind>(), a => a.pm.FinToolKind, a => a.Id, (a, b) => new { pp = a.pp, pm = a.pm, fk = b }) |
| 1063 | +#endif |
1033 | 1064 | let q = r.pp |
1034 | 1065 | select |
1035 | 1066 | new { |
|
0 commit comments