From a235c3b2544aead2b1e3034aacfd361d49ad79b1 Mon Sep 17 00:00:00 2001 From: Kent Yao Date: Fri, 15 Jan 2021 10:18:58 -0800 Subject: [PATCH] [SPARK-34037][SQL] Remove unnecessary upcasting for Avg & Sum which handle by themself internally ### What changes were proposed in this pull request? The type-coercion for numeric types of average and sum is not necessary at all, as the resultType and sumType can prevent the overflow. ### Why are the changes needed? rm unnecessary logic which may cause potential performance regressions ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? tpcds tests for plan Closes #31079 from yaooqinn/SPARK-34037. Authored-by: Kent Yao Signed-off-by: Liang-Chi Hsieh --- .../sql/catalyst/analysis/TypeCoercion.scala | 11 ---- .../sql-tests/results/explain-aqe.sql.out | 46 ++++++++--------- .../sql-tests/results/explain.sql.out | 38 +++++++------- .../results/group-by-ordinal.sql.out | 4 +- .../postgreSQL/aggregates_part1.sql.out | 4 +- .../invalid-correlation.sql.out | 2 +- .../postgreSQL/udf-aggregates_part1.sql.out | 4 +- .../q19.sf100/explain.txt | 2 +- .../approved-plans-modified/q19/explain.txt | 2 +- .../q27.sf100/explain.txt | 30 +++++------ .../q27.sf100/simplified.txt | 6 +-- .../approved-plans-modified/q27/explain.txt | 30 +++++------ .../q27/simplified.txt | 6 +-- .../q3.sf100/explain.txt | 2 +- .../approved-plans-modified/q3/explain.txt | 2 +- .../q42.sf100/explain.txt | 2 +- .../approved-plans-modified/q42/explain.txt | 2 +- .../q43.sf100/explain.txt | 2 +- .../approved-plans-modified/q43/explain.txt | 2 +- .../q46.sf100/explain.txt | 10 ++-- .../approved-plans-modified/q46/explain.txt | 2 +- .../q52.sf100/explain.txt | 2 +- .../approved-plans-modified/q52/explain.txt | 2 +- .../q53.sf100/explain.txt | 6 +-- .../approved-plans-modified/q53/explain.txt | 8 +-- .../q55.sf100/explain.txt | 2 +- .../approved-plans-modified/q55/explain.txt | 2 +- .../q59.sf100/explain.txt | 4 +- .../approved-plans-modified/q59/explain.txt | 4 +- .../q63.sf100/explain.txt | 6 +-- .../approved-plans-modified/q63/explain.txt | 8 +-- .../q65.sf100/explain.txt | 6 +-- .../approved-plans-modified/q65/explain.txt | 6 +-- .../q68.sf100/explain.txt | 10 ++-- .../approved-plans-modified/q68/explain.txt | 2 +- .../q7.sf100/explain.txt | 10 ++-- .../q7.sf100/simplified.txt | 2 +- .../approved-plans-modified/q7/explain.txt | 10 ++-- .../approved-plans-modified/q7/simplified.txt | 2 +- .../q79.sf100/explain.txt | 6 +-- .../approved-plans-modified/q79/explain.txt | 2 +- .../q89.sf100/explain.txt | 6 +-- .../approved-plans-modified/q89/explain.txt | 10 ++-- .../q98.sf100/explain.txt | 10 ++-- .../approved-plans-modified/q98/explain.txt | 6 +-- .../approved-plans-v1_4/q11.sf100/explain.txt | 26 +++++----- .../approved-plans-v1_4/q11/explain.txt | 8 +-- .../approved-plans-v1_4/q12.sf100/explain.txt | 8 +-- .../approved-plans-v1_4/q12/explain.txt | 4 +- .../approved-plans-v1_4/q13.sf100/explain.txt | 8 +-- .../q13.sf100/simplified.txt | 2 +- .../approved-plans-v1_4/q13/explain.txt | 10 ++-- .../approved-plans-v1_4/q13/simplified.txt | 2 +- .../approved-plans-v1_4/q14a/explain.txt | 12 ++--- .../approved-plans-v1_4/q14b/explain.txt | 8 +-- .../approved-plans-v1_4/q15.sf100/explain.txt | 10 ++-- .../approved-plans-v1_4/q15/explain.txt | 2 +- .../approved-plans-v1_4/q16.sf100/explain.txt | 8 +-- .../approved-plans-v1_4/q16/explain.txt | 4 +- .../approved-plans-v1_4/q17.sf100/explain.txt | 8 +-- .../q17.sf100/simplified.txt | 2 +- .../approved-plans-v1_4/q17/explain.txt | 10 ++-- .../approved-plans-v1_4/q17/simplified.txt | 2 +- .../approved-plans-v1_4/q18/explain.txt | 2 +- .../approved-plans-v1_4/q19/explain.txt | 2 +- .../approved-plans-v1_4/q2/explain.txt | 4 +- .../approved-plans-v1_4/q20.sf100/explain.txt | 8 +-- .../approved-plans-v1_4/q20/explain.txt | 4 +- .../approved-plans-v1_4/q21.sf100/explain.txt | 10 ++-- .../q21.sf100/simplified.txt | 2 +- .../approved-plans-v1_4/q21/explain.txt | 10 ++-- .../approved-plans-v1_4/q21/simplified.txt | 2 +- .../approved-plans-v1_4/q22.sf100/explain.txt | 14 +++--- .../q22.sf100/simplified.txt | 2 +- .../approved-plans-v1_4/q22/explain.txt | 10 ++-- .../approved-plans-v1_4/q22/simplified.txt | 2 +- .../q23a.sf100/explain.txt | 24 ++++----- .../approved-plans-v1_4/q23a/explain.txt | 10 ++-- .../q23b.sf100/explain.txt | 28 +++++------ .../approved-plans-v1_4/q23b/explain.txt | 12 ++--- .../approved-plans-v1_4/q25/explain.txt | 2 +- .../approved-plans-v1_4/q26.sf100/explain.txt | 10 ++-- .../q26.sf100/simplified.txt | 2 +- .../approved-plans-v1_4/q26/explain.txt | 10 ++-- .../approved-plans-v1_4/q26/simplified.txt | 2 +- .../approved-plans-v1_4/q27.sf100/explain.txt | 10 ++-- .../q27.sf100/simplified.txt | 2 +- .../approved-plans-v1_4/q27/explain.txt | 10 ++-- .../approved-plans-v1_4/q27/simplified.txt | 2 +- .../approved-plans-v1_4/q28.sf100/explain.txt | 24 ++++----- .../approved-plans-v1_4/q28/explain.txt | 24 ++++----- .../approved-plans-v1_4/q29.sf100/explain.txt | 22 ++++---- .../q29.sf100/simplified.txt | 2 +- .../approved-plans-v1_4/q29/explain.txt | 10 ++-- .../approved-plans-v1_4/q29/simplified.txt | 2 +- .../approved-plans-v1_4/q3.sf100/explain.txt | 2 +- .../approved-plans-v1_4/q3/explain.txt | 2 +- .../approved-plans-v1_4/q31.sf100/explain.txt | 28 +++++------ .../approved-plans-v1_4/q31/explain.txt | 14 +++--- .../approved-plans-v1_4/q33/explain.txt | 8 +-- .../approved-plans-v1_4/q35.sf100/explain.txt | 26 +++++----- .../q35.sf100/simplified.txt | 2 +- .../approved-plans-v1_4/q35/explain.txt | 10 ++-- .../approved-plans-v1_4/q35/simplified.txt | 2 +- .../approved-plans-v1_4/q36.sf100/explain.txt | 8 +-- .../approved-plans-v1_4/q36/explain.txt | 8 +-- .../q39a.sf100/explain.txt | 30 +++++------ .../q39a.sf100/simplified.txt | 4 +- .../approved-plans-v1_4/q39a/explain.txt | 26 +++++----- .../approved-plans-v1_4/q39a/simplified.txt | 4 +- .../q39b.sf100/explain.txt | 30 +++++------ .../q39b.sf100/simplified.txt | 4 +- .../approved-plans-v1_4/q39b/explain.txt | 26 +++++----- .../approved-plans-v1_4/q39b/simplified.txt | 4 +- .../approved-plans-v1_4/q4.sf100/explain.txt | 38 +++++++------- .../approved-plans-v1_4/q4/explain.txt | 12 ++--- .../approved-plans-v1_4/q40.sf100/explain.txt | 6 +-- .../approved-plans-v1_4/q40/explain.txt | 2 +- .../approved-plans-v1_4/q42.sf100/explain.txt | 2 +- .../approved-plans-v1_4/q42/explain.txt | 2 +- .../approved-plans-v1_4/q43.sf100/explain.txt | 2 +- .../approved-plans-v1_4/q43/explain.txt | 2 +- .../approved-plans-v1_4/q44.sf100/explain.txt | 8 +-- .../approved-plans-v1_4/q44/explain.txt | 8 +-- .../approved-plans-v1_4/q45.sf100/explain.txt | 10 ++-- .../approved-plans-v1_4/q45/explain.txt | 2 +- .../approved-plans-v1_4/q46.sf100/explain.txt | 10 ++-- .../approved-plans-v1_4/q46/explain.txt | 2 +- .../approved-plans-v1_4/q47.sf100/explain.txt | 20 ++++---- .../approved-plans-v1_4/q47/explain.txt | 14 +++--- .../approved-plans-v1_4/q48.sf100/explain.txt | 10 ++-- .../q48.sf100/simplified.txt | 2 +- .../approved-plans-v1_4/q48/explain.txt | 10 ++-- .../approved-plans-v1_4/q48/simplified.txt | 2 +- .../approved-plans-v1_4/q49.sf100/explain.txt | 50 +++++++++---------- .../q49.sf100/simplified.txt | 6 +-- .../approved-plans-v1_4/q49/explain.txt | 38 +++++++------- .../approved-plans-v1_4/q49/simplified.txt | 6 +-- .../approved-plans-v1_4/q5/explain.txt | 8 +-- .../approved-plans-v1_4/q51.sf100/explain.txt | 14 +++--- .../approved-plans-v1_4/q51/explain.txt | 14 +++--- .../approved-plans-v1_4/q52/explain.txt | 2 +- .../approved-plans-v1_4/q53.sf100/explain.txt | 6 +-- .../approved-plans-v1_4/q53/explain.txt | 8 +-- .../approved-plans-v1_4/q54/explain.txt | 10 ++-- .../approved-plans-v1_4/q55/explain.txt | 2 +- .../approved-plans-v1_4/q56.sf100/explain.txt | 8 +-- .../approved-plans-v1_4/q56/explain.txt | 8 +-- .../approved-plans-v1_4/q57.sf100/explain.txt | 20 ++++---- .../approved-plans-v1_4/q57/explain.txt | 14 +++--- .../approved-plans-v1_4/q58.sf100/explain.txt | 6 +-- .../approved-plans-v1_4/q58/explain.txt | 6 +-- .../approved-plans-v1_4/q59.sf100/explain.txt | 2 +- .../approved-plans-v1_4/q59/explain.txt | 2 +- .../approved-plans-v1_4/q6.sf100/explain.txt | 14 +++--- .../approved-plans-v1_4/q6/explain.txt | 6 +-- .../approved-plans-v1_4/q60.sf100/explain.txt | 8 +-- .../approved-plans-v1_4/q60/explain.txt | 8 +-- .../approved-plans-v1_4/q61.sf100/explain.txt | 6 +-- .../approved-plans-v1_4/q61/explain.txt | 6 +-- .../approved-plans-v1_4/q63.sf100/explain.txt | 6 +-- .../approved-plans-v1_4/q63/explain.txt | 8 +-- .../approved-plans-v1_4/q64.sf100/explain.txt | 50 +++++++++---------- .../approved-plans-v1_4/q64/explain.txt | 12 ++--- .../approved-plans-v1_4/q65.sf100/explain.txt | 10 ++-- .../approved-plans-v1_4/q65/explain.txt | 6 +-- .../approved-plans-v1_4/q66.sf100/explain.txt | 6 +-- .../approved-plans-v1_4/q66/explain.txt | 6 +-- .../approved-plans-v1_4/q67.sf100/explain.txt | 8 +-- .../approved-plans-v1_4/q67/explain.txt | 4 +- .../approved-plans-v1_4/q68.sf100/explain.txt | 10 ++-- .../approved-plans-v1_4/q68/explain.txt | 2 +- .../approved-plans-v1_4/q7.sf100/explain.txt | 10 ++-- .../q7.sf100/simplified.txt | 2 +- .../approved-plans-v1_4/q7/explain.txt | 10 ++-- .../approved-plans-v1_4/q7/simplified.txt | 2 +- .../approved-plans-v1_4/q70.sf100/explain.txt | 12 ++--- .../approved-plans-v1_4/q70/explain.txt | 12 ++--- .../approved-plans-v1_4/q71.sf100/explain.txt | 4 +- .../approved-plans-v1_4/q71/explain.txt | 4 +- .../approved-plans-v1_4/q74.sf100/explain.txt | 26 +++++----- .../approved-plans-v1_4/q74/explain.txt | 8 +-- .../approved-plans-v1_4/q75.sf100/explain.txt | 16 +++--- .../q75.sf100/simplified.txt | 4 +- .../approved-plans-v1_4/q75/explain.txt | 16 +++--- .../approved-plans-v1_4/q75/simplified.txt | 4 +- .../approved-plans-v1_4/q76.sf100/explain.txt | 2 +- .../approved-plans-v1_4/q76/explain.txt | 2 +- .../approved-plans-v1_4/q77.sf100/explain.txt | 14 +++--- .../approved-plans-v1_4/q77/explain.txt | 14 +++--- .../approved-plans-v1_4/q78.sf100/explain.txt | 42 ++++++++-------- .../q78.sf100/simplified.txt | 6 +-- .../approved-plans-v1_4/q78/explain.txt | 30 +++++------ .../approved-plans-v1_4/q78/simplified.txt | 6 +-- .../approved-plans-v1_4/q79.sf100/explain.txt | 6 +-- .../approved-plans-v1_4/q79/explain.txt | 2 +- .../approved-plans-v1_4/q8.sf100/explain.txt | 14 +++--- .../approved-plans-v1_4/q8/explain.txt | 6 +-- .../approved-plans-v1_4/q80.sf100/explain.txt | 20 ++++---- .../approved-plans-v1_4/q80/explain.txt | 8 +-- .../approved-plans-v1_4/q83.sf100/explain.txt | 30 +++++------ .../q83.sf100/simplified.txt | 6 +-- .../approved-plans-v1_4/q83/explain.txt | 30 +++++------ .../approved-plans-v1_4/q83/simplified.txt | 6 +-- .../approved-plans-v1_4/q85.sf100/explain.txt | 8 +-- .../q85.sf100/simplified.txt | 2 +- .../approved-plans-v1_4/q85/explain.txt | 8 +-- .../approved-plans-v1_4/q85/simplified.txt | 2 +- .../approved-plans-v1_4/q86.sf100/explain.txt | 8 +-- .../approved-plans-v1_4/q86/explain.txt | 8 +-- .../approved-plans-v1_4/q89.sf100/explain.txt | 6 +-- .../approved-plans-v1_4/q89/explain.txt | 10 ++-- .../approved-plans-v1_4/q9.sf100/explain.txt | 30 +++++------ .../approved-plans-v1_4/q9/explain.txt | 30 +++++------ .../approved-plans-v1_4/q91/explain.txt | 4 +- .../approved-plans-v1_4/q93.sf100/explain.txt | 6 +-- .../approved-plans-v1_4/q93/explain.txt | 2 +- .../approved-plans-v1_4/q94.sf100/explain.txt | 12 ++--- .../approved-plans-v1_4/q94/explain.txt | 4 +- .../approved-plans-v1_4/q95.sf100/explain.txt | 14 +++--- .../approved-plans-v1_4/q95/explain.txt | 4 +- .../approved-plans-v1_4/q98.sf100/explain.txt | 10 ++-- .../approved-plans-v1_4/q98/explain.txt | 6 +-- .../approved-plans-v2_7/q11.sf100/explain.txt | 26 +++++----- .../approved-plans-v2_7/q11/explain.txt | 8 +-- .../approved-plans-v2_7/q12.sf100/explain.txt | 8 +-- .../approved-plans-v2_7/q12/explain.txt | 4 +- .../approved-plans-v2_7/q14/explain.txt | 8 +-- .../approved-plans-v2_7/q18a/explain.txt | 10 ++-- .../approved-plans-v2_7/q20.sf100/explain.txt | 8 +-- .../approved-plans-v2_7/q20/explain.txt | 4 +- .../approved-plans-v2_7/q22.sf100/explain.txt | 14 +++--- .../q22.sf100/simplified.txt | 2 +- .../approved-plans-v2_7/q22/explain.txt | 10 ++-- .../approved-plans-v2_7/q22/simplified.txt | 2 +- .../q22a.sf100/explain.txt | 46 ++++++++--------- .../q22a.sf100/simplified.txt | 10 ++-- .../approved-plans-v2_7/q22a/explain.txt | 42 ++++++++-------- .../approved-plans-v2_7/q22a/simplified.txt | 10 ++-- .../q27a.sf100/explain.txt | 30 +++++------ .../q27a.sf100/simplified.txt | 6 +-- .../approved-plans-v2_7/q27a/explain.txt | 30 +++++------ .../approved-plans-v2_7/q27a/simplified.txt | 6 +-- .../approved-plans-v2_7/q35.sf100/explain.txt | 26 +++++----- .../q35.sf100/simplified.txt | 2 +- .../approved-plans-v2_7/q35/explain.txt | 10 ++-- .../approved-plans-v2_7/q35/simplified.txt | 2 +- .../q35a.sf100/explain.txt | 24 ++++----- .../q35a.sf100/simplified.txt | 2 +- .../approved-plans-v2_7/q35a/explain.txt | 10 ++-- .../approved-plans-v2_7/q35a/simplified.txt | 2 +- .../approved-plans-v2_7/q47.sf100/explain.txt | 20 ++++---- .../approved-plans-v2_7/q47/explain.txt | 14 +++--- .../approved-plans-v2_7/q49.sf100/explain.txt | 50 +++++++++---------- .../q49.sf100/simplified.txt | 6 +-- .../approved-plans-v2_7/q49/explain.txt | 38 +++++++------- .../approved-plans-v2_7/q49/simplified.txt | 6 +-- .../q51a.sf100/explain.txt | 22 ++++---- .../approved-plans-v2_7/q51a/explain.txt | 18 +++---- .../approved-plans-v2_7/q57.sf100/explain.txt | 20 ++++---- .../approved-plans-v2_7/q57/explain.txt | 14 +++--- .../approved-plans-v2_7/q6.sf100/explain.txt | 14 +++--- .../approved-plans-v2_7/q6/explain.txt | 6 +-- .../approved-plans-v2_7/q64.sf100/explain.txt | 50 +++++++++---------- .../approved-plans-v2_7/q64/explain.txt | 12 ++--- .../q67a.sf100/explain.txt | 24 ++++----- .../approved-plans-v2_7/q67a/explain.txt | 20 ++++---- .../approved-plans-v2_7/q74.sf100/explain.txt | 26 +++++----- .../approved-plans-v2_7/q74/explain.txt | 8 +-- .../approved-plans-v2_7/q75.sf100/explain.txt | 16 +++--- .../q75.sf100/simplified.txt | 4 +- .../approved-plans-v2_7/q75/explain.txt | 16 +++--- .../approved-plans-v2_7/q75/simplified.txt | 4 +- .../approved-plans-v2_7/q78.sf100/explain.txt | 42 ++++++++-------- .../q78.sf100/simplified.txt | 6 +-- .../approved-plans-v2_7/q78/explain.txt | 30 +++++------ .../approved-plans-v2_7/q78/simplified.txt | 6 +-- .../approved-plans-v2_7/q98.sf100/explain.txt | 10 ++-- .../approved-plans-v2_7/q98/explain.txt | 6 +-- 279 files changed, 1485 insertions(+), 1496 deletions(-) diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala index e8dab28b5e907..1e1564829d706 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala @@ -634,17 +634,6 @@ object TypeCoercion { m.copy(newKeys.zip(newValues).flatMap { case (k, v) => Seq(k, v) }) - // Promote SUM, SUM DISTINCT and AVERAGE to largest types to prevent overflows. - case s @ Sum(e @ DecimalType()) => s // Decimal is already the biggest. - case Sum(e @ IntegralType()) if e.dataType != LongType => Sum(Cast(e, LongType)) - case Sum(e @ FractionalType()) if e.dataType != DoubleType => Sum(Cast(e, DoubleType)) - - case s @ Average(e @ DecimalType()) => s // Decimal is already the biggest. - case Average(e @ IntegralType()) if e.dataType != LongType => - Average(Cast(e, LongType)) - case Average(e @ FractionalType()) if e.dataType != DoubleType => - Average(Cast(e, DoubleType)) - // Hive lets you do aggregation of timestamps... for some reason case Sum(e @ TimestampType()) => Sum(Cast(e, DoubleType)) case Average(e @ TimestampType()) => Average(Cast(e, DoubleType)) diff --git a/sql/core/src/test/resources/sql-tests/results/explain-aqe.sql.out b/sql/core/src/test/resources/sql-tests/results/explain-aqe.sql.out index dc2618be5464b..61bf346d51d6f 100644 --- a/sql/core/src/test/resources/sql-tests/results/explain-aqe.sql.out +++ b/sql/core/src/test/resources/sql-tests/results/explain-aqe.sql.out @@ -55,23 +55,23 @@ struct == Analyzed Logical Plan == sum(DISTINCT val): bigint -Aggregate [sum(distinct cast(val#x as bigint)) AS sum(DISTINCT val)#xL] +Aggregate [sum(distinct val#x) AS sum(DISTINCT val)#xL] +- SubqueryAlias spark_catalog.default.explain_temp1 +- Relation[key#x,val#x] parquet == Optimized Logical Plan == -Aggregate [sum(distinct cast(val#x as bigint)) AS sum(DISTINCT val)#xL] +Aggregate [sum(distinct val#x) AS sum(DISTINCT val)#xL] +- Project [val#x] +- Relation[key#x,val#x] parquet == Physical Plan == AdaptiveSparkPlan isFinalPlan=false -+- HashAggregate(keys=[], functions=[sum(distinct cast(val#x as bigint)#xL)], output=[sum(DISTINCT val)#xL]) ++- HashAggregate(keys=[], functions=[sum(distinct val#x)], output=[sum(DISTINCT val)#xL]) +- Exchange SinglePartition, ENSURE_REQUIREMENTS, [id=#x] - +- HashAggregate(keys=[], functions=[partial_sum(distinct cast(val#x as bigint)#xL)], output=[sum#xL]) - +- HashAggregate(keys=[cast(val#x as bigint)#xL], functions=[], output=[cast(val#x as bigint)#xL]) - +- Exchange hashpartitioning(cast(val#x as bigint)#xL, 4), ENSURE_REQUIREMENTS, [id=#x] - +- HashAggregate(keys=[cast(val#x as bigint) AS cast(val#x as bigint)#xL], functions=[], output=[cast(val#x as bigint)#xL]) + +- HashAggregate(keys=[], functions=[partial_sum(distinct val#x)], output=[sum#xL]) + +- HashAggregate(keys=[val#x], functions=[], output=[val#x]) + +- Exchange hashpartitioning(val#x, 4), ENSURE_REQUIREMENTS, [id=#x] + +- HashAggregate(keys=[val#x], functions=[], output=[val#x]) +- FileScan parquet default.explain_temp1[val#x] Batched: true, DataFilters: [], Format: Parquet, Location [not included in comparison]/{warehouse_dir}/explain_temp1], PartitionFilters: [], PushedFilters: [], ReadSchema: struct @@ -615,7 +615,7 @@ Input [2]: [key#x, val#x] (14) HashAggregate Input [1]: [key#x] Keys: [] -Functions [1]: [partial_avg(cast(key#x as bigint))] +Functions [1]: [partial_avg(key#x)] Aggregate Attributes [2]: [sum#x, count#xL] Results [2]: [sum#x, count#xL] @@ -626,9 +626,9 @@ Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#x] (16) HashAggregate Input [2]: [sum#x, count#xL] Keys: [] -Functions [1]: [avg(cast(key#x as bigint))] -Aggregate Attributes [1]: [avg(cast(key#x as bigint))#x] -Results [1]: [avg(cast(key#x as bigint))#x AS avg(key)#x] +Functions [1]: [avg(key#x)] +Aggregate Attributes [1]: [avg(key#x)#x] +Results [1]: [avg(key#x)#x AS avg(key)#x] (17) AdaptiveSparkPlan Output [1]: [avg(key)#x] @@ -681,7 +681,7 @@ ReadSchema: struct (5) HashAggregate Input [1]: [key#x] Keys: [] -Functions [1]: [partial_avg(cast(key#x as bigint))] +Functions [1]: [partial_avg(key#x)] Aggregate Attributes [2]: [sum#x, count#xL] Results [2]: [sum#x, count#xL] @@ -692,9 +692,9 @@ Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#x] (7) HashAggregate Input [2]: [sum#x, count#xL] Keys: [] -Functions [1]: [avg(cast(key#x as bigint))] -Aggregate Attributes [1]: [avg(cast(key#x as bigint))#x] -Results [1]: [avg(cast(key#x as bigint))#x AS avg(key)#x] +Functions [1]: [avg(key#x)] +Aggregate Attributes [1]: [avg(key#x)#x] +Results [1]: [avg(key#x)#x AS avg(key)#x] (8) AdaptiveSparkPlan Output [1]: [avg(key)#x] @@ -717,7 +717,7 @@ ReadSchema: struct (10) HashAggregate Input [1]: [key#x] Keys: [] -Functions [1]: [partial_avg(cast(key#x as bigint))] +Functions [1]: [partial_avg(key#x)] Aggregate Attributes [2]: [sum#x, count#xL] Results [2]: [sum#x, count#xL] @@ -728,9 +728,9 @@ Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#x] (12) HashAggregate Input [2]: [sum#x, count#xL] Keys: [] -Functions [1]: [avg(cast(key#x as bigint))] -Aggregate Attributes [1]: [avg(cast(key#x as bigint))#x] -Results [1]: [avg(cast(key#x as bigint))#x AS avg(key)#x] +Functions [1]: [avg(key#x)] +Aggregate Attributes [1]: [avg(key#x)#x] +Results [1]: [avg(key#x)#x AS avg(key)#x] (13) AdaptiveSparkPlan Output [1]: [avg(key)#x] @@ -947,7 +947,7 @@ ReadSchema: struct (2) HashAggregate Input [2]: [key#x, val#x] Keys: [] -Functions [3]: [partial_count(val#x), partial_sum(cast(key#x as bigint)), partial_count(key#x) FILTER (WHERE (val#x > 1))] +Functions [3]: [partial_count(val#x), partial_sum(key#x), partial_count(key#x) FILTER (WHERE (val#x > 1))] Aggregate Attributes [3]: [count#xL, sum#xL, count#xL] Results [3]: [count#xL, sum#xL, count#xL] @@ -958,9 +958,9 @@ Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#x] (4) HashAggregate Input [3]: [count#xL, sum#xL, count#xL] Keys: [] -Functions [3]: [count(val#x), sum(cast(key#x as bigint)), count(key#x)] -Aggregate Attributes [3]: [count(val#x)#xL, sum(cast(key#x as bigint))#xL, count(key#x)#xL] -Results [2]: [(count(val#x)#xL + sum(cast(key#x as bigint))#xL) AS TOTAL#xL, count(key#x)#xL AS count(key) FILTER (WHERE (val > 1))#xL] +Functions [3]: [count(val#x), sum(key#x), count(key#x)] +Aggregate Attributes [3]: [count(val#x)#xL, sum(key#x)#xL, count(key#x)#xL] +Results [2]: [(count(val#x)#xL + sum(key#x)#xL) AS TOTAL#xL, count(key#x)#xL AS count(key) FILTER (WHERE (val > 1))#xL] (5) AdaptiveSparkPlan Output [2]: [TOTAL#xL, count(key) FILTER (WHERE (val > 1))#xL] diff --git a/sql/core/src/test/resources/sql-tests/results/explain.sql.out b/sql/core/src/test/resources/sql-tests/results/explain.sql.out index a4c92382750e8..59116f5f5b6c6 100644 --- a/sql/core/src/test/resources/sql-tests/results/explain.sql.out +++ b/sql/core/src/test/resources/sql-tests/results/explain.sql.out @@ -55,22 +55,22 @@ struct == Analyzed Logical Plan == sum(DISTINCT val): bigint -Aggregate [sum(distinct cast(val#x as bigint)) AS sum(DISTINCT val)#xL] +Aggregate [sum(distinct val#x) AS sum(DISTINCT val)#xL] +- SubqueryAlias spark_catalog.default.explain_temp1 +- Relation[key#x,val#x] parquet == Optimized Logical Plan == -Aggregate [sum(distinct cast(val#x as bigint)) AS sum(DISTINCT val)#xL] +Aggregate [sum(distinct val#x) AS sum(DISTINCT val)#xL] +- Project [val#x] +- Relation[key#x,val#x] parquet == Physical Plan == -*HashAggregate(keys=[], functions=[sum(distinct cast(val#x as bigint)#xL)], output=[sum(DISTINCT val)#xL]) +*HashAggregate(keys=[], functions=[sum(distinct val#x)], output=[sum(DISTINCT val)#xL]) +- Exchange SinglePartition, ENSURE_REQUIREMENTS, [id=#x] - +- *HashAggregate(keys=[], functions=[partial_sum(distinct cast(val#x as bigint)#xL)], output=[sum#xL]) - +- *HashAggregate(keys=[cast(val#x as bigint)#xL], functions=[], output=[cast(val#x as bigint)#xL]) - +- Exchange hashpartitioning(cast(val#x as bigint)#xL, 4), ENSURE_REQUIREMENTS, [id=#x] - +- *HashAggregate(keys=[cast(val#x as bigint) AS cast(val#x as bigint)#xL], functions=[], output=[cast(val#x as bigint)#xL]) + +- *HashAggregate(keys=[], functions=[partial_sum(distinct val#x)], output=[sum#xL]) + +- *HashAggregate(keys=[val#x], functions=[], output=[val#x]) + +- Exchange hashpartitioning(val#x, 4), ENSURE_REQUIREMENTS, [id=#x] + +- *HashAggregate(keys=[val#x], functions=[], output=[val#x]) +- *ColumnarToRow +- FileScan parquet default.explain_temp1[val#x] Batched: true, DataFilters: [], Format: Parquet, Location [not included in comparison]/{warehouse_dir}/explain_temp1], PartitionFilters: [], PushedFilters: [], ReadSchema: struct @@ -620,7 +620,7 @@ Input [2]: [key#x, val#x] (15) HashAggregate [codegen id : 1] Input [1]: [key#x] Keys: [] -Functions [1]: [partial_avg(cast(key#x as bigint))] +Functions [1]: [partial_avg(key#x)] Aggregate Attributes [2]: [sum#x, count#xL] Results [2]: [sum#x, count#xL] @@ -631,9 +631,9 @@ Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#x] (17) HashAggregate [codegen id : 2] Input [2]: [sum#x, count#xL] Keys: [] -Functions [1]: [avg(cast(key#x as bigint))] -Aggregate Attributes [1]: [avg(cast(key#x as bigint))#x] -Results [1]: [avg(cast(key#x as bigint))#x AS avg(key)#x] +Functions [1]: [avg(key#x)] +Aggregate Attributes [1]: [avg(key#x)#x] +Results [1]: [avg(key#x)#x AS avg(key)#x] -- !query @@ -684,7 +684,7 @@ Input [1]: [key#x] (6) HashAggregate [codegen id : 1] Input [1]: [key#x] Keys: [] -Functions [1]: [partial_avg(cast(key#x as bigint))] +Functions [1]: [partial_avg(key#x)] Aggregate Attributes [2]: [sum#x, count#xL] Results [2]: [sum#x, count#xL] @@ -695,9 +695,9 @@ Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#x] (8) HashAggregate [codegen id : 2] Input [2]: [sum#x, count#xL] Keys: [] -Functions [1]: [avg(cast(key#x as bigint))] -Aggregate Attributes [1]: [avg(cast(key#x as bigint))#x] -Results [1]: [avg(cast(key#x as bigint))#x AS avg(key)#x] +Functions [1]: [avg(key#x)] +Aggregate Attributes [1]: [avg(key#x)#x] +Results [1]: [avg(key#x)#x AS avg(key)#x] Subquery:2 Hosting operator id = 3 Hosting Expression = ReusedSubquery Subquery scalar-subquery#x, [id=#x] @@ -895,7 +895,7 @@ Input [2]: [key#x, val#x] (3) HashAggregate [codegen id : 1] Input [2]: [key#x, val#x] Keys: [] -Functions [3]: [partial_count(val#x), partial_sum(cast(key#x as bigint)), partial_count(key#x) FILTER (WHERE (val#x > 1))] +Functions [3]: [partial_count(val#x), partial_sum(key#x), partial_count(key#x) FILTER (WHERE (val#x > 1))] Aggregate Attributes [3]: [count#xL, sum#xL, count#xL] Results [3]: [count#xL, sum#xL, count#xL] @@ -906,9 +906,9 @@ Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#x] (5) HashAggregate [codegen id : 2] Input [3]: [count#xL, sum#xL, count#xL] Keys: [] -Functions [3]: [count(val#x), sum(cast(key#x as bigint)), count(key#x)] -Aggregate Attributes [3]: [count(val#x)#xL, sum(cast(key#x as bigint))#xL, count(key#x)#xL] -Results [2]: [(count(val#x)#xL + sum(cast(key#x as bigint))#xL) AS TOTAL#xL, count(key#x)#xL AS count(key) FILTER (WHERE (val > 1))#xL] +Functions [3]: [count(val#x), sum(key#x), count(key#x)] +Aggregate Attributes [3]: [count(val#x)#xL, sum(key#x)#xL, count(key#x)#xL] +Results [2]: [(count(val#x)#xL + sum(key#x)#xL) AS TOTAL#xL, count(key#x)#xL AS count(key) FILTER (WHERE (val > 1))#xL] -- !query diff --git a/sql/core/src/test/resources/sql-tests/results/group-by-ordinal.sql.out b/sql/core/src/test/resources/sql-tests/results/group-by-ordinal.sql.out index fedc7205ae559..235687e67b687 100644 --- a/sql/core/src/test/resources/sql-tests/results/group-by-ordinal.sql.out +++ b/sql/core/src/test/resources/sql-tests/results/group-by-ordinal.sql.out @@ -122,7 +122,7 @@ select a, b, sum(b) from data group by 3 struct<> -- !query output org.apache.spark.sql.AnalysisException -aggregate functions are not allowed in GROUP BY, but found sum(CAST(data.`b` AS BIGINT)) +aggregate functions are not allowed in GROUP BY, but found sum(data.`b`) -- !query @@ -131,7 +131,7 @@ select a, b, sum(b) + 2 from data group by 3 struct<> -- !query output org.apache.spark.sql.AnalysisException -aggregate functions are not allowed in GROUP BY, but found (sum(CAST(data.`b` AS BIGINT)) + CAST(2 AS BIGINT)) +aggregate functions are not allowed in GROUP BY, but found (sum(data.`b`) + CAST(2 AS BIGINT)) -- !query diff --git a/sql/core/src/test/resources/sql-tests/results/postgreSQL/aggregates_part1.sql.out b/sql/core/src/test/resources/sql-tests/results/postgreSQL/aggregates_part1.sql.out index 6976c8fa872b0..30afcc1e4ec2f 100644 --- a/sql/core/src/test/resources/sql-tests/results/postgreSQL/aggregates_part1.sql.out +++ b/sql/core/src/test/resources/sql-tests/results/postgreSQL/aggregates_part1.sql.out @@ -381,8 +381,8 @@ struct<> org.apache.spark.sql.AnalysisException Aggregate/Window/Generate expressions are not valid in where clause of the query. -Expression in where clause: [(sum(DISTINCT CAST((outer(a.`four`) + b.`four`) AS BIGINT)) = CAST(b.`four` AS BIGINT))] -Invalid expressions: [sum(DISTINCT CAST((outer(a.`four`) + b.`four`) AS BIGINT))] +Expression in where clause: [(sum(DISTINCT (outer(a.`four`) + b.`four`)) = CAST(b.`four` AS BIGINT))] +Invalid expressions: [sum(DISTINCT (outer(a.`four`) + b.`four`))] -- !query diff --git a/sql/core/src/test/resources/sql-tests/results/subquery/negative-cases/invalid-correlation.sql.out b/sql/core/src/test/resources/sql-tests/results/subquery/negative-cases/invalid-correlation.sql.out index e77afd886aeab..a1e0ff9b8d390 100644 --- a/sql/core/src/test/resources/sql-tests/results/subquery/negative-cases/invalid-correlation.sql.out +++ b/sql/core/src/test/resources/sql-tests/results/subquery/negative-cases/invalid-correlation.sql.out @@ -46,7 +46,7 @@ AND t2b = (SELECT max(avg) struct<> -- !query output org.apache.spark.sql.AnalysisException -grouping expressions sequence is empty, and 't2.`t2b`' is not an aggregate function. Wrap '(avg(CAST(t2.`t2b` AS BIGINT)) AS `avg`)' in windowing function(s) or wrap 't2.`t2b`' in first() (or first_value) if you don't care which value you get. +grouping expressions sequence is empty, and 't2.`t2b`' is not an aggregate function. Wrap '(avg(t2.`t2b`) AS `avg`)' in windowing function(s) or wrap 't2.`t2b`' in first() (or first_value) if you don't care which value you get. -- !query diff --git a/sql/core/src/test/resources/sql-tests/results/udf/postgreSQL/udf-aggregates_part1.sql.out b/sql/core/src/test/resources/sql-tests/results/udf/postgreSQL/udf-aggregates_part1.sql.out index 284ab4e719690..8b8ec07890096 100644 --- a/sql/core/src/test/resources/sql-tests/results/udf/postgreSQL/udf-aggregates_part1.sql.out +++ b/sql/core/src/test/resources/sql-tests/results/udf/postgreSQL/udf-aggregates_part1.sql.out @@ -372,8 +372,8 @@ struct<> org.apache.spark.sql.AnalysisException Aggregate/Window/Generate expressions are not valid in where clause of the query. -Expression in where clause: [(sum(DISTINCT CAST((outer(a.`four`) + b.`four`) AS BIGINT)) = CAST(CAST(udf(ansi_cast(four as string)) AS INT) AS BIGINT))] -Invalid expressions: [sum(DISTINCT CAST((outer(a.`four`) + b.`four`) AS BIGINT))] +Expression in where clause: [(sum(DISTINCT (outer(a.`four`) + b.`four`)) = CAST(CAST(udf(ansi_cast(four as string)) AS INT) AS BIGINT))] +Invalid expressions: [sum(DISTINCT (outer(a.`four`) + b.`four`))] -- !query diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q19.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q19.sf100/explain.txt index 6e44fc8e9608b..1288d9c34b380 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q19.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q19.sf100/explain.txt @@ -206,7 +206,7 @@ Results [5]: [i_brand#21, i_brand_id#20, i_manufact_id#22, i_manufact#23, sum#27 (37) Exchange Input [5]: [i_brand#21, i_brand_id#20, i_manufact_id#22, i_manufact#23, sum#27] -Arguments: hashpartitioning(i_brand#21, i_brand_id#20, i_manufact_id#22, i_manufact#23, 5), true, [id=#28] +Arguments: hashpartitioning(i_brand#21, i_brand_id#20, i_manufact_id#22, i_manufact#23, 5), ENSURE_REQUIREMENTS, [id=#28] (38) HashAggregate [codegen id : 7] Input [5]: [i_brand#21, i_brand_id#20, i_manufact_id#22, i_manufact#23, sum#27] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q19/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q19/explain.txt index 8a3919ca1daaf..1e8893088712a 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q19/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q19/explain.txt @@ -206,7 +206,7 @@ Results [5]: [i_brand#12, i_brand_id#11, i_manufact_id#13, i_manufact#14, sum#27 (37) Exchange Input [5]: [i_brand#12, i_brand_id#11, i_manufact_id#13, i_manufact#14, sum#27] -Arguments: hashpartitioning(i_brand#12, i_brand_id#11, i_manufact_id#13, i_manufact#14, 5), true, [id=#28] +Arguments: hashpartitioning(i_brand#12, i_brand_id#11, i_manufact_id#13, i_manufact#14, 5), ENSURE_REQUIREMENTS, [id=#28] (38) HashAggregate [codegen id : 7] Input [5]: [i_brand#12, i_brand_id#11, i_manufact_id#13, i_manufact#14, sum#27] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q27.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q27.sf100/explain.txt index b3b11b60ded0b..41581c8203dd8 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q27.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q27.sf100/explain.txt @@ -211,20 +211,20 @@ Input [8]: [ss_item_sk#2, ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_c (30) HashAggregate [codegen id : 5] Input [6]: [i_item_id#21, s_state#18, agg1#23, agg2#24, agg3#25, agg4#26] Keys [2]: [i_item_id#21, s_state#18] -Functions [4]: [partial_avg(cast(agg1#23 as bigint)), partial_avg(UnscaledValue(agg2#24)), partial_avg(UnscaledValue(agg3#25)), partial_avg(UnscaledValue(agg4#26))] +Functions [4]: [partial_avg(agg1#23), partial_avg(UnscaledValue(agg2#24)), partial_avg(UnscaledValue(agg3#25)), partial_avg(UnscaledValue(agg4#26))] Aggregate Attributes [8]: [sum#27, count#28, sum#29, count#30, sum#31, count#32, sum#33, count#34] Results [10]: [i_item_id#21, s_state#18, sum#35, count#36, sum#37, count#38, sum#39, count#40, sum#41, count#42] (31) Exchange Input [10]: [i_item_id#21, s_state#18, sum#35, count#36, sum#37, count#38, sum#39, count#40, sum#41, count#42] -Arguments: hashpartitioning(i_item_id#21, s_state#18, 5), true, [id=#43] +Arguments: hashpartitioning(i_item_id#21, s_state#18, 5), ENSURE_REQUIREMENTS, [id=#43] (32) HashAggregate [codegen id : 6] Input [10]: [i_item_id#21, s_state#18, sum#35, count#36, sum#37, count#38, sum#39, count#40, sum#41, count#42] Keys [2]: [i_item_id#21, s_state#18] -Functions [4]: [avg(cast(agg1#23 as bigint)), avg(UnscaledValue(agg2#24)), avg(UnscaledValue(agg3#25)), avg(UnscaledValue(agg4#26))] -Aggregate Attributes [4]: [avg(cast(agg1#23 as bigint))#44, avg(UnscaledValue(agg2#24))#45, avg(UnscaledValue(agg3#25))#46, avg(UnscaledValue(agg4#26))#47] -Results [7]: [i_item_id#21, s_state#18, 0 AS g_state#48, avg(cast(agg1#23 as bigint))#44 AS agg1#49, cast((avg(UnscaledValue(agg2#24))#45 / 100.0) as decimal(11,6)) AS agg2#50, cast((avg(UnscaledValue(agg3#25))#46 / 100.0) as decimal(11,6)) AS agg3#51, cast((avg(UnscaledValue(agg4#26))#47 / 100.0) as decimal(11,6)) AS agg4#52] +Functions [4]: [avg(agg1#23), avg(UnscaledValue(agg2#24)), avg(UnscaledValue(agg3#25)), avg(UnscaledValue(agg4#26))] +Aggregate Attributes [4]: [avg(agg1#23)#44, avg(UnscaledValue(agg2#24))#45, avg(UnscaledValue(agg3#25))#46, avg(UnscaledValue(agg4#26))#47] +Results [7]: [i_item_id#21, s_state#18, 0 AS g_state#48, avg(agg1#23)#44 AS agg1#49, cast((avg(UnscaledValue(agg2#24))#45 / 100.0) as decimal(11,6)) AS agg2#50, cast((avg(UnscaledValue(agg3#25))#46 / 100.0) as decimal(11,6)) AS agg3#51, cast((avg(UnscaledValue(agg4#26))#47 / 100.0) as decimal(11,6)) AS agg4#52] (33) Scan parquet default.store_sales Output [8]: [ss_sold_date_sk#1, ss_item_sk#2, ss_cdemo_sk#3, ss_store_sk#4, ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_coupon_amt#8] @@ -310,20 +310,20 @@ Input [7]: [ss_item_sk#2, ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_c (52) HashAggregate [codegen id : 11] Input [5]: [i_item_id#21, agg1#23, agg2#24, agg3#25, agg4#26] Keys [1]: [i_item_id#21] -Functions [4]: [partial_avg(cast(agg1#23 as bigint)), partial_avg(UnscaledValue(agg2#24)), partial_avg(UnscaledValue(agg3#25)), partial_avg(UnscaledValue(agg4#26))] +Functions [4]: [partial_avg(agg1#23), partial_avg(UnscaledValue(agg2#24)), partial_avg(UnscaledValue(agg3#25)), partial_avg(UnscaledValue(agg4#26))] Aggregate Attributes [8]: [sum#54, count#55, sum#56, count#57, sum#58, count#59, sum#60, count#61] Results [9]: [i_item_id#21, sum#62, count#63, sum#64, count#65, sum#66, count#67, sum#68, count#69] (53) Exchange Input [9]: [i_item_id#21, sum#62, count#63, sum#64, count#65, sum#66, count#67, sum#68, count#69] -Arguments: hashpartitioning(i_item_id#21, 5), true, [id=#70] +Arguments: hashpartitioning(i_item_id#21, 5), ENSURE_REQUIREMENTS, [id=#70] (54) HashAggregate [codegen id : 12] Input [9]: [i_item_id#21, sum#62, count#63, sum#64, count#65, sum#66, count#67, sum#68, count#69] Keys [1]: [i_item_id#21] -Functions [4]: [avg(cast(agg1#23 as bigint)), avg(UnscaledValue(agg2#24)), avg(UnscaledValue(agg3#25)), avg(UnscaledValue(agg4#26))] -Aggregate Attributes [4]: [avg(cast(agg1#23 as bigint))#71, avg(UnscaledValue(agg2#24))#72, avg(UnscaledValue(agg3#25))#73, avg(UnscaledValue(agg4#26))#74] -Results [7]: [i_item_id#21, null AS s_state#75, 1 AS g_state#76, avg(cast(agg1#23 as bigint))#71 AS agg1#77, cast((avg(UnscaledValue(agg2#24))#72 / 100.0) as decimal(11,6)) AS agg2#78, cast((avg(UnscaledValue(agg3#25))#73 / 100.0) as decimal(11,6)) AS agg3#79, cast((avg(UnscaledValue(agg4#26))#74 / 100.0) as decimal(11,6)) AS agg4#80] +Functions [4]: [avg(agg1#23), avg(UnscaledValue(agg2#24)), avg(UnscaledValue(agg3#25)), avg(UnscaledValue(agg4#26))] +Aggregate Attributes [4]: [avg(agg1#23)#71, avg(UnscaledValue(agg2#24))#72, avg(UnscaledValue(agg3#25))#73, avg(UnscaledValue(agg4#26))#74] +Results [7]: [i_item_id#21, null AS s_state#75, 1 AS g_state#76, avg(agg1#23)#71 AS agg1#77, cast((avg(UnscaledValue(agg2#24))#72 / 100.0) as decimal(11,6)) AS agg2#78, cast((avg(UnscaledValue(agg3#25))#73 / 100.0) as decimal(11,6)) AS agg3#79, cast((avg(UnscaledValue(agg4#26))#74 / 100.0) as decimal(11,6)) AS agg4#80] (55) Scan parquet default.store_sales Output [8]: [ss_sold_date_sk#1, ss_item_sk#2, ss_cdemo_sk#3, ss_store_sk#4, ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_coupon_amt#8] @@ -405,20 +405,20 @@ Input [6]: [ss_item_sk#2, ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_c (73) HashAggregate [codegen id : 17] Input [4]: [agg1#23, agg2#24, agg3#25, agg4#26] Keys: [] -Functions [4]: [partial_avg(cast(agg1#23 as bigint)), partial_avg(UnscaledValue(agg2#24)), partial_avg(UnscaledValue(agg3#25)), partial_avg(UnscaledValue(agg4#26))] +Functions [4]: [partial_avg(agg1#23), partial_avg(UnscaledValue(agg2#24)), partial_avg(UnscaledValue(agg3#25)), partial_avg(UnscaledValue(agg4#26))] Aggregate Attributes [8]: [sum#82, count#83, sum#84, count#85, sum#86, count#87, sum#88, count#89] Results [8]: [sum#90, count#91, sum#92, count#93, sum#94, count#95, sum#96, count#97] (74) Exchange Input [8]: [sum#90, count#91, sum#92, count#93, sum#94, count#95, sum#96, count#97] -Arguments: SinglePartition, true, [id=#98] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#98] (75) HashAggregate [codegen id : 18] Input [8]: [sum#90, count#91, sum#92, count#93, sum#94, count#95, sum#96, count#97] Keys: [] -Functions [4]: [avg(cast(agg1#23 as bigint)), avg(UnscaledValue(agg2#24)), avg(UnscaledValue(agg3#25)), avg(UnscaledValue(agg4#26))] -Aggregate Attributes [4]: [avg(cast(agg1#23 as bigint))#99, avg(UnscaledValue(agg2#24))#100, avg(UnscaledValue(agg3#25))#101, avg(UnscaledValue(agg4#26))#102] -Results [7]: [null AS i_item_id#103, null AS s_state#104, 1 AS g_state#105, avg(cast(agg1#23 as bigint))#99 AS agg1#106, cast((avg(UnscaledValue(agg2#24))#100 / 100.0) as decimal(11,6)) AS agg2#107, cast((avg(UnscaledValue(agg3#25))#101 / 100.0) as decimal(11,6)) AS agg3#108, cast((avg(UnscaledValue(agg4#26))#102 / 100.0) as decimal(11,6)) AS agg4#109] +Functions [4]: [avg(agg1#23), avg(UnscaledValue(agg2#24)), avg(UnscaledValue(agg3#25)), avg(UnscaledValue(agg4#26))] +Aggregate Attributes [4]: [avg(agg1#23)#99, avg(UnscaledValue(agg2#24))#100, avg(UnscaledValue(agg3#25))#101, avg(UnscaledValue(agg4#26))#102] +Results [7]: [null AS i_item_id#103, null AS s_state#104, 1 AS g_state#105, avg(agg1#23)#99 AS agg1#106, cast((avg(UnscaledValue(agg2#24))#100 / 100.0) as decimal(11,6)) AS agg2#107, cast((avg(UnscaledValue(agg3#25))#101 / 100.0) as decimal(11,6)) AS agg3#108, cast((avg(UnscaledValue(agg4#26))#102 / 100.0) as decimal(11,6)) AS agg4#109] (76) Union diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q27.sf100/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q27.sf100/simplified.txt index d14061de1d1f4..e0d72cefd2d6d 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q27.sf100/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q27.sf100/simplified.txt @@ -1,7 +1,7 @@ TakeOrderedAndProject [i_item_id,s_state,g_state,agg1,agg2,agg3,agg4] Union WholeStageCodegen (6) - HashAggregate [i_item_id,s_state,sum,count,sum,count,sum,count,sum,count] [avg(cast(agg1 as bigint)),avg(UnscaledValue(agg2)),avg(UnscaledValue(agg3)),avg(UnscaledValue(agg4)),g_state,agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] + HashAggregate [i_item_id,s_state,sum,count,sum,count,sum,count,sum,count] [avg(agg1),avg(UnscaledValue(agg2)),avg(UnscaledValue(agg3)),avg(UnscaledValue(agg4)),g_state,agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] InputAdapter Exchange [i_item_id,s_state] #1 WholeStageCodegen (5) @@ -49,7 +49,7 @@ TakeOrderedAndProject [i_item_id,s_state,g_state,agg1,agg2,agg3,agg4] InputAdapter Scan parquet default.item [i_item_sk,i_item_id] WholeStageCodegen (12) - HashAggregate [i_item_id,sum,count,sum,count,sum,count,sum,count] [avg(cast(agg1 as bigint)),avg(UnscaledValue(agg2)),avg(UnscaledValue(agg3)),avg(UnscaledValue(agg4)),s_state,g_state,agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] + HashAggregate [i_item_id,sum,count,sum,count,sum,count,sum,count] [avg(agg1),avg(UnscaledValue(agg2)),avg(UnscaledValue(agg3)),avg(UnscaledValue(agg4)),s_state,g_state,agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] InputAdapter Exchange [i_item_id] #6 WholeStageCodegen (11) @@ -81,7 +81,7 @@ TakeOrderedAndProject [i_item_id,s_state,g_state,agg1,agg2,agg3,agg4] InputAdapter ReusedExchange [i_item_sk,i_item_id] #5 WholeStageCodegen (18) - HashAggregate [sum,count,sum,count,sum,count,sum,count] [avg(cast(agg1 as bigint)),avg(UnscaledValue(agg2)),avg(UnscaledValue(agg3)),avg(UnscaledValue(agg4)),i_item_id,s_state,g_state,agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] + HashAggregate [sum,count,sum,count,sum,count,sum,count] [avg(agg1),avg(UnscaledValue(agg2)),avg(UnscaledValue(agg3)),avg(UnscaledValue(agg4)),i_item_id,s_state,g_state,agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] InputAdapter Exchange #8 WholeStageCodegen (17) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q27/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q27/explain.txt index c9724bed3e593..466ea08f34716 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q27/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q27/explain.txt @@ -211,20 +211,20 @@ Input [8]: [ss_item_sk#2, ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_c (30) HashAggregate [codegen id : 5] Input [6]: [i_item_id#21, s_state#18, agg1#23, agg2#24, agg3#25, agg4#26] Keys [2]: [i_item_id#21, s_state#18] -Functions [4]: [partial_avg(cast(agg1#23 as bigint)), partial_avg(UnscaledValue(agg2#24)), partial_avg(UnscaledValue(agg3#25)), partial_avg(UnscaledValue(agg4#26))] +Functions [4]: [partial_avg(agg1#23), partial_avg(UnscaledValue(agg2#24)), partial_avg(UnscaledValue(agg3#25)), partial_avg(UnscaledValue(agg4#26))] Aggregate Attributes [8]: [sum#27, count#28, sum#29, count#30, sum#31, count#32, sum#33, count#34] Results [10]: [i_item_id#21, s_state#18, sum#35, count#36, sum#37, count#38, sum#39, count#40, sum#41, count#42] (31) Exchange Input [10]: [i_item_id#21, s_state#18, sum#35, count#36, sum#37, count#38, sum#39, count#40, sum#41, count#42] -Arguments: hashpartitioning(i_item_id#21, s_state#18, 5), true, [id=#43] +Arguments: hashpartitioning(i_item_id#21, s_state#18, 5), ENSURE_REQUIREMENTS, [id=#43] (32) HashAggregate [codegen id : 6] Input [10]: [i_item_id#21, s_state#18, sum#35, count#36, sum#37, count#38, sum#39, count#40, sum#41, count#42] Keys [2]: [i_item_id#21, s_state#18] -Functions [4]: [avg(cast(agg1#23 as bigint)), avg(UnscaledValue(agg2#24)), avg(UnscaledValue(agg3#25)), avg(UnscaledValue(agg4#26))] -Aggregate Attributes [4]: [avg(cast(agg1#23 as bigint))#44, avg(UnscaledValue(agg2#24))#45, avg(UnscaledValue(agg3#25))#46, avg(UnscaledValue(agg4#26))#47] -Results [7]: [i_item_id#21, s_state#18, 0 AS g_state#48, avg(cast(agg1#23 as bigint))#44 AS agg1#49, cast((avg(UnscaledValue(agg2#24))#45 / 100.0) as decimal(11,6)) AS agg2#50, cast((avg(UnscaledValue(agg3#25))#46 / 100.0) as decimal(11,6)) AS agg3#51, cast((avg(UnscaledValue(agg4#26))#47 / 100.0) as decimal(11,6)) AS agg4#52] +Functions [4]: [avg(agg1#23), avg(UnscaledValue(agg2#24)), avg(UnscaledValue(agg3#25)), avg(UnscaledValue(agg4#26))] +Aggregate Attributes [4]: [avg(agg1#23)#44, avg(UnscaledValue(agg2#24))#45, avg(UnscaledValue(agg3#25))#46, avg(UnscaledValue(agg4#26))#47] +Results [7]: [i_item_id#21, s_state#18, 0 AS g_state#48, avg(agg1#23)#44 AS agg1#49, cast((avg(UnscaledValue(agg2#24))#45 / 100.0) as decimal(11,6)) AS agg2#50, cast((avg(UnscaledValue(agg3#25))#46 / 100.0) as decimal(11,6)) AS agg3#51, cast((avg(UnscaledValue(agg4#26))#47 / 100.0) as decimal(11,6)) AS agg4#52] (33) Scan parquet default.store_sales Output [8]: [ss_sold_date_sk#1, ss_item_sk#2, ss_cdemo_sk#3, ss_store_sk#4, ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_coupon_amt#8] @@ -310,20 +310,20 @@ Input [7]: [ss_item_sk#2, ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_c (52) HashAggregate [codegen id : 11] Input [5]: [i_item_id#21, agg1#23, agg2#24, agg3#25, agg4#26] Keys [1]: [i_item_id#21] -Functions [4]: [partial_avg(cast(agg1#23 as bigint)), partial_avg(UnscaledValue(agg2#24)), partial_avg(UnscaledValue(agg3#25)), partial_avg(UnscaledValue(agg4#26))] +Functions [4]: [partial_avg(agg1#23), partial_avg(UnscaledValue(agg2#24)), partial_avg(UnscaledValue(agg3#25)), partial_avg(UnscaledValue(agg4#26))] Aggregate Attributes [8]: [sum#54, count#55, sum#56, count#57, sum#58, count#59, sum#60, count#61] Results [9]: [i_item_id#21, sum#62, count#63, sum#64, count#65, sum#66, count#67, sum#68, count#69] (53) Exchange Input [9]: [i_item_id#21, sum#62, count#63, sum#64, count#65, sum#66, count#67, sum#68, count#69] -Arguments: hashpartitioning(i_item_id#21, 5), true, [id=#70] +Arguments: hashpartitioning(i_item_id#21, 5), ENSURE_REQUIREMENTS, [id=#70] (54) HashAggregate [codegen id : 12] Input [9]: [i_item_id#21, sum#62, count#63, sum#64, count#65, sum#66, count#67, sum#68, count#69] Keys [1]: [i_item_id#21] -Functions [4]: [avg(cast(agg1#23 as bigint)), avg(UnscaledValue(agg2#24)), avg(UnscaledValue(agg3#25)), avg(UnscaledValue(agg4#26))] -Aggregate Attributes [4]: [avg(cast(agg1#23 as bigint))#71, avg(UnscaledValue(agg2#24))#72, avg(UnscaledValue(agg3#25))#73, avg(UnscaledValue(agg4#26))#74] -Results [7]: [i_item_id#21, null AS s_state#75, 1 AS g_state#76, avg(cast(agg1#23 as bigint))#71 AS agg1#77, cast((avg(UnscaledValue(agg2#24))#72 / 100.0) as decimal(11,6)) AS agg2#78, cast((avg(UnscaledValue(agg3#25))#73 / 100.0) as decimal(11,6)) AS agg3#79, cast((avg(UnscaledValue(agg4#26))#74 / 100.0) as decimal(11,6)) AS agg4#80] +Functions [4]: [avg(agg1#23), avg(UnscaledValue(agg2#24)), avg(UnscaledValue(agg3#25)), avg(UnscaledValue(agg4#26))] +Aggregate Attributes [4]: [avg(agg1#23)#71, avg(UnscaledValue(agg2#24))#72, avg(UnscaledValue(agg3#25))#73, avg(UnscaledValue(agg4#26))#74] +Results [7]: [i_item_id#21, null AS s_state#75, 1 AS g_state#76, avg(agg1#23)#71 AS agg1#77, cast((avg(UnscaledValue(agg2#24))#72 / 100.0) as decimal(11,6)) AS agg2#78, cast((avg(UnscaledValue(agg3#25))#73 / 100.0) as decimal(11,6)) AS agg3#79, cast((avg(UnscaledValue(agg4#26))#74 / 100.0) as decimal(11,6)) AS agg4#80] (55) Scan parquet default.store_sales Output [8]: [ss_sold_date_sk#1, ss_item_sk#2, ss_cdemo_sk#3, ss_store_sk#4, ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_coupon_amt#8] @@ -405,20 +405,20 @@ Input [6]: [ss_item_sk#2, ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_c (73) HashAggregate [codegen id : 17] Input [4]: [agg1#23, agg2#24, agg3#25, agg4#26] Keys: [] -Functions [4]: [partial_avg(cast(agg1#23 as bigint)), partial_avg(UnscaledValue(agg2#24)), partial_avg(UnscaledValue(agg3#25)), partial_avg(UnscaledValue(agg4#26))] +Functions [4]: [partial_avg(agg1#23), partial_avg(UnscaledValue(agg2#24)), partial_avg(UnscaledValue(agg3#25)), partial_avg(UnscaledValue(agg4#26))] Aggregate Attributes [8]: [sum#82, count#83, sum#84, count#85, sum#86, count#87, sum#88, count#89] Results [8]: [sum#90, count#91, sum#92, count#93, sum#94, count#95, sum#96, count#97] (74) Exchange Input [8]: [sum#90, count#91, sum#92, count#93, sum#94, count#95, sum#96, count#97] -Arguments: SinglePartition, true, [id=#98] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#98] (75) HashAggregate [codegen id : 18] Input [8]: [sum#90, count#91, sum#92, count#93, sum#94, count#95, sum#96, count#97] Keys: [] -Functions [4]: [avg(cast(agg1#23 as bigint)), avg(UnscaledValue(agg2#24)), avg(UnscaledValue(agg3#25)), avg(UnscaledValue(agg4#26))] -Aggregate Attributes [4]: [avg(cast(agg1#23 as bigint))#99, avg(UnscaledValue(agg2#24))#100, avg(UnscaledValue(agg3#25))#101, avg(UnscaledValue(agg4#26))#102] -Results [7]: [null AS i_item_id#103, null AS s_state#104, 1 AS g_state#105, avg(cast(agg1#23 as bigint))#99 AS agg1#106, cast((avg(UnscaledValue(agg2#24))#100 / 100.0) as decimal(11,6)) AS agg2#107, cast((avg(UnscaledValue(agg3#25))#101 / 100.0) as decimal(11,6)) AS agg3#108, cast((avg(UnscaledValue(agg4#26))#102 / 100.0) as decimal(11,6)) AS agg4#109] +Functions [4]: [avg(agg1#23), avg(UnscaledValue(agg2#24)), avg(UnscaledValue(agg3#25)), avg(UnscaledValue(agg4#26))] +Aggregate Attributes [4]: [avg(agg1#23)#99, avg(UnscaledValue(agg2#24))#100, avg(UnscaledValue(agg3#25))#101, avg(UnscaledValue(agg4#26))#102] +Results [7]: [null AS i_item_id#103, null AS s_state#104, 1 AS g_state#105, avg(agg1#23)#99 AS agg1#106, cast((avg(UnscaledValue(agg2#24))#100 / 100.0) as decimal(11,6)) AS agg2#107, cast((avg(UnscaledValue(agg3#25))#101 / 100.0) as decimal(11,6)) AS agg3#108, cast((avg(UnscaledValue(agg4#26))#102 / 100.0) as decimal(11,6)) AS agg4#109] (76) Union diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q27/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q27/simplified.txt index 7f4d66577e9c0..85f15a0438286 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q27/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q27/simplified.txt @@ -1,7 +1,7 @@ TakeOrderedAndProject [i_item_id,s_state,g_state,agg1,agg2,agg3,agg4] Union WholeStageCodegen (6) - HashAggregate [i_item_id,s_state,sum,count,sum,count,sum,count,sum,count] [avg(cast(agg1 as bigint)),avg(UnscaledValue(agg2)),avg(UnscaledValue(agg3)),avg(UnscaledValue(agg4)),g_state,agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] + HashAggregate [i_item_id,s_state,sum,count,sum,count,sum,count,sum,count] [avg(agg1),avg(UnscaledValue(agg2)),avg(UnscaledValue(agg3)),avg(UnscaledValue(agg4)),g_state,agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] InputAdapter Exchange [i_item_id,s_state] #1 WholeStageCodegen (5) @@ -49,7 +49,7 @@ TakeOrderedAndProject [i_item_id,s_state,g_state,agg1,agg2,agg3,agg4] InputAdapter Scan parquet default.item [i_item_sk,i_item_id] WholeStageCodegen (12) - HashAggregate [i_item_id,sum,count,sum,count,sum,count,sum,count] [avg(cast(agg1 as bigint)),avg(UnscaledValue(agg2)),avg(UnscaledValue(agg3)),avg(UnscaledValue(agg4)),s_state,g_state,agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] + HashAggregate [i_item_id,sum,count,sum,count,sum,count,sum,count] [avg(agg1),avg(UnscaledValue(agg2)),avg(UnscaledValue(agg3)),avg(UnscaledValue(agg4)),s_state,g_state,agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] InputAdapter Exchange [i_item_id] #6 WholeStageCodegen (11) @@ -81,7 +81,7 @@ TakeOrderedAndProject [i_item_id,s_state,g_state,agg1,agg2,agg3,agg4] InputAdapter ReusedExchange [i_item_sk,i_item_id] #5 WholeStageCodegen (18) - HashAggregate [sum,count,sum,count,sum,count,sum,count] [avg(cast(agg1 as bigint)),avg(UnscaledValue(agg2)),avg(UnscaledValue(agg3)),avg(UnscaledValue(agg4)),i_item_id,s_state,g_state,agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] + HashAggregate [sum,count,sum,count,sum,count,sum,count] [avg(agg1),avg(UnscaledValue(agg2)),avg(UnscaledValue(agg3)),avg(UnscaledValue(agg4)),i_item_id,s_state,g_state,agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] InputAdapter Exchange #8 WholeStageCodegen (17) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q3.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q3.sf100/explain.txt index 93736a83ebfc6..17188a0a46b6b 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q3.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q3.sf100/explain.txt @@ -107,7 +107,7 @@ Results [4]: [d_year#10, i_brand#6, i_brand_id#5, sum#14] (19) Exchange Input [4]: [d_year#10, i_brand#6, i_brand_id#5, sum#14] -Arguments: hashpartitioning(d_year#10, i_brand#6, i_brand_id#5, 5), true, [id=#15] +Arguments: hashpartitioning(d_year#10, i_brand#6, i_brand_id#5, 5), ENSURE_REQUIREMENTS, [id=#15] (20) HashAggregate [codegen id : 4] Input [4]: [d_year#10, i_brand#6, i_brand_id#5, sum#14] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q3/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q3/explain.txt index 63739540ea8cc..6acdeac739407 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q3/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q3/explain.txt @@ -107,7 +107,7 @@ Results [4]: [d_year#2, i_brand#10, i_brand_id#9, sum#14] (19) Exchange Input [4]: [d_year#2, i_brand#10, i_brand_id#9, sum#14] -Arguments: hashpartitioning(d_year#2, i_brand#10, i_brand_id#9, 5), true, [id=#15] +Arguments: hashpartitioning(d_year#2, i_brand#10, i_brand_id#9, 5), ENSURE_REQUIREMENTS, [id=#15] (20) HashAggregate [codegen id : 4] Input [4]: [d_year#2, i_brand#10, i_brand_id#9, sum#14] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q42.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q42.sf100/explain.txt index 10f7d4b9d3b4b..7a059d9a39a3f 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q42.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q42.sf100/explain.txt @@ -107,7 +107,7 @@ Results [4]: [d_year#2, i_category_id#9, i_category#10, sum#14] (19) Exchange Input [4]: [d_year#2, i_category_id#9, i_category#10, sum#14] -Arguments: hashpartitioning(d_year#2, i_category_id#9, i_category#10, 5), true, [id=#15] +Arguments: hashpartitioning(d_year#2, i_category_id#9, i_category#10, 5), ENSURE_REQUIREMENTS, [id=#15] (20) HashAggregate [codegen id : 4] Input [4]: [d_year#2, i_category_id#9, i_category#10, sum#14] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q42/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q42/explain.txt index e8e93409817b2..4c8cd00e9b6e8 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q42/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q42/explain.txt @@ -107,7 +107,7 @@ Results [4]: [d_year#2, i_category_id#9, i_category#10, sum#14] (19) Exchange Input [4]: [d_year#2, i_category_id#9, i_category#10, sum#14] -Arguments: hashpartitioning(d_year#2, i_category_id#9, i_category#10, 5), true, [id=#15] +Arguments: hashpartitioning(d_year#2, i_category_id#9, i_category#10, 5), ENSURE_REQUIREMENTS, [id=#15] (20) HashAggregate [codegen id : 4] Input [4]: [d_year#2, i_category_id#9, i_category#10, sum#14] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q43.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q43.sf100/explain.txt index d53cc17819ccd..b9ed2ce5699ff 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q43.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q43.sf100/explain.txt @@ -107,7 +107,7 @@ Results [9]: [s_store_name#10, s_store_id#9, sum#20, sum#21, sum#22, sum#23, sum (19) Exchange Input [9]: [s_store_name#10, s_store_id#9, sum#20, sum#21, sum#22, sum#23, sum#24, sum#25, sum#26] -Arguments: hashpartitioning(s_store_name#10, s_store_id#9, 5), true, [id=#27] +Arguments: hashpartitioning(s_store_name#10, s_store_id#9, 5), ENSURE_REQUIREMENTS, [id=#27] (20) HashAggregate [codegen id : 4] Input [9]: [s_store_name#10, s_store_id#9, sum#20, sum#21, sum#22, sum#23, sum#24, sum#25, sum#26] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q43/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q43/explain.txt index d2ab43b3382f0..eef9481ed05f5 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q43/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q43/explain.txt @@ -107,7 +107,7 @@ Results [9]: [s_store_name#10, s_store_id#9, sum#20, sum#21, sum#22, sum#23, sum (19) Exchange Input [9]: [s_store_name#10, s_store_id#9, sum#20, sum#21, sum#22, sum#23, sum#24, sum#25, sum#26] -Arguments: hashpartitioning(s_store_name#10, s_store_id#9, 5), true, [id=#27] +Arguments: hashpartitioning(s_store_name#10, s_store_id#9, 5), ENSURE_REQUIREMENTS, [id=#27] (20) HashAggregate [codegen id : 4] Input [9]: [s_store_name#10, s_store_id#9, sum#20, sum#21, sum#22, sum#23, sum#24, sum#25, sum#26] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q46.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q46.sf100/explain.txt index 7e82e34c4c637..63bc6d1800134 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q46.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q46.sf100/explain.txt @@ -161,7 +161,7 @@ Input [7]: [ss_customer_sk#2, ss_hdemo_sk#3, ss_addr_sk#4, ss_ticket_number#6, s (25) Exchange Input [5]: [ss_customer_sk#2, ss_addr_sk#4, ss_ticket_number#6, ss_coupon_amt#7, ss_net_profit#8] -Arguments: hashpartitioning(ss_addr_sk#4, 5), true, [id=#20] +Arguments: hashpartitioning(ss_addr_sk#4, 5), ENSURE_REQUIREMENTS, [id=#20] (26) Sort [codegen id : 5] Input [5]: [ss_customer_sk#2, ss_addr_sk#4, ss_ticket_number#6, ss_coupon_amt#7, ss_net_profit#8] @@ -183,7 +183,7 @@ Condition : (isnotnull(ca_address_sk#21) AND isnotnull(ca_city#22)) (30) Exchange Input [2]: [ca_address_sk#21, ca_city#22] -Arguments: hashpartitioning(ca_address_sk#21, 5), true, [id=#23] +Arguments: hashpartitioning(ca_address_sk#21, 5), ENSURE_REQUIREMENTS, [id=#23] (31) Sort [codegen id : 7] Input [2]: [ca_address_sk#21, ca_city#22] @@ -214,7 +214,7 @@ Results [5]: [ss_ticket_number#6, ss_customer_sk#2, ca_city#22 AS bought_city#30 (36) Exchange Input [5]: [ss_ticket_number#6, ss_customer_sk#2, bought_city#30, amt#31, profit#32] -Arguments: hashpartitioning(ss_customer_sk#2, 5), true, [id=#33] +Arguments: hashpartitioning(ss_customer_sk#2, 5), ENSURE_REQUIREMENTS, [id=#33] (37) Sort [codegen id : 9] Input [5]: [ss_ticket_number#6, ss_customer_sk#2, bought_city#30, amt#31, profit#32] @@ -236,7 +236,7 @@ Condition : (isnotnull(c_customer_sk#34) AND isnotnull(c_current_addr_sk#35)) (41) Exchange Input [4]: [c_customer_sk#34, c_current_addr_sk#35, c_first_name#36, c_last_name#37] -Arguments: hashpartitioning(c_customer_sk#34, 5), true, [id=#38] +Arguments: hashpartitioning(c_customer_sk#34, 5), ENSURE_REQUIREMENTS, [id=#38] (42) Sort [codegen id : 11] Input [4]: [c_customer_sk#34, c_current_addr_sk#35, c_first_name#36, c_last_name#37] @@ -253,7 +253,7 @@ Input [9]: [ss_ticket_number#6, ss_customer_sk#2, bought_city#30, amt#31, profit (45) Exchange Input [7]: [ss_ticket_number#6, bought_city#30, amt#31, profit#32, c_current_addr_sk#35, c_first_name#36, c_last_name#37] -Arguments: hashpartitioning(c_current_addr_sk#35, 5), true, [id=#39] +Arguments: hashpartitioning(c_current_addr_sk#35, 5), ENSURE_REQUIREMENTS, [id=#39] (46) Sort [codegen id : 13] Input [7]: [ss_ticket_number#6, bought_city#30, amt#31, profit#32, c_current_addr_sk#35, c_first_name#36, c_last_name#37] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q46/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q46/explain.txt index 1bf701ed689f9..4168b0bbc3da5 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q46/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q46/explain.txt @@ -187,7 +187,7 @@ Results [6]: [ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, ca_city#21, su (32) Exchange Input [6]: [ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, ca_city#21, sum#25, sum#26] -Arguments: hashpartitioning(ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, ca_city#21, 5), true, [id=#27] +Arguments: hashpartitioning(ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, ca_city#21, 5), ENSURE_REQUIREMENTS, [id=#27] (33) HashAggregate [codegen id : 8] Input [6]: [ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, ca_city#21, sum#25, sum#26] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q52.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q52.sf100/explain.txt index aa33cd1be7482..e3557167cb67b 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q52.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q52.sf100/explain.txt @@ -107,7 +107,7 @@ Results [4]: [d_year#2, i_brand#10, i_brand_id#9, sum#14] (19) Exchange Input [4]: [d_year#2, i_brand#10, i_brand_id#9, sum#14] -Arguments: hashpartitioning(d_year#2, i_brand#10, i_brand_id#9, 5), true, [id=#15] +Arguments: hashpartitioning(d_year#2, i_brand#10, i_brand_id#9, 5), ENSURE_REQUIREMENTS, [id=#15] (20) HashAggregate [codegen id : 4] Input [4]: [d_year#2, i_brand#10, i_brand_id#9, sum#14] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q52/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q52/explain.txt index 42944d42ed30c..b95a55bf886a6 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q52/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q52/explain.txt @@ -107,7 +107,7 @@ Results [4]: [d_year#2, i_brand#10, i_brand_id#9, sum#14] (19) Exchange Input [4]: [d_year#2, i_brand#10, i_brand_id#9, sum#14] -Arguments: hashpartitioning(d_year#2, i_brand#10, i_brand_id#9, 5), true, [id=#15] +Arguments: hashpartitioning(d_year#2, i_brand#10, i_brand_id#9, 5), ENSURE_REQUIREMENTS, [id=#15] (20) HashAggregate [codegen id : 4] Input [4]: [d_year#2, i_brand#10, i_brand_id#9, sum#14] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q53.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q53.sf100/explain.txt index 10db0b7d4d460..57c6f49354faf 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q53.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q53.sf100/explain.txt @@ -145,7 +145,7 @@ Results [3]: [i_manufact_id#5, d_qoy#19, sum#22] (25) Exchange Input [3]: [i_manufact_id#5, d_qoy#19, sum#22] -Arguments: hashpartitioning(i_manufact_id#5, d_qoy#19, 5), true, [id=#23] +Arguments: hashpartitioning(i_manufact_id#5, d_qoy#19, 5), ENSURE_REQUIREMENTS, [id=#23] (26) HashAggregate [codegen id : 5] Input [3]: [i_manufact_id#5, d_qoy#19, sum#22] @@ -156,7 +156,7 @@ Results [3]: [i_manufact_id#5, MakeDecimal(sum(UnscaledValue(ss_sales_price#14)) (27) Exchange Input [3]: [i_manufact_id#5, sum_sales#25, _w0#26] -Arguments: hashpartitioning(i_manufact_id#5, 5), true, [id=#27] +Arguments: hashpartitioning(i_manufact_id#5, 5), ENSURE_REQUIREMENTS, [id=#27] (28) Sort [codegen id : 6] Input [3]: [i_manufact_id#5, sum_sales#25, _w0#26] @@ -168,7 +168,7 @@ Arguments: [avg(_w0#26) windowspecdefinition(i_manufact_id#5, specifiedwindowfra (30) Filter [codegen id : 7] Input [4]: [i_manufact_id#5, sum_sales#25, _w0#26, avg_quarterly_sales#28] -Condition : (CASE WHEN (avg_quarterly_sales#28 > 0.000000) THEN CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#25 as decimal(22,6))) - promote_precision(cast(avg_quarterly_sales#28 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_quarterly_sales#28 as decimal(22,6)))), DecimalType(38,16), true) ELSE null END > 0.1000000000000000) +Condition : ((isnotnull(avg_quarterly_sales#28) AND (avg_quarterly_sales#28 > 0.000000)) AND (CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#25 as decimal(22,6))) - promote_precision(cast(avg_quarterly_sales#28 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_quarterly_sales#28 as decimal(22,6)))), DecimalType(38,16), true) > 0.1000000000000000)) (31) Project [codegen id : 7] Output [3]: [i_manufact_id#5, sum_sales#25, avg_quarterly_sales#28] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q53/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q53/explain.txt index c2c2ddd8cc406..aa65eeb55951d 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q53/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q53/explain.txt @@ -145,18 +145,18 @@ Results [3]: [i_manufact_id#5, d_qoy#17, sum#22] (25) Exchange Input [3]: [i_manufact_id#5, d_qoy#17, sum#22] -Arguments: hashpartitioning(i_manufact_id#5, d_qoy#17, 5), true, [id=#23] +Arguments: hashpartitioning(i_manufact_id#5, d_qoy#17, 5), ENSURE_REQUIREMENTS, [id=#23] (26) HashAggregate [codegen id : 5] Input [3]: [i_manufact_id#5, d_qoy#17, sum#22] Keys [2]: [i_manufact_id#5, d_qoy#17] Functions [1]: [sum(UnscaledValue(ss_sales_price#13))] Aggregate Attributes [1]: [sum(UnscaledValue(ss_sales_price#13))#24] -Results [3]: [i_manufact_id#5, MakeDecimal(sum(UnscaledValue(ss_sales_price#13))#24,17,2) AS sum_sales#25, MakeDecimal(sum(UnscaledValue(ss_sales_price#13))#24,17,2) AS _w0#26] +Results [3]: [i_manufact_id#5, MakeDecimal(sum(UnscaledValue(ss_sales_price#13))#24,17,2) AS sum_sales#25, cast(MakeDecimal(sum(UnscaledValue(ss_sales_price#13))#24,17,2) as bigint) AS _w0#26] (27) Exchange Input [3]: [i_manufact_id#5, sum_sales#25, _w0#26] -Arguments: hashpartitioning(i_manufact_id#5, 5), true, [id=#27] +Arguments: hashpartitioning(i_manufact_id#5, 5), ENSURE_REQUIREMENTS, [id=#27] (28) Sort [codegen id : 6] Input [3]: [i_manufact_id#5, sum_sales#25, _w0#26] @@ -168,7 +168,7 @@ Arguments: [avg(_w0#26) windowspecdefinition(i_manufact_id#5, specifiedwindowfra (30) Filter [codegen id : 7] Input [4]: [i_manufact_id#5, sum_sales#25, _w0#26, avg_quarterly_sales#28] -Condition : (CASE WHEN (avg_quarterly_sales#28 > 0.000000) THEN CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#25 as decimal(22,6))) - promote_precision(cast(avg_quarterly_sales#28 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_quarterly_sales#28 as decimal(22,6)))), DecimalType(38,16), true) ELSE null END > 0.1000000000000000) +Condition : (((isnotnull(avg_quarterly_sales#28) AND isnotnull(sum_sales#25)) AND (avg_quarterly_sales#28 > 0.0)) AND ((abs((cast(sum_sales#25 as double) - avg_quarterly_sales#28)) / avg_quarterly_sales#28) > 0.1)) (31) Project [codegen id : 7] Output [3]: [i_manufact_id#5, sum_sales#25, avg_quarterly_sales#28] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q55.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q55.sf100/explain.txt index 6d9a28f187916..93c69b1ba33b0 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q55.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q55.sf100/explain.txt @@ -107,7 +107,7 @@ Results [3]: [i_brand#10, i_brand_id#9, sum#14] (19) Exchange Input [3]: [i_brand#10, i_brand_id#9, sum#14] -Arguments: hashpartitioning(i_brand#10, i_brand_id#9, 5), true, [id=#15] +Arguments: hashpartitioning(i_brand#10, i_brand_id#9, 5), ENSURE_REQUIREMENTS, [id=#15] (20) HashAggregate [codegen id : 4] Input [3]: [i_brand#10, i_brand_id#9, sum#14] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q55/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q55/explain.txt index 49ecb64c4234b..5841caa13311d 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q55/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q55/explain.txt @@ -107,7 +107,7 @@ Results [3]: [i_brand#10, i_brand_id#9, sum#14] (19) Exchange Input [3]: [i_brand#10, i_brand_id#9, sum#14] -Arguments: hashpartitioning(i_brand#10, i_brand_id#9, 5), true, [id=#15] +Arguments: hashpartitioning(i_brand#10, i_brand_id#9, 5), ENSURE_REQUIREMENTS, [id=#15] (20) HashAggregate [codegen id : 4] Input [3]: [i_brand#10, i_brand_id#9, sum#14] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q59.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q59.sf100/explain.txt index d525df46c8a4a..6b5a14a15e31f 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q59.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q59.sf100/explain.txt @@ -102,7 +102,7 @@ Results [9]: [d_week_seq#5, ss_store_sk#2, sum#15, sum#16, sum#17, sum#18, sum#1 (11) Exchange Input [9]: [d_week_seq#5, ss_store_sk#2, sum#15, sum#16, sum#17, sum#18, sum#19, sum#20, sum#21] -Arguments: hashpartitioning(d_week_seq#5, ss_store_sk#2, 5), true, [id=#22] +Arguments: hashpartitioning(d_week_seq#5, ss_store_sk#2, 5), ENSURE_REQUIREMENTS, [id=#22] (12) HashAggregate [codegen id : 10] Input [9]: [d_week_seq#5, ss_store_sk#2, sum#15, sum#16, sum#17, sum#18, sum#19, sum#20, sum#21] @@ -204,7 +204,7 @@ Results [8]: [d_week_seq#5, ss_store_sk#2, sum#60, sum#61, sum#62, sum#63, sum#6 (33) Exchange Input [8]: [d_week_seq#5, ss_store_sk#2, sum#60, sum#61, sum#62, sum#63, sum#64, sum#65] -Arguments: hashpartitioning(d_week_seq#5, ss_store_sk#2, 5), true, [id=#66] +Arguments: hashpartitioning(d_week_seq#5, ss_store_sk#2, 5), ENSURE_REQUIREMENTS, [id=#66] (34) HashAggregate [codegen id : 9] Input [8]: [d_week_seq#5, ss_store_sk#2, sum#60, sum#61, sum#62, sum#63, sum#64, sum#65] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q59/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q59/explain.txt index d525df46c8a4a..6b5a14a15e31f 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q59/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q59/explain.txt @@ -102,7 +102,7 @@ Results [9]: [d_week_seq#5, ss_store_sk#2, sum#15, sum#16, sum#17, sum#18, sum#1 (11) Exchange Input [9]: [d_week_seq#5, ss_store_sk#2, sum#15, sum#16, sum#17, sum#18, sum#19, sum#20, sum#21] -Arguments: hashpartitioning(d_week_seq#5, ss_store_sk#2, 5), true, [id=#22] +Arguments: hashpartitioning(d_week_seq#5, ss_store_sk#2, 5), ENSURE_REQUIREMENTS, [id=#22] (12) HashAggregate [codegen id : 10] Input [9]: [d_week_seq#5, ss_store_sk#2, sum#15, sum#16, sum#17, sum#18, sum#19, sum#20, sum#21] @@ -204,7 +204,7 @@ Results [8]: [d_week_seq#5, ss_store_sk#2, sum#60, sum#61, sum#62, sum#63, sum#6 (33) Exchange Input [8]: [d_week_seq#5, ss_store_sk#2, sum#60, sum#61, sum#62, sum#63, sum#64, sum#65] -Arguments: hashpartitioning(d_week_seq#5, ss_store_sk#2, 5), true, [id=#66] +Arguments: hashpartitioning(d_week_seq#5, ss_store_sk#2, 5), ENSURE_REQUIREMENTS, [id=#66] (34) HashAggregate [codegen id : 9] Input [8]: [d_week_seq#5, ss_store_sk#2, sum#60, sum#61, sum#62, sum#63, sum#64, sum#65] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q63.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q63.sf100/explain.txt index 5c4a69d38637d..23b7d4c8eb0a3 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q63.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q63.sf100/explain.txt @@ -145,7 +145,7 @@ Results [3]: [i_manager_id#5, d_moy#19, sum#22] (25) Exchange Input [3]: [i_manager_id#5, d_moy#19, sum#22] -Arguments: hashpartitioning(i_manager_id#5, d_moy#19, 5), true, [id=#23] +Arguments: hashpartitioning(i_manager_id#5, d_moy#19, 5), ENSURE_REQUIREMENTS, [id=#23] (26) HashAggregate [codegen id : 5] Input [3]: [i_manager_id#5, d_moy#19, sum#22] @@ -156,7 +156,7 @@ Results [3]: [i_manager_id#5, MakeDecimal(sum(UnscaledValue(ss_sales_price#14))# (27) Exchange Input [3]: [i_manager_id#5, sum_sales#25, _w0#26] -Arguments: hashpartitioning(i_manager_id#5, 5), true, [id=#27] +Arguments: hashpartitioning(i_manager_id#5, 5), ENSURE_REQUIREMENTS, [id=#27] (28) Sort [codegen id : 6] Input [3]: [i_manager_id#5, sum_sales#25, _w0#26] @@ -168,7 +168,7 @@ Arguments: [avg(_w0#26) windowspecdefinition(i_manager_id#5, specifiedwindowfram (30) Filter [codegen id : 7] Input [4]: [i_manager_id#5, sum_sales#25, _w0#26, avg_monthly_sales#28] -Condition : (CASE WHEN (avg_monthly_sales#28 > 0.000000) THEN CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#25 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#28 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_monthly_sales#28 as decimal(22,6)))), DecimalType(38,16), true) ELSE null END > 0.1000000000000000) +Condition : ((isnotnull(avg_monthly_sales#28) AND (avg_monthly_sales#28 > 0.000000)) AND (CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#25 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#28 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_monthly_sales#28 as decimal(22,6)))), DecimalType(38,16), true) > 0.1000000000000000)) (31) Project [codegen id : 7] Output [3]: [i_manager_id#5, sum_sales#25, avg_monthly_sales#28] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q63/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q63/explain.txt index c0d107d6ae851..cbe55991adc8c 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q63/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q63/explain.txt @@ -145,18 +145,18 @@ Results [3]: [i_manager_id#5, d_moy#17, sum#22] (25) Exchange Input [3]: [i_manager_id#5, d_moy#17, sum#22] -Arguments: hashpartitioning(i_manager_id#5, d_moy#17, 5), true, [id=#23] +Arguments: hashpartitioning(i_manager_id#5, d_moy#17, 5), ENSURE_REQUIREMENTS, [id=#23] (26) HashAggregate [codegen id : 5] Input [3]: [i_manager_id#5, d_moy#17, sum#22] Keys [2]: [i_manager_id#5, d_moy#17] Functions [1]: [sum(UnscaledValue(ss_sales_price#13))] Aggregate Attributes [1]: [sum(UnscaledValue(ss_sales_price#13))#24] -Results [3]: [i_manager_id#5, MakeDecimal(sum(UnscaledValue(ss_sales_price#13))#24,17,2) AS sum_sales#25, MakeDecimal(sum(UnscaledValue(ss_sales_price#13))#24,17,2) AS _w0#26] +Results [3]: [i_manager_id#5, MakeDecimal(sum(UnscaledValue(ss_sales_price#13))#24,17,2) AS sum_sales#25, cast(MakeDecimal(sum(UnscaledValue(ss_sales_price#13))#24,17,2) as bigint) AS _w0#26] (27) Exchange Input [3]: [i_manager_id#5, sum_sales#25, _w0#26] -Arguments: hashpartitioning(i_manager_id#5, 5), true, [id=#27] +Arguments: hashpartitioning(i_manager_id#5, 5), ENSURE_REQUIREMENTS, [id=#27] (28) Sort [codegen id : 6] Input [3]: [i_manager_id#5, sum_sales#25, _w0#26] @@ -168,7 +168,7 @@ Arguments: [avg(_w0#26) windowspecdefinition(i_manager_id#5, specifiedwindowfram (30) Filter [codegen id : 7] Input [4]: [i_manager_id#5, sum_sales#25, _w0#26, avg_monthly_sales#28] -Condition : (CASE WHEN (avg_monthly_sales#28 > 0.000000) THEN CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#25 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#28 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_monthly_sales#28 as decimal(22,6)))), DecimalType(38,16), true) ELSE null END > 0.1000000000000000) +Condition : (((isnotnull(avg_monthly_sales#28) AND isnotnull(sum_sales#25)) AND (avg_monthly_sales#28 > 0.0)) AND ((abs((cast(sum_sales#25 as double) - avg_monthly_sales#28)) / avg_monthly_sales#28) > 0.1)) (31) Project [codegen id : 7] Output [3]: [i_manager_id#5, sum_sales#25, avg_monthly_sales#28] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q65.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q65.sf100/explain.txt index 6601207c6587b..c2ec3a545cf29 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q65.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q65.sf100/explain.txt @@ -97,7 +97,7 @@ Results [3]: [ss_store_sk#3, ss_item_sk#2, sum#9] (12) Exchange Input [3]: [ss_store_sk#3, ss_item_sk#2, sum#9] -Arguments: hashpartitioning(ss_store_sk#3, ss_item_sk#2, 5), true, [id=#10] +Arguments: hashpartitioning(ss_store_sk#3, ss_item_sk#2, 5), ENSURE_REQUIREMENTS, [id=#10] (13) HashAggregate [codegen id : 7] Input [3]: [ss_store_sk#3, ss_item_sk#2, sum#9] @@ -145,7 +145,7 @@ Results [3]: [ss_store_sk#15, ss_item_sk#14, sum#18] (22) Exchange Input [3]: [ss_store_sk#15, ss_item_sk#14, sum#18] -Arguments: hashpartitioning(ss_store_sk#15, ss_item_sk#14, 5), true, [id=#19] +Arguments: hashpartitioning(ss_store_sk#15, ss_item_sk#14, 5), ENSURE_REQUIREMENTS, [id=#19] (23) HashAggregate [codegen id : 5] Input [3]: [ss_store_sk#15, ss_item_sk#14, sum#18] @@ -163,7 +163,7 @@ Results [3]: [ss_store_sk#15, sum#24, count#25] (25) Exchange Input [3]: [ss_store_sk#15, sum#24, count#25] -Arguments: hashpartitioning(ss_store_sk#15, 5), true, [id=#26] +Arguments: hashpartitioning(ss_store_sk#15, 5), ENSURE_REQUIREMENTS, [id=#26] (26) HashAggregate [codegen id : 6] Input [3]: [ss_store_sk#15, sum#24, count#25] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q65/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q65/explain.txt index cabd4e1f2ac3c..4bc46ec2e4203 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q65/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q65/explain.txt @@ -111,7 +111,7 @@ Results [3]: [ss_store_sk#5, ss_item_sk#4, sum#11] (15) Exchange Input [3]: [ss_store_sk#5, ss_item_sk#4, sum#11] -Arguments: hashpartitioning(ss_store_sk#5, ss_item_sk#4, 5), true, [id=#12] +Arguments: hashpartitioning(ss_store_sk#5, ss_item_sk#4, 5), ENSURE_REQUIREMENTS, [id=#12] (16) HashAggregate [codegen id : 3] Input [3]: [ss_store_sk#5, ss_item_sk#4, sum#11] @@ -199,7 +199,7 @@ Results [3]: [ss_store_sk#24, ss_item_sk#23, sum#27] (34) Exchange Input [3]: [ss_store_sk#24, ss_item_sk#23, sum#27] -Arguments: hashpartitioning(ss_store_sk#24, ss_item_sk#23, 5), true, [id=#28] +Arguments: hashpartitioning(ss_store_sk#24, ss_item_sk#23, 5), ENSURE_REQUIREMENTS, [id=#28] (35) HashAggregate [codegen id : 7] Input [3]: [ss_store_sk#24, ss_item_sk#23, sum#27] @@ -217,7 +217,7 @@ Results [3]: [ss_store_sk#24, sum#33, count#34] (37) Exchange Input [3]: [ss_store_sk#24, sum#33, count#34] -Arguments: hashpartitioning(ss_store_sk#24, 5), true, [id=#35] +Arguments: hashpartitioning(ss_store_sk#24, 5), ENSURE_REQUIREMENTS, [id=#35] (38) HashAggregate [codegen id : 8] Input [3]: [ss_store_sk#24, sum#33, count#34] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q68.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q68.sf100/explain.txt index 52641b6986146..1ad281937d30c 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q68.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q68.sf100/explain.txt @@ -196,7 +196,7 @@ Results [7]: [ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, ca_city#23, su (32) Exchange Input [7]: [ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, ca_city#23, sum#27, sum#28, sum#29] -Arguments: hashpartitioning(ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, ca_city#23, 5), true, [id=#30] +Arguments: hashpartitioning(ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, ca_city#23, 5), ENSURE_REQUIREMENTS, [id=#30] (33) HashAggregate [codegen id : 6] Input [7]: [ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, ca_city#23, sum#27, sum#28, sum#29] @@ -207,7 +207,7 @@ Results [6]: [ss_ticket_number#6, ss_customer_sk#2, ca_city#23 AS bought_city#34 (34) Exchange Input [6]: [ss_ticket_number#6, ss_customer_sk#2, bought_city#34, extended_price#35, list_price#36, extended_tax#37] -Arguments: hashpartitioning(ss_customer_sk#2, 5), true, [id=#38] +Arguments: hashpartitioning(ss_customer_sk#2, 5), ENSURE_REQUIREMENTS, [id=#38] (35) Sort [codegen id : 7] Input [6]: [ss_ticket_number#6, ss_customer_sk#2, bought_city#34, extended_price#35, list_price#36, extended_tax#37] @@ -229,7 +229,7 @@ Condition : (isnotnull(c_customer_sk#39) AND isnotnull(c_current_addr_sk#40)) (39) Exchange Input [4]: [c_customer_sk#39, c_current_addr_sk#40, c_first_name#41, c_last_name#42] -Arguments: hashpartitioning(c_customer_sk#39, 5), true, [id=#43] +Arguments: hashpartitioning(c_customer_sk#39, 5), ENSURE_REQUIREMENTS, [id=#43] (40) Sort [codegen id : 9] Input [4]: [c_customer_sk#39, c_current_addr_sk#40, c_first_name#41, c_last_name#42] @@ -246,7 +246,7 @@ Input [10]: [ss_ticket_number#6, ss_customer_sk#2, bought_city#34, extended_pric (43) Exchange Input [8]: [ss_ticket_number#6, bought_city#34, extended_price#35, list_price#36, extended_tax#37, c_current_addr_sk#40, c_first_name#41, c_last_name#42] -Arguments: hashpartitioning(c_current_addr_sk#40, 5), true, [id=#44] +Arguments: hashpartitioning(c_current_addr_sk#40, 5), ENSURE_REQUIREMENTS, [id=#44] (44) Sort [codegen id : 11] Input [8]: [ss_ticket_number#6, bought_city#34, extended_price#35, list_price#36, extended_tax#37, c_current_addr_sk#40, c_first_name#41, c_last_name#42] @@ -268,7 +268,7 @@ Condition : (isnotnull(ca_address_sk#22) AND isnotnull(ca_city#23)) (48) Exchange Input [2]: [ca_address_sk#22, ca_city#23] -Arguments: hashpartitioning(ca_address_sk#22, 5), true, [id=#45] +Arguments: hashpartitioning(ca_address_sk#22, 5), ENSURE_REQUIREMENTS, [id=#45] (49) Sort [codegen id : 13] Input [2]: [ca_address_sk#22, ca_city#23] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q68/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q68/explain.txt index 2963d89a06806..77617b14073c7 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q68/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q68/explain.txt @@ -187,7 +187,7 @@ Results [7]: [ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, ca_city#22, su (32) Exchange Input [7]: [ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, ca_city#22, sum#27, sum#28, sum#29] -Arguments: hashpartitioning(ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, ca_city#22, 5), true, [id=#30] +Arguments: hashpartitioning(ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, ca_city#22, 5), ENSURE_REQUIREMENTS, [id=#30] (33) HashAggregate [codegen id : 8] Input [7]: [ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, ca_city#22, sum#27, sum#28, sum#29] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q7.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q7.sf100/explain.txt index 220d661fd45e9..6bab79709a82e 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q7.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q7.sf100/explain.txt @@ -172,20 +172,20 @@ Input [7]: [ss_item_sk#2, ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_c (31) HashAggregate [codegen id : 5] Input [5]: [ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_coupon_amt#8, i_item_id#22] Keys [1]: [i_item_id#22] -Functions [4]: [partial_avg(cast(ss_quantity#5 as bigint)), partial_avg(UnscaledValue(ss_list_price#6)), partial_avg(UnscaledValue(ss_coupon_amt#8)), partial_avg(UnscaledValue(ss_sales_price#7))] +Functions [4]: [partial_avg(ss_quantity#5), partial_avg(UnscaledValue(ss_list_price#6)), partial_avg(UnscaledValue(ss_coupon_amt#8)), partial_avg(UnscaledValue(ss_sales_price#7))] Aggregate Attributes [8]: [sum#24, count#25, sum#26, count#27, sum#28, count#29, sum#30, count#31] Results [9]: [i_item_id#22, sum#32, count#33, sum#34, count#35, sum#36, count#37, sum#38, count#39] (32) Exchange Input [9]: [i_item_id#22, sum#32, count#33, sum#34, count#35, sum#36, count#37, sum#38, count#39] -Arguments: hashpartitioning(i_item_id#22, 5), true, [id=#40] +Arguments: hashpartitioning(i_item_id#22, 5), ENSURE_REQUIREMENTS, [id=#40] (33) HashAggregate [codegen id : 6] Input [9]: [i_item_id#22, sum#32, count#33, sum#34, count#35, sum#36, count#37, sum#38, count#39] Keys [1]: [i_item_id#22] -Functions [4]: [avg(cast(ss_quantity#5 as bigint)), avg(UnscaledValue(ss_list_price#6)), avg(UnscaledValue(ss_coupon_amt#8)), avg(UnscaledValue(ss_sales_price#7))] -Aggregate Attributes [4]: [avg(cast(ss_quantity#5 as bigint))#41, avg(UnscaledValue(ss_list_price#6))#42, avg(UnscaledValue(ss_coupon_amt#8))#43, avg(UnscaledValue(ss_sales_price#7))#44] -Results [5]: [i_item_id#22, avg(cast(ss_quantity#5 as bigint))#41 AS agg1#45, cast((avg(UnscaledValue(ss_list_price#6))#42 / 100.0) as decimal(11,6)) AS agg2#46, cast((avg(UnscaledValue(ss_coupon_amt#8))#43 / 100.0) as decimal(11,6)) AS agg3#47, cast((avg(UnscaledValue(ss_sales_price#7))#44 / 100.0) as decimal(11,6)) AS agg4#48] +Functions [4]: [avg(ss_quantity#5), avg(UnscaledValue(ss_list_price#6)), avg(UnscaledValue(ss_coupon_amt#8)), avg(UnscaledValue(ss_sales_price#7))] +Aggregate Attributes [4]: [avg(ss_quantity#5)#41, avg(UnscaledValue(ss_list_price#6))#42, avg(UnscaledValue(ss_coupon_amt#8))#43, avg(UnscaledValue(ss_sales_price#7))#44] +Results [5]: [i_item_id#22, avg(ss_quantity#5)#41 AS agg1#45, cast((avg(UnscaledValue(ss_list_price#6))#42 / 100.0) as decimal(11,6)) AS agg2#46, cast((avg(UnscaledValue(ss_coupon_amt#8))#43 / 100.0) as decimal(11,6)) AS agg3#47, cast((avg(UnscaledValue(ss_sales_price#7))#44 / 100.0) as decimal(11,6)) AS agg4#48] (34) TakeOrderedAndProject Input [5]: [i_item_id#22, agg1#45, agg2#46, agg3#47, agg4#48] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q7.sf100/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q7.sf100/simplified.txt index 61cc7daa76456..1e972ea151243 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q7.sf100/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q7.sf100/simplified.txt @@ -1,6 +1,6 @@ TakeOrderedAndProject [i_item_id,agg1,agg2,agg3,agg4] WholeStageCodegen (6) - HashAggregate [i_item_id,sum,count,sum,count,sum,count,sum,count] [avg(cast(ss_quantity as bigint)),avg(UnscaledValue(ss_list_price)),avg(UnscaledValue(ss_coupon_amt)),avg(UnscaledValue(ss_sales_price)),agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] + HashAggregate [i_item_id,sum,count,sum,count,sum,count,sum,count] [avg(ss_quantity),avg(UnscaledValue(ss_list_price)),avg(UnscaledValue(ss_coupon_amt)),avg(UnscaledValue(ss_sales_price)),agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] InputAdapter Exchange [i_item_id] #1 WholeStageCodegen (5) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q7/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q7/explain.txt index 7cbeb89559367..8f2f83b381b27 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q7/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q7/explain.txt @@ -172,20 +172,20 @@ Input [7]: [ss_promo_sk#4, ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_ (31) HashAggregate [codegen id : 5] Input [5]: [ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_coupon_amt#8, i_item_id#18] Keys [1]: [i_item_id#18] -Functions [4]: [partial_avg(cast(ss_quantity#5 as bigint)), partial_avg(UnscaledValue(ss_list_price#6)), partial_avg(UnscaledValue(ss_coupon_amt#8)), partial_avg(UnscaledValue(ss_sales_price#7))] +Functions [4]: [partial_avg(ss_quantity#5), partial_avg(UnscaledValue(ss_list_price#6)), partial_avg(UnscaledValue(ss_coupon_amt#8)), partial_avg(UnscaledValue(ss_sales_price#7))] Aggregate Attributes [8]: [sum#24, count#25, sum#26, count#27, sum#28, count#29, sum#30, count#31] Results [9]: [i_item_id#18, sum#32, count#33, sum#34, count#35, sum#36, count#37, sum#38, count#39] (32) Exchange Input [9]: [i_item_id#18, sum#32, count#33, sum#34, count#35, sum#36, count#37, sum#38, count#39] -Arguments: hashpartitioning(i_item_id#18, 5), true, [id=#40] +Arguments: hashpartitioning(i_item_id#18, 5), ENSURE_REQUIREMENTS, [id=#40] (33) HashAggregate [codegen id : 6] Input [9]: [i_item_id#18, sum#32, count#33, sum#34, count#35, sum#36, count#37, sum#38, count#39] Keys [1]: [i_item_id#18] -Functions [4]: [avg(cast(ss_quantity#5 as bigint)), avg(UnscaledValue(ss_list_price#6)), avg(UnscaledValue(ss_coupon_amt#8)), avg(UnscaledValue(ss_sales_price#7))] -Aggregate Attributes [4]: [avg(cast(ss_quantity#5 as bigint))#41, avg(UnscaledValue(ss_list_price#6))#42, avg(UnscaledValue(ss_coupon_amt#8))#43, avg(UnscaledValue(ss_sales_price#7))#44] -Results [5]: [i_item_id#18, avg(cast(ss_quantity#5 as bigint))#41 AS agg1#45, cast((avg(UnscaledValue(ss_list_price#6))#42 / 100.0) as decimal(11,6)) AS agg2#46, cast((avg(UnscaledValue(ss_coupon_amt#8))#43 / 100.0) as decimal(11,6)) AS agg3#47, cast((avg(UnscaledValue(ss_sales_price#7))#44 / 100.0) as decimal(11,6)) AS agg4#48] +Functions [4]: [avg(ss_quantity#5), avg(UnscaledValue(ss_list_price#6)), avg(UnscaledValue(ss_coupon_amt#8)), avg(UnscaledValue(ss_sales_price#7))] +Aggregate Attributes [4]: [avg(ss_quantity#5)#41, avg(UnscaledValue(ss_list_price#6))#42, avg(UnscaledValue(ss_coupon_amt#8))#43, avg(UnscaledValue(ss_sales_price#7))#44] +Results [5]: [i_item_id#18, avg(ss_quantity#5)#41 AS agg1#45, cast((avg(UnscaledValue(ss_list_price#6))#42 / 100.0) as decimal(11,6)) AS agg2#46, cast((avg(UnscaledValue(ss_coupon_amt#8))#43 / 100.0) as decimal(11,6)) AS agg3#47, cast((avg(UnscaledValue(ss_sales_price#7))#44 / 100.0) as decimal(11,6)) AS agg4#48] (34) TakeOrderedAndProject Input [5]: [i_item_id#18, agg1#45, agg2#46, agg3#47, agg4#48] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q7/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q7/simplified.txt index 2d3ed4d1f7697..6d688cf33a798 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q7/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q7/simplified.txt @@ -1,6 +1,6 @@ TakeOrderedAndProject [i_item_id,agg1,agg2,agg3,agg4] WholeStageCodegen (6) - HashAggregate [i_item_id,sum,count,sum,count,sum,count,sum,count] [avg(cast(ss_quantity as bigint)),avg(UnscaledValue(ss_list_price)),avg(UnscaledValue(ss_coupon_amt)),avg(UnscaledValue(ss_sales_price)),agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] + HashAggregate [i_item_id,sum,count,sum,count,sum,count,sum,count] [avg(ss_quantity),avg(UnscaledValue(ss_list_price)),avg(UnscaledValue(ss_coupon_amt)),avg(UnscaledValue(ss_sales_price)),agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] InputAdapter Exchange [i_item_id] #1 WholeStageCodegen (5) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q79.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q79.sf100/explain.txt index 034d9fd0344b0..3e5c3d3c10f74 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q79.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q79.sf100/explain.txt @@ -154,7 +154,7 @@ Results [6]: [ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, s_city#19, sum (26) Exchange Input [6]: [ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, s_city#19, sum#23, sum#24] -Arguments: hashpartitioning(ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, s_city#19, 5), true, [id=#25] +Arguments: hashpartitioning(ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, s_city#19, 5), ENSURE_REQUIREMENTS, [id=#25] (27) HashAggregate [codegen id : 5] Input [6]: [ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, s_city#19, sum#23, sum#24] @@ -165,7 +165,7 @@ Results [5]: [ss_ticket_number#6, ss_customer_sk#2, s_city#19, MakeDecimal(sum(U (28) Exchange Input [5]: [ss_ticket_number#6, ss_customer_sk#2, s_city#19, amt#28, profit#29] -Arguments: hashpartitioning(ss_customer_sk#2, 5), true, [id=#30] +Arguments: hashpartitioning(ss_customer_sk#2, 5), ENSURE_REQUIREMENTS, [id=#30] (29) Sort [codegen id : 6] Input [5]: [ss_ticket_number#6, ss_customer_sk#2, s_city#19, amt#28, profit#29] @@ -187,7 +187,7 @@ Condition : isnotnull(c_customer_sk#31) (33) Exchange Input [3]: [c_customer_sk#31, c_first_name#32, c_last_name#33] -Arguments: hashpartitioning(c_customer_sk#31, 5), true, [id=#34] +Arguments: hashpartitioning(c_customer_sk#31, 5), ENSURE_REQUIREMENTS, [id=#34] (34) Sort [codegen id : 8] Input [3]: [c_customer_sk#31, c_first_name#32, c_last_name#33] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q79/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q79/explain.txt index b4eb617bd231f..7fc412f6f16b4 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q79/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q79/explain.txt @@ -151,7 +151,7 @@ Results [6]: [ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, s_city#15, sum (26) Exchange Input [6]: [ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, s_city#15, sum#23, sum#24] -Arguments: hashpartitioning(ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, s_city#15, 5), true, [id=#25] +Arguments: hashpartitioning(ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, s_city#15, 5), ENSURE_REQUIREMENTS, [id=#25] (27) HashAggregate [codegen id : 6] Input [6]: [ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, s_city#15, sum#23, sum#24] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q89.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q89.sf100/explain.txt index 776d1262c7ffd..0e88d38f34c3c 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q89.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q89.sf100/explain.txt @@ -140,7 +140,7 @@ Results [7]: [i_category#16, i_class#15, i_brand#14, s_store_name#10, s_company_ (24) Exchange Input [7]: [i_category#16, i_class#15, i_brand#14, s_store_name#10, s_company_name#11, d_moy#7, sum#19] -Arguments: hashpartitioning(i_category#16, i_class#15, i_brand#14, s_store_name#10, s_company_name#11, d_moy#7, 5), true, [id=#20] +Arguments: hashpartitioning(i_category#16, i_class#15, i_brand#14, s_store_name#10, s_company_name#11, d_moy#7, 5), ENSURE_REQUIREMENTS, [id=#20] (25) HashAggregate [codegen id : 5] Input [7]: [i_category#16, i_class#15, i_brand#14, s_store_name#10, s_company_name#11, d_moy#7, sum#19] @@ -151,7 +151,7 @@ Results [8]: [i_category#16, i_class#15, i_brand#14, s_store_name#10, s_company_ (26) Exchange Input [8]: [i_category#16, i_class#15, i_brand#14, s_store_name#10, s_company_name#11, d_moy#7, sum_sales#22, _w0#23] -Arguments: hashpartitioning(i_category#16, i_brand#14, s_store_name#10, s_company_name#11, 5), true, [id=#24] +Arguments: hashpartitioning(i_category#16, i_brand#14, s_store_name#10, s_company_name#11, 5), ENSURE_REQUIREMENTS, [id=#24] (27) Sort [codegen id : 6] Input [8]: [i_category#16, i_class#15, i_brand#14, s_store_name#10, s_company_name#11, d_moy#7, sum_sales#22, _w0#23] @@ -163,7 +163,7 @@ Arguments: [avg(_w0#23) windowspecdefinition(i_category#16, i_brand#14, s_store_ (29) Filter [codegen id : 7] Input [9]: [i_category#16, i_class#15, i_brand#14, s_store_name#10, s_company_name#11, d_moy#7, sum_sales#22, _w0#23, avg_monthly_sales#25] -Condition : (CASE WHEN NOT (avg_monthly_sales#25 = 0.000000) THEN CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#22 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#25 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_monthly_sales#25 as decimal(22,6)))), DecimalType(38,16), true) ELSE null END > 0.1000000000000000) +Condition : ((isnotnull(avg_monthly_sales#25) AND NOT (avg_monthly_sales#25 = 0.000000)) AND (CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#22 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#25 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_monthly_sales#25 as decimal(22,6)))), DecimalType(38,16), true) > 0.1000000000000000)) (30) Project [codegen id : 7] Output [8]: [i_category#16, i_class#15, i_brand#14, s_store_name#10, s_company_name#11, d_moy#7, sum_sales#22, avg_monthly_sales#25] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q89/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q89/explain.txt index e90ec6f52eda0..c2b836c070de9 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q89/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q89/explain.txt @@ -140,18 +140,18 @@ Results [7]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_nam (24) Exchange Input [7]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, sum#19] -Arguments: hashpartitioning(i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, 5), true, [id=#20] +Arguments: hashpartitioning(i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, 5), ENSURE_REQUIREMENTS, [id=#20] (25) HashAggregate [codegen id : 5] Input [7]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, sum#19] Keys [6]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12] Functions [1]: [sum(UnscaledValue(ss_sales_price#8))] Aggregate Attributes [1]: [sum(UnscaledValue(ss_sales_price#8))#21] -Results [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, MakeDecimal(sum(UnscaledValue(ss_sales_price#8))#21,17,2) AS sum_sales#22, MakeDecimal(sum(UnscaledValue(ss_sales_price#8))#21,17,2) AS _w0#23] +Results [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, MakeDecimal(sum(UnscaledValue(ss_sales_price#8))#21,17,2) AS sum_sales#22, cast(MakeDecimal(sum(UnscaledValue(ss_sales_price#8))#21,17,2) as bigint) AS _w0#23] (26) Exchange Input [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, sum_sales#22, _w0#23] -Arguments: hashpartitioning(i_category#4, i_brand#2, s_store_name#15, s_company_name#16, 5), true, [id=#24] +Arguments: hashpartitioning(i_category#4, i_brand#2, s_store_name#15, s_company_name#16, 5), ENSURE_REQUIREMENTS, [id=#24] (27) Sort [codegen id : 6] Input [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, sum_sales#22, _w0#23] @@ -163,7 +163,7 @@ Arguments: [avg(_w0#23) windowspecdefinition(i_category#4, i_brand#2, s_store_na (29) Filter [codegen id : 7] Input [9]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, sum_sales#22, _w0#23, avg_monthly_sales#25] -Condition : (CASE WHEN NOT (avg_monthly_sales#25 = 0.000000) THEN CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#22 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#25 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_monthly_sales#25 as decimal(22,6)))), DecimalType(38,16), true) ELSE null END > 0.1000000000000000) +Condition : (((isnotnull(avg_monthly_sales#25) AND isnotnull(sum_sales#22)) AND NOT (avg_monthly_sales#25 = 0.0)) AND ((abs((cast(sum_sales#22 as double) - avg_monthly_sales#25)) / avg_monthly_sales#25) > 0.1)) (30) Project [codegen id : 7] Output [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, sum_sales#22, avg_monthly_sales#25] @@ -171,5 +171,5 @@ Input [9]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name# (31) TakeOrderedAndProject Input [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, sum_sales#22, avg_monthly_sales#25] -Arguments: 100, [CheckOverflow((promote_precision(cast(sum_sales#22 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#25 as decimal(22,6)))), DecimalType(22,6), true) ASC NULLS FIRST, s_store_name#15 ASC NULLS FIRST], [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, sum_sales#22, avg_monthly_sales#25] +Arguments: 100, [(cast(sum_sales#22 as double) - avg_monthly_sales#25) ASC NULLS FIRST, s_store_name#15 ASC NULLS FIRST], [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, sum_sales#22, avg_monthly_sales#25] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q98.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q98.sf100/explain.txt index 47842568c1bc7..3e72e1cc68fdb 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q98.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q98.sf100/explain.txt @@ -77,7 +77,7 @@ Input [4]: [ss_sold_date_sk#1, ss_item_sk#2, ss_ext_sales_price#3, d_date_sk#4] (11) Exchange Input [2]: [ss_item_sk#2, ss_ext_sales_price#3] -Arguments: hashpartitioning(ss_item_sk#2, 5), true, [id=#7] +Arguments: hashpartitioning(ss_item_sk#2, 5), ENSURE_REQUIREMENTS, [id=#7] (12) Sort [codegen id : 3] Input [2]: [ss_item_sk#2, ss_ext_sales_price#3] @@ -99,7 +99,7 @@ Condition : (i_category#13 IN (Jewelry,Sports,Books) AND isnotnull(i_item_sk#8)) (16) Exchange Input [6]: [i_item_sk#8, i_item_id#9, i_item_desc#10, i_current_price#11, i_class#12, i_category#13] -Arguments: hashpartitioning(i_item_sk#8, 5), true, [id=#14] +Arguments: hashpartitioning(i_item_sk#8, 5), ENSURE_REQUIREMENTS, [id=#14] (17) Sort [codegen id : 5] Input [6]: [i_item_sk#8, i_item_id#9, i_item_desc#10, i_current_price#11, i_class#12, i_category#13] @@ -123,7 +123,7 @@ Results [6]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_ (21) Exchange Input [6]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, sum#16] -Arguments: hashpartitioning(i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, 5), true, [id=#17] +Arguments: hashpartitioning(i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, 5), ENSURE_REQUIREMENTS, [id=#17] (22) HashAggregate [codegen id : 7] Input [6]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, sum#16] @@ -134,7 +134,7 @@ Results [8]: [i_item_desc#10, i_category#13, i_class#12, i_current_price#11, Mak (23) Exchange Input [8]: [i_item_desc#10, i_category#13, i_class#12, i_current_price#11, itemrevenue#19, _w0#20, _w1#21, i_item_id#9] -Arguments: hashpartitioning(i_class#12, 5), true, [id=#22] +Arguments: hashpartitioning(i_class#12, 5), ENSURE_REQUIREMENTS, [id=#22] (24) Sort [codegen id : 8] Input [8]: [i_item_desc#10, i_category#13, i_class#12, i_current_price#11, itemrevenue#19, _w0#20, _w1#21, i_item_id#9] @@ -150,7 +150,7 @@ Input [9]: [i_item_desc#10, i_category#13, i_class#12, i_current_price#11, itemr (27) Exchange Input [7]: [i_item_desc#10, i_category#13, i_class#12, i_current_price#11, itemrevenue#19, revenueratio#24, i_item_id#9] -Arguments: rangepartitioning(i_category#13 ASC NULLS FIRST, i_class#12 ASC NULLS FIRST, i_item_id#9 ASC NULLS FIRST, i_item_desc#10 ASC NULLS FIRST, revenueratio#24 ASC NULLS FIRST, 5), true, [id=#25] +Arguments: rangepartitioning(i_category#13 ASC NULLS FIRST, i_class#12 ASC NULLS FIRST, i_item_id#9 ASC NULLS FIRST, i_item_desc#10 ASC NULLS FIRST, revenueratio#24 ASC NULLS FIRST, 5), ENSURE_REQUIREMENTS, [id=#25] (28) Sort [codegen id : 10] Input [7]: [i_item_desc#10, i_category#13, i_class#12, i_current_price#11, itemrevenue#19, revenueratio#24, i_item_id#9] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q98/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q98/explain.txt index dd52252978b50..b73d2502234f3 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q98/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-modified/q98/explain.txt @@ -108,7 +108,7 @@ Results [6]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_pri (18) Exchange Input [6]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, sum#15] -Arguments: hashpartitioning(i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, 5), true, [id=#16] +Arguments: hashpartitioning(i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, 5), ENSURE_REQUIREMENTS, [id=#16] (19) HashAggregate [codegen id : 4] Input [6]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, sum#15] @@ -119,7 +119,7 @@ Results [8]: [i_item_desc#6, i_category#9, i_class#8, i_current_price#7, MakeDec (20) Exchange Input [8]: [i_item_desc#6, i_category#9, i_class#8, i_current_price#7, itemrevenue#18, _w0#19, _w1#20, i_item_id#5] -Arguments: hashpartitioning(i_class#8, 5), true, [id=#21] +Arguments: hashpartitioning(i_class#8, 5), ENSURE_REQUIREMENTS, [id=#21] (21) Sort [codegen id : 5] Input [8]: [i_item_desc#6, i_category#9, i_class#8, i_current_price#7, itemrevenue#18, _w0#19, _w1#20, i_item_id#5] @@ -135,7 +135,7 @@ Input [9]: [i_item_desc#6, i_category#9, i_class#8, i_current_price#7, itemreven (24) Exchange Input [7]: [i_item_desc#6, i_category#9, i_class#8, i_current_price#7, itemrevenue#18, revenueratio#23, i_item_id#5] -Arguments: rangepartitioning(i_category#9 ASC NULLS FIRST, i_class#8 ASC NULLS FIRST, i_item_id#5 ASC NULLS FIRST, i_item_desc#6 ASC NULLS FIRST, revenueratio#23 ASC NULLS FIRST, 5), true, [id=#24] +Arguments: rangepartitioning(i_category#9 ASC NULLS FIRST, i_class#8 ASC NULLS FIRST, i_item_id#5 ASC NULLS FIRST, i_item_desc#6 ASC NULLS FIRST, revenueratio#23 ASC NULLS FIRST, 5), ENSURE_REQUIREMENTS, [id=#24] (25) Sort [codegen id : 7] Input [7]: [i_item_desc#6, i_category#9, i_class#8, i_current_price#7, itemrevenue#18, revenueratio#23, i_item_id#5] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q11.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q11.sf100/explain.txt index d8dbb6d131d66..04d7910101ea7 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q11.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q11.sf100/explain.txt @@ -131,7 +131,7 @@ Input [6]: [ss_sold_date_sk#1, ss_customer_sk#2, ss_ext_discount_amt#3, ss_ext_l (10) Exchange Input [4]: [ss_customer_sk#2, ss_ext_discount_amt#3, ss_ext_list_price#4, d_year#6] -Arguments: hashpartitioning(ss_customer_sk#2, 5), true, [id=#8] +Arguments: hashpartitioning(ss_customer_sk#2, 5), ENSURE_REQUIREMENTS, [id=#8] (11) Sort [codegen id : 3] Input [4]: [ss_customer_sk#2, ss_ext_discount_amt#3, ss_ext_list_price#4, d_year#6] @@ -153,7 +153,7 @@ Condition : (isnotnull(c_customer_sk#9) AND isnotnull(c_customer_id#10)) (15) Exchange Input [8]: [c_customer_sk#9, c_customer_id#10, c_first_name#11, c_last_name#12, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16] -Arguments: hashpartitioning(c_customer_sk#9, 5), true, [id=#17] +Arguments: hashpartitioning(c_customer_sk#9, 5), ENSURE_REQUIREMENTS, [id=#17] (16) Sort [codegen id : 5] Input [8]: [c_customer_sk#9, c_customer_id#10, c_first_name#11, c_last_name#12, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16] @@ -177,7 +177,7 @@ Results [9]: [c_customer_id#10, c_first_name#11, c_last_name#12, d_year#6, c_pre (20) Exchange Input [9]: [c_customer_id#10, c_first_name#11, c_last_name#12, d_year#6, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, sum#19] -Arguments: hashpartitioning(c_customer_id#10, c_first_name#11, c_last_name#12, d_year#6, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, 5), true, [id=#20] +Arguments: hashpartitioning(c_customer_id#10, c_first_name#11, c_last_name#12, d_year#6, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, 5), ENSURE_REQUIREMENTS, [id=#20] (21) HashAggregate [codegen id : 7] Input [9]: [c_customer_id#10, c_first_name#11, c_last_name#12, d_year#6, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, sum#19] @@ -192,7 +192,7 @@ Condition : (isnotnull(year_total#23) AND (year_total#23 > 0.00)) (23) Exchange Input [2]: [customer_id#22, year_total#23] -Arguments: hashpartitioning(customer_id#22, 5), true, [id=#24] +Arguments: hashpartitioning(customer_id#22, 5), ENSURE_REQUIREMENTS, [id=#24] (24) Sort [codegen id : 8] Input [2]: [customer_id#22, year_total#23] @@ -241,7 +241,7 @@ Input [6]: [ss_sold_date_sk#1, ss_customer_sk#2, ss_ext_discount_amt#3, ss_ext_l (34) Exchange Input [4]: [ss_customer_sk#2, ss_ext_discount_amt#3, ss_ext_list_price#4, d_year#6] -Arguments: hashpartitioning(ss_customer_sk#2, 5), true, [id=#26] +Arguments: hashpartitioning(ss_customer_sk#2, 5), ENSURE_REQUIREMENTS, [id=#26] (35) Sort [codegen id : 11] Input [4]: [ss_customer_sk#2, ss_ext_discount_amt#3, ss_ext_list_price#4, d_year#6] @@ -272,7 +272,7 @@ Results [9]: [c_customer_id#10, c_first_name#11, c_last_name#12, d_year#6, c_pre (41) Exchange Input [9]: [c_customer_id#10, c_first_name#11, c_last_name#12, d_year#6, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, sum#28] -Arguments: hashpartitioning(c_customer_id#10, c_first_name#11, c_last_name#12, d_year#6, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, 5), true, [id=#29] +Arguments: hashpartitioning(c_customer_id#10, c_first_name#11, c_last_name#12, d_year#6, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, 5), ENSURE_REQUIREMENTS, [id=#29] (42) HashAggregate [codegen id : 15] Input [9]: [c_customer_id#10, c_first_name#11, c_last_name#12, d_year#6, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, sum#28] @@ -283,7 +283,7 @@ Results [3]: [c_customer_id#10 AS customer_id#31, c_preferred_cust_flag#13 AS cu (43) Exchange Input [3]: [customer_id#31, customer_preferred_cust_flag#32, year_total#33] -Arguments: hashpartitioning(customer_id#31, 5), true, [id=#34] +Arguments: hashpartitioning(customer_id#31, 5), ENSURE_REQUIREMENTS, [id=#34] (44) Sort [codegen id : 16] Input [3]: [customer_id#31, customer_preferred_cust_flag#32, year_total#33] @@ -326,7 +326,7 @@ Input [6]: [ws_sold_date_sk#35, ws_bill_customer_sk#36, ws_ext_discount_amt#37, (53) Exchange Input [4]: [ws_bill_customer_sk#36, ws_ext_discount_amt#37, ws_ext_list_price#38, d_year#6] -Arguments: hashpartitioning(ws_bill_customer_sk#36, 5), true, [id=#39] +Arguments: hashpartitioning(ws_bill_customer_sk#36, 5), ENSURE_REQUIREMENTS, [id=#39] (54) Sort [codegen id : 20] Input [4]: [ws_bill_customer_sk#36, ws_ext_discount_amt#37, ws_ext_list_price#38, d_year#6] @@ -357,7 +357,7 @@ Results [9]: [c_customer_id#10, c_first_name#11, c_last_name#12, c_preferred_cus (60) Exchange Input [9]: [c_customer_id#10, c_first_name#11, c_last_name#12, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, d_year#6, sum#41] -Arguments: hashpartitioning(c_customer_id#10, c_first_name#11, c_last_name#12, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, d_year#6, 5), true, [id=#42] +Arguments: hashpartitioning(c_customer_id#10, c_first_name#11, c_last_name#12, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, d_year#6, 5), ENSURE_REQUIREMENTS, [id=#42] (61) HashAggregate [codegen id : 24] Input [9]: [c_customer_id#10, c_first_name#11, c_last_name#12, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, d_year#6, sum#41] @@ -376,7 +376,7 @@ Input [2]: [customer_id#44, year_total#45] (64) Exchange Input [2]: [customer_id#46, year_total#47] -Arguments: hashpartitioning(customer_id#46, 5), true, [id=#48] +Arguments: hashpartitioning(customer_id#46, 5), ENSURE_REQUIREMENTS, [id=#48] (65) Sort [codegen id : 25] Input [2]: [customer_id#46, year_total#47] @@ -419,7 +419,7 @@ Input [6]: [ws_sold_date_sk#35, ws_bill_customer_sk#36, ws_ext_discount_amt#37, (74) Exchange Input [4]: [ws_bill_customer_sk#36, ws_ext_discount_amt#37, ws_ext_list_price#38, d_year#6] -Arguments: hashpartitioning(ws_bill_customer_sk#36, 5), true, [id=#49] +Arguments: hashpartitioning(ws_bill_customer_sk#36, 5), ENSURE_REQUIREMENTS, [id=#49] (75) Sort [codegen id : 29] Input [4]: [ws_bill_customer_sk#36, ws_ext_discount_amt#37, ws_ext_list_price#38, d_year#6] @@ -450,7 +450,7 @@ Results [9]: [c_customer_id#10, c_first_name#11, c_last_name#12, c_preferred_cus (81) Exchange Input [9]: [c_customer_id#10, c_first_name#11, c_last_name#12, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, d_year#6, sum#51] -Arguments: hashpartitioning(c_customer_id#10, c_first_name#11, c_last_name#12, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, d_year#6, 5), true, [id=#52] +Arguments: hashpartitioning(c_customer_id#10, c_first_name#11, c_last_name#12, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, d_year#6, 5), ENSURE_REQUIREMENTS, [id=#52] (82) HashAggregate [codegen id : 33] Input [9]: [c_customer_id#10, c_first_name#11, c_last_name#12, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, d_year#6, sum#51] @@ -461,7 +461,7 @@ Results [2]: [c_customer_id#10 AS customer_id#54, MakeDecimal(sum(UnscaledValue( (83) Exchange Input [2]: [customer_id#54, year_total#55] -Arguments: hashpartitioning(customer_id#54, 5), true, [id=#56] +Arguments: hashpartitioning(customer_id#54, 5), ENSURE_REQUIREMENTS, [id=#56] (84) Sort [codegen id : 34] Input [2]: [customer_id#54, year_total#55] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q11/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q11/explain.txt index 246a5d5b0b586..61afda5c01b40 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q11/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q11/explain.txt @@ -151,7 +151,7 @@ Results [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#15, c_prefe (17) Exchange Input [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#15, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, sum#18] -Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, d_year#15, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, 5), true, [id=#19] +Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, d_year#15, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, 5), ENSURE_REQUIREMENTS, [id=#19] (18) HashAggregate [codegen id : 16] Input [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#15, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, sum#18] @@ -226,7 +226,7 @@ Results [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#15, c_prefe (33) Exchange Input [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#15, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, sum#25] -Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, d_year#15, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, 5), true, [id=#26] +Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, d_year#15, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, 5), ENSURE_REQUIREMENTS, [id=#26] (34) HashAggregate [codegen id : 7] Input [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#15, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, sum#25] @@ -310,7 +310,7 @@ Results [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_f (51) Exchange Input [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#15, sum#38] -Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#15, 5), true, [id=#39] +Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#15, 5), ENSURE_REQUIREMENTS, [id=#39] (52) HashAggregate [codegen id : 11] Input [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#15, sum#38] @@ -387,7 +387,7 @@ Results [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_f (68) Exchange Input [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#15, sum#47] -Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#15, 5), true, [id=#48] +Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#15, 5), ENSURE_REQUIREMENTS, [id=#48] (69) HashAggregate [codegen id : 15] Input [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#15, sum#47] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q12.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q12.sf100/explain.txt index b4dd8173664b6..36704d3e67ca7 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q12.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q12.sf100/explain.txt @@ -75,7 +75,7 @@ Input [4]: [ws_sold_date_sk#1, ws_item_sk#2, ws_ext_sales_price#3, d_date_sk#4] (11) Exchange Input [2]: [ws_item_sk#2, ws_ext_sales_price#3] -Arguments: hashpartitioning(ws_item_sk#2, 5), true, [id=#7] +Arguments: hashpartitioning(ws_item_sk#2, 5), ENSURE_REQUIREMENTS, [id=#7] (12) Sort [codegen id : 3] Input [2]: [ws_item_sk#2, ws_ext_sales_price#3] @@ -97,7 +97,7 @@ Condition : (i_category#13 IN (Sports,Books,Home) AND isnotnull(i_item_sk#8)) (16) Exchange Input [6]: [i_item_sk#8, i_item_id#9, i_item_desc#10, i_current_price#11, i_class#12, i_category#13] -Arguments: hashpartitioning(i_item_sk#8, 5), true, [id=#14] +Arguments: hashpartitioning(i_item_sk#8, 5), ENSURE_REQUIREMENTS, [id=#14] (17) Sort [codegen id : 5] Input [6]: [i_item_sk#8, i_item_id#9, i_item_desc#10, i_current_price#11, i_class#12, i_category#13] @@ -121,7 +121,7 @@ Results [6]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_ (21) Exchange Input [6]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, sum#16] -Arguments: hashpartitioning(i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, 5), true, [id=#17] +Arguments: hashpartitioning(i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, 5), ENSURE_REQUIREMENTS, [id=#17] (22) HashAggregate [codegen id : 7] Input [6]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, sum#16] @@ -132,7 +132,7 @@ Results [8]: [i_item_desc#10, i_category#13, i_class#12, i_current_price#11, Mak (23) Exchange Input [8]: [i_item_desc#10, i_category#13, i_class#12, i_current_price#11, itemrevenue#19, _w0#20, _w1#21, i_item_id#9] -Arguments: hashpartitioning(i_class#12, 5), true, [id=#22] +Arguments: hashpartitioning(i_class#12, 5), ENSURE_REQUIREMENTS, [id=#22] (24) Sort [codegen id : 8] Input [8]: [i_item_desc#10, i_category#13, i_class#12, i_current_price#11, itemrevenue#19, _w0#20, _w1#21, i_item_id#9] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q12/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q12/explain.txt index f786839e83e9c..014f5253b6fed 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q12/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q12/explain.txt @@ -106,7 +106,7 @@ Results [6]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_pri (18) Exchange Input [6]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, sum#15] -Arguments: hashpartitioning(i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, 5), true, [id=#16] +Arguments: hashpartitioning(i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, 5), ENSURE_REQUIREMENTS, [id=#16] (19) HashAggregate [codegen id : 4] Input [6]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, sum#15] @@ -117,7 +117,7 @@ Results [8]: [i_item_desc#6, i_category#9, i_class#8, i_current_price#7, MakeDec (20) Exchange Input [8]: [i_item_desc#6, i_category#9, i_class#8, i_current_price#7, itemrevenue#18, _w0#19, _w1#20, i_item_id#5] -Arguments: hashpartitioning(i_class#8, 5), true, [id=#21] +Arguments: hashpartitioning(i_class#8, 5), ENSURE_REQUIREMENTS, [id=#21] (21) Sort [codegen id : 5] Input [8]: [i_item_desc#6, i_category#9, i_class#8, i_current_price#7, itemrevenue#18, _w0#19, _w1#20, i_item_id#5] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q13.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q13.sf100/explain.txt index 327e7db702faa..027620b31e138 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q13.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q13.sf100/explain.txt @@ -199,7 +199,7 @@ Input [5]: [ss_store_sk#5, ss_quantity#6, ss_ext_sales_price#8, ss_ext_wholesale (36) HashAggregate [codegen id : 6] Input [3]: [ss_quantity#6, ss_ext_sales_price#8, ss_ext_wholesale_cost#9] Keys: [] -Functions [4]: [partial_avg(cast(ss_quantity#6 as bigint)), partial_avg(UnscaledValue(ss_ext_sales_price#8)), partial_avg(UnscaledValue(ss_ext_wholesale_cost#9)), partial_sum(UnscaledValue(ss_ext_wholesale_cost#9))] +Functions [4]: [partial_avg(ss_quantity#6), partial_avg(UnscaledValue(ss_ext_sales_price#8)), partial_avg(UnscaledValue(ss_ext_wholesale_cost#9)), partial_sum(UnscaledValue(ss_ext_wholesale_cost#9))] Aggregate Attributes [7]: [sum#27, count#28, sum#29, count#30, sum#31, count#32, sum#33] Results [7]: [sum#34, count#35, sum#36, count#37, sum#38, count#39, sum#40] @@ -210,7 +210,7 @@ Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#41] (38) HashAggregate [codegen id : 7] Input [7]: [sum#34, count#35, sum#36, count#37, sum#38, count#39, sum#40] Keys: [] -Functions [4]: [avg(cast(ss_quantity#6 as bigint)), avg(UnscaledValue(ss_ext_sales_price#8)), avg(UnscaledValue(ss_ext_wholesale_cost#9)), sum(UnscaledValue(ss_ext_wholesale_cost#9))] -Aggregate Attributes [4]: [avg(cast(ss_quantity#6 as bigint))#42, avg(UnscaledValue(ss_ext_sales_price#8))#43, avg(UnscaledValue(ss_ext_wholesale_cost#9))#44, sum(UnscaledValue(ss_ext_wholesale_cost#9))#45] -Results [4]: [avg(cast(ss_quantity#6 as bigint))#42 AS avg(ss_quantity)#46, cast((avg(UnscaledValue(ss_ext_sales_price#8))#43 / 100.0) as decimal(11,6)) AS avg(ss_ext_sales_price)#47, cast((avg(UnscaledValue(ss_ext_wholesale_cost#9))#44 / 100.0) as decimal(11,6)) AS avg(ss_ext_wholesale_cost)#48, MakeDecimal(sum(UnscaledValue(ss_ext_wholesale_cost#9))#45,17,2) AS sum(ss_ext_wholesale_cost)#49] +Functions [4]: [avg(ss_quantity#6), avg(UnscaledValue(ss_ext_sales_price#8)), avg(UnscaledValue(ss_ext_wholesale_cost#9)), sum(UnscaledValue(ss_ext_wholesale_cost#9))] +Aggregate Attributes [4]: [avg(ss_quantity#6)#42, avg(UnscaledValue(ss_ext_sales_price#8))#43, avg(UnscaledValue(ss_ext_wholesale_cost#9))#44, sum(UnscaledValue(ss_ext_wholesale_cost#9))#45] +Results [4]: [avg(ss_quantity#6)#42 AS avg(ss_quantity)#46, cast((avg(UnscaledValue(ss_ext_sales_price#8))#43 / 100.0) as decimal(11,6)) AS avg(ss_ext_sales_price)#47, cast((avg(UnscaledValue(ss_ext_wholesale_cost#9))#44 / 100.0) as decimal(11,6)) AS avg(ss_ext_wholesale_cost)#48, MakeDecimal(sum(UnscaledValue(ss_ext_wholesale_cost#9))#45,17,2) AS sum(ss_ext_wholesale_cost)#49] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q13.sf100/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q13.sf100/simplified.txt index 45d6c8f3b0bae..6bb7028c6d795 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q13.sf100/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q13.sf100/simplified.txt @@ -1,5 +1,5 @@ WholeStageCodegen (7) - HashAggregate [sum,count,sum,count,sum,count,sum] [avg(cast(ss_quantity as bigint)),avg(UnscaledValue(ss_ext_sales_price)),avg(UnscaledValue(ss_ext_wholesale_cost)),sum(UnscaledValue(ss_ext_wholesale_cost)),avg(ss_quantity),avg(ss_ext_sales_price),avg(ss_ext_wholesale_cost),sum(ss_ext_wholesale_cost),sum,count,sum,count,sum,count,sum] + HashAggregate [sum,count,sum,count,sum,count,sum] [avg(ss_quantity),avg(UnscaledValue(ss_ext_sales_price)),avg(UnscaledValue(ss_ext_wholesale_cost)),sum(UnscaledValue(ss_ext_wholesale_cost)),avg(ss_quantity),avg(ss_ext_sales_price),avg(ss_ext_wholesale_cost),sum(ss_ext_wholesale_cost),sum,count,sum,count,sum,count,sum] InputAdapter Exchange #1 WholeStageCodegen (6) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q13/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q13/explain.txt index d0c4e0e4934e5..7e846d3e920df 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q13/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q13/explain.txt @@ -199,18 +199,18 @@ Input [9]: [ss_hdemo_sk#3, ss_quantity#6, ss_sales_price#7, ss_ext_sales_price#8 (36) HashAggregate [codegen id : 6] Input [3]: [ss_quantity#6, ss_ext_sales_price#8, ss_ext_wholesale_cost#9] Keys: [] -Functions [4]: [partial_avg(cast(ss_quantity#6 as bigint)), partial_avg(UnscaledValue(ss_ext_sales_price#8)), partial_avg(UnscaledValue(ss_ext_wholesale_cost#9)), partial_sum(UnscaledValue(ss_ext_wholesale_cost#9))] +Functions [4]: [partial_avg(ss_quantity#6), partial_avg(UnscaledValue(ss_ext_sales_price#8)), partial_avg(UnscaledValue(ss_ext_wholesale_cost#9)), partial_sum(UnscaledValue(ss_ext_wholesale_cost#9))] Aggregate Attributes [7]: [sum#27, count#28, sum#29, count#30, sum#31, count#32, sum#33] Results [7]: [sum#34, count#35, sum#36, count#37, sum#38, count#39, sum#40] (37) Exchange Input [7]: [sum#34, count#35, sum#36, count#37, sum#38, count#39, sum#40] -Arguments: SinglePartition, true, [id=#41] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#41] (38) HashAggregate [codegen id : 7] Input [7]: [sum#34, count#35, sum#36, count#37, sum#38, count#39, sum#40] Keys: [] -Functions [4]: [avg(cast(ss_quantity#6 as bigint)), avg(UnscaledValue(ss_ext_sales_price#8)), avg(UnscaledValue(ss_ext_wholesale_cost#9)), sum(UnscaledValue(ss_ext_wholesale_cost#9))] -Aggregate Attributes [4]: [avg(cast(ss_quantity#6 as bigint))#42, avg(UnscaledValue(ss_ext_sales_price#8))#43, avg(UnscaledValue(ss_ext_wholesale_cost#9))#44, sum(UnscaledValue(ss_ext_wholesale_cost#9))#45] -Results [4]: [avg(cast(ss_quantity#6 as bigint))#42 AS avg(ss_quantity)#46, cast((avg(UnscaledValue(ss_ext_sales_price#8))#43 / 100.0) as decimal(11,6)) AS avg(ss_ext_sales_price)#47, cast((avg(UnscaledValue(ss_ext_wholesale_cost#9))#44 / 100.0) as decimal(11,6)) AS avg(ss_ext_wholesale_cost)#48, MakeDecimal(sum(UnscaledValue(ss_ext_wholesale_cost#9))#45,17,2) AS sum(ss_ext_wholesale_cost)#49] +Functions [4]: [avg(ss_quantity#6), avg(UnscaledValue(ss_ext_sales_price#8)), avg(UnscaledValue(ss_ext_wholesale_cost#9)), sum(UnscaledValue(ss_ext_wholesale_cost#9))] +Aggregate Attributes [4]: [avg(ss_quantity#6)#42, avg(UnscaledValue(ss_ext_sales_price#8))#43, avg(UnscaledValue(ss_ext_wholesale_cost#9))#44, sum(UnscaledValue(ss_ext_wholesale_cost#9))#45] +Results [4]: [avg(ss_quantity#6)#42 AS avg(ss_quantity)#46, cast((avg(UnscaledValue(ss_ext_sales_price#8))#43 / 100.0) as decimal(11,6)) AS avg(ss_ext_sales_price)#47, cast((avg(UnscaledValue(ss_ext_wholesale_cost#9))#44 / 100.0) as decimal(11,6)) AS avg(ss_ext_wholesale_cost)#48, MakeDecimal(sum(UnscaledValue(ss_ext_wholesale_cost#9))#45,17,2) AS sum(ss_ext_wholesale_cost)#49] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q13/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q13/simplified.txt index 6e3a322d86765..af6f236ebc3c8 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q13/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q13/simplified.txt @@ -1,5 +1,5 @@ WholeStageCodegen (7) - HashAggregate [sum,count,sum,count,sum,count,sum] [avg(cast(ss_quantity as bigint)),avg(UnscaledValue(ss_ext_sales_price)),avg(UnscaledValue(ss_ext_wholesale_cost)),sum(UnscaledValue(ss_ext_wholesale_cost)),avg(ss_quantity),avg(ss_ext_sales_price),avg(ss_ext_wholesale_cost),sum(ss_ext_wholesale_cost),sum,count,sum,count,sum,count,sum] + HashAggregate [sum,count,sum,count,sum,count,sum] [avg(ss_quantity),avg(UnscaledValue(ss_ext_sales_price)),avg(UnscaledValue(ss_ext_wholesale_cost)),sum(UnscaledValue(ss_ext_wholesale_cost)),avg(ss_quantity),avg(ss_ext_sales_price),avg(ss_ext_wholesale_cost),sum(ss_ext_wholesale_cost),sum,count,sum,count,sum,count,sum] InputAdapter Exchange #1 WholeStageCodegen (6) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q14a/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q14a/explain.txt index 3f0cc9e7acb1e..e9d3d4a18b5ff 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q14a/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q14a/explain.txt @@ -334,7 +334,7 @@ Results [3]: [brand_id#13, class_id#14, category_id#15] (49) Exchange Input [3]: [brand_id#13, class_id#14, category_id#15] -Arguments: hashpartitioning(brand_id#13, class_id#14, category_id#15, 5), true, [id=#23] +Arguments: hashpartitioning(brand_id#13, class_id#14, category_id#15, 5), ENSURE_REQUIREMENTS, [id=#23] (50) HashAggregate [codegen id : 10] Input [3]: [brand_id#13, class_id#14, category_id#15] @@ -454,7 +454,7 @@ Results [6]: [i_brand_id#6, i_class_id#7, i_category_id#8, sum#33, isEmpty#34, c (74) Exchange Input [6]: [i_brand_id#6, i_class_id#7, i_category_id#8, sum#33, isEmpty#34, count#35] -Arguments: hashpartitioning(i_brand_id#6, i_class_id#7, i_category_id#8, 5), true, [id=#36] +Arguments: hashpartitioning(i_brand_id#6, i_class_id#7, i_category_id#8, 5), ENSURE_REQUIREMENTS, [id=#36] (75) HashAggregate [codegen id : 26] Input [6]: [i_brand_id#6, i_class_id#7, i_category_id#8, sum#33, isEmpty#34, count#35] @@ -526,7 +526,7 @@ Results [6]: [i_brand_id#6, i_class_id#7, i_category_id#8, sum#50, isEmpty#51, c (90) Exchange Input [6]: [i_brand_id#6, i_class_id#7, i_category_id#8, sum#50, isEmpty#51, count#52] -Arguments: hashpartitioning(i_brand_id#6, i_class_id#7, i_category_id#8, 5), true, [id=#53] +Arguments: hashpartitioning(i_brand_id#6, i_class_id#7, i_category_id#8, 5), ENSURE_REQUIREMENTS, [id=#53] (91) HashAggregate [codegen id : 52] Input [6]: [i_brand_id#6, i_class_id#7, i_category_id#8, sum#50, isEmpty#51, count#52] @@ -598,7 +598,7 @@ Results [6]: [i_brand_id#6, i_class_id#7, i_category_id#8, sum#65, isEmpty#66, c (106) Exchange Input [6]: [i_brand_id#6, i_class_id#7, i_category_id#8, sum#65, isEmpty#66, count#67] -Arguments: hashpartitioning(i_brand_id#6, i_class_id#7, i_category_id#8, 5), true, [id=#68] +Arguments: hashpartitioning(i_brand_id#6, i_class_id#7, i_category_id#8, 5), ENSURE_REQUIREMENTS, [id=#68] (107) HashAggregate [codegen id : 78] Input [6]: [i_brand_id#6, i_class_id#7, i_category_id#8, sum#65, isEmpty#66, count#67] @@ -630,7 +630,7 @@ Results [8]: [channel#75, i_brand_id#76, i_class_id#77, i_category_id#78, spark_ (113) Exchange Input [8]: [channel#75, i_brand_id#76, i_class_id#77, i_category_id#78, spark_grouping_id#79, sum#83, isEmpty#84, sum#85] -Arguments: hashpartitioning(channel#75, i_brand_id#76, i_class_id#77, i_category_id#78, spark_grouping_id#79, 5), true, [id=#86] +Arguments: hashpartitioning(channel#75, i_brand_id#76, i_class_id#77, i_category_id#78, spark_grouping_id#79, 5), ENSURE_REQUIREMENTS, [id=#86] (114) HashAggregate [codegen id : 80] Input [8]: [channel#75, i_brand_id#76, i_class_id#77, i_category_id#78, spark_grouping_id#79, sum#83, isEmpty#84, sum#85] @@ -782,7 +782,7 @@ Results [2]: [sum#100, count#101] (140) Exchange Input [2]: [sum#100, count#101] -Arguments: SinglePartition, true, [id=#102] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#102] (141) HashAggregate [codegen id : 8] Input [2]: [sum#100, count#101] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q14b/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q14b/explain.txt index 1f31ded51f1ef..69b61214b46ab 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q14b/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q14b/explain.txt @@ -319,7 +319,7 @@ Results [3]: [brand_id#13, class_id#14, category_id#15] (49) Exchange Input [3]: [brand_id#13, class_id#14, category_id#15] -Arguments: hashpartitioning(brand_id#13, class_id#14, category_id#15, 5), true, [id=#23] +Arguments: hashpartitioning(brand_id#13, class_id#14, category_id#15, 5), ENSURE_REQUIREMENTS, [id=#23] (50) HashAggregate [codegen id : 10] Input [3]: [brand_id#13, class_id#14, category_id#15] @@ -439,7 +439,7 @@ Results [6]: [i_brand_id#6, i_class_id#7, i_category_id#8, sum#35, isEmpty#36, c (74) Exchange Input [6]: [i_brand_id#6, i_class_id#7, i_category_id#8, sum#35, isEmpty#36, count#37] -Arguments: hashpartitioning(i_brand_id#6, i_class_id#7, i_category_id#8, 5), true, [id=#38] +Arguments: hashpartitioning(i_brand_id#6, i_class_id#7, i_category_id#8, 5), ENSURE_REQUIREMENTS, [id=#38] (75) HashAggregate [codegen id : 52] Input [6]: [i_brand_id#6, i_class_id#7, i_category_id#8, sum#35, isEmpty#36, count#37] @@ -530,7 +530,7 @@ Results [6]: [i_brand_id#48, i_class_id#49, i_category_id#50, sum#57, isEmpty#58 (94) Exchange Input [6]: [i_brand_id#48, i_class_id#49, i_category_id#50, sum#57, isEmpty#58, count#59] -Arguments: hashpartitioning(i_brand_id#48, i_class_id#49, i_category_id#50, 5), true, [id=#60] +Arguments: hashpartitioning(i_brand_id#48, i_class_id#49, i_category_id#50, 5), ENSURE_REQUIREMENTS, [id=#60] (95) HashAggregate [codegen id : 51] Input [6]: [i_brand_id#48, i_class_id#49, i_category_id#50, sum#57, isEmpty#58, count#59] @@ -699,7 +699,7 @@ Results [2]: [sum#81, count#82] (125) Exchange Input [2]: [sum#81, count#82] -Arguments: SinglePartition, true, [id=#83] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#83] (126) HashAggregate [codegen id : 8] Input [2]: [sum#81, count#82] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q15.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q15.sf100/explain.txt index 5aa95486f8209..c2eaa9c20562f 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q15.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q15.sf100/explain.txt @@ -80,7 +80,7 @@ Input [4]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_sales_price#3, d_date_s (11) Exchange Input [2]: [cs_bill_customer_sk#2, cs_sales_price#3] -Arguments: hashpartitioning(cs_bill_customer_sk#2, 5), true, [id=#8] +Arguments: hashpartitioning(cs_bill_customer_sk#2, 5), ENSURE_REQUIREMENTS, [id=#8] (12) Sort [codegen id : 3] Input [2]: [cs_bill_customer_sk#2, cs_sales_price#3] @@ -102,7 +102,7 @@ Condition : (isnotnull(c_customer_sk#9) AND isnotnull(c_current_addr_sk#10)) (16) Exchange Input [2]: [c_customer_sk#9, c_current_addr_sk#10] -Arguments: hashpartitioning(c_current_addr_sk#10, 5), true, [id=#11] +Arguments: hashpartitioning(c_current_addr_sk#10, 5), ENSURE_REQUIREMENTS, [id=#11] (17) Sort [codegen id : 5] Input [2]: [c_customer_sk#9, c_current_addr_sk#10] @@ -124,7 +124,7 @@ Condition : isnotnull(ca_address_sk#12) (21) Exchange Input [3]: [ca_address_sk#12, ca_state#13, ca_zip#14] -Arguments: hashpartitioning(ca_address_sk#12, 5), true, [id=#15] +Arguments: hashpartitioning(ca_address_sk#12, 5), ENSURE_REQUIREMENTS, [id=#15] (22) Sort [codegen id : 7] Input [3]: [ca_address_sk#12, ca_state#13, ca_zip#14] @@ -141,7 +141,7 @@ Input [5]: [c_customer_sk#9, c_current_addr_sk#10, ca_address_sk#12, ca_state#13 (25) Exchange Input [3]: [c_customer_sk#9, ca_state#13, ca_zip#14] -Arguments: hashpartitioning(c_customer_sk#9, 5), true, [id=#16] +Arguments: hashpartitioning(c_customer_sk#9, 5), ENSURE_REQUIREMENTS, [id=#16] (26) Sort [codegen id : 9] Input [3]: [c_customer_sk#9, ca_state#13, ca_zip#14] @@ -165,7 +165,7 @@ Results [2]: [ca_zip#14, sum#18] (30) Exchange Input [2]: [ca_zip#14, sum#18] -Arguments: hashpartitioning(ca_zip#14, 5), true, [id=#19] +Arguments: hashpartitioning(ca_zip#14, 5), ENSURE_REQUIREMENTS, [id=#19] (31) HashAggregate [codegen id : 11] Input [2]: [ca_zip#14, sum#18] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q15/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q15/explain.txt index 4dc0abf9a5484..d468b8a59bb44 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q15/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q15/explain.txt @@ -135,7 +135,7 @@ Results [2]: [ca_zip#9, sum#16] (24) Exchange Input [2]: [ca_zip#9, sum#16] -Arguments: hashpartitioning(ca_zip#9, 5), true, [id=#17] +Arguments: hashpartitioning(ca_zip#9, 5), ENSURE_REQUIREMENTS, [id=#17] (25) HashAggregate [codegen id : 5] Input [2]: [ca_zip#9, sum#16] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q16.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q16.sf100/explain.txt index a446163e3d29d..1dbc84b446fe3 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q16.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q16.sf100/explain.txt @@ -61,7 +61,7 @@ Condition : ((isnotnull(cs_ship_date_sk#1) AND isnotnull(cs_ship_addr_sk#2)) AND (4) Exchange Input [7]: [cs_ship_date_sk#1, cs_ship_addr_sk#2, cs_call_center_sk#3, cs_warehouse_sk#4, cs_order_number#5, cs_ext_ship_cost#6, cs_net_profit#7] -Arguments: hashpartitioning(cs_order_number#5, 5), true, [id=#8] +Arguments: hashpartitioning(cs_order_number#5, 5), ENSURE_REQUIREMENTS, [id=#8] (5) Sort [codegen id : 2] Input [7]: [cs_ship_date_sk#1, cs_ship_addr_sk#2, cs_call_center_sk#3, cs_warehouse_sk#4, cs_order_number#5, cs_ext_ship_cost#6, cs_net_profit#7] @@ -82,7 +82,7 @@ Input [2]: [cs_warehouse_sk#4, cs_order_number#5] (9) Exchange Input [2]: [cs_warehouse_sk#4#9, cs_order_number#5#10] -Arguments: hashpartitioning(cs_order_number#5#10, 5), true, [id=#11] +Arguments: hashpartitioning(cs_order_number#5#10, 5), ENSURE_REQUIREMENTS, [id=#11] (10) Sort [codegen id : 4] Input [2]: [cs_warehouse_sk#4#9, cs_order_number#5#10] @@ -108,7 +108,7 @@ Input [1]: [cr_order_number#12] (15) Exchange Input [1]: [cr_order_number#12] -Arguments: hashpartitioning(cr_order_number#12, 5), true, [id=#13] +Arguments: hashpartitioning(cr_order_number#12, 5), ENSURE_REQUIREMENTS, [id=#13] (16) Sort [codegen id : 7] Input [1]: [cr_order_number#12] @@ -235,7 +235,7 @@ Results [3]: [sum#25, sum#26, count#28] (42) Exchange Input [3]: [sum#25, sum#26, count#28] -Arguments: SinglePartition, true, [id=#29] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#29] (43) HashAggregate [codegen id : 12] Input [3]: [sum#25, sum#26, count#28] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q16/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q16/explain.txt index ea7e298393e4c..93d57048d10d5 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q16/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q16/explain.txt @@ -202,7 +202,7 @@ Results [3]: [cs_order_number#5, sum#24, sum#25] (36) Exchange Input [3]: [cs_order_number#5, sum#24, sum#25] -Arguments: hashpartitioning(cs_order_number#5, 5), true, [id=#26] +Arguments: hashpartitioning(cs_order_number#5, 5), ENSURE_REQUIREMENTS, [id=#26] (37) HashAggregate [codegen id : 7] Input [3]: [cs_order_number#5, sum#24, sum#25] @@ -220,7 +220,7 @@ Results [3]: [sum#24, sum#25, count#28] (39) Exchange Input [3]: [sum#24, sum#25, count#28] -Arguments: SinglePartition, true, [id=#29] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#29] (40) HashAggregate [codegen id : 8] Input [3]: [sum#24, sum#25, count#28] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q17.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q17.sf100/explain.txt index a9ab8c3690a00..a672ba8729bba 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q17.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q17.sf100/explain.txt @@ -293,7 +293,7 @@ Input [12]: [ss_item_sk#2, ss_customer_sk#3, ss_ticket_number#5, ss_quantity#6, (54) HashAggregate [codegen id : 17] Input [6]: [ss_quantity#6, sr_return_quantity#23, cs_quantity#31, s_state#11, i_item_id#15, i_item_desc#16] Keys [3]: [i_item_id#15, i_item_desc#16, s_state#11] -Functions [9]: [partial_count(ss_quantity#6), partial_avg(cast(ss_quantity#6 as bigint)), partial_stddev_samp(cast(ss_quantity#6 as double)), partial_count(sr_return_quantity#23), partial_avg(cast(sr_return_quantity#23 as bigint)), partial_stddev_samp(cast(sr_return_quantity#23 as double)), partial_count(cs_quantity#31), partial_avg(cast(cs_quantity#31 as bigint)), partial_stddev_samp(cast(cs_quantity#31 as double))] +Functions [9]: [partial_count(ss_quantity#6), partial_avg(ss_quantity#6), partial_stddev_samp(cast(ss_quantity#6 as double)), partial_count(sr_return_quantity#23), partial_avg(sr_return_quantity#23), partial_stddev_samp(cast(sr_return_quantity#23 as double)), partial_count(cs_quantity#31), partial_avg(cs_quantity#31), partial_stddev_samp(cast(cs_quantity#31 as double))] Aggregate Attributes [18]: [count#35, sum#36, count#37, n#38, avg#39, m2#40, count#41, sum#42, count#43, n#44, avg#45, m2#46, count#47, sum#48, count#49, n#50, avg#51, m2#52] Results [21]: [i_item_id#15, i_item_desc#16, s_state#11, count#53, sum#54, count#55, n#56, avg#57, m2#58, count#59, sum#60, count#61, n#62, avg#63, m2#64, count#65, sum#66, count#67, n#68, avg#69, m2#70] @@ -304,9 +304,9 @@ Arguments: hashpartitioning(i_item_id#15, i_item_desc#16, s_state#11, 5), ENSURE (56) HashAggregate [codegen id : 18] Input [21]: [i_item_id#15, i_item_desc#16, s_state#11, count#53, sum#54, count#55, n#56, avg#57, m2#58, count#59, sum#60, count#61, n#62, avg#63, m2#64, count#65, sum#66, count#67, n#68, avg#69, m2#70] Keys [3]: [i_item_id#15, i_item_desc#16, s_state#11] -Functions [9]: [count(ss_quantity#6), avg(cast(ss_quantity#6 as bigint)), stddev_samp(cast(ss_quantity#6 as double)), count(sr_return_quantity#23), avg(cast(sr_return_quantity#23 as bigint)), stddev_samp(cast(sr_return_quantity#23 as double)), count(cs_quantity#31), avg(cast(cs_quantity#31 as bigint)), stddev_samp(cast(cs_quantity#31 as double))] -Aggregate Attributes [9]: [count(ss_quantity#6)#72, avg(cast(ss_quantity#6 as bigint))#73, stddev_samp(cast(ss_quantity#6 as double))#74, count(sr_return_quantity#23)#75, avg(cast(sr_return_quantity#23 as bigint))#76, stddev_samp(cast(sr_return_quantity#23 as double))#77, count(cs_quantity#31)#78, avg(cast(cs_quantity#31 as bigint))#79, stddev_samp(cast(cs_quantity#31 as double))#80] -Results [15]: [i_item_id#15, i_item_desc#16, s_state#11, count(ss_quantity#6)#72 AS store_sales_quantitycount#81, avg(cast(ss_quantity#6 as bigint))#73 AS store_sales_quantityave#82, stddev_samp(cast(ss_quantity#6 as double))#74 AS store_sales_quantitystdev#83, (stddev_samp(cast(ss_quantity#6 as double))#74 / avg(cast(ss_quantity#6 as bigint))#73) AS store_sales_quantitycov#84, count(sr_return_quantity#23)#75 AS as_store_returns_quantitycount#85, avg(cast(sr_return_quantity#23 as bigint))#76 AS as_store_returns_quantityave#86, stddev_samp(cast(sr_return_quantity#23 as double))#77 AS as_store_returns_quantitystdev#87, (stddev_samp(cast(sr_return_quantity#23 as double))#77 / avg(cast(sr_return_quantity#23 as bigint))#76) AS store_returns_quantitycov#88, count(cs_quantity#31)#78 AS catalog_sales_quantitycount#89, avg(cast(cs_quantity#31 as bigint))#79 AS catalog_sales_quantityave#90, (stddev_samp(cast(cs_quantity#31 as double))#80 / avg(cast(cs_quantity#31 as bigint))#79) AS catalog_sales_quantitystdev#91, (stddev_samp(cast(cs_quantity#31 as double))#80 / avg(cast(cs_quantity#31 as bigint))#79) AS catalog_sales_quantitycov#92] +Functions [9]: [count(ss_quantity#6), avg(ss_quantity#6), stddev_samp(cast(ss_quantity#6 as double)), count(sr_return_quantity#23), avg(sr_return_quantity#23), stddev_samp(cast(sr_return_quantity#23 as double)), count(cs_quantity#31), avg(cs_quantity#31), stddev_samp(cast(cs_quantity#31 as double))] +Aggregate Attributes [9]: [count(ss_quantity#6)#72, avg(ss_quantity#6)#73, stddev_samp(cast(ss_quantity#6 as double))#74, count(sr_return_quantity#23)#75, avg(sr_return_quantity#23)#76, stddev_samp(cast(sr_return_quantity#23 as double))#77, count(cs_quantity#31)#78, avg(cs_quantity#31)#79, stddev_samp(cast(cs_quantity#31 as double))#80] +Results [15]: [i_item_id#15, i_item_desc#16, s_state#11, count(ss_quantity#6)#72 AS store_sales_quantitycount#81, avg(ss_quantity#6)#73 AS store_sales_quantityave#82, stddev_samp(cast(ss_quantity#6 as double))#74 AS store_sales_quantitystdev#83, (stddev_samp(cast(ss_quantity#6 as double))#74 / avg(ss_quantity#6)#73) AS store_sales_quantitycov#84, count(sr_return_quantity#23)#75 AS as_store_returns_quantitycount#85, avg(sr_return_quantity#23)#76 AS as_store_returns_quantityave#86, stddev_samp(cast(sr_return_quantity#23 as double))#77 AS as_store_returns_quantitystdev#87, (stddev_samp(cast(sr_return_quantity#23 as double))#77 / avg(sr_return_quantity#23)#76) AS store_returns_quantitycov#88, count(cs_quantity#31)#78 AS catalog_sales_quantitycount#89, avg(cs_quantity#31)#79 AS catalog_sales_quantityave#90, (stddev_samp(cast(cs_quantity#31 as double))#80 / avg(cs_quantity#31)#79) AS catalog_sales_quantitystdev#91, (stddev_samp(cast(cs_quantity#31 as double))#80 / avg(cs_quantity#31)#79) AS catalog_sales_quantitycov#92] (57) TakeOrderedAndProject Input [15]: [i_item_id#15, i_item_desc#16, s_state#11, store_sales_quantitycount#81, store_sales_quantityave#82, store_sales_quantitystdev#83, store_sales_quantitycov#84, as_store_returns_quantitycount#85, as_store_returns_quantityave#86, as_store_returns_quantitystdev#87, store_returns_quantitycov#88, catalog_sales_quantitycount#89, catalog_sales_quantityave#90, catalog_sales_quantitystdev#91, catalog_sales_quantitycov#92] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q17.sf100/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q17.sf100/simplified.txt index 79226a34e6768..c889777f41263 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q17.sf100/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q17.sf100/simplified.txt @@ -1,6 +1,6 @@ TakeOrderedAndProject [i_item_id,i_item_desc,s_state,store_sales_quantitycount,store_sales_quantityave,store_sales_quantitystdev,store_sales_quantitycov,as_store_returns_quantitycount,as_store_returns_quantityave,as_store_returns_quantitystdev,store_returns_quantitycov,catalog_sales_quantitycount,catalog_sales_quantityave,catalog_sales_quantitystdev,catalog_sales_quantitycov] WholeStageCodegen (18) - HashAggregate [i_item_id,i_item_desc,s_state,count,sum,count,n,avg,m2,count,sum,count,n,avg,m2,count,sum,count,n,avg,m2] [count(ss_quantity),avg(cast(ss_quantity as bigint)),stddev_samp(cast(ss_quantity as double)),count(sr_return_quantity),avg(cast(sr_return_quantity as bigint)),stddev_samp(cast(sr_return_quantity as double)),count(cs_quantity),avg(cast(cs_quantity as bigint)),stddev_samp(cast(cs_quantity as double)),store_sales_quantitycount,store_sales_quantityave,store_sales_quantitystdev,store_sales_quantitycov,as_store_returns_quantitycount,as_store_returns_quantityave,as_store_returns_quantitystdev,store_returns_quantitycov,catalog_sales_quantitycount,catalog_sales_quantityave,catalog_sales_quantitystdev,catalog_sales_quantitycov,count,sum,count,n,avg,m2,count,sum,count,n,avg,m2,count,sum,count,n,avg,m2] + HashAggregate [i_item_id,i_item_desc,s_state,count,sum,count,n,avg,m2,count,sum,count,n,avg,m2,count,sum,count,n,avg,m2] [count(ss_quantity),avg(ss_quantity),stddev_samp(cast(ss_quantity as double)),count(sr_return_quantity),avg(sr_return_quantity),stddev_samp(cast(sr_return_quantity as double)),count(cs_quantity),avg(cs_quantity),stddev_samp(cast(cs_quantity as double)),store_sales_quantitycount,store_sales_quantityave,store_sales_quantitystdev,store_sales_quantitycov,as_store_returns_quantitycount,as_store_returns_quantityave,as_store_returns_quantitystdev,store_returns_quantitycov,catalog_sales_quantitycount,catalog_sales_quantityave,catalog_sales_quantitystdev,catalog_sales_quantitycov,count,sum,count,n,avg,m2,count,sum,count,n,avg,m2,count,sum,count,n,avg,m2] InputAdapter Exchange [i_item_id,i_item_desc,s_state] #1 WholeStageCodegen (17) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q17/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q17/explain.txt index 4085b4ab988cb..b2b9be3a81bc2 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q17/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q17/explain.txt @@ -248,20 +248,20 @@ Input [8]: [ss_item_sk#2, ss_quantity#6, sr_return_quantity#11, cs_quantity#16, (45) HashAggregate [codegen id : 8] Input [6]: [ss_quantity#6, sr_return_quantity#11, cs_quantity#16, s_state#26, i_item_id#29, i_item_desc#30] Keys [3]: [i_item_id#29, i_item_desc#30, s_state#26] -Functions [9]: [partial_count(ss_quantity#6), partial_avg(cast(ss_quantity#6 as bigint)), partial_stddev_samp(cast(ss_quantity#6 as double)), partial_count(sr_return_quantity#11), partial_avg(cast(sr_return_quantity#11 as bigint)), partial_stddev_samp(cast(sr_return_quantity#11 as double)), partial_count(cs_quantity#16), partial_avg(cast(cs_quantity#16 as bigint)), partial_stddev_samp(cast(cs_quantity#16 as double))] +Functions [9]: [partial_count(ss_quantity#6), partial_avg(ss_quantity#6), partial_stddev_samp(cast(ss_quantity#6 as double)), partial_count(sr_return_quantity#11), partial_avg(sr_return_quantity#11), partial_stddev_samp(cast(sr_return_quantity#11 as double)), partial_count(cs_quantity#16), partial_avg(cs_quantity#16), partial_stddev_samp(cast(cs_quantity#16 as double))] Aggregate Attributes [18]: [count#32, sum#33, count#34, n#35, avg#36, m2#37, count#38, sum#39, count#40, n#41, avg#42, m2#43, count#44, sum#45, count#46, n#47, avg#48, m2#49] Results [21]: [i_item_id#29, i_item_desc#30, s_state#26, count#50, sum#51, count#52, n#53, avg#54, m2#55, count#56, sum#57, count#58, n#59, avg#60, m2#61, count#62, sum#63, count#64, n#65, avg#66, m2#67] (46) Exchange Input [21]: [i_item_id#29, i_item_desc#30, s_state#26, count#50, sum#51, count#52, n#53, avg#54, m2#55, count#56, sum#57, count#58, n#59, avg#60, m2#61, count#62, sum#63, count#64, n#65, avg#66, m2#67] -Arguments: hashpartitioning(i_item_id#29, i_item_desc#30, s_state#26, 5), true, [id=#68] +Arguments: hashpartitioning(i_item_id#29, i_item_desc#30, s_state#26, 5), ENSURE_REQUIREMENTS, [id=#68] (47) HashAggregate [codegen id : 9] Input [21]: [i_item_id#29, i_item_desc#30, s_state#26, count#50, sum#51, count#52, n#53, avg#54, m2#55, count#56, sum#57, count#58, n#59, avg#60, m2#61, count#62, sum#63, count#64, n#65, avg#66, m2#67] Keys [3]: [i_item_id#29, i_item_desc#30, s_state#26] -Functions [9]: [count(ss_quantity#6), avg(cast(ss_quantity#6 as bigint)), stddev_samp(cast(ss_quantity#6 as double)), count(sr_return_quantity#11), avg(cast(sr_return_quantity#11 as bigint)), stddev_samp(cast(sr_return_quantity#11 as double)), count(cs_quantity#16), avg(cast(cs_quantity#16 as bigint)), stddev_samp(cast(cs_quantity#16 as double))] -Aggregate Attributes [9]: [count(ss_quantity#6)#69, avg(cast(ss_quantity#6 as bigint))#70, stddev_samp(cast(ss_quantity#6 as double))#71, count(sr_return_quantity#11)#72, avg(cast(sr_return_quantity#11 as bigint))#73, stddev_samp(cast(sr_return_quantity#11 as double))#74, count(cs_quantity#16)#75, avg(cast(cs_quantity#16 as bigint))#76, stddev_samp(cast(cs_quantity#16 as double))#77] -Results [15]: [i_item_id#29, i_item_desc#30, s_state#26, count(ss_quantity#6)#69 AS store_sales_quantitycount#78, avg(cast(ss_quantity#6 as bigint))#70 AS store_sales_quantityave#79, stddev_samp(cast(ss_quantity#6 as double))#71 AS store_sales_quantitystdev#80, (stddev_samp(cast(ss_quantity#6 as double))#71 / avg(cast(ss_quantity#6 as bigint))#70) AS store_sales_quantitycov#81, count(sr_return_quantity#11)#72 AS as_store_returns_quantitycount#82, avg(cast(sr_return_quantity#11 as bigint))#73 AS as_store_returns_quantityave#83, stddev_samp(cast(sr_return_quantity#11 as double))#74 AS as_store_returns_quantitystdev#84, (stddev_samp(cast(sr_return_quantity#11 as double))#74 / avg(cast(sr_return_quantity#11 as bigint))#73) AS store_returns_quantitycov#85, count(cs_quantity#16)#75 AS catalog_sales_quantitycount#86, avg(cast(cs_quantity#16 as bigint))#76 AS catalog_sales_quantityave#87, (stddev_samp(cast(cs_quantity#16 as double))#77 / avg(cast(cs_quantity#16 as bigint))#76) AS catalog_sales_quantitystdev#88, (stddev_samp(cast(cs_quantity#16 as double))#77 / avg(cast(cs_quantity#16 as bigint))#76) AS catalog_sales_quantitycov#89] +Functions [9]: [count(ss_quantity#6), avg(ss_quantity#6), stddev_samp(cast(ss_quantity#6 as double)), count(sr_return_quantity#11), avg(sr_return_quantity#11), stddev_samp(cast(sr_return_quantity#11 as double)), count(cs_quantity#16), avg(cs_quantity#16), stddev_samp(cast(cs_quantity#16 as double))] +Aggregate Attributes [9]: [count(ss_quantity#6)#69, avg(ss_quantity#6)#70, stddev_samp(cast(ss_quantity#6 as double))#71, count(sr_return_quantity#11)#72, avg(sr_return_quantity#11)#73, stddev_samp(cast(sr_return_quantity#11 as double))#74, count(cs_quantity#16)#75, avg(cs_quantity#16)#76, stddev_samp(cast(cs_quantity#16 as double))#77] +Results [15]: [i_item_id#29, i_item_desc#30, s_state#26, count(ss_quantity#6)#69 AS store_sales_quantitycount#78, avg(ss_quantity#6)#70 AS store_sales_quantityave#79, stddev_samp(cast(ss_quantity#6 as double))#71 AS store_sales_quantitystdev#80, (stddev_samp(cast(ss_quantity#6 as double))#71 / avg(ss_quantity#6)#70) AS store_sales_quantitycov#81, count(sr_return_quantity#11)#72 AS as_store_returns_quantitycount#82, avg(sr_return_quantity#11)#73 AS as_store_returns_quantityave#83, stddev_samp(cast(sr_return_quantity#11 as double))#74 AS as_store_returns_quantitystdev#84, (stddev_samp(cast(sr_return_quantity#11 as double))#74 / avg(sr_return_quantity#11)#73) AS store_returns_quantitycov#85, count(cs_quantity#16)#75 AS catalog_sales_quantitycount#86, avg(cs_quantity#16)#76 AS catalog_sales_quantityave#87, (stddev_samp(cast(cs_quantity#16 as double))#77 / avg(cs_quantity#16)#76) AS catalog_sales_quantitystdev#88, (stddev_samp(cast(cs_quantity#16 as double))#77 / avg(cs_quantity#16)#76) AS catalog_sales_quantitycov#89] (48) TakeOrderedAndProject Input [15]: [i_item_id#29, i_item_desc#30, s_state#26, store_sales_quantitycount#78, store_sales_quantityave#79, store_sales_quantitystdev#80, store_sales_quantitycov#81, as_store_returns_quantitycount#82, as_store_returns_quantityave#83, as_store_returns_quantitystdev#84, store_returns_quantitycov#85, catalog_sales_quantitycount#86, catalog_sales_quantityave#87, catalog_sales_quantitystdev#88, catalog_sales_quantitycov#89] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q17/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q17/simplified.txt index e9b95747c294f..3ac622a9f0130 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q17/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q17/simplified.txt @@ -1,6 +1,6 @@ TakeOrderedAndProject [i_item_id,i_item_desc,s_state,store_sales_quantitycount,store_sales_quantityave,store_sales_quantitystdev,store_sales_quantitycov,as_store_returns_quantitycount,as_store_returns_quantityave,as_store_returns_quantitystdev,store_returns_quantitycov,catalog_sales_quantitycount,catalog_sales_quantityave,catalog_sales_quantitystdev,catalog_sales_quantitycov] WholeStageCodegen (9) - HashAggregate [i_item_id,i_item_desc,s_state,count,sum,count,n,avg,m2,count,sum,count,n,avg,m2,count,sum,count,n,avg,m2] [count(ss_quantity),avg(cast(ss_quantity as bigint)),stddev_samp(cast(ss_quantity as double)),count(sr_return_quantity),avg(cast(sr_return_quantity as bigint)),stddev_samp(cast(sr_return_quantity as double)),count(cs_quantity),avg(cast(cs_quantity as bigint)),stddev_samp(cast(cs_quantity as double)),store_sales_quantitycount,store_sales_quantityave,store_sales_quantitystdev,store_sales_quantitycov,as_store_returns_quantitycount,as_store_returns_quantityave,as_store_returns_quantitystdev,store_returns_quantitycov,catalog_sales_quantitycount,catalog_sales_quantityave,catalog_sales_quantitystdev,catalog_sales_quantitycov,count,sum,count,n,avg,m2,count,sum,count,n,avg,m2,count,sum,count,n,avg,m2] + HashAggregate [i_item_id,i_item_desc,s_state,count,sum,count,n,avg,m2,count,sum,count,n,avg,m2,count,sum,count,n,avg,m2] [count(ss_quantity),avg(ss_quantity),stddev_samp(cast(ss_quantity as double)),count(sr_return_quantity),avg(sr_return_quantity),stddev_samp(cast(sr_return_quantity as double)),count(cs_quantity),avg(cs_quantity),stddev_samp(cast(cs_quantity as double)),store_sales_quantitycount,store_sales_quantityave,store_sales_quantitystdev,store_sales_quantitycov,as_store_returns_quantitycount,as_store_returns_quantityave,as_store_returns_quantitystdev,store_returns_quantitycov,catalog_sales_quantitycount,catalog_sales_quantityave,catalog_sales_quantitystdev,catalog_sales_quantitycov,count,sum,count,n,avg,m2,count,sum,count,n,avg,m2,count,sum,count,n,avg,m2] InputAdapter Exchange [i_item_id,i_item_desc,s_state] #1 WholeStageCodegen (8) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q18/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q18/explain.txt index 3b213efa6347d..39a7f08ed6846 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q18/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q18/explain.txt @@ -249,7 +249,7 @@ Results [19]: [i_item_id#34, ca_country#35, ca_state#36, ca_county#37, spark_gro (45) Exchange Input [19]: [i_item_id#34, ca_country#35, ca_state#36, ca_county#37, spark_grouping_id#38, sum#53, count#54, sum#55, count#56, sum#57, count#58, sum#59, count#60, sum#61, count#62, sum#63, count#64, sum#65, count#66] -Arguments: hashpartitioning(i_item_id#34, ca_country#35, ca_state#36, ca_county#37, spark_grouping_id#38, 5), true, [id=#67] +Arguments: hashpartitioning(i_item_id#34, ca_country#35, ca_state#36, ca_county#37, spark_grouping_id#38, 5), ENSURE_REQUIREMENTS, [id=#67] (46) HashAggregate [codegen id : 8] Input [19]: [i_item_id#34, ca_country#35, ca_state#36, ca_county#37, spark_grouping_id#38, sum#53, count#54, sum#55, count#56, sum#57, count#58, sum#59, count#60, sum#61, count#62, sum#63, count#64, sum#65, count#66] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q19/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q19/explain.txt index cb75374a8ddb2..1ed725d771426 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q19/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q19/explain.txt @@ -206,7 +206,7 @@ Results [5]: [i_brand#12, i_brand_id#11, i_manufact_id#13, i_manufact#14, sum#27 (37) Exchange Input [5]: [i_brand#12, i_brand_id#11, i_manufact_id#13, i_manufact#14, sum#27] -Arguments: hashpartitioning(i_brand#12, i_brand_id#11, i_manufact_id#13, i_manufact#14, 5), true, [id=#28] +Arguments: hashpartitioning(i_brand#12, i_brand_id#11, i_manufact_id#13, i_manufact#14, 5), ENSURE_REQUIREMENTS, [id=#28] (38) HashAggregate [codegen id : 7] Input [5]: [i_brand#12, i_brand_id#11, i_manufact_id#13, i_manufact#14, sum#27] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q2/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q2/explain.txt index 7eff75a0220a4..52dfff442bf3a 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q2/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q2/explain.txt @@ -114,7 +114,7 @@ Results [8]: [d_week_seq#10, sum#20, sum#21, sum#22, sum#23, sum#24, sum#25, sum (17) Exchange Input [8]: [d_week_seq#10, sum#20, sum#21, sum#22, sum#23, sum#24, sum#25, sum#26] -Arguments: hashpartitioning(d_week_seq#10, 5), true, [id=#27] +Arguments: hashpartitioning(d_week_seq#10, 5), ENSURE_REQUIREMENTS, [id=#27] (18) HashAggregate [codegen id : 12] Input [8]: [d_week_seq#10, sum#20, sum#21, sum#22, sum#23, sum#24, sum#25, sum#26] @@ -210,7 +210,7 @@ Input [16]: [d_week_seq1#45, sun_sales1#46, mon_sales1#47, tue_sales1#48, wed_sa (38) Exchange Input [8]: [d_week_seq1#45, round((sun_sales1 / sun_sales2), 2)#79, round((mon_sales1 / mon_sales2), 2)#80, round((tue_sales1 / tue_sales2), 2)#81, round((wed_sales1 / wed_sales2), 2)#82, round((thu_sales1 / thu_sales2), 2)#83, round((fri_sales1 / fri_sales2), 2)#84, round((sat_sales1 / sat_sales2), 2)#85] -Arguments: rangepartitioning(d_week_seq1#45 ASC NULLS FIRST, 5), true, [id=#86] +Arguments: rangepartitioning(d_week_seq1#45 ASC NULLS FIRST, 5), ENSURE_REQUIREMENTS, [id=#86] (39) Sort [codegen id : 13] Input [8]: [d_week_seq1#45, round((sun_sales1 / sun_sales2), 2)#79, round((mon_sales1 / mon_sales2), 2)#80, round((tue_sales1 / tue_sales2), 2)#81, round((wed_sales1 / wed_sales2), 2)#82, round((thu_sales1 / thu_sales2), 2)#83, round((fri_sales1 / fri_sales2), 2)#84, round((sat_sales1 / sat_sales2), 2)#85] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q20.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q20.sf100/explain.txt index 2ef3660bc7ba4..ed6f3a52f0f86 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q20.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q20.sf100/explain.txt @@ -75,7 +75,7 @@ Input [4]: [cs_sold_date_sk#1, cs_item_sk#2, cs_ext_sales_price#3, d_date_sk#4] (11) Exchange Input [2]: [cs_item_sk#2, cs_ext_sales_price#3] -Arguments: hashpartitioning(cs_item_sk#2, 5), true, [id=#7] +Arguments: hashpartitioning(cs_item_sk#2, 5), ENSURE_REQUIREMENTS, [id=#7] (12) Sort [codegen id : 3] Input [2]: [cs_item_sk#2, cs_ext_sales_price#3] @@ -97,7 +97,7 @@ Condition : (i_category#13 IN (Sports,Books,Home) AND isnotnull(i_item_sk#8)) (16) Exchange Input [6]: [i_item_sk#8, i_item_id#9, i_item_desc#10, i_current_price#11, i_class#12, i_category#13] -Arguments: hashpartitioning(i_item_sk#8, 5), true, [id=#14] +Arguments: hashpartitioning(i_item_sk#8, 5), ENSURE_REQUIREMENTS, [id=#14] (17) Sort [codegen id : 5] Input [6]: [i_item_sk#8, i_item_id#9, i_item_desc#10, i_current_price#11, i_class#12, i_category#13] @@ -121,7 +121,7 @@ Results [6]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_ (21) Exchange Input [6]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, sum#16] -Arguments: hashpartitioning(i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, 5), true, [id=#17] +Arguments: hashpartitioning(i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, 5), ENSURE_REQUIREMENTS, [id=#17] (22) HashAggregate [codegen id : 7] Input [6]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, sum#16] @@ -132,7 +132,7 @@ Results [8]: [i_item_desc#10, i_category#13, i_class#12, i_current_price#11, Mak (23) Exchange Input [8]: [i_item_desc#10, i_category#13, i_class#12, i_current_price#11, itemrevenue#19, _w0#20, _w1#21, i_item_id#9] -Arguments: hashpartitioning(i_class#12, 5), true, [id=#22] +Arguments: hashpartitioning(i_class#12, 5), ENSURE_REQUIREMENTS, [id=#22] (24) Sort [codegen id : 8] Input [8]: [i_item_desc#10, i_category#13, i_class#12, i_current_price#11, itemrevenue#19, _w0#20, _w1#21, i_item_id#9] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q20/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q20/explain.txt index 4234fba2b5a14..ae77aae9cb670 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q20/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q20/explain.txt @@ -106,7 +106,7 @@ Results [6]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_pri (18) Exchange Input [6]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, sum#15] -Arguments: hashpartitioning(i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, 5), true, [id=#16] +Arguments: hashpartitioning(i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, 5), ENSURE_REQUIREMENTS, [id=#16] (19) HashAggregate [codegen id : 4] Input [6]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, sum#15] @@ -117,7 +117,7 @@ Results [8]: [i_item_desc#6, i_category#9, i_class#8, i_current_price#7, MakeDec (20) Exchange Input [8]: [i_item_desc#6, i_category#9, i_class#8, i_current_price#7, itemrevenue#18, _w0#19, _w1#20, i_item_id#5] -Arguments: hashpartitioning(i_class#8, 5), true, [id=#21] +Arguments: hashpartitioning(i_class#8, 5), ENSURE_REQUIREMENTS, [id=#21] (21) Sort [codegen id : 5] Input [8]: [i_item_desc#6, i_category#9, i_class#8, i_current_price#7, itemrevenue#18, _w0#19, _w1#20, i_item_id#5] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q21.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q21.sf100/explain.txt index 094e7aac5cbbd..a4bbbf565f086 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q21.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q21.sf100/explain.txt @@ -130,7 +130,7 @@ Input [6]: [inv_warehouse_sk#3, inv_quantity_on_hand#4, i_item_id#6, d_date#10, (23) HashAggregate [codegen id : 4] Input [4]: [inv_quantity_on_hand#4, w_warehouse_name#13, i_item_id#6, d_date#10] Keys [2]: [w_warehouse_name#13, i_item_id#6] -Functions [2]: [partial_sum(CASE WHEN (d_date#10 < 11027) THEN cast(inv_quantity_on_hand#4 as bigint) ELSE 0 END), partial_sum(CASE WHEN (d_date#10 >= 11027) THEN cast(inv_quantity_on_hand#4 as bigint) ELSE 0 END)] +Functions [2]: [partial_sum(CASE WHEN (d_date#10 < 11027) THEN inv_quantity_on_hand#4 ELSE 0 END), partial_sum(CASE WHEN (d_date#10 >= 11027) THEN inv_quantity_on_hand#4 ELSE 0 END)] Aggregate Attributes [2]: [sum#15, sum#16] Results [4]: [w_warehouse_name#13, i_item_id#6, sum#17, sum#18] @@ -141,13 +141,13 @@ Arguments: hashpartitioning(w_warehouse_name#13, i_item_id#6, 5), ENSURE_REQUIRE (25) HashAggregate [codegen id : 5] Input [4]: [w_warehouse_name#13, i_item_id#6, sum#17, sum#18] Keys [2]: [w_warehouse_name#13, i_item_id#6] -Functions [2]: [sum(CASE WHEN (d_date#10 < 11027) THEN cast(inv_quantity_on_hand#4 as bigint) ELSE 0 END), sum(CASE WHEN (d_date#10 >= 11027) THEN cast(inv_quantity_on_hand#4 as bigint) ELSE 0 END)] -Aggregate Attributes [2]: [sum(CASE WHEN (d_date#10 < 11027) THEN cast(inv_quantity_on_hand#4 as bigint) ELSE 0 END)#20, sum(CASE WHEN (d_date#10 >= 11027) THEN cast(inv_quantity_on_hand#4 as bigint) ELSE 0 END)#21] -Results [4]: [w_warehouse_name#13, i_item_id#6, sum(CASE WHEN (d_date#10 < 11027) THEN cast(inv_quantity_on_hand#4 as bigint) ELSE 0 END)#20 AS inv_before#22, sum(CASE WHEN (d_date#10 >= 11027) THEN cast(inv_quantity_on_hand#4 as bigint) ELSE 0 END)#21 AS inv_after#23] +Functions [2]: [sum(CASE WHEN (d_date#10 < 11027) THEN inv_quantity_on_hand#4 ELSE 0 END), sum(CASE WHEN (d_date#10 >= 11027) THEN inv_quantity_on_hand#4 ELSE 0 END)] +Aggregate Attributes [2]: [sum(CASE WHEN (d_date#10 < 11027) THEN inv_quantity_on_hand#4 ELSE 0 END)#20, sum(CASE WHEN (d_date#10 >= 11027) THEN inv_quantity_on_hand#4 ELSE 0 END)#21] +Results [4]: [w_warehouse_name#13, i_item_id#6, sum(CASE WHEN (d_date#10 < 11027) THEN inv_quantity_on_hand#4 ELSE 0 END)#20 AS inv_before#22, sum(CASE WHEN (d_date#10 >= 11027) THEN inv_quantity_on_hand#4 ELSE 0 END)#21 AS inv_after#23] (26) Filter [codegen id : 5] Input [4]: [w_warehouse_name#13, i_item_id#6, inv_before#22, inv_after#23] -Condition : (CASE WHEN (inv_before#22 > 0) THEN ((cast(inv_after#23 as double) / cast(inv_before#22 as double)) >= 0.666667) ELSE false END AND CASE WHEN (inv_before#22 > 0) THEN ((cast(inv_after#23 as double) / cast(inv_before#22 as double)) <= 1.5) ELSE false END) +Condition : (((((isnotnull(inv_before#22) AND isnotnull(inv_after#23)) AND (inv_before#22 > 0)) AND ((cast(inv_after#23 as double) / cast(inv_before#22 as double)) >= 0.666667)) AND (inv_before#22 > 0)) AND ((cast(inv_after#23 as double) / cast(inv_before#22 as double)) <= 1.5)) (27) TakeOrderedAndProject Input [4]: [w_warehouse_name#13, i_item_id#6, inv_before#22, inv_after#23] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q21.sf100/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q21.sf100/simplified.txt index 3da4f967ccbd3..d9fc7375251c4 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q21.sf100/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q21.sf100/simplified.txt @@ -1,7 +1,7 @@ TakeOrderedAndProject [w_warehouse_name,i_item_id,inv_before,inv_after] WholeStageCodegen (5) Filter [inv_before,inv_after] - HashAggregate [w_warehouse_name,i_item_id,sum,sum] [sum(CASE WHEN (d_date < 11027) THEN cast(inv_quantity_on_hand as bigint) ELSE 0 END),sum(CASE WHEN (d_date >= 11027) THEN cast(inv_quantity_on_hand as bigint) ELSE 0 END),inv_before,inv_after,sum,sum] + HashAggregate [w_warehouse_name,i_item_id,sum,sum] [sum(CASE WHEN (d_date < 11027) THEN inv_quantity_on_hand ELSE 0 END),sum(CASE WHEN (d_date >= 11027) THEN inv_quantity_on_hand ELSE 0 END),inv_before,inv_after,sum,sum] InputAdapter Exchange [w_warehouse_name,i_item_id] #1 WholeStageCodegen (4) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q21/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q21/explain.txt index 8edf52683fe7d..97725532750bd 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q21/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q21/explain.txt @@ -130,7 +130,7 @@ Input [6]: [inv_date_sk#1, inv_quantity_on_hand#4, w_warehouse_name#6, i_item_id (23) HashAggregate [codegen id : 4] Input [4]: [inv_quantity_on_hand#4, w_warehouse_name#6, i_item_id#9, d_date#13] Keys [2]: [w_warehouse_name#6, i_item_id#9] -Functions [2]: [partial_sum(CASE WHEN (d_date#13 < 11027) THEN cast(inv_quantity_on_hand#4 as bigint) ELSE 0 END), partial_sum(CASE WHEN (d_date#13 >= 11027) THEN cast(inv_quantity_on_hand#4 as bigint) ELSE 0 END)] +Functions [2]: [partial_sum(CASE WHEN (d_date#13 < 11027) THEN inv_quantity_on_hand#4 ELSE 0 END), partial_sum(CASE WHEN (d_date#13 >= 11027) THEN inv_quantity_on_hand#4 ELSE 0 END)] Aggregate Attributes [2]: [sum#15, sum#16] Results [4]: [w_warehouse_name#6, i_item_id#9, sum#17, sum#18] @@ -141,13 +141,13 @@ Arguments: hashpartitioning(w_warehouse_name#6, i_item_id#9, 5), ENSURE_REQUIREM (25) HashAggregate [codegen id : 5] Input [4]: [w_warehouse_name#6, i_item_id#9, sum#17, sum#18] Keys [2]: [w_warehouse_name#6, i_item_id#9] -Functions [2]: [sum(CASE WHEN (d_date#13 < 11027) THEN cast(inv_quantity_on_hand#4 as bigint) ELSE 0 END), sum(CASE WHEN (d_date#13 >= 11027) THEN cast(inv_quantity_on_hand#4 as bigint) ELSE 0 END)] -Aggregate Attributes [2]: [sum(CASE WHEN (d_date#13 < 11027) THEN cast(inv_quantity_on_hand#4 as bigint) ELSE 0 END)#20, sum(CASE WHEN (d_date#13 >= 11027) THEN cast(inv_quantity_on_hand#4 as bigint) ELSE 0 END)#21] -Results [4]: [w_warehouse_name#6, i_item_id#9, sum(CASE WHEN (d_date#13 < 11027) THEN cast(inv_quantity_on_hand#4 as bigint) ELSE 0 END)#20 AS inv_before#22, sum(CASE WHEN (d_date#13 >= 11027) THEN cast(inv_quantity_on_hand#4 as bigint) ELSE 0 END)#21 AS inv_after#23] +Functions [2]: [sum(CASE WHEN (d_date#13 < 11027) THEN inv_quantity_on_hand#4 ELSE 0 END), sum(CASE WHEN (d_date#13 >= 11027) THEN inv_quantity_on_hand#4 ELSE 0 END)] +Aggregate Attributes [2]: [sum(CASE WHEN (d_date#13 < 11027) THEN inv_quantity_on_hand#4 ELSE 0 END)#20, sum(CASE WHEN (d_date#13 >= 11027) THEN inv_quantity_on_hand#4 ELSE 0 END)#21] +Results [4]: [w_warehouse_name#6, i_item_id#9, sum(CASE WHEN (d_date#13 < 11027) THEN inv_quantity_on_hand#4 ELSE 0 END)#20 AS inv_before#22, sum(CASE WHEN (d_date#13 >= 11027) THEN inv_quantity_on_hand#4 ELSE 0 END)#21 AS inv_after#23] (26) Filter [codegen id : 5] Input [4]: [w_warehouse_name#6, i_item_id#9, inv_before#22, inv_after#23] -Condition : (CASE WHEN (inv_before#22 > 0) THEN ((cast(inv_after#23 as double) / cast(inv_before#22 as double)) >= 0.666667) ELSE false END AND CASE WHEN (inv_before#22 > 0) THEN ((cast(inv_after#23 as double) / cast(inv_before#22 as double)) <= 1.5) ELSE false END) +Condition : (((((isnotnull(inv_before#22) AND isnotnull(inv_after#23)) AND (inv_before#22 > 0)) AND ((cast(inv_after#23 as double) / cast(inv_before#22 as double)) >= 0.666667)) AND (inv_before#22 > 0)) AND ((cast(inv_after#23 as double) / cast(inv_before#22 as double)) <= 1.5)) (27) TakeOrderedAndProject Input [4]: [w_warehouse_name#6, i_item_id#9, inv_before#22, inv_after#23] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q21/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q21/simplified.txt index b9729a8c80968..c6d0482a8ed77 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q21/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q21/simplified.txt @@ -1,7 +1,7 @@ TakeOrderedAndProject [w_warehouse_name,i_item_id,inv_before,inv_after] WholeStageCodegen (5) Filter [inv_before,inv_after] - HashAggregate [w_warehouse_name,i_item_id,sum,sum] [sum(CASE WHEN (d_date < 11027) THEN cast(inv_quantity_on_hand as bigint) ELSE 0 END),sum(CASE WHEN (d_date >= 11027) THEN cast(inv_quantity_on_hand as bigint) ELSE 0 END),inv_before,inv_after,sum,sum] + HashAggregate [w_warehouse_name,i_item_id,sum,sum] [sum(CASE WHEN (d_date < 11027) THEN inv_quantity_on_hand ELSE 0 END),sum(CASE WHEN (d_date >= 11027) THEN inv_quantity_on_hand ELSE 0 END),inv_before,inv_after,sum,sum] InputAdapter Exchange [w_warehouse_name,i_item_id] #1 WholeStageCodegen (4) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q22.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q22.sf100/explain.txt index a405f658951d3..3ea12b6fb2849 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q22.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q22.sf100/explain.txt @@ -105,7 +105,7 @@ Input [4]: [inv_date_sk#1, inv_item_sk#2, inv_quantity_on_hand#4, d_date_sk#7] (17) Exchange Input [2]: [inv_item_sk#2, inv_quantity_on_hand#4] -Arguments: hashpartitioning(inv_item_sk#2, 5), true, [id=#10] +Arguments: hashpartitioning(inv_item_sk#2, 5), ENSURE_REQUIREMENTS, [id=#10] (18) Sort [codegen id : 4] Input [2]: [inv_item_sk#2, inv_quantity_on_hand#4] @@ -127,7 +127,7 @@ Condition : isnotnull(i_item_sk#11) (22) Exchange Input [5]: [i_item_sk#11, i_brand#12, i_class#13, i_category#14, i_product_name#15] -Arguments: hashpartitioning(i_item_sk#11, 5), true, [id=#16] +Arguments: hashpartitioning(i_item_sk#11, 5), ENSURE_REQUIREMENTS, [id=#16] (23) Sort [codegen id : 6] Input [5]: [i_item_sk#11, i_brand#12, i_class#13, i_category#14, i_product_name#15] @@ -149,20 +149,20 @@ Arguments: [List(inv_quantity_on_hand#4, i_product_name#15, i_brand#12, i_class# (27) HashAggregate [codegen id : 7] Input [6]: [inv_quantity_on_hand#4, i_product_name#17, i_brand#18, i_class#19, i_category#20, spark_grouping_id#21] Keys [5]: [i_product_name#17, i_brand#18, i_class#19, i_category#20, spark_grouping_id#21] -Functions [1]: [partial_avg(cast(inv_quantity_on_hand#4 as bigint))] +Functions [1]: [partial_avg(inv_quantity_on_hand#4)] Aggregate Attributes [2]: [sum#22, count#23] Results [7]: [i_product_name#17, i_brand#18, i_class#19, i_category#20, spark_grouping_id#21, sum#24, count#25] (28) Exchange Input [7]: [i_product_name#17, i_brand#18, i_class#19, i_category#20, spark_grouping_id#21, sum#24, count#25] -Arguments: hashpartitioning(i_product_name#17, i_brand#18, i_class#19, i_category#20, spark_grouping_id#21, 5), true, [id=#26] +Arguments: hashpartitioning(i_product_name#17, i_brand#18, i_class#19, i_category#20, spark_grouping_id#21, 5), ENSURE_REQUIREMENTS, [id=#26] (29) HashAggregate [codegen id : 8] Input [7]: [i_product_name#17, i_brand#18, i_class#19, i_category#20, spark_grouping_id#21, sum#24, count#25] Keys [5]: [i_product_name#17, i_brand#18, i_class#19, i_category#20, spark_grouping_id#21] -Functions [1]: [avg(cast(inv_quantity_on_hand#4 as bigint))] -Aggregate Attributes [1]: [avg(cast(inv_quantity_on_hand#4 as bigint))#27] -Results [5]: [i_product_name#17, i_brand#18, i_class#19, i_category#20, avg(cast(inv_quantity_on_hand#4 as bigint))#27 AS qoh#28] +Functions [1]: [avg(inv_quantity_on_hand#4)] +Aggregate Attributes [1]: [avg(inv_quantity_on_hand#4)#27] +Results [5]: [i_product_name#17, i_brand#18, i_class#19, i_category#20, avg(inv_quantity_on_hand#4)#27 AS qoh#28] (30) TakeOrderedAndProject Input [5]: [i_product_name#17, i_brand#18, i_class#19, i_category#20, qoh#28] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q22.sf100/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q22.sf100/simplified.txt index 2c4258c9d48e6..81238c2dfe044 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q22.sf100/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q22.sf100/simplified.txt @@ -1,6 +1,6 @@ TakeOrderedAndProject [qoh,i_product_name,i_brand,i_class,i_category] WholeStageCodegen (8) - HashAggregate [i_product_name,i_brand,i_class,i_category,spark_grouping_id,sum,count] [avg(cast(inv_quantity_on_hand as bigint)),qoh,sum,count] + HashAggregate [i_product_name,i_brand,i_class,i_category,spark_grouping_id,sum,count] [avg(inv_quantity_on_hand),qoh,sum,count] InputAdapter Exchange [i_product_name,i_brand,i_class,i_category,spark_grouping_id] #1 WholeStageCodegen (7) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q22/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q22/explain.txt index 6aae0b0c8dc0c..d09c7cd118b30 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q22/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q22/explain.txt @@ -134,20 +134,20 @@ Arguments: [List(inv_quantity_on_hand#4, i_product_name#12, i_brand#9, i_class#1 (24) HashAggregate [codegen id : 4] Input [6]: [inv_quantity_on_hand#4, i_product_name#16, i_brand#17, i_class#18, i_category#19, spark_grouping_id#20] Keys [5]: [i_product_name#16, i_brand#17, i_class#18, i_category#19, spark_grouping_id#20] -Functions [1]: [partial_avg(cast(inv_quantity_on_hand#4 as bigint))] +Functions [1]: [partial_avg(inv_quantity_on_hand#4)] Aggregate Attributes [2]: [sum#21, count#22] Results [7]: [i_product_name#16, i_brand#17, i_class#18, i_category#19, spark_grouping_id#20, sum#23, count#24] (25) Exchange Input [7]: [i_product_name#16, i_brand#17, i_class#18, i_category#19, spark_grouping_id#20, sum#23, count#24] -Arguments: hashpartitioning(i_product_name#16, i_brand#17, i_class#18, i_category#19, spark_grouping_id#20, 5), true, [id=#25] +Arguments: hashpartitioning(i_product_name#16, i_brand#17, i_class#18, i_category#19, spark_grouping_id#20, 5), ENSURE_REQUIREMENTS, [id=#25] (26) HashAggregate [codegen id : 5] Input [7]: [i_product_name#16, i_brand#17, i_class#18, i_category#19, spark_grouping_id#20, sum#23, count#24] Keys [5]: [i_product_name#16, i_brand#17, i_class#18, i_category#19, spark_grouping_id#20] -Functions [1]: [avg(cast(inv_quantity_on_hand#4 as bigint))] -Aggregate Attributes [1]: [avg(cast(inv_quantity_on_hand#4 as bigint))#26] -Results [5]: [i_product_name#16, i_brand#17, i_class#18, i_category#19, avg(cast(inv_quantity_on_hand#4 as bigint))#26 AS qoh#27] +Functions [1]: [avg(inv_quantity_on_hand#4)] +Aggregate Attributes [1]: [avg(inv_quantity_on_hand#4)#26] +Results [5]: [i_product_name#16, i_brand#17, i_class#18, i_category#19, avg(inv_quantity_on_hand#4)#26 AS qoh#27] (27) TakeOrderedAndProject Input [5]: [i_product_name#16, i_brand#17, i_class#18, i_category#19, qoh#27] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q22/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q22/simplified.txt index 233babdf3f2e7..f70e9c3af0af2 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q22/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q22/simplified.txt @@ -1,6 +1,6 @@ TakeOrderedAndProject [qoh,i_product_name,i_brand,i_class,i_category] WholeStageCodegen (5) - HashAggregate [i_product_name,i_brand,i_class,i_category,spark_grouping_id,sum,count] [avg(cast(inv_quantity_on_hand as bigint)),qoh,sum,count] + HashAggregate [i_product_name,i_brand,i_class,i_category,spark_grouping_id,sum,count] [avg(inv_quantity_on_hand),qoh,sum,count] InputAdapter Exchange [i_product_name,i_brand,i_class,i_category,spark_grouping_id] #1 WholeStageCodegen (4) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q23a.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q23a.sf100/explain.txt index 85f71b6cd9388..48598660ee897 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q23a.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q23a.sf100/explain.txt @@ -116,7 +116,7 @@ Condition : isnotnull(cs_sold_date_sk#1) (4) Exchange Input [5]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_item_sk#3, cs_quantity#4, cs_list_price#5] -Arguments: hashpartitioning(cs_item_sk#3, 5), true, [id=#6] +Arguments: hashpartitioning(cs_item_sk#3, 5), ENSURE_REQUIREMENTS, [id=#6] (5) Sort [codegen id : 2] Input [5]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_item_sk#3, cs_quantity#4, cs_list_price#5] @@ -169,7 +169,7 @@ Input [4]: [ss_sold_date_sk#7, ss_item_sk#8, d_date_sk#9, d_date#10] (16) Exchange Input [2]: [ss_item_sk#8, d_date#10] -Arguments: hashpartitioning(ss_item_sk#8, 5), true, [id=#13] +Arguments: hashpartitioning(ss_item_sk#8, 5), ENSURE_REQUIREMENTS, [id=#13] (17) Sort [codegen id : 5] Input [2]: [ss_item_sk#8, d_date#10] @@ -191,7 +191,7 @@ Condition : isnotnull(i_item_sk#14) (21) Exchange Input [2]: [i_item_sk#14, i_item_desc#15] -Arguments: hashpartitioning(i_item_sk#14, 5), true, [id=#16] +Arguments: hashpartitioning(i_item_sk#14, 5), ENSURE_REQUIREMENTS, [id=#16] (22) Sort [codegen id : 7] Input [2]: [i_item_sk#14, i_item_desc#15] @@ -243,7 +243,7 @@ Input [5]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_item_sk#3, cs_quantity# (32) Exchange Input [4]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_quantity#4, cs_list_price#5] -Arguments: hashpartitioning(cs_bill_customer_sk#2, 5), true, [id=#23] +Arguments: hashpartitioning(cs_bill_customer_sk#2, 5), ENSURE_REQUIREMENTS, [id=#23] (33) Sort [codegen id : 10] Input [4]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_quantity#4, cs_list_price#5] @@ -265,7 +265,7 @@ Condition : isnotnull(ss_customer_sk#24) (37) Exchange Input [3]: [ss_customer_sk#24, ss_quantity#25, ss_sales_price#26] -Arguments: hashpartitioning(ss_customer_sk#24, 5), true, [id=#27] +Arguments: hashpartitioning(ss_customer_sk#24, 5), ENSURE_REQUIREMENTS, [id=#27] (38) Sort [codegen id : 12] Input [3]: [ss_customer_sk#24, ss_quantity#25, ss_sales_price#26] @@ -287,7 +287,7 @@ Condition : isnotnull(c_customer_sk#28) (42) Exchange Input [1]: [c_customer_sk#28] -Arguments: hashpartitioning(c_customer_sk#28, 5), true, [id=#29] +Arguments: hashpartitioning(c_customer_sk#28, 5), ENSURE_REQUIREMENTS, [id=#29] (43) Sort [codegen id : 14] Input [1]: [c_customer_sk#28] @@ -384,7 +384,7 @@ Condition : isnotnull(ws_sold_date_sk#41) (63) Exchange Input [5]: [ws_sold_date_sk#41, ws_item_sk#42, ws_bill_customer_sk#43, ws_quantity#44, ws_list_price#45] -Arguments: hashpartitioning(ws_item_sk#42, 5), true, [id=#46] +Arguments: hashpartitioning(ws_item_sk#42, 5), ENSURE_REQUIREMENTS, [id=#46] (64) Sort [codegen id : 19] Input [5]: [ws_sold_date_sk#41, ws_item_sk#42, ws_bill_customer_sk#43, ws_quantity#44, ws_list_price#45] @@ -450,7 +450,7 @@ Input [5]: [ws_sold_date_sk#41, ws_item_sk#42, ws_bill_customer_sk#43, ws_quanti (78) Exchange Input [4]: [ws_sold_date_sk#41, ws_bill_customer_sk#43, ws_quantity#44, ws_list_price#45] -Arguments: hashpartitioning(ws_bill_customer_sk#43, 5), true, [id=#52] +Arguments: hashpartitioning(ws_bill_customer_sk#43, 5), ENSURE_REQUIREMENTS, [id=#52] (79) Sort [codegen id : 27] Input [4]: [ws_sold_date_sk#41, ws_bill_customer_sk#43, ws_quantity#44, ws_list_price#45] @@ -537,7 +537,7 @@ Results [2]: [sum#62, isEmpty#63] (98) Exchange Input [2]: [sum#62, isEmpty#63] -Arguments: SinglePartition, true, [id=#64] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#64] (99) HashAggregate [codegen id : 36] Input [2]: [sum#62, isEmpty#63] @@ -622,7 +622,7 @@ Input [5]: [ss_sold_date_sk#7, ss_customer_sk#24, ss_quantity#25, ss_sales_price (110) Exchange Input [3]: [ss_customer_sk#24, ss_quantity#25, ss_sales_price#26] -Arguments: hashpartitioning(ss_customer_sk#24, 5), true, [id=#68] +Arguments: hashpartitioning(ss_customer_sk#24, 5), ENSURE_REQUIREMENTS, [id=#68] (111) Sort [codegen id : 3] Input [3]: [ss_customer_sk#24, ss_quantity#25, ss_sales_price#26] @@ -644,7 +644,7 @@ Condition : isnotnull(c_customer_sk#28) (115) Exchange Input [1]: [c_customer_sk#28] -Arguments: hashpartitioning(c_customer_sk#28, 5), true, [id=#69] +Arguments: hashpartitioning(c_customer_sk#28, 5), ENSURE_REQUIREMENTS, [id=#69] (116) Sort [codegen id : 5] Input [1]: [c_customer_sk#28] @@ -682,7 +682,7 @@ Results [1]: [max#77] (122) Exchange Input [1]: [max#77] -Arguments: SinglePartition, true, [id=#78] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#78] (123) HashAggregate [codegen id : 7] Input [1]: [max#77] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q23a/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q23a/explain.txt index 15ae5bfe24303..ff50a8e7cebeb 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q23a/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q23a/explain.txt @@ -167,7 +167,7 @@ Results [4]: [substr(i_item_desc#13, 1, 30)#15, i_item_sk#12, d_date#9, count#17 (21) Exchange Input [4]: [substr(i_item_desc#13, 1, 30)#15, i_item_sk#12, d_date#9, count#17] -Arguments: hashpartitioning(substr(i_item_desc#13, 1, 30)#15, i_item_sk#12, d_date#9, 5), true, [id=#18] +Arguments: hashpartitioning(substr(i_item_desc#13, 1, 30)#15, i_item_sk#12, d_date#9, 5), ENSURE_REQUIREMENTS, [id=#18] (22) HashAggregate [codegen id : 4] Input [4]: [substr(i_item_desc#13, 1, 30)#15, i_item_sk#12, d_date#9, count#17] @@ -247,7 +247,7 @@ Results [3]: [c_customer_sk#26, sum#30, isEmpty#31] (38) Exchange Input [3]: [c_customer_sk#26, sum#30, isEmpty#31] -Arguments: hashpartitioning(c_customer_sk#26, 5), true, [id=#32] +Arguments: hashpartitioning(c_customer_sk#26, 5), ENSURE_REQUIREMENTS, [id=#32] (39) HashAggregate [codegen id : 7] Input [3]: [c_customer_sk#26, sum#30, isEmpty#31] @@ -388,7 +388,7 @@ Results [2]: [sum#54, isEmpty#55] (70) Exchange Input [2]: [sum#54, isEmpty#55] -Arguments: SinglePartition, true, [id=#56] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#56] (71) HashAggregate [codegen id : 20] Input [2]: [sum#54, isEmpty#55] @@ -505,7 +505,7 @@ Results [3]: [c_customer_sk#26, sum#63, isEmpty#64] (89) Exchange Input [3]: [c_customer_sk#26, sum#63, isEmpty#64] -Arguments: hashpartitioning(c_customer_sk#26, 5), true, [id=#65] +Arguments: hashpartitioning(c_customer_sk#26, 5), ENSURE_REQUIREMENTS, [id=#65] (90) HashAggregate [codegen id : 4] Input [3]: [c_customer_sk#26, sum#63, isEmpty#64] @@ -523,7 +523,7 @@ Results [1]: [max#69] (92) Exchange Input [1]: [max#69] -Arguments: SinglePartition, true, [id=#70] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#70] (93) HashAggregate [codegen id : 5] Input [1]: [max#69] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q23b.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q23b.sf100/explain.txt index 9a4c2b064d091..6fb1c3b80d5d0 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q23b.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q23b.sf100/explain.txt @@ -153,7 +153,7 @@ Condition : (isnotnull(cs_bill_customer_sk#2) AND isnotnull(cs_sold_date_sk#1)) (4) Exchange Input [5]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_item_sk#3, cs_quantity#4, cs_list_price#5] -Arguments: hashpartitioning(cs_item_sk#3, 5), true, [id=#6] +Arguments: hashpartitioning(cs_item_sk#3, 5), ENSURE_REQUIREMENTS, [id=#6] (5) Sort [codegen id : 2] Input [5]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_item_sk#3, cs_quantity#4, cs_list_price#5] @@ -206,7 +206,7 @@ Input [4]: [ss_sold_date_sk#7, ss_item_sk#8, d_date_sk#9, d_date#10] (16) Exchange Input [2]: [ss_item_sk#8, d_date#10] -Arguments: hashpartitioning(ss_item_sk#8, 5), true, [id=#13] +Arguments: hashpartitioning(ss_item_sk#8, 5), ENSURE_REQUIREMENTS, [id=#13] (17) Sort [codegen id : 5] Input [2]: [ss_item_sk#8, d_date#10] @@ -228,7 +228,7 @@ Condition : isnotnull(i_item_sk#14) (21) Exchange Input [2]: [i_item_sk#14, i_item_desc#15] -Arguments: hashpartitioning(i_item_sk#14, 5), true, [id=#16] +Arguments: hashpartitioning(i_item_sk#14, 5), ENSURE_REQUIREMENTS, [id=#16] (22) Sort [codegen id : 7] Input [2]: [i_item_sk#14, i_item_desc#15] @@ -280,7 +280,7 @@ Input [5]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_item_sk#3, cs_quantity# (32) Exchange Input [4]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_quantity#4, cs_list_price#5] -Arguments: hashpartitioning(cs_bill_customer_sk#2, 5), true, [id=#23] +Arguments: hashpartitioning(cs_bill_customer_sk#2, 5), ENSURE_REQUIREMENTS, [id=#23] (33) Sort [codegen id : 10] Input [4]: [cs_sold_date_sk#1, cs_bill_customer_sk#2, cs_quantity#4, cs_list_price#5] @@ -302,7 +302,7 @@ Condition : isnotnull(ss_customer_sk#24) (37) Exchange Input [3]: [ss_customer_sk#24, ss_quantity#25, ss_sales_price#26] -Arguments: hashpartitioning(ss_customer_sk#24, 5), true, [id=#27] +Arguments: hashpartitioning(ss_customer_sk#24, 5), ENSURE_REQUIREMENTS, [id=#27] (38) Sort [codegen id : 12] Input [3]: [ss_customer_sk#24, ss_quantity#25, ss_sales_price#26] @@ -324,7 +324,7 @@ Condition : isnotnull(c_customer_sk#28) (42) Exchange Input [1]: [c_customer_sk#28] -Arguments: hashpartitioning(c_customer_sk#28, 5), true, [id=#29] +Arguments: hashpartitioning(c_customer_sk#28, 5), ENSURE_REQUIREMENTS, [id=#29] (43) Sort [codegen id : 14] Input [1]: [c_customer_sk#28] @@ -417,7 +417,7 @@ Condition : isnotnull(c_customer_sk#28) (62) Exchange Input [3]: [c_customer_sk#28, c_first_name#40, c_last_name#41] -Arguments: hashpartitioning(c_customer_sk#28, 5), true, [id=#42] +Arguments: hashpartitioning(c_customer_sk#28, 5), ENSURE_REQUIREMENTS, [id=#42] (63) Sort [codegen id : 19] Input [3]: [c_customer_sk#28, c_first_name#40, c_last_name#41] @@ -495,7 +495,7 @@ Results [4]: [c_last_name#41, c_first_name#40, sum#46, isEmpty#47] (79) Exchange Input [4]: [c_last_name#41, c_first_name#40, sum#46, isEmpty#47] -Arguments: hashpartitioning(c_last_name#41, c_first_name#40, 5), true, [id=#48] +Arguments: hashpartitioning(c_last_name#41, c_first_name#40, 5), ENSURE_REQUIREMENTS, [id=#48] (80) HashAggregate [codegen id : 26] Input [4]: [c_last_name#41, c_first_name#40, sum#46, isEmpty#47] @@ -520,7 +520,7 @@ Condition : (isnotnull(ws_bill_customer_sk#53) AND isnotnull(ws_sold_date_sk#51) (84) Exchange Input [5]: [ws_sold_date_sk#51, ws_item_sk#52, ws_bill_customer_sk#53, ws_quantity#54, ws_list_price#55] -Arguments: hashpartitioning(ws_item_sk#52, 5), true, [id=#56] +Arguments: hashpartitioning(ws_item_sk#52, 5), ENSURE_REQUIREMENTS, [id=#56] (85) Sort [codegen id : 28] Input [5]: [ws_sold_date_sk#51, ws_item_sk#52, ws_bill_customer_sk#53, ws_quantity#54, ws_list_price#55] @@ -586,7 +586,7 @@ Input [5]: [ws_sold_date_sk#51, ws_item_sk#52, ws_bill_customer_sk#53, ws_quanti (99) Exchange Input [4]: [ws_sold_date_sk#51, ws_bill_customer_sk#53, ws_quantity#54, ws_list_price#55] -Arguments: hashpartitioning(ws_bill_customer_sk#53, 5), true, [id=#62] +Arguments: hashpartitioning(ws_bill_customer_sk#53, 5), ENSURE_REQUIREMENTS, [id=#62] (100) Sort [codegen id : 36] Input [4]: [ws_sold_date_sk#51, ws_bill_customer_sk#53, ws_quantity#54, ws_list_price#55] @@ -737,7 +737,7 @@ Results [4]: [c_last_name#41, c_first_name#40, sum#72, isEmpty#73] (133) Exchange Input [4]: [c_last_name#41, c_first_name#40, sum#72, isEmpty#73] -Arguments: hashpartitioning(c_last_name#41, c_first_name#40, 5), true, [id=#74] +Arguments: hashpartitioning(c_last_name#41, c_first_name#40, 5), ENSURE_REQUIREMENTS, [id=#74] (134) HashAggregate [codegen id : 52] Input [4]: [c_last_name#41, c_first_name#40, sum#72, isEmpty#73] @@ -828,7 +828,7 @@ Input [5]: [ss_sold_date_sk#7, ss_customer_sk#24, ss_quantity#25, ss_sales_price (147) Exchange Input [3]: [ss_customer_sk#24, ss_quantity#25, ss_sales_price#26] -Arguments: hashpartitioning(ss_customer_sk#24, 5), true, [id=#78] +Arguments: hashpartitioning(ss_customer_sk#24, 5), ENSURE_REQUIREMENTS, [id=#78] (148) Sort [codegen id : 3] Input [3]: [ss_customer_sk#24, ss_quantity#25, ss_sales_price#26] @@ -850,7 +850,7 @@ Condition : isnotnull(c_customer_sk#28) (152) Exchange Input [1]: [c_customer_sk#28] -Arguments: hashpartitioning(c_customer_sk#28, 5), true, [id=#79] +Arguments: hashpartitioning(c_customer_sk#28, 5), ENSURE_REQUIREMENTS, [id=#79] (153) Sort [codegen id : 5] Input [1]: [c_customer_sk#28] @@ -888,7 +888,7 @@ Results [1]: [max#87] (159) Exchange Input [1]: [max#87] -Arguments: SinglePartition, true, [id=#88] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#88] (160) HashAggregate [codegen id : 7] Input [1]: [max#87] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q23b/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q23b/explain.txt index b5213786c93bc..2f8a7f439c102 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q23b/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q23b/explain.txt @@ -193,7 +193,7 @@ Results [4]: [substr(i_item_desc#13, 1, 30)#15, i_item_sk#12, d_date#9, count#17 (21) Exchange Input [4]: [substr(i_item_desc#13, 1, 30)#15, i_item_sk#12, d_date#9, count#17] -Arguments: hashpartitioning(substr(i_item_desc#13, 1, 30)#15, i_item_sk#12, d_date#9, 5), true, [id=#18] +Arguments: hashpartitioning(substr(i_item_desc#13, 1, 30)#15, i_item_sk#12, d_date#9, 5), ENSURE_REQUIREMENTS, [id=#18] (22) HashAggregate [codegen id : 4] Input [4]: [substr(i_item_desc#13, 1, 30)#15, i_item_sk#12, d_date#9, count#17] @@ -273,7 +273,7 @@ Results [3]: [c_customer_sk#26, sum#30, isEmpty#31] (38) Exchange Input [3]: [c_customer_sk#26, sum#30, isEmpty#31] -Arguments: hashpartitioning(c_customer_sk#26, 5), true, [id=#32] +Arguments: hashpartitioning(c_customer_sk#26, 5), ENSURE_REQUIREMENTS, [id=#32] (39) HashAggregate [codegen id : 7] Input [3]: [c_customer_sk#26, sum#30, isEmpty#31] @@ -393,7 +393,7 @@ Results [4]: [c_last_name#39, c_first_name#38, sum#47, isEmpty#48] (64) Exchange Input [4]: [c_last_name#39, c_first_name#38, sum#47, isEmpty#48] -Arguments: hashpartitioning(c_last_name#39, c_first_name#38, 5), true, [id=#49] +Arguments: hashpartitioning(c_last_name#39, c_first_name#38, 5), ENSURE_REQUIREMENTS, [id=#49] (65) HashAggregate [codegen id : 14] Input [4]: [c_last_name#39, c_first_name#38, sum#47, isEmpty#48] @@ -530,7 +530,7 @@ Results [4]: [c_last_name#39, c_first_name#38, sum#67, isEmpty#68] (94) Exchange Input [4]: [c_last_name#39, c_first_name#38, sum#67, isEmpty#68] -Arguments: hashpartitioning(c_last_name#39, c_first_name#38, 5), true, [id=#69] +Arguments: hashpartitioning(c_last_name#39, c_first_name#38, 5), ENSURE_REQUIREMENTS, [id=#69] (95) HashAggregate [codegen id : 28] Input [4]: [c_last_name#39, c_first_name#38, sum#67, isEmpty#68] @@ -653,7 +653,7 @@ Results [3]: [c_customer_sk#26, sum#76, isEmpty#77] (115) Exchange Input [3]: [c_customer_sk#26, sum#76, isEmpty#77] -Arguments: hashpartitioning(c_customer_sk#26, 5), true, [id=#78] +Arguments: hashpartitioning(c_customer_sk#26, 5), ENSURE_REQUIREMENTS, [id=#78] (116) HashAggregate [codegen id : 4] Input [3]: [c_customer_sk#26, sum#76, isEmpty#77] @@ -671,7 +671,7 @@ Results [1]: [max#82] (118) Exchange Input [1]: [max#82] -Arguments: SinglePartition, true, [id=#83] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#83] (119) HashAggregate [codegen id : 5] Input [1]: [max#82] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q25/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q25/explain.txt index 6bdd709a7d7a5..198a783871871 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q25/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q25/explain.txt @@ -254,7 +254,7 @@ Results [7]: [i_item_id#32, i_item_desc#33, s_store_id#28, s_store_name#29, sum# (46) Exchange Input [7]: [i_item_id#32, i_item_desc#33, s_store_id#28, s_store_name#29, sum#38, sum#39, sum#40] -Arguments: hashpartitioning(i_item_id#32, i_item_desc#33, s_store_id#28, s_store_name#29, 5), true, [id=#41] +Arguments: hashpartitioning(i_item_id#32, i_item_desc#33, s_store_id#28, s_store_name#29, 5), ENSURE_REQUIREMENTS, [id=#41] (47) HashAggregate [codegen id : 9] Input [7]: [i_item_id#32, i_item_desc#33, s_store_id#28, s_store_name#29, sum#38, sum#39, sum#40] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q26.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q26.sf100/explain.txt index 2a366c86fb264..a8d9b93b05e28 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q26.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q26.sf100/explain.txt @@ -172,20 +172,20 @@ Input [7]: [cs_item_sk#3, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_c (31) HashAggregate [codegen id : 5] Input [5]: [cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, i_item_id#22] Keys [1]: [i_item_id#22] -Functions [4]: [partial_avg(cast(cs_quantity#5 as bigint)), partial_avg(UnscaledValue(cs_list_price#6)), partial_avg(UnscaledValue(cs_coupon_amt#8)), partial_avg(UnscaledValue(cs_sales_price#7))] +Functions [4]: [partial_avg(cs_quantity#5), partial_avg(UnscaledValue(cs_list_price#6)), partial_avg(UnscaledValue(cs_coupon_amt#8)), partial_avg(UnscaledValue(cs_sales_price#7))] Aggregate Attributes [8]: [sum#24, count#25, sum#26, count#27, sum#28, count#29, sum#30, count#31] Results [9]: [i_item_id#22, sum#32, count#33, sum#34, count#35, sum#36, count#37, sum#38, count#39] (32) Exchange Input [9]: [i_item_id#22, sum#32, count#33, sum#34, count#35, sum#36, count#37, sum#38, count#39] -Arguments: hashpartitioning(i_item_id#22, 5), true, [id=#40] +Arguments: hashpartitioning(i_item_id#22, 5), ENSURE_REQUIREMENTS, [id=#40] (33) HashAggregate [codegen id : 6] Input [9]: [i_item_id#22, sum#32, count#33, sum#34, count#35, sum#36, count#37, sum#38, count#39] Keys [1]: [i_item_id#22] -Functions [4]: [avg(cast(cs_quantity#5 as bigint)), avg(UnscaledValue(cs_list_price#6)), avg(UnscaledValue(cs_coupon_amt#8)), avg(UnscaledValue(cs_sales_price#7))] -Aggregate Attributes [4]: [avg(cast(cs_quantity#5 as bigint))#41, avg(UnscaledValue(cs_list_price#6))#42, avg(UnscaledValue(cs_coupon_amt#8))#43, avg(UnscaledValue(cs_sales_price#7))#44] -Results [5]: [i_item_id#22, avg(cast(cs_quantity#5 as bigint))#41 AS agg1#45, cast((avg(UnscaledValue(cs_list_price#6))#42 / 100.0) as decimal(11,6)) AS agg2#46, cast((avg(UnscaledValue(cs_coupon_amt#8))#43 / 100.0) as decimal(11,6)) AS agg3#47, cast((avg(UnscaledValue(cs_sales_price#7))#44 / 100.0) as decimal(11,6)) AS agg4#48] +Functions [4]: [avg(cs_quantity#5), avg(UnscaledValue(cs_list_price#6)), avg(UnscaledValue(cs_coupon_amt#8)), avg(UnscaledValue(cs_sales_price#7))] +Aggregate Attributes [4]: [avg(cs_quantity#5)#41, avg(UnscaledValue(cs_list_price#6))#42, avg(UnscaledValue(cs_coupon_amt#8))#43, avg(UnscaledValue(cs_sales_price#7))#44] +Results [5]: [i_item_id#22, avg(cs_quantity#5)#41 AS agg1#45, cast((avg(UnscaledValue(cs_list_price#6))#42 / 100.0) as decimal(11,6)) AS agg2#46, cast((avg(UnscaledValue(cs_coupon_amt#8))#43 / 100.0) as decimal(11,6)) AS agg3#47, cast((avg(UnscaledValue(cs_sales_price#7))#44 / 100.0) as decimal(11,6)) AS agg4#48] (34) TakeOrderedAndProject Input [5]: [i_item_id#22, agg1#45, agg2#46, agg3#47, agg4#48] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q26.sf100/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q26.sf100/simplified.txt index d4ae376d5b425..9c360a9cabde4 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q26.sf100/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q26.sf100/simplified.txt @@ -1,6 +1,6 @@ TakeOrderedAndProject [i_item_id,agg1,agg2,agg3,agg4] WholeStageCodegen (6) - HashAggregate [i_item_id,sum,count,sum,count,sum,count,sum,count] [avg(cast(cs_quantity as bigint)),avg(UnscaledValue(cs_list_price)),avg(UnscaledValue(cs_coupon_amt)),avg(UnscaledValue(cs_sales_price)),agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] + HashAggregate [i_item_id,sum,count,sum,count,sum,count,sum,count] [avg(cs_quantity),avg(UnscaledValue(cs_list_price)),avg(UnscaledValue(cs_coupon_amt)),avg(UnscaledValue(cs_sales_price)),agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] InputAdapter Exchange [i_item_id] #1 WholeStageCodegen (5) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q26/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q26/explain.txt index 12e953427394f..ac87e345fe6fa 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q26/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q26/explain.txt @@ -172,20 +172,20 @@ Input [7]: [cs_promo_sk#4, cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_ (31) HashAggregate [codegen id : 5] Input [5]: [cs_quantity#5, cs_list_price#6, cs_sales_price#7, cs_coupon_amt#8, i_item_id#18] Keys [1]: [i_item_id#18] -Functions [4]: [partial_avg(cast(cs_quantity#5 as bigint)), partial_avg(UnscaledValue(cs_list_price#6)), partial_avg(UnscaledValue(cs_coupon_amt#8)), partial_avg(UnscaledValue(cs_sales_price#7))] +Functions [4]: [partial_avg(cs_quantity#5), partial_avg(UnscaledValue(cs_list_price#6)), partial_avg(UnscaledValue(cs_coupon_amt#8)), partial_avg(UnscaledValue(cs_sales_price#7))] Aggregate Attributes [8]: [sum#24, count#25, sum#26, count#27, sum#28, count#29, sum#30, count#31] Results [9]: [i_item_id#18, sum#32, count#33, sum#34, count#35, sum#36, count#37, sum#38, count#39] (32) Exchange Input [9]: [i_item_id#18, sum#32, count#33, sum#34, count#35, sum#36, count#37, sum#38, count#39] -Arguments: hashpartitioning(i_item_id#18, 5), true, [id=#40] +Arguments: hashpartitioning(i_item_id#18, 5), ENSURE_REQUIREMENTS, [id=#40] (33) HashAggregate [codegen id : 6] Input [9]: [i_item_id#18, sum#32, count#33, sum#34, count#35, sum#36, count#37, sum#38, count#39] Keys [1]: [i_item_id#18] -Functions [4]: [avg(cast(cs_quantity#5 as bigint)), avg(UnscaledValue(cs_list_price#6)), avg(UnscaledValue(cs_coupon_amt#8)), avg(UnscaledValue(cs_sales_price#7))] -Aggregate Attributes [4]: [avg(cast(cs_quantity#5 as bigint))#41, avg(UnscaledValue(cs_list_price#6))#42, avg(UnscaledValue(cs_coupon_amt#8))#43, avg(UnscaledValue(cs_sales_price#7))#44] -Results [5]: [i_item_id#18, avg(cast(cs_quantity#5 as bigint))#41 AS agg1#45, cast((avg(UnscaledValue(cs_list_price#6))#42 / 100.0) as decimal(11,6)) AS agg2#46, cast((avg(UnscaledValue(cs_coupon_amt#8))#43 / 100.0) as decimal(11,6)) AS agg3#47, cast((avg(UnscaledValue(cs_sales_price#7))#44 / 100.0) as decimal(11,6)) AS agg4#48] +Functions [4]: [avg(cs_quantity#5), avg(UnscaledValue(cs_list_price#6)), avg(UnscaledValue(cs_coupon_amt#8)), avg(UnscaledValue(cs_sales_price#7))] +Aggregate Attributes [4]: [avg(cs_quantity#5)#41, avg(UnscaledValue(cs_list_price#6))#42, avg(UnscaledValue(cs_coupon_amt#8))#43, avg(UnscaledValue(cs_sales_price#7))#44] +Results [5]: [i_item_id#18, avg(cs_quantity#5)#41 AS agg1#45, cast((avg(UnscaledValue(cs_list_price#6))#42 / 100.0) as decimal(11,6)) AS agg2#46, cast((avg(UnscaledValue(cs_coupon_amt#8))#43 / 100.0) as decimal(11,6)) AS agg3#47, cast((avg(UnscaledValue(cs_sales_price#7))#44 / 100.0) as decimal(11,6)) AS agg4#48] (34) TakeOrderedAndProject Input [5]: [i_item_id#18, agg1#45, agg2#46, agg3#47, agg4#48] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q26/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q26/simplified.txt index 94ce760c24952..59ed1e62d4a7c 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q26/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q26/simplified.txt @@ -1,6 +1,6 @@ TakeOrderedAndProject [i_item_id,agg1,agg2,agg3,agg4] WholeStageCodegen (6) - HashAggregate [i_item_id,sum,count,sum,count,sum,count,sum,count] [avg(cast(cs_quantity as bigint)),avg(UnscaledValue(cs_list_price)),avg(UnscaledValue(cs_coupon_amt)),avg(UnscaledValue(cs_sales_price)),agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] + HashAggregate [i_item_id,sum,count,sum,count,sum,count,sum,count] [avg(cs_quantity),avg(UnscaledValue(cs_list_price)),avg(UnscaledValue(cs_coupon_amt)),avg(UnscaledValue(cs_sales_price)),agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] InputAdapter Exchange [i_item_id] #1 WholeStageCodegen (5) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q27.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q27.sf100/explain.txt index 16aeff7a222ae..1216d80736712 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q27.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q27.sf100/explain.txt @@ -172,20 +172,20 @@ Arguments: [List(ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_coupon_amt (31) HashAggregate [codegen id : 5] Input [7]: [ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_coupon_amt#8, i_item_id#23, s_state#24, spark_grouping_id#25] Keys [3]: [i_item_id#23, s_state#24, spark_grouping_id#25] -Functions [4]: [partial_avg(cast(ss_quantity#5 as bigint)), partial_avg(UnscaledValue(ss_list_price#6)), partial_avg(UnscaledValue(ss_coupon_amt#8)), partial_avg(UnscaledValue(ss_sales_price#7))] +Functions [4]: [partial_avg(ss_quantity#5), partial_avg(UnscaledValue(ss_list_price#6)), partial_avg(UnscaledValue(ss_coupon_amt#8)), partial_avg(UnscaledValue(ss_sales_price#7))] Aggregate Attributes [8]: [sum#26, count#27, sum#28, count#29, sum#30, count#31, sum#32, count#33] Results [11]: [i_item_id#23, s_state#24, spark_grouping_id#25, sum#34, count#35, sum#36, count#37, sum#38, count#39, sum#40, count#41] (32) Exchange Input [11]: [i_item_id#23, s_state#24, spark_grouping_id#25, sum#34, count#35, sum#36, count#37, sum#38, count#39, sum#40, count#41] -Arguments: hashpartitioning(i_item_id#23, s_state#24, spark_grouping_id#25, 5), true, [id=#42] +Arguments: hashpartitioning(i_item_id#23, s_state#24, spark_grouping_id#25, 5), ENSURE_REQUIREMENTS, [id=#42] (33) HashAggregate [codegen id : 6] Input [11]: [i_item_id#23, s_state#24, spark_grouping_id#25, sum#34, count#35, sum#36, count#37, sum#38, count#39, sum#40, count#41] Keys [3]: [i_item_id#23, s_state#24, spark_grouping_id#25] -Functions [4]: [avg(cast(ss_quantity#5 as bigint)), avg(UnscaledValue(ss_list_price#6)), avg(UnscaledValue(ss_coupon_amt#8)), avg(UnscaledValue(ss_sales_price#7))] -Aggregate Attributes [4]: [avg(cast(ss_quantity#5 as bigint))#43, avg(UnscaledValue(ss_list_price#6))#44, avg(UnscaledValue(ss_coupon_amt#8))#45, avg(UnscaledValue(ss_sales_price#7))#46] -Results [7]: [i_item_id#23, s_state#24, cast((shiftright(spark_grouping_id#25, 0) & 1) as tinyint) AS g_state#47, avg(cast(ss_quantity#5 as bigint))#43 AS agg1#48, cast((avg(UnscaledValue(ss_list_price#6))#44 / 100.0) as decimal(11,6)) AS agg2#49, cast((avg(UnscaledValue(ss_coupon_amt#8))#45 / 100.0) as decimal(11,6)) AS agg3#50, cast((avg(UnscaledValue(ss_sales_price#7))#46 / 100.0) as decimal(11,6)) AS agg4#51] +Functions [4]: [avg(ss_quantity#5), avg(UnscaledValue(ss_list_price#6)), avg(UnscaledValue(ss_coupon_amt#8)), avg(UnscaledValue(ss_sales_price#7))] +Aggregate Attributes [4]: [avg(ss_quantity#5)#43, avg(UnscaledValue(ss_list_price#6))#44, avg(UnscaledValue(ss_coupon_amt#8))#45, avg(UnscaledValue(ss_sales_price#7))#46] +Results [7]: [i_item_id#23, s_state#24, cast((shiftright(spark_grouping_id#25, 0) & 1) as tinyint) AS g_state#47, avg(ss_quantity#5)#43 AS agg1#48, cast((avg(UnscaledValue(ss_list_price#6))#44 / 100.0) as decimal(11,6)) AS agg2#49, cast((avg(UnscaledValue(ss_coupon_amt#8))#45 / 100.0) as decimal(11,6)) AS agg3#50, cast((avg(UnscaledValue(ss_sales_price#7))#46 / 100.0) as decimal(11,6)) AS agg4#51] (34) TakeOrderedAndProject Input [7]: [i_item_id#23, s_state#24, g_state#47, agg1#48, agg2#49, agg3#50, agg4#51] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q27.sf100/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q27.sf100/simplified.txt index 204094d444927..96d6349d234b4 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q27.sf100/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q27.sf100/simplified.txt @@ -1,6 +1,6 @@ TakeOrderedAndProject [i_item_id,s_state,g_state,agg1,agg2,agg3,agg4] WholeStageCodegen (6) - HashAggregate [i_item_id,s_state,spark_grouping_id,sum,count,sum,count,sum,count,sum,count] [avg(cast(ss_quantity as bigint)),avg(UnscaledValue(ss_list_price)),avg(UnscaledValue(ss_coupon_amt)),avg(UnscaledValue(ss_sales_price)),g_state,agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] + HashAggregate [i_item_id,s_state,spark_grouping_id,sum,count,sum,count,sum,count,sum,count] [avg(ss_quantity),avg(UnscaledValue(ss_list_price)),avg(UnscaledValue(ss_coupon_amt)),avg(UnscaledValue(ss_sales_price)),g_state,agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] InputAdapter Exchange [i_item_id,s_state,spark_grouping_id] #1 WholeStageCodegen (5) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q27/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q27/explain.txt index 16aeff7a222ae..1216d80736712 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q27/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q27/explain.txt @@ -172,20 +172,20 @@ Arguments: [List(ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_coupon_amt (31) HashAggregate [codegen id : 5] Input [7]: [ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_coupon_amt#8, i_item_id#23, s_state#24, spark_grouping_id#25] Keys [3]: [i_item_id#23, s_state#24, spark_grouping_id#25] -Functions [4]: [partial_avg(cast(ss_quantity#5 as bigint)), partial_avg(UnscaledValue(ss_list_price#6)), partial_avg(UnscaledValue(ss_coupon_amt#8)), partial_avg(UnscaledValue(ss_sales_price#7))] +Functions [4]: [partial_avg(ss_quantity#5), partial_avg(UnscaledValue(ss_list_price#6)), partial_avg(UnscaledValue(ss_coupon_amt#8)), partial_avg(UnscaledValue(ss_sales_price#7))] Aggregate Attributes [8]: [sum#26, count#27, sum#28, count#29, sum#30, count#31, sum#32, count#33] Results [11]: [i_item_id#23, s_state#24, spark_grouping_id#25, sum#34, count#35, sum#36, count#37, sum#38, count#39, sum#40, count#41] (32) Exchange Input [11]: [i_item_id#23, s_state#24, spark_grouping_id#25, sum#34, count#35, sum#36, count#37, sum#38, count#39, sum#40, count#41] -Arguments: hashpartitioning(i_item_id#23, s_state#24, spark_grouping_id#25, 5), true, [id=#42] +Arguments: hashpartitioning(i_item_id#23, s_state#24, spark_grouping_id#25, 5), ENSURE_REQUIREMENTS, [id=#42] (33) HashAggregate [codegen id : 6] Input [11]: [i_item_id#23, s_state#24, spark_grouping_id#25, sum#34, count#35, sum#36, count#37, sum#38, count#39, sum#40, count#41] Keys [3]: [i_item_id#23, s_state#24, spark_grouping_id#25] -Functions [4]: [avg(cast(ss_quantity#5 as bigint)), avg(UnscaledValue(ss_list_price#6)), avg(UnscaledValue(ss_coupon_amt#8)), avg(UnscaledValue(ss_sales_price#7))] -Aggregate Attributes [4]: [avg(cast(ss_quantity#5 as bigint))#43, avg(UnscaledValue(ss_list_price#6))#44, avg(UnscaledValue(ss_coupon_amt#8))#45, avg(UnscaledValue(ss_sales_price#7))#46] -Results [7]: [i_item_id#23, s_state#24, cast((shiftright(spark_grouping_id#25, 0) & 1) as tinyint) AS g_state#47, avg(cast(ss_quantity#5 as bigint))#43 AS agg1#48, cast((avg(UnscaledValue(ss_list_price#6))#44 / 100.0) as decimal(11,6)) AS agg2#49, cast((avg(UnscaledValue(ss_coupon_amt#8))#45 / 100.0) as decimal(11,6)) AS agg3#50, cast((avg(UnscaledValue(ss_sales_price#7))#46 / 100.0) as decimal(11,6)) AS agg4#51] +Functions [4]: [avg(ss_quantity#5), avg(UnscaledValue(ss_list_price#6)), avg(UnscaledValue(ss_coupon_amt#8)), avg(UnscaledValue(ss_sales_price#7))] +Aggregate Attributes [4]: [avg(ss_quantity#5)#43, avg(UnscaledValue(ss_list_price#6))#44, avg(UnscaledValue(ss_coupon_amt#8))#45, avg(UnscaledValue(ss_sales_price#7))#46] +Results [7]: [i_item_id#23, s_state#24, cast((shiftright(spark_grouping_id#25, 0) & 1) as tinyint) AS g_state#47, avg(ss_quantity#5)#43 AS agg1#48, cast((avg(UnscaledValue(ss_list_price#6))#44 / 100.0) as decimal(11,6)) AS agg2#49, cast((avg(UnscaledValue(ss_coupon_amt#8))#45 / 100.0) as decimal(11,6)) AS agg3#50, cast((avg(UnscaledValue(ss_sales_price#7))#46 / 100.0) as decimal(11,6)) AS agg4#51] (34) TakeOrderedAndProject Input [7]: [i_item_id#23, s_state#24, g_state#47, agg1#48, agg2#49, agg3#50, agg4#51] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q27/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q27/simplified.txt index 204094d444927..96d6349d234b4 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q27/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q27/simplified.txt @@ -1,6 +1,6 @@ TakeOrderedAndProject [i_item_id,s_state,g_state,agg1,agg2,agg3,agg4] WholeStageCodegen (6) - HashAggregate [i_item_id,s_state,spark_grouping_id,sum,count,sum,count,sum,count,sum,count] [avg(cast(ss_quantity as bigint)),avg(UnscaledValue(ss_list_price)),avg(UnscaledValue(ss_coupon_amt)),avg(UnscaledValue(ss_sales_price)),g_state,agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] + HashAggregate [i_item_id,s_state,spark_grouping_id,sum,count,sum,count,sum,count,sum,count] [avg(ss_quantity),avg(UnscaledValue(ss_list_price)),avg(UnscaledValue(ss_coupon_amt)),avg(UnscaledValue(ss_sales_price)),g_state,agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] InputAdapter Exchange [i_item_id,s_state,spark_grouping_id] #1 WholeStageCodegen (5) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q28.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q28.sf100/explain.txt index a0f029c9b9325..1564edc0b0911 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q28.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q28.sf100/explain.txt @@ -98,7 +98,7 @@ Results [4]: [ss_list_price#3, sum#7, count#8, count#9] (6) Exchange Input [4]: [ss_list_price#3, sum#7, count#8, count#9] -Arguments: hashpartitioning(ss_list_price#3, 5), true, [id=#10] +Arguments: hashpartitioning(ss_list_price#3, 5), ENSURE_REQUIREMENTS, [id=#10] (7) HashAggregate [codegen id : 2] Input [4]: [ss_list_price#3, sum#7, count#8, count#9] @@ -116,7 +116,7 @@ Results [4]: [sum#7, count#8, count#9, count#12] (9) Exchange Input [4]: [sum#7, count#8, count#9, count#12] -Arguments: SinglePartition, true, [id=#13] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#13] (10) HashAggregate [codegen id : 3] Input [4]: [sum#7, count#8, count#9, count#12] @@ -152,7 +152,7 @@ Results [4]: [ss_list_price#3, sum#19, count#20, count#21] (16) Exchange Input [4]: [ss_list_price#3, sum#19, count#20, count#21] -Arguments: hashpartitioning(ss_list_price#3, 5), true, [id=#22] +Arguments: hashpartitioning(ss_list_price#3, 5), ENSURE_REQUIREMENTS, [id=#22] (17) HashAggregate [codegen id : 5] Input [4]: [ss_list_price#3, sum#19, count#20, count#21] @@ -170,7 +170,7 @@ Results [4]: [sum#19, count#20, count#21, count#24] (19) Exchange Input [4]: [sum#19, count#20, count#21, count#24] -Arguments: SinglePartition, true, [id=#25] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#25] (20) HashAggregate [codegen id : 6] Input [4]: [sum#19, count#20, count#21, count#24] @@ -213,7 +213,7 @@ Results [4]: [ss_list_price#3, sum#32, count#33, count#34] (28) Exchange Input [4]: [ss_list_price#3, sum#32, count#33, count#34] -Arguments: hashpartitioning(ss_list_price#3, 5), true, [id=#35] +Arguments: hashpartitioning(ss_list_price#3, 5), ENSURE_REQUIREMENTS, [id=#35] (29) HashAggregate [codegen id : 8] Input [4]: [ss_list_price#3, sum#32, count#33, count#34] @@ -231,7 +231,7 @@ Results [4]: [sum#32, count#33, count#34, count#37] (31) Exchange Input [4]: [sum#32, count#33, count#34, count#37] -Arguments: SinglePartition, true, [id=#38] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#38] (32) HashAggregate [codegen id : 9] Input [4]: [sum#32, count#33, count#34, count#37] @@ -274,7 +274,7 @@ Results [4]: [ss_list_price#3, sum#45, count#46, count#47] (40) Exchange Input [4]: [ss_list_price#3, sum#45, count#46, count#47] -Arguments: hashpartitioning(ss_list_price#3, 5), true, [id=#48] +Arguments: hashpartitioning(ss_list_price#3, 5), ENSURE_REQUIREMENTS, [id=#48] (41) HashAggregate [codegen id : 11] Input [4]: [ss_list_price#3, sum#45, count#46, count#47] @@ -292,7 +292,7 @@ Results [4]: [sum#45, count#46, count#47, count#50] (43) Exchange Input [4]: [sum#45, count#46, count#47, count#50] -Arguments: SinglePartition, true, [id=#51] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#51] (44) HashAggregate [codegen id : 12] Input [4]: [sum#45, count#46, count#47, count#50] @@ -335,7 +335,7 @@ Results [4]: [ss_list_price#3, sum#58, count#59, count#60] (52) Exchange Input [4]: [ss_list_price#3, sum#58, count#59, count#60] -Arguments: hashpartitioning(ss_list_price#3, 5), true, [id=#61] +Arguments: hashpartitioning(ss_list_price#3, 5), ENSURE_REQUIREMENTS, [id=#61] (53) HashAggregate [codegen id : 14] Input [4]: [ss_list_price#3, sum#58, count#59, count#60] @@ -353,7 +353,7 @@ Results [4]: [sum#58, count#59, count#60, count#63] (55) Exchange Input [4]: [sum#58, count#59, count#60, count#63] -Arguments: SinglePartition, true, [id=#64] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#64] (56) HashAggregate [codegen id : 15] Input [4]: [sum#58, count#59, count#60, count#63] @@ -396,7 +396,7 @@ Results [4]: [ss_list_price#3, sum#71, count#72, count#73] (64) Exchange Input [4]: [ss_list_price#3, sum#71, count#72, count#73] -Arguments: hashpartitioning(ss_list_price#3, 5), true, [id=#74] +Arguments: hashpartitioning(ss_list_price#3, 5), ENSURE_REQUIREMENTS, [id=#74] (65) HashAggregate [codegen id : 17] Input [4]: [ss_list_price#3, sum#71, count#72, count#73] @@ -414,7 +414,7 @@ Results [4]: [sum#71, count#72, count#73, count#76] (67) Exchange Input [4]: [sum#71, count#72, count#73, count#76] -Arguments: SinglePartition, true, [id=#77] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#77] (68) HashAggregate [codegen id : 18] Input [4]: [sum#71, count#72, count#73, count#76] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q28/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q28/explain.txt index a0f029c9b9325..1564edc0b0911 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q28/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q28/explain.txt @@ -98,7 +98,7 @@ Results [4]: [ss_list_price#3, sum#7, count#8, count#9] (6) Exchange Input [4]: [ss_list_price#3, sum#7, count#8, count#9] -Arguments: hashpartitioning(ss_list_price#3, 5), true, [id=#10] +Arguments: hashpartitioning(ss_list_price#3, 5), ENSURE_REQUIREMENTS, [id=#10] (7) HashAggregate [codegen id : 2] Input [4]: [ss_list_price#3, sum#7, count#8, count#9] @@ -116,7 +116,7 @@ Results [4]: [sum#7, count#8, count#9, count#12] (9) Exchange Input [4]: [sum#7, count#8, count#9, count#12] -Arguments: SinglePartition, true, [id=#13] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#13] (10) HashAggregate [codegen id : 3] Input [4]: [sum#7, count#8, count#9, count#12] @@ -152,7 +152,7 @@ Results [4]: [ss_list_price#3, sum#19, count#20, count#21] (16) Exchange Input [4]: [ss_list_price#3, sum#19, count#20, count#21] -Arguments: hashpartitioning(ss_list_price#3, 5), true, [id=#22] +Arguments: hashpartitioning(ss_list_price#3, 5), ENSURE_REQUIREMENTS, [id=#22] (17) HashAggregate [codegen id : 5] Input [4]: [ss_list_price#3, sum#19, count#20, count#21] @@ -170,7 +170,7 @@ Results [4]: [sum#19, count#20, count#21, count#24] (19) Exchange Input [4]: [sum#19, count#20, count#21, count#24] -Arguments: SinglePartition, true, [id=#25] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#25] (20) HashAggregate [codegen id : 6] Input [4]: [sum#19, count#20, count#21, count#24] @@ -213,7 +213,7 @@ Results [4]: [ss_list_price#3, sum#32, count#33, count#34] (28) Exchange Input [4]: [ss_list_price#3, sum#32, count#33, count#34] -Arguments: hashpartitioning(ss_list_price#3, 5), true, [id=#35] +Arguments: hashpartitioning(ss_list_price#3, 5), ENSURE_REQUIREMENTS, [id=#35] (29) HashAggregate [codegen id : 8] Input [4]: [ss_list_price#3, sum#32, count#33, count#34] @@ -231,7 +231,7 @@ Results [4]: [sum#32, count#33, count#34, count#37] (31) Exchange Input [4]: [sum#32, count#33, count#34, count#37] -Arguments: SinglePartition, true, [id=#38] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#38] (32) HashAggregate [codegen id : 9] Input [4]: [sum#32, count#33, count#34, count#37] @@ -274,7 +274,7 @@ Results [4]: [ss_list_price#3, sum#45, count#46, count#47] (40) Exchange Input [4]: [ss_list_price#3, sum#45, count#46, count#47] -Arguments: hashpartitioning(ss_list_price#3, 5), true, [id=#48] +Arguments: hashpartitioning(ss_list_price#3, 5), ENSURE_REQUIREMENTS, [id=#48] (41) HashAggregate [codegen id : 11] Input [4]: [ss_list_price#3, sum#45, count#46, count#47] @@ -292,7 +292,7 @@ Results [4]: [sum#45, count#46, count#47, count#50] (43) Exchange Input [4]: [sum#45, count#46, count#47, count#50] -Arguments: SinglePartition, true, [id=#51] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#51] (44) HashAggregate [codegen id : 12] Input [4]: [sum#45, count#46, count#47, count#50] @@ -335,7 +335,7 @@ Results [4]: [ss_list_price#3, sum#58, count#59, count#60] (52) Exchange Input [4]: [ss_list_price#3, sum#58, count#59, count#60] -Arguments: hashpartitioning(ss_list_price#3, 5), true, [id=#61] +Arguments: hashpartitioning(ss_list_price#3, 5), ENSURE_REQUIREMENTS, [id=#61] (53) HashAggregate [codegen id : 14] Input [4]: [ss_list_price#3, sum#58, count#59, count#60] @@ -353,7 +353,7 @@ Results [4]: [sum#58, count#59, count#60, count#63] (55) Exchange Input [4]: [sum#58, count#59, count#60, count#63] -Arguments: SinglePartition, true, [id=#64] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#64] (56) HashAggregate [codegen id : 15] Input [4]: [sum#58, count#59, count#60, count#63] @@ -396,7 +396,7 @@ Results [4]: [ss_list_price#3, sum#71, count#72, count#73] (64) Exchange Input [4]: [ss_list_price#3, sum#71, count#72, count#73] -Arguments: hashpartitioning(ss_list_price#3, 5), true, [id=#74] +Arguments: hashpartitioning(ss_list_price#3, 5), ENSURE_REQUIREMENTS, [id=#74] (65) HashAggregate [codegen id : 17] Input [4]: [ss_list_price#3, sum#71, count#72, count#73] @@ -414,7 +414,7 @@ Results [4]: [sum#71, count#72, count#73, count#76] (67) Exchange Input [4]: [sum#71, count#72, count#73, count#76] -Arguments: SinglePartition, true, [id=#77] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#77] (68) HashAggregate [codegen id : 18] Input [4]: [sum#71, count#72, count#73, count#76] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q29.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q29.sf100/explain.txt index a949b93f3bcb0..4c3a980300498 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q29.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q29.sf100/explain.txt @@ -136,7 +136,7 @@ Input [8]: [ss_item_sk#2, ss_customer_sk#3, ss_store_sk#4, ss_ticket_number#5, s (17) Exchange Input [6]: [ss_item_sk#2, ss_customer_sk#3, ss_ticket_number#5, ss_quantity#6, s_store_id#12, s_store_name#13] -Arguments: hashpartitioning(ss_item_sk#2, 5), true, [id=#15] +Arguments: hashpartitioning(ss_item_sk#2, 5), ENSURE_REQUIREMENTS, [id=#15] (18) Sort [codegen id : 4] Input [6]: [ss_item_sk#2, ss_customer_sk#3, ss_ticket_number#5, ss_quantity#6, s_store_id#12, s_store_name#13] @@ -158,7 +158,7 @@ Condition : isnotnull(i_item_sk#16) (22) Exchange Input [3]: [i_item_sk#16, i_item_id#17, i_item_desc#18] -Arguments: hashpartitioning(i_item_sk#16, 5), true, [id=#19] +Arguments: hashpartitioning(i_item_sk#16, 5), ENSURE_REQUIREMENTS, [id=#19] (23) Sort [codegen id : 6] Input [3]: [i_item_sk#16, i_item_id#17, i_item_desc#18] @@ -175,7 +175,7 @@ Input [9]: [ss_item_sk#2, ss_customer_sk#3, ss_ticket_number#5, ss_quantity#6, s (26) Exchange Input [8]: [ss_item_sk#2, ss_customer_sk#3, ss_ticket_number#5, ss_quantity#6, s_store_id#12, s_store_name#13, i_item_id#17, i_item_desc#18] -Arguments: hashpartitioning(cast(ss_customer_sk#3 as bigint), cast(ss_item_sk#2 as bigint), cast(ss_ticket_number#5 as bigint), 5), true, [id=#20] +Arguments: hashpartitioning(cast(ss_customer_sk#3 as bigint), cast(ss_item_sk#2 as bigint), cast(ss_ticket_number#5 as bigint), 5), ENSURE_REQUIREMENTS, [id=#20] (27) Sort [codegen id : 8] Input [8]: [ss_item_sk#2, ss_customer_sk#3, ss_ticket_number#5, ss_quantity#6, s_store_id#12, s_store_name#13, i_item_id#17, i_item_desc#18] @@ -228,7 +228,7 @@ Input [6]: [sr_returned_date_sk#21, sr_item_sk#22, sr_customer_sk#23, sr_ticket_ (38) Exchange Input [4]: [sr_item_sk#22, sr_customer_sk#23, sr_ticket_number#24, sr_return_quantity#25] -Arguments: hashpartitioning(sr_customer_sk#23, sr_item_sk#22, sr_ticket_number#24, 5), true, [id=#30] +Arguments: hashpartitioning(sr_customer_sk#23, sr_item_sk#22, sr_ticket_number#24, 5), ENSURE_REQUIREMENTS, [id=#30] (39) Sort [codegen id : 11] Input [4]: [sr_item_sk#22, sr_customer_sk#23, sr_ticket_number#24, sr_return_quantity#25] @@ -245,7 +245,7 @@ Input [12]: [ss_item_sk#2, ss_customer_sk#3, ss_ticket_number#5, ss_quantity#6, (42) Exchange Input [8]: [ss_quantity#6, s_store_id#12, s_store_name#13, i_item_id#17, i_item_desc#18, sr_item_sk#22, sr_customer_sk#23, sr_return_quantity#25] -Arguments: hashpartitioning(sr_customer_sk#23, sr_item_sk#22, 5), true, [id=#31] +Arguments: hashpartitioning(sr_customer_sk#23, sr_item_sk#22, 5), ENSURE_REQUIREMENTS, [id=#31] (43) Sort [codegen id : 13] Input [8]: [ss_quantity#6, s_store_id#12, s_store_name#13, i_item_id#17, i_item_desc#18, sr_item_sk#22, sr_customer_sk#23, sr_return_quantity#25] @@ -298,7 +298,7 @@ Input [5]: [cs_sold_date_sk#32, cs_bill_customer_sk#33, cs_item_sk#34, cs_quanti (54) Exchange Input [3]: [cs_bill_customer_sk#33, cs_item_sk#34, cs_quantity#35] -Arguments: hashpartitioning(cast(cs_bill_customer_sk#33 as bigint), cast(cs_item_sk#34 as bigint), 5), true, [id=#39] +Arguments: hashpartitioning(cast(cs_bill_customer_sk#33 as bigint), cast(cs_item_sk#34 as bigint), 5), ENSURE_REQUIREMENTS, [id=#39] (55) Sort [codegen id : 16] Input [3]: [cs_bill_customer_sk#33, cs_item_sk#34, cs_quantity#35] @@ -316,20 +316,20 @@ Input [11]: [ss_quantity#6, s_store_id#12, s_store_name#13, i_item_id#17, i_item (58) HashAggregate [codegen id : 17] Input [7]: [ss_quantity#6, sr_return_quantity#25, cs_quantity#35, s_store_id#12, s_store_name#13, i_item_id#17, i_item_desc#18] Keys [4]: [i_item_id#17, i_item_desc#18, s_store_id#12, s_store_name#13] -Functions [3]: [partial_sum(cast(ss_quantity#6 as bigint)), partial_sum(cast(sr_return_quantity#25 as bigint)), partial_sum(cast(cs_quantity#35 as bigint))] +Functions [3]: [partial_sum(ss_quantity#6), partial_sum(sr_return_quantity#25), partial_sum(cs_quantity#35)] Aggregate Attributes [3]: [sum#40, sum#41, sum#42] Results [7]: [i_item_id#17, i_item_desc#18, s_store_id#12, s_store_name#13, sum#43, sum#44, sum#45] (59) Exchange Input [7]: [i_item_id#17, i_item_desc#18, s_store_id#12, s_store_name#13, sum#43, sum#44, sum#45] -Arguments: hashpartitioning(i_item_id#17, i_item_desc#18, s_store_id#12, s_store_name#13, 5), true, [id=#46] +Arguments: hashpartitioning(i_item_id#17, i_item_desc#18, s_store_id#12, s_store_name#13, 5), ENSURE_REQUIREMENTS, [id=#46] (60) HashAggregate [codegen id : 18] Input [7]: [i_item_id#17, i_item_desc#18, s_store_id#12, s_store_name#13, sum#43, sum#44, sum#45] Keys [4]: [i_item_id#17, i_item_desc#18, s_store_id#12, s_store_name#13] -Functions [3]: [sum(cast(ss_quantity#6 as bigint)), sum(cast(sr_return_quantity#25 as bigint)), sum(cast(cs_quantity#35 as bigint))] -Aggregate Attributes [3]: [sum(cast(ss_quantity#6 as bigint))#47, sum(cast(sr_return_quantity#25 as bigint))#48, sum(cast(cs_quantity#35 as bigint))#49] -Results [7]: [i_item_id#17, i_item_desc#18, s_store_id#12, s_store_name#13, sum(cast(ss_quantity#6 as bigint))#47 AS store_sales_quantity#50, sum(cast(sr_return_quantity#25 as bigint))#48 AS store_returns_quantity#51, sum(cast(cs_quantity#35 as bigint))#49 AS catalog_sales_quantity#52] +Functions [3]: [sum(ss_quantity#6), sum(sr_return_quantity#25), sum(cs_quantity#35)] +Aggregate Attributes [3]: [sum(ss_quantity#6)#47, sum(sr_return_quantity#25)#48, sum(cs_quantity#35)#49] +Results [7]: [i_item_id#17, i_item_desc#18, s_store_id#12, s_store_name#13, sum(ss_quantity#6)#47 AS store_sales_quantity#50, sum(sr_return_quantity#25)#48 AS store_returns_quantity#51, sum(cs_quantity#35)#49 AS catalog_sales_quantity#52] (61) TakeOrderedAndProject Input [7]: [i_item_id#17, i_item_desc#18, s_store_id#12, s_store_name#13, store_sales_quantity#50, store_returns_quantity#51, catalog_sales_quantity#52] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q29.sf100/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q29.sf100/simplified.txt index ea91af9e8f755..52d94b4b9802d 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q29.sf100/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q29.sf100/simplified.txt @@ -1,6 +1,6 @@ TakeOrderedAndProject [i_item_id,i_item_desc,s_store_id,s_store_name,store_sales_quantity,store_returns_quantity,catalog_sales_quantity] WholeStageCodegen (18) - HashAggregate [i_item_id,i_item_desc,s_store_id,s_store_name,sum,sum,sum] [sum(cast(ss_quantity as bigint)),sum(cast(sr_return_quantity as bigint)),sum(cast(cs_quantity as bigint)),store_sales_quantity,store_returns_quantity,catalog_sales_quantity,sum,sum,sum] + HashAggregate [i_item_id,i_item_desc,s_store_id,s_store_name,sum,sum,sum] [sum(ss_quantity),sum(sr_return_quantity),sum(cs_quantity),store_sales_quantity,store_returns_quantity,catalog_sales_quantity,sum,sum,sum] InputAdapter Exchange [i_item_id,i_item_desc,s_store_id,s_store_name] #1 WholeStageCodegen (17) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q29/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q29/explain.txt index d1d99897da995..ee17b943a5f29 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q29/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q29/explain.txt @@ -271,20 +271,20 @@ Input [9]: [ss_item_sk#2, ss_quantity#6, sr_return_quantity#11, cs_quantity#16, (49) HashAggregate [codegen id : 8] Input [7]: [ss_quantity#6, sr_return_quantity#11, cs_quantity#16, s_store_id#30, s_store_name#31, i_item_id#34, i_item_desc#35] Keys [4]: [i_item_id#34, i_item_desc#35, s_store_id#30, s_store_name#31] -Functions [3]: [partial_sum(cast(ss_quantity#6 as bigint)), partial_sum(cast(sr_return_quantity#11 as bigint)), partial_sum(cast(cs_quantity#16 as bigint))] +Functions [3]: [partial_sum(ss_quantity#6), partial_sum(sr_return_quantity#11), partial_sum(cs_quantity#16)] Aggregate Attributes [3]: [sum#37, sum#38, sum#39] Results [7]: [i_item_id#34, i_item_desc#35, s_store_id#30, s_store_name#31, sum#40, sum#41, sum#42] (50) Exchange Input [7]: [i_item_id#34, i_item_desc#35, s_store_id#30, s_store_name#31, sum#40, sum#41, sum#42] -Arguments: hashpartitioning(i_item_id#34, i_item_desc#35, s_store_id#30, s_store_name#31, 5), true, [id=#43] +Arguments: hashpartitioning(i_item_id#34, i_item_desc#35, s_store_id#30, s_store_name#31, 5), ENSURE_REQUIREMENTS, [id=#43] (51) HashAggregate [codegen id : 9] Input [7]: [i_item_id#34, i_item_desc#35, s_store_id#30, s_store_name#31, sum#40, sum#41, sum#42] Keys [4]: [i_item_id#34, i_item_desc#35, s_store_id#30, s_store_name#31] -Functions [3]: [sum(cast(ss_quantity#6 as bigint)), sum(cast(sr_return_quantity#11 as bigint)), sum(cast(cs_quantity#16 as bigint))] -Aggregate Attributes [3]: [sum(cast(ss_quantity#6 as bigint))#44, sum(cast(sr_return_quantity#11 as bigint))#45, sum(cast(cs_quantity#16 as bigint))#46] -Results [7]: [i_item_id#34, i_item_desc#35, s_store_id#30, s_store_name#31, sum(cast(ss_quantity#6 as bigint))#44 AS store_sales_quantity#47, sum(cast(sr_return_quantity#11 as bigint))#45 AS store_returns_quantity#48, sum(cast(cs_quantity#16 as bigint))#46 AS catalog_sales_quantity#49] +Functions [3]: [sum(ss_quantity#6), sum(sr_return_quantity#11), sum(cs_quantity#16)] +Aggregate Attributes [3]: [sum(ss_quantity#6)#44, sum(sr_return_quantity#11)#45, sum(cs_quantity#16)#46] +Results [7]: [i_item_id#34, i_item_desc#35, s_store_id#30, s_store_name#31, sum(ss_quantity#6)#44 AS store_sales_quantity#47, sum(sr_return_quantity#11)#45 AS store_returns_quantity#48, sum(cs_quantity#16)#46 AS catalog_sales_quantity#49] (52) TakeOrderedAndProject Input [7]: [i_item_id#34, i_item_desc#35, s_store_id#30, s_store_name#31, store_sales_quantity#47, store_returns_quantity#48, catalog_sales_quantity#49] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q29/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q29/simplified.txt index 26e4e3a5591f2..97390a69a3770 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q29/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q29/simplified.txt @@ -1,6 +1,6 @@ TakeOrderedAndProject [i_item_id,i_item_desc,s_store_id,s_store_name,store_sales_quantity,store_returns_quantity,catalog_sales_quantity] WholeStageCodegen (9) - HashAggregate [i_item_id,i_item_desc,s_store_id,s_store_name,sum,sum,sum] [sum(cast(ss_quantity as bigint)),sum(cast(sr_return_quantity as bigint)),sum(cast(cs_quantity as bigint)),store_sales_quantity,store_returns_quantity,catalog_sales_quantity,sum,sum,sum] + HashAggregate [i_item_id,i_item_desc,s_store_id,s_store_name,sum,sum,sum] [sum(ss_quantity),sum(sr_return_quantity),sum(cs_quantity),store_sales_quantity,store_returns_quantity,catalog_sales_quantity,sum,sum,sum] InputAdapter Exchange [i_item_id,i_item_desc,s_store_id,s_store_name] #1 WholeStageCodegen (8) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q3.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q3.sf100/explain.txt index afe7c682b55e8..6b172932bb689 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q3.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q3.sf100/explain.txt @@ -107,7 +107,7 @@ Results [4]: [d_year#10, i_brand#6, i_brand_id#5, sum#14] (19) Exchange Input [4]: [d_year#10, i_brand#6, i_brand_id#5, sum#14] -Arguments: hashpartitioning(d_year#10, i_brand#6, i_brand_id#5, 5), true, [id=#15] +Arguments: hashpartitioning(d_year#10, i_brand#6, i_brand_id#5, 5), ENSURE_REQUIREMENTS, [id=#15] (20) HashAggregate [codegen id : 4] Input [4]: [d_year#10, i_brand#6, i_brand_id#5, sum#14] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q3/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q3/explain.txt index bec06d146863d..9fba88cb042bc 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q3/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q3/explain.txt @@ -107,7 +107,7 @@ Results [4]: [d_year#2, i_brand#10, i_brand_id#9, sum#14] (19) Exchange Input [4]: [d_year#2, i_brand#10, i_brand_id#9, sum#14] -Arguments: hashpartitioning(d_year#2, i_brand#10, i_brand_id#9, 5), true, [id=#15] +Arguments: hashpartitioning(d_year#2, i_brand#10, i_brand_id#9, 5), ENSURE_REQUIREMENTS, [id=#15] (20) HashAggregate [codegen id : 4] Input [4]: [d_year#2, i_brand#10, i_brand_id#9, sum#14] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q31.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q31.sf100/explain.txt index 9f123c4044cc8..cf5478c99c381 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q31.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q31.sf100/explain.txt @@ -163,7 +163,7 @@ Input [6]: [ss_sold_date_sk#1, ss_addr_sk#2, ss_ext_sales_price#3, d_date_sk#4, (10) Exchange Input [4]: [ss_addr_sk#2, ss_ext_sales_price#3, d_year#5, d_qoy#6] -Arguments: hashpartitioning(ss_addr_sk#2, 5), true, [id=#8] +Arguments: hashpartitioning(ss_addr_sk#2, 5), ENSURE_REQUIREMENTS, [id=#8] (11) Sort [codegen id : 3] Input [4]: [ss_addr_sk#2, ss_ext_sales_price#3, d_year#5, d_qoy#6] @@ -185,7 +185,7 @@ Condition : (isnotnull(ca_address_sk#9) AND isnotnull(ca_county#10)) (15) Exchange Input [2]: [ca_address_sk#9, ca_county#10] -Arguments: hashpartitioning(ca_address_sk#9, 5), true, [id=#11] +Arguments: hashpartitioning(ca_address_sk#9, 5), ENSURE_REQUIREMENTS, [id=#11] (16) Sort [codegen id : 5] Input [2]: [ca_address_sk#9, ca_county#10] @@ -209,7 +209,7 @@ Results [4]: [ca_county#10, d_qoy#6, d_year#5, sum#13] (20) Exchange Input [4]: [ca_county#10, d_qoy#6, d_year#5, sum#13] -Arguments: hashpartitioning(ca_county#10, d_qoy#6, d_year#5, 5), true, [id=#14] +Arguments: hashpartitioning(ca_county#10, d_qoy#6, d_year#5, 5), ENSURE_REQUIREMENTS, [id=#14] (21) HashAggregate [codegen id : 42] Input [4]: [ca_county#10, d_qoy#6, d_year#5, sum#13] @@ -261,7 +261,7 @@ Input [6]: [ss_sold_date_sk#1, ss_addr_sk#2, ss_ext_sales_price#3, d_date_sk#17, (31) Exchange Input [4]: [ss_addr_sk#2, ss_ext_sales_price#3, d_year#18, d_qoy#19] -Arguments: hashpartitioning(ss_addr_sk#2, 5), true, [id=#21] +Arguments: hashpartitioning(ss_addr_sk#2, 5), ENSURE_REQUIREMENTS, [id=#21] (32) Sort [codegen id : 9] Input [4]: [ss_addr_sk#2, ss_ext_sales_price#3, d_year#18, d_qoy#19] @@ -292,7 +292,7 @@ Results [4]: [ca_county#23, d_qoy#19, d_year#18, sum#25] (38) Exchange Input [4]: [ca_county#23, d_qoy#19, d_year#18, sum#25] -Arguments: hashpartitioning(ca_county#23, d_qoy#19, d_year#18, 5), true, [id=#26] +Arguments: hashpartitioning(ca_county#23, d_qoy#19, d_year#18, 5), ENSURE_REQUIREMENTS, [id=#26] (39) HashAggregate [codegen id : 13] Input [4]: [ca_county#23, d_qoy#19, d_year#18, sum#25] @@ -357,7 +357,7 @@ Input [6]: [ss_sold_date_sk#1, ss_addr_sk#2, ss_ext_sales_price#3, d_date_sk#30, (52) Exchange Input [4]: [ss_addr_sk#2, ss_ext_sales_price#3, d_year#31, d_qoy#32] -Arguments: hashpartitioning(ss_addr_sk#2, 5), true, [id=#34] +Arguments: hashpartitioning(ss_addr_sk#2, 5), ENSURE_REQUIREMENTS, [id=#34] (53) Sort [codegen id : 16] Input [4]: [ss_addr_sk#2, ss_ext_sales_price#3, d_year#31, d_qoy#32] @@ -388,7 +388,7 @@ Results [4]: [ca_county#36, d_qoy#32, d_year#31, sum#38] (59) Exchange Input [4]: [ca_county#36, d_qoy#32, d_year#31, sum#38] -Arguments: hashpartitioning(ca_county#36, d_qoy#32, d_year#31, 5), true, [id=#39] +Arguments: hashpartitioning(ca_county#36, d_qoy#32, d_year#31, 5), ENSURE_REQUIREMENTS, [id=#39] (60) HashAggregate [codegen id : 20] Input [4]: [ca_county#36, d_qoy#32, d_year#31, sum#38] @@ -438,7 +438,7 @@ Input [6]: [ws_sold_date_sk#43, ws_bill_addr_sk#44, ws_ext_sales_price#45, d_dat (70) Exchange Input [4]: [ws_bill_addr_sk#44, ws_ext_sales_price#45, d_year#47, d_qoy#48] -Arguments: hashpartitioning(ws_bill_addr_sk#44, 5), true, [id=#49] +Arguments: hashpartitioning(ws_bill_addr_sk#44, 5), ENSURE_REQUIREMENTS, [id=#49] (71) Sort [codegen id : 23] Input [4]: [ws_bill_addr_sk#44, ws_ext_sales_price#45, d_year#47, d_qoy#48] @@ -469,7 +469,7 @@ Results [4]: [ca_county#51, d_qoy#48, d_year#47, sum#53] (77) Exchange Input [4]: [ca_county#51, d_qoy#48, d_year#47, sum#53] -Arguments: hashpartitioning(ca_county#51, d_qoy#48, d_year#47, 5), true, [id=#54] +Arguments: hashpartitioning(ca_county#51, d_qoy#48, d_year#47, 5), ENSURE_REQUIREMENTS, [id=#54] (78) HashAggregate [codegen id : 41] Input [4]: [ca_county#51, d_qoy#48, d_year#47, sum#53] @@ -506,7 +506,7 @@ Input [6]: [ws_sold_date_sk#43, ws_bill_addr_sk#44, ws_ext_sales_price#45, d_dat (85) Exchange Input [4]: [ws_bill_addr_sk#44, ws_ext_sales_price#45, d_year#58, d_qoy#59] -Arguments: hashpartitioning(ws_bill_addr_sk#44, 5), true, [id=#60] +Arguments: hashpartitioning(ws_bill_addr_sk#44, 5), ENSURE_REQUIREMENTS, [id=#60] (86) Sort [codegen id : 29] Input [4]: [ws_bill_addr_sk#44, ws_ext_sales_price#45, d_year#58, d_qoy#59] @@ -537,7 +537,7 @@ Results [4]: [ca_county#62, d_qoy#59, d_year#58, sum#64] (92) Exchange Input [4]: [ca_county#62, d_qoy#59, d_year#58, sum#64] -Arguments: hashpartitioning(ca_county#62, d_qoy#59, d_year#58, 5), true, [id=#65] +Arguments: hashpartitioning(ca_county#62, d_qoy#59, d_year#58, 5), ENSURE_REQUIREMENTS, [id=#65] (93) HashAggregate [codegen id : 33] Input [4]: [ca_county#62, d_qoy#59, d_year#58, sum#64] @@ -587,7 +587,7 @@ Input [6]: [ws_sold_date_sk#43, ws_bill_addr_sk#44, ws_ext_sales_price#45, d_dat (103) Exchange Input [4]: [ws_bill_addr_sk#44, ws_ext_sales_price#45, d_year#70, d_qoy#71] -Arguments: hashpartitioning(ws_bill_addr_sk#44, 5), true, [id=#72] +Arguments: hashpartitioning(ws_bill_addr_sk#44, 5), ENSURE_REQUIREMENTS, [id=#72] (104) Sort [codegen id : 36] Input [4]: [ws_bill_addr_sk#44, ws_ext_sales_price#45, d_year#70, d_qoy#71] @@ -618,7 +618,7 @@ Results [4]: [ca_county#74, d_qoy#71, d_year#70, sum#76] (110) Exchange Input [4]: [ca_county#74, d_qoy#71, d_year#70, sum#76] -Arguments: hashpartitioning(ca_county#74, d_qoy#71, d_year#70, 5), true, [id=#77] +Arguments: hashpartitioning(ca_county#74, d_qoy#71, d_year#70, 5), ENSURE_REQUIREMENTS, [id=#77] (111) HashAggregate [codegen id : 40] Input [4]: [ca_county#74, d_qoy#71, d_year#70, sum#76] @@ -655,7 +655,7 @@ Input [9]: [store_sales#16, store_sales#28, ca_county#36, d_year#31, store_sales (118) Exchange Input [6]: [ca_county#36, d_year#31, web_q1_q2_increase#82, store_q1_q2_increase#83, web_q2_q3_increase#84, store_q2_q3_increase#85] -Arguments: rangepartitioning(ca_county#36 ASC NULLS FIRST, 5), true, [id=#86] +Arguments: rangepartitioning(ca_county#36 ASC NULLS FIRST, 5), ENSURE_REQUIREMENTS, [id=#86] (119) Sort [codegen id : 43] Input [6]: [ca_county#36, d_year#31, web_q1_q2_increase#82, store_q1_q2_increase#83, web_q2_q3_increase#84, store_q2_q3_increase#85] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q31/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q31/explain.txt index 0ed0929fa882c..c339a555ffdb8 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q31/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q31/explain.txt @@ -177,7 +177,7 @@ Results [4]: [ca_county#9, d_qoy#6, d_year#5, sum#12] (17) Exchange Input [4]: [ca_county#9, d_qoy#6, d_year#5, sum#12] -Arguments: hashpartitioning(ca_county#9, d_qoy#6, d_year#5, 5), true, [id=#13] +Arguments: hashpartitioning(ca_county#9, d_qoy#6, d_year#5, 5), ENSURE_REQUIREMENTS, [id=#13] (18) HashAggregate [codegen id : 24] Input [4]: [ca_county#9, d_qoy#6, d_year#5, sum#12] @@ -248,7 +248,7 @@ Results [4]: [ca_county#21, d_qoy#18, d_year#17, sum#23] (32) Exchange Input [4]: [ca_county#21, d_qoy#18, d_year#17, sum#23] -Arguments: hashpartitioning(ca_county#21, d_qoy#18, d_year#17, 5), true, [id=#24] +Arguments: hashpartitioning(ca_county#21, d_qoy#18, d_year#17, 5), ENSURE_REQUIREMENTS, [id=#24] (33) HashAggregate [codegen id : 7] Input [4]: [ca_county#21, d_qoy#18, d_year#17, sum#23] @@ -328,7 +328,7 @@ Results [4]: [ca_county#33, d_qoy#30, d_year#29, sum#35] (49) Exchange Input [4]: [ca_county#33, d_qoy#30, d_year#29, sum#35] -Arguments: hashpartitioning(ca_county#33, d_qoy#30, d_year#29, 5), true, [id=#36] +Arguments: hashpartitioning(ca_county#33, d_qoy#30, d_year#29, 5), ENSURE_REQUIREMENTS, [id=#36] (50) HashAggregate [codegen id : 11] Input [4]: [ca_county#33, d_qoy#30, d_year#29, sum#35] @@ -397,7 +397,7 @@ Results [4]: [ca_county#47, d_qoy#45, d_year#44, sum#49] (64) Exchange Input [4]: [ca_county#47, d_qoy#45, d_year#44, sum#49] -Arguments: hashpartitioning(ca_county#47, d_qoy#45, d_year#44, 5), true, [id=#50] +Arguments: hashpartitioning(ca_county#47, d_qoy#45, d_year#44, 5), ENSURE_REQUIREMENTS, [id=#50] (65) HashAggregate [codegen id : 15] Input [4]: [ca_county#47, d_qoy#45, d_year#44, sum#49] @@ -462,7 +462,7 @@ Results [4]: [ca_county#58, d_qoy#56, d_year#55, sum#60] (78) Exchange Input [4]: [ca_county#58, d_qoy#56, d_year#55, sum#60] -Arguments: hashpartitioning(ca_county#58, d_qoy#56, d_year#55, 5), true, [id=#61] +Arguments: hashpartitioning(ca_county#58, d_qoy#56, d_year#55, 5), ENSURE_REQUIREMENTS, [id=#61] (79) HashAggregate [codegen id : 19] Input [4]: [ca_county#58, d_qoy#56, d_year#55, sum#60] @@ -531,7 +531,7 @@ Results [4]: [ca_county#69, d_qoy#67, d_year#66, sum#71] (93) Exchange Input [4]: [ca_county#69, d_qoy#67, d_year#66, sum#71] -Arguments: hashpartitioning(ca_county#69, d_qoy#67, d_year#66, 5), true, [id=#72] +Arguments: hashpartitioning(ca_county#69, d_qoy#67, d_year#66, 5), ENSURE_REQUIREMENTS, [id=#72] (94) HashAggregate [codegen id : 23] Input [4]: [ca_county#69, d_qoy#67, d_year#66, sum#71] @@ -555,7 +555,7 @@ Input [10]: [ca_county#9, d_year#5, store_sales#15, store_sales#26, store_sales# (98) Exchange Input [6]: [ca_county#9, d_year#5, web_q1_q2_increase#76, store_q1_q2_increase#77, web_q2_q3_increase#78, store_q2_q3_increase#79] -Arguments: rangepartitioning(ca_county#9 ASC NULLS FIRST, 5), true, [id=#80] +Arguments: rangepartitioning(ca_county#9 ASC NULLS FIRST, 5), ENSURE_REQUIREMENTS, [id=#80] (99) Sort [codegen id : 25] Input [6]: [ca_county#9, d_year#5, web_q1_q2_increase#76, store_q1_q2_increase#77, web_q2_q3_increase#78, store_q2_q3_increase#79] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q33/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q33/explain.txt index 8d1558a01cfde..cb8522545f1d3 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q33/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q33/explain.txt @@ -207,7 +207,7 @@ Results [2]: [i_manufact_id#13, sum#19] (31) Exchange Input [2]: [i_manufact_id#13, sum#19] -Arguments: hashpartitioning(i_manufact_id#13, 5), true, [id=#20] +Arguments: hashpartitioning(i_manufact_id#13, 5), ENSURE_REQUIREMENTS, [id=#20] (32) HashAggregate [codegen id : 6] Input [2]: [i_manufact_id#13, sum#19] @@ -275,7 +275,7 @@ Results [2]: [i_manufact_id#13, sum#28] (46) Exchange Input [2]: [i_manufact_id#13, sum#28] -Arguments: hashpartitioning(i_manufact_id#13, 5), true, [id=#29] +Arguments: hashpartitioning(i_manufact_id#13, 5), ENSURE_REQUIREMENTS, [id=#29] (47) HashAggregate [codegen id : 12] Input [2]: [i_manufact_id#13, sum#28] @@ -343,7 +343,7 @@ Results [2]: [i_manufact_id#13, sum#37] (61) Exchange Input [2]: [i_manufact_id#13, sum#37] -Arguments: hashpartitioning(i_manufact_id#13, 5), true, [id=#38] +Arguments: hashpartitioning(i_manufact_id#13, 5), ENSURE_REQUIREMENTS, [id=#38] (62) HashAggregate [codegen id : 18] Input [2]: [i_manufact_id#13, sum#37] @@ -363,7 +363,7 @@ Results [3]: [i_manufact_id#13, sum#43, isEmpty#44] (65) Exchange Input [3]: [i_manufact_id#13, sum#43, isEmpty#44] -Arguments: hashpartitioning(i_manufact_id#13, 5), true, [id=#45] +Arguments: hashpartitioning(i_manufact_id#13, 5), ENSURE_REQUIREMENTS, [id=#45] (66) HashAggregate [codegen id : 20] Input [3]: [i_manufact_id#13, sum#43, isEmpty#44] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q35.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q35.sf100/explain.txt index 01f6c35a2178d..70d2390a5cc7e 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q35.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q35.sf100/explain.txt @@ -77,7 +77,7 @@ Condition : (isnotnull(c_current_addr_sk#5) AND isnotnull(c_current_cdemo_sk#4)) (4) Exchange Input [3]: [c_customer_sk#3, c_current_cdemo_sk#4, c_current_addr_sk#5] -Arguments: hashpartitioning(c_customer_sk#3, 5), true, [id=#6] +Arguments: hashpartitioning(c_customer_sk#3, 5), ENSURE_REQUIREMENTS, [id=#6] (5) Sort [codegen id : 2] Input [3]: [c_customer_sk#3, c_current_cdemo_sk#4, c_current_addr_sk#5] @@ -130,7 +130,7 @@ Input [3]: [ss_sold_date_sk#7, ss_customer_sk#8, d_date_sk#9] (16) Exchange Input [1]: [ss_customer_sk#8] -Arguments: hashpartitioning(ss_customer_sk#8, 5), true, [id=#13] +Arguments: hashpartitioning(ss_customer_sk#8, 5), ENSURE_REQUIREMENTS, [id=#13] (17) Sort [codegen id : 5] Input [1]: [ss_customer_sk#8] @@ -169,7 +169,7 @@ Input [3]: [ws_sold_date_sk#14, ws_bill_customer_sk#15, d_date_sk#9] (25) Exchange Input [1]: [ws_bill_customer_sk#15] -Arguments: hashpartitioning(ws_bill_customer_sk#15, 5), true, [id=#16] +Arguments: hashpartitioning(ws_bill_customer_sk#15, 5), ENSURE_REQUIREMENTS, [id=#16] (26) Sort [codegen id : 8] Input [1]: [ws_bill_customer_sk#15] @@ -208,7 +208,7 @@ Input [3]: [cs_sold_date_sk#17, cs_ship_customer_sk#18, d_date_sk#9] (34) Exchange Input [1]: [cs_ship_customer_sk#18] -Arguments: hashpartitioning(cs_ship_customer_sk#18, 5), true, [id=#19] +Arguments: hashpartitioning(cs_ship_customer_sk#18, 5), ENSURE_REQUIREMENTS, [id=#19] (35) Sort [codegen id : 11] Input [1]: [cs_ship_customer_sk#18] @@ -229,7 +229,7 @@ Input [5]: [c_customer_sk#3, c_current_cdemo_sk#4, c_current_addr_sk#5, exists#2 (39) Exchange Input [2]: [c_current_cdemo_sk#4, c_current_addr_sk#5] -Arguments: hashpartitioning(c_current_addr_sk#5, 5), true, [id=#20] +Arguments: hashpartitioning(c_current_addr_sk#5, 5), ENSURE_REQUIREMENTS, [id=#20] (40) Sort [codegen id : 13] Input [2]: [c_current_cdemo_sk#4, c_current_addr_sk#5] @@ -251,7 +251,7 @@ Condition : isnotnull(ca_address_sk#21) (44) Exchange Input [2]: [ca_address_sk#21, ca_state#22] -Arguments: hashpartitioning(ca_address_sk#21, 5), true, [id=#23] +Arguments: hashpartitioning(ca_address_sk#21, 5), ENSURE_REQUIREMENTS, [id=#23] (45) Sort [codegen id : 15] Input [2]: [ca_address_sk#21, ca_state#22] @@ -268,7 +268,7 @@ Input [4]: [c_current_cdemo_sk#4, c_current_addr_sk#5, ca_address_sk#21, ca_stat (48) Exchange Input [2]: [c_current_cdemo_sk#4, ca_state#22] -Arguments: hashpartitioning(c_current_cdemo_sk#4, 5), true, [id=#24] +Arguments: hashpartitioning(c_current_cdemo_sk#4, 5), ENSURE_REQUIREMENTS, [id=#24] (49) Sort [codegen id : 17] Input [2]: [c_current_cdemo_sk#4, ca_state#22] @@ -290,7 +290,7 @@ Condition : isnotnull(cd_demo_sk#25) (53) Exchange Input [6]: [cd_demo_sk#25, cd_gender#26, cd_marital_status#27, cd_dep_count#28, cd_dep_employed_count#29, cd_dep_college_count#30] -Arguments: hashpartitioning(cd_demo_sk#25, 5), true, [id=#31] +Arguments: hashpartitioning(cd_demo_sk#25, 5), ENSURE_REQUIREMENTS, [id=#31] (54) Sort [codegen id : 19] Input [6]: [cd_demo_sk#25, cd_gender#26, cd_marital_status#27, cd_dep_count#28, cd_dep_employed_count#29, cd_dep_college_count#30] @@ -308,20 +308,20 @@ Input [8]: [c_current_cdemo_sk#4, ca_state#22, cd_demo_sk#25, cd_gender#26, cd_m (57) HashAggregate [codegen id : 20] Input [6]: [ca_state#22, cd_gender#26, cd_marital_status#27, cd_dep_count#28, cd_dep_employed_count#29, cd_dep_college_count#30] Keys [6]: [ca_state#22, cd_gender#26, cd_marital_status#27, cd_dep_count#28, cd_dep_employed_count#29, cd_dep_college_count#30] -Functions [10]: [partial_count(1), partial_min(cd_dep_count#28), partial_max(cd_dep_count#28), partial_avg(cast(cd_dep_count#28 as bigint)), partial_min(cd_dep_employed_count#29), partial_max(cd_dep_employed_count#29), partial_avg(cast(cd_dep_employed_count#29 as bigint)), partial_min(cd_dep_college_count#30), partial_max(cd_dep_college_count#30), partial_avg(cast(cd_dep_college_count#30 as bigint))] +Functions [10]: [partial_count(1), partial_min(cd_dep_count#28), partial_max(cd_dep_count#28), partial_avg(cd_dep_count#28), partial_min(cd_dep_employed_count#29), partial_max(cd_dep_employed_count#29), partial_avg(cd_dep_employed_count#29), partial_min(cd_dep_college_count#30), partial_max(cd_dep_college_count#30), partial_avg(cd_dep_college_count#30)] Aggregate Attributes [13]: [count#32, min#33, max#34, sum#35, count#36, min#37, max#38, sum#39, count#40, min#41, max#42, sum#43, count#44] Results [19]: [ca_state#22, cd_gender#26, cd_marital_status#27, cd_dep_count#28, cd_dep_employed_count#29, cd_dep_college_count#30, count#45, min#46, max#47, sum#48, count#49, min#50, max#51, sum#52, count#53, min#54, max#55, sum#56, count#57] (58) Exchange Input [19]: [ca_state#22, cd_gender#26, cd_marital_status#27, cd_dep_count#28, cd_dep_employed_count#29, cd_dep_college_count#30, count#45, min#46, max#47, sum#48, count#49, min#50, max#51, sum#52, count#53, min#54, max#55, sum#56, count#57] -Arguments: hashpartitioning(ca_state#22, cd_gender#26, cd_marital_status#27, cd_dep_count#28, cd_dep_employed_count#29, cd_dep_college_count#30, 5), true, [id=#58] +Arguments: hashpartitioning(ca_state#22, cd_gender#26, cd_marital_status#27, cd_dep_count#28, cd_dep_employed_count#29, cd_dep_college_count#30, 5), ENSURE_REQUIREMENTS, [id=#58] (59) HashAggregate [codegen id : 21] Input [19]: [ca_state#22, cd_gender#26, cd_marital_status#27, cd_dep_count#28, cd_dep_employed_count#29, cd_dep_college_count#30, count#45, min#46, max#47, sum#48, count#49, min#50, max#51, sum#52, count#53, min#54, max#55, sum#56, count#57] Keys [6]: [ca_state#22, cd_gender#26, cd_marital_status#27, cd_dep_count#28, cd_dep_employed_count#29, cd_dep_college_count#30] -Functions [10]: [count(1), min(cd_dep_count#28), max(cd_dep_count#28), avg(cast(cd_dep_count#28 as bigint)), min(cd_dep_employed_count#29), max(cd_dep_employed_count#29), avg(cast(cd_dep_employed_count#29 as bigint)), min(cd_dep_college_count#30), max(cd_dep_college_count#30), avg(cast(cd_dep_college_count#30 as bigint))] -Aggregate Attributes [10]: [count(1)#59, min(cd_dep_count#28)#60, max(cd_dep_count#28)#61, avg(cast(cd_dep_count#28 as bigint))#62, min(cd_dep_employed_count#29)#63, max(cd_dep_employed_count#29)#64, avg(cast(cd_dep_employed_count#29 as bigint))#65, min(cd_dep_college_count#30)#66, max(cd_dep_college_count#30)#67, avg(cast(cd_dep_college_count#30 as bigint))#68] -Results [18]: [ca_state#22, cd_gender#26, cd_marital_status#27, count(1)#59 AS cnt1#69, min(cd_dep_count#28)#60 AS min(cd_dep_count)#70, max(cd_dep_count#28)#61 AS max(cd_dep_count)#71, avg(cast(cd_dep_count#28 as bigint))#62 AS avg(cd_dep_count)#72, cd_dep_employed_count#29, count(1)#59 AS cnt2#73, min(cd_dep_employed_count#29)#63 AS min(cd_dep_employed_count)#74, max(cd_dep_employed_count#29)#64 AS max(cd_dep_employed_count)#75, avg(cast(cd_dep_employed_count#29 as bigint))#65 AS avg(cd_dep_employed_count)#76, cd_dep_college_count#30, count(1)#59 AS cnt3#77, min(cd_dep_college_count#30)#66 AS min(cd_dep_college_count)#78, max(cd_dep_college_count#30)#67 AS max(cd_dep_college_count)#79, avg(cast(cd_dep_college_count#30 as bigint))#68 AS avg(cd_dep_college_count)#80, cd_dep_count#28 AS aggOrder#81] +Functions [10]: [count(1), min(cd_dep_count#28), max(cd_dep_count#28), avg(cd_dep_count#28), min(cd_dep_employed_count#29), max(cd_dep_employed_count#29), avg(cd_dep_employed_count#29), min(cd_dep_college_count#30), max(cd_dep_college_count#30), avg(cd_dep_college_count#30)] +Aggregate Attributes [10]: [count(1)#59, min(cd_dep_count#28)#60, max(cd_dep_count#28)#61, avg(cd_dep_count#28)#62, min(cd_dep_employed_count#29)#63, max(cd_dep_employed_count#29)#64, avg(cd_dep_employed_count#29)#65, min(cd_dep_college_count#30)#66, max(cd_dep_college_count#30)#67, avg(cd_dep_college_count#30)#68] +Results [18]: [ca_state#22, cd_gender#26, cd_marital_status#27, count(1)#59 AS cnt1#69, min(cd_dep_count#28)#60 AS min(cd_dep_count)#70, max(cd_dep_count#28)#61 AS max(cd_dep_count)#71, avg(cd_dep_count#28)#62 AS avg(cd_dep_count)#72, cd_dep_employed_count#29, count(1)#59 AS cnt2#73, min(cd_dep_employed_count#29)#63 AS min(cd_dep_employed_count)#74, max(cd_dep_employed_count#29)#64 AS max(cd_dep_employed_count)#75, avg(cd_dep_employed_count#29)#65 AS avg(cd_dep_employed_count)#76, cd_dep_college_count#30, count(1)#59 AS cnt3#77, min(cd_dep_college_count#30)#66 AS min(cd_dep_college_count)#78, max(cd_dep_college_count#30)#67 AS max(cd_dep_college_count)#79, avg(cd_dep_college_count#30)#68 AS avg(cd_dep_college_count)#80, cd_dep_count#28 AS aggOrder#81] (60) TakeOrderedAndProject Input [18]: [ca_state#22, cd_gender#26, cd_marital_status#27, cnt1#69, min(cd_dep_count)#70, max(cd_dep_count)#71, avg(cd_dep_count)#72, cd_dep_employed_count#29, cnt2#73, min(cd_dep_employed_count)#74, max(cd_dep_employed_count)#75, avg(cd_dep_employed_count)#76, cd_dep_college_count#30, cnt3#77, min(cd_dep_college_count)#78, max(cd_dep_college_count)#79, avg(cd_dep_college_count)#80, aggOrder#81] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q35.sf100/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q35.sf100/simplified.txt index 7c40dfcf8133a..7b8bc3b163e02 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q35.sf100/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q35.sf100/simplified.txt @@ -1,6 +1,6 @@ TakeOrderedAndProject [ca_state,cd_gender,cd_marital_status,aggOrder,cd_dep_employed_count,cd_dep_college_count,cnt1,min(cd_dep_count),max(cd_dep_count),avg(cd_dep_count),cnt2,min(cd_dep_employed_count),max(cd_dep_employed_count),avg(cd_dep_employed_count),cnt3,min(cd_dep_college_count),max(cd_dep_college_count),avg(cd_dep_college_count)] WholeStageCodegen (21) - HashAggregate [ca_state,cd_gender,cd_marital_status,cd_dep_count,cd_dep_employed_count,cd_dep_college_count,count,min,max,sum,count,min,max,sum,count,min,max,sum,count] [count(1),min(cd_dep_count),max(cd_dep_count),avg(cast(cd_dep_count as bigint)),min(cd_dep_employed_count),max(cd_dep_employed_count),avg(cast(cd_dep_employed_count as bigint)),min(cd_dep_college_count),max(cd_dep_college_count),avg(cast(cd_dep_college_count as bigint)),cnt1,min(cd_dep_count),max(cd_dep_count),avg(cd_dep_count),cnt2,min(cd_dep_employed_count),max(cd_dep_employed_count),avg(cd_dep_employed_count),cnt3,min(cd_dep_college_count),max(cd_dep_college_count),avg(cd_dep_college_count),aggOrder,count,min,max,sum,count,min,max,sum,count,min,max,sum,count] + HashAggregate [ca_state,cd_gender,cd_marital_status,cd_dep_count,cd_dep_employed_count,cd_dep_college_count,count,min,max,sum,count,min,max,sum,count,min,max,sum,count] [count(1),min(cd_dep_count),max(cd_dep_count),avg(cd_dep_count),min(cd_dep_employed_count),max(cd_dep_employed_count),avg(cd_dep_employed_count),min(cd_dep_college_count),max(cd_dep_college_count),avg(cd_dep_college_count),cnt1,min(cd_dep_count),max(cd_dep_count),avg(cd_dep_count),cnt2,min(cd_dep_employed_count),max(cd_dep_employed_count),avg(cd_dep_employed_count),cnt3,min(cd_dep_college_count),max(cd_dep_college_count),avg(cd_dep_college_count),aggOrder,count,min,max,sum,count,min,max,sum,count,min,max,sum,count] InputAdapter Exchange [ca_state,cd_gender,cd_marital_status,cd_dep_count,cd_dep_employed_count,cd_dep_college_count] #1 WholeStageCodegen (20) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q35/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q35/explain.txt index 5370b6872abf6..1639c66aef311 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q35/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q35/explain.txt @@ -253,20 +253,20 @@ Input [8]: [c_current_cdemo_sk#4, ca_state#20, cd_demo_sk#22, cd_gender#23, cd_m (46) HashAggregate [codegen id : 9] Input [6]: [ca_state#20, cd_gender#23, cd_marital_status#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27] Keys [6]: [ca_state#20, cd_gender#23, cd_marital_status#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27] -Functions [10]: [partial_count(1), partial_min(cd_dep_count#25), partial_max(cd_dep_count#25), partial_avg(cast(cd_dep_count#25 as bigint)), partial_min(cd_dep_employed_count#26), partial_max(cd_dep_employed_count#26), partial_avg(cast(cd_dep_employed_count#26 as bigint)), partial_min(cd_dep_college_count#27), partial_max(cd_dep_college_count#27), partial_avg(cast(cd_dep_college_count#27 as bigint))] +Functions [10]: [partial_count(1), partial_min(cd_dep_count#25), partial_max(cd_dep_count#25), partial_avg(cd_dep_count#25), partial_min(cd_dep_employed_count#26), partial_max(cd_dep_employed_count#26), partial_avg(cd_dep_employed_count#26), partial_min(cd_dep_college_count#27), partial_max(cd_dep_college_count#27), partial_avg(cd_dep_college_count#27)] Aggregate Attributes [13]: [count#29, min#30, max#31, sum#32, count#33, min#34, max#35, sum#36, count#37, min#38, max#39, sum#40, count#41] Results [19]: [ca_state#20, cd_gender#23, cd_marital_status#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27, count#42, min#43, max#44, sum#45, count#46, min#47, max#48, sum#49, count#50, min#51, max#52, sum#53, count#54] (47) Exchange Input [19]: [ca_state#20, cd_gender#23, cd_marital_status#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27, count#42, min#43, max#44, sum#45, count#46, min#47, max#48, sum#49, count#50, min#51, max#52, sum#53, count#54] -Arguments: hashpartitioning(ca_state#20, cd_gender#23, cd_marital_status#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27, 5), true, [id=#55] +Arguments: hashpartitioning(ca_state#20, cd_gender#23, cd_marital_status#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27, 5), ENSURE_REQUIREMENTS, [id=#55] (48) HashAggregate [codegen id : 10] Input [19]: [ca_state#20, cd_gender#23, cd_marital_status#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27, count#42, min#43, max#44, sum#45, count#46, min#47, max#48, sum#49, count#50, min#51, max#52, sum#53, count#54] Keys [6]: [ca_state#20, cd_gender#23, cd_marital_status#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27] -Functions [10]: [count(1), min(cd_dep_count#25), max(cd_dep_count#25), avg(cast(cd_dep_count#25 as bigint)), min(cd_dep_employed_count#26), max(cd_dep_employed_count#26), avg(cast(cd_dep_employed_count#26 as bigint)), min(cd_dep_college_count#27), max(cd_dep_college_count#27), avg(cast(cd_dep_college_count#27 as bigint))] -Aggregate Attributes [10]: [count(1)#56, min(cd_dep_count#25)#57, max(cd_dep_count#25)#58, avg(cast(cd_dep_count#25 as bigint))#59, min(cd_dep_employed_count#26)#60, max(cd_dep_employed_count#26)#61, avg(cast(cd_dep_employed_count#26 as bigint))#62, min(cd_dep_college_count#27)#63, max(cd_dep_college_count#27)#64, avg(cast(cd_dep_college_count#27 as bigint))#65] -Results [18]: [ca_state#20, cd_gender#23, cd_marital_status#24, count(1)#56 AS cnt1#66, min(cd_dep_count#25)#57 AS min(cd_dep_count)#67, max(cd_dep_count#25)#58 AS max(cd_dep_count)#68, avg(cast(cd_dep_count#25 as bigint))#59 AS avg(cd_dep_count)#69, cd_dep_employed_count#26, count(1)#56 AS cnt2#70, min(cd_dep_employed_count#26)#60 AS min(cd_dep_employed_count)#71, max(cd_dep_employed_count#26)#61 AS max(cd_dep_employed_count)#72, avg(cast(cd_dep_employed_count#26 as bigint))#62 AS avg(cd_dep_employed_count)#73, cd_dep_college_count#27, count(1)#56 AS cnt3#74, min(cd_dep_college_count#27)#63 AS min(cd_dep_college_count)#75, max(cd_dep_college_count#27)#64 AS max(cd_dep_college_count)#76, avg(cast(cd_dep_college_count#27 as bigint))#65 AS avg(cd_dep_college_count)#77, cd_dep_count#25 AS aggOrder#78] +Functions [10]: [count(1), min(cd_dep_count#25), max(cd_dep_count#25), avg(cd_dep_count#25), min(cd_dep_employed_count#26), max(cd_dep_employed_count#26), avg(cd_dep_employed_count#26), min(cd_dep_college_count#27), max(cd_dep_college_count#27), avg(cd_dep_college_count#27)] +Aggregate Attributes [10]: [count(1)#56, min(cd_dep_count#25)#57, max(cd_dep_count#25)#58, avg(cd_dep_count#25)#59, min(cd_dep_employed_count#26)#60, max(cd_dep_employed_count#26)#61, avg(cd_dep_employed_count#26)#62, min(cd_dep_college_count#27)#63, max(cd_dep_college_count#27)#64, avg(cd_dep_college_count#27)#65] +Results [18]: [ca_state#20, cd_gender#23, cd_marital_status#24, count(1)#56 AS cnt1#66, min(cd_dep_count#25)#57 AS min(cd_dep_count)#67, max(cd_dep_count#25)#58 AS max(cd_dep_count)#68, avg(cd_dep_count#25)#59 AS avg(cd_dep_count)#69, cd_dep_employed_count#26, count(1)#56 AS cnt2#70, min(cd_dep_employed_count#26)#60 AS min(cd_dep_employed_count)#71, max(cd_dep_employed_count#26)#61 AS max(cd_dep_employed_count)#72, avg(cd_dep_employed_count#26)#62 AS avg(cd_dep_employed_count)#73, cd_dep_college_count#27, count(1)#56 AS cnt3#74, min(cd_dep_college_count#27)#63 AS min(cd_dep_college_count)#75, max(cd_dep_college_count#27)#64 AS max(cd_dep_college_count)#76, avg(cd_dep_college_count#27)#65 AS avg(cd_dep_college_count)#77, cd_dep_count#25 AS aggOrder#78] (49) TakeOrderedAndProject Input [18]: [ca_state#20, cd_gender#23, cd_marital_status#24, cnt1#66, min(cd_dep_count)#67, max(cd_dep_count)#68, avg(cd_dep_count)#69, cd_dep_employed_count#26, cnt2#70, min(cd_dep_employed_count)#71, max(cd_dep_employed_count)#72, avg(cd_dep_employed_count)#73, cd_dep_college_count#27, cnt3#74, min(cd_dep_college_count)#75, max(cd_dep_college_count)#76, avg(cd_dep_college_count)#77, aggOrder#78] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q35/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q35/simplified.txt index 9f27114f7e0f8..768a6c117c182 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q35/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q35/simplified.txt @@ -1,6 +1,6 @@ TakeOrderedAndProject [ca_state,cd_gender,cd_marital_status,aggOrder,cd_dep_employed_count,cd_dep_college_count,cnt1,min(cd_dep_count),max(cd_dep_count),avg(cd_dep_count),cnt2,min(cd_dep_employed_count),max(cd_dep_employed_count),avg(cd_dep_employed_count),cnt3,min(cd_dep_college_count),max(cd_dep_college_count),avg(cd_dep_college_count)] WholeStageCodegen (10) - HashAggregate [ca_state,cd_gender,cd_marital_status,cd_dep_count,cd_dep_employed_count,cd_dep_college_count,count,min,max,sum,count,min,max,sum,count,min,max,sum,count] [count(1),min(cd_dep_count),max(cd_dep_count),avg(cast(cd_dep_count as bigint)),min(cd_dep_employed_count),max(cd_dep_employed_count),avg(cast(cd_dep_employed_count as bigint)),min(cd_dep_college_count),max(cd_dep_college_count),avg(cast(cd_dep_college_count as bigint)),cnt1,min(cd_dep_count),max(cd_dep_count),avg(cd_dep_count),cnt2,min(cd_dep_employed_count),max(cd_dep_employed_count),avg(cd_dep_employed_count),cnt3,min(cd_dep_college_count),max(cd_dep_college_count),avg(cd_dep_college_count),aggOrder,count,min,max,sum,count,min,max,sum,count,min,max,sum,count] + HashAggregate [ca_state,cd_gender,cd_marital_status,cd_dep_count,cd_dep_employed_count,cd_dep_college_count,count,min,max,sum,count,min,max,sum,count,min,max,sum,count] [count(1),min(cd_dep_count),max(cd_dep_count),avg(cd_dep_count),min(cd_dep_employed_count),max(cd_dep_employed_count),avg(cd_dep_employed_count),min(cd_dep_college_count),max(cd_dep_college_count),avg(cd_dep_college_count),cnt1,min(cd_dep_count),max(cd_dep_count),avg(cd_dep_count),cnt2,min(cd_dep_employed_count),max(cd_dep_employed_count),avg(cd_dep_employed_count),cnt3,min(cd_dep_college_count),max(cd_dep_college_count),avg(cd_dep_college_count),aggOrder,count,min,max,sum,count,min,max,sum,count,min,max,sum,count] InputAdapter Exchange [ca_state,cd_gender,cd_marital_status,cd_dep_count,cd_dep_employed_count,cd_dep_college_count] #1 WholeStageCodegen (9) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q36.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q36.sf100/explain.txt index d6dfb6e7785c1..2e5caee42afde 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q36.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q36.sf100/explain.txt @@ -149,18 +149,18 @@ Results [5]: [i_category#16, i_class#17, spark_grouping_id#18, sum#21, sum#22] (26) Exchange Input [5]: [i_category#16, i_class#17, spark_grouping_id#18, sum#21, sum#22] -Arguments: hashpartitioning(i_category#16, i_class#17, spark_grouping_id#18, 5), true, [id=#23] +Arguments: hashpartitioning(i_category#16, i_class#17, spark_grouping_id#18, 5), ENSURE_REQUIREMENTS, [id=#23] (27) HashAggregate [codegen id : 5] Input [5]: [i_category#16, i_class#17, spark_grouping_id#18, sum#21, sum#22] Keys [3]: [i_category#16, i_class#17, spark_grouping_id#18] Functions [2]: [sum(UnscaledValue(ss_net_profit#5)), sum(UnscaledValue(ss_ext_sales_price#4))] Aggregate Attributes [2]: [sum(UnscaledValue(ss_net_profit#5))#24, sum(UnscaledValue(ss_ext_sales_price#4))#25] -Results [7]: [CheckOverflow((promote_precision(MakeDecimal(sum(UnscaledValue(ss_net_profit#5))#24,17,2)) / promote_precision(MakeDecimal(sum(UnscaledValue(ss_ext_sales_price#4))#25,17,2))), DecimalType(37,20), true) AS gross_margin#26, i_category#16, i_class#17, (cast((shiftright(spark_grouping_id#18, 1) & 1) as tinyint) + cast((shiftright(spark_grouping_id#18, 0) & 1) as tinyint)) AS lochierarchy#27, (cast((shiftright(spark_grouping_id#18, 1) & 1) as tinyint) + cast((shiftright(spark_grouping_id#18, 0) & 1) as tinyint)) AS _w1#28, CASE WHEN (cast(cast((shiftright(spark_grouping_id#18, 0) & 1) as tinyint) as int) = 0) THEN i_category#16 END AS _w2#29, CheckOverflow((promote_precision(MakeDecimal(sum(UnscaledValue(ss_net_profit#5))#24,17,2)) / promote_precision(MakeDecimal(sum(UnscaledValue(ss_ext_sales_price#4))#25,17,2))), DecimalType(37,20), true) AS _w3#30] +Results [7]: [CheckOverflow((promote_precision(MakeDecimal(sum(UnscaledValue(ss_net_profit#5))#24,17,2)) / promote_precision(MakeDecimal(sum(UnscaledValue(ss_ext_sales_price#4))#25,17,2))), DecimalType(37,20), true) AS gross_margin#26, i_category#16, i_class#17, (cast((shiftright(spark_grouping_id#18, 1) & 1) as tinyint) + cast((shiftright(spark_grouping_id#18, 0) & 1) as tinyint)) AS lochierarchy#27, (cast((shiftright(spark_grouping_id#18, 1) & 1) as tinyint) + cast((shiftright(spark_grouping_id#18, 0) & 1) as tinyint)) AS _w1#28, CASE WHEN (cast((shiftright(spark_grouping_id#18, 0) & 1) as tinyint) = 0) THEN i_category#16 END AS _w2#29, CheckOverflow((promote_precision(MakeDecimal(sum(UnscaledValue(ss_net_profit#5))#24,17,2)) / promote_precision(MakeDecimal(sum(UnscaledValue(ss_ext_sales_price#4))#25,17,2))), DecimalType(37,20), true) AS _w3#30] (28) Exchange Input [7]: [gross_margin#26, i_category#16, i_class#17, lochierarchy#27, _w1#28, _w2#29, _w3#30] -Arguments: hashpartitioning(_w1#28, _w2#29, 5), true, [id=#31] +Arguments: hashpartitioning(_w1#28, _w2#29, 5), ENSURE_REQUIREMENTS, [id=#31] (29) Sort [codegen id : 6] Input [7]: [gross_margin#26, i_category#16, i_class#17, lochierarchy#27, _w1#28, _w2#29, _w3#30] @@ -176,5 +176,5 @@ Input [8]: [gross_margin#26, i_category#16, i_class#17, lochierarchy#27, _w1#28, (32) TakeOrderedAndProject Input [5]: [gross_margin#26, i_category#16, i_class#17, lochierarchy#27, rank_within_parent#32] -Arguments: 100, [lochierarchy#27 DESC NULLS LAST, CASE WHEN (cast(lochierarchy#27 as int) = 0) THEN i_category#16 END ASC NULLS FIRST, rank_within_parent#32 ASC NULLS FIRST], [gross_margin#26, i_category#16, i_class#17, lochierarchy#27, rank_within_parent#32] +Arguments: 100, [lochierarchy#27 DESC NULLS LAST, CASE WHEN (lochierarchy#27 = 0) THEN i_category#16 END ASC NULLS FIRST, rank_within_parent#32 ASC NULLS FIRST], [gross_margin#26, i_category#16, i_class#17, lochierarchy#27, rank_within_parent#32] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q36/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q36/explain.txt index 73174b7351002..8b57d910e2508 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q36/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q36/explain.txt @@ -149,18 +149,18 @@ Results [5]: [i_category#16, i_class#17, spark_grouping_id#18, sum#21, sum#22] (26) Exchange Input [5]: [i_category#16, i_class#17, spark_grouping_id#18, sum#21, sum#22] -Arguments: hashpartitioning(i_category#16, i_class#17, spark_grouping_id#18, 5), true, [id=#23] +Arguments: hashpartitioning(i_category#16, i_class#17, spark_grouping_id#18, 5), ENSURE_REQUIREMENTS, [id=#23] (27) HashAggregate [codegen id : 5] Input [5]: [i_category#16, i_class#17, spark_grouping_id#18, sum#21, sum#22] Keys [3]: [i_category#16, i_class#17, spark_grouping_id#18] Functions [2]: [sum(UnscaledValue(ss_net_profit#5)), sum(UnscaledValue(ss_ext_sales_price#4))] Aggregate Attributes [2]: [sum(UnscaledValue(ss_net_profit#5))#24, sum(UnscaledValue(ss_ext_sales_price#4))#25] -Results [7]: [CheckOverflow((promote_precision(MakeDecimal(sum(UnscaledValue(ss_net_profit#5))#24,17,2)) / promote_precision(MakeDecimal(sum(UnscaledValue(ss_ext_sales_price#4))#25,17,2))), DecimalType(37,20), true) AS gross_margin#26, i_category#16, i_class#17, (cast((shiftright(spark_grouping_id#18, 1) & 1) as tinyint) + cast((shiftright(spark_grouping_id#18, 0) & 1) as tinyint)) AS lochierarchy#27, (cast((shiftright(spark_grouping_id#18, 1) & 1) as tinyint) + cast((shiftright(spark_grouping_id#18, 0) & 1) as tinyint)) AS _w1#28, CASE WHEN (cast(cast((shiftright(spark_grouping_id#18, 0) & 1) as tinyint) as int) = 0) THEN i_category#16 END AS _w2#29, CheckOverflow((promote_precision(MakeDecimal(sum(UnscaledValue(ss_net_profit#5))#24,17,2)) / promote_precision(MakeDecimal(sum(UnscaledValue(ss_ext_sales_price#4))#25,17,2))), DecimalType(37,20), true) AS _w3#30] +Results [7]: [CheckOverflow((promote_precision(MakeDecimal(sum(UnscaledValue(ss_net_profit#5))#24,17,2)) / promote_precision(MakeDecimal(sum(UnscaledValue(ss_ext_sales_price#4))#25,17,2))), DecimalType(37,20), true) AS gross_margin#26, i_category#16, i_class#17, (cast((shiftright(spark_grouping_id#18, 1) & 1) as tinyint) + cast((shiftright(spark_grouping_id#18, 0) & 1) as tinyint)) AS lochierarchy#27, (cast((shiftright(spark_grouping_id#18, 1) & 1) as tinyint) + cast((shiftright(spark_grouping_id#18, 0) & 1) as tinyint)) AS _w1#28, CASE WHEN (cast((shiftright(spark_grouping_id#18, 0) & 1) as tinyint) = 0) THEN i_category#16 END AS _w2#29, CheckOverflow((promote_precision(MakeDecimal(sum(UnscaledValue(ss_net_profit#5))#24,17,2)) / promote_precision(MakeDecimal(sum(UnscaledValue(ss_ext_sales_price#4))#25,17,2))), DecimalType(37,20), true) AS _w3#30] (28) Exchange Input [7]: [gross_margin#26, i_category#16, i_class#17, lochierarchy#27, _w1#28, _w2#29, _w3#30] -Arguments: hashpartitioning(_w1#28, _w2#29, 5), true, [id=#31] +Arguments: hashpartitioning(_w1#28, _w2#29, 5), ENSURE_REQUIREMENTS, [id=#31] (29) Sort [codegen id : 6] Input [7]: [gross_margin#26, i_category#16, i_class#17, lochierarchy#27, _w1#28, _w2#29, _w3#30] @@ -176,5 +176,5 @@ Input [8]: [gross_margin#26, i_category#16, i_class#17, lochierarchy#27, _w1#28, (32) TakeOrderedAndProject Input [5]: [gross_margin#26, i_category#16, i_class#17, lochierarchy#27, rank_within_parent#32] -Arguments: 100, [lochierarchy#27 DESC NULLS LAST, CASE WHEN (cast(lochierarchy#27 as int) = 0) THEN i_category#16 END ASC NULLS FIRST, rank_within_parent#32 ASC NULLS FIRST], [gross_margin#26, i_category#16, i_class#17, lochierarchy#27, rank_within_parent#32] +Arguments: 100, [lochierarchy#27 DESC NULLS LAST, CASE WHEN (lochierarchy#27 = 0) THEN i_category#16 END ASC NULLS FIRST, rank_within_parent#32 ASC NULLS FIRST], [gross_margin#26, i_category#16, i_class#17, lochierarchy#27, rank_within_parent#32] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39a.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39a.sf100/explain.txt index 3cf87e9bf2eaf..7b30af2feadc9 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39a.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39a.sf100/explain.txt @@ -158,24 +158,24 @@ Input [6]: [inv_warehouse_sk#3, inv_quantity_on_hand#4, d_moy#7, i_item_sk#9, w_ (23) HashAggregate [codegen id : 4] Input [5]: [inv_quantity_on_hand#4, i_item_sk#9, w_warehouse_sk#11, w_warehouse_name#12, d_moy#7] Keys [4]: [w_warehouse_name#12, w_warehouse_sk#11, i_item_sk#9, d_moy#7] -Functions [2]: [partial_stddev_samp(cast(inv_quantity_on_hand#4 as double)), partial_avg(cast(inv_quantity_on_hand#4 as bigint))] +Functions [2]: [partial_stddev_samp(cast(inv_quantity_on_hand#4 as double)), partial_avg(inv_quantity_on_hand#4)] Aggregate Attributes [5]: [n#14, avg#15, m2#16, sum#17, count#18] Results [9]: [w_warehouse_name#12, w_warehouse_sk#11, i_item_sk#9, d_moy#7, n#19, avg#20, m2#21, sum#22, count#23] (24) Exchange Input [9]: [w_warehouse_name#12, w_warehouse_sk#11, i_item_sk#9, d_moy#7, n#19, avg#20, m2#21, sum#22, count#23] -Arguments: hashpartitioning(w_warehouse_name#12, w_warehouse_sk#11, i_item_sk#9, d_moy#7, 5), true, [id=#24] +Arguments: hashpartitioning(w_warehouse_name#12, w_warehouse_sk#11, i_item_sk#9, d_moy#7, 5), ENSURE_REQUIREMENTS, [id=#24] (25) HashAggregate [codegen id : 5] Input [9]: [w_warehouse_name#12, w_warehouse_sk#11, i_item_sk#9, d_moy#7, n#19, avg#20, m2#21, sum#22, count#23] Keys [4]: [w_warehouse_name#12, w_warehouse_sk#11, i_item_sk#9, d_moy#7] -Functions [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double)), avg(cast(inv_quantity_on_hand#4 as bigint))] -Aggregate Attributes [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double))#25, avg(cast(inv_quantity_on_hand#4 as bigint))#26] -Results [5]: [w_warehouse_sk#11, i_item_sk#9, d_moy#7, stddev_samp(cast(inv_quantity_on_hand#4 as double))#25 AS stdev#27, avg(cast(inv_quantity_on_hand#4 as bigint))#26 AS mean#28] +Functions [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double)), avg(inv_quantity_on_hand#4)] +Aggregate Attributes [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double))#25, avg(inv_quantity_on_hand#4)#26] +Results [5]: [w_warehouse_sk#11, i_item_sk#9, d_moy#7, stddev_samp(cast(inv_quantity_on_hand#4 as double))#25 AS stdev#27, avg(inv_quantity_on_hand#4)#26 AS mean#28] (26) Filter [codegen id : 5] Input [5]: [w_warehouse_sk#11, i_item_sk#9, d_moy#7, stdev#27, mean#28] -Condition : (CASE WHEN (mean#28 = 0.0) THEN 0.0 ELSE (stdev#27 / mean#28) END > 1.0) +Condition : (((isnotnull(mean#28) AND isnotnull(stdev#27)) AND NOT (mean#28 = 0.0)) AND ((stdev#27 / mean#28) > 1.0)) (27) Project [codegen id : 5] Output [5]: [w_warehouse_sk#11, i_item_sk#9, d_moy#7, mean#28, CASE WHEN (mean#28 = 0.0) THEN null ELSE (stdev#27 / mean#28) END AS cov#29] @@ -183,7 +183,7 @@ Input [5]: [w_warehouse_sk#11, i_item_sk#9, d_moy#7, stdev#27, mean#28] (28) Exchange Input [5]: [w_warehouse_sk#11, i_item_sk#9, d_moy#7, mean#28, cov#29] -Arguments: hashpartitioning(i_item_sk#9, w_warehouse_sk#11, 5), true, [id=#30] +Arguments: hashpartitioning(i_item_sk#9, w_warehouse_sk#11, 5), ENSURE_REQUIREMENTS, [id=#30] (29) Sort [codegen id : 6] Input [5]: [w_warehouse_sk#11, i_item_sk#9, d_moy#7, mean#28, cov#29] @@ -261,24 +261,24 @@ Input [6]: [inv_warehouse_sk#3, inv_quantity_on_hand#4, d_moy#33, i_item_sk#35, (46) HashAggregate [codegen id : 10] Input [5]: [inv_quantity_on_hand#4, i_item_sk#35, w_warehouse_sk#36, w_warehouse_name#37, d_moy#33] Keys [4]: [w_warehouse_name#37, w_warehouse_sk#36, i_item_sk#35, d_moy#33] -Functions [2]: [partial_stddev_samp(cast(inv_quantity_on_hand#4 as double)), partial_avg(cast(inv_quantity_on_hand#4 as bigint))] +Functions [2]: [partial_stddev_samp(cast(inv_quantity_on_hand#4 as double)), partial_avg(inv_quantity_on_hand#4)] Aggregate Attributes [5]: [n#38, avg#39, m2#40, sum#41, count#42] Results [9]: [w_warehouse_name#37, w_warehouse_sk#36, i_item_sk#35, d_moy#33, n#43, avg#44, m2#45, sum#46, count#47] (47) Exchange Input [9]: [w_warehouse_name#37, w_warehouse_sk#36, i_item_sk#35, d_moy#33, n#43, avg#44, m2#45, sum#46, count#47] -Arguments: hashpartitioning(w_warehouse_name#37, w_warehouse_sk#36, i_item_sk#35, d_moy#33, 5), true, [id=#48] +Arguments: hashpartitioning(w_warehouse_name#37, w_warehouse_sk#36, i_item_sk#35, d_moy#33, 5), ENSURE_REQUIREMENTS, [id=#48] (48) HashAggregate [codegen id : 11] Input [9]: [w_warehouse_name#37, w_warehouse_sk#36, i_item_sk#35, d_moy#33, n#43, avg#44, m2#45, sum#46, count#47] Keys [4]: [w_warehouse_name#37, w_warehouse_sk#36, i_item_sk#35, d_moy#33] -Functions [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double)), avg(cast(inv_quantity_on_hand#4 as bigint))] -Aggregate Attributes [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double))#49, avg(cast(inv_quantity_on_hand#4 as bigint))#50] -Results [5]: [w_warehouse_sk#36, i_item_sk#35, d_moy#33, stddev_samp(cast(inv_quantity_on_hand#4 as double))#49 AS stdev#51, avg(cast(inv_quantity_on_hand#4 as bigint))#50 AS mean#52] +Functions [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double)), avg(inv_quantity_on_hand#4)] +Aggregate Attributes [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double))#49, avg(inv_quantity_on_hand#4)#50] +Results [5]: [w_warehouse_sk#36, i_item_sk#35, d_moy#33, stddev_samp(cast(inv_quantity_on_hand#4 as double))#49 AS stdev#51, avg(inv_quantity_on_hand#4)#50 AS mean#52] (49) Filter [codegen id : 11] Input [5]: [w_warehouse_sk#36, i_item_sk#35, d_moy#33, stdev#51, mean#52] -Condition : (CASE WHEN (mean#52 = 0.0) THEN 0.0 ELSE (stdev#51 / mean#52) END > 1.0) +Condition : (((isnotnull(mean#52) AND isnotnull(stdev#51)) AND NOT (mean#52 = 0.0)) AND ((stdev#51 / mean#52) > 1.0)) (50) Project [codegen id : 11] Output [5]: [w_warehouse_sk#36, i_item_sk#35, d_moy#33, mean#52, CASE WHEN (mean#52 = 0.0) THEN null ELSE (stdev#51 / mean#52) END AS cov#53] @@ -286,7 +286,7 @@ Input [5]: [w_warehouse_sk#36, i_item_sk#35, d_moy#33, stdev#51, mean#52] (51) Exchange Input [5]: [w_warehouse_sk#36, i_item_sk#35, d_moy#33, mean#52, cov#53] -Arguments: hashpartitioning(i_item_sk#35, w_warehouse_sk#36, 5), true, [id=#54] +Arguments: hashpartitioning(i_item_sk#35, w_warehouse_sk#36, 5), ENSURE_REQUIREMENTS, [id=#54] (52) Sort [codegen id : 12] Input [5]: [w_warehouse_sk#36, i_item_sk#35, d_moy#33, mean#52, cov#53] @@ -299,7 +299,7 @@ Join condition: None (54) Exchange Input [10]: [w_warehouse_sk#11, i_item_sk#9, d_moy#7, mean#28, cov#29, w_warehouse_sk#36, i_item_sk#35, d_moy#33, mean#52, cov#53] -Arguments: rangepartitioning(w_warehouse_sk#11 ASC NULLS FIRST, i_item_sk#9 ASC NULLS FIRST, d_moy#7 ASC NULLS FIRST, mean#28 ASC NULLS FIRST, cov#29 ASC NULLS FIRST, d_moy#33 ASC NULLS FIRST, mean#52 ASC NULLS FIRST, cov#53 ASC NULLS FIRST, 5), true, [id=#55] +Arguments: rangepartitioning(w_warehouse_sk#11 ASC NULLS FIRST, i_item_sk#9 ASC NULLS FIRST, d_moy#7 ASC NULLS FIRST, mean#28 ASC NULLS FIRST, cov#29 ASC NULLS FIRST, d_moy#33 ASC NULLS FIRST, mean#52 ASC NULLS FIRST, cov#53 ASC NULLS FIRST, 5), ENSURE_REQUIREMENTS, [id=#55] (55) Sort [codegen id : 14] Input [10]: [w_warehouse_sk#11, i_item_sk#9, d_moy#7, mean#28, cov#29, w_warehouse_sk#36, i_item_sk#35, d_moy#33, mean#52, cov#53] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39a.sf100/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39a.sf100/simplified.txt index c0f519d2ec83b..fa7aff956db52 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39a.sf100/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39a.sf100/simplified.txt @@ -12,7 +12,7 @@ WholeStageCodegen (14) WholeStageCodegen (5) Project [w_warehouse_sk,i_item_sk,d_moy,mean,stdev] Filter [mean,stdev] - HashAggregate [w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy,n,avg,m2,sum,count] [stddev_samp(cast(inv_quantity_on_hand as double)),avg(cast(inv_quantity_on_hand as bigint)),stdev,mean,n,avg,m2,sum,count] + HashAggregate [w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy,n,avg,m2,sum,count] [stddev_samp(cast(inv_quantity_on_hand as double)),avg(inv_quantity_on_hand),stdev,mean,n,avg,m2,sum,count] InputAdapter Exchange [w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy] #3 WholeStageCodegen (4) @@ -57,7 +57,7 @@ WholeStageCodegen (14) WholeStageCodegen (11) Project [w_warehouse_sk,i_item_sk,d_moy,mean,stdev] Filter [mean,stdev] - HashAggregate [w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy,n,avg,m2,sum,count] [stddev_samp(cast(inv_quantity_on_hand as double)),avg(cast(inv_quantity_on_hand as bigint)),stdev,mean,n,avg,m2,sum,count] + HashAggregate [w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy,n,avg,m2,sum,count] [stddev_samp(cast(inv_quantity_on_hand as double)),avg(inv_quantity_on_hand),stdev,mean,n,avg,m2,sum,count] InputAdapter Exchange [w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy] #8 WholeStageCodegen (10) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39a/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39a/explain.txt index b2cc849c603c8..33eaed4aa9f79 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39a/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39a/explain.txt @@ -155,24 +155,24 @@ Input [7]: [inv_date_sk#1, inv_quantity_on_hand#4, i_item_sk#5, w_warehouse_sk#7 (23) HashAggregate [codegen id : 4] Input [5]: [inv_quantity_on_hand#4, i_item_sk#5, w_warehouse_sk#7, w_warehouse_name#8, d_moy#12] Keys [4]: [w_warehouse_name#8, w_warehouse_sk#7, i_item_sk#5, d_moy#12] -Functions [2]: [partial_stddev_samp(cast(inv_quantity_on_hand#4 as double)), partial_avg(cast(inv_quantity_on_hand#4 as bigint))] +Functions [2]: [partial_stddev_samp(cast(inv_quantity_on_hand#4 as double)), partial_avg(inv_quantity_on_hand#4)] Aggregate Attributes [5]: [n#14, avg#15, m2#16, sum#17, count#18] Results [9]: [w_warehouse_name#8, w_warehouse_sk#7, i_item_sk#5, d_moy#12, n#19, avg#20, m2#21, sum#22, count#23] (24) Exchange Input [9]: [w_warehouse_name#8, w_warehouse_sk#7, i_item_sk#5, d_moy#12, n#19, avg#20, m2#21, sum#22, count#23] -Arguments: hashpartitioning(w_warehouse_name#8, w_warehouse_sk#7, i_item_sk#5, d_moy#12, 5), true, [id=#24] +Arguments: hashpartitioning(w_warehouse_name#8, w_warehouse_sk#7, i_item_sk#5, d_moy#12, 5), ENSURE_REQUIREMENTS, [id=#24] (25) HashAggregate [codegen id : 10] Input [9]: [w_warehouse_name#8, w_warehouse_sk#7, i_item_sk#5, d_moy#12, n#19, avg#20, m2#21, sum#22, count#23] Keys [4]: [w_warehouse_name#8, w_warehouse_sk#7, i_item_sk#5, d_moy#12] -Functions [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double)), avg(cast(inv_quantity_on_hand#4 as bigint))] -Aggregate Attributes [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double))#25, avg(cast(inv_quantity_on_hand#4 as bigint))#26] -Results [5]: [w_warehouse_sk#7, i_item_sk#5, d_moy#12, stddev_samp(cast(inv_quantity_on_hand#4 as double))#25 AS stdev#27, avg(cast(inv_quantity_on_hand#4 as bigint))#26 AS mean#28] +Functions [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double)), avg(inv_quantity_on_hand#4)] +Aggregate Attributes [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double))#25, avg(inv_quantity_on_hand#4)#26] +Results [5]: [w_warehouse_sk#7, i_item_sk#5, d_moy#12, stddev_samp(cast(inv_quantity_on_hand#4 as double))#25 AS stdev#27, avg(inv_quantity_on_hand#4)#26 AS mean#28] (26) Filter [codegen id : 10] Input [5]: [w_warehouse_sk#7, i_item_sk#5, d_moy#12, stdev#27, mean#28] -Condition : (CASE WHEN (mean#28 = 0.0) THEN 0.0 ELSE (stdev#27 / mean#28) END > 1.0) +Condition : (((isnotnull(mean#28) AND isnotnull(stdev#27)) AND NOT (mean#28 = 0.0)) AND ((stdev#27 / mean#28) > 1.0)) (27) Project [codegen id : 10] Output [5]: [w_warehouse_sk#7, i_item_sk#5, d_moy#12, mean#28, CASE WHEN (mean#28 = 0.0) THEN null ELSE (stdev#27 / mean#28) END AS cov#29] @@ -250,24 +250,24 @@ Input [7]: [inv_date_sk#1, inv_quantity_on_hand#4, i_item_sk#30, w_warehouse_sk# (44) HashAggregate [codegen id : 8] Input [5]: [inv_quantity_on_hand#4, i_item_sk#30, w_warehouse_sk#31, w_warehouse_name#32, d_moy#35] Keys [4]: [w_warehouse_name#32, w_warehouse_sk#31, i_item_sk#30, d_moy#35] -Functions [2]: [partial_stddev_samp(cast(inv_quantity_on_hand#4 as double)), partial_avg(cast(inv_quantity_on_hand#4 as bigint))] +Functions [2]: [partial_stddev_samp(cast(inv_quantity_on_hand#4 as double)), partial_avg(inv_quantity_on_hand#4)] Aggregate Attributes [5]: [n#37, avg#38, m2#39, sum#40, count#41] Results [9]: [w_warehouse_name#32, w_warehouse_sk#31, i_item_sk#30, d_moy#35, n#42, avg#43, m2#44, sum#45, count#46] (45) Exchange Input [9]: [w_warehouse_name#32, w_warehouse_sk#31, i_item_sk#30, d_moy#35, n#42, avg#43, m2#44, sum#45, count#46] -Arguments: hashpartitioning(w_warehouse_name#32, w_warehouse_sk#31, i_item_sk#30, d_moy#35, 5), true, [id=#47] +Arguments: hashpartitioning(w_warehouse_name#32, w_warehouse_sk#31, i_item_sk#30, d_moy#35, 5), ENSURE_REQUIREMENTS, [id=#47] (46) HashAggregate [codegen id : 9] Input [9]: [w_warehouse_name#32, w_warehouse_sk#31, i_item_sk#30, d_moy#35, n#42, avg#43, m2#44, sum#45, count#46] Keys [4]: [w_warehouse_name#32, w_warehouse_sk#31, i_item_sk#30, d_moy#35] -Functions [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double)), avg(cast(inv_quantity_on_hand#4 as bigint))] -Aggregate Attributes [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double))#48, avg(cast(inv_quantity_on_hand#4 as bigint))#49] -Results [5]: [w_warehouse_sk#31, i_item_sk#30, d_moy#35, stddev_samp(cast(inv_quantity_on_hand#4 as double))#48 AS stdev#50, avg(cast(inv_quantity_on_hand#4 as bigint))#49 AS mean#51] +Functions [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double)), avg(inv_quantity_on_hand#4)] +Aggregate Attributes [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double))#48, avg(inv_quantity_on_hand#4)#49] +Results [5]: [w_warehouse_sk#31, i_item_sk#30, d_moy#35, stddev_samp(cast(inv_quantity_on_hand#4 as double))#48 AS stdev#50, avg(inv_quantity_on_hand#4)#49 AS mean#51] (47) Filter [codegen id : 9] Input [5]: [w_warehouse_sk#31, i_item_sk#30, d_moy#35, stdev#50, mean#51] -Condition : (CASE WHEN (mean#51 = 0.0) THEN 0.0 ELSE (stdev#50 / mean#51) END > 1.0) +Condition : (((isnotnull(mean#51) AND isnotnull(stdev#50)) AND NOT (mean#51 = 0.0)) AND ((stdev#50 / mean#51) > 1.0)) (48) Project [codegen id : 9] Output [5]: [w_warehouse_sk#31, i_item_sk#30, d_moy#35, mean#51, CASE WHEN (mean#51 = 0.0) THEN null ELSE (stdev#50 / mean#51) END AS cov#52] @@ -284,7 +284,7 @@ Join condition: None (51) Exchange Input [10]: [w_warehouse_sk#7, i_item_sk#5, d_moy#12, mean#28, cov#29, w_warehouse_sk#31, i_item_sk#30, d_moy#35, mean#51, cov#52] -Arguments: rangepartitioning(w_warehouse_sk#7 ASC NULLS FIRST, i_item_sk#5 ASC NULLS FIRST, d_moy#12 ASC NULLS FIRST, mean#28 ASC NULLS FIRST, cov#29 ASC NULLS FIRST, d_moy#35 ASC NULLS FIRST, mean#51 ASC NULLS FIRST, cov#52 ASC NULLS FIRST, 5), true, [id=#54] +Arguments: rangepartitioning(w_warehouse_sk#7 ASC NULLS FIRST, i_item_sk#5 ASC NULLS FIRST, d_moy#12 ASC NULLS FIRST, mean#28 ASC NULLS FIRST, cov#29 ASC NULLS FIRST, d_moy#35 ASC NULLS FIRST, mean#51 ASC NULLS FIRST, cov#52 ASC NULLS FIRST, 5), ENSURE_REQUIREMENTS, [id=#54] (52) Sort [codegen id : 11] Input [10]: [w_warehouse_sk#7, i_item_sk#5, d_moy#12, mean#28, cov#29, w_warehouse_sk#31, i_item_sk#30, d_moy#35, mean#51, cov#52] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39a/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39a/simplified.txt index f4e23c837b63a..6dab46108f564 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39a/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39a/simplified.txt @@ -6,7 +6,7 @@ WholeStageCodegen (11) BroadcastHashJoin [i_item_sk,w_warehouse_sk,i_item_sk,w_warehouse_sk] Project [w_warehouse_sk,i_item_sk,d_moy,mean,stdev] Filter [mean,stdev] - HashAggregate [w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy,n,avg,m2,sum,count] [stddev_samp(cast(inv_quantity_on_hand as double)),avg(cast(inv_quantity_on_hand as bigint)),stdev,mean,n,avg,m2,sum,count] + HashAggregate [w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy,n,avg,m2,sum,count] [stddev_samp(cast(inv_quantity_on_hand as double)),avg(inv_quantity_on_hand),stdev,mean,n,avg,m2,sum,count] InputAdapter Exchange [w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy] #2 WholeStageCodegen (4) @@ -48,7 +48,7 @@ WholeStageCodegen (11) WholeStageCodegen (9) Project [w_warehouse_sk,i_item_sk,d_moy,mean,stdev] Filter [mean,stdev] - HashAggregate [w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy,n,avg,m2,sum,count] [stddev_samp(cast(inv_quantity_on_hand as double)),avg(cast(inv_quantity_on_hand as bigint)),stdev,mean,n,avg,m2,sum,count] + HashAggregate [w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy,n,avg,m2,sum,count] [stddev_samp(cast(inv_quantity_on_hand as double)),avg(inv_quantity_on_hand),stdev,mean,n,avg,m2,sum,count] InputAdapter Exchange [w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy] #7 WholeStageCodegen (8) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39b.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39b.sf100/explain.txt index b73801a52bb37..7e34e0c21f59f 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39b.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39b.sf100/explain.txt @@ -158,24 +158,24 @@ Input [6]: [inv_warehouse_sk#3, inv_quantity_on_hand#4, d_moy#7, i_item_sk#9, w_ (23) HashAggregate [codegen id : 4] Input [5]: [inv_quantity_on_hand#4, i_item_sk#9, w_warehouse_sk#11, w_warehouse_name#12, d_moy#7] Keys [4]: [w_warehouse_name#12, w_warehouse_sk#11, i_item_sk#9, d_moy#7] -Functions [2]: [partial_stddev_samp(cast(inv_quantity_on_hand#4 as double)), partial_avg(cast(inv_quantity_on_hand#4 as bigint))] +Functions [2]: [partial_stddev_samp(cast(inv_quantity_on_hand#4 as double)), partial_avg(inv_quantity_on_hand#4)] Aggregate Attributes [5]: [n#14, avg#15, m2#16, sum#17, count#18] Results [9]: [w_warehouse_name#12, w_warehouse_sk#11, i_item_sk#9, d_moy#7, n#19, avg#20, m2#21, sum#22, count#23] (24) Exchange Input [9]: [w_warehouse_name#12, w_warehouse_sk#11, i_item_sk#9, d_moy#7, n#19, avg#20, m2#21, sum#22, count#23] -Arguments: hashpartitioning(w_warehouse_name#12, w_warehouse_sk#11, i_item_sk#9, d_moy#7, 5), true, [id=#24] +Arguments: hashpartitioning(w_warehouse_name#12, w_warehouse_sk#11, i_item_sk#9, d_moy#7, 5), ENSURE_REQUIREMENTS, [id=#24] (25) HashAggregate [codegen id : 5] Input [9]: [w_warehouse_name#12, w_warehouse_sk#11, i_item_sk#9, d_moy#7, n#19, avg#20, m2#21, sum#22, count#23] Keys [4]: [w_warehouse_name#12, w_warehouse_sk#11, i_item_sk#9, d_moy#7] -Functions [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double)), avg(cast(inv_quantity_on_hand#4 as bigint))] -Aggregate Attributes [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double))#25, avg(cast(inv_quantity_on_hand#4 as bigint))#26] -Results [5]: [w_warehouse_sk#11, i_item_sk#9, d_moy#7, stddev_samp(cast(inv_quantity_on_hand#4 as double))#25 AS stdev#27, avg(cast(inv_quantity_on_hand#4 as bigint))#26 AS mean#28] +Functions [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double)), avg(inv_quantity_on_hand#4)] +Aggregate Attributes [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double))#25, avg(inv_quantity_on_hand#4)#26] +Results [5]: [w_warehouse_sk#11, i_item_sk#9, d_moy#7, stddev_samp(cast(inv_quantity_on_hand#4 as double))#25 AS stdev#27, avg(inv_quantity_on_hand#4)#26 AS mean#28] (26) Filter [codegen id : 5] Input [5]: [w_warehouse_sk#11, i_item_sk#9, d_moy#7, stdev#27, mean#28] -Condition : ((CASE WHEN (mean#28 = 0.0) THEN 0.0 ELSE (stdev#27 / mean#28) END > 1.0) AND (CASE WHEN (mean#28 = 0.0) THEN null ELSE (stdev#27 / mean#28) END > 1.5)) +Condition : (((((isnotnull(mean#28) AND isnotnull(stdev#27)) AND NOT (mean#28 = 0.0)) AND ((stdev#27 / mean#28) > 1.0)) AND NOT (mean#28 = 0.0)) AND ((stdev#27 / mean#28) > 1.5)) (27) Project [codegen id : 5] Output [5]: [w_warehouse_sk#11, i_item_sk#9, d_moy#7, mean#28, CASE WHEN (mean#28 = 0.0) THEN null ELSE (stdev#27 / mean#28) END AS cov#29] @@ -183,7 +183,7 @@ Input [5]: [w_warehouse_sk#11, i_item_sk#9, d_moy#7, stdev#27, mean#28] (28) Exchange Input [5]: [w_warehouse_sk#11, i_item_sk#9, d_moy#7, mean#28, cov#29] -Arguments: hashpartitioning(i_item_sk#9, w_warehouse_sk#11, 5), true, [id=#30] +Arguments: hashpartitioning(i_item_sk#9, w_warehouse_sk#11, 5), ENSURE_REQUIREMENTS, [id=#30] (29) Sort [codegen id : 6] Input [5]: [w_warehouse_sk#11, i_item_sk#9, d_moy#7, mean#28, cov#29] @@ -261,24 +261,24 @@ Input [6]: [inv_warehouse_sk#3, inv_quantity_on_hand#4, d_moy#33, i_item_sk#35, (46) HashAggregate [codegen id : 10] Input [5]: [inv_quantity_on_hand#4, i_item_sk#35, w_warehouse_sk#36, w_warehouse_name#37, d_moy#33] Keys [4]: [w_warehouse_name#37, w_warehouse_sk#36, i_item_sk#35, d_moy#33] -Functions [2]: [partial_stddev_samp(cast(inv_quantity_on_hand#4 as double)), partial_avg(cast(inv_quantity_on_hand#4 as bigint))] +Functions [2]: [partial_stddev_samp(cast(inv_quantity_on_hand#4 as double)), partial_avg(inv_quantity_on_hand#4)] Aggregate Attributes [5]: [n#38, avg#39, m2#40, sum#41, count#42] Results [9]: [w_warehouse_name#37, w_warehouse_sk#36, i_item_sk#35, d_moy#33, n#43, avg#44, m2#45, sum#46, count#47] (47) Exchange Input [9]: [w_warehouse_name#37, w_warehouse_sk#36, i_item_sk#35, d_moy#33, n#43, avg#44, m2#45, sum#46, count#47] -Arguments: hashpartitioning(w_warehouse_name#37, w_warehouse_sk#36, i_item_sk#35, d_moy#33, 5), true, [id=#48] +Arguments: hashpartitioning(w_warehouse_name#37, w_warehouse_sk#36, i_item_sk#35, d_moy#33, 5), ENSURE_REQUIREMENTS, [id=#48] (48) HashAggregate [codegen id : 11] Input [9]: [w_warehouse_name#37, w_warehouse_sk#36, i_item_sk#35, d_moy#33, n#43, avg#44, m2#45, sum#46, count#47] Keys [4]: [w_warehouse_name#37, w_warehouse_sk#36, i_item_sk#35, d_moy#33] -Functions [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double)), avg(cast(inv_quantity_on_hand#4 as bigint))] -Aggregate Attributes [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double))#49, avg(cast(inv_quantity_on_hand#4 as bigint))#50] -Results [5]: [w_warehouse_sk#36, i_item_sk#35, d_moy#33, stddev_samp(cast(inv_quantity_on_hand#4 as double))#49 AS stdev#51, avg(cast(inv_quantity_on_hand#4 as bigint))#50 AS mean#52] +Functions [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double)), avg(inv_quantity_on_hand#4)] +Aggregate Attributes [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double))#49, avg(inv_quantity_on_hand#4)#50] +Results [5]: [w_warehouse_sk#36, i_item_sk#35, d_moy#33, stddev_samp(cast(inv_quantity_on_hand#4 as double))#49 AS stdev#51, avg(inv_quantity_on_hand#4)#50 AS mean#52] (49) Filter [codegen id : 11] Input [5]: [w_warehouse_sk#36, i_item_sk#35, d_moy#33, stdev#51, mean#52] -Condition : (CASE WHEN (mean#52 = 0.0) THEN 0.0 ELSE (stdev#51 / mean#52) END > 1.0) +Condition : (((isnotnull(mean#52) AND isnotnull(stdev#51)) AND NOT (mean#52 = 0.0)) AND ((stdev#51 / mean#52) > 1.0)) (50) Project [codegen id : 11] Output [5]: [w_warehouse_sk#36, i_item_sk#35, d_moy#33, mean#52, CASE WHEN (mean#52 = 0.0) THEN null ELSE (stdev#51 / mean#52) END AS cov#53] @@ -286,7 +286,7 @@ Input [5]: [w_warehouse_sk#36, i_item_sk#35, d_moy#33, stdev#51, mean#52] (51) Exchange Input [5]: [w_warehouse_sk#36, i_item_sk#35, d_moy#33, mean#52, cov#53] -Arguments: hashpartitioning(i_item_sk#35, w_warehouse_sk#36, 5), true, [id=#54] +Arguments: hashpartitioning(i_item_sk#35, w_warehouse_sk#36, 5), ENSURE_REQUIREMENTS, [id=#54] (52) Sort [codegen id : 12] Input [5]: [w_warehouse_sk#36, i_item_sk#35, d_moy#33, mean#52, cov#53] @@ -299,7 +299,7 @@ Join condition: None (54) Exchange Input [10]: [w_warehouse_sk#11, i_item_sk#9, d_moy#7, mean#28, cov#29, w_warehouse_sk#36, i_item_sk#35, d_moy#33, mean#52, cov#53] -Arguments: rangepartitioning(w_warehouse_sk#11 ASC NULLS FIRST, i_item_sk#9 ASC NULLS FIRST, d_moy#7 ASC NULLS FIRST, mean#28 ASC NULLS FIRST, cov#29 ASC NULLS FIRST, d_moy#33 ASC NULLS FIRST, mean#52 ASC NULLS FIRST, cov#53 ASC NULLS FIRST, 5), true, [id=#55] +Arguments: rangepartitioning(w_warehouse_sk#11 ASC NULLS FIRST, i_item_sk#9 ASC NULLS FIRST, d_moy#7 ASC NULLS FIRST, mean#28 ASC NULLS FIRST, cov#29 ASC NULLS FIRST, d_moy#33 ASC NULLS FIRST, mean#52 ASC NULLS FIRST, cov#53 ASC NULLS FIRST, 5), ENSURE_REQUIREMENTS, [id=#55] (55) Sort [codegen id : 14] Input [10]: [w_warehouse_sk#11, i_item_sk#9, d_moy#7, mean#28, cov#29, w_warehouse_sk#36, i_item_sk#35, d_moy#33, mean#52, cov#53] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39b.sf100/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39b.sf100/simplified.txt index c0f519d2ec83b..fa7aff956db52 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39b.sf100/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39b.sf100/simplified.txt @@ -12,7 +12,7 @@ WholeStageCodegen (14) WholeStageCodegen (5) Project [w_warehouse_sk,i_item_sk,d_moy,mean,stdev] Filter [mean,stdev] - HashAggregate [w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy,n,avg,m2,sum,count] [stddev_samp(cast(inv_quantity_on_hand as double)),avg(cast(inv_quantity_on_hand as bigint)),stdev,mean,n,avg,m2,sum,count] + HashAggregate [w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy,n,avg,m2,sum,count] [stddev_samp(cast(inv_quantity_on_hand as double)),avg(inv_quantity_on_hand),stdev,mean,n,avg,m2,sum,count] InputAdapter Exchange [w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy] #3 WholeStageCodegen (4) @@ -57,7 +57,7 @@ WholeStageCodegen (14) WholeStageCodegen (11) Project [w_warehouse_sk,i_item_sk,d_moy,mean,stdev] Filter [mean,stdev] - HashAggregate [w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy,n,avg,m2,sum,count] [stddev_samp(cast(inv_quantity_on_hand as double)),avg(cast(inv_quantity_on_hand as bigint)),stdev,mean,n,avg,m2,sum,count] + HashAggregate [w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy,n,avg,m2,sum,count] [stddev_samp(cast(inv_quantity_on_hand as double)),avg(inv_quantity_on_hand),stdev,mean,n,avg,m2,sum,count] InputAdapter Exchange [w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy] #8 WholeStageCodegen (10) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39b/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39b/explain.txt index 92c2d5ed4700b..21a0c09b35134 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39b/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39b/explain.txt @@ -155,24 +155,24 @@ Input [7]: [inv_date_sk#1, inv_quantity_on_hand#4, i_item_sk#5, w_warehouse_sk#7 (23) HashAggregate [codegen id : 4] Input [5]: [inv_quantity_on_hand#4, i_item_sk#5, w_warehouse_sk#7, w_warehouse_name#8, d_moy#12] Keys [4]: [w_warehouse_name#8, w_warehouse_sk#7, i_item_sk#5, d_moy#12] -Functions [2]: [partial_stddev_samp(cast(inv_quantity_on_hand#4 as double)), partial_avg(cast(inv_quantity_on_hand#4 as bigint))] +Functions [2]: [partial_stddev_samp(cast(inv_quantity_on_hand#4 as double)), partial_avg(inv_quantity_on_hand#4)] Aggregate Attributes [5]: [n#14, avg#15, m2#16, sum#17, count#18] Results [9]: [w_warehouse_name#8, w_warehouse_sk#7, i_item_sk#5, d_moy#12, n#19, avg#20, m2#21, sum#22, count#23] (24) Exchange Input [9]: [w_warehouse_name#8, w_warehouse_sk#7, i_item_sk#5, d_moy#12, n#19, avg#20, m2#21, sum#22, count#23] -Arguments: hashpartitioning(w_warehouse_name#8, w_warehouse_sk#7, i_item_sk#5, d_moy#12, 5), true, [id=#24] +Arguments: hashpartitioning(w_warehouse_name#8, w_warehouse_sk#7, i_item_sk#5, d_moy#12, 5), ENSURE_REQUIREMENTS, [id=#24] (25) HashAggregate [codegen id : 10] Input [9]: [w_warehouse_name#8, w_warehouse_sk#7, i_item_sk#5, d_moy#12, n#19, avg#20, m2#21, sum#22, count#23] Keys [4]: [w_warehouse_name#8, w_warehouse_sk#7, i_item_sk#5, d_moy#12] -Functions [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double)), avg(cast(inv_quantity_on_hand#4 as bigint))] -Aggregate Attributes [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double))#25, avg(cast(inv_quantity_on_hand#4 as bigint))#26] -Results [5]: [w_warehouse_sk#7, i_item_sk#5, d_moy#12, stddev_samp(cast(inv_quantity_on_hand#4 as double))#25 AS stdev#27, avg(cast(inv_quantity_on_hand#4 as bigint))#26 AS mean#28] +Functions [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double)), avg(inv_quantity_on_hand#4)] +Aggregate Attributes [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double))#25, avg(inv_quantity_on_hand#4)#26] +Results [5]: [w_warehouse_sk#7, i_item_sk#5, d_moy#12, stddev_samp(cast(inv_quantity_on_hand#4 as double))#25 AS stdev#27, avg(inv_quantity_on_hand#4)#26 AS mean#28] (26) Filter [codegen id : 10] Input [5]: [w_warehouse_sk#7, i_item_sk#5, d_moy#12, stdev#27, mean#28] -Condition : ((CASE WHEN (mean#28 = 0.0) THEN 0.0 ELSE (stdev#27 / mean#28) END > 1.0) AND (CASE WHEN (mean#28 = 0.0) THEN null ELSE (stdev#27 / mean#28) END > 1.5)) +Condition : (((((isnotnull(mean#28) AND isnotnull(stdev#27)) AND NOT (mean#28 = 0.0)) AND ((stdev#27 / mean#28) > 1.0)) AND NOT (mean#28 = 0.0)) AND ((stdev#27 / mean#28) > 1.5)) (27) Project [codegen id : 10] Output [5]: [w_warehouse_sk#7, i_item_sk#5, d_moy#12, mean#28, CASE WHEN (mean#28 = 0.0) THEN null ELSE (stdev#27 / mean#28) END AS cov#29] @@ -250,24 +250,24 @@ Input [7]: [inv_date_sk#1, inv_quantity_on_hand#4, i_item_sk#30, w_warehouse_sk# (44) HashAggregate [codegen id : 8] Input [5]: [inv_quantity_on_hand#4, i_item_sk#30, w_warehouse_sk#31, w_warehouse_name#32, d_moy#35] Keys [4]: [w_warehouse_name#32, w_warehouse_sk#31, i_item_sk#30, d_moy#35] -Functions [2]: [partial_stddev_samp(cast(inv_quantity_on_hand#4 as double)), partial_avg(cast(inv_quantity_on_hand#4 as bigint))] +Functions [2]: [partial_stddev_samp(cast(inv_quantity_on_hand#4 as double)), partial_avg(inv_quantity_on_hand#4)] Aggregate Attributes [5]: [n#37, avg#38, m2#39, sum#40, count#41] Results [9]: [w_warehouse_name#32, w_warehouse_sk#31, i_item_sk#30, d_moy#35, n#42, avg#43, m2#44, sum#45, count#46] (45) Exchange Input [9]: [w_warehouse_name#32, w_warehouse_sk#31, i_item_sk#30, d_moy#35, n#42, avg#43, m2#44, sum#45, count#46] -Arguments: hashpartitioning(w_warehouse_name#32, w_warehouse_sk#31, i_item_sk#30, d_moy#35, 5), true, [id=#47] +Arguments: hashpartitioning(w_warehouse_name#32, w_warehouse_sk#31, i_item_sk#30, d_moy#35, 5), ENSURE_REQUIREMENTS, [id=#47] (46) HashAggregate [codegen id : 9] Input [9]: [w_warehouse_name#32, w_warehouse_sk#31, i_item_sk#30, d_moy#35, n#42, avg#43, m2#44, sum#45, count#46] Keys [4]: [w_warehouse_name#32, w_warehouse_sk#31, i_item_sk#30, d_moy#35] -Functions [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double)), avg(cast(inv_quantity_on_hand#4 as bigint))] -Aggregate Attributes [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double))#48, avg(cast(inv_quantity_on_hand#4 as bigint))#49] -Results [5]: [w_warehouse_sk#31, i_item_sk#30, d_moy#35, stddev_samp(cast(inv_quantity_on_hand#4 as double))#48 AS stdev#50, avg(cast(inv_quantity_on_hand#4 as bigint))#49 AS mean#51] +Functions [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double)), avg(inv_quantity_on_hand#4)] +Aggregate Attributes [2]: [stddev_samp(cast(inv_quantity_on_hand#4 as double))#48, avg(inv_quantity_on_hand#4)#49] +Results [5]: [w_warehouse_sk#31, i_item_sk#30, d_moy#35, stddev_samp(cast(inv_quantity_on_hand#4 as double))#48 AS stdev#50, avg(inv_quantity_on_hand#4)#49 AS mean#51] (47) Filter [codegen id : 9] Input [5]: [w_warehouse_sk#31, i_item_sk#30, d_moy#35, stdev#50, mean#51] -Condition : (CASE WHEN (mean#51 = 0.0) THEN 0.0 ELSE (stdev#50 / mean#51) END > 1.0) +Condition : (((isnotnull(mean#51) AND isnotnull(stdev#50)) AND NOT (mean#51 = 0.0)) AND ((stdev#50 / mean#51) > 1.0)) (48) Project [codegen id : 9] Output [5]: [w_warehouse_sk#31, i_item_sk#30, d_moy#35, mean#51, CASE WHEN (mean#51 = 0.0) THEN null ELSE (stdev#50 / mean#51) END AS cov#52] @@ -284,7 +284,7 @@ Join condition: None (51) Exchange Input [10]: [w_warehouse_sk#7, i_item_sk#5, d_moy#12, mean#28, cov#29, w_warehouse_sk#31, i_item_sk#30, d_moy#35, mean#51, cov#52] -Arguments: rangepartitioning(w_warehouse_sk#7 ASC NULLS FIRST, i_item_sk#5 ASC NULLS FIRST, d_moy#12 ASC NULLS FIRST, mean#28 ASC NULLS FIRST, cov#29 ASC NULLS FIRST, d_moy#35 ASC NULLS FIRST, mean#51 ASC NULLS FIRST, cov#52 ASC NULLS FIRST, 5), true, [id=#54] +Arguments: rangepartitioning(w_warehouse_sk#7 ASC NULLS FIRST, i_item_sk#5 ASC NULLS FIRST, d_moy#12 ASC NULLS FIRST, mean#28 ASC NULLS FIRST, cov#29 ASC NULLS FIRST, d_moy#35 ASC NULLS FIRST, mean#51 ASC NULLS FIRST, cov#52 ASC NULLS FIRST, 5), ENSURE_REQUIREMENTS, [id=#54] (52) Sort [codegen id : 11] Input [10]: [w_warehouse_sk#7, i_item_sk#5, d_moy#12, mean#28, cov#29, w_warehouse_sk#31, i_item_sk#30, d_moy#35, mean#51, cov#52] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39b/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39b/simplified.txt index f4e23c837b63a..6dab46108f564 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39b/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q39b/simplified.txt @@ -6,7 +6,7 @@ WholeStageCodegen (11) BroadcastHashJoin [i_item_sk,w_warehouse_sk,i_item_sk,w_warehouse_sk] Project [w_warehouse_sk,i_item_sk,d_moy,mean,stdev] Filter [mean,stdev] - HashAggregate [w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy,n,avg,m2,sum,count] [stddev_samp(cast(inv_quantity_on_hand as double)),avg(cast(inv_quantity_on_hand as bigint)),stdev,mean,n,avg,m2,sum,count] + HashAggregate [w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy,n,avg,m2,sum,count] [stddev_samp(cast(inv_quantity_on_hand as double)),avg(inv_quantity_on_hand),stdev,mean,n,avg,m2,sum,count] InputAdapter Exchange [w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy] #2 WholeStageCodegen (4) @@ -48,7 +48,7 @@ WholeStageCodegen (11) WholeStageCodegen (9) Project [w_warehouse_sk,i_item_sk,d_moy,mean,stdev] Filter [mean,stdev] - HashAggregate [w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy,n,avg,m2,sum,count] [stddev_samp(cast(inv_quantity_on_hand as double)),avg(cast(inv_quantity_on_hand as bigint)),stdev,mean,n,avg,m2,sum,count] + HashAggregate [w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy,n,avg,m2,sum,count] [stddev_samp(cast(inv_quantity_on_hand as double)),avg(inv_quantity_on_hand),stdev,mean,n,avg,m2,sum,count] InputAdapter Exchange [w_warehouse_name,w_warehouse_sk,i_item_sk,d_moy] #7 WholeStageCodegen (8) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q4.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q4.sf100/explain.txt index fb5e991043bf8..49fa0b1e8def5 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q4.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q4.sf100/explain.txt @@ -170,7 +170,7 @@ Input [8]: [ss_sold_date_sk#1, ss_customer_sk#2, ss_ext_discount_amt#3, ss_ext_s (10) Exchange Input [6]: [ss_customer_sk#2, ss_ext_discount_amt#3, ss_ext_sales_price#4, ss_ext_wholesale_cost#5, ss_ext_list_price#6, d_year#8] -Arguments: hashpartitioning(ss_customer_sk#2, 5), true, [id=#10] +Arguments: hashpartitioning(ss_customer_sk#2, 5), ENSURE_REQUIREMENTS, [id=#10] (11) Sort [codegen id : 3] Input [6]: [ss_customer_sk#2, ss_ext_discount_amt#3, ss_ext_sales_price#4, ss_ext_wholesale_cost#5, ss_ext_list_price#6, d_year#8] @@ -192,7 +192,7 @@ Condition : (isnotnull(c_customer_sk#11) AND isnotnull(c_customer_id#12)) (15) Exchange Input [8]: [c_customer_sk#11, c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cust_flag#15, c_birth_country#16, c_login#17, c_email_address#18] -Arguments: hashpartitioning(c_customer_sk#11, 5), true, [id=#19] +Arguments: hashpartitioning(c_customer_sk#11, 5), ENSURE_REQUIREMENTS, [id=#19] (16) Sort [codegen id : 5] Input [8]: [c_customer_sk#11, c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cust_flag#15, c_birth_country#16, c_login#17, c_email_address#18] @@ -216,7 +216,7 @@ Results [10]: [c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cu (20) Exchange Input [10]: [c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cust_flag#15, c_birth_country#16, c_login#17, c_email_address#18, d_year#8, sum#22, isEmpty#23] -Arguments: hashpartitioning(c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cust_flag#15, c_birth_country#16, c_login#17, c_email_address#18, d_year#8, 5), true, [id=#24] +Arguments: hashpartitioning(c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cust_flag#15, c_birth_country#16, c_login#17, c_email_address#18, d_year#8, 5), ENSURE_REQUIREMENTS, [id=#24] (21) HashAggregate [codegen id : 7] Input [10]: [c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cust_flag#15, c_birth_country#16, c_login#17, c_email_address#18, d_year#8, sum#22, isEmpty#23] @@ -231,7 +231,7 @@ Condition : (isnotnull(year_total#27) AND (year_total#27 > 0.000000)) (23) Exchange Input [2]: [customer_id#26, year_total#27] -Arguments: hashpartitioning(customer_id#26, 5), true, [id=#28] +Arguments: hashpartitioning(customer_id#26, 5), ENSURE_REQUIREMENTS, [id=#28] (24) Sort [codegen id : 8] Input [2]: [customer_id#26, year_total#27] @@ -280,7 +280,7 @@ Input [8]: [ss_sold_date_sk#1, ss_customer_sk#2, ss_ext_discount_amt#3, ss_ext_s (34) Exchange Input [6]: [ss_customer_sk#2, ss_ext_discount_amt#3, ss_ext_sales_price#4, ss_ext_wholesale_cost#5, ss_ext_list_price#6, d_year#8] -Arguments: hashpartitioning(ss_customer_sk#2, 5), true, [id=#30] +Arguments: hashpartitioning(ss_customer_sk#2, 5), ENSURE_REQUIREMENTS, [id=#30] (35) Sort [codegen id : 11] Input [6]: [ss_customer_sk#2, ss_ext_discount_amt#3, ss_ext_sales_price#4, ss_ext_wholesale_cost#5, ss_ext_list_price#6, d_year#8] @@ -311,7 +311,7 @@ Results [10]: [c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cu (41) Exchange Input [10]: [c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cust_flag#15, c_birth_country#16, c_login#17, c_email_address#18, d_year#8, sum#33, isEmpty#34] -Arguments: hashpartitioning(c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cust_flag#15, c_birth_country#16, c_login#17, c_email_address#18, d_year#8, 5), true, [id=#35] +Arguments: hashpartitioning(c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cust_flag#15, c_birth_country#16, c_login#17, c_email_address#18, d_year#8, 5), ENSURE_REQUIREMENTS, [id=#35] (42) HashAggregate [codegen id : 15] Input [10]: [c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cust_flag#15, c_birth_country#16, c_login#17, c_email_address#18, d_year#8, sum#33, isEmpty#34] @@ -322,7 +322,7 @@ Results [8]: [c_customer_id#12 AS customer_id#37, c_first_name#13 AS customer_fi (43) Exchange Input [8]: [customer_id#37, customer_first_name#38, customer_last_name#39, customer_preferred_cust_flag#40, customer_birth_country#41, customer_login#42, customer_email_address#43, year_total#44] -Arguments: hashpartitioning(customer_id#37, 5), true, [id=#45] +Arguments: hashpartitioning(customer_id#37, 5), ENSURE_REQUIREMENTS, [id=#45] (44) Sort [codegen id : 16] Input [8]: [customer_id#37, customer_first_name#38, customer_last_name#39, customer_preferred_cust_flag#40, customer_birth_country#41, customer_login#42, customer_email_address#43, year_total#44] @@ -361,7 +361,7 @@ Input [8]: [cs_sold_date_sk#46, cs_bill_customer_sk#47, cs_ext_discount_amt#48, (52) Exchange Input [6]: [cs_bill_customer_sk#47, cs_ext_discount_amt#48, cs_ext_sales_price#49, cs_ext_wholesale_cost#50, cs_ext_list_price#51, d_year#8] -Arguments: hashpartitioning(cs_bill_customer_sk#47, 5), true, [id=#52] +Arguments: hashpartitioning(cs_bill_customer_sk#47, 5), ENSURE_REQUIREMENTS, [id=#52] (53) Sort [codegen id : 20] Input [6]: [cs_bill_customer_sk#47, cs_ext_discount_amt#48, cs_ext_sales_price#49, cs_ext_wholesale_cost#50, cs_ext_list_price#51, d_year#8] @@ -392,7 +392,7 @@ Results [10]: [c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cu (59) Exchange Input [10]: [c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cust_flag#15, c_birth_country#16, c_login#17, c_email_address#18, d_year#8, sum#55, isEmpty#56] -Arguments: hashpartitioning(c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cust_flag#15, c_birth_country#16, c_login#17, c_email_address#18, d_year#8, 5), true, [id=#57] +Arguments: hashpartitioning(c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cust_flag#15, c_birth_country#16, c_login#17, c_email_address#18, d_year#8, 5), ENSURE_REQUIREMENTS, [id=#57] (60) HashAggregate [codegen id : 24] Input [10]: [c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cust_flag#15, c_birth_country#16, c_login#17, c_email_address#18, d_year#8, sum#55, isEmpty#56] @@ -411,7 +411,7 @@ Input [2]: [customer_id#59, year_total#60] (63) Exchange Input [2]: [customer_id#61, year_total#62] -Arguments: hashpartitioning(customer_id#61, 5), true, [id=#63] +Arguments: hashpartitioning(customer_id#61, 5), ENSURE_REQUIREMENTS, [id=#63] (64) Sort [codegen id : 25] Input [2]: [customer_id#61, year_total#62] @@ -454,7 +454,7 @@ Input [8]: [cs_sold_date_sk#46, cs_bill_customer_sk#47, cs_ext_discount_amt#48, (73) Exchange Input [6]: [cs_bill_customer_sk#47, cs_ext_discount_amt#48, cs_ext_sales_price#49, cs_ext_wholesale_cost#50, cs_ext_list_price#51, d_year#8] -Arguments: hashpartitioning(cs_bill_customer_sk#47, 5), true, [id=#64] +Arguments: hashpartitioning(cs_bill_customer_sk#47, 5), ENSURE_REQUIREMENTS, [id=#64] (74) Sort [codegen id : 29] Input [6]: [cs_bill_customer_sk#47, cs_ext_discount_amt#48, cs_ext_sales_price#49, cs_ext_wholesale_cost#50, cs_ext_list_price#51, d_year#8] @@ -485,7 +485,7 @@ Results [10]: [c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cu (80) Exchange Input [10]: [c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cust_flag#15, c_birth_country#16, c_login#17, c_email_address#18, d_year#8, sum#67, isEmpty#68] -Arguments: hashpartitioning(c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cust_flag#15, c_birth_country#16, c_login#17, c_email_address#18, d_year#8, 5), true, [id=#69] +Arguments: hashpartitioning(c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cust_flag#15, c_birth_country#16, c_login#17, c_email_address#18, d_year#8, 5), ENSURE_REQUIREMENTS, [id=#69] (81) HashAggregate [codegen id : 33] Input [10]: [c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cust_flag#15, c_birth_country#16, c_login#17, c_email_address#18, d_year#8, sum#67, isEmpty#68] @@ -496,7 +496,7 @@ Results [2]: [c_customer_id#12 AS customer_id#71, sum(CheckOverflow((promote_pre (82) Exchange Input [2]: [customer_id#71, year_total#72] -Arguments: hashpartitioning(customer_id#71, 5), true, [id=#73] +Arguments: hashpartitioning(customer_id#71, 5), ENSURE_REQUIREMENTS, [id=#73] (83) Sort [codegen id : 34] Input [2]: [customer_id#71, year_total#72] @@ -539,7 +539,7 @@ Input [8]: [ws_sold_date_sk#74, ws_bill_customer_sk#75, ws_ext_discount_amt#76, (92) Exchange Input [6]: [ws_bill_customer_sk#75, ws_ext_discount_amt#76, ws_ext_sales_price#77, ws_ext_wholesale_cost#78, ws_ext_list_price#79, d_year#8] -Arguments: hashpartitioning(ws_bill_customer_sk#75, 5), true, [id=#80] +Arguments: hashpartitioning(ws_bill_customer_sk#75, 5), ENSURE_REQUIREMENTS, [id=#80] (93) Sort [codegen id : 38] Input [6]: [ws_bill_customer_sk#75, ws_ext_discount_amt#76, ws_ext_sales_price#77, ws_ext_wholesale_cost#78, ws_ext_list_price#79, d_year#8] @@ -570,7 +570,7 @@ Results [10]: [c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cu (99) Exchange Input [10]: [c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cust_flag#15, c_birth_country#16, c_login#17, c_email_address#18, d_year#8, sum#83, isEmpty#84] -Arguments: hashpartitioning(c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cust_flag#15, c_birth_country#16, c_login#17, c_email_address#18, d_year#8, 5), true, [id=#85] +Arguments: hashpartitioning(c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cust_flag#15, c_birth_country#16, c_login#17, c_email_address#18, d_year#8, 5), ENSURE_REQUIREMENTS, [id=#85] (100) HashAggregate [codegen id : 42] Input [10]: [c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cust_flag#15, c_birth_country#16, c_login#17, c_email_address#18, d_year#8, sum#83, isEmpty#84] @@ -589,7 +589,7 @@ Input [2]: [customer_id#87, year_total#88] (103) Exchange Input [2]: [customer_id#89, year_total#90] -Arguments: hashpartitioning(customer_id#89, 5), true, [id=#91] +Arguments: hashpartitioning(customer_id#89, 5), ENSURE_REQUIREMENTS, [id=#91] (104) Sort [codegen id : 43] Input [2]: [customer_id#89, year_total#90] @@ -632,7 +632,7 @@ Input [8]: [ws_sold_date_sk#74, ws_bill_customer_sk#75, ws_ext_discount_amt#76, (113) Exchange Input [6]: [ws_bill_customer_sk#75, ws_ext_discount_amt#76, ws_ext_sales_price#77, ws_ext_wholesale_cost#78, ws_ext_list_price#79, d_year#8] -Arguments: hashpartitioning(ws_bill_customer_sk#75, 5), true, [id=#92] +Arguments: hashpartitioning(ws_bill_customer_sk#75, 5), ENSURE_REQUIREMENTS, [id=#92] (114) Sort [codegen id : 47] Input [6]: [ws_bill_customer_sk#75, ws_ext_discount_amt#76, ws_ext_sales_price#77, ws_ext_wholesale_cost#78, ws_ext_list_price#79, d_year#8] @@ -663,7 +663,7 @@ Results [10]: [c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cu (120) Exchange Input [10]: [c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cust_flag#15, c_birth_country#16, c_login#17, c_email_address#18, d_year#8, sum#95, isEmpty#96] -Arguments: hashpartitioning(c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cust_flag#15, c_birth_country#16, c_login#17, c_email_address#18, d_year#8, 5), true, [id=#97] +Arguments: hashpartitioning(c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cust_flag#15, c_birth_country#16, c_login#17, c_email_address#18, d_year#8, 5), ENSURE_REQUIREMENTS, [id=#97] (121) HashAggregate [codegen id : 51] Input [10]: [c_customer_id#12, c_first_name#13, c_last_name#14, c_preferred_cust_flag#15, c_birth_country#16, c_login#17, c_email_address#18, d_year#8, sum#95, isEmpty#96] @@ -674,7 +674,7 @@ Results [2]: [c_customer_id#12 AS customer_id#99, sum(CheckOverflow((promote_pre (122) Exchange Input [2]: [customer_id#99, year_total#100] -Arguments: hashpartitioning(customer_id#99, 5), true, [id=#101] +Arguments: hashpartitioning(customer_id#99, 5), ENSURE_REQUIREMENTS, [id=#101] (123) Sort [codegen id : 52] Input [2]: [customer_id#99, year_total#100] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q4/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q4/explain.txt index 79a7abdcff5db..042fb8c829cdf 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q4/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q4/explain.txt @@ -185,7 +185,7 @@ Results [10]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_ (17) Exchange Input [10]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, sum#21, isEmpty#22] -Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, 5), true, [id=#23] +Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, 5), ENSURE_REQUIREMENTS, [id=#23] (18) HashAggregate [codegen id : 24] Input [10]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, sum#21, isEmpty#22] @@ -260,7 +260,7 @@ Results [10]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_ (33) Exchange Input [10]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, sum#30, isEmpty#31] -Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, 5), true, [id=#32] +Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, 5), ENSURE_REQUIREMENTS, [id=#32] (34) HashAggregate [codegen id : 7] Input [10]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, sum#30, isEmpty#31] @@ -340,7 +340,7 @@ Results [10]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_ (50) Exchange Input [10]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, sum#52, isEmpty#53] -Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, 5), true, [id=#54] +Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, 5), ENSURE_REQUIREMENTS, [id=#54] (51) HashAggregate [codegen id : 11] Input [10]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, sum#52, isEmpty#53] @@ -417,7 +417,7 @@ Results [10]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_ (67) Exchange Input [10]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, sum#63, isEmpty#64] -Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, 5), true, [id=#65] +Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, 5), ENSURE_REQUIREMENTS, [id=#65] (68) HashAggregate [codegen id : 15] Input [10]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, sum#63, isEmpty#64] @@ -501,7 +501,7 @@ Results [10]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_ (85) Exchange Input [10]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, sum#79, isEmpty#80] -Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, 5), true, [id=#81] +Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, 5), ENSURE_REQUIREMENTS, [id=#81] (86) HashAggregate [codegen id : 19] Input [10]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, sum#79, isEmpty#80] @@ -578,7 +578,7 @@ Results [10]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_ (102) Exchange Input [10]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, sum#90, isEmpty#91] -Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, 5), true, [id=#92] +Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, 5), ENSURE_REQUIREMENTS, [id=#92] (103) HashAggregate [codegen id : 23] Input [10]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#17, sum#90, isEmpty#91] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q40.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q40.sf100/explain.txt index c55f264a9d858..c0fac720a5fd7 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q40.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q40.sf100/explain.txt @@ -52,7 +52,7 @@ Condition : ((isnotnull(cs_warehouse_sk#2) AND isnotnull(cs_item_sk#3)) AND isno (4) Exchange Input [5]: [cs_sold_date_sk#1, cs_warehouse_sk#2, cs_item_sk#3, cs_order_number#4, cs_sales_price#5] -Arguments: hashpartitioning(cs_order_number#4, cs_item_sk#3, 5), true, [id=#6] +Arguments: hashpartitioning(cs_order_number#4, cs_item_sk#3, 5), ENSURE_REQUIREMENTS, [id=#6] (5) Sort [codegen id : 2] Input [5]: [cs_sold_date_sk#1, cs_warehouse_sk#2, cs_item_sk#3, cs_order_number#4, cs_sales_price#5] @@ -74,7 +74,7 @@ Condition : (isnotnull(cr_order_number#8) AND isnotnull(cr_item_sk#7)) (9) Exchange Input [3]: [cr_item_sk#7, cr_order_number#8, cr_refunded_cash#9] -Arguments: hashpartitioning(cr_order_number#8, cr_item_sk#7, 5), true, [id=#10] +Arguments: hashpartitioning(cr_order_number#8, cr_item_sk#7, 5), ENSURE_REQUIREMENTS, [id=#10] (10) Sort [codegen id : 4] Input [3]: [cr_item_sk#7, cr_order_number#8, cr_refunded_cash#9] @@ -183,7 +183,7 @@ Results [6]: [w_state#19, i_item_id#12, sum#25, isEmpty#26, sum#27, isEmpty#28] (33) Exchange Input [6]: [w_state#19, i_item_id#12, sum#25, isEmpty#26, sum#27, isEmpty#28] -Arguments: hashpartitioning(w_state#19, i_item_id#12, 5), true, [id=#29] +Arguments: hashpartitioning(w_state#19, i_item_id#12, 5), ENSURE_REQUIREMENTS, [id=#29] (34) HashAggregate [codegen id : 9] Input [6]: [w_state#19, i_item_id#12, sum#25, isEmpty#26, sum#27, isEmpty#28] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q40/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q40/explain.txt index 21046922327d3..bfbe6cdbf799f 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q40/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q40/explain.txt @@ -168,7 +168,7 @@ Results [6]: [w_state#11, i_item_id#14, sum#24, isEmpty#25, sum#26, isEmpty#27] (30) Exchange Input [6]: [w_state#11, i_item_id#14, sum#24, isEmpty#25, sum#26, isEmpty#27] -Arguments: hashpartitioning(w_state#11, i_item_id#14, 5), true, [id=#28] +Arguments: hashpartitioning(w_state#11, i_item_id#14, 5), ENSURE_REQUIREMENTS, [id=#28] (31) HashAggregate [codegen id : 6] Input [6]: [w_state#11, i_item_id#14, sum#24, isEmpty#25, sum#26, isEmpty#27] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q42.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q42.sf100/explain.txt index dfd840a823327..cb9d666722066 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q42.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q42.sf100/explain.txt @@ -107,7 +107,7 @@ Results [4]: [d_year#10, i_category_id#5, i_category#6, sum#14] (19) Exchange Input [4]: [d_year#10, i_category_id#5, i_category#6, sum#14] -Arguments: hashpartitioning(d_year#10, i_category_id#5, i_category#6, 5), true, [id=#15] +Arguments: hashpartitioning(d_year#10, i_category_id#5, i_category#6, 5), ENSURE_REQUIREMENTS, [id=#15] (20) HashAggregate [codegen id : 4] Input [4]: [d_year#10, i_category_id#5, i_category#6, sum#14] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q42/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q42/explain.txt index f7732f3c867e4..51e80be5b8366 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q42/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q42/explain.txt @@ -107,7 +107,7 @@ Results [4]: [d_year#2, i_category_id#9, i_category#10, sum#14] (19) Exchange Input [4]: [d_year#2, i_category_id#9, i_category#10, sum#14] -Arguments: hashpartitioning(d_year#2, i_category_id#9, i_category#10, 5), true, [id=#15] +Arguments: hashpartitioning(d_year#2, i_category_id#9, i_category#10, 5), ENSURE_REQUIREMENTS, [id=#15] (20) HashAggregate [codegen id : 4] Input [4]: [d_year#2, i_category_id#9, i_category#10, sum#14] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q43.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q43.sf100/explain.txt index 952873e60626e..c7e682d87ef6d 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q43.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q43.sf100/explain.txt @@ -107,7 +107,7 @@ Results [9]: [s_store_name#10, s_store_id#9, sum#20, sum#21, sum#22, sum#23, sum (19) Exchange Input [9]: [s_store_name#10, s_store_id#9, sum#20, sum#21, sum#22, sum#23, sum#24, sum#25, sum#26] -Arguments: hashpartitioning(s_store_name#10, s_store_id#9, 5), true, [id=#27] +Arguments: hashpartitioning(s_store_name#10, s_store_id#9, 5), ENSURE_REQUIREMENTS, [id=#27] (20) HashAggregate [codegen id : 4] Input [9]: [s_store_name#10, s_store_id#9, sum#20, sum#21, sum#22, sum#23, sum#24, sum#25, sum#26] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q43/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q43/explain.txt index 8f3ef7fee3410..e65f47ca098cf 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q43/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q43/explain.txt @@ -107,7 +107,7 @@ Results [9]: [s_store_name#10, s_store_id#9, sum#20, sum#21, sum#22, sum#23, sum (19) Exchange Input [9]: [s_store_name#10, s_store_id#9, sum#20, sum#21, sum#22, sum#23, sum#24, sum#25, sum#26] -Arguments: hashpartitioning(s_store_name#10, s_store_id#9, 5), true, [id=#27] +Arguments: hashpartitioning(s_store_name#10, s_store_id#9, 5), ENSURE_REQUIREMENTS, [id=#27] (20) HashAggregate [codegen id : 4] Input [9]: [s_store_name#10, s_store_id#9, sum#20, sum#21, sum#22, sum#23, sum#24, sum#25, sum#26] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q44.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q44.sf100/explain.txt index 096bd45f06bca..b2465a566594f 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q44.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q44.sf100/explain.txt @@ -64,7 +64,7 @@ Results [3]: [ss_item_sk#1, sum#6, count#7] (6) Exchange Input [3]: [ss_item_sk#1, sum#6, count#7] -Arguments: hashpartitioning(ss_item_sk#1, 5), true, [id=#8] +Arguments: hashpartitioning(ss_item_sk#1, 5), ENSURE_REQUIREMENTS, [id=#8] (7) HashAggregate [codegen id : 2] Input [3]: [ss_item_sk#1, sum#6, count#7] @@ -83,7 +83,7 @@ Input [3]: [item_sk#10, rank_col#11, avg(ss_net_profit#3)#12] (10) Exchange Input [2]: [item_sk#10, rank_col#11] -Arguments: SinglePartition, true, [id=#15] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#15] (11) Sort [codegen id : 3] Input [2]: [item_sk#10, rank_col#11] @@ -121,7 +121,7 @@ Input [3]: [item_sk#20, rank_col#21, avg(ss_net_profit#3)#22] (19) Exchange Input [2]: [item_sk#20, rank_col#21] -Arguments: SinglePartition, true, [id=#23] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#23] (20) Sort [codegen id : 6] Input [2]: [item_sk#20, rank_col#21] @@ -234,7 +234,7 @@ Results [3]: [ss_store_sk#2, sum#36, count#37] (42) Exchange Input [3]: [ss_store_sk#2, sum#36, count#37] -Arguments: hashpartitioning(ss_store_sk#2, 5), true, [id=#38] +Arguments: hashpartitioning(ss_store_sk#2, 5), ENSURE_REQUIREMENTS, [id=#38] (43) HashAggregate [codegen id : 2] Input [3]: [ss_store_sk#2, sum#36, count#37] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q44/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q44/explain.txt index 096bd45f06bca..b2465a566594f 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q44/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q44/explain.txt @@ -64,7 +64,7 @@ Results [3]: [ss_item_sk#1, sum#6, count#7] (6) Exchange Input [3]: [ss_item_sk#1, sum#6, count#7] -Arguments: hashpartitioning(ss_item_sk#1, 5), true, [id=#8] +Arguments: hashpartitioning(ss_item_sk#1, 5), ENSURE_REQUIREMENTS, [id=#8] (7) HashAggregate [codegen id : 2] Input [3]: [ss_item_sk#1, sum#6, count#7] @@ -83,7 +83,7 @@ Input [3]: [item_sk#10, rank_col#11, avg(ss_net_profit#3)#12] (10) Exchange Input [2]: [item_sk#10, rank_col#11] -Arguments: SinglePartition, true, [id=#15] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#15] (11) Sort [codegen id : 3] Input [2]: [item_sk#10, rank_col#11] @@ -121,7 +121,7 @@ Input [3]: [item_sk#20, rank_col#21, avg(ss_net_profit#3)#22] (19) Exchange Input [2]: [item_sk#20, rank_col#21] -Arguments: SinglePartition, true, [id=#23] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#23] (20) Sort [codegen id : 6] Input [2]: [item_sk#20, rank_col#21] @@ -234,7 +234,7 @@ Results [3]: [ss_store_sk#2, sum#36, count#37] (42) Exchange Input [3]: [ss_store_sk#2, sum#36, count#37] -Arguments: hashpartitioning(ss_store_sk#2, 5), true, [id=#38] +Arguments: hashpartitioning(ss_store_sk#2, 5), ENSURE_REQUIREMENTS, [id=#38] (43) HashAggregate [codegen id : 2] Input [3]: [ss_store_sk#2, sum#36, count#37] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q45.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q45.sf100/explain.txt index 54e117e6cac10..52ca85b60197c 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q45.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q45.sf100/explain.txt @@ -121,7 +121,7 @@ Input [5]: [ws_item_sk#3, ws_bill_customer_sk#4, ws_sales_price#5, i_item_sk#10, (17) Exchange Input [3]: [ws_bill_customer_sk#4, ws_sales_price#5, i_item_id#11] -Arguments: hashpartitioning(ws_bill_customer_sk#4, 5), true, [id=#13] +Arguments: hashpartitioning(ws_bill_customer_sk#4, 5), ENSURE_REQUIREMENTS, [id=#13] (18) Sort [codegen id : 4] Input [3]: [ws_bill_customer_sk#4, ws_sales_price#5, i_item_id#11] @@ -143,7 +143,7 @@ Condition : (isnotnull(c_customer_sk#14) AND isnotnull(c_current_addr_sk#15)) (22) Exchange Input [2]: [c_customer_sk#14, c_current_addr_sk#15] -Arguments: hashpartitioning(c_current_addr_sk#15, 5), true, [id=#16] +Arguments: hashpartitioning(c_current_addr_sk#15, 5), ENSURE_REQUIREMENTS, [id=#16] (23) Sort [codegen id : 6] Input [2]: [c_customer_sk#14, c_current_addr_sk#15] @@ -165,7 +165,7 @@ Condition : isnotnull(ca_address_sk#17) (27) Exchange Input [3]: [ca_address_sk#17, ca_city#18, ca_zip#19] -Arguments: hashpartitioning(ca_address_sk#17, 5), true, [id=#20] +Arguments: hashpartitioning(ca_address_sk#17, 5), ENSURE_REQUIREMENTS, [id=#20] (28) Sort [codegen id : 8] Input [3]: [ca_address_sk#17, ca_city#18, ca_zip#19] @@ -182,7 +182,7 @@ Input [5]: [c_customer_sk#14, c_current_addr_sk#15, ca_address_sk#17, ca_city#18 (31) Exchange Input [3]: [c_customer_sk#14, ca_city#18, ca_zip#19] -Arguments: hashpartitioning(c_customer_sk#14, 5), true, [id=#21] +Arguments: hashpartitioning(c_customer_sk#14, 5), ENSURE_REQUIREMENTS, [id=#21] (32) Sort [codegen id : 10] Input [3]: [c_customer_sk#14, ca_city#18, ca_zip#19] @@ -241,7 +241,7 @@ Results [3]: [ca_zip#19, ca_city#18, sum#25] (44) Exchange Input [3]: [ca_zip#19, ca_city#18, sum#25] -Arguments: hashpartitioning(ca_zip#19, ca_city#18, 5), true, [id=#26] +Arguments: hashpartitioning(ca_zip#19, ca_city#18, 5), ENSURE_REQUIREMENTS, [id=#26] (45) HashAggregate [codegen id : 13] Input [3]: [ca_zip#19, ca_city#18, sum#25] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q45/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q45/explain.txt index f556e9b0d86b9..70b823aaab191 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q45/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q45/explain.txt @@ -211,7 +211,7 @@ Results [3]: [ca_zip#11, ca_city#10, sum#23] (38) Exchange Input [3]: [ca_zip#11, ca_city#10, sum#23] -Arguments: hashpartitioning(ca_zip#11, ca_city#10, 5), true, [id=#24] +Arguments: hashpartitioning(ca_zip#11, ca_city#10, 5), ENSURE_REQUIREMENTS, [id=#24] (39) HashAggregate [codegen id : 7] Input [3]: [ca_zip#11, ca_city#10, sum#23] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q46.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q46.sf100/explain.txt index d4c3d754860b1..3d3a296d30ba6 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q46.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q46.sf100/explain.txt @@ -68,7 +68,7 @@ Condition : (isnotnull(c_customer_sk#1) AND isnotnull(c_current_addr_sk#2)) (4) Exchange Input [4]: [c_customer_sk#1, c_current_addr_sk#2, c_first_name#3, c_last_name#4] -Arguments: hashpartitioning(c_current_addr_sk#2, 5), true, [id=#5] +Arguments: hashpartitioning(c_current_addr_sk#2, 5), ENSURE_REQUIREMENTS, [id=#5] (5) Sort [codegen id : 2] Input [4]: [c_customer_sk#1, c_current_addr_sk#2, c_first_name#3, c_last_name#4] @@ -90,7 +90,7 @@ Condition : (isnotnull(ca_address_sk#6) AND isnotnull(ca_city#7)) (9) Exchange Input [2]: [ca_address_sk#6, ca_city#7] -Arguments: hashpartitioning(ca_address_sk#6, 5), true, [id=#8] +Arguments: hashpartitioning(ca_address_sk#6, 5), ENSURE_REQUIREMENTS, [id=#8] (10) Sort [codegen id : 4] Input [2]: [ca_address_sk#6, ca_city#7] @@ -107,7 +107,7 @@ Input [6]: [c_customer_sk#1, c_current_addr_sk#2, c_first_name#3, c_last_name#4, (13) Exchange Input [4]: [c_customer_sk#1, c_first_name#3, c_last_name#4, ca_city#7] -Arguments: hashpartitioning(c_customer_sk#1, 5), true, [id=#9] +Arguments: hashpartitioning(c_customer_sk#1, 5), ENSURE_REQUIREMENTS, [id=#9] (14) Sort [codegen id : 6] Input [4]: [c_customer_sk#1, c_first_name#3, c_last_name#4, ca_city#7] @@ -222,7 +222,7 @@ Input [7]: [ss_customer_sk#11, ss_hdemo_sk#12, ss_addr_sk#13, ss_ticket_number#1 (39) Exchange Input [5]: [ss_customer_sk#11, ss_addr_sk#13, ss_ticket_number#15, ss_coupon_amt#16, ss_net_profit#17] -Arguments: hashpartitioning(ss_addr_sk#13, 5), true, [id=#29] +Arguments: hashpartitioning(ss_addr_sk#13, 5), ENSURE_REQUIREMENTS, [id=#29] (40) Sort [codegen id : 11] Input [5]: [ss_customer_sk#11, ss_addr_sk#13, ss_ticket_number#15, ss_coupon_amt#16, ss_net_profit#17] @@ -260,7 +260,7 @@ Results [5]: [ss_ticket_number#15, ss_customer_sk#11, ca_city#7 AS bought_city#3 (47) Exchange Input [5]: [ss_ticket_number#15, ss_customer_sk#11, bought_city#36, amt#37, profit#38] -Arguments: hashpartitioning(ss_customer_sk#11, 5), true, [id=#39] +Arguments: hashpartitioning(ss_customer_sk#11, 5), ENSURE_REQUIREMENTS, [id=#39] (48) Sort [codegen id : 15] Input [5]: [ss_ticket_number#15, ss_customer_sk#11, bought_city#36, amt#37, profit#38] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q46/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q46/explain.txt index a6a3c3c463d27..f79fab941864b 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q46/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q46/explain.txt @@ -187,7 +187,7 @@ Results [6]: [ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, ca_city#21, su (32) Exchange Input [6]: [ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, ca_city#21, sum#25, sum#26] -Arguments: hashpartitioning(ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, ca_city#21, 5), true, [id=#27] +Arguments: hashpartitioning(ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, ca_city#21, 5), ENSURE_REQUIREMENTS, [id=#27] (33) HashAggregate [codegen id : 8] Input [6]: [ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, ca_city#21, sum#25, sum#26] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q47.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q47.sf100/explain.txt index 987dc71641b07..9b86170e2a812 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q47.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q47.sf100/explain.txt @@ -129,7 +129,7 @@ Input [8]: [ss_item_sk#2, ss_store_sk#3, ss_sales_price#4, d_year#6, d_moy#7, s_ (16) Exchange Input [6]: [ss_item_sk#2, ss_sales_price#4, d_year#6, d_moy#7, s_store_name#10, s_company_name#11] -Arguments: hashpartitioning(ss_item_sk#2, 5), true, [id=#13] +Arguments: hashpartitioning(ss_item_sk#2, 5), ENSURE_REQUIREMENTS, [id=#13] (17) Sort [codegen id : 4] Input [6]: [ss_item_sk#2, ss_sales_price#4, d_year#6, d_moy#7, s_store_name#10, s_company_name#11] @@ -151,7 +151,7 @@ Condition : ((isnotnull(i_item_sk#14) AND isnotnull(i_category#16)) AND isnotnul (21) Exchange Input [3]: [i_item_sk#14, i_brand#15, i_category#16] -Arguments: hashpartitioning(i_item_sk#14, 5), true, [id=#17] +Arguments: hashpartitioning(i_item_sk#14, 5), ENSURE_REQUIREMENTS, [id=#17] (22) Sort [codegen id : 6] Input [3]: [i_item_sk#14, i_brand#15, i_category#16] @@ -175,7 +175,7 @@ Results [7]: [i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_y (26) Exchange Input [7]: [i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_year#6, d_moy#7, sum#19] -Arguments: hashpartitioning(i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_year#6, d_moy#7, 5), true, [id=#20] +Arguments: hashpartitioning(i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_year#6, d_moy#7, 5), ENSURE_REQUIREMENTS, [id=#20] (27) HashAggregate [codegen id : 8] Input [7]: [i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_year#6, d_moy#7, sum#19] @@ -186,7 +186,7 @@ Results [8]: [i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_y (28) Exchange Input [8]: [i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_year#6, d_moy#7, sum_sales#22, _w0#23] -Arguments: hashpartitioning(i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_year#6, 5), true, [id=#24] +Arguments: hashpartitioning(i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_year#6, 5), ENSURE_REQUIREMENTS, [id=#24] (29) Sort [codegen id : 9] Input [8]: [i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_year#6, d_moy#7, sum_sales#22, _w0#23] @@ -202,7 +202,7 @@ Input [9]: [i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_yea (32) Exchange Input [8]: [i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_year#6, d_moy#7, sum_sales#22, avg_monthly_sales#25] -Arguments: hashpartitioning(i_category#16, i_brand#15, s_store_name#10, s_company_name#11, 5), true, [id=#26] +Arguments: hashpartitioning(i_category#16, i_brand#15, s_store_name#10, s_company_name#11, 5), ENSURE_REQUIREMENTS, [id=#26] (33) Sort [codegen id : 11] Input [8]: [i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_year#6, d_moy#7, sum_sales#22, avg_monthly_sales#25] @@ -214,11 +214,11 @@ Arguments: [rank(d_year#6, d_moy#7) windowspecdefinition(i_category#16, i_brand# (35) Filter [codegen id : 12] Input [9]: [i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_year#6, d_moy#7, sum_sales#22, avg_monthly_sales#25, rn#27] -Condition : (((((isnotnull(d_year#6) AND isnotnull(avg_monthly_sales#25)) AND (d_year#6 = 1999)) AND (avg_monthly_sales#25 > 0.000000)) AND (CASE WHEN (avg_monthly_sales#25 > 0.000000) THEN CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#22 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#25 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_monthly_sales#25 as decimal(22,6)))), DecimalType(38,16), true) ELSE null END > 0.1000000000000000)) AND isnotnull(rn#27)) +Condition : ((((((isnotnull(d_year#6) AND isnotnull(avg_monthly_sales#25)) AND (d_year#6 = 1999)) AND (avg_monthly_sales#25 > 0.000000)) AND (avg_monthly_sales#25 > 0.000000)) AND (CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#22 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#25 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_monthly_sales#25 as decimal(22,6)))), DecimalType(38,16), true) > 0.1000000000000000)) AND isnotnull(rn#27)) (36) Exchange Input [9]: [i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_year#6, d_moy#7, sum_sales#22, avg_monthly_sales#25, rn#27] -Arguments: hashpartitioning(i_category#16, i_brand#15, s_store_name#10, s_company_name#11, rn#27, 5), true, [id=#28] +Arguments: hashpartitioning(i_category#16, i_brand#15, s_store_name#10, s_company_name#11, rn#27, 5), ENSURE_REQUIREMENTS, [id=#28] (37) Sort [codegen id : 13] Input [9]: [i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_year#6, d_moy#7, sum_sales#22, avg_monthly_sales#25, rn#27] @@ -236,7 +236,7 @@ Results [7]: [i_category#29, i_brand#30, s_store_name#31, s_company_name#32, d_y (40) Exchange Input [7]: [i_category#29, i_brand#30, s_store_name#31, s_company_name#32, d_year#33, d_moy#34, sum_sales#37] -Arguments: hashpartitioning(i_category#29, i_brand#30, s_store_name#31, s_company_name#32, 5), true, [id=#38] +Arguments: hashpartitioning(i_category#29, i_brand#30, s_store_name#31, s_company_name#32, 5), ENSURE_REQUIREMENTS, [id=#38] (41) Sort [codegen id : 22] Input [7]: [i_category#29, i_brand#30, s_store_name#31, s_company_name#32, d_year#33, d_moy#34, sum_sales#37] @@ -256,7 +256,7 @@ Input [8]: [i_category#29, i_brand#30, s_store_name#31, s_company_name#32, d_yea (45) Exchange Input [6]: [i_category#29, i_brand#30, s_store_name#31, s_company_name#32, sum_sales#37, rn#39] -Arguments: hashpartitioning(i_category#29, i_brand#30, s_store_name#31, s_company_name#32, (rn#39 + 1), 5), true, [id=#40] +Arguments: hashpartitioning(i_category#29, i_brand#30, s_store_name#31, s_company_name#32, (rn#39 + 1), 5), ENSURE_REQUIREMENTS, [id=#40] (46) Sort [codegen id : 24] Input [6]: [i_category#29, i_brand#30, s_store_name#31, s_company_name#32, sum_sales#37, rn#39] @@ -292,7 +292,7 @@ Input [8]: [i_category#41, i_brand#42, s_store_name#43, s_company_name#44, d_yea (54) Exchange Input [6]: [i_category#41, i_brand#42, s_store_name#43, s_company_name#44, sum_sales#47, rn#48] -Arguments: hashpartitioning(i_category#41, i_brand#42, s_store_name#43, s_company_name#44, (rn#48 - 1), 5), true, [id=#49] +Arguments: hashpartitioning(i_category#41, i_brand#42, s_store_name#43, s_company_name#44, (rn#48 - 1), 5), ENSURE_REQUIREMENTS, [id=#49] (55) Sort [codegen id : 36] Input [6]: [i_category#41, i_brand#42, s_store_name#43, s_company_name#44, sum_sales#47, rn#48] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q47/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q47/explain.txt index a84ba3a03a674..40550ba38305c 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q47/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q47/explain.txt @@ -156,18 +156,18 @@ Results [7]: [i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_yea (23) Exchange Input [7]: [i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, d_moy#11, sum#18] -Arguments: hashpartitioning(i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, d_moy#11, 5), true, [id=#19] +Arguments: hashpartitioning(i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, d_moy#11, 5), ENSURE_REQUIREMENTS, [id=#19] (24) HashAggregate [codegen id : 5] Input [7]: [i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, d_moy#11, sum#18] Keys [6]: [i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, d_moy#11] Functions [1]: [sum(UnscaledValue(ss_sales_price#7))] Aggregate Attributes [1]: [sum(UnscaledValue(ss_sales_price#7))#20] -Results [8]: [i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, d_moy#11, MakeDecimal(sum(UnscaledValue(ss_sales_price#7))#20,17,2) AS sum_sales#21, MakeDecimal(sum(UnscaledValue(ss_sales_price#7))#20,17,2) AS _w0#22] +Results [8]: [i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, d_moy#11, MakeDecimal(sum(UnscaledValue(ss_sales_price#7))#20,17,2) AS sum_sales#21, cast(MakeDecimal(sum(UnscaledValue(ss_sales_price#7))#20,17,2) as bigint) AS _w0#22] (25) Exchange Input [8]: [i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, d_moy#11, sum_sales#21, _w0#22] -Arguments: hashpartitioning(i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, 5), true, [id=#23] +Arguments: hashpartitioning(i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, 5), ENSURE_REQUIREMENTS, [id=#23] (26) Sort [codegen id : 6] Input [8]: [i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, d_moy#11, sum_sales#21, _w0#22] @@ -183,7 +183,7 @@ Input [9]: [i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year# (29) Exchange Input [8]: [i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, d_moy#11, sum_sales#21, avg_monthly_sales#24] -Arguments: hashpartitioning(i_category#3, i_brand#2, s_store_name#14, s_company_name#15, 5), true, [id=#25] +Arguments: hashpartitioning(i_category#3, i_brand#2, s_store_name#14, s_company_name#15, 5), ENSURE_REQUIREMENTS, [id=#25] (30) Sort [codegen id : 8] Input [8]: [i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, d_moy#11, sum_sales#21, avg_monthly_sales#24] @@ -195,7 +195,7 @@ Arguments: [rank(d_year#10, d_moy#11) windowspecdefinition(i_category#3, i_brand (32) Filter [codegen id : 23] Input [9]: [i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, d_moy#11, sum_sales#21, avg_monthly_sales#24, rn#26] -Condition : (((((isnotnull(d_year#10) AND isnotnull(avg_monthly_sales#24)) AND (d_year#10 = 1999)) AND (avg_monthly_sales#24 > 0.000000)) AND (CASE WHEN (avg_monthly_sales#24 > 0.000000) THEN CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#21 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#24 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_monthly_sales#24 as decimal(22,6)))), DecimalType(38,16), true) ELSE null END > 0.1000000000000000)) AND isnotnull(rn#26)) +Condition : (((((((isnotnull(d_year#10) AND isnotnull(avg_monthly_sales#24)) AND isnotnull(sum_sales#21)) AND (d_year#10 = 1999)) AND (avg_monthly_sales#24 > 0.0)) AND (avg_monthly_sales#24 > 0.0)) AND ((abs((cast(sum_sales#21 as double) - avg_monthly_sales#24)) / avg_monthly_sales#24) > 0.1)) AND isnotnull(rn#26)) (33) ReusedExchange [Reuses operator id: 23] Output [7]: [i_category#27, i_brand#28, s_store_name#29, s_company_name#30, d_year#31, d_moy#32, sum#33] @@ -209,7 +209,7 @@ Results [7]: [i_category#27, i_brand#28, s_store_name#29, s_company_name#30, d_y (35) Exchange Input [7]: [i_category#27, i_brand#28, s_store_name#29, s_company_name#30, d_year#31, d_moy#32, sum_sales#35] -Arguments: hashpartitioning(i_category#27, i_brand#28, s_store_name#29, s_company_name#30, 5), true, [id=#36] +Arguments: hashpartitioning(i_category#27, i_brand#28, s_store_name#29, s_company_name#30, 5), ENSURE_REQUIREMENTS, [id=#36] (36) Sort [codegen id : 14] Input [7]: [i_category#27, i_brand#28, s_store_name#29, s_company_name#30, d_year#31, d_moy#32, sum_sales#35] @@ -274,5 +274,5 @@ Input [16]: [i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year (51) TakeOrderedAndProject Input [10]: [i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, d_moy#11, avg_monthly_sales#24, sum_sales#21, psum#48, nsum#49] -Arguments: 100, [CheckOverflow((promote_precision(cast(sum_sales#21 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#24 as decimal(22,6)))), DecimalType(22,6), true) ASC NULLS FIRST, s_store_name#14 ASC NULLS FIRST], [i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, d_moy#11, avg_monthly_sales#24, sum_sales#21, psum#48, nsum#49] +Arguments: 100, [(cast(sum_sales#21 as double) - avg_monthly_sales#24) ASC NULLS FIRST, s_store_name#14 ASC NULLS FIRST], [i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, d_moy#11, avg_monthly_sales#24, sum_sales#21, psum#48, nsum#49] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q48.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q48.sf100/explain.txt index f317bcdf13844..5628a6e528d71 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q48.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q48.sf100/explain.txt @@ -166,18 +166,18 @@ Input [3]: [ss_sold_date_sk#1, ss_quantity#5, d_date_sk#18] (30) HashAggregate [codegen id : 5] Input [1]: [ss_quantity#5] Keys: [] -Functions [1]: [partial_sum(cast(ss_quantity#5 as bigint))] +Functions [1]: [partial_sum(ss_quantity#5)] Aggregate Attributes [1]: [sum#21] Results [1]: [sum#22] (31) Exchange Input [1]: [sum#22] -Arguments: SinglePartition, true, [id=#23] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#23] (32) HashAggregate [codegen id : 6] Input [1]: [sum#22] Keys: [] -Functions [1]: [sum(cast(ss_quantity#5 as bigint))] -Aggregate Attributes [1]: [sum(cast(ss_quantity#5 as bigint))#24] -Results [1]: [sum(cast(ss_quantity#5 as bigint))#24 AS sum(ss_quantity)#25] +Functions [1]: [sum(ss_quantity#5)] +Aggregate Attributes [1]: [sum(ss_quantity#5)#24] +Results [1]: [sum(ss_quantity#5)#24 AS sum(ss_quantity)#25] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q48.sf100/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q48.sf100/simplified.txt index 710fbdd72e07b..a730f1253892a 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q48.sf100/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q48.sf100/simplified.txt @@ -1,5 +1,5 @@ WholeStageCodegen (6) - HashAggregate [sum] [sum(cast(ss_quantity as bigint)),sum(ss_quantity),sum] + HashAggregate [sum] [sum(ss_quantity),sum(ss_quantity),sum] InputAdapter Exchange #1 WholeStageCodegen (5) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q48/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q48/explain.txt index f317bcdf13844..5628a6e528d71 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q48/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q48/explain.txt @@ -166,18 +166,18 @@ Input [3]: [ss_sold_date_sk#1, ss_quantity#5, d_date_sk#18] (30) HashAggregate [codegen id : 5] Input [1]: [ss_quantity#5] Keys: [] -Functions [1]: [partial_sum(cast(ss_quantity#5 as bigint))] +Functions [1]: [partial_sum(ss_quantity#5)] Aggregate Attributes [1]: [sum#21] Results [1]: [sum#22] (31) Exchange Input [1]: [sum#22] -Arguments: SinglePartition, true, [id=#23] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#23] (32) HashAggregate [codegen id : 6] Input [1]: [sum#22] Keys: [] -Functions [1]: [sum(cast(ss_quantity#5 as bigint))] -Aggregate Attributes [1]: [sum(cast(ss_quantity#5 as bigint))#24] -Results [1]: [sum(cast(ss_quantity#5 as bigint))#24 AS sum(ss_quantity)#25] +Functions [1]: [sum(ss_quantity#5)] +Aggregate Attributes [1]: [sum(ss_quantity#5)#24] +Results [1]: [sum(ss_quantity#5)#24 AS sum(ss_quantity)#25] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q48/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q48/simplified.txt index 710fbdd72e07b..a730f1253892a 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q48/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q48/simplified.txt @@ -1,5 +1,5 @@ WholeStageCodegen (6) - HashAggregate [sum] [sum(cast(ss_quantity as bigint)),sum(ss_quantity),sum] + HashAggregate [sum] [sum(ss_quantity),sum(ss_quantity),sum] InputAdapter Exchange #1 WholeStageCodegen (5) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q49.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q49.sf100/explain.txt index 114b5e0568223..600017fd66517 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q49.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q49.sf100/explain.txt @@ -139,7 +139,7 @@ Input [6]: [ws_sold_date_sk#1, ws_item_sk#2, ws_order_number#3, ws_quantity#4, w (12) Exchange Input [4]: [ws_item_sk#2, ws_order_number#3, ws_quantity#4, ws_net_paid#5] -Arguments: hashpartitioning(cast(ws_order_number#3 as bigint), cast(ws_item_sk#2 as bigint), 5), true, [id=#11] +Arguments: hashpartitioning(cast(ws_order_number#3 as bigint), cast(ws_item_sk#2 as bigint), 5), ENSURE_REQUIREMENTS, [id=#11] (13) Sort [codegen id : 3] Input [4]: [ws_item_sk#2, ws_order_number#3, ws_quantity#4, ws_net_paid#5] @@ -161,7 +161,7 @@ Condition : (((isnotnull(wr_return_amt#15) AND (wr_return_amt#15 > 10000.00)) AN (17) Exchange Input [4]: [wr_item_sk#12, wr_order_number#13, wr_return_quantity#14, wr_return_amt#15] -Arguments: hashpartitioning(wr_order_number#13, wr_item_sk#12, 5), true, [id=#16] +Arguments: hashpartitioning(wr_order_number#13, wr_item_sk#12, 5), ENSURE_REQUIREMENTS, [id=#16] (18) Sort [codegen id : 5] Input [4]: [wr_item_sk#12, wr_order_number#13, wr_return_quantity#14, wr_return_amt#15] @@ -179,24 +179,24 @@ Input [8]: [ws_item_sk#2, ws_order_number#3, ws_quantity#4, ws_net_paid#5, wr_it (21) HashAggregate [codegen id : 6] Input [5]: [ws_item_sk#2, ws_quantity#4, ws_net_paid#5, wr_return_quantity#14, wr_return_amt#15] Keys [1]: [ws_item_sk#2] -Functions [4]: [partial_sum(cast(coalesce(wr_return_quantity#14, 0) as bigint)), partial_sum(cast(coalesce(ws_quantity#4, 0) as bigint)), partial_sum(coalesce(cast(wr_return_amt#15 as decimal(12,2)), 0.00)), partial_sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))] +Functions [4]: [partial_sum(coalesce(wr_return_quantity#14, 0)), partial_sum(coalesce(ws_quantity#4, 0)), partial_sum(coalesce(cast(wr_return_amt#15 as decimal(12,2)), 0.00)), partial_sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))] Aggregate Attributes [6]: [sum#17, sum#18, sum#19, isEmpty#20, sum#21, isEmpty#22] Results [7]: [ws_item_sk#2, sum#23, sum#24, sum#25, isEmpty#26, sum#27, isEmpty#28] (22) Exchange Input [7]: [ws_item_sk#2, sum#23, sum#24, sum#25, isEmpty#26, sum#27, isEmpty#28] -Arguments: hashpartitioning(ws_item_sk#2, 5), true, [id=#29] +Arguments: hashpartitioning(ws_item_sk#2, 5), ENSURE_REQUIREMENTS, [id=#29] (23) HashAggregate [codegen id : 7] Input [7]: [ws_item_sk#2, sum#23, sum#24, sum#25, isEmpty#26, sum#27, isEmpty#28] Keys [1]: [ws_item_sk#2] -Functions [4]: [sum(cast(coalesce(wr_return_quantity#14, 0) as bigint)), sum(cast(coalesce(ws_quantity#4, 0) as bigint)), sum(coalesce(cast(wr_return_amt#15 as decimal(12,2)), 0.00)), sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))] -Aggregate Attributes [4]: [sum(cast(coalesce(wr_return_quantity#14, 0) as bigint))#30, sum(cast(coalesce(ws_quantity#4, 0) as bigint))#31, sum(coalesce(cast(wr_return_amt#15 as decimal(12,2)), 0.00))#32, sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))#33] -Results [3]: [ws_item_sk#2 AS item#34, CheckOverflow((promote_precision(cast(sum(cast(coalesce(wr_return_quantity#14, 0) as bigint))#30 as decimal(15,4))) / promote_precision(cast(sum(cast(coalesce(ws_quantity#4, 0) as bigint))#31 as decimal(15,4)))), DecimalType(35,20), true) AS return_ratio#35, CheckOverflow((promote_precision(cast(sum(coalesce(cast(wr_return_amt#15 as decimal(12,2)), 0.00))#32 as decimal(15,4))) / promote_precision(cast(sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))#33 as decimal(15,4)))), DecimalType(35,20), true) AS currency_ratio#36] +Functions [4]: [sum(coalesce(wr_return_quantity#14, 0)), sum(coalesce(ws_quantity#4, 0)), sum(coalesce(cast(wr_return_amt#15 as decimal(12,2)), 0.00)), sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))] +Aggregate Attributes [4]: [sum(coalesce(wr_return_quantity#14, 0))#30, sum(coalesce(ws_quantity#4, 0))#31, sum(coalesce(cast(wr_return_amt#15 as decimal(12,2)), 0.00))#32, sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))#33] +Results [3]: [ws_item_sk#2 AS item#34, CheckOverflow((promote_precision(cast(sum(coalesce(wr_return_quantity#14, 0))#30 as decimal(15,4))) / promote_precision(cast(sum(coalesce(ws_quantity#4, 0))#31 as decimal(15,4)))), DecimalType(35,20), true) AS return_ratio#35, CheckOverflow((promote_precision(cast(sum(coalesce(cast(wr_return_amt#15 as decimal(12,2)), 0.00))#32 as decimal(15,4))) / promote_precision(cast(sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))#33 as decimal(15,4)))), DecimalType(35,20), true) AS currency_ratio#36] (24) Exchange Input [3]: [item#34, return_ratio#35, currency_ratio#36] -Arguments: SinglePartition, true, [id=#37] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#37] (25) Sort [codegen id : 8] Input [3]: [item#34, return_ratio#35, currency_ratio#36] @@ -254,7 +254,7 @@ Input [6]: [cs_sold_date_sk#41, cs_item_sk#42, cs_order_number#43, cs_quantity#4 (38) Exchange Input [4]: [cs_item_sk#42, cs_order_number#43, cs_quantity#44, cs_net_paid#45] -Arguments: hashpartitioning(cs_order_number#43, cs_item_sk#42, 5), true, [id=#47] +Arguments: hashpartitioning(cs_order_number#43, cs_item_sk#42, 5), ENSURE_REQUIREMENTS, [id=#47] (39) Sort [codegen id : 13] Input [4]: [cs_item_sk#42, cs_order_number#43, cs_quantity#44, cs_net_paid#45] @@ -276,7 +276,7 @@ Condition : (((isnotnull(cr_return_amount#51) AND (cr_return_amount#51 > 10000.0 (43) Exchange Input [4]: [cr_item_sk#48, cr_order_number#49, cr_return_quantity#50, cr_return_amount#51] -Arguments: hashpartitioning(cr_order_number#49, cr_item_sk#48, 5), true, [id=#52] +Arguments: hashpartitioning(cr_order_number#49, cr_item_sk#48, 5), ENSURE_REQUIREMENTS, [id=#52] (44) Sort [codegen id : 15] Input [4]: [cr_item_sk#48, cr_order_number#49, cr_return_quantity#50, cr_return_amount#51] @@ -294,24 +294,24 @@ Input [8]: [cs_item_sk#42, cs_order_number#43, cs_quantity#44, cs_net_paid#45, c (47) HashAggregate [codegen id : 16] Input [5]: [cs_item_sk#42, cs_quantity#44, cs_net_paid#45, cr_return_quantity#50, cr_return_amount#51] Keys [1]: [cs_item_sk#42] -Functions [4]: [partial_sum(cast(coalesce(cr_return_quantity#50, 0) as bigint)), partial_sum(cast(coalesce(cs_quantity#44, 0) as bigint)), partial_sum(coalesce(cast(cr_return_amount#51 as decimal(12,2)), 0.00)), partial_sum(coalesce(cast(cs_net_paid#45 as decimal(12,2)), 0.00))] +Functions [4]: [partial_sum(coalesce(cr_return_quantity#50, 0)), partial_sum(coalesce(cs_quantity#44, 0)), partial_sum(coalesce(cast(cr_return_amount#51 as decimal(12,2)), 0.00)), partial_sum(coalesce(cast(cs_net_paid#45 as decimal(12,2)), 0.00))] Aggregate Attributes [6]: [sum#53, sum#54, sum#55, isEmpty#56, sum#57, isEmpty#58] Results [7]: [cs_item_sk#42, sum#59, sum#60, sum#61, isEmpty#62, sum#63, isEmpty#64] (48) Exchange Input [7]: [cs_item_sk#42, sum#59, sum#60, sum#61, isEmpty#62, sum#63, isEmpty#64] -Arguments: hashpartitioning(cs_item_sk#42, 5), true, [id=#65] +Arguments: hashpartitioning(cs_item_sk#42, 5), ENSURE_REQUIREMENTS, [id=#65] (49) HashAggregate [codegen id : 17] Input [7]: [cs_item_sk#42, sum#59, sum#60, sum#61, isEmpty#62, sum#63, isEmpty#64] Keys [1]: [cs_item_sk#42] -Functions [4]: [sum(cast(coalesce(cr_return_quantity#50, 0) as bigint)), sum(cast(coalesce(cs_quantity#44, 0) as bigint)), sum(coalesce(cast(cr_return_amount#51 as decimal(12,2)), 0.00)), sum(coalesce(cast(cs_net_paid#45 as decimal(12,2)), 0.00))] -Aggregate Attributes [4]: [sum(cast(coalesce(cr_return_quantity#50, 0) as bigint))#66, sum(cast(coalesce(cs_quantity#44, 0) as bigint))#67, sum(coalesce(cast(cr_return_amount#51 as decimal(12,2)), 0.00))#68, sum(coalesce(cast(cs_net_paid#45 as decimal(12,2)), 0.00))#69] -Results [3]: [cs_item_sk#42 AS item#70, CheckOverflow((promote_precision(cast(sum(cast(coalesce(cr_return_quantity#50, 0) as bigint))#66 as decimal(15,4))) / promote_precision(cast(sum(cast(coalesce(cs_quantity#44, 0) as bigint))#67 as decimal(15,4)))), DecimalType(35,20), true) AS return_ratio#71, CheckOverflow((promote_precision(cast(sum(coalesce(cast(cr_return_amount#51 as decimal(12,2)), 0.00))#68 as decimal(15,4))) / promote_precision(cast(sum(coalesce(cast(cs_net_paid#45 as decimal(12,2)), 0.00))#69 as decimal(15,4)))), DecimalType(35,20), true) AS currency_ratio#72] +Functions [4]: [sum(coalesce(cr_return_quantity#50, 0)), sum(coalesce(cs_quantity#44, 0)), sum(coalesce(cast(cr_return_amount#51 as decimal(12,2)), 0.00)), sum(coalesce(cast(cs_net_paid#45 as decimal(12,2)), 0.00))] +Aggregate Attributes [4]: [sum(coalesce(cr_return_quantity#50, 0))#66, sum(coalesce(cs_quantity#44, 0))#67, sum(coalesce(cast(cr_return_amount#51 as decimal(12,2)), 0.00))#68, sum(coalesce(cast(cs_net_paid#45 as decimal(12,2)), 0.00))#69] +Results [3]: [cs_item_sk#42 AS item#70, CheckOverflow((promote_precision(cast(sum(coalesce(cr_return_quantity#50, 0))#66 as decimal(15,4))) / promote_precision(cast(sum(coalesce(cs_quantity#44, 0))#67 as decimal(15,4)))), DecimalType(35,20), true) AS return_ratio#71, CheckOverflow((promote_precision(cast(sum(coalesce(cast(cr_return_amount#51 as decimal(12,2)), 0.00))#68 as decimal(15,4))) / promote_precision(cast(sum(coalesce(cast(cs_net_paid#45 as decimal(12,2)), 0.00))#69 as decimal(15,4)))), DecimalType(35,20), true) AS currency_ratio#72] (50) Exchange Input [3]: [item#70, return_ratio#71, currency_ratio#72] -Arguments: SinglePartition, true, [id=#73] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#73] (51) Sort [codegen id : 18] Input [3]: [item#70, return_ratio#71, currency_ratio#72] @@ -369,7 +369,7 @@ Input [6]: [ss_sold_date_sk#77, ss_item_sk#78, ss_ticket_number#79, ss_quantity# (64) Exchange Input [4]: [ss_item_sk#78, ss_ticket_number#79, ss_quantity#80, ss_net_paid#81] -Arguments: hashpartitioning(cast(ss_ticket_number#79 as bigint), cast(ss_item_sk#78 as bigint), 5), true, [id=#83] +Arguments: hashpartitioning(cast(ss_ticket_number#79 as bigint), cast(ss_item_sk#78 as bigint), 5), ENSURE_REQUIREMENTS, [id=#83] (65) Sort [codegen id : 23] Input [4]: [ss_item_sk#78, ss_ticket_number#79, ss_quantity#80, ss_net_paid#81] @@ -391,7 +391,7 @@ Condition : (((isnotnull(sr_return_amt#87) AND (sr_return_amt#87 > 10000.00)) AN (69) Exchange Input [4]: [sr_item_sk#84, sr_ticket_number#85, sr_return_quantity#86, sr_return_amt#87] -Arguments: hashpartitioning(sr_ticket_number#85, sr_item_sk#84, 5), true, [id=#88] +Arguments: hashpartitioning(sr_ticket_number#85, sr_item_sk#84, 5), ENSURE_REQUIREMENTS, [id=#88] (70) Sort [codegen id : 25] Input [4]: [sr_item_sk#84, sr_ticket_number#85, sr_return_quantity#86, sr_return_amt#87] @@ -409,24 +409,24 @@ Input [8]: [ss_item_sk#78, ss_ticket_number#79, ss_quantity#80, ss_net_paid#81, (73) HashAggregate [codegen id : 26] Input [5]: [ss_item_sk#78, ss_quantity#80, ss_net_paid#81, sr_return_quantity#86, sr_return_amt#87] Keys [1]: [ss_item_sk#78] -Functions [4]: [partial_sum(cast(coalesce(sr_return_quantity#86, 0) as bigint)), partial_sum(cast(coalesce(ss_quantity#80, 0) as bigint)), partial_sum(coalesce(cast(sr_return_amt#87 as decimal(12,2)), 0.00)), partial_sum(coalesce(cast(ss_net_paid#81 as decimal(12,2)), 0.00))] +Functions [4]: [partial_sum(coalesce(sr_return_quantity#86, 0)), partial_sum(coalesce(ss_quantity#80, 0)), partial_sum(coalesce(cast(sr_return_amt#87 as decimal(12,2)), 0.00)), partial_sum(coalesce(cast(ss_net_paid#81 as decimal(12,2)), 0.00))] Aggregate Attributes [6]: [sum#89, sum#90, sum#91, isEmpty#92, sum#93, isEmpty#94] Results [7]: [ss_item_sk#78, sum#95, sum#96, sum#97, isEmpty#98, sum#99, isEmpty#100] (74) Exchange Input [7]: [ss_item_sk#78, sum#95, sum#96, sum#97, isEmpty#98, sum#99, isEmpty#100] -Arguments: hashpartitioning(ss_item_sk#78, 5), true, [id=#101] +Arguments: hashpartitioning(ss_item_sk#78, 5), ENSURE_REQUIREMENTS, [id=#101] (75) HashAggregate [codegen id : 27] Input [7]: [ss_item_sk#78, sum#95, sum#96, sum#97, isEmpty#98, sum#99, isEmpty#100] Keys [1]: [ss_item_sk#78] -Functions [4]: [sum(cast(coalesce(sr_return_quantity#86, 0) as bigint)), sum(cast(coalesce(ss_quantity#80, 0) as bigint)), sum(coalesce(cast(sr_return_amt#87 as decimal(12,2)), 0.00)), sum(coalesce(cast(ss_net_paid#81 as decimal(12,2)), 0.00))] -Aggregate Attributes [4]: [sum(cast(coalesce(sr_return_quantity#86, 0) as bigint))#102, sum(cast(coalesce(ss_quantity#80, 0) as bigint))#103, sum(coalesce(cast(sr_return_amt#87 as decimal(12,2)), 0.00))#104, sum(coalesce(cast(ss_net_paid#81 as decimal(12,2)), 0.00))#105] -Results [3]: [ss_item_sk#78 AS item#106, CheckOverflow((promote_precision(cast(sum(cast(coalesce(sr_return_quantity#86, 0) as bigint))#102 as decimal(15,4))) / promote_precision(cast(sum(cast(coalesce(ss_quantity#80, 0) as bigint))#103 as decimal(15,4)))), DecimalType(35,20), true) AS return_ratio#107, CheckOverflow((promote_precision(cast(sum(coalesce(cast(sr_return_amt#87 as decimal(12,2)), 0.00))#104 as decimal(15,4))) / promote_precision(cast(sum(coalesce(cast(ss_net_paid#81 as decimal(12,2)), 0.00))#105 as decimal(15,4)))), DecimalType(35,20), true) AS currency_ratio#108] +Functions [4]: [sum(coalesce(sr_return_quantity#86, 0)), sum(coalesce(ss_quantity#80, 0)), sum(coalesce(cast(sr_return_amt#87 as decimal(12,2)), 0.00)), sum(coalesce(cast(ss_net_paid#81 as decimal(12,2)), 0.00))] +Aggregate Attributes [4]: [sum(coalesce(sr_return_quantity#86, 0))#102, sum(coalesce(ss_quantity#80, 0))#103, sum(coalesce(cast(sr_return_amt#87 as decimal(12,2)), 0.00))#104, sum(coalesce(cast(ss_net_paid#81 as decimal(12,2)), 0.00))#105] +Results [3]: [ss_item_sk#78 AS item#106, CheckOverflow((promote_precision(cast(sum(coalesce(sr_return_quantity#86, 0))#102 as decimal(15,4))) / promote_precision(cast(sum(coalesce(ss_quantity#80, 0))#103 as decimal(15,4)))), DecimalType(35,20), true) AS return_ratio#107, CheckOverflow((promote_precision(cast(sum(coalesce(cast(sr_return_amt#87 as decimal(12,2)), 0.00))#104 as decimal(15,4))) / promote_precision(cast(sum(coalesce(cast(ss_net_paid#81 as decimal(12,2)), 0.00))#105 as decimal(15,4)))), DecimalType(35,20), true) AS currency_ratio#108] (76) Exchange Input [3]: [item#106, return_ratio#107, currency_ratio#108] -Arguments: SinglePartition, true, [id=#109] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#109] (77) Sort [codegen id : 28] Input [3]: [item#106, return_ratio#107, currency_ratio#108] @@ -463,7 +463,7 @@ Results [5]: [channel#40, item#34, return_ratio#35, return_rank#38, currency_ran (85) Exchange Input [5]: [channel#40, item#34, return_ratio#35, return_rank#38, currency_rank#39] -Arguments: hashpartitioning(channel#40, item#34, return_ratio#35, return_rank#38, currency_rank#39, 5), true, [id=#113] +Arguments: hashpartitioning(channel#40, item#34, return_ratio#35, return_rank#38, currency_rank#39, 5), ENSURE_REQUIREMENTS, [id=#113] (86) HashAggregate [codegen id : 32] Input [5]: [channel#40, item#34, return_ratio#35, return_rank#38, currency_rank#39] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q49.sf100/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q49.sf100/simplified.txt index ab300ca150457..166ab6190f0d8 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q49.sf100/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q49.sf100/simplified.txt @@ -21,7 +21,7 @@ TakeOrderedAndProject [channel,return_rank,currency_rank,item,return_ratio] InputAdapter Exchange #2 WholeStageCodegen (7) - HashAggregate [ws_item_sk,sum,sum,sum,isEmpty,sum,isEmpty] [sum(cast(coalesce(wr_return_quantity, 0) as bigint)),sum(cast(coalesce(ws_quantity, 0) as bigint)),sum(coalesce(cast(wr_return_amt as decimal(12,2)), 0.00)),sum(coalesce(cast(ws_net_paid as decimal(12,2)), 0.00)),item,return_ratio,currency_ratio,sum,sum,sum,isEmpty,sum,isEmpty] + HashAggregate [ws_item_sk,sum,sum,sum,isEmpty,sum,isEmpty] [sum(coalesce(wr_return_quantity, 0)),sum(coalesce(ws_quantity, 0)),sum(coalesce(cast(wr_return_amt as decimal(12,2)), 0.00)),sum(coalesce(cast(ws_net_paid as decimal(12,2)), 0.00)),item,return_ratio,currency_ratio,sum,sum,sum,isEmpty,sum,isEmpty] InputAdapter Exchange [ws_item_sk] #3 WholeStageCodegen (6) @@ -73,7 +73,7 @@ TakeOrderedAndProject [channel,return_rank,currency_rank,item,return_ratio] InputAdapter Exchange #7 WholeStageCodegen (17) - HashAggregate [cs_item_sk,sum,sum,sum,isEmpty,sum,isEmpty] [sum(cast(coalesce(cr_return_quantity, 0) as bigint)),sum(cast(coalesce(cs_quantity, 0) as bigint)),sum(coalesce(cast(cr_return_amount as decimal(12,2)), 0.00)),sum(coalesce(cast(cs_net_paid as decimal(12,2)), 0.00)),item,return_ratio,currency_ratio,sum,sum,sum,isEmpty,sum,isEmpty] + HashAggregate [cs_item_sk,sum,sum,sum,isEmpty,sum,isEmpty] [sum(coalesce(cr_return_quantity, 0)),sum(coalesce(cs_quantity, 0)),sum(coalesce(cast(cr_return_amount as decimal(12,2)), 0.00)),sum(coalesce(cast(cs_net_paid as decimal(12,2)), 0.00)),item,return_ratio,currency_ratio,sum,sum,sum,isEmpty,sum,isEmpty] InputAdapter Exchange [cs_item_sk] #8 WholeStageCodegen (16) @@ -119,7 +119,7 @@ TakeOrderedAndProject [channel,return_rank,currency_rank,item,return_ratio] InputAdapter Exchange #11 WholeStageCodegen (27) - HashAggregate [ss_item_sk,sum,sum,sum,isEmpty,sum,isEmpty] [sum(cast(coalesce(sr_return_quantity, 0) as bigint)),sum(cast(coalesce(ss_quantity, 0) as bigint)),sum(coalesce(cast(sr_return_amt as decimal(12,2)), 0.00)),sum(coalesce(cast(ss_net_paid as decimal(12,2)), 0.00)),item,return_ratio,currency_ratio,sum,sum,sum,isEmpty,sum,isEmpty] + HashAggregate [ss_item_sk,sum,sum,sum,isEmpty,sum,isEmpty] [sum(coalesce(sr_return_quantity, 0)),sum(coalesce(ss_quantity, 0)),sum(coalesce(cast(sr_return_amt as decimal(12,2)), 0.00)),sum(coalesce(cast(ss_net_paid as decimal(12,2)), 0.00)),item,return_ratio,currency_ratio,sum,sum,sum,isEmpty,sum,isEmpty] InputAdapter Exchange [ss_item_sk] #12 WholeStageCodegen (26) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q49/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q49/explain.txt index 8d10c1641ef46..d6bf881201177 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q49/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q49/explain.txt @@ -158,24 +158,24 @@ Input [7]: [ws_sold_date_sk#1, ws_item_sk#2, ws_quantity#4, ws_net_paid#5, wr_re (18) HashAggregate [codegen id : 3] Input [5]: [ws_item_sk#2, ws_quantity#4, ws_net_paid#5, wr_return_quantity#9, wr_return_amt#10] Keys [1]: [ws_item_sk#2] -Functions [4]: [partial_sum(cast(coalesce(wr_return_quantity#9, 0) as bigint)), partial_sum(cast(coalesce(ws_quantity#4, 0) as bigint)), partial_sum(coalesce(cast(wr_return_amt#10 as decimal(12,2)), 0.00)), partial_sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))] +Functions [4]: [partial_sum(coalesce(wr_return_quantity#9, 0)), partial_sum(coalesce(ws_quantity#4, 0)), partial_sum(coalesce(cast(wr_return_amt#10 as decimal(12,2)), 0.00)), partial_sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))] Aggregate Attributes [6]: [sum#16, sum#17, sum#18, isEmpty#19, sum#20, isEmpty#21] Results [7]: [ws_item_sk#2, sum#22, sum#23, sum#24, isEmpty#25, sum#26, isEmpty#27] (19) Exchange Input [7]: [ws_item_sk#2, sum#22, sum#23, sum#24, isEmpty#25, sum#26, isEmpty#27] -Arguments: hashpartitioning(ws_item_sk#2, 5), true, [id=#28] +Arguments: hashpartitioning(ws_item_sk#2, 5), ENSURE_REQUIREMENTS, [id=#28] (20) HashAggregate [codegen id : 4] Input [7]: [ws_item_sk#2, sum#22, sum#23, sum#24, isEmpty#25, sum#26, isEmpty#27] Keys [1]: [ws_item_sk#2] -Functions [4]: [sum(cast(coalesce(wr_return_quantity#9, 0) as bigint)), sum(cast(coalesce(ws_quantity#4, 0) as bigint)), sum(coalesce(cast(wr_return_amt#10 as decimal(12,2)), 0.00)), sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))] -Aggregate Attributes [4]: [sum(cast(coalesce(wr_return_quantity#9, 0) as bigint))#29, sum(cast(coalesce(ws_quantity#4, 0) as bigint))#30, sum(coalesce(cast(wr_return_amt#10 as decimal(12,2)), 0.00))#31, sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))#32] -Results [3]: [ws_item_sk#2 AS item#33, CheckOverflow((promote_precision(cast(sum(cast(coalesce(wr_return_quantity#9, 0) as bigint))#29 as decimal(15,4))) / promote_precision(cast(sum(cast(coalesce(ws_quantity#4, 0) as bigint))#30 as decimal(15,4)))), DecimalType(35,20), true) AS return_ratio#34, CheckOverflow((promote_precision(cast(sum(coalesce(cast(wr_return_amt#10 as decimal(12,2)), 0.00))#31 as decimal(15,4))) / promote_precision(cast(sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))#32 as decimal(15,4)))), DecimalType(35,20), true) AS currency_ratio#35] +Functions [4]: [sum(coalesce(wr_return_quantity#9, 0)), sum(coalesce(ws_quantity#4, 0)), sum(coalesce(cast(wr_return_amt#10 as decimal(12,2)), 0.00)), sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))] +Aggregate Attributes [4]: [sum(coalesce(wr_return_quantity#9, 0))#29, sum(coalesce(ws_quantity#4, 0))#30, sum(coalesce(cast(wr_return_amt#10 as decimal(12,2)), 0.00))#31, sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))#32] +Results [3]: [ws_item_sk#2 AS item#33, CheckOverflow((promote_precision(cast(sum(coalesce(wr_return_quantity#9, 0))#29 as decimal(15,4))) / promote_precision(cast(sum(coalesce(ws_quantity#4, 0))#30 as decimal(15,4)))), DecimalType(35,20), true) AS return_ratio#34, CheckOverflow((promote_precision(cast(sum(coalesce(cast(wr_return_amt#10 as decimal(12,2)), 0.00))#31 as decimal(15,4))) / promote_precision(cast(sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))#32 as decimal(15,4)))), DecimalType(35,20), true) AS currency_ratio#35] (21) Exchange Input [3]: [item#33, return_ratio#34, currency_ratio#35] -Arguments: SinglePartition, true, [id=#36] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#36] (22) Sort [codegen id : 5] Input [3]: [item#33, return_ratio#34, currency_ratio#35] @@ -261,24 +261,24 @@ Input [7]: [cs_sold_date_sk#40, cs_item_sk#41, cs_quantity#43, cs_net_paid#44, c (41) HashAggregate [codegen id : 10] Input [5]: [cs_item_sk#41, cs_quantity#43, cs_net_paid#44, cr_return_quantity#48, cr_return_amount#49] Keys [1]: [cs_item_sk#41] -Functions [4]: [partial_sum(cast(coalesce(cr_return_quantity#48, 0) as bigint)), partial_sum(cast(coalesce(cs_quantity#43, 0) as bigint)), partial_sum(coalesce(cast(cr_return_amount#49 as decimal(12,2)), 0.00)), partial_sum(coalesce(cast(cs_net_paid#44 as decimal(12,2)), 0.00))] +Functions [4]: [partial_sum(coalesce(cr_return_quantity#48, 0)), partial_sum(coalesce(cs_quantity#43, 0)), partial_sum(coalesce(cast(cr_return_amount#49 as decimal(12,2)), 0.00)), partial_sum(coalesce(cast(cs_net_paid#44 as decimal(12,2)), 0.00))] Aggregate Attributes [6]: [sum#51, sum#52, sum#53, isEmpty#54, sum#55, isEmpty#56] Results [7]: [cs_item_sk#41, sum#57, sum#58, sum#59, isEmpty#60, sum#61, isEmpty#62] (42) Exchange Input [7]: [cs_item_sk#41, sum#57, sum#58, sum#59, isEmpty#60, sum#61, isEmpty#62] -Arguments: hashpartitioning(cs_item_sk#41, 5), true, [id=#63] +Arguments: hashpartitioning(cs_item_sk#41, 5), ENSURE_REQUIREMENTS, [id=#63] (43) HashAggregate [codegen id : 11] Input [7]: [cs_item_sk#41, sum#57, sum#58, sum#59, isEmpty#60, sum#61, isEmpty#62] Keys [1]: [cs_item_sk#41] -Functions [4]: [sum(cast(coalesce(cr_return_quantity#48, 0) as bigint)), sum(cast(coalesce(cs_quantity#43, 0) as bigint)), sum(coalesce(cast(cr_return_amount#49 as decimal(12,2)), 0.00)), sum(coalesce(cast(cs_net_paid#44 as decimal(12,2)), 0.00))] -Aggregate Attributes [4]: [sum(cast(coalesce(cr_return_quantity#48, 0) as bigint))#64, sum(cast(coalesce(cs_quantity#43, 0) as bigint))#65, sum(coalesce(cast(cr_return_amount#49 as decimal(12,2)), 0.00))#66, sum(coalesce(cast(cs_net_paid#44 as decimal(12,2)), 0.00))#67] -Results [3]: [cs_item_sk#41 AS item#68, CheckOverflow((promote_precision(cast(sum(cast(coalesce(cr_return_quantity#48, 0) as bigint))#64 as decimal(15,4))) / promote_precision(cast(sum(cast(coalesce(cs_quantity#43, 0) as bigint))#65 as decimal(15,4)))), DecimalType(35,20), true) AS return_ratio#69, CheckOverflow((promote_precision(cast(sum(coalesce(cast(cr_return_amount#49 as decimal(12,2)), 0.00))#66 as decimal(15,4))) / promote_precision(cast(sum(coalesce(cast(cs_net_paid#44 as decimal(12,2)), 0.00))#67 as decimal(15,4)))), DecimalType(35,20), true) AS currency_ratio#70] +Functions [4]: [sum(coalesce(cr_return_quantity#48, 0)), sum(coalesce(cs_quantity#43, 0)), sum(coalesce(cast(cr_return_amount#49 as decimal(12,2)), 0.00)), sum(coalesce(cast(cs_net_paid#44 as decimal(12,2)), 0.00))] +Aggregate Attributes [4]: [sum(coalesce(cr_return_quantity#48, 0))#64, sum(coalesce(cs_quantity#43, 0))#65, sum(coalesce(cast(cr_return_amount#49 as decimal(12,2)), 0.00))#66, sum(coalesce(cast(cs_net_paid#44 as decimal(12,2)), 0.00))#67] +Results [3]: [cs_item_sk#41 AS item#68, CheckOverflow((promote_precision(cast(sum(coalesce(cr_return_quantity#48, 0))#64 as decimal(15,4))) / promote_precision(cast(sum(coalesce(cs_quantity#43, 0))#65 as decimal(15,4)))), DecimalType(35,20), true) AS return_ratio#69, CheckOverflow((promote_precision(cast(sum(coalesce(cast(cr_return_amount#49 as decimal(12,2)), 0.00))#66 as decimal(15,4))) / promote_precision(cast(sum(coalesce(cast(cs_net_paid#44 as decimal(12,2)), 0.00))#67 as decimal(15,4)))), DecimalType(35,20), true) AS currency_ratio#70] (44) Exchange Input [3]: [item#68, return_ratio#69, currency_ratio#70] -Arguments: SinglePartition, true, [id=#71] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#71] (45) Sort [codegen id : 12] Input [3]: [item#68, return_ratio#69, currency_ratio#70] @@ -364,24 +364,24 @@ Input [7]: [ss_sold_date_sk#75, ss_item_sk#76, ss_quantity#78, ss_net_paid#79, s (64) HashAggregate [codegen id : 17] Input [5]: [ss_item_sk#76, ss_quantity#78, ss_net_paid#79, sr_return_quantity#83, sr_return_amt#84] Keys [1]: [ss_item_sk#76] -Functions [4]: [partial_sum(cast(coalesce(sr_return_quantity#83, 0) as bigint)), partial_sum(cast(coalesce(ss_quantity#78, 0) as bigint)), partial_sum(coalesce(cast(sr_return_amt#84 as decimal(12,2)), 0.00)), partial_sum(coalesce(cast(ss_net_paid#79 as decimal(12,2)), 0.00))] +Functions [4]: [partial_sum(coalesce(sr_return_quantity#83, 0)), partial_sum(coalesce(ss_quantity#78, 0)), partial_sum(coalesce(cast(sr_return_amt#84 as decimal(12,2)), 0.00)), partial_sum(coalesce(cast(ss_net_paid#79 as decimal(12,2)), 0.00))] Aggregate Attributes [6]: [sum#86, sum#87, sum#88, isEmpty#89, sum#90, isEmpty#91] Results [7]: [ss_item_sk#76, sum#92, sum#93, sum#94, isEmpty#95, sum#96, isEmpty#97] (65) Exchange Input [7]: [ss_item_sk#76, sum#92, sum#93, sum#94, isEmpty#95, sum#96, isEmpty#97] -Arguments: hashpartitioning(ss_item_sk#76, 5), true, [id=#98] +Arguments: hashpartitioning(ss_item_sk#76, 5), ENSURE_REQUIREMENTS, [id=#98] (66) HashAggregate [codegen id : 18] Input [7]: [ss_item_sk#76, sum#92, sum#93, sum#94, isEmpty#95, sum#96, isEmpty#97] Keys [1]: [ss_item_sk#76] -Functions [4]: [sum(cast(coalesce(sr_return_quantity#83, 0) as bigint)), sum(cast(coalesce(ss_quantity#78, 0) as bigint)), sum(coalesce(cast(sr_return_amt#84 as decimal(12,2)), 0.00)), sum(coalesce(cast(ss_net_paid#79 as decimal(12,2)), 0.00))] -Aggregate Attributes [4]: [sum(cast(coalesce(sr_return_quantity#83, 0) as bigint))#99, sum(cast(coalesce(ss_quantity#78, 0) as bigint))#100, sum(coalesce(cast(sr_return_amt#84 as decimal(12,2)), 0.00))#101, sum(coalesce(cast(ss_net_paid#79 as decimal(12,2)), 0.00))#102] -Results [3]: [ss_item_sk#76 AS item#103, CheckOverflow((promote_precision(cast(sum(cast(coalesce(sr_return_quantity#83, 0) as bigint))#99 as decimal(15,4))) / promote_precision(cast(sum(cast(coalesce(ss_quantity#78, 0) as bigint))#100 as decimal(15,4)))), DecimalType(35,20), true) AS return_ratio#104, CheckOverflow((promote_precision(cast(sum(coalesce(cast(sr_return_amt#84 as decimal(12,2)), 0.00))#101 as decimal(15,4))) / promote_precision(cast(sum(coalesce(cast(ss_net_paid#79 as decimal(12,2)), 0.00))#102 as decimal(15,4)))), DecimalType(35,20), true) AS currency_ratio#105] +Functions [4]: [sum(coalesce(sr_return_quantity#83, 0)), sum(coalesce(ss_quantity#78, 0)), sum(coalesce(cast(sr_return_amt#84 as decimal(12,2)), 0.00)), sum(coalesce(cast(ss_net_paid#79 as decimal(12,2)), 0.00))] +Aggregate Attributes [4]: [sum(coalesce(sr_return_quantity#83, 0))#99, sum(coalesce(ss_quantity#78, 0))#100, sum(coalesce(cast(sr_return_amt#84 as decimal(12,2)), 0.00))#101, sum(coalesce(cast(ss_net_paid#79 as decimal(12,2)), 0.00))#102] +Results [3]: [ss_item_sk#76 AS item#103, CheckOverflow((promote_precision(cast(sum(coalesce(sr_return_quantity#83, 0))#99 as decimal(15,4))) / promote_precision(cast(sum(coalesce(ss_quantity#78, 0))#100 as decimal(15,4)))), DecimalType(35,20), true) AS return_ratio#104, CheckOverflow((promote_precision(cast(sum(coalesce(cast(sr_return_amt#84 as decimal(12,2)), 0.00))#101 as decimal(15,4))) / promote_precision(cast(sum(coalesce(cast(ss_net_paid#79 as decimal(12,2)), 0.00))#102 as decimal(15,4)))), DecimalType(35,20), true) AS currency_ratio#105] (67) Exchange Input [3]: [item#103, return_ratio#104, currency_ratio#105] -Arguments: SinglePartition, true, [id=#106] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#106] (68) Sort [codegen id : 19] Input [3]: [item#103, return_ratio#104, currency_ratio#105] @@ -418,7 +418,7 @@ Results [5]: [channel#39, item#33, return_ratio#34, return_rank#37, currency_ran (76) Exchange Input [5]: [channel#39, item#33, return_ratio#34, return_rank#37, currency_rank#38] -Arguments: hashpartitioning(channel#39, item#33, return_ratio#34, return_rank#37, currency_rank#38, 5), true, [id=#110] +Arguments: hashpartitioning(channel#39, item#33, return_ratio#34, return_rank#37, currency_rank#38, 5), ENSURE_REQUIREMENTS, [id=#110] (77) HashAggregate [codegen id : 23] Input [5]: [channel#39, item#33, return_ratio#34, return_rank#37, currency_rank#38] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q49/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q49/simplified.txt index c15f2394e1a44..c46a92806cffc 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q49/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q49/simplified.txt @@ -21,7 +21,7 @@ TakeOrderedAndProject [channel,return_rank,currency_rank,item,return_ratio] InputAdapter Exchange #2 WholeStageCodegen (4) - HashAggregate [ws_item_sk,sum,sum,sum,isEmpty,sum,isEmpty] [sum(cast(coalesce(wr_return_quantity, 0) as bigint)),sum(cast(coalesce(ws_quantity, 0) as bigint)),sum(coalesce(cast(wr_return_amt as decimal(12,2)), 0.00)),sum(coalesce(cast(ws_net_paid as decimal(12,2)), 0.00)),item,return_ratio,currency_ratio,sum,sum,sum,isEmpty,sum,isEmpty] + HashAggregate [ws_item_sk,sum,sum,sum,isEmpty,sum,isEmpty] [sum(coalesce(wr_return_quantity, 0)),sum(coalesce(ws_quantity, 0)),sum(coalesce(cast(wr_return_amt as decimal(12,2)), 0.00)),sum(coalesce(cast(ws_net_paid as decimal(12,2)), 0.00)),item,return_ratio,currency_ratio,sum,sum,sum,isEmpty,sum,isEmpty] InputAdapter Exchange [ws_item_sk] #3 WholeStageCodegen (3) @@ -64,7 +64,7 @@ TakeOrderedAndProject [channel,return_rank,currency_rank,item,return_ratio] InputAdapter Exchange #6 WholeStageCodegen (11) - HashAggregate [cs_item_sk,sum,sum,sum,isEmpty,sum,isEmpty] [sum(cast(coalesce(cr_return_quantity, 0) as bigint)),sum(cast(coalesce(cs_quantity, 0) as bigint)),sum(coalesce(cast(cr_return_amount as decimal(12,2)), 0.00)),sum(coalesce(cast(cs_net_paid as decimal(12,2)), 0.00)),item,return_ratio,currency_ratio,sum,sum,sum,isEmpty,sum,isEmpty] + HashAggregate [cs_item_sk,sum,sum,sum,isEmpty,sum,isEmpty] [sum(coalesce(cr_return_quantity, 0)),sum(coalesce(cs_quantity, 0)),sum(coalesce(cast(cr_return_amount as decimal(12,2)), 0.00)),sum(coalesce(cast(cs_net_paid as decimal(12,2)), 0.00)),item,return_ratio,currency_ratio,sum,sum,sum,isEmpty,sum,isEmpty] InputAdapter Exchange [cs_item_sk] #7 WholeStageCodegen (10) @@ -101,7 +101,7 @@ TakeOrderedAndProject [channel,return_rank,currency_rank,item,return_ratio] InputAdapter Exchange #9 WholeStageCodegen (18) - HashAggregate [ss_item_sk,sum,sum,sum,isEmpty,sum,isEmpty] [sum(cast(coalesce(sr_return_quantity, 0) as bigint)),sum(cast(coalesce(ss_quantity, 0) as bigint)),sum(coalesce(cast(sr_return_amt as decimal(12,2)), 0.00)),sum(coalesce(cast(ss_net_paid as decimal(12,2)), 0.00)),item,return_ratio,currency_ratio,sum,sum,sum,isEmpty,sum,isEmpty] + HashAggregate [ss_item_sk,sum,sum,sum,isEmpty,sum,isEmpty] [sum(coalesce(sr_return_quantity, 0)),sum(coalesce(ss_quantity, 0)),sum(coalesce(cast(sr_return_amt as decimal(12,2)), 0.00)),sum(coalesce(cast(ss_net_paid as decimal(12,2)), 0.00)),item,return_ratio,currency_ratio,sum,sum,sum,isEmpty,sum,isEmpty] InputAdapter Exchange [ss_item_sk] #10 WholeStageCodegen (17) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q5/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q5/explain.txt index 15f0cda0b5f9f..93f0956b62ee3 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q5/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q5/explain.txt @@ -183,7 +183,7 @@ Results [5]: [s_store_id#25, sum#31, sum#32, sum#33, sum#34] (24) Exchange Input [5]: [s_store_id#25, sum#31, sum#32, sum#33, sum#34] -Arguments: hashpartitioning(s_store_id#25, 5), true, [id=#35] +Arguments: hashpartitioning(s_store_id#25, 5), ENSURE_REQUIREMENTS, [id=#35] (25) HashAggregate [codegen id : 6] Input [5]: [s_store_id#25, sum#31, sum#32, sum#33, sum#34] @@ -278,7 +278,7 @@ Results [5]: [cp_catalog_page_id#66, sum#72, sum#73, sum#74, sum#75] (45) Exchange Input [5]: [cp_catalog_page_id#66, sum#72, sum#73, sum#74, sum#75] -Arguments: hashpartitioning(cp_catalog_page_id#66, 5), true, [id=#76] +Arguments: hashpartitioning(cp_catalog_page_id#66, 5), ENSURE_REQUIREMENTS, [id=#76] (46) HashAggregate [codegen id : 12] Input [5]: [cp_catalog_page_id#66, sum#72, sum#73, sum#74, sum#75] @@ -396,7 +396,7 @@ Results [5]: [web_site_id#111, sum#117, sum#118, sum#119, sum#120] (71) Exchange Input [5]: [web_site_id#111, sum#117, sum#118, sum#119, sum#120] -Arguments: hashpartitioning(web_site_id#111, 5), true, [id=#121] +Arguments: hashpartitioning(web_site_id#111, 5), ENSURE_REQUIREMENTS, [id=#121] (72) HashAggregate [codegen id : 19] Input [5]: [web_site_id#111, sum#117, sum#118, sum#119, sum#120] @@ -420,7 +420,7 @@ Results [9]: [channel#131, id#132, spark_grouping_id#133, sum#140, isEmpty#141, (76) Exchange Input [9]: [channel#131, id#132, spark_grouping_id#133, sum#140, isEmpty#141, sum#142, isEmpty#143, sum#144, isEmpty#145] -Arguments: hashpartitioning(channel#131, id#132, spark_grouping_id#133, 5), true, [id=#146] +Arguments: hashpartitioning(channel#131, id#132, spark_grouping_id#133, 5), ENSURE_REQUIREMENTS, [id=#146] (77) HashAggregate [codegen id : 21] Input [9]: [channel#131, id#132, spark_grouping_id#133, sum#140, isEmpty#141, sum#142, isEmpty#143, sum#144, isEmpty#145] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q51.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q51.sf100/explain.txt index b391d90a36b9b..5ec5130720462 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q51.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q51.sf100/explain.txt @@ -96,7 +96,7 @@ Results [3]: [ws_item_sk#2, d_date#5, sum#9] (12) Exchange Input [3]: [ws_item_sk#2, d_date#5, sum#9] -Arguments: hashpartitioning(ws_item_sk#2, d_date#5, 5), true, [id=#10] +Arguments: hashpartitioning(ws_item_sk#2, d_date#5, 5), ENSURE_REQUIREMENTS, [id=#10] (13) HashAggregate [codegen id : 3] Input [3]: [ws_item_sk#2, d_date#5, sum#9] @@ -107,7 +107,7 @@ Results [4]: [ws_item_sk#2 AS item_sk#12, d_date#5, MakeDecimal(sum(UnscaledValu (14) Exchange Input [4]: [item_sk#12, d_date#5, _w0#13, ws_item_sk#2] -Arguments: hashpartitioning(ws_item_sk#2, 5), true, [id=#14] +Arguments: hashpartitioning(ws_item_sk#2, 5), ENSURE_REQUIREMENTS, [id=#14] (15) Sort [codegen id : 4] Input [4]: [item_sk#12, d_date#5, _w0#13, ws_item_sk#2] @@ -123,7 +123,7 @@ Input [5]: [item_sk#12, d_date#5, _w0#13, ws_item_sk#2, cume_sales#15] (18) Exchange Input [3]: [item_sk#12, d_date#5, cume_sales#15] -Arguments: hashpartitioning(item_sk#12, d_date#5, 5), true, [id=#16] +Arguments: hashpartitioning(item_sk#12, d_date#5, 5), ENSURE_REQUIREMENTS, [id=#16] (19) Sort [codegen id : 6] Input [3]: [item_sk#12, d_date#5, cume_sales#15] @@ -164,7 +164,7 @@ Results [3]: [ss_item_sk#18, d_date#21, sum#23] (27) Exchange Input [3]: [ss_item_sk#18, d_date#21, sum#23] -Arguments: hashpartitioning(ss_item_sk#18, d_date#21, 5), true, [id=#24] +Arguments: hashpartitioning(ss_item_sk#18, d_date#21, 5), ENSURE_REQUIREMENTS, [id=#24] (28) HashAggregate [codegen id : 9] Input [3]: [ss_item_sk#18, d_date#21, sum#23] @@ -175,7 +175,7 @@ Results [4]: [ss_item_sk#18 AS item_sk#26, d_date#21, MakeDecimal(sum(UnscaledVa (29) Exchange Input [4]: [item_sk#26, d_date#21, _w0#27, ss_item_sk#18] -Arguments: hashpartitioning(ss_item_sk#18, 5), true, [id=#28] +Arguments: hashpartitioning(ss_item_sk#18, 5), ENSURE_REQUIREMENTS, [id=#28] (30) Sort [codegen id : 10] Input [4]: [item_sk#26, d_date#21, _w0#27, ss_item_sk#18] @@ -191,7 +191,7 @@ Input [5]: [item_sk#26, d_date#21, _w0#27, ss_item_sk#18, cume_sales#29] (33) Exchange Input [3]: [item_sk#26, d_date#21, cume_sales#29] -Arguments: hashpartitioning(item_sk#26, d_date#21, 5), true, [id=#30] +Arguments: hashpartitioning(item_sk#26, d_date#21, 5), ENSURE_REQUIREMENTS, [id=#30] (34) Sort [codegen id : 12] Input [3]: [item_sk#26, d_date#21, cume_sales#29] @@ -208,7 +208,7 @@ Input [6]: [item_sk#12, d_date#5, cume_sales#15, item_sk#26, d_date#21, cume_sal (37) Exchange Input [4]: [item_sk#31, d_date#32, web_sales#33, store_sales#34] -Arguments: hashpartitioning(item_sk#31, 5), true, [id=#35] +Arguments: hashpartitioning(item_sk#31, 5), ENSURE_REQUIREMENTS, [id=#35] (38) Sort [codegen id : 14] Input [4]: [item_sk#31, d_date#32, web_sales#33, store_sales#34] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q51/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q51/explain.txt index b391d90a36b9b..5ec5130720462 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q51/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q51/explain.txt @@ -96,7 +96,7 @@ Results [3]: [ws_item_sk#2, d_date#5, sum#9] (12) Exchange Input [3]: [ws_item_sk#2, d_date#5, sum#9] -Arguments: hashpartitioning(ws_item_sk#2, d_date#5, 5), true, [id=#10] +Arguments: hashpartitioning(ws_item_sk#2, d_date#5, 5), ENSURE_REQUIREMENTS, [id=#10] (13) HashAggregate [codegen id : 3] Input [3]: [ws_item_sk#2, d_date#5, sum#9] @@ -107,7 +107,7 @@ Results [4]: [ws_item_sk#2 AS item_sk#12, d_date#5, MakeDecimal(sum(UnscaledValu (14) Exchange Input [4]: [item_sk#12, d_date#5, _w0#13, ws_item_sk#2] -Arguments: hashpartitioning(ws_item_sk#2, 5), true, [id=#14] +Arguments: hashpartitioning(ws_item_sk#2, 5), ENSURE_REQUIREMENTS, [id=#14] (15) Sort [codegen id : 4] Input [4]: [item_sk#12, d_date#5, _w0#13, ws_item_sk#2] @@ -123,7 +123,7 @@ Input [5]: [item_sk#12, d_date#5, _w0#13, ws_item_sk#2, cume_sales#15] (18) Exchange Input [3]: [item_sk#12, d_date#5, cume_sales#15] -Arguments: hashpartitioning(item_sk#12, d_date#5, 5), true, [id=#16] +Arguments: hashpartitioning(item_sk#12, d_date#5, 5), ENSURE_REQUIREMENTS, [id=#16] (19) Sort [codegen id : 6] Input [3]: [item_sk#12, d_date#5, cume_sales#15] @@ -164,7 +164,7 @@ Results [3]: [ss_item_sk#18, d_date#21, sum#23] (27) Exchange Input [3]: [ss_item_sk#18, d_date#21, sum#23] -Arguments: hashpartitioning(ss_item_sk#18, d_date#21, 5), true, [id=#24] +Arguments: hashpartitioning(ss_item_sk#18, d_date#21, 5), ENSURE_REQUIREMENTS, [id=#24] (28) HashAggregate [codegen id : 9] Input [3]: [ss_item_sk#18, d_date#21, sum#23] @@ -175,7 +175,7 @@ Results [4]: [ss_item_sk#18 AS item_sk#26, d_date#21, MakeDecimal(sum(UnscaledVa (29) Exchange Input [4]: [item_sk#26, d_date#21, _w0#27, ss_item_sk#18] -Arguments: hashpartitioning(ss_item_sk#18, 5), true, [id=#28] +Arguments: hashpartitioning(ss_item_sk#18, 5), ENSURE_REQUIREMENTS, [id=#28] (30) Sort [codegen id : 10] Input [4]: [item_sk#26, d_date#21, _w0#27, ss_item_sk#18] @@ -191,7 +191,7 @@ Input [5]: [item_sk#26, d_date#21, _w0#27, ss_item_sk#18, cume_sales#29] (33) Exchange Input [3]: [item_sk#26, d_date#21, cume_sales#29] -Arguments: hashpartitioning(item_sk#26, d_date#21, 5), true, [id=#30] +Arguments: hashpartitioning(item_sk#26, d_date#21, 5), ENSURE_REQUIREMENTS, [id=#30] (34) Sort [codegen id : 12] Input [3]: [item_sk#26, d_date#21, cume_sales#29] @@ -208,7 +208,7 @@ Input [6]: [item_sk#12, d_date#5, cume_sales#15, item_sk#26, d_date#21, cume_sal (37) Exchange Input [4]: [item_sk#31, d_date#32, web_sales#33, store_sales#34] -Arguments: hashpartitioning(item_sk#31, 5), true, [id=#35] +Arguments: hashpartitioning(item_sk#31, 5), ENSURE_REQUIREMENTS, [id=#35] (38) Sort [codegen id : 14] Input [4]: [item_sk#31, d_date#32, web_sales#33, store_sales#34] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q52/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q52/explain.txt index 47235253f571a..bd307375ad756 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q52/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q52/explain.txt @@ -107,7 +107,7 @@ Results [4]: [d_year#2, i_brand#10, i_brand_id#9, sum#14] (19) Exchange Input [4]: [d_year#2, i_brand#10, i_brand_id#9, sum#14] -Arguments: hashpartitioning(d_year#2, i_brand#10, i_brand_id#9, 5), true, [id=#15] +Arguments: hashpartitioning(d_year#2, i_brand#10, i_brand_id#9, 5), ENSURE_REQUIREMENTS, [id=#15] (20) HashAggregate [codegen id : 4] Input [4]: [d_year#2, i_brand#10, i_brand_id#9, sum#14] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q53.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q53.sf100/explain.txt index f8a6d7de0c4ea..34d52a349457e 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q53.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q53.sf100/explain.txt @@ -145,7 +145,7 @@ Results [3]: [i_manufact_id#5, d_qoy#19, sum#22] (25) Exchange Input [3]: [i_manufact_id#5, d_qoy#19, sum#22] -Arguments: hashpartitioning(i_manufact_id#5, d_qoy#19, 5), true, [id=#23] +Arguments: hashpartitioning(i_manufact_id#5, d_qoy#19, 5), ENSURE_REQUIREMENTS, [id=#23] (26) HashAggregate [codegen id : 5] Input [3]: [i_manufact_id#5, d_qoy#19, sum#22] @@ -156,7 +156,7 @@ Results [3]: [i_manufact_id#5, MakeDecimal(sum(UnscaledValue(ss_sales_price#14)) (27) Exchange Input [3]: [i_manufact_id#5, sum_sales#25, _w0#26] -Arguments: hashpartitioning(i_manufact_id#5, 5), true, [id=#27] +Arguments: hashpartitioning(i_manufact_id#5, 5), ENSURE_REQUIREMENTS, [id=#27] (28) Sort [codegen id : 6] Input [3]: [i_manufact_id#5, sum_sales#25, _w0#26] @@ -168,7 +168,7 @@ Arguments: [avg(_w0#26) windowspecdefinition(i_manufact_id#5, specifiedwindowfra (30) Filter [codegen id : 7] Input [4]: [i_manufact_id#5, sum_sales#25, _w0#26, avg_quarterly_sales#28] -Condition : (CASE WHEN (avg_quarterly_sales#28 > 0.000000) THEN CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#25 as decimal(22,6))) - promote_precision(cast(avg_quarterly_sales#28 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_quarterly_sales#28 as decimal(22,6)))), DecimalType(38,16), true) ELSE null END > 0.1000000000000000) +Condition : ((isnotnull(avg_quarterly_sales#28) AND (avg_quarterly_sales#28 > 0.000000)) AND (CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#25 as decimal(22,6))) - promote_precision(cast(avg_quarterly_sales#28 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_quarterly_sales#28 as decimal(22,6)))), DecimalType(38,16), true) > 0.1000000000000000)) (31) Project [codegen id : 7] Output [3]: [i_manufact_id#5, sum_sales#25, avg_quarterly_sales#28] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q53/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q53/explain.txt index 249f74e73da2b..a933d92080c68 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q53/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q53/explain.txt @@ -145,18 +145,18 @@ Results [3]: [i_manufact_id#5, d_qoy#17, sum#22] (25) Exchange Input [3]: [i_manufact_id#5, d_qoy#17, sum#22] -Arguments: hashpartitioning(i_manufact_id#5, d_qoy#17, 5), true, [id=#23] +Arguments: hashpartitioning(i_manufact_id#5, d_qoy#17, 5), ENSURE_REQUIREMENTS, [id=#23] (26) HashAggregate [codegen id : 5] Input [3]: [i_manufact_id#5, d_qoy#17, sum#22] Keys [2]: [i_manufact_id#5, d_qoy#17] Functions [1]: [sum(UnscaledValue(ss_sales_price#13))] Aggregate Attributes [1]: [sum(UnscaledValue(ss_sales_price#13))#24] -Results [3]: [i_manufact_id#5, MakeDecimal(sum(UnscaledValue(ss_sales_price#13))#24,17,2) AS sum_sales#25, MakeDecimal(sum(UnscaledValue(ss_sales_price#13))#24,17,2) AS _w0#26] +Results [3]: [i_manufact_id#5, MakeDecimal(sum(UnscaledValue(ss_sales_price#13))#24,17,2) AS sum_sales#25, cast(MakeDecimal(sum(UnscaledValue(ss_sales_price#13))#24,17,2) as bigint) AS _w0#26] (27) Exchange Input [3]: [i_manufact_id#5, sum_sales#25, _w0#26] -Arguments: hashpartitioning(i_manufact_id#5, 5), true, [id=#27] +Arguments: hashpartitioning(i_manufact_id#5, 5), ENSURE_REQUIREMENTS, [id=#27] (28) Sort [codegen id : 6] Input [3]: [i_manufact_id#5, sum_sales#25, _w0#26] @@ -168,7 +168,7 @@ Arguments: [avg(_w0#26) windowspecdefinition(i_manufact_id#5, specifiedwindowfra (30) Filter [codegen id : 7] Input [4]: [i_manufact_id#5, sum_sales#25, _w0#26, avg_quarterly_sales#28] -Condition : (CASE WHEN (avg_quarterly_sales#28 > 0.000000) THEN CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#25 as decimal(22,6))) - promote_precision(cast(avg_quarterly_sales#28 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_quarterly_sales#28 as decimal(22,6)))), DecimalType(38,16), true) ELSE null END > 0.1000000000000000) +Condition : (((isnotnull(avg_quarterly_sales#28) AND isnotnull(sum_sales#25)) AND (avg_quarterly_sales#28 > 0.0)) AND ((abs((cast(sum_sales#25 as double) - avg_quarterly_sales#28)) / avg_quarterly_sales#28) > 0.1)) (31) Project [codegen id : 7] Output [3]: [i_manufact_id#5, sum_sales#25, avg_quarterly_sales#28] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q54/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q54/explain.txt index 2e93e26056615..af3f2b1c7966d 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q54/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q54/explain.txt @@ -201,7 +201,7 @@ Results [2]: [c_customer_sk#21, c_current_addr_sk#22] (31) Exchange Input [2]: [c_customer_sk#21, c_current_addr_sk#22] -Arguments: hashpartitioning(c_customer_sk#21, c_current_addr_sk#22, 5), true, [id=#24] +Arguments: hashpartitioning(c_customer_sk#21, c_current_addr_sk#22, 5), ENSURE_REQUIREMENTS, [id=#24] (32) HashAggregate [codegen id : 11] Input [2]: [c_customer_sk#21, c_current_addr_sk#22] @@ -331,7 +331,7 @@ Results [2]: [c_customer_sk#21, sum#43] (59) Exchange Input [2]: [c_customer_sk#21, sum#43] -Arguments: hashpartitioning(c_customer_sk#21, 5), true, [id=#44] +Arguments: hashpartitioning(c_customer_sk#21, 5), ENSURE_REQUIREMENTS, [id=#44] (60) HashAggregate [codegen id : 12] Input [2]: [c_customer_sk#21, sum#43] @@ -349,7 +349,7 @@ Results [2]: [segment#46, count#48] (62) Exchange Input [2]: [segment#46, count#48] -Arguments: hashpartitioning(segment#46, 5), true, [id=#49] +Arguments: hashpartitioning(segment#46, 5), ENSURE_REQUIREMENTS, [id=#49] (63) HashAggregate [codegen id : 13] Input [2]: [segment#46, count#48] @@ -401,7 +401,7 @@ Results [1]: [(d_month_seq + 1)#53] (70) Exchange Input [1]: [(d_month_seq + 1)#53] -Arguments: hashpartitioning((d_month_seq + 1)#53, 5), true, [id=#54] +Arguments: hashpartitioning((d_month_seq + 1)#53, 5), ENSURE_REQUIREMENTS, [id=#54] (71) HashAggregate [codegen id : 2] Input [1]: [(d_month_seq + 1)#53] @@ -447,7 +447,7 @@ Results [1]: [(d_month_seq + 3)#55] (77) Exchange Input [1]: [(d_month_seq + 3)#55] -Arguments: hashpartitioning((d_month_seq + 3)#55, 5), true, [id=#56] +Arguments: hashpartitioning((d_month_seq + 3)#55, 5), ENSURE_REQUIREMENTS, [id=#56] (78) HashAggregate [codegen id : 2] Input [1]: [(d_month_seq + 3)#55] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q55/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q55/explain.txt index 99c79d2040691..a936059e5e38d 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q55/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q55/explain.txt @@ -107,7 +107,7 @@ Results [3]: [i_brand#10, i_brand_id#9, sum#14] (19) Exchange Input [3]: [i_brand#10, i_brand_id#9, sum#14] -Arguments: hashpartitioning(i_brand#10, i_brand_id#9, 5), true, [id=#15] +Arguments: hashpartitioning(i_brand#10, i_brand_id#9, 5), ENSURE_REQUIREMENTS, [id=#15] (20) HashAggregate [codegen id : 4] Input [3]: [i_brand#10, i_brand_id#9, sum#14] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q56.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q56.sf100/explain.txt index d0d64721100c3..a138bf6a0afe4 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q56.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q56.sf100/explain.txt @@ -207,7 +207,7 @@ Results [2]: [i_item_id#13, sum#19] (31) Exchange Input [2]: [i_item_id#13, sum#19] -Arguments: hashpartitioning(i_item_id#13, 5), true, [id=#20] +Arguments: hashpartitioning(i_item_id#13, 5), ENSURE_REQUIREMENTS, [id=#20] (32) HashAggregate [codegen id : 6] Input [2]: [i_item_id#13, sum#19] @@ -275,7 +275,7 @@ Results [2]: [i_item_id#13, sum#28] (46) Exchange Input [2]: [i_item_id#13, sum#28] -Arguments: hashpartitioning(i_item_id#13, 5), true, [id=#29] +Arguments: hashpartitioning(i_item_id#13, 5), ENSURE_REQUIREMENTS, [id=#29] (47) HashAggregate [codegen id : 12] Input [2]: [i_item_id#13, sum#28] @@ -343,7 +343,7 @@ Results [2]: [i_item_id#13, sum#37] (61) Exchange Input [2]: [i_item_id#13, sum#37] -Arguments: hashpartitioning(i_item_id#13, 5), true, [id=#38] +Arguments: hashpartitioning(i_item_id#13, 5), ENSURE_REQUIREMENTS, [id=#38] (62) HashAggregate [codegen id : 18] Input [2]: [i_item_id#13, sum#37] @@ -363,7 +363,7 @@ Results [3]: [i_item_id#13, sum#43, isEmpty#44] (65) Exchange Input [3]: [i_item_id#13, sum#43, isEmpty#44] -Arguments: hashpartitioning(i_item_id#13, 5), true, [id=#45] +Arguments: hashpartitioning(i_item_id#13, 5), ENSURE_REQUIREMENTS, [id=#45] (66) HashAggregate [codegen id : 20] Input [3]: [i_item_id#13, sum#43, isEmpty#44] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q56/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q56/explain.txt index d0d64721100c3..a138bf6a0afe4 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q56/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q56/explain.txt @@ -207,7 +207,7 @@ Results [2]: [i_item_id#13, sum#19] (31) Exchange Input [2]: [i_item_id#13, sum#19] -Arguments: hashpartitioning(i_item_id#13, 5), true, [id=#20] +Arguments: hashpartitioning(i_item_id#13, 5), ENSURE_REQUIREMENTS, [id=#20] (32) HashAggregate [codegen id : 6] Input [2]: [i_item_id#13, sum#19] @@ -275,7 +275,7 @@ Results [2]: [i_item_id#13, sum#28] (46) Exchange Input [2]: [i_item_id#13, sum#28] -Arguments: hashpartitioning(i_item_id#13, 5), true, [id=#29] +Arguments: hashpartitioning(i_item_id#13, 5), ENSURE_REQUIREMENTS, [id=#29] (47) HashAggregate [codegen id : 12] Input [2]: [i_item_id#13, sum#28] @@ -343,7 +343,7 @@ Results [2]: [i_item_id#13, sum#37] (61) Exchange Input [2]: [i_item_id#13, sum#37] -Arguments: hashpartitioning(i_item_id#13, 5), true, [id=#38] +Arguments: hashpartitioning(i_item_id#13, 5), ENSURE_REQUIREMENTS, [id=#38] (62) HashAggregate [codegen id : 18] Input [2]: [i_item_id#13, sum#37] @@ -363,7 +363,7 @@ Results [3]: [i_item_id#13, sum#43, isEmpty#44] (65) Exchange Input [3]: [i_item_id#13, sum#43, isEmpty#44] -Arguments: hashpartitioning(i_item_id#13, 5), true, [id=#45] +Arguments: hashpartitioning(i_item_id#13, 5), ENSURE_REQUIREMENTS, [id=#45] (66) HashAggregate [codegen id : 20] Input [3]: [i_item_id#13, sum#43, isEmpty#44] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q57.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q57.sf100/explain.txt index 9ed3db41b547c..2f7433441a697 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q57.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q57.sf100/explain.txt @@ -129,7 +129,7 @@ Input [7]: [cs_call_center_sk#2, cs_item_sk#3, cs_sales_price#4, d_year#6, d_moy (16) Exchange Input [5]: [cs_item_sk#3, cs_sales_price#4, d_year#6, d_moy#7, cc_name#10] -Arguments: hashpartitioning(cs_item_sk#3, 5), true, [id=#12] +Arguments: hashpartitioning(cs_item_sk#3, 5), ENSURE_REQUIREMENTS, [id=#12] (17) Sort [codegen id : 4] Input [5]: [cs_item_sk#3, cs_sales_price#4, d_year#6, d_moy#7, cc_name#10] @@ -151,7 +151,7 @@ Condition : ((isnotnull(i_item_sk#13) AND isnotnull(i_category#15)) AND isnotnul (21) Exchange Input [3]: [i_item_sk#13, i_brand#14, i_category#15] -Arguments: hashpartitioning(i_item_sk#13, 5), true, [id=#16] +Arguments: hashpartitioning(i_item_sk#13, 5), ENSURE_REQUIREMENTS, [id=#16] (22) Sort [codegen id : 6] Input [3]: [i_item_sk#13, i_brand#14, i_category#15] @@ -175,7 +175,7 @@ Results [6]: [i_category#15, i_brand#14, cc_name#10, d_year#6, d_moy#7, sum#18] (26) Exchange Input [6]: [i_category#15, i_brand#14, cc_name#10, d_year#6, d_moy#7, sum#18] -Arguments: hashpartitioning(i_category#15, i_brand#14, cc_name#10, d_year#6, d_moy#7, 5), true, [id=#19] +Arguments: hashpartitioning(i_category#15, i_brand#14, cc_name#10, d_year#6, d_moy#7, 5), ENSURE_REQUIREMENTS, [id=#19] (27) HashAggregate [codegen id : 8] Input [6]: [i_category#15, i_brand#14, cc_name#10, d_year#6, d_moy#7, sum#18] @@ -186,7 +186,7 @@ Results [7]: [i_category#15, i_brand#14, cc_name#10, d_year#6, d_moy#7, MakeDeci (28) Exchange Input [7]: [i_category#15, i_brand#14, cc_name#10, d_year#6, d_moy#7, sum_sales#21, _w0#22] -Arguments: hashpartitioning(i_category#15, i_brand#14, cc_name#10, d_year#6, 5), true, [id=#23] +Arguments: hashpartitioning(i_category#15, i_brand#14, cc_name#10, d_year#6, 5), ENSURE_REQUIREMENTS, [id=#23] (29) Sort [codegen id : 9] Input [7]: [i_category#15, i_brand#14, cc_name#10, d_year#6, d_moy#7, sum_sales#21, _w0#22] @@ -202,7 +202,7 @@ Input [8]: [i_category#15, i_brand#14, cc_name#10, d_year#6, d_moy#7, sum_sales# (32) Exchange Input [7]: [i_category#15, i_brand#14, cc_name#10, d_year#6, d_moy#7, sum_sales#21, avg_monthly_sales#24] -Arguments: hashpartitioning(i_category#15, i_brand#14, cc_name#10, 5), true, [id=#25] +Arguments: hashpartitioning(i_category#15, i_brand#14, cc_name#10, 5), ENSURE_REQUIREMENTS, [id=#25] (33) Sort [codegen id : 11] Input [7]: [i_category#15, i_brand#14, cc_name#10, d_year#6, d_moy#7, sum_sales#21, avg_monthly_sales#24] @@ -214,11 +214,11 @@ Arguments: [rank(d_year#6, d_moy#7) windowspecdefinition(i_category#15, i_brand# (35) Filter [codegen id : 12] Input [8]: [i_category#15, i_brand#14, cc_name#10, d_year#6, d_moy#7, sum_sales#21, avg_monthly_sales#24, rn#26] -Condition : (((((isnotnull(d_year#6) AND isnotnull(avg_monthly_sales#24)) AND (d_year#6 = 1999)) AND (avg_monthly_sales#24 > 0.000000)) AND (CASE WHEN (avg_monthly_sales#24 > 0.000000) THEN CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#21 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#24 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_monthly_sales#24 as decimal(22,6)))), DecimalType(38,16), true) ELSE null END > 0.1000000000000000)) AND isnotnull(rn#26)) +Condition : ((((((isnotnull(d_year#6) AND isnotnull(avg_monthly_sales#24)) AND (d_year#6 = 1999)) AND (avg_monthly_sales#24 > 0.000000)) AND (avg_monthly_sales#24 > 0.000000)) AND (CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#21 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#24 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_monthly_sales#24 as decimal(22,6)))), DecimalType(38,16), true) > 0.1000000000000000)) AND isnotnull(rn#26)) (36) Exchange Input [8]: [i_category#15, i_brand#14, cc_name#10, d_year#6, d_moy#7, sum_sales#21, avg_monthly_sales#24, rn#26] -Arguments: hashpartitioning(i_category#15, i_brand#14, cc_name#10, rn#26, 5), true, [id=#27] +Arguments: hashpartitioning(i_category#15, i_brand#14, cc_name#10, rn#26, 5), ENSURE_REQUIREMENTS, [id=#27] (37) Sort [codegen id : 13] Input [8]: [i_category#15, i_brand#14, cc_name#10, d_year#6, d_moy#7, sum_sales#21, avg_monthly_sales#24, rn#26] @@ -236,7 +236,7 @@ Results [6]: [i_category#28, i_brand#29, cc_name#30, d_year#31, d_moy#32, MakeDe (40) Exchange Input [6]: [i_category#28, i_brand#29, cc_name#30, d_year#31, d_moy#32, sum_sales#35] -Arguments: hashpartitioning(i_category#28, i_brand#29, cc_name#30, 5), true, [id=#36] +Arguments: hashpartitioning(i_category#28, i_brand#29, cc_name#30, 5), ENSURE_REQUIREMENTS, [id=#36] (41) Sort [codegen id : 22] Input [6]: [i_category#28, i_brand#29, cc_name#30, d_year#31, d_moy#32, sum_sales#35] @@ -256,7 +256,7 @@ Input [7]: [i_category#28, i_brand#29, cc_name#30, d_year#31, d_moy#32, sum_sale (45) Exchange Input [5]: [i_category#28, i_brand#29, cc_name#30, sum_sales#35, rn#37] -Arguments: hashpartitioning(i_category#28, i_brand#29, cc_name#30, (rn#37 + 1), 5), true, [id=#38] +Arguments: hashpartitioning(i_category#28, i_brand#29, cc_name#30, (rn#37 + 1), 5), ENSURE_REQUIREMENTS, [id=#38] (46) Sort [codegen id : 24] Input [5]: [i_category#28, i_brand#29, cc_name#30, sum_sales#35, rn#37] @@ -292,7 +292,7 @@ Input [7]: [i_category#39, i_brand#40, cc_name#41, d_year#42, d_moy#43, sum_sale (54) Exchange Input [5]: [i_category#39, i_brand#40, cc_name#41, sum_sales#44, rn#45] -Arguments: hashpartitioning(i_category#39, i_brand#40, cc_name#41, (rn#45 - 1), 5), true, [id=#46] +Arguments: hashpartitioning(i_category#39, i_brand#40, cc_name#41, (rn#45 - 1), 5), ENSURE_REQUIREMENTS, [id=#46] (55) Sort [codegen id : 36] Input [5]: [i_category#39, i_brand#40, cc_name#41, sum_sales#44, rn#45] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q57/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q57/explain.txt index 4e1123185c96c..1c274b44f66c5 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q57/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q57/explain.txt @@ -156,18 +156,18 @@ Results [6]: [i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, sum#17] (23) Exchange Input [6]: [i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, sum#17] -Arguments: hashpartitioning(i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, 5), true, [id=#18] +Arguments: hashpartitioning(i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, 5), ENSURE_REQUIREMENTS, [id=#18] (24) HashAggregate [codegen id : 5] Input [6]: [i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, sum#17] Keys [5]: [i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11] Functions [1]: [sum(UnscaledValue(cs_sales_price#7))] Aggregate Attributes [1]: [sum(UnscaledValue(cs_sales_price#7))#19] -Results [7]: [i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, MakeDecimal(sum(UnscaledValue(cs_sales_price#7))#19,17,2) AS sum_sales#20, MakeDecimal(sum(UnscaledValue(cs_sales_price#7))#19,17,2) AS _w0#21] +Results [7]: [i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, MakeDecimal(sum(UnscaledValue(cs_sales_price#7))#19,17,2) AS sum_sales#20, cast(MakeDecimal(sum(UnscaledValue(cs_sales_price#7))#19,17,2) as bigint) AS _w0#21] (25) Exchange Input [7]: [i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, sum_sales#20, _w0#21] -Arguments: hashpartitioning(i_category#3, i_brand#2, cc_name#14, d_year#10, 5), true, [id=#22] +Arguments: hashpartitioning(i_category#3, i_brand#2, cc_name#14, d_year#10, 5), ENSURE_REQUIREMENTS, [id=#22] (26) Sort [codegen id : 6] Input [7]: [i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, sum_sales#20, _w0#21] @@ -183,7 +183,7 @@ Input [8]: [i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, sum_sales# (29) Exchange Input [7]: [i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, sum_sales#20, avg_monthly_sales#23] -Arguments: hashpartitioning(i_category#3, i_brand#2, cc_name#14, 5), true, [id=#24] +Arguments: hashpartitioning(i_category#3, i_brand#2, cc_name#14, 5), ENSURE_REQUIREMENTS, [id=#24] (30) Sort [codegen id : 8] Input [7]: [i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, sum_sales#20, avg_monthly_sales#23] @@ -195,7 +195,7 @@ Arguments: [rank(d_year#10, d_moy#11) windowspecdefinition(i_category#3, i_brand (32) Filter [codegen id : 23] Input [8]: [i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, sum_sales#20, avg_monthly_sales#23, rn#25] -Condition : (((((isnotnull(d_year#10) AND isnotnull(avg_monthly_sales#23)) AND (d_year#10 = 1999)) AND (avg_monthly_sales#23 > 0.000000)) AND (CASE WHEN (avg_monthly_sales#23 > 0.000000) THEN CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#20 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#23 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_monthly_sales#23 as decimal(22,6)))), DecimalType(38,16), true) ELSE null END > 0.1000000000000000)) AND isnotnull(rn#25)) +Condition : (((((((isnotnull(d_year#10) AND isnotnull(avg_monthly_sales#23)) AND isnotnull(sum_sales#20)) AND (d_year#10 = 1999)) AND (avg_monthly_sales#23 > 0.0)) AND (avg_monthly_sales#23 > 0.0)) AND ((abs((cast(sum_sales#20 as double) - avg_monthly_sales#23)) / avg_monthly_sales#23) > 0.1)) AND isnotnull(rn#25)) (33) ReusedExchange [Reuses operator id: 23] Output [6]: [i_category#26, i_brand#27, cc_name#28, d_year#29, d_moy#30, sum#31] @@ -209,7 +209,7 @@ Results [6]: [i_category#26, i_brand#27, cc_name#28, d_year#29, d_moy#30, MakeDe (35) Exchange Input [6]: [i_category#26, i_brand#27, cc_name#28, d_year#29, d_moy#30, sum_sales#33] -Arguments: hashpartitioning(i_category#26, i_brand#27, cc_name#28, 5), true, [id=#34] +Arguments: hashpartitioning(i_category#26, i_brand#27, cc_name#28, 5), ENSURE_REQUIREMENTS, [id=#34] (36) Sort [codegen id : 14] Input [6]: [i_category#26, i_brand#27, cc_name#28, d_year#29, d_moy#30, sum_sales#33] @@ -274,5 +274,5 @@ Input [14]: [i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, sum_sales (51) TakeOrderedAndProject Input [9]: [i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, avg_monthly_sales#23, sum_sales#20, psum#45, nsum#46] -Arguments: 100, [CheckOverflow((promote_precision(cast(sum_sales#20 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#23 as decimal(22,6)))), DecimalType(22,6), true) ASC NULLS FIRST, cc_name#14 ASC NULLS FIRST], [i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, avg_monthly_sales#23, sum_sales#20, psum#45, nsum#46] +Arguments: 100, [(cast(sum_sales#20 as double) - avg_monthly_sales#23) ASC NULLS FIRST, cc_name#14 ASC NULLS FIRST], [i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, avg_monthly_sales#23, sum_sales#20, psum#45, nsum#46] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q58.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q58.sf100/explain.txt index 583dedd279e61..14ecd1b21eb03 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q58.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q58.sf100/explain.txt @@ -188,7 +188,7 @@ Results [2]: [i_item_id#13, sum#16] (24) Exchange Input [2]: [i_item_id#13, sum#16] -Arguments: hashpartitioning(i_item_id#13, 5), true, [id=#17] +Arguments: hashpartitioning(i_item_id#13, 5), ENSURE_REQUIREMENTS, [id=#17] (25) HashAggregate [codegen id : 15] Input [2]: [i_item_id#13, sum#16] @@ -294,7 +294,7 @@ Results [2]: [i_item_id#13, sum#28] (47) Exchange Input [2]: [i_item_id#13, sum#28] -Arguments: hashpartitioning(i_item_id#13, 5), true, [id=#29] +Arguments: hashpartitioning(i_item_id#13, 5), ENSURE_REQUIREMENTS, [id=#29] (48) HashAggregate [codegen id : 9] Input [2]: [i_item_id#13, sum#28] @@ -413,7 +413,7 @@ Results [2]: [i_item_id#13, sum#41] (73) Exchange Input [2]: [i_item_id#13, sum#41] -Arguments: hashpartitioning(i_item_id#13, 5), true, [id=#42] +Arguments: hashpartitioning(i_item_id#13, 5), ENSURE_REQUIREMENTS, [id=#42] (74) HashAggregate [codegen id : 14] Input [2]: [i_item_id#13, sum#41] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q58/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q58/explain.txt index 40a6836aedae6..dfc411d973426 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q58/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q58/explain.txt @@ -188,7 +188,7 @@ Results [2]: [i_item_id#5, sum#16] (24) Exchange Input [2]: [i_item_id#5, sum#16] -Arguments: hashpartitioning(i_item_id#5, 5), true, [id=#17] +Arguments: hashpartitioning(i_item_id#5, 5), ENSURE_REQUIREMENTS, [id=#17] (25) HashAggregate [codegen id : 15] Input [2]: [i_item_id#5, sum#16] @@ -294,7 +294,7 @@ Results [2]: [i_item_id#5, sum#28] (47) Exchange Input [2]: [i_item_id#5, sum#28] -Arguments: hashpartitioning(i_item_id#5, 5), true, [id=#29] +Arguments: hashpartitioning(i_item_id#5, 5), ENSURE_REQUIREMENTS, [id=#29] (48) HashAggregate [codegen id : 9] Input [2]: [i_item_id#5, sum#28] @@ -413,7 +413,7 @@ Results [2]: [i_item_id#5, sum#41] (73) Exchange Input [2]: [i_item_id#5, sum#41] -Arguments: hashpartitioning(i_item_id#5, 5), true, [id=#42] +Arguments: hashpartitioning(i_item_id#5, 5), ENSURE_REQUIREMENTS, [id=#42] (74) HashAggregate [codegen id : 14] Input [2]: [i_item_id#5, sum#41] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q59.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q59.sf100/explain.txt index 6edd0e4b0c159..dc93e85549f99 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q59.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q59.sf100/explain.txt @@ -95,7 +95,7 @@ Results [9]: [d_week_seq#5, ss_store_sk#2, sum#15, sum#16, sum#17, sum#18, sum#1 (11) Exchange Input [9]: [d_week_seq#5, ss_store_sk#2, sum#15, sum#16, sum#17, sum#18, sum#19, sum#20, sum#21] -Arguments: hashpartitioning(d_week_seq#5, ss_store_sk#2, 5), true, [id=#22] +Arguments: hashpartitioning(d_week_seq#5, ss_store_sk#2, 5), ENSURE_REQUIREMENTS, [id=#22] (12) HashAggregate [codegen id : 10] Input [9]: [d_week_seq#5, ss_store_sk#2, sum#15, sum#16, sum#17, sum#18, sum#19, sum#20, sum#21] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q59/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q59/explain.txt index 6edd0e4b0c159..dc93e85549f99 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q59/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q59/explain.txt @@ -95,7 +95,7 @@ Results [9]: [d_week_seq#5, ss_store_sk#2, sum#15, sum#16, sum#17, sum#18, sum#1 (11) Exchange Input [9]: [d_week_seq#5, ss_store_sk#2, sum#15, sum#16, sum#17, sum#18, sum#19, sum#20, sum#21] -Arguments: hashpartitioning(d_week_seq#5, ss_store_sk#2, 5), true, [id=#22] +Arguments: hashpartitioning(d_week_seq#5, ss_store_sk#2, 5), ENSURE_REQUIREMENTS, [id=#22] (12) HashAggregate [codegen id : 10] Input [9]: [d_week_seq#5, ss_store_sk#2, sum#15, sum#16, sum#17, sum#18, sum#19, sum#20, sum#21] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q6.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q6.sf100/explain.txt index 675cff99ad729..307c875661807 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q6.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q6.sf100/explain.txt @@ -102,7 +102,7 @@ Results [3]: [i_category#6, sum#9, count#10] (11) Exchange Input [3]: [i_category#6, sum#9, count#10] -Arguments: hashpartitioning(i_category#6, 5), true, [id=#11] +Arguments: hashpartitioning(i_category#6, 5), ENSURE_REQUIREMENTS, [id=#11] (12) HashAggregate [codegen id : 2] Input [3]: [i_category#6, sum#9, count#10] @@ -174,7 +174,7 @@ Input [3]: [ss_sold_date_sk#1, ss_customer_sk#3, d_date_sk#17] (27) Exchange Input [1]: [ss_customer_sk#3] -Arguments: hashpartitioning(ss_customer_sk#3, 5), true, [id=#22] +Arguments: hashpartitioning(ss_customer_sk#3, 5), ENSURE_REQUIREMENTS, [id=#22] (28) Sort [codegen id : 6] Input [1]: [ss_customer_sk#3] @@ -196,7 +196,7 @@ Condition : isnotnull(ca_address_sk#23) (32) Exchange Input [2]: [ca_address_sk#23, ca_state#24] -Arguments: hashpartitioning(ca_address_sk#23, 5), true, [id=#25] +Arguments: hashpartitioning(ca_address_sk#23, 5), ENSURE_REQUIREMENTS, [id=#25] (33) Sort [codegen id : 8] Input [2]: [ca_address_sk#23, ca_state#24] @@ -218,7 +218,7 @@ Condition : (isnotnull(c_current_addr_sk#27) AND isnotnull(c_customer_sk#26)) (37) Exchange Input [2]: [c_customer_sk#26, c_current_addr_sk#27] -Arguments: hashpartitioning(c_current_addr_sk#27, 5), true, [id=#28] +Arguments: hashpartitioning(c_current_addr_sk#27, 5), ENSURE_REQUIREMENTS, [id=#28] (38) Sort [codegen id : 10] Input [2]: [c_customer_sk#26, c_current_addr_sk#27] @@ -235,7 +235,7 @@ Input [4]: [ca_address_sk#23, ca_state#24, c_customer_sk#26, c_current_addr_sk#2 (41) Exchange Input [2]: [ca_state#24, c_customer_sk#26] -Arguments: hashpartitioning(c_customer_sk#26, 5), true, [id=#29] +Arguments: hashpartitioning(c_customer_sk#26, 5), ENSURE_REQUIREMENTS, [id=#29] (42) Sort [codegen id : 12] Input [2]: [ca_state#24, c_customer_sk#26] @@ -259,7 +259,7 @@ Results [2]: [ca_state#24, count#31] (46) Exchange Input [2]: [ca_state#24, count#31] -Arguments: hashpartitioning(ca_state#24, 5), true, [id=#32] +Arguments: hashpartitioning(ca_state#24, 5), ENSURE_REQUIREMENTS, [id=#32] (47) HashAggregate [codegen id : 14] Input [2]: [ca_state#24, count#31] @@ -319,7 +319,7 @@ Results [1]: [d_month_seq#18] (56) Exchange Input [1]: [d_month_seq#18] -Arguments: hashpartitioning(d_month_seq#18, 5), true, [id=#39] +Arguments: hashpartitioning(d_month_seq#18, 5), ENSURE_REQUIREMENTS, [id=#39] (57) HashAggregate [codegen id : 2] Input [1]: [d_month_seq#18] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q6/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q6/explain.txt index 822d24b2f5939..d10ff2c9ccdbe 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q6/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q6/explain.txt @@ -181,7 +181,7 @@ Results [3]: [i_category#17, sum#20, count#21] (30) Exchange Input [3]: [i_category#17, sum#20, count#21] -Arguments: hashpartitioning(i_category#17, 5), true, [id=#22] +Arguments: hashpartitioning(i_category#17, 5), ENSURE_REQUIREMENTS, [id=#22] (31) HashAggregate [codegen id : 5] Input [3]: [i_category#17, sum#20, count#21] @@ -229,7 +229,7 @@ Results [2]: [ca_state#2, count#29] (40) Exchange Input [2]: [ca_state#2, count#29] -Arguments: hashpartitioning(ca_state#2, 5), true, [id=#30] +Arguments: hashpartitioning(ca_state#2, 5), ENSURE_REQUIREMENTS, [id=#30] (41) HashAggregate [codegen id : 8] Input [2]: [ca_state#2, count#29] @@ -289,7 +289,7 @@ Results [1]: [d_month_seq#11] (50) Exchange Input [1]: [d_month_seq#11] -Arguments: hashpartitioning(d_month_seq#11, 5), true, [id=#37] +Arguments: hashpartitioning(d_month_seq#11, 5), ENSURE_REQUIREMENTS, [id=#37] (51) HashAggregate [codegen id : 2] Input [1]: [d_month_seq#11] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q60.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q60.sf100/explain.txt index f838f8f1a18af..a904d793cc420 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q60.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q60.sf100/explain.txt @@ -207,7 +207,7 @@ Results [2]: [i_item_id#13, sum#19] (31) Exchange Input [2]: [i_item_id#13, sum#19] -Arguments: hashpartitioning(i_item_id#13, 5), true, [id=#20] +Arguments: hashpartitioning(i_item_id#13, 5), ENSURE_REQUIREMENTS, [id=#20] (32) HashAggregate [codegen id : 6] Input [2]: [i_item_id#13, sum#19] @@ -275,7 +275,7 @@ Results [2]: [i_item_id#13, sum#28] (46) Exchange Input [2]: [i_item_id#13, sum#28] -Arguments: hashpartitioning(i_item_id#13, 5), true, [id=#29] +Arguments: hashpartitioning(i_item_id#13, 5), ENSURE_REQUIREMENTS, [id=#29] (47) HashAggregate [codegen id : 12] Input [2]: [i_item_id#13, sum#28] @@ -343,7 +343,7 @@ Results [2]: [i_item_id#13, sum#37] (61) Exchange Input [2]: [i_item_id#13, sum#37] -Arguments: hashpartitioning(i_item_id#13, 5), true, [id=#38] +Arguments: hashpartitioning(i_item_id#13, 5), ENSURE_REQUIREMENTS, [id=#38] (62) HashAggregate [codegen id : 18] Input [2]: [i_item_id#13, sum#37] @@ -363,7 +363,7 @@ Results [3]: [i_item_id#13, sum#43, isEmpty#44] (65) Exchange Input [3]: [i_item_id#13, sum#43, isEmpty#44] -Arguments: hashpartitioning(i_item_id#13, 5), true, [id=#45] +Arguments: hashpartitioning(i_item_id#13, 5), ENSURE_REQUIREMENTS, [id=#45] (66) HashAggregate [codegen id : 20] Input [3]: [i_item_id#13, sum#43, isEmpty#44] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q60/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q60/explain.txt index f838f8f1a18af..a904d793cc420 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q60/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q60/explain.txt @@ -207,7 +207,7 @@ Results [2]: [i_item_id#13, sum#19] (31) Exchange Input [2]: [i_item_id#13, sum#19] -Arguments: hashpartitioning(i_item_id#13, 5), true, [id=#20] +Arguments: hashpartitioning(i_item_id#13, 5), ENSURE_REQUIREMENTS, [id=#20] (32) HashAggregate [codegen id : 6] Input [2]: [i_item_id#13, sum#19] @@ -275,7 +275,7 @@ Results [2]: [i_item_id#13, sum#28] (46) Exchange Input [2]: [i_item_id#13, sum#28] -Arguments: hashpartitioning(i_item_id#13, 5), true, [id=#29] +Arguments: hashpartitioning(i_item_id#13, 5), ENSURE_REQUIREMENTS, [id=#29] (47) HashAggregate [codegen id : 12] Input [2]: [i_item_id#13, sum#28] @@ -343,7 +343,7 @@ Results [2]: [i_item_id#13, sum#37] (61) Exchange Input [2]: [i_item_id#13, sum#37] -Arguments: hashpartitioning(i_item_id#13, 5), true, [id=#38] +Arguments: hashpartitioning(i_item_id#13, 5), ENSURE_REQUIREMENTS, [id=#38] (62) HashAggregate [codegen id : 18] Input [2]: [i_item_id#13, sum#37] @@ -363,7 +363,7 @@ Results [3]: [i_item_id#13, sum#43, isEmpty#44] (65) Exchange Input [3]: [i_item_id#13, sum#43, isEmpty#44] -Arguments: hashpartitioning(i_item_id#13, 5), true, [id=#45] +Arguments: hashpartitioning(i_item_id#13, 5), ENSURE_REQUIREMENTS, [id=#45] (66) HashAggregate [codegen id : 20] Input [3]: [i_item_id#13, sum#43, isEmpty#44] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q61.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q61.sf100/explain.txt index 5574e5b16c578..ef502f590dafe 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q61.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q61.sf100/explain.txt @@ -276,7 +276,7 @@ Results [1]: [sum#29] (46) Exchange Input [1]: [sum#29] -Arguments: SinglePartition, true, [id=#30] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#30] (47) HashAggregate [codegen id : 8] Input [1]: [sum#29] @@ -356,7 +356,7 @@ Results [1]: [sum#34] (64) Exchange Input [1]: [sum#34] -Arguments: SinglePartition, true, [id=#35] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#35] (65) HashAggregate [codegen id : 15] Input [1]: [sum#34] @@ -378,7 +378,7 @@ Input [2]: [promotions#32, total#37] (69) Exchange Input [3]: [promotions#32, total#37, (CAST((CAST(CAST(promotions AS DECIMAL(15,4)) AS DECIMAL(15,4)) / CAST(CAST(total AS DECIMAL(15,4)) AS DECIMAL(15,4))) AS DECIMAL(35,20)) * CAST(CAST(100 AS DECIMAL(3,0)) AS DECIMAL(35,20)))#39] -Arguments: rangepartitioning(promotions#32 ASC NULLS FIRST, total#37 ASC NULLS FIRST, 5), true, [id=#40] +Arguments: rangepartitioning(promotions#32 ASC NULLS FIRST, total#37 ASC NULLS FIRST, 5), ENSURE_REQUIREMENTS, [id=#40] (70) Sort [codegen id : 17] Input [3]: [promotions#32, total#37, (CAST((CAST(CAST(promotions AS DECIMAL(15,4)) AS DECIMAL(15,4)) / CAST(CAST(total AS DECIMAL(15,4)) AS DECIMAL(15,4))) AS DECIMAL(35,20)) * CAST(CAST(100 AS DECIMAL(3,0)) AS DECIMAL(35,20)))#39] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q61/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q61/explain.txt index 8025461181031..288071f4586b6 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q61/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q61/explain.txt @@ -279,7 +279,7 @@ Results [1]: [sum#29] (46) Exchange Input [1]: [sum#29] -Arguments: SinglePartition, true, [id=#30] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#30] (47) HashAggregate [codegen id : 8] Input [1]: [sum#29] @@ -371,7 +371,7 @@ Results [1]: [sum#34] (67) Exchange Input [1]: [sum#34] -Arguments: SinglePartition, true, [id=#35] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#35] (68) HashAggregate [codegen id : 15] Input [1]: [sum#34] @@ -393,7 +393,7 @@ Input [2]: [promotions#32, total#37] (72) Exchange Input [3]: [promotions#32, total#37, (CAST((CAST(CAST(promotions AS DECIMAL(15,4)) AS DECIMAL(15,4)) / CAST(CAST(total AS DECIMAL(15,4)) AS DECIMAL(15,4))) AS DECIMAL(35,20)) * CAST(CAST(100 AS DECIMAL(3,0)) AS DECIMAL(35,20)))#39] -Arguments: rangepartitioning(promotions#32 ASC NULLS FIRST, total#37 ASC NULLS FIRST, 5), true, [id=#40] +Arguments: rangepartitioning(promotions#32 ASC NULLS FIRST, total#37 ASC NULLS FIRST, 5), ENSURE_REQUIREMENTS, [id=#40] (73) Sort [codegen id : 17] Input [3]: [promotions#32, total#37, (CAST((CAST(CAST(promotions AS DECIMAL(15,4)) AS DECIMAL(15,4)) / CAST(CAST(total AS DECIMAL(15,4)) AS DECIMAL(15,4))) AS DECIMAL(35,20)) * CAST(CAST(100 AS DECIMAL(3,0)) AS DECIMAL(35,20)))#39] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q63.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q63.sf100/explain.txt index 7de8d8780ad42..3b426e2a46da7 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q63.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q63.sf100/explain.txt @@ -145,7 +145,7 @@ Results [3]: [i_manager_id#5, d_moy#19, sum#22] (25) Exchange Input [3]: [i_manager_id#5, d_moy#19, sum#22] -Arguments: hashpartitioning(i_manager_id#5, d_moy#19, 5), true, [id=#23] +Arguments: hashpartitioning(i_manager_id#5, d_moy#19, 5), ENSURE_REQUIREMENTS, [id=#23] (26) HashAggregate [codegen id : 5] Input [3]: [i_manager_id#5, d_moy#19, sum#22] @@ -156,7 +156,7 @@ Results [3]: [i_manager_id#5, MakeDecimal(sum(UnscaledValue(ss_sales_price#14))# (27) Exchange Input [3]: [i_manager_id#5, sum_sales#25, _w0#26] -Arguments: hashpartitioning(i_manager_id#5, 5), true, [id=#27] +Arguments: hashpartitioning(i_manager_id#5, 5), ENSURE_REQUIREMENTS, [id=#27] (28) Sort [codegen id : 6] Input [3]: [i_manager_id#5, sum_sales#25, _w0#26] @@ -168,7 +168,7 @@ Arguments: [avg(_w0#26) windowspecdefinition(i_manager_id#5, specifiedwindowfram (30) Filter [codegen id : 7] Input [4]: [i_manager_id#5, sum_sales#25, _w0#26, avg_monthly_sales#28] -Condition : (CASE WHEN (avg_monthly_sales#28 > 0.000000) THEN CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#25 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#28 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_monthly_sales#28 as decimal(22,6)))), DecimalType(38,16), true) ELSE null END > 0.1000000000000000) +Condition : ((isnotnull(avg_monthly_sales#28) AND (avg_monthly_sales#28 > 0.000000)) AND (CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#25 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#28 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_monthly_sales#28 as decimal(22,6)))), DecimalType(38,16), true) > 0.1000000000000000)) (31) Project [codegen id : 7] Output [3]: [i_manager_id#5, sum_sales#25, avg_monthly_sales#28] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q63/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q63/explain.txt index 284a9203a03f6..dc83d1b3992e1 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q63/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q63/explain.txt @@ -145,18 +145,18 @@ Results [3]: [i_manager_id#5, d_moy#17, sum#22] (25) Exchange Input [3]: [i_manager_id#5, d_moy#17, sum#22] -Arguments: hashpartitioning(i_manager_id#5, d_moy#17, 5), true, [id=#23] +Arguments: hashpartitioning(i_manager_id#5, d_moy#17, 5), ENSURE_REQUIREMENTS, [id=#23] (26) HashAggregate [codegen id : 5] Input [3]: [i_manager_id#5, d_moy#17, sum#22] Keys [2]: [i_manager_id#5, d_moy#17] Functions [1]: [sum(UnscaledValue(ss_sales_price#13))] Aggregate Attributes [1]: [sum(UnscaledValue(ss_sales_price#13))#24] -Results [3]: [i_manager_id#5, MakeDecimal(sum(UnscaledValue(ss_sales_price#13))#24,17,2) AS sum_sales#25, MakeDecimal(sum(UnscaledValue(ss_sales_price#13))#24,17,2) AS _w0#26] +Results [3]: [i_manager_id#5, MakeDecimal(sum(UnscaledValue(ss_sales_price#13))#24,17,2) AS sum_sales#25, cast(MakeDecimal(sum(UnscaledValue(ss_sales_price#13))#24,17,2) as bigint) AS _w0#26] (27) Exchange Input [3]: [i_manager_id#5, sum_sales#25, _w0#26] -Arguments: hashpartitioning(i_manager_id#5, 5), true, [id=#27] +Arguments: hashpartitioning(i_manager_id#5, 5), ENSURE_REQUIREMENTS, [id=#27] (28) Sort [codegen id : 6] Input [3]: [i_manager_id#5, sum_sales#25, _w0#26] @@ -168,7 +168,7 @@ Arguments: [avg(_w0#26) windowspecdefinition(i_manager_id#5, specifiedwindowfram (30) Filter [codegen id : 7] Input [4]: [i_manager_id#5, sum_sales#25, _w0#26, avg_monthly_sales#28] -Condition : (CASE WHEN (avg_monthly_sales#28 > 0.000000) THEN CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#25 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#28 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_monthly_sales#28 as decimal(22,6)))), DecimalType(38,16), true) ELSE null END > 0.1000000000000000) +Condition : (((isnotnull(avg_monthly_sales#28) AND isnotnull(sum_sales#25)) AND (avg_monthly_sales#28 > 0.0)) AND ((abs((cast(sum_sales#25 as double) - avg_monthly_sales#28)) / avg_monthly_sales#28) > 0.1)) (31) Project [codegen id : 7] Output [3]: [i_manager_id#5, sum_sales#25, avg_monthly_sales#28] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q64.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q64.sf100/explain.txt index d0faf9b521e7c..cb2b0d09d380b 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q64.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q64.sf100/explain.txt @@ -226,7 +226,7 @@ Condition : ((((((((isnotnull(ss_item_sk#2) AND isnotnull(ss_ticket_number#9)) A (4) Exchange Input [12]: [ss_sold_date_sk#1, ss_item_sk#2, ss_customer_sk#3, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_addr_sk#6, ss_store_sk#7, ss_promo_sk#8, ss_ticket_number#9, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12] -Arguments: hashpartitioning(cast(ss_item_sk#2 as bigint), cast(ss_ticket_number#9 as bigint), 5), true, [id=#13] +Arguments: hashpartitioning(cast(ss_item_sk#2 as bigint), cast(ss_ticket_number#9 as bigint), 5), ENSURE_REQUIREMENTS, [id=#13] (5) Sort [codegen id : 2] Input [12]: [ss_sold_date_sk#1, ss_item_sk#2, ss_customer_sk#3, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_addr_sk#6, ss_store_sk#7, ss_promo_sk#8, ss_ticket_number#9, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12] @@ -248,7 +248,7 @@ Condition : (isnotnull(sr_item_sk#14) AND isnotnull(sr_ticket_number#15)) (9) Exchange Input [2]: [sr_item_sk#14, sr_ticket_number#15] -Arguments: hashpartitioning(sr_item_sk#14, sr_ticket_number#15, 5), true, [id=#16] +Arguments: hashpartitioning(sr_item_sk#14, sr_ticket_number#15, 5), ENSURE_REQUIREMENTS, [id=#16] (10) Sort [codegen id : 4] Input [2]: [sr_item_sk#14, sr_ticket_number#15] @@ -279,7 +279,7 @@ Condition : (isnotnull(cs_item_sk#17) AND isnotnull(cs_order_number#18)) (16) Exchange Input [3]: [cs_item_sk#17, cs_order_number#18, cs_ext_list_price#19] -Arguments: hashpartitioning(cs_item_sk#17, cs_order_number#18, 5), true, [id=#20] +Arguments: hashpartitioning(cs_item_sk#17, cs_order_number#18, 5), ENSURE_REQUIREMENTS, [id=#20] (17) Sort [codegen id : 6] Input [3]: [cs_item_sk#17, cs_order_number#18, cs_ext_list_price#19] @@ -301,7 +301,7 @@ Condition : (isnotnull(cr_item_sk#21) AND isnotnull(cr_order_number#22)) (21) Exchange Input [5]: [cr_item_sk#21, cr_order_number#22, cr_refunded_cash#23, cr_reversed_charge#24, cr_store_credit#25] -Arguments: hashpartitioning(cr_item_sk#21, cr_order_number#22, 5), true, [id=#26] +Arguments: hashpartitioning(cr_item_sk#21, cr_order_number#22, 5), ENSURE_REQUIREMENTS, [id=#26] (22) Sort [codegen id : 8] Input [5]: [cr_item_sk#21, cr_order_number#22, cr_refunded_cash#23, cr_reversed_charge#24, cr_store_credit#25] @@ -325,7 +325,7 @@ Results [4]: [cs_item_sk#17, sum#30, sum#31, isEmpty#32] (26) Exchange Input [4]: [cs_item_sk#17, sum#30, sum#31, isEmpty#32] -Arguments: hashpartitioning(cs_item_sk#17, 5), true, [id=#33] +Arguments: hashpartitioning(cs_item_sk#17, 5), ENSURE_REQUIREMENTS, [id=#33] (27) HashAggregate [codegen id : 10] Input [4]: [cs_item_sk#17, sum#30, sum#31, isEmpty#32] @@ -411,7 +411,7 @@ Input [14]: [ss_item_sk#2, ss_customer_sk#3, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_ad (45) Exchange Input [12]: [ss_item_sk#2, ss_customer_sk#3, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_sk#8, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44] -Arguments: hashpartitioning(ss_customer_sk#3, 5), true, [id=#46] +Arguments: hashpartitioning(ss_customer_sk#3, 5), ENSURE_REQUIREMENTS, [id=#46] (46) Sort [codegen id : 14] Input [12]: [ss_item_sk#2, ss_customer_sk#3, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_sk#8, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44] @@ -433,7 +433,7 @@ Condition : (((((isnotnull(c_customer_sk#47) AND isnotnull(c_first_sales_date_sk (50) Exchange Input [6]: [c_customer_sk#47, c_current_cdemo_sk#48, c_current_hdemo_sk#49, c_current_addr_sk#50, c_first_shipto_date_sk#51, c_first_sales_date_sk#52] -Arguments: hashpartitioning(c_customer_sk#47, 5), true, [id=#53] +Arguments: hashpartitioning(c_customer_sk#47, 5), ENSURE_REQUIREMENTS, [id=#53] (51) Sort [codegen id : 16] Input [6]: [c_customer_sk#47, c_current_cdemo_sk#48, c_current_hdemo_sk#49, c_current_addr_sk#50, c_first_shipto_date_sk#51, c_first_sales_date_sk#52] @@ -489,7 +489,7 @@ Input [18]: [ss_item_sk#2, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_ (63) Exchange Input [16]: [ss_item_sk#2, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_sk#8, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_cdemo_sk#48, c_current_hdemo_sk#49, c_current_addr_sk#50, d_year#55, d_year#58] -Arguments: hashpartitioning(ss_cdemo_sk#4, 5), true, [id=#59] +Arguments: hashpartitioning(ss_cdemo_sk#4, 5), ENSURE_REQUIREMENTS, [id=#59] (64) Sort [codegen id : 20] Input [16]: [ss_item_sk#2, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_sk#8, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_cdemo_sk#48, c_current_hdemo_sk#49, c_current_addr_sk#50, d_year#55, d_year#58] @@ -511,7 +511,7 @@ Condition : (isnotnull(cd_demo_sk#60) AND isnotnull(cd_marital_status#61)) (68) Exchange Input [2]: [cd_demo_sk#60, cd_marital_status#61] -Arguments: hashpartitioning(cd_demo_sk#60, 5), true, [id=#62] +Arguments: hashpartitioning(cd_demo_sk#60, 5), ENSURE_REQUIREMENTS, [id=#62] (69) Sort [codegen id : 22] Input [2]: [cd_demo_sk#60, cd_marital_status#61] @@ -528,7 +528,7 @@ Input [18]: [ss_item_sk#2, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_ (72) Exchange Input [16]: [ss_item_sk#2, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_sk#8, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_cdemo_sk#48, c_current_hdemo_sk#49, c_current_addr_sk#50, d_year#55, d_year#58, cd_marital_status#61] -Arguments: hashpartitioning(c_current_cdemo_sk#48, 5), true, [id=#63] +Arguments: hashpartitioning(c_current_cdemo_sk#48, 5), ENSURE_REQUIREMENTS, [id=#63] (73) Sort [codegen id : 24] Input [16]: [ss_item_sk#2, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_sk#8, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_cdemo_sk#48, c_current_hdemo_sk#49, c_current_addr_sk#50, d_year#55, d_year#58, cd_marital_status#61] @@ -618,7 +618,7 @@ Input [15]: [ss_item_sk#2, ss_addr_sk#6, ss_wholesale_cost#10, ss_list_price#11, (93) Exchange Input [13]: [ss_item_sk#2, ss_addr_sk#6, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_addr_sk#50, d_year#55, d_year#58, hd_income_band_sk#69, hd_income_band_sk#72] -Arguments: hashpartitioning(ss_addr_sk#6, 5), true, [id=#73] +Arguments: hashpartitioning(ss_addr_sk#6, 5), ENSURE_REQUIREMENTS, [id=#73] (94) Sort [codegen id : 31] Input [13]: [ss_item_sk#2, ss_addr_sk#6, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_addr_sk#50, d_year#55, d_year#58, hd_income_band_sk#69, hd_income_band_sk#72] @@ -640,7 +640,7 @@ Condition : isnotnull(ca_address_sk#74) (98) Exchange Input [5]: [ca_address_sk#74, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78] -Arguments: hashpartitioning(ca_address_sk#74, 5), true, [id=#79] +Arguments: hashpartitioning(ca_address_sk#74, 5), ENSURE_REQUIREMENTS, [id=#79] (99) Sort [codegen id : 33] Input [5]: [ca_address_sk#74, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78] @@ -657,7 +657,7 @@ Input [18]: [ss_item_sk#2, ss_addr_sk#6, ss_wholesale_cost#10, ss_list_price#11, (102) Exchange Input [16]: [ss_item_sk#2, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_addr_sk#50, d_year#55, d_year#58, hd_income_band_sk#69, hd_income_band_sk#72, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78] -Arguments: hashpartitioning(c_current_addr_sk#50, 5), true, [id=#80] +Arguments: hashpartitioning(c_current_addr_sk#50, 5), ENSURE_REQUIREMENTS, [id=#80] (103) Sort [codegen id : 35] Input [16]: [ss_item_sk#2, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_addr_sk#50, d_year#55, d_year#58, hd_income_band_sk#69, hd_income_band_sk#72, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78] @@ -722,7 +722,7 @@ Input [19]: [ss_item_sk#2, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt Output [4]: [i_item_sk#89, i_current_price#90, i_color#91, i_product_name#92] Batched: true Location [not included in comparison]/{warehouse_dir}/item] -PushedFilters: [IsNotNull(i_current_price), In(i_color, [purple,burlywood,indian,spring,floral,medium]), GreaterThanOrEqual(i_current_price,64.00), IsNotNull(i_item_sk)] +PushedFilters: [IsNotNull(i_current_price), In(i_color, [purple,burlywood,indian,spring,floral,medium]), GreaterThanOrEqual(i_current_price,64.00), LessThanOrEqual(i_current_price,74.00), GreaterThanOrEqual(i_current_price,65.00), LessThanOrEqual(i_current_price,79.00), IsNotNull(i_item_sk)] ReadSchema: struct (118) ColumnarToRow [codegen id : 40] @@ -730,7 +730,7 @@ Input [4]: [i_item_sk#89, i_current_price#90, i_color#91, i_product_name#92] (119) Filter [codegen id : 40] Input [4]: [i_item_sk#89, i_current_price#90, i_color#91, i_product_name#92] -Condition : ((((((isnotnull(i_current_price#90) AND i_color#91 IN (purple,burlywood,indian,spring,floral,medium)) AND (i_current_price#90 >= 64.00)) AND (cast(i_current_price#90 as decimal(12,2)) <= 74.00)) AND (cast(i_current_price#90 as decimal(12,2)) >= 65.00)) AND (cast(i_current_price#90 as decimal(12,2)) <= 79.00)) AND isnotnull(i_item_sk#89)) +Condition : ((((((isnotnull(i_current_price#90) AND i_color#91 IN (purple,burlywood,indian,spring,floral,medium)) AND (i_current_price#90 >= 64.00)) AND (i_current_price#90 <= 74.00)) AND (i_current_price#90 >= 65.00)) AND (i_current_price#90 <= 79.00)) AND isnotnull(i_item_sk#89)) (120) Project [codegen id : 40] Output [2]: [i_item_sk#89, i_product_name#92] @@ -758,7 +758,7 @@ Results [19]: [i_product_name#92, i_item_sk#89, s_store_name#43, s_zip#44, ca_st (125) Exchange Input [19]: [i_product_name#92, i_item_sk#89, s_store_name#43, s_zip#44, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78, ca_street_number#82, ca_street_name#83, ca_city#84, ca_zip#85, d_year#40, d_year#55, d_year#58, count#98, sum#99, sum#100, sum#101] -Arguments: hashpartitioning(i_product_name#92, i_item_sk#89, s_store_name#43, s_zip#44, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78, ca_street_number#82, ca_street_name#83, ca_city#84, ca_zip#85, d_year#40, d_year#55, d_year#58, 5), true, [id=#102] +Arguments: hashpartitioning(i_product_name#92, i_item_sk#89, s_store_name#43, s_zip#44, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78, ca_street_number#82, ca_street_name#83, ca_city#84, ca_zip#85, d_year#40, d_year#55, d_year#58, 5), ENSURE_REQUIREMENTS, [id=#102] (126) HashAggregate [codegen id : 42] Input [19]: [i_product_name#92, i_item_sk#89, s_store_name#43, s_zip#44, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78, ca_street_number#82, ca_street_name#83, ca_city#84, ca_zip#85, d_year#40, d_year#55, d_year#58, count#98, sum#99, sum#100, sum#101] @@ -769,7 +769,7 @@ Results [17]: [i_product_name#92 AS product_name#107, i_item_sk#89 AS item_sk#10 (127) Exchange Input [17]: [product_name#107, item_sk#108, store_name#109, store_zip#110, b_street_number#111, b_streen_name#112, b_city#113, b_zip#114, c_street_number#115, c_street_name#116, c_city#117, c_zip#118, syear#119, cnt#120, s1#121, s2#122, s3#123] -Arguments: hashpartitioning(item_sk#108, store_name#109, store_zip#110, 5), true, [id=#124] +Arguments: hashpartitioning(item_sk#108, store_name#109, store_zip#110, 5), ENSURE_REQUIREMENTS, [id=#124] (128) Sort [codegen id : 43] Input [17]: [product_name#107, item_sk#108, store_name#109, store_zip#110, b_street_number#111, b_streen_name#112, b_city#113, b_zip#114, c_street_number#115, c_street_name#116, c_city#117, c_zip#118, syear#119, cnt#120, s1#121, s2#122, s3#123] @@ -851,7 +851,7 @@ Input [14]: [ss_item_sk#2, ss_customer_sk#3, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_ad (147) Exchange Input [12]: [ss_item_sk#2, ss_customer_sk#3, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_sk#8, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44] -Arguments: hashpartitioning(ss_customer_sk#3, 5), true, [id=#126] +Arguments: hashpartitioning(ss_customer_sk#3, 5), ENSURE_REQUIREMENTS, [id=#126] (148) Sort [codegen id : 57] Input [12]: [ss_item_sk#2, ss_customer_sk#3, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_sk#8, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44] @@ -899,7 +899,7 @@ Input [18]: [ss_item_sk#2, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_ (159) Exchange Input [16]: [ss_item_sk#2, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_sk#8, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_cdemo_sk#48, c_current_hdemo_sk#49, c_current_addr_sk#50, d_year#128, d_year#130] -Arguments: hashpartitioning(ss_cdemo_sk#4, 5), true, [id=#131] +Arguments: hashpartitioning(ss_cdemo_sk#4, 5), ENSURE_REQUIREMENTS, [id=#131] (160) Sort [codegen id : 63] Input [16]: [ss_item_sk#2, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_sk#8, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_cdemo_sk#48, c_current_hdemo_sk#49, c_current_addr_sk#50, d_year#128, d_year#130] @@ -923,7 +923,7 @@ Input [18]: [ss_item_sk#2, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_ (165) Exchange Input [16]: [ss_item_sk#2, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_sk#8, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_cdemo_sk#48, c_current_hdemo_sk#49, c_current_addr_sk#50, d_year#128, d_year#130, cd_marital_status#61] -Arguments: hashpartitioning(c_current_cdemo_sk#48, 5), true, [id=#132] +Arguments: hashpartitioning(c_current_cdemo_sk#48, 5), ENSURE_REQUIREMENTS, [id=#132] (166) Sort [codegen id : 67] Input [16]: [ss_item_sk#2, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_sk#8, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_cdemo_sk#48, c_current_hdemo_sk#49, c_current_addr_sk#50, d_year#128, d_year#130, cd_marital_status#61] @@ -983,7 +983,7 @@ Input [15]: [ss_item_sk#2, ss_addr_sk#6, ss_wholesale_cost#10, ss_list_price#11, (180) Exchange Input [13]: [ss_item_sk#2, ss_addr_sk#6, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_addr_sk#50, d_year#128, d_year#130, hd_income_band_sk#69, hd_income_band_sk#136] -Arguments: hashpartitioning(ss_addr_sk#6, 5), true, [id=#137] +Arguments: hashpartitioning(ss_addr_sk#6, 5), ENSURE_REQUIREMENTS, [id=#137] (181) Sort [codegen id : 74] Input [13]: [ss_item_sk#2, ss_addr_sk#6, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_addr_sk#50, d_year#128, d_year#130, hd_income_band_sk#69, hd_income_band_sk#136] @@ -1007,7 +1007,7 @@ Input [18]: [ss_item_sk#2, ss_addr_sk#6, ss_wholesale_cost#10, ss_list_price#11, (186) Exchange Input [16]: [ss_item_sk#2, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_addr_sk#50, d_year#128, d_year#130, hd_income_band_sk#69, hd_income_band_sk#136, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78] -Arguments: hashpartitioning(c_current_addr_sk#50, 5), true, [id=#138] +Arguments: hashpartitioning(c_current_addr_sk#50, 5), ENSURE_REQUIREMENTS, [id=#138] (187) Sort [codegen id : 78] Input [16]: [ss_item_sk#2, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_addr_sk#50, d_year#128, d_year#130, hd_income_band_sk#69, hd_income_band_sk#136, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78] @@ -1074,7 +1074,7 @@ Results [19]: [i_product_name#92, i_item_sk#89, s_store_name#43, s_zip#44, ca_st (202) Exchange Input [19]: [i_product_name#92, i_item_sk#89, s_store_name#43, s_zip#44, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78, ca_street_number#140, ca_street_name#141, ca_city#142, ca_zip#143, d_year#40, d_year#128, d_year#130, count#149, sum#150, sum#151, sum#152] -Arguments: hashpartitioning(i_product_name#92, i_item_sk#89, s_store_name#43, s_zip#44, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78, ca_street_number#140, ca_street_name#141, ca_city#142, ca_zip#143, d_year#40, d_year#128, d_year#130, 5), true, [id=#153] +Arguments: hashpartitioning(i_product_name#92, i_item_sk#89, s_store_name#43, s_zip#44, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78, ca_street_number#140, ca_street_name#141, ca_city#142, ca_zip#143, d_year#40, d_year#128, d_year#130, 5), ENSURE_REQUIREMENTS, [id=#153] (203) HashAggregate [codegen id : 85] Input [19]: [i_product_name#92, i_item_sk#89, s_store_name#43, s_zip#44, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78, ca_street_number#140, ca_street_name#141, ca_city#142, ca_zip#143, d_year#40, d_year#128, d_year#130, count#149, sum#150, sum#151, sum#152] @@ -1085,7 +1085,7 @@ Results [8]: [i_item_sk#89 AS item_sk#158, s_store_name#43 AS store_name#159, s_ (204) Exchange Input [8]: [item_sk#158, store_name#159, store_zip#160, syear#161, cnt#162, s1#163, s2#164, s3#165] -Arguments: hashpartitioning(item_sk#158, store_name#159, store_zip#160, 5), true, [id=#166] +Arguments: hashpartitioning(item_sk#158, store_name#159, store_zip#160, 5), ENSURE_REQUIREMENTS, [id=#166] (205) Sort [codegen id : 86] Input [8]: [item_sk#158, store_name#159, store_zip#160, syear#161, cnt#162, s1#163, s2#164, s3#165] @@ -1102,7 +1102,7 @@ Input [25]: [product_name#107, item_sk#108, store_name#109, store_zip#110, b_str (208) Exchange Input [21]: [product_name#107, store_name#109, store_zip#110, b_street_number#111, b_streen_name#112, b_city#113, b_zip#114, c_street_number#115, c_street_name#116, c_city#117, c_zip#118, syear#119, cnt#120, s1#121, s2#122, s3#123, s1#163, s2#164, s3#165, syear#161, cnt#162] -Arguments: rangepartitioning(product_name#107 ASC NULLS FIRST, store_name#109 ASC NULLS FIRST, cnt#162 ASC NULLS FIRST, 5), true, [id=#167] +Arguments: rangepartitioning(product_name#107 ASC NULLS FIRST, store_name#109 ASC NULLS FIRST, cnt#162 ASC NULLS FIRST, 5), ENSURE_REQUIREMENTS, [id=#167] (209) Sort [codegen id : 88] Input [21]: [product_name#107, store_name#109, store_zip#110, b_street_number#111, b_streen_name#112, b_city#113, b_zip#114, c_street_number#115, c_street_name#116, c_city#117, c_zip#118, syear#119, cnt#120, s1#121, s2#122, s3#123, s1#163, s2#164, s3#165, syear#161, cnt#162] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q64/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q64/explain.txt index 0e658ff99f2ed..8e1ced6dfa39c 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q64/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q64/explain.txt @@ -262,7 +262,7 @@ Results [4]: [cs_item_sk#16, sum#28, sum#29, isEmpty#30] (20) Exchange Input [4]: [cs_item_sk#16, sum#28, sum#29, isEmpty#30] -Arguments: hashpartitioning(cs_item_sk#16, 5), true, [id=#31] +Arguments: hashpartitioning(cs_item_sk#16, 5), ENSURE_REQUIREMENTS, [id=#31] (21) HashAggregate [codegen id : 4] Input [4]: [cs_item_sk#16, sum#28, sum#29, isEmpty#30] @@ -599,7 +599,7 @@ Input [19]: [ss_item_sk#2, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt Output [4]: [i_item_sk#82, i_current_price#83, i_color#84, i_product_name#85] Batched: true Location [not included in comparison]/{warehouse_dir}/item] -PushedFilters: [IsNotNull(i_current_price), In(i_color, [purple,burlywood,indian,spring,floral,medium]), GreaterThanOrEqual(i_current_price,64.00), IsNotNull(i_item_sk)] +PushedFilters: [IsNotNull(i_current_price), In(i_color, [purple,burlywood,indian,spring,floral,medium]), GreaterThanOrEqual(i_current_price,64.00), LessThanOrEqual(i_current_price,74.00), GreaterThanOrEqual(i_current_price,65.00), LessThanOrEqual(i_current_price,79.00), IsNotNull(i_item_sk)] ReadSchema: struct (97) ColumnarToRow [codegen id : 19] @@ -607,7 +607,7 @@ Input [4]: [i_item_sk#82, i_current_price#83, i_color#84, i_product_name#85] (98) Filter [codegen id : 19] Input [4]: [i_item_sk#82, i_current_price#83, i_color#84, i_product_name#85] -Condition : ((((((isnotnull(i_current_price#83) AND i_color#84 IN (purple,burlywood,indian,spring,floral,medium)) AND (i_current_price#83 >= 64.00)) AND (cast(i_current_price#83 as decimal(12,2)) <= 74.00)) AND (cast(i_current_price#83 as decimal(12,2)) >= 65.00)) AND (cast(i_current_price#83 as decimal(12,2)) <= 79.00)) AND isnotnull(i_item_sk#82)) +Condition : ((((((isnotnull(i_current_price#83) AND i_color#84 IN (purple,burlywood,indian,spring,floral,medium)) AND (i_current_price#83 >= 64.00)) AND (i_current_price#83 <= 74.00)) AND (i_current_price#83 >= 65.00)) AND (i_current_price#83 <= 79.00)) AND isnotnull(i_item_sk#82)) (99) Project [codegen id : 19] Output [2]: [i_item_sk#82, i_product_name#85] @@ -635,7 +635,7 @@ Results [19]: [i_product_name#85, i_item_sk#82, s_store_name#41, s_zip#42, ca_st (104) Exchange Input [19]: [i_product_name#85, i_item_sk#82, s_store_name#41, s_zip#42, ca_street_number#69, ca_street_name#70, ca_city#71, ca_zip#72, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78, d_year#38, d_year#52, d_year#55, count#91, sum#92, sum#93, sum#94] -Arguments: hashpartitioning(i_product_name#85, i_item_sk#82, s_store_name#41, s_zip#42, ca_street_number#69, ca_street_name#70, ca_city#71, ca_zip#72, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78, d_year#38, d_year#52, d_year#55, 5), true, [id=#95] +Arguments: hashpartitioning(i_product_name#85, i_item_sk#82, s_store_name#41, s_zip#42, ca_street_number#69, ca_street_name#70, ca_city#71, ca_zip#72, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78, d_year#38, d_year#52, d_year#55, 5), ENSURE_REQUIREMENTS, [id=#95] (105) HashAggregate [codegen id : 42] Input [19]: [i_product_name#85, i_item_sk#82, s_store_name#41, s_zip#42, ca_street_number#69, ca_street_name#70, ca_city#71, ca_zip#72, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78, d_year#38, d_year#52, d_year#55, count#91, sum#92, sum#93, sum#94] @@ -886,7 +886,7 @@ Results [19]: [i_product_name#85, i_item_sk#82, s_store_name#41, s_zip#42, ca_st (164) Exchange Input [19]: [i_product_name#85, i_item_sk#82, s_store_name#41, s_zip#42, ca_street_number#69, ca_street_name#70, ca_city#71, ca_zip#72, ca_street_number#127, ca_street_name#128, ca_city#129, ca_zip#130, d_year#38, d_year#119, d_year#121, count#136, sum#137, sum#138, sum#139] -Arguments: hashpartitioning(i_product_name#85, i_item_sk#82, s_store_name#41, s_zip#42, ca_street_number#69, ca_street_name#70, ca_city#71, ca_zip#72, ca_street_number#127, ca_street_name#128, ca_city#129, ca_zip#130, d_year#38, d_year#119, d_year#121, 5), true, [id=#140] +Arguments: hashpartitioning(i_product_name#85, i_item_sk#82, s_store_name#41, s_zip#42, ca_street_number#69, ca_street_name#70, ca_city#71, ca_zip#72, ca_street_number#127, ca_street_name#128, ca_city#129, ca_zip#130, d_year#38, d_year#119, d_year#121, 5), ENSURE_REQUIREMENTS, [id=#140] (165) HashAggregate [codegen id : 41] Input [19]: [i_product_name#85, i_item_sk#82, s_store_name#41, s_zip#42, ca_street_number#69, ca_street_name#70, ca_city#71, ca_zip#72, ca_street_number#127, ca_street_name#128, ca_city#129, ca_zip#130, d_year#38, d_year#119, d_year#121, count#136, sum#137, sum#138, sum#139] @@ -910,7 +910,7 @@ Input [25]: [product_name#100, item_sk#101, store_name#102, store_zip#103, b_str (169) Exchange Input [21]: [product_name#100, store_name#102, store_zip#103, b_street_number#104, b_streen_name#105, b_city#106, b_zip#107, c_street_number#108, c_street_name#109, c_city#110, c_zip#111, syear#112, cnt#113, s1#114, s2#115, s3#116, s1#150, s2#151, s3#152, syear#148, cnt#149] -Arguments: rangepartitioning(product_name#100 ASC NULLS FIRST, store_name#102 ASC NULLS FIRST, cnt#149 ASC NULLS FIRST, 5), true, [id=#154] +Arguments: rangepartitioning(product_name#100 ASC NULLS FIRST, store_name#102 ASC NULLS FIRST, cnt#149 ASC NULLS FIRST, 5), ENSURE_REQUIREMENTS, [id=#154] (170) Sort [codegen id : 43] Input [21]: [product_name#100, store_name#102, store_zip#103, b_street_number#104, b_streen_name#105, b_city#106, b_zip#107, c_street_number#108, c_street_name#109, c_city#110, c_zip#111, syear#112, cnt#113, s1#114, s2#115, s3#116, s1#150, s2#151, s3#152, syear#148, cnt#149] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q65.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q65.sf100/explain.txt index 24a142c70d774..485d30630584b 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q65.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q65.sf100/explain.txt @@ -100,7 +100,7 @@ Results [3]: [ss_store_sk#3, ss_item_sk#2, sum#9] (12) Exchange Input [3]: [ss_store_sk#3, ss_item_sk#2, sum#9] -Arguments: hashpartitioning(ss_store_sk#3, ss_item_sk#2, 5), true, [id=#10] +Arguments: hashpartitioning(ss_store_sk#3, ss_item_sk#2, 5), ENSURE_REQUIREMENTS, [id=#10] (13) HashAggregate [codegen id : 8] Input [3]: [ss_store_sk#3, ss_item_sk#2, sum#9] @@ -148,7 +148,7 @@ Results [3]: [ss_store_sk#15, ss_item_sk#14, sum#18] (22) Exchange Input [3]: [ss_store_sk#15, ss_item_sk#14, sum#18] -Arguments: hashpartitioning(ss_store_sk#15, ss_item_sk#14, 5), true, [id=#19] +Arguments: hashpartitioning(ss_store_sk#15, ss_item_sk#14, 5), ENSURE_REQUIREMENTS, [id=#19] (23) HashAggregate [codegen id : 5] Input [3]: [ss_store_sk#15, ss_item_sk#14, sum#18] @@ -166,7 +166,7 @@ Results [3]: [ss_store_sk#15, sum#24, count#25] (25) Exchange Input [3]: [ss_store_sk#15, sum#24, count#25] -Arguments: hashpartitioning(ss_store_sk#15, 5), true, [id=#26] +Arguments: hashpartitioning(ss_store_sk#15, 5), ENSURE_REQUIREMENTS, [id=#26] (26) HashAggregate [codegen id : 6] Input [3]: [ss_store_sk#15, sum#24, count#25] @@ -217,7 +217,7 @@ Input [5]: [ss_store_sk#3, ss_item_sk#2, revenue#12, s_store_sk#30, s_store_name (36) Exchange Input [3]: [ss_item_sk#2, revenue#12, s_store_name#31] -Arguments: hashpartitioning(ss_item_sk#2, 5), true, [id=#33] +Arguments: hashpartitioning(ss_item_sk#2, 5), ENSURE_REQUIREMENTS, [id=#33] (37) Sort [codegen id : 9] Input [3]: [ss_item_sk#2, revenue#12, s_store_name#31] @@ -239,7 +239,7 @@ Condition : isnotnull(i_item_sk#34) (41) Exchange Input [5]: [i_item_sk#34, i_item_desc#35, i_current_price#36, i_wholesale_cost#37, i_brand#38] -Arguments: hashpartitioning(i_item_sk#34, 5), true, [id=#39] +Arguments: hashpartitioning(i_item_sk#34, 5), ENSURE_REQUIREMENTS, [id=#39] (42) Sort [codegen id : 11] Input [5]: [i_item_sk#34, i_item_desc#35, i_current_price#36, i_wholesale_cost#37, i_brand#38] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q65/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q65/explain.txt index ab87816b8980b..c7525f0703822 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q65/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q65/explain.txt @@ -111,7 +111,7 @@ Results [3]: [ss_store_sk#5, ss_item_sk#4, sum#11] (15) Exchange Input [3]: [ss_store_sk#5, ss_item_sk#4, sum#11] -Arguments: hashpartitioning(ss_store_sk#5, ss_item_sk#4, 5), true, [id=#12] +Arguments: hashpartitioning(ss_store_sk#5, ss_item_sk#4, 5), ENSURE_REQUIREMENTS, [id=#12] (16) HashAggregate [codegen id : 3] Input [3]: [ss_store_sk#5, ss_item_sk#4, sum#11] @@ -199,7 +199,7 @@ Results [3]: [ss_store_sk#24, ss_item_sk#23, sum#27] (34) Exchange Input [3]: [ss_store_sk#24, ss_item_sk#23, sum#27] -Arguments: hashpartitioning(ss_store_sk#24, ss_item_sk#23, 5), true, [id=#28] +Arguments: hashpartitioning(ss_store_sk#24, ss_item_sk#23, 5), ENSURE_REQUIREMENTS, [id=#28] (35) HashAggregate [codegen id : 7] Input [3]: [ss_store_sk#24, ss_item_sk#23, sum#27] @@ -217,7 +217,7 @@ Results [3]: [ss_store_sk#24, sum#33, count#34] (37) Exchange Input [3]: [ss_store_sk#24, sum#33, count#34] -Arguments: hashpartitioning(ss_store_sk#24, 5), true, [id=#35] +Arguments: hashpartitioning(ss_store_sk#24, 5), ENSURE_REQUIREMENTS, [id=#35] (38) HashAggregate [codegen id : 8] Input [3]: [ss_store_sk#24, sum#33, count#34] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q66.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q66.sf100/explain.txt index 5db04537d6371..b5dc0381f9e6c 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q66.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q66.sf100/explain.txt @@ -195,7 +195,7 @@ Results [55]: [w_warehouse_name#19, w_warehouse_sq_ft#20, w_city#21, w_county#22 (31) Exchange Input [55]: [w_warehouse_name#19, w_warehouse_sq_ft#20, w_city#21, w_county#22, w_state#23, w_country#24, d_year#15, sum#74, isEmpty#75, sum#76, isEmpty#77, sum#78, isEmpty#79, sum#80, isEmpty#81, sum#82, isEmpty#83, sum#84, isEmpty#85, sum#86, isEmpty#87, sum#88, isEmpty#89, sum#90, isEmpty#91, sum#92, isEmpty#93, sum#94, isEmpty#95, sum#96, isEmpty#97, sum#98, isEmpty#99, sum#100, isEmpty#101, sum#102, isEmpty#103, sum#104, isEmpty#105, sum#106, isEmpty#107, sum#108, isEmpty#109, sum#110, isEmpty#111, sum#112, isEmpty#113, sum#114, isEmpty#115, sum#116, isEmpty#117, sum#118, isEmpty#119, sum#120, isEmpty#121] -Arguments: hashpartitioning(w_warehouse_name#19, w_warehouse_sq_ft#20, w_city#21, w_county#22, w_state#23, w_country#24, d_year#15, 5), true, [id=#122] +Arguments: hashpartitioning(w_warehouse_name#19, w_warehouse_sq_ft#20, w_city#21, w_county#22, w_state#23, w_country#24, d_year#15, 5), ENSURE_REQUIREMENTS, [id=#122] (32) HashAggregate [codegen id : 6] Input [55]: [w_warehouse_name#19, w_warehouse_sq_ft#20, w_city#21, w_county#22, w_state#23, w_country#24, d_year#15, sum#74, isEmpty#75, sum#76, isEmpty#77, sum#78, isEmpty#79, sum#80, isEmpty#81, sum#82, isEmpty#83, sum#84, isEmpty#85, sum#86, isEmpty#87, sum#88, isEmpty#89, sum#90, isEmpty#91, sum#92, isEmpty#93, sum#94, isEmpty#95, sum#96, isEmpty#97, sum#98, isEmpty#99, sum#100, isEmpty#101, sum#102, isEmpty#103, sum#104, isEmpty#105, sum#106, isEmpty#107, sum#108, isEmpty#109, sum#110, isEmpty#111, sum#112, isEmpty#113, sum#114, isEmpty#115, sum#116, isEmpty#117, sum#118, isEmpty#119, sum#120, isEmpty#121] @@ -275,7 +275,7 @@ Results [55]: [w_warehouse_name#19, w_warehouse_sq_ft#20, w_city#21, w_county#22 (49) Exchange Input [55]: [w_warehouse_name#19, w_warehouse_sq_ft#20, w_city#21, w_county#22, w_state#23, w_country#24, d_year#15, sum#228, isEmpty#229, sum#230, isEmpty#231, sum#232, isEmpty#233, sum#234, isEmpty#235, sum#236, isEmpty#237, sum#238, isEmpty#239, sum#240, isEmpty#241, sum#242, isEmpty#243, sum#244, isEmpty#245, sum#246, isEmpty#247, sum#248, isEmpty#249, sum#250, isEmpty#251, sum#252, isEmpty#253, sum#254, isEmpty#255, sum#256, isEmpty#257, sum#258, isEmpty#259, sum#260, isEmpty#261, sum#262, isEmpty#263, sum#264, isEmpty#265, sum#266, isEmpty#267, sum#268, isEmpty#269, sum#270, isEmpty#271, sum#272, isEmpty#273, sum#274, isEmpty#275] -Arguments: hashpartitioning(w_warehouse_name#19, w_warehouse_sq_ft#20, w_city#21, w_county#22, w_state#23, w_country#24, d_year#15, 5), true, [id=#276] +Arguments: hashpartitioning(w_warehouse_name#19, w_warehouse_sq_ft#20, w_city#21, w_county#22, w_state#23, w_country#24, d_year#15, 5), ENSURE_REQUIREMENTS, [id=#276] (50) HashAggregate [codegen id : 12] Input [55]: [w_warehouse_name#19, w_warehouse_sq_ft#20, w_city#21, w_county#22, w_state#23, w_country#24, d_year#15, sum#228, isEmpty#229, sum#230, isEmpty#231, sum#232, isEmpty#233, sum#234, isEmpty#235, sum#236, isEmpty#237, sum#238, isEmpty#239, sum#240, isEmpty#241, sum#242, isEmpty#243, sum#244, isEmpty#245, sum#246, isEmpty#247, sum#248, isEmpty#249, sum#250, isEmpty#251, sum#252, isEmpty#253, sum#254, isEmpty#255, sum#256, isEmpty#257, sum#258, isEmpty#259, sum#260, isEmpty#261, sum#262, isEmpty#263, sum#264, isEmpty#265, sum#266, isEmpty#267, sum#268, isEmpty#269, sum#270, isEmpty#271, sum#272, isEmpty#273, sum#274, isEmpty#275] @@ -295,7 +295,7 @@ Results [80]: [w_warehouse_name#19, w_warehouse_sq_ft#20, w_city#21, w_county#22 (53) Exchange Input [80]: [w_warehouse_name#19, w_warehouse_sq_ft#20, w_city#21, w_county#22, w_state#23, w_country#24, ship_carriers#147, year#148, sum#399, isEmpty#400, sum#401, isEmpty#402, sum#403, isEmpty#404, sum#405, isEmpty#406, sum#407, isEmpty#408, sum#409, isEmpty#410, sum#411, isEmpty#412, sum#413, isEmpty#414, sum#415, isEmpty#416, sum#417, isEmpty#418, sum#419, isEmpty#420, sum#421, isEmpty#422, sum#423, isEmpty#424, sum#425, isEmpty#426, sum#427, isEmpty#428, sum#429, isEmpty#430, sum#431, isEmpty#432, sum#433, isEmpty#434, sum#435, isEmpty#436, sum#437, isEmpty#438, sum#439, isEmpty#440, sum#441, isEmpty#442, sum#443, isEmpty#444, sum#445, isEmpty#446, sum#447, isEmpty#448, sum#449, isEmpty#450, sum#451, isEmpty#452, sum#453, isEmpty#454, sum#455, isEmpty#456, sum#457, isEmpty#458, sum#459, isEmpty#460, sum#461, isEmpty#462, sum#463, isEmpty#464, sum#465, isEmpty#466, sum#467, isEmpty#468, sum#469, isEmpty#470] -Arguments: hashpartitioning(w_warehouse_name#19, w_warehouse_sq_ft#20, w_city#21, w_county#22, w_state#23, w_country#24, ship_carriers#147, year#148, 5), true, [id=#471] +Arguments: hashpartitioning(w_warehouse_name#19, w_warehouse_sq_ft#20, w_city#21, w_county#22, w_state#23, w_country#24, ship_carriers#147, year#148, 5), ENSURE_REQUIREMENTS, [id=#471] (54) HashAggregate [codegen id : 14] Input [80]: [w_warehouse_name#19, w_warehouse_sq_ft#20, w_city#21, w_county#22, w_state#23, w_country#24, ship_carriers#147, year#148, sum#399, isEmpty#400, sum#401, isEmpty#402, sum#403, isEmpty#404, sum#405, isEmpty#406, sum#407, isEmpty#408, sum#409, isEmpty#410, sum#411, isEmpty#412, sum#413, isEmpty#414, sum#415, isEmpty#416, sum#417, isEmpty#418, sum#419, isEmpty#420, sum#421, isEmpty#422, sum#423, isEmpty#424, sum#425, isEmpty#426, sum#427, isEmpty#428, sum#429, isEmpty#430, sum#431, isEmpty#432, sum#433, isEmpty#434, sum#435, isEmpty#436, sum#437, isEmpty#438, sum#439, isEmpty#440, sum#441, isEmpty#442, sum#443, isEmpty#444, sum#445, isEmpty#446, sum#447, isEmpty#448, sum#449, isEmpty#450, sum#451, isEmpty#452, sum#453, isEmpty#454, sum#455, isEmpty#456, sum#457, isEmpty#458, sum#459, isEmpty#460, sum#461, isEmpty#462, sum#463, isEmpty#464, sum#465, isEmpty#466, sum#467, isEmpty#468, sum#469, isEmpty#470] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q66/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q66/explain.txt index fc18efd3d32c1..4b0bf80c9e44a 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q66/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q66/explain.txt @@ -195,7 +195,7 @@ Results [55]: [w_warehouse_name#9, w_warehouse_sq_ft#10, w_city#11, w_county#12, (31) Exchange Input [55]: [w_warehouse_name#9, w_warehouse_sq_ft#10, w_city#11, w_county#12, w_state#13, w_country#14, d_year#17, sum#74, isEmpty#75, sum#76, isEmpty#77, sum#78, isEmpty#79, sum#80, isEmpty#81, sum#82, isEmpty#83, sum#84, isEmpty#85, sum#86, isEmpty#87, sum#88, isEmpty#89, sum#90, isEmpty#91, sum#92, isEmpty#93, sum#94, isEmpty#95, sum#96, isEmpty#97, sum#98, isEmpty#99, sum#100, isEmpty#101, sum#102, isEmpty#103, sum#104, isEmpty#105, sum#106, isEmpty#107, sum#108, isEmpty#109, sum#110, isEmpty#111, sum#112, isEmpty#113, sum#114, isEmpty#115, sum#116, isEmpty#117, sum#118, isEmpty#119, sum#120, isEmpty#121] -Arguments: hashpartitioning(w_warehouse_name#9, w_warehouse_sq_ft#10, w_city#11, w_county#12, w_state#13, w_country#14, d_year#17, 5), true, [id=#122] +Arguments: hashpartitioning(w_warehouse_name#9, w_warehouse_sq_ft#10, w_city#11, w_county#12, w_state#13, w_country#14, d_year#17, 5), ENSURE_REQUIREMENTS, [id=#122] (32) HashAggregate [codegen id : 6] Input [55]: [w_warehouse_name#9, w_warehouse_sq_ft#10, w_city#11, w_county#12, w_state#13, w_country#14, d_year#17, sum#74, isEmpty#75, sum#76, isEmpty#77, sum#78, isEmpty#79, sum#80, isEmpty#81, sum#82, isEmpty#83, sum#84, isEmpty#85, sum#86, isEmpty#87, sum#88, isEmpty#89, sum#90, isEmpty#91, sum#92, isEmpty#93, sum#94, isEmpty#95, sum#96, isEmpty#97, sum#98, isEmpty#99, sum#100, isEmpty#101, sum#102, isEmpty#103, sum#104, isEmpty#105, sum#106, isEmpty#107, sum#108, isEmpty#109, sum#110, isEmpty#111, sum#112, isEmpty#113, sum#114, isEmpty#115, sum#116, isEmpty#117, sum#118, isEmpty#119, sum#120, isEmpty#121] @@ -275,7 +275,7 @@ Results [55]: [w_warehouse_name#9, w_warehouse_sq_ft#10, w_city#11, w_county#12, (49) Exchange Input [55]: [w_warehouse_name#9, w_warehouse_sq_ft#10, w_city#11, w_county#12, w_state#13, w_country#14, d_year#17, sum#228, isEmpty#229, sum#230, isEmpty#231, sum#232, isEmpty#233, sum#234, isEmpty#235, sum#236, isEmpty#237, sum#238, isEmpty#239, sum#240, isEmpty#241, sum#242, isEmpty#243, sum#244, isEmpty#245, sum#246, isEmpty#247, sum#248, isEmpty#249, sum#250, isEmpty#251, sum#252, isEmpty#253, sum#254, isEmpty#255, sum#256, isEmpty#257, sum#258, isEmpty#259, sum#260, isEmpty#261, sum#262, isEmpty#263, sum#264, isEmpty#265, sum#266, isEmpty#267, sum#268, isEmpty#269, sum#270, isEmpty#271, sum#272, isEmpty#273, sum#274, isEmpty#275] -Arguments: hashpartitioning(w_warehouse_name#9, w_warehouse_sq_ft#10, w_city#11, w_county#12, w_state#13, w_country#14, d_year#17, 5), true, [id=#276] +Arguments: hashpartitioning(w_warehouse_name#9, w_warehouse_sq_ft#10, w_city#11, w_county#12, w_state#13, w_country#14, d_year#17, 5), ENSURE_REQUIREMENTS, [id=#276] (50) HashAggregate [codegen id : 12] Input [55]: [w_warehouse_name#9, w_warehouse_sq_ft#10, w_city#11, w_county#12, w_state#13, w_country#14, d_year#17, sum#228, isEmpty#229, sum#230, isEmpty#231, sum#232, isEmpty#233, sum#234, isEmpty#235, sum#236, isEmpty#237, sum#238, isEmpty#239, sum#240, isEmpty#241, sum#242, isEmpty#243, sum#244, isEmpty#245, sum#246, isEmpty#247, sum#248, isEmpty#249, sum#250, isEmpty#251, sum#252, isEmpty#253, sum#254, isEmpty#255, sum#256, isEmpty#257, sum#258, isEmpty#259, sum#260, isEmpty#261, sum#262, isEmpty#263, sum#264, isEmpty#265, sum#266, isEmpty#267, sum#268, isEmpty#269, sum#270, isEmpty#271, sum#272, isEmpty#273, sum#274, isEmpty#275] @@ -295,7 +295,7 @@ Results [80]: [w_warehouse_name#9, w_warehouse_sq_ft#10, w_city#11, w_county#12, (53) Exchange Input [80]: [w_warehouse_name#9, w_warehouse_sq_ft#10, w_city#11, w_county#12, w_state#13, w_country#14, ship_carriers#147, year#148, sum#399, isEmpty#400, sum#401, isEmpty#402, sum#403, isEmpty#404, sum#405, isEmpty#406, sum#407, isEmpty#408, sum#409, isEmpty#410, sum#411, isEmpty#412, sum#413, isEmpty#414, sum#415, isEmpty#416, sum#417, isEmpty#418, sum#419, isEmpty#420, sum#421, isEmpty#422, sum#423, isEmpty#424, sum#425, isEmpty#426, sum#427, isEmpty#428, sum#429, isEmpty#430, sum#431, isEmpty#432, sum#433, isEmpty#434, sum#435, isEmpty#436, sum#437, isEmpty#438, sum#439, isEmpty#440, sum#441, isEmpty#442, sum#443, isEmpty#444, sum#445, isEmpty#446, sum#447, isEmpty#448, sum#449, isEmpty#450, sum#451, isEmpty#452, sum#453, isEmpty#454, sum#455, isEmpty#456, sum#457, isEmpty#458, sum#459, isEmpty#460, sum#461, isEmpty#462, sum#463, isEmpty#464, sum#465, isEmpty#466, sum#467, isEmpty#468, sum#469, isEmpty#470] -Arguments: hashpartitioning(w_warehouse_name#9, w_warehouse_sq_ft#10, w_city#11, w_county#12, w_state#13, w_country#14, ship_carriers#147, year#148, 5), true, [id=#471] +Arguments: hashpartitioning(w_warehouse_name#9, w_warehouse_sq_ft#10, w_city#11, w_county#12, w_state#13, w_country#14, ship_carriers#147, year#148, 5), ENSURE_REQUIREMENTS, [id=#471] (54) HashAggregate [codegen id : 14] Input [80]: [w_warehouse_name#9, w_warehouse_sq_ft#10, w_city#11, w_county#12, w_state#13, w_country#14, ship_carriers#147, year#148, sum#399, isEmpty#400, sum#401, isEmpty#402, sum#403, isEmpty#404, sum#405, isEmpty#406, sum#407, isEmpty#408, sum#409, isEmpty#410, sum#411, isEmpty#412, sum#413, isEmpty#414, sum#415, isEmpty#416, sum#417, isEmpty#418, sum#419, isEmpty#420, sum#421, isEmpty#422, sum#423, isEmpty#424, sum#425, isEmpty#426, sum#427, isEmpty#428, sum#429, isEmpty#430, sum#431, isEmpty#432, sum#433, isEmpty#434, sum#435, isEmpty#436, sum#437, isEmpty#438, sum#439, isEmpty#440, sum#441, isEmpty#442, sum#443, isEmpty#444, sum#445, isEmpty#446, sum#447, isEmpty#448, sum#449, isEmpty#450, sum#451, isEmpty#452, sum#453, isEmpty#454, sum#455, isEmpty#456, sum#457, isEmpty#458, sum#459, isEmpty#460, sum#461, isEmpty#462, sum#463, isEmpty#464, sum#465, isEmpty#466, sum#467, isEmpty#468, sum#469, isEmpty#470] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q67.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q67.sf100/explain.txt index 0ba0d4c16f75a..b1b49e99ecee2 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q67.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q67.sf100/explain.txt @@ -109,7 +109,7 @@ Input [9]: [ss_item_sk#2, ss_store_sk#3, ss_quantity#4, ss_sales_price#5, d_year (17) Exchange Input [7]: [ss_item_sk#2, ss_quantity#4, ss_sales_price#5, d_year#8, d_moy#9, d_qoy#10, s_store_id#13] -Arguments: hashpartitioning(ss_item_sk#2, 5), true, [id=#15] +Arguments: hashpartitioning(ss_item_sk#2, 5), ENSURE_REQUIREMENTS, [id=#15] (18) Sort [codegen id : 4] Input [7]: [ss_item_sk#2, ss_quantity#4, ss_sales_price#5, d_year#8, d_moy#9, d_qoy#10, s_store_id#13] @@ -131,7 +131,7 @@ Condition : isnotnull(i_item_sk#16) (22) Exchange Input [5]: [i_item_sk#16, i_brand#17, i_class#18, i_category#19, i_product_name#20] -Arguments: hashpartitioning(i_item_sk#16, 5), true, [id=#21] +Arguments: hashpartitioning(i_item_sk#16, 5), ENSURE_REQUIREMENTS, [id=#21] (23) Sort [codegen id : 6] Input [5]: [i_item_sk#16, i_brand#17, i_class#18, i_category#19, i_product_name#20] @@ -159,7 +159,7 @@ Results [11]: [i_category#22, i_class#23, i_brand#24, i_product_name#25, d_year# (28) Exchange Input [11]: [i_category#22, i_class#23, i_brand#24, i_product_name#25, d_year#26, d_qoy#27, d_moy#28, s_store_id#29, spark_grouping_id#30, sum#33, isEmpty#34] -Arguments: hashpartitioning(i_category#22, i_class#23, i_brand#24, i_product_name#25, d_year#26, d_qoy#27, d_moy#28, s_store_id#29, spark_grouping_id#30, 5), true, [id=#35] +Arguments: hashpartitioning(i_category#22, i_class#23, i_brand#24, i_product_name#25, d_year#26, d_qoy#27, d_moy#28, s_store_id#29, spark_grouping_id#30, 5), ENSURE_REQUIREMENTS, [id=#35] (29) HashAggregate [codegen id : 8] Input [11]: [i_category#22, i_class#23, i_brand#24, i_product_name#25, d_year#26, d_qoy#27, d_moy#28, s_store_id#29, spark_grouping_id#30, sum#33, isEmpty#34] @@ -170,7 +170,7 @@ Results [9]: [i_category#22, i_class#23, i_brand#24, i_product_name#25, d_year#2 (30) Exchange Input [9]: [i_category#22, i_class#23, i_brand#24, i_product_name#25, d_year#26, d_qoy#27, d_moy#28, s_store_id#29, sumsales#37] -Arguments: hashpartitioning(i_category#22, 5), true, [id=#38] +Arguments: hashpartitioning(i_category#22, 5), ENSURE_REQUIREMENTS, [id=#38] (31) Sort [codegen id : 9] Input [9]: [i_category#22, i_class#23, i_brand#24, i_product_name#25, d_year#26, d_qoy#27, d_moy#28, s_store_id#29, sumsales#37] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q67/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q67/explain.txt index ae133938ba32f..df4b8b2d3b566 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q67/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q67/explain.txt @@ -144,7 +144,7 @@ Results [11]: [i_category#21, i_class#22, i_brand#23, i_product_name#24, d_year# (25) Exchange Input [11]: [i_category#21, i_class#22, i_brand#23, i_product_name#24, d_year#25, d_qoy#26, d_moy#27, s_store_id#28, spark_grouping_id#29, sum#32, isEmpty#33] -Arguments: hashpartitioning(i_category#21, i_class#22, i_brand#23, i_product_name#24, d_year#25, d_qoy#26, d_moy#27, s_store_id#28, spark_grouping_id#29, 5), true, [id=#34] +Arguments: hashpartitioning(i_category#21, i_class#22, i_brand#23, i_product_name#24, d_year#25, d_qoy#26, d_moy#27, s_store_id#28, spark_grouping_id#29, 5), ENSURE_REQUIREMENTS, [id=#34] (26) HashAggregate [codegen id : 5] Input [11]: [i_category#21, i_class#22, i_brand#23, i_product_name#24, d_year#25, d_qoy#26, d_moy#27, s_store_id#28, spark_grouping_id#29, sum#32, isEmpty#33] @@ -155,7 +155,7 @@ Results [9]: [i_category#21, i_class#22, i_brand#23, i_product_name#24, d_year#2 (27) Exchange Input [9]: [i_category#21, i_class#22, i_brand#23, i_product_name#24, d_year#25, d_qoy#26, d_moy#27, s_store_id#28, sumsales#36] -Arguments: hashpartitioning(i_category#21, 5), true, [id=#37] +Arguments: hashpartitioning(i_category#21, 5), ENSURE_REQUIREMENTS, [id=#37] (28) Sort [codegen id : 6] Input [9]: [i_category#21, i_class#22, i_brand#23, i_product_name#24, d_year#25, d_qoy#26, d_moy#27, s_store_id#28, sumsales#36] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q68.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q68.sf100/explain.txt index b3dc146e26e38..359f8c13478fa 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q68.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q68.sf100/explain.txt @@ -68,7 +68,7 @@ Condition : (isnotnull(c_customer_sk#1) AND isnotnull(c_current_addr_sk#2)) (4) Exchange Input [4]: [c_customer_sk#1, c_current_addr_sk#2, c_first_name#3, c_last_name#4] -Arguments: hashpartitioning(c_current_addr_sk#2, 5), true, [id=#5] +Arguments: hashpartitioning(c_current_addr_sk#2, 5), ENSURE_REQUIREMENTS, [id=#5] (5) Sort [codegen id : 2] Input [4]: [c_customer_sk#1, c_current_addr_sk#2, c_first_name#3, c_last_name#4] @@ -90,7 +90,7 @@ Condition : (isnotnull(ca_address_sk#6) AND isnotnull(ca_city#7)) (9) Exchange Input [2]: [ca_address_sk#6, ca_city#7] -Arguments: hashpartitioning(ca_address_sk#6, 5), true, [id=#8] +Arguments: hashpartitioning(ca_address_sk#6, 5), ENSURE_REQUIREMENTS, [id=#8] (10) Sort [codegen id : 4] Input [2]: [ca_address_sk#6, ca_city#7] @@ -107,7 +107,7 @@ Input [6]: [c_customer_sk#1, c_current_addr_sk#2, c_first_name#3, c_last_name#4, (13) Exchange Input [4]: [c_customer_sk#1, c_first_name#3, c_last_name#4, ca_city#7] -Arguments: hashpartitioning(c_customer_sk#1, 5), true, [id=#9] +Arguments: hashpartitioning(c_customer_sk#1, 5), ENSURE_REQUIREMENTS, [id=#9] (14) Sort [codegen id : 6] Input [4]: [c_customer_sk#1, c_first_name#3, c_last_name#4, ca_city#7] @@ -222,7 +222,7 @@ Input [8]: [ss_customer_sk#11, ss_hdemo_sk#12, ss_addr_sk#13, ss_ticket_number#1 (39) Exchange Input [6]: [ss_customer_sk#11, ss_addr_sk#13, ss_ticket_number#15, ss_ext_sales_price#16, ss_ext_list_price#17, ss_ext_tax#18] -Arguments: hashpartitioning(ss_addr_sk#13, 5), true, [id=#30] +Arguments: hashpartitioning(ss_addr_sk#13, 5), ENSURE_REQUIREMENTS, [id=#30] (40) Sort [codegen id : 11] Input [6]: [ss_customer_sk#11, ss_addr_sk#13, ss_ticket_number#15, ss_ext_sales_price#16, ss_ext_list_price#17, ss_ext_tax#18] @@ -260,7 +260,7 @@ Results [6]: [ss_ticket_number#15, ss_customer_sk#11, ca_city#7 AS bought_city#4 (47) Exchange Input [6]: [ss_ticket_number#15, ss_customer_sk#11, bought_city#40, extended_price#41, list_price#42, extended_tax#43] -Arguments: hashpartitioning(ss_customer_sk#11, 5), true, [id=#44] +Arguments: hashpartitioning(ss_customer_sk#11, 5), ENSURE_REQUIREMENTS, [id=#44] (48) Sort [codegen id : 15] Input [6]: [ss_ticket_number#15, ss_customer_sk#11, bought_city#40, extended_price#41, list_price#42, extended_tax#43] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q68/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q68/explain.txt index d0c618bdb6f23..c32e7e98d1cf3 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q68/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q68/explain.txt @@ -187,7 +187,7 @@ Results [7]: [ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, ca_city#22, su (32) Exchange Input [7]: [ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, ca_city#22, sum#27, sum#28, sum#29] -Arguments: hashpartitioning(ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, ca_city#22, 5), true, [id=#30] +Arguments: hashpartitioning(ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, ca_city#22, 5), ENSURE_REQUIREMENTS, [id=#30] (33) HashAggregate [codegen id : 8] Input [7]: [ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, ca_city#22, sum#27, sum#28, sum#29] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q7.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q7.sf100/explain.txt index 38576c0adde4b..39003a5ad0e9c 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q7.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q7.sf100/explain.txt @@ -172,20 +172,20 @@ Input [7]: [ss_item_sk#2, ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_c (31) HashAggregate [codegen id : 5] Input [5]: [ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_coupon_amt#8, i_item_id#22] Keys [1]: [i_item_id#22] -Functions [4]: [partial_avg(cast(ss_quantity#5 as bigint)), partial_avg(UnscaledValue(ss_list_price#6)), partial_avg(UnscaledValue(ss_coupon_amt#8)), partial_avg(UnscaledValue(ss_sales_price#7))] +Functions [4]: [partial_avg(ss_quantity#5), partial_avg(UnscaledValue(ss_list_price#6)), partial_avg(UnscaledValue(ss_coupon_amt#8)), partial_avg(UnscaledValue(ss_sales_price#7))] Aggregate Attributes [8]: [sum#24, count#25, sum#26, count#27, sum#28, count#29, sum#30, count#31] Results [9]: [i_item_id#22, sum#32, count#33, sum#34, count#35, sum#36, count#37, sum#38, count#39] (32) Exchange Input [9]: [i_item_id#22, sum#32, count#33, sum#34, count#35, sum#36, count#37, sum#38, count#39] -Arguments: hashpartitioning(i_item_id#22, 5), true, [id=#40] +Arguments: hashpartitioning(i_item_id#22, 5), ENSURE_REQUIREMENTS, [id=#40] (33) HashAggregate [codegen id : 6] Input [9]: [i_item_id#22, sum#32, count#33, sum#34, count#35, sum#36, count#37, sum#38, count#39] Keys [1]: [i_item_id#22] -Functions [4]: [avg(cast(ss_quantity#5 as bigint)), avg(UnscaledValue(ss_list_price#6)), avg(UnscaledValue(ss_coupon_amt#8)), avg(UnscaledValue(ss_sales_price#7))] -Aggregate Attributes [4]: [avg(cast(ss_quantity#5 as bigint))#41, avg(UnscaledValue(ss_list_price#6))#42, avg(UnscaledValue(ss_coupon_amt#8))#43, avg(UnscaledValue(ss_sales_price#7))#44] -Results [5]: [i_item_id#22, avg(cast(ss_quantity#5 as bigint))#41 AS agg1#45, cast((avg(UnscaledValue(ss_list_price#6))#42 / 100.0) as decimal(11,6)) AS agg2#46, cast((avg(UnscaledValue(ss_coupon_amt#8))#43 / 100.0) as decimal(11,6)) AS agg3#47, cast((avg(UnscaledValue(ss_sales_price#7))#44 / 100.0) as decimal(11,6)) AS agg4#48] +Functions [4]: [avg(ss_quantity#5), avg(UnscaledValue(ss_list_price#6)), avg(UnscaledValue(ss_coupon_amt#8)), avg(UnscaledValue(ss_sales_price#7))] +Aggregate Attributes [4]: [avg(ss_quantity#5)#41, avg(UnscaledValue(ss_list_price#6))#42, avg(UnscaledValue(ss_coupon_amt#8))#43, avg(UnscaledValue(ss_sales_price#7))#44] +Results [5]: [i_item_id#22, avg(ss_quantity#5)#41 AS agg1#45, cast((avg(UnscaledValue(ss_list_price#6))#42 / 100.0) as decimal(11,6)) AS agg2#46, cast((avg(UnscaledValue(ss_coupon_amt#8))#43 / 100.0) as decimal(11,6)) AS agg3#47, cast((avg(UnscaledValue(ss_sales_price#7))#44 / 100.0) as decimal(11,6)) AS agg4#48] (34) TakeOrderedAndProject Input [5]: [i_item_id#22, agg1#45, agg2#46, agg3#47, agg4#48] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q7.sf100/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q7.sf100/simplified.txt index d78afa9979777..2ac23f3869841 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q7.sf100/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q7.sf100/simplified.txt @@ -1,6 +1,6 @@ TakeOrderedAndProject [i_item_id,agg1,agg2,agg3,agg4] WholeStageCodegen (6) - HashAggregate [i_item_id,sum,count,sum,count,sum,count,sum,count] [avg(cast(ss_quantity as bigint)),avg(UnscaledValue(ss_list_price)),avg(UnscaledValue(ss_coupon_amt)),avg(UnscaledValue(ss_sales_price)),agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] + HashAggregate [i_item_id,sum,count,sum,count,sum,count,sum,count] [avg(ss_quantity),avg(UnscaledValue(ss_list_price)),avg(UnscaledValue(ss_coupon_amt)),avg(UnscaledValue(ss_sales_price)),agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] InputAdapter Exchange [i_item_id] #1 WholeStageCodegen (5) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q7/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q7/explain.txt index 24546c68f63c6..8fd6fc838d496 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q7/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q7/explain.txt @@ -172,20 +172,20 @@ Input [7]: [ss_promo_sk#4, ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_ (31) HashAggregate [codegen id : 5] Input [5]: [ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_coupon_amt#8, i_item_id#18] Keys [1]: [i_item_id#18] -Functions [4]: [partial_avg(cast(ss_quantity#5 as bigint)), partial_avg(UnscaledValue(ss_list_price#6)), partial_avg(UnscaledValue(ss_coupon_amt#8)), partial_avg(UnscaledValue(ss_sales_price#7))] +Functions [4]: [partial_avg(ss_quantity#5), partial_avg(UnscaledValue(ss_list_price#6)), partial_avg(UnscaledValue(ss_coupon_amt#8)), partial_avg(UnscaledValue(ss_sales_price#7))] Aggregate Attributes [8]: [sum#24, count#25, sum#26, count#27, sum#28, count#29, sum#30, count#31] Results [9]: [i_item_id#18, sum#32, count#33, sum#34, count#35, sum#36, count#37, sum#38, count#39] (32) Exchange Input [9]: [i_item_id#18, sum#32, count#33, sum#34, count#35, sum#36, count#37, sum#38, count#39] -Arguments: hashpartitioning(i_item_id#18, 5), true, [id=#40] +Arguments: hashpartitioning(i_item_id#18, 5), ENSURE_REQUIREMENTS, [id=#40] (33) HashAggregate [codegen id : 6] Input [9]: [i_item_id#18, sum#32, count#33, sum#34, count#35, sum#36, count#37, sum#38, count#39] Keys [1]: [i_item_id#18] -Functions [4]: [avg(cast(ss_quantity#5 as bigint)), avg(UnscaledValue(ss_list_price#6)), avg(UnscaledValue(ss_coupon_amt#8)), avg(UnscaledValue(ss_sales_price#7))] -Aggregate Attributes [4]: [avg(cast(ss_quantity#5 as bigint))#41, avg(UnscaledValue(ss_list_price#6))#42, avg(UnscaledValue(ss_coupon_amt#8))#43, avg(UnscaledValue(ss_sales_price#7))#44] -Results [5]: [i_item_id#18, avg(cast(ss_quantity#5 as bigint))#41 AS agg1#45, cast((avg(UnscaledValue(ss_list_price#6))#42 / 100.0) as decimal(11,6)) AS agg2#46, cast((avg(UnscaledValue(ss_coupon_amt#8))#43 / 100.0) as decimal(11,6)) AS agg3#47, cast((avg(UnscaledValue(ss_sales_price#7))#44 / 100.0) as decimal(11,6)) AS agg4#48] +Functions [4]: [avg(ss_quantity#5), avg(UnscaledValue(ss_list_price#6)), avg(UnscaledValue(ss_coupon_amt#8)), avg(UnscaledValue(ss_sales_price#7))] +Aggregate Attributes [4]: [avg(ss_quantity#5)#41, avg(UnscaledValue(ss_list_price#6))#42, avg(UnscaledValue(ss_coupon_amt#8))#43, avg(UnscaledValue(ss_sales_price#7))#44] +Results [5]: [i_item_id#18, avg(ss_quantity#5)#41 AS agg1#45, cast((avg(UnscaledValue(ss_list_price#6))#42 / 100.0) as decimal(11,6)) AS agg2#46, cast((avg(UnscaledValue(ss_coupon_amt#8))#43 / 100.0) as decimal(11,6)) AS agg3#47, cast((avg(UnscaledValue(ss_sales_price#7))#44 / 100.0) as decimal(11,6)) AS agg4#48] (34) TakeOrderedAndProject Input [5]: [i_item_id#18, agg1#45, agg2#46, agg3#47, agg4#48] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q7/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q7/simplified.txt index 075c6d15c8407..306cec3a4ac8b 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q7/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q7/simplified.txt @@ -1,6 +1,6 @@ TakeOrderedAndProject [i_item_id,agg1,agg2,agg3,agg4] WholeStageCodegen (6) - HashAggregate [i_item_id,sum,count,sum,count,sum,count,sum,count] [avg(cast(ss_quantity as bigint)),avg(UnscaledValue(ss_list_price)),avg(UnscaledValue(ss_coupon_amt)),avg(UnscaledValue(ss_sales_price)),agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] + HashAggregate [i_item_id,sum,count,sum,count,sum,count,sum,count] [avg(ss_quantity),avg(UnscaledValue(ss_list_price)),avg(UnscaledValue(ss_coupon_amt)),avg(UnscaledValue(ss_sales_price)),agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] InputAdapter Exchange [i_item_id] #1 WholeStageCodegen (5) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q70.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q70.sf100/explain.txt index 00f691230ff69..9241330ad2918 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q70.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q70.sf100/explain.txt @@ -169,7 +169,7 @@ Results [2]: [s_state#9, sum#12] (27) Exchange Input [2]: [s_state#9, sum#12] -Arguments: hashpartitioning(s_state#9, 5), true, [id=#13] +Arguments: hashpartitioning(s_state#9, 5), ENSURE_REQUIREMENTS, [id=#13] (28) HashAggregate [codegen id : 5] Input [2]: [s_state#9, sum#12] @@ -180,7 +180,7 @@ Results [3]: [s_state#9 AS s_state#15, s_state#9, MakeDecimal(sum(UnscaledValue( (29) Exchange Input [3]: [s_state#15, s_state#9, _w2#16] -Arguments: hashpartitioning(s_state#9, 5), true, [id=#17] +Arguments: hashpartitioning(s_state#9, 5), ENSURE_REQUIREMENTS, [id=#17] (30) Sort [codegen id : 6] Input [3]: [s_state#15, s_state#9, _w2#16] @@ -233,18 +233,18 @@ Results [4]: [s_state#21, s_county#22, spark_grouping_id#23, sum#25] (41) Exchange Input [4]: [s_state#21, s_county#22, spark_grouping_id#23, sum#25] -Arguments: hashpartitioning(s_state#21, s_county#22, spark_grouping_id#23, 5), true, [id=#26] +Arguments: hashpartitioning(s_state#21, s_county#22, spark_grouping_id#23, 5), ENSURE_REQUIREMENTS, [id=#26] (42) HashAggregate [codegen id : 10] Input [4]: [s_state#21, s_county#22, spark_grouping_id#23, sum#25] Keys [3]: [s_state#21, s_county#22, spark_grouping_id#23] Functions [1]: [sum(UnscaledValue(ss_net_profit#3))] Aggregate Attributes [1]: [sum(UnscaledValue(ss_net_profit#3))#27] -Results [7]: [MakeDecimal(sum(UnscaledValue(ss_net_profit#3))#27,17,2) AS total_sum#28, s_state#21, s_county#22, (cast((shiftright(spark_grouping_id#23, 1) & 1) as tinyint) + cast((shiftright(spark_grouping_id#23, 0) & 1) as tinyint)) AS lochierarchy#29, (cast((shiftright(spark_grouping_id#23, 1) & 1) as tinyint) + cast((shiftright(spark_grouping_id#23, 0) & 1) as tinyint)) AS _w1#30, CASE WHEN (cast(cast((shiftright(spark_grouping_id#23, 0) & 1) as tinyint) as int) = 0) THEN s_state#21 END AS _w2#31, MakeDecimal(sum(UnscaledValue(ss_net_profit#3))#27,17,2) AS _w3#32] +Results [7]: [MakeDecimal(sum(UnscaledValue(ss_net_profit#3))#27,17,2) AS total_sum#28, s_state#21, s_county#22, (cast((shiftright(spark_grouping_id#23, 1) & 1) as tinyint) + cast((shiftright(spark_grouping_id#23, 0) & 1) as tinyint)) AS lochierarchy#29, (cast((shiftright(spark_grouping_id#23, 1) & 1) as tinyint) + cast((shiftright(spark_grouping_id#23, 0) & 1) as tinyint)) AS _w1#30, CASE WHEN (cast((shiftright(spark_grouping_id#23, 0) & 1) as tinyint) = 0) THEN s_state#21 END AS _w2#31, MakeDecimal(sum(UnscaledValue(ss_net_profit#3))#27,17,2) AS _w3#32] (43) Exchange Input [7]: [total_sum#28, s_state#21, s_county#22, lochierarchy#29, _w1#30, _w2#31, _w3#32] -Arguments: hashpartitioning(_w1#30, _w2#31, 5), true, [id=#33] +Arguments: hashpartitioning(_w1#30, _w2#31, 5), ENSURE_REQUIREMENTS, [id=#33] (44) Sort [codegen id : 11] Input [7]: [total_sum#28, s_state#21, s_county#22, lochierarchy#29, _w1#30, _w2#31, _w3#32] @@ -260,5 +260,5 @@ Input [8]: [total_sum#28, s_state#21, s_county#22, lochierarchy#29, _w1#30, _w2# (47) TakeOrderedAndProject Input [5]: [total_sum#28, s_state#21, s_county#22, lochierarchy#29, rank_within_parent#34] -Arguments: 100, [lochierarchy#29 DESC NULLS LAST, CASE WHEN (cast(lochierarchy#29 as int) = 0) THEN s_state#21 END ASC NULLS FIRST, rank_within_parent#34 ASC NULLS FIRST], [total_sum#28, s_state#21, s_county#22, lochierarchy#29, rank_within_parent#34] +Arguments: 100, [lochierarchy#29 DESC NULLS LAST, CASE WHEN (lochierarchy#29 = 0) THEN s_state#21 END ASC NULLS FIRST, rank_within_parent#34 ASC NULLS FIRST], [total_sum#28, s_state#21, s_county#22, lochierarchy#29, rank_within_parent#34] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q70/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q70/explain.txt index 05b533aa65a63..79a68c87a0f1b 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q70/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q70/explain.txt @@ -169,7 +169,7 @@ Results [2]: [s_state#9, sum#12] (27) Exchange Input [2]: [s_state#9, sum#12] -Arguments: hashpartitioning(s_state#9, 5), true, [id=#13] +Arguments: hashpartitioning(s_state#9, 5), ENSURE_REQUIREMENTS, [id=#13] (28) HashAggregate [codegen id : 5] Input [2]: [s_state#9, sum#12] @@ -180,7 +180,7 @@ Results [3]: [s_state#9 AS s_state#15, s_state#9, MakeDecimal(sum(UnscaledValue( (29) Exchange Input [3]: [s_state#15, s_state#9, _w2#16] -Arguments: hashpartitioning(s_state#9, 5), true, [id=#17] +Arguments: hashpartitioning(s_state#9, 5), ENSURE_REQUIREMENTS, [id=#17] (30) Sort [codegen id : 6] Input [3]: [s_state#15, s_state#9, _w2#16] @@ -233,18 +233,18 @@ Results [4]: [s_state#21, s_county#22, spark_grouping_id#23, sum#25] (41) Exchange Input [4]: [s_state#21, s_county#22, spark_grouping_id#23, sum#25] -Arguments: hashpartitioning(s_state#21, s_county#22, spark_grouping_id#23, 5), true, [id=#26] +Arguments: hashpartitioning(s_state#21, s_county#22, spark_grouping_id#23, 5), ENSURE_REQUIREMENTS, [id=#26] (42) HashAggregate [codegen id : 10] Input [4]: [s_state#21, s_county#22, spark_grouping_id#23, sum#25] Keys [3]: [s_state#21, s_county#22, spark_grouping_id#23] Functions [1]: [sum(UnscaledValue(ss_net_profit#3))] Aggregate Attributes [1]: [sum(UnscaledValue(ss_net_profit#3))#27] -Results [7]: [MakeDecimal(sum(UnscaledValue(ss_net_profit#3))#27,17,2) AS total_sum#28, s_state#21, s_county#22, (cast((shiftright(spark_grouping_id#23, 1) & 1) as tinyint) + cast((shiftright(spark_grouping_id#23, 0) & 1) as tinyint)) AS lochierarchy#29, (cast((shiftright(spark_grouping_id#23, 1) & 1) as tinyint) + cast((shiftright(spark_grouping_id#23, 0) & 1) as tinyint)) AS _w1#30, CASE WHEN (cast(cast((shiftright(spark_grouping_id#23, 0) & 1) as tinyint) as int) = 0) THEN s_state#21 END AS _w2#31, MakeDecimal(sum(UnscaledValue(ss_net_profit#3))#27,17,2) AS _w3#32] +Results [7]: [MakeDecimal(sum(UnscaledValue(ss_net_profit#3))#27,17,2) AS total_sum#28, s_state#21, s_county#22, (cast((shiftright(spark_grouping_id#23, 1) & 1) as tinyint) + cast((shiftright(spark_grouping_id#23, 0) & 1) as tinyint)) AS lochierarchy#29, (cast((shiftright(spark_grouping_id#23, 1) & 1) as tinyint) + cast((shiftright(spark_grouping_id#23, 0) & 1) as tinyint)) AS _w1#30, CASE WHEN (cast((shiftright(spark_grouping_id#23, 0) & 1) as tinyint) = 0) THEN s_state#21 END AS _w2#31, MakeDecimal(sum(UnscaledValue(ss_net_profit#3))#27,17,2) AS _w3#32] (43) Exchange Input [7]: [total_sum#28, s_state#21, s_county#22, lochierarchy#29, _w1#30, _w2#31, _w3#32] -Arguments: hashpartitioning(_w1#30, _w2#31, 5), true, [id=#33] +Arguments: hashpartitioning(_w1#30, _w2#31, 5), ENSURE_REQUIREMENTS, [id=#33] (44) Sort [codegen id : 11] Input [7]: [total_sum#28, s_state#21, s_county#22, lochierarchy#29, _w1#30, _w2#31, _w3#32] @@ -260,5 +260,5 @@ Input [8]: [total_sum#28, s_state#21, s_county#22, lochierarchy#29, _w1#30, _w2# (47) TakeOrderedAndProject Input [5]: [total_sum#28, s_state#21, s_county#22, lochierarchy#29, rank_within_parent#34] -Arguments: 100, [lochierarchy#29 DESC NULLS LAST, CASE WHEN (cast(lochierarchy#29 as int) = 0) THEN s_state#21 END ASC NULLS FIRST, rank_within_parent#34 ASC NULLS FIRST], [total_sum#28, s_state#21, s_county#22, lochierarchy#29, rank_within_parent#34] +Arguments: 100, [lochierarchy#29 DESC NULLS LAST, CASE WHEN (lochierarchy#29 = 0) THEN s_state#21 END ASC NULLS FIRST, rank_within_parent#34 ASC NULLS FIRST], [total_sum#28, s_state#21, s_county#22, lochierarchy#29, rank_within_parent#34] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q71.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q71.sf100/explain.txt index 9471377a18a19..5c7dd60b792ce 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q71.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q71.sf100/explain.txt @@ -213,7 +213,7 @@ Results [5]: [i_brand#3, i_brand_id#2, t_hour#32, t_minute#33, sum#37] (39) Exchange Input [5]: [i_brand#3, i_brand_id#2, t_hour#32, t_minute#33, sum#37] -Arguments: hashpartitioning(i_brand#3, i_brand_id#2, t_hour#32, t_minute#33, 5), true, [id=#38] +Arguments: hashpartitioning(i_brand#3, i_brand_id#2, t_hour#32, t_minute#33, 5), ENSURE_REQUIREMENTS, [id=#38] (40) HashAggregate [codegen id : 10] Input [5]: [i_brand#3, i_brand_id#2, t_hour#32, t_minute#33, sum#37] @@ -224,7 +224,7 @@ Results [5]: [i_brand_id#2 AS brand_id#40, i_brand#3 AS brand#41, t_hour#32, t_m (41) Exchange Input [5]: [brand_id#40, brand#41, t_hour#32, t_minute#33, ext_price#42] -Arguments: rangepartitioning(ext_price#42 DESC NULLS LAST, brand_id#40 ASC NULLS FIRST, 5), true, [id=#43] +Arguments: rangepartitioning(ext_price#42 DESC NULLS LAST, brand_id#40 ASC NULLS FIRST, 5), ENSURE_REQUIREMENTS, [id=#43] (42) Sort [codegen id : 11] Input [5]: [brand_id#40, brand#41, t_hour#32, t_minute#33, ext_price#42] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q71/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q71/explain.txt index 9471377a18a19..5c7dd60b792ce 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q71/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q71/explain.txt @@ -213,7 +213,7 @@ Results [5]: [i_brand#3, i_brand_id#2, t_hour#32, t_minute#33, sum#37] (39) Exchange Input [5]: [i_brand#3, i_brand_id#2, t_hour#32, t_minute#33, sum#37] -Arguments: hashpartitioning(i_brand#3, i_brand_id#2, t_hour#32, t_minute#33, 5), true, [id=#38] +Arguments: hashpartitioning(i_brand#3, i_brand_id#2, t_hour#32, t_minute#33, 5), ENSURE_REQUIREMENTS, [id=#38] (40) HashAggregate [codegen id : 10] Input [5]: [i_brand#3, i_brand_id#2, t_hour#32, t_minute#33, sum#37] @@ -224,7 +224,7 @@ Results [5]: [i_brand_id#2 AS brand_id#40, i_brand#3 AS brand#41, t_hour#32, t_m (41) Exchange Input [5]: [brand_id#40, brand#41, t_hour#32, t_minute#33, ext_price#42] -Arguments: rangepartitioning(ext_price#42 DESC NULLS LAST, brand_id#40 ASC NULLS FIRST, 5), true, [id=#43] +Arguments: rangepartitioning(ext_price#42 DESC NULLS LAST, brand_id#40 ASC NULLS FIRST, 5), ENSURE_REQUIREMENTS, [id=#43] (42) Sort [codegen id : 11] Input [5]: [brand_id#40, brand#41, t_hour#32, t_minute#33, ext_price#42] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q74.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q74.sf100/explain.txt index 7b55fa470c616..c2c2d10fcf0f3 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q74.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q74.sf100/explain.txt @@ -130,7 +130,7 @@ Input [5]: [ss_sold_date_sk#1, ss_customer_sk#2, ss_net_paid#3, d_date_sk#4, d_y (10) Exchange Input [3]: [ss_customer_sk#2, ss_net_paid#3, d_year#5] -Arguments: hashpartitioning(ss_customer_sk#2, 5), true, [id=#7] +Arguments: hashpartitioning(ss_customer_sk#2, 5), ENSURE_REQUIREMENTS, [id=#7] (11) Sort [codegen id : 3] Input [3]: [ss_customer_sk#2, ss_net_paid#3, d_year#5] @@ -152,7 +152,7 @@ Condition : (isnotnull(c_customer_sk#8) AND isnotnull(c_customer_id#9)) (15) Exchange Input [4]: [c_customer_sk#8, c_customer_id#9, c_first_name#10, c_last_name#11] -Arguments: hashpartitioning(c_customer_sk#8, 5), true, [id=#12] +Arguments: hashpartitioning(c_customer_sk#8, 5), ENSURE_REQUIREMENTS, [id=#12] (16) Sort [codegen id : 5] Input [4]: [c_customer_sk#8, c_customer_id#9, c_first_name#10, c_last_name#11] @@ -176,7 +176,7 @@ Results [5]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, sum#14 (20) Exchange Input [5]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, sum#14] -Arguments: hashpartitioning(c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, 5), true, [id=#15] +Arguments: hashpartitioning(c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, 5), ENSURE_REQUIREMENTS, [id=#15] (21) HashAggregate [codegen id : 7] Input [5]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, sum#14] @@ -191,7 +191,7 @@ Condition : (isnotnull(year_total#18) AND (year_total#18 > 0.00)) (23) Exchange Input [2]: [customer_id#17, year_total#18] -Arguments: hashpartitioning(customer_id#17, 5), true, [id=#19] +Arguments: hashpartitioning(customer_id#17, 5), ENSURE_REQUIREMENTS, [id=#19] (24) Sort [codegen id : 8] Input [2]: [customer_id#17, year_total#18] @@ -240,7 +240,7 @@ Input [5]: [ss_sold_date_sk#1, ss_customer_sk#2, ss_net_paid#3, d_date_sk#4, d_y (34) Exchange Input [3]: [ss_customer_sk#2, ss_net_paid#3, d_year#5] -Arguments: hashpartitioning(ss_customer_sk#2, 5), true, [id=#21] +Arguments: hashpartitioning(ss_customer_sk#2, 5), ENSURE_REQUIREMENTS, [id=#21] (35) Sort [codegen id : 11] Input [3]: [ss_customer_sk#2, ss_net_paid#3, d_year#5] @@ -271,7 +271,7 @@ Results [5]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, sum#23 (41) Exchange Input [5]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, sum#23] -Arguments: hashpartitioning(c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, 5), true, [id=#24] +Arguments: hashpartitioning(c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, 5), ENSURE_REQUIREMENTS, [id=#24] (42) HashAggregate [codegen id : 15] Input [5]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, sum#23] @@ -282,7 +282,7 @@ Results [4]: [c_customer_id#9 AS customer_id#26, c_first_name#10 AS customer_fir (43) Exchange Input [4]: [customer_id#26, customer_first_name#27, customer_last_name#28, year_total#29] -Arguments: hashpartitioning(customer_id#26, 5), true, [id=#30] +Arguments: hashpartitioning(customer_id#26, 5), ENSURE_REQUIREMENTS, [id=#30] (44) Sort [codegen id : 16] Input [4]: [customer_id#26, customer_first_name#27, customer_last_name#28, year_total#29] @@ -321,7 +321,7 @@ Input [5]: [ws_sold_date_sk#31, ws_bill_customer_sk#32, ws_net_paid#33, d_date_s (52) Exchange Input [3]: [ws_bill_customer_sk#32, ws_net_paid#33, d_year#5] -Arguments: hashpartitioning(ws_bill_customer_sk#32, 5), true, [id=#34] +Arguments: hashpartitioning(ws_bill_customer_sk#32, 5), ENSURE_REQUIREMENTS, [id=#34] (53) Sort [codegen id : 20] Input [3]: [ws_bill_customer_sk#32, ws_net_paid#33, d_year#5] @@ -352,7 +352,7 @@ Results [5]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, sum#36 (59) Exchange Input [5]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, sum#36] -Arguments: hashpartitioning(c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, 5), true, [id=#37] +Arguments: hashpartitioning(c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, 5), ENSURE_REQUIREMENTS, [id=#37] (60) HashAggregate [codegen id : 24] Input [5]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, sum#36] @@ -371,7 +371,7 @@ Input [2]: [customer_id#39, year_total#40] (63) Exchange Input [2]: [customer_id#41, year_total#42] -Arguments: hashpartitioning(customer_id#41, 5), true, [id=#43] +Arguments: hashpartitioning(customer_id#41, 5), ENSURE_REQUIREMENTS, [id=#43] (64) Sort [codegen id : 25] Input [2]: [customer_id#41, year_total#42] @@ -414,7 +414,7 @@ Input [5]: [ws_sold_date_sk#31, ws_bill_customer_sk#32, ws_net_paid#33, d_date_s (73) Exchange Input [3]: [ws_bill_customer_sk#32, ws_net_paid#33, d_year#5] -Arguments: hashpartitioning(ws_bill_customer_sk#32, 5), true, [id=#44] +Arguments: hashpartitioning(ws_bill_customer_sk#32, 5), ENSURE_REQUIREMENTS, [id=#44] (74) Sort [codegen id : 29] Input [3]: [ws_bill_customer_sk#32, ws_net_paid#33, d_year#5] @@ -445,7 +445,7 @@ Results [5]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, sum#46 (80) Exchange Input [5]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, sum#46] -Arguments: hashpartitioning(c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, 5), true, [id=#47] +Arguments: hashpartitioning(c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, 5), ENSURE_REQUIREMENTS, [id=#47] (81) HashAggregate [codegen id : 33] Input [5]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, sum#46] @@ -456,7 +456,7 @@ Results [2]: [c_customer_id#9 AS customer_id#49, MakeDecimal(sum(UnscaledValue(w (82) Exchange Input [2]: [customer_id#49, year_total#50] -Arguments: hashpartitioning(customer_id#49, 5), true, [id=#51] +Arguments: hashpartitioning(customer_id#49, 5), ENSURE_REQUIREMENTS, [id=#51] (83) Sort [codegen id : 34] Input [2]: [customer_id#49, year_total#50] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q74/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q74/explain.txt index 4c9bad96e2027..27cbbf5f4e1c0 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q74/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q74/explain.txt @@ -150,7 +150,7 @@ Results [5]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, sum#13] (17) Exchange Input [5]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, sum#13] -Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, 5), true, [id=#14] +Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, 5), ENSURE_REQUIREMENTS, [id=#14] (18) HashAggregate [codegen id : 16] Input [5]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, sum#13] @@ -225,7 +225,7 @@ Results [5]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, sum#20] (33) Exchange Input [5]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, sum#20] -Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, 5), true, [id=#21] +Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, 5), ENSURE_REQUIREMENTS, [id=#21] (34) HashAggregate [codegen id : 7] Input [5]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, sum#20] @@ -305,7 +305,7 @@ Results [5]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, sum#33] (50) Exchange Input [5]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, sum#33] -Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, 5), true, [id=#34] +Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, 5), ENSURE_REQUIREMENTS, [id=#34] (51) HashAggregate [codegen id : 11] Input [5]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, sum#33] @@ -382,7 +382,7 @@ Results [5]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, sum#42] (67) Exchange Input [5]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, sum#42] -Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, 5), true, [id=#43] +Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, 5), ENSURE_REQUIREMENTS, [id=#43] (68) HashAggregate [codegen id : 15] Input [5]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, sum#42] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q75.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q75.sf100/explain.txt index 1d546a445b202..bf1660311362c 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q75.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q75.sf100/explain.txt @@ -419,7 +419,7 @@ Results [7]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact (66) HashAggregate [codegen id : 23] Input [7]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11, sales_cnt#22, sales_amt#23] Keys [5]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11] -Functions [2]: [partial_sum(cast(sales_cnt#22 as bigint)), partial_sum(UnscaledValue(sales_amt#23))] +Functions [2]: [partial_sum(sales_cnt#22), partial_sum(UnscaledValue(sales_amt#23))] Aggregate Attributes [2]: [sum#51, sum#52] Results [7]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11, sum#53, sum#54] @@ -430,9 +430,9 @@ Arguments: hashpartitioning(d_year#14, i_brand_id#7, i_class_id#8, i_category_id (68) HashAggregate [codegen id : 24] Input [7]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11, sum#53, sum#54] Keys [5]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11] -Functions [2]: [sum(cast(sales_cnt#22 as bigint)), sum(UnscaledValue(sales_amt#23))] -Aggregate Attributes [2]: [sum(cast(sales_cnt#22 as bigint))#56, sum(UnscaledValue(sales_amt#23))#57] -Results [7]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11, sum(cast(sales_cnt#22 as bigint))#56 AS sales_cnt#58, MakeDecimal(sum(UnscaledValue(sales_amt#23))#57,18,2) AS sales_amt#59] +Functions [2]: [sum(sales_cnt#22), sum(UnscaledValue(sales_amt#23))] +Aggregate Attributes [2]: [sum(sales_cnt#22)#56, sum(UnscaledValue(sales_amt#23))#57] +Results [7]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11, sum(sales_cnt#22)#56 AS sales_cnt#58, MakeDecimal(sum(UnscaledValue(sales_amt#23))#57,18,2) AS sales_amt#59] (69) Exchange Input [7]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11, sales_cnt#58, sales_amt#59] @@ -666,7 +666,7 @@ Results [7]: [d_year#67, i_brand_id#62, i_class_id#63, i_category_id#64, i_manuf (123) HashAggregate [codegen id : 48] Input [7]: [d_year#67, i_brand_id#62, i_class_id#63, i_category_id#64, i_manufact_id#65, sales_cnt#22, sales_amt#23] Keys [5]: [d_year#67, i_brand_id#62, i_class_id#63, i_category_id#64, i_manufact_id#65] -Functions [2]: [partial_sum(cast(sales_cnt#22 as bigint)), partial_sum(UnscaledValue(sales_amt#23))] +Functions [2]: [partial_sum(sales_cnt#22), partial_sum(UnscaledValue(sales_amt#23))] Aggregate Attributes [2]: [sum#77, sum#78] Results [7]: [d_year#67, i_brand_id#62, i_class_id#63, i_category_id#64, i_manufact_id#65, sum#79, sum#80] @@ -677,9 +677,9 @@ Arguments: hashpartitioning(d_year#67, i_brand_id#62, i_class_id#63, i_category_ (125) HashAggregate [codegen id : 49] Input [7]: [d_year#67, i_brand_id#62, i_class_id#63, i_category_id#64, i_manufact_id#65, sum#79, sum#80] Keys [5]: [d_year#67, i_brand_id#62, i_class_id#63, i_category_id#64, i_manufact_id#65] -Functions [2]: [sum(cast(sales_cnt#22 as bigint)), sum(UnscaledValue(sales_amt#23))] -Aggregate Attributes [2]: [sum(cast(sales_cnt#22 as bigint))#82, sum(UnscaledValue(sales_amt#23))#83] -Results [7]: [d_year#67, i_brand_id#62, i_class_id#63, i_category_id#64, i_manufact_id#65, sum(cast(sales_cnt#22 as bigint))#82 AS sales_cnt#84, MakeDecimal(sum(UnscaledValue(sales_amt#23))#83,18,2) AS sales_amt#85] +Functions [2]: [sum(sales_cnt#22), sum(UnscaledValue(sales_amt#23))] +Aggregate Attributes [2]: [sum(sales_cnt#22)#82, sum(UnscaledValue(sales_amt#23))#83] +Results [7]: [d_year#67, i_brand_id#62, i_class_id#63, i_category_id#64, i_manufact_id#65, sum(sales_cnt#22)#82 AS sales_cnt#84, MakeDecimal(sum(UnscaledValue(sales_amt#23))#83,18,2) AS sales_amt#85] (126) Exchange Input [7]: [d_year#67, i_brand_id#62, i_class_id#63, i_category_id#64, i_manufact_id#65, sales_cnt#84, sales_amt#85] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q75.sf100/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q75.sf100/simplified.txt index bac8f252c2983..d6dfee1f0c6f4 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q75.sf100/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q75.sf100/simplified.txt @@ -8,7 +8,7 @@ TakeOrderedAndProject [sales_cnt_diff,prev_year,year,i_brand_id,i_class_id,i_cat InputAdapter Exchange [i_brand_id,i_class_id,i_category_id,i_manufact_id] #1 WholeStageCodegen (24) - HashAggregate [d_year,i_brand_id,i_class_id,i_category_id,i_manufact_id,sum,sum] [sum(cast(sales_cnt as bigint)),sum(UnscaledValue(sales_amt)),sales_cnt,sales_amt,sum,sum] + HashAggregate [d_year,i_brand_id,i_class_id,i_category_id,i_manufact_id,sum,sum] [sum(sales_cnt),sum(UnscaledValue(sales_amt)),sales_cnt,sales_amt,sum,sum] InputAdapter Exchange [d_year,i_brand_id,i_class_id,i_category_id,i_manufact_id] #2 WholeStageCodegen (23) @@ -127,7 +127,7 @@ TakeOrderedAndProject [sales_cnt_diff,prev_year,year,i_brand_id,i_class_id,i_cat InputAdapter Exchange [i_brand_id,i_class_id,i_category_id,i_manufact_id] #12 WholeStageCodegen (49) - HashAggregate [d_year,i_brand_id,i_class_id,i_category_id,i_manufact_id,sum,sum] [sum(cast(sales_cnt as bigint)),sum(UnscaledValue(sales_amt)),sales_cnt,sales_amt,sum,sum] + HashAggregate [d_year,i_brand_id,i_class_id,i_category_id,i_manufact_id,sum,sum] [sum(sales_cnt),sum(UnscaledValue(sales_amt)),sales_cnt,sales_amt,sum,sum] InputAdapter Exchange [d_year,i_brand_id,i_class_id,i_category_id,i_manufact_id] #13 WholeStageCodegen (48) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q75/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q75/explain.txt index 3d52a795bb44e..48931db22ddfb 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q75/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q75/explain.txt @@ -362,7 +362,7 @@ Results [7]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact (57) HashAggregate [codegen id : 14] Input [7]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11, sales_cnt#21, sales_amt#22] Keys [5]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11] -Functions [2]: [partial_sum(cast(sales_cnt#21 as bigint)), partial_sum(UnscaledValue(sales_amt#22))] +Functions [2]: [partial_sum(sales_cnt#21), partial_sum(UnscaledValue(sales_amt#22))] Aggregate Attributes [2]: [sum#48, sum#49] Results [7]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11, sum#50, sum#51] @@ -373,9 +373,9 @@ Arguments: hashpartitioning(d_year#14, i_brand_id#7, i_class_id#8, i_category_id (59) HashAggregate [codegen id : 30] Input [7]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11, sum#50, sum#51] Keys [5]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11] -Functions [2]: [sum(cast(sales_cnt#21 as bigint)), sum(UnscaledValue(sales_amt#22))] -Aggregate Attributes [2]: [sum(cast(sales_cnt#21 as bigint))#53, sum(UnscaledValue(sales_amt#22))#54] -Results [7]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11, sum(cast(sales_cnt#21 as bigint))#53 AS sales_cnt#55, MakeDecimal(sum(UnscaledValue(sales_amt#22))#54,18,2) AS sales_amt#56] +Functions [2]: [sum(sales_cnt#21), sum(UnscaledValue(sales_amt#22))] +Aggregate Attributes [2]: [sum(sales_cnt#21)#53, sum(UnscaledValue(sales_amt#22))#54] +Results [7]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11, sum(sales_cnt#21)#53 AS sales_cnt#55, MakeDecimal(sum(UnscaledValue(sales_amt#22))#54,18,2) AS sales_amt#56] (60) Scan parquet default.catalog_sales Output [5]: [cs_sold_date_sk#1, cs_item_sk#2, cs_order_number#3, cs_quantity#4, cs_ext_sales_price#5] @@ -565,7 +565,7 @@ Results [7]: [d_year#63, i_brand_id#58, i_class_id#59, i_category_id#60, i_manuf (103) HashAggregate [codegen id : 28] Input [7]: [d_year#63, i_brand_id#58, i_class_id#59, i_category_id#60, i_manufact_id#61, sales_cnt#21, sales_amt#22] Keys [5]: [d_year#63, i_brand_id#58, i_class_id#59, i_category_id#60, i_manufact_id#61] -Functions [2]: [partial_sum(cast(sales_cnt#21 as bigint)), partial_sum(UnscaledValue(sales_amt#22))] +Functions [2]: [partial_sum(sales_cnt#21), partial_sum(UnscaledValue(sales_amt#22))] Aggregate Attributes [2]: [sum#70, sum#71] Results [7]: [d_year#63, i_brand_id#58, i_class_id#59, i_category_id#60, i_manufact_id#61, sum#72, sum#73] @@ -576,9 +576,9 @@ Arguments: hashpartitioning(d_year#63, i_brand_id#58, i_class_id#59, i_category_ (105) HashAggregate [codegen id : 29] Input [7]: [d_year#63, i_brand_id#58, i_class_id#59, i_category_id#60, i_manufact_id#61, sum#72, sum#73] Keys [5]: [d_year#63, i_brand_id#58, i_class_id#59, i_category_id#60, i_manufact_id#61] -Functions [2]: [sum(cast(sales_cnt#21 as bigint)), sum(UnscaledValue(sales_amt#22))] -Aggregate Attributes [2]: [sum(cast(sales_cnt#21 as bigint))#75, sum(UnscaledValue(sales_amt#22))#76] -Results [7]: [d_year#63, i_brand_id#58, i_class_id#59, i_category_id#60, i_manufact_id#61, sum(cast(sales_cnt#21 as bigint))#75 AS sales_cnt#77, MakeDecimal(sum(UnscaledValue(sales_amt#22))#76,18,2) AS sales_amt#78] +Functions [2]: [sum(sales_cnt#21), sum(UnscaledValue(sales_amt#22))] +Aggregate Attributes [2]: [sum(sales_cnt#21)#75, sum(UnscaledValue(sales_amt#22))#76] +Results [7]: [d_year#63, i_brand_id#58, i_class_id#59, i_category_id#60, i_manufact_id#61, sum(sales_cnt#21)#75 AS sales_cnt#77, MakeDecimal(sum(UnscaledValue(sales_amt#22))#76,18,2) AS sales_amt#78] (106) BroadcastExchange Input [7]: [d_year#63, i_brand_id#58, i_class_id#59, i_category_id#60, i_manufact_id#61, sales_cnt#77, sales_amt#78] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q75/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q75/simplified.txt index 0eeca93ed7d08..83bc794eaa705 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q75/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q75/simplified.txt @@ -2,7 +2,7 @@ TakeOrderedAndProject [sales_cnt_diff,prev_year,year,i_brand_id,i_class_id,i_cat WholeStageCodegen (30) Project [d_year,d_year,i_brand_id,i_class_id,i_category_id,i_manufact_id,sales_cnt,sales_cnt,sales_amt,sales_amt] BroadcastHashJoin [i_brand_id,i_class_id,i_category_id,i_manufact_id,i_brand_id,i_class_id,i_category_id,i_manufact_id,sales_cnt,sales_cnt] - HashAggregate [d_year,i_brand_id,i_class_id,i_category_id,i_manufact_id,sum,sum] [sum(cast(sales_cnt as bigint)),sum(UnscaledValue(sales_amt)),sales_cnt,sales_amt,sum,sum] + HashAggregate [d_year,i_brand_id,i_class_id,i_category_id,i_manufact_id,sum,sum] [sum(sales_cnt),sum(UnscaledValue(sales_amt)),sales_cnt,sales_amt,sum,sum] InputAdapter Exchange [d_year,i_brand_id,i_class_id,i_category_id,i_manufact_id] #1 WholeStageCodegen (14) @@ -94,7 +94,7 @@ TakeOrderedAndProject [sales_cnt_diff,prev_year,year,i_brand_id,i_class_id,i_cat InputAdapter BroadcastExchange #8 WholeStageCodegen (29) - HashAggregate [d_year,i_brand_id,i_class_id,i_category_id,i_manufact_id,sum,sum] [sum(cast(sales_cnt as bigint)),sum(UnscaledValue(sales_amt)),sales_cnt,sales_amt,sum,sum] + HashAggregate [d_year,i_brand_id,i_class_id,i_category_id,i_manufact_id,sum,sum] [sum(sales_cnt),sum(UnscaledValue(sales_amt)),sales_cnt,sales_amt,sum,sum] InputAdapter Exchange [d_year,i_brand_id,i_class_id,i_category_id,i_manufact_id] #9 WholeStageCodegen (28) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q76.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q76.sf100/explain.txt index 10e9cbba93b13..2248a59e484e1 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q76.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q76.sf100/explain.txt @@ -230,7 +230,7 @@ Results [7]: [channel#12, col_name#13, d_year#6, d_qoy#7, i_category#10, count#3 (42) Exchange Input [7]: [channel#12, col_name#13, d_year#6, d_qoy#7, i_category#10, count#33, sum#34] -Arguments: hashpartitioning(channel#12, col_name#13, d_year#6, d_qoy#7, i_category#10, 5), true, [id=#35] +Arguments: hashpartitioning(channel#12, col_name#13, d_year#6, d_qoy#7, i_category#10, 5), ENSURE_REQUIREMENTS, [id=#35] (43) HashAggregate [codegen id : 11] Input [7]: [channel#12, col_name#13, d_year#6, d_qoy#7, i_category#10, count#33, sum#34] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q76/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q76/explain.txt index 917e2b028106c..7cbe21c4adec2 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q76/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q76/explain.txt @@ -194,7 +194,7 @@ Results [7]: [channel#12, col_name#13, d_year#9, d_qoy#10, i_category#6, count#3 (36) Exchange Input [7]: [channel#12, col_name#13, d_year#9, d_qoy#10, i_category#6, count#31, sum#32] -Arguments: hashpartitioning(channel#12, col_name#13, d_year#9, d_qoy#10, i_category#6, 5), true, [id=#33] +Arguments: hashpartitioning(channel#12, col_name#13, d_year#9, d_qoy#10, i_category#6, 5), ENSURE_REQUIREMENTS, [id=#33] (37) HashAggregate [codegen id : 11] Input [7]: [channel#12, col_name#13, d_year#9, d_qoy#10, i_category#6, count#31, sum#32] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q77.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q77.sf100/explain.txt index e6b88348e4d68..765f318c65f1d 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q77.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q77.sf100/explain.txt @@ -173,7 +173,7 @@ Results [3]: [s_store_sk#8, sum#12, sum#13] (18) Exchange Input [3]: [s_store_sk#8, sum#12, sum#13] -Arguments: hashpartitioning(s_store_sk#8, 5), true, [id=#14] +Arguments: hashpartitioning(s_store_sk#8, 5), ENSURE_REQUIREMENTS, [id=#14] (19) HashAggregate [codegen id : 8] Input [3]: [s_store_sk#8, sum#12, sum#13] @@ -229,7 +229,7 @@ Results [3]: [s_store_sk#23, sum#26, sum#27] (30) Exchange Input [3]: [s_store_sk#23, sum#26, sum#27] -Arguments: hashpartitioning(s_store_sk#23, 5), true, [id=#28] +Arguments: hashpartitioning(s_store_sk#23, 5), ENSURE_REQUIREMENTS, [id=#28] (31) HashAggregate [codegen id : 7] Input [3]: [s_store_sk#23, sum#26, sum#27] @@ -286,7 +286,7 @@ Results [3]: [cs_call_center_sk#39, sum#44, sum#45] (42) Exchange Input [3]: [cs_call_center_sk#39, sum#44, sum#45] -Arguments: hashpartitioning(cs_call_center_sk#39, 5), true, [id=#46] +Arguments: hashpartitioning(cs_call_center_sk#39, 5), ENSURE_REQUIREMENTS, [id=#46] (43) HashAggregate [codegen id : 11] Input [3]: [cs_call_center_sk#39, sum#44, sum#45] @@ -330,7 +330,7 @@ Results [2]: [sum#56, sum#57] (51) Exchange Input [2]: [sum#56, sum#57] -Arguments: SinglePartition, true, [id=#58] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#58] (52) HashAggregate [codegen id : 14] Input [2]: [sum#56, sum#57] @@ -412,7 +412,7 @@ Results [3]: [wp_web_page_sk#71, sum#75, sum#76] (69) Exchange Input [3]: [wp_web_page_sk#71, sum#75, sum#76] -Arguments: hashpartitioning(wp_web_page_sk#71, 5), true, [id=#77] +Arguments: hashpartitioning(wp_web_page_sk#71, 5), ENSURE_REQUIREMENTS, [id=#77] (70) HashAggregate [codegen id : 23] Input [3]: [wp_web_page_sk#71, sum#75, sum#76] @@ -468,7 +468,7 @@ Results [3]: [wp_web_page_sk#86, sum#89, sum#90] (81) Exchange Input [3]: [wp_web_page_sk#86, sum#89, sum#90] -Arguments: hashpartitioning(wp_web_page_sk#86, 5), true, [id=#91] +Arguments: hashpartitioning(wp_web_page_sk#86, 5), ENSURE_REQUIREMENTS, [id=#91] (82) HashAggregate [codegen id : 22] Input [3]: [wp_web_page_sk#86, sum#89, sum#90] @@ -505,7 +505,7 @@ Results [9]: [channel#101, id#102, spark_grouping_id#103, sum#110, isEmpty#111, (89) Exchange Input [9]: [channel#101, id#102, spark_grouping_id#103, sum#110, isEmpty#111, sum#112, isEmpty#113, sum#114, isEmpty#115] -Arguments: hashpartitioning(channel#101, id#102, spark_grouping_id#103, 5), true, [id=#116] +Arguments: hashpartitioning(channel#101, id#102, spark_grouping_id#103, 5), ENSURE_REQUIREMENTS, [id=#116] (90) HashAggregate [codegen id : 25] Input [9]: [channel#101, id#102, spark_grouping_id#103, sum#110, isEmpty#111, sum#112, isEmpty#113, sum#114, isEmpty#115] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q77/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q77/explain.txt index c232055ba8c34..168601d46f71f 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q77/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q77/explain.txt @@ -173,7 +173,7 @@ Results [3]: [s_store_sk#8, sum#12, sum#13] (18) Exchange Input [3]: [s_store_sk#8, sum#12, sum#13] -Arguments: hashpartitioning(s_store_sk#8, 5), true, [id=#14] +Arguments: hashpartitioning(s_store_sk#8, 5), ENSURE_REQUIREMENTS, [id=#14] (19) HashAggregate [codegen id : 8] Input [3]: [s_store_sk#8, sum#12, sum#13] @@ -229,7 +229,7 @@ Results [3]: [s_store_sk#23, sum#26, sum#27] (30) Exchange Input [3]: [s_store_sk#23, sum#26, sum#27] -Arguments: hashpartitioning(s_store_sk#23, 5), true, [id=#28] +Arguments: hashpartitioning(s_store_sk#23, 5), ENSURE_REQUIREMENTS, [id=#28] (31) HashAggregate [codegen id : 7] Input [3]: [s_store_sk#23, sum#26, sum#27] @@ -286,7 +286,7 @@ Results [3]: [cs_call_center_sk#39, sum#44, sum#45] (42) Exchange Input [3]: [cs_call_center_sk#39, sum#44, sum#45] -Arguments: hashpartitioning(cs_call_center_sk#39, 5), true, [id=#46] +Arguments: hashpartitioning(cs_call_center_sk#39, 5), ENSURE_REQUIREMENTS, [id=#46] (43) HashAggregate [codegen id : 11] Input [3]: [cs_call_center_sk#39, sum#44, sum#45] @@ -334,7 +334,7 @@ Results [2]: [sum#57, sum#58] (52) Exchange Input [2]: [sum#57, sum#58] -Arguments: SinglePartition, true, [id=#59] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#59] (53) HashAggregate [codegen id : 14] Input [2]: [sum#57, sum#58] @@ -412,7 +412,7 @@ Results [3]: [wp_web_page_sk#71, sum#75, sum#76] (69) Exchange Input [3]: [wp_web_page_sk#71, sum#75, sum#76] -Arguments: hashpartitioning(wp_web_page_sk#71, 5), true, [id=#77] +Arguments: hashpartitioning(wp_web_page_sk#71, 5), ENSURE_REQUIREMENTS, [id=#77] (70) HashAggregate [codegen id : 23] Input [3]: [wp_web_page_sk#71, sum#75, sum#76] @@ -468,7 +468,7 @@ Results [3]: [wp_web_page_sk#86, sum#89, sum#90] (81) Exchange Input [3]: [wp_web_page_sk#86, sum#89, sum#90] -Arguments: hashpartitioning(wp_web_page_sk#86, 5), true, [id=#91] +Arguments: hashpartitioning(wp_web_page_sk#86, 5), ENSURE_REQUIREMENTS, [id=#91] (82) HashAggregate [codegen id : 22] Input [3]: [wp_web_page_sk#86, sum#89, sum#90] @@ -505,7 +505,7 @@ Results [9]: [channel#101, id#102, spark_grouping_id#103, sum#110, isEmpty#111, (89) Exchange Input [9]: [channel#101, id#102, spark_grouping_id#103, sum#110, isEmpty#111, sum#112, isEmpty#113, sum#114, isEmpty#115] -Arguments: hashpartitioning(channel#101, id#102, spark_grouping_id#103, 5), true, [id=#116] +Arguments: hashpartitioning(channel#101, id#102, spark_grouping_id#103, 5), ENSURE_REQUIREMENTS, [id=#116] (90) HashAggregate [codegen id : 25] Input [9]: [channel#101, id#102, spark_grouping_id#103, sum#110, isEmpty#111, sum#112, isEmpty#113, sum#114, isEmpty#115] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q78.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q78.sf100/explain.txt index 05cf4c2490b7b..d691a4fc1ffb0 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q78.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q78.sf100/explain.txt @@ -87,7 +87,7 @@ Condition : ((isnotnull(ss_sold_date_sk#1) AND isnotnull(ss_item_sk#2)) AND isno (4) Exchange Input [7]: [ss_sold_date_sk#1, ss_item_sk#2, ss_customer_sk#3, ss_ticket_number#4, ss_quantity#5, ss_wholesale_cost#6, ss_sales_price#7] -Arguments: hashpartitioning(cast(ss_ticket_number#4 as bigint), cast(ss_item_sk#2 as bigint), 5), true, [id=#8] +Arguments: hashpartitioning(cast(ss_ticket_number#4 as bigint), cast(ss_item_sk#2 as bigint), 5), ENSURE_REQUIREMENTS, [id=#8] (5) Sort [codegen id : 2] Input [7]: [ss_sold_date_sk#1, ss_item_sk#2, ss_customer_sk#3, ss_ticket_number#4, ss_quantity#5, ss_wholesale_cost#6, ss_sales_price#7] @@ -109,7 +109,7 @@ Condition : (isnotnull(sr_ticket_number#10) AND isnotnull(sr_item_sk#9)) (9) Exchange Input [2]: [sr_item_sk#9, sr_ticket_number#10] -Arguments: hashpartitioning(sr_ticket_number#10, sr_item_sk#9, 5), true, [id=#11] +Arguments: hashpartitioning(sr_ticket_number#10, sr_item_sk#9, 5), ENSURE_REQUIREMENTS, [id=#11] (10) Sort [codegen id : 4] Input [2]: [sr_item_sk#9, sr_ticket_number#10] @@ -158,20 +158,20 @@ Input [8]: [ss_sold_date_sk#1, ss_item_sk#2, ss_customer_sk#3, ss_quantity#5, ss (20) HashAggregate [codegen id : 6] Input [6]: [ss_item_sk#2, ss_customer_sk#3, ss_quantity#5, ss_wholesale_cost#6, ss_sales_price#7, d_year#13] Keys [3]: [d_year#13, ss_item_sk#2, ss_customer_sk#3] -Functions [3]: [partial_sum(cast(ss_quantity#5 as bigint)), partial_sum(UnscaledValue(ss_wholesale_cost#6)), partial_sum(UnscaledValue(ss_sales_price#7))] +Functions [3]: [partial_sum(ss_quantity#5), partial_sum(UnscaledValue(ss_wholesale_cost#6)), partial_sum(UnscaledValue(ss_sales_price#7))] Aggregate Attributes [3]: [sum#15, sum#16, sum#17] Results [6]: [d_year#13, ss_item_sk#2, ss_customer_sk#3, sum#18, sum#19, sum#20] (21) Exchange Input [6]: [d_year#13, ss_item_sk#2, ss_customer_sk#3, sum#18, sum#19, sum#20] -Arguments: hashpartitioning(d_year#13, ss_item_sk#2, ss_customer_sk#3, 5), true, [id=#21] +Arguments: hashpartitioning(d_year#13, ss_item_sk#2, ss_customer_sk#3, 5), ENSURE_REQUIREMENTS, [id=#21] (22) HashAggregate [codegen id : 7] Input [6]: [d_year#13, ss_item_sk#2, ss_customer_sk#3, sum#18, sum#19, sum#20] Keys [3]: [d_year#13, ss_item_sk#2, ss_customer_sk#3] -Functions [3]: [sum(cast(ss_quantity#5 as bigint)), sum(UnscaledValue(ss_wholesale_cost#6)), sum(UnscaledValue(ss_sales_price#7))] -Aggregate Attributes [3]: [sum(cast(ss_quantity#5 as bigint))#22, sum(UnscaledValue(ss_wholesale_cost#6))#23, sum(UnscaledValue(ss_sales_price#7))#24] -Results [6]: [d_year#13 AS ss_sold_year#25, ss_item_sk#2, ss_customer_sk#3, sum(cast(ss_quantity#5 as bigint))#22 AS ss_qty#26, MakeDecimal(sum(UnscaledValue(ss_wholesale_cost#6))#23,17,2) AS ss_wc#27, MakeDecimal(sum(UnscaledValue(ss_sales_price#7))#24,17,2) AS ss_sp#28] +Functions [3]: [sum(ss_quantity#5), sum(UnscaledValue(ss_wholesale_cost#6)), sum(UnscaledValue(ss_sales_price#7))] +Aggregate Attributes [3]: [sum(ss_quantity#5)#22, sum(UnscaledValue(ss_wholesale_cost#6))#23, sum(UnscaledValue(ss_sales_price#7))#24] +Results [6]: [d_year#13 AS ss_sold_year#25, ss_item_sk#2, ss_customer_sk#3, sum(ss_quantity#5)#22 AS ss_qty#26, MakeDecimal(sum(UnscaledValue(ss_wholesale_cost#6))#23,17,2) AS ss_wc#27, MakeDecimal(sum(UnscaledValue(ss_sales_price#7))#24,17,2) AS ss_sp#28] (23) Sort [codegen id : 7] Input [6]: [ss_sold_year#25, ss_item_sk#2, ss_customer_sk#3, ss_qty#26, ss_wc#27, ss_sp#28] @@ -193,7 +193,7 @@ Condition : ((isnotnull(cs_sold_date_sk#29) AND isnotnull(cs_item_sk#31)) AND is (27) Exchange Input [7]: [cs_sold_date_sk#29, cs_bill_customer_sk#30, cs_item_sk#31, cs_order_number#32, cs_quantity#33, cs_wholesale_cost#34, cs_sales_price#35] -Arguments: hashpartitioning(cs_order_number#32, cs_item_sk#31, 5), true, [id=#36] +Arguments: hashpartitioning(cs_order_number#32, cs_item_sk#31, 5), ENSURE_REQUIREMENTS, [id=#36] (28) Sort [codegen id : 9] Input [7]: [cs_sold_date_sk#29, cs_bill_customer_sk#30, cs_item_sk#31, cs_order_number#32, cs_quantity#33, cs_wholesale_cost#34, cs_sales_price#35] @@ -215,7 +215,7 @@ Condition : (isnotnull(cr_order_number#38) AND isnotnull(cr_item_sk#37)) (32) Exchange Input [2]: [cr_item_sk#37, cr_order_number#38] -Arguments: hashpartitioning(cr_order_number#38, cr_item_sk#37, 5), true, [id=#39] +Arguments: hashpartitioning(cr_order_number#38, cr_item_sk#37, 5), ENSURE_REQUIREMENTS, [id=#39] (33) Sort [codegen id : 11] Input [2]: [cr_item_sk#37, cr_order_number#38] @@ -249,20 +249,20 @@ Input [8]: [cs_sold_date_sk#29, cs_bill_customer_sk#30, cs_item_sk#31, cs_quanti (40) HashAggregate [codegen id : 13] Input [6]: [cs_bill_customer_sk#30, cs_item_sk#31, cs_quantity#33, cs_wholesale_cost#34, cs_sales_price#35, d_year#13] Keys [3]: [d_year#13, cs_item_sk#31, cs_bill_customer_sk#30] -Functions [3]: [partial_sum(cast(cs_quantity#33 as bigint)), partial_sum(UnscaledValue(cs_wholesale_cost#34)), partial_sum(UnscaledValue(cs_sales_price#35))] +Functions [3]: [partial_sum(cs_quantity#33), partial_sum(UnscaledValue(cs_wholesale_cost#34)), partial_sum(UnscaledValue(cs_sales_price#35))] Aggregate Attributes [3]: [sum#40, sum#41, sum#42] Results [6]: [d_year#13, cs_item_sk#31, cs_bill_customer_sk#30, sum#43, sum#44, sum#45] (41) Exchange Input [6]: [d_year#13, cs_item_sk#31, cs_bill_customer_sk#30, sum#43, sum#44, sum#45] -Arguments: hashpartitioning(d_year#13, cs_item_sk#31, cs_bill_customer_sk#30, 5), true, [id=#46] +Arguments: hashpartitioning(d_year#13, cs_item_sk#31, cs_bill_customer_sk#30, 5), ENSURE_REQUIREMENTS, [id=#46] (42) HashAggregate [codegen id : 14] Input [6]: [d_year#13, cs_item_sk#31, cs_bill_customer_sk#30, sum#43, sum#44, sum#45] Keys [3]: [d_year#13, cs_item_sk#31, cs_bill_customer_sk#30] -Functions [3]: [sum(cast(cs_quantity#33 as bigint)), sum(UnscaledValue(cs_wholesale_cost#34)), sum(UnscaledValue(cs_sales_price#35))] -Aggregate Attributes [3]: [sum(cast(cs_quantity#33 as bigint))#47, sum(UnscaledValue(cs_wholesale_cost#34))#48, sum(UnscaledValue(cs_sales_price#35))#49] -Results [6]: [d_year#13 AS cs_sold_year#50, cs_item_sk#31, cs_bill_customer_sk#30 AS cs_customer_sk#51, sum(cast(cs_quantity#33 as bigint))#47 AS cs_qty#52, MakeDecimal(sum(UnscaledValue(cs_wholesale_cost#34))#48,17,2) AS cs_wc#53, MakeDecimal(sum(UnscaledValue(cs_sales_price#35))#49,17,2) AS cs_sp#54] +Functions [3]: [sum(cs_quantity#33), sum(UnscaledValue(cs_wholesale_cost#34)), sum(UnscaledValue(cs_sales_price#35))] +Aggregate Attributes [3]: [sum(cs_quantity#33)#47, sum(UnscaledValue(cs_wholesale_cost#34))#48, sum(UnscaledValue(cs_sales_price#35))#49] +Results [6]: [d_year#13 AS cs_sold_year#50, cs_item_sk#31, cs_bill_customer_sk#30 AS cs_customer_sk#51, sum(cs_quantity#33)#47 AS cs_qty#52, MakeDecimal(sum(UnscaledValue(cs_wholesale_cost#34))#48,17,2) AS cs_wc#53, MakeDecimal(sum(UnscaledValue(cs_sales_price#35))#49,17,2) AS cs_sp#54] (43) Filter [codegen id : 14] Input [6]: [cs_sold_year#50, cs_item_sk#31, cs_customer_sk#51, cs_qty#52, cs_wc#53, cs_sp#54] @@ -297,7 +297,7 @@ Condition : ((isnotnull(ws_sold_date_sk#55) AND isnotnull(ws_item_sk#56)) AND is (50) Exchange Input [7]: [ws_sold_date_sk#55, ws_item_sk#56, ws_bill_customer_sk#57, ws_order_number#58, ws_quantity#59, ws_wholesale_cost#60, ws_sales_price#61] -Arguments: hashpartitioning(cast(ws_order_number#58 as bigint), cast(ws_item_sk#56 as bigint), 5), true, [id=#62] +Arguments: hashpartitioning(cast(ws_order_number#58 as bigint), cast(ws_item_sk#56 as bigint), 5), ENSURE_REQUIREMENTS, [id=#62] (51) Sort [codegen id : 17] Input [7]: [ws_sold_date_sk#55, ws_item_sk#56, ws_bill_customer_sk#57, ws_order_number#58, ws_quantity#59, ws_wholesale_cost#60, ws_sales_price#61] @@ -319,7 +319,7 @@ Condition : (isnotnull(wr_order_number#64) AND isnotnull(wr_item_sk#63)) (55) Exchange Input [2]: [wr_item_sk#63, wr_order_number#64] -Arguments: hashpartitioning(wr_order_number#64, wr_item_sk#63, 5), true, [id=#65] +Arguments: hashpartitioning(wr_order_number#64, wr_item_sk#63, 5), ENSURE_REQUIREMENTS, [id=#65] (56) Sort [codegen id : 19] Input [2]: [wr_item_sk#63, wr_order_number#64] @@ -353,20 +353,20 @@ Input [8]: [ws_sold_date_sk#55, ws_item_sk#56, ws_bill_customer_sk#57, ws_quanti (63) HashAggregate [codegen id : 21] Input [6]: [ws_item_sk#56, ws_bill_customer_sk#57, ws_quantity#59, ws_wholesale_cost#60, ws_sales_price#61, d_year#13] Keys [3]: [d_year#13, ws_item_sk#56, ws_bill_customer_sk#57] -Functions [3]: [partial_sum(cast(ws_quantity#59 as bigint)), partial_sum(UnscaledValue(ws_wholesale_cost#60)), partial_sum(UnscaledValue(ws_sales_price#61))] +Functions [3]: [partial_sum(ws_quantity#59), partial_sum(UnscaledValue(ws_wholesale_cost#60)), partial_sum(UnscaledValue(ws_sales_price#61))] Aggregate Attributes [3]: [sum#66, sum#67, sum#68] Results [6]: [d_year#13, ws_item_sk#56, ws_bill_customer_sk#57, sum#69, sum#70, sum#71] (64) Exchange Input [6]: [d_year#13, ws_item_sk#56, ws_bill_customer_sk#57, sum#69, sum#70, sum#71] -Arguments: hashpartitioning(d_year#13, ws_item_sk#56, ws_bill_customer_sk#57, 5), true, [id=#72] +Arguments: hashpartitioning(d_year#13, ws_item_sk#56, ws_bill_customer_sk#57, 5), ENSURE_REQUIREMENTS, [id=#72] (65) HashAggregate [codegen id : 22] Input [6]: [d_year#13, ws_item_sk#56, ws_bill_customer_sk#57, sum#69, sum#70, sum#71] Keys [3]: [d_year#13, ws_item_sk#56, ws_bill_customer_sk#57] -Functions [3]: [sum(cast(ws_quantity#59 as bigint)), sum(UnscaledValue(ws_wholesale_cost#60)), sum(UnscaledValue(ws_sales_price#61))] -Aggregate Attributes [3]: [sum(cast(ws_quantity#59 as bigint))#73, sum(UnscaledValue(ws_wholesale_cost#60))#74, sum(UnscaledValue(ws_sales_price#61))#75] -Results [6]: [d_year#13 AS ws_sold_year#76, ws_item_sk#56, ws_bill_customer_sk#57 AS ws_customer_sk#77, sum(cast(ws_quantity#59 as bigint))#73 AS ws_qty#78, MakeDecimal(sum(UnscaledValue(ws_wholesale_cost#60))#74,17,2) AS ws_wc#79, MakeDecimal(sum(UnscaledValue(ws_sales_price#61))#75,17,2) AS ws_sp#80] +Functions [3]: [sum(ws_quantity#59), sum(UnscaledValue(ws_wholesale_cost#60)), sum(UnscaledValue(ws_sales_price#61))] +Aggregate Attributes [3]: [sum(ws_quantity#59)#73, sum(UnscaledValue(ws_wholesale_cost#60))#74, sum(UnscaledValue(ws_sales_price#61))#75] +Results [6]: [d_year#13 AS ws_sold_year#76, ws_item_sk#56, ws_bill_customer_sk#57 AS ws_customer_sk#77, sum(ws_quantity#59)#73 AS ws_qty#78, MakeDecimal(sum(UnscaledValue(ws_wholesale_cost#60))#74,17,2) AS ws_wc#79, MakeDecimal(sum(UnscaledValue(ws_sales_price#61))#75,17,2) AS ws_sp#80] (66) Filter [codegen id : 22] Input [6]: [ws_sold_year#76, ws_item_sk#56, ws_customer_sk#77, ws_qty#78, ws_wc#79, ws_sp#80] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q78.sf100/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q78.sf100/simplified.txt index b46178cb8f473..f8b62803a3470 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q78.sf100/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q78.sf100/simplified.txt @@ -9,7 +9,7 @@ TakeOrderedAndProject [ratio,ss_qty,ss_wc,ss_sp,other_chan_qty,other_chan_wholes InputAdapter WholeStageCodegen (7) Sort [ss_sold_year,ss_item_sk,ss_customer_sk] - HashAggregate [d_year,ss_item_sk,ss_customer_sk,sum,sum,sum] [sum(cast(ss_quantity as bigint)),sum(UnscaledValue(ss_wholesale_cost)),sum(UnscaledValue(ss_sales_price)),ss_sold_year,ss_qty,ss_wc,ss_sp,sum,sum,sum] + HashAggregate [d_year,ss_item_sk,ss_customer_sk,sum,sum,sum] [sum(ss_quantity),sum(UnscaledValue(ss_wholesale_cost)),sum(UnscaledValue(ss_sales_price)),ss_sold_year,ss_qty,ss_wc,ss_sp,sum,sum,sum] InputAdapter Exchange [d_year,ss_item_sk,ss_customer_sk] #1 WholeStageCodegen (6) @@ -49,7 +49,7 @@ TakeOrderedAndProject [ratio,ss_qty,ss_wc,ss_sp,other_chan_qty,other_chan_wholes WholeStageCodegen (14) Sort [cs_sold_year,cs_item_sk,cs_customer_sk] Filter [cs_qty] - HashAggregate [d_year,cs_item_sk,cs_bill_customer_sk,sum,sum,sum] [sum(cast(cs_quantity as bigint)),sum(UnscaledValue(cs_wholesale_cost)),sum(UnscaledValue(cs_sales_price)),cs_sold_year,cs_customer_sk,cs_qty,cs_wc,cs_sp,sum,sum,sum] + HashAggregate [d_year,cs_item_sk,cs_bill_customer_sk,sum,sum,sum] [sum(cs_quantity),sum(UnscaledValue(cs_wholesale_cost)),sum(UnscaledValue(cs_sales_price)),cs_sold_year,cs_customer_sk,cs_qty,cs_wc,cs_sp,sum,sum,sum] InputAdapter Exchange [d_year,cs_item_sk,cs_bill_customer_sk] #5 WholeStageCodegen (13) @@ -84,7 +84,7 @@ TakeOrderedAndProject [ratio,ss_qty,ss_wc,ss_sp,other_chan_qty,other_chan_wholes WholeStageCodegen (22) Sort [ws_sold_year,ws_item_sk,ws_customer_sk] Filter [ws_qty] - HashAggregate [d_year,ws_item_sk,ws_bill_customer_sk,sum,sum,sum] [sum(cast(ws_quantity as bigint)),sum(UnscaledValue(ws_wholesale_cost)),sum(UnscaledValue(ws_sales_price)),ws_sold_year,ws_customer_sk,ws_qty,ws_wc,ws_sp,sum,sum,sum] + HashAggregate [d_year,ws_item_sk,ws_bill_customer_sk,sum,sum,sum] [sum(ws_quantity),sum(UnscaledValue(ws_wholesale_cost)),sum(UnscaledValue(ws_sales_price)),ws_sold_year,ws_customer_sk,ws_qty,ws_wc,ws_sp,sum,sum,sum] InputAdapter Exchange [d_year,ws_item_sk,ws_bill_customer_sk] #8 WholeStageCodegen (21) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q78/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q78/explain.txt index 1bcf039ddfaf1..c3034d853a345 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q78/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q78/explain.txt @@ -136,20 +136,20 @@ Input [8]: [ss_sold_date_sk#1, ss_item_sk#2, ss_customer_sk#3, ss_quantity#5, ss (17) HashAggregate [codegen id : 3] Input [6]: [ss_item_sk#2, ss_customer_sk#3, ss_quantity#5, ss_wholesale_cost#6, ss_sales_price#7, d_year#12] Keys [3]: [d_year#12, ss_item_sk#2, ss_customer_sk#3] -Functions [3]: [partial_sum(cast(ss_quantity#5 as bigint)), partial_sum(UnscaledValue(ss_wholesale_cost#6)), partial_sum(UnscaledValue(ss_sales_price#7))] +Functions [3]: [partial_sum(ss_quantity#5), partial_sum(UnscaledValue(ss_wholesale_cost#6)), partial_sum(UnscaledValue(ss_sales_price#7))] Aggregate Attributes [3]: [sum#14, sum#15, sum#16] Results [6]: [d_year#12, ss_item_sk#2, ss_customer_sk#3, sum#17, sum#18, sum#19] (18) Exchange Input [6]: [d_year#12, ss_item_sk#2, ss_customer_sk#3, sum#17, sum#18, sum#19] -Arguments: hashpartitioning(d_year#12, ss_item_sk#2, ss_customer_sk#3, 5), true, [id=#20] +Arguments: hashpartitioning(d_year#12, ss_item_sk#2, ss_customer_sk#3, 5), ENSURE_REQUIREMENTS, [id=#20] (19) HashAggregate [codegen id : 12] Input [6]: [d_year#12, ss_item_sk#2, ss_customer_sk#3, sum#17, sum#18, sum#19] Keys [3]: [d_year#12, ss_item_sk#2, ss_customer_sk#3] -Functions [3]: [sum(cast(ss_quantity#5 as bigint)), sum(UnscaledValue(ss_wholesale_cost#6)), sum(UnscaledValue(ss_sales_price#7))] -Aggregate Attributes [3]: [sum(cast(ss_quantity#5 as bigint))#21, sum(UnscaledValue(ss_wholesale_cost#6))#22, sum(UnscaledValue(ss_sales_price#7))#23] -Results [6]: [d_year#12 AS ss_sold_year#24, ss_item_sk#2, ss_customer_sk#3, sum(cast(ss_quantity#5 as bigint))#21 AS ss_qty#25, MakeDecimal(sum(UnscaledValue(ss_wholesale_cost#6))#22,17,2) AS ss_wc#26, MakeDecimal(sum(UnscaledValue(ss_sales_price#7))#23,17,2) AS ss_sp#27] +Functions [3]: [sum(ss_quantity#5), sum(UnscaledValue(ss_wholesale_cost#6)), sum(UnscaledValue(ss_sales_price#7))] +Aggregate Attributes [3]: [sum(ss_quantity#5)#21, sum(UnscaledValue(ss_wholesale_cost#6))#22, sum(UnscaledValue(ss_sales_price#7))#23] +Results [6]: [d_year#12 AS ss_sold_year#24, ss_item_sk#2, ss_customer_sk#3, sum(ss_quantity#5)#21 AS ss_qty#25, MakeDecimal(sum(UnscaledValue(ss_wholesale_cost#6))#22,17,2) AS ss_wc#26, MakeDecimal(sum(UnscaledValue(ss_sales_price#7))#23,17,2) AS ss_sp#27] (20) Scan parquet default.web_sales Output [7]: [ws_sold_date_sk#28, ws_item_sk#29, ws_bill_customer_sk#30, ws_order_number#31, ws_quantity#32, ws_wholesale_cost#33, ws_sales_price#34] @@ -211,20 +211,20 @@ Input [8]: [ws_sold_date_sk#28, ws_item_sk#29, ws_bill_customer_sk#30, ws_quanti (33) HashAggregate [codegen id : 6] Input [6]: [ws_item_sk#29, ws_bill_customer_sk#30, ws_quantity#32, ws_wholesale_cost#33, ws_sales_price#34, d_year#12] Keys [3]: [d_year#12, ws_item_sk#29, ws_bill_customer_sk#30] -Functions [3]: [partial_sum(cast(ws_quantity#32 as bigint)), partial_sum(UnscaledValue(ws_wholesale_cost#33)), partial_sum(UnscaledValue(ws_sales_price#34))] +Functions [3]: [partial_sum(ws_quantity#32), partial_sum(UnscaledValue(ws_wholesale_cost#33)), partial_sum(UnscaledValue(ws_sales_price#34))] Aggregate Attributes [3]: [sum#38, sum#39, sum#40] Results [6]: [d_year#12, ws_item_sk#29, ws_bill_customer_sk#30, sum#41, sum#42, sum#43] (34) Exchange Input [6]: [d_year#12, ws_item_sk#29, ws_bill_customer_sk#30, sum#41, sum#42, sum#43] -Arguments: hashpartitioning(d_year#12, ws_item_sk#29, ws_bill_customer_sk#30, 5), true, [id=#44] +Arguments: hashpartitioning(d_year#12, ws_item_sk#29, ws_bill_customer_sk#30, 5), ENSURE_REQUIREMENTS, [id=#44] (35) HashAggregate [codegen id : 7] Input [6]: [d_year#12, ws_item_sk#29, ws_bill_customer_sk#30, sum#41, sum#42, sum#43] Keys [3]: [d_year#12, ws_item_sk#29, ws_bill_customer_sk#30] -Functions [3]: [sum(cast(ws_quantity#32 as bigint)), sum(UnscaledValue(ws_wholesale_cost#33)), sum(UnscaledValue(ws_sales_price#34))] -Aggregate Attributes [3]: [sum(cast(ws_quantity#32 as bigint))#45, sum(UnscaledValue(ws_wholesale_cost#33))#46, sum(UnscaledValue(ws_sales_price#34))#47] -Results [6]: [d_year#12 AS ws_sold_year#48, ws_item_sk#29, ws_bill_customer_sk#30 AS ws_customer_sk#49, sum(cast(ws_quantity#32 as bigint))#45 AS ws_qty#50, MakeDecimal(sum(UnscaledValue(ws_wholesale_cost#33))#46,17,2) AS ws_wc#51, MakeDecimal(sum(UnscaledValue(ws_sales_price#34))#47,17,2) AS ws_sp#52] +Functions [3]: [sum(ws_quantity#32), sum(UnscaledValue(ws_wholesale_cost#33)), sum(UnscaledValue(ws_sales_price#34))] +Aggregate Attributes [3]: [sum(ws_quantity#32)#45, sum(UnscaledValue(ws_wholesale_cost#33))#46, sum(UnscaledValue(ws_sales_price#34))#47] +Results [6]: [d_year#12 AS ws_sold_year#48, ws_item_sk#29, ws_bill_customer_sk#30 AS ws_customer_sk#49, sum(ws_quantity#32)#45 AS ws_qty#50, MakeDecimal(sum(UnscaledValue(ws_wholesale_cost#33))#46,17,2) AS ws_wc#51, MakeDecimal(sum(UnscaledValue(ws_sales_price#34))#47,17,2) AS ws_sp#52] (36) Filter [codegen id : 7] Input [6]: [ws_sold_year#48, ws_item_sk#29, ws_customer_sk#49, ws_qty#50, ws_wc#51, ws_sp#52] @@ -303,20 +303,20 @@ Input [8]: [cs_sold_date_sk#54, cs_bill_customer_sk#55, cs_item_sk#56, cs_quanti (53) HashAggregate [codegen id : 10] Input [6]: [cs_bill_customer_sk#55, cs_item_sk#56, cs_quantity#58, cs_wholesale_cost#59, cs_sales_price#60, d_year#12] Keys [3]: [d_year#12, cs_item_sk#56, cs_bill_customer_sk#55] -Functions [3]: [partial_sum(cast(cs_quantity#58 as bigint)), partial_sum(UnscaledValue(cs_wholesale_cost#59)), partial_sum(UnscaledValue(cs_sales_price#60))] +Functions [3]: [partial_sum(cs_quantity#58), partial_sum(UnscaledValue(cs_wholesale_cost#59)), partial_sum(UnscaledValue(cs_sales_price#60))] Aggregate Attributes [3]: [sum#64, sum#65, sum#66] Results [6]: [d_year#12, cs_item_sk#56, cs_bill_customer_sk#55, sum#67, sum#68, sum#69] (54) Exchange Input [6]: [d_year#12, cs_item_sk#56, cs_bill_customer_sk#55, sum#67, sum#68, sum#69] -Arguments: hashpartitioning(d_year#12, cs_item_sk#56, cs_bill_customer_sk#55, 5), true, [id=#70] +Arguments: hashpartitioning(d_year#12, cs_item_sk#56, cs_bill_customer_sk#55, 5), ENSURE_REQUIREMENTS, [id=#70] (55) HashAggregate [codegen id : 11] Input [6]: [d_year#12, cs_item_sk#56, cs_bill_customer_sk#55, sum#67, sum#68, sum#69] Keys [3]: [d_year#12, cs_item_sk#56, cs_bill_customer_sk#55] -Functions [3]: [sum(cast(cs_quantity#58 as bigint)), sum(UnscaledValue(cs_wholesale_cost#59)), sum(UnscaledValue(cs_sales_price#60))] -Aggregate Attributes [3]: [sum(cast(cs_quantity#58 as bigint))#71, sum(UnscaledValue(cs_wholesale_cost#59))#72, sum(UnscaledValue(cs_sales_price#60))#73] -Results [6]: [d_year#12 AS cs_sold_year#74, cs_item_sk#56, cs_bill_customer_sk#55 AS cs_customer_sk#75, sum(cast(cs_quantity#58 as bigint))#71 AS cs_qty#76, MakeDecimal(sum(UnscaledValue(cs_wholesale_cost#59))#72,17,2) AS cs_wc#77, MakeDecimal(sum(UnscaledValue(cs_sales_price#60))#73,17,2) AS cs_sp#78] +Functions [3]: [sum(cs_quantity#58), sum(UnscaledValue(cs_wholesale_cost#59)), sum(UnscaledValue(cs_sales_price#60))] +Aggregate Attributes [3]: [sum(cs_quantity#58)#71, sum(UnscaledValue(cs_wholesale_cost#59))#72, sum(UnscaledValue(cs_sales_price#60))#73] +Results [6]: [d_year#12 AS cs_sold_year#74, cs_item_sk#56, cs_bill_customer_sk#55 AS cs_customer_sk#75, sum(cs_quantity#58)#71 AS cs_qty#76, MakeDecimal(sum(UnscaledValue(cs_wholesale_cost#59))#72,17,2) AS cs_wc#77, MakeDecimal(sum(UnscaledValue(cs_sales_price#60))#73,17,2) AS cs_sp#78] (56) Filter [codegen id : 11] Input [6]: [cs_sold_year#74, cs_item_sk#56, cs_customer_sk#75, cs_qty#76, cs_wc#77, cs_sp#78] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q78/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q78/simplified.txt index 9770702831acc..1eac07610a701 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q78/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q78/simplified.txt @@ -4,7 +4,7 @@ TakeOrderedAndProject [ratio,ss_qty,ss_wc,ss_sp,other_chan_qty,other_chan_wholes BroadcastHashJoin [ss_sold_year,ss_item_sk,ss_customer_sk,cs_sold_year,cs_item_sk,cs_customer_sk] Project [ss_sold_year,ss_item_sk,ss_customer_sk,ss_qty,ss_wc,ss_sp,ws_qty,ws_wc,ws_sp] BroadcastHashJoin [ss_sold_year,ss_item_sk,ss_customer_sk,ws_sold_year,ws_item_sk,ws_customer_sk] - HashAggregate [d_year,ss_item_sk,ss_customer_sk,sum,sum,sum] [sum(cast(ss_quantity as bigint)),sum(UnscaledValue(ss_wholesale_cost)),sum(UnscaledValue(ss_sales_price)),ss_sold_year,ss_qty,ss_wc,ss_sp,sum,sum,sum] + HashAggregate [d_year,ss_item_sk,ss_customer_sk,sum,sum,sum] [sum(ss_quantity),sum(UnscaledValue(ss_wholesale_cost)),sum(UnscaledValue(ss_sales_price)),ss_sold_year,ss_qty,ss_wc,ss_sp,sum,sum,sum] InputAdapter Exchange [d_year,ss_item_sk,ss_customer_sk] #1 WholeStageCodegen (3) @@ -36,7 +36,7 @@ TakeOrderedAndProject [ratio,ss_qty,ss_wc,ss_sp,other_chan_qty,other_chan_wholes BroadcastExchange #4 WholeStageCodegen (7) Filter [ws_qty] - HashAggregate [d_year,ws_item_sk,ws_bill_customer_sk,sum,sum,sum] [sum(cast(ws_quantity as bigint)),sum(UnscaledValue(ws_wholesale_cost)),sum(UnscaledValue(ws_sales_price)),ws_sold_year,ws_customer_sk,ws_qty,ws_wc,ws_sp,sum,sum,sum] + HashAggregate [d_year,ws_item_sk,ws_bill_customer_sk,sum,sum,sum] [sum(ws_quantity),sum(UnscaledValue(ws_wholesale_cost)),sum(UnscaledValue(ws_sales_price)),ws_sold_year,ws_customer_sk,ws_qty,ws_wc,ws_sp,sum,sum,sum] InputAdapter Exchange [d_year,ws_item_sk,ws_bill_customer_sk] #5 WholeStageCodegen (6) @@ -63,7 +63,7 @@ TakeOrderedAndProject [ratio,ss_qty,ss_wc,ss_sp,other_chan_qty,other_chan_wholes BroadcastExchange #7 WholeStageCodegen (11) Filter [cs_qty] - HashAggregate [d_year,cs_item_sk,cs_bill_customer_sk,sum,sum,sum] [sum(cast(cs_quantity as bigint)),sum(UnscaledValue(cs_wholesale_cost)),sum(UnscaledValue(cs_sales_price)),cs_sold_year,cs_customer_sk,cs_qty,cs_wc,cs_sp,sum,sum,sum] + HashAggregate [d_year,cs_item_sk,cs_bill_customer_sk,sum,sum,sum] [sum(cs_quantity),sum(UnscaledValue(cs_wholesale_cost)),sum(UnscaledValue(cs_sales_price)),cs_sold_year,cs_customer_sk,cs_qty,cs_wc,cs_sp,sum,sum,sum] InputAdapter Exchange [d_year,cs_item_sk,cs_bill_customer_sk] #8 WholeStageCodegen (10) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q79.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q79.sf100/explain.txt index 2a3d68ee8b62e..d5adf09c08123 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q79.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q79.sf100/explain.txt @@ -154,7 +154,7 @@ Results [6]: [ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, s_city#19, sum (26) Exchange Input [6]: [ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, s_city#19, sum#23, sum#24] -Arguments: hashpartitioning(ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, s_city#19, 5), true, [id=#25] +Arguments: hashpartitioning(ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, s_city#19, 5), ENSURE_REQUIREMENTS, [id=#25] (27) HashAggregate [codegen id : 5] Input [6]: [ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, s_city#19, sum#23, sum#24] @@ -165,7 +165,7 @@ Results [5]: [ss_ticket_number#6, ss_customer_sk#2, s_city#19, MakeDecimal(sum(U (28) Exchange Input [5]: [ss_ticket_number#6, ss_customer_sk#2, s_city#19, amt#28, profit#29] -Arguments: hashpartitioning(ss_customer_sk#2, 5), true, [id=#30] +Arguments: hashpartitioning(ss_customer_sk#2, 5), ENSURE_REQUIREMENTS, [id=#30] (29) Sort [codegen id : 6] Input [5]: [ss_ticket_number#6, ss_customer_sk#2, s_city#19, amt#28, profit#29] @@ -187,7 +187,7 @@ Condition : isnotnull(c_customer_sk#31) (33) Exchange Input [3]: [c_customer_sk#31, c_first_name#32, c_last_name#33] -Arguments: hashpartitioning(c_customer_sk#31, 5), true, [id=#34] +Arguments: hashpartitioning(c_customer_sk#31, 5), ENSURE_REQUIREMENTS, [id=#34] (34) Sort [codegen id : 8] Input [3]: [c_customer_sk#31, c_first_name#32, c_last_name#33] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q79/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q79/explain.txt index 63cde726803b9..ce0fe5fcb8bb4 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q79/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q79/explain.txt @@ -151,7 +151,7 @@ Results [6]: [ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, s_city#15, sum (26) Exchange Input [6]: [ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, s_city#15, sum#23, sum#24] -Arguments: hashpartitioning(ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, s_city#15, 5), true, [id=#25] +Arguments: hashpartitioning(ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, s_city#15, 5), ENSURE_REQUIREMENTS, [id=#25] (27) HashAggregate [codegen id : 6] Input [6]: [ss_ticket_number#6, ss_customer_sk#2, ss_addr_sk#4, s_city#15, sum#23, sum#24] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q8.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q8.sf100/explain.txt index 8249e85adf218..71048acaa36ec 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q8.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q8.sf100/explain.txt @@ -128,7 +128,7 @@ Input [5]: [ss_store_sk#2, ss_net_profit#3, s_store_sk#8, s_store_name#9, s_zip# (17) Exchange Input [3]: [ss_net_profit#3, s_store_name#9, s_zip#10] -Arguments: hashpartitioning(substr(s_zip#10, 1, 2), 5), true, [id=#12] +Arguments: hashpartitioning(substr(s_zip#10, 1, 2), 5), ENSURE_REQUIREMENTS, [id=#12] (18) Sort [codegen id : 4] Input [3]: [ss_net_profit#3, s_store_name#9, s_zip#10] @@ -163,7 +163,7 @@ Condition : isnotnull(ca_address_sk#14) (25) Exchange Input [2]: [ca_address_sk#14, ca_zip#13] -Arguments: hashpartitioning(ca_address_sk#14, 5), true, [id=#15] +Arguments: hashpartitioning(ca_address_sk#14, 5), ENSURE_REQUIREMENTS, [id=#15] (26) Sort [codegen id : 6] Input [2]: [ca_address_sk#14, ca_zip#13] @@ -189,7 +189,7 @@ Input [2]: [c_current_addr_sk#16, c_preferred_cust_flag#17] (31) Exchange Input [1]: [c_current_addr_sk#16] -Arguments: hashpartitioning(c_current_addr_sk#16, 5), true, [id=#18] +Arguments: hashpartitioning(c_current_addr_sk#16, 5), ENSURE_REQUIREMENTS, [id=#18] (32) Sort [codegen id : 8] Input [1]: [c_current_addr_sk#16] @@ -213,7 +213,7 @@ Results [2]: [ca_zip#13, count#20] (36) Exchange Input [2]: [ca_zip#13, count#20] -Arguments: hashpartitioning(ca_zip#13, 5), true, [id=#21] +Arguments: hashpartitioning(ca_zip#13, 5), ENSURE_REQUIREMENTS, [id=#21] (37) HashAggregate [codegen id : 10] Input [2]: [ca_zip#13, count#20] @@ -252,7 +252,7 @@ Results [1]: [ca_zip#26] (44) Exchange Input [1]: [ca_zip#26] -Arguments: hashpartitioning(ca_zip#26, 5), true, [id=#27] +Arguments: hashpartitioning(ca_zip#26, 5), ENSURE_REQUIREMENTS, [id=#27] (45) HashAggregate [codegen id : 12] Input [1]: [ca_zip#26] @@ -263,7 +263,7 @@ Results [1]: [ca_zip#26] (46) Exchange Input [1]: [ca_zip#26] -Arguments: hashpartitioning(substr(ca_zip#26, 1, 2), 5), true, [id=#28] +Arguments: hashpartitioning(substr(ca_zip#26, 1, 2), 5), ENSURE_REQUIREMENTS, [id=#28] (47) Sort [codegen id : 13] Input [1]: [ca_zip#26] @@ -287,7 +287,7 @@ Results [2]: [s_store_name#9, sum#30] (51) Exchange Input [2]: [s_store_name#9, sum#30] -Arguments: hashpartitioning(s_store_name#9, 5), true, [id=#31] +Arguments: hashpartitioning(s_store_name#9, 5), ENSURE_REQUIREMENTS, [id=#31] (52) HashAggregate [codegen id : 15] Input [2]: [s_store_name#9, sum#30] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q8/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q8/explain.txt index e9f9a92a0b766..8d7bd31194626 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q8/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q8/explain.txt @@ -187,7 +187,7 @@ Results [2]: [ca_zip#12, count#18] (31) Exchange Input [2]: [ca_zip#12, count#18] -Arguments: hashpartitioning(ca_zip#12, 5), true, [id=#19] +Arguments: hashpartitioning(ca_zip#12, 5), ENSURE_REQUIREMENTS, [id=#19] (32) HashAggregate [codegen id : 5] Input [2]: [ca_zip#12, count#18] @@ -226,7 +226,7 @@ Results [1]: [ca_zip#24] (39) Exchange Input [1]: [ca_zip#24] -Arguments: hashpartitioning(ca_zip#24, 5), true, [id=#25] +Arguments: hashpartitioning(ca_zip#24, 5), ENSURE_REQUIREMENTS, [id=#25] (40) HashAggregate [codegen id : 7] Input [1]: [ca_zip#24] @@ -257,7 +257,7 @@ Results [2]: [s_store_name#9, sum#28] (45) Exchange Input [2]: [s_store_name#9, sum#28] -Arguments: hashpartitioning(s_store_name#9, 5), true, [id=#29] +Arguments: hashpartitioning(s_store_name#9, 5), ENSURE_REQUIREMENTS, [id=#29] (46) HashAggregate [codegen id : 9] Input [2]: [s_store_name#9, sum#28] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q80.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q80.sf100/explain.txt index 9ac081b356c94..bbb2a353c6f92 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q80.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q80.sf100/explain.txt @@ -125,7 +125,7 @@ Condition : (((isnotnull(ss_sold_date_sk#1) AND isnotnull(ss_store_sk#3)) AND is (4) Exchange Input [7]: [ss_sold_date_sk#1, ss_item_sk#2, ss_store_sk#3, ss_promo_sk#4, ss_ticket_number#5, ss_ext_sales_price#6, ss_net_profit#7] -Arguments: hashpartitioning(cast(ss_item_sk#2 as bigint), cast(ss_ticket_number#5 as bigint), 5), true, [id=#8] +Arguments: hashpartitioning(cast(ss_item_sk#2 as bigint), cast(ss_ticket_number#5 as bigint), 5), ENSURE_REQUIREMENTS, [id=#8] (5) Sort [codegen id : 2] Input [7]: [ss_sold_date_sk#1, ss_item_sk#2, ss_store_sk#3, ss_promo_sk#4, ss_ticket_number#5, ss_ext_sales_price#6, ss_net_profit#7] @@ -147,7 +147,7 @@ Condition : (isnotnull(sr_item_sk#9) AND isnotnull(sr_ticket_number#10)) (9) Exchange Input [4]: [sr_item_sk#9, sr_ticket_number#10, sr_return_amt#11, sr_net_loss#12] -Arguments: hashpartitioning(sr_item_sk#9, sr_ticket_number#10, 5), true, [id=#13] +Arguments: hashpartitioning(sr_item_sk#9, sr_ticket_number#10, 5), ENSURE_REQUIREMENTS, [id=#13] (10) Sort [codegen id : 4] Input [4]: [sr_item_sk#9, sr_ticket_number#10, sr_return_amt#11, sr_net_loss#12] @@ -291,7 +291,7 @@ Results [6]: [s_store_id#24, sum#31, sum#32, isEmpty#33, sum#34, isEmpty#35] (41) Exchange Input [6]: [s_store_id#24, sum#31, sum#32, isEmpty#33, sum#34, isEmpty#35] -Arguments: hashpartitioning(s_store_id#24, 5), true, [id=#36] +Arguments: hashpartitioning(s_store_id#24, 5), ENSURE_REQUIREMENTS, [id=#36] (42) HashAggregate [codegen id : 10] Input [6]: [s_store_id#24, sum#31, sum#32, isEmpty#33, sum#34, isEmpty#35] @@ -316,7 +316,7 @@ Condition : (((isnotnull(cs_sold_date_sk#45) AND isnotnull(cs_catalog_page_sk#46 (46) Exchange Input [7]: [cs_sold_date_sk#45, cs_catalog_page_sk#46, cs_item_sk#47, cs_promo_sk#48, cs_order_number#49, cs_ext_sales_price#50, cs_net_profit#51] -Arguments: hashpartitioning(cs_item_sk#47, cs_order_number#49, 5), true, [id=#52] +Arguments: hashpartitioning(cs_item_sk#47, cs_order_number#49, 5), ENSURE_REQUIREMENTS, [id=#52] (47) Sort [codegen id : 12] Input [7]: [cs_sold_date_sk#45, cs_catalog_page_sk#46, cs_item_sk#47, cs_promo_sk#48, cs_order_number#49, cs_ext_sales_price#50, cs_net_profit#51] @@ -338,7 +338,7 @@ Condition : (isnotnull(cr_item_sk#53) AND isnotnull(cr_order_number#54)) (51) Exchange Input [4]: [cr_item_sk#53, cr_order_number#54, cr_return_amount#55, cr_net_loss#56] -Arguments: hashpartitioning(cr_item_sk#53, cr_order_number#54, 5), true, [id=#57] +Arguments: hashpartitioning(cr_item_sk#53, cr_order_number#54, 5), ENSURE_REQUIREMENTS, [id=#57] (52) Sort [codegen id : 14] Input [4]: [cr_item_sk#53, cr_order_number#54, cr_return_amount#55, cr_net_loss#56] @@ -425,7 +425,7 @@ Results [6]: [cp_catalog_page_id#59, sum#66, sum#67, isEmpty#68, sum#69, isEmpty (71) Exchange Input [6]: [cp_catalog_page_id#59, sum#66, sum#67, isEmpty#68, sum#69, isEmpty#70] -Arguments: hashpartitioning(cp_catalog_page_id#59, 5), true, [id=#71] +Arguments: hashpartitioning(cp_catalog_page_id#59, 5), ENSURE_REQUIREMENTS, [id=#71] (72) HashAggregate [codegen id : 20] Input [6]: [cp_catalog_page_id#59, sum#66, sum#67, isEmpty#68, sum#69, isEmpty#70] @@ -450,7 +450,7 @@ Condition : (((isnotnull(ws_sold_date_sk#80) AND isnotnull(ws_web_site_sk#82)) A (76) Exchange Input [7]: [ws_sold_date_sk#80, ws_item_sk#81, ws_web_site_sk#82, ws_promo_sk#83, ws_order_number#84, ws_ext_sales_price#85, ws_net_profit#86] -Arguments: hashpartitioning(cast(ws_item_sk#81 as bigint), cast(ws_order_number#84 as bigint), 5), true, [id=#87] +Arguments: hashpartitioning(cast(ws_item_sk#81 as bigint), cast(ws_order_number#84 as bigint), 5), ENSURE_REQUIREMENTS, [id=#87] (77) Sort [codegen id : 22] Input [7]: [ws_sold_date_sk#80, ws_item_sk#81, ws_web_site_sk#82, ws_promo_sk#83, ws_order_number#84, ws_ext_sales_price#85, ws_net_profit#86] @@ -472,7 +472,7 @@ Condition : (isnotnull(wr_item_sk#88) AND isnotnull(wr_order_number#89)) (81) Exchange Input [4]: [wr_item_sk#88, wr_order_number#89, wr_return_amt#90, wr_net_loss#91] -Arguments: hashpartitioning(wr_item_sk#88, wr_order_number#89, 5), true, [id=#92] +Arguments: hashpartitioning(wr_item_sk#88, wr_order_number#89, 5), ENSURE_REQUIREMENTS, [id=#92] (82) Sort [codegen id : 24] Input [4]: [wr_item_sk#88, wr_order_number#89, wr_return_amt#90, wr_net_loss#91] @@ -559,7 +559,7 @@ Results [6]: [web_site_id#94, sum#101, sum#102, isEmpty#103, sum#104, isEmpty#10 (101) Exchange Input [6]: [web_site_id#94, sum#101, sum#102, isEmpty#103, sum#104, isEmpty#105] -Arguments: hashpartitioning(web_site_id#94, 5), true, [id=#106] +Arguments: hashpartitioning(web_site_id#94, 5), ENSURE_REQUIREMENTS, [id=#106] (102) HashAggregate [codegen id : 30] Input [6]: [web_site_id#94, sum#101, sum#102, isEmpty#103, sum#104, isEmpty#105] @@ -583,7 +583,7 @@ Results [9]: [channel#115, id#116, spark_grouping_id#117, sum#124, isEmpty#125, (106) Exchange Input [9]: [channel#115, id#116, spark_grouping_id#117, sum#124, isEmpty#125, sum#126, isEmpty#127, sum#128, isEmpty#129] -Arguments: hashpartitioning(channel#115, id#116, spark_grouping_id#117, 5), true, [id=#130] +Arguments: hashpartitioning(channel#115, id#116, spark_grouping_id#117, 5), ENSURE_REQUIREMENTS, [id=#130] (107) HashAggregate [codegen id : 32] Input [9]: [channel#115, id#116, spark_grouping_id#117, sum#124, isEmpty#125, sum#126, isEmpty#127, sum#128, isEmpty#129] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q80/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q80/explain.txt index 36b045bfd9129..070060b832e8f 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q80/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q80/explain.txt @@ -270,7 +270,7 @@ Results [6]: [s_store_id#17, sum#30, sum#31, isEmpty#32, sum#33, isEmpty#34] (38) Exchange Input [6]: [s_store_id#17, sum#30, sum#31, isEmpty#32, sum#33, isEmpty#34] -Arguments: hashpartitioning(s_store_id#17, 5), true, [id=#35] +Arguments: hashpartitioning(s_store_id#17, 5), ENSURE_REQUIREMENTS, [id=#35] (39) HashAggregate [codegen id : 7] Input [6]: [s_store_id#17, sum#30, sum#31, isEmpty#32, sum#33, isEmpty#34] @@ -392,7 +392,7 @@ Results [6]: [cp_catalog_page_id#57, sum#64, sum#65, isEmpty#66, sum#67, isEmpty (65) Exchange Input [6]: [cp_catalog_page_id#57, sum#64, sum#65, isEmpty#66, sum#67, isEmpty#68] -Arguments: hashpartitioning(cp_catalog_page_id#57, 5), true, [id=#69] +Arguments: hashpartitioning(cp_catalog_page_id#57, 5), ENSURE_REQUIREMENTS, [id=#69] (66) HashAggregate [codegen id : 14] Input [6]: [cp_catalog_page_id#57, sum#64, sum#65, isEmpty#66, sum#67, isEmpty#68] @@ -514,7 +514,7 @@ Results [6]: [web_site_id#91, sum#98, sum#99, isEmpty#100, sum#101, isEmpty#102] (92) Exchange Input [6]: [web_site_id#91, sum#98, sum#99, isEmpty#100, sum#101, isEmpty#102] -Arguments: hashpartitioning(web_site_id#91, 5), true, [id=#103] +Arguments: hashpartitioning(web_site_id#91, 5), ENSURE_REQUIREMENTS, [id=#103] (93) HashAggregate [codegen id : 21] Input [6]: [web_site_id#91, sum#98, sum#99, isEmpty#100, sum#101, isEmpty#102] @@ -538,7 +538,7 @@ Results [9]: [channel#112, id#113, spark_grouping_id#114, sum#121, isEmpty#122, (97) Exchange Input [9]: [channel#112, id#113, spark_grouping_id#114, sum#121, isEmpty#122, sum#123, isEmpty#124, sum#125, isEmpty#126] -Arguments: hashpartitioning(channel#112, id#113, spark_grouping_id#114, 5), true, [id=#127] +Arguments: hashpartitioning(channel#112, id#113, spark_grouping_id#114, 5), ENSURE_REQUIREMENTS, [id=#127] (98) HashAggregate [codegen id : 23] Input [9]: [channel#112, id#113, spark_grouping_id#114, sum#121, isEmpty#122, sum#123, isEmpty#124, sum#125, isEmpty#126] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q83.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q83.sf100/explain.txt index c41efb82d904c..85974a46ce791 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q83.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q83.sf100/explain.txt @@ -185,20 +185,20 @@ Input [4]: [sr_item_sk#2, sr_return_quantity#3, i_item_sk#12, i_item_id#13] (28) HashAggregate [codegen id : 5] Input [2]: [sr_return_quantity#3, i_item_id#13] Keys [1]: [i_item_id#13] -Functions [1]: [partial_sum(cast(sr_return_quantity#3 as bigint))] +Functions [1]: [partial_sum(sr_return_quantity#3)] Aggregate Attributes [1]: [sum#15] Results [2]: [i_item_id#13, sum#16] (29) Exchange Input [2]: [i_item_id#13, sum#16] -Arguments: hashpartitioning(i_item_id#13, 5), true, [id=#17] +Arguments: hashpartitioning(i_item_id#13, 5), ENSURE_REQUIREMENTS, [id=#17] (30) HashAggregate [codegen id : 18] Input [2]: [i_item_id#13, sum#16] Keys [1]: [i_item_id#13] -Functions [1]: [sum(cast(sr_return_quantity#3 as bigint))] -Aggregate Attributes [1]: [sum(cast(sr_return_quantity#3 as bigint))#18] -Results [2]: [i_item_id#13 AS item_id#19, sum(cast(sr_return_quantity#3 as bigint))#18 AS sr_item_qty#20] +Functions [1]: [sum(sr_return_quantity#3)] +Aggregate Attributes [1]: [sum(sr_return_quantity#3)#18] +Results [2]: [i_item_id#13 AS item_id#19, sum(sr_return_quantity#3)#18 AS sr_item_qty#20] (31) Scan parquet default.catalog_returns Output [3]: [cr_returned_date_sk#21, cr_item_sk#22, cr_return_quantity#23] @@ -241,20 +241,20 @@ Input [4]: [cr_item_sk#22, cr_return_quantity#23, i_item_sk#12, i_item_id#13] (40) HashAggregate [codegen id : 10] Input [2]: [cr_return_quantity#23, i_item_id#13] Keys [1]: [i_item_id#13] -Functions [1]: [partial_sum(cast(cr_return_quantity#23 as bigint))] +Functions [1]: [partial_sum(cr_return_quantity#23)] Aggregate Attributes [1]: [sum#24] Results [2]: [i_item_id#13, sum#25] (41) Exchange Input [2]: [i_item_id#13, sum#25] -Arguments: hashpartitioning(i_item_id#13, 5), true, [id=#26] +Arguments: hashpartitioning(i_item_id#13, 5), ENSURE_REQUIREMENTS, [id=#26] (42) HashAggregate [codegen id : 11] Input [2]: [i_item_id#13, sum#25] Keys [1]: [i_item_id#13] -Functions [1]: [sum(cast(cr_return_quantity#23 as bigint))] -Aggregate Attributes [1]: [sum(cast(cr_return_quantity#23 as bigint))#27] -Results [2]: [i_item_id#13 AS item_id#28, sum(cast(cr_return_quantity#23 as bigint))#27 AS cr_item_qty#29] +Functions [1]: [sum(cr_return_quantity#23)] +Aggregate Attributes [1]: [sum(cr_return_quantity#23)#27] +Results [2]: [i_item_id#13 AS item_id#28, sum(cr_return_quantity#23)#27 AS cr_item_qty#29] (43) BroadcastExchange Input [2]: [item_id#28, cr_item_qty#29] @@ -310,20 +310,20 @@ Input [4]: [wr_item_sk#32, wr_return_quantity#33, i_item_sk#12, i_item_id#13] (55) HashAggregate [codegen id : 16] Input [2]: [wr_return_quantity#33, i_item_id#13] Keys [1]: [i_item_id#13] -Functions [1]: [partial_sum(cast(wr_return_quantity#33 as bigint))] +Functions [1]: [partial_sum(wr_return_quantity#33)] Aggregate Attributes [1]: [sum#34] Results [2]: [i_item_id#13, sum#35] (56) Exchange Input [2]: [i_item_id#13, sum#35] -Arguments: hashpartitioning(i_item_id#13, 5), true, [id=#36] +Arguments: hashpartitioning(i_item_id#13, 5), ENSURE_REQUIREMENTS, [id=#36] (57) HashAggregate [codegen id : 17] Input [2]: [i_item_id#13, sum#35] Keys [1]: [i_item_id#13] -Functions [1]: [sum(cast(wr_return_quantity#33 as bigint))] -Aggregate Attributes [1]: [sum(cast(wr_return_quantity#33 as bigint))#37] -Results [2]: [i_item_id#13 AS item_id#38, sum(cast(wr_return_quantity#33 as bigint))#37 AS wr_item_qty#39] +Functions [1]: [sum(wr_return_quantity#33)] +Aggregate Attributes [1]: [sum(wr_return_quantity#33)#37] +Results [2]: [i_item_id#13 AS item_id#38, sum(wr_return_quantity#33)#37 AS wr_item_qty#39] (58) BroadcastExchange Input [2]: [item_id#38, wr_item_qty#39] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q83.sf100/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q83.sf100/simplified.txt index 7d93f4458f95e..a51499e01a8e2 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q83.sf100/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q83.sf100/simplified.txt @@ -4,7 +4,7 @@ TakeOrderedAndProject [item_id,sr_item_qty,sr_dev,cr_item_qty,cr_dev,wr_item_qty BroadcastHashJoin [item_id,item_id] Project [item_id,sr_item_qty,cr_item_qty] BroadcastHashJoin [item_id,item_id] - HashAggregate [i_item_id,sum] [sum(cast(sr_return_quantity as bigint)),item_id,sr_item_qty,sum] + HashAggregate [i_item_id,sum] [sum(sr_return_quantity),item_id,sr_item_qty,sum] InputAdapter Exchange [i_item_id] #1 WholeStageCodegen (5) @@ -52,7 +52,7 @@ TakeOrderedAndProject [item_id,sr_item_qty,sr_dev,cr_item_qty,cr_dev,wr_item_qty InputAdapter BroadcastExchange #6 WholeStageCodegen (11) - HashAggregate [i_item_id,sum] [sum(cast(cr_return_quantity as bigint)),item_id,cr_item_qty,sum] + HashAggregate [i_item_id,sum] [sum(cr_return_quantity),item_id,cr_item_qty,sum] InputAdapter Exchange [i_item_id] #7 WholeStageCodegen (10) @@ -72,7 +72,7 @@ TakeOrderedAndProject [item_id,sr_item_qty,sr_dev,cr_item_qty,cr_dev,wr_item_qty InputAdapter BroadcastExchange #8 WholeStageCodegen (17) - HashAggregate [i_item_id,sum] [sum(cast(wr_return_quantity as bigint)),item_id,wr_item_qty,sum] + HashAggregate [i_item_id,sum] [sum(wr_return_quantity),item_id,wr_item_qty,sum] InputAdapter Exchange [i_item_id] #9 WholeStageCodegen (16) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q83/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q83/explain.txt index 0d44a01466dd9..0def759f7d8bc 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q83/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q83/explain.txt @@ -185,20 +185,20 @@ Input [4]: [sr_returned_date_sk#1, sr_return_quantity#3, i_item_id#5, d_date_sk# (28) HashAggregate [codegen id : 5] Input [2]: [sr_return_quantity#3, i_item_id#5] Keys [1]: [i_item_id#5] -Functions [1]: [partial_sum(cast(sr_return_quantity#3 as bigint))] +Functions [1]: [partial_sum(sr_return_quantity#3)] Aggregate Attributes [1]: [sum#15] Results [2]: [i_item_id#5, sum#16] (29) Exchange Input [2]: [i_item_id#5, sum#16] -Arguments: hashpartitioning(i_item_id#5, 5), true, [id=#17] +Arguments: hashpartitioning(i_item_id#5, 5), ENSURE_REQUIREMENTS, [id=#17] (30) HashAggregate [codegen id : 18] Input [2]: [i_item_id#5, sum#16] Keys [1]: [i_item_id#5] -Functions [1]: [sum(cast(sr_return_quantity#3 as bigint))] -Aggregate Attributes [1]: [sum(cast(sr_return_quantity#3 as bigint))#18] -Results [2]: [i_item_id#5 AS item_id#19, sum(cast(sr_return_quantity#3 as bigint))#18 AS sr_item_qty#20] +Functions [1]: [sum(sr_return_quantity#3)] +Aggregate Attributes [1]: [sum(sr_return_quantity#3)#18] +Results [2]: [i_item_id#5 AS item_id#19, sum(sr_return_quantity#3)#18 AS sr_item_qty#20] (31) Scan parquet default.catalog_returns Output [3]: [cr_returned_date_sk#21, cr_item_sk#22, cr_return_quantity#23] @@ -241,20 +241,20 @@ Input [4]: [cr_returned_date_sk#21, cr_return_quantity#23, i_item_id#5, d_date_s (40) HashAggregate [codegen id : 10] Input [2]: [cr_return_quantity#23, i_item_id#5] Keys [1]: [i_item_id#5] -Functions [1]: [partial_sum(cast(cr_return_quantity#23 as bigint))] +Functions [1]: [partial_sum(cr_return_quantity#23)] Aggregate Attributes [1]: [sum#24] Results [2]: [i_item_id#5, sum#25] (41) Exchange Input [2]: [i_item_id#5, sum#25] -Arguments: hashpartitioning(i_item_id#5, 5), true, [id=#26] +Arguments: hashpartitioning(i_item_id#5, 5), ENSURE_REQUIREMENTS, [id=#26] (42) HashAggregate [codegen id : 11] Input [2]: [i_item_id#5, sum#25] Keys [1]: [i_item_id#5] -Functions [1]: [sum(cast(cr_return_quantity#23 as bigint))] -Aggregate Attributes [1]: [sum(cast(cr_return_quantity#23 as bigint))#27] -Results [2]: [i_item_id#5 AS item_id#28, sum(cast(cr_return_quantity#23 as bigint))#27 AS cr_item_qty#29] +Functions [1]: [sum(cr_return_quantity#23)] +Aggregate Attributes [1]: [sum(cr_return_quantity#23)#27] +Results [2]: [i_item_id#5 AS item_id#28, sum(cr_return_quantity#23)#27 AS cr_item_qty#29] (43) BroadcastExchange Input [2]: [item_id#28, cr_item_qty#29] @@ -310,20 +310,20 @@ Input [4]: [wr_returned_date_sk#31, wr_return_quantity#33, i_item_id#5, d_date_s (55) HashAggregate [codegen id : 16] Input [2]: [wr_return_quantity#33, i_item_id#5] Keys [1]: [i_item_id#5] -Functions [1]: [partial_sum(cast(wr_return_quantity#33 as bigint))] +Functions [1]: [partial_sum(wr_return_quantity#33)] Aggregate Attributes [1]: [sum#34] Results [2]: [i_item_id#5, sum#35] (56) Exchange Input [2]: [i_item_id#5, sum#35] -Arguments: hashpartitioning(i_item_id#5, 5), true, [id=#36] +Arguments: hashpartitioning(i_item_id#5, 5), ENSURE_REQUIREMENTS, [id=#36] (57) HashAggregate [codegen id : 17] Input [2]: [i_item_id#5, sum#35] Keys [1]: [i_item_id#5] -Functions [1]: [sum(cast(wr_return_quantity#33 as bigint))] -Aggregate Attributes [1]: [sum(cast(wr_return_quantity#33 as bigint))#37] -Results [2]: [i_item_id#5 AS item_id#38, sum(cast(wr_return_quantity#33 as bigint))#37 AS wr_item_qty#39] +Functions [1]: [sum(wr_return_quantity#33)] +Aggregate Attributes [1]: [sum(wr_return_quantity#33)#37] +Results [2]: [i_item_id#5 AS item_id#38, sum(wr_return_quantity#33)#37 AS wr_item_qty#39] (58) BroadcastExchange Input [2]: [item_id#38, wr_item_qty#39] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q83/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q83/simplified.txt index c12d5ffaaf914..061e8192fe3c4 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q83/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q83/simplified.txt @@ -4,7 +4,7 @@ TakeOrderedAndProject [item_id,sr_item_qty,sr_dev,cr_item_qty,cr_dev,wr_item_qty BroadcastHashJoin [item_id,item_id] Project [item_id,sr_item_qty,cr_item_qty] BroadcastHashJoin [item_id,item_id] - HashAggregate [i_item_id,sum] [sum(cast(sr_return_quantity as bigint)),item_id,sr_item_qty,sum] + HashAggregate [i_item_id,sum] [sum(sr_return_quantity),item_id,sr_item_qty,sum] InputAdapter Exchange [i_item_id] #1 WholeStageCodegen (5) @@ -52,7 +52,7 @@ TakeOrderedAndProject [item_id,sr_item_qty,sr_dev,cr_item_qty,cr_dev,wr_item_qty InputAdapter BroadcastExchange #6 WholeStageCodegen (11) - HashAggregate [i_item_id,sum] [sum(cast(cr_return_quantity as bigint)),item_id,cr_item_qty,sum] + HashAggregate [i_item_id,sum] [sum(cr_return_quantity),item_id,cr_item_qty,sum] InputAdapter Exchange [i_item_id] #7 WholeStageCodegen (10) @@ -72,7 +72,7 @@ TakeOrderedAndProject [item_id,sr_item_qty,sr_dev,cr_item_qty,cr_dev,wr_item_qty InputAdapter BroadcastExchange #8 WholeStageCodegen (17) - HashAggregate [i_item_id,sum] [sum(cast(wr_return_quantity as bigint)),item_id,wr_item_qty,sum] + HashAggregate [i_item_id,sum] [sum(wr_return_quantity),item_id,wr_item_qty,sum] InputAdapter Exchange [i_item_id] #9 WholeStageCodegen (16) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q85.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q85.sf100/explain.txt index cdef75fa0fa47..7e28a720b95aa 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q85.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q85.sf100/explain.txt @@ -296,7 +296,7 @@ Input [11]: [ws_quantity#5, ws_sales_price#6, wr_refunded_cdemo_sk#12, wr_return (54) HashAggregate [codegen id : 14] Input [4]: [ws_quantity#5, wr_fee#17, wr_refunded_cash#18, r_reason_desc#24] Keys [1]: [r_reason_desc#24] -Functions [3]: [partial_avg(cast(ws_quantity#5 as bigint)), partial_avg(UnscaledValue(wr_refunded_cash#18)), partial_avg(UnscaledValue(wr_fee#17))] +Functions [3]: [partial_avg(ws_quantity#5), partial_avg(UnscaledValue(wr_refunded_cash#18)), partial_avg(UnscaledValue(wr_fee#17))] Aggregate Attributes [6]: [sum#39, count#40, sum#41, count#42, sum#43, count#44] Results [7]: [r_reason_desc#24, sum#45, count#46, sum#47, count#48, sum#49, count#50] @@ -307,9 +307,9 @@ Arguments: hashpartitioning(r_reason_desc#24, 5), ENSURE_REQUIREMENTS, [id=#51] (56) HashAggregate [codegen id : 15] Input [7]: [r_reason_desc#24, sum#45, count#46, sum#47, count#48, sum#49, count#50] Keys [1]: [r_reason_desc#24] -Functions [3]: [avg(cast(ws_quantity#5 as bigint)), avg(UnscaledValue(wr_refunded_cash#18)), avg(UnscaledValue(wr_fee#17))] -Aggregate Attributes [3]: [avg(cast(ws_quantity#5 as bigint))#52, avg(UnscaledValue(wr_refunded_cash#18))#53, avg(UnscaledValue(wr_fee#17))#54] -Results [4]: [substr(r_reason_desc#24, 1, 20) AS substr(r_reason_desc, 1, 20)#55, avg(cast(ws_quantity#5 as bigint))#52 AS avg(ws_quantity)#56, cast((avg(UnscaledValue(wr_refunded_cash#18))#53 / 100.0) as decimal(11,6)) AS avg(wr_refunded_cash)#57, cast((avg(UnscaledValue(wr_fee#17))#54 / 100.0) as decimal(11,6)) AS avg(wr_fee)#58] +Functions [3]: [avg(ws_quantity#5), avg(UnscaledValue(wr_refunded_cash#18)), avg(UnscaledValue(wr_fee#17))] +Aggregate Attributes [3]: [avg(ws_quantity#5)#52, avg(UnscaledValue(wr_refunded_cash#18))#53, avg(UnscaledValue(wr_fee#17))#54] +Results [4]: [substr(r_reason_desc#24, 1, 20) AS substr(r_reason_desc, 1, 20)#55, avg(ws_quantity#5)#52 AS avg(ws_quantity)#56, cast((avg(UnscaledValue(wr_refunded_cash#18))#53 / 100.0) as decimal(11,6)) AS avg(wr_refunded_cash)#57, cast((avg(UnscaledValue(wr_fee#17))#54 / 100.0) as decimal(11,6)) AS avg(wr_fee)#58] (57) TakeOrderedAndProject Input [4]: [substr(r_reason_desc, 1, 20)#55, avg(ws_quantity)#56, avg(wr_refunded_cash)#57, avg(wr_fee)#58] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q85.sf100/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q85.sf100/simplified.txt index 236afa30baf23..e77298a2450fb 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q85.sf100/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q85.sf100/simplified.txt @@ -1,6 +1,6 @@ TakeOrderedAndProject [substr(r_reason_desc, 1, 20),avg(ws_quantity),avg(wr_refunded_cash),avg(wr_fee)] WholeStageCodegen (15) - HashAggregate [r_reason_desc,sum,count,sum,count,sum,count] [avg(cast(ws_quantity as bigint)),avg(UnscaledValue(wr_refunded_cash)),avg(UnscaledValue(wr_fee)),substr(r_reason_desc, 1, 20),avg(ws_quantity),avg(wr_refunded_cash),avg(wr_fee),sum,count,sum,count,sum,count] + HashAggregate [r_reason_desc,sum,count,sum,count,sum,count] [avg(ws_quantity),avg(UnscaledValue(wr_refunded_cash)),avg(UnscaledValue(wr_fee)),substr(r_reason_desc, 1, 20),avg(ws_quantity),avg(wr_refunded_cash),avg(wr_fee),sum,count,sum,count,sum,count] InputAdapter Exchange [r_reason_desc] #1 WholeStageCodegen (14) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q85/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q85/explain.txt index 23598c2e72708..86a45be4b84c3 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q85/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q85/explain.txt @@ -266,7 +266,7 @@ Input [6]: [ws_quantity#5, wr_reason_sk#12, wr_fee#14, wr_refunded_cash#15, r_re (48) HashAggregate [codegen id : 8] Input [4]: [ws_quantity#5, wr_fee#14, wr_refunded_cash#15, r_reason_desc#35] Keys [1]: [r_reason_desc#35] -Functions [3]: [partial_avg(cast(ws_quantity#5 as bigint)), partial_avg(UnscaledValue(wr_refunded_cash#15)), partial_avg(UnscaledValue(wr_fee#14))] +Functions [3]: [partial_avg(ws_quantity#5), partial_avg(UnscaledValue(wr_refunded_cash#15)), partial_avg(UnscaledValue(wr_fee#14))] Aggregate Attributes [6]: [sum#37, count#38, sum#39, count#40, sum#41, count#42] Results [7]: [r_reason_desc#35, sum#43, count#44, sum#45, count#46, sum#47, count#48] @@ -277,9 +277,9 @@ Arguments: hashpartitioning(r_reason_desc#35, 5), ENSURE_REQUIREMENTS, [id=#49] (50) HashAggregate [codegen id : 9] Input [7]: [r_reason_desc#35, sum#43, count#44, sum#45, count#46, sum#47, count#48] Keys [1]: [r_reason_desc#35] -Functions [3]: [avg(cast(ws_quantity#5 as bigint)), avg(UnscaledValue(wr_refunded_cash#15)), avg(UnscaledValue(wr_fee#14))] -Aggregate Attributes [3]: [avg(cast(ws_quantity#5 as bigint))#50, avg(UnscaledValue(wr_refunded_cash#15))#51, avg(UnscaledValue(wr_fee#14))#52] -Results [4]: [substr(r_reason_desc#35, 1, 20) AS substr(r_reason_desc, 1, 20)#53, avg(cast(ws_quantity#5 as bigint))#50 AS avg(ws_quantity)#54, cast((avg(UnscaledValue(wr_refunded_cash#15))#51 / 100.0) as decimal(11,6)) AS avg(wr_refunded_cash)#55, cast((avg(UnscaledValue(wr_fee#14))#52 / 100.0) as decimal(11,6)) AS avg(wr_fee)#56] +Functions [3]: [avg(ws_quantity#5), avg(UnscaledValue(wr_refunded_cash#15)), avg(UnscaledValue(wr_fee#14))] +Aggregate Attributes [3]: [avg(ws_quantity#5)#50, avg(UnscaledValue(wr_refunded_cash#15))#51, avg(UnscaledValue(wr_fee#14))#52] +Results [4]: [substr(r_reason_desc#35, 1, 20) AS substr(r_reason_desc, 1, 20)#53, avg(ws_quantity#5)#50 AS avg(ws_quantity)#54, cast((avg(UnscaledValue(wr_refunded_cash#15))#51 / 100.0) as decimal(11,6)) AS avg(wr_refunded_cash)#55, cast((avg(UnscaledValue(wr_fee#14))#52 / 100.0) as decimal(11,6)) AS avg(wr_fee)#56] (51) TakeOrderedAndProject Input [4]: [substr(r_reason_desc, 1, 20)#53, avg(ws_quantity)#54, avg(wr_refunded_cash)#55, avg(wr_fee)#56] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q85/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q85/simplified.txt index b958737162784..67140d90e1547 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q85/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q85/simplified.txt @@ -1,6 +1,6 @@ TakeOrderedAndProject [substr(r_reason_desc, 1, 20),avg(ws_quantity),avg(wr_refunded_cash),avg(wr_fee)] WholeStageCodegen (9) - HashAggregate [r_reason_desc,sum,count,sum,count,sum,count] [avg(cast(ws_quantity as bigint)),avg(UnscaledValue(wr_refunded_cash)),avg(UnscaledValue(wr_fee)),substr(r_reason_desc, 1, 20),avg(ws_quantity),avg(wr_refunded_cash),avg(wr_fee),sum,count,sum,count,sum,count] + HashAggregate [r_reason_desc,sum,count,sum,count,sum,count] [avg(ws_quantity),avg(UnscaledValue(wr_refunded_cash)),avg(UnscaledValue(wr_fee)),substr(r_reason_desc, 1, 20),avg(ws_quantity),avg(wr_refunded_cash),avg(wr_fee),sum,count,sum,count,sum,count] InputAdapter Exchange [r_reason_desc] #1 WholeStageCodegen (8) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q86.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q86.sf100/explain.txt index 20ae4d244dcd8..7bbb5599214eb 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q86.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q86.sf100/explain.txt @@ -111,18 +111,18 @@ Results [4]: [i_category#11, i_class#12, spark_grouping_id#13, sum#15] (19) Exchange Input [4]: [i_category#11, i_class#12, spark_grouping_id#13, sum#15] -Arguments: hashpartitioning(i_category#11, i_class#12, spark_grouping_id#13, 5), true, [id=#16] +Arguments: hashpartitioning(i_category#11, i_class#12, spark_grouping_id#13, 5), ENSURE_REQUIREMENTS, [id=#16] (20) HashAggregate [codegen id : 4] Input [4]: [i_category#11, i_class#12, spark_grouping_id#13, sum#15] Keys [3]: [i_category#11, i_class#12, spark_grouping_id#13] Functions [1]: [sum(UnscaledValue(ws_net_paid#3))] Aggregate Attributes [1]: [sum(UnscaledValue(ws_net_paid#3))#17] -Results [7]: [MakeDecimal(sum(UnscaledValue(ws_net_paid#3))#17,17,2) AS total_sum#18, i_category#11, i_class#12, (cast((shiftright(spark_grouping_id#13, 1) & 1) as tinyint) + cast((shiftright(spark_grouping_id#13, 0) & 1) as tinyint)) AS lochierarchy#19, (cast((shiftright(spark_grouping_id#13, 1) & 1) as tinyint) + cast((shiftright(spark_grouping_id#13, 0) & 1) as tinyint)) AS _w1#20, CASE WHEN (cast(cast((shiftright(spark_grouping_id#13, 0) & 1) as tinyint) as int) = 0) THEN i_category#11 END AS _w2#21, MakeDecimal(sum(UnscaledValue(ws_net_paid#3))#17,17,2) AS _w3#22] +Results [7]: [MakeDecimal(sum(UnscaledValue(ws_net_paid#3))#17,17,2) AS total_sum#18, i_category#11, i_class#12, (cast((shiftright(spark_grouping_id#13, 1) & 1) as tinyint) + cast((shiftright(spark_grouping_id#13, 0) & 1) as tinyint)) AS lochierarchy#19, (cast((shiftright(spark_grouping_id#13, 1) & 1) as tinyint) + cast((shiftright(spark_grouping_id#13, 0) & 1) as tinyint)) AS _w1#20, CASE WHEN (cast((shiftright(spark_grouping_id#13, 0) & 1) as tinyint) = 0) THEN i_category#11 END AS _w2#21, MakeDecimal(sum(UnscaledValue(ws_net_paid#3))#17,17,2) AS _w3#22] (21) Exchange Input [7]: [total_sum#18, i_category#11, i_class#12, lochierarchy#19, _w1#20, _w2#21, _w3#22] -Arguments: hashpartitioning(_w1#20, _w2#21, 5), true, [id=#23] +Arguments: hashpartitioning(_w1#20, _w2#21, 5), ENSURE_REQUIREMENTS, [id=#23] (22) Sort [codegen id : 5] Input [7]: [total_sum#18, i_category#11, i_class#12, lochierarchy#19, _w1#20, _w2#21, _w3#22] @@ -138,5 +138,5 @@ Input [8]: [total_sum#18, i_category#11, i_class#12, lochierarchy#19, _w1#20, _w (25) TakeOrderedAndProject Input [5]: [total_sum#18, i_category#11, i_class#12, lochierarchy#19, rank_within_parent#24] -Arguments: 100, [lochierarchy#19 DESC NULLS LAST, CASE WHEN (cast(lochierarchy#19 as int) = 0) THEN i_category#11 END ASC NULLS FIRST, rank_within_parent#24 ASC NULLS FIRST], [total_sum#18, i_category#11, i_class#12, lochierarchy#19, rank_within_parent#24] +Arguments: 100, [lochierarchy#19 DESC NULLS LAST, CASE WHEN (lochierarchy#19 = 0) THEN i_category#11 END ASC NULLS FIRST, rank_within_parent#24 ASC NULLS FIRST], [total_sum#18, i_category#11, i_class#12, lochierarchy#19, rank_within_parent#24] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q86/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q86/explain.txt index 20ae4d244dcd8..7bbb5599214eb 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q86/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q86/explain.txt @@ -111,18 +111,18 @@ Results [4]: [i_category#11, i_class#12, spark_grouping_id#13, sum#15] (19) Exchange Input [4]: [i_category#11, i_class#12, spark_grouping_id#13, sum#15] -Arguments: hashpartitioning(i_category#11, i_class#12, spark_grouping_id#13, 5), true, [id=#16] +Arguments: hashpartitioning(i_category#11, i_class#12, spark_grouping_id#13, 5), ENSURE_REQUIREMENTS, [id=#16] (20) HashAggregate [codegen id : 4] Input [4]: [i_category#11, i_class#12, spark_grouping_id#13, sum#15] Keys [3]: [i_category#11, i_class#12, spark_grouping_id#13] Functions [1]: [sum(UnscaledValue(ws_net_paid#3))] Aggregate Attributes [1]: [sum(UnscaledValue(ws_net_paid#3))#17] -Results [7]: [MakeDecimal(sum(UnscaledValue(ws_net_paid#3))#17,17,2) AS total_sum#18, i_category#11, i_class#12, (cast((shiftright(spark_grouping_id#13, 1) & 1) as tinyint) + cast((shiftright(spark_grouping_id#13, 0) & 1) as tinyint)) AS lochierarchy#19, (cast((shiftright(spark_grouping_id#13, 1) & 1) as tinyint) + cast((shiftright(spark_grouping_id#13, 0) & 1) as tinyint)) AS _w1#20, CASE WHEN (cast(cast((shiftright(spark_grouping_id#13, 0) & 1) as tinyint) as int) = 0) THEN i_category#11 END AS _w2#21, MakeDecimal(sum(UnscaledValue(ws_net_paid#3))#17,17,2) AS _w3#22] +Results [7]: [MakeDecimal(sum(UnscaledValue(ws_net_paid#3))#17,17,2) AS total_sum#18, i_category#11, i_class#12, (cast((shiftright(spark_grouping_id#13, 1) & 1) as tinyint) + cast((shiftright(spark_grouping_id#13, 0) & 1) as tinyint)) AS lochierarchy#19, (cast((shiftright(spark_grouping_id#13, 1) & 1) as tinyint) + cast((shiftright(spark_grouping_id#13, 0) & 1) as tinyint)) AS _w1#20, CASE WHEN (cast((shiftright(spark_grouping_id#13, 0) & 1) as tinyint) = 0) THEN i_category#11 END AS _w2#21, MakeDecimal(sum(UnscaledValue(ws_net_paid#3))#17,17,2) AS _w3#22] (21) Exchange Input [7]: [total_sum#18, i_category#11, i_class#12, lochierarchy#19, _w1#20, _w2#21, _w3#22] -Arguments: hashpartitioning(_w1#20, _w2#21, 5), true, [id=#23] +Arguments: hashpartitioning(_w1#20, _w2#21, 5), ENSURE_REQUIREMENTS, [id=#23] (22) Sort [codegen id : 5] Input [7]: [total_sum#18, i_category#11, i_class#12, lochierarchy#19, _w1#20, _w2#21, _w3#22] @@ -138,5 +138,5 @@ Input [8]: [total_sum#18, i_category#11, i_class#12, lochierarchy#19, _w1#20, _w (25) TakeOrderedAndProject Input [5]: [total_sum#18, i_category#11, i_class#12, lochierarchy#19, rank_within_parent#24] -Arguments: 100, [lochierarchy#19 DESC NULLS LAST, CASE WHEN (cast(lochierarchy#19 as int) = 0) THEN i_category#11 END ASC NULLS FIRST, rank_within_parent#24 ASC NULLS FIRST], [total_sum#18, i_category#11, i_class#12, lochierarchy#19, rank_within_parent#24] +Arguments: 100, [lochierarchy#19 DESC NULLS LAST, CASE WHEN (lochierarchy#19 = 0) THEN i_category#11 END ASC NULLS FIRST, rank_within_parent#24 ASC NULLS FIRST], [total_sum#18, i_category#11, i_class#12, lochierarchy#19, rank_within_parent#24] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q89.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q89.sf100/explain.txt index 0d47735a1138d..16b5dc7ab26aa 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q89.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q89.sf100/explain.txt @@ -140,7 +140,7 @@ Results [7]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_nam (24) Exchange Input [7]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, sum#19] -Arguments: hashpartitioning(i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, 5), true, [id=#20] +Arguments: hashpartitioning(i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, 5), ENSURE_REQUIREMENTS, [id=#20] (25) HashAggregate [codegen id : 5] Input [7]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, sum#19] @@ -151,7 +151,7 @@ Results [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_nam (26) Exchange Input [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, sum_sales#22, _w0#23] -Arguments: hashpartitioning(i_category#4, i_brand#2, s_store_name#15, s_company_name#16, 5), true, [id=#24] +Arguments: hashpartitioning(i_category#4, i_brand#2, s_store_name#15, s_company_name#16, 5), ENSURE_REQUIREMENTS, [id=#24] (27) Sort [codegen id : 6] Input [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, sum_sales#22, _w0#23] @@ -163,7 +163,7 @@ Arguments: [avg(_w0#23) windowspecdefinition(i_category#4, i_brand#2, s_store_na (29) Filter [codegen id : 7] Input [9]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, sum_sales#22, _w0#23, avg_monthly_sales#25] -Condition : (CASE WHEN NOT (avg_monthly_sales#25 = 0.000000) THEN CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#22 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#25 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_monthly_sales#25 as decimal(22,6)))), DecimalType(38,16), true) ELSE null END > 0.1000000000000000) +Condition : ((isnotnull(avg_monthly_sales#25) AND NOT (avg_monthly_sales#25 = 0.000000)) AND (CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#22 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#25 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_monthly_sales#25 as decimal(22,6)))), DecimalType(38,16), true) > 0.1000000000000000)) (30) Project [codegen id : 7] Output [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, sum_sales#22, avg_monthly_sales#25] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q89/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q89/explain.txt index 8dca84461a4f6..e57f86df44747 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q89/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q89/explain.txt @@ -140,18 +140,18 @@ Results [7]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_nam (24) Exchange Input [7]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, sum#19] -Arguments: hashpartitioning(i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, 5), true, [id=#20] +Arguments: hashpartitioning(i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, 5), ENSURE_REQUIREMENTS, [id=#20] (25) HashAggregate [codegen id : 5] Input [7]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, sum#19] Keys [6]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12] Functions [1]: [sum(UnscaledValue(ss_sales_price#8))] Aggregate Attributes [1]: [sum(UnscaledValue(ss_sales_price#8))#21] -Results [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, MakeDecimal(sum(UnscaledValue(ss_sales_price#8))#21,17,2) AS sum_sales#22, MakeDecimal(sum(UnscaledValue(ss_sales_price#8))#21,17,2) AS _w0#23] +Results [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, MakeDecimal(sum(UnscaledValue(ss_sales_price#8))#21,17,2) AS sum_sales#22, cast(MakeDecimal(sum(UnscaledValue(ss_sales_price#8))#21,17,2) as bigint) AS _w0#23] (26) Exchange Input [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, sum_sales#22, _w0#23] -Arguments: hashpartitioning(i_category#4, i_brand#2, s_store_name#15, s_company_name#16, 5), true, [id=#24] +Arguments: hashpartitioning(i_category#4, i_brand#2, s_store_name#15, s_company_name#16, 5), ENSURE_REQUIREMENTS, [id=#24] (27) Sort [codegen id : 6] Input [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, sum_sales#22, _w0#23] @@ -163,7 +163,7 @@ Arguments: [avg(_w0#23) windowspecdefinition(i_category#4, i_brand#2, s_store_na (29) Filter [codegen id : 7] Input [9]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, sum_sales#22, _w0#23, avg_monthly_sales#25] -Condition : (CASE WHEN NOT (avg_monthly_sales#25 = 0.000000) THEN CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#22 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#25 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_monthly_sales#25 as decimal(22,6)))), DecimalType(38,16), true) ELSE null END > 0.1000000000000000) +Condition : (((isnotnull(avg_monthly_sales#25) AND isnotnull(sum_sales#22)) AND NOT (avg_monthly_sales#25 = 0.0)) AND ((abs((cast(sum_sales#22 as double) - avg_monthly_sales#25)) / avg_monthly_sales#25) > 0.1)) (30) Project [codegen id : 7] Output [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, sum_sales#22, avg_monthly_sales#25] @@ -171,5 +171,5 @@ Input [9]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name# (31) TakeOrderedAndProject Input [8]: [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, sum_sales#22, avg_monthly_sales#25] -Arguments: 100, [CheckOverflow((promote_precision(cast(sum_sales#22 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#25 as decimal(22,6)))), DecimalType(22,6), true) ASC NULLS FIRST, s_store_name#15 ASC NULLS FIRST], [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, sum_sales#22, avg_monthly_sales#25] +Arguments: 100, [(cast(sum_sales#22 as double) - avg_monthly_sales#25) ASC NULLS FIRST, s_store_name#15 ASC NULLS FIRST], [i_category#4, i_class#3, i_brand#2, s_store_name#15, s_company_name#16, d_moy#12, sum_sales#22, avg_monthly_sales#25] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q9.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q9.sf100/explain.txt index 55f7977b231d5..d3e4d1fa2840e 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q9.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q9.sf100/explain.txt @@ -62,7 +62,7 @@ Results [1]: [count#39] (10) Exchange Input [1]: [count#39] -Arguments: SinglePartition, true, [id=#40] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#40] (11) HashAggregate [codegen id : 2] Input [1]: [count#39] @@ -108,7 +108,7 @@ Results [2]: [sum#46, count#47] (17) Exchange Input [2]: [sum#46, count#47] -Arguments: SinglePartition, true, [id=#48] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#48] (18) HashAggregate [codegen id : 2] Input [2]: [sum#46, count#47] @@ -154,7 +154,7 @@ Results [2]: [sum#54, count#55] (24) Exchange Input [2]: [sum#54, count#55] -Arguments: SinglePartition, true, [id=#56] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#56] (25) HashAggregate [codegen id : 2] Input [2]: [sum#54, count#55] @@ -200,7 +200,7 @@ Results [1]: [count#60] (31) Exchange Input [1]: [count#60] -Arguments: SinglePartition, true, [id=#61] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#61] (32) HashAggregate [codegen id : 2] Input [1]: [count#60] @@ -246,7 +246,7 @@ Results [2]: [sum#66, count#67] (38) Exchange Input [2]: [sum#66, count#67] -Arguments: SinglePartition, true, [id=#68] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#68] (39) HashAggregate [codegen id : 2] Input [2]: [sum#66, count#67] @@ -292,7 +292,7 @@ Results [2]: [sum#73, count#74] (45) Exchange Input [2]: [sum#73, count#74] -Arguments: SinglePartition, true, [id=#75] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#75] (46) HashAggregate [codegen id : 2] Input [2]: [sum#73, count#74] @@ -338,7 +338,7 @@ Results [1]: [count#79] (52) Exchange Input [1]: [count#79] -Arguments: SinglePartition, true, [id=#80] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#80] (53) HashAggregate [codegen id : 2] Input [1]: [count#79] @@ -384,7 +384,7 @@ Results [2]: [sum#85, count#86] (59) Exchange Input [2]: [sum#85, count#86] -Arguments: SinglePartition, true, [id=#87] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#87] (60) HashAggregate [codegen id : 2] Input [2]: [sum#85, count#86] @@ -430,7 +430,7 @@ Results [2]: [sum#92, count#93] (66) Exchange Input [2]: [sum#92, count#93] -Arguments: SinglePartition, true, [id=#94] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#94] (67) HashAggregate [codegen id : 2] Input [2]: [sum#92, count#93] @@ -476,7 +476,7 @@ Results [1]: [count#98] (73) Exchange Input [1]: [count#98] -Arguments: SinglePartition, true, [id=#99] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#99] (74) HashAggregate [codegen id : 2] Input [1]: [count#98] @@ -522,7 +522,7 @@ Results [2]: [sum#104, count#105] (80) Exchange Input [2]: [sum#104, count#105] -Arguments: SinglePartition, true, [id=#106] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#106] (81) HashAggregate [codegen id : 2] Input [2]: [sum#104, count#105] @@ -568,7 +568,7 @@ Results [2]: [sum#111, count#112] (87) Exchange Input [2]: [sum#111, count#112] -Arguments: SinglePartition, true, [id=#113] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#113] (88) HashAggregate [codegen id : 2] Input [2]: [sum#111, count#112] @@ -614,7 +614,7 @@ Results [1]: [count#117] (94) Exchange Input [1]: [count#117] -Arguments: SinglePartition, true, [id=#118] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#118] (95) HashAggregate [codegen id : 2] Input [1]: [count#117] @@ -660,7 +660,7 @@ Results [2]: [sum#123, count#124] (101) Exchange Input [2]: [sum#123, count#124] -Arguments: SinglePartition, true, [id=#125] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#125] (102) HashAggregate [codegen id : 2] Input [2]: [sum#123, count#124] @@ -706,7 +706,7 @@ Results [2]: [sum#130, count#131] (108) Exchange Input [2]: [sum#130, count#131] -Arguments: SinglePartition, true, [id=#132] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#132] (109) HashAggregate [codegen id : 2] Input [2]: [sum#130, count#131] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q9/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q9/explain.txt index 55f7977b231d5..d3e4d1fa2840e 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q9/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q9/explain.txt @@ -62,7 +62,7 @@ Results [1]: [count#39] (10) Exchange Input [1]: [count#39] -Arguments: SinglePartition, true, [id=#40] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#40] (11) HashAggregate [codegen id : 2] Input [1]: [count#39] @@ -108,7 +108,7 @@ Results [2]: [sum#46, count#47] (17) Exchange Input [2]: [sum#46, count#47] -Arguments: SinglePartition, true, [id=#48] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#48] (18) HashAggregate [codegen id : 2] Input [2]: [sum#46, count#47] @@ -154,7 +154,7 @@ Results [2]: [sum#54, count#55] (24) Exchange Input [2]: [sum#54, count#55] -Arguments: SinglePartition, true, [id=#56] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#56] (25) HashAggregate [codegen id : 2] Input [2]: [sum#54, count#55] @@ -200,7 +200,7 @@ Results [1]: [count#60] (31) Exchange Input [1]: [count#60] -Arguments: SinglePartition, true, [id=#61] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#61] (32) HashAggregate [codegen id : 2] Input [1]: [count#60] @@ -246,7 +246,7 @@ Results [2]: [sum#66, count#67] (38) Exchange Input [2]: [sum#66, count#67] -Arguments: SinglePartition, true, [id=#68] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#68] (39) HashAggregate [codegen id : 2] Input [2]: [sum#66, count#67] @@ -292,7 +292,7 @@ Results [2]: [sum#73, count#74] (45) Exchange Input [2]: [sum#73, count#74] -Arguments: SinglePartition, true, [id=#75] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#75] (46) HashAggregate [codegen id : 2] Input [2]: [sum#73, count#74] @@ -338,7 +338,7 @@ Results [1]: [count#79] (52) Exchange Input [1]: [count#79] -Arguments: SinglePartition, true, [id=#80] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#80] (53) HashAggregate [codegen id : 2] Input [1]: [count#79] @@ -384,7 +384,7 @@ Results [2]: [sum#85, count#86] (59) Exchange Input [2]: [sum#85, count#86] -Arguments: SinglePartition, true, [id=#87] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#87] (60) HashAggregate [codegen id : 2] Input [2]: [sum#85, count#86] @@ -430,7 +430,7 @@ Results [2]: [sum#92, count#93] (66) Exchange Input [2]: [sum#92, count#93] -Arguments: SinglePartition, true, [id=#94] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#94] (67) HashAggregate [codegen id : 2] Input [2]: [sum#92, count#93] @@ -476,7 +476,7 @@ Results [1]: [count#98] (73) Exchange Input [1]: [count#98] -Arguments: SinglePartition, true, [id=#99] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#99] (74) HashAggregate [codegen id : 2] Input [1]: [count#98] @@ -522,7 +522,7 @@ Results [2]: [sum#104, count#105] (80) Exchange Input [2]: [sum#104, count#105] -Arguments: SinglePartition, true, [id=#106] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#106] (81) HashAggregate [codegen id : 2] Input [2]: [sum#104, count#105] @@ -568,7 +568,7 @@ Results [2]: [sum#111, count#112] (87) Exchange Input [2]: [sum#111, count#112] -Arguments: SinglePartition, true, [id=#113] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#113] (88) HashAggregate [codegen id : 2] Input [2]: [sum#111, count#112] @@ -614,7 +614,7 @@ Results [1]: [count#117] (94) Exchange Input [1]: [count#117] -Arguments: SinglePartition, true, [id=#118] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#118] (95) HashAggregate [codegen id : 2] Input [1]: [count#117] @@ -660,7 +660,7 @@ Results [2]: [sum#123, count#124] (101) Exchange Input [2]: [sum#123, count#124] -Arguments: SinglePartition, true, [id=#125] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#125] (102) HashAggregate [codegen id : 2] Input [2]: [sum#123, count#124] @@ -706,7 +706,7 @@ Results [2]: [sum#130, count#131] (108) Exchange Input [2]: [sum#130, count#131] -Arguments: SinglePartition, true, [id=#132] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#132] (109) HashAggregate [codegen id : 2] Input [2]: [sum#130, count#131] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q91/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q91/explain.txt index 1956baf782417..2f9881aafbeea 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q91/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q91/explain.txt @@ -245,7 +245,7 @@ Results [6]: [cc_call_center_id#2, cc_name#3, cc_manager#4, cd_marital_status#23 (44) Exchange Input [6]: [cc_call_center_id#2, cc_name#3, cc_manager#4, cd_marital_status#23, cd_education_status#24, sum#30] -Arguments: hashpartitioning(cc_call_center_id#2, cc_name#3, cc_manager#4, cd_marital_status#23, cd_education_status#24, 5), true, [id=#31] +Arguments: hashpartitioning(cc_call_center_id#2, cc_name#3, cc_manager#4, cd_marital_status#23, cd_education_status#24, 5), ENSURE_REQUIREMENTS, [id=#31] (45) HashAggregate [codegen id : 8] Input [6]: [cc_call_center_id#2, cc_name#3, cc_manager#4, cd_marital_status#23, cd_education_status#24, sum#30] @@ -256,7 +256,7 @@ Results [4]: [cc_call_center_id#2 AS Call_Center#33, cc_name#3 AS Call_Center_Na (46) Exchange Input [4]: [Call_Center#33, Call_Center_Name#34, Manager#35, Returns_Loss#36] -Arguments: rangepartitioning(Returns_Loss#36 DESC NULLS LAST, 5), true, [id=#37] +Arguments: rangepartitioning(Returns_Loss#36 DESC NULLS LAST, 5), ENSURE_REQUIREMENTS, [id=#37] (47) Sort [codegen id : 9] Input [4]: [Call_Center#33, Call_Center_Name#34, Manager#35, Returns_Loss#36] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q93.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q93.sf100/explain.txt index 5b4635e0bd67a..96283662e9ec5 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q93.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q93.sf100/explain.txt @@ -70,7 +70,7 @@ Input [5]: [sr_item_sk#1, sr_reason_sk#2, sr_ticket_number#3, sr_return_quantity (11) Exchange Input [3]: [sr_item_sk#1, sr_ticket_number#3, sr_return_quantity#4] -Arguments: hashpartitioning(sr_item_sk#1, sr_ticket_number#3, 5), true, [id=#8] +Arguments: hashpartitioning(sr_item_sk#1, sr_ticket_number#3, 5), ENSURE_REQUIREMENTS, [id=#8] (12) Sort [codegen id : 3] Input [3]: [sr_item_sk#1, sr_ticket_number#3, sr_return_quantity#4] @@ -87,7 +87,7 @@ Input [5]: [ss_item_sk#9, ss_customer_sk#10, ss_ticket_number#11, ss_quantity#12 (15) Exchange Input [5]: [ss_item_sk#9, ss_customer_sk#10, ss_ticket_number#11, ss_quantity#12, ss_sales_price#13] -Arguments: hashpartitioning(cast(ss_item_sk#9 as bigint), cast(ss_ticket_number#11 as bigint), 5), true, [id=#14] +Arguments: hashpartitioning(cast(ss_item_sk#9 as bigint), cast(ss_ticket_number#11 as bigint), 5), ENSURE_REQUIREMENTS, [id=#14] (16) Sort [codegen id : 5] Input [5]: [ss_item_sk#9, ss_customer_sk#10, ss_ticket_number#11, ss_quantity#12, ss_sales_price#13] @@ -111,7 +111,7 @@ Results [3]: [ss_customer_sk#10, sum#18, isEmpty#19] (20) Exchange Input [3]: [ss_customer_sk#10, sum#18, isEmpty#19] -Arguments: hashpartitioning(ss_customer_sk#10, 5), true, [id=#20] +Arguments: hashpartitioning(ss_customer_sk#10, 5), ENSURE_REQUIREMENTS, [id=#20] (21) HashAggregate [codegen id : 7] Input [3]: [ss_customer_sk#10, sum#18, isEmpty#19] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q93/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q93/explain.txt index 620aa672770e1..744fc4f3b832e 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q93/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q93/explain.txt @@ -96,7 +96,7 @@ Results [3]: [ss_customer_sk#2, sum#17, isEmpty#18] (17) Exchange Input [3]: [ss_customer_sk#2, sum#17, isEmpty#18] -Arguments: hashpartitioning(ss_customer_sk#2, 5), true, [id=#19] +Arguments: hashpartitioning(ss_customer_sk#2, 5), ENSURE_REQUIREMENTS, [id=#19] (18) HashAggregate [codegen id : 4] Input [3]: [ss_customer_sk#2, sum#17, isEmpty#18] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q94.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q94.sf100/explain.txt index 43390c5048a6d..a6adced6c5ce6 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q94.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q94.sf100/explain.txt @@ -64,7 +64,7 @@ Condition : ((isnotnull(ws_ship_date_sk#1) AND isnotnull(ws_ship_addr_sk#2)) AND (4) Exchange Input [7]: [ws_ship_date_sk#1, ws_ship_addr_sk#2, ws_web_site_sk#3, ws_warehouse_sk#4, ws_order_number#5, ws_ext_ship_cost#6, ws_net_profit#7] -Arguments: hashpartitioning(ws_order_number#5, 5), true, [id=#8] +Arguments: hashpartitioning(ws_order_number#5, 5), ENSURE_REQUIREMENTS, [id=#8] (5) Sort [codegen id : 2] Input [7]: [ws_ship_date_sk#1, ws_ship_addr_sk#2, ws_web_site_sk#3, ws_warehouse_sk#4, ws_order_number#5, ws_ext_ship_cost#6, ws_net_profit#7] @@ -85,7 +85,7 @@ Input [2]: [ws_warehouse_sk#4, ws_order_number#5] (9) Exchange Input [2]: [ws_warehouse_sk#4#9, ws_order_number#5#10] -Arguments: hashpartitioning(ws_order_number#5#10, 5), true, [id=#11] +Arguments: hashpartitioning(ws_order_number#5#10, 5), ENSURE_REQUIREMENTS, [id=#11] (10) Sort [codegen id : 4] Input [2]: [ws_warehouse_sk#4#9, ws_order_number#5#10] @@ -102,7 +102,7 @@ Input [7]: [ws_ship_date_sk#1, ws_ship_addr_sk#2, ws_web_site_sk#3, ws_warehouse (13) Exchange Input [6]: [ws_ship_date_sk#1, ws_ship_addr_sk#2, ws_web_site_sk#3, ws_order_number#5, ws_ext_ship_cost#6, ws_net_profit#7] -Arguments: hashpartitioning(cast(ws_order_number#5 as bigint), 5), true, [id=#12] +Arguments: hashpartitioning(cast(ws_order_number#5 as bigint), 5), ENSURE_REQUIREMENTS, [id=#12] (14) Sort [codegen id : 6] Input [6]: [ws_ship_date_sk#1, ws_ship_addr_sk#2, ws_web_site_sk#3, ws_order_number#5, ws_ext_ship_cost#6, ws_net_profit#7] @@ -119,7 +119,7 @@ Input [1]: [wr_order_number#13] (17) Exchange Input [1]: [wr_order_number#13] -Arguments: hashpartitioning(wr_order_number#13, 5), true, [id=#14] +Arguments: hashpartitioning(wr_order_number#13, 5), ENSURE_REQUIREMENTS, [id=#14] (18) Sort [codegen id : 8] Input [1]: [wr_order_number#13] @@ -232,7 +232,7 @@ Results [3]: [ws_order_number#5, sum#26, sum#27] (42) Exchange Input [3]: [ws_order_number#5, sum#26, sum#27] -Arguments: hashpartitioning(ws_order_number#5, 5), true, [id=#28] +Arguments: hashpartitioning(ws_order_number#5, 5), ENSURE_REQUIREMENTS, [id=#28] (43) HashAggregate [codegen id : 13] Input [3]: [ws_order_number#5, sum#26, sum#27] @@ -250,7 +250,7 @@ Results [3]: [sum#26, sum#27, count#30] (45) Exchange Input [3]: [sum#26, sum#27, count#30] -Arguments: SinglePartition, true, [id=#31] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#31] (46) HashAggregate [codegen id : 14] Input [3]: [sum#26, sum#27, count#30] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q94/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q94/explain.txt index 2abbe4f9b8390..0e019868c0308 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q94/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q94/explain.txt @@ -202,7 +202,7 @@ Results [3]: [ws_order_number#5, sum#24, sum#25] (36) Exchange Input [3]: [ws_order_number#5, sum#24, sum#25] -Arguments: hashpartitioning(ws_order_number#5, 5), true, [id=#26] +Arguments: hashpartitioning(ws_order_number#5, 5), ENSURE_REQUIREMENTS, [id=#26] (37) HashAggregate [codegen id : 7] Input [3]: [ws_order_number#5, sum#24, sum#25] @@ -220,7 +220,7 @@ Results [3]: [sum#24, sum#25, count#28] (39) Exchange Input [3]: [sum#24, sum#25, count#28] -Arguments: SinglePartition, true, [id=#29] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#29] (40) HashAggregate [codegen id : 8] Input [3]: [sum#24, sum#25, count#28] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q95.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q95.sf100/explain.txt index 547792f3d7ae4..0e1fabb89798d 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q95.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q95.sf100/explain.txt @@ -78,7 +78,7 @@ Condition : ((isnotnull(ws_ship_date_sk#1) AND isnotnull(ws_ship_addr_sk#2)) AND (4) Exchange Input [6]: [ws_ship_date_sk#1, ws_ship_addr_sk#2, ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6] -Arguments: hashpartitioning(ws_order_number#4, 5), true, [id=#7] +Arguments: hashpartitioning(ws_order_number#4, 5), ENSURE_REQUIREMENTS, [id=#7] (5) Sort [codegen id : 2] Input [6]: [ws_ship_date_sk#1, ws_ship_addr_sk#2, ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6] @@ -100,7 +100,7 @@ Condition : (isnotnull(ws_order_number#4) AND isnotnull(ws_warehouse_sk#8)) (9) Exchange Input [2]: [ws_warehouse_sk#8, ws_order_number#4] -Arguments: hashpartitioning(ws_order_number#4, 5), true, [id=#9] +Arguments: hashpartitioning(ws_order_number#4, 5), ENSURE_REQUIREMENTS, [id=#9] (10) Sort [codegen id : 4] Input [2]: [ws_warehouse_sk#8, ws_order_number#4] @@ -129,7 +129,7 @@ Join condition: None (16) Exchange Input [6]: [ws_ship_date_sk#1, ws_ship_addr_sk#2, ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6] -Arguments: hashpartitioning(cast(ws_order_number#4 as bigint), 5), true, [id=#13] +Arguments: hashpartitioning(cast(ws_order_number#4 as bigint), 5), ENSURE_REQUIREMENTS, [id=#13] (17) Sort [codegen id : 8] Input [6]: [ws_ship_date_sk#1, ws_ship_addr_sk#2, ws_web_site_sk#3, ws_order_number#4, ws_ext_ship_cost#5, ws_net_profit#6] @@ -160,7 +160,7 @@ Input [4]: [ws_warehouse_sk#8, ws_order_number#4, ws_warehouse_sk#14, ws_order_n (24) Exchange Input [1]: [ws_order_number#4] -Arguments: hashpartitioning(cast(ws_order_number#4 as bigint), 5), true, [id=#16] +Arguments: hashpartitioning(cast(ws_order_number#4 as bigint), 5), ENSURE_REQUIREMENTS, [id=#16] (25) Sort [codegen id : 14] Input [1]: [ws_order_number#4] @@ -182,7 +182,7 @@ Condition : isnotnull(wr_order_number#17) (29) Exchange Input [1]: [wr_order_number#17] -Arguments: hashpartitioning(wr_order_number#17, 5), true, [id=#18] +Arguments: hashpartitioning(wr_order_number#17, 5), ENSURE_REQUIREMENTS, [id=#18] (30) Sort [codegen id : 16] Input [1]: [wr_order_number#17] @@ -304,7 +304,7 @@ Results [3]: [ws_order_number#4, sum#30, sum#31] (56) Exchange Input [3]: [ws_order_number#4, sum#30, sum#31] -Arguments: hashpartitioning(ws_order_number#4, 5), true, [id=#32] +Arguments: hashpartitioning(ws_order_number#4, 5), ENSURE_REQUIREMENTS, [id=#32] (57) HashAggregate [codegen id : 22] Input [3]: [ws_order_number#4, sum#30, sum#31] @@ -322,7 +322,7 @@ Results [3]: [sum#30, sum#31, count#34] (59) Exchange Input [3]: [sum#30, sum#31, count#34] -Arguments: SinglePartition, true, [id=#35] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#35] (60) HashAggregate [codegen id : 23] Input [3]: [sum#30, sum#31, count#34] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q95/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q95/explain.txt index 1cc99e296383f..3173477cff924 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q95/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q95/explain.txt @@ -285,7 +285,7 @@ Results [3]: [ws_order_number#4, sum#29, sum#30] (51) Exchange Input [3]: [ws_order_number#4, sum#29, sum#30] -Arguments: hashpartitioning(ws_order_number#4, 5), true, [id=#31] +Arguments: hashpartitioning(ws_order_number#4, 5), ENSURE_REQUIREMENTS, [id=#31] (52) HashAggregate [codegen id : 10] Input [3]: [ws_order_number#4, sum#29, sum#30] @@ -303,7 +303,7 @@ Results [3]: [sum#29, sum#30, count#33] (54) Exchange Input [3]: [sum#29, sum#30, count#33] -Arguments: SinglePartition, true, [id=#34] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#34] (55) HashAggregate [codegen id : 11] Input [3]: [sum#29, sum#30, count#33] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q98.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q98.sf100/explain.txt index 30dabdd2d5523..213175dc26f97 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q98.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q98.sf100/explain.txt @@ -77,7 +77,7 @@ Input [4]: [ss_sold_date_sk#1, ss_item_sk#2, ss_ext_sales_price#3, d_date_sk#4] (11) Exchange Input [2]: [ss_item_sk#2, ss_ext_sales_price#3] -Arguments: hashpartitioning(ss_item_sk#2, 5), true, [id=#7] +Arguments: hashpartitioning(ss_item_sk#2, 5), ENSURE_REQUIREMENTS, [id=#7] (12) Sort [codegen id : 3] Input [2]: [ss_item_sk#2, ss_ext_sales_price#3] @@ -99,7 +99,7 @@ Condition : (i_category#13 IN (Sports,Books,Home) AND isnotnull(i_item_sk#8)) (16) Exchange Input [6]: [i_item_sk#8, i_item_id#9, i_item_desc#10, i_current_price#11, i_class#12, i_category#13] -Arguments: hashpartitioning(i_item_sk#8, 5), true, [id=#14] +Arguments: hashpartitioning(i_item_sk#8, 5), ENSURE_REQUIREMENTS, [id=#14] (17) Sort [codegen id : 5] Input [6]: [i_item_sk#8, i_item_id#9, i_item_desc#10, i_current_price#11, i_class#12, i_category#13] @@ -123,7 +123,7 @@ Results [6]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_ (21) Exchange Input [6]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, sum#16] -Arguments: hashpartitioning(i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, 5), true, [id=#17] +Arguments: hashpartitioning(i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, 5), ENSURE_REQUIREMENTS, [id=#17] (22) HashAggregate [codegen id : 7] Input [6]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, sum#16] @@ -134,7 +134,7 @@ Results [8]: [i_item_desc#10, i_category#13, i_class#12, i_current_price#11, Mak (23) Exchange Input [8]: [i_item_desc#10, i_category#13, i_class#12, i_current_price#11, itemrevenue#19, _w0#20, _w1#21, i_item_id#9] -Arguments: hashpartitioning(i_class#12, 5), true, [id=#22] +Arguments: hashpartitioning(i_class#12, 5), ENSURE_REQUIREMENTS, [id=#22] (24) Sort [codegen id : 8] Input [8]: [i_item_desc#10, i_category#13, i_class#12, i_current_price#11, itemrevenue#19, _w0#20, _w1#21, i_item_id#9] @@ -150,7 +150,7 @@ Input [9]: [i_item_desc#10, i_category#13, i_class#12, i_current_price#11, itemr (27) Exchange Input [7]: [i_item_desc#10, i_category#13, i_class#12, i_current_price#11, itemrevenue#19, revenueratio#24, i_item_id#9] -Arguments: rangepartitioning(i_category#13 ASC NULLS FIRST, i_class#12 ASC NULLS FIRST, i_item_id#9 ASC NULLS FIRST, i_item_desc#10 ASC NULLS FIRST, revenueratio#24 ASC NULLS FIRST, 5), true, [id=#25] +Arguments: rangepartitioning(i_category#13 ASC NULLS FIRST, i_class#12 ASC NULLS FIRST, i_item_id#9 ASC NULLS FIRST, i_item_desc#10 ASC NULLS FIRST, revenueratio#24 ASC NULLS FIRST, 5), ENSURE_REQUIREMENTS, [id=#25] (28) Sort [codegen id : 10] Input [7]: [i_item_desc#10, i_category#13, i_class#12, i_current_price#11, itemrevenue#19, revenueratio#24, i_item_id#9] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q98/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q98/explain.txt index 11519207de0ec..a0b47efae10ba 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q98/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v1_4/q98/explain.txt @@ -108,7 +108,7 @@ Results [6]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_pri (18) Exchange Input [6]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, sum#15] -Arguments: hashpartitioning(i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, 5), true, [id=#16] +Arguments: hashpartitioning(i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, 5), ENSURE_REQUIREMENTS, [id=#16] (19) HashAggregate [codegen id : 4] Input [6]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, sum#15] @@ -119,7 +119,7 @@ Results [8]: [i_item_desc#6, i_category#9, i_class#8, i_current_price#7, MakeDec (20) Exchange Input [8]: [i_item_desc#6, i_category#9, i_class#8, i_current_price#7, itemrevenue#18, _w0#19, _w1#20, i_item_id#5] -Arguments: hashpartitioning(i_class#8, 5), true, [id=#21] +Arguments: hashpartitioning(i_class#8, 5), ENSURE_REQUIREMENTS, [id=#21] (21) Sort [codegen id : 5] Input [8]: [i_item_desc#6, i_category#9, i_class#8, i_current_price#7, itemrevenue#18, _w0#19, _w1#20, i_item_id#5] @@ -135,7 +135,7 @@ Input [9]: [i_item_desc#6, i_category#9, i_class#8, i_current_price#7, itemreven (24) Exchange Input [7]: [i_item_desc#6, i_category#9, i_class#8, i_current_price#7, itemrevenue#18, revenueratio#23, i_item_id#5] -Arguments: rangepartitioning(i_category#9 ASC NULLS FIRST, i_class#8 ASC NULLS FIRST, i_item_id#5 ASC NULLS FIRST, i_item_desc#6 ASC NULLS FIRST, revenueratio#23 ASC NULLS FIRST, 5), true, [id=#24] +Arguments: rangepartitioning(i_category#9 ASC NULLS FIRST, i_class#8 ASC NULLS FIRST, i_item_id#5 ASC NULLS FIRST, i_item_desc#6 ASC NULLS FIRST, revenueratio#23 ASC NULLS FIRST, 5), ENSURE_REQUIREMENTS, [id=#24] (25) Sort [codegen id : 7] Input [7]: [i_item_desc#6, i_category#9, i_class#8, i_current_price#7, itemrevenue#18, revenueratio#23, i_item_id#5] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q11.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q11.sf100/explain.txt index ab502fd0933f0..d320b757183d4 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q11.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q11.sf100/explain.txt @@ -130,7 +130,7 @@ Input [6]: [ss_sold_date_sk#1, ss_customer_sk#2, ss_ext_discount_amt#3, ss_ext_l (10) Exchange Input [4]: [ss_customer_sk#2, ss_ext_discount_amt#3, ss_ext_list_price#4, d_year#6] -Arguments: hashpartitioning(ss_customer_sk#2, 5), true, [id=#8] +Arguments: hashpartitioning(ss_customer_sk#2, 5), ENSURE_REQUIREMENTS, [id=#8] (11) Sort [codegen id : 3] Input [4]: [ss_customer_sk#2, ss_ext_discount_amt#3, ss_ext_list_price#4, d_year#6] @@ -152,7 +152,7 @@ Condition : (isnotnull(c_customer_sk#9) AND isnotnull(c_customer_id#10)) (15) Exchange Input [8]: [c_customer_sk#9, c_customer_id#10, c_first_name#11, c_last_name#12, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16] -Arguments: hashpartitioning(c_customer_sk#9, 5), true, [id=#17] +Arguments: hashpartitioning(c_customer_sk#9, 5), ENSURE_REQUIREMENTS, [id=#17] (16) Sort [codegen id : 5] Input [8]: [c_customer_sk#9, c_customer_id#10, c_first_name#11, c_last_name#12, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16] @@ -176,7 +176,7 @@ Results [9]: [c_customer_id#10, c_first_name#11, c_last_name#12, d_year#6, c_pre (20) Exchange Input [9]: [c_customer_id#10, c_first_name#11, c_last_name#12, d_year#6, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, sum#19] -Arguments: hashpartitioning(c_customer_id#10, c_first_name#11, c_last_name#12, d_year#6, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, 5), true, [id=#20] +Arguments: hashpartitioning(c_customer_id#10, c_first_name#11, c_last_name#12, d_year#6, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, 5), ENSURE_REQUIREMENTS, [id=#20] (21) HashAggregate [codegen id : 7] Input [9]: [c_customer_id#10, c_first_name#11, c_last_name#12, d_year#6, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, sum#19] @@ -191,7 +191,7 @@ Condition : (isnotnull(year_total#23) AND (year_total#23 > 0.00)) (23) Exchange Input [2]: [customer_id#22, year_total#23] -Arguments: hashpartitioning(customer_id#22, 5), true, [id=#24] +Arguments: hashpartitioning(customer_id#22, 5), ENSURE_REQUIREMENTS, [id=#24] (24) Sort [codegen id : 8] Input [2]: [customer_id#22, year_total#23] @@ -240,7 +240,7 @@ Input [6]: [ss_sold_date_sk#1, ss_customer_sk#2, ss_ext_discount_amt#3, ss_ext_l (34) Exchange Input [4]: [ss_customer_sk#2, ss_ext_discount_amt#3, ss_ext_list_price#4, d_year#6] -Arguments: hashpartitioning(ss_customer_sk#2, 5), true, [id=#26] +Arguments: hashpartitioning(ss_customer_sk#2, 5), ENSURE_REQUIREMENTS, [id=#26] (35) Sort [codegen id : 11] Input [4]: [ss_customer_sk#2, ss_ext_discount_amt#3, ss_ext_list_price#4, d_year#6] @@ -271,7 +271,7 @@ Results [9]: [c_customer_id#10, c_first_name#11, c_last_name#12, d_year#6, c_pre (41) Exchange Input [9]: [c_customer_id#10, c_first_name#11, c_last_name#12, d_year#6, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, sum#28] -Arguments: hashpartitioning(c_customer_id#10, c_first_name#11, c_last_name#12, d_year#6, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, 5), true, [id=#29] +Arguments: hashpartitioning(c_customer_id#10, c_first_name#11, c_last_name#12, d_year#6, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, 5), ENSURE_REQUIREMENTS, [id=#29] (42) HashAggregate [codegen id : 15] Input [9]: [c_customer_id#10, c_first_name#11, c_last_name#12, d_year#6, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, sum#28] @@ -282,7 +282,7 @@ Results [5]: [c_customer_id#10 AS customer_id#31, c_first_name#11 AS customer_fi (43) Exchange Input [5]: [customer_id#31, customer_first_name#32, customer_last_name#33, customer_email_address#34, year_total#35] -Arguments: hashpartitioning(customer_id#31, 5), true, [id=#36] +Arguments: hashpartitioning(customer_id#31, 5), ENSURE_REQUIREMENTS, [id=#36] (44) Sort [codegen id : 16] Input [5]: [customer_id#31, customer_first_name#32, customer_last_name#33, customer_email_address#34, year_total#35] @@ -321,7 +321,7 @@ Input [6]: [ws_sold_date_sk#37, ws_bill_customer_sk#38, ws_ext_discount_amt#39, (52) Exchange Input [4]: [ws_bill_customer_sk#38, ws_ext_discount_amt#39, ws_ext_list_price#40, d_year#6] -Arguments: hashpartitioning(ws_bill_customer_sk#38, 5), true, [id=#41] +Arguments: hashpartitioning(ws_bill_customer_sk#38, 5), ENSURE_REQUIREMENTS, [id=#41] (53) Sort [codegen id : 20] Input [4]: [ws_bill_customer_sk#38, ws_ext_discount_amt#39, ws_ext_list_price#40, d_year#6] @@ -352,7 +352,7 @@ Results [9]: [c_customer_id#10, c_first_name#11, c_last_name#12, c_preferred_cus (59) Exchange Input [9]: [c_customer_id#10, c_first_name#11, c_last_name#12, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, d_year#6, sum#43] -Arguments: hashpartitioning(c_customer_id#10, c_first_name#11, c_last_name#12, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, d_year#6, 5), true, [id=#44] +Arguments: hashpartitioning(c_customer_id#10, c_first_name#11, c_last_name#12, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, d_year#6, 5), ENSURE_REQUIREMENTS, [id=#44] (60) HashAggregate [codegen id : 24] Input [9]: [c_customer_id#10, c_first_name#11, c_last_name#12, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, d_year#6, sum#43] @@ -371,7 +371,7 @@ Input [2]: [customer_id#46, year_total#47] (63) Exchange Input [2]: [customer_id#48, year_total#49] -Arguments: hashpartitioning(customer_id#48, 5), true, [id=#50] +Arguments: hashpartitioning(customer_id#48, 5), ENSURE_REQUIREMENTS, [id=#50] (64) Sort [codegen id : 25] Input [2]: [customer_id#48, year_total#49] @@ -414,7 +414,7 @@ Input [6]: [ws_sold_date_sk#37, ws_bill_customer_sk#38, ws_ext_discount_amt#39, (73) Exchange Input [4]: [ws_bill_customer_sk#38, ws_ext_discount_amt#39, ws_ext_list_price#40, d_year#6] -Arguments: hashpartitioning(ws_bill_customer_sk#38, 5), true, [id=#51] +Arguments: hashpartitioning(ws_bill_customer_sk#38, 5), ENSURE_REQUIREMENTS, [id=#51] (74) Sort [codegen id : 29] Input [4]: [ws_bill_customer_sk#38, ws_ext_discount_amt#39, ws_ext_list_price#40, d_year#6] @@ -445,7 +445,7 @@ Results [9]: [c_customer_id#10, c_first_name#11, c_last_name#12, c_preferred_cus (80) Exchange Input [9]: [c_customer_id#10, c_first_name#11, c_last_name#12, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, d_year#6, sum#53] -Arguments: hashpartitioning(c_customer_id#10, c_first_name#11, c_last_name#12, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, d_year#6, 5), true, [id=#54] +Arguments: hashpartitioning(c_customer_id#10, c_first_name#11, c_last_name#12, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, d_year#6, 5), ENSURE_REQUIREMENTS, [id=#54] (81) HashAggregate [codegen id : 33] Input [9]: [c_customer_id#10, c_first_name#11, c_last_name#12, c_preferred_cust_flag#13, c_birth_country#14, c_login#15, c_email_address#16, d_year#6, sum#53] @@ -456,7 +456,7 @@ Results [2]: [c_customer_id#10 AS customer_id#56, MakeDecimal(sum(UnscaledValue( (82) Exchange Input [2]: [customer_id#56, year_total#57] -Arguments: hashpartitioning(customer_id#56, 5), true, [id=#58] +Arguments: hashpartitioning(customer_id#56, 5), ENSURE_REQUIREMENTS, [id=#58] (83) Sort [codegen id : 34] Input [2]: [customer_id#56, year_total#57] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q11/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q11/explain.txt index fc0b38368e006..b99e2b9b0d3a6 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q11/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q11/explain.txt @@ -150,7 +150,7 @@ Results [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#15, c_prefe (17) Exchange Input [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#15, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, sum#18] -Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, d_year#15, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, 5), true, [id=#19] +Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, d_year#15, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, 5), ENSURE_REQUIREMENTS, [id=#19] (18) HashAggregate [codegen id : 16] Input [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#15, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, sum#18] @@ -225,7 +225,7 @@ Results [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#15, c_prefe (33) Exchange Input [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#15, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, sum#25] -Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, d_year#15, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, 5), true, [id=#26] +Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, d_year#15, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, 5), ENSURE_REQUIREMENTS, [id=#26] (34) HashAggregate [codegen id : 7] Input [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#15, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, sum#25] @@ -305,7 +305,7 @@ Results [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_f (50) Exchange Input [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#15, sum#40] -Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#15, 5), true, [id=#41] +Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#15, 5), ENSURE_REQUIREMENTS, [id=#41] (51) HashAggregate [codegen id : 11] Input [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#15, sum#40] @@ -382,7 +382,7 @@ Results [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_f (67) Exchange Input [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#15, sum#49] -Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#15, 5), true, [id=#50] +Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#15, 5), ENSURE_REQUIREMENTS, [id=#50] (68) HashAggregate [codegen id : 15] Input [9]: [c_customer_id#2, c_first_name#3, c_last_name#4, c_preferred_cust_flag#5, c_birth_country#6, c_login#7, c_email_address#8, d_year#15, sum#49] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q12.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q12.sf100/explain.txt index c1bf12b7c2c5a..9730c76185719 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q12.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q12.sf100/explain.txt @@ -75,7 +75,7 @@ Input [4]: [ws_sold_date_sk#1, ws_item_sk#2, ws_ext_sales_price#3, d_date_sk#4] (11) Exchange Input [2]: [ws_item_sk#2, ws_ext_sales_price#3] -Arguments: hashpartitioning(ws_item_sk#2, 5), true, [id=#7] +Arguments: hashpartitioning(ws_item_sk#2, 5), ENSURE_REQUIREMENTS, [id=#7] (12) Sort [codegen id : 3] Input [2]: [ws_item_sk#2, ws_ext_sales_price#3] @@ -97,7 +97,7 @@ Condition : (i_category#13 IN (Sports,Books,Home) AND isnotnull(i_item_sk#8)) (16) Exchange Input [6]: [i_item_sk#8, i_item_id#9, i_item_desc#10, i_current_price#11, i_class#12, i_category#13] -Arguments: hashpartitioning(i_item_sk#8, 5), true, [id=#14] +Arguments: hashpartitioning(i_item_sk#8, 5), ENSURE_REQUIREMENTS, [id=#14] (17) Sort [codegen id : 5] Input [6]: [i_item_sk#8, i_item_id#9, i_item_desc#10, i_current_price#11, i_class#12, i_category#13] @@ -121,7 +121,7 @@ Results [6]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_ (21) Exchange Input [6]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, sum#16] -Arguments: hashpartitioning(i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, 5), true, [id=#17] +Arguments: hashpartitioning(i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, 5), ENSURE_REQUIREMENTS, [id=#17] (22) HashAggregate [codegen id : 7] Input [6]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, sum#16] @@ -132,7 +132,7 @@ Results [8]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_ (23) Exchange Input [8]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, itemrevenue#19, _w0#20, _w1#21] -Arguments: hashpartitioning(i_class#12, 5), true, [id=#22] +Arguments: hashpartitioning(i_class#12, 5), ENSURE_REQUIREMENTS, [id=#22] (24) Sort [codegen id : 8] Input [8]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, itemrevenue#19, _w0#20, _w1#21] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q12/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q12/explain.txt index 9a82a58af5774..287286d44321b 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q12/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q12/explain.txt @@ -106,7 +106,7 @@ Results [6]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_pri (18) Exchange Input [6]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, sum#15] -Arguments: hashpartitioning(i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, 5), true, [id=#16] +Arguments: hashpartitioning(i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, 5), ENSURE_REQUIREMENTS, [id=#16] (19) HashAggregate [codegen id : 4] Input [6]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, sum#15] @@ -117,7 +117,7 @@ Results [8]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_pri (20) Exchange Input [8]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, itemrevenue#18, _w0#19, _w1#20] -Arguments: hashpartitioning(i_class#8, 5), true, [id=#21] +Arguments: hashpartitioning(i_class#8, 5), ENSURE_REQUIREMENTS, [id=#21] (21) Sort [codegen id : 5] Input [8]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, itemrevenue#18, _w0#19, _w1#20] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q14/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q14/explain.txt index 1af2e69d57338..4b853562e27ff 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q14/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q14/explain.txt @@ -319,7 +319,7 @@ Results [3]: [brand_id#13, class_id#14, category_id#15] (49) Exchange Input [3]: [brand_id#13, class_id#14, category_id#15] -Arguments: hashpartitioning(brand_id#13, class_id#14, category_id#15, 5), true, [id=#23] +Arguments: hashpartitioning(brand_id#13, class_id#14, category_id#15, 5), ENSURE_REQUIREMENTS, [id=#23] (50) HashAggregate [codegen id : 10] Input [3]: [brand_id#13, class_id#14, category_id#15] @@ -439,7 +439,7 @@ Results [6]: [i_brand_id#6, i_class_id#7, i_category_id#8, sum#35, isEmpty#36, c (74) Exchange Input [6]: [i_brand_id#6, i_class_id#7, i_category_id#8, sum#35, isEmpty#36, count#37] -Arguments: hashpartitioning(i_brand_id#6, i_class_id#7, i_category_id#8, 5), true, [id=#38] +Arguments: hashpartitioning(i_brand_id#6, i_class_id#7, i_category_id#8, 5), ENSURE_REQUIREMENTS, [id=#38] (75) HashAggregate [codegen id : 52] Input [6]: [i_brand_id#6, i_class_id#7, i_category_id#8, sum#35, isEmpty#36, count#37] @@ -530,7 +530,7 @@ Results [6]: [i_brand_id#48, i_class_id#49, i_category_id#50, sum#57, isEmpty#58 (94) Exchange Input [6]: [i_brand_id#48, i_class_id#49, i_category_id#50, sum#57, isEmpty#58, count#59] -Arguments: hashpartitioning(i_brand_id#48, i_class_id#49, i_category_id#50, 5), true, [id=#60] +Arguments: hashpartitioning(i_brand_id#48, i_class_id#49, i_category_id#50, 5), ENSURE_REQUIREMENTS, [id=#60] (95) HashAggregate [codegen id : 51] Input [6]: [i_brand_id#48, i_class_id#49, i_category_id#50, sum#57, isEmpty#58, count#59] @@ -699,7 +699,7 @@ Results [2]: [sum#81, count#82] (125) Exchange Input [2]: [sum#81, count#82] -Arguments: SinglePartition, true, [id=#83] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#83] (126) HashAggregate [codegen id : 8] Input [2]: [sum#81, count#82] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q18a/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q18a/explain.txt index b9a00214c3a1b..087fc0820960e 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q18a/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q18a/explain.txt @@ -355,7 +355,7 @@ Results [18]: [i_item_id#32, ca_country#26, ca_state#25, ca_county#24, sum#55, c (44) Exchange Input [18]: [i_item_id#32, ca_country#26, ca_state#25, ca_county#24, sum#55, count#56, sum#57, count#58, sum#59, count#60, sum#61, count#62, sum#63, count#64, sum#65, count#66, sum#67, count#68] -Arguments: hashpartitioning(i_item_id#32, ca_country#26, ca_state#25, ca_county#24, 5), true, [id=#69] +Arguments: hashpartitioning(i_item_id#32, ca_country#26, ca_state#25, ca_county#24, 5), ENSURE_REQUIREMENTS, [id=#69] (45) HashAggregate [codegen id : 8] Input [18]: [i_item_id#32, ca_country#26, ca_state#25, ca_county#24, sum#55, count#56, sum#57, count#58, sum#59, count#60, sum#61, count#62, sum#63, count#64, sum#65, count#66, sum#67, count#68] @@ -474,7 +474,7 @@ Results [17]: [i_item_id#32, ca_country#26, ca_state#25, sum#100, count#101, sum (71) Exchange Input [17]: [i_item_id#32, ca_country#26, ca_state#25, sum#100, count#101, sum#102, count#103, sum#104, count#105, sum#106, count#107, sum#108, count#109, sum#110, count#111, sum#112, count#113] -Arguments: hashpartitioning(i_item_id#32, ca_country#26, ca_state#25, 5), true, [id=#114] +Arguments: hashpartitioning(i_item_id#32, ca_country#26, ca_state#25, 5), ENSURE_REQUIREMENTS, [id=#114] (72) HashAggregate [codegen id : 16] Input [17]: [i_item_id#32, ca_country#26, ca_state#25, sum#100, count#101, sum#102, count#103, sum#104, count#105, sum#106, count#107, sum#108, count#109, sum#110, count#111, sum#112, count#113] @@ -597,7 +597,7 @@ Results [16]: [i_item_id#32, ca_country#26, sum#146, count#147, sum#148, count#1 (99) Exchange Input [16]: [i_item_id#32, ca_country#26, sum#146, count#147, sum#148, count#149, sum#150, count#151, sum#152, count#153, sum#154, count#155, sum#156, count#157, sum#158, count#159] -Arguments: hashpartitioning(i_item_id#32, ca_country#26, 5), true, [id=#160] +Arguments: hashpartitioning(i_item_id#32, ca_country#26, 5), ENSURE_REQUIREMENTS, [id=#160] (100) HashAggregate [codegen id : 24] Input [16]: [i_item_id#32, ca_country#26, sum#146, count#147, sum#148, count#149, sum#150, count#151, sum#152, count#153, sum#154, count#155, sum#156, count#157, sum#158, count#159] @@ -720,7 +720,7 @@ Results [15]: [i_item_id#32, sum#193, count#194, sum#195, count#196, sum#197, co (127) Exchange Input [15]: [i_item_id#32, sum#193, count#194, sum#195, count#196, sum#197, count#198, sum#199, count#200, sum#201, count#202, sum#203, count#204, sum#205, count#206] -Arguments: hashpartitioning(i_item_id#32, 5), true, [id=#207] +Arguments: hashpartitioning(i_item_id#32, 5), ENSURE_REQUIREMENTS, [id=#207] (128) HashAggregate [codegen id : 32] Input [15]: [i_item_id#32, sum#193, count#194, sum#195, count#196, sum#197, count#198, sum#199, count#200, sum#201, count#202, sum#203, count#204, sum#205, count#206] @@ -839,7 +839,7 @@ Results [14]: [sum#241, count#242, sum#243, count#244, sum#245, count#246, sum#2 (154) Exchange Input [14]: [sum#241, count#242, sum#243, count#244, sum#245, count#246, sum#247, count#248, sum#249, count#250, sum#251, count#252, sum#253, count#254] -Arguments: SinglePartition, true, [id=#255] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#255] (155) HashAggregate [codegen id : 40] Input [14]: [sum#241, count#242, sum#243, count#244, sum#245, count#246, sum#247, count#248, sum#249, count#250, sum#251, count#252, sum#253, count#254] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q20.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q20.sf100/explain.txt index 15cde1a45a99b..1df1f3ad5af25 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q20.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q20.sf100/explain.txt @@ -75,7 +75,7 @@ Input [4]: [cs_sold_date_sk#1, cs_item_sk#2, cs_ext_sales_price#3, d_date_sk#4] (11) Exchange Input [2]: [cs_item_sk#2, cs_ext_sales_price#3] -Arguments: hashpartitioning(cs_item_sk#2, 5), true, [id=#7] +Arguments: hashpartitioning(cs_item_sk#2, 5), ENSURE_REQUIREMENTS, [id=#7] (12) Sort [codegen id : 3] Input [2]: [cs_item_sk#2, cs_ext_sales_price#3] @@ -97,7 +97,7 @@ Condition : (i_category#13 IN (Sports,Books,Home) AND isnotnull(i_item_sk#8)) (16) Exchange Input [6]: [i_item_sk#8, i_item_id#9, i_item_desc#10, i_current_price#11, i_class#12, i_category#13] -Arguments: hashpartitioning(i_item_sk#8, 5), true, [id=#14] +Arguments: hashpartitioning(i_item_sk#8, 5), ENSURE_REQUIREMENTS, [id=#14] (17) Sort [codegen id : 5] Input [6]: [i_item_sk#8, i_item_id#9, i_item_desc#10, i_current_price#11, i_class#12, i_category#13] @@ -121,7 +121,7 @@ Results [6]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_ (21) Exchange Input [6]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, sum#16] -Arguments: hashpartitioning(i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, 5), true, [id=#17] +Arguments: hashpartitioning(i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, 5), ENSURE_REQUIREMENTS, [id=#17] (22) HashAggregate [codegen id : 7] Input [6]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, sum#16] @@ -132,7 +132,7 @@ Results [8]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_ (23) Exchange Input [8]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, itemrevenue#19, _w0#20, _w1#21] -Arguments: hashpartitioning(i_class#12, 5), true, [id=#22] +Arguments: hashpartitioning(i_class#12, 5), ENSURE_REQUIREMENTS, [id=#22] (24) Sort [codegen id : 8] Input [8]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, itemrevenue#19, _w0#20, _w1#21] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q20/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q20/explain.txt index bd684664fdb34..f000098928dba 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q20/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q20/explain.txt @@ -106,7 +106,7 @@ Results [6]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_pri (18) Exchange Input [6]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, sum#15] -Arguments: hashpartitioning(i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, 5), true, [id=#16] +Arguments: hashpartitioning(i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, 5), ENSURE_REQUIREMENTS, [id=#16] (19) HashAggregate [codegen id : 4] Input [6]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, sum#15] @@ -117,7 +117,7 @@ Results [8]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_pri (20) Exchange Input [8]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, itemrevenue#18, _w0#19, _w1#20] -Arguments: hashpartitioning(i_class#8, 5), true, [id=#21] +Arguments: hashpartitioning(i_class#8, 5), ENSURE_REQUIREMENTS, [id=#21] (21) Sort [codegen id : 5] Input [8]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, itemrevenue#18, _w0#19, _w1#20] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22.sf100/explain.txt index 3efe02a377d09..25e5b0297d9ee 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22.sf100/explain.txt @@ -76,7 +76,7 @@ Input [4]: [inv_date_sk#1, inv_item_sk#2, inv_quantity_on_hand#3, d_date_sk#4] (11) Exchange Input [2]: [inv_item_sk#2, inv_quantity_on_hand#3] -Arguments: hashpartitioning(inv_item_sk#2, 5), true, [id=#7] +Arguments: hashpartitioning(inv_item_sk#2, 5), ENSURE_REQUIREMENTS, [id=#7] (12) Sort [codegen id : 3] Input [2]: [inv_item_sk#2, inv_quantity_on_hand#3] @@ -98,7 +98,7 @@ Condition : isnotnull(i_item_sk#8) (16) Exchange Input [5]: [i_item_sk#8, i_brand#9, i_class#10, i_category#11, i_product_name#12] -Arguments: hashpartitioning(i_item_sk#8, 5), true, [id=#13] +Arguments: hashpartitioning(i_item_sk#8, 5), ENSURE_REQUIREMENTS, [id=#13] (17) Sort [codegen id : 5] Input [5]: [i_item_sk#8, i_brand#9, i_class#10, i_category#11, i_product_name#12] @@ -136,20 +136,20 @@ Arguments: [List(inv_quantity_on_hand#3, i_product_name#12, i_brand#9, i_class#1 (25) HashAggregate [codegen id : 8] Input [6]: [inv_quantity_on_hand#3, i_product_name#15, i_brand#16, i_class#17, i_category#18, spark_grouping_id#19] Keys [5]: [i_product_name#15, i_brand#16, i_class#17, i_category#18, spark_grouping_id#19] -Functions [1]: [partial_avg(cast(inv_quantity_on_hand#3 as bigint))] +Functions [1]: [partial_avg(inv_quantity_on_hand#3)] Aggregate Attributes [2]: [sum#20, count#21] Results [7]: [i_product_name#15, i_brand#16, i_class#17, i_category#18, spark_grouping_id#19, sum#22, count#23] (26) Exchange Input [7]: [i_product_name#15, i_brand#16, i_class#17, i_category#18, spark_grouping_id#19, sum#22, count#23] -Arguments: hashpartitioning(i_product_name#15, i_brand#16, i_class#17, i_category#18, spark_grouping_id#19, 5), true, [id=#24] +Arguments: hashpartitioning(i_product_name#15, i_brand#16, i_class#17, i_category#18, spark_grouping_id#19, 5), ENSURE_REQUIREMENTS, [id=#24] (27) HashAggregate [codegen id : 9] Input [7]: [i_product_name#15, i_brand#16, i_class#17, i_category#18, spark_grouping_id#19, sum#22, count#23] Keys [5]: [i_product_name#15, i_brand#16, i_class#17, i_category#18, spark_grouping_id#19] -Functions [1]: [avg(cast(inv_quantity_on_hand#3 as bigint))] -Aggregate Attributes [1]: [avg(cast(inv_quantity_on_hand#3 as bigint))#25] -Results [5]: [i_product_name#15, i_brand#16, i_class#17, i_category#18, avg(cast(inv_quantity_on_hand#3 as bigint))#25 AS qoh#26] +Functions [1]: [avg(inv_quantity_on_hand#3)] +Aggregate Attributes [1]: [avg(inv_quantity_on_hand#3)#25] +Results [5]: [i_product_name#15, i_brand#16, i_class#17, i_category#18, avg(inv_quantity_on_hand#3)#25 AS qoh#26] (28) TakeOrderedAndProject Input [5]: [i_product_name#15, i_brand#16, i_class#17, i_category#18, qoh#26] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22.sf100/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22.sf100/simplified.txt index d5f40d419175e..6bbe879d2c9f3 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22.sf100/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22.sf100/simplified.txt @@ -1,6 +1,6 @@ TakeOrderedAndProject [qoh,i_product_name,i_brand,i_class,i_category] WholeStageCodegen (9) - HashAggregate [i_product_name,i_brand,i_class,i_category,spark_grouping_id,sum,count] [avg(cast(inv_quantity_on_hand as bigint)),qoh,sum,count] + HashAggregate [i_product_name,i_brand,i_class,i_category,spark_grouping_id,sum,count] [avg(inv_quantity_on_hand),qoh,sum,count] InputAdapter Exchange [i_product_name,i_brand,i_class,i_category,spark_grouping_id] #1 WholeStageCodegen (8) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22/explain.txt index ad83edec0ad33..936424e085c8f 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22/explain.txt @@ -121,20 +121,20 @@ Arguments: [List(inv_quantity_on_hand#3, i_product_name#11, i_brand#8, i_class#9 (22) HashAggregate [codegen id : 5] Input [6]: [inv_quantity_on_hand#3, i_product_name#14, i_brand#15, i_class#16, i_category#17, spark_grouping_id#18] Keys [5]: [i_product_name#14, i_brand#15, i_class#16, i_category#17, spark_grouping_id#18] -Functions [1]: [partial_avg(cast(inv_quantity_on_hand#3 as bigint))] +Functions [1]: [partial_avg(inv_quantity_on_hand#3)] Aggregate Attributes [2]: [sum#19, count#20] Results [7]: [i_product_name#14, i_brand#15, i_class#16, i_category#17, spark_grouping_id#18, sum#21, count#22] (23) Exchange Input [7]: [i_product_name#14, i_brand#15, i_class#16, i_category#17, spark_grouping_id#18, sum#21, count#22] -Arguments: hashpartitioning(i_product_name#14, i_brand#15, i_class#16, i_category#17, spark_grouping_id#18, 5), true, [id=#23] +Arguments: hashpartitioning(i_product_name#14, i_brand#15, i_class#16, i_category#17, spark_grouping_id#18, 5), ENSURE_REQUIREMENTS, [id=#23] (24) HashAggregate [codegen id : 6] Input [7]: [i_product_name#14, i_brand#15, i_class#16, i_category#17, spark_grouping_id#18, sum#21, count#22] Keys [5]: [i_product_name#14, i_brand#15, i_class#16, i_category#17, spark_grouping_id#18] -Functions [1]: [avg(cast(inv_quantity_on_hand#3 as bigint))] -Aggregate Attributes [1]: [avg(cast(inv_quantity_on_hand#3 as bigint))#24] -Results [5]: [i_product_name#14, i_brand#15, i_class#16, i_category#17, avg(cast(inv_quantity_on_hand#3 as bigint))#24 AS qoh#25] +Functions [1]: [avg(inv_quantity_on_hand#3)] +Aggregate Attributes [1]: [avg(inv_quantity_on_hand#3)#24] +Results [5]: [i_product_name#14, i_brand#15, i_class#16, i_category#17, avg(inv_quantity_on_hand#3)#24 AS qoh#25] (25) TakeOrderedAndProject Input [5]: [i_product_name#14, i_brand#15, i_class#16, i_category#17, qoh#25] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22/simplified.txt index cdf9335b1c48b..5a47939137e55 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22/simplified.txt @@ -1,6 +1,6 @@ TakeOrderedAndProject [qoh,i_product_name,i_brand,i_class,i_category] WholeStageCodegen (6) - HashAggregate [i_product_name,i_brand,i_class,i_category,spark_grouping_id,sum,count] [avg(cast(inv_quantity_on_hand as bigint)),qoh,sum,count] + HashAggregate [i_product_name,i_brand,i_class,i_category,spark_grouping_id,sum,count] [avg(inv_quantity_on_hand),qoh,sum,count] InputAdapter Exchange [i_product_name,i_brand,i_class,i_category,spark_grouping_id] #1 WholeStageCodegen (5) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22a.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22a.sf100/explain.txt index 0234a65ac06a5..efb8f805ec3b8 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22a.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22a.sf100/explain.txt @@ -127,7 +127,7 @@ Input [4]: [inv_date_sk#1, inv_item_sk#2, inv_quantity_on_hand#4, d_date_sk#7] (17) Exchange Input [2]: [inv_item_sk#2, inv_quantity_on_hand#4] -Arguments: hashpartitioning(inv_item_sk#2, 5), true, [id=#10] +Arguments: hashpartitioning(inv_item_sk#2, 5), ENSURE_REQUIREMENTS, [id=#10] (18) Sort [codegen id : 4] Input [2]: [inv_item_sk#2, inv_quantity_on_hand#4] @@ -149,7 +149,7 @@ Condition : isnotnull(i_item_sk#11) (22) Exchange Input [5]: [i_item_sk#11, i_brand#12, i_class#13, i_category#14, i_product_name#15] -Arguments: hashpartitioning(i_item_sk#11, 5), true, [id=#16] +Arguments: hashpartitioning(i_item_sk#11, 5), ENSURE_REQUIREMENTS, [id=#16] (23) Sort [codegen id : 6] Input [5]: [i_item_sk#11, i_brand#12, i_class#13, i_category#14, i_product_name#15] @@ -167,20 +167,20 @@ Input [7]: [inv_item_sk#2, inv_quantity_on_hand#4, i_item_sk#11, i_brand#12, i_c (26) HashAggregate [codegen id : 7] Input [5]: [inv_quantity_on_hand#4, i_brand#12, i_class#13, i_category#14, i_product_name#15] Keys [4]: [i_product_name#15, i_brand#12, i_class#13, i_category#14] -Functions [1]: [partial_avg(cast(inv_quantity_on_hand#4 as bigint))] +Functions [1]: [partial_avg(inv_quantity_on_hand#4)] Aggregate Attributes [2]: [sum#17, count#18] Results [6]: [i_product_name#15, i_brand#12, i_class#13, i_category#14, sum#19, count#20] (27) Exchange Input [6]: [i_product_name#15, i_brand#12, i_class#13, i_category#14, sum#19, count#20] -Arguments: hashpartitioning(i_product_name#15, i_brand#12, i_class#13, i_category#14, 5), true, [id=#21] +Arguments: hashpartitioning(i_product_name#15, i_brand#12, i_class#13, i_category#14, 5), ENSURE_REQUIREMENTS, [id=#21] (28) HashAggregate [codegen id : 8] Input [6]: [i_product_name#15, i_brand#12, i_class#13, i_category#14, sum#19, count#20] Keys [4]: [i_product_name#15, i_brand#12, i_class#13, i_category#14] -Functions [1]: [avg(cast(inv_quantity_on_hand#4 as bigint))] -Aggregate Attributes [1]: [avg(cast(inv_quantity_on_hand#4 as bigint))#22] -Results [5]: [i_product_name#15, i_brand#12, i_class#13, i_category#14, avg(cast(inv_quantity_on_hand#4 as bigint))#22 AS qoh#23] +Functions [1]: [avg(inv_quantity_on_hand#4)] +Aggregate Attributes [1]: [avg(inv_quantity_on_hand#4)#22] +Results [5]: [i_product_name#15, i_brand#12, i_class#13, i_category#14, avg(inv_quantity_on_hand#4)#22 AS qoh#23] (29) HashAggregate [codegen id : 8] Input [5]: [i_product_name#15, i_brand#12, i_class#13, i_category#14, qoh#23] @@ -202,9 +202,9 @@ Output [6]: [i_product_name#15, i_brand#12, i_class#13, i_category#14, sum#30, c (32) HashAggregate [codegen id : 16] Input [6]: [i_product_name#15, i_brand#12, i_class#13, i_category#14, sum#30, count#31] Keys [4]: [i_product_name#15, i_brand#12, i_class#13, i_category#14] -Functions [1]: [avg(cast(inv_quantity_on_hand#4 as bigint))] -Aggregate Attributes [1]: [avg(cast(inv_quantity_on_hand#4 as bigint))#32] -Results [4]: [i_product_name#15, i_brand#12, i_class#13, avg(cast(inv_quantity_on_hand#4 as bigint))#32 AS qoh#23] +Functions [1]: [avg(inv_quantity_on_hand#4)] +Aggregate Attributes [1]: [avg(inv_quantity_on_hand#4)#32] +Results [4]: [i_product_name#15, i_brand#12, i_class#13, avg(inv_quantity_on_hand#4)#32 AS qoh#23] (33) HashAggregate [codegen id : 16] Input [4]: [i_product_name#15, i_brand#12, i_class#13, qoh#23] @@ -215,7 +215,7 @@ Results [5]: [i_product_name#15, i_brand#12, i_class#13, sum#35, count#36] (34) Exchange Input [5]: [i_product_name#15, i_brand#12, i_class#13, sum#35, count#36] -Arguments: hashpartitioning(i_product_name#15, i_brand#12, i_class#13, 5), true, [id=#37] +Arguments: hashpartitioning(i_product_name#15, i_brand#12, i_class#13, 5), ENSURE_REQUIREMENTS, [id=#37] (35) HashAggregate [codegen id : 17] Input [5]: [i_product_name#15, i_brand#12, i_class#13, sum#35, count#36] @@ -230,9 +230,9 @@ Output [6]: [i_product_name#15, i_brand#12, i_class#13, i_category#14, sum#41, c (37) HashAggregate [codegen id : 25] Input [6]: [i_product_name#15, i_brand#12, i_class#13, i_category#14, sum#41, count#42] Keys [4]: [i_product_name#15, i_brand#12, i_class#13, i_category#14] -Functions [1]: [avg(cast(inv_quantity_on_hand#4 as bigint))] -Aggregate Attributes [1]: [avg(cast(inv_quantity_on_hand#4 as bigint))#43] -Results [3]: [i_product_name#15, i_brand#12, avg(cast(inv_quantity_on_hand#4 as bigint))#43 AS qoh#23] +Functions [1]: [avg(inv_quantity_on_hand#4)] +Aggregate Attributes [1]: [avg(inv_quantity_on_hand#4)#43] +Results [3]: [i_product_name#15, i_brand#12, avg(inv_quantity_on_hand#4)#43 AS qoh#23] (38) HashAggregate [codegen id : 25] Input [3]: [i_product_name#15, i_brand#12, qoh#23] @@ -243,7 +243,7 @@ Results [4]: [i_product_name#15, i_brand#12, sum#46, count#47] (39) Exchange Input [4]: [i_product_name#15, i_brand#12, sum#46, count#47] -Arguments: hashpartitioning(i_product_name#15, i_brand#12, 5), true, [id=#48] +Arguments: hashpartitioning(i_product_name#15, i_brand#12, 5), ENSURE_REQUIREMENTS, [id=#48] (40) HashAggregate [codegen id : 26] Input [4]: [i_product_name#15, i_brand#12, sum#46, count#47] @@ -258,9 +258,9 @@ Output [6]: [i_product_name#15, i_brand#12, i_class#13, i_category#14, sum#53, c (42) HashAggregate [codegen id : 34] Input [6]: [i_product_name#15, i_brand#12, i_class#13, i_category#14, sum#53, count#54] Keys [4]: [i_product_name#15, i_brand#12, i_class#13, i_category#14] -Functions [1]: [avg(cast(inv_quantity_on_hand#4 as bigint))] -Aggregate Attributes [1]: [avg(cast(inv_quantity_on_hand#4 as bigint))#55] -Results [2]: [i_product_name#15, avg(cast(inv_quantity_on_hand#4 as bigint))#55 AS qoh#23] +Functions [1]: [avg(inv_quantity_on_hand#4)] +Aggregate Attributes [1]: [avg(inv_quantity_on_hand#4)#55] +Results [2]: [i_product_name#15, avg(inv_quantity_on_hand#4)#55 AS qoh#23] (43) HashAggregate [codegen id : 34] Input [2]: [i_product_name#15, qoh#23] @@ -271,7 +271,7 @@ Results [3]: [i_product_name#15, sum#58, count#59] (44) Exchange Input [3]: [i_product_name#15, sum#58, count#59] -Arguments: hashpartitioning(i_product_name#15, 5), true, [id=#60] +Arguments: hashpartitioning(i_product_name#15, 5), ENSURE_REQUIREMENTS, [id=#60] (45) HashAggregate [codegen id : 35] Input [3]: [i_product_name#15, sum#58, count#59] @@ -286,9 +286,9 @@ Output [6]: [i_product_name#15, i_brand#12, i_class#13, i_category#14, sum#66, c (47) HashAggregate [codegen id : 43] Input [6]: [i_product_name#15, i_brand#12, i_class#13, i_category#14, sum#66, count#67] Keys [4]: [i_product_name#15, i_brand#12, i_class#13, i_category#14] -Functions [1]: [avg(cast(inv_quantity_on_hand#4 as bigint))] -Aggregate Attributes [1]: [avg(cast(inv_quantity_on_hand#4 as bigint))#68] -Results [1]: [avg(cast(inv_quantity_on_hand#4 as bigint))#68 AS qoh#23] +Functions [1]: [avg(inv_quantity_on_hand#4)] +Aggregate Attributes [1]: [avg(inv_quantity_on_hand#4)#68] +Results [1]: [avg(inv_quantity_on_hand#4)#68 AS qoh#23] (48) HashAggregate [codegen id : 43] Input [1]: [qoh#23] @@ -299,7 +299,7 @@ Results [2]: [sum#71, count#72] (49) Exchange Input [2]: [sum#71, count#72] -Arguments: SinglePartition, true, [id=#73] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#73] (50) HashAggregate [codegen id : 44] Input [2]: [sum#71, count#72] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22a.sf100/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22a.sf100/simplified.txt index c2fe3189b2d10..5a2686eb06f40 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22a.sf100/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22a.sf100/simplified.txt @@ -3,7 +3,7 @@ TakeOrderedAndProject [qoh,i_product_name,i_brand,i_class,i_category] WholeStageCodegen (8) HashAggregate [i_product_name,i_brand,i_class,i_category,sum,count] [avg(qoh),qoh,sum,count] HashAggregate [i_product_name,i_brand,i_class,i_category,qoh] [sum,count,sum,count] - HashAggregate [i_product_name,i_brand,i_class,i_category,sum,count] [avg(cast(inv_quantity_on_hand as bigint)),qoh,sum,count] + HashAggregate [i_product_name,i_brand,i_class,i_category,sum,count] [avg(inv_quantity_on_hand),qoh,sum,count] InputAdapter Exchange [i_product_name,i_brand,i_class,i_category] #1 WholeStageCodegen (7) @@ -55,7 +55,7 @@ TakeOrderedAndProject [qoh,i_product_name,i_brand,i_class,i_category] Exchange [i_product_name,i_brand,i_class] #6 WholeStageCodegen (16) HashAggregate [i_product_name,i_brand,i_class,qoh] [sum,count,sum,count] - HashAggregate [i_product_name,i_brand,i_class,i_category,sum,count] [avg(cast(inv_quantity_on_hand as bigint)),qoh,sum,count] + HashAggregate [i_product_name,i_brand,i_class,i_category,sum,count] [avg(inv_quantity_on_hand),qoh,sum,count] InputAdapter ReusedExchange [i_product_name,i_brand,i_class,i_category,sum,count] #1 WholeStageCodegen (26) @@ -64,7 +64,7 @@ TakeOrderedAndProject [qoh,i_product_name,i_brand,i_class,i_category] Exchange [i_product_name,i_brand] #7 WholeStageCodegen (25) HashAggregate [i_product_name,i_brand,qoh] [sum,count,sum,count] - HashAggregate [i_product_name,i_brand,i_class,i_category,sum,count] [avg(cast(inv_quantity_on_hand as bigint)),qoh,sum,count] + HashAggregate [i_product_name,i_brand,i_class,i_category,sum,count] [avg(inv_quantity_on_hand),qoh,sum,count] InputAdapter ReusedExchange [i_product_name,i_brand,i_class,i_category,sum,count] #1 WholeStageCodegen (35) @@ -73,7 +73,7 @@ TakeOrderedAndProject [qoh,i_product_name,i_brand,i_class,i_category] Exchange [i_product_name] #8 WholeStageCodegen (34) HashAggregate [i_product_name,qoh] [sum,count,sum,count] - HashAggregate [i_product_name,i_brand,i_class,i_category,sum,count] [avg(cast(inv_quantity_on_hand as bigint)),qoh,sum,count] + HashAggregate [i_product_name,i_brand,i_class,i_category,sum,count] [avg(inv_quantity_on_hand),qoh,sum,count] InputAdapter ReusedExchange [i_product_name,i_brand,i_class,i_category,sum,count] #1 WholeStageCodegen (44) @@ -82,6 +82,6 @@ TakeOrderedAndProject [qoh,i_product_name,i_brand,i_class,i_category] Exchange #9 WholeStageCodegen (43) HashAggregate [qoh] [sum,count,sum,count] - HashAggregate [i_product_name,i_brand,i_class,i_category,sum,count] [avg(cast(inv_quantity_on_hand as bigint)),qoh,sum,count] + HashAggregate [i_product_name,i_brand,i_class,i_category,sum,count] [avg(inv_quantity_on_hand),qoh,sum,count] InputAdapter ReusedExchange [i_product_name,i_brand,i_class,i_category,sum,count] #1 diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22a/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22a/explain.txt index 2a1ca82e1f263..d373aab2300b2 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22a/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22a/explain.txt @@ -152,20 +152,20 @@ Input [7]: [inv_warehouse_sk#3, inv_quantity_on_hand#4, i_brand#9, i_class#10, i (23) HashAggregate [codegen id : 4] Input [5]: [inv_quantity_on_hand#4, i_brand#9, i_class#10, i_category#11, i_product_name#12] Keys [4]: [i_product_name#12, i_brand#9, i_class#10, i_category#11] -Functions [1]: [partial_avg(cast(inv_quantity_on_hand#4 as bigint))] +Functions [1]: [partial_avg(inv_quantity_on_hand#4)] Aggregate Attributes [2]: [sum#16, count#17] Results [6]: [i_product_name#12, i_brand#9, i_class#10, i_category#11, sum#18, count#19] (24) Exchange Input [6]: [i_product_name#12, i_brand#9, i_class#10, i_category#11, sum#18, count#19] -Arguments: hashpartitioning(i_product_name#12, i_brand#9, i_class#10, i_category#11, 5), true, [id=#20] +Arguments: hashpartitioning(i_product_name#12, i_brand#9, i_class#10, i_category#11, 5), ENSURE_REQUIREMENTS, [id=#20] (25) HashAggregate [codegen id : 5] Input [6]: [i_product_name#12, i_brand#9, i_class#10, i_category#11, sum#18, count#19] Keys [4]: [i_product_name#12, i_brand#9, i_class#10, i_category#11] -Functions [1]: [avg(cast(inv_quantity_on_hand#4 as bigint))] -Aggregate Attributes [1]: [avg(cast(inv_quantity_on_hand#4 as bigint))#21] -Results [5]: [i_product_name#12, i_brand#9, i_class#10, i_category#11, avg(cast(inv_quantity_on_hand#4 as bigint))#21 AS qoh#22] +Functions [1]: [avg(inv_quantity_on_hand#4)] +Aggregate Attributes [1]: [avg(inv_quantity_on_hand#4)#21] +Results [5]: [i_product_name#12, i_brand#9, i_class#10, i_category#11, avg(inv_quantity_on_hand#4)#21 AS qoh#22] (26) HashAggregate [codegen id : 5] Input [5]: [i_product_name#12, i_brand#9, i_class#10, i_category#11, qoh#22] @@ -187,9 +187,9 @@ Output [6]: [i_product_name#12, i_brand#9, i_class#10, i_category#11, sum#29, co (29) HashAggregate [codegen id : 10] Input [6]: [i_product_name#12, i_brand#9, i_class#10, i_category#11, sum#29, count#30] Keys [4]: [i_product_name#12, i_brand#9, i_class#10, i_category#11] -Functions [1]: [avg(cast(inv_quantity_on_hand#4 as bigint))] -Aggregate Attributes [1]: [avg(cast(inv_quantity_on_hand#4 as bigint))#31] -Results [4]: [i_product_name#12, i_brand#9, i_class#10, avg(cast(inv_quantity_on_hand#4 as bigint))#31 AS qoh#22] +Functions [1]: [avg(inv_quantity_on_hand#4)] +Aggregate Attributes [1]: [avg(inv_quantity_on_hand#4)#31] +Results [4]: [i_product_name#12, i_brand#9, i_class#10, avg(inv_quantity_on_hand#4)#31 AS qoh#22] (30) HashAggregate [codegen id : 10] Input [4]: [i_product_name#12, i_brand#9, i_class#10, qoh#22] @@ -200,7 +200,7 @@ Results [5]: [i_product_name#12, i_brand#9, i_class#10, sum#34, count#35] (31) Exchange Input [5]: [i_product_name#12, i_brand#9, i_class#10, sum#34, count#35] -Arguments: hashpartitioning(i_product_name#12, i_brand#9, i_class#10, 5), true, [id=#36] +Arguments: hashpartitioning(i_product_name#12, i_brand#9, i_class#10, 5), ENSURE_REQUIREMENTS, [id=#36] (32) HashAggregate [codegen id : 11] Input [5]: [i_product_name#12, i_brand#9, i_class#10, sum#34, count#35] @@ -215,9 +215,9 @@ Output [6]: [i_product_name#12, i_brand#9, i_class#10, i_category#11, sum#40, co (34) HashAggregate [codegen id : 16] Input [6]: [i_product_name#12, i_brand#9, i_class#10, i_category#11, sum#40, count#41] Keys [4]: [i_product_name#12, i_brand#9, i_class#10, i_category#11] -Functions [1]: [avg(cast(inv_quantity_on_hand#4 as bigint))] -Aggregate Attributes [1]: [avg(cast(inv_quantity_on_hand#4 as bigint))#42] -Results [3]: [i_product_name#12, i_brand#9, avg(cast(inv_quantity_on_hand#4 as bigint))#42 AS qoh#22] +Functions [1]: [avg(inv_quantity_on_hand#4)] +Aggregate Attributes [1]: [avg(inv_quantity_on_hand#4)#42] +Results [3]: [i_product_name#12, i_brand#9, avg(inv_quantity_on_hand#4)#42 AS qoh#22] (35) HashAggregate [codegen id : 16] Input [3]: [i_product_name#12, i_brand#9, qoh#22] @@ -228,7 +228,7 @@ Results [4]: [i_product_name#12, i_brand#9, sum#45, count#46] (36) Exchange Input [4]: [i_product_name#12, i_brand#9, sum#45, count#46] -Arguments: hashpartitioning(i_product_name#12, i_brand#9, 5), true, [id=#47] +Arguments: hashpartitioning(i_product_name#12, i_brand#9, 5), ENSURE_REQUIREMENTS, [id=#47] (37) HashAggregate [codegen id : 17] Input [4]: [i_product_name#12, i_brand#9, sum#45, count#46] @@ -243,9 +243,9 @@ Output [6]: [i_product_name#12, i_brand#9, i_class#10, i_category#11, sum#52, co (39) HashAggregate [codegen id : 22] Input [6]: [i_product_name#12, i_brand#9, i_class#10, i_category#11, sum#52, count#53] Keys [4]: [i_product_name#12, i_brand#9, i_class#10, i_category#11] -Functions [1]: [avg(cast(inv_quantity_on_hand#4 as bigint))] -Aggregate Attributes [1]: [avg(cast(inv_quantity_on_hand#4 as bigint))#54] -Results [2]: [i_product_name#12, avg(cast(inv_quantity_on_hand#4 as bigint))#54 AS qoh#22] +Functions [1]: [avg(inv_quantity_on_hand#4)] +Aggregate Attributes [1]: [avg(inv_quantity_on_hand#4)#54] +Results [2]: [i_product_name#12, avg(inv_quantity_on_hand#4)#54 AS qoh#22] (40) HashAggregate [codegen id : 22] Input [2]: [i_product_name#12, qoh#22] @@ -256,7 +256,7 @@ Results [3]: [i_product_name#12, sum#57, count#58] (41) Exchange Input [3]: [i_product_name#12, sum#57, count#58] -Arguments: hashpartitioning(i_product_name#12, 5), true, [id=#59] +Arguments: hashpartitioning(i_product_name#12, 5), ENSURE_REQUIREMENTS, [id=#59] (42) HashAggregate [codegen id : 23] Input [3]: [i_product_name#12, sum#57, count#58] @@ -271,9 +271,9 @@ Output [6]: [i_product_name#12, i_brand#9, i_class#10, i_category#11, sum#65, co (44) HashAggregate [codegen id : 28] Input [6]: [i_product_name#12, i_brand#9, i_class#10, i_category#11, sum#65, count#66] Keys [4]: [i_product_name#12, i_brand#9, i_class#10, i_category#11] -Functions [1]: [avg(cast(inv_quantity_on_hand#4 as bigint))] -Aggregate Attributes [1]: [avg(cast(inv_quantity_on_hand#4 as bigint))#67] -Results [1]: [avg(cast(inv_quantity_on_hand#4 as bigint))#67 AS qoh#22] +Functions [1]: [avg(inv_quantity_on_hand#4)] +Aggregate Attributes [1]: [avg(inv_quantity_on_hand#4)#67] +Results [1]: [avg(inv_quantity_on_hand#4)#67 AS qoh#22] (45) HashAggregate [codegen id : 28] Input [1]: [qoh#22] @@ -284,7 +284,7 @@ Results [2]: [sum#70, count#71] (46) Exchange Input [2]: [sum#70, count#71] -Arguments: SinglePartition, true, [id=#72] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#72] (47) HashAggregate [codegen id : 29] Input [2]: [sum#70, count#71] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22a/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22a/simplified.txt index 616bfc89c0023..d76dcef20adea 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22a/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q22a/simplified.txt @@ -3,7 +3,7 @@ TakeOrderedAndProject [qoh,i_product_name,i_brand,i_class,i_category] WholeStageCodegen (5) HashAggregate [i_product_name,i_brand,i_class,i_category,sum,count] [avg(qoh),qoh,sum,count] HashAggregate [i_product_name,i_brand,i_class,i_category,qoh] [sum,count,sum,count] - HashAggregate [i_product_name,i_brand,i_class,i_category,sum,count] [avg(cast(inv_quantity_on_hand as bigint)),qoh,sum,count] + HashAggregate [i_product_name,i_brand,i_class,i_category,sum,count] [avg(inv_quantity_on_hand),qoh,sum,count] InputAdapter Exchange [i_product_name,i_brand,i_class,i_category] #1 WholeStageCodegen (4) @@ -46,7 +46,7 @@ TakeOrderedAndProject [qoh,i_product_name,i_brand,i_class,i_category] Exchange [i_product_name,i_brand,i_class] #5 WholeStageCodegen (10) HashAggregate [i_product_name,i_brand,i_class,qoh] [sum,count,sum,count] - HashAggregate [i_product_name,i_brand,i_class,i_category,sum,count] [avg(cast(inv_quantity_on_hand as bigint)),qoh,sum,count] + HashAggregate [i_product_name,i_brand,i_class,i_category,sum,count] [avg(inv_quantity_on_hand),qoh,sum,count] InputAdapter ReusedExchange [i_product_name,i_brand,i_class,i_category,sum,count] #1 WholeStageCodegen (17) @@ -55,7 +55,7 @@ TakeOrderedAndProject [qoh,i_product_name,i_brand,i_class,i_category] Exchange [i_product_name,i_brand] #6 WholeStageCodegen (16) HashAggregate [i_product_name,i_brand,qoh] [sum,count,sum,count] - HashAggregate [i_product_name,i_brand,i_class,i_category,sum,count] [avg(cast(inv_quantity_on_hand as bigint)),qoh,sum,count] + HashAggregate [i_product_name,i_brand,i_class,i_category,sum,count] [avg(inv_quantity_on_hand),qoh,sum,count] InputAdapter ReusedExchange [i_product_name,i_brand,i_class,i_category,sum,count] #1 WholeStageCodegen (23) @@ -64,7 +64,7 @@ TakeOrderedAndProject [qoh,i_product_name,i_brand,i_class,i_category] Exchange [i_product_name] #7 WholeStageCodegen (22) HashAggregate [i_product_name,qoh] [sum,count,sum,count] - HashAggregate [i_product_name,i_brand,i_class,i_category,sum,count] [avg(cast(inv_quantity_on_hand as bigint)),qoh,sum,count] + HashAggregate [i_product_name,i_brand,i_class,i_category,sum,count] [avg(inv_quantity_on_hand),qoh,sum,count] InputAdapter ReusedExchange [i_product_name,i_brand,i_class,i_category,sum,count] #1 WholeStageCodegen (29) @@ -73,6 +73,6 @@ TakeOrderedAndProject [qoh,i_product_name,i_brand,i_class,i_category] Exchange #8 WholeStageCodegen (28) HashAggregate [qoh] [sum,count,sum,count] - HashAggregate [i_product_name,i_brand,i_class,i_category,sum,count] [avg(cast(inv_quantity_on_hand as bigint)),qoh,sum,count] + HashAggregate [i_product_name,i_brand,i_class,i_category,sum,count] [avg(inv_quantity_on_hand),qoh,sum,count] InputAdapter ReusedExchange [i_product_name,i_brand,i_class,i_category,sum,count] #1 diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q27a.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q27a.sf100/explain.txt index 86722de954ff3..748000b4d4801 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q27a.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q27a.sf100/explain.txt @@ -211,20 +211,20 @@ Input [8]: [ss_item_sk#2, ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_c (30) HashAggregate [codegen id : 5] Input [6]: [i_item_id#21, s_state#18, agg1#23, agg2#24, agg3#25, agg4#26] Keys [2]: [i_item_id#21, s_state#18] -Functions [4]: [partial_avg(cast(agg1#23 as bigint)), partial_avg(UnscaledValue(agg2#24)), partial_avg(UnscaledValue(agg3#25)), partial_avg(UnscaledValue(agg4#26))] +Functions [4]: [partial_avg(agg1#23), partial_avg(UnscaledValue(agg2#24)), partial_avg(UnscaledValue(agg3#25)), partial_avg(UnscaledValue(agg4#26))] Aggregate Attributes [8]: [sum#27, count#28, sum#29, count#30, sum#31, count#32, sum#33, count#34] Results [10]: [i_item_id#21, s_state#18, sum#35, count#36, sum#37, count#38, sum#39, count#40, sum#41, count#42] (31) Exchange Input [10]: [i_item_id#21, s_state#18, sum#35, count#36, sum#37, count#38, sum#39, count#40, sum#41, count#42] -Arguments: hashpartitioning(i_item_id#21, s_state#18, 5), true, [id=#43] +Arguments: hashpartitioning(i_item_id#21, s_state#18, 5), ENSURE_REQUIREMENTS, [id=#43] (32) HashAggregate [codegen id : 6] Input [10]: [i_item_id#21, s_state#18, sum#35, count#36, sum#37, count#38, sum#39, count#40, sum#41, count#42] Keys [2]: [i_item_id#21, s_state#18] -Functions [4]: [avg(cast(agg1#23 as bigint)), avg(UnscaledValue(agg2#24)), avg(UnscaledValue(agg3#25)), avg(UnscaledValue(agg4#26))] -Aggregate Attributes [4]: [avg(cast(agg1#23 as bigint))#44, avg(UnscaledValue(agg2#24))#45, avg(UnscaledValue(agg3#25))#46, avg(UnscaledValue(agg4#26))#47] -Results [7]: [i_item_id#21, s_state#18, 0 AS g_state#48, avg(cast(agg1#23 as bigint))#44 AS agg1#49, cast((avg(UnscaledValue(agg2#24))#45 / 100.0) as decimal(11,6)) AS agg2#50, cast((avg(UnscaledValue(agg3#25))#46 / 100.0) as decimal(11,6)) AS agg3#51, cast((avg(UnscaledValue(agg4#26))#47 / 100.0) as decimal(11,6)) AS agg4#52] +Functions [4]: [avg(agg1#23), avg(UnscaledValue(agg2#24)), avg(UnscaledValue(agg3#25)), avg(UnscaledValue(agg4#26))] +Aggregate Attributes [4]: [avg(agg1#23)#44, avg(UnscaledValue(agg2#24))#45, avg(UnscaledValue(agg3#25))#46, avg(UnscaledValue(agg4#26))#47] +Results [7]: [i_item_id#21, s_state#18, 0 AS g_state#48, avg(agg1#23)#44 AS agg1#49, cast((avg(UnscaledValue(agg2#24))#45 / 100.0) as decimal(11,6)) AS agg2#50, cast((avg(UnscaledValue(agg3#25))#46 / 100.0) as decimal(11,6)) AS agg3#51, cast((avg(UnscaledValue(agg4#26))#47 / 100.0) as decimal(11,6)) AS agg4#52] (33) Scan parquet default.store_sales Output [8]: [ss_sold_date_sk#1, ss_item_sk#2, ss_cdemo_sk#3, ss_store_sk#4, ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_coupon_amt#8] @@ -310,20 +310,20 @@ Input [7]: [ss_item_sk#2, ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_c (52) HashAggregate [codegen id : 11] Input [5]: [i_item_id#21, agg1#23, agg2#24, agg3#25, agg4#26] Keys [1]: [i_item_id#21] -Functions [4]: [partial_avg(cast(agg1#23 as bigint)), partial_avg(UnscaledValue(agg2#24)), partial_avg(UnscaledValue(agg3#25)), partial_avg(UnscaledValue(agg4#26))] +Functions [4]: [partial_avg(agg1#23), partial_avg(UnscaledValue(agg2#24)), partial_avg(UnscaledValue(agg3#25)), partial_avg(UnscaledValue(agg4#26))] Aggregate Attributes [8]: [sum#54, count#55, sum#56, count#57, sum#58, count#59, sum#60, count#61] Results [9]: [i_item_id#21, sum#62, count#63, sum#64, count#65, sum#66, count#67, sum#68, count#69] (53) Exchange Input [9]: [i_item_id#21, sum#62, count#63, sum#64, count#65, sum#66, count#67, sum#68, count#69] -Arguments: hashpartitioning(i_item_id#21, 5), true, [id=#70] +Arguments: hashpartitioning(i_item_id#21, 5), ENSURE_REQUIREMENTS, [id=#70] (54) HashAggregate [codegen id : 12] Input [9]: [i_item_id#21, sum#62, count#63, sum#64, count#65, sum#66, count#67, sum#68, count#69] Keys [1]: [i_item_id#21] -Functions [4]: [avg(cast(agg1#23 as bigint)), avg(UnscaledValue(agg2#24)), avg(UnscaledValue(agg3#25)), avg(UnscaledValue(agg4#26))] -Aggregate Attributes [4]: [avg(cast(agg1#23 as bigint))#71, avg(UnscaledValue(agg2#24))#72, avg(UnscaledValue(agg3#25))#73, avg(UnscaledValue(agg4#26))#74] -Results [7]: [i_item_id#21, null AS s_state#75, 1 AS g_state#76, avg(cast(agg1#23 as bigint))#71 AS agg1#77, cast((avg(UnscaledValue(agg2#24))#72 / 100.0) as decimal(11,6)) AS agg2#78, cast((avg(UnscaledValue(agg3#25))#73 / 100.0) as decimal(11,6)) AS agg3#79, cast((avg(UnscaledValue(agg4#26))#74 / 100.0) as decimal(11,6)) AS agg4#80] +Functions [4]: [avg(agg1#23), avg(UnscaledValue(agg2#24)), avg(UnscaledValue(agg3#25)), avg(UnscaledValue(agg4#26))] +Aggregate Attributes [4]: [avg(agg1#23)#71, avg(UnscaledValue(agg2#24))#72, avg(UnscaledValue(agg3#25))#73, avg(UnscaledValue(agg4#26))#74] +Results [7]: [i_item_id#21, null AS s_state#75, 1 AS g_state#76, avg(agg1#23)#71 AS agg1#77, cast((avg(UnscaledValue(agg2#24))#72 / 100.0) as decimal(11,6)) AS agg2#78, cast((avg(UnscaledValue(agg3#25))#73 / 100.0) as decimal(11,6)) AS agg3#79, cast((avg(UnscaledValue(agg4#26))#74 / 100.0) as decimal(11,6)) AS agg4#80] (55) Scan parquet default.store_sales Output [8]: [ss_sold_date_sk#1, ss_item_sk#2, ss_cdemo_sk#3, ss_store_sk#4, ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_coupon_amt#8] @@ -405,20 +405,20 @@ Input [6]: [ss_item_sk#2, ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_c (73) HashAggregate [codegen id : 17] Input [4]: [agg1#23, agg2#24, agg3#25, agg4#26] Keys: [] -Functions [4]: [partial_avg(cast(agg1#23 as bigint)), partial_avg(UnscaledValue(agg2#24)), partial_avg(UnscaledValue(agg3#25)), partial_avg(UnscaledValue(agg4#26))] +Functions [4]: [partial_avg(agg1#23), partial_avg(UnscaledValue(agg2#24)), partial_avg(UnscaledValue(agg3#25)), partial_avg(UnscaledValue(agg4#26))] Aggregate Attributes [8]: [sum#82, count#83, sum#84, count#85, sum#86, count#87, sum#88, count#89] Results [8]: [sum#90, count#91, sum#92, count#93, sum#94, count#95, sum#96, count#97] (74) Exchange Input [8]: [sum#90, count#91, sum#92, count#93, sum#94, count#95, sum#96, count#97] -Arguments: SinglePartition, true, [id=#98] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#98] (75) HashAggregate [codegen id : 18] Input [8]: [sum#90, count#91, sum#92, count#93, sum#94, count#95, sum#96, count#97] Keys: [] -Functions [4]: [avg(cast(agg1#23 as bigint)), avg(UnscaledValue(agg2#24)), avg(UnscaledValue(agg3#25)), avg(UnscaledValue(agg4#26))] -Aggregate Attributes [4]: [avg(cast(agg1#23 as bigint))#99, avg(UnscaledValue(agg2#24))#100, avg(UnscaledValue(agg3#25))#101, avg(UnscaledValue(agg4#26))#102] -Results [7]: [null AS i_item_id#103, null AS s_state#104, 1 AS g_state#105, avg(cast(agg1#23 as bigint))#99 AS agg1#106, cast((avg(UnscaledValue(agg2#24))#100 / 100.0) as decimal(11,6)) AS agg2#107, cast((avg(UnscaledValue(agg3#25))#101 / 100.0) as decimal(11,6)) AS agg3#108, cast((avg(UnscaledValue(agg4#26))#102 / 100.0) as decimal(11,6)) AS agg4#109] +Functions [4]: [avg(agg1#23), avg(UnscaledValue(agg2#24)), avg(UnscaledValue(agg3#25)), avg(UnscaledValue(agg4#26))] +Aggregate Attributes [4]: [avg(agg1#23)#99, avg(UnscaledValue(agg2#24))#100, avg(UnscaledValue(agg3#25))#101, avg(UnscaledValue(agg4#26))#102] +Results [7]: [null AS i_item_id#103, null AS s_state#104, 1 AS g_state#105, avg(agg1#23)#99 AS agg1#106, cast((avg(UnscaledValue(agg2#24))#100 / 100.0) as decimal(11,6)) AS agg2#107, cast((avg(UnscaledValue(agg3#25))#101 / 100.0) as decimal(11,6)) AS agg3#108, cast((avg(UnscaledValue(agg4#26))#102 / 100.0) as decimal(11,6)) AS agg4#109] (76) Union diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q27a.sf100/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q27a.sf100/simplified.txt index 61aaa22964cb7..43cd43a9874de 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q27a.sf100/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q27a.sf100/simplified.txt @@ -1,7 +1,7 @@ TakeOrderedAndProject [i_item_id,s_state,g_state,agg1,agg2,agg3,agg4] Union WholeStageCodegen (6) - HashAggregate [i_item_id,s_state,sum,count,sum,count,sum,count,sum,count] [avg(cast(agg1 as bigint)),avg(UnscaledValue(agg2)),avg(UnscaledValue(agg3)),avg(UnscaledValue(agg4)),g_state,agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] + HashAggregate [i_item_id,s_state,sum,count,sum,count,sum,count,sum,count] [avg(agg1),avg(UnscaledValue(agg2)),avg(UnscaledValue(agg3)),avg(UnscaledValue(agg4)),g_state,agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] InputAdapter Exchange [i_item_id,s_state] #1 WholeStageCodegen (5) @@ -49,7 +49,7 @@ TakeOrderedAndProject [i_item_id,s_state,g_state,agg1,agg2,agg3,agg4] InputAdapter Scan parquet default.item [i_item_sk,i_item_id] WholeStageCodegen (12) - HashAggregate [i_item_id,sum,count,sum,count,sum,count,sum,count] [avg(cast(agg1 as bigint)),avg(UnscaledValue(agg2)),avg(UnscaledValue(agg3)),avg(UnscaledValue(agg4)),s_state,g_state,agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] + HashAggregate [i_item_id,sum,count,sum,count,sum,count,sum,count] [avg(agg1),avg(UnscaledValue(agg2)),avg(UnscaledValue(agg3)),avg(UnscaledValue(agg4)),s_state,g_state,agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] InputAdapter Exchange [i_item_id] #6 WholeStageCodegen (11) @@ -81,7 +81,7 @@ TakeOrderedAndProject [i_item_id,s_state,g_state,agg1,agg2,agg3,agg4] InputAdapter ReusedExchange [i_item_sk,i_item_id] #5 WholeStageCodegen (18) - HashAggregate [sum,count,sum,count,sum,count,sum,count] [avg(cast(agg1 as bigint)),avg(UnscaledValue(agg2)),avg(UnscaledValue(agg3)),avg(UnscaledValue(agg4)),i_item_id,s_state,g_state,agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] + HashAggregate [sum,count,sum,count,sum,count,sum,count] [avg(agg1),avg(UnscaledValue(agg2)),avg(UnscaledValue(agg3)),avg(UnscaledValue(agg4)),i_item_id,s_state,g_state,agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] InputAdapter Exchange #8 WholeStageCodegen (17) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q27a/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q27a/explain.txt index 75e07ce8cd680..5d492529bb906 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q27a/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q27a/explain.txt @@ -211,20 +211,20 @@ Input [8]: [ss_item_sk#2, ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_c (30) HashAggregate [codegen id : 5] Input [6]: [i_item_id#21, s_state#18, agg1#23, agg2#24, agg3#25, agg4#26] Keys [2]: [i_item_id#21, s_state#18] -Functions [4]: [partial_avg(cast(agg1#23 as bigint)), partial_avg(UnscaledValue(agg2#24)), partial_avg(UnscaledValue(agg3#25)), partial_avg(UnscaledValue(agg4#26))] +Functions [4]: [partial_avg(agg1#23), partial_avg(UnscaledValue(agg2#24)), partial_avg(UnscaledValue(agg3#25)), partial_avg(UnscaledValue(agg4#26))] Aggregate Attributes [8]: [sum#27, count#28, sum#29, count#30, sum#31, count#32, sum#33, count#34] Results [10]: [i_item_id#21, s_state#18, sum#35, count#36, sum#37, count#38, sum#39, count#40, sum#41, count#42] (31) Exchange Input [10]: [i_item_id#21, s_state#18, sum#35, count#36, sum#37, count#38, sum#39, count#40, sum#41, count#42] -Arguments: hashpartitioning(i_item_id#21, s_state#18, 5), true, [id=#43] +Arguments: hashpartitioning(i_item_id#21, s_state#18, 5), ENSURE_REQUIREMENTS, [id=#43] (32) HashAggregate [codegen id : 6] Input [10]: [i_item_id#21, s_state#18, sum#35, count#36, sum#37, count#38, sum#39, count#40, sum#41, count#42] Keys [2]: [i_item_id#21, s_state#18] -Functions [4]: [avg(cast(agg1#23 as bigint)), avg(UnscaledValue(agg2#24)), avg(UnscaledValue(agg3#25)), avg(UnscaledValue(agg4#26))] -Aggregate Attributes [4]: [avg(cast(agg1#23 as bigint))#44, avg(UnscaledValue(agg2#24))#45, avg(UnscaledValue(agg3#25))#46, avg(UnscaledValue(agg4#26))#47] -Results [7]: [i_item_id#21, s_state#18, 0 AS g_state#48, avg(cast(agg1#23 as bigint))#44 AS agg1#49, cast((avg(UnscaledValue(agg2#24))#45 / 100.0) as decimal(11,6)) AS agg2#50, cast((avg(UnscaledValue(agg3#25))#46 / 100.0) as decimal(11,6)) AS agg3#51, cast((avg(UnscaledValue(agg4#26))#47 / 100.0) as decimal(11,6)) AS agg4#52] +Functions [4]: [avg(agg1#23), avg(UnscaledValue(agg2#24)), avg(UnscaledValue(agg3#25)), avg(UnscaledValue(agg4#26))] +Aggregate Attributes [4]: [avg(agg1#23)#44, avg(UnscaledValue(agg2#24))#45, avg(UnscaledValue(agg3#25))#46, avg(UnscaledValue(agg4#26))#47] +Results [7]: [i_item_id#21, s_state#18, 0 AS g_state#48, avg(agg1#23)#44 AS agg1#49, cast((avg(UnscaledValue(agg2#24))#45 / 100.0) as decimal(11,6)) AS agg2#50, cast((avg(UnscaledValue(agg3#25))#46 / 100.0) as decimal(11,6)) AS agg3#51, cast((avg(UnscaledValue(agg4#26))#47 / 100.0) as decimal(11,6)) AS agg4#52] (33) Scan parquet default.store_sales Output [8]: [ss_sold_date_sk#1, ss_item_sk#2, ss_cdemo_sk#3, ss_store_sk#4, ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_coupon_amt#8] @@ -310,20 +310,20 @@ Input [7]: [ss_item_sk#2, ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_c (52) HashAggregate [codegen id : 11] Input [5]: [i_item_id#21, agg1#23, agg2#24, agg3#25, agg4#26] Keys [1]: [i_item_id#21] -Functions [4]: [partial_avg(cast(agg1#23 as bigint)), partial_avg(UnscaledValue(agg2#24)), partial_avg(UnscaledValue(agg3#25)), partial_avg(UnscaledValue(agg4#26))] +Functions [4]: [partial_avg(agg1#23), partial_avg(UnscaledValue(agg2#24)), partial_avg(UnscaledValue(agg3#25)), partial_avg(UnscaledValue(agg4#26))] Aggregate Attributes [8]: [sum#54, count#55, sum#56, count#57, sum#58, count#59, sum#60, count#61] Results [9]: [i_item_id#21, sum#62, count#63, sum#64, count#65, sum#66, count#67, sum#68, count#69] (53) Exchange Input [9]: [i_item_id#21, sum#62, count#63, sum#64, count#65, sum#66, count#67, sum#68, count#69] -Arguments: hashpartitioning(i_item_id#21, 5), true, [id=#70] +Arguments: hashpartitioning(i_item_id#21, 5), ENSURE_REQUIREMENTS, [id=#70] (54) HashAggregate [codegen id : 12] Input [9]: [i_item_id#21, sum#62, count#63, sum#64, count#65, sum#66, count#67, sum#68, count#69] Keys [1]: [i_item_id#21] -Functions [4]: [avg(cast(agg1#23 as bigint)), avg(UnscaledValue(agg2#24)), avg(UnscaledValue(agg3#25)), avg(UnscaledValue(agg4#26))] -Aggregate Attributes [4]: [avg(cast(agg1#23 as bigint))#71, avg(UnscaledValue(agg2#24))#72, avg(UnscaledValue(agg3#25))#73, avg(UnscaledValue(agg4#26))#74] -Results [7]: [i_item_id#21, null AS s_state#75, 1 AS g_state#76, avg(cast(agg1#23 as bigint))#71 AS agg1#77, cast((avg(UnscaledValue(agg2#24))#72 / 100.0) as decimal(11,6)) AS agg2#78, cast((avg(UnscaledValue(agg3#25))#73 / 100.0) as decimal(11,6)) AS agg3#79, cast((avg(UnscaledValue(agg4#26))#74 / 100.0) as decimal(11,6)) AS agg4#80] +Functions [4]: [avg(agg1#23), avg(UnscaledValue(agg2#24)), avg(UnscaledValue(agg3#25)), avg(UnscaledValue(agg4#26))] +Aggregate Attributes [4]: [avg(agg1#23)#71, avg(UnscaledValue(agg2#24))#72, avg(UnscaledValue(agg3#25))#73, avg(UnscaledValue(agg4#26))#74] +Results [7]: [i_item_id#21, null AS s_state#75, 1 AS g_state#76, avg(agg1#23)#71 AS agg1#77, cast((avg(UnscaledValue(agg2#24))#72 / 100.0) as decimal(11,6)) AS agg2#78, cast((avg(UnscaledValue(agg3#25))#73 / 100.0) as decimal(11,6)) AS agg3#79, cast((avg(UnscaledValue(agg4#26))#74 / 100.0) as decimal(11,6)) AS agg4#80] (55) Scan parquet default.store_sales Output [8]: [ss_sold_date_sk#1, ss_item_sk#2, ss_cdemo_sk#3, ss_store_sk#4, ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_coupon_amt#8] @@ -405,20 +405,20 @@ Input [6]: [ss_item_sk#2, ss_quantity#5, ss_list_price#6, ss_sales_price#7, ss_c (73) HashAggregate [codegen id : 17] Input [4]: [agg1#23, agg2#24, agg3#25, agg4#26] Keys: [] -Functions [4]: [partial_avg(cast(agg1#23 as bigint)), partial_avg(UnscaledValue(agg2#24)), partial_avg(UnscaledValue(agg3#25)), partial_avg(UnscaledValue(agg4#26))] +Functions [4]: [partial_avg(agg1#23), partial_avg(UnscaledValue(agg2#24)), partial_avg(UnscaledValue(agg3#25)), partial_avg(UnscaledValue(agg4#26))] Aggregate Attributes [8]: [sum#82, count#83, sum#84, count#85, sum#86, count#87, sum#88, count#89] Results [8]: [sum#90, count#91, sum#92, count#93, sum#94, count#95, sum#96, count#97] (74) Exchange Input [8]: [sum#90, count#91, sum#92, count#93, sum#94, count#95, sum#96, count#97] -Arguments: SinglePartition, true, [id=#98] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#98] (75) HashAggregate [codegen id : 18] Input [8]: [sum#90, count#91, sum#92, count#93, sum#94, count#95, sum#96, count#97] Keys: [] -Functions [4]: [avg(cast(agg1#23 as bigint)), avg(UnscaledValue(agg2#24)), avg(UnscaledValue(agg3#25)), avg(UnscaledValue(agg4#26))] -Aggregate Attributes [4]: [avg(cast(agg1#23 as bigint))#99, avg(UnscaledValue(agg2#24))#100, avg(UnscaledValue(agg3#25))#101, avg(UnscaledValue(agg4#26))#102] -Results [7]: [null AS i_item_id#103, null AS s_state#104, 1 AS g_state#105, avg(cast(agg1#23 as bigint))#99 AS agg1#106, cast((avg(UnscaledValue(agg2#24))#100 / 100.0) as decimal(11,6)) AS agg2#107, cast((avg(UnscaledValue(agg3#25))#101 / 100.0) as decimal(11,6)) AS agg3#108, cast((avg(UnscaledValue(agg4#26))#102 / 100.0) as decimal(11,6)) AS agg4#109] +Functions [4]: [avg(agg1#23), avg(UnscaledValue(agg2#24)), avg(UnscaledValue(agg3#25)), avg(UnscaledValue(agg4#26))] +Aggregate Attributes [4]: [avg(agg1#23)#99, avg(UnscaledValue(agg2#24))#100, avg(UnscaledValue(agg3#25))#101, avg(UnscaledValue(agg4#26))#102] +Results [7]: [null AS i_item_id#103, null AS s_state#104, 1 AS g_state#105, avg(agg1#23)#99 AS agg1#106, cast((avg(UnscaledValue(agg2#24))#100 / 100.0) as decimal(11,6)) AS agg2#107, cast((avg(UnscaledValue(agg3#25))#101 / 100.0) as decimal(11,6)) AS agg3#108, cast((avg(UnscaledValue(agg4#26))#102 / 100.0) as decimal(11,6)) AS agg4#109] (76) Union diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q27a/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q27a/simplified.txt index 995ed4b432be6..7f5d93934c6b5 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q27a/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q27a/simplified.txt @@ -1,7 +1,7 @@ TakeOrderedAndProject [i_item_id,s_state,g_state,agg1,agg2,agg3,agg4] Union WholeStageCodegen (6) - HashAggregate [i_item_id,s_state,sum,count,sum,count,sum,count,sum,count] [avg(cast(agg1 as bigint)),avg(UnscaledValue(agg2)),avg(UnscaledValue(agg3)),avg(UnscaledValue(agg4)),g_state,agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] + HashAggregate [i_item_id,s_state,sum,count,sum,count,sum,count,sum,count] [avg(agg1),avg(UnscaledValue(agg2)),avg(UnscaledValue(agg3)),avg(UnscaledValue(agg4)),g_state,agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] InputAdapter Exchange [i_item_id,s_state] #1 WholeStageCodegen (5) @@ -49,7 +49,7 @@ TakeOrderedAndProject [i_item_id,s_state,g_state,agg1,agg2,agg3,agg4] InputAdapter Scan parquet default.item [i_item_sk,i_item_id] WholeStageCodegen (12) - HashAggregate [i_item_id,sum,count,sum,count,sum,count,sum,count] [avg(cast(agg1 as bigint)),avg(UnscaledValue(agg2)),avg(UnscaledValue(agg3)),avg(UnscaledValue(agg4)),s_state,g_state,agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] + HashAggregate [i_item_id,sum,count,sum,count,sum,count,sum,count] [avg(agg1),avg(UnscaledValue(agg2)),avg(UnscaledValue(agg3)),avg(UnscaledValue(agg4)),s_state,g_state,agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] InputAdapter Exchange [i_item_id] #6 WholeStageCodegen (11) @@ -81,7 +81,7 @@ TakeOrderedAndProject [i_item_id,s_state,g_state,agg1,agg2,agg3,agg4] InputAdapter ReusedExchange [i_item_sk,i_item_id] #5 WholeStageCodegen (18) - HashAggregate [sum,count,sum,count,sum,count,sum,count] [avg(cast(agg1 as bigint)),avg(UnscaledValue(agg2)),avg(UnscaledValue(agg3)),avg(UnscaledValue(agg4)),i_item_id,s_state,g_state,agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] + HashAggregate [sum,count,sum,count,sum,count,sum,count] [avg(agg1),avg(UnscaledValue(agg2)),avg(UnscaledValue(agg3)),avg(UnscaledValue(agg4)),i_item_id,s_state,g_state,agg1,agg2,agg3,agg4,sum,count,sum,count,sum,count,sum,count] InputAdapter Exchange #8 WholeStageCodegen (17) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35.sf100/explain.txt index d38804d4f0422..8ecff085bcfc6 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35.sf100/explain.txt @@ -77,7 +77,7 @@ Condition : (isnotnull(c_current_addr_sk#5) AND isnotnull(c_current_cdemo_sk#4)) (4) Exchange Input [3]: [c_customer_sk#3, c_current_cdemo_sk#4, c_current_addr_sk#5] -Arguments: hashpartitioning(c_customer_sk#3, 5), true, [id=#6] +Arguments: hashpartitioning(c_customer_sk#3, 5), ENSURE_REQUIREMENTS, [id=#6] (5) Sort [codegen id : 2] Input [3]: [c_customer_sk#3, c_current_cdemo_sk#4, c_current_addr_sk#5] @@ -130,7 +130,7 @@ Input [3]: [ss_sold_date_sk#7, ss_customer_sk#8, d_date_sk#9] (16) Exchange Input [1]: [ss_customer_sk#8] -Arguments: hashpartitioning(ss_customer_sk#8, 5), true, [id=#13] +Arguments: hashpartitioning(ss_customer_sk#8, 5), ENSURE_REQUIREMENTS, [id=#13] (17) Sort [codegen id : 5] Input [1]: [ss_customer_sk#8] @@ -169,7 +169,7 @@ Input [3]: [ws_sold_date_sk#14, ws_bill_customer_sk#15, d_date_sk#9] (25) Exchange Input [1]: [ws_bill_customer_sk#15] -Arguments: hashpartitioning(ws_bill_customer_sk#15, 5), true, [id=#16] +Arguments: hashpartitioning(ws_bill_customer_sk#15, 5), ENSURE_REQUIREMENTS, [id=#16] (26) Sort [codegen id : 8] Input [1]: [ws_bill_customer_sk#15] @@ -208,7 +208,7 @@ Input [3]: [cs_sold_date_sk#17, cs_ship_customer_sk#18, d_date_sk#9] (34) Exchange Input [1]: [cs_ship_customer_sk#18] -Arguments: hashpartitioning(cs_ship_customer_sk#18, 5), true, [id=#19] +Arguments: hashpartitioning(cs_ship_customer_sk#18, 5), ENSURE_REQUIREMENTS, [id=#19] (35) Sort [codegen id : 11] Input [1]: [cs_ship_customer_sk#18] @@ -229,7 +229,7 @@ Input [5]: [c_customer_sk#3, c_current_cdemo_sk#4, c_current_addr_sk#5, exists#2 (39) Exchange Input [2]: [c_current_cdemo_sk#4, c_current_addr_sk#5] -Arguments: hashpartitioning(c_current_addr_sk#5, 5), true, [id=#20] +Arguments: hashpartitioning(c_current_addr_sk#5, 5), ENSURE_REQUIREMENTS, [id=#20] (40) Sort [codegen id : 13] Input [2]: [c_current_cdemo_sk#4, c_current_addr_sk#5] @@ -251,7 +251,7 @@ Condition : isnotnull(ca_address_sk#21) (44) Exchange Input [2]: [ca_address_sk#21, ca_state#22] -Arguments: hashpartitioning(ca_address_sk#21, 5), true, [id=#23] +Arguments: hashpartitioning(ca_address_sk#21, 5), ENSURE_REQUIREMENTS, [id=#23] (45) Sort [codegen id : 15] Input [2]: [ca_address_sk#21, ca_state#22] @@ -268,7 +268,7 @@ Input [4]: [c_current_cdemo_sk#4, c_current_addr_sk#5, ca_address_sk#21, ca_stat (48) Exchange Input [2]: [c_current_cdemo_sk#4, ca_state#22] -Arguments: hashpartitioning(c_current_cdemo_sk#4, 5), true, [id=#24] +Arguments: hashpartitioning(c_current_cdemo_sk#4, 5), ENSURE_REQUIREMENTS, [id=#24] (49) Sort [codegen id : 17] Input [2]: [c_current_cdemo_sk#4, ca_state#22] @@ -290,7 +290,7 @@ Condition : isnotnull(cd_demo_sk#25) (53) Exchange Input [6]: [cd_demo_sk#25, cd_gender#26, cd_marital_status#27, cd_dep_count#28, cd_dep_employed_count#29, cd_dep_college_count#30] -Arguments: hashpartitioning(cd_demo_sk#25, 5), true, [id=#31] +Arguments: hashpartitioning(cd_demo_sk#25, 5), ENSURE_REQUIREMENTS, [id=#31] (54) Sort [codegen id : 19] Input [6]: [cd_demo_sk#25, cd_gender#26, cd_marital_status#27, cd_dep_count#28, cd_dep_employed_count#29, cd_dep_college_count#30] @@ -308,20 +308,20 @@ Input [8]: [c_current_cdemo_sk#4, ca_state#22, cd_demo_sk#25, cd_gender#26, cd_m (57) HashAggregate [codegen id : 20] Input [6]: [ca_state#22, cd_gender#26, cd_marital_status#27, cd_dep_count#28, cd_dep_employed_count#29, cd_dep_college_count#30] Keys [6]: [ca_state#22, cd_gender#26, cd_marital_status#27, cd_dep_count#28, cd_dep_employed_count#29, cd_dep_college_count#30] -Functions [10]: [partial_count(1), partial_avg(cast(cd_dep_count#28 as bigint)), partial_max(cd_dep_count#28), partial_sum(cast(cd_dep_count#28 as bigint)), partial_avg(cast(cd_dep_employed_count#29 as bigint)), partial_max(cd_dep_employed_count#29), partial_sum(cast(cd_dep_employed_count#29 as bigint)), partial_avg(cast(cd_dep_college_count#30 as bigint)), partial_max(cd_dep_college_count#30), partial_sum(cast(cd_dep_college_count#30 as bigint))] +Functions [10]: [partial_count(1), partial_avg(cd_dep_count#28), partial_max(cd_dep_count#28), partial_sum(cd_dep_count#28), partial_avg(cd_dep_employed_count#29), partial_max(cd_dep_employed_count#29), partial_sum(cd_dep_employed_count#29), partial_avg(cd_dep_college_count#30), partial_max(cd_dep_college_count#30), partial_sum(cd_dep_college_count#30)] Aggregate Attributes [13]: [count#32, sum#33, count#34, max#35, sum#36, sum#37, count#38, max#39, sum#40, sum#41, count#42, max#43, sum#44] Results [19]: [ca_state#22, cd_gender#26, cd_marital_status#27, cd_dep_count#28, cd_dep_employed_count#29, cd_dep_college_count#30, count#45, sum#46, count#47, max#48, sum#49, sum#50, count#51, max#52, sum#53, sum#54, count#55, max#56, sum#57] (58) Exchange Input [19]: [ca_state#22, cd_gender#26, cd_marital_status#27, cd_dep_count#28, cd_dep_employed_count#29, cd_dep_college_count#30, count#45, sum#46, count#47, max#48, sum#49, sum#50, count#51, max#52, sum#53, sum#54, count#55, max#56, sum#57] -Arguments: hashpartitioning(ca_state#22, cd_gender#26, cd_marital_status#27, cd_dep_count#28, cd_dep_employed_count#29, cd_dep_college_count#30, 5), true, [id=#58] +Arguments: hashpartitioning(ca_state#22, cd_gender#26, cd_marital_status#27, cd_dep_count#28, cd_dep_employed_count#29, cd_dep_college_count#30, 5), ENSURE_REQUIREMENTS, [id=#58] (59) HashAggregate [codegen id : 21] Input [19]: [ca_state#22, cd_gender#26, cd_marital_status#27, cd_dep_count#28, cd_dep_employed_count#29, cd_dep_college_count#30, count#45, sum#46, count#47, max#48, sum#49, sum#50, count#51, max#52, sum#53, sum#54, count#55, max#56, sum#57] Keys [6]: [ca_state#22, cd_gender#26, cd_marital_status#27, cd_dep_count#28, cd_dep_employed_count#29, cd_dep_college_count#30] -Functions [10]: [count(1), avg(cast(cd_dep_count#28 as bigint)), max(cd_dep_count#28), sum(cast(cd_dep_count#28 as bigint)), avg(cast(cd_dep_employed_count#29 as bigint)), max(cd_dep_employed_count#29), sum(cast(cd_dep_employed_count#29 as bigint)), avg(cast(cd_dep_college_count#30 as bigint)), max(cd_dep_college_count#30), sum(cast(cd_dep_college_count#30 as bigint))] -Aggregate Attributes [10]: [count(1)#59, avg(cast(cd_dep_count#28 as bigint))#60, max(cd_dep_count#28)#61, sum(cast(cd_dep_count#28 as bigint))#62, avg(cast(cd_dep_employed_count#29 as bigint))#63, max(cd_dep_employed_count#29)#64, sum(cast(cd_dep_employed_count#29 as bigint))#65, avg(cast(cd_dep_college_count#30 as bigint))#66, max(cd_dep_college_count#30)#67, sum(cast(cd_dep_college_count#30 as bigint))#68] -Results [18]: [ca_state#22, cd_gender#26, cd_marital_status#27, cd_dep_count#28, count(1)#59 AS cnt1#69, avg(cast(cd_dep_count#28 as bigint))#60 AS avg(cd_dep_count)#70, max(cd_dep_count#28)#61 AS max(cd_dep_count)#71, sum(cast(cd_dep_count#28 as bigint))#62 AS sum(cd_dep_count)#72, cd_dep_employed_count#29, count(1)#59 AS cnt2#73, avg(cast(cd_dep_employed_count#29 as bigint))#63 AS avg(cd_dep_employed_count)#74, max(cd_dep_employed_count#29)#64 AS max(cd_dep_employed_count)#75, sum(cast(cd_dep_employed_count#29 as bigint))#65 AS sum(cd_dep_employed_count)#76, cd_dep_college_count#30, count(1)#59 AS cnt3#77, avg(cast(cd_dep_college_count#30 as bigint))#66 AS avg(cd_dep_college_count)#78, max(cd_dep_college_count#30)#67 AS max(cd_dep_college_count)#79, sum(cast(cd_dep_college_count#30 as bigint))#68 AS sum(cd_dep_college_count)#80] +Functions [10]: [count(1), avg(cd_dep_count#28), max(cd_dep_count#28), sum(cd_dep_count#28), avg(cd_dep_employed_count#29), max(cd_dep_employed_count#29), sum(cd_dep_employed_count#29), avg(cd_dep_college_count#30), max(cd_dep_college_count#30), sum(cd_dep_college_count#30)] +Aggregate Attributes [10]: [count(1)#59, avg(cd_dep_count#28)#60, max(cd_dep_count#28)#61, sum(cd_dep_count#28)#62, avg(cd_dep_employed_count#29)#63, max(cd_dep_employed_count#29)#64, sum(cd_dep_employed_count#29)#65, avg(cd_dep_college_count#30)#66, max(cd_dep_college_count#30)#67, sum(cd_dep_college_count#30)#68] +Results [18]: [ca_state#22, cd_gender#26, cd_marital_status#27, cd_dep_count#28, count(1)#59 AS cnt1#69, avg(cd_dep_count#28)#60 AS avg(cd_dep_count)#70, max(cd_dep_count#28)#61 AS max(cd_dep_count)#71, sum(cd_dep_count#28)#62 AS sum(cd_dep_count)#72, cd_dep_employed_count#29, count(1)#59 AS cnt2#73, avg(cd_dep_employed_count#29)#63 AS avg(cd_dep_employed_count)#74, max(cd_dep_employed_count#29)#64 AS max(cd_dep_employed_count)#75, sum(cd_dep_employed_count#29)#65 AS sum(cd_dep_employed_count)#76, cd_dep_college_count#30, count(1)#59 AS cnt3#77, avg(cd_dep_college_count#30)#66 AS avg(cd_dep_college_count)#78, max(cd_dep_college_count#30)#67 AS max(cd_dep_college_count)#79, sum(cd_dep_college_count#30)#68 AS sum(cd_dep_college_count)#80] (60) TakeOrderedAndProject Input [18]: [ca_state#22, cd_gender#26, cd_marital_status#27, cd_dep_count#28, cnt1#69, avg(cd_dep_count)#70, max(cd_dep_count)#71, sum(cd_dep_count)#72, cd_dep_employed_count#29, cnt2#73, avg(cd_dep_employed_count)#74, max(cd_dep_employed_count)#75, sum(cd_dep_employed_count)#76, cd_dep_college_count#30, cnt3#77, avg(cd_dep_college_count)#78, max(cd_dep_college_count)#79, sum(cd_dep_college_count)#80] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35.sf100/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35.sf100/simplified.txt index b1e750592d99e..874925ee9c7ec 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35.sf100/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35.sf100/simplified.txt @@ -1,6 +1,6 @@ TakeOrderedAndProject [ca_state,cd_gender,cd_marital_status,cd_dep_count,cd_dep_employed_count,cd_dep_college_count,cnt1,avg(cd_dep_count),max(cd_dep_count),sum(cd_dep_count),cnt2,avg(cd_dep_employed_count),max(cd_dep_employed_count),sum(cd_dep_employed_count),cnt3,avg(cd_dep_college_count),max(cd_dep_college_count),sum(cd_dep_college_count)] WholeStageCodegen (21) - HashAggregate [ca_state,cd_gender,cd_marital_status,cd_dep_count,cd_dep_employed_count,cd_dep_college_count,count,sum,count,max,sum,sum,count,max,sum,sum,count,max,sum] [count(1),avg(cast(cd_dep_count as bigint)),max(cd_dep_count),sum(cast(cd_dep_count as bigint)),avg(cast(cd_dep_employed_count as bigint)),max(cd_dep_employed_count),sum(cast(cd_dep_employed_count as bigint)),avg(cast(cd_dep_college_count as bigint)),max(cd_dep_college_count),sum(cast(cd_dep_college_count as bigint)),cnt1,avg(cd_dep_count),max(cd_dep_count),sum(cd_dep_count),cnt2,avg(cd_dep_employed_count),max(cd_dep_employed_count),sum(cd_dep_employed_count),cnt3,avg(cd_dep_college_count),max(cd_dep_college_count),sum(cd_dep_college_count),count,sum,count,max,sum,sum,count,max,sum,sum,count,max,sum] + HashAggregate [ca_state,cd_gender,cd_marital_status,cd_dep_count,cd_dep_employed_count,cd_dep_college_count,count,sum,count,max,sum,sum,count,max,sum,sum,count,max,sum] [count(1),avg(cd_dep_count),max(cd_dep_count),sum(cd_dep_count),avg(cd_dep_employed_count),max(cd_dep_employed_count),sum(cd_dep_employed_count),avg(cd_dep_college_count),max(cd_dep_college_count),sum(cd_dep_college_count),cnt1,avg(cd_dep_count),max(cd_dep_count),sum(cd_dep_count),cnt2,avg(cd_dep_employed_count),max(cd_dep_employed_count),sum(cd_dep_employed_count),cnt3,avg(cd_dep_college_count),max(cd_dep_college_count),sum(cd_dep_college_count),count,sum,count,max,sum,sum,count,max,sum,sum,count,max,sum] InputAdapter Exchange [ca_state,cd_gender,cd_marital_status,cd_dep_count,cd_dep_employed_count,cd_dep_college_count] #1 WholeStageCodegen (20) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35/explain.txt index e091e512afba8..a01c00642b844 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35/explain.txt @@ -253,20 +253,20 @@ Input [8]: [c_current_cdemo_sk#4, ca_state#20, cd_demo_sk#22, cd_gender#23, cd_m (46) HashAggregate [codegen id : 9] Input [6]: [ca_state#20, cd_gender#23, cd_marital_status#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27] Keys [6]: [ca_state#20, cd_gender#23, cd_marital_status#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27] -Functions [10]: [partial_count(1), partial_avg(cast(cd_dep_count#25 as bigint)), partial_max(cd_dep_count#25), partial_sum(cast(cd_dep_count#25 as bigint)), partial_avg(cast(cd_dep_employed_count#26 as bigint)), partial_max(cd_dep_employed_count#26), partial_sum(cast(cd_dep_employed_count#26 as bigint)), partial_avg(cast(cd_dep_college_count#27 as bigint)), partial_max(cd_dep_college_count#27), partial_sum(cast(cd_dep_college_count#27 as bigint))] +Functions [10]: [partial_count(1), partial_avg(cd_dep_count#25), partial_max(cd_dep_count#25), partial_sum(cd_dep_count#25), partial_avg(cd_dep_employed_count#26), partial_max(cd_dep_employed_count#26), partial_sum(cd_dep_employed_count#26), partial_avg(cd_dep_college_count#27), partial_max(cd_dep_college_count#27), partial_sum(cd_dep_college_count#27)] Aggregate Attributes [13]: [count#29, sum#30, count#31, max#32, sum#33, sum#34, count#35, max#36, sum#37, sum#38, count#39, max#40, sum#41] Results [19]: [ca_state#20, cd_gender#23, cd_marital_status#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27, count#42, sum#43, count#44, max#45, sum#46, sum#47, count#48, max#49, sum#50, sum#51, count#52, max#53, sum#54] (47) Exchange Input [19]: [ca_state#20, cd_gender#23, cd_marital_status#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27, count#42, sum#43, count#44, max#45, sum#46, sum#47, count#48, max#49, sum#50, sum#51, count#52, max#53, sum#54] -Arguments: hashpartitioning(ca_state#20, cd_gender#23, cd_marital_status#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27, 5), true, [id=#55] +Arguments: hashpartitioning(ca_state#20, cd_gender#23, cd_marital_status#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27, 5), ENSURE_REQUIREMENTS, [id=#55] (48) HashAggregate [codegen id : 10] Input [19]: [ca_state#20, cd_gender#23, cd_marital_status#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27, count#42, sum#43, count#44, max#45, sum#46, sum#47, count#48, max#49, sum#50, sum#51, count#52, max#53, sum#54] Keys [6]: [ca_state#20, cd_gender#23, cd_marital_status#24, cd_dep_count#25, cd_dep_employed_count#26, cd_dep_college_count#27] -Functions [10]: [count(1), avg(cast(cd_dep_count#25 as bigint)), max(cd_dep_count#25), sum(cast(cd_dep_count#25 as bigint)), avg(cast(cd_dep_employed_count#26 as bigint)), max(cd_dep_employed_count#26), sum(cast(cd_dep_employed_count#26 as bigint)), avg(cast(cd_dep_college_count#27 as bigint)), max(cd_dep_college_count#27), sum(cast(cd_dep_college_count#27 as bigint))] -Aggregate Attributes [10]: [count(1)#56, avg(cast(cd_dep_count#25 as bigint))#57, max(cd_dep_count#25)#58, sum(cast(cd_dep_count#25 as bigint))#59, avg(cast(cd_dep_employed_count#26 as bigint))#60, max(cd_dep_employed_count#26)#61, sum(cast(cd_dep_employed_count#26 as bigint))#62, avg(cast(cd_dep_college_count#27 as bigint))#63, max(cd_dep_college_count#27)#64, sum(cast(cd_dep_college_count#27 as bigint))#65] -Results [18]: [ca_state#20, cd_gender#23, cd_marital_status#24, cd_dep_count#25, count(1)#56 AS cnt1#66, avg(cast(cd_dep_count#25 as bigint))#57 AS avg(cd_dep_count)#67, max(cd_dep_count#25)#58 AS max(cd_dep_count)#68, sum(cast(cd_dep_count#25 as bigint))#59 AS sum(cd_dep_count)#69, cd_dep_employed_count#26, count(1)#56 AS cnt2#70, avg(cast(cd_dep_employed_count#26 as bigint))#60 AS avg(cd_dep_employed_count)#71, max(cd_dep_employed_count#26)#61 AS max(cd_dep_employed_count)#72, sum(cast(cd_dep_employed_count#26 as bigint))#62 AS sum(cd_dep_employed_count)#73, cd_dep_college_count#27, count(1)#56 AS cnt3#74, avg(cast(cd_dep_college_count#27 as bigint))#63 AS avg(cd_dep_college_count)#75, max(cd_dep_college_count#27)#64 AS max(cd_dep_college_count)#76, sum(cast(cd_dep_college_count#27 as bigint))#65 AS sum(cd_dep_college_count)#77] +Functions [10]: [count(1), avg(cd_dep_count#25), max(cd_dep_count#25), sum(cd_dep_count#25), avg(cd_dep_employed_count#26), max(cd_dep_employed_count#26), sum(cd_dep_employed_count#26), avg(cd_dep_college_count#27), max(cd_dep_college_count#27), sum(cd_dep_college_count#27)] +Aggregate Attributes [10]: [count(1)#56, avg(cd_dep_count#25)#57, max(cd_dep_count#25)#58, sum(cd_dep_count#25)#59, avg(cd_dep_employed_count#26)#60, max(cd_dep_employed_count#26)#61, sum(cd_dep_employed_count#26)#62, avg(cd_dep_college_count#27)#63, max(cd_dep_college_count#27)#64, sum(cd_dep_college_count#27)#65] +Results [18]: [ca_state#20, cd_gender#23, cd_marital_status#24, cd_dep_count#25, count(1)#56 AS cnt1#66, avg(cd_dep_count#25)#57 AS avg(cd_dep_count)#67, max(cd_dep_count#25)#58 AS max(cd_dep_count)#68, sum(cd_dep_count#25)#59 AS sum(cd_dep_count)#69, cd_dep_employed_count#26, count(1)#56 AS cnt2#70, avg(cd_dep_employed_count#26)#60 AS avg(cd_dep_employed_count)#71, max(cd_dep_employed_count#26)#61 AS max(cd_dep_employed_count)#72, sum(cd_dep_employed_count#26)#62 AS sum(cd_dep_employed_count)#73, cd_dep_college_count#27, count(1)#56 AS cnt3#74, avg(cd_dep_college_count#27)#63 AS avg(cd_dep_college_count)#75, max(cd_dep_college_count#27)#64 AS max(cd_dep_college_count)#76, sum(cd_dep_college_count#27)#65 AS sum(cd_dep_college_count)#77] (49) TakeOrderedAndProject Input [18]: [ca_state#20, cd_gender#23, cd_marital_status#24, cd_dep_count#25, cnt1#66, avg(cd_dep_count)#67, max(cd_dep_count)#68, sum(cd_dep_count)#69, cd_dep_employed_count#26, cnt2#70, avg(cd_dep_employed_count)#71, max(cd_dep_employed_count)#72, sum(cd_dep_employed_count)#73, cd_dep_college_count#27, cnt3#74, avg(cd_dep_college_count)#75, max(cd_dep_college_count)#76, sum(cd_dep_college_count)#77] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35/simplified.txt index 4f6a2929c32ca..5be3c878078e5 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35/simplified.txt @@ -1,6 +1,6 @@ TakeOrderedAndProject [ca_state,cd_gender,cd_marital_status,cd_dep_count,cd_dep_employed_count,cd_dep_college_count,cnt1,avg(cd_dep_count),max(cd_dep_count),sum(cd_dep_count),cnt2,avg(cd_dep_employed_count),max(cd_dep_employed_count),sum(cd_dep_employed_count),cnt3,avg(cd_dep_college_count),max(cd_dep_college_count),sum(cd_dep_college_count)] WholeStageCodegen (10) - HashAggregate [ca_state,cd_gender,cd_marital_status,cd_dep_count,cd_dep_employed_count,cd_dep_college_count,count,sum,count,max,sum,sum,count,max,sum,sum,count,max,sum] [count(1),avg(cast(cd_dep_count as bigint)),max(cd_dep_count),sum(cast(cd_dep_count as bigint)),avg(cast(cd_dep_employed_count as bigint)),max(cd_dep_employed_count),sum(cast(cd_dep_employed_count as bigint)),avg(cast(cd_dep_college_count as bigint)),max(cd_dep_college_count),sum(cast(cd_dep_college_count as bigint)),cnt1,avg(cd_dep_count),max(cd_dep_count),sum(cd_dep_count),cnt2,avg(cd_dep_employed_count),max(cd_dep_employed_count),sum(cd_dep_employed_count),cnt3,avg(cd_dep_college_count),max(cd_dep_college_count),sum(cd_dep_college_count),count,sum,count,max,sum,sum,count,max,sum,sum,count,max,sum] + HashAggregate [ca_state,cd_gender,cd_marital_status,cd_dep_count,cd_dep_employed_count,cd_dep_college_count,count,sum,count,max,sum,sum,count,max,sum,sum,count,max,sum] [count(1),avg(cd_dep_count),max(cd_dep_count),sum(cd_dep_count),avg(cd_dep_employed_count),max(cd_dep_employed_count),sum(cd_dep_employed_count),avg(cd_dep_college_count),max(cd_dep_college_count),sum(cd_dep_college_count),cnt1,avg(cd_dep_count),max(cd_dep_count),sum(cd_dep_count),cnt2,avg(cd_dep_employed_count),max(cd_dep_employed_count),sum(cd_dep_employed_count),cnt3,avg(cd_dep_college_count),max(cd_dep_college_count),sum(cd_dep_college_count),count,sum,count,max,sum,sum,count,max,sum,sum,count,max,sum] InputAdapter Exchange [ca_state,cd_gender,cd_marital_status,cd_dep_count,cd_dep_employed_count,cd_dep_college_count] #1 WholeStageCodegen (9) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35a.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35a.sf100/explain.txt index b08d2174e5974..20c7fd4c3557f 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35a.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35a.sf100/explain.txt @@ -74,7 +74,7 @@ Condition : (isnotnull(c_current_addr_sk#3) AND isnotnull(c_current_cdemo_sk#2)) (4) Exchange Input [3]: [c_customer_sk#1, c_current_cdemo_sk#2, c_current_addr_sk#3] -Arguments: hashpartitioning(c_customer_sk#1, 5), true, [id=#4] +Arguments: hashpartitioning(c_customer_sk#1, 5), ENSURE_REQUIREMENTS, [id=#4] (5) Sort [codegen id : 2] Input [3]: [c_customer_sk#1, c_current_cdemo_sk#2, c_current_addr_sk#3] @@ -127,7 +127,7 @@ Input [3]: [ss_sold_date_sk#5, ss_customer_sk#6, d_date_sk#7] (16) Exchange Input [1]: [ss_customer_sk#6] -Arguments: hashpartitioning(ss_customer_sk#6, 5), true, [id=#11] +Arguments: hashpartitioning(ss_customer_sk#6, 5), ENSURE_REQUIREMENTS, [id=#11] (17) Sort [codegen id : 5] Input [1]: [ss_customer_sk#6] @@ -194,7 +194,7 @@ Input [3]: [cs_sold_date_sk#15, cs_ship_customer_sk#16, d_date_sk#7] (32) Exchange Input [1]: [customsk#14] -Arguments: hashpartitioning(customsk#14, 5), true, [id=#18] +Arguments: hashpartitioning(customsk#14, 5), ENSURE_REQUIREMENTS, [id=#18] (33) Sort [codegen id : 10] Input [1]: [customsk#14] @@ -211,7 +211,7 @@ Input [3]: [c_customer_sk#1, c_current_cdemo_sk#2, c_current_addr_sk#3] (36) Exchange Input [2]: [c_current_cdemo_sk#2, c_current_addr_sk#3] -Arguments: hashpartitioning(c_current_addr_sk#3, 5), true, [id=#19] +Arguments: hashpartitioning(c_current_addr_sk#3, 5), ENSURE_REQUIREMENTS, [id=#19] (37) Sort [codegen id : 12] Input [2]: [c_current_cdemo_sk#2, c_current_addr_sk#3] @@ -233,7 +233,7 @@ Condition : isnotnull(ca_address_sk#20) (41) Exchange Input [2]: [ca_address_sk#20, ca_state#21] -Arguments: hashpartitioning(ca_address_sk#20, 5), true, [id=#22] +Arguments: hashpartitioning(ca_address_sk#20, 5), ENSURE_REQUIREMENTS, [id=#22] (42) Sort [codegen id : 14] Input [2]: [ca_address_sk#20, ca_state#21] @@ -250,7 +250,7 @@ Input [4]: [c_current_cdemo_sk#2, c_current_addr_sk#3, ca_address_sk#20, ca_stat (45) Exchange Input [2]: [c_current_cdemo_sk#2, ca_state#21] -Arguments: hashpartitioning(c_current_cdemo_sk#2, 5), true, [id=#23] +Arguments: hashpartitioning(c_current_cdemo_sk#2, 5), ENSURE_REQUIREMENTS, [id=#23] (46) Sort [codegen id : 16] Input [2]: [c_current_cdemo_sk#2, ca_state#21] @@ -272,7 +272,7 @@ Condition : isnotnull(cd_demo_sk#24) (50) Exchange Input [6]: [cd_demo_sk#24, cd_gender#25, cd_marital_status#26, cd_dep_count#27, cd_dep_employed_count#28, cd_dep_college_count#29] -Arguments: hashpartitioning(cd_demo_sk#24, 5), true, [id=#30] +Arguments: hashpartitioning(cd_demo_sk#24, 5), ENSURE_REQUIREMENTS, [id=#30] (51) Sort [codegen id : 18] Input [6]: [cd_demo_sk#24, cd_gender#25, cd_marital_status#26, cd_dep_count#27, cd_dep_employed_count#28, cd_dep_college_count#29] @@ -290,20 +290,20 @@ Input [8]: [c_current_cdemo_sk#2, ca_state#21, cd_demo_sk#24, cd_gender#25, cd_m (54) HashAggregate [codegen id : 19] Input [6]: [ca_state#21, cd_gender#25, cd_marital_status#26, cd_dep_count#27, cd_dep_employed_count#28, cd_dep_college_count#29] Keys [6]: [ca_state#21, cd_gender#25, cd_marital_status#26, cd_dep_count#27, cd_dep_employed_count#28, cd_dep_college_count#29] -Functions [10]: [partial_count(1), partial_avg(cast(cd_dep_count#27 as bigint)), partial_max(cd_dep_count#27), partial_sum(cast(cd_dep_count#27 as bigint)), partial_avg(cast(cd_dep_employed_count#28 as bigint)), partial_max(cd_dep_employed_count#28), partial_sum(cast(cd_dep_employed_count#28 as bigint)), partial_avg(cast(cd_dep_college_count#29 as bigint)), partial_max(cd_dep_college_count#29), partial_sum(cast(cd_dep_college_count#29 as bigint))] +Functions [10]: [partial_count(1), partial_avg(cd_dep_count#27), partial_max(cd_dep_count#27), partial_sum(cd_dep_count#27), partial_avg(cd_dep_employed_count#28), partial_max(cd_dep_employed_count#28), partial_sum(cd_dep_employed_count#28), partial_avg(cd_dep_college_count#29), partial_max(cd_dep_college_count#29), partial_sum(cd_dep_college_count#29)] Aggregate Attributes [13]: [count#31, sum#32, count#33, max#34, sum#35, sum#36, count#37, max#38, sum#39, sum#40, count#41, max#42, sum#43] Results [19]: [ca_state#21, cd_gender#25, cd_marital_status#26, cd_dep_count#27, cd_dep_employed_count#28, cd_dep_college_count#29, count#44, sum#45, count#46, max#47, sum#48, sum#49, count#50, max#51, sum#52, sum#53, count#54, max#55, sum#56] (55) Exchange Input [19]: [ca_state#21, cd_gender#25, cd_marital_status#26, cd_dep_count#27, cd_dep_employed_count#28, cd_dep_college_count#29, count#44, sum#45, count#46, max#47, sum#48, sum#49, count#50, max#51, sum#52, sum#53, count#54, max#55, sum#56] -Arguments: hashpartitioning(ca_state#21, cd_gender#25, cd_marital_status#26, cd_dep_count#27, cd_dep_employed_count#28, cd_dep_college_count#29, 5), true, [id=#57] +Arguments: hashpartitioning(ca_state#21, cd_gender#25, cd_marital_status#26, cd_dep_count#27, cd_dep_employed_count#28, cd_dep_college_count#29, 5), ENSURE_REQUIREMENTS, [id=#57] (56) HashAggregate [codegen id : 20] Input [19]: [ca_state#21, cd_gender#25, cd_marital_status#26, cd_dep_count#27, cd_dep_employed_count#28, cd_dep_college_count#29, count#44, sum#45, count#46, max#47, sum#48, sum#49, count#50, max#51, sum#52, sum#53, count#54, max#55, sum#56] Keys [6]: [ca_state#21, cd_gender#25, cd_marital_status#26, cd_dep_count#27, cd_dep_employed_count#28, cd_dep_college_count#29] -Functions [10]: [count(1), avg(cast(cd_dep_count#27 as bigint)), max(cd_dep_count#27), sum(cast(cd_dep_count#27 as bigint)), avg(cast(cd_dep_employed_count#28 as bigint)), max(cd_dep_employed_count#28), sum(cast(cd_dep_employed_count#28 as bigint)), avg(cast(cd_dep_college_count#29 as bigint)), max(cd_dep_college_count#29), sum(cast(cd_dep_college_count#29 as bigint))] -Aggregate Attributes [10]: [count(1)#58, avg(cast(cd_dep_count#27 as bigint))#59, max(cd_dep_count#27)#60, sum(cast(cd_dep_count#27 as bigint))#61, avg(cast(cd_dep_employed_count#28 as bigint))#62, max(cd_dep_employed_count#28)#63, sum(cast(cd_dep_employed_count#28 as bigint))#64, avg(cast(cd_dep_college_count#29 as bigint))#65, max(cd_dep_college_count#29)#66, sum(cast(cd_dep_college_count#29 as bigint))#67] -Results [18]: [ca_state#21, cd_gender#25, cd_marital_status#26, cd_dep_count#27, count(1)#58 AS cnt1#68, avg(cast(cd_dep_count#27 as bigint))#59 AS avg(cd_dep_count)#69, max(cd_dep_count#27)#60 AS max(cd_dep_count)#70, sum(cast(cd_dep_count#27 as bigint))#61 AS sum(cd_dep_count)#71, cd_dep_employed_count#28, count(1)#58 AS cnt2#72, avg(cast(cd_dep_employed_count#28 as bigint))#62 AS avg(cd_dep_employed_count)#73, max(cd_dep_employed_count#28)#63 AS max(cd_dep_employed_count)#74, sum(cast(cd_dep_employed_count#28 as bigint))#64 AS sum(cd_dep_employed_count)#75, cd_dep_college_count#29, count(1)#58 AS cnt3#76, avg(cast(cd_dep_college_count#29 as bigint))#65 AS avg(cd_dep_college_count)#77, max(cd_dep_college_count#29)#66 AS max(cd_dep_college_count)#78, sum(cast(cd_dep_college_count#29 as bigint))#67 AS sum(cd_dep_college_count)#79] +Functions [10]: [count(1), avg(cd_dep_count#27), max(cd_dep_count#27), sum(cd_dep_count#27), avg(cd_dep_employed_count#28), max(cd_dep_employed_count#28), sum(cd_dep_employed_count#28), avg(cd_dep_college_count#29), max(cd_dep_college_count#29), sum(cd_dep_college_count#29)] +Aggregate Attributes [10]: [count(1)#58, avg(cd_dep_count#27)#59, max(cd_dep_count#27)#60, sum(cd_dep_count#27)#61, avg(cd_dep_employed_count#28)#62, max(cd_dep_employed_count#28)#63, sum(cd_dep_employed_count#28)#64, avg(cd_dep_college_count#29)#65, max(cd_dep_college_count#29)#66, sum(cd_dep_college_count#29)#67] +Results [18]: [ca_state#21, cd_gender#25, cd_marital_status#26, cd_dep_count#27, count(1)#58 AS cnt1#68, avg(cd_dep_count#27)#59 AS avg(cd_dep_count)#69, max(cd_dep_count#27)#60 AS max(cd_dep_count)#70, sum(cd_dep_count#27)#61 AS sum(cd_dep_count)#71, cd_dep_employed_count#28, count(1)#58 AS cnt2#72, avg(cd_dep_employed_count#28)#62 AS avg(cd_dep_employed_count)#73, max(cd_dep_employed_count#28)#63 AS max(cd_dep_employed_count)#74, sum(cd_dep_employed_count#28)#64 AS sum(cd_dep_employed_count)#75, cd_dep_college_count#29, count(1)#58 AS cnt3#76, avg(cd_dep_college_count#29)#65 AS avg(cd_dep_college_count)#77, max(cd_dep_college_count#29)#66 AS max(cd_dep_college_count)#78, sum(cd_dep_college_count#29)#67 AS sum(cd_dep_college_count)#79] (57) TakeOrderedAndProject Input [18]: [ca_state#21, cd_gender#25, cd_marital_status#26, cd_dep_count#27, cnt1#68, avg(cd_dep_count)#69, max(cd_dep_count)#70, sum(cd_dep_count)#71, cd_dep_employed_count#28, cnt2#72, avg(cd_dep_employed_count)#73, max(cd_dep_employed_count)#74, sum(cd_dep_employed_count)#75, cd_dep_college_count#29, cnt3#76, avg(cd_dep_college_count)#77, max(cd_dep_college_count)#78, sum(cd_dep_college_count)#79] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35a.sf100/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35a.sf100/simplified.txt index b38eeeb527eb4..330ec52870400 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35a.sf100/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35a.sf100/simplified.txt @@ -1,6 +1,6 @@ TakeOrderedAndProject [ca_state,cd_gender,cd_marital_status,cd_dep_count,cd_dep_employed_count,cd_dep_college_count,cnt1,avg(cd_dep_count),max(cd_dep_count),sum(cd_dep_count),cnt2,avg(cd_dep_employed_count),max(cd_dep_employed_count),sum(cd_dep_employed_count),cnt3,avg(cd_dep_college_count),max(cd_dep_college_count),sum(cd_dep_college_count)] WholeStageCodegen (20) - HashAggregate [ca_state,cd_gender,cd_marital_status,cd_dep_count,cd_dep_employed_count,cd_dep_college_count,count,sum,count,max,sum,sum,count,max,sum,sum,count,max,sum] [count(1),avg(cast(cd_dep_count as bigint)),max(cd_dep_count),sum(cast(cd_dep_count as bigint)),avg(cast(cd_dep_employed_count as bigint)),max(cd_dep_employed_count),sum(cast(cd_dep_employed_count as bigint)),avg(cast(cd_dep_college_count as bigint)),max(cd_dep_college_count),sum(cast(cd_dep_college_count as bigint)),cnt1,avg(cd_dep_count),max(cd_dep_count),sum(cd_dep_count),cnt2,avg(cd_dep_employed_count),max(cd_dep_employed_count),sum(cd_dep_employed_count),cnt3,avg(cd_dep_college_count),max(cd_dep_college_count),sum(cd_dep_college_count),count,sum,count,max,sum,sum,count,max,sum,sum,count,max,sum] + HashAggregate [ca_state,cd_gender,cd_marital_status,cd_dep_count,cd_dep_employed_count,cd_dep_college_count,count,sum,count,max,sum,sum,count,max,sum,sum,count,max,sum] [count(1),avg(cd_dep_count),max(cd_dep_count),sum(cd_dep_count),avg(cd_dep_employed_count),max(cd_dep_employed_count),sum(cd_dep_employed_count),avg(cd_dep_college_count),max(cd_dep_college_count),sum(cd_dep_college_count),cnt1,avg(cd_dep_count),max(cd_dep_count),sum(cd_dep_count),cnt2,avg(cd_dep_employed_count),max(cd_dep_employed_count),sum(cd_dep_employed_count),cnt3,avg(cd_dep_college_count),max(cd_dep_college_count),sum(cd_dep_college_count),count,sum,count,max,sum,sum,count,max,sum,sum,count,max,sum] InputAdapter Exchange [ca_state,cd_gender,cd_marital_status,cd_dep_count,cd_dep_employed_count,cd_dep_college_count] #1 WholeStageCodegen (19) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35a/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35a/explain.txt index 847b5cf66c3e0..dc97aa0ef8a3f 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35a/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35a/explain.txt @@ -240,20 +240,20 @@ Input [8]: [c_current_cdemo_sk#2, ca_state#19, cd_demo_sk#21, cd_gender#22, cd_m (44) HashAggregate [codegen id : 9] Input [6]: [ca_state#19, cd_gender#22, cd_marital_status#23, cd_dep_count#24, cd_dep_employed_count#25, cd_dep_college_count#26] Keys [6]: [ca_state#19, cd_gender#22, cd_marital_status#23, cd_dep_count#24, cd_dep_employed_count#25, cd_dep_college_count#26] -Functions [10]: [partial_count(1), partial_avg(cast(cd_dep_count#24 as bigint)), partial_max(cd_dep_count#24), partial_sum(cast(cd_dep_count#24 as bigint)), partial_avg(cast(cd_dep_employed_count#25 as bigint)), partial_max(cd_dep_employed_count#25), partial_sum(cast(cd_dep_employed_count#25 as bigint)), partial_avg(cast(cd_dep_college_count#26 as bigint)), partial_max(cd_dep_college_count#26), partial_sum(cast(cd_dep_college_count#26 as bigint))] +Functions [10]: [partial_count(1), partial_avg(cd_dep_count#24), partial_max(cd_dep_count#24), partial_sum(cd_dep_count#24), partial_avg(cd_dep_employed_count#25), partial_max(cd_dep_employed_count#25), partial_sum(cd_dep_employed_count#25), partial_avg(cd_dep_college_count#26), partial_max(cd_dep_college_count#26), partial_sum(cd_dep_college_count#26)] Aggregate Attributes [13]: [count#28, sum#29, count#30, max#31, sum#32, sum#33, count#34, max#35, sum#36, sum#37, count#38, max#39, sum#40] Results [19]: [ca_state#19, cd_gender#22, cd_marital_status#23, cd_dep_count#24, cd_dep_employed_count#25, cd_dep_college_count#26, count#41, sum#42, count#43, max#44, sum#45, sum#46, count#47, max#48, sum#49, sum#50, count#51, max#52, sum#53] (45) Exchange Input [19]: [ca_state#19, cd_gender#22, cd_marital_status#23, cd_dep_count#24, cd_dep_employed_count#25, cd_dep_college_count#26, count#41, sum#42, count#43, max#44, sum#45, sum#46, count#47, max#48, sum#49, sum#50, count#51, max#52, sum#53] -Arguments: hashpartitioning(ca_state#19, cd_gender#22, cd_marital_status#23, cd_dep_count#24, cd_dep_employed_count#25, cd_dep_college_count#26, 5), true, [id=#54] +Arguments: hashpartitioning(ca_state#19, cd_gender#22, cd_marital_status#23, cd_dep_count#24, cd_dep_employed_count#25, cd_dep_college_count#26, 5), ENSURE_REQUIREMENTS, [id=#54] (46) HashAggregate [codegen id : 10] Input [19]: [ca_state#19, cd_gender#22, cd_marital_status#23, cd_dep_count#24, cd_dep_employed_count#25, cd_dep_college_count#26, count#41, sum#42, count#43, max#44, sum#45, sum#46, count#47, max#48, sum#49, sum#50, count#51, max#52, sum#53] Keys [6]: [ca_state#19, cd_gender#22, cd_marital_status#23, cd_dep_count#24, cd_dep_employed_count#25, cd_dep_college_count#26] -Functions [10]: [count(1), avg(cast(cd_dep_count#24 as bigint)), max(cd_dep_count#24), sum(cast(cd_dep_count#24 as bigint)), avg(cast(cd_dep_employed_count#25 as bigint)), max(cd_dep_employed_count#25), sum(cast(cd_dep_employed_count#25 as bigint)), avg(cast(cd_dep_college_count#26 as bigint)), max(cd_dep_college_count#26), sum(cast(cd_dep_college_count#26 as bigint))] -Aggregate Attributes [10]: [count(1)#55, avg(cast(cd_dep_count#24 as bigint))#56, max(cd_dep_count#24)#57, sum(cast(cd_dep_count#24 as bigint))#58, avg(cast(cd_dep_employed_count#25 as bigint))#59, max(cd_dep_employed_count#25)#60, sum(cast(cd_dep_employed_count#25 as bigint))#61, avg(cast(cd_dep_college_count#26 as bigint))#62, max(cd_dep_college_count#26)#63, sum(cast(cd_dep_college_count#26 as bigint))#64] -Results [18]: [ca_state#19, cd_gender#22, cd_marital_status#23, cd_dep_count#24, count(1)#55 AS cnt1#65, avg(cast(cd_dep_count#24 as bigint))#56 AS avg(cd_dep_count)#66, max(cd_dep_count#24)#57 AS max(cd_dep_count)#67, sum(cast(cd_dep_count#24 as bigint))#58 AS sum(cd_dep_count)#68, cd_dep_employed_count#25, count(1)#55 AS cnt2#69, avg(cast(cd_dep_employed_count#25 as bigint))#59 AS avg(cd_dep_employed_count)#70, max(cd_dep_employed_count#25)#60 AS max(cd_dep_employed_count)#71, sum(cast(cd_dep_employed_count#25 as bigint))#61 AS sum(cd_dep_employed_count)#72, cd_dep_college_count#26, count(1)#55 AS cnt3#73, avg(cast(cd_dep_college_count#26 as bigint))#62 AS avg(cd_dep_college_count)#74, max(cd_dep_college_count#26)#63 AS max(cd_dep_college_count)#75, sum(cast(cd_dep_college_count#26 as bigint))#64 AS sum(cd_dep_college_count)#76] +Functions [10]: [count(1), avg(cd_dep_count#24), max(cd_dep_count#24), sum(cd_dep_count#24), avg(cd_dep_employed_count#25), max(cd_dep_employed_count#25), sum(cd_dep_employed_count#25), avg(cd_dep_college_count#26), max(cd_dep_college_count#26), sum(cd_dep_college_count#26)] +Aggregate Attributes [10]: [count(1)#55, avg(cd_dep_count#24)#56, max(cd_dep_count#24)#57, sum(cd_dep_count#24)#58, avg(cd_dep_employed_count#25)#59, max(cd_dep_employed_count#25)#60, sum(cd_dep_employed_count#25)#61, avg(cd_dep_college_count#26)#62, max(cd_dep_college_count#26)#63, sum(cd_dep_college_count#26)#64] +Results [18]: [ca_state#19, cd_gender#22, cd_marital_status#23, cd_dep_count#24, count(1)#55 AS cnt1#65, avg(cd_dep_count#24)#56 AS avg(cd_dep_count)#66, max(cd_dep_count#24)#57 AS max(cd_dep_count)#67, sum(cd_dep_count#24)#58 AS sum(cd_dep_count)#68, cd_dep_employed_count#25, count(1)#55 AS cnt2#69, avg(cd_dep_employed_count#25)#59 AS avg(cd_dep_employed_count)#70, max(cd_dep_employed_count#25)#60 AS max(cd_dep_employed_count)#71, sum(cd_dep_employed_count#25)#61 AS sum(cd_dep_employed_count)#72, cd_dep_college_count#26, count(1)#55 AS cnt3#73, avg(cd_dep_college_count#26)#62 AS avg(cd_dep_college_count)#74, max(cd_dep_college_count#26)#63 AS max(cd_dep_college_count)#75, sum(cd_dep_college_count#26)#64 AS sum(cd_dep_college_count)#76] (47) TakeOrderedAndProject Input [18]: [ca_state#19, cd_gender#22, cd_marital_status#23, cd_dep_count#24, cnt1#65, avg(cd_dep_count)#66, max(cd_dep_count)#67, sum(cd_dep_count)#68, cd_dep_employed_count#25, cnt2#69, avg(cd_dep_employed_count)#70, max(cd_dep_employed_count)#71, sum(cd_dep_employed_count)#72, cd_dep_college_count#26, cnt3#73, avg(cd_dep_college_count)#74, max(cd_dep_college_count)#75, sum(cd_dep_college_count)#76] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35a/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35a/simplified.txt index 85198feb8e903..23345884d7702 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35a/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q35a/simplified.txt @@ -1,6 +1,6 @@ TakeOrderedAndProject [ca_state,cd_gender,cd_marital_status,cd_dep_count,cd_dep_employed_count,cd_dep_college_count,cnt1,avg(cd_dep_count),max(cd_dep_count),sum(cd_dep_count),cnt2,avg(cd_dep_employed_count),max(cd_dep_employed_count),sum(cd_dep_employed_count),cnt3,avg(cd_dep_college_count),max(cd_dep_college_count),sum(cd_dep_college_count)] WholeStageCodegen (10) - HashAggregate [ca_state,cd_gender,cd_marital_status,cd_dep_count,cd_dep_employed_count,cd_dep_college_count,count,sum,count,max,sum,sum,count,max,sum,sum,count,max,sum] [count(1),avg(cast(cd_dep_count as bigint)),max(cd_dep_count),sum(cast(cd_dep_count as bigint)),avg(cast(cd_dep_employed_count as bigint)),max(cd_dep_employed_count),sum(cast(cd_dep_employed_count as bigint)),avg(cast(cd_dep_college_count as bigint)),max(cd_dep_college_count),sum(cast(cd_dep_college_count as bigint)),cnt1,avg(cd_dep_count),max(cd_dep_count),sum(cd_dep_count),cnt2,avg(cd_dep_employed_count),max(cd_dep_employed_count),sum(cd_dep_employed_count),cnt3,avg(cd_dep_college_count),max(cd_dep_college_count),sum(cd_dep_college_count),count,sum,count,max,sum,sum,count,max,sum,sum,count,max,sum] + HashAggregate [ca_state,cd_gender,cd_marital_status,cd_dep_count,cd_dep_employed_count,cd_dep_college_count,count,sum,count,max,sum,sum,count,max,sum,sum,count,max,sum] [count(1),avg(cd_dep_count),max(cd_dep_count),sum(cd_dep_count),avg(cd_dep_employed_count),max(cd_dep_employed_count),sum(cd_dep_employed_count),avg(cd_dep_college_count),max(cd_dep_college_count),sum(cd_dep_college_count),cnt1,avg(cd_dep_count),max(cd_dep_count),sum(cd_dep_count),cnt2,avg(cd_dep_employed_count),max(cd_dep_employed_count),sum(cd_dep_employed_count),cnt3,avg(cd_dep_college_count),max(cd_dep_college_count),sum(cd_dep_college_count),count,sum,count,max,sum,sum,count,max,sum,sum,count,max,sum] InputAdapter Exchange [ca_state,cd_gender,cd_marital_status,cd_dep_count,cd_dep_employed_count,cd_dep_college_count] #1 WholeStageCodegen (9) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q47.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q47.sf100/explain.txt index b09c0073bc795..9bd9ccf3c98be 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q47.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q47.sf100/explain.txt @@ -129,7 +129,7 @@ Input [8]: [ss_item_sk#2, ss_store_sk#3, ss_sales_price#4, d_year#6, d_moy#7, s_ (16) Exchange Input [6]: [ss_item_sk#2, ss_sales_price#4, d_year#6, d_moy#7, s_store_name#10, s_company_name#11] -Arguments: hashpartitioning(ss_item_sk#2, 5), true, [id=#13] +Arguments: hashpartitioning(ss_item_sk#2, 5), ENSURE_REQUIREMENTS, [id=#13] (17) Sort [codegen id : 4] Input [6]: [ss_item_sk#2, ss_sales_price#4, d_year#6, d_moy#7, s_store_name#10, s_company_name#11] @@ -151,7 +151,7 @@ Condition : ((isnotnull(i_item_sk#14) AND isnotnull(i_category#16)) AND isnotnul (21) Exchange Input [3]: [i_item_sk#14, i_brand#15, i_category#16] -Arguments: hashpartitioning(i_item_sk#14, 5), true, [id=#17] +Arguments: hashpartitioning(i_item_sk#14, 5), ENSURE_REQUIREMENTS, [id=#17] (22) Sort [codegen id : 6] Input [3]: [i_item_sk#14, i_brand#15, i_category#16] @@ -175,7 +175,7 @@ Results [7]: [i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_y (26) Exchange Input [7]: [i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_year#6, d_moy#7, sum#19] -Arguments: hashpartitioning(i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_year#6, d_moy#7, 5), true, [id=#20] +Arguments: hashpartitioning(i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_year#6, d_moy#7, 5), ENSURE_REQUIREMENTS, [id=#20] (27) HashAggregate [codegen id : 8] Input [7]: [i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_year#6, d_moy#7, sum#19] @@ -186,7 +186,7 @@ Results [8]: [i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_y (28) Exchange Input [8]: [i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_year#6, d_moy#7, sum_sales#22, _w0#23] -Arguments: hashpartitioning(i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_year#6, 5), true, [id=#24] +Arguments: hashpartitioning(i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_year#6, 5), ENSURE_REQUIREMENTS, [id=#24] (29) Sort [codegen id : 9] Input [8]: [i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_year#6, d_moy#7, sum_sales#22, _w0#23] @@ -202,7 +202,7 @@ Input [9]: [i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_yea (32) Exchange Input [8]: [i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_year#6, d_moy#7, sum_sales#22, avg_monthly_sales#25] -Arguments: hashpartitioning(i_category#16, i_brand#15, s_store_name#10, s_company_name#11, 5), true, [id=#26] +Arguments: hashpartitioning(i_category#16, i_brand#15, s_store_name#10, s_company_name#11, 5), ENSURE_REQUIREMENTS, [id=#26] (33) Sort [codegen id : 11] Input [8]: [i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_year#6, d_moy#7, sum_sales#22, avg_monthly_sales#25] @@ -214,11 +214,11 @@ Arguments: [rank(d_year#6, d_moy#7) windowspecdefinition(i_category#16, i_brand# (35) Filter [codegen id : 12] Input [9]: [i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_year#6, d_moy#7, sum_sales#22, avg_monthly_sales#25, rn#27] -Condition : (((((isnotnull(d_year#6) AND isnotnull(avg_monthly_sales#25)) AND (d_year#6 = 1999)) AND (avg_monthly_sales#25 > 0.000000)) AND (CASE WHEN (avg_monthly_sales#25 > 0.000000) THEN CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#22 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#25 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_monthly_sales#25 as decimal(22,6)))), DecimalType(38,16), true) ELSE null END > 0.1000000000000000)) AND isnotnull(rn#27)) +Condition : ((((((isnotnull(d_year#6) AND isnotnull(avg_monthly_sales#25)) AND (d_year#6 = 1999)) AND (avg_monthly_sales#25 > 0.000000)) AND (avg_monthly_sales#25 > 0.000000)) AND (CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#22 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#25 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_monthly_sales#25 as decimal(22,6)))), DecimalType(38,16), true) > 0.1000000000000000)) AND isnotnull(rn#27)) (36) Exchange Input [9]: [i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_year#6, d_moy#7, sum_sales#22, avg_monthly_sales#25, rn#27] -Arguments: hashpartitioning(i_category#16, i_brand#15, s_store_name#10, s_company_name#11, rn#27, 5), true, [id=#28] +Arguments: hashpartitioning(i_category#16, i_brand#15, s_store_name#10, s_company_name#11, rn#27, 5), ENSURE_REQUIREMENTS, [id=#28] (37) Sort [codegen id : 13] Input [9]: [i_category#16, i_brand#15, s_store_name#10, s_company_name#11, d_year#6, d_moy#7, sum_sales#22, avg_monthly_sales#25, rn#27] @@ -236,7 +236,7 @@ Results [7]: [i_category#29, i_brand#30, s_store_name#31, s_company_name#32, d_y (40) Exchange Input [7]: [i_category#29, i_brand#30, s_store_name#31, s_company_name#32, d_year#33, d_moy#34, sum_sales#37] -Arguments: hashpartitioning(i_category#29, i_brand#30, s_store_name#31, s_company_name#32, 5), true, [id=#38] +Arguments: hashpartitioning(i_category#29, i_brand#30, s_store_name#31, s_company_name#32, 5), ENSURE_REQUIREMENTS, [id=#38] (41) Sort [codegen id : 22] Input [7]: [i_category#29, i_brand#30, s_store_name#31, s_company_name#32, d_year#33, d_moy#34, sum_sales#37] @@ -256,7 +256,7 @@ Input [8]: [i_category#29, i_brand#30, s_store_name#31, s_company_name#32, d_yea (45) Exchange Input [6]: [i_category#29, i_brand#30, s_store_name#31, s_company_name#32, sum_sales#37, rn#39] -Arguments: hashpartitioning(i_category#29, i_brand#30, s_store_name#31, s_company_name#32, (rn#39 + 1), 5), true, [id=#40] +Arguments: hashpartitioning(i_category#29, i_brand#30, s_store_name#31, s_company_name#32, (rn#39 + 1), 5), ENSURE_REQUIREMENTS, [id=#40] (46) Sort [codegen id : 24] Input [6]: [i_category#29, i_brand#30, s_store_name#31, s_company_name#32, sum_sales#37, rn#39] @@ -292,7 +292,7 @@ Input [8]: [i_category#41, i_brand#42, s_store_name#43, s_company_name#44, d_yea (54) Exchange Input [6]: [i_category#41, i_brand#42, s_store_name#43, s_company_name#44, sum_sales#47, rn#48] -Arguments: hashpartitioning(i_category#41, i_brand#42, s_store_name#43, s_company_name#44, (rn#48 - 1), 5), true, [id=#49] +Arguments: hashpartitioning(i_category#41, i_brand#42, s_store_name#43, s_company_name#44, (rn#48 - 1), 5), ENSURE_REQUIREMENTS, [id=#49] (55) Sort [codegen id : 36] Input [6]: [i_category#41, i_brand#42, s_store_name#43, s_company_name#44, sum_sales#47, rn#48] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q47/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q47/explain.txt index f06dc36166d2e..11ac127e31efd 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q47/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q47/explain.txt @@ -156,18 +156,18 @@ Results [7]: [i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_yea (23) Exchange Input [7]: [i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, d_moy#11, sum#18] -Arguments: hashpartitioning(i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, d_moy#11, 5), true, [id=#19] +Arguments: hashpartitioning(i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, d_moy#11, 5), ENSURE_REQUIREMENTS, [id=#19] (24) HashAggregate [codegen id : 5] Input [7]: [i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, d_moy#11, sum#18] Keys [6]: [i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, d_moy#11] Functions [1]: [sum(UnscaledValue(ss_sales_price#7))] Aggregate Attributes [1]: [sum(UnscaledValue(ss_sales_price#7))#20] -Results [8]: [i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, d_moy#11, MakeDecimal(sum(UnscaledValue(ss_sales_price#7))#20,17,2) AS sum_sales#21, MakeDecimal(sum(UnscaledValue(ss_sales_price#7))#20,17,2) AS _w0#22] +Results [8]: [i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, d_moy#11, MakeDecimal(sum(UnscaledValue(ss_sales_price#7))#20,17,2) AS sum_sales#21, cast(MakeDecimal(sum(UnscaledValue(ss_sales_price#7))#20,17,2) as bigint) AS _w0#22] (25) Exchange Input [8]: [i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, d_moy#11, sum_sales#21, _w0#22] -Arguments: hashpartitioning(i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, 5), true, [id=#23] +Arguments: hashpartitioning(i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, 5), ENSURE_REQUIREMENTS, [id=#23] (26) Sort [codegen id : 6] Input [8]: [i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, d_moy#11, sum_sales#21, _w0#22] @@ -183,7 +183,7 @@ Input [9]: [i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year# (29) Exchange Input [8]: [i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, d_moy#11, sum_sales#21, avg_monthly_sales#24] -Arguments: hashpartitioning(i_category#3, i_brand#2, s_store_name#14, s_company_name#15, 5), true, [id=#25] +Arguments: hashpartitioning(i_category#3, i_brand#2, s_store_name#14, s_company_name#15, 5), ENSURE_REQUIREMENTS, [id=#25] (30) Sort [codegen id : 8] Input [8]: [i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, d_moy#11, sum_sales#21, avg_monthly_sales#24] @@ -195,7 +195,7 @@ Arguments: [rank(d_year#10, d_moy#11) windowspecdefinition(i_category#3, i_brand (32) Filter [codegen id : 23] Input [9]: [i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year#10, d_moy#11, sum_sales#21, avg_monthly_sales#24, rn#26] -Condition : (((((isnotnull(d_year#10) AND isnotnull(avg_monthly_sales#24)) AND (d_year#10 = 1999)) AND (avg_monthly_sales#24 > 0.000000)) AND (CASE WHEN (avg_monthly_sales#24 > 0.000000) THEN CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#21 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#24 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_monthly_sales#24 as decimal(22,6)))), DecimalType(38,16), true) ELSE null END > 0.1000000000000000)) AND isnotnull(rn#26)) +Condition : (((((((isnotnull(d_year#10) AND isnotnull(avg_monthly_sales#24)) AND isnotnull(sum_sales#21)) AND (d_year#10 = 1999)) AND (avg_monthly_sales#24 > 0.0)) AND (avg_monthly_sales#24 > 0.0)) AND ((abs((cast(sum_sales#21 as double) - avg_monthly_sales#24)) / avg_monthly_sales#24) > 0.1)) AND isnotnull(rn#26)) (33) ReusedExchange [Reuses operator id: 23] Output [7]: [i_category#27, i_brand#28, s_store_name#29, s_company_name#30, d_year#31, d_moy#32, sum#33] @@ -209,7 +209,7 @@ Results [7]: [i_category#27, i_brand#28, s_store_name#29, s_company_name#30, d_y (35) Exchange Input [7]: [i_category#27, i_brand#28, s_store_name#29, s_company_name#30, d_year#31, d_moy#32, sum_sales#35] -Arguments: hashpartitioning(i_category#27, i_brand#28, s_store_name#29, s_company_name#30, 5), true, [id=#36] +Arguments: hashpartitioning(i_category#27, i_brand#28, s_store_name#29, s_company_name#30, 5), ENSURE_REQUIREMENTS, [id=#36] (36) Sort [codegen id : 14] Input [7]: [i_category#27, i_brand#28, s_store_name#29, s_company_name#30, d_year#31, d_moy#32, sum_sales#35] @@ -274,5 +274,5 @@ Input [16]: [i_category#3, i_brand#2, s_store_name#14, s_company_name#15, d_year (51) TakeOrderedAndProject Input [7]: [i_category#3, d_year#10, d_moy#11, avg_monthly_sales#24, sum_sales#21, psum#48, nsum#49] -Arguments: 100, [CheckOverflow((promote_precision(cast(sum_sales#21 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#24 as decimal(22,6)))), DecimalType(22,6), true) ASC NULLS FIRST, d_moy#11 ASC NULLS FIRST], [i_category#3, d_year#10, d_moy#11, avg_monthly_sales#24, sum_sales#21, psum#48, nsum#49] +Arguments: 100, [(cast(sum_sales#21 as double) - avg_monthly_sales#24) ASC NULLS FIRST, d_moy#11 ASC NULLS FIRST], [i_category#3, d_year#10, d_moy#11, avg_monthly_sales#24, sum_sales#21, psum#48, nsum#49] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q49.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q49.sf100/explain.txt index 22479caee2de1..486d893f4fa97 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q49.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q49.sf100/explain.txt @@ -139,7 +139,7 @@ Input [6]: [ws_sold_date_sk#1, ws_item_sk#2, ws_order_number#3, ws_quantity#4, w (12) Exchange Input [4]: [ws_item_sk#2, ws_order_number#3, ws_quantity#4, ws_net_paid#5] -Arguments: hashpartitioning(cast(ws_order_number#3 as bigint), cast(ws_item_sk#2 as bigint), 5), true, [id=#11] +Arguments: hashpartitioning(cast(ws_order_number#3 as bigint), cast(ws_item_sk#2 as bigint), 5), ENSURE_REQUIREMENTS, [id=#11] (13) Sort [codegen id : 3] Input [4]: [ws_item_sk#2, ws_order_number#3, ws_quantity#4, ws_net_paid#5] @@ -161,7 +161,7 @@ Condition : (((isnotnull(wr_return_amt#15) AND (wr_return_amt#15 > 10000.00)) AN (17) Exchange Input [4]: [wr_item_sk#12, wr_order_number#13, wr_return_quantity#14, wr_return_amt#15] -Arguments: hashpartitioning(wr_order_number#13, wr_item_sk#12, 5), true, [id=#16] +Arguments: hashpartitioning(wr_order_number#13, wr_item_sk#12, 5), ENSURE_REQUIREMENTS, [id=#16] (18) Sort [codegen id : 5] Input [4]: [wr_item_sk#12, wr_order_number#13, wr_return_quantity#14, wr_return_amt#15] @@ -179,24 +179,24 @@ Input [8]: [ws_item_sk#2, ws_order_number#3, ws_quantity#4, ws_net_paid#5, wr_it (21) HashAggregate [codegen id : 6] Input [5]: [ws_item_sk#2, ws_quantity#4, ws_net_paid#5, wr_return_quantity#14, wr_return_amt#15] Keys [1]: [ws_item_sk#2] -Functions [4]: [partial_sum(cast(coalesce(wr_return_quantity#14, 0) as bigint)), partial_sum(cast(coalesce(ws_quantity#4, 0) as bigint)), partial_sum(coalesce(cast(wr_return_amt#15 as decimal(12,2)), 0.00)), partial_sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))] +Functions [4]: [partial_sum(coalesce(wr_return_quantity#14, 0)), partial_sum(coalesce(ws_quantity#4, 0)), partial_sum(coalesce(cast(wr_return_amt#15 as decimal(12,2)), 0.00)), partial_sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))] Aggregate Attributes [6]: [sum#17, sum#18, sum#19, isEmpty#20, sum#21, isEmpty#22] Results [7]: [ws_item_sk#2, sum#23, sum#24, sum#25, isEmpty#26, sum#27, isEmpty#28] (22) Exchange Input [7]: [ws_item_sk#2, sum#23, sum#24, sum#25, isEmpty#26, sum#27, isEmpty#28] -Arguments: hashpartitioning(ws_item_sk#2, 5), true, [id=#29] +Arguments: hashpartitioning(ws_item_sk#2, 5), ENSURE_REQUIREMENTS, [id=#29] (23) HashAggregate [codegen id : 7] Input [7]: [ws_item_sk#2, sum#23, sum#24, sum#25, isEmpty#26, sum#27, isEmpty#28] Keys [1]: [ws_item_sk#2] -Functions [4]: [sum(cast(coalesce(wr_return_quantity#14, 0) as bigint)), sum(cast(coalesce(ws_quantity#4, 0) as bigint)), sum(coalesce(cast(wr_return_amt#15 as decimal(12,2)), 0.00)), sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))] -Aggregate Attributes [4]: [sum(cast(coalesce(wr_return_quantity#14, 0) as bigint))#30, sum(cast(coalesce(ws_quantity#4, 0) as bigint))#31, sum(coalesce(cast(wr_return_amt#15 as decimal(12,2)), 0.00))#32, sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))#33] -Results [3]: [ws_item_sk#2 AS item#34, CheckOverflow((promote_precision(cast(sum(cast(coalesce(wr_return_quantity#14, 0) as bigint))#30 as decimal(15,4))) / promote_precision(cast(sum(cast(coalesce(ws_quantity#4, 0) as bigint))#31 as decimal(15,4)))), DecimalType(35,20), true) AS return_ratio#35, CheckOverflow((promote_precision(cast(sum(coalesce(cast(wr_return_amt#15 as decimal(12,2)), 0.00))#32 as decimal(15,4))) / promote_precision(cast(sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))#33 as decimal(15,4)))), DecimalType(35,20), true) AS currency_ratio#36] +Functions [4]: [sum(coalesce(wr_return_quantity#14, 0)), sum(coalesce(ws_quantity#4, 0)), sum(coalesce(cast(wr_return_amt#15 as decimal(12,2)), 0.00)), sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))] +Aggregate Attributes [4]: [sum(coalesce(wr_return_quantity#14, 0))#30, sum(coalesce(ws_quantity#4, 0))#31, sum(coalesce(cast(wr_return_amt#15 as decimal(12,2)), 0.00))#32, sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))#33] +Results [3]: [ws_item_sk#2 AS item#34, CheckOverflow((promote_precision(cast(sum(coalesce(wr_return_quantity#14, 0))#30 as decimal(15,4))) / promote_precision(cast(sum(coalesce(ws_quantity#4, 0))#31 as decimal(15,4)))), DecimalType(35,20), true) AS return_ratio#35, CheckOverflow((promote_precision(cast(sum(coalesce(cast(wr_return_amt#15 as decimal(12,2)), 0.00))#32 as decimal(15,4))) / promote_precision(cast(sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))#33 as decimal(15,4)))), DecimalType(35,20), true) AS currency_ratio#36] (24) Exchange Input [3]: [item#34, return_ratio#35, currency_ratio#36] -Arguments: SinglePartition, true, [id=#37] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#37] (25) Sort [codegen id : 8] Input [3]: [item#34, return_ratio#35, currency_ratio#36] @@ -254,7 +254,7 @@ Input [6]: [cs_sold_date_sk#41, cs_item_sk#42, cs_order_number#43, cs_quantity#4 (38) Exchange Input [4]: [cs_item_sk#42, cs_order_number#43, cs_quantity#44, cs_net_paid#45] -Arguments: hashpartitioning(cs_order_number#43, cs_item_sk#42, 5), true, [id=#47] +Arguments: hashpartitioning(cs_order_number#43, cs_item_sk#42, 5), ENSURE_REQUIREMENTS, [id=#47] (39) Sort [codegen id : 13] Input [4]: [cs_item_sk#42, cs_order_number#43, cs_quantity#44, cs_net_paid#45] @@ -276,7 +276,7 @@ Condition : (((isnotnull(cr_return_amount#51) AND (cr_return_amount#51 > 10000.0 (43) Exchange Input [4]: [cr_item_sk#48, cr_order_number#49, cr_return_quantity#50, cr_return_amount#51] -Arguments: hashpartitioning(cr_order_number#49, cr_item_sk#48, 5), true, [id=#52] +Arguments: hashpartitioning(cr_order_number#49, cr_item_sk#48, 5), ENSURE_REQUIREMENTS, [id=#52] (44) Sort [codegen id : 15] Input [4]: [cr_item_sk#48, cr_order_number#49, cr_return_quantity#50, cr_return_amount#51] @@ -294,24 +294,24 @@ Input [8]: [cs_item_sk#42, cs_order_number#43, cs_quantity#44, cs_net_paid#45, c (47) HashAggregate [codegen id : 16] Input [5]: [cs_item_sk#42, cs_quantity#44, cs_net_paid#45, cr_return_quantity#50, cr_return_amount#51] Keys [1]: [cs_item_sk#42] -Functions [4]: [partial_sum(cast(coalesce(cr_return_quantity#50, 0) as bigint)), partial_sum(cast(coalesce(cs_quantity#44, 0) as bigint)), partial_sum(coalesce(cast(cr_return_amount#51 as decimal(12,2)), 0.00)), partial_sum(coalesce(cast(cs_net_paid#45 as decimal(12,2)), 0.00))] +Functions [4]: [partial_sum(coalesce(cr_return_quantity#50, 0)), partial_sum(coalesce(cs_quantity#44, 0)), partial_sum(coalesce(cast(cr_return_amount#51 as decimal(12,2)), 0.00)), partial_sum(coalesce(cast(cs_net_paid#45 as decimal(12,2)), 0.00))] Aggregate Attributes [6]: [sum#53, sum#54, sum#55, isEmpty#56, sum#57, isEmpty#58] Results [7]: [cs_item_sk#42, sum#59, sum#60, sum#61, isEmpty#62, sum#63, isEmpty#64] (48) Exchange Input [7]: [cs_item_sk#42, sum#59, sum#60, sum#61, isEmpty#62, sum#63, isEmpty#64] -Arguments: hashpartitioning(cs_item_sk#42, 5), true, [id=#65] +Arguments: hashpartitioning(cs_item_sk#42, 5), ENSURE_REQUIREMENTS, [id=#65] (49) HashAggregate [codegen id : 17] Input [7]: [cs_item_sk#42, sum#59, sum#60, sum#61, isEmpty#62, sum#63, isEmpty#64] Keys [1]: [cs_item_sk#42] -Functions [4]: [sum(cast(coalesce(cr_return_quantity#50, 0) as bigint)), sum(cast(coalesce(cs_quantity#44, 0) as bigint)), sum(coalesce(cast(cr_return_amount#51 as decimal(12,2)), 0.00)), sum(coalesce(cast(cs_net_paid#45 as decimal(12,2)), 0.00))] -Aggregate Attributes [4]: [sum(cast(coalesce(cr_return_quantity#50, 0) as bigint))#66, sum(cast(coalesce(cs_quantity#44, 0) as bigint))#67, sum(coalesce(cast(cr_return_amount#51 as decimal(12,2)), 0.00))#68, sum(coalesce(cast(cs_net_paid#45 as decimal(12,2)), 0.00))#69] -Results [3]: [cs_item_sk#42 AS item#70, CheckOverflow((promote_precision(cast(sum(cast(coalesce(cr_return_quantity#50, 0) as bigint))#66 as decimal(15,4))) / promote_precision(cast(sum(cast(coalesce(cs_quantity#44, 0) as bigint))#67 as decimal(15,4)))), DecimalType(35,20), true) AS return_ratio#71, CheckOverflow((promote_precision(cast(sum(coalesce(cast(cr_return_amount#51 as decimal(12,2)), 0.00))#68 as decimal(15,4))) / promote_precision(cast(sum(coalesce(cast(cs_net_paid#45 as decimal(12,2)), 0.00))#69 as decimal(15,4)))), DecimalType(35,20), true) AS currency_ratio#72] +Functions [4]: [sum(coalesce(cr_return_quantity#50, 0)), sum(coalesce(cs_quantity#44, 0)), sum(coalesce(cast(cr_return_amount#51 as decimal(12,2)), 0.00)), sum(coalesce(cast(cs_net_paid#45 as decimal(12,2)), 0.00))] +Aggregate Attributes [4]: [sum(coalesce(cr_return_quantity#50, 0))#66, sum(coalesce(cs_quantity#44, 0))#67, sum(coalesce(cast(cr_return_amount#51 as decimal(12,2)), 0.00))#68, sum(coalesce(cast(cs_net_paid#45 as decimal(12,2)), 0.00))#69] +Results [3]: [cs_item_sk#42 AS item#70, CheckOverflow((promote_precision(cast(sum(coalesce(cr_return_quantity#50, 0))#66 as decimal(15,4))) / promote_precision(cast(sum(coalesce(cs_quantity#44, 0))#67 as decimal(15,4)))), DecimalType(35,20), true) AS return_ratio#71, CheckOverflow((promote_precision(cast(sum(coalesce(cast(cr_return_amount#51 as decimal(12,2)), 0.00))#68 as decimal(15,4))) / promote_precision(cast(sum(coalesce(cast(cs_net_paid#45 as decimal(12,2)), 0.00))#69 as decimal(15,4)))), DecimalType(35,20), true) AS currency_ratio#72] (50) Exchange Input [3]: [item#70, return_ratio#71, currency_ratio#72] -Arguments: SinglePartition, true, [id=#73] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#73] (51) Sort [codegen id : 18] Input [3]: [item#70, return_ratio#71, currency_ratio#72] @@ -369,7 +369,7 @@ Input [6]: [ss_sold_date_sk#77, ss_item_sk#78, ss_ticket_number#79, ss_quantity# (64) Exchange Input [4]: [ss_item_sk#78, ss_ticket_number#79, ss_quantity#80, ss_net_paid#81] -Arguments: hashpartitioning(cast(ss_ticket_number#79 as bigint), cast(ss_item_sk#78 as bigint), 5), true, [id=#83] +Arguments: hashpartitioning(cast(ss_ticket_number#79 as bigint), cast(ss_item_sk#78 as bigint), 5), ENSURE_REQUIREMENTS, [id=#83] (65) Sort [codegen id : 23] Input [4]: [ss_item_sk#78, ss_ticket_number#79, ss_quantity#80, ss_net_paid#81] @@ -391,7 +391,7 @@ Condition : (((isnotnull(sr_return_amt#87) AND (sr_return_amt#87 > 10000.00)) AN (69) Exchange Input [4]: [sr_item_sk#84, sr_ticket_number#85, sr_return_quantity#86, sr_return_amt#87] -Arguments: hashpartitioning(sr_ticket_number#85, sr_item_sk#84, 5), true, [id=#88] +Arguments: hashpartitioning(sr_ticket_number#85, sr_item_sk#84, 5), ENSURE_REQUIREMENTS, [id=#88] (70) Sort [codegen id : 25] Input [4]: [sr_item_sk#84, sr_ticket_number#85, sr_return_quantity#86, sr_return_amt#87] @@ -409,24 +409,24 @@ Input [8]: [ss_item_sk#78, ss_ticket_number#79, ss_quantity#80, ss_net_paid#81, (73) HashAggregate [codegen id : 26] Input [5]: [ss_item_sk#78, ss_quantity#80, ss_net_paid#81, sr_return_quantity#86, sr_return_amt#87] Keys [1]: [ss_item_sk#78] -Functions [4]: [partial_sum(cast(coalesce(sr_return_quantity#86, 0) as bigint)), partial_sum(cast(coalesce(ss_quantity#80, 0) as bigint)), partial_sum(coalesce(cast(sr_return_amt#87 as decimal(12,2)), 0.00)), partial_sum(coalesce(cast(ss_net_paid#81 as decimal(12,2)), 0.00))] +Functions [4]: [partial_sum(coalesce(sr_return_quantity#86, 0)), partial_sum(coalesce(ss_quantity#80, 0)), partial_sum(coalesce(cast(sr_return_amt#87 as decimal(12,2)), 0.00)), partial_sum(coalesce(cast(ss_net_paid#81 as decimal(12,2)), 0.00))] Aggregate Attributes [6]: [sum#89, sum#90, sum#91, isEmpty#92, sum#93, isEmpty#94] Results [7]: [ss_item_sk#78, sum#95, sum#96, sum#97, isEmpty#98, sum#99, isEmpty#100] (74) Exchange Input [7]: [ss_item_sk#78, sum#95, sum#96, sum#97, isEmpty#98, sum#99, isEmpty#100] -Arguments: hashpartitioning(ss_item_sk#78, 5), true, [id=#101] +Arguments: hashpartitioning(ss_item_sk#78, 5), ENSURE_REQUIREMENTS, [id=#101] (75) HashAggregate [codegen id : 27] Input [7]: [ss_item_sk#78, sum#95, sum#96, sum#97, isEmpty#98, sum#99, isEmpty#100] Keys [1]: [ss_item_sk#78] -Functions [4]: [sum(cast(coalesce(sr_return_quantity#86, 0) as bigint)), sum(cast(coalesce(ss_quantity#80, 0) as bigint)), sum(coalesce(cast(sr_return_amt#87 as decimal(12,2)), 0.00)), sum(coalesce(cast(ss_net_paid#81 as decimal(12,2)), 0.00))] -Aggregate Attributes [4]: [sum(cast(coalesce(sr_return_quantity#86, 0) as bigint))#102, sum(cast(coalesce(ss_quantity#80, 0) as bigint))#103, sum(coalesce(cast(sr_return_amt#87 as decimal(12,2)), 0.00))#104, sum(coalesce(cast(ss_net_paid#81 as decimal(12,2)), 0.00))#105] -Results [3]: [ss_item_sk#78 AS item#106, CheckOverflow((promote_precision(cast(sum(cast(coalesce(sr_return_quantity#86, 0) as bigint))#102 as decimal(15,4))) / promote_precision(cast(sum(cast(coalesce(ss_quantity#80, 0) as bigint))#103 as decimal(15,4)))), DecimalType(35,20), true) AS return_ratio#107, CheckOverflow((promote_precision(cast(sum(coalesce(cast(sr_return_amt#87 as decimal(12,2)), 0.00))#104 as decimal(15,4))) / promote_precision(cast(sum(coalesce(cast(ss_net_paid#81 as decimal(12,2)), 0.00))#105 as decimal(15,4)))), DecimalType(35,20), true) AS currency_ratio#108] +Functions [4]: [sum(coalesce(sr_return_quantity#86, 0)), sum(coalesce(ss_quantity#80, 0)), sum(coalesce(cast(sr_return_amt#87 as decimal(12,2)), 0.00)), sum(coalesce(cast(ss_net_paid#81 as decimal(12,2)), 0.00))] +Aggregate Attributes [4]: [sum(coalesce(sr_return_quantity#86, 0))#102, sum(coalesce(ss_quantity#80, 0))#103, sum(coalesce(cast(sr_return_amt#87 as decimal(12,2)), 0.00))#104, sum(coalesce(cast(ss_net_paid#81 as decimal(12,2)), 0.00))#105] +Results [3]: [ss_item_sk#78 AS item#106, CheckOverflow((promote_precision(cast(sum(coalesce(sr_return_quantity#86, 0))#102 as decimal(15,4))) / promote_precision(cast(sum(coalesce(ss_quantity#80, 0))#103 as decimal(15,4)))), DecimalType(35,20), true) AS return_ratio#107, CheckOverflow((promote_precision(cast(sum(coalesce(cast(sr_return_amt#87 as decimal(12,2)), 0.00))#104 as decimal(15,4))) / promote_precision(cast(sum(coalesce(cast(ss_net_paid#81 as decimal(12,2)), 0.00))#105 as decimal(15,4)))), DecimalType(35,20), true) AS currency_ratio#108] (76) Exchange Input [3]: [item#106, return_ratio#107, currency_ratio#108] -Arguments: SinglePartition, true, [id=#109] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#109] (77) Sort [codegen id : 28] Input [3]: [item#106, return_ratio#107, currency_ratio#108] @@ -463,7 +463,7 @@ Results [5]: [channel#40, item#34, return_ratio#35, return_rank#38, currency_ran (85) Exchange Input [5]: [channel#40, item#34, return_ratio#35, return_rank#38, currency_rank#39] -Arguments: hashpartitioning(channel#40, item#34, return_ratio#35, return_rank#38, currency_rank#39, 5), true, [id=#113] +Arguments: hashpartitioning(channel#40, item#34, return_ratio#35, return_rank#38, currency_rank#39, 5), ENSURE_REQUIREMENTS, [id=#113] (86) HashAggregate [codegen id : 32] Input [5]: [channel#40, item#34, return_ratio#35, return_rank#38, currency_rank#39] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q49.sf100/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q49.sf100/simplified.txt index ab300ca150457..166ab6190f0d8 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q49.sf100/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q49.sf100/simplified.txt @@ -21,7 +21,7 @@ TakeOrderedAndProject [channel,return_rank,currency_rank,item,return_ratio] InputAdapter Exchange #2 WholeStageCodegen (7) - HashAggregate [ws_item_sk,sum,sum,sum,isEmpty,sum,isEmpty] [sum(cast(coalesce(wr_return_quantity, 0) as bigint)),sum(cast(coalesce(ws_quantity, 0) as bigint)),sum(coalesce(cast(wr_return_amt as decimal(12,2)), 0.00)),sum(coalesce(cast(ws_net_paid as decimal(12,2)), 0.00)),item,return_ratio,currency_ratio,sum,sum,sum,isEmpty,sum,isEmpty] + HashAggregate [ws_item_sk,sum,sum,sum,isEmpty,sum,isEmpty] [sum(coalesce(wr_return_quantity, 0)),sum(coalesce(ws_quantity, 0)),sum(coalesce(cast(wr_return_amt as decimal(12,2)), 0.00)),sum(coalesce(cast(ws_net_paid as decimal(12,2)), 0.00)),item,return_ratio,currency_ratio,sum,sum,sum,isEmpty,sum,isEmpty] InputAdapter Exchange [ws_item_sk] #3 WholeStageCodegen (6) @@ -73,7 +73,7 @@ TakeOrderedAndProject [channel,return_rank,currency_rank,item,return_ratio] InputAdapter Exchange #7 WholeStageCodegen (17) - HashAggregate [cs_item_sk,sum,sum,sum,isEmpty,sum,isEmpty] [sum(cast(coalesce(cr_return_quantity, 0) as bigint)),sum(cast(coalesce(cs_quantity, 0) as bigint)),sum(coalesce(cast(cr_return_amount as decimal(12,2)), 0.00)),sum(coalesce(cast(cs_net_paid as decimal(12,2)), 0.00)),item,return_ratio,currency_ratio,sum,sum,sum,isEmpty,sum,isEmpty] + HashAggregate [cs_item_sk,sum,sum,sum,isEmpty,sum,isEmpty] [sum(coalesce(cr_return_quantity, 0)),sum(coalesce(cs_quantity, 0)),sum(coalesce(cast(cr_return_amount as decimal(12,2)), 0.00)),sum(coalesce(cast(cs_net_paid as decimal(12,2)), 0.00)),item,return_ratio,currency_ratio,sum,sum,sum,isEmpty,sum,isEmpty] InputAdapter Exchange [cs_item_sk] #8 WholeStageCodegen (16) @@ -119,7 +119,7 @@ TakeOrderedAndProject [channel,return_rank,currency_rank,item,return_ratio] InputAdapter Exchange #11 WholeStageCodegen (27) - HashAggregate [ss_item_sk,sum,sum,sum,isEmpty,sum,isEmpty] [sum(cast(coalesce(sr_return_quantity, 0) as bigint)),sum(cast(coalesce(ss_quantity, 0) as bigint)),sum(coalesce(cast(sr_return_amt as decimal(12,2)), 0.00)),sum(coalesce(cast(ss_net_paid as decimal(12,2)), 0.00)),item,return_ratio,currency_ratio,sum,sum,sum,isEmpty,sum,isEmpty] + HashAggregate [ss_item_sk,sum,sum,sum,isEmpty,sum,isEmpty] [sum(coalesce(sr_return_quantity, 0)),sum(coalesce(ss_quantity, 0)),sum(coalesce(cast(sr_return_amt as decimal(12,2)), 0.00)),sum(coalesce(cast(ss_net_paid as decimal(12,2)), 0.00)),item,return_ratio,currency_ratio,sum,sum,sum,isEmpty,sum,isEmpty] InputAdapter Exchange [ss_item_sk] #12 WholeStageCodegen (26) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q49/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q49/explain.txt index 01dc1047953e3..fde817fb9c330 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q49/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q49/explain.txt @@ -158,24 +158,24 @@ Input [7]: [ws_sold_date_sk#1, ws_item_sk#2, ws_quantity#4, ws_net_paid#5, wr_re (18) HashAggregate [codegen id : 3] Input [5]: [ws_item_sk#2, ws_quantity#4, ws_net_paid#5, wr_return_quantity#9, wr_return_amt#10] Keys [1]: [ws_item_sk#2] -Functions [4]: [partial_sum(cast(coalesce(wr_return_quantity#9, 0) as bigint)), partial_sum(cast(coalesce(ws_quantity#4, 0) as bigint)), partial_sum(coalesce(cast(wr_return_amt#10 as decimal(12,2)), 0.00)), partial_sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))] +Functions [4]: [partial_sum(coalesce(wr_return_quantity#9, 0)), partial_sum(coalesce(ws_quantity#4, 0)), partial_sum(coalesce(cast(wr_return_amt#10 as decimal(12,2)), 0.00)), partial_sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))] Aggregate Attributes [6]: [sum#16, sum#17, sum#18, isEmpty#19, sum#20, isEmpty#21] Results [7]: [ws_item_sk#2, sum#22, sum#23, sum#24, isEmpty#25, sum#26, isEmpty#27] (19) Exchange Input [7]: [ws_item_sk#2, sum#22, sum#23, sum#24, isEmpty#25, sum#26, isEmpty#27] -Arguments: hashpartitioning(ws_item_sk#2, 5), true, [id=#28] +Arguments: hashpartitioning(ws_item_sk#2, 5), ENSURE_REQUIREMENTS, [id=#28] (20) HashAggregate [codegen id : 4] Input [7]: [ws_item_sk#2, sum#22, sum#23, sum#24, isEmpty#25, sum#26, isEmpty#27] Keys [1]: [ws_item_sk#2] -Functions [4]: [sum(cast(coalesce(wr_return_quantity#9, 0) as bigint)), sum(cast(coalesce(ws_quantity#4, 0) as bigint)), sum(coalesce(cast(wr_return_amt#10 as decimal(12,2)), 0.00)), sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))] -Aggregate Attributes [4]: [sum(cast(coalesce(wr_return_quantity#9, 0) as bigint))#29, sum(cast(coalesce(ws_quantity#4, 0) as bigint))#30, sum(coalesce(cast(wr_return_amt#10 as decimal(12,2)), 0.00))#31, sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))#32] -Results [3]: [ws_item_sk#2 AS item#33, CheckOverflow((promote_precision(cast(sum(cast(coalesce(wr_return_quantity#9, 0) as bigint))#29 as decimal(15,4))) / promote_precision(cast(sum(cast(coalesce(ws_quantity#4, 0) as bigint))#30 as decimal(15,4)))), DecimalType(35,20), true) AS return_ratio#34, CheckOverflow((promote_precision(cast(sum(coalesce(cast(wr_return_amt#10 as decimal(12,2)), 0.00))#31 as decimal(15,4))) / promote_precision(cast(sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))#32 as decimal(15,4)))), DecimalType(35,20), true) AS currency_ratio#35] +Functions [4]: [sum(coalesce(wr_return_quantity#9, 0)), sum(coalesce(ws_quantity#4, 0)), sum(coalesce(cast(wr_return_amt#10 as decimal(12,2)), 0.00)), sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))] +Aggregate Attributes [4]: [sum(coalesce(wr_return_quantity#9, 0))#29, sum(coalesce(ws_quantity#4, 0))#30, sum(coalesce(cast(wr_return_amt#10 as decimal(12,2)), 0.00))#31, sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))#32] +Results [3]: [ws_item_sk#2 AS item#33, CheckOverflow((promote_precision(cast(sum(coalesce(wr_return_quantity#9, 0))#29 as decimal(15,4))) / promote_precision(cast(sum(coalesce(ws_quantity#4, 0))#30 as decimal(15,4)))), DecimalType(35,20), true) AS return_ratio#34, CheckOverflow((promote_precision(cast(sum(coalesce(cast(wr_return_amt#10 as decimal(12,2)), 0.00))#31 as decimal(15,4))) / promote_precision(cast(sum(coalesce(cast(ws_net_paid#5 as decimal(12,2)), 0.00))#32 as decimal(15,4)))), DecimalType(35,20), true) AS currency_ratio#35] (21) Exchange Input [3]: [item#33, return_ratio#34, currency_ratio#35] -Arguments: SinglePartition, true, [id=#36] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#36] (22) Sort [codegen id : 5] Input [3]: [item#33, return_ratio#34, currency_ratio#35] @@ -261,24 +261,24 @@ Input [7]: [cs_sold_date_sk#40, cs_item_sk#41, cs_quantity#43, cs_net_paid#44, c (41) HashAggregate [codegen id : 10] Input [5]: [cs_item_sk#41, cs_quantity#43, cs_net_paid#44, cr_return_quantity#48, cr_return_amount#49] Keys [1]: [cs_item_sk#41] -Functions [4]: [partial_sum(cast(coalesce(cr_return_quantity#48, 0) as bigint)), partial_sum(cast(coalesce(cs_quantity#43, 0) as bigint)), partial_sum(coalesce(cast(cr_return_amount#49 as decimal(12,2)), 0.00)), partial_sum(coalesce(cast(cs_net_paid#44 as decimal(12,2)), 0.00))] +Functions [4]: [partial_sum(coalesce(cr_return_quantity#48, 0)), partial_sum(coalesce(cs_quantity#43, 0)), partial_sum(coalesce(cast(cr_return_amount#49 as decimal(12,2)), 0.00)), partial_sum(coalesce(cast(cs_net_paid#44 as decimal(12,2)), 0.00))] Aggregate Attributes [6]: [sum#51, sum#52, sum#53, isEmpty#54, sum#55, isEmpty#56] Results [7]: [cs_item_sk#41, sum#57, sum#58, sum#59, isEmpty#60, sum#61, isEmpty#62] (42) Exchange Input [7]: [cs_item_sk#41, sum#57, sum#58, sum#59, isEmpty#60, sum#61, isEmpty#62] -Arguments: hashpartitioning(cs_item_sk#41, 5), true, [id=#63] +Arguments: hashpartitioning(cs_item_sk#41, 5), ENSURE_REQUIREMENTS, [id=#63] (43) HashAggregate [codegen id : 11] Input [7]: [cs_item_sk#41, sum#57, sum#58, sum#59, isEmpty#60, sum#61, isEmpty#62] Keys [1]: [cs_item_sk#41] -Functions [4]: [sum(cast(coalesce(cr_return_quantity#48, 0) as bigint)), sum(cast(coalesce(cs_quantity#43, 0) as bigint)), sum(coalesce(cast(cr_return_amount#49 as decimal(12,2)), 0.00)), sum(coalesce(cast(cs_net_paid#44 as decimal(12,2)), 0.00))] -Aggregate Attributes [4]: [sum(cast(coalesce(cr_return_quantity#48, 0) as bigint))#64, sum(cast(coalesce(cs_quantity#43, 0) as bigint))#65, sum(coalesce(cast(cr_return_amount#49 as decimal(12,2)), 0.00))#66, sum(coalesce(cast(cs_net_paid#44 as decimal(12,2)), 0.00))#67] -Results [3]: [cs_item_sk#41 AS item#68, CheckOverflow((promote_precision(cast(sum(cast(coalesce(cr_return_quantity#48, 0) as bigint))#64 as decimal(15,4))) / promote_precision(cast(sum(cast(coalesce(cs_quantity#43, 0) as bigint))#65 as decimal(15,4)))), DecimalType(35,20), true) AS return_ratio#69, CheckOverflow((promote_precision(cast(sum(coalesce(cast(cr_return_amount#49 as decimal(12,2)), 0.00))#66 as decimal(15,4))) / promote_precision(cast(sum(coalesce(cast(cs_net_paid#44 as decimal(12,2)), 0.00))#67 as decimal(15,4)))), DecimalType(35,20), true) AS currency_ratio#70] +Functions [4]: [sum(coalesce(cr_return_quantity#48, 0)), sum(coalesce(cs_quantity#43, 0)), sum(coalesce(cast(cr_return_amount#49 as decimal(12,2)), 0.00)), sum(coalesce(cast(cs_net_paid#44 as decimal(12,2)), 0.00))] +Aggregate Attributes [4]: [sum(coalesce(cr_return_quantity#48, 0))#64, sum(coalesce(cs_quantity#43, 0))#65, sum(coalesce(cast(cr_return_amount#49 as decimal(12,2)), 0.00))#66, sum(coalesce(cast(cs_net_paid#44 as decimal(12,2)), 0.00))#67] +Results [3]: [cs_item_sk#41 AS item#68, CheckOverflow((promote_precision(cast(sum(coalesce(cr_return_quantity#48, 0))#64 as decimal(15,4))) / promote_precision(cast(sum(coalesce(cs_quantity#43, 0))#65 as decimal(15,4)))), DecimalType(35,20), true) AS return_ratio#69, CheckOverflow((promote_precision(cast(sum(coalesce(cast(cr_return_amount#49 as decimal(12,2)), 0.00))#66 as decimal(15,4))) / promote_precision(cast(sum(coalesce(cast(cs_net_paid#44 as decimal(12,2)), 0.00))#67 as decimal(15,4)))), DecimalType(35,20), true) AS currency_ratio#70] (44) Exchange Input [3]: [item#68, return_ratio#69, currency_ratio#70] -Arguments: SinglePartition, true, [id=#71] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#71] (45) Sort [codegen id : 12] Input [3]: [item#68, return_ratio#69, currency_ratio#70] @@ -364,24 +364,24 @@ Input [7]: [ss_sold_date_sk#75, ss_item_sk#76, ss_quantity#78, ss_net_paid#79, s (64) HashAggregate [codegen id : 17] Input [5]: [ss_item_sk#76, ss_quantity#78, ss_net_paid#79, sr_return_quantity#83, sr_return_amt#84] Keys [1]: [ss_item_sk#76] -Functions [4]: [partial_sum(cast(coalesce(sr_return_quantity#83, 0) as bigint)), partial_sum(cast(coalesce(ss_quantity#78, 0) as bigint)), partial_sum(coalesce(cast(sr_return_amt#84 as decimal(12,2)), 0.00)), partial_sum(coalesce(cast(ss_net_paid#79 as decimal(12,2)), 0.00))] +Functions [4]: [partial_sum(coalesce(sr_return_quantity#83, 0)), partial_sum(coalesce(ss_quantity#78, 0)), partial_sum(coalesce(cast(sr_return_amt#84 as decimal(12,2)), 0.00)), partial_sum(coalesce(cast(ss_net_paid#79 as decimal(12,2)), 0.00))] Aggregate Attributes [6]: [sum#86, sum#87, sum#88, isEmpty#89, sum#90, isEmpty#91] Results [7]: [ss_item_sk#76, sum#92, sum#93, sum#94, isEmpty#95, sum#96, isEmpty#97] (65) Exchange Input [7]: [ss_item_sk#76, sum#92, sum#93, sum#94, isEmpty#95, sum#96, isEmpty#97] -Arguments: hashpartitioning(ss_item_sk#76, 5), true, [id=#98] +Arguments: hashpartitioning(ss_item_sk#76, 5), ENSURE_REQUIREMENTS, [id=#98] (66) HashAggregate [codegen id : 18] Input [7]: [ss_item_sk#76, sum#92, sum#93, sum#94, isEmpty#95, sum#96, isEmpty#97] Keys [1]: [ss_item_sk#76] -Functions [4]: [sum(cast(coalesce(sr_return_quantity#83, 0) as bigint)), sum(cast(coalesce(ss_quantity#78, 0) as bigint)), sum(coalesce(cast(sr_return_amt#84 as decimal(12,2)), 0.00)), sum(coalesce(cast(ss_net_paid#79 as decimal(12,2)), 0.00))] -Aggregate Attributes [4]: [sum(cast(coalesce(sr_return_quantity#83, 0) as bigint))#99, sum(cast(coalesce(ss_quantity#78, 0) as bigint))#100, sum(coalesce(cast(sr_return_amt#84 as decimal(12,2)), 0.00))#101, sum(coalesce(cast(ss_net_paid#79 as decimal(12,2)), 0.00))#102] -Results [3]: [ss_item_sk#76 AS item#103, CheckOverflow((promote_precision(cast(sum(cast(coalesce(sr_return_quantity#83, 0) as bigint))#99 as decimal(15,4))) / promote_precision(cast(sum(cast(coalesce(ss_quantity#78, 0) as bigint))#100 as decimal(15,4)))), DecimalType(35,20), true) AS return_ratio#104, CheckOverflow((promote_precision(cast(sum(coalesce(cast(sr_return_amt#84 as decimal(12,2)), 0.00))#101 as decimal(15,4))) / promote_precision(cast(sum(coalesce(cast(ss_net_paid#79 as decimal(12,2)), 0.00))#102 as decimal(15,4)))), DecimalType(35,20), true) AS currency_ratio#105] +Functions [4]: [sum(coalesce(sr_return_quantity#83, 0)), sum(coalesce(ss_quantity#78, 0)), sum(coalesce(cast(sr_return_amt#84 as decimal(12,2)), 0.00)), sum(coalesce(cast(ss_net_paid#79 as decimal(12,2)), 0.00))] +Aggregate Attributes [4]: [sum(coalesce(sr_return_quantity#83, 0))#99, sum(coalesce(ss_quantity#78, 0))#100, sum(coalesce(cast(sr_return_amt#84 as decimal(12,2)), 0.00))#101, sum(coalesce(cast(ss_net_paid#79 as decimal(12,2)), 0.00))#102] +Results [3]: [ss_item_sk#76 AS item#103, CheckOverflow((promote_precision(cast(sum(coalesce(sr_return_quantity#83, 0))#99 as decimal(15,4))) / promote_precision(cast(sum(coalesce(ss_quantity#78, 0))#100 as decimal(15,4)))), DecimalType(35,20), true) AS return_ratio#104, CheckOverflow((promote_precision(cast(sum(coalesce(cast(sr_return_amt#84 as decimal(12,2)), 0.00))#101 as decimal(15,4))) / promote_precision(cast(sum(coalesce(cast(ss_net_paid#79 as decimal(12,2)), 0.00))#102 as decimal(15,4)))), DecimalType(35,20), true) AS currency_ratio#105] (67) Exchange Input [3]: [item#103, return_ratio#104, currency_ratio#105] -Arguments: SinglePartition, true, [id=#106] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#106] (68) Sort [codegen id : 19] Input [3]: [item#103, return_ratio#104, currency_ratio#105] @@ -418,7 +418,7 @@ Results [5]: [channel#39, item#33, return_ratio#34, return_rank#37, currency_ran (76) Exchange Input [5]: [channel#39, item#33, return_ratio#34, return_rank#37, currency_rank#38] -Arguments: hashpartitioning(channel#39, item#33, return_ratio#34, return_rank#37, currency_rank#38, 5), true, [id=#110] +Arguments: hashpartitioning(channel#39, item#33, return_ratio#34, return_rank#37, currency_rank#38, 5), ENSURE_REQUIREMENTS, [id=#110] (77) HashAggregate [codegen id : 23] Input [5]: [channel#39, item#33, return_ratio#34, return_rank#37, currency_rank#38] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q49/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q49/simplified.txt index c15f2394e1a44..c46a92806cffc 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q49/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q49/simplified.txt @@ -21,7 +21,7 @@ TakeOrderedAndProject [channel,return_rank,currency_rank,item,return_ratio] InputAdapter Exchange #2 WholeStageCodegen (4) - HashAggregate [ws_item_sk,sum,sum,sum,isEmpty,sum,isEmpty] [sum(cast(coalesce(wr_return_quantity, 0) as bigint)),sum(cast(coalesce(ws_quantity, 0) as bigint)),sum(coalesce(cast(wr_return_amt as decimal(12,2)), 0.00)),sum(coalesce(cast(ws_net_paid as decimal(12,2)), 0.00)),item,return_ratio,currency_ratio,sum,sum,sum,isEmpty,sum,isEmpty] + HashAggregate [ws_item_sk,sum,sum,sum,isEmpty,sum,isEmpty] [sum(coalesce(wr_return_quantity, 0)),sum(coalesce(ws_quantity, 0)),sum(coalesce(cast(wr_return_amt as decimal(12,2)), 0.00)),sum(coalesce(cast(ws_net_paid as decimal(12,2)), 0.00)),item,return_ratio,currency_ratio,sum,sum,sum,isEmpty,sum,isEmpty] InputAdapter Exchange [ws_item_sk] #3 WholeStageCodegen (3) @@ -64,7 +64,7 @@ TakeOrderedAndProject [channel,return_rank,currency_rank,item,return_ratio] InputAdapter Exchange #6 WholeStageCodegen (11) - HashAggregate [cs_item_sk,sum,sum,sum,isEmpty,sum,isEmpty] [sum(cast(coalesce(cr_return_quantity, 0) as bigint)),sum(cast(coalesce(cs_quantity, 0) as bigint)),sum(coalesce(cast(cr_return_amount as decimal(12,2)), 0.00)),sum(coalesce(cast(cs_net_paid as decimal(12,2)), 0.00)),item,return_ratio,currency_ratio,sum,sum,sum,isEmpty,sum,isEmpty] + HashAggregate [cs_item_sk,sum,sum,sum,isEmpty,sum,isEmpty] [sum(coalesce(cr_return_quantity, 0)),sum(coalesce(cs_quantity, 0)),sum(coalesce(cast(cr_return_amount as decimal(12,2)), 0.00)),sum(coalesce(cast(cs_net_paid as decimal(12,2)), 0.00)),item,return_ratio,currency_ratio,sum,sum,sum,isEmpty,sum,isEmpty] InputAdapter Exchange [cs_item_sk] #7 WholeStageCodegen (10) @@ -101,7 +101,7 @@ TakeOrderedAndProject [channel,return_rank,currency_rank,item,return_ratio] InputAdapter Exchange #9 WholeStageCodegen (18) - HashAggregate [ss_item_sk,sum,sum,sum,isEmpty,sum,isEmpty] [sum(cast(coalesce(sr_return_quantity, 0) as bigint)),sum(cast(coalesce(ss_quantity, 0) as bigint)),sum(coalesce(cast(sr_return_amt as decimal(12,2)), 0.00)),sum(coalesce(cast(ss_net_paid as decimal(12,2)), 0.00)),item,return_ratio,currency_ratio,sum,sum,sum,isEmpty,sum,isEmpty] + HashAggregate [ss_item_sk,sum,sum,sum,isEmpty,sum,isEmpty] [sum(coalesce(sr_return_quantity, 0)),sum(coalesce(ss_quantity, 0)),sum(coalesce(cast(sr_return_amt as decimal(12,2)), 0.00)),sum(coalesce(cast(ss_net_paid as decimal(12,2)), 0.00)),item,return_ratio,currency_ratio,sum,sum,sum,isEmpty,sum,isEmpty] InputAdapter Exchange [ss_item_sk] #10 WholeStageCodegen (17) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q51a.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q51a.sf100/explain.txt index 6243d3234d187..bbb3cff4e96ac 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q51a.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q51a.sf100/explain.txt @@ -135,7 +135,7 @@ Results [3]: [ws_item_sk#2, d_date#5, sum#9] (12) Exchange Input [3]: [ws_item_sk#2, d_date#5, sum#9] -Arguments: hashpartitioning(ws_item_sk#2, d_date#5, 5), true, [id=#10] +Arguments: hashpartitioning(ws_item_sk#2, d_date#5, 5), ENSURE_REQUIREMENTS, [id=#10] (13) HashAggregate [codegen id : 3] Input [3]: [ws_item_sk#2, d_date#5, sum#9] @@ -146,7 +146,7 @@ Results [4]: [ws_item_sk#2 AS item_sk#12, d_date#5, MakeDecimal(sum(UnscaledValu (14) Exchange Input [4]: [item_sk#12, d_date#5, sumws#13, ws_item_sk#2] -Arguments: hashpartitioning(ws_item_sk#2, 5), true, [id=#14] +Arguments: hashpartitioning(ws_item_sk#2, 5), ENSURE_REQUIREMENTS, [id=#14] (15) Sort [codegen id : 4] Input [4]: [item_sk#12, d_date#5, sumws#13, ws_item_sk#2] @@ -166,7 +166,7 @@ Input [5]: [item_sk#12, d_date#5, sumws#13, ws_item_sk#2, rk#15] (19) Exchange Input [4]: [item_sk#12, d_date#5, sumws#13, rk#15] -Arguments: hashpartitioning(item_sk#12, 5), true, [id=#16] +Arguments: hashpartitioning(item_sk#12, 5), ENSURE_REQUIREMENTS, [id=#16] (20) Sort [codegen id : 6] Input [4]: [item_sk#12, d_date#5, sumws#13, rk#15] @@ -193,7 +193,7 @@ Input [5]: [item_sk#17, d_date#18, sumws#19, ws_item_sk#2, rk#20] (26) Exchange Input [3]: [item_sk#17, sumws#19, rk#20] -Arguments: hashpartitioning(item_sk#17, 5), true, [id=#21] +Arguments: hashpartitioning(item_sk#17, 5), ENSURE_REQUIREMENTS, [id=#21] (27) Sort [codegen id : 12] Input [3]: [item_sk#17, sumws#19, rk#20] @@ -224,7 +224,7 @@ Results [3]: [item_sk#12, d_date#5, sum(sumws#19)#26 AS cume_sales#27] (32) Exchange Input [3]: [item_sk#12, d_date#5, cume_sales#27] -Arguments: hashpartitioning(item_sk#12, d_date#5, 5), true, [id=#28] +Arguments: hashpartitioning(item_sk#12, d_date#5, 5), ENSURE_REQUIREMENTS, [id=#28] (33) Sort [codegen id : 14] Input [3]: [item_sk#12, d_date#5, cume_sales#27] @@ -265,7 +265,7 @@ Results [3]: [ss_item_sk#30, d_date#33, sum#35] (41) Exchange Input [3]: [ss_item_sk#30, d_date#33, sum#35] -Arguments: hashpartitioning(ss_item_sk#30, d_date#33, 5), true, [id=#36] +Arguments: hashpartitioning(ss_item_sk#30, d_date#33, 5), ENSURE_REQUIREMENTS, [id=#36] (42) HashAggregate [codegen id : 17] Input [3]: [ss_item_sk#30, d_date#33, sum#35] @@ -276,7 +276,7 @@ Results [4]: [ss_item_sk#30 AS item_sk#38, d_date#33, MakeDecimal(sum(UnscaledVa (43) Exchange Input [4]: [item_sk#38, d_date#33, sumss#39, ss_item_sk#30] -Arguments: hashpartitioning(ss_item_sk#30, 5), true, [id=#40] +Arguments: hashpartitioning(ss_item_sk#30, 5), ENSURE_REQUIREMENTS, [id=#40] (44) Sort [codegen id : 18] Input [4]: [item_sk#38, d_date#33, sumss#39, ss_item_sk#30] @@ -296,7 +296,7 @@ Input [5]: [item_sk#38, d_date#33, sumss#39, ss_item_sk#30, rk#41] (48) Exchange Input [4]: [item_sk#38, d_date#33, sumss#39, rk#41] -Arguments: hashpartitioning(item_sk#38, 5), true, [id=#42] +Arguments: hashpartitioning(item_sk#38, 5), ENSURE_REQUIREMENTS, [id=#42] (49) Sort [codegen id : 20] Input [4]: [item_sk#38, d_date#33, sumss#39, rk#41] @@ -323,7 +323,7 @@ Input [5]: [item_sk#43, d_date#44, sumss#45, ss_item_sk#30, rk#46] (55) Exchange Input [3]: [item_sk#43, sumss#45, rk#46] -Arguments: hashpartitioning(item_sk#43, 5), true, [id=#47] +Arguments: hashpartitioning(item_sk#43, 5), ENSURE_REQUIREMENTS, [id=#47] (56) Sort [codegen id : 26] Input [3]: [item_sk#43, sumss#45, rk#46] @@ -354,7 +354,7 @@ Results [3]: [item_sk#38, d_date#33, sum(sumss#45)#52 AS cume_sales#53] (61) Exchange Input [3]: [item_sk#38, d_date#33, cume_sales#53] -Arguments: hashpartitioning(item_sk#38, d_date#33, 5), true, [id=#54] +Arguments: hashpartitioning(item_sk#38, d_date#33, 5), ENSURE_REQUIREMENTS, [id=#54] (62) Sort [codegen id : 28] Input [3]: [item_sk#38, d_date#33, cume_sales#53] @@ -375,7 +375,7 @@ Input [6]: [item_sk#12, d_date#5, cume_sales#27, item_sk#38, d_date#33, cume_sal (66) Exchange Input [4]: [item_sk#55, d_date#56, web_sales#57, store_sales#58] -Arguments: hashpartitioning(item_sk#55, 5), true, [id=#59] +Arguments: hashpartitioning(item_sk#55, 5), ENSURE_REQUIREMENTS, [id=#59] (67) Sort [codegen id : 30] Input [4]: [item_sk#55, d_date#56, web_sales#57, store_sales#58] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q51a/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q51a/explain.txt index 386b2da5528c7..8a3b569adabca 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q51a/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q51a/explain.txt @@ -132,7 +132,7 @@ Results [3]: [ws_item_sk#2, d_date#5, sum#9] (12) Exchange Input [3]: [ws_item_sk#2, d_date#5, sum#9] -Arguments: hashpartitioning(ws_item_sk#2, d_date#5, 5), true, [id=#10] +Arguments: hashpartitioning(ws_item_sk#2, d_date#5, 5), ENSURE_REQUIREMENTS, [id=#10] (13) HashAggregate [codegen id : 3] Input [3]: [ws_item_sk#2, d_date#5, sum#9] @@ -143,7 +143,7 @@ Results [4]: [ws_item_sk#2 AS item_sk#12, d_date#5, MakeDecimal(sum(UnscaledValu (14) Exchange Input [4]: [item_sk#12, d_date#5, sumws#13, ws_item_sk#2] -Arguments: hashpartitioning(ws_item_sk#2, 5), true, [id=#14] +Arguments: hashpartitioning(ws_item_sk#2, 5), ENSURE_REQUIREMENTS, [id=#14] (15) Sort [codegen id : 4] Input [4]: [item_sk#12, d_date#5, sumws#13, ws_item_sk#2] @@ -202,7 +202,7 @@ Results [5]: [item_sk#12, d_date#5, sumws#13, sum#23, isEmpty#24] (28) Exchange Input [5]: [item_sk#12, d_date#5, sumws#13, sum#23, isEmpty#24] -Arguments: hashpartitioning(item_sk#12, d_date#5, sumws#13, 5), true, [id=#25] +Arguments: hashpartitioning(item_sk#12, d_date#5, sumws#13, 5), ENSURE_REQUIREMENTS, [id=#25] (29) HashAggregate [codegen id : 11] Input [5]: [item_sk#12, d_date#5, sumws#13, sum#23, isEmpty#24] @@ -213,7 +213,7 @@ Results [3]: [item_sk#12, d_date#5, sum(sumws#18)#26 AS cume_sales#27] (30) Exchange Input [3]: [item_sk#12, d_date#5, cume_sales#27] -Arguments: hashpartitioning(item_sk#12, d_date#5, 5), true, [id=#28] +Arguments: hashpartitioning(item_sk#12, d_date#5, 5), ENSURE_REQUIREMENTS, [id=#28] (31) Sort [codegen id : 12] Input [3]: [item_sk#12, d_date#5, cume_sales#27] @@ -254,7 +254,7 @@ Results [3]: [ss_item_sk#30, d_date#33, sum#35] (39) Exchange Input [3]: [ss_item_sk#30, d_date#33, sum#35] -Arguments: hashpartitioning(ss_item_sk#30, d_date#33, 5), true, [id=#36] +Arguments: hashpartitioning(ss_item_sk#30, d_date#33, 5), ENSURE_REQUIREMENTS, [id=#36] (40) HashAggregate [codegen id : 15] Input [3]: [ss_item_sk#30, d_date#33, sum#35] @@ -265,7 +265,7 @@ Results [4]: [ss_item_sk#30 AS item_sk#38, d_date#33, MakeDecimal(sum(UnscaledVa (41) Exchange Input [4]: [item_sk#38, d_date#33, sumss#39, ss_item_sk#30] -Arguments: hashpartitioning(ss_item_sk#30, 5), true, [id=#40] +Arguments: hashpartitioning(ss_item_sk#30, 5), ENSURE_REQUIREMENTS, [id=#40] (42) Sort [codegen id : 16] Input [4]: [item_sk#38, d_date#33, sumss#39, ss_item_sk#30] @@ -324,7 +324,7 @@ Results [5]: [item_sk#38, d_date#33, sumss#39, sum#49, isEmpty#50] (55) Exchange Input [5]: [item_sk#38, d_date#33, sumss#39, sum#49, isEmpty#50] -Arguments: hashpartitioning(item_sk#38, d_date#33, sumss#39, 5), true, [id=#51] +Arguments: hashpartitioning(item_sk#38, d_date#33, sumss#39, 5), ENSURE_REQUIREMENTS, [id=#51] (56) HashAggregate [codegen id : 23] Input [5]: [item_sk#38, d_date#33, sumss#39, sum#49, isEmpty#50] @@ -335,7 +335,7 @@ Results [3]: [item_sk#38, d_date#33, sum(sumss#44)#52 AS cume_sales#53] (57) Exchange Input [3]: [item_sk#38, d_date#33, cume_sales#53] -Arguments: hashpartitioning(item_sk#38, d_date#33, 5), true, [id=#54] +Arguments: hashpartitioning(item_sk#38, d_date#33, 5), ENSURE_REQUIREMENTS, [id=#54] (58) Sort [codegen id : 24] Input [3]: [item_sk#38, d_date#33, cume_sales#53] @@ -356,7 +356,7 @@ Input [6]: [item_sk#12, d_date#5, cume_sales#27, item_sk#38, d_date#33, cume_sal (62) Exchange Input [4]: [item_sk#55, d_date#56, web_sales#57, store_sales#58] -Arguments: hashpartitioning(item_sk#55, 5), true, [id=#59] +Arguments: hashpartitioning(item_sk#55, 5), ENSURE_REQUIREMENTS, [id=#59] (63) Sort [codegen id : 26] Input [4]: [item_sk#55, d_date#56, web_sales#57, store_sales#58] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q57.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q57.sf100/explain.txt index e9f2b20fe64b2..6c6cc6f996cba 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q57.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q57.sf100/explain.txt @@ -129,7 +129,7 @@ Input [7]: [cs_call_center_sk#2, cs_item_sk#3, cs_sales_price#4, d_year#6, d_moy (16) Exchange Input [5]: [cs_item_sk#3, cs_sales_price#4, d_year#6, d_moy#7, cc_name#10] -Arguments: hashpartitioning(cs_item_sk#3, 5), true, [id=#12] +Arguments: hashpartitioning(cs_item_sk#3, 5), ENSURE_REQUIREMENTS, [id=#12] (17) Sort [codegen id : 4] Input [5]: [cs_item_sk#3, cs_sales_price#4, d_year#6, d_moy#7, cc_name#10] @@ -151,7 +151,7 @@ Condition : ((isnotnull(i_item_sk#13) AND isnotnull(i_category#15)) AND isnotnul (21) Exchange Input [3]: [i_item_sk#13, i_brand#14, i_category#15] -Arguments: hashpartitioning(i_item_sk#13, 5), true, [id=#16] +Arguments: hashpartitioning(i_item_sk#13, 5), ENSURE_REQUIREMENTS, [id=#16] (22) Sort [codegen id : 6] Input [3]: [i_item_sk#13, i_brand#14, i_category#15] @@ -175,7 +175,7 @@ Results [6]: [i_category#15, i_brand#14, cc_name#10, d_year#6, d_moy#7, sum#18] (26) Exchange Input [6]: [i_category#15, i_brand#14, cc_name#10, d_year#6, d_moy#7, sum#18] -Arguments: hashpartitioning(i_category#15, i_brand#14, cc_name#10, d_year#6, d_moy#7, 5), true, [id=#19] +Arguments: hashpartitioning(i_category#15, i_brand#14, cc_name#10, d_year#6, d_moy#7, 5), ENSURE_REQUIREMENTS, [id=#19] (27) HashAggregate [codegen id : 8] Input [6]: [i_category#15, i_brand#14, cc_name#10, d_year#6, d_moy#7, sum#18] @@ -186,7 +186,7 @@ Results [7]: [i_category#15, i_brand#14, cc_name#10, d_year#6, d_moy#7, MakeDeci (28) Exchange Input [7]: [i_category#15, i_brand#14, cc_name#10, d_year#6, d_moy#7, sum_sales#21, _w0#22] -Arguments: hashpartitioning(i_category#15, i_brand#14, cc_name#10, d_year#6, 5), true, [id=#23] +Arguments: hashpartitioning(i_category#15, i_brand#14, cc_name#10, d_year#6, 5), ENSURE_REQUIREMENTS, [id=#23] (29) Sort [codegen id : 9] Input [7]: [i_category#15, i_brand#14, cc_name#10, d_year#6, d_moy#7, sum_sales#21, _w0#22] @@ -202,7 +202,7 @@ Input [8]: [i_category#15, i_brand#14, cc_name#10, d_year#6, d_moy#7, sum_sales# (32) Exchange Input [7]: [i_category#15, i_brand#14, cc_name#10, d_year#6, d_moy#7, sum_sales#21, avg_monthly_sales#24] -Arguments: hashpartitioning(i_category#15, i_brand#14, cc_name#10, 5), true, [id=#25] +Arguments: hashpartitioning(i_category#15, i_brand#14, cc_name#10, 5), ENSURE_REQUIREMENTS, [id=#25] (33) Sort [codegen id : 11] Input [7]: [i_category#15, i_brand#14, cc_name#10, d_year#6, d_moy#7, sum_sales#21, avg_monthly_sales#24] @@ -214,11 +214,11 @@ Arguments: [rank(d_year#6, d_moy#7) windowspecdefinition(i_category#15, i_brand# (35) Filter [codegen id : 12] Input [8]: [i_category#15, i_brand#14, cc_name#10, d_year#6, d_moy#7, sum_sales#21, avg_monthly_sales#24, rn#26] -Condition : (((((isnotnull(d_year#6) AND isnotnull(avg_monthly_sales#24)) AND (d_year#6 = 1999)) AND (avg_monthly_sales#24 > 0.000000)) AND (CASE WHEN (avg_monthly_sales#24 > 0.000000) THEN CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#21 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#24 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_monthly_sales#24 as decimal(22,6)))), DecimalType(38,16), true) ELSE null END > 0.1000000000000000)) AND isnotnull(rn#26)) +Condition : ((((((isnotnull(d_year#6) AND isnotnull(avg_monthly_sales#24)) AND (d_year#6 = 1999)) AND (avg_monthly_sales#24 > 0.000000)) AND (avg_monthly_sales#24 > 0.000000)) AND (CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#21 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#24 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_monthly_sales#24 as decimal(22,6)))), DecimalType(38,16), true) > 0.1000000000000000)) AND isnotnull(rn#26)) (36) Exchange Input [8]: [i_category#15, i_brand#14, cc_name#10, d_year#6, d_moy#7, sum_sales#21, avg_monthly_sales#24, rn#26] -Arguments: hashpartitioning(i_category#15, i_brand#14, cc_name#10, rn#26, 5), true, [id=#27] +Arguments: hashpartitioning(i_category#15, i_brand#14, cc_name#10, rn#26, 5), ENSURE_REQUIREMENTS, [id=#27] (37) Sort [codegen id : 13] Input [8]: [i_category#15, i_brand#14, cc_name#10, d_year#6, d_moy#7, sum_sales#21, avg_monthly_sales#24, rn#26] @@ -236,7 +236,7 @@ Results [6]: [i_category#28, i_brand#29, cc_name#30, d_year#31, d_moy#32, MakeDe (40) Exchange Input [6]: [i_category#28, i_brand#29, cc_name#30, d_year#31, d_moy#32, sum_sales#35] -Arguments: hashpartitioning(i_category#28, i_brand#29, cc_name#30, 5), true, [id=#36] +Arguments: hashpartitioning(i_category#28, i_brand#29, cc_name#30, 5), ENSURE_REQUIREMENTS, [id=#36] (41) Sort [codegen id : 22] Input [6]: [i_category#28, i_brand#29, cc_name#30, d_year#31, d_moy#32, sum_sales#35] @@ -256,7 +256,7 @@ Input [7]: [i_category#28, i_brand#29, cc_name#30, d_year#31, d_moy#32, sum_sale (45) Exchange Input [5]: [i_category#28, i_brand#29, cc_name#30, sum_sales#35, rn#37] -Arguments: hashpartitioning(i_category#28, i_brand#29, cc_name#30, (rn#37 + 1), 5), true, [id=#38] +Arguments: hashpartitioning(i_category#28, i_brand#29, cc_name#30, (rn#37 + 1), 5), ENSURE_REQUIREMENTS, [id=#38] (46) Sort [codegen id : 24] Input [5]: [i_category#28, i_brand#29, cc_name#30, sum_sales#35, rn#37] @@ -292,7 +292,7 @@ Input [7]: [i_category#39, i_brand#40, cc_name#41, d_year#42, d_moy#43, sum_sale (54) Exchange Input [5]: [i_category#39, i_brand#40, cc_name#41, sum_sales#44, rn#45] -Arguments: hashpartitioning(i_category#39, i_brand#40, cc_name#41, (rn#45 - 1), 5), true, [id=#46] +Arguments: hashpartitioning(i_category#39, i_brand#40, cc_name#41, (rn#45 - 1), 5), ENSURE_REQUIREMENTS, [id=#46] (55) Sort [codegen id : 36] Input [5]: [i_category#39, i_brand#40, cc_name#41, sum_sales#44, rn#45] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q57/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q57/explain.txt index fcd44a9393007..244482aa28790 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q57/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q57/explain.txt @@ -156,18 +156,18 @@ Results [6]: [i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, sum#17] (23) Exchange Input [6]: [i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, sum#17] -Arguments: hashpartitioning(i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, 5), true, [id=#18] +Arguments: hashpartitioning(i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, 5), ENSURE_REQUIREMENTS, [id=#18] (24) HashAggregate [codegen id : 5] Input [6]: [i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, sum#17] Keys [5]: [i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11] Functions [1]: [sum(UnscaledValue(cs_sales_price#7))] Aggregate Attributes [1]: [sum(UnscaledValue(cs_sales_price#7))#19] -Results [7]: [i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, MakeDecimal(sum(UnscaledValue(cs_sales_price#7))#19,17,2) AS sum_sales#20, MakeDecimal(sum(UnscaledValue(cs_sales_price#7))#19,17,2) AS _w0#21] +Results [7]: [i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, MakeDecimal(sum(UnscaledValue(cs_sales_price#7))#19,17,2) AS sum_sales#20, cast(MakeDecimal(sum(UnscaledValue(cs_sales_price#7))#19,17,2) as bigint) AS _w0#21] (25) Exchange Input [7]: [i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, sum_sales#20, _w0#21] -Arguments: hashpartitioning(i_category#3, i_brand#2, cc_name#14, d_year#10, 5), true, [id=#22] +Arguments: hashpartitioning(i_category#3, i_brand#2, cc_name#14, d_year#10, 5), ENSURE_REQUIREMENTS, [id=#22] (26) Sort [codegen id : 6] Input [7]: [i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, sum_sales#20, _w0#21] @@ -183,7 +183,7 @@ Input [8]: [i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, sum_sales# (29) Exchange Input [7]: [i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, sum_sales#20, avg_monthly_sales#23] -Arguments: hashpartitioning(i_category#3, i_brand#2, cc_name#14, 5), true, [id=#24] +Arguments: hashpartitioning(i_category#3, i_brand#2, cc_name#14, 5), ENSURE_REQUIREMENTS, [id=#24] (30) Sort [codegen id : 8] Input [7]: [i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, sum_sales#20, avg_monthly_sales#23] @@ -195,7 +195,7 @@ Arguments: [rank(d_year#10, d_moy#11) windowspecdefinition(i_category#3, i_brand (32) Filter [codegen id : 23] Input [8]: [i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, sum_sales#20, avg_monthly_sales#23, rn#25] -Condition : (((((isnotnull(d_year#10) AND isnotnull(avg_monthly_sales#23)) AND (d_year#10 = 1999)) AND (avg_monthly_sales#23 > 0.000000)) AND (CASE WHEN (avg_monthly_sales#23 > 0.000000) THEN CheckOverflow((promote_precision(abs(CheckOverflow((promote_precision(cast(sum_sales#20 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#23 as decimal(22,6)))), DecimalType(22,6), true))) / promote_precision(cast(avg_monthly_sales#23 as decimal(22,6)))), DecimalType(38,16), true) ELSE null END > 0.1000000000000000)) AND isnotnull(rn#25)) +Condition : (((((((isnotnull(d_year#10) AND isnotnull(avg_monthly_sales#23)) AND isnotnull(sum_sales#20)) AND (d_year#10 = 1999)) AND (avg_monthly_sales#23 > 0.0)) AND (avg_monthly_sales#23 > 0.0)) AND ((abs((cast(sum_sales#20 as double) - avg_monthly_sales#23)) / avg_monthly_sales#23) > 0.1)) AND isnotnull(rn#25)) (33) ReusedExchange [Reuses operator id: 23] Output [6]: [i_category#26, i_brand#27, cc_name#28, d_year#29, d_moy#30, sum#31] @@ -209,7 +209,7 @@ Results [6]: [i_category#26, i_brand#27, cc_name#28, d_year#29, d_moy#30, MakeDe (35) Exchange Input [6]: [i_category#26, i_brand#27, cc_name#28, d_year#29, d_moy#30, sum_sales#33] -Arguments: hashpartitioning(i_category#26, i_brand#27, cc_name#28, 5), true, [id=#34] +Arguments: hashpartitioning(i_category#26, i_brand#27, cc_name#28, 5), ENSURE_REQUIREMENTS, [id=#34] (36) Sort [codegen id : 14] Input [6]: [i_category#26, i_brand#27, cc_name#28, d_year#29, d_moy#30, sum_sales#33] @@ -274,5 +274,5 @@ Input [14]: [i_category#3, i_brand#2, cc_name#14, d_year#10, d_moy#11, sum_sales (51) TakeOrderedAndProject Input [8]: [i_category#3, i_brand#2, d_year#10, d_moy#11, avg_monthly_sales#23, sum_sales#20, psum#45, nsum#46] -Arguments: 100, [CheckOverflow((promote_precision(cast(sum_sales#20 as decimal(22,6))) - promote_precision(cast(avg_monthly_sales#23 as decimal(22,6)))), DecimalType(22,6), true) ASC NULLS FIRST, d_year#10 ASC NULLS FIRST], [i_category#3, i_brand#2, d_year#10, d_moy#11, avg_monthly_sales#23, sum_sales#20, psum#45, nsum#46] +Arguments: 100, [(cast(sum_sales#20 as double) - avg_monthly_sales#23) ASC NULLS FIRST, d_year#10 ASC NULLS FIRST], [i_category#3, i_brand#2, d_year#10, d_moy#11, avg_monthly_sales#23, sum_sales#20, psum#45, nsum#46] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q6.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q6.sf100/explain.txt index 1b9e8f37e9418..a6f7442ac3405 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q6.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q6.sf100/explain.txt @@ -102,7 +102,7 @@ Results [3]: [i_category#6, sum#9, count#10] (11) Exchange Input [3]: [i_category#6, sum#9, count#10] -Arguments: hashpartitioning(i_category#6, 5), true, [id=#11] +Arguments: hashpartitioning(i_category#6, 5), ENSURE_REQUIREMENTS, [id=#11] (12) HashAggregate [codegen id : 2] Input [3]: [i_category#6, sum#9, count#10] @@ -174,7 +174,7 @@ Input [3]: [ss_sold_date_sk#1, ss_customer_sk#3, d_date_sk#17] (27) Exchange Input [1]: [ss_customer_sk#3] -Arguments: hashpartitioning(ss_customer_sk#3, 5), true, [id=#22] +Arguments: hashpartitioning(ss_customer_sk#3, 5), ENSURE_REQUIREMENTS, [id=#22] (28) Sort [codegen id : 6] Input [1]: [ss_customer_sk#3] @@ -196,7 +196,7 @@ Condition : isnotnull(ca_address_sk#23) (32) Exchange Input [2]: [ca_address_sk#23, ca_state#24] -Arguments: hashpartitioning(ca_address_sk#23, 5), true, [id=#25] +Arguments: hashpartitioning(ca_address_sk#23, 5), ENSURE_REQUIREMENTS, [id=#25] (33) Sort [codegen id : 8] Input [2]: [ca_address_sk#23, ca_state#24] @@ -218,7 +218,7 @@ Condition : (isnotnull(c_current_addr_sk#27) AND isnotnull(c_customer_sk#26)) (37) Exchange Input [2]: [c_customer_sk#26, c_current_addr_sk#27] -Arguments: hashpartitioning(c_current_addr_sk#27, 5), true, [id=#28] +Arguments: hashpartitioning(c_current_addr_sk#27, 5), ENSURE_REQUIREMENTS, [id=#28] (38) Sort [codegen id : 10] Input [2]: [c_customer_sk#26, c_current_addr_sk#27] @@ -235,7 +235,7 @@ Input [4]: [ca_address_sk#23, ca_state#24, c_customer_sk#26, c_current_addr_sk#2 (41) Exchange Input [2]: [ca_state#24, c_customer_sk#26] -Arguments: hashpartitioning(c_customer_sk#26, 5), true, [id=#29] +Arguments: hashpartitioning(c_customer_sk#26, 5), ENSURE_REQUIREMENTS, [id=#29] (42) Sort [codegen id : 12] Input [2]: [ca_state#24, c_customer_sk#26] @@ -259,7 +259,7 @@ Results [2]: [ca_state#24, count#31] (46) Exchange Input [2]: [ca_state#24, count#31] -Arguments: hashpartitioning(ca_state#24, 5), true, [id=#32] +Arguments: hashpartitioning(ca_state#24, 5), ENSURE_REQUIREMENTS, [id=#32] (47) HashAggregate [codegen id : 14] Input [2]: [ca_state#24, count#31] @@ -319,7 +319,7 @@ Results [1]: [d_month_seq#18] (56) Exchange Input [1]: [d_month_seq#18] -Arguments: hashpartitioning(d_month_seq#18, 5), true, [id=#39] +Arguments: hashpartitioning(d_month_seq#18, 5), ENSURE_REQUIREMENTS, [id=#39] (57) HashAggregate [codegen id : 2] Input [1]: [d_month_seq#18] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q6/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q6/explain.txt index bbcb16861e0be..e56a955d54543 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q6/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q6/explain.txt @@ -181,7 +181,7 @@ Results [3]: [i_category#17, sum#20, count#21] (30) Exchange Input [3]: [i_category#17, sum#20, count#21] -Arguments: hashpartitioning(i_category#17, 5), true, [id=#22] +Arguments: hashpartitioning(i_category#17, 5), ENSURE_REQUIREMENTS, [id=#22] (31) HashAggregate [codegen id : 5] Input [3]: [i_category#17, sum#20, count#21] @@ -229,7 +229,7 @@ Results [2]: [ca_state#2, count#29] (40) Exchange Input [2]: [ca_state#2, count#29] -Arguments: hashpartitioning(ca_state#2, 5), true, [id=#30] +Arguments: hashpartitioning(ca_state#2, 5), ENSURE_REQUIREMENTS, [id=#30] (41) HashAggregate [codegen id : 8] Input [2]: [ca_state#2, count#29] @@ -289,7 +289,7 @@ Results [1]: [d_month_seq#11] (50) Exchange Input [1]: [d_month_seq#11] -Arguments: hashpartitioning(d_month_seq#11, 5), true, [id=#37] +Arguments: hashpartitioning(d_month_seq#11, 5), ENSURE_REQUIREMENTS, [id=#37] (51) HashAggregate [codegen id : 2] Input [1]: [d_month_seq#11] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q64.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q64.sf100/explain.txt index ae75932bcb5e0..5de039c70f658 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q64.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q64.sf100/explain.txt @@ -226,7 +226,7 @@ Condition : ((((((((isnotnull(ss_item_sk#2) AND isnotnull(ss_ticket_number#9)) A (4) Exchange Input [12]: [ss_sold_date_sk#1, ss_item_sk#2, ss_customer_sk#3, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_addr_sk#6, ss_store_sk#7, ss_promo_sk#8, ss_ticket_number#9, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12] -Arguments: hashpartitioning(cast(ss_item_sk#2 as bigint), cast(ss_ticket_number#9 as bigint), 5), true, [id=#13] +Arguments: hashpartitioning(cast(ss_item_sk#2 as bigint), cast(ss_ticket_number#9 as bigint), 5), ENSURE_REQUIREMENTS, [id=#13] (5) Sort [codegen id : 2] Input [12]: [ss_sold_date_sk#1, ss_item_sk#2, ss_customer_sk#3, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_addr_sk#6, ss_store_sk#7, ss_promo_sk#8, ss_ticket_number#9, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12] @@ -248,7 +248,7 @@ Condition : (isnotnull(sr_item_sk#14) AND isnotnull(sr_ticket_number#15)) (9) Exchange Input [2]: [sr_item_sk#14, sr_ticket_number#15] -Arguments: hashpartitioning(sr_item_sk#14, sr_ticket_number#15, 5), true, [id=#16] +Arguments: hashpartitioning(sr_item_sk#14, sr_ticket_number#15, 5), ENSURE_REQUIREMENTS, [id=#16] (10) Sort [codegen id : 4] Input [2]: [sr_item_sk#14, sr_ticket_number#15] @@ -279,7 +279,7 @@ Condition : (isnotnull(cs_item_sk#17) AND isnotnull(cs_order_number#18)) (16) Exchange Input [3]: [cs_item_sk#17, cs_order_number#18, cs_ext_list_price#19] -Arguments: hashpartitioning(cs_item_sk#17, cs_order_number#18, 5), true, [id=#20] +Arguments: hashpartitioning(cs_item_sk#17, cs_order_number#18, 5), ENSURE_REQUIREMENTS, [id=#20] (17) Sort [codegen id : 6] Input [3]: [cs_item_sk#17, cs_order_number#18, cs_ext_list_price#19] @@ -301,7 +301,7 @@ Condition : (isnotnull(cr_item_sk#21) AND isnotnull(cr_order_number#22)) (21) Exchange Input [5]: [cr_item_sk#21, cr_order_number#22, cr_refunded_cash#23, cr_reversed_charge#24, cr_store_credit#25] -Arguments: hashpartitioning(cr_item_sk#21, cr_order_number#22, 5), true, [id=#26] +Arguments: hashpartitioning(cr_item_sk#21, cr_order_number#22, 5), ENSURE_REQUIREMENTS, [id=#26] (22) Sort [codegen id : 8] Input [5]: [cr_item_sk#21, cr_order_number#22, cr_refunded_cash#23, cr_reversed_charge#24, cr_store_credit#25] @@ -325,7 +325,7 @@ Results [4]: [cs_item_sk#17, sum#30, sum#31, isEmpty#32] (26) Exchange Input [4]: [cs_item_sk#17, sum#30, sum#31, isEmpty#32] -Arguments: hashpartitioning(cs_item_sk#17, 5), true, [id=#33] +Arguments: hashpartitioning(cs_item_sk#17, 5), ENSURE_REQUIREMENTS, [id=#33] (27) HashAggregate [codegen id : 10] Input [4]: [cs_item_sk#17, sum#30, sum#31, isEmpty#32] @@ -411,7 +411,7 @@ Input [14]: [ss_item_sk#2, ss_customer_sk#3, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_ad (45) Exchange Input [12]: [ss_item_sk#2, ss_customer_sk#3, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_sk#8, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44] -Arguments: hashpartitioning(ss_customer_sk#3, 5), true, [id=#46] +Arguments: hashpartitioning(ss_customer_sk#3, 5), ENSURE_REQUIREMENTS, [id=#46] (46) Sort [codegen id : 14] Input [12]: [ss_item_sk#2, ss_customer_sk#3, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_sk#8, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44] @@ -433,7 +433,7 @@ Condition : (((((isnotnull(c_customer_sk#47) AND isnotnull(c_first_sales_date_sk (50) Exchange Input [6]: [c_customer_sk#47, c_current_cdemo_sk#48, c_current_hdemo_sk#49, c_current_addr_sk#50, c_first_shipto_date_sk#51, c_first_sales_date_sk#52] -Arguments: hashpartitioning(c_customer_sk#47, 5), true, [id=#53] +Arguments: hashpartitioning(c_customer_sk#47, 5), ENSURE_REQUIREMENTS, [id=#53] (51) Sort [codegen id : 16] Input [6]: [c_customer_sk#47, c_current_cdemo_sk#48, c_current_hdemo_sk#49, c_current_addr_sk#50, c_first_shipto_date_sk#51, c_first_sales_date_sk#52] @@ -489,7 +489,7 @@ Input [18]: [ss_item_sk#2, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_ (63) Exchange Input [16]: [ss_item_sk#2, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_sk#8, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_cdemo_sk#48, c_current_hdemo_sk#49, c_current_addr_sk#50, d_year#55, d_year#58] -Arguments: hashpartitioning(ss_cdemo_sk#4, 5), true, [id=#59] +Arguments: hashpartitioning(ss_cdemo_sk#4, 5), ENSURE_REQUIREMENTS, [id=#59] (64) Sort [codegen id : 20] Input [16]: [ss_item_sk#2, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_sk#8, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_cdemo_sk#48, c_current_hdemo_sk#49, c_current_addr_sk#50, d_year#55, d_year#58] @@ -511,7 +511,7 @@ Condition : (isnotnull(cd_demo_sk#60) AND isnotnull(cd_marital_status#61)) (68) Exchange Input [2]: [cd_demo_sk#60, cd_marital_status#61] -Arguments: hashpartitioning(cd_demo_sk#60, 5), true, [id=#62] +Arguments: hashpartitioning(cd_demo_sk#60, 5), ENSURE_REQUIREMENTS, [id=#62] (69) Sort [codegen id : 22] Input [2]: [cd_demo_sk#60, cd_marital_status#61] @@ -528,7 +528,7 @@ Input [18]: [ss_item_sk#2, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_ (72) Exchange Input [16]: [ss_item_sk#2, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_sk#8, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_cdemo_sk#48, c_current_hdemo_sk#49, c_current_addr_sk#50, d_year#55, d_year#58, cd_marital_status#61] -Arguments: hashpartitioning(c_current_cdemo_sk#48, 5), true, [id=#63] +Arguments: hashpartitioning(c_current_cdemo_sk#48, 5), ENSURE_REQUIREMENTS, [id=#63] (73) Sort [codegen id : 24] Input [16]: [ss_item_sk#2, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_sk#8, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_cdemo_sk#48, c_current_hdemo_sk#49, c_current_addr_sk#50, d_year#55, d_year#58, cd_marital_status#61] @@ -618,7 +618,7 @@ Input [15]: [ss_item_sk#2, ss_addr_sk#6, ss_wholesale_cost#10, ss_list_price#11, (93) Exchange Input [13]: [ss_item_sk#2, ss_addr_sk#6, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_addr_sk#50, d_year#55, d_year#58, hd_income_band_sk#69, hd_income_band_sk#72] -Arguments: hashpartitioning(ss_addr_sk#6, 5), true, [id=#73] +Arguments: hashpartitioning(ss_addr_sk#6, 5), ENSURE_REQUIREMENTS, [id=#73] (94) Sort [codegen id : 31] Input [13]: [ss_item_sk#2, ss_addr_sk#6, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_addr_sk#50, d_year#55, d_year#58, hd_income_band_sk#69, hd_income_band_sk#72] @@ -640,7 +640,7 @@ Condition : isnotnull(ca_address_sk#74) (98) Exchange Input [5]: [ca_address_sk#74, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78] -Arguments: hashpartitioning(ca_address_sk#74, 5), true, [id=#79] +Arguments: hashpartitioning(ca_address_sk#74, 5), ENSURE_REQUIREMENTS, [id=#79] (99) Sort [codegen id : 33] Input [5]: [ca_address_sk#74, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78] @@ -657,7 +657,7 @@ Input [18]: [ss_item_sk#2, ss_addr_sk#6, ss_wholesale_cost#10, ss_list_price#11, (102) Exchange Input [16]: [ss_item_sk#2, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_addr_sk#50, d_year#55, d_year#58, hd_income_band_sk#69, hd_income_band_sk#72, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78] -Arguments: hashpartitioning(c_current_addr_sk#50, 5), true, [id=#80] +Arguments: hashpartitioning(c_current_addr_sk#50, 5), ENSURE_REQUIREMENTS, [id=#80] (103) Sort [codegen id : 35] Input [16]: [ss_item_sk#2, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_addr_sk#50, d_year#55, d_year#58, hd_income_band_sk#69, hd_income_band_sk#72, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78] @@ -722,7 +722,7 @@ Input [19]: [ss_item_sk#2, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt Output [4]: [i_item_sk#89, i_current_price#90, i_color#91, i_product_name#92] Batched: true Location [not included in comparison]/{warehouse_dir}/item] -PushedFilters: [IsNotNull(i_current_price), In(i_color, [purple,burlywood,indian,spring,floral,medium]), GreaterThanOrEqual(i_current_price,64.00), IsNotNull(i_item_sk)] +PushedFilters: [IsNotNull(i_current_price), In(i_color, [purple,burlywood,indian,spring,floral,medium]), GreaterThanOrEqual(i_current_price,64.00), LessThanOrEqual(i_current_price,74.00), GreaterThanOrEqual(i_current_price,65.00), LessThanOrEqual(i_current_price,79.00), IsNotNull(i_item_sk)] ReadSchema: struct (118) ColumnarToRow [codegen id : 40] @@ -730,7 +730,7 @@ Input [4]: [i_item_sk#89, i_current_price#90, i_color#91, i_product_name#92] (119) Filter [codegen id : 40] Input [4]: [i_item_sk#89, i_current_price#90, i_color#91, i_product_name#92] -Condition : ((((((isnotnull(i_current_price#90) AND i_color#91 IN (purple,burlywood,indian,spring,floral,medium)) AND (i_current_price#90 >= 64.00)) AND (cast(i_current_price#90 as decimal(12,2)) <= 74.00)) AND (cast(i_current_price#90 as decimal(12,2)) >= 65.00)) AND (cast(i_current_price#90 as decimal(12,2)) <= 79.00)) AND isnotnull(i_item_sk#89)) +Condition : ((((((isnotnull(i_current_price#90) AND i_color#91 IN (purple,burlywood,indian,spring,floral,medium)) AND (i_current_price#90 >= 64.00)) AND (i_current_price#90 <= 74.00)) AND (i_current_price#90 >= 65.00)) AND (i_current_price#90 <= 79.00)) AND isnotnull(i_item_sk#89)) (120) Project [codegen id : 40] Output [2]: [i_item_sk#89, i_product_name#92] @@ -758,7 +758,7 @@ Results [19]: [i_product_name#92, i_item_sk#89, s_store_name#43, s_zip#44, ca_st (125) Exchange Input [19]: [i_product_name#92, i_item_sk#89, s_store_name#43, s_zip#44, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78, ca_street_number#82, ca_street_name#83, ca_city#84, ca_zip#85, d_year#40, d_year#55, d_year#58, count#98, sum#99, sum#100, sum#101] -Arguments: hashpartitioning(i_product_name#92, i_item_sk#89, s_store_name#43, s_zip#44, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78, ca_street_number#82, ca_street_name#83, ca_city#84, ca_zip#85, d_year#40, d_year#55, d_year#58, 5), true, [id=#102] +Arguments: hashpartitioning(i_product_name#92, i_item_sk#89, s_store_name#43, s_zip#44, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78, ca_street_number#82, ca_street_name#83, ca_city#84, ca_zip#85, d_year#40, d_year#55, d_year#58, 5), ENSURE_REQUIREMENTS, [id=#102] (126) HashAggregate [codegen id : 42] Input [19]: [i_product_name#92, i_item_sk#89, s_store_name#43, s_zip#44, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78, ca_street_number#82, ca_street_name#83, ca_city#84, ca_zip#85, d_year#40, d_year#55, d_year#58, count#98, sum#99, sum#100, sum#101] @@ -769,7 +769,7 @@ Results [17]: [i_product_name#92 AS product_name#107, i_item_sk#89 AS item_sk#10 (127) Exchange Input [17]: [product_name#107, item_sk#108, store_name#109, store_zip#110, b_street_number#111, b_streen_name#112, b_city#113, b_zip#114, c_street_number#115, c_street_name#116, c_city#117, c_zip#118, syear#119, cnt#120, s1#121, s2#122, s3#123] -Arguments: hashpartitioning(item_sk#108, store_name#109, store_zip#110, 5), true, [id=#124] +Arguments: hashpartitioning(item_sk#108, store_name#109, store_zip#110, 5), ENSURE_REQUIREMENTS, [id=#124] (128) Sort [codegen id : 43] Input [17]: [product_name#107, item_sk#108, store_name#109, store_zip#110, b_street_number#111, b_streen_name#112, b_city#113, b_zip#114, c_street_number#115, c_street_name#116, c_city#117, c_zip#118, syear#119, cnt#120, s1#121, s2#122, s3#123] @@ -851,7 +851,7 @@ Input [14]: [ss_item_sk#2, ss_customer_sk#3, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_ad (147) Exchange Input [12]: [ss_item_sk#2, ss_customer_sk#3, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_sk#8, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44] -Arguments: hashpartitioning(ss_customer_sk#3, 5), true, [id=#126] +Arguments: hashpartitioning(ss_customer_sk#3, 5), ENSURE_REQUIREMENTS, [id=#126] (148) Sort [codegen id : 57] Input [12]: [ss_item_sk#2, ss_customer_sk#3, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_sk#8, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44] @@ -899,7 +899,7 @@ Input [18]: [ss_item_sk#2, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_ (159) Exchange Input [16]: [ss_item_sk#2, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_sk#8, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_cdemo_sk#48, c_current_hdemo_sk#49, c_current_addr_sk#50, d_year#128, d_year#130] -Arguments: hashpartitioning(ss_cdemo_sk#4, 5), true, [id=#131] +Arguments: hashpartitioning(ss_cdemo_sk#4, 5), ENSURE_REQUIREMENTS, [id=#131] (160) Sort [codegen id : 63] Input [16]: [ss_item_sk#2, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_sk#8, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_cdemo_sk#48, c_current_hdemo_sk#49, c_current_addr_sk#50, d_year#128, d_year#130] @@ -923,7 +923,7 @@ Input [18]: [ss_item_sk#2, ss_cdemo_sk#4, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_ (165) Exchange Input [16]: [ss_item_sk#2, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_sk#8, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_cdemo_sk#48, c_current_hdemo_sk#49, c_current_addr_sk#50, d_year#128, d_year#130, cd_marital_status#61] -Arguments: hashpartitioning(c_current_cdemo_sk#48, 5), true, [id=#132] +Arguments: hashpartitioning(c_current_cdemo_sk#48, 5), ENSURE_REQUIREMENTS, [id=#132] (166) Sort [codegen id : 67] Input [16]: [ss_item_sk#2, ss_hdemo_sk#5, ss_addr_sk#6, ss_promo_sk#8, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_cdemo_sk#48, c_current_hdemo_sk#49, c_current_addr_sk#50, d_year#128, d_year#130, cd_marital_status#61] @@ -983,7 +983,7 @@ Input [15]: [ss_item_sk#2, ss_addr_sk#6, ss_wholesale_cost#10, ss_list_price#11, (180) Exchange Input [13]: [ss_item_sk#2, ss_addr_sk#6, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_addr_sk#50, d_year#128, d_year#130, hd_income_band_sk#69, hd_income_band_sk#136] -Arguments: hashpartitioning(ss_addr_sk#6, 5), true, [id=#137] +Arguments: hashpartitioning(ss_addr_sk#6, 5), ENSURE_REQUIREMENTS, [id=#137] (181) Sort [codegen id : 74] Input [13]: [ss_item_sk#2, ss_addr_sk#6, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_addr_sk#50, d_year#128, d_year#130, hd_income_band_sk#69, hd_income_band_sk#136] @@ -1007,7 +1007,7 @@ Input [18]: [ss_item_sk#2, ss_addr_sk#6, ss_wholesale_cost#10, ss_list_price#11, (186) Exchange Input [16]: [ss_item_sk#2, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_addr_sk#50, d_year#128, d_year#130, hd_income_band_sk#69, hd_income_band_sk#136, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78] -Arguments: hashpartitioning(c_current_addr_sk#50, 5), true, [id=#138] +Arguments: hashpartitioning(c_current_addr_sk#50, 5), ENSURE_REQUIREMENTS, [id=#138] (187) Sort [codegen id : 78] Input [16]: [ss_item_sk#2, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt#12, d_year#40, s_store_name#43, s_zip#44, c_current_addr_sk#50, d_year#128, d_year#130, hd_income_band_sk#69, hd_income_band_sk#136, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78] @@ -1074,7 +1074,7 @@ Results [19]: [i_product_name#92, i_item_sk#89, s_store_name#43, s_zip#44, ca_st (202) Exchange Input [19]: [i_product_name#92, i_item_sk#89, s_store_name#43, s_zip#44, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78, ca_street_number#140, ca_street_name#141, ca_city#142, ca_zip#143, d_year#40, d_year#128, d_year#130, count#149, sum#150, sum#151, sum#152] -Arguments: hashpartitioning(i_product_name#92, i_item_sk#89, s_store_name#43, s_zip#44, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78, ca_street_number#140, ca_street_name#141, ca_city#142, ca_zip#143, d_year#40, d_year#128, d_year#130, 5), true, [id=#153] +Arguments: hashpartitioning(i_product_name#92, i_item_sk#89, s_store_name#43, s_zip#44, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78, ca_street_number#140, ca_street_name#141, ca_city#142, ca_zip#143, d_year#40, d_year#128, d_year#130, 5), ENSURE_REQUIREMENTS, [id=#153] (203) HashAggregate [codegen id : 85] Input [19]: [i_product_name#92, i_item_sk#89, s_store_name#43, s_zip#44, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78, ca_street_number#140, ca_street_name#141, ca_city#142, ca_zip#143, d_year#40, d_year#128, d_year#130, count#149, sum#150, sum#151, sum#152] @@ -1085,7 +1085,7 @@ Results [8]: [i_item_sk#89 AS item_sk#158, s_store_name#43 AS store_name#159, s_ (204) Exchange Input [8]: [item_sk#158, store_name#159, store_zip#160, syear#161, cnt#162, s1#163, s2#164, s3#165] -Arguments: hashpartitioning(item_sk#158, store_name#159, store_zip#160, 5), true, [id=#166] +Arguments: hashpartitioning(item_sk#158, store_name#159, store_zip#160, 5), ENSURE_REQUIREMENTS, [id=#166] (205) Sort [codegen id : 86] Input [8]: [item_sk#158, store_name#159, store_zip#160, syear#161, cnt#162, s1#163, s2#164, s3#165] @@ -1102,7 +1102,7 @@ Input [25]: [product_name#107, item_sk#108, store_name#109, store_zip#110, b_str (208) Exchange Input [21]: [product_name#107, store_name#109, store_zip#110, b_street_number#111, b_streen_name#112, b_city#113, b_zip#114, c_street_number#115, c_street_name#116, c_city#117, c_zip#118, syear#119, cnt#120, s1#121, s2#122, s3#123, s1#163, s2#164, s3#165, syear#161, cnt#162] -Arguments: rangepartitioning(product_name#107 ASC NULLS FIRST, store_name#109 ASC NULLS FIRST, cnt#162 ASC NULLS FIRST, s1#121 ASC NULLS FIRST, s1#163 ASC NULLS FIRST, 5), true, [id=#167] +Arguments: rangepartitioning(product_name#107 ASC NULLS FIRST, store_name#109 ASC NULLS FIRST, cnt#162 ASC NULLS FIRST, s1#121 ASC NULLS FIRST, s1#163 ASC NULLS FIRST, 5), ENSURE_REQUIREMENTS, [id=#167] (209) Sort [codegen id : 88] Input [21]: [product_name#107, store_name#109, store_zip#110, b_street_number#111, b_streen_name#112, b_city#113, b_zip#114, c_street_number#115, c_street_name#116, c_city#117, c_zip#118, syear#119, cnt#120, s1#121, s2#122, s3#123, s1#163, s2#164, s3#165, syear#161, cnt#162] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q64/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q64/explain.txt index 6c52a1ae74662..0d885e5c3ff6c 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q64/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q64/explain.txt @@ -262,7 +262,7 @@ Results [4]: [cs_item_sk#16, sum#28, sum#29, isEmpty#30] (20) Exchange Input [4]: [cs_item_sk#16, sum#28, sum#29, isEmpty#30] -Arguments: hashpartitioning(cs_item_sk#16, 5), true, [id=#31] +Arguments: hashpartitioning(cs_item_sk#16, 5), ENSURE_REQUIREMENTS, [id=#31] (21) HashAggregate [codegen id : 4] Input [4]: [cs_item_sk#16, sum#28, sum#29, isEmpty#30] @@ -599,7 +599,7 @@ Input [19]: [ss_item_sk#2, ss_wholesale_cost#10, ss_list_price#11, ss_coupon_amt Output [4]: [i_item_sk#82, i_current_price#83, i_color#84, i_product_name#85] Batched: true Location [not included in comparison]/{warehouse_dir}/item] -PushedFilters: [IsNotNull(i_current_price), In(i_color, [purple,burlywood,indian,spring,floral,medium]), GreaterThanOrEqual(i_current_price,64.00), IsNotNull(i_item_sk)] +PushedFilters: [IsNotNull(i_current_price), In(i_color, [purple,burlywood,indian,spring,floral,medium]), GreaterThanOrEqual(i_current_price,64.00), LessThanOrEqual(i_current_price,74.00), GreaterThanOrEqual(i_current_price,65.00), LessThanOrEqual(i_current_price,79.00), IsNotNull(i_item_sk)] ReadSchema: struct (97) ColumnarToRow [codegen id : 19] @@ -607,7 +607,7 @@ Input [4]: [i_item_sk#82, i_current_price#83, i_color#84, i_product_name#85] (98) Filter [codegen id : 19] Input [4]: [i_item_sk#82, i_current_price#83, i_color#84, i_product_name#85] -Condition : ((((((isnotnull(i_current_price#83) AND i_color#84 IN (purple,burlywood,indian,spring,floral,medium)) AND (i_current_price#83 >= 64.00)) AND (cast(i_current_price#83 as decimal(12,2)) <= 74.00)) AND (cast(i_current_price#83 as decimal(12,2)) >= 65.00)) AND (cast(i_current_price#83 as decimal(12,2)) <= 79.00)) AND isnotnull(i_item_sk#82)) +Condition : ((((((isnotnull(i_current_price#83) AND i_color#84 IN (purple,burlywood,indian,spring,floral,medium)) AND (i_current_price#83 >= 64.00)) AND (i_current_price#83 <= 74.00)) AND (i_current_price#83 >= 65.00)) AND (i_current_price#83 <= 79.00)) AND isnotnull(i_item_sk#82)) (99) Project [codegen id : 19] Output [2]: [i_item_sk#82, i_product_name#85] @@ -635,7 +635,7 @@ Results [19]: [i_product_name#85, i_item_sk#82, s_store_name#41, s_zip#42, ca_st (104) Exchange Input [19]: [i_product_name#85, i_item_sk#82, s_store_name#41, s_zip#42, ca_street_number#69, ca_street_name#70, ca_city#71, ca_zip#72, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78, d_year#38, d_year#52, d_year#55, count#91, sum#92, sum#93, sum#94] -Arguments: hashpartitioning(i_product_name#85, i_item_sk#82, s_store_name#41, s_zip#42, ca_street_number#69, ca_street_name#70, ca_city#71, ca_zip#72, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78, d_year#38, d_year#52, d_year#55, 5), true, [id=#95] +Arguments: hashpartitioning(i_product_name#85, i_item_sk#82, s_store_name#41, s_zip#42, ca_street_number#69, ca_street_name#70, ca_city#71, ca_zip#72, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78, d_year#38, d_year#52, d_year#55, 5), ENSURE_REQUIREMENTS, [id=#95] (105) HashAggregate [codegen id : 42] Input [19]: [i_product_name#85, i_item_sk#82, s_store_name#41, s_zip#42, ca_street_number#69, ca_street_name#70, ca_city#71, ca_zip#72, ca_street_number#75, ca_street_name#76, ca_city#77, ca_zip#78, d_year#38, d_year#52, d_year#55, count#91, sum#92, sum#93, sum#94] @@ -886,7 +886,7 @@ Results [19]: [i_product_name#85, i_item_sk#82, s_store_name#41, s_zip#42, ca_st (164) Exchange Input [19]: [i_product_name#85, i_item_sk#82, s_store_name#41, s_zip#42, ca_street_number#69, ca_street_name#70, ca_city#71, ca_zip#72, ca_street_number#127, ca_street_name#128, ca_city#129, ca_zip#130, d_year#38, d_year#119, d_year#121, count#136, sum#137, sum#138, sum#139] -Arguments: hashpartitioning(i_product_name#85, i_item_sk#82, s_store_name#41, s_zip#42, ca_street_number#69, ca_street_name#70, ca_city#71, ca_zip#72, ca_street_number#127, ca_street_name#128, ca_city#129, ca_zip#130, d_year#38, d_year#119, d_year#121, 5), true, [id=#140] +Arguments: hashpartitioning(i_product_name#85, i_item_sk#82, s_store_name#41, s_zip#42, ca_street_number#69, ca_street_name#70, ca_city#71, ca_zip#72, ca_street_number#127, ca_street_name#128, ca_city#129, ca_zip#130, d_year#38, d_year#119, d_year#121, 5), ENSURE_REQUIREMENTS, [id=#140] (165) HashAggregate [codegen id : 41] Input [19]: [i_product_name#85, i_item_sk#82, s_store_name#41, s_zip#42, ca_street_number#69, ca_street_name#70, ca_city#71, ca_zip#72, ca_street_number#127, ca_street_name#128, ca_city#129, ca_zip#130, d_year#38, d_year#119, d_year#121, count#136, sum#137, sum#138, sum#139] @@ -910,7 +910,7 @@ Input [25]: [product_name#100, item_sk#101, store_name#102, store_zip#103, b_str (169) Exchange Input [21]: [product_name#100, store_name#102, store_zip#103, b_street_number#104, b_streen_name#105, b_city#106, b_zip#107, c_street_number#108, c_street_name#109, c_city#110, c_zip#111, syear#112, cnt#113, s1#114, s2#115, s3#116, s1#150, s2#151, s3#152, syear#148, cnt#149] -Arguments: rangepartitioning(product_name#100 ASC NULLS FIRST, store_name#102 ASC NULLS FIRST, cnt#149 ASC NULLS FIRST, s1#114 ASC NULLS FIRST, s1#150 ASC NULLS FIRST, 5), true, [id=#154] +Arguments: rangepartitioning(product_name#100 ASC NULLS FIRST, store_name#102 ASC NULLS FIRST, cnt#149 ASC NULLS FIRST, s1#114 ASC NULLS FIRST, s1#150 ASC NULLS FIRST, 5), ENSURE_REQUIREMENTS, [id=#154] (170) Sort [codegen id : 43] Input [21]: [product_name#100, store_name#102, store_zip#103, b_street_number#104, b_streen_name#105, b_city#106, b_zip#107, c_street_number#108, c_street_name#109, c_city#110, c_zip#111, syear#112, cnt#113, s1#114, s2#115, s3#116, s1#150, s2#151, s3#152, syear#148, cnt#149] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q67a.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q67a.sf100/explain.txt index 3d0d49fff876a..b3d08a0db2e1e 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q67a.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q67a.sf100/explain.txt @@ -149,7 +149,7 @@ Input [9]: [ss_item_sk#2, ss_store_sk#3, ss_quantity#4, ss_sales_price#5, d_year (17) Exchange Input [7]: [ss_item_sk#2, ss_quantity#4, ss_sales_price#5, d_year#8, d_moy#9, d_qoy#10, s_store_id#13] -Arguments: hashpartitioning(ss_item_sk#2, 5), true, [id=#15] +Arguments: hashpartitioning(ss_item_sk#2, 5), ENSURE_REQUIREMENTS, [id=#15] (18) Sort [codegen id : 4] Input [7]: [ss_item_sk#2, ss_quantity#4, ss_sales_price#5, d_year#8, d_moy#9, d_qoy#10, s_store_id#13] @@ -171,7 +171,7 @@ Condition : isnotnull(i_item_sk#16) (22) Exchange Input [5]: [i_item_sk#16, i_brand#17, i_class#18, i_category#19, i_product_name#20] -Arguments: hashpartitioning(i_item_sk#16, 5), true, [id=#21] +Arguments: hashpartitioning(i_item_sk#16, 5), ENSURE_REQUIREMENTS, [id=#21] (23) Sort [codegen id : 6] Input [5]: [i_item_sk#16, i_brand#17, i_class#18, i_category#19, i_product_name#20] @@ -195,7 +195,7 @@ Results [10]: [i_category#19, i_class#18, i_brand#17, i_product_name#20, d_year# (27) Exchange Input [10]: [i_category#19, i_class#18, i_brand#17, i_product_name#20, d_year#8, d_qoy#10, d_moy#9, s_store_id#13, sum#24, isEmpty#25] -Arguments: hashpartitioning(i_category#19, i_class#18, i_brand#17, i_product_name#20, d_year#8, d_qoy#10, d_moy#9, s_store_id#13, 5), true, [id=#26] +Arguments: hashpartitioning(i_category#19, i_class#18, i_brand#17, i_product_name#20, d_year#8, d_qoy#10, d_moy#9, s_store_id#13, 5), ENSURE_REQUIREMENTS, [id=#26] (28) HashAggregate [codegen id : 8] Input [10]: [i_category#19, i_class#18, i_brand#17, i_product_name#20, d_year#8, d_qoy#10, d_moy#9, s_store_id#13, sum#24, isEmpty#25] @@ -223,7 +223,7 @@ Results [9]: [i_category#19, i_class#18, i_brand#17, i_product_name#20, d_year#8 (32) Exchange Input [9]: [i_category#19, i_class#18, i_brand#17, i_product_name#20, d_year#8, d_qoy#10, d_moy#9, sum#35, isEmpty#36] -Arguments: hashpartitioning(i_category#19, i_class#18, i_brand#17, i_product_name#20, d_year#8, d_qoy#10, d_moy#9, 5), true, [id=#37] +Arguments: hashpartitioning(i_category#19, i_class#18, i_brand#17, i_product_name#20, d_year#8, d_qoy#10, d_moy#9, 5), ENSURE_REQUIREMENTS, [id=#37] (33) HashAggregate [codegen id : 17] Input [9]: [i_category#19, i_class#18, i_brand#17, i_product_name#20, d_year#8, d_qoy#10, d_moy#9, sum#35, isEmpty#36] @@ -251,7 +251,7 @@ Results [8]: [i_category#19, i_class#18, i_brand#17, i_product_name#20, d_year#8 (37) Exchange Input [8]: [i_category#19, i_class#18, i_brand#17, i_product_name#20, d_year#8, d_qoy#10, sum#46, isEmpty#47] -Arguments: hashpartitioning(i_category#19, i_class#18, i_brand#17, i_product_name#20, d_year#8, d_qoy#10, 5), true, [id=#48] +Arguments: hashpartitioning(i_category#19, i_class#18, i_brand#17, i_product_name#20, d_year#8, d_qoy#10, 5), ENSURE_REQUIREMENTS, [id=#48] (38) HashAggregate [codegen id : 26] Input [8]: [i_category#19, i_class#18, i_brand#17, i_product_name#20, d_year#8, d_qoy#10, sum#46, isEmpty#47] @@ -279,7 +279,7 @@ Results [7]: [i_category#19, i_class#18, i_brand#17, i_product_name#20, d_year#8 (42) Exchange Input [7]: [i_category#19, i_class#18, i_brand#17, i_product_name#20, d_year#8, sum#58, isEmpty#59] -Arguments: hashpartitioning(i_category#19, i_class#18, i_brand#17, i_product_name#20, d_year#8, 5), true, [id=#60] +Arguments: hashpartitioning(i_category#19, i_class#18, i_brand#17, i_product_name#20, d_year#8, 5), ENSURE_REQUIREMENTS, [id=#60] (43) HashAggregate [codegen id : 35] Input [7]: [i_category#19, i_class#18, i_brand#17, i_product_name#20, d_year#8, sum#58, isEmpty#59] @@ -307,7 +307,7 @@ Results [6]: [i_category#19, i_class#18, i_brand#17, i_product_name#20, sum#71, (47) Exchange Input [6]: [i_category#19, i_class#18, i_brand#17, i_product_name#20, sum#71, isEmpty#72] -Arguments: hashpartitioning(i_category#19, i_class#18, i_brand#17, i_product_name#20, 5), true, [id=#73] +Arguments: hashpartitioning(i_category#19, i_class#18, i_brand#17, i_product_name#20, 5), ENSURE_REQUIREMENTS, [id=#73] (48) HashAggregate [codegen id : 44] Input [6]: [i_category#19, i_class#18, i_brand#17, i_product_name#20, sum#71, isEmpty#72] @@ -335,7 +335,7 @@ Results [5]: [i_category#19, i_class#18, i_brand#17, sum#85, isEmpty#86] (52) Exchange Input [5]: [i_category#19, i_class#18, i_brand#17, sum#85, isEmpty#86] -Arguments: hashpartitioning(i_category#19, i_class#18, i_brand#17, 5), true, [id=#87] +Arguments: hashpartitioning(i_category#19, i_class#18, i_brand#17, 5), ENSURE_REQUIREMENTS, [id=#87] (53) HashAggregate [codegen id : 53] Input [5]: [i_category#19, i_class#18, i_brand#17, sum#85, isEmpty#86] @@ -363,7 +363,7 @@ Results [4]: [i_category#19, i_class#18, sum#100, isEmpty#101] (57) Exchange Input [4]: [i_category#19, i_class#18, sum#100, isEmpty#101] -Arguments: hashpartitioning(i_category#19, i_class#18, 5), true, [id=#102] +Arguments: hashpartitioning(i_category#19, i_class#18, 5), ENSURE_REQUIREMENTS, [id=#102] (58) HashAggregate [codegen id : 62] Input [4]: [i_category#19, i_class#18, sum#100, isEmpty#101] @@ -391,7 +391,7 @@ Results [3]: [i_category#19, sum#116, isEmpty#117] (62) Exchange Input [3]: [i_category#19, sum#116, isEmpty#117] -Arguments: hashpartitioning(i_category#19, 5), true, [id=#118] +Arguments: hashpartitioning(i_category#19, 5), ENSURE_REQUIREMENTS, [id=#118] (63) HashAggregate [codegen id : 71] Input [3]: [i_category#19, sum#116, isEmpty#117] @@ -419,7 +419,7 @@ Results [2]: [sum#133, isEmpty#134] (67) Exchange Input [2]: [sum#133, isEmpty#134] -Arguments: SinglePartition, true, [id=#135] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#135] (68) HashAggregate [codegen id : 80] Input [2]: [sum#133, isEmpty#134] @@ -432,7 +432,7 @@ Results [9]: [null AS i_category#137, null AS i_class#138, null AS i_brand#139, (70) Exchange Input [9]: [i_category#19, i_class#18, i_brand#17, i_product_name#20, d_year#8, d_qoy#10, d_moy#9, s_store_id#13, sumsales#28] -Arguments: hashpartitioning(i_category#19, 5), true, [id=#146] +Arguments: hashpartitioning(i_category#19, 5), ENSURE_REQUIREMENTS, [id=#146] (71) Sort [codegen id : 81] Input [9]: [i_category#19, i_class#18, i_brand#17, i_product_name#20, d_year#8, d_qoy#10, d_moy#9, s_store_id#13, sumsales#28] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q67a/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q67a/explain.txt index 38a768bd3dec0..989627c98db59 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q67a/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q67a/explain.txt @@ -180,7 +180,7 @@ Results [10]: [i_category#18, i_class#17, i_brand#16, i_product_name#19, d_year# (24) Exchange Input [10]: [i_category#18, i_class#17, i_brand#16, i_product_name#19, d_year#8, d_qoy#10, d_moy#9, s_store_id#13, sum#23, isEmpty#24] -Arguments: hashpartitioning(i_category#18, i_class#17, i_brand#16, i_product_name#19, d_year#8, d_qoy#10, d_moy#9, s_store_id#13, 5), true, [id=#25] +Arguments: hashpartitioning(i_category#18, i_class#17, i_brand#16, i_product_name#19, d_year#8, d_qoy#10, d_moy#9, s_store_id#13, 5), ENSURE_REQUIREMENTS, [id=#25] (25) HashAggregate [codegen id : 5] Input [10]: [i_category#18, i_class#17, i_brand#16, i_product_name#19, d_year#8, d_qoy#10, d_moy#9, s_store_id#13, sum#23, isEmpty#24] @@ -208,7 +208,7 @@ Results [9]: [i_category#18, i_class#17, i_brand#16, i_product_name#19, d_year#8 (29) Exchange Input [9]: [i_category#18, i_class#17, i_brand#16, i_product_name#19, d_year#8, d_qoy#10, d_moy#9, sum#34, isEmpty#35] -Arguments: hashpartitioning(i_category#18, i_class#17, i_brand#16, i_product_name#19, d_year#8, d_qoy#10, d_moy#9, 5), true, [id=#36] +Arguments: hashpartitioning(i_category#18, i_class#17, i_brand#16, i_product_name#19, d_year#8, d_qoy#10, d_moy#9, 5), ENSURE_REQUIREMENTS, [id=#36] (30) HashAggregate [codegen id : 11] Input [9]: [i_category#18, i_class#17, i_brand#16, i_product_name#19, d_year#8, d_qoy#10, d_moy#9, sum#34, isEmpty#35] @@ -236,7 +236,7 @@ Results [8]: [i_category#18, i_class#17, i_brand#16, i_product_name#19, d_year#8 (34) Exchange Input [8]: [i_category#18, i_class#17, i_brand#16, i_product_name#19, d_year#8, d_qoy#10, sum#45, isEmpty#46] -Arguments: hashpartitioning(i_category#18, i_class#17, i_brand#16, i_product_name#19, d_year#8, d_qoy#10, 5), true, [id=#47] +Arguments: hashpartitioning(i_category#18, i_class#17, i_brand#16, i_product_name#19, d_year#8, d_qoy#10, 5), ENSURE_REQUIREMENTS, [id=#47] (35) HashAggregate [codegen id : 17] Input [8]: [i_category#18, i_class#17, i_brand#16, i_product_name#19, d_year#8, d_qoy#10, sum#45, isEmpty#46] @@ -264,7 +264,7 @@ Results [7]: [i_category#18, i_class#17, i_brand#16, i_product_name#19, d_year#8 (39) Exchange Input [7]: [i_category#18, i_class#17, i_brand#16, i_product_name#19, d_year#8, sum#57, isEmpty#58] -Arguments: hashpartitioning(i_category#18, i_class#17, i_brand#16, i_product_name#19, d_year#8, 5), true, [id=#59] +Arguments: hashpartitioning(i_category#18, i_class#17, i_brand#16, i_product_name#19, d_year#8, 5), ENSURE_REQUIREMENTS, [id=#59] (40) HashAggregate [codegen id : 23] Input [7]: [i_category#18, i_class#17, i_brand#16, i_product_name#19, d_year#8, sum#57, isEmpty#58] @@ -292,7 +292,7 @@ Results [6]: [i_category#18, i_class#17, i_brand#16, i_product_name#19, sum#70, (44) Exchange Input [6]: [i_category#18, i_class#17, i_brand#16, i_product_name#19, sum#70, isEmpty#71] -Arguments: hashpartitioning(i_category#18, i_class#17, i_brand#16, i_product_name#19, 5), true, [id=#72] +Arguments: hashpartitioning(i_category#18, i_class#17, i_brand#16, i_product_name#19, 5), ENSURE_REQUIREMENTS, [id=#72] (45) HashAggregate [codegen id : 29] Input [6]: [i_category#18, i_class#17, i_brand#16, i_product_name#19, sum#70, isEmpty#71] @@ -320,7 +320,7 @@ Results [5]: [i_category#18, i_class#17, i_brand#16, sum#84, isEmpty#85] (49) Exchange Input [5]: [i_category#18, i_class#17, i_brand#16, sum#84, isEmpty#85] -Arguments: hashpartitioning(i_category#18, i_class#17, i_brand#16, 5), true, [id=#86] +Arguments: hashpartitioning(i_category#18, i_class#17, i_brand#16, 5), ENSURE_REQUIREMENTS, [id=#86] (50) HashAggregate [codegen id : 35] Input [5]: [i_category#18, i_class#17, i_brand#16, sum#84, isEmpty#85] @@ -348,7 +348,7 @@ Results [4]: [i_category#18, i_class#17, sum#99, isEmpty#100] (54) Exchange Input [4]: [i_category#18, i_class#17, sum#99, isEmpty#100] -Arguments: hashpartitioning(i_category#18, i_class#17, 5), true, [id=#101] +Arguments: hashpartitioning(i_category#18, i_class#17, 5), ENSURE_REQUIREMENTS, [id=#101] (55) HashAggregate [codegen id : 41] Input [4]: [i_category#18, i_class#17, sum#99, isEmpty#100] @@ -376,7 +376,7 @@ Results [3]: [i_category#18, sum#115, isEmpty#116] (59) Exchange Input [3]: [i_category#18, sum#115, isEmpty#116] -Arguments: hashpartitioning(i_category#18, 5), true, [id=#117] +Arguments: hashpartitioning(i_category#18, 5), ENSURE_REQUIREMENTS, [id=#117] (60) HashAggregate [codegen id : 47] Input [3]: [i_category#18, sum#115, isEmpty#116] @@ -404,7 +404,7 @@ Results [2]: [sum#132, isEmpty#133] (64) Exchange Input [2]: [sum#132, isEmpty#133] -Arguments: SinglePartition, true, [id=#134] +Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#134] (65) HashAggregate [codegen id : 53] Input [2]: [sum#132, isEmpty#133] @@ -417,7 +417,7 @@ Results [9]: [null AS i_category#136, null AS i_class#137, null AS i_brand#138, (67) Exchange Input [9]: [i_category#18, i_class#17, i_brand#16, i_product_name#19, d_year#8, d_qoy#10, d_moy#9, s_store_id#13, sumsales#27] -Arguments: hashpartitioning(i_category#18, 5), true, [id=#145] +Arguments: hashpartitioning(i_category#18, 5), ENSURE_REQUIREMENTS, [id=#145] (68) Sort [codegen id : 54] Input [9]: [i_category#18, i_class#17, i_brand#16, i_product_name#19, d_year#8, d_qoy#10, d_moy#9, s_store_id#13, sumsales#27] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q74.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q74.sf100/explain.txt index 2d4b595efeff6..5f5c28b0b4ba0 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q74.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q74.sf100/explain.txt @@ -130,7 +130,7 @@ Input [5]: [ss_sold_date_sk#1, ss_customer_sk#2, ss_net_paid#3, d_date_sk#4, d_y (10) Exchange Input [3]: [ss_customer_sk#2, ss_net_paid#3, d_year#5] -Arguments: hashpartitioning(ss_customer_sk#2, 5), true, [id=#7] +Arguments: hashpartitioning(ss_customer_sk#2, 5), ENSURE_REQUIREMENTS, [id=#7] (11) Sort [codegen id : 3] Input [3]: [ss_customer_sk#2, ss_net_paid#3, d_year#5] @@ -152,7 +152,7 @@ Condition : (isnotnull(c_customer_sk#8) AND isnotnull(c_customer_id#9)) (15) Exchange Input [4]: [c_customer_sk#8, c_customer_id#9, c_first_name#10, c_last_name#11] -Arguments: hashpartitioning(c_customer_sk#8, 5), true, [id=#12] +Arguments: hashpartitioning(c_customer_sk#8, 5), ENSURE_REQUIREMENTS, [id=#12] (16) Sort [codegen id : 5] Input [4]: [c_customer_sk#8, c_customer_id#9, c_first_name#10, c_last_name#11] @@ -176,7 +176,7 @@ Results [5]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, sum#14 (20) Exchange Input [5]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, sum#14] -Arguments: hashpartitioning(c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, 5), true, [id=#15] +Arguments: hashpartitioning(c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, 5), ENSURE_REQUIREMENTS, [id=#15] (21) HashAggregate [codegen id : 7] Input [5]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, sum#14] @@ -191,7 +191,7 @@ Condition : (isnotnull(year_total#18) AND (year_total#18 > 0.00)) (23) Exchange Input [2]: [customer_id#17, year_total#18] -Arguments: hashpartitioning(customer_id#17, 5), true, [id=#19] +Arguments: hashpartitioning(customer_id#17, 5), ENSURE_REQUIREMENTS, [id=#19] (24) Sort [codegen id : 8] Input [2]: [customer_id#17, year_total#18] @@ -240,7 +240,7 @@ Input [5]: [ss_sold_date_sk#1, ss_customer_sk#2, ss_net_paid#3, d_date_sk#4, d_y (34) Exchange Input [3]: [ss_customer_sk#2, ss_net_paid#3, d_year#5] -Arguments: hashpartitioning(ss_customer_sk#2, 5), true, [id=#21] +Arguments: hashpartitioning(ss_customer_sk#2, 5), ENSURE_REQUIREMENTS, [id=#21] (35) Sort [codegen id : 11] Input [3]: [ss_customer_sk#2, ss_net_paid#3, d_year#5] @@ -271,7 +271,7 @@ Results [5]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, sum#23 (41) Exchange Input [5]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, sum#23] -Arguments: hashpartitioning(c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, 5), true, [id=#24] +Arguments: hashpartitioning(c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, 5), ENSURE_REQUIREMENTS, [id=#24] (42) HashAggregate [codegen id : 15] Input [5]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, sum#23] @@ -282,7 +282,7 @@ Results [4]: [c_customer_id#9 AS customer_id#26, c_first_name#10 AS customer_fir (43) Exchange Input [4]: [customer_id#26, customer_first_name#27, customer_last_name#28, year_total#29] -Arguments: hashpartitioning(customer_id#26, 5), true, [id=#30] +Arguments: hashpartitioning(customer_id#26, 5), ENSURE_REQUIREMENTS, [id=#30] (44) Sort [codegen id : 16] Input [4]: [customer_id#26, customer_first_name#27, customer_last_name#28, year_total#29] @@ -321,7 +321,7 @@ Input [5]: [ws_sold_date_sk#31, ws_bill_customer_sk#32, ws_net_paid#33, d_date_s (52) Exchange Input [3]: [ws_bill_customer_sk#32, ws_net_paid#33, d_year#5] -Arguments: hashpartitioning(ws_bill_customer_sk#32, 5), true, [id=#34] +Arguments: hashpartitioning(ws_bill_customer_sk#32, 5), ENSURE_REQUIREMENTS, [id=#34] (53) Sort [codegen id : 20] Input [3]: [ws_bill_customer_sk#32, ws_net_paid#33, d_year#5] @@ -352,7 +352,7 @@ Results [5]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, sum#36 (59) Exchange Input [5]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, sum#36] -Arguments: hashpartitioning(c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, 5), true, [id=#37] +Arguments: hashpartitioning(c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, 5), ENSURE_REQUIREMENTS, [id=#37] (60) HashAggregate [codegen id : 24] Input [5]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, sum#36] @@ -371,7 +371,7 @@ Input [2]: [customer_id#39, year_total#40] (63) Exchange Input [2]: [customer_id#41, year_total#42] -Arguments: hashpartitioning(customer_id#41, 5), true, [id=#43] +Arguments: hashpartitioning(customer_id#41, 5), ENSURE_REQUIREMENTS, [id=#43] (64) Sort [codegen id : 25] Input [2]: [customer_id#41, year_total#42] @@ -414,7 +414,7 @@ Input [5]: [ws_sold_date_sk#31, ws_bill_customer_sk#32, ws_net_paid#33, d_date_s (73) Exchange Input [3]: [ws_bill_customer_sk#32, ws_net_paid#33, d_year#5] -Arguments: hashpartitioning(ws_bill_customer_sk#32, 5), true, [id=#44] +Arguments: hashpartitioning(ws_bill_customer_sk#32, 5), ENSURE_REQUIREMENTS, [id=#44] (74) Sort [codegen id : 29] Input [3]: [ws_bill_customer_sk#32, ws_net_paid#33, d_year#5] @@ -445,7 +445,7 @@ Results [5]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, sum#46 (80) Exchange Input [5]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, sum#46] -Arguments: hashpartitioning(c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, 5), true, [id=#47] +Arguments: hashpartitioning(c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, 5), ENSURE_REQUIREMENTS, [id=#47] (81) HashAggregate [codegen id : 33] Input [5]: [c_customer_id#9, c_first_name#10, c_last_name#11, d_year#5, sum#46] @@ -456,7 +456,7 @@ Results [2]: [c_customer_id#9 AS customer_id#49, MakeDecimal(sum(UnscaledValue(w (82) Exchange Input [2]: [customer_id#49, year_total#50] -Arguments: hashpartitioning(customer_id#49, 5), true, [id=#51] +Arguments: hashpartitioning(customer_id#49, 5), ENSURE_REQUIREMENTS, [id=#51] (83) Sort [codegen id : 34] Input [2]: [customer_id#49, year_total#50] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q74/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q74/explain.txt index f58fb1343a186..832851846d12f 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q74/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q74/explain.txt @@ -150,7 +150,7 @@ Results [5]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, sum#13] (17) Exchange Input [5]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, sum#13] -Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, 5), true, [id=#14] +Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, 5), ENSURE_REQUIREMENTS, [id=#14] (18) HashAggregate [codegen id : 16] Input [5]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, sum#13] @@ -225,7 +225,7 @@ Results [5]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, sum#20] (33) Exchange Input [5]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, sum#20] -Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, 5), true, [id=#21] +Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, 5), ENSURE_REQUIREMENTS, [id=#21] (34) HashAggregate [codegen id : 7] Input [5]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, sum#20] @@ -305,7 +305,7 @@ Results [5]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, sum#33] (50) Exchange Input [5]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, sum#33] -Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, 5), true, [id=#34] +Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, 5), ENSURE_REQUIREMENTS, [id=#34] (51) HashAggregate [codegen id : 11] Input [5]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, sum#33] @@ -382,7 +382,7 @@ Results [5]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, sum#42] (67) Exchange Input [5]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, sum#42] -Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, 5), true, [id=#43] +Arguments: hashpartitioning(c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, 5), ENSURE_REQUIREMENTS, [id=#43] (68) HashAggregate [codegen id : 15] Input [5]: [c_customer_id#2, c_first_name#3, c_last_name#4, d_year#10, sum#42] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q75.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q75.sf100/explain.txt index ce1206c0ba906..e174d9e7f3fe4 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q75.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q75.sf100/explain.txt @@ -419,7 +419,7 @@ Results [7]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact (66) HashAggregate [codegen id : 23] Input [7]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11, sales_cnt#22, sales_amt#23] Keys [5]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11] -Functions [2]: [partial_sum(cast(sales_cnt#22 as bigint)), partial_sum(UnscaledValue(sales_amt#23))] +Functions [2]: [partial_sum(sales_cnt#22), partial_sum(UnscaledValue(sales_amt#23))] Aggregate Attributes [2]: [sum#51, sum#52] Results [7]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11, sum#53, sum#54] @@ -430,9 +430,9 @@ Arguments: hashpartitioning(d_year#14, i_brand_id#7, i_class_id#8, i_category_id (68) HashAggregate [codegen id : 24] Input [7]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11, sum#53, sum#54] Keys [5]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11] -Functions [2]: [sum(cast(sales_cnt#22 as bigint)), sum(UnscaledValue(sales_amt#23))] -Aggregate Attributes [2]: [sum(cast(sales_cnt#22 as bigint))#56, sum(UnscaledValue(sales_amt#23))#57] -Results [7]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11, sum(cast(sales_cnt#22 as bigint))#56 AS sales_cnt#58, MakeDecimal(sum(UnscaledValue(sales_amt#23))#57,18,2) AS sales_amt#59] +Functions [2]: [sum(sales_cnt#22), sum(UnscaledValue(sales_amt#23))] +Aggregate Attributes [2]: [sum(sales_cnt#22)#56, sum(UnscaledValue(sales_amt#23))#57] +Results [7]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11, sum(sales_cnt#22)#56 AS sales_cnt#58, MakeDecimal(sum(UnscaledValue(sales_amt#23))#57,18,2) AS sales_amt#59] (69) Exchange Input [7]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11, sales_cnt#58, sales_amt#59] @@ -666,7 +666,7 @@ Results [7]: [d_year#67, i_brand_id#62, i_class_id#63, i_category_id#64, i_manuf (123) HashAggregate [codegen id : 48] Input [7]: [d_year#67, i_brand_id#62, i_class_id#63, i_category_id#64, i_manufact_id#65, sales_cnt#22, sales_amt#23] Keys [5]: [d_year#67, i_brand_id#62, i_class_id#63, i_category_id#64, i_manufact_id#65] -Functions [2]: [partial_sum(cast(sales_cnt#22 as bigint)), partial_sum(UnscaledValue(sales_amt#23))] +Functions [2]: [partial_sum(sales_cnt#22), partial_sum(UnscaledValue(sales_amt#23))] Aggregate Attributes [2]: [sum#77, sum#78] Results [7]: [d_year#67, i_brand_id#62, i_class_id#63, i_category_id#64, i_manufact_id#65, sum#79, sum#80] @@ -677,9 +677,9 @@ Arguments: hashpartitioning(d_year#67, i_brand_id#62, i_class_id#63, i_category_ (125) HashAggregate [codegen id : 49] Input [7]: [d_year#67, i_brand_id#62, i_class_id#63, i_category_id#64, i_manufact_id#65, sum#79, sum#80] Keys [5]: [d_year#67, i_brand_id#62, i_class_id#63, i_category_id#64, i_manufact_id#65] -Functions [2]: [sum(cast(sales_cnt#22 as bigint)), sum(UnscaledValue(sales_amt#23))] -Aggregate Attributes [2]: [sum(cast(sales_cnt#22 as bigint))#82, sum(UnscaledValue(sales_amt#23))#83] -Results [7]: [d_year#67, i_brand_id#62, i_class_id#63, i_category_id#64, i_manufact_id#65, sum(cast(sales_cnt#22 as bigint))#82 AS sales_cnt#84, MakeDecimal(sum(UnscaledValue(sales_amt#23))#83,18,2) AS sales_amt#85] +Functions [2]: [sum(sales_cnt#22), sum(UnscaledValue(sales_amt#23))] +Aggregate Attributes [2]: [sum(sales_cnt#22)#82, sum(UnscaledValue(sales_amt#23))#83] +Results [7]: [d_year#67, i_brand_id#62, i_class_id#63, i_category_id#64, i_manufact_id#65, sum(sales_cnt#22)#82 AS sales_cnt#84, MakeDecimal(sum(UnscaledValue(sales_amt#23))#83,18,2) AS sales_amt#85] (126) Exchange Input [7]: [d_year#67, i_brand_id#62, i_class_id#63, i_category_id#64, i_manufact_id#65, sales_cnt#84, sales_amt#85] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q75.sf100/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q75.sf100/simplified.txt index b44ed2a7a3894..74345203c935c 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q75.sf100/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q75.sf100/simplified.txt @@ -8,7 +8,7 @@ TakeOrderedAndProject [sales_cnt_diff,sales_amt_diff,prev_year,year,i_brand_id,i InputAdapter Exchange [i_brand_id,i_class_id,i_category_id,i_manufact_id] #1 WholeStageCodegen (24) - HashAggregate [d_year,i_brand_id,i_class_id,i_category_id,i_manufact_id,sum,sum] [sum(cast(sales_cnt as bigint)),sum(UnscaledValue(sales_amt)),sales_cnt,sales_amt,sum,sum] + HashAggregate [d_year,i_brand_id,i_class_id,i_category_id,i_manufact_id,sum,sum] [sum(sales_cnt),sum(UnscaledValue(sales_amt)),sales_cnt,sales_amt,sum,sum] InputAdapter Exchange [d_year,i_brand_id,i_class_id,i_category_id,i_manufact_id] #2 WholeStageCodegen (23) @@ -127,7 +127,7 @@ TakeOrderedAndProject [sales_cnt_diff,sales_amt_diff,prev_year,year,i_brand_id,i InputAdapter Exchange [i_brand_id,i_class_id,i_category_id,i_manufact_id] #12 WholeStageCodegen (49) - HashAggregate [d_year,i_brand_id,i_class_id,i_category_id,i_manufact_id,sum,sum] [sum(cast(sales_cnt as bigint)),sum(UnscaledValue(sales_amt)),sales_cnt,sales_amt,sum,sum] + HashAggregate [d_year,i_brand_id,i_class_id,i_category_id,i_manufact_id,sum,sum] [sum(sales_cnt),sum(UnscaledValue(sales_amt)),sales_cnt,sales_amt,sum,sum] InputAdapter Exchange [d_year,i_brand_id,i_class_id,i_category_id,i_manufact_id] #13 WholeStageCodegen (48) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q75/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q75/explain.txt index ae7442399ebd4..9485d57bd2e74 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q75/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q75/explain.txt @@ -362,7 +362,7 @@ Results [7]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact (57) HashAggregate [codegen id : 14] Input [7]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11, sales_cnt#21, sales_amt#22] Keys [5]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11] -Functions [2]: [partial_sum(cast(sales_cnt#21 as bigint)), partial_sum(UnscaledValue(sales_amt#22))] +Functions [2]: [partial_sum(sales_cnt#21), partial_sum(UnscaledValue(sales_amt#22))] Aggregate Attributes [2]: [sum#48, sum#49] Results [7]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11, sum#50, sum#51] @@ -373,9 +373,9 @@ Arguments: hashpartitioning(d_year#14, i_brand_id#7, i_class_id#8, i_category_id (59) HashAggregate [codegen id : 30] Input [7]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11, sum#50, sum#51] Keys [5]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11] -Functions [2]: [sum(cast(sales_cnt#21 as bigint)), sum(UnscaledValue(sales_amt#22))] -Aggregate Attributes [2]: [sum(cast(sales_cnt#21 as bigint))#53, sum(UnscaledValue(sales_amt#22))#54] -Results [7]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11, sum(cast(sales_cnt#21 as bigint))#53 AS sales_cnt#55, MakeDecimal(sum(UnscaledValue(sales_amt#22))#54,18,2) AS sales_amt#56] +Functions [2]: [sum(sales_cnt#21), sum(UnscaledValue(sales_amt#22))] +Aggregate Attributes [2]: [sum(sales_cnt#21)#53, sum(UnscaledValue(sales_amt#22))#54] +Results [7]: [d_year#14, i_brand_id#7, i_class_id#8, i_category_id#9, i_manufact_id#11, sum(sales_cnt#21)#53 AS sales_cnt#55, MakeDecimal(sum(UnscaledValue(sales_amt#22))#54,18,2) AS sales_amt#56] (60) Scan parquet default.catalog_sales Output [5]: [cs_sold_date_sk#1, cs_item_sk#2, cs_order_number#3, cs_quantity#4, cs_ext_sales_price#5] @@ -565,7 +565,7 @@ Results [7]: [d_year#63, i_brand_id#58, i_class_id#59, i_category_id#60, i_manuf (103) HashAggregate [codegen id : 28] Input [7]: [d_year#63, i_brand_id#58, i_class_id#59, i_category_id#60, i_manufact_id#61, sales_cnt#21, sales_amt#22] Keys [5]: [d_year#63, i_brand_id#58, i_class_id#59, i_category_id#60, i_manufact_id#61] -Functions [2]: [partial_sum(cast(sales_cnt#21 as bigint)), partial_sum(UnscaledValue(sales_amt#22))] +Functions [2]: [partial_sum(sales_cnt#21), partial_sum(UnscaledValue(sales_amt#22))] Aggregate Attributes [2]: [sum#70, sum#71] Results [7]: [d_year#63, i_brand_id#58, i_class_id#59, i_category_id#60, i_manufact_id#61, sum#72, sum#73] @@ -576,9 +576,9 @@ Arguments: hashpartitioning(d_year#63, i_brand_id#58, i_class_id#59, i_category_ (105) HashAggregate [codegen id : 29] Input [7]: [d_year#63, i_brand_id#58, i_class_id#59, i_category_id#60, i_manufact_id#61, sum#72, sum#73] Keys [5]: [d_year#63, i_brand_id#58, i_class_id#59, i_category_id#60, i_manufact_id#61] -Functions [2]: [sum(cast(sales_cnt#21 as bigint)), sum(UnscaledValue(sales_amt#22))] -Aggregate Attributes [2]: [sum(cast(sales_cnt#21 as bigint))#75, sum(UnscaledValue(sales_amt#22))#76] -Results [7]: [d_year#63, i_brand_id#58, i_class_id#59, i_category_id#60, i_manufact_id#61, sum(cast(sales_cnt#21 as bigint))#75 AS sales_cnt#77, MakeDecimal(sum(UnscaledValue(sales_amt#22))#76,18,2) AS sales_amt#78] +Functions [2]: [sum(sales_cnt#21), sum(UnscaledValue(sales_amt#22))] +Aggregate Attributes [2]: [sum(sales_cnt#21)#75, sum(UnscaledValue(sales_amt#22))#76] +Results [7]: [d_year#63, i_brand_id#58, i_class_id#59, i_category_id#60, i_manufact_id#61, sum(sales_cnt#21)#75 AS sales_cnt#77, MakeDecimal(sum(UnscaledValue(sales_amt#22))#76,18,2) AS sales_amt#78] (106) BroadcastExchange Input [7]: [d_year#63, i_brand_id#58, i_class_id#59, i_category_id#60, i_manufact_id#61, sales_cnt#77, sales_amt#78] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q75/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q75/simplified.txt index 068187c44771a..ec60d29d97995 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q75/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q75/simplified.txt @@ -2,7 +2,7 @@ TakeOrderedAndProject [sales_cnt_diff,sales_amt_diff,prev_year,year,i_brand_id,i WholeStageCodegen (30) Project [d_year,d_year,i_brand_id,i_class_id,i_category_id,i_manufact_id,sales_cnt,sales_cnt,sales_amt,sales_amt] BroadcastHashJoin [i_brand_id,i_class_id,i_category_id,i_manufact_id,i_brand_id,i_class_id,i_category_id,i_manufact_id,sales_cnt,sales_cnt] - HashAggregate [d_year,i_brand_id,i_class_id,i_category_id,i_manufact_id,sum,sum] [sum(cast(sales_cnt as bigint)),sum(UnscaledValue(sales_amt)),sales_cnt,sales_amt,sum,sum] + HashAggregate [d_year,i_brand_id,i_class_id,i_category_id,i_manufact_id,sum,sum] [sum(sales_cnt),sum(UnscaledValue(sales_amt)),sales_cnt,sales_amt,sum,sum] InputAdapter Exchange [d_year,i_brand_id,i_class_id,i_category_id,i_manufact_id] #1 WholeStageCodegen (14) @@ -94,7 +94,7 @@ TakeOrderedAndProject [sales_cnt_diff,sales_amt_diff,prev_year,year,i_brand_id,i InputAdapter BroadcastExchange #8 WholeStageCodegen (29) - HashAggregate [d_year,i_brand_id,i_class_id,i_category_id,i_manufact_id,sum,sum] [sum(cast(sales_cnt as bigint)),sum(UnscaledValue(sales_amt)),sales_cnt,sales_amt,sum,sum] + HashAggregate [d_year,i_brand_id,i_class_id,i_category_id,i_manufact_id,sum,sum] [sum(sales_cnt),sum(UnscaledValue(sales_amt)),sales_cnt,sales_amt,sum,sum] InputAdapter Exchange [d_year,i_brand_id,i_class_id,i_category_id,i_manufact_id] #9 WholeStageCodegen (28) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q78.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q78.sf100/explain.txt index fc9634469d6df..2ec3aea7c5969 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q78.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q78.sf100/explain.txt @@ -87,7 +87,7 @@ Condition : ((isnotnull(ss_sold_date_sk#1) AND isnotnull(ss_item_sk#2)) AND isno (4) Exchange Input [7]: [ss_sold_date_sk#1, ss_item_sk#2, ss_customer_sk#3, ss_ticket_number#4, ss_quantity#5, ss_wholesale_cost#6, ss_sales_price#7] -Arguments: hashpartitioning(cast(ss_ticket_number#4 as bigint), cast(ss_item_sk#2 as bigint), 5), true, [id=#8] +Arguments: hashpartitioning(cast(ss_ticket_number#4 as bigint), cast(ss_item_sk#2 as bigint), 5), ENSURE_REQUIREMENTS, [id=#8] (5) Sort [codegen id : 2] Input [7]: [ss_sold_date_sk#1, ss_item_sk#2, ss_customer_sk#3, ss_ticket_number#4, ss_quantity#5, ss_wholesale_cost#6, ss_sales_price#7] @@ -109,7 +109,7 @@ Condition : (isnotnull(sr_ticket_number#10) AND isnotnull(sr_item_sk#9)) (9) Exchange Input [2]: [sr_item_sk#9, sr_ticket_number#10] -Arguments: hashpartitioning(sr_ticket_number#10, sr_item_sk#9, 5), true, [id=#11] +Arguments: hashpartitioning(sr_ticket_number#10, sr_item_sk#9, 5), ENSURE_REQUIREMENTS, [id=#11] (10) Sort [codegen id : 4] Input [2]: [sr_item_sk#9, sr_ticket_number#10] @@ -158,20 +158,20 @@ Input [8]: [ss_sold_date_sk#1, ss_item_sk#2, ss_customer_sk#3, ss_quantity#5, ss (20) HashAggregate [codegen id : 6] Input [6]: [ss_item_sk#2, ss_customer_sk#3, ss_quantity#5, ss_wholesale_cost#6, ss_sales_price#7, d_year#13] Keys [3]: [d_year#13, ss_item_sk#2, ss_customer_sk#3] -Functions [3]: [partial_sum(cast(ss_quantity#5 as bigint)), partial_sum(UnscaledValue(ss_wholesale_cost#6)), partial_sum(UnscaledValue(ss_sales_price#7))] +Functions [3]: [partial_sum(ss_quantity#5), partial_sum(UnscaledValue(ss_wholesale_cost#6)), partial_sum(UnscaledValue(ss_sales_price#7))] Aggregate Attributes [3]: [sum#15, sum#16, sum#17] Results [6]: [d_year#13, ss_item_sk#2, ss_customer_sk#3, sum#18, sum#19, sum#20] (21) Exchange Input [6]: [d_year#13, ss_item_sk#2, ss_customer_sk#3, sum#18, sum#19, sum#20] -Arguments: hashpartitioning(d_year#13, ss_item_sk#2, ss_customer_sk#3, 5), true, [id=#21] +Arguments: hashpartitioning(d_year#13, ss_item_sk#2, ss_customer_sk#3, 5), ENSURE_REQUIREMENTS, [id=#21] (22) HashAggregate [codegen id : 7] Input [6]: [d_year#13, ss_item_sk#2, ss_customer_sk#3, sum#18, sum#19, sum#20] Keys [3]: [d_year#13, ss_item_sk#2, ss_customer_sk#3] -Functions [3]: [sum(cast(ss_quantity#5 as bigint)), sum(UnscaledValue(ss_wholesale_cost#6)), sum(UnscaledValue(ss_sales_price#7))] -Aggregate Attributes [3]: [sum(cast(ss_quantity#5 as bigint))#22, sum(UnscaledValue(ss_wholesale_cost#6))#23, sum(UnscaledValue(ss_sales_price#7))#24] -Results [6]: [d_year#13 AS ss_sold_year#25, ss_item_sk#2, ss_customer_sk#3, sum(cast(ss_quantity#5 as bigint))#22 AS ss_qty#26, MakeDecimal(sum(UnscaledValue(ss_wholesale_cost#6))#23,17,2) AS ss_wc#27, MakeDecimal(sum(UnscaledValue(ss_sales_price#7))#24,17,2) AS ss_sp#28] +Functions [3]: [sum(ss_quantity#5), sum(UnscaledValue(ss_wholesale_cost#6)), sum(UnscaledValue(ss_sales_price#7))] +Aggregate Attributes [3]: [sum(ss_quantity#5)#22, sum(UnscaledValue(ss_wholesale_cost#6))#23, sum(UnscaledValue(ss_sales_price#7))#24] +Results [6]: [d_year#13 AS ss_sold_year#25, ss_item_sk#2, ss_customer_sk#3, sum(ss_quantity#5)#22 AS ss_qty#26, MakeDecimal(sum(UnscaledValue(ss_wholesale_cost#6))#23,17,2) AS ss_wc#27, MakeDecimal(sum(UnscaledValue(ss_sales_price#7))#24,17,2) AS ss_sp#28] (23) Sort [codegen id : 7] Input [6]: [ss_sold_year#25, ss_item_sk#2, ss_customer_sk#3, ss_qty#26, ss_wc#27, ss_sp#28] @@ -193,7 +193,7 @@ Condition : ((isnotnull(cs_sold_date_sk#29) AND isnotnull(cs_item_sk#31)) AND is (27) Exchange Input [7]: [cs_sold_date_sk#29, cs_bill_customer_sk#30, cs_item_sk#31, cs_order_number#32, cs_quantity#33, cs_wholesale_cost#34, cs_sales_price#35] -Arguments: hashpartitioning(cs_order_number#32, cs_item_sk#31, 5), true, [id=#36] +Arguments: hashpartitioning(cs_order_number#32, cs_item_sk#31, 5), ENSURE_REQUIREMENTS, [id=#36] (28) Sort [codegen id : 9] Input [7]: [cs_sold_date_sk#29, cs_bill_customer_sk#30, cs_item_sk#31, cs_order_number#32, cs_quantity#33, cs_wholesale_cost#34, cs_sales_price#35] @@ -215,7 +215,7 @@ Condition : (isnotnull(cr_order_number#38) AND isnotnull(cr_item_sk#37)) (32) Exchange Input [2]: [cr_item_sk#37, cr_order_number#38] -Arguments: hashpartitioning(cr_order_number#38, cr_item_sk#37, 5), true, [id=#39] +Arguments: hashpartitioning(cr_order_number#38, cr_item_sk#37, 5), ENSURE_REQUIREMENTS, [id=#39] (33) Sort [codegen id : 11] Input [2]: [cr_item_sk#37, cr_order_number#38] @@ -249,20 +249,20 @@ Input [8]: [cs_sold_date_sk#29, cs_bill_customer_sk#30, cs_item_sk#31, cs_quanti (40) HashAggregate [codegen id : 13] Input [6]: [cs_bill_customer_sk#30, cs_item_sk#31, cs_quantity#33, cs_wholesale_cost#34, cs_sales_price#35, d_year#13] Keys [3]: [d_year#13, cs_item_sk#31, cs_bill_customer_sk#30] -Functions [3]: [partial_sum(cast(cs_quantity#33 as bigint)), partial_sum(UnscaledValue(cs_wholesale_cost#34)), partial_sum(UnscaledValue(cs_sales_price#35))] +Functions [3]: [partial_sum(cs_quantity#33), partial_sum(UnscaledValue(cs_wholesale_cost#34)), partial_sum(UnscaledValue(cs_sales_price#35))] Aggregate Attributes [3]: [sum#40, sum#41, sum#42] Results [6]: [d_year#13, cs_item_sk#31, cs_bill_customer_sk#30, sum#43, sum#44, sum#45] (41) Exchange Input [6]: [d_year#13, cs_item_sk#31, cs_bill_customer_sk#30, sum#43, sum#44, sum#45] -Arguments: hashpartitioning(d_year#13, cs_item_sk#31, cs_bill_customer_sk#30, 5), true, [id=#46] +Arguments: hashpartitioning(d_year#13, cs_item_sk#31, cs_bill_customer_sk#30, 5), ENSURE_REQUIREMENTS, [id=#46] (42) HashAggregate [codegen id : 14] Input [6]: [d_year#13, cs_item_sk#31, cs_bill_customer_sk#30, sum#43, sum#44, sum#45] Keys [3]: [d_year#13, cs_item_sk#31, cs_bill_customer_sk#30] -Functions [3]: [sum(cast(cs_quantity#33 as bigint)), sum(UnscaledValue(cs_wholesale_cost#34)), sum(UnscaledValue(cs_sales_price#35))] -Aggregate Attributes [3]: [sum(cast(cs_quantity#33 as bigint))#47, sum(UnscaledValue(cs_wholesale_cost#34))#48, sum(UnscaledValue(cs_sales_price#35))#49] -Results [6]: [d_year#13 AS cs_sold_year#50, cs_item_sk#31, cs_bill_customer_sk#30 AS cs_customer_sk#51, sum(cast(cs_quantity#33 as bigint))#47 AS cs_qty#52, MakeDecimal(sum(UnscaledValue(cs_wholesale_cost#34))#48,17,2) AS cs_wc#53, MakeDecimal(sum(UnscaledValue(cs_sales_price#35))#49,17,2) AS cs_sp#54] +Functions [3]: [sum(cs_quantity#33), sum(UnscaledValue(cs_wholesale_cost#34)), sum(UnscaledValue(cs_sales_price#35))] +Aggregate Attributes [3]: [sum(cs_quantity#33)#47, sum(UnscaledValue(cs_wholesale_cost#34))#48, sum(UnscaledValue(cs_sales_price#35))#49] +Results [6]: [d_year#13 AS cs_sold_year#50, cs_item_sk#31, cs_bill_customer_sk#30 AS cs_customer_sk#51, sum(cs_quantity#33)#47 AS cs_qty#52, MakeDecimal(sum(UnscaledValue(cs_wholesale_cost#34))#48,17,2) AS cs_wc#53, MakeDecimal(sum(UnscaledValue(cs_sales_price#35))#49,17,2) AS cs_sp#54] (43) Filter [codegen id : 14] Input [6]: [cs_sold_year#50, cs_item_sk#31, cs_customer_sk#51, cs_qty#52, cs_wc#53, cs_sp#54] @@ -297,7 +297,7 @@ Condition : ((isnotnull(ws_sold_date_sk#55) AND isnotnull(ws_item_sk#56)) AND is (50) Exchange Input [7]: [ws_sold_date_sk#55, ws_item_sk#56, ws_bill_customer_sk#57, ws_order_number#58, ws_quantity#59, ws_wholesale_cost#60, ws_sales_price#61] -Arguments: hashpartitioning(cast(ws_order_number#58 as bigint), cast(ws_item_sk#56 as bigint), 5), true, [id=#62] +Arguments: hashpartitioning(cast(ws_order_number#58 as bigint), cast(ws_item_sk#56 as bigint), 5), ENSURE_REQUIREMENTS, [id=#62] (51) Sort [codegen id : 17] Input [7]: [ws_sold_date_sk#55, ws_item_sk#56, ws_bill_customer_sk#57, ws_order_number#58, ws_quantity#59, ws_wholesale_cost#60, ws_sales_price#61] @@ -319,7 +319,7 @@ Condition : (isnotnull(wr_order_number#64) AND isnotnull(wr_item_sk#63)) (55) Exchange Input [2]: [wr_item_sk#63, wr_order_number#64] -Arguments: hashpartitioning(wr_order_number#64, wr_item_sk#63, 5), true, [id=#65] +Arguments: hashpartitioning(wr_order_number#64, wr_item_sk#63, 5), ENSURE_REQUIREMENTS, [id=#65] (56) Sort [codegen id : 19] Input [2]: [wr_item_sk#63, wr_order_number#64] @@ -353,20 +353,20 @@ Input [8]: [ws_sold_date_sk#55, ws_item_sk#56, ws_bill_customer_sk#57, ws_quanti (63) HashAggregate [codegen id : 21] Input [6]: [ws_item_sk#56, ws_bill_customer_sk#57, ws_quantity#59, ws_wholesale_cost#60, ws_sales_price#61, d_year#13] Keys [3]: [d_year#13, ws_item_sk#56, ws_bill_customer_sk#57] -Functions [3]: [partial_sum(cast(ws_quantity#59 as bigint)), partial_sum(UnscaledValue(ws_wholesale_cost#60)), partial_sum(UnscaledValue(ws_sales_price#61))] +Functions [3]: [partial_sum(ws_quantity#59), partial_sum(UnscaledValue(ws_wholesale_cost#60)), partial_sum(UnscaledValue(ws_sales_price#61))] Aggregate Attributes [3]: [sum#66, sum#67, sum#68] Results [6]: [d_year#13, ws_item_sk#56, ws_bill_customer_sk#57, sum#69, sum#70, sum#71] (64) Exchange Input [6]: [d_year#13, ws_item_sk#56, ws_bill_customer_sk#57, sum#69, sum#70, sum#71] -Arguments: hashpartitioning(d_year#13, ws_item_sk#56, ws_bill_customer_sk#57, 5), true, [id=#72] +Arguments: hashpartitioning(d_year#13, ws_item_sk#56, ws_bill_customer_sk#57, 5), ENSURE_REQUIREMENTS, [id=#72] (65) HashAggregate [codegen id : 22] Input [6]: [d_year#13, ws_item_sk#56, ws_bill_customer_sk#57, sum#69, sum#70, sum#71] Keys [3]: [d_year#13, ws_item_sk#56, ws_bill_customer_sk#57] -Functions [3]: [sum(cast(ws_quantity#59 as bigint)), sum(UnscaledValue(ws_wholesale_cost#60)), sum(UnscaledValue(ws_sales_price#61))] -Aggregate Attributes [3]: [sum(cast(ws_quantity#59 as bigint))#73, sum(UnscaledValue(ws_wholesale_cost#60))#74, sum(UnscaledValue(ws_sales_price#61))#75] -Results [6]: [d_year#13 AS ws_sold_year#76, ws_item_sk#56, ws_bill_customer_sk#57 AS ws_customer_sk#77, sum(cast(ws_quantity#59 as bigint))#73 AS ws_qty#78, MakeDecimal(sum(UnscaledValue(ws_wholesale_cost#60))#74,17,2) AS ws_wc#79, MakeDecimal(sum(UnscaledValue(ws_sales_price#61))#75,17,2) AS ws_sp#80] +Functions [3]: [sum(ws_quantity#59), sum(UnscaledValue(ws_wholesale_cost#60)), sum(UnscaledValue(ws_sales_price#61))] +Aggregate Attributes [3]: [sum(ws_quantity#59)#73, sum(UnscaledValue(ws_wholesale_cost#60))#74, sum(UnscaledValue(ws_sales_price#61))#75] +Results [6]: [d_year#13 AS ws_sold_year#76, ws_item_sk#56, ws_bill_customer_sk#57 AS ws_customer_sk#77, sum(ws_quantity#59)#73 AS ws_qty#78, MakeDecimal(sum(UnscaledValue(ws_wholesale_cost#60))#74,17,2) AS ws_wc#79, MakeDecimal(sum(UnscaledValue(ws_sales_price#61))#75,17,2) AS ws_sp#80] (66) Filter [codegen id : 22] Input [6]: [ws_sold_year#76, ws_item_sk#56, ws_customer_sk#77, ws_qty#78, ws_wc#79, ws_sp#80] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q78.sf100/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q78.sf100/simplified.txt index 097d27131cb21..ead5776db4fea 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q78.sf100/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q78.sf100/simplified.txt @@ -9,7 +9,7 @@ TakeOrderedAndProject [ss_sold_year,ss_item_sk,ss_customer_sk,ss_qty,ss_wc,ss_sp InputAdapter WholeStageCodegen (7) Sort [ss_sold_year,ss_item_sk,ss_customer_sk] - HashAggregate [d_year,ss_item_sk,ss_customer_sk,sum,sum,sum] [sum(cast(ss_quantity as bigint)),sum(UnscaledValue(ss_wholesale_cost)),sum(UnscaledValue(ss_sales_price)),ss_sold_year,ss_qty,ss_wc,ss_sp,sum,sum,sum] + HashAggregate [d_year,ss_item_sk,ss_customer_sk,sum,sum,sum] [sum(ss_quantity),sum(UnscaledValue(ss_wholesale_cost)),sum(UnscaledValue(ss_sales_price)),ss_sold_year,ss_qty,ss_wc,ss_sp,sum,sum,sum] InputAdapter Exchange [d_year,ss_item_sk,ss_customer_sk] #1 WholeStageCodegen (6) @@ -49,7 +49,7 @@ TakeOrderedAndProject [ss_sold_year,ss_item_sk,ss_customer_sk,ss_qty,ss_wc,ss_sp WholeStageCodegen (14) Sort [cs_sold_year,cs_item_sk,cs_customer_sk] Filter [cs_qty] - HashAggregate [d_year,cs_item_sk,cs_bill_customer_sk,sum,sum,sum] [sum(cast(cs_quantity as bigint)),sum(UnscaledValue(cs_wholesale_cost)),sum(UnscaledValue(cs_sales_price)),cs_sold_year,cs_customer_sk,cs_qty,cs_wc,cs_sp,sum,sum,sum] + HashAggregate [d_year,cs_item_sk,cs_bill_customer_sk,sum,sum,sum] [sum(cs_quantity),sum(UnscaledValue(cs_wholesale_cost)),sum(UnscaledValue(cs_sales_price)),cs_sold_year,cs_customer_sk,cs_qty,cs_wc,cs_sp,sum,sum,sum] InputAdapter Exchange [d_year,cs_item_sk,cs_bill_customer_sk] #5 WholeStageCodegen (13) @@ -84,7 +84,7 @@ TakeOrderedAndProject [ss_sold_year,ss_item_sk,ss_customer_sk,ss_qty,ss_wc,ss_sp WholeStageCodegen (22) Sort [ws_sold_year,ws_item_sk,ws_customer_sk] Filter [ws_qty] - HashAggregate [d_year,ws_item_sk,ws_bill_customer_sk,sum,sum,sum] [sum(cast(ws_quantity as bigint)),sum(UnscaledValue(ws_wholesale_cost)),sum(UnscaledValue(ws_sales_price)),ws_sold_year,ws_customer_sk,ws_qty,ws_wc,ws_sp,sum,sum,sum] + HashAggregate [d_year,ws_item_sk,ws_bill_customer_sk,sum,sum,sum] [sum(ws_quantity),sum(UnscaledValue(ws_wholesale_cost)),sum(UnscaledValue(ws_sales_price)),ws_sold_year,ws_customer_sk,ws_qty,ws_wc,ws_sp,sum,sum,sum] InputAdapter Exchange [d_year,ws_item_sk,ws_bill_customer_sk] #8 WholeStageCodegen (21) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q78/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q78/explain.txt index 747ad5194ef2b..759a524323b59 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q78/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q78/explain.txt @@ -136,20 +136,20 @@ Input [8]: [ss_sold_date_sk#1, ss_item_sk#2, ss_customer_sk#3, ss_quantity#5, ss (17) HashAggregate [codegen id : 3] Input [6]: [ss_item_sk#2, ss_customer_sk#3, ss_quantity#5, ss_wholesale_cost#6, ss_sales_price#7, d_year#12] Keys [3]: [d_year#12, ss_item_sk#2, ss_customer_sk#3] -Functions [3]: [partial_sum(cast(ss_quantity#5 as bigint)), partial_sum(UnscaledValue(ss_wholesale_cost#6)), partial_sum(UnscaledValue(ss_sales_price#7))] +Functions [3]: [partial_sum(ss_quantity#5), partial_sum(UnscaledValue(ss_wholesale_cost#6)), partial_sum(UnscaledValue(ss_sales_price#7))] Aggregate Attributes [3]: [sum#14, sum#15, sum#16] Results [6]: [d_year#12, ss_item_sk#2, ss_customer_sk#3, sum#17, sum#18, sum#19] (18) Exchange Input [6]: [d_year#12, ss_item_sk#2, ss_customer_sk#3, sum#17, sum#18, sum#19] -Arguments: hashpartitioning(d_year#12, ss_item_sk#2, ss_customer_sk#3, 5), true, [id=#20] +Arguments: hashpartitioning(d_year#12, ss_item_sk#2, ss_customer_sk#3, 5), ENSURE_REQUIREMENTS, [id=#20] (19) HashAggregate [codegen id : 12] Input [6]: [d_year#12, ss_item_sk#2, ss_customer_sk#3, sum#17, sum#18, sum#19] Keys [3]: [d_year#12, ss_item_sk#2, ss_customer_sk#3] -Functions [3]: [sum(cast(ss_quantity#5 as bigint)), sum(UnscaledValue(ss_wholesale_cost#6)), sum(UnscaledValue(ss_sales_price#7))] -Aggregate Attributes [3]: [sum(cast(ss_quantity#5 as bigint))#21, sum(UnscaledValue(ss_wholesale_cost#6))#22, sum(UnscaledValue(ss_sales_price#7))#23] -Results [6]: [d_year#12 AS ss_sold_year#24, ss_item_sk#2, ss_customer_sk#3, sum(cast(ss_quantity#5 as bigint))#21 AS ss_qty#25, MakeDecimal(sum(UnscaledValue(ss_wholesale_cost#6))#22,17,2) AS ss_wc#26, MakeDecimal(sum(UnscaledValue(ss_sales_price#7))#23,17,2) AS ss_sp#27] +Functions [3]: [sum(ss_quantity#5), sum(UnscaledValue(ss_wholesale_cost#6)), sum(UnscaledValue(ss_sales_price#7))] +Aggregate Attributes [3]: [sum(ss_quantity#5)#21, sum(UnscaledValue(ss_wholesale_cost#6))#22, sum(UnscaledValue(ss_sales_price#7))#23] +Results [6]: [d_year#12 AS ss_sold_year#24, ss_item_sk#2, ss_customer_sk#3, sum(ss_quantity#5)#21 AS ss_qty#25, MakeDecimal(sum(UnscaledValue(ss_wholesale_cost#6))#22,17,2) AS ss_wc#26, MakeDecimal(sum(UnscaledValue(ss_sales_price#7))#23,17,2) AS ss_sp#27] (20) Scan parquet default.web_sales Output [7]: [ws_sold_date_sk#28, ws_item_sk#29, ws_bill_customer_sk#30, ws_order_number#31, ws_quantity#32, ws_wholesale_cost#33, ws_sales_price#34] @@ -211,20 +211,20 @@ Input [8]: [ws_sold_date_sk#28, ws_item_sk#29, ws_bill_customer_sk#30, ws_quanti (33) HashAggregate [codegen id : 6] Input [6]: [ws_item_sk#29, ws_bill_customer_sk#30, ws_quantity#32, ws_wholesale_cost#33, ws_sales_price#34, d_year#12] Keys [3]: [d_year#12, ws_item_sk#29, ws_bill_customer_sk#30] -Functions [3]: [partial_sum(cast(ws_quantity#32 as bigint)), partial_sum(UnscaledValue(ws_wholesale_cost#33)), partial_sum(UnscaledValue(ws_sales_price#34))] +Functions [3]: [partial_sum(ws_quantity#32), partial_sum(UnscaledValue(ws_wholesale_cost#33)), partial_sum(UnscaledValue(ws_sales_price#34))] Aggregate Attributes [3]: [sum#38, sum#39, sum#40] Results [6]: [d_year#12, ws_item_sk#29, ws_bill_customer_sk#30, sum#41, sum#42, sum#43] (34) Exchange Input [6]: [d_year#12, ws_item_sk#29, ws_bill_customer_sk#30, sum#41, sum#42, sum#43] -Arguments: hashpartitioning(d_year#12, ws_item_sk#29, ws_bill_customer_sk#30, 5), true, [id=#44] +Arguments: hashpartitioning(d_year#12, ws_item_sk#29, ws_bill_customer_sk#30, 5), ENSURE_REQUIREMENTS, [id=#44] (35) HashAggregate [codegen id : 7] Input [6]: [d_year#12, ws_item_sk#29, ws_bill_customer_sk#30, sum#41, sum#42, sum#43] Keys [3]: [d_year#12, ws_item_sk#29, ws_bill_customer_sk#30] -Functions [3]: [sum(cast(ws_quantity#32 as bigint)), sum(UnscaledValue(ws_wholesale_cost#33)), sum(UnscaledValue(ws_sales_price#34))] -Aggregate Attributes [3]: [sum(cast(ws_quantity#32 as bigint))#45, sum(UnscaledValue(ws_wholesale_cost#33))#46, sum(UnscaledValue(ws_sales_price#34))#47] -Results [6]: [d_year#12 AS ws_sold_year#48, ws_item_sk#29, ws_bill_customer_sk#30 AS ws_customer_sk#49, sum(cast(ws_quantity#32 as bigint))#45 AS ws_qty#50, MakeDecimal(sum(UnscaledValue(ws_wholesale_cost#33))#46,17,2) AS ws_wc#51, MakeDecimal(sum(UnscaledValue(ws_sales_price#34))#47,17,2) AS ws_sp#52] +Functions [3]: [sum(ws_quantity#32), sum(UnscaledValue(ws_wholesale_cost#33)), sum(UnscaledValue(ws_sales_price#34))] +Aggregate Attributes [3]: [sum(ws_quantity#32)#45, sum(UnscaledValue(ws_wholesale_cost#33))#46, sum(UnscaledValue(ws_sales_price#34))#47] +Results [6]: [d_year#12 AS ws_sold_year#48, ws_item_sk#29, ws_bill_customer_sk#30 AS ws_customer_sk#49, sum(ws_quantity#32)#45 AS ws_qty#50, MakeDecimal(sum(UnscaledValue(ws_wholesale_cost#33))#46,17,2) AS ws_wc#51, MakeDecimal(sum(UnscaledValue(ws_sales_price#34))#47,17,2) AS ws_sp#52] (36) Filter [codegen id : 7] Input [6]: [ws_sold_year#48, ws_item_sk#29, ws_customer_sk#49, ws_qty#50, ws_wc#51, ws_sp#52] @@ -303,20 +303,20 @@ Input [8]: [cs_sold_date_sk#54, cs_bill_customer_sk#55, cs_item_sk#56, cs_quanti (53) HashAggregate [codegen id : 10] Input [6]: [cs_bill_customer_sk#55, cs_item_sk#56, cs_quantity#58, cs_wholesale_cost#59, cs_sales_price#60, d_year#12] Keys [3]: [d_year#12, cs_item_sk#56, cs_bill_customer_sk#55] -Functions [3]: [partial_sum(cast(cs_quantity#58 as bigint)), partial_sum(UnscaledValue(cs_wholesale_cost#59)), partial_sum(UnscaledValue(cs_sales_price#60))] +Functions [3]: [partial_sum(cs_quantity#58), partial_sum(UnscaledValue(cs_wholesale_cost#59)), partial_sum(UnscaledValue(cs_sales_price#60))] Aggregate Attributes [3]: [sum#64, sum#65, sum#66] Results [6]: [d_year#12, cs_item_sk#56, cs_bill_customer_sk#55, sum#67, sum#68, sum#69] (54) Exchange Input [6]: [d_year#12, cs_item_sk#56, cs_bill_customer_sk#55, sum#67, sum#68, sum#69] -Arguments: hashpartitioning(d_year#12, cs_item_sk#56, cs_bill_customer_sk#55, 5), true, [id=#70] +Arguments: hashpartitioning(d_year#12, cs_item_sk#56, cs_bill_customer_sk#55, 5), ENSURE_REQUIREMENTS, [id=#70] (55) HashAggregate [codegen id : 11] Input [6]: [d_year#12, cs_item_sk#56, cs_bill_customer_sk#55, sum#67, sum#68, sum#69] Keys [3]: [d_year#12, cs_item_sk#56, cs_bill_customer_sk#55] -Functions [3]: [sum(cast(cs_quantity#58 as bigint)), sum(UnscaledValue(cs_wholesale_cost#59)), sum(UnscaledValue(cs_sales_price#60))] -Aggregate Attributes [3]: [sum(cast(cs_quantity#58 as bigint))#71, sum(UnscaledValue(cs_wholesale_cost#59))#72, sum(UnscaledValue(cs_sales_price#60))#73] -Results [6]: [d_year#12 AS cs_sold_year#74, cs_item_sk#56, cs_bill_customer_sk#55 AS cs_customer_sk#75, sum(cast(cs_quantity#58 as bigint))#71 AS cs_qty#76, MakeDecimal(sum(UnscaledValue(cs_wholesale_cost#59))#72,17,2) AS cs_wc#77, MakeDecimal(sum(UnscaledValue(cs_sales_price#60))#73,17,2) AS cs_sp#78] +Functions [3]: [sum(cs_quantity#58), sum(UnscaledValue(cs_wholesale_cost#59)), sum(UnscaledValue(cs_sales_price#60))] +Aggregate Attributes [3]: [sum(cs_quantity#58)#71, sum(UnscaledValue(cs_wholesale_cost#59))#72, sum(UnscaledValue(cs_sales_price#60))#73] +Results [6]: [d_year#12 AS cs_sold_year#74, cs_item_sk#56, cs_bill_customer_sk#55 AS cs_customer_sk#75, sum(cs_quantity#58)#71 AS cs_qty#76, MakeDecimal(sum(UnscaledValue(cs_wholesale_cost#59))#72,17,2) AS cs_wc#77, MakeDecimal(sum(UnscaledValue(cs_sales_price#60))#73,17,2) AS cs_sp#78] (56) Filter [codegen id : 11] Input [6]: [cs_sold_year#74, cs_item_sk#56, cs_customer_sk#75, cs_qty#76, cs_wc#77, cs_sp#78] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q78/simplified.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q78/simplified.txt index 7f5008a59b50d..037e99e0fbf27 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q78/simplified.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q78/simplified.txt @@ -4,7 +4,7 @@ TakeOrderedAndProject [ss_sold_year,ss_item_sk,ss_customer_sk,ss_qty,ss_wc,ss_sp BroadcastHashJoin [ss_sold_year,ss_item_sk,ss_customer_sk,cs_sold_year,cs_item_sk,cs_customer_sk] Project [ss_sold_year,ss_item_sk,ss_customer_sk,ss_qty,ss_wc,ss_sp,ws_qty,ws_wc,ws_sp] BroadcastHashJoin [ss_sold_year,ss_item_sk,ss_customer_sk,ws_sold_year,ws_item_sk,ws_customer_sk] - HashAggregate [d_year,ss_item_sk,ss_customer_sk,sum,sum,sum] [sum(cast(ss_quantity as bigint)),sum(UnscaledValue(ss_wholesale_cost)),sum(UnscaledValue(ss_sales_price)),ss_sold_year,ss_qty,ss_wc,ss_sp,sum,sum,sum] + HashAggregate [d_year,ss_item_sk,ss_customer_sk,sum,sum,sum] [sum(ss_quantity),sum(UnscaledValue(ss_wholesale_cost)),sum(UnscaledValue(ss_sales_price)),ss_sold_year,ss_qty,ss_wc,ss_sp,sum,sum,sum] InputAdapter Exchange [d_year,ss_item_sk,ss_customer_sk] #1 WholeStageCodegen (3) @@ -36,7 +36,7 @@ TakeOrderedAndProject [ss_sold_year,ss_item_sk,ss_customer_sk,ss_qty,ss_wc,ss_sp BroadcastExchange #4 WholeStageCodegen (7) Filter [ws_qty] - HashAggregate [d_year,ws_item_sk,ws_bill_customer_sk,sum,sum,sum] [sum(cast(ws_quantity as bigint)),sum(UnscaledValue(ws_wholesale_cost)),sum(UnscaledValue(ws_sales_price)),ws_sold_year,ws_customer_sk,ws_qty,ws_wc,ws_sp,sum,sum,sum] + HashAggregate [d_year,ws_item_sk,ws_bill_customer_sk,sum,sum,sum] [sum(ws_quantity),sum(UnscaledValue(ws_wholesale_cost)),sum(UnscaledValue(ws_sales_price)),ws_sold_year,ws_customer_sk,ws_qty,ws_wc,ws_sp,sum,sum,sum] InputAdapter Exchange [d_year,ws_item_sk,ws_bill_customer_sk] #5 WholeStageCodegen (6) @@ -63,7 +63,7 @@ TakeOrderedAndProject [ss_sold_year,ss_item_sk,ss_customer_sk,ss_qty,ss_wc,ss_sp BroadcastExchange #7 WholeStageCodegen (11) Filter [cs_qty] - HashAggregate [d_year,cs_item_sk,cs_bill_customer_sk,sum,sum,sum] [sum(cast(cs_quantity as bigint)),sum(UnscaledValue(cs_wholesale_cost)),sum(UnscaledValue(cs_sales_price)),cs_sold_year,cs_customer_sk,cs_qty,cs_wc,cs_sp,sum,sum,sum] + HashAggregate [d_year,cs_item_sk,cs_bill_customer_sk,sum,sum,sum] [sum(cs_quantity),sum(UnscaledValue(cs_wholesale_cost)),sum(UnscaledValue(cs_sales_price)),cs_sold_year,cs_customer_sk,cs_qty,cs_wc,cs_sp,sum,sum,sum] InputAdapter Exchange [d_year,cs_item_sk,cs_bill_customer_sk] #8 WholeStageCodegen (10) diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q98.sf100/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q98.sf100/explain.txt index 6fa7b04a3b463..c27fbd88d69b7 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q98.sf100/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q98.sf100/explain.txt @@ -76,7 +76,7 @@ Input [4]: [ss_sold_date_sk#1, ss_item_sk#2, ss_ext_sales_price#3, d_date_sk#4] (11) Exchange Input [2]: [ss_item_sk#2, ss_ext_sales_price#3] -Arguments: hashpartitioning(ss_item_sk#2, 5), true, [id=#7] +Arguments: hashpartitioning(ss_item_sk#2, 5), ENSURE_REQUIREMENTS, [id=#7] (12) Sort [codegen id : 3] Input [2]: [ss_item_sk#2, ss_ext_sales_price#3] @@ -98,7 +98,7 @@ Condition : (i_category#13 IN (Sports,Books,Home) AND isnotnull(i_item_sk#8)) (16) Exchange Input [6]: [i_item_sk#8, i_item_id#9, i_item_desc#10, i_current_price#11, i_class#12, i_category#13] -Arguments: hashpartitioning(i_item_sk#8, 5), true, [id=#14] +Arguments: hashpartitioning(i_item_sk#8, 5), ENSURE_REQUIREMENTS, [id=#14] (17) Sort [codegen id : 5] Input [6]: [i_item_sk#8, i_item_id#9, i_item_desc#10, i_current_price#11, i_class#12, i_category#13] @@ -122,7 +122,7 @@ Results [6]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_ (21) Exchange Input [6]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, sum#16] -Arguments: hashpartitioning(i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, 5), true, [id=#17] +Arguments: hashpartitioning(i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, 5), ENSURE_REQUIREMENTS, [id=#17] (22) HashAggregate [codegen id : 7] Input [6]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, sum#16] @@ -133,7 +133,7 @@ Results [8]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_ (23) Exchange Input [8]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, itemrevenue#19, _w0#20, _w1#21] -Arguments: hashpartitioning(i_class#12, 5), true, [id=#22] +Arguments: hashpartitioning(i_class#12, 5), ENSURE_REQUIREMENTS, [id=#22] (24) Sort [codegen id : 8] Input [8]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, itemrevenue#19, _w0#20, _w1#21] @@ -149,7 +149,7 @@ Input [9]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_pr (27) Exchange Input [7]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, itemrevenue#19, revenueratio#24] -Arguments: rangepartitioning(i_category#13 ASC NULLS FIRST, i_class#12 ASC NULLS FIRST, i_item_id#9 ASC NULLS FIRST, i_item_desc#10 ASC NULLS FIRST, revenueratio#24 ASC NULLS FIRST, 5), true, [id=#25] +Arguments: rangepartitioning(i_category#13 ASC NULLS FIRST, i_class#12 ASC NULLS FIRST, i_item_id#9 ASC NULLS FIRST, i_item_desc#10 ASC NULLS FIRST, revenueratio#24 ASC NULLS FIRST, 5), ENSURE_REQUIREMENTS, [id=#25] (28) Sort [codegen id : 10] Input [7]: [i_item_id#9, i_item_desc#10, i_category#13, i_class#12, i_current_price#11, itemrevenue#19, revenueratio#24] diff --git a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q98/explain.txt b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q98/explain.txt index 45cd61a0556cb..ddbe439eab06e 100644 --- a/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q98/explain.txt +++ b/sql/core/src/test/resources/tpcds-plan-stability/approved-plans-v2_7/q98/explain.txt @@ -107,7 +107,7 @@ Results [6]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_pri (18) Exchange Input [6]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, sum#15] -Arguments: hashpartitioning(i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, 5), true, [id=#16] +Arguments: hashpartitioning(i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, 5), ENSURE_REQUIREMENTS, [id=#16] (19) HashAggregate [codegen id : 4] Input [6]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, sum#15] @@ -118,7 +118,7 @@ Results [8]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_pri (20) Exchange Input [8]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, itemrevenue#18, _w0#19, _w1#20] -Arguments: hashpartitioning(i_class#8, 5), true, [id=#21] +Arguments: hashpartitioning(i_class#8, 5), ENSURE_REQUIREMENTS, [id=#21] (21) Sort [codegen id : 5] Input [8]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, itemrevenue#18, _w0#19, _w1#20] @@ -134,7 +134,7 @@ Input [9]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price (24) Exchange Input [7]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, itemrevenue#18, revenueratio#23] -Arguments: rangepartitioning(i_category#9 ASC NULLS FIRST, i_class#8 ASC NULLS FIRST, i_item_id#5 ASC NULLS FIRST, i_item_desc#6 ASC NULLS FIRST, revenueratio#23 ASC NULLS FIRST, 5), true, [id=#24] +Arguments: rangepartitioning(i_category#9 ASC NULLS FIRST, i_class#8 ASC NULLS FIRST, i_item_id#5 ASC NULLS FIRST, i_item_desc#6 ASC NULLS FIRST, revenueratio#23 ASC NULLS FIRST, 5), ENSURE_REQUIREMENTS, [id=#24] (25) Sort [codegen id : 7] Input [7]: [i_item_id#5, i_item_desc#6, i_category#9, i_class#8, i_current_price#7, itemrevenue#18, revenueratio#23]