# Golden test output of ABTPlanGeneration/LowerShardFiltering

==== VARIATION: Shard Filtering with Top Level Fields ====
-- INPUT:
Filter []
|   FunctionCall [shardFilter]
|   |   |   Variable [proj2]
|   |   Variable [proj1]
|   Variable [proj0]
PhysicalScan [{'<root>': scan0, 'a': proj0, 'b': proj1, 'c': proj2}, collName]

-- OUTPUT:
[0] filter {shardFilter(s1, makeBsonObj(MakeObjSpec([a = Add(0), b = Add(1), c = Add(2)], Open), Nothing, false, (s3 ?: null), (s4 ?: null), (s5 ?: null)))} 
[1] scan s2 none none none none none none none lowPriority [s3 = a, s4 = b, s5 = c] @"<collUUID>" true false 

==== VARIATION: Shard Filtering with Dotted Field Path ====
-- INPUT:
Filter []
|   FunctionCall [shardFilter]
|   Variable [proj0]
Evaluation [{proj0}]
|   FunctionCall [getField]
|   |   Const ["b"]
|   FunctionCall [getField]
|   |   Const ["a"]
|   Variable [scan0]
PhysicalScan [{'<root>': scan0}, collName]

-- OUTPUT:
[0] filter {shardFilter(s1, makeBsonObj(MakeObjSpec([a.b = Add(0)], Open), Nothing, false, (s3 ?: null)))} 
[2] project [s3 = getField(getField(s2, "a"), "b")] 
[1] scan s2 none none none none none none none lowPriority [] @"<collUUID>" true false 

==== VARIATION: Shard Filtering with Inlined path ====
-- INPUT:
Filter []
|   FunctionCall [shardFilter]
|   |   Variable [proj_b]
|   FunctionCall [getField]
|   |   Const ["a"]
|   Variable [scan0]
PhysicalScan [{'<root>': scan0, 'b': proj_b}, collName]

-- OUTPUT:
[0] filter {shardFilter(s1, makeBsonObj(MakeObjSpec([a = Add(0), b = Add(1)], Open), Nothing, false, (getField(s2, "a") ?: null), (s3 ?: null)))} 
[1] scan s2 none none none none none none none lowPriority [s3 = b] @"<collUUID>" true false 
