== 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#74361L]
Arguments: Range (12000000, 13000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#74361L % 250000) AS customer_id#74363L, concat(segment-, cast(cast((id#74361L % 12) as int) as string)) AS segment#74367, cast((id#74361L % 14) as int) AS processing_day#74369, ((cast(((id#74361L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#74371, cast((((id#74361L * 29) % 7) + 1) as int) AS events#74373]
Input [1]: [id#74361L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#74363L, segment#74367, processing_day#74369, amount#74371, events#74373, (amount#74371 * cast(events#74373 as double)) AS weighted_amount#74375]
Input [5]: [customer_id#74363L, segment#74367, processing_day#74369, amount#74371, events#74373]
(4) HashAggregate
Input [6]: [customer_id#74363L, segment#74367, processing_day#74369, amount#74371, events#74373, weighted_amount#74375]
Keys [2]: [segment#74367, processing_day#74369]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#74363L, 0.05, 0, 0), partial_sum(events#74373), partial_sum(weighted_amount#74375), partial_avg(amount#74371)]
Aggregate Attributes [57]: [count#74594L, MS[0]#74382L, MS[1]#74383L, MS[2]#74384L, MS[3]#74385L, MS[4]#74386L, MS[5]#74387L, MS[6]#74388L, MS[7]#74389L, MS[8]#74390L, MS[9]#74391L, MS[10]#74392L, MS[11]#74393L, MS[12]#74394L, MS[13]#74395L, MS[14]#74396L, MS[15]#74397L, MS[16]#74398L, MS[17]#74399L, MS[18]#74400L, MS[19]#74401L, MS[20]#74402L, MS[21]#74403L, MS[22]#74404L, MS[23]#74405L, MS[24]#74406L, MS[25]#74407L, MS[26]#74408L, MS[27]#74409L, MS[28]#74410L, MS[29]#74411L, MS[30]#74412L, MS[31]#74413L, MS[32]#74414L, MS[33]#74415L, MS[34]#74416L, MS[35]#74417L, MS[36]#74418L, MS[37]#74419L, MS[38]#74420L, MS[39]#74421L, MS[40]#74422L, MS[41]#74423L, MS[42]#74424L, MS[43]#74425L, MS[44]#74426L, MS[45]#74427L, MS[46]#74428L, MS[47]#74429L, MS[48]#74430L, MS[49]#74431L, MS[50]#74432L, MS[51]#74433L, sum#74595L, sum#74596, sum#74597, count#74598L]
Results [59]: [segment#74367, processing_day#74369, count#74599L, MS[0]#74434L, MS[1]#74435L, MS[2]#74436L, MS[3]#74437L, MS[4]#74438L, MS[5]#74439L, MS[6]#74440L, MS[7]#74441L, MS[8]#74442L, MS[9]#74443L, MS[10]#74444L, MS[11]#74445L, MS[12]#74446L, MS[13]#74447L, MS[14]#74448L, MS[15]#74449L, MS[16]#74450L, MS[17]#74451L, MS[18]#74452L, MS[19]#74453L, MS[20]#74454L, MS[21]#74455L, MS[22]#74456L, MS[23]#74457L, MS[24]#74458L, MS[25]#74459L, MS[26]#74460L, MS[27]#74461L, MS[28]#74462L, MS[29]#74463L, MS[30]#74464L, MS[31]#74465L, MS[32]#74466L, MS[33]#74467L, MS[34]#74468L, MS[35]#74469L, MS[36]#74470L, MS[37]#74471L, MS[38]#74472L, MS[39]#74473L, MS[40]#74474L, MS[41]#74475L, MS[42]#74476L, MS[43]#74477L, MS[44]#74478L, MS[45]#74479L, MS[46]#74480L, MS[47]#74481L, MS[48]#74482L, MS[49]#74483L, MS[50]#74484L, MS[51]#74485L, sum#74600L, sum#74601, sum#74602, count#74603L]
(5) Exchange
Input [59]: [segment#74367, processing_day#74369, count#74599L, MS[0]#74434L, MS[1]#74435L, MS[2]#74436L, MS[3]#74437L, MS[4]#74438L, MS[5]#74439L, MS[6]#74440L, MS[7]#74441L, MS[8]#74442L, MS[9]#74443L, MS[10]#74444L, MS[11]#74445L, MS[12]#74446L, MS[13]#74447L, MS[14]#74448L, MS[15]#74449L, MS[16]#74450L, MS[17]#74451L, MS[18]#74452L, MS[19]#74453L, MS[20]#74454L, MS[21]#74455L, MS[22]#74456L, MS[23]#74457L, MS[24]#74458L, MS[25]#74459L, MS[26]#74460L, MS[27]#74461L, MS[28]#74462L, MS[29]#74463L, MS[30]#74464L, MS[31]#74465L, MS[32]#74466L, MS[33]#74467L, MS[34]#74468L, MS[35]#74469L, MS[36]#74470L, MS[37]#74471L, MS[38]#74472L, MS[39]#74473L, MS[40]#74474L, MS[41]#74475L, MS[42]#74476L, MS[43]#74477L, MS[44]#74478L, MS[45]#74479L, MS[46]#74480L, MS[47]#74481L, MS[48]#74482L, MS[49]#74483L, MS[50]#74484L, MS[51]#74485L, sum#74600L, sum#74601, sum#74602, count#74603L]
Arguments: hashpartitioning(segment#74367, processing_day#74369, 200), ENSURE_REQUIREMENTS, [plan_id=7033]
(6) ShuffleQueryStage
Output [59]: [segment#74367, processing_day#74369, count#74599L, MS[0]#74434L, MS[1]#74435L, MS[2]#74436L, MS[3]#74437L, MS[4]#74438L, MS[5]#74439L, MS[6]#74440L, MS[7]#74441L, MS[8]#74442L, MS[9]#74443L, MS[10]#74444L, MS[11]#74445L, MS[12]#74446L, MS[13]#74447L, MS[14]#74448L, MS[15]#74449L, MS[16]#74450L, MS[17]#74451L, MS[18]#74452L, MS[19]#74453L, MS[20]#74454L, MS[21]#74455L, MS[22]#74456L, MS[23]#74457L, MS[24]#74458L, MS[25]#74459L, MS[26]#74460L, MS[27]#74461L, MS[28]#74462L, MS[29]#74463L, MS[30]#74464L, MS[31]#74465L, MS[32]#74466L, MS[33]#74467L, MS[34]#74468L, MS[35]#74469L, MS[36]#74470L, MS[37]#74471L, MS[38]#74472L, MS[39]#74473L, MS[40]#74474L, MS[41]#74475L, MS[42]#74476L, MS[43]#74477L, MS[44]#74478L, MS[45]#74479L, MS[46]#74480L, MS[47]#74481L, MS[48]#74482L, MS[49]#74483L, MS[50]#74484L, MS[51]#74485L, sum#74600L, sum#74601, sum#74602, count#74603L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#74367, processing_day#74369, count#74599L, MS[0]#74434L, MS[1]#74435L, MS[2]#74436L, MS[3]#74437L, MS[4]#74438L, MS[5]#74439L, MS[6]#74440L, MS[7]#74441L, MS[8]#74442L, MS[9]#74443L, MS[10]#74444L, MS[11]#74445L, MS[12]#74446L, MS[13]#74447L, MS[14]#74448L, MS[15]#74449L, MS[16]#74450L, MS[17]#74451L, MS[18]#74452L, MS[19]#74453L, MS[20]#74454L, MS[21]#74455L, MS[22]#74456L, MS[23]#74457L, MS[24]#74458L, MS[25]#74459L, MS[26]#74460L, MS[27]#74461L, MS[28]#74462L, MS[29]#74463L, MS[30]#74464L, MS[31]#74465L, MS[32]#74466L, MS[33]#74467L, MS[34]#74468L, MS[35]#74469L, MS[36]#74470L, MS[37]#74471L, MS[38]#74472L, MS[39]#74473L, MS[40]#74474L, MS[41]#74475L, MS[42]#74476L, MS[43]#74477L, MS[44]#74478L, MS[45]#74479L, MS[46]#74480L, MS[47]#74481L, MS[48]#74482L, MS[49]#74483L, MS[50]#74484L, MS[51]#74485L, sum#74600L, sum#74601, sum#74602, count#74603L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#74367, processing_day#74369, count#74599L, MS[0]#74434L, MS[1]#74435L, MS[2]#74436L, MS[3]#74437L, MS[4]#74438L, MS[5]#74439L, MS[6]#74440L, MS[7]#74441L, MS[8]#74442L, MS[9]#74443L, MS[10]#74444L, MS[11]#74445L, MS[12]#74446L, MS[13]#74447L, MS[14]#74448L, MS[15]#74449L, MS[16]#74450L, MS[17]#74451L, MS[18]#74452L, MS[19]#74453L, MS[20]#74454L, MS[21]#74455L, MS[22]#74456L, MS[23]#74457L, MS[24]#74458L, MS[25]#74459L, MS[26]#74460L, MS[27]#74461L, MS[28]#74462L, MS[29]#74463L, MS[30]#74464L, MS[31]#74465L, MS[32]#74466L, MS[33]#74467L, MS[34]#74468L, MS[35]#74469L, MS[36]#74470L, MS[37]#74471L, MS[38]#74472L, MS[39]#74473L, MS[40]#74474L, MS[41]#74475L, MS[42]#74476L, MS[43]#74477L, MS[44]#74478L, MS[45]#74479L, MS[46]#74480L, MS[47]#74481L, MS[48]#74482L, MS[49]#74483L, MS[50]#74484L, MS[51]#74485L, sum#74600L, sum#74601, sum#74602, count#74603L]
Keys [2]: [segment#74367, processing_day#74369]
Functions [5]: [count(1), approx_count_distinct(customer_id#74363L, 0.05, 0, 0), sum(events#74373), sum(weighted_amount#74375), avg(amount#74371)]
Aggregate Attributes [5]: [count(1)#74381L, approx_count_distinct(customer_id#74363L, 0.05, 0, 0)#74486L, sum(events#74373)#74487L, sum(weighted_amount#74375)#74488, avg(amount#74371)#74489]
Results [7]: [segment#74367, processing_day#74369, count(1)#74381L AS row_count#74376L, approx_count_distinct(customer_id#74363L, 0.05, 0, 0)#74486L AS unique_customers#74377L, sum(events#74373)#74487L AS event_sum#74378L, sum(weighted_amount#74375)#74488 AS weighted_amount_sum#74379, avg(amount#74371)#74489 AS avg_amount#74380]
(9) Exchange
Input [7]: [segment#74367, processing_day#74369, row_count#74376L, unique_customers#74377L, event_sum#74378L, weighted_amount_sum#74379, avg_amount#74380]
Arguments: rangepartitioning(segment#74367 ASC NULLS FIRST, processing_day#74369 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=7055]
(10) ShuffleQueryStage
Output [7]: [segment#74367, processing_day#74369, row_count#74376L, unique_customers#74377L, event_sum#74378L, weighted_amount_sum#74379, avg_amount#74380]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#74367, processing_day#74369, row_count#74376L, unique_customers#74377L, event_sum#74378L, weighted_amount_sum#74379, avg_amount#74380]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#74367, processing_day#74369, row_count#74376L, unique_customers#74377L, event_sum#74378L, weighted_amount_sum#74379, avg_amount#74380]
Arguments: [segment#74367 ASC NULLS FIRST, processing_day#74369 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#74367, processing_day#74369, row_count#74376L, unique_customers#74377L, event_sum#74378L, weighted_amount_sum#74379, avg_amount#74380]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#74363L, segment#74367, processing_day#74369, amount#74371, events#74373, weighted_amount#74375]
Keys [2]: [segment#74367, processing_day#74369]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#74363L, 0.05, 0, 0), partial_sum(events#74373), partial_sum(weighted_amount#74375), partial_avg(amount#74371)]
Aggregate Attributes [57]: [count#74594L, MS[0]#74382L, MS[1]#74383L, MS[2]#74384L, MS[3]#74385L, MS[4]#74386L, MS[5]#74387L, MS[6]#74388L, MS[7]#74389L, MS[8]#74390L, MS[9]#74391L, MS[10]#74392L, MS[11]#74393L, MS[12]#74394L, MS[13]#74395L, MS[14]#74396L, MS[15]#74397L, MS[16]#74398L, MS[17]#74399L, MS[18]#74400L, MS[19]#74401L, MS[20]#74402L, MS[21]#74403L, MS[22]#74404L, MS[23]#74405L, MS[24]#74406L, MS[25]#74407L, MS[26]#74408L, MS[27]#74409L, MS[28]#74410L, MS[29]#74411L, MS[30]#74412L, MS[31]#74413L, MS[32]#74414L, MS[33]#74415L, MS[34]#74416L, MS[35]#74417L, MS[36]#74418L, MS[37]#74419L, MS[38]#74420L, MS[39]#74421L, MS[40]#74422L, MS[41]#74423L, MS[42]#74424L, MS[43]#74425L, MS[44]#74426L, MS[45]#74427L, MS[46]#74428L, MS[47]#74429L, MS[48]#74430L, MS[49]#74431L, MS[50]#74432L, MS[51]#74433L, sum#74595L, sum#74596, sum#74597, count#74598L]
Results [59]: [segment#74367, processing_day#74369, count#74599L, MS[0]#74434L, MS[1]#74435L, MS[2]#74436L, MS[3]#74437L, MS[4]#74438L, MS[5]#74439L, MS[6]#74440L, MS[7]#74441L, MS[8]#74442L, MS[9]#74443L, MS[10]#74444L, MS[11]#74445L, MS[12]#74446L, MS[13]#74447L, MS[14]#74448L, MS[15]#74449L, MS[16]#74450L, MS[17]#74451L, MS[18]#74452L, MS[19]#74453L, MS[20]#74454L, MS[21]#74455L, MS[22]#74456L, MS[23]#74457L, MS[24]#74458L, MS[25]#74459L, MS[26]#74460L, MS[27]#74461L, MS[28]#74462L, MS[29]#74463L, MS[30]#74464L, MS[31]#74465L, MS[32]#74466L, MS[33]#74467L, MS[34]#74468L, MS[35]#74469L, MS[36]#74470L, MS[37]#74471L, MS[38]#74472L, MS[39]#74473L, MS[40]#74474L, MS[41]#74475L, MS[42]#74476L, MS[43]#74477L, MS[44]#74478L, MS[45]#74479L, MS[46]#74480L, MS[47]#74481L, MS[48]#74482L, MS[49]#74483L, MS[50]#74484L, MS[51]#74485L, sum#74600L, sum#74601, sum#74602, count#74603L]
(15) Exchange
Input [59]: [segment#74367, processing_day#74369, count#74599L, MS[0]#74434L, MS[1]#74435L, MS[2]#74436L, MS[3]#74437L, MS[4]#74438L, MS[5]#74439L, MS[6]#74440L, MS[7]#74441L, MS[8]#74442L, MS[9]#74443L, MS[10]#74444L, MS[11]#74445L, MS[12]#74446L, MS[13]#74447L, MS[14]#74448L, MS[15]#74449L, MS[16]#74450L, MS[17]#74451L, MS[18]#74452L, MS[19]#74453L, MS[20]#74454L, MS[21]#74455L, MS[22]#74456L, MS[23]#74457L, MS[24]#74458L, MS[25]#74459L, MS[26]#74460L, MS[27]#74461L, MS[28]#74462L, MS[29]#74463L, MS[30]#74464L, MS[31]#74465L, MS[32]#74466L, MS[33]#74467L, MS[34]#74468L, MS[35]#74469L, MS[36]#74470L, MS[37]#74471L, MS[38]#74472L, MS[39]#74473L, MS[40]#74474L, MS[41]#74475L, MS[42]#74476L, MS[43]#74477L, MS[44]#74478L, MS[45]#74479L, MS[46]#74480L, MS[47]#74481L, MS[48]#74482L, MS[49]#74483L, MS[50]#74484L, MS[51]#74485L, sum#74600L, sum#74601, sum#74602, count#74603L]
Arguments: hashpartitioning(segment#74367, processing_day#74369, 200), ENSURE_REQUIREMENTS, [plan_id=7013]
(16) HashAggregate
Input [59]: [segment#74367, processing_day#74369, count#74599L, MS[0]#74434L, MS[1]#74435L, MS[2]#74436L, MS[3]#74437L, MS[4]#74438L, MS[5]#74439L, MS[6]#74440L, MS[7]#74441L, MS[8]#74442L, MS[9]#74443L, MS[10]#74444L, MS[11]#74445L, MS[12]#74446L, MS[13]#74447L, MS[14]#74448L, MS[15]#74449L, MS[16]#74450L, MS[17]#74451L, MS[18]#74452L, MS[19]#74453L, MS[20]#74454L, MS[21]#74455L, MS[22]#74456L, MS[23]#74457L, MS[24]#74458L, MS[25]#74459L, MS[26]#74460L, MS[27]#74461L, MS[28]#74462L, MS[29]#74463L, MS[30]#74464L, MS[31]#74465L, MS[32]#74466L, MS[33]#74467L, MS[34]#74468L, MS[35]#74469L, MS[36]#74470L, MS[37]#74471L, MS[38]#74472L, MS[39]#74473L, MS[40]#74474L, MS[41]#74475L, MS[42]#74476L, MS[43]#74477L, MS[44]#74478L, MS[45]#74479L, MS[46]#74480L, MS[47]#74481L, MS[48]#74482L, MS[49]#74483L, MS[50]#74484L, MS[51]#74485L, sum#74600L, sum#74601, sum#74602, count#74603L]
Keys [2]: [segment#74367, processing_day#74369]
Functions [5]: [count(1), approx_count_distinct(customer_id#74363L, 0.05, 0, 0), sum(events#74373), sum(weighted_amount#74375), avg(amount#74371)]
Aggregate Attributes [5]: [count(1)#74381L, approx_count_distinct(customer_id#74363L, 0.05, 0, 0)#74486L, sum(events#74373)#74487L, sum(weighted_amount#74375)#74488, avg(amount#74371)#74489]
Results [7]: [segment#74367, processing_day#74369, count(1)#74381L AS row_count#74376L, approx_count_distinct(customer_id#74363L, 0.05, 0, 0)#74486L AS unique_customers#74377L, sum(events#74373)#74487L AS event_sum#74378L, sum(weighted_amount#74375)#74488 AS weighted_amount_sum#74379, avg(amount#74371)#74489 AS avg_amount#74380]
(17) Exchange
Input [7]: [segment#74367, processing_day#74369, row_count#74376L, unique_customers#74377L, event_sum#74378L, weighted_amount_sum#74379, avg_amount#74380]
Arguments: rangepartitioning(segment#74367 ASC NULLS FIRST, processing_day#74369 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=7016]
(18) Sort
Input [7]: [segment#74367, processing_day#74369, row_count#74376L, unique_customers#74377L, event_sum#74378L, weighted_amount_sum#74379, avg_amount#74380]
Arguments: [segment#74367 ASC NULLS FIRST, processing_day#74369 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#74367, processing_day#74369, row_count#74376L, unique_customers#74377L, event_sum#74378L, weighted_amount_sum#74379, avg_amount#74380]
Arguments: isFinalPlan=true