Skip to content

Commit c90227a

Browse files
committed
fix
1 parent 94551ea commit c90227a

File tree

22 files changed

+288
-76
lines changed

22 files changed

+288
-76
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/SimplifyConditionalsInPredicate.scala

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
package org.apache.spark.sql.catalyst.optimizer
1919

20-
import org.apache.spark.sql.catalyst.expressions.{And, ArrayExists, ArrayFilter, CaseWhen, Expression, If, LambdaFunction, Literal, MapFilter, Not, Or}
20+
import org.apache.spark.sql.catalyst.expressions.{And, CaseWhen, Expression, If, Literal, Not, Or}
2121
import org.apache.spark.sql.catalyst.expressions.Literal.{FalseLiteral, TrueLiteral}
2222
import org.apache.spark.sql.catalyst.plans.logical._
2323
import org.apache.spark.sql.catalyst.rules.Rule
@@ -32,23 +32,6 @@ object SimplifyConditionalsInPredicate extends Rule[LogicalPlan] {
3232
case j @ Join(_, _, _, Some(cond), _) => j.copy(condition = Some(simplifyConditional(cond)))
3333
case d @ DeleteFromTable(_, Some(cond)) => d.copy(condition = Some(simplifyConditional(cond)))
3434
case u @ UpdateTable(_, _, Some(cond)) => u.copy(condition = Some(simplifyConditional(cond)))
35-
case p: LogicalPlan => p transformExpressions {
36-
case i @ If(pred, _, _) => i.copy(predicate = simplifyConditional(pred))
37-
case cw @ CaseWhen(branches, _) =>
38-
val newBranches = branches.map { case (cond, value) =>
39-
simplifyConditional(cond) -> value
40-
}
41-
cw.copy(branches = newBranches)
42-
case af @ ArrayFilter(_, lf @ LambdaFunction(func, _, _)) =>
43-
val newLambda = lf.copy(function = simplifyConditional(func))
44-
af.copy(function = newLambda)
45-
case ae @ ArrayExists(_, lf @ LambdaFunction(func, _, _), false) =>
46-
val newLambda = lf.copy(function = simplifyConditional(func))
47-
ae.copy(function = newLambda)
48-
case mf @ MapFilter(_, lf @ LambdaFunction(func, _, _)) =>
49-
val newLambda = lf.copy(function = simplifyConditional(func))
50-
mf.copy(function = newLambda)
51-
}
5235
}
5336

