# Golden test output of ABTPlanGeneration/LowerUnionNode

==== VARIATION: UnionNode with only one child ====
-- INPUT:
Union [{proj0}]
Evaluation [{proj1}]
|   FunctionCall [getField]
|   |   Const ["b"]
|   Variable [scan0]
Evaluation [{proj0}]
|   FunctionCall [getField]
|   |   Const ["a"]
|   Variable [scan0]
PhysicalScan [{'<root>': scan0}, collName]

-- OUTPUT:
[1] project [s2 = getField(s1, "a"), s3 = getField(s1, "b")] 
[0] scan s1 none none none none none none none lowPriority [] @"<collUUID>" true false 

==== VARIATION: UnionNode with two children ====
-- INPUT:
Union [{proj0}]
|   Evaluation [{right1}]
|   |   FunctionCall [getField]
|   |   |   Const ["b"]
|   |   Variable [scan0]
|   Evaluation [{proj0}]
|   |   FunctionCall [getField]
|   |   |   Const ["a"]
|   |   Variable [scan0]
|   PhysicalScan [{'<root>': scan0}, collName]
Evaluation [{left1}]
|   FunctionCall [getField]
|   |   Const ["b"]
|   Variable [scan0]
Evaluation [{proj0}]
|   FunctionCall [getField]
|   |   Const ["a"]
|   Variable [scan0]
PhysicalScan [{'<root>': scan0}, collName]

-- OUTPUT:
[6] union [s7] 
    branch0 [s2] 
        [1] project [s2 = getField(s1, "a"), s3 = getField(s1, "b")] 
        [0] scan s1 none none none none none none none lowPriority [] @"<collUUID>" true false 
    branch1 [s5] 
        [4] project [s5 = getField(s4, "a"), s6 = getField(s4, "b")] 
        [3] scan s4 none none none none none none none lowPriority [] @"<collUUID>" true false 


==== VARIATION: UnionNode with many children ====
-- INPUT:
Union [{proj0}]
|   |   |   |   Evaluation [{e1}]
|   |   |   |   |   FunctionCall [getField]
|   |   |   |   |   |   Const ["b"]
|   |   |   |   |   Variable [scan0]
|   |   |   |   Evaluation [{proj0}]
|   |   |   |   |   FunctionCall [getField]
|   |   |   |   |   |   Const ["a"]
|   |   |   |   |   Variable [scan0]
|   |   |   |   PhysicalScan [{'<root>': scan0}, collName]
|   |   |   Evaluation [{d1}]
|   |   |   |   FunctionCall [getField]
|   |   |   |   |   Const ["b"]
|   |   |   |   Variable [scan0]
|   |   |   Evaluation [{proj0}]
|   |   |   |   FunctionCall [getField]
|   |   |   |   |   Const ["a"]
|   |   |   |   Variable [scan0]
|   |   |   PhysicalScan [{'<root>': scan0}, collName]
|   |   Evaluation [{c1}]
|   |   |   FunctionCall [getField]
|   |   |   |   Const ["b"]
|   |   |   Variable [scan0]
|   |   Evaluation [{proj0}]
|   |   |   FunctionCall [getField]
|   |   |   |   Const ["a"]
|   |   |   Variable [scan0]
|   |   PhysicalScan [{'<root>': scan0}, collName]
|   Evaluation [{b1}]
|   |   FunctionCall [getField]
|   |   |   Const ["b"]
|   |   Variable [scan0]
|   Evaluation [{proj0}]
|   |   FunctionCall [getField]
|   |   |   Const ["a"]
|   |   Variable [scan0]
|   PhysicalScan [{'<root>': scan0}, collName]
Evaluation [{a1}]
|   FunctionCall [getField]
|   |   Const ["b"]
|   Variable [scan0]
Evaluation [{proj0}]
|   FunctionCall [getField]
|   |   Const ["a"]
|   Variable [scan0]
PhysicalScan [{'<root>': scan0}, collName]

-- OUTPUT:
[15] union [s16] 
    branch0 [s2] 
        [1] project [s2 = getField(s1, "a"), s3 = getField(s1, "b")] 
        [0] scan s1 none none none none none none none lowPriority [] @"<collUUID>" true false 
    branch1 [s5] 
        [4] project [s5 = getField(s4, "a"), s6 = getField(s4, "b")] 
        [3] scan s4 none none none none none none none lowPriority [] @"<collUUID>" true false 
    branch2 [s8] 
        [7] project [s8 = getField(s7, "a"), s9 = getField(s7, "b")] 
        [6] scan s7 none none none none none none none lowPriority [] @"<collUUID>" true false 
    branch3 [s11] 
        [10] project [s11 = getField(s10, "a"), s12 = getField(s10, "b")] 
        [9] scan s10 none none none none none none none lowPriority [] @"<collUUID>" true false 
    branch4 [s14] 
        [13] project [s14 = getField(s13, "a"), s15 = getField(s13, "b")] 
        [12] scan s13 none none none none none none none lowPriority [] @"<collUUID>" true false 

