# Golden test output of ABTPlanGeneration/LowerHashJoinNode

==== VARIATION: Hash join with one equality ====
-- INPUT:
Filter []
|   BinaryOp [FillEmpty]
|   |   Const [false]
|   BinaryOp [Eq]
|   |   Const [1337]
|   FunctionCall [getField]
|   |   Const ["a"]
|   Variable [proj0]
HashJoin [joinType: Inner]
|   |   Condition
|   |       otherID = ID
|   Evaluation [{proj1}]
|   |   FunctionCall [getField]
|   |   |   Const ["other_info"]
|   |   Variable [scan1]
|   Evaluation [{ID}]
|   |   FunctionCall [getField]
|   |   |   Const ["id"]
|   |   Variable [scan1]
|   PhysicalScan [{'<root>': scan1}, otherColl]
Evaluation [{proj0}]
|   FunctionCall [getField]
|   |   Const ["info"]
|   Variable [scan0]
Evaluation [{otherID}]
|   FunctionCall [getField]
|   |   Const ["other_id"]
|   Variable [scan0]
PhysicalScan [{'<root>': scan0}, collName]

-- OUTPUT:
[9] filter {((getField(s3, "a") == 1337) ?: false)} 
[8] hj 
    left [s5] [s6] 
        [7] project [s6 = getField(s4, "other_info")] 
        [5] project [s5 = getField(s4, "id")] 
        [4] scan s4 none none none none none [] @"<collUUID>" true false 
    right [s2] [s3] 
        [3] project [s3 = getField(s1, "info")] 
        [1] project [s2 = getField(s1, "other_id")] 
        [0] scan s1 none none none none none [] @"<collUUID>" true false 


==== VARIATION: Hash join with two equalities ====
-- INPUT:
Filter []
|   BinaryOp [FillEmpty]
|   |   Const [false]
|   BinaryOp [Eq]
|   |   Const [56]
|   FunctionCall [getField]
|   |   Const ["a"]
|   Variable [proj7]
HashJoin [joinType: Inner]
|   |   Condition
|   |       proj0 = proj2
|   |       proj1 = proj3
|   Evaluation [{proj7}]
|   |   FunctionCall [getField]
|   |   |   Const ["another"]
|   |   Variable [scan1]
|   Evaluation [{proj3}]
|   |   FunctionCall [getField]
|   |   |   Const ["state_id"]
|   |   Variable [scan1]
|   Evaluation [{proj2}]
|   |   FunctionCall [getField]
|   |   |   Const ["cityField"]
|   |   Variable [scan1]
|   PhysicalScan [{'<root>': scan1}, otherColl]
Evaluation [{proj6}]
|   FunctionCall [getField]
|   |   Const ["some_more_info"]
|   Variable [scan0]
Evaluation [{proj5}]
|   FunctionCall [getField]
|   |   Const ["more_info"]
|   Variable [scan0]
Evaluation [{proj4}]
|   FunctionCall [getField]
|   |   Const ["info"]
|   Variable [scan0]
Evaluation [{proj1}]
|   FunctionCall [getField]
|   |   Const ["state"]
|   Variable [scan0]
Evaluation [{proj0}]
|   FunctionCall [getField]
|   |   Const ["city"]
|   Variable [scan0]
PhysicalScan [{'<root>': scan0}, collName]

-- OUTPUT:
[13] filter {((getField(s10, "a") == 56) ?: false)} 
[12] hj 
    left [s8, s9] [s10] 
        [11] project [s10 = getField(s7, "another")] 
        [9] project [s9 = getField(s7, "state_id")] 
        [8] project [s8 = getField(s7, "cityField")] 
        [7] scan s7 none none none none none [] @"<collUUID>" true false 
    right [s2, s3] [s4, s5, s6] 
        [6] project [s6 = getField(s1, "some_more_info")] 
        [4] project [s5 = getField(s1, "more_info")] 
        [3] project [s4 = getField(s1, "info")] 
        [2] project [s3 = getField(s1, "state")] 
        [1] project [s2 = getField(s1, "city")] 
        [0] scan s1 none none none none none [] @"<collUUID>" true false 

