== Physical Plan ==
VeloxColumnarToRow (108)
+- TakeOrderedAndProjectExecTransformer (107)
   +- ^ ProjectExecTransformer (105)
      +- ^ ShuffledHashJoinExecTransformer Inner BuildLeft (104)
         :- ^ ProjectExecTransformer (69)
         :  +- ^ ShuffledHashJoinExecTransformer Inner BuildRight (68)
         :     :- ^ ProjectExecTransformer (33)
         :     :  +- ^ RegularHashAggregateExecTransformer (32)
         :     :     +- ^ InputIteratorTransformer (31)
         :     :        +- ColumnarExchange (29)
         :     :           +- VeloxResizeBatches (28)
         :     :              +- ^ ProjectExecTransformer (26)
         :     :                 +- ^ FlushableHashAggregateExecTransformer (25)
         :     :                    +- ^ ProjectExecTransformer (24)
         :     :                       +- ^ BroadcastHashJoinExecTransformer Inner BuildRight (23)
         :     :                          :- ^ ProjectExecTransformer (19)
         :     :                          :  +- ^ FilterExecTransformer (18)
         :     :                          :     +- ^ ShuffledHashJoinExecTransformer LeftOuter BuildRight (17)
         :     :                          :        :- ^ InputIteratorTransformer (8)
         :     :                          :        :  +- ColumnarExchange (6)
         :     :                          :        :     +- VeloxResizeBatches (5)
         :     :                          :        :        +- ^ ProjectExecTransformer (3)
         :     :                          :        :           +- ^ FilterExecTransformer (2)
         :     :                          :        :              +- ^ FileSourceScanExecTransformer parquet spark_catalog.default.store_sales (1)
         :     :                          :        +- ^ InputIteratorTransformer (16)
         :     :                          :           +- ColumnarExchange (14)
         :     :                          :              +- VeloxResizeBatches (13)
         :     :                          :                 +- ^ ProjectExecTransformer (11)
         :     :                          :                    +- ^ FilterExecTransformer (10)
         :     :                          :                       +- ^ FileSourceScanExecTransformer parquet spark_catalog.default.store_returns (9)
         :     :                          +- ^ InputIteratorTransformer (22)
         :     :                             +- ReusedExchange (20)
         :     +- ^ FilterExecTransformer (67)
         :        +- ^ ProjectExecTransformer (66)
         :           +- ^ RegularHashAggregateExecTransformer (65)
         :              +- ^ InputIteratorTransformer (64)
         :                 +- ColumnarExchange (62)
         :                    +- VeloxResizeBatches (61)
         :                       +- ^ ProjectExecTransformer (59)
         :                          +- ^ FlushableHashAggregateExecTransformer (58)
         :                             +- ^ ProjectExecTransformer (57)
         :                                +- ^ BroadcastHashJoinExecTransformer Inner BuildRight (56)
         :                                   :- ^ ProjectExecTransformer (52)
         :                                   :  +- ^ FilterExecTransformer (51)
         :                                   :     +- ^ ShuffledHashJoinExecTransformer LeftOuter BuildRight (50)
         :                                   :        :- ^ InputIteratorTransformer (41)
         :                                   :        :  +- ColumnarExchange (39)
         :                                   :        :     +- VeloxResizeBatches (38)
         :                                   :        :        +- ^ ProjectExecTransformer (36)
         :                                   :        :           +- ^ FilterExecTransformer (35)
         :                                   :        :              +- ^ FileSourceScanExecTransformer parquet spark_catalog.default.web_sales (34)
         :                                   :        +- ^ InputIteratorTransformer (49)
         :                                   :           +- ColumnarExchange (47)
         :                                   :              +- VeloxResizeBatches (46)
         :                                   :                 +- ^ ProjectExecTransformer (44)
         :                                   :                    +- ^ FilterExecTransformer (43)
         :                                   :                       +- ^ FileSourceScanExecTransformer parquet spark_catalog.default.web_returns (42)
         :                                   +- ^ InputIteratorTransformer (55)
         :                                      +- ReusedExchange (53)
         +- ^ FilterExecTransformer (103)
            +- ^ ProjectExecTransformer (102)
               +- ^ RegularHashAggregateExecTransformer (101)
                  +- ^ InputIteratorTransformer (100)
                     +- ColumnarExchange (98)
                        +- VeloxResizeBatches (97)
                           +- ^ ProjectExecTransformer (95)
                              +- ^ FlushableHashAggregateExecTransformer (94)
                                 +- ^ ProjectExecTransformer (93)
                                    +- ^ BroadcastHashJoinExecTransformer Inner BuildRight (92)
                                       :- ^ ProjectExecTransformer (88)
                                       :  +- ^ FilterExecTransformer (87)
                                       :     +- ^ ShuffledHashJoinExecTransformer LeftOuter BuildRight (86)
                                       :        :- ^ InputIteratorTransformer (77)
                                       :        :  +- ColumnarExchange (75)
                                       :        :     +- VeloxResizeBatches (74)
                                       :        :        +- ^ ProjectExecTransformer (72)
                                       :        :           +- ^ FilterExecTransformer (71)
                                       :        :              +- ^ FileSourceScanExecTransformer parquet spark_catalog.default.catalog_sales (70)
                                       :        +- ^ InputIteratorTransformer (85)
                                       :           +- ColumnarExchange (83)
                                       :              +- VeloxResizeBatches (82)
                                       :                 +- ^ ProjectExecTransformer (80)
                                       :                    +- ^ FilterExecTransformer (79)
                                       :                       +- ^ FileSourceScanExecTransformer parquet spark_catalog.default.catalog_returns (78)
                                       +- ^ InputIteratorTransformer (91)
                                          +- ReusedExchange (89)


