== 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#95611L]
Arguments: Range (12000000, 13000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#95611L % 250000) AS customer_id#95613L, concat(segment-, cast(cast((id#95611L % 12) as int) as string)) AS segment#95617, cast((id#95611L % 14) as int) AS processing_day#95619, ((cast(((id#95611L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#95621, cast((((id#95611L * 29) % 7) + 1) as int) AS events#95623]
Input [1]: [id#95611L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#95613L, segment#95617, processing_day#95619, amount#95621, events#95623, (amount#95621 * cast(events#95623 as double)) AS weighted_amount#95625]
Input [5]: [customer_id#95613L, segment#95617, processing_day#95619, amount#95621, events#95623]
(4) HashAggregate
Input [6]: [customer_id#95613L, segment#95617, processing_day#95619, amount#95621, events#95623, weighted_amount#95625]
Keys [2]: [segment#95617, processing_day#95619]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#95613L, 0.05, 0, 0), partial_sum(events#95623), partial_sum(weighted_amount#95625), partial_avg(amount#95621)]
Aggregate Attributes [57]: [count#95844L, MS[0]#95632L, MS[1]#95633L, MS[2]#95634L, MS[3]#95635L, MS[4]#95636L, MS[5]#95637L, MS[6]#95638L, MS[7]#95639L, MS[8]#95640L, MS[9]#95641L, MS[10]#95642L, MS[11]#95643L, MS[12]#95644L, MS[13]#95645L, MS[14]#95646L, MS[15]#95647L, MS[16]#95648L, MS[17]#95649L, MS[18]#95650L, MS[19]#95651L, MS[20]#95652L, MS[21]#95653L, MS[22]#95654L, MS[23]#95655L, MS[24]#95656L, MS[25]#95657L, MS[26]#95658L, MS[27]#95659L, MS[28]#95660L, MS[29]#95661L, MS[30]#95662L, MS[31]#95663L, MS[32]#95664L, MS[33]#95665L, MS[34]#95666L, MS[35]#95667L, MS[36]#95668L, MS[37]#95669L, MS[38]#95670L, MS[39]#95671L, MS[40]#95672L, MS[41]#95673L, MS[42]#95674L, MS[43]#95675L, MS[44]#95676L, MS[45]#95677L, MS[46]#95678L, MS[47]#95679L, MS[48]#95680L, MS[49]#95681L, MS[50]#95682L, MS[51]#95683L, sum#95845L, sum#95846, sum#95847, count#95848L]
Results [59]: [segment#95617, processing_day#95619, count#95849L, MS[0]#95684L, MS[1]#95685L, MS[2]#95686L, MS[3]#95687L, MS[4]#95688L, MS[5]#95689L, MS[6]#95690L, MS[7]#95691L, MS[8]#95692L, MS[9]#95693L, MS[10]#95694L, MS[11]#95695L, MS[12]#95696L, MS[13]#95697L, MS[14]#95698L, MS[15]#95699L, MS[16]#95700L, MS[17]#95701L, MS[18]#95702L, MS[19]#95703L, MS[20]#95704L, MS[21]#95705L, MS[22]#95706L, MS[23]#95707L, MS[24]#95708L, MS[25]#95709L, MS[26]#95710L, MS[27]#95711L, MS[28]#95712L, MS[29]#95713L, MS[30]#95714L, MS[31]#95715L, MS[32]#95716L, MS[33]#95717L, MS[34]#95718L, MS[35]#95719L, MS[36]#95720L, MS[37]#95721L, MS[38]#95722L, MS[39]#95723L, MS[40]#95724L, MS[41]#95725L, MS[42]#95726L, MS[43]#95727L, MS[44]#95728L, MS[45]#95729L, MS[46]#95730L, MS[47]#95731L, MS[48]#95732L, MS[49]#95733L, MS[50]#95734L, MS[51]#95735L, sum#95850L, sum#95851, sum#95852, count#95853L]
(5) Exchange
Input [59]: [segment#95617, processing_day#95619, count#95849L, MS[0]#95684L, MS[1]#95685L, MS[2]#95686L, MS[3]#95687L, MS[4]#95688L, MS[5]#95689L, MS[6]#95690L, MS[7]#95691L, MS[8]#95692L, MS[9]#95693L, MS[10]#95694L, MS[11]#95695L, MS[12]#95696L, MS[13]#95697L, MS[14]#95698L, MS[15]#95699L, MS[16]#95700L, MS[17]#95701L, MS[18]#95702L, MS[19]#95703L, MS[20]#95704L, MS[21]#95705L, MS[22]#95706L, MS[23]#95707L, MS[24]#95708L, MS[25]#95709L, MS[26]#95710L, MS[27]#95711L, MS[28]#95712L, MS[29]#95713L, MS[30]#95714L, MS[31]#95715L, MS[32]#95716L, MS[33]#95717L, MS[34]#95718L, MS[35]#95719L, MS[36]#95720L, MS[37]#95721L, MS[38]#95722L, MS[39]#95723L, MS[40]#95724L, MS[41]#95725L, MS[42]#95726L, MS[43]#95727L, MS[44]#95728L, MS[45]#95729L, MS[46]#95730L, MS[47]#95731L, MS[48]#95732L, MS[49]#95733L, MS[50]#95734L, MS[51]#95735L, sum#95850L, sum#95851, sum#95852, count#95853L]
Arguments: hashpartitioning(segment#95617, processing_day#95619, 200), ENSURE_REQUIREMENTS, [plan_id=9031]
(6) ShuffleQueryStage
Output [59]: [segment#95617, processing_day#95619, count#95849L, MS[0]#95684L, MS[1]#95685L, MS[2]#95686L, MS[3]#95687L, MS[4]#95688L, MS[5]#95689L, MS[6]#95690L, MS[7]#95691L, MS[8]#95692L, MS[9]#95693L, MS[10]#95694L, MS[11]#95695L, MS[12]#95696L, MS[13]#95697L, MS[14]#95698L, MS[15]#95699L, MS[16]#95700L, MS[17]#95701L, MS[18]#95702L, MS[19]#95703L, MS[20]#95704L, MS[21]#95705L, MS[22]#95706L, MS[23]#95707L, MS[24]#95708L, MS[25]#95709L, MS[26]#95710L, MS[27]#95711L, MS[28]#95712L, MS[29]#95713L, MS[30]#95714L, MS[31]#95715L, MS[32]#95716L, MS[33]#95717L, MS[34]#95718L, MS[35]#95719L, MS[36]#95720L, MS[37]#95721L, MS[38]#95722L, MS[39]#95723L, MS[40]#95724L, MS[41]#95725L, MS[42]#95726L, MS[43]#95727L, MS[44]#95728L, MS[45]#95729L, MS[46]#95730L, MS[47]#95731L, MS[48]#95732L, MS[49]#95733L, MS[50]#95734L, MS[51]#95735L, sum#95850L, sum#95851, sum#95852, count#95853L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#95617, processing_day#95619, count#95849L, MS[0]#95684L, MS[1]#95685L, MS[2]#95686L, MS[3]#95687L, MS[4]#95688L, MS[5]#95689L, MS[6]#95690L, MS[7]#95691L, MS[8]#95692L, MS[9]#95693L, MS[10]#95694L, MS[11]#95695L, MS[12]#95696L, MS[13]#95697L, MS[14]#95698L, MS[15]#95699L, MS[16]#95700L, MS[17]#95701L, MS[18]#95702L, MS[19]#95703L, MS[20]#95704L, MS[21]#95705L, MS[22]#95706L, MS[23]#95707L, MS[24]#95708L, MS[25]#95709L, MS[26]#95710L, MS[27]#95711L, MS[28]#95712L, MS[29]#95713L, MS[30]#95714L, MS[31]#95715L, MS[32]#95716L, MS[33]#95717L, MS[34]#95718L, MS[35]#95719L, MS[36]#95720L, MS[37]#95721L, MS[38]#95722L, MS[39]#95723L, MS[40]#95724L, MS[41]#95725L, MS[42]#95726L, MS[43]#95727L, MS[44]#95728L, MS[45]#95729L, MS[46]#95730L, MS[47]#95731L, MS[48]#95732L, MS[49]#95733L, MS[50]#95734L, MS[51]#95735L, sum#95850L, sum#95851, sum#95852, count#95853L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#95617, processing_day#95619, count#95849L, MS[0]#95684L, MS[1]#95685L, MS[2]#95686L, MS[3]#95687L, MS[4]#95688L, MS[5]#95689L, MS[6]#95690L, MS[7]#95691L, MS[8]#95692L, MS[9]#95693L, MS[10]#95694L, MS[11]#95695L, MS[12]#95696L, MS[13]#95697L, MS[14]#95698L, MS[15]#95699L, MS[16]#95700L, MS[17]#95701L, MS[18]#95702L, MS[19]#95703L, MS[20]#95704L, MS[21]#95705L, MS[22]#95706L, MS[23]#95707L, MS[24]#95708L, MS[25]#95709L, MS[26]#95710L, MS[27]#95711L, MS[28]#95712L, MS[29]#95713L, MS[30]#95714L, MS[31]#95715L, MS[32]#95716L, MS[33]#95717L, MS[34]#95718L, MS[35]#95719L, MS[36]#95720L, MS[37]#95721L, MS[38]#95722L, MS[39]#95723L, MS[40]#95724L, MS[41]#95725L, MS[42]#95726L, MS[43]#95727L, MS[44]#95728L, MS[45]#95729L, MS[46]#95730L, MS[47]#95731L, MS[48]#95732L, MS[49]#95733L, MS[50]#95734L, MS[51]#95735L, sum#95850L, sum#95851, sum#95852, count#95853L]
Keys [2]: [segment#95617, processing_day#95619]
Functions [5]: [count(1), approx_count_distinct(customer_id#95613L, 0.05, 0, 0), sum(events#95623), sum(weighted_amount#95625), avg(amount#95621)]
Aggregate Attributes [5]: [count(1)#95631L, approx_count_distinct(customer_id#95613L, 0.05, 0, 0)#95736L, sum(events#95623)#95737L, sum(weighted_amount#95625)#95738, avg(amount#95621)#95739]
Results [7]: [segment#95617, processing_day#95619, count(1)#95631L AS row_count#95626L, approx_count_distinct(customer_id#95613L, 0.05, 0, 0)#95736L AS unique_customers#95627L, sum(events#95623)#95737L AS event_sum#95628L, sum(weighted_amount#95625)#95738 AS weighted_amount_sum#95629, avg(amount#95621)#95739 AS avg_amount#95630]
(9) Exchange
Input [7]: [segment#95617, processing_day#95619, row_count#95626L, unique_customers#95627L, event_sum#95628L, weighted_amount_sum#95629, avg_amount#95630]
Arguments: rangepartitioning(segment#95617 ASC NULLS FIRST, processing_day#95619 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=9053]
(10) ShuffleQueryStage
Output [7]: [segment#95617, processing_day#95619, row_count#95626L, unique_customers#95627L, event_sum#95628L, weighted_amount_sum#95629, avg_amount#95630]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#95617, processing_day#95619, row_count#95626L, unique_customers#95627L, event_sum#95628L, weighted_amount_sum#95629, avg_amount#95630]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#95617, processing_day#95619, row_count#95626L, unique_customers#95627L, event_sum#95628L, weighted_amount_sum#95629, avg_amount#95630]
Arguments: [segment#95617 ASC NULLS FIRST, processing_day#95619 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#95617, processing_day#95619, row_count#95626L, unique_customers#95627L, event_sum#95628L, weighted_amount_sum#95629, avg_amount#95630]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#95613L, segment#95617, processing_day#95619, amount#95621, events#95623, weighted_amount#95625]
Keys [2]: [segment#95617, processing_day#95619]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#95613L, 0.05, 0, 0), partial_sum(events#95623), partial_sum(weighted_amount#95625), partial_avg(amount#95621)]
Aggregate Attributes [57]: [count#95844L, MS[0]#95632L, MS[1]#95633L, MS[2]#95634L, MS[3]#95635L, MS[4]#95636L, MS[5]#95637L, MS[6]#95638L, MS[7]#95639L, MS[8]#95640L, MS[9]#95641L, MS[10]#95642L, MS[11]#95643L, MS[12]#95644L, MS[13]#95645L, MS[14]#95646L, MS[15]#95647L, MS[16]#95648L, MS[17]#95649L, MS[18]#95650L, MS[19]#95651L, MS[20]#95652L, MS[21]#95653L, MS[22]#95654L, MS[23]#95655L, MS[24]#95656L, MS[25]#95657L, MS[26]#95658L, MS[27]#95659L, MS[28]#95660L, MS[29]#95661L, MS[30]#95662L, MS[31]#95663L, MS[32]#95664L, MS[33]#95665L, MS[34]#95666L, MS[35]#95667L, MS[36]#95668L, MS[37]#95669L, MS[38]#95670L, MS[39]#95671L, MS[40]#95672L, MS[41]#95673L, MS[42]#95674L, MS[43]#95675L, MS[44]#95676L, MS[45]#95677L, MS[46]#95678L, MS[47]#95679L, MS[48]#95680L, MS[49]#95681L, MS[50]#95682L, MS[51]#95683L, sum#95845L, sum#95846, sum#95847, count#95848L]
Results [59]: [segment#95617, processing_day#95619, count#95849L, MS[0]#95684L, MS[1]#95685L, MS[2]#95686L, MS[3]#95687L, MS[4]#95688L, MS[5]#95689L, MS[6]#95690L, MS[7]#95691L, MS[8]#95692L, MS[9]#95693L, MS[10]#95694L, MS[11]#95695L, MS[12]#95696L, MS[13]#95697L, MS[14]#95698L, MS[15]#95699L, MS[16]#95700L, MS[17]#95701L, MS[18]#95702L, MS[19]#95703L, MS[20]#95704L, MS[21]#95705L, MS[22]#95706L, MS[23]#95707L, MS[24]#95708L, MS[25]#95709L, MS[26]#95710L, MS[27]#95711L, MS[28]#95712L, MS[29]#95713L, MS[30]#95714L, MS[31]#95715L, MS[32]#95716L, MS[33]#95717L, MS[34]#95718L, MS[35]#95719L, MS[36]#95720L, MS[37]#95721L, MS[38]#95722L, MS[39]#95723L, MS[40]#95724L, MS[41]#95725L, MS[42]#95726L, MS[43]#95727L, MS[44]#95728L, MS[45]#95729L, MS[46]#95730L, MS[47]#95731L, MS[48]#95732L, MS[49]#95733L, MS[50]#95734L, MS[51]#95735L, sum#95850L, sum#95851, sum#95852, count#95853L]
(15) Exchange
Input [59]: [segment#95617, processing_day#95619, count#95849L, MS[0]#95684L, MS[1]#95685L, MS[2]#95686L, MS[3]#95687L, MS[4]#95688L, MS[5]#95689L, MS[6]#95690L, MS[7]#95691L, MS[8]#95692L, MS[9]#95693L, MS[10]#95694L, MS[11]#95695L, MS[12]#95696L, MS[13]#95697L, MS[14]#95698L, MS[15]#95699L, MS[16]#95700L, MS[17]#95701L, MS[18]#95702L, MS[19]#95703L, MS[20]#95704L, MS[21]#95705L, MS[22]#95706L, MS[23]#95707L, MS[24]#95708L, MS[25]#95709L, MS[26]#95710L, MS[27]#95711L, MS[28]#95712L, MS[29]#95713L, MS[30]#95714L, MS[31]#95715L, MS[32]#95716L, MS[33]#95717L, MS[34]#95718L, MS[35]#95719L, MS[36]#95720L, MS[37]#95721L, MS[38]#95722L, MS[39]#95723L, MS[40]#95724L, MS[41]#95725L, MS[42]#95726L, MS[43]#95727L, MS[44]#95728L, MS[45]#95729L, MS[46]#95730L, MS[47]#95731L, MS[48]#95732L, MS[49]#95733L, MS[50]#95734L, MS[51]#95735L, sum#95850L, sum#95851, sum#95852, count#95853L]
Arguments: hashpartitioning(segment#95617, processing_day#95619, 200), ENSURE_REQUIREMENTS, [plan_id=9011]
(16) HashAggregate
Input [59]: [segment#95617, processing_day#95619, count#95849L, MS[0]#95684L, MS[1]#95685L, MS[2]#95686L, MS[3]#95687L, MS[4]#95688L, MS[5]#95689L, MS[6]#95690L, MS[7]#95691L, MS[8]#95692L, MS[9]#95693L, MS[10]#95694L, MS[11]#95695L, MS[12]#95696L, MS[13]#95697L, MS[14]#95698L, MS[15]#95699L, MS[16]#95700L, MS[17]#95701L, MS[18]#95702L, MS[19]#95703L, MS[20]#95704L, MS[21]#95705L, MS[22]#95706L, MS[23]#95707L, MS[24]#95708L, MS[25]#95709L, MS[26]#95710L, MS[27]#95711L, MS[28]#95712L, MS[29]#95713L, MS[30]#95714L, MS[31]#95715L, MS[32]#95716L, MS[33]#95717L, MS[34]#95718L, MS[35]#95719L, MS[36]#95720L, MS[37]#95721L, MS[38]#95722L, MS[39]#95723L, MS[40]#95724L, MS[41]#95725L, MS[42]#95726L, MS[43]#95727L, MS[44]#95728L, MS[45]#95729L, MS[46]#95730L, MS[47]#95731L, MS[48]#95732L, MS[49]#95733L, MS[50]#95734L, MS[51]#95735L, sum#95850L, sum#95851, sum#95852, count#95853L]
Keys [2]: [segment#95617, processing_day#95619]
Functions [5]: [count(1), approx_count_distinct(customer_id#95613L, 0.05, 0, 0), sum(events#95623), sum(weighted_amount#95625), avg(amount#95621)]
Aggregate Attributes [5]: [count(1)#95631L, approx_count_distinct(customer_id#95613L, 0.05, 0, 0)#95736L, sum(events#95623)#95737L, sum(weighted_amount#95625)#95738, avg(amount#95621)#95739]
Results [7]: [segment#95617, processing_day#95619, count(1)#95631L AS row_count#95626L, approx_count_distinct(customer_id#95613L, 0.05, 0, 0)#95736L AS unique_customers#95627L, sum(events#95623)#95737L AS event_sum#95628L, sum(weighted_amount#95625)#95738 AS weighted_amount_sum#95629, avg(amount#95621)#95739 AS avg_amount#95630]
(17) Exchange
Input [7]: [segment#95617, processing_day#95619, row_count#95626L, unique_customers#95627L, event_sum#95628L, weighted_amount_sum#95629, avg_amount#95630]
Arguments: rangepartitioning(segment#95617 ASC NULLS FIRST, processing_day#95619 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=9014]
(18) Sort
Input [7]: [segment#95617, processing_day#95619, row_count#95626L, unique_customers#95627L, event_sum#95628L, weighted_amount_sum#95629, avg_amount#95630]
Arguments: [segment#95617 ASC NULLS FIRST, processing_day#95619 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#95617, processing_day#95619, row_count#95626L, unique_customers#95627L, event_sum#95628L, weighted_amount_sum#95629, avg_amount#95630]
Arguments: isFinalPlan=true