== 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#85887L]
Arguments: Range (1000000, 2000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#85887L % 250000) AS customer_id#85889L, concat(segment-, cast(cast((id#85887L % 12) as int) as string)) AS segment#85893, cast((id#85887L % 14) as int) AS processing_day#85895, ((cast(((id#85887L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#85897, cast((((id#85887L * 29) % 7) + 1) as int) AS events#85899]
Input [1]: [id#85887L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#85889L, segment#85893, processing_day#85895, amount#85897, events#85899, (amount#85897 * cast(events#85899 as double)) AS weighted_amount#85901]
Input [5]: [customer_id#85889L, segment#85893, processing_day#85895, amount#85897, events#85899]
(4) HashAggregate
Input [6]: [customer_id#85889L, segment#85893, processing_day#85895, amount#85897, events#85899, weighted_amount#85901]
Keys [2]: [segment#85893, processing_day#85895]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#85889L, 0.05, 0, 0), partial_sum(events#85899), partial_sum(weighted_amount#85901), partial_avg(amount#85897)]
Aggregate Attributes [57]: [count#86120L, MS[0]#85908L, MS[1]#85909L, MS[2]#85910L, MS[3]#85911L, MS[4]#85912L, MS[5]#85913L, MS[6]#85914L, MS[7]#85915L, MS[8]#85916L, MS[9]#85917L, MS[10]#85918L, MS[11]#85919L, MS[12]#85920L, MS[13]#85921L, MS[14]#85922L, MS[15]#85923L, MS[16]#85924L, MS[17]#85925L, MS[18]#85926L, MS[19]#85927L, MS[20]#85928L, MS[21]#85929L, MS[22]#85930L, MS[23]#85931L, MS[24]#85932L, MS[25]#85933L, MS[26]#85934L, MS[27]#85935L, MS[28]#85936L, MS[29]#85937L, MS[30]#85938L, MS[31]#85939L, MS[32]#85940L, MS[33]#85941L, MS[34]#85942L, MS[35]#85943L, MS[36]#85944L, MS[37]#85945L, MS[38]#85946L, MS[39]#85947L, MS[40]#85948L, MS[41]#85949L, MS[42]#85950L, MS[43]#85951L, MS[44]#85952L, MS[45]#85953L, MS[46]#85954L, MS[47]#85955L, MS[48]#85956L, MS[49]#85957L, MS[50]#85958L, MS[51]#85959L, sum#86121L, sum#86122, sum#86123, count#86124L]
Results [59]: [segment#85893, processing_day#85895, count#86125L, MS[0]#85960L, MS[1]#85961L, MS[2]#85962L, MS[3]#85963L, MS[4]#85964L, MS[5]#85965L, MS[6]#85966L, MS[7]#85967L, MS[8]#85968L, MS[9]#85969L, MS[10]#85970L, MS[11]#85971L, MS[12]#85972L, MS[13]#85973L, MS[14]#85974L, MS[15]#85975L, MS[16]#85976L, MS[17]#85977L, MS[18]#85978L, MS[19]#85979L, MS[20]#85980L, MS[21]#85981L, MS[22]#85982L, MS[23]#85983L, MS[24]#85984L, MS[25]#85985L, MS[26]#85986L, MS[27]#85987L, MS[28]#85988L, MS[29]#85989L, MS[30]#85990L, MS[31]#85991L, MS[32]#85992L, MS[33]#85993L, MS[34]#85994L, MS[35]#85995L, MS[36]#85996L, MS[37]#85997L, MS[38]#85998L, MS[39]#85999L, MS[40]#86000L, MS[41]#86001L, MS[42]#86002L, MS[43]#86003L, MS[44]#86004L, MS[45]#86005L, MS[46]#86006L, MS[47]#86007L, MS[48]#86008L, MS[49]#86009L, MS[50]#86010L, MS[51]#86011L, sum#86126L, sum#86127, sum#86128, count#86129L]
(5) Exchange
Input [59]: [segment#85893, processing_day#85895, count#86125L, MS[0]#85960L, MS[1]#85961L, MS[2]#85962L, MS[3]#85963L, MS[4]#85964L, MS[5]#85965L, MS[6]#85966L, MS[7]#85967L, MS[8]#85968L, MS[9]#85969L, MS[10]#85970L, MS[11]#85971L, MS[12]#85972L, MS[13]#85973L, MS[14]#85974L, MS[15]#85975L, MS[16]#85976L, MS[17]#85977L, MS[18]#85978L, MS[19]#85979L, MS[20]#85980L, MS[21]#85981L, MS[22]#85982L, MS[23]#85983L, MS[24]#85984L, MS[25]#85985L, MS[26]#85986L, MS[27]#85987L, MS[28]#85988L, MS[29]#85989L, MS[30]#85990L, MS[31]#85991L, MS[32]#85992L, MS[33]#85993L, MS[34]#85994L, MS[35]#85995L, MS[36]#85996L, MS[37]#85997L, MS[38]#85998L, MS[39]#85999L, MS[40]#86000L, MS[41]#86001L, MS[42]#86002L, MS[43]#86003L, MS[44]#86004L, MS[45]#86005L, MS[46]#86006L, MS[47]#86007L, MS[48]#86008L, MS[49]#86009L, MS[50]#86010L, MS[51]#86011L, sum#86126L, sum#86127, sum#86128, count#86129L]
Arguments: hashpartitioning(segment#85893, processing_day#85895, 200), ENSURE_REQUIREMENTS, [plan_id=8118]
(6) ShuffleQueryStage
Output [59]: [segment#85893, processing_day#85895, count#86125L, MS[0]#85960L, MS[1]#85961L, MS[2]#85962L, MS[3]#85963L, MS[4]#85964L, MS[5]#85965L, MS[6]#85966L, MS[7]#85967L, MS[8]#85968L, MS[9]#85969L, MS[10]#85970L, MS[11]#85971L, MS[12]#85972L, MS[13]#85973L, MS[14]#85974L, MS[15]#85975L, MS[16]#85976L, MS[17]#85977L, MS[18]#85978L, MS[19]#85979L, MS[20]#85980L, MS[21]#85981L, MS[22]#85982L, MS[23]#85983L, MS[24]#85984L, MS[25]#85985L, MS[26]#85986L, MS[27]#85987L, MS[28]#85988L, MS[29]#85989L, MS[30]#85990L, MS[31]#85991L, MS[32]#85992L, MS[33]#85993L, MS[34]#85994L, MS[35]#85995L, MS[36]#85996L, MS[37]#85997L, MS[38]#85998L, MS[39]#85999L, MS[40]#86000L, MS[41]#86001L, MS[42]#86002L, MS[43]#86003L, MS[44]#86004L, MS[45]#86005L, MS[46]#86006L, MS[47]#86007L, MS[48]#86008L, MS[49]#86009L, MS[50]#86010L, MS[51]#86011L, sum#86126L, sum#86127, sum#86128, count#86129L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#85893, processing_day#85895, count#86125L, MS[0]#85960L, MS[1]#85961L, MS[2]#85962L, MS[3]#85963L, MS[4]#85964L, MS[5]#85965L, MS[6]#85966L, MS[7]#85967L, MS[8]#85968L, MS[9]#85969L, MS[10]#85970L, MS[11]#85971L, MS[12]#85972L, MS[13]#85973L, MS[14]#85974L, MS[15]#85975L, MS[16]#85976L, MS[17]#85977L, MS[18]#85978L, MS[19]#85979L, MS[20]#85980L, MS[21]#85981L, MS[22]#85982L, MS[23]#85983L, MS[24]#85984L, MS[25]#85985L, MS[26]#85986L, MS[27]#85987L, MS[28]#85988L, MS[29]#85989L, MS[30]#85990L, MS[31]#85991L, MS[32]#85992L, MS[33]#85993L, MS[34]#85994L, MS[35]#85995L, MS[36]#85996L, MS[37]#85997L, MS[38]#85998L, MS[39]#85999L, MS[40]#86000L, MS[41]#86001L, MS[42]#86002L, MS[43]#86003L, MS[44]#86004L, MS[45]#86005L, MS[46]#86006L, MS[47]#86007L, MS[48]#86008L, MS[49]#86009L, MS[50]#86010L, MS[51]#86011L, sum#86126L, sum#86127, sum#86128, count#86129L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#85893, processing_day#85895, count#86125L, MS[0]#85960L, MS[1]#85961L, MS[2]#85962L, MS[3]#85963L, MS[4]#85964L, MS[5]#85965L, MS[6]#85966L, MS[7]#85967L, MS[8]#85968L, MS[9]#85969L, MS[10]#85970L, MS[11]#85971L, MS[12]#85972L, MS[13]#85973L, MS[14]#85974L, MS[15]#85975L, MS[16]#85976L, MS[17]#85977L, MS[18]#85978L, MS[19]#85979L, MS[20]#85980L, MS[21]#85981L, MS[22]#85982L, MS[23]#85983L, MS[24]#85984L, MS[25]#85985L, MS[26]#85986L, MS[27]#85987L, MS[28]#85988L, MS[29]#85989L, MS[30]#85990L, MS[31]#85991L, MS[32]#85992L, MS[33]#85993L, MS[34]#85994L, MS[35]#85995L, MS[36]#85996L, MS[37]#85997L, MS[38]#85998L, MS[39]#85999L, MS[40]#86000L, MS[41]#86001L, MS[42]#86002L, MS[43]#86003L, MS[44]#86004L, MS[45]#86005L, MS[46]#86006L, MS[47]#86007L, MS[48]#86008L, MS[49]#86009L, MS[50]#86010L, MS[51]#86011L, sum#86126L, sum#86127, sum#86128, count#86129L]
Keys [2]: [segment#85893, processing_day#85895]
Functions [5]: [count(1), approx_count_distinct(customer_id#85889L, 0.05, 0, 0), sum(events#85899), sum(weighted_amount#85901), avg(amount#85897)]
Aggregate Attributes [5]: [count(1)#85907L, approx_count_distinct(customer_id#85889L, 0.05, 0, 0)#86012L, sum(events#85899)#86013L, sum(weighted_amount#85901)#86014, avg(amount#85897)#86015]
Results [7]: [segment#85893, processing_day#85895, count(1)#85907L AS row_count#85902L, approx_count_distinct(customer_id#85889L, 0.05, 0, 0)#86012L AS unique_customers#85903L, sum(events#85899)#86013L AS event_sum#85904L, sum(weighted_amount#85901)#86014 AS weighted_amount_sum#85905, avg(amount#85897)#86015 AS avg_amount#85906]
(9) Exchange
Input [7]: [segment#85893, processing_day#85895, row_count#85902L, unique_customers#85903L, event_sum#85904L, weighted_amount_sum#85905, avg_amount#85906]
Arguments: rangepartitioning(segment#85893 ASC NULLS FIRST, processing_day#85895 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=8140]
(10) ShuffleQueryStage
Output [7]: [segment#85893, processing_day#85895, row_count#85902L, unique_customers#85903L, event_sum#85904L, weighted_amount_sum#85905, avg_amount#85906]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#85893, processing_day#85895, row_count#85902L, unique_customers#85903L, event_sum#85904L, weighted_amount_sum#85905, avg_amount#85906]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#85893, processing_day#85895, row_count#85902L, unique_customers#85903L, event_sum#85904L, weighted_amount_sum#85905, avg_amount#85906]
Arguments: [segment#85893 ASC NULLS FIRST, processing_day#85895 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#85893, processing_day#85895, row_count#85902L, unique_customers#85903L, event_sum#85904L, weighted_amount_sum#85905, avg_amount#85906]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#85889L, segment#85893, processing_day#85895, amount#85897, events#85899, weighted_amount#85901]
Keys [2]: [segment#85893, processing_day#85895]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#85889L, 0.05, 0, 0), partial_sum(events#85899), partial_sum(weighted_amount#85901), partial_avg(amount#85897)]
Aggregate Attributes [57]: [count#86120L, MS[0]#85908L, MS[1]#85909L, MS[2]#85910L, MS[3]#85911L, MS[4]#85912L, MS[5]#85913L, MS[6]#85914L, MS[7]#85915L, MS[8]#85916L, MS[9]#85917L, MS[10]#85918L, MS[11]#85919L, MS[12]#85920L, MS[13]#85921L, MS[14]#85922L, MS[15]#85923L, MS[16]#85924L, MS[17]#85925L, MS[18]#85926L, MS[19]#85927L, MS[20]#85928L, MS[21]#85929L, MS[22]#85930L, MS[23]#85931L, MS[24]#85932L, MS[25]#85933L, MS[26]#85934L, MS[27]#85935L, MS[28]#85936L, MS[29]#85937L, MS[30]#85938L, MS[31]#85939L, MS[32]#85940L, MS[33]#85941L, MS[34]#85942L, MS[35]#85943L, MS[36]#85944L, MS[37]#85945L, MS[38]#85946L, MS[39]#85947L, MS[40]#85948L, MS[41]#85949L, MS[42]#85950L, MS[43]#85951L, MS[44]#85952L, MS[45]#85953L, MS[46]#85954L, MS[47]#85955L, MS[48]#85956L, MS[49]#85957L, MS[50]#85958L, MS[51]#85959L, sum#86121L, sum#86122, sum#86123, count#86124L]
Results [59]: [segment#85893, processing_day#85895, count#86125L, MS[0]#85960L, MS[1]#85961L, MS[2]#85962L, MS[3]#85963L, MS[4]#85964L, MS[5]#85965L, MS[6]#85966L, MS[7]#85967L, MS[8]#85968L, MS[9]#85969L, MS[10]#85970L, MS[11]#85971L, MS[12]#85972L, MS[13]#85973L, MS[14]#85974L, MS[15]#85975L, MS[16]#85976L, MS[17]#85977L, MS[18]#85978L, MS[19]#85979L, MS[20]#85980L, MS[21]#85981L, MS[22]#85982L, MS[23]#85983L, MS[24]#85984L, MS[25]#85985L, MS[26]#85986L, MS[27]#85987L, MS[28]#85988L, MS[29]#85989L, MS[30]#85990L, MS[31]#85991L, MS[32]#85992L, MS[33]#85993L, MS[34]#85994L, MS[35]#85995L, MS[36]#85996L, MS[37]#85997L, MS[38]#85998L, MS[39]#85999L, MS[40]#86000L, MS[41]#86001L, MS[42]#86002L, MS[43]#86003L, MS[44]#86004L, MS[45]#86005L, MS[46]#86006L, MS[47]#86007L, MS[48]#86008L, MS[49]#86009L, MS[50]#86010L, MS[51]#86011L, sum#86126L, sum#86127, sum#86128, count#86129L]
(15) Exchange
Input [59]: [segment#85893, processing_day#85895, count#86125L, MS[0]#85960L, MS[1]#85961L, MS[2]#85962L, MS[3]#85963L, MS[4]#85964L, MS[5]#85965L, MS[6]#85966L, MS[7]#85967L, MS[8]#85968L, MS[9]#85969L, MS[10]#85970L, MS[11]#85971L, MS[12]#85972L, MS[13]#85973L, MS[14]#85974L, MS[15]#85975L, MS[16]#85976L, MS[17]#85977L, MS[18]#85978L, MS[19]#85979L, MS[20]#85980L, MS[21]#85981L, MS[22]#85982L, MS[23]#85983L, MS[24]#85984L, MS[25]#85985L, MS[26]#85986L, MS[27]#85987L, MS[28]#85988L, MS[29]#85989L, MS[30]#85990L, MS[31]#85991L, MS[32]#85992L, MS[33]#85993L, MS[34]#85994L, MS[35]#85995L, MS[36]#85996L, MS[37]#85997L, MS[38]#85998L, MS[39]#85999L, MS[40]#86000L, MS[41]#86001L, MS[42]#86002L, MS[43]#86003L, MS[44]#86004L, MS[45]#86005L, MS[46]#86006L, MS[47]#86007L, MS[48]#86008L, MS[49]#86009L, MS[50]#86010L, MS[51]#86011L, sum#86126L, sum#86127, sum#86128, count#86129L]
Arguments: hashpartitioning(segment#85893, processing_day#85895, 200), ENSURE_REQUIREMENTS, [plan_id=8098]
(16) HashAggregate
Input [59]: [segment#85893, processing_day#85895, count#86125L, MS[0]#85960L, MS[1]#85961L, MS[2]#85962L, MS[3]#85963L, MS[4]#85964L, MS[5]#85965L, MS[6]#85966L, MS[7]#85967L, MS[8]#85968L, MS[9]#85969L, MS[10]#85970L, MS[11]#85971L, MS[12]#85972L, MS[13]#85973L, MS[14]#85974L, MS[15]#85975L, MS[16]#85976L, MS[17]#85977L, MS[18]#85978L, MS[19]#85979L, MS[20]#85980L, MS[21]#85981L, MS[22]#85982L, MS[23]#85983L, MS[24]#85984L, MS[25]#85985L, MS[26]#85986L, MS[27]#85987L, MS[28]#85988L, MS[29]#85989L, MS[30]#85990L, MS[31]#85991L, MS[32]#85992L, MS[33]#85993L, MS[34]#85994L, MS[35]#85995L, MS[36]#85996L, MS[37]#85997L, MS[38]#85998L, MS[39]#85999L, MS[40]#86000L, MS[41]#86001L, MS[42]#86002L, MS[43]#86003L, MS[44]#86004L, MS[45]#86005L, MS[46]#86006L, MS[47]#86007L, MS[48]#86008L, MS[49]#86009L, MS[50]#86010L, MS[51]#86011L, sum#86126L, sum#86127, sum#86128, count#86129L]
Keys [2]: [segment#85893, processing_day#85895]
Functions [5]: [count(1), approx_count_distinct(customer_id#85889L, 0.05, 0, 0), sum(events#85899), sum(weighted_amount#85901), avg(amount#85897)]
Aggregate Attributes [5]: [count(1)#85907L, approx_count_distinct(customer_id#85889L, 0.05, 0, 0)#86012L, sum(events#85899)#86013L, sum(weighted_amount#85901)#86014, avg(amount#85897)#86015]
Results [7]: [segment#85893, processing_day#85895, count(1)#85907L AS row_count#85902L, approx_count_distinct(customer_id#85889L, 0.05, 0, 0)#86012L AS unique_customers#85903L, sum(events#85899)#86013L AS event_sum#85904L, sum(weighted_amount#85901)#86014 AS weighted_amount_sum#85905, avg(amount#85897)#86015 AS avg_amount#85906]
(17) Exchange
Input [7]: [segment#85893, processing_day#85895, row_count#85902L, unique_customers#85903L, event_sum#85904L, weighted_amount_sum#85905, avg_amount#85906]
Arguments: rangepartitioning(segment#85893 ASC NULLS FIRST, processing_day#85895 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=8101]
(18) Sort
Input [7]: [segment#85893, processing_day#85895, row_count#85902L, unique_customers#85903L, event_sum#85904L, weighted_amount_sum#85905, avg_amount#85906]
Arguments: [segment#85893 ASC NULLS FIRST, processing_day#85895 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#85893, processing_day#85895, row_count#85902L, unique_customers#85903L, event_sum#85904L, weighted_amount_sum#85905, avg_amount#85906]
Arguments: isFinalPlan=true