# Golden test output of ABTPlanGeneration/LowerNestedLoopJoinNode

==== VARIATION: Nested loop join with equality predicate (Inner join) ====
-- INPUT:
Filter []
|   BinaryOp [FillEmpty]
|   |   Const [false]
|   BinaryOp [Eq]
|   |   Const [10024]
|   FunctionCall [getField]
|   |   Const ["a"]
|   Variable [proj2]
NestedLoopJoin [joinType: Inner, {proj0}]
|   |   BinaryOp [FillEmpty]
|   |   |   Const [false]
|   |   BinaryOp [Eq]
|   |   |   Variable [proj1]
|   |   Variable [proj0]
|   Evaluation [{proj1}]
|   |   FunctionCall [getField]
|   |   |   Const ["id"]
|   |   Variable [scan1]
|   PhysicalScan [{'<root>': scan1}, otherColl]
Evaluation [{proj2}]
|   FunctionCall [getField]
|   |   Const ["zipcode"]
|   Variable [scan0]
Evaluation [{proj0}]
|   FunctionCall [getField]
|   |   Const ["city"]
|   Variable [scan0]
PhysicalScan [{'<root>': scan0}, collName]

-- OUTPUT:
[7] filter {((getField(s3, "a") == 10024) ?: false)} 
[6] nlj inner [s3] [s2] {((s2 == s5) ?: false)} 
    left 
        [3] project [s3 = getField(s1, "zipcode")] 
        [1] project [s2 = getField(s1, "city")] 
        [0] scan s1 none none none none none [] @"<collUUID>" true false 
    right 
        [5] project [s5 = getField(s4, "id")] 
        [4] scan s4 none none none none none [] @"<collUUID>" true false 


==== VARIATION: Nested loop join with equality predicate (Left join) ====
-- INPUT:
Filter []
|   BinaryOp [FillEmpty]
|   |   Const [false]
|   BinaryOp [Eq]
|   |   Const [10024]
|   FunctionCall [getField]
|   |   Const ["a"]
|   Variable [proj2]
NestedLoopJoin [joinType: Left, {proj0}]
|   |   BinaryOp [FillEmpty]
|   |   |   Const [false]
|   |   BinaryOp [Eq]
|   |   |   Variable [proj1]
|   |   Variable [proj0]
|   Evaluation [{proj1}]
|   |   FunctionCall [getField]
|   |   |   Const ["id"]
|   |   Variable [scan1]
|   PhysicalScan [{'<root>': scan1}, otherColl]
Evaluation [{proj2}]
|   FunctionCall [getField]
|   |   Const ["zipcode"]
|   Variable [scan0]
Evaluation [{proj0}]
|   FunctionCall [getField]
|   |   Const ["city"]
|   Variable [scan0]
PhysicalScan [{'<root>': scan0}, collName]

-- OUTPUT:
[7] filter {((getField(s3, "a") == 10024) ?: false)} 
[6] nlj left [s3] [s2] {((s2 == s5) ?: false)} 
    left 
        [3] project [s3 = getField(s1, "zipcode")] 
        [1] project [s2 = getField(s1, "city")] 
        [0] scan s1 none none none none none [] @"<collUUID>" true false 
    right 
        [5] project [s5 = getField(s4, "id")] 
        [4] scan s4 none none none none none [] @"<collUUID>" true false 

