Skip to content

Commit e7def5c

Browse files
authored
Fix plan order (#16298)
1 parent 8f55a6d commit e7def5c

File tree

523 files changed

+10287
-10285
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

523 files changed

+10287
-10285
lines changed

Diff for: ydb/core/kqp/opt/kqp_query_plan.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ class TxPlanSerializer {
314314
TMaybe<TString> CteRefName;
315315
TMap<TString, NJson::TJsonValue> NodeInfo;
316316
TVector<TOperator> Operators;
317-
THashSet<ui32> Plans;
317+
TSet<ui32> Plans;
318318
const NKqpProto::TKqpPhyStage* StageProto;
319319
TMap<TString, TString> OptEstimates;
320320
};

Diff for: ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_write_multi_usage.script-script_/write_multi_usage.script.plan

+30-30
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"PlanNodeType": "Query",
1111
"Plans": [
1212
{
13-
"Node Type": "ResultSet_1",
14-
"PlanNodeId": 5,
13+
"Node Type": "ResultSet_0",
14+
"PlanNodeId": 10,
1515
"PlanNodeType": "ResultSet",
1616
"Plans": [
1717
{
@@ -20,18 +20,18 @@
2020
{
2121
"Inputs": [
2222
{
23-
"ExternalPlanNodeId": 3
23+
"ExternalPlanNodeId": 8
2424
}
2525
],
2626
"Limit": "1001",
2727
"Name": "Limit"
2828
}
2929
],
30-
"PlanNodeId": 4,
30+
"PlanNodeId": 9,
3131
"Plans": [
3232
{
3333
"Node Type": "Merge",
34-
"PlanNodeId": 3,
34+
"PlanNodeId": 8,
3535
"PlanNodeType": "Connection",
3636
"Plans": [
3737
{
@@ -40,48 +40,44 @@
4040
{
4141
"Inputs": [
4242
{
43-
"ExternalPlanNodeId": 1
43+
"ExternalPlanNodeId": 6
4444
}
4545
],
4646
"Limit": "1001",
4747
"Name": "Limit"
4848
}
4949
],
50-
"PlanNodeId": 2,
50+
"PlanNodeId": 7,
5151
"Plans": [
5252
{
5353
"Node Type": "TableFullScan",
5454
"Operators": [
5555
{
5656
"Inputs": [],
5757
"Name": "TableFullScan",
58-
"Path": "/local/base_write_multi_usage_script_script/Input1",
58+
"Path": "/local/base_write_multi_usage_script_script/Temp",
5959
"ReadColumns": [
60-
"Amount",
61-
"Comment",
62-
"Group",
63-
"Name"
60+
"Name",
61+
"Value"
6462
],
6563
"ReadLimit": "1001",
6664
"ReadRanges": [
67-
"Group (-\u221e, +\u221e)",
6865
"Name (-\u221e, +\u221e)"
6966
],
7067
"ReadRangesPointPrefixLen": "0",
7168
"Scan": "Sequential",
72-
"Table": "base_write_multi_usage_script_script/Input1"
69+
"Table": "base_write_multi_usage_script_script/Temp"
7370
}
7471
],
75-
"PlanNodeId": 1,
72+
"PlanNodeId": 6,
7673
"Tables": [
77-
"base_write_multi_usage_script_script/Input1"
74+
"base_write_multi_usage_script_script/Temp"
7875
]
7976
}
8077
]
8178
}
8279
],
8380
"SortColumns": [
84-
"Group (Asc)",
8581
"Name (Asc)"
8682
]
8783
}
@@ -90,8 +86,8 @@
9086
]
9187
},
9288
{
93-
"Node Type": "ResultSet_0",
94-
"PlanNodeId": 10,
89+
"Node Type": "ResultSet_1",
90+
"PlanNodeId": 5,
9591
"PlanNodeType": "ResultSet",
9692
"Plans": [
9793
{
@@ -100,18 +96,18 @@
10096
{
10197
"Inputs": [
10298
{
103-
"ExternalPlanNodeId": 8
99+
"ExternalPlanNodeId": 3
104100
}
105101
],
106102
"Limit": "1001",
107103
"Name": "Limit"
108104
}
109105
],
110-
"PlanNodeId": 9,
106+
"PlanNodeId": 4,
111107
"Plans": [
112108
{
113109
"Node Type": "Merge",
114-
"PlanNodeId": 8,
110+
"PlanNodeId": 3,
115111
"PlanNodeType": "Connection",
116112
"Plans": [
117113
{
@@ -120,44 +116,48 @@
120116
{
121117
"Inputs": [
122118
{
123-
"ExternalPlanNodeId": 6
119+
"ExternalPlanNodeId": 1
124120
}
125121
],
126122
"Limit": "1001",
127123
"Name": "Limit"
128124
}
129125
],
130-
"PlanNodeId": 7,
126+
"PlanNodeId": 2,
131127
"Plans": [
132128
{
133129
"Node Type": "TableFullScan",
134130
"Operators": [
135131
{
136132
"Inputs": [],
137133
"Name": "TableFullScan",
138-
"Path": "/local/base_write_multi_usage_script_script/Temp",
134+
"Path": "/local/base_write_multi_usage_script_script/Input1",
139135
"ReadColumns": [
140-
"Name",
141-
"Value"
136+
"Amount",
137+
"Comment",
138+
"Group",
139+
"Name"
142140
],
143141
"ReadLimit": "1001",
144142
"ReadRanges": [
143+
"Group (-\u221e, +\u221e)",
145144
"Name (-\u221e, +\u221e)"
146145
],
147146
"ReadRangesPointPrefixLen": "0",
148147
"Scan": "Sequential",
149-
"Table": "base_write_multi_usage_script_script/Temp"
148+
"Table": "base_write_multi_usage_script_script/Input1"
150149
}
151150
],
152-
"PlanNodeId": 6,
151+
"PlanNodeId": 1,
153152
"Tables": [
154-
"base_write_multi_usage_script_script/Temp"
153+
"base_write_multi_usage_script_script/Input1"
155154
]
156155
}
157156
]
158157
}
159158
],
160159
"SortColumns": [
160+
"Group (Asc)",
161161
"Name (Asc)"
162162
]
163163
}

Diff for: ydb/tests/functional/suite_tests/canondata/test_postgres.TestPGSQL.test_sql_suite_plan-jointest_coalesce-and-join.test_/query_5.plan

+23-23
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,29 @@
5656
],
5757
"PlanNodeId": 7,
5858
"Plans": [
59+
{
60+
"Node Type": "TableFullScan",
61+
"Operators": [
62+
{
63+
"Inputs": [],
64+
"Name": "TableFullScan",
65+
"Path": "/Root/postgres_jointest/coalesce-and-join.test_plan/xx",
66+
"ReadColumns": [
67+
"pkxx"
68+
],
69+
"ReadRanges": [
70+
"pkxx (-\u221e, +\u221e)"
71+
],
72+
"ReadRangesPointPrefixLen": "0",
73+
"Scan": "Parallel",
74+
"Table": "postgres_jointest/coalesce-and-join.test_plan/xx"
75+
}
76+
],
77+
"PlanNodeId": 6,
78+
"Tables": [
79+
"postgres_jointest/coalesce-and-join.test_plan/xx"
80+
]
81+
},
5982
{
6083
"Node Type": "Broadcast",
6184
"PlanNodeId": 5,
@@ -105,29 +128,6 @@
105128
]
106129
}
107130
]
108-
},
109-
{
110-
"Node Type": "TableFullScan",
111-
"Operators": [
112-
{
113-
"Inputs": [],
114-
"Name": "TableFullScan",
115-
"Path": "/Root/postgres_jointest/coalesce-and-join.test_plan/xx",
116-
"ReadColumns": [
117-
"pkxx"
118-
],
119-
"ReadRanges": [
120-
"pkxx (-\u221e, +\u221e)"
121-
],
122-
"ReadRangesPointPrefixLen": "0",
123-
"Scan": "Parallel",
124-
"Table": "postgres_jointest/coalesce-and-join.test_plan/xx"
125-
}
126-
],
127-
"PlanNodeId": 6,
128-
"Tables": [
129-
"postgres_jointest/coalesce-and-join.test_plan/xx"
130-
]
131131
}
132132
]
133133
}

0 commit comments

Comments
 (0)