5437
private def simplifyConditional(e: Expression): Expression = e match {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,229 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
package org.apache.spark.sql.catalyst.optimizer
19+
20+
import org.apache.spark.sql.AnalysisException
21+
import org.apache.spark.sql.catalyst.analysis.UnresolvedAttribute
22+
import org.apache.spark.sql.catalyst.dsl.expressions._
23+
import org.apache.spark.sql.catalyst.dsl.plans._
24+
import org.apache.spark.sql.catalyst.expressions.{And, CaseWhen, Expression, If, IsNotNull, Literal, Or}
25+
import org.apache.spark.sql.catalyst.expressions.Literal.{FalseLiteral, TrueLiteral}
26+
import org.apache.spark.sql.catalyst.plans.{Inner, PlanTest}
27+
import org.apache.spark.sql.catalyst.plans.logical.{DeleteFromTable, LocalRelation, LogicalPlan, UpdateTable}
28+
import org.apache.spark.sql.catalyst.rules.RuleExecutor
29+
import org.apache.spark.sql.types.{BooleanType, IntegerType}
30+
31+
class SimplifyConditionalsInPredicateSuite extends PlanTest {
32+
33+
object Optimize extends RuleExecutor[LogicalPlan] {
34+
val batches =
35+
Batch("SimplifyConditionalsInPredicate", FixedPoint(10),
36+
NullPropagation,
37+
ConstantFolding,
38+
BooleanSimplification,
39+
SimplifyConditionals,
40+
SimplifyConditionalsInPredicate) :: Nil
41+
}
42+
43+
private val testRelation =
44+
LocalRelation('i.int, 'b.boolean, 'a.array(IntegerType), 'm.map(IntegerType, IntegerType))
45+
private val anotherTestRelation = LocalRelation('d.int)
46+
47+
test("if(cond, trueVal, false) => And(cond, trueVal)") {
48+
val originalCond = If(
49+
UnresolvedAttribute("i") > Literal(10),
50+
UnresolvedAttribute("b"),
51+
FalseLiteral)
52+
val expectedCond = And(
53+
UnresolvedAttribute("i") > Literal(10),
54+
UnresolvedAttribute("b"))
55+
testFilter(originalCond, expectedCond = expectedCond)
56+
testJoin(originalCond, expectedCond = expectedCond)
57+
testDelete(originalCond, expectedCond = expectedCond)
58+
testUpdate(originalCond, expectedCond = expectedCond)
59+
testProjection(originalCond, expectedExpr = originalCond)
60+
}
61+
62+
test("if(cond, trueVal, true) => or(not(cond), trueVal)") {
63+
val originalCond = If(
64+
UnresolvedAttribute("i") > Literal(10),
65+
UnresolvedAttribute("b"),
66+
TrueLiteral)
67+
val expectedCond = Or(
68+
UnresolvedAttribute("i") <= Literal(10),
69+
UnresolvedAttribute("b"))
70+
testFilter(originalCond, expectedCond = expectedCond)
71+
testJoin(originalCond, expectedCond = expectedCond)
72+
testDelete(originalCond, expectedCond = expectedCond)
73+
testUpdate(originalCond, expectedCond = expectedCond)
74+
testProjection(originalCond, expectedExpr = originalCond)
75+
}
76+
77+
test("if(cond, false, falseVal) => and(not(cond), falseVal)") {
78+
val originalCond = If(
79+
UnresolvedAttribute("i") > Literal(10),
80+
FalseLiteral,
81+
UnresolvedAttribute("b"))
82+
val expectedCond = And(
83+
UnresolvedAttribute("i") <= Literal(10),
84+
UnresolvedAttribute("b"))
85+
testFilter(originalCond, expectedCond = expectedCond)
86+
testJoin(originalCond, expectedCond = expectedCond)
87+
testDelete(originalCond, expectedCond = expectedCond)
88+
testUpdate(originalCond, expectedCond = expectedCond)
89+
testProjection(originalCond, expectedExpr = originalCond)
90+
}
91+
92+
test("if(cond, true, falseVal) => or(cond, falseVal)") {
93+
val originalCond = If(
94+
UnresolvedAttribute("i") > Literal(10),
95+
TrueLiteral,
96+
UnresolvedAttribute("b"))
97+
val expectedCond = Or(
98+
UnresolvedAttribute("i") > Literal(10),
99+
UnresolvedAttribute("b"))
100+
testFilter(originalCond, expectedCond = expectedCond)
101+
testJoin(originalCond, expectedCond = expectedCond)
102+
testDelete(originalCond, expectedCond = expectedCond)
103+
testUpdate(originalCond, expectedCond = expectedCond)
104+
testProjection(originalCond, expectedExpr = originalCond)
105+
}
106+
107+
108+
test("case when cond then trueVal else false end => And(cond, trueVal)") {
109+
Seq(Some(FalseLiteral), None, Some(Literal(null, BooleanType))).foreach { elseExp =>
110+
val originalCond = CaseWhen(
111+
Seq((UnresolvedAttribute("i") > Literal(10), UnresolvedAttribute("b"))),
112+
elseExp)
113+
val expectedCond = And(
114+
UnresolvedAttribute("i") > Literal(10),
115+
UnresolvedAttribute("b"))
116+
testFilter(originalCond, expectedCond = expectedCond)
117+
testJoin(originalCond, expectedCond = expectedCond)
118+
testDelete(originalCond, expectedCond = expectedCond)
119+
testUpdate(originalCond, expectedCond = expectedCond)
120+
testProjection(originalCond, expectedExpr = originalCond)
121+
}
122+
}
123+
124+
test("case when cond then trueVal else true end => or(not(cond), trueVal)") {
125+
val originalCond = CaseWhen(
126+
Seq((UnresolvedAttribute("i") > Literal(10), UnresolvedAttribute("b"))),
127+
TrueLiteral)
128+
val expectedCond = Or(
129+
UnresolvedAttribute("i") <= Literal(10),
130+
UnresolvedAttribute("b"))
131+
testFilter(originalCond, expectedCond = expectedCond)
132+
testJoin(originalCond, expectedCond = expectedCond)
133+
testDelete(originalCond, expectedCond = expectedCond)
134+
testUpdate(originalCond, expectedCond = expectedCond)
135+
testProjection(originalCond, expectedExpr = originalCond)
136+
}
137+
138+
test("case when cond then false else elseValue end => and(not(cond), elseValue)") {
139+
Seq()
140+
val originalCond = CaseWhen(
141+
Seq((UnresolvedAttribute("i") > Literal(10), FalseLiteral)),
142+
UnresolvedAttribute("b"))
143+
val expectedCond = And(
144+
UnresolvedAttribute("i") <= Literal(10),
145+
UnresolvedAttribute("b"))
146+
testFilter(originalCond, expectedCond = expectedCond)
147+
testJoin(originalCond, expectedCond = expectedCond)
148+
testDelete(originalCond, expectedCond = expectedCond)
149+
testUpdate(originalCond, expectedCond = expectedCond)
150+
testProjection(originalCond, expectedExpr = originalCond)
151+
}
152+
153+
test("case when cond then true else elseValue end => or(cond, elseValue)") {
154+
val originalCond = CaseWhen(
155+
Seq((UnresolvedAttribute("i") > Literal(10), TrueLiteral)),
156+
UnresolvedAttribute("b"))
157+
val expectedCond = Or(
158+
UnresolvedAttribute("i") > Literal(10),
159+
UnresolvedAttribute("b"))
160+
testFilter(originalCond, expectedCond = expectedCond)
161+
testJoin(originalCond, expectedCond = expectedCond)
162+
testDelete(originalCond, expectedCond = expectedCond)
163+
testUpdate(originalCond, expectedCond = expectedCond)
164+
testProjection(originalCond, expectedExpr = originalCond)
165+
}
166+
167+
test("case when cond then true end => or(cond, null)") {
168+
val originalCond = CaseWhen(
169+
Seq((UnresolvedAttribute("i") > Literal(10), TrueLiteral)))
170+
val expectedCond = UnresolvedAttribute("i") > Literal(10)
171+
testFilter(originalCond, expectedCond = expectedCond)
172+
testJoin(originalCond, expectedCond = expectedCond)
173+
testDelete(originalCond, expectedCond = expectedCond)
174+
testUpdate(originalCond, expectedCond = expectedCond)
175+
testProjection(originalCond, expectedExpr = originalCond)
176+
}
177+
178+
test("Simplify conditional in conditions of CaseWhen inside another CaseWhen") {
179+
val nestedCaseWhen = CaseWhen(
180+
Seq((UnresolvedAttribute("i") > Literal(10)) -> UnresolvedAttribute("b")),
181+
FalseLiteral)
182+
val originalCond = CaseWhen(Seq(IsNotNull(nestedCaseWhen) -> FalseLiteral))
183+
val expectedCond = FalseLiteral
184+
185+
testFilter(originalCond, expectedCond = expectedCond)
186+
testJoin(originalCond, expectedCond = expectedCond)
187+
testDelete(originalCond, expectedCond = expectedCond)
188+
testUpdate(originalCond, expectedCond = expectedCond)
189+
testProjection(originalCond, expectedExpr = originalCond)
190+
}
191+
192+
test("Not expected type - simplifyConditional") {
193+
val e = intercept[AnalysisException] {
194+
testFilter(originalCond = Literal(null, IntegerType), expectedCond = FalseLiteral)
195+
}.getMessage
196+
assert(e.contains("'CAST(NULL AS INT)' of type int is not a boolean"))
197+
}
198+
199+
private def testFilter(originalCond: Expression, expectedCond: Expression): Unit = {
200+
test((rel, exp) => rel.where(exp), originalCond, expectedCond)
201+
}
202+
203+
private def testJoin(originalCond: Expression, expectedCond: Expression): Unit = {
204+
test((rel, exp) => rel.join(anotherTestRelation, Inner, Some(exp)), originalCond, expectedCond)
205+
}
206+
207+
private def testProjection(originalExpr: Expression, expectedExpr: Expression): Unit = {
208+
test((rel, exp) => rel.select(exp), originalExpr, expectedExpr)
209+
}
210+
211+
private def testDelete(originalCond: Expression, expectedCond: Expression): Unit = {
212+
test((rel, expr) => DeleteFromTable(rel, Some(expr)), originalCond, expectedCond)
213+
}
214+
215+
private def testUpdate(originalCond: Expression, expectedCond: Expression): Unit = {
216+
test((rel, expr) => UpdateTable(rel, Seq.empty, Some(expr)), originalCond, expectedCond)
217+
}
218+
219+
private def test(
220+
func: (LogicalPlan, Expression) => LogicalPlan,
221+
originalExpr: Expression,
222+
expectedExpr: Expression): Unit = {
223+
224+
val originalPlan = func(testRelation, originalExpr).analyze
225+
val optimizedPlan = Optimize.execute(originalPlan)
226+
val expectedPlan = func(testRelation, expectedExpr).analyze
227+
comparePlans(optimizedPlan, expectedPlan)
228+
}
229+
}

sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q34.sf100/explain.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,15 @@ Input [5]: [ss_customer_sk#2, ss_hdemo_sk#3, ss_store_sk#4, ss_ticket_number#5,
120120
Output [4]: [hd_demo_sk#13, hd_buy_potential#14, hd_dep_count#15, hd_vehicle_count#16]
121121
Batched: true
122122
Location [not included in comparison]/{warehouse_dir}/household_demographics]
123-
PushedFilters: [IsNotNull(hd_vehicle_count), Or(EqualTo(hd_buy_potential,>10000),EqualTo(hd_buy_potential,Unknown)), GreaterThan(hd_vehicle_count,0), IsNotNull(hd_demo_sk)]
123+
PushedFilters: [IsNotNull(hd_vehicle_count), IsNotNull(hd_dep_count), Or(EqualTo(hd_buy_potential,>10000),EqualTo(hd_buy_potential,Unknown)), GreaterThan(hd_vehicle_count,0), GreaterThan(hd_vehicle_count,0), IsNotNull(hd_demo_sk)]
124124
ReadSchema: struct<hd_demo_sk:int,hd_buy_potential:string,hd_dep_count:int,hd_vehicle_count:int>
125125

126126
(19) ColumnarToRow [codegen id : 3]
127127
Input [4]: [hd_demo_sk#13, hd_buy_potential#14, hd_dep_count#15, hd_vehicle_count#16]
128128

129129
(20) Filter [codegen id : 3]
130130
Input [4]: [hd_demo_sk#13, hd_buy_potential#14, hd_dep_count#15, hd_vehicle_count#16]
131-
Condition : ((((isnotnull(hd_vehicle_count#16) AND ((hd_buy_potential#14 = >10000) OR (hd_buy_potential#14 = Unknown))) AND (hd_vehicle_count#16 > 0)) AND (CASE WHEN (hd_vehicle_count#16 > 0) THEN (cast(hd_dep_count#15 as double) / cast(hd_vehicle_count#16 as double)) ELSE null END > 1.2)) AND isnotnull(hd_demo_sk#13))
131+
Condition : (((((isnotnull(hd_vehicle_count#16) AND isnotnull(hd_dep_count#15)) AND ((hd_buy_potential#14 = >10000) OR (hd_buy_potential#14 = Unknown))) AND (hd_vehicle_count#16 > 0)) AND ((cast(hd_dep_count#15 as double) / cast(hd_vehicle_count#16 as double)) > 1.2)) AND isnotnull(hd_demo_sk#13))
132132

133133
(21) Project [codegen id : 3]
134134
Output [1]: [hd_demo_sk#13]
@@ -156,7 +156,7 @@ Results [3]: [ss_ticket_number#5, ss_customer_sk#2, count#19]
156156

157157
(26) Exchange
158158
Input [3]: [ss_ticket_number#5, ss_customer_sk#2, count#19]
159-
Arguments: hashpartitioning(ss_ticket_number#5, ss_customer_sk#2, 5), true, [id=#20]
159+
Arguments: hashpartitioning(ss_ticket_number#5, ss_customer_sk#2, 5), ENSURE_REQUIREMENTS, [id=#20]
160160

161161
(27) HashAggregate [codegen id : 5]
162162
Input [3]: [ss_ticket_number#5, ss_customer_sk#2, count#19]
@@ -171,7 +171,7 @@ Condition : ((cnt#22 >= 15) AND (cnt#22 <= 20))
171171

172172
(29) Exchange
173173
Input [3]: [ss_ticket_number#5, ss_customer_sk#2, cnt#22]
174-
Arguments: hashpartitioning(ss_customer_sk#2, 5), true, [id=#23]
174+
Arguments: hashpartitioning(ss_customer_sk#2, 5), ENSURE_REQUIREMENTS, [id=#23]
175175

176176
(30) Sort [codegen id : 6]
177177
Input [3]: [ss_ticket_number#5, ss_customer_sk#2, cnt#22]
@@ -193,7 +193,7 @@ Condition : isnotnull(c_customer_sk#24)
193193

194194
(34) Exchange
195195
Input [5]: [c_customer_sk#24, c_salutation#25, c_first_name#26, c_last_name#27, c_preferred_cust_flag#28]
196-
Arguments: hashpartitioning(c_customer_sk#24, 5), true, [id=#29]
196+
Arguments: hashpartitioning(c_customer_sk#24, 5), ENSURE_REQUIREMENTS, [id=#29]
197197

198198
(35) Sort [codegen id : 8]
199199
Input [5]: [c_customer_sk#24, c_salutation#25, c_first_name#26, c_last_name#27, c_preferred_cust_flag#28]
@@ -210,7 +210,7 @@ Input [8]: [ss_ticket_number#5, ss_customer_sk#2, cnt#22, c_customer_sk#24, c_sa
210210

211211
(38) Exchange
212212
Input [6]: [c_last_name#27, c_first_name#26, c_salutation#25, c_preferred_cust_flag#28, ss_ticket_number#5, cnt#22]
213-
Arguments: rangepartitioning(c_last_name#27 ASC NULLS FIRST, c_first_name#26 ASC NULLS FIRST, c_salutation#25 ASC NULLS FIRST, c_preferred_cust_flag#28 DESC NULLS LAST, 5), true, [id=#30]
213+
Arguments: rangepartitioning(c_last_name#27 ASC NULLS FIRST, c_first_name#26 ASC NULLS FIRST, c_salutation#25 ASC NULLS FIRST, c_preferred_cust_flag#28 DESC NULLS LAST, 5), ENSURE_REQUIREMENTS, [id=#30]
214214

215215
(39) Sort [codegen id : 10]
216216
Input [6]: [c_last_name#27, c_first_name#26, c_salutation#25, c_preferred_cust_flag#28, ss_ticket_number#5, cnt#22]

sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q34.sf100/simplified.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ WholeStageCodegen (10)
4747
BroadcastExchange #6
4848
WholeStageCodegen (3)
4949
Project [hd_demo_sk]
50-
Filter [hd_vehicle_count,hd_buy_potential,hd_dep_count,hd_demo_sk]
50+
Filter [hd_vehicle_count,hd_dep_count,hd_buy_potential,hd_demo_sk]
5151
ColumnarToRow
5252
InputAdapter
5353
Scan parquet default.household_demographics [hd_demo_sk,hd_buy_potential,hd_dep_count,hd_vehicle_count]

sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q34/explain.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,15 @@ Input [5]: [ss_customer_sk#2, ss_hdemo_sk#3, ss_store_sk#4, ss_ticket_number#5,
117117
Output [4]: [hd_demo_sk#13, hd_buy_potential#14, hd_dep_count#15, hd_vehicle_count#16]
118118
Batched: true
119119
Location [not included in comparison]/{warehouse_dir}/household_demographics]
120-
PushedFilters: [IsNotNull(hd_vehicle_count), Or(EqualTo(hd_buy_potential,>10000),EqualTo(hd_buy_potential,Unknown)), GreaterThan(hd_vehicle_count,0), IsNotNull(hd_demo_sk)]
120+
PushedFilters: [IsNotNull(hd_vehicle_count), IsNotNull(hd_dep_count), Or(EqualTo(hd_buy_potential,>10000),EqualTo(hd_buy_potential,Unknown)), GreaterThan(hd_vehicle_count,0), GreaterThan(hd_vehicle_count,0), IsNotNull(hd_demo_sk)]
121121
ReadSchema: struct<hd_demo_sk:int,hd_buy_potential:string,hd_dep_count:int,hd_vehicle_count:int>
122122

123123
(19) ColumnarToRow [codegen id : 3]
124124
Input [4]: [hd_demo_sk#13, hd_buy_potential#14, hd_dep_count#15, hd_vehicle_count#16]
125125

126126
(20) Filter [codegen id : 3]
127127
Input [4]: [hd_demo_sk#13, hd_buy_potential#14, hd_dep_count#15, hd_vehicle_count#16]
128-
Condition : ((((isnotnull(hd_vehicle_count#16) AND ((hd_buy_potential#14 = >10000) OR (hd_buy_potential#14 = Unknown))) AND (hd_vehicle_count#16 > 0)) AND (CASE WHEN (hd_vehicle_count#16 > 0) THEN (cast(hd_dep_count#15 as double) / cast(hd_vehicle_count#16 as double)) ELSE null END > 1.2)) AND isnotnull(hd_demo_sk#13))
128+
Condition : (((((isnotnull(hd_vehicle_count#16) AND isnotnull(hd_dep_count#15)) AND ((hd_buy_potential#14 = >10000) OR (hd_buy_potential#14 = Unknown))) AND (hd_vehicle_count#16 > 0)) AND ((cast(hd_dep_count#15 as double) / cast(hd_vehicle_count#16 as double)) > 1.2)) AND isnotnull(hd_demo_sk#13))
129129

130130
(21) Project [codegen id : 3]
131131
Output [1]: [hd_demo_sk#13]
@@ -153,7 +153,7 @@ Results [3]: [ss_ticket_number#5, ss_customer_sk#2, count#19]
153153

154154
(26) Exchange
155155
Input [3]: [ss_ticket_number#5, ss_customer_sk#2, count#19]
156-
Arguments: hashpartitioning(ss_ticket_number#5, ss_customer_sk#2, 5), true, [id=#20]
156+
Arguments: hashpartitioning(ss_ticket_number#5, ss_customer_sk#2, 5), ENSURE_REQUIREMENTS, [id=#20]
157157

158158
(27) HashAggregate [codegen id : 6]
159159
Input [3]: [ss_ticket_number#5, ss_customer_sk#2, count#19]
@@ -195,7 +195,7 @@ Input [8]: [ss_ticket_number#5, ss_customer_sk#2, cnt#22, c_customer_sk#23, c_sa
195195

196196
(35) Exchange
197197
Input [6]: [c_last_name#26, c_first_name#25, c_salutation#24, c_preferred_cust_flag#27, ss_ticket_number#5, cnt#22]
198-
Arguments: rangepartitioning(c_last_name#26 ASC NULLS FIRST, c_first_name#25 ASC NULLS FIRST, c_salutation#24 ASC NULLS FIRST, c_preferred_cust_flag#27 DESC NULLS LAST, 5), true, [id=#29]
198+
Arguments: rangepartitioning(c_last_name#26 ASC NULLS FIRST, c_first_name#25 ASC NULLS FIRST, c_salutation#24 ASC NULLS FIRST, c_preferred_cust_flag#27 DESC NULLS LAST, 5), ENSURE_REQUIREMENTS, [id=#29]
199199

200200
(36) Sort [codegen id : 7]
201201
Input [6]: [c_last_name#26, c_first_name#25, c_salutation#24, c_preferred_cust_flag#27, ss_ticket_number#5, cnt#22]

sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q34/simplified.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ WholeStageCodegen (7)
4141
BroadcastExchange #5
4242
WholeStageCodegen (3)
4343
Project [hd_demo_sk]
44-
Filter [hd_vehicle_count,hd_buy_potential,hd_dep_count,hd_demo_sk]
44+
Filter [hd_vehicle_count,hd_dep_count,hd_buy_potential,hd_demo_sk]
4545
ColumnarToRow
4646
InputAdapter
4747
Scan parquet default.household_demographics [hd_demo_sk,hd_buy_potential,hd_dep_count,hd_vehicle_count]

0 commit comments

Comments
 (0)