== Physical Plan ==
AdaptiveSparkPlan (19)
+- == Final Plan ==
ResultQueryStage (13), Statistics(sizeInBytes=8.0 EiB)
+- * Sort (12)
+- AQEShuffleRead (11)
+- ShuffleQueryStage (10), Statistics(sizeInBytes=6.6 KiB, rowCount=84)
+- Exchange (9)
+- HashAggregate (8)
+- AQEShuffleRead (7)
+- ShuffleQueryStage (6), Statistics(sizeInBytes=976.5 KiB, rowCount=2.02E+3)
+- Exchange (5)
+- HashAggregate (4)
+- * Project (3)
+- * Project (2)
+- * Range (1)
+- == Initial Plan ==
Sort (18)
+- Exchange (17)
+- HashAggregate (16)
+- Exchange (15)
+- HashAggregate (14)
+- Project (3)
+- Project (2)
+- Range (1)
(1) Range [codegen id : 1]
Output [1]: [id#73477L]
Arguments: Range (11000000, 12000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#73477L % 250000) AS customer_id#73479L, concat(segment-, cast(cast((id#73477L % 12) as int) as string)) AS segment#73483, cast((id#73477L % 14) as int) AS processing_day#73485, ((cast(((id#73477L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#73487, cast((((id#73477L * 29) % 7) + 1) as int) AS events#73489]
Input [1]: [id#73477L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#73479L, segment#73483, processing_day#73485, amount#73487, events#73489, (amount#73487 * cast(events#73489 as double)) AS weighted_amount#73491]
Input [5]: [customer_id#73479L, segment#73483, processing_day#73485, amount#73487, events#73489]
(4) HashAggregate
Input [6]: [customer_id#73479L, segment#73483, processing_day#73485, amount#73487, events#73489, weighted_amount#73491]
Keys [2]: [segment#73483, processing_day#73485]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#73479L, 0.05, 0, 0), partial_sum(events#73489), partial_sum(weighted_amount#73491), partial_avg(amount#73487)]
Aggregate Attributes [57]: [count#73710L, MS[0]#73498L, MS[1]#73499L, MS[2]#73500L, MS[3]#73501L, MS[4]#73502L, MS[5]#73503L, MS[6]#73504L, MS[7]#73505L, MS[8]#73506L, MS[9]#73507L, MS[10]#73508L, MS[11]#73509L, MS[12]#73510L, MS[13]#73511L, MS[14]#73512L, MS[15]#73513L, MS[16]#73514L, MS[17]#73515L, MS[18]#73516L, MS[19]#73517L, MS[20]#73518L, MS[21]#73519L, MS[22]#73520L, MS[23]#73521L, MS[24]#73522L, MS[25]#73523L, MS[26]#73524L, MS[27]#73525L, MS[28]#73526L, MS[29]#73527L, MS[30]#73528L, MS[31]#73529L, MS[32]#73530L, MS[33]#73531L, MS[34]#73532L, MS[35]#73533L, MS[36]#73534L, MS[37]#73535L, MS[38]#73536L, MS[39]#73537L, MS[40]#73538L, MS[41]#73539L, MS[42]#73540L, MS[43]#73541L, MS[44]#73542L, MS[45]#73543L, MS[46]#73544L, MS[47]#73545L, MS[48]#73546L, MS[49]#73547L, MS[50]#73548L, MS[51]#73549L, sum#73711L, sum#73712, sum#73713, count#73714L]
Results [59]: [segment#73483, processing_day#73485, count#73715L, MS[0]#73550L, MS[1]#73551L, MS[2]#73552L, MS[3]#73553L, MS[4]#73554L, MS[5]#73555L, MS[6]#73556L, MS[7]#73557L, MS[8]#73558L, MS[9]#73559L, MS[10]#73560L, MS[11]#73561L, MS[12]#73562L, MS[13]#73563L, MS[14]#73564L, MS[15]#73565L, MS[16]#73566L, MS[17]#73567L, MS[18]#73568L, MS[19]#73569L, MS[20]#73570L, MS[21]#73571L, MS[22]#73572L, MS[23]#73573L, MS[24]#73574L, MS[25]#73575L, MS[26]#73576L, MS[27]#73577L, MS[28]#73578L, MS[29]#73579L, MS[30]#73580L, MS[31]#73581L, MS[32]#73582L, MS[33]#73583L, MS[34]#73584L, MS[35]#73585L, MS[36]#73586L, MS[37]#73587L, MS[38]#73588L, MS[39]#73589L, MS[40]#73590L, MS[41]#73591L, MS[42]#73592L, MS[43]#73593L, MS[44]#73594L, MS[45]#73595L, MS[46]#73596L, MS[47]#73597L, MS[48]#73598L, MS[49]#73599L, MS[50]#73600L, MS[51]#73601L, sum#73716L, sum#73717, sum#73718, count#73719L]
(5) Exchange
Input [59]: [segment#73483, processing_day#73485, count#73715L, MS[0]#73550L, MS[1]#73551L, MS[2]#73552L, MS[3]#73553L, MS[4]#73554L, MS[5]#73555L, MS[6]#73556L, MS[7]#73557L, MS[8]#73558L, MS[9]#73559L, MS[10]#73560L, MS[11]#73561L, MS[12]#73562L, MS[13]#73563L, MS[14]#73564L, MS[15]#73565L, MS[16]#73566L, MS[17]#73567L, MS[18]#73568L, MS[19]#73569L, MS[20]#73570L, MS[21]#73571L, MS[22]#73572L, MS[23]#73573L, MS[24]#73574L, MS[25]#73575L, MS[26]#73576L, MS[27]#73577L, MS[28]#73578L, MS[29]#73579L, MS[30]#73580L, MS[31]#73581L, MS[32]#73582L, MS[33]#73583L, MS[34]#73584L, MS[35]#73585L, MS[36]#73586L, MS[37]#73587L, MS[38]#73588L, MS[39]#73589L, MS[40]#73590L, MS[41]#73591L, MS[42]#73592L, MS[43]#73593L, MS[44]#73594L, MS[45]#73595L, MS[46]#73596L, MS[47]#73597L, MS[48]#73598L, MS[49]#73599L, MS[50]#73600L, MS[51]#73601L, sum#73716L, sum#73717, sum#73718, count#73719L]
Arguments: hashpartitioning(segment#73483, processing_day#73485, 200), ENSURE_REQUIREMENTS, [plan_id=6950]
(6) ShuffleQueryStage
Output [59]: [segment#73483, processing_day#73485, count#73715L, MS[0]#73550L, MS[1]#73551L, MS[2]#73552L, MS[3]#73553L, MS[4]#73554L, MS[5]#73555L, MS[6]#73556L, MS[7]#73557L, MS[8]#73558L, MS[9]#73559L, MS[10]#73560L, MS[11]#73561L, MS[12]#73562L, MS[13]#73563L, MS[14]#73564L, MS[15]#73565L, MS[16]#73566L, MS[17]#73567L, MS[18]#73568L, MS[19]#73569L, MS[20]#73570L, MS[21]#73571L, MS[22]#73572L, MS[23]#73573L, MS[24]#73574L, MS[25]#73575L, MS[26]#73576L, MS[27]#73577L, MS[28]#73578L, MS[29]#73579L, MS[30]#73580L, MS[31]#73581L, MS[32]#73582L, MS[33]#73583L, MS[34]#73584L, MS[35]#73585L, MS[36]#73586L, MS[37]#73587L, MS[38]#73588L, MS[39]#73589L, MS[40]#73590L, MS[41]#73591L, MS[42]#73592L, MS[43]#73593L, MS[44]#73594L, MS[45]#73595L, MS[46]#73596L, MS[47]#73597L, MS[48]#73598L, MS[49]#73599L, MS[50]#73600L, MS[51]#73601L, sum#73716L, sum#73717, sum#73718, count#73719L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#73483, processing_day#73485, count#73715L, MS[0]#73550L, MS[1]#73551L, MS[2]#73552L, MS[3]#73553L, MS[4]#73554L, MS[5]#73555L, MS[6]#73556L, MS[7]#73557L, MS[8]#73558L, MS[9]#73559L, MS[10]#73560L, MS[11]#73561L, MS[12]#73562L, MS[13]#73563L, MS[14]#73564L, MS[15]#73565L, MS[16]#73566L, MS[17]#73567L, MS[18]#73568L, MS[19]#73569L, MS[20]#73570L, MS[21]#73571L, MS[22]#73572L, MS[23]#73573L, MS[24]#73574L, MS[25]#73575L, MS[26]#73576L, MS[27]#73577L, MS[28]#73578L, MS[29]#73579L, MS[30]#73580L, MS[31]#73581L, MS[32]#73582L, MS[33]#73583L, MS[34]#73584L, MS[35]#73585L, MS[36]#73586L, MS[37]#73587L, MS[38]#73588L, MS[39]#73589L, MS[40]#73590L, MS[41]#73591L, MS[42]#73592L, MS[43]#73593L, MS[44]#73594L, MS[45]#73595L, MS[46]#73596L, MS[47]#73597L, MS[48]#73598L, MS[49]#73599L, MS[50]#73600L, MS[51]#73601L, sum#73716L, sum#73717, sum#73718, count#73719L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#73483, processing_day#73485, count#73715L, MS[0]#73550L, MS[1]#73551L, MS[2]#73552L, MS[3]#73553L, MS[4]#73554L, MS[5]#73555L, MS[6]#73556L, MS[7]#73557L, MS[8]#73558L, MS[9]#73559L, MS[10]#73560L, MS[11]#73561L, MS[12]#73562L, MS[13]#73563L, MS[14]#73564L, MS[15]#73565L, MS[16]#73566L, MS[17]#73567L, MS[18]#73568L, MS[19]#73569L, MS[20]#73570L, MS[21]#73571L, MS[22]#73572L, MS[23]#73573L, MS[24]#73574L, MS[25]#73575L, MS[26]#73576L, MS[27]#73577L, MS[28]#73578L, MS[29]#73579L, MS[30]#73580L, MS[31]#73581L, MS[32]#73582L, MS[33]#73583L, MS[34]#73584L, MS[35]#73585L, MS[36]#73586L, MS[37]#73587L, MS[38]#73588L, MS[39]#73589L, MS[40]#73590L, MS[41]#73591L, MS[42]#73592L, MS[43]#73593L, MS[44]#73594L, MS[45]#73595L, MS[46]#73596L, MS[47]#73597L, MS[48]#73598L, MS[49]#73599L, MS[50]#73600L, MS[51]#73601L, sum#73716L, sum#73717, sum#73718, count#73719L]
Keys [2]: [segment#73483, processing_day#73485]
Functions [5]: [count(1), approx_count_distinct(customer_id#73479L, 0.05, 0, 0), sum(events#73489), sum(weighted_amount#73491), avg(amount#73487)]
Aggregate Attributes [5]: [count(1)#73497L, approx_count_distinct(customer_id#73479L, 0.05, 0, 0)#73602L, sum(events#73489)#73603L, sum(weighted_amount#73491)#73604, avg(amount#73487)#73605]
Results [7]: [segment#73483, processing_day#73485, count(1)#73497L AS row_count#73492L, approx_count_distinct(customer_id#73479L, 0.05, 0, 0)#73602L AS unique_customers#73493L, sum(events#73489)#73603L AS event_sum#73494L, sum(weighted_amount#73491)#73604 AS weighted_amount_sum#73495, avg(amount#73487)#73605 AS avg_amount#73496]
(9) Exchange
Input [7]: [segment#73483, processing_day#73485, row_count#73492L, unique_customers#73493L, event_sum#73494L, weighted_amount_sum#73495, avg_amount#73496]
Arguments: rangepartitioning(segment#73483 ASC NULLS FIRST, processing_day#73485 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=6972]
(10) ShuffleQueryStage
Output [7]: [segment#73483, processing_day#73485, row_count#73492L, unique_customers#73493L, event_sum#73494L, weighted_amount_sum#73495, avg_amount#73496]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#73483, processing_day#73485, row_count#73492L, unique_customers#73493L, event_sum#73494L, weighted_amount_sum#73495, avg_amount#73496]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#73483, processing_day#73485, row_count#73492L, unique_customers#73493L, event_sum#73494L, weighted_amount_sum#73495, avg_amount#73496]
Arguments: [segment#73483 ASC NULLS FIRST, processing_day#73485 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#73483, processing_day#73485, row_count#73492L, unique_customers#73493L, event_sum#73494L, weighted_amount_sum#73495, avg_amount#73496]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#73479L, segment#73483, processing_day#73485, amount#73487, events#73489, weighted_amount#73491]
Keys [2]: [segment#73483, processing_day#73485]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#73479L, 0.05, 0, 0), partial_sum(events#73489), partial_sum(weighted_amount#73491), partial_avg(amount#73487)]
Aggregate Attributes [57]: [count#73710L, MS[0]#73498L, MS[1]#73499L, MS[2]#73500L, MS[3]#73501L, MS[4]#73502L, MS[5]#73503L, MS[6]#73504L, MS[7]#73505L, MS[8]#73506L, MS[9]#73507L, MS[10]#73508L, MS[11]#73509L, MS[12]#73510L, MS[13]#73511L, MS[14]#73512L, MS[15]#73513L, MS[16]#73514L, MS[17]#73515L, MS[18]#73516L, MS[19]#73517L, MS[20]#73518L, MS[21]#73519L, MS[22]#73520L, MS[23]#73521L, MS[24]#73522L, MS[25]#73523L, MS[26]#73524L, MS[27]#73525L, MS[28]#73526L, MS[29]#73527L, MS[30]#73528L, MS[31]#73529L, MS[32]#73530L, MS[33]#73531L, MS[34]#73532L, MS[35]#73533L, MS[36]#73534L, MS[37]#73535L, MS[38]#73536L, MS[39]#73537L, MS[40]#73538L, MS[41]#73539L, MS[42]#73540L, MS[43]#73541L, MS[44]#73542L, MS[45]#73543L, MS[46]#73544L, MS[47]#73545L, MS[48]#73546L, MS[49]#73547L, MS[50]#73548L, MS[51]#73549L, sum#73711L, sum#73712, sum#73713, count#73714L]
Results [59]: [segment#73483, processing_day#73485, count#73715L, MS[0]#73550L, MS[1]#73551L, MS[2]#73552L, MS[3]#73553L, MS[4]#73554L, MS[5]#73555L, MS[6]#73556L, MS[7]#73557L, MS[8]#73558L, MS[9]#73559L, MS[10]#73560L, MS[11]#73561L, MS[12]#73562L, MS[13]#73563L, MS[14]#73564L, MS[15]#73565L, MS[16]#73566L, MS[17]#73567L, MS[18]#73568L, MS[19]#73569L, MS[20]#73570L, MS[21]#73571L, MS[22]#73572L, MS[23]#73573L, MS[24]#73574L, MS[25]#73575L, MS[26]#73576L, MS[27]#73577L, MS[28]#73578L, MS[29]#73579L, MS[30]#73580L, MS[31]#73581L, MS[32]#73582L, MS[33]#73583L, MS[34]#73584L, MS[35]#73585L, MS[36]#73586L, MS[37]#73587L, MS[38]#73588L, MS[39]#73589L, MS[40]#73590L, MS[41]#73591L, MS[42]#73592L, MS[43]#73593L, MS[44]#73594L, MS[45]#73595L, MS[46]#73596L, MS[47]#73597L, MS[48]#73598L, MS[49]#73599L, MS[50]#73600L, MS[51]#73601L, sum#73716L, sum#73717, sum#73718, count#73719L]
(15) Exchange
Input [59]: [segment#73483, processing_day#73485, count#73715L, MS[0]#73550L, MS[1]#73551L, MS[2]#73552L, MS[3]#73553L, MS[4]#73554L, MS[5]#73555L, MS[6]#73556L, MS[7]#73557L, MS[8]#73558L, MS[9]#73559L, MS[10]#73560L, MS[11]#73561L, MS[12]#73562L, MS[13]#73563L, MS[14]#73564L, MS[15]#73565L, MS[16]#73566L, MS[17]#73567L, MS[18]#73568L, MS[19]#73569L, MS[20]#73570L, MS[21]#73571L, MS[22]#73572L, MS[23]#73573L, MS[24]#73574L, MS[25]#73575L, MS[26]#73576L, MS[27]#73577L, MS[28]#73578L, MS[29]#73579L, MS[30]#73580L, MS[31]#73581L, MS[32]#73582L, MS[33]#73583L, MS[34]#73584L, MS[35]#73585L, MS[36]#73586L, MS[37]#73587L, MS[38]#73588L, MS[39]#73589L, MS[40]#73590L, MS[41]#73591L, MS[42]#73592L, MS[43]#73593L, MS[44]#73594L, MS[45]#73595L, MS[46]#73596L, MS[47]#73597L, MS[48]#73598L, MS[49]#73599L, MS[50]#73600L, MS[51]#73601L, sum#73716L, sum#73717, sum#73718, count#73719L]
Arguments: hashpartitioning(segment#73483, processing_day#73485, 200), ENSURE_REQUIREMENTS, [plan_id=6930]
(16) HashAggregate
Input [59]: [segment#73483, processing_day#73485, count#73715L, MS[0]#73550L, MS[1]#73551L, MS[2]#73552L, MS[3]#73553L, MS[4]#73554L, MS[5]#73555L, MS[6]#73556L, MS[7]#73557L, MS[8]#73558L, MS[9]#73559L, MS[10]#73560L, MS[11]#73561L, MS[12]#73562L, MS[13]#73563L, MS[14]#73564L, MS[15]#73565L, MS[16]#73566L, MS[17]#73567L, MS[18]#73568L, MS[19]#73569L, MS[20]#73570L, MS[21]#73571L, MS[22]#73572L, MS[23]#73573L, MS[24]#73574L, MS[25]#73575L, MS[26]#73576L, MS[27]#73577L, MS[28]#73578L, MS[29]#73579L, MS[30]#73580L, MS[31]#73581L, MS[32]#73582L, MS[33]#73583L, MS[34]#73584L, MS[35]#73585L, MS[36]#73586L, MS[37]#73587L, MS[38]#73588L, MS[39]#73589L, MS[40]#73590L, MS[41]#73591L, MS[42]#73592L, MS[43]#73593L, MS[44]#73594L, MS[45]#73595L, MS[46]#73596L, MS[47]#73597L, MS[48]#73598L, MS[49]#73599L, MS[50]#73600L, MS[51]#73601L, sum#73716L, sum#73717, sum#73718, count#73719L]
Keys [2]: [segment#73483, processing_day#73485]
Functions [5]: [count(1), approx_count_distinct(customer_id#73479L, 0.05, 0, 0), sum(events#73489), sum(weighted_amount#73491), avg(amount#73487)]
Aggregate Attributes [5]: [count(1)#73497L, approx_count_distinct(customer_id#73479L, 0.05, 0, 0)#73602L, sum(events#73489)#73603L, sum(weighted_amount#73491)#73604, avg(amount#73487)#73605]
Results [7]: [segment#73483, processing_day#73485, count(1)#73497L AS row_count#73492L, approx_count_distinct(customer_id#73479L, 0.05, 0, 0)#73602L AS unique_customers#73493L, sum(events#73489)#73603L AS event_sum#73494L, sum(weighted_amount#73491)#73604 AS weighted_amount_sum#73495, avg(amount#73487)#73605 AS avg_amount#73496]
(17) Exchange
Input [7]: [segment#73483, processing_day#73485, row_count#73492L, unique_customers#73493L, event_sum#73494L, weighted_amount_sum#73495, avg_amount#73496]
Arguments: rangepartitioning(segment#73483 ASC NULLS FIRST, processing_day#73485 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=6933]
(18) Sort
Input [7]: [segment#73483, processing_day#73485, row_count#73492L, unique_customers#73493L, event_sum#73494L, weighted_amount_sum#73495, avg_amount#73496]
Arguments: [segment#73483 ASC NULLS FIRST, processing_day#73485 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#73483, processing_day#73485, row_count#73492L, unique_customers#73493L, event_sum#73494L, weighted_amount_sum#73495, avg_amount#73496]
Arguments: isFinalPlan=true