== 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#71709L]
Arguments: Range (9000000, 10000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#71709L % 250000) AS customer_id#71711L, concat(segment-, cast(cast((id#71709L % 12) as int) as string)) AS segment#71715, cast((id#71709L % 14) as int) AS processing_day#71717, ((cast(((id#71709L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#71719, cast((((id#71709L * 29) % 7) + 1) as int) AS events#71721]
Input [1]: [id#71709L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#71711L, segment#71715, processing_day#71717, amount#71719, events#71721, (amount#71719 * cast(events#71721 as double)) AS weighted_amount#71723]
Input [5]: [customer_id#71711L, segment#71715, processing_day#71717, amount#71719, events#71721]
(4) HashAggregate
Input [6]: [customer_id#71711L, segment#71715, processing_day#71717, amount#71719, events#71721, weighted_amount#71723]
Keys [2]: [segment#71715, processing_day#71717]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#71711L, 0.05, 0, 0), partial_sum(events#71721), partial_sum(weighted_amount#71723), partial_avg(amount#71719)]
Aggregate Attributes [57]: [count#71942L, MS[0]#71730L, MS[1]#71731L, MS[2]#71732L, MS[3]#71733L, MS[4]#71734L, MS[5]#71735L, MS[6]#71736L, MS[7]#71737L, MS[8]#71738L, MS[9]#71739L, MS[10]#71740L, MS[11]#71741L, MS[12]#71742L, MS[13]#71743L, MS[14]#71744L, MS[15]#71745L, MS[16]#71746L, MS[17]#71747L, MS[18]#71748L, MS[19]#71749L, MS[20]#71750L, MS[21]#71751L, MS[22]#71752L, MS[23]#71753L, MS[24]#71754L, MS[25]#71755L, MS[26]#71756L, MS[27]#71757L, MS[28]#71758L, MS[29]#71759L, MS[30]#71760L, MS[31]#71761L, MS[32]#71762L, MS[33]#71763L, MS[34]#71764L, MS[35]#71765L, MS[36]#71766L, MS[37]#71767L, MS[38]#71768L, MS[39]#71769L, MS[40]#71770L, MS[41]#71771L, MS[42]#71772L, MS[43]#71773L, MS[44]#71774L, MS[45]#71775L, MS[46]#71776L, MS[47]#71777L, MS[48]#71778L, MS[49]#71779L, MS[50]#71780L, MS[51]#71781L, sum#71943L, sum#71944, sum#71945, count#71946L]
Results [59]: [segment#71715, processing_day#71717, count#71947L, MS[0]#71782L, MS[1]#71783L, MS[2]#71784L, MS[3]#71785L, MS[4]#71786L, MS[5]#71787L, MS[6]#71788L, MS[7]#71789L, MS[8]#71790L, MS[9]#71791L, MS[10]#71792L, MS[11]#71793L, MS[12]#71794L, MS[13]#71795L, MS[14]#71796L, MS[15]#71797L, MS[16]#71798L, MS[17]#71799L, MS[18]#71800L, MS[19]#71801L, MS[20]#71802L, MS[21]#71803L, MS[22]#71804L, MS[23]#71805L, MS[24]#71806L, MS[25]#71807L, MS[26]#71808L, MS[27]#71809L, MS[28]#71810L, MS[29]#71811L, MS[30]#71812L, MS[31]#71813L, MS[32]#71814L, MS[33]#71815L, MS[34]#71816L, MS[35]#71817L, MS[36]#71818L, MS[37]#71819L, MS[38]#71820L, MS[39]#71821L, MS[40]#71822L, MS[41]#71823L, MS[42]#71824L, MS[43]#71825L, MS[44]#71826L, MS[45]#71827L, MS[46]#71828L, MS[47]#71829L, MS[48]#71830L, MS[49]#71831L, MS[50]#71832L, MS[51]#71833L, sum#71948L, sum#71949, sum#71950, count#71951L]
(5) Exchange
Input [59]: [segment#71715, processing_day#71717, count#71947L, MS[0]#71782L, MS[1]#71783L, MS[2]#71784L, MS[3]#71785L, MS[4]#71786L, MS[5]#71787L, MS[6]#71788L, MS[7]#71789L, MS[8]#71790L, MS[9]#71791L, MS[10]#71792L, MS[11]#71793L, MS[12]#71794L, MS[13]#71795L, MS[14]#71796L, MS[15]#71797L, MS[16]#71798L, MS[17]#71799L, MS[18]#71800L, MS[19]#71801L, MS[20]#71802L, MS[21]#71803L, MS[22]#71804L, MS[23]#71805L, MS[24]#71806L, MS[25]#71807L, MS[26]#71808L, MS[27]#71809L, MS[28]#71810L, MS[29]#71811L, MS[30]#71812L, MS[31]#71813L, MS[32]#71814L, MS[33]#71815L, MS[34]#71816L, MS[35]#71817L, MS[36]#71818L, MS[37]#71819L, MS[38]#71820L, MS[39]#71821L, MS[40]#71822L, MS[41]#71823L, MS[42]#71824L, MS[43]#71825L, MS[44]#71826L, MS[45]#71827L, MS[46]#71828L, MS[47]#71829L, MS[48]#71830L, MS[49]#71831L, MS[50]#71832L, MS[51]#71833L, sum#71948L, sum#71949, sum#71950, count#71951L]
Arguments: hashpartitioning(segment#71715, processing_day#71717, 200), ENSURE_REQUIREMENTS, [plan_id=6784]
(6) ShuffleQueryStage
Output [59]: [segment#71715, processing_day#71717, count#71947L, MS[0]#71782L, MS[1]#71783L, MS[2]#71784L, MS[3]#71785L, MS[4]#71786L, MS[5]#71787L, MS[6]#71788L, MS[7]#71789L, MS[8]#71790L, MS[9]#71791L, MS[10]#71792L, MS[11]#71793L, MS[12]#71794L, MS[13]#71795L, MS[14]#71796L, MS[15]#71797L, MS[16]#71798L, MS[17]#71799L, MS[18]#71800L, MS[19]#71801L, MS[20]#71802L, MS[21]#71803L, MS[22]#71804L, MS[23]#71805L, MS[24]#71806L, MS[25]#71807L, MS[26]#71808L, MS[27]#71809L, MS[28]#71810L, MS[29]#71811L, MS[30]#71812L, MS[31]#71813L, MS[32]#71814L, MS[33]#71815L, MS[34]#71816L, MS[35]#71817L, MS[36]#71818L, MS[37]#71819L, MS[38]#71820L, MS[39]#71821L, MS[40]#71822L, MS[41]#71823L, MS[42]#71824L, MS[43]#71825L, MS[44]#71826L, MS[45]#71827L, MS[46]#71828L, MS[47]#71829L, MS[48]#71830L, MS[49]#71831L, MS[50]#71832L, MS[51]#71833L, sum#71948L, sum#71949, sum#71950, count#71951L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#71715, processing_day#71717, count#71947L, MS[0]#71782L, MS[1]#71783L, MS[2]#71784L, MS[3]#71785L, MS[4]#71786L, MS[5]#71787L, MS[6]#71788L, MS[7]#71789L, MS[8]#71790L, MS[9]#71791L, MS[10]#71792L, MS[11]#71793L, MS[12]#71794L, MS[13]#71795L, MS[14]#71796L, MS[15]#71797L, MS[16]#71798L, MS[17]#71799L, MS[18]#71800L, MS[19]#71801L, MS[20]#71802L, MS[21]#71803L, MS[22]#71804L, MS[23]#71805L, MS[24]#71806L, MS[25]#71807L, MS[26]#71808L, MS[27]#71809L, MS[28]#71810L, MS[29]#71811L, MS[30]#71812L, MS[31]#71813L, MS[32]#71814L, MS[33]#71815L, MS[34]#71816L, MS[35]#71817L, MS[36]#71818L, MS[37]#71819L, MS[38]#71820L, MS[39]#71821L, MS[40]#71822L, MS[41]#71823L, MS[42]#71824L, MS[43]#71825L, MS[44]#71826L, MS[45]#71827L, MS[46]#71828L, MS[47]#71829L, MS[48]#71830L, MS[49]#71831L, MS[50]#71832L, MS[51]#71833L, sum#71948L, sum#71949, sum#71950, count#71951L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#71715, processing_day#71717, count#71947L, MS[0]#71782L, MS[1]#71783L, MS[2]#71784L, MS[3]#71785L, MS[4]#71786L, MS[5]#71787L, MS[6]#71788L, MS[7]#71789L, MS[8]#71790L, MS[9]#71791L, MS[10]#71792L, MS[11]#71793L, MS[12]#71794L, MS[13]#71795L, MS[14]#71796L, MS[15]#71797L, MS[16]#71798L, MS[17]#71799L, MS[18]#71800L, MS[19]#71801L, MS[20]#71802L, MS[21]#71803L, MS[22]#71804L, MS[23]#71805L, MS[24]#71806L, MS[25]#71807L, MS[26]#71808L, MS[27]#71809L, MS[28]#71810L, MS[29]#71811L, MS[30]#71812L, MS[31]#71813L, MS[32]#71814L, MS[33]#71815L, MS[34]#71816L, MS[35]#71817L, MS[36]#71818L, MS[37]#71819L, MS[38]#71820L, MS[39]#71821L, MS[40]#71822L, MS[41]#71823L, MS[42]#71824L, MS[43]#71825L, MS[44]#71826L, MS[45]#71827L, MS[46]#71828L, MS[47]#71829L, MS[48]#71830L, MS[49]#71831L, MS[50]#71832L, MS[51]#71833L, sum#71948L, sum#71949, sum#71950, count#71951L]
Keys [2]: [segment#71715, processing_day#71717]
Functions [5]: [count(1), approx_count_distinct(customer_id#71711L, 0.05, 0, 0), sum(events#71721), sum(weighted_amount#71723), avg(amount#71719)]
Aggregate Attributes [5]: [count(1)#71729L, approx_count_distinct(customer_id#71711L, 0.05, 0, 0)#71834L, sum(events#71721)#71835L, sum(weighted_amount#71723)#71836, avg(amount#71719)#71837]
Results [7]: [segment#71715, processing_day#71717, count(1)#71729L AS row_count#71724L, approx_count_distinct(customer_id#71711L, 0.05, 0, 0)#71834L AS unique_customers#71725L, sum(events#71721)#71835L AS event_sum#71726L, sum(weighted_amount#71723)#71836 AS weighted_amount_sum#71727, avg(amount#71719)#71837 AS avg_amount#71728]
(9) Exchange
Input [7]: [segment#71715, processing_day#71717, row_count#71724L, unique_customers#71725L, event_sum#71726L, weighted_amount_sum#71727, avg_amount#71728]
Arguments: rangepartitioning(segment#71715 ASC NULLS FIRST, processing_day#71717 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=6806]
(10) ShuffleQueryStage
Output [7]: [segment#71715, processing_day#71717, row_count#71724L, unique_customers#71725L, event_sum#71726L, weighted_amount_sum#71727, avg_amount#71728]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#71715, processing_day#71717, row_count#71724L, unique_customers#71725L, event_sum#71726L, weighted_amount_sum#71727, avg_amount#71728]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#71715, processing_day#71717, row_count#71724L, unique_customers#71725L, event_sum#71726L, weighted_amount_sum#71727, avg_amount#71728]
Arguments: [segment#71715 ASC NULLS FIRST, processing_day#71717 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#71715, processing_day#71717, row_count#71724L, unique_customers#71725L, event_sum#71726L, weighted_amount_sum#71727, avg_amount#71728]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#71711L, segment#71715, processing_day#71717, amount#71719, events#71721, weighted_amount#71723]
Keys [2]: [segment#71715, processing_day#71717]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#71711L, 0.05, 0, 0), partial_sum(events#71721), partial_sum(weighted_amount#71723), partial_avg(amount#71719)]
Aggregate Attributes [57]: [count#71942L, MS[0]#71730L, MS[1]#71731L, MS[2]#71732L, MS[3]#71733L, MS[4]#71734L, MS[5]#71735L, MS[6]#71736L, MS[7]#71737L, MS[8]#71738L, MS[9]#71739L, MS[10]#71740L, MS[11]#71741L, MS[12]#71742L, MS[13]#71743L, MS[14]#71744L, MS[15]#71745L, MS[16]#71746L, MS[17]#71747L, MS[18]#71748L, MS[19]#71749L, MS[20]#71750L, MS[21]#71751L, MS[22]#71752L, MS[23]#71753L, MS[24]#71754L, MS[25]#71755L, MS[26]#71756L, MS[27]#71757L, MS[28]#71758L, MS[29]#71759L, MS[30]#71760L, MS[31]#71761L, MS[32]#71762L, MS[33]#71763L, MS[34]#71764L, MS[35]#71765L, MS[36]#71766L, MS[37]#71767L, MS[38]#71768L, MS[39]#71769L, MS[40]#71770L, MS[41]#71771L, MS[42]#71772L, MS[43]#71773L, MS[44]#71774L, MS[45]#71775L, MS[46]#71776L, MS[47]#71777L, MS[48]#71778L, MS[49]#71779L, MS[50]#71780L, MS[51]#71781L, sum#71943L, sum#71944, sum#71945, count#71946L]
Results [59]: [segment#71715, processing_day#71717, count#71947L, MS[0]#71782L, MS[1]#71783L, MS[2]#71784L, MS[3]#71785L, MS[4]#71786L, MS[5]#71787L, MS[6]#71788L, MS[7]#71789L, MS[8]#71790L, MS[9]#71791L, MS[10]#71792L, MS[11]#71793L, MS[12]#71794L, MS[13]#71795L, MS[14]#71796L, MS[15]#71797L, MS[16]#71798L, MS[17]#71799L, MS[18]#71800L, MS[19]#71801L, MS[20]#71802L, MS[21]#71803L, MS[22]#71804L, MS[23]#71805L, MS[24]#71806L, MS[25]#71807L, MS[26]#71808L, MS[27]#71809L, MS[28]#71810L, MS[29]#71811L, MS[30]#71812L, MS[31]#71813L, MS[32]#71814L, MS[33]#71815L, MS[34]#71816L, MS[35]#71817L, MS[36]#71818L, MS[37]#71819L, MS[38]#71820L, MS[39]#71821L, MS[40]#71822L, MS[41]#71823L, MS[42]#71824L, MS[43]#71825L, MS[44]#71826L, MS[45]#71827L, MS[46]#71828L, MS[47]#71829L, MS[48]#71830L, MS[49]#71831L, MS[50]#71832L, MS[51]#71833L, sum#71948L, sum#71949, sum#71950, count#71951L]
(15) Exchange
Input [59]: [segment#71715, processing_day#71717, count#71947L, MS[0]#71782L, MS[1]#71783L, MS[2]#71784L, MS[3]#71785L, MS[4]#71786L, MS[5]#71787L, MS[6]#71788L, MS[7]#71789L, MS[8]#71790L, MS[9]#71791L, MS[10]#71792L, MS[11]#71793L, MS[12]#71794L, MS[13]#71795L, MS[14]#71796L, MS[15]#71797L, MS[16]#71798L, MS[17]#71799L, MS[18]#71800L, MS[19]#71801L, MS[20]#71802L, MS[21]#71803L, MS[22]#71804L, MS[23]#71805L, MS[24]#71806L, MS[25]#71807L, MS[26]#71808L, MS[27]#71809L, MS[28]#71810L, MS[29]#71811L, MS[30]#71812L, MS[31]#71813L, MS[32]#71814L, MS[33]#71815L, MS[34]#71816L, MS[35]#71817L, MS[36]#71818L, MS[37]#71819L, MS[38]#71820L, MS[39]#71821L, MS[40]#71822L, MS[41]#71823L, MS[42]#71824L, MS[43]#71825L, MS[44]#71826L, MS[45]#71827L, MS[46]#71828L, MS[47]#71829L, MS[48]#71830L, MS[49]#71831L, MS[50]#71832L, MS[51]#71833L, sum#71948L, sum#71949, sum#71950, count#71951L]
Arguments: hashpartitioning(segment#71715, processing_day#71717, 200), ENSURE_REQUIREMENTS, [plan_id=6764]
(16) HashAggregate
Input [59]: [segment#71715, processing_day#71717, count#71947L, MS[0]#71782L, MS[1]#71783L, MS[2]#71784L, MS[3]#71785L, MS[4]#71786L, MS[5]#71787L, MS[6]#71788L, MS[7]#71789L, MS[8]#71790L, MS[9]#71791L, MS[10]#71792L, MS[11]#71793L, MS[12]#71794L, MS[13]#71795L, MS[14]#71796L, MS[15]#71797L, MS[16]#71798L, MS[17]#71799L, MS[18]#71800L, MS[19]#71801L, MS[20]#71802L, MS[21]#71803L, MS[22]#71804L, MS[23]#71805L, MS[24]#71806L, MS[25]#71807L, MS[26]#71808L, MS[27]#71809L, MS[28]#71810L, MS[29]#71811L, MS[30]#71812L, MS[31]#71813L, MS[32]#71814L, MS[33]#71815L, MS[34]#71816L, MS[35]#71817L, MS[36]#71818L, MS[37]#71819L, MS[38]#71820L, MS[39]#71821L, MS[40]#71822L, MS[41]#71823L, MS[42]#71824L, MS[43]#71825L, MS[44]#71826L, MS[45]#71827L, MS[46]#71828L, MS[47]#71829L, MS[48]#71830L, MS[49]#71831L, MS[50]#71832L, MS[51]#71833L, sum#71948L, sum#71949, sum#71950, count#71951L]
Keys [2]: [segment#71715, processing_day#71717]
Functions [5]: [count(1), approx_count_distinct(customer_id#71711L, 0.05, 0, 0), sum(events#71721), sum(weighted_amount#71723), avg(amount#71719)]
Aggregate Attributes [5]: [count(1)#71729L, approx_count_distinct(customer_id#71711L, 0.05, 0, 0)#71834L, sum(events#71721)#71835L, sum(weighted_amount#71723)#71836, avg(amount#71719)#71837]
Results [7]: [segment#71715, processing_day#71717, count(1)#71729L AS row_count#71724L, approx_count_distinct(customer_id#71711L, 0.05, 0, 0)#71834L AS unique_customers#71725L, sum(events#71721)#71835L AS event_sum#71726L, sum(weighted_amount#71723)#71836 AS weighted_amount_sum#71727, avg(amount#71719)#71837 AS avg_amount#71728]
(17) Exchange
Input [7]: [segment#71715, processing_day#71717, row_count#71724L, unique_customers#71725L, event_sum#71726L, weighted_amount_sum#71727, avg_amount#71728]
Arguments: rangepartitioning(segment#71715 ASC NULLS FIRST, processing_day#71717 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=6767]
(18) Sort
Input [7]: [segment#71715, processing_day#71717, row_count#71724L, unique_customers#71725L, event_sum#71726L, weighted_amount_sum#71727, avg_amount#71728]
Arguments: [segment#71715 ASC NULLS FIRST, processing_day#71717 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#71715, processing_day#71717, row_count#71724L, unique_customers#71725L, event_sum#71726L, weighted_amount_sum#71727, avg_amount#71728]
Arguments: isFinalPlan=true