Skip to content

Commit

Permalink
Updated test
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkMpn committed May 28, 2024
1 parent 7702e46 commit 9d91698
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions MarkMpn.Sql4Cds.Engine.Tests/ExecutionPlanTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7746,27 +7746,31 @@ from account
<all-attributes />
</entity>
</fetch>");
var loop2 = AssertNode<NestedLoopNode>(loop1.RightSource);
Assert.AreEqual(1, loop2.DefinedValues.Count);
Assert.AreEqual("new_customentity.new_name", loop2.DefinedValues["Expr3"]);
var fetch2 = AssertNode<FetchXmlScan>(loop2.LeftSource);
var merge = AssertNode<MergeJoinNode>(loop1.RightSource);
Assert.AreEqual(1, merge.DefinedValues.Count);
Assert.AreEqual("Expr2.new_name", merge.DefinedValues["Expr3"]);
var fetch2 = AssertNode<FetchXmlScan>(merge.LeftSource);
AssertFetchXml(fetch2, @"
<fetch>
<entity name='contact'>
<all-attributes />
<order attribute='fullname' />
</entity>
</fetch>");
var spool = AssertNode<IndexSpoolNode>(loop2.RightSource);
var sort = AssertNode<SortNode>(merge.RightSource);
var distinct = AssertNode<DistinctNode>(sort.Source);
var alias = AssertNode<AliasNode>(distinct.Source);
var spool = AssertNode<IndexSpoolNode>(alias.Source);
Assert.AreEqual("new_customentity.new_decimalprop", spool.KeyColumn);
Assert.AreEqual("@Expr1", spool.SeekValue);
var fetch3 = AssertNode<FetchXmlScan>(spool.Source);
AssertFetchXml(fetch2, @"
AssertFetchXml(fetch3, @"
<fetch>
<entity name='new_customentity'>
<attribute name='new_name' />
<attribute name='new_decimalprop' />
<filter>
<condition attribute=""new_decimalprop"" operator=""not-null"" />
<condition attribute='new_decimalprop' operator='not-null' />
</filter>
</entity>
</fetch>");
Expand Down

0 comments on commit 9d91698

Please sign in to comment.