(1) FileSourceScanExecTransformer parquet spark_catalog.default.store_sales
Output [7]: [ss_item_sk#1, ss_customer_sk#2, ss_ticket_number#3, ss_quantity#4, ss_wholesale_cost#5, ss_sales_price#6, ss_sold_date_sk#7]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ss_sold_date_sk#7), dynamicpruningexpression(ss_sold_date_sk#7 IN dynamicpruning#8)]
PushedFilters: [IsNotNull(ss_item_sk), IsNotNull(ss_customer_sk)]
ReadSchema: struct<ss_item_sk:int,ss_customer_sk:int,ss_ticket_number:int,ss_quantity:int,ss_wholesale_cost:decimal(7,2),ss_sales_price:decimal(7,2)>

(2) FilterExecTransformer
Input [7]: [ss_item_sk#1, ss_customer_sk#2, ss_ticket_number#3, ss_quantity#4, ss_wholesale_cost#5, ss_sales_price#6, ss_sold_date_sk#7]
Arguments: (isnotnull(ss_item_sk#1) AND isnotnull(ss_customer_sk#2))

(3) ProjectExecTransformer
Output [8]: [hash(ss_ticket_number#3, ss_item_sk#1, 42) AS hash_partition_key#9, ss_item_sk#1, ss_customer_sk#2, ss_ticket_number#3, ss_quantity#4, ss_wholesale_cost#5, ss_sales_price#6, ss_sold_date_sk#7]
Input [7]: [ss_item_sk#1, ss_customer_sk#2, ss_ticket_number#3, ss_quantity#4, ss_wholesale_cost#5, ss_sales_price#6, ss_sold_date_sk#7]

(4) WholeStageCodegenTransformer (2)
Input [8]: [hash_partition_key#9, ss_item_sk#1, ss_customer_sk#2, ss_ticket_number#3, ss_quantity#4, ss_wholesale_cost#5, ss_sales_price#6, ss_sold_date_sk#7]
Arguments: false

(5) VeloxResizeBatches
Input [8]: [hash_partition_key#9, ss_item_sk#1, ss_customer_sk#2, ss_ticket_number#3, ss_quantity#4, ss_wholesale_cost#5, ss_sales_price#6, ss_sold_date_sk#7]
Arguments: 1024, 2147483647, 10485760

(6) ColumnarExchange
Input [8]: [hash_partition_key#9, ss_item_sk#1, ss_customer_sk#2, ss_ticket_number#3, ss_quantity#4, ss_wholesale_cost#5, ss_sales_price#6, ss_sold_date_sk#7]
Arguments: hashpartitioning(ss_ticket_number#3, ss_item_sk#1, 1), ENSURE_REQUIREMENTS, [ss_item_sk#1, ss_customer_sk#2, ss_ticket_number#3, ss_quantity#4, ss_wholesale_cost#5, ss_sales_price#6, ss_sold_date_sk#7], [plan_id=1], [shuffle_writer_type=hash]

(7) InputAdapter
Input [7]: [ss_item_sk#1, ss_customer_sk#2, ss_ticket_number#3, ss_quantity#4, ss_wholesale_cost#5, ss_sales_price#6, ss_sold_date_sk#7]

(8) InputIteratorTransformer
Input [7]: [ss_item_sk#1, ss_customer_sk#2, ss_ticket_number#3, ss_quantity#4, ss_wholesale_cost#5, ss_sales_price#6, ss_sold_date_sk#7]

(9) FileSourceScanExecTransformer parquet spark_catalog.default.store_returns
Output [3]: [sr_item_sk#10, sr_ticket_number#11, sr_returned_date_sk#12]
Batched: true
Location: CatalogFileIndex [{warehouse_dir}/store_returns]
PushedFilters: [IsNotNull(sr_ticket_number), IsNotNull(sr_item_sk)]
ReadSchema: struct<sr_item_sk:int,sr_ticket_number:int>

(10) FilterExecTransformer
Input [3]: [sr_item_sk#10, sr_ticket_number#11, sr_returned_date_sk#12]
Arguments: (isnotnull(sr_ticket_number#11) AND isnotnull(sr_item_sk#10))

(11) ProjectExecTransformer
Output [3]: [hash(sr_ticket_number#11, sr_item_sk#10, 42) AS hash_partition_key#13, sr_item_sk#10, sr_ticket_number#11]
Input [3]: [sr_item_sk#10, sr_ticket_number#11, sr_returned_date_sk#12]

(12) WholeStageCodegenTransformer (3)
Input [3]: [hash_partition_key#13, sr_item_sk#10, sr_ticket_number#11]
Arguments: false

(13) VeloxResizeBatches
Input [3]: [hash_partition_key#13, sr_item_sk#10, sr_ticket_number#11]
Arguments: 1024, 2147483647, 10485760

(14) ColumnarExchange
Input [3]: [hash_partition_key#13, sr_item_sk#10, sr_ticket_number#11]
Arguments: hashpartitioning(sr_ticket_number#11, sr_item_sk#10, 1), ENSURE_REQUIREMENTS, [sr_item_sk#10, sr_ticket_number#11], [plan_id=2], [shuffle_writer_type=hash]

(15) InputAdapter
Input [2]: [sr_item_sk#10, sr_ticket_number#11]

(16) InputIteratorTransformer
Input [2]: [sr_item_sk#10, sr_ticket_number#11]

(17) ShuffledHashJoinExecTransformer
Left keys [2]: [ss_ticket_number#3, ss_item_sk#1]
Right keys [2]: [sr_ticket_number#11, sr_item_sk#10]
Join type: LeftOuter
Join condition: None

(18) FilterExecTransformer
Input [9]: [ss_item_sk#1, ss_customer_sk#2, ss_ticket_number#3, ss_quantity#4, ss_wholesale_cost#5, ss_sales_price#6, ss_sold_date_sk#7, sr_item_sk#10, sr_ticket_number#11]
Arguments: isnull(sr_ticket_number#11)

(19) ProjectExecTransformer
Output [6]: [ss_item_sk#1, ss_customer_sk#2, ss_quantity#4, ss_wholesale_cost#5, ss_sales_price#6, ss_sold_date_sk#7]
Input [9]: [ss_item_sk#1, ss_customer_sk#2, ss_ticket_number#3, ss_quantity#4, ss_wholesale_cost#5, ss_sales_price#6, ss_sold_date_sk#7, sr_item_sk#10, sr_ticket_number#11]

(20) ReusedExchange [Reuses operator id: 112]
Output [2]: [d_date_sk#14, d_year#15]

(21) InputAdapter
Input [2]: [d_date_sk#14, d_year#15]

(22) InputIteratorTransformer
Input [2]: [d_date_sk#14, d_year#15]

(23) BroadcastHashJoinExecTransformer
Left keys [1]: [ss_sold_date_sk#7]
Right keys [1]: [d_date_sk#14]
Join type: Inner
Join condition: None

(24) ProjectExecTransformer
Output [6]: [ss_item_sk#1, ss_customer_sk#2, ss_quantity#4, d_year#15, UnscaledValue(ss_wholesale_cost#5) AS _pre_1#16, UnscaledValue(ss_sales_price#6) AS _pre_2#17]
Input [8]: [ss_item_sk#1, ss_customer_sk#2, ss_quantity#4, ss_wholesale_cost#5, ss_sales_price#6, ss_sold_date_sk#7, d_date_sk#14, d_year#15]

(25) FlushableHashAggregateExecTransformer
Input [6]: [ss_item_sk#1, ss_customer_sk#2, ss_quantity#4, d_year#15, _pre_1#16, _pre_2#17]
Keys [3]: [d_year#15, ss_item_sk#1, ss_customer_sk#2]
Functions [3]: [partial_sum(ss_quantity#4), partial_sum(_pre_1#16), partial_sum(_pre_2#17)]
Aggregate Attributes [3]: [sum#18, sum#19, sum#20]
Results [6]: [d_year#15, ss_item_sk#1, ss_customer_sk#2, sum#21, sum#22, sum#23]

(26) ProjectExecTransformer
Output [7]: [hash(d_year#15, ss_item_sk#1, ss_customer_sk#2, 42) AS hash_partition_key#24, d_year#15, ss_item_sk#1, ss_customer_sk#2, sum#21, sum#22, sum#23]
Input [6]: [d_year#15, ss_item_sk#1, ss_customer_sk#2, sum#21, sum#22, sum#23]

(27) WholeStageCodegenTransformer (5)
Input [7]: [hash_partition_key#24, d_year#15, ss_item_sk#1, ss_customer_sk#2, sum#21, sum#22, sum#23]
Arguments: false

(28) VeloxResizeBatches
Input [7]: [hash_partition_key#24, d_year#15, ss_item_sk#1, ss_customer_sk#2, sum#21, sum#22, sum#23]
Arguments: 1024, 2147483647, 10485760

(29) ColumnarExchange
Input [7]: [hash_partition_key#24, d_year#15, ss_item_sk#1, ss_customer_sk#2, sum#21, sum#22, sum#23]
Arguments: hashpartitioning(d_year#15, ss_item_sk#1, ss_customer_sk#2, 1), ENSURE_REQUIREMENTS, [d_year#15, ss_item_sk#1, ss_customer_sk#2, sum#21, sum#22, sum#23], [plan_id=3], [shuffle_writer_type=hash]

(30) InputAdapter
Input [6]: [d_year#15, ss_item_sk#1, ss_customer_sk#2, sum#21, sum#22, sum#23]

(31) InputIteratorTransformer
Input [6]: [d_year#15, ss_item_sk#1, ss_customer_sk#2, sum#21, sum#22, sum#23]

(32) RegularHashAggregateExecTransformer
Input [6]: [d_year#15, ss_item_sk#1, ss_customer_sk#2, sum#21, sum#22, sum#23]
Keys [3]: [d_year#15, ss_item_sk#1, ss_customer_sk#2]
Functions [3]: [sum(ss_quantity#4), sum(UnscaledValue(ss_wholesale_cost#5)), sum(UnscaledValue(ss_sales_price#6))]
Aggregate Attributes [3]: [sum(ss_quantity#4)#25, sum(UnscaledValue(ss_wholesale_cost#5))#26, sum(UnscaledValue(ss_sales_price#6))#27]
Results [6]: [d_year#15, ss_item_sk#1, ss_customer_sk#2, sum(ss_quantity#4)#25, sum(UnscaledValue(ss_wholesale_cost#5))#26, sum(UnscaledValue(ss_sales_price#6))#27]

(33) ProjectExecTransformer
Output [6]: [d_year#15 AS ss_sold_year#28, ss_item_sk#1, ss_customer_sk#2, sum(ss_quantity#4)#25 AS ss_qty#29, MakeDecimal(sum(UnscaledValue(ss_wholesale_cost#5))#26,17,2) AS ss_wc#30, MakeDecimal(sum(UnscaledValue(ss_sales_price#6))#27,17,2) AS ss_sp#31]
Input [6]: [d_year#15, ss_item_sk#1, ss_customer_sk#2, sum(ss_quantity#4)#25, sum(UnscaledValue(ss_wholesale_cost#5))#26, sum(UnscaledValue(ss_sales_price#6))#27]

(34) FileSourceScanExecTransformer parquet spark_catalog.default.web_sales
Output [7]: [ws_item_sk#32, ws_bill_customer_sk#33, ws_order_number#34, ws_quantity#35, ws_wholesale_cost#36, ws_sales_price#37, ws_sold_date_sk#38]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(ws_sold_date_sk#38), dynamicpruningexpression(ws_sold_date_sk#38 IN dynamicpruning#8)]
PushedFilters: [IsNotNull(ws_item_sk), IsNotNull(ws_bill_customer_sk)]
ReadSchema: struct<ws_item_sk:int,ws_bill_customer_sk:int,ws_order_number:int,ws_quantity:int,ws_wholesale_cost:decimal(7,2),ws_sales_price:decimal(7,2)>

(35) FilterExecTransformer
Input [7]: [ws_item_sk#32, ws_bill_customer_sk#33, ws_order_number#34, ws_quantity#35, ws_wholesale_cost#36, ws_sales_price#37, ws_sold_date_sk#38]
Arguments: (isnotnull(ws_item_sk#32) AND isnotnull(ws_bill_customer_sk#33))

(36) ProjectExecTransformer
Output [8]: [hash(ws_order_number#34, ws_item_sk#32, 42) AS hash_partition_key#39, ws_item_sk#32, ws_bill_customer_sk#33, ws_order_number#34, ws_quantity#35, ws_wholesale_cost#36, ws_sales_price#37, ws_sold_date_sk#38]
Input [7]: [ws_item_sk#32, ws_bill_customer_sk#33, ws_order_number#34, ws_quantity#35, ws_wholesale_cost#36, ws_sales_price#37, ws_sold_date_sk#38]

(37) WholeStageCodegenTransformer (7)
Input [8]: [hash_partition_key#39, ws_item_sk#32, ws_bill_customer_sk#33, ws_order_number#34, ws_quantity#35, ws_wholesale_cost#36, ws_sales_price#37, ws_sold_date_sk#38]
Arguments: false

(38) VeloxResizeBatches
Input [8]: [hash_partition_key#39, ws_item_sk#32, ws_bill_customer_sk#33, ws_order_number#34, ws_quantity#35, ws_wholesale_cost#36, ws_sales_price#37, ws_sold_date_sk#38]
Arguments: 1024, 2147483647, 10485760

(39) ColumnarExchange
Input [8]: [hash_partition_key#39, ws_item_sk#32, ws_bill_customer_sk#33, ws_order_number#34, ws_quantity#35, ws_wholesale_cost#36, ws_sales_price#37, ws_sold_date_sk#38]
Arguments: hashpartitioning(ws_order_number#34, ws_item_sk#32, 1), ENSURE_REQUIREMENTS, [ws_item_sk#32, ws_bill_customer_sk#33, ws_order_number#34, ws_quantity#35, ws_wholesale_cost#36, ws_sales_price#37, ws_sold_date_sk#38], [plan_id=4], [shuffle_writer_type=hash]

(40) InputAdapter
Input [7]: [ws_item_sk#32, ws_bill_customer_sk#33, ws_order_number#34, ws_quantity#35, ws_wholesale_cost#36, ws_sales_price#37, ws_sold_date_sk#38]

(41) InputIteratorTransformer
Input [7]: [ws_item_sk#32, ws_bill_customer_sk#33, ws_order_number#34, ws_quantity#35, ws_wholesale_cost#36, ws_sales_price#37, ws_sold_date_sk#38]

(42) FileSourceScanExecTransformer parquet spark_catalog.default.web_returns
Output [3]: [wr_item_sk#40, wr_order_number#41, wr_returned_date_sk#42]
Batched: true
Location: CatalogFileIndex [{warehouse_dir}/web_returns]
PushedFilters: [IsNotNull(wr_order_number), IsNotNull(wr_item_sk)]
ReadSchema: struct<wr_item_sk:int,wr_order_number:int>

(43) FilterExecTransformer
Input [3]: [wr_item_sk#40, wr_order_number#41, wr_returned_date_sk#42]
Arguments: (isnotnull(wr_order_number#41) AND isnotnull(wr_item_sk#40))

(44) ProjectExecTransformer
Output [3]: [hash(wr_order_number#41, wr_item_sk#40, 42) AS hash_partition_key#43, wr_item_sk#40, wr_order_number#41]
Input [3]: [wr_item_sk#40, wr_order_number#41, wr_returned_date_sk#42]

(45) WholeStageCodegenTransformer (8)
Input [3]: [hash_partition_key#43, wr_item_sk#40, wr_order_number#41]
Arguments: false

(46) VeloxResizeBatches
Input [3]: [hash_partition_key#43, wr_item_sk#40, wr_order_number#41]
Arguments: 1024, 2147483647, 10485760

(47) ColumnarExchange
Input [3]: [hash_partition_key#43, wr_item_sk#40, wr_order_number#41]
Arguments: hashpartitioning(wr_order_number#41, wr_item_sk#40, 1), ENSURE_REQUIREMENTS, [wr_item_sk#40, wr_order_number#41], [plan_id=5], [shuffle_writer_type=hash]

(48) InputAdapter
Input [2]: [wr_item_sk#40, wr_order_number#41]

(49) InputIteratorTransformer
Input [2]: [wr_item_sk#40, wr_order_number#41]

(50) ShuffledHashJoinExecTransformer
Left keys [2]: [ws_order_number#34, ws_item_sk#32]
Right keys [2]: [wr_order_number#41, wr_item_sk#40]
Join type: LeftOuter
Join condition: None

(51) FilterExecTransformer
Input [9]: [ws_item_sk#32, ws_bill_customer_sk#33, ws_order_number#34, ws_quantity#35, ws_wholesale_cost#36, ws_sales_price#37, ws_sold_date_sk#38, wr_item_sk#40, wr_order_number#41]
Arguments: isnull(wr_order_number#41)

(52) ProjectExecTransformer
Output [6]: [ws_item_sk#32, ws_bill_customer_sk#33, ws_quantity#35, ws_wholesale_cost#36, ws_sales_price#37, ws_sold_date_sk#38]
Input [9]: [ws_item_sk#32, ws_bill_customer_sk#33, ws_order_number#34, ws_quantity#35, ws_wholesale_cost#36, ws_sales_price#37, ws_sold_date_sk#38, wr_item_sk#40, wr_order_number#41]

(53) ReusedExchange [Reuses operator id: 112]
Output [2]: [d_date_sk#44, d_year#45]

(54) InputAdapter
Input [2]: [d_date_sk#44, d_year#45]

(55) InputIteratorTransformer
Input [2]: [d_date_sk#44, d_year#45]

(56) BroadcastHashJoinExecTransformer
Left keys [1]: [ws_sold_date_sk#38]
Right keys [1]: [d_date_sk#44]
Join type: Inner
Join condition: None

(57) ProjectExecTransformer
Output [6]: [ws_item_sk#32, ws_bill_customer_sk#33, ws_quantity#35, d_year#45, UnscaledValue(ws_wholesale_cost#36) AS _pre_3#46, UnscaledValue(ws_sales_price#37) AS _pre_4#47]
Input [8]: [ws_item_sk#32, ws_bill_customer_sk#33, ws_quantity#35, ws_wholesale_cost#36, ws_sales_price#37, ws_sold_date_sk#38, d_date_sk#44, d_year#45]

(58) FlushableHashAggregateExecTransformer
Input [6]: [ws_item_sk#32, ws_bill_customer_sk#33, ws_quantity#35, d_year#45, _pre_3#46, _pre_4#47]
Keys [3]: [d_year#45, ws_item_sk#32, ws_bill_customer_sk#33]
Functions [3]: [partial_sum(ws_quantity#35), partial_sum(_pre_3#46), partial_sum(_pre_4#47)]
Aggregate Attributes [3]: [sum#48, sum#49, sum#50]
Results [6]: [d_year#45, ws_item_sk#32, ws_bill_customer_sk#33, sum#51, sum#52, sum#53]

(59) ProjectExecTransformer
Output [7]: [hash(d_year#45, ws_item_sk#32, ws_bill_customer_sk#33, 42) AS hash_partition_key#54, d_year#45, ws_item_sk#32, ws_bill_customer_sk#33, sum#51, sum#52, sum#53]
Input [6]: [d_year#45, ws_item_sk#32, ws_bill_customer_sk#33, sum#51, sum#52, sum#53]

(60) WholeStageCodegenTransformer (10)
Input [7]: [hash_partition_key#54, d_year#45, ws_item_sk#32, ws_bill_customer_sk#33, sum#51, sum#52, sum#53]
Arguments: false

(61) VeloxResizeBatches
Input [7]: [hash_partition_key#54, d_year#45, ws_item_sk#32, ws_bill_customer_sk#33, sum#51, sum#52, sum#53]
Arguments: 1024, 2147483647, 10485760

(62) ColumnarExchange
Input [7]: [hash_partition_key#54, d_year#45, ws_item_sk#32, ws_bill_customer_sk#33, sum#51, sum#52, sum#53]
Arguments: hashpartitioning(d_year#45, ws_item_sk#32, ws_bill_customer_sk#33, 1), ENSURE_REQUIREMENTS, [d_year#45, ws_item_sk#32, ws_bill_customer_sk#33, sum#51, sum#52, sum#53], [plan_id=6], [shuffle_writer_type=hash]

(63) InputAdapter
Input [6]: [d_year#45, ws_item_sk#32, ws_bill_customer_sk#33, sum#51, sum#52, sum#53]

(64) InputIteratorTransformer
Input [6]: [d_year#45, ws_item_sk#32, ws_bill_customer_sk#33, sum#51, sum#52, sum#53]

(65) RegularHashAggregateExecTransformer
Input [6]: [d_year#45, ws_item_sk#32, ws_bill_customer_sk#33, sum#51, sum#52, sum#53]
Keys [3]: [d_year#45, ws_item_sk#32, ws_bill_customer_sk#33]
Functions [3]: [sum(ws_quantity#35), sum(UnscaledValue(ws_wholesale_cost#36)), sum(UnscaledValue(ws_sales_price#37))]
Aggregate Attributes [3]: [sum(ws_quantity#35)#55, sum(UnscaledValue(ws_wholesale_cost#36))#56, sum(UnscaledValue(ws_sales_price#37))#57]
Results [6]: [d_year#45, ws_item_sk#32, ws_bill_customer_sk#33, sum(ws_quantity#35)#55, sum(UnscaledValue(ws_wholesale_cost#36))#56, sum(UnscaledValue(ws_sales_price#37))#57]

(66) ProjectExecTransformer
Output [6]: [d_year#45 AS ws_sold_year#58, ws_item_sk#32, ws_bill_customer_sk#33 AS ws_customer_sk#59, sum(ws_quantity#35)#55 AS ws_qty#60, MakeDecimal(sum(UnscaledValue(ws_wholesale_cost#36))#56,17,2) AS ws_wc#61, MakeDecimal(sum(UnscaledValue(ws_sales_price#37))#57,17,2) AS ws_sp#62]
Input [6]: [d_year#45, ws_item_sk#32, ws_bill_customer_sk#33, sum(ws_quantity#35)#55, sum(UnscaledValue(ws_wholesale_cost#36))#56, sum(UnscaledValue(ws_sales_price#37))#57]

(67) FilterExecTransformer
Input [6]: [ws_sold_year#58, ws_item_sk#32, ws_customer_sk#59, ws_qty#60, ws_wc#61, ws_sp#62]
Arguments: (coalesce(ws_qty#60, 0) > 0)

(68) ShuffledHashJoinExecTransformer
Left keys [3]: [ss_sold_year#28, ss_item_sk#1, ss_customer_sk#2]
Right keys [3]: [ws_sold_year#58, ws_item_sk#32, ws_customer_sk#59]
Join type: Inner
Join condition: None

(69) ProjectExecTransformer
Output [9]: [ss_sold_year#28, ss_item_sk#1, ss_customer_sk#2, ss_qty#29, ss_wc#30, ss_sp#31, ws_qty#60, ws_wc#61, ws_sp#62]
Input [12]: [ss_sold_year#28, ss_item_sk#1, ss_customer_sk#2, ss_qty#29, ss_wc#30, ss_sp#31, ws_sold_year#58, ws_item_sk#32, ws_customer_sk#59, ws_qty#60, ws_wc#61, ws_sp#62]

(70) FileSourceScanExecTransformer parquet spark_catalog.default.catalog_sales
Output [7]: [cs_bill_customer_sk#63, cs_item_sk#64, cs_order_number#65, cs_quantity#66, cs_wholesale_cost#67, cs_sales_price#68, cs_sold_date_sk#69]
Batched: true
Location: InMemoryFileIndex []
PartitionFilters: [isnotnull(cs_sold_date_sk#69), dynamicpruningexpression(cs_sold_date_sk#69 IN dynamicpruning#8)]
PushedFilters: [IsNotNull(cs_item_sk), IsNotNull(cs_bill_customer_sk)]
ReadSchema: struct<cs_bill_customer_sk:int,cs_item_sk:int,cs_order_number:int,cs_quantity:int,cs_wholesale_cost:decimal(7,2),cs_sales_price:decimal(7,2)>

(71) FilterExecTransformer
Input [7]: [cs_bill_customer_sk#63, cs_item_sk#64, cs_order_number#65, cs_quantity#66, cs_wholesale_cost#67, cs_sales_price#68, cs_sold_date_sk#69]
Arguments: (isnotnull(cs_item_sk#64) AND isnotnull(cs_bill_customer_sk#63))

(72) ProjectExecTransformer
Output [8]: [hash(cs_order_number#65, cs_item_sk#64, 42) AS hash_partition_key#70, cs_bill_customer_sk#63, cs_item_sk#64, cs_order_number#65, cs_quantity#66, cs_wholesale_cost#67, cs_sales_price#68, cs_sold_date_sk#69]
Input [7]: [cs_bill_customer_sk#63, cs_item_sk#64, cs_order_number#65, cs_quantity#66, cs_wholesale_cost#67, cs_sales_price#68, cs_sold_date_sk#69]

(73) WholeStageCodegenTransformer (12)
Input [8]: [hash_partition_key#70, cs_bill_customer_sk#63, cs_item_sk#64, cs_order_number#65, cs_quantity#66, cs_wholesale_cost#67, cs_sales_price#68, cs_sold_date_sk#69]
Arguments: false

(74) VeloxResizeBatches
Input [8]: [hash_partition_key#70, cs_bill_customer_sk#63, cs_item_sk#64, cs_order_number#65, cs_quantity#66, cs_wholesale_cost#67, cs_sales_price#68, cs_sold_date_sk#69]
Arguments: 1024, 2147483647, 10485760

(75) ColumnarExchange
Input [8]: [hash_partition_key#70, cs_bill_customer_sk#63, cs_item_sk#64, cs_order_number#65, cs_quantity#66, cs_wholesale_cost#67, cs_sales_price#68, cs_sold_date_sk#69]
Arguments: hashpartitioning(cs_order_number#65, cs_item_sk#64, 1), ENSURE_REQUIREMENTS, [cs_bill_customer_sk#63, cs_item_sk#64, cs_order_number#65, cs_quantity#66, cs_wholesale_cost#67, cs_sales_price#68, cs_sold_date_sk#69], [plan_id=7], [shuffle_writer_type=hash]

(76) InputAdapter
Input [7]: [cs_bill_customer_sk#63, cs_item_sk#64, cs_order_number#65, cs_quantity#66, cs_wholesale_cost#67, cs_sales_price#68, cs_sold_date_sk#69]

(77) InputIteratorTransformer
Input [7]: [cs_bill_customer_sk#63, cs_item_sk#64, cs_order_number#65, cs_quantity#66, cs_wholesale_cost#67, cs_sales_price#68, cs_sold_date_sk#69]

(78) FileSourceScanExecTransformer parquet spark_catalog.default.catalog_returns
Output [3]: [cr_item_sk#71, cr_order_number#72, cr_returned_date_sk#73]
Batched: true
Location: CatalogFileIndex [{warehouse_dir}/catalog_returns]
PushedFilters: [IsNotNull(cr_order_number), IsNotNull(cr_item_sk)]
ReadSchema: struct<cr_item_sk:int,cr_order_number:int>

(79) FilterExecTransformer
Input [3]: [cr_item_sk#71, cr_order_number#72, cr_returned_date_sk#73]
Arguments: (isnotnull(cr_order_number#72) AND isnotnull(cr_item_sk#71))

(80) ProjectExecTransformer
Output [3]: [hash(cr_order_number#72, cr_item_sk#71, 42) AS hash_partition_key#74, cr_item_sk#71, cr_order_number#72]
Input [3]: [cr_item_sk#71, cr_order_number#72, cr_returned_date_sk#73]

(81) WholeStageCodegenTransformer (13)
Input [3]: [hash_partition_key#74, cr_item_sk#71, cr_order_number#72]
Arguments: false

(82) VeloxResizeBatches
Input [3]: [hash_partition_key#74, cr_item_sk#71, cr_order_number#72]
Arguments: 1024, 2147483647, 10485760

(83) ColumnarExchange
Input [3]: [hash_partition_key#74, cr_item_sk#71, cr_order_number#72]
Arguments: hashpartitioning(cr_order_number#72, cr_item_sk#71, 1), ENSURE_REQUIREMENTS, [cr_item_sk#71, cr_order_number#72], [plan_id=8], [shuffle_writer_type=hash]

(84) InputAdapter
Input [2]: [cr_item_sk#71, cr_order_number#72]

(85) InputIteratorTransformer
Input [2]: [cr_item_sk#71, cr_order_number#72]

(86) ShuffledHashJoinExecTransformer
Left keys [2]: [cs_order_number#65, cs_item_sk#64]
Right keys [2]: [cr_order_number#72, cr_item_sk#71]
Join type: LeftOuter
Join condition: None

(87) FilterExecTransformer
Input [9]: [cs_bill_customer_sk#63, cs_item_sk#64, cs_order_number#65, cs_quantity#66, cs_wholesale_cost#67, cs_sales_price#68, cs_sold_date_sk#69, cr_item_sk#71, cr_order_number#72]
Arguments: isnull(cr_order_number#72)

(88) ProjectExecTransformer
Output [6]: [cs_bill_customer_sk#63, cs_item_sk#64, cs_quantity#66, cs_wholesale_cost#67, cs_sales_price#68, cs_sold_date_sk#69]
Input [9]: [cs_bill_customer_sk#63, cs_item_sk#64, cs_order_number#65, cs_quantity#66, cs_wholesale_cost#67, cs_sales_price#68, cs_sold_date_sk#69, cr_item_sk#71, cr_order_number#72]

(89) ReusedExchange [Reuses operator id: 112]
Output [2]: [d_date_sk#75, d_year#76]

(90) InputAdapter
Input [2]: [d_date_sk#75, d_year#76]

(91) InputIteratorTransformer
Input [2]: [d_date_sk#75, d_year#76]

(92) BroadcastHashJoinExecTransformer
Left keys [1]: [cs_sold_date_sk#69]
Right keys [1]: [d_date_sk#75]
Join type: Inner
Join condition: None

(93) ProjectExecTransformer
Output [6]: [cs_bill_customer_sk#63, cs_item_sk#64, cs_quantity#66, d_year#76, UnscaledValue(cs_wholesale_cost#67) AS _pre_5#77, UnscaledValue(cs_sales_price#68) AS _pre_6#78]
Input [8]: [cs_bill_customer_sk#63, cs_item_sk#64, cs_quantity#66, cs_wholesale_cost#67, cs_sales_price#68, cs_sold_date_sk#69, d_date_sk#75, d_year#76]

(94) FlushableHashAggregateExecTransformer
Input [6]: [cs_bill_customer_sk#63, cs_item_sk#64, cs_quantity#66, d_year#76, _pre_5#77, _pre_6#78]
Keys [3]: [d_year#76, cs_item_sk#64, cs_bill_customer_sk#63]
Functions [3]: [partial_sum(cs_quantity#66), partial_sum(_pre_5#77), partial_sum(_pre_6#78)]
Aggregate Attributes [3]: [sum#79, sum#80, sum#81]
Results [6]: [d_year#76, cs_item_sk#64, cs_bill_customer_sk#63, sum#82, sum#83, sum#84]

(95) ProjectExecTransformer
Output [7]: [hash(d_year#76, cs_item_sk#64, cs_bill_customer_sk#63, 42) AS hash_partition_key#85, d_year#76, cs_item_sk#64, cs_bill_customer_sk#63, sum#82, sum#83, sum#84]
Input [6]: [d_year#76, cs_item_sk#64, cs_bill_customer_sk#63, sum#82, sum#83, sum#84]

(96) WholeStageCodegenTransformer (15)
Input [7]: [hash_partition_key#85, d_year#76, cs_item_sk#64, cs_bill_customer_sk#63, sum#82, sum#83, sum#84]
Arguments: false

(97) VeloxResizeBatches
Input [7]: [hash_partition_key#85, d_year#76, cs_item_sk#64, cs_bill_customer_sk#63, sum#82, sum#83, sum#84]
Arguments: 1024, 2147483647, 10485760

(98) ColumnarExchange
Input [7]: [hash_partition_key#85, d_year#76, cs_item_sk#64, cs_bill_customer_sk#63, sum#82, sum#83, sum#84]
Arguments: hashpartitioning(d_year#76, cs_item_sk#64, cs_bill_customer_sk#63, 1), ENSURE_REQUIREMENTS, [d_year#76, cs_item_sk#64, cs_bill_customer_sk#63, sum#82, sum#83, sum#84], [plan_id=9], [shuffle_writer_type=hash]

(99) InputAdapter
Input [6]: [d_year#76, cs_item_sk#64, cs_bill_customer_sk#63, sum#82, sum#83, sum#84]

(100) InputIteratorTransformer
Input [6]: [d_year#76, cs_item_sk#64, cs_bill_customer_sk#63, sum#82, sum#83, sum#84]

(101) RegularHashAggregateExecTransformer
Input [6]: [d_year#76, cs_item_sk#64, cs_bill_customer_sk#63, sum#82, sum#83, sum#84]
Keys [3]: [d_year#76, cs_item_sk#64, cs_bill_customer_sk#63]
Functions [3]: [sum(cs_quantity#66), sum(UnscaledValue(cs_wholesale_cost#67)), sum(UnscaledValue(cs_sales_price#68))]
Aggregate Attributes [3]: [sum(cs_quantity#66)#86, sum(UnscaledValue(cs_wholesale_cost#67))#87, sum(UnscaledValue(cs_sales_price#68))#88]
Results [6]: [d_year#76, cs_item_sk#64, cs_bill_customer_sk#63, sum(cs_quantity#66)#86, sum(UnscaledValue(cs_wholesale_cost#67))#87, sum(UnscaledValue(cs_sales_price#68))#88]

(102) ProjectExecTransformer
Output [6]: [d_year#76 AS cs_sold_year#89, cs_item_sk#64, cs_bill_customer_sk#63 AS cs_customer_sk#90, sum(cs_quantity#66)#86 AS cs_qty#91, MakeDecimal(sum(UnscaledValue(cs_wholesale_cost#67))#87,17,2) AS cs_wc#92, MakeDecimal(sum(UnscaledValue(cs_sales_price#68))#88,17,2) AS cs_sp#93]
Input [6]: [d_year#76, cs_item_sk#64, cs_bill_customer_sk#63, sum(cs_quantity#66)#86, sum(UnscaledValue(cs_wholesale_cost#67))#87, sum(UnscaledValue(cs_sales_price#68))#88]

(103) FilterExecTransformer
Input [6]: [cs_sold_year#89, cs_item_sk#64, cs_customer_sk#90, cs_qty#91, cs_wc#92, cs_sp#93]
Arguments: (coalesce(cs_qty#91, 0) > 0)

(104) ShuffledHashJoinExecTransformer
Left keys [3]: [ss_sold_year#28, ss_item_sk#1, ss_customer_sk#2]
Right keys [3]: [cs_sold_year#89, cs_item_sk#64, cs_customer_sk#90]
Join type: Inner
Join condition: None

(105) ProjectExecTransformer
Output [13]: [round((cast(ss_qty#29 as double) / cast(coalesce((ws_qty#60 + cs_qty#91), 1) as double)), 2) AS ratio#94, ss_qty#29 AS store_qty#95, ss_wc#30 AS store_wholesale_cost#96, ss_sp#31 AS store_sales_price#97, (coalesce(ws_qty#60, 0) + coalesce(cs_qty#91, 0)) AS other_chan_qty#98, (coalesce(ws_wc#61, 0.00) + coalesce(cs_wc#92, 0.00)) AS other_chan_wholesale_cost#99, (coalesce(ws_sp#62, 0.00) + coalesce(cs_sp#93, 0.00)) AS other_chan_sales_price#100, ss_qty#29, ss_wc#30, ss_sp#31, ws_qty#60, cs_qty#91, round((cast(ss_qty#29 as double) / cast(coalesce((ws_qty#60 + cs_qty#91), 1) as double)), 2) AS _pre_7#101]
Input [15]: [ss_sold_year#28, ss_item_sk#1, ss_customer_sk#2, ss_qty#29, ss_wc#30, ss_sp#31, ws_qty#60, ws_wc#61, ws_sp#62, cs_sold_year#89, cs_item_sk#64, cs_customer_sk#90, cs_qty#91, cs_wc#92, cs_sp#93]

(106) WholeStageCodegenTransformer (16)
Input [13]: [ratio#94, store_qty#95, store_wholesale_cost#96, store_sales_price#97, other_chan_qty#98, other_chan_wholesale_cost#99, other_chan_sales_price#100, ss_qty#29, ss_wc#30, ss_sp#31, ws_qty#60, cs_qty#91, _pre_7#101]
Arguments: false

(107) TakeOrderedAndProjectExecTransformer
Input [13]: [ratio#94, store_qty#95, store_wholesale_cost#96, store_sales_price#97, other_chan_qty#98, other_chan_wholesale_cost#99, other_chan_sales_price#100, ss_qty#29, ss_wc#30, ss_sp#31, ws_qty#60, cs_qty#91, _pre_7#101]
Arguments: 100, [ratio#94 ASC NULLS FIRST, ss_qty#29 DESC NULLS LAST, ss_wc#30 DESC NULLS LAST, ss_sp#31 DESC NULLS LAST, other_chan_qty#98 ASC NULLS FIRST, other_chan_wholesale_cost#99 ASC NULLS FIRST, other_chan_sales_price#100 ASC NULLS FIRST, _pre_7#101 ASC NULLS FIRST], [ratio#94, store_qty#95, store_wholesale_cost#96, store_sales_price#97, other_chan_qty#98, other_chan_wholesale_cost#99, other_chan_sales_price#100], 0

(108) VeloxColumnarToRow
Input [7]: [ratio#94, store_qty#95, store_wholesale_cost#96, store_sales_price#97, other_chan_qty#98, other_chan_wholesale_cost#99, other_chan_sales_price#100]

===== Subqueries =====

Subquery:1 Hosting operator id = 1 Hosting Expression = ss_sold_date_sk#7 IN dynamicpruning#8
ColumnarBroadcastExchange (112)
+- ^ FilterExecTransformer (110)
   +- ^ FileSourceScanExecTransformer parquet spark_catalog.default.date_dim (109)


(109) FileSourceScanExecTransformer parquet spark_catalog.default.date_dim
Output [2]: [d_date_sk#14, d_year#15]
Batched: true
Location: InMemoryFileIndex [{warehouse_dir}/date_dim]
PushedFilters: [IsNotNull(d_year), EqualTo(d_year,2000), IsNotNull(d_date_sk)]
ReadSchema: struct<d_date_sk:int,d_year:int>

(110) FilterExecTransformer
Input [2]: [d_date_sk#14, d_year#15]
Arguments: ((isnotnull(d_year#15) AND (d_year#15 = 2000)) AND isnotnull(d_date_sk#14))

(111) WholeStageCodegenTransformer (1)
Input [2]: [d_date_sk#14, d_year#15]
Arguments: false

(112) ColumnarBroadcastExchange
Input [2]: [d_date_sk#14, d_year#15]
Arguments: HashedRelationBroadcastMode(List(cast(input[0, int, false] as bigint)),false), [plan_id=10]

Subquery:2 Hosting operator id = 34 Hosting Expression = ws_sold_date_sk#38 IN dynamicpruning#8

Subquery:3 Hosting operator id = 70 Hosting Expression = cs_sold_date_sk#69 IN dynamicpruning#8


