Skip to content

Commit c833824

Browse files
committed
Add canonize for PGSQL
1 parent 10784b6 commit c833824

File tree

6 files changed

+768
-584
lines changed

6 files changed

+768
-584
lines changed

ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_join1.test_/query_13.plan

+44-77
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"Plans": [
66
{
77
"Node Type": "ResultSet_1",
8-
"PlanNodeId": 14,
8+
"PlanNodeId": 12,
99
"PlanNodeType": "ResultSet",
1010
"Plans": [
1111
{
@@ -14,35 +14,26 @@
1414
{
1515
"Inputs": [
1616
{
17-
"ExternalPlanNodeId": 12
17+
"ExternalPlanNodeId": 10
1818
}
1919
],
2020
"Limit": "1001",
2121
"Name": "Limit"
2222
}
2323
],
24-
"PlanNodeId": 13,
24+
"PlanNodeId": 11,
2525
"Plans": [
2626
{
2727
"Node Type": "UnionAll",
28-
"PlanNodeId": 12,
28+
"PlanNodeId": 10,
2929
"PlanNodeType": "Connection",
3030
"Plans": [
3131
{
3232
"CTE Name": "precompute_0_0",
33-
"Node Type": "Limit-Filter-LeftJoin (MapJoin)-ConstantExpr",
33+
"Node Type": "Limit-InnerJoin (MapJoin)-ConstantExpr-Filter",
3434
"Operators": [
3535
{
3636
"Inputs": [
37-
{
38-
"InternalOperatorId": 1
39-
},
40-
{
41-
"InternalOperatorId": 1
42-
},
43-
{
44-
"InternalOperatorId": 1
45-
},
4637
{
4738
"InternalOperatorId": 1
4839
}
@@ -51,97 +42,73 @@
5142
"Name": "Limit"
5243
},
5344
{
54-
"Inputs": [
55-
{
56-
"InternalOperatorId": 2
57-
}
58-
],
59-
"Name": "Filter",
60-
"Predicate": "item.J2_TBL.k == 1"
61-
},
62-
{
63-
"Condition": "J1_TBL.i = J2_TBL.i",
45+
"Condition": "J2_TBL.i = J1_TBL.i",
6446
"Inputs": [
6547
{
6648
"InternalOperatorId": 3
6749
},
6850
{
69-
"ExternalPlanNodeId": 10
51+
"InternalOperatorId": 2
7052
}
7153
],
72-
"Name": "LeftJoin (MapJoin)"
54+
"Name": "InnerJoin (MapJoin)"
7355
},
7456
{
7557
"Inputs": [],
7658
"Name": "ToFlow",
7759
"ToFlow": "precompute_0_0"
60+
},
61+
{
62+
"Inputs": [
63+
{
64+
"ExternalPlanNodeId": 8
65+
}
66+
],
67+
"Name": "Filter",
68+
"Predicate": "Exist(item.i) AND item.k == 1"
7869
}
7970
],
80-
"PlanNodeId": 11,
71+
"PlanNodeId": 9,
8172
"Plans": [
8273
{
83-
"Node Type": "Broadcast",
84-
"PlanNodeId": 10,
74+
"Columns": [
75+
"i",
76+
"k"
77+
],
78+
"E-Cost": "No estimate",
79+
"E-Rows": "No estimate",
80+
"E-Size": "No estimate",
81+
"LookupKeyColumns": [
82+
"i"
83+
],
84+
"Node Type": "TableLookup",
85+
"Path": "/Root/postgres_jointest/join1.test_plan/J2_TBL",
86+
"PlanNodeId": 8,
8587
"PlanNodeType": "Connection",
8688
"Plans": [
8789
{
88-
"Node Type": "Filter",
90+
"CTE Name": "precompute_0_0",
91+
"Node Type": "ConstantExpr-Aggregate",
8992
"Operators": [
9093
{
9194
"Inputs": [
9295
{
93-
"ExternalPlanNodeId": 8
96+
"InternalOperatorId": 1
9497
}
9598
],
96-
"Name": "Filter",
97-
"Predicate": "Exist(item.i)"
98-
}
99-
],
100-
"PlanNodeId": 9,
101-
"Plans": [
99+
"Iterator": "PartitionByKey",
100+
"Name": "Iterator"
101+
},
102102
{
103-
"Columns": [
104-
"i",
105-
"k"
106-
],
107-
"E-Cost": "No estimate",
108-
"E-Rows": "No estimate",
109-
"E-Size": "No estimate",
110-
"LookupKeyColumns": [
111-
"i"
112-
],
113-
"Node Type": "TableLookup",
114-
"Path": "/Root/postgres_jointest/join1.test_plan/J2_TBL",
115-
"PlanNodeId": 8,
116-
"PlanNodeType": "Connection",
117-
"Plans": [
118-
{
119-
"CTE Name": "precompute_0_0",
120-
"Node Type": "ConstantExpr-Aggregate",
121-
"Operators": [
122-
{
123-
"Inputs": [
124-
{
125-
"InternalOperatorId": 1
126-
}
127-
],
128-
"Iterator": "PartitionByKey",
129-
"Name": "Iterator"
130-
},
131-
{
132-
"Input": "precompute_0_0",
133-
"Inputs": [],
134-
"Name": "PartitionByKey"
135-
}
136-
],
137-
"PlanNodeId": 7
138-
}
139-
],
140-
"Table": "postgres_jointest/join1.test_plan/J2_TBL"
103+
"Input": "precompute_0_0",
104+
"Inputs": [],
105+
"Name": "PartitionByKey"
141106
}
142-
]
107+
],
108+
"PlanNodeId": 7
143109
}
144-
]
110+
],
111+
"Table": "postgres_jointest/join1.test_plan/J2_TBL"
145112
}
146113
]
147114
}

0 commit comments

Comments
 (0)