Skip to content

[SPARK-52841][SQL][TESTS] Fix PlanStabilitySuite id normalization #51534

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,11 @@ Results [4]: [c_last_name#23, c_first_name#22, s_store_name#11, sum(netpaid#31)#

(46) Filter [codegen id : 11]
Input [4]: [c_last_name#23, c_first_name#22, s_store_name#11, paid#37]
Condition : (isnotnull(paid#37) AND (cast(paid#37 as decimal(33,8)) > cast(Subquery scalar-subquery#38, [id=#39] as decimal(33,8))))
Condition : (isnotnull(paid#37) AND (cast(paid#37 as decimal(33,8)) > cast(Subquery scalar-subquery#38, [id=#9] as decimal(33,8))))

===== Subqueries =====

Subquery:1 Hosting operator id = 46 Hosting Expression = Subquery scalar-subquery#38, [id=#39]
Subquery:1 Hosting operator id = 46 Hosting Expression = Subquery scalar-subquery#38, [id=#9]
* HashAggregate (73)
+- Exchange (72)
+- * HashAggregate (71)
Expand Down Expand Up @@ -298,130 +298,130 @@ Subquery:1 Hosting operator id = 46 Hosting Expression = Subquery scalar-subquer


(47) ReusedExchange [Reuses operator id: 5]
Output [5]: [ss_item_sk#40, ss_customer_sk#41, ss_store_sk#42, ss_ticket_number#43, ss_net_paid#44]
Output [5]: [ss_item_sk#39, ss_customer_sk#40, ss_store_sk#41, ss_ticket_number#42, ss_net_paid#43]

(48) Sort [codegen id : 2]
Input [5]: [ss_item_sk#40, ss_customer_sk#41, ss_store_sk#42, ss_ticket_number#43, ss_net_paid#44]
Arguments: [ss_ticket_number#43 ASC NULLS FIRST, ss_item_sk#40 ASC NULLS FIRST], false, 0
Input [5]: [ss_item_sk#39, ss_customer_sk#40, ss_store_sk#41, ss_ticket_number#42, ss_net_paid#43]
Arguments: [ss_ticket_number#42 ASC NULLS FIRST, ss_item_sk#39 ASC NULLS FIRST], false, 0

(49) ReusedExchange [Reuses operator id: 11]
Output [2]: [sr_item_sk#45, sr_ticket_number#46]
Output [2]: [sr_item_sk#44, sr_ticket_number#45]

(50) Sort [codegen id : 4]
Input [2]: [sr_item_sk#45, sr_ticket_number#46]
Arguments: [sr_ticket_number#46 ASC NULLS FIRST, sr_item_sk#45 ASC NULLS FIRST], false, 0
Input [2]: [sr_item_sk#44, sr_ticket_number#45]
Arguments: [sr_ticket_number#45 ASC NULLS FIRST, sr_item_sk#44 ASC NULLS FIRST], false, 0

(51) SortMergeJoin [codegen id : 9]
Left keys [2]: [ss_ticket_number#43, ss_item_sk#40]
Right keys [2]: [sr_ticket_number#46, sr_item_sk#45]
Left keys [2]: [ss_ticket_number#42, ss_item_sk#39]
Right keys [2]: [sr_ticket_number#45, sr_item_sk#44]
Join type: Inner
Join condition: None

(52) Project [codegen id : 9]
Output [4]: [ss_item_sk#40, ss_customer_sk#41, ss_store_sk#42, ss_net_paid#44]
Input [7]: [ss_item_sk#40, ss_customer_sk#41, ss_store_sk#42, ss_ticket_number#43, ss_net_paid#44, sr_item_sk#45, sr_ticket_number#46]
Output [4]: [ss_item_sk#39, ss_customer_sk#40, ss_store_sk#41, ss_net_paid#43]
Input [7]: [ss_item_sk#39, ss_customer_sk#40, ss_store_sk#41, ss_ticket_number#42, ss_net_paid#43, sr_item_sk#44, sr_ticket_number#45]

(53) ReusedExchange [Reuses operator id: 19]
Output [4]: [s_store_sk#47, s_store_name#48, s_state#49, s_zip#50]
Output [4]: [s_store_sk#46, s_store_name#47, s_state#48, s_zip#49]

(54) BroadcastHashJoin [codegen id : 9]
Left keys [1]: [ss_store_sk#42]
Right keys [1]: [s_store_sk#47]
Left keys [1]: [ss_store_sk#41]
Right keys [1]: [s_store_sk#46]
Join type: Inner
Join condition: None

(55) Project [codegen id : 9]
Output [6]: [ss_item_sk#40, ss_customer_sk#41, ss_net_paid#44, s_store_name#48, s_state#49, s_zip#50]
Input [8]: [ss_item_sk#40, ss_customer_sk#41, ss_store_sk#42, ss_net_paid#44, s_store_sk#47, s_store_name#48, s_state#49, s_zip#50]
Output [6]: [ss_item_sk#39, ss_customer_sk#40, ss_net_paid#43, s_store_name#47, s_state#48, s_zip#49]
Input [8]: [ss_item_sk#39, ss_customer_sk#40, ss_store_sk#41, ss_net_paid#43, s_store_sk#46, s_store_name#47, s_state#48, s_zip#49]

(56) Scan parquet spark_catalog.default.item
Output [6]: [i_item_sk#51, i_current_price#52, i_size#53, i_color#54, i_units#55, i_manager_id#56]
Output [6]: [i_item_sk#50, i_current_price#51, i_size#52, i_color#53, i_units#54, i_manager_id#55]
Batched: true
Location [not included in comparison]/{warehouse_dir}/item]
PushedFilters: [IsNotNull(i_item_sk)]
ReadSchema: struct<i_item_sk:int,i_current_price:decimal(7,2),i_size:string,i_color:string,i_units:string,i_manager_id:int>

(57) ColumnarToRow [codegen id : 6]
Input [6]: [i_item_sk#51, i_current_price#52, i_size#53, i_color#54, i_units#55, i_manager_id#56]
Input [6]: [i_item_sk#50, i_current_price#51, i_size#52, i_color#53, i_units#54, i_manager_id#55]

(58) Filter [codegen id : 6]
Input [6]: [i_item_sk#51, i_current_price#52, i_size#53, i_color#54, i_units#55, i_manager_id#56]
Condition : isnotnull(i_item_sk#51)
Input [6]: [i_item_sk#50, i_current_price#51, i_size#52, i_color#53, i_units#54, i_manager_id#55]
Condition : isnotnull(i_item_sk#50)

(59) BroadcastExchange
Input [6]: [i_item_sk#51, i_current_price#52, i_size#53, i_color#54, i_units#55, i_manager_id#56]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=9]
Input [6]: [i_item_sk#50, i_current_price#51, i_size#52, i_color#53, i_units#54, i_manager_id#55]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=10]

(60) BroadcastHashJoin [codegen id : 9]
Left keys [1]: [ss_item_sk#40]
Right keys [1]: [i_item_sk#51]
Left keys [1]: [ss_item_sk#39]
Right keys [1]: [i_item_sk#50]
Join type: Inner
Join condition: None

(61) Project [codegen id : 9]
Output [10]: [ss_customer_sk#41, ss_net_paid#44, s_store_name#48, s_state#49, s_zip#50, i_current_price#52, i_size#53, i_color#54, i_units#55, i_manager_id#56]
Input [12]: [ss_item_sk#40, ss_customer_sk#41, ss_net_paid#44, s_store_name#48, s_state#49, s_zip#50, i_item_sk#51, i_current_price#52, i_size#53, i_color#54, i_units#55, i_manager_id#56]
Output [10]: [ss_customer_sk#40, ss_net_paid#43, s_store_name#47, s_state#48, s_zip#49, i_current_price#51, i_size#52, i_color#53, i_units#54, i_manager_id#55]
Input [12]: [ss_item_sk#39, ss_customer_sk#40, ss_net_paid#43, s_store_name#47, s_state#48, s_zip#49, i_item_sk#50, i_current_price#51, i_size#52, i_color#53, i_units#54, i_manager_id#55]

(62) ReusedExchange [Reuses operator id: 31]
Output [4]: [c_customer_sk#57, c_first_name#58, c_last_name#59, c_birth_country#60]
Output [4]: [c_customer_sk#56, c_first_name#57, c_last_name#58, c_birth_country#59]

(63) BroadcastHashJoin [codegen id : 9]
Left keys [1]: [ss_customer_sk#41]
Right keys [1]: [c_customer_sk#57]
Left keys [1]: [ss_customer_sk#40]
Right keys [1]: [c_customer_sk#56]
Join type: Inner
Join condition: None

(64) Project [codegen id : 9]
Output [12]: [ss_net_paid#44, s_store_name#48, s_state#49, s_zip#50, i_current_price#52, i_size#53, i_color#54, i_units#55, i_manager_id#56, c_first_name#58, c_last_name#59, c_birth_country#60]
Input [14]: [ss_customer_sk#41, ss_net_paid#44, s_store_name#48, s_state#49, s_zip#50, i_current_price#52, i_size#53, i_color#54, i_units#55, i_manager_id#56, c_customer_sk#57, c_first_name#58, c_last_name#59, c_birth_country#60]
Output [12]: [ss_net_paid#43, s_store_name#47, s_state#48, s_zip#49, i_current_price#51, i_size#52, i_color#53, i_units#54, i_manager_id#55, c_first_name#57, c_last_name#58, c_birth_country#59]
Input [14]: [ss_customer_sk#40, ss_net_paid#43, s_store_name#47, s_state#48, s_zip#49, i_current_price#51, i_size#52, i_color#53, i_units#54, i_manager_id#55, c_customer_sk#56, c_first_name#57, c_last_name#58, c_birth_country#59]

(65) ReusedExchange [Reuses operator id: 37]
Output [3]: [ca_state#61, ca_zip#62, ca_country#63]
Output [3]: [ca_state#60, ca_zip#61, ca_country#62]

(66) BroadcastHashJoin [codegen id : 9]
Left keys [2]: [c_birth_country#60, s_zip#50]
Right keys [2]: [upper(ca_country#63), ca_zip#62]
Left keys [2]: [c_birth_country#59, s_zip#49]
Right keys [2]: [upper(ca_country#62), ca_zip#61]
Join type: Inner
Join condition: None

(67) Project [codegen id : 9]
Output [11]: [ss_net_paid#44, s_store_name#48, s_state#49, i_current_price#52, i_size#53, i_color#54, i_units#55, i_manager_id#56, c_first_name#58, c_last_name#59, ca_state#61]
Input [15]: [ss_net_paid#44, s_store_name#48, s_state#49, s_zip#50, i_current_price#52, i_size#53, i_color#54, i_units#55, i_manager_id#56, c_first_name#58, c_last_name#59, c_birth_country#60, ca_state#61, ca_zip#62, ca_country#63]
Output [11]: [ss_net_paid#43, s_store_name#47, s_state#48, i_current_price#51, i_size#52, i_color#53, i_units#54, i_manager_id#55, c_first_name#57, c_last_name#58, ca_state#60]
Input [15]: [ss_net_paid#43, s_store_name#47, s_state#48, s_zip#49, i_current_price#51, i_size#52, i_color#53, i_units#54, i_manager_id#55, c_first_name#57, c_last_name#58, c_birth_country#59, ca_state#60, ca_zip#61, ca_country#62]

(68) HashAggregate [codegen id : 9]
Input [11]: [ss_net_paid#44, s_store_name#48, s_state#49, i_current_price#52, i_size#53, i_color#54, i_units#55, i_manager_id#56, c_first_name#58, c_last_name#59, ca_state#61]
Keys [10]: [c_last_name#59, c_first_name#58, s_store_name#48, ca_state#61, s_state#49, i_color#54, i_current_price#52, i_manager_id#56, i_units#55, i_size#53]
Functions [1]: [partial_sum(UnscaledValue(ss_net_paid#44))]
Aggregate Attributes [1]: [sum#64]
Results [11]: [c_last_name#59, c_first_name#58, s_store_name#48, ca_state#61, s_state#49, i_color#54, i_current_price#52, i_manager_id#56, i_units#55, i_size#53, sum#65]
Input [11]: [ss_net_paid#43, s_store_name#47, s_state#48, i_current_price#51, i_size#52, i_color#53, i_units#54, i_manager_id#55, c_first_name#57, c_last_name#58, ca_state#60]
Keys [10]: [c_last_name#58, c_first_name#57, s_store_name#47, ca_state#60, s_state#48, i_color#53, i_current_price#51, i_manager_id#55, i_units#54, i_size#52]
Functions [1]: [partial_sum(UnscaledValue(ss_net_paid#43))]
Aggregate Attributes [1]: [sum#63]
Results [11]: [c_last_name#58, c_first_name#57, s_store_name#47, ca_state#60, s_state#48, i_color#53, i_current_price#51, i_manager_id#55, i_units#54, i_size#52, sum#64]

(69) Exchange
Input [11]: [c_last_name#59, c_first_name#58, s_store_name#48, ca_state#61, s_state#49, i_color#54, i_current_price#52, i_manager_id#56, i_units#55, i_size#53, sum#65]
Arguments: hashpartitioning(c_last_name#59, c_first_name#58, s_store_name#48, ca_state#61, s_state#49, i_color#54, i_current_price#52, i_manager_id#56, i_units#55, i_size#53, 5), ENSURE_REQUIREMENTS, [plan_id=10]
Input [11]: [c_last_name#58, c_first_name#57, s_store_name#47, ca_state#60, s_state#48, i_color#53, i_current_price#51, i_manager_id#55, i_units#54, i_size#52, sum#64]
Arguments: hashpartitioning(c_last_name#58, c_first_name#57, s_store_name#47, ca_state#60, s_state#48, i_color#53, i_current_price#51, i_manager_id#55, i_units#54, i_size#52, 5), ENSURE_REQUIREMENTS, [plan_id=11]

(70) HashAggregate [codegen id : 10]
Input [11]: [c_last_name#59, c_first_name#58, s_store_name#48, ca_state#61, s_state#49, i_color#54, i_current_price#52, i_manager_id#56, i_units#55, i_size#53, sum#65]
Keys [10]: [c_last_name#59, c_first_name#58, s_store_name#48, ca_state#61, s_state#49, i_color#54, i_current_price#52, i_manager_id#56, i_units#55, i_size#53]
Functions [1]: [sum(UnscaledValue(ss_net_paid#44))]
Aggregate Attributes [1]: [sum(UnscaledValue(ss_net_paid#44))#30]
Results [1]: [MakeDecimal(sum(UnscaledValue(ss_net_paid#44))#30,17,2) AS netpaid#66]
Input [11]: [c_last_name#58, c_first_name#57, s_store_name#47, ca_state#60, s_state#48, i_color#53, i_current_price#51, i_manager_id#55, i_units#54, i_size#52, sum#64]
Keys [10]: [c_last_name#58, c_first_name#57, s_store_name#47, ca_state#60, s_state#48, i_color#53, i_current_price#51, i_manager_id#55, i_units#54, i_size#52]
Functions [1]: [sum(UnscaledValue(ss_net_paid#43))]
Aggregate Attributes [1]: [sum(UnscaledValue(ss_net_paid#43))#30]
Results [1]: [MakeDecimal(sum(UnscaledValue(ss_net_paid#43))#30,17,2) AS netpaid#65]

(71) HashAggregate [codegen id : 10]
Input [1]: [netpaid#66]
Input [1]: [netpaid#65]
Keys: []
Functions [1]: [partial_avg(netpaid#66)]
Aggregate Attributes [2]: [sum#67, count#68]
Results [2]: [sum#69, count#70]
Functions [1]: [partial_avg(netpaid#65)]
Aggregate Attributes [2]: [sum#66, count#67]
Results [2]: [sum#68, count#69]

(72) Exchange
Input [2]: [sum#69, count#70]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, [plan_id=11]
Input [2]: [sum#68, count#69]
Arguments: SinglePartition, ENSURE_REQUIREMENTS, [plan_id=12]

(73) HashAggregate [codegen id : 11]
Input [2]: [sum#69, count#70]
Input [2]: [sum#68, count#69]
Keys: []
Functions [1]: [avg(netpaid#66)]
Aggregate Attributes [1]: [avg(netpaid#66)#71]
Results [1]: [(0.05 * avg(netpaid#66)#71) AS (0.05 * avg(netpaid))#72]
Functions [1]: [avg(netpaid#65)]
Aggregate Attributes [1]: [avg(netpaid#65)#70]
Results [1]: [(0.05 * avg(netpaid#65)#70) AS (0.05 * avg(netpaid))#71]


Loading