summaryrefslogtreecommitdiff
path: root/src/mongo/db/test_output/exec/sbe/a_b_t_plan_generation/lower_hash_join_node.txt
blob: 6632e2d40513c939f77bfe25a55369a8d63b9232 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Golden test output of ABTPlanGeneration/LowerHashJoinNode

==== VARIATION: Hash join with one equality ====
-- INPUT:
HashJoin [joinType: Inner]
|   |   Condition
|   |       otherID = ID
|   Evaluation []
|   |   BindBlock:
|   |       [ID]
|   |           FunctionCall [getField]
|   |           |   Const ["id"]
|   |           Variable [scan1]
|   PhysicalScan [{'<root>': scan1}, otherColl]
|       BindBlock:
|           [scan1]
|               Source []
Evaluation []
|   BindBlock:
|       [otherID]
|           FunctionCall [getField]
|           |   Const ["other_id"]
|           Variable [scan0]
PhysicalScan [{'<root>': scan0}, collName]
    BindBlock:
        [scan0]
            Source []

-- OUTPUT:
[4] hj 
    left [s4] [] 
        [3] project [s4 = getField(s3, "id")] 
        [2] scan s3 none none none none none [] @"<collUUID>" true false 
    right [s2] [] 
        [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:
HashJoin [joinType: Inner]
|   |   Condition
|   |       proj0 = proj2
|   |       proj1 = proj3
|   Evaluation []
|   |   BindBlock:
|   |       [proj3]
|   |           FunctionCall [getField]
|   |           |   Const ["state_id"]
|   |           Variable [scan1]
|   Evaluation []
|   |   BindBlock:
|   |       [proj2]
|   |           FunctionCall [getField]
|   |           |   Const ["cityField"]
|   |           Variable [scan1]
|   PhysicalScan [{'<root>': scan1}, otherColl]
|       BindBlock:
|           [scan1]
|               Source []
Evaluation []
|   BindBlock:
|       [proj1]
|           FunctionCall [getField]
|           |   Const ["state"]
|           Variable [scan0]
Evaluation []
|   BindBlock:
|       [proj0]
|           FunctionCall [getField]
|           |   Const ["city"]
|           Variable [scan0]
PhysicalScan [{'<root>': scan0}, collName]
    BindBlock:
        [scan0]
            Source []

-- OUTPUT:
[6] hj 
    left [s5, s6] [] 
        [5] project [s6 = getField(s4, "state_id")] 
        [4] project [s5 = getField(s4, "cityField")] 
        [3] scan s4 none none none none none [] @"<collUUID>" true false 
    right [s2, s3] [] 
        [2] project [s3 = getField(s1, "state")] 
        [1] project [s2 = getField(s1, "city")] 
        [0] scan s1 none none none none none [] @"<collUUID>" true false