== 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#55763L]
Arguments: Range (15000000, 16000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#55763L % 250000) AS customer_id#55765L, concat(segment-, cast(cast((id#55763L % 12) as int) as string)) AS segment#55769, cast((id#55763L % 14) as int) AS processing_day#55771, ((cast(((id#55763L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#55773, cast((((id#55763L * 29) % 7) + 1) as int) AS events#55775]
Input [1]: [id#55763L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#55765L, segment#55769, processing_day#55771, amount#55773, events#55775, (amount#55773 * cast(events#55775 as double)) AS weighted_amount#55777]
Input [5]: [customer_id#55765L, segment#55769, processing_day#55771, amount#55773, events#55775]
(4) HashAggregate
Input [6]: [customer_id#55765L, segment#55769, processing_day#55771, amount#55773, events#55775, weighted_amount#55777]
Keys [2]: [segment#55769, processing_day#55771]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#55765L, 0.05, 0, 0), partial_sum(events#55775), partial_sum(weighted_amount#55777), partial_avg(amount#55773)]
Aggregate Attributes [57]: [count#55996L, MS[0]#55784L, MS[1]#55785L, MS[2]#55786L, MS[3]#55787L, MS[4]#55788L, MS[5]#55789L, MS[6]#55790L, MS[7]#55791L, MS[8]#55792L, MS[9]#55793L, MS[10]#55794L, MS[11]#55795L, MS[12]#55796L, MS[13]#55797L, MS[14]#55798L, MS[15]#55799L, MS[16]#55800L, MS[17]#55801L, MS[18]#55802L, MS[19]#55803L, MS[20]#55804L, MS[21]#55805L, MS[22]#55806L, MS[23]#55807L, MS[24]#55808L, MS[25]#55809L, MS[26]#55810L, MS[27]#55811L, MS[28]#55812L, MS[29]#55813L, MS[30]#55814L, MS[31]#55815L, MS[32]#55816L, MS[33]#55817L, MS[34]#55818L, MS[35]#55819L, MS[36]#55820L, MS[37]#55821L, MS[38]#55822L, MS[39]#55823L, MS[40]#55824L, MS[41]#55825L, MS[42]#55826L, MS[43]#55827L, MS[44]#55828L, MS[45]#55829L, MS[46]#55830L, MS[47]#55831L, MS[48]#55832L, MS[49]#55833L, MS[50]#55834L, MS[51]#55835L, sum#55997L, sum#55998, sum#55999, count#56000L]
Results [59]: [segment#55769, processing_day#55771, count#56001L, MS[0]#55836L, MS[1]#55837L, MS[2]#55838L, MS[3]#55839L, MS[4]#55840L, MS[5]#55841L, MS[6]#55842L, MS[7]#55843L, MS[8]#55844L, MS[9]#55845L, MS[10]#55846L, MS[11]#55847L, MS[12]#55848L, MS[13]#55849L, MS[14]#55850L, MS[15]#55851L, MS[16]#55852L, MS[17]#55853L, MS[18]#55854L, MS[19]#55855L, MS[20]#55856L, MS[21]#55857L, MS[22]#55858L, MS[23]#55859L, MS[24]#55860L, MS[25]#55861L, MS[26]#55862L, MS[27]#55863L, MS[28]#55864L, MS[29]#55865L, MS[30]#55866L, MS[31]#55867L, MS[32]#55868L, MS[33]#55869L, MS[34]#55870L, MS[35]#55871L, MS[36]#55872L, MS[37]#55873L, MS[38]#55874L, MS[39]#55875L, MS[40]#55876L, MS[41]#55877L, MS[42]#55878L, MS[43]#55879L, MS[44]#55880L, MS[45]#55881L, MS[46]#55882L, MS[47]#55883L, MS[48]#55884L, MS[49]#55885L, MS[50]#55886L, MS[51]#55887L, sum#56002L, sum#56003, sum#56004, count#56005L]
(5) Exchange
Input [59]: [segment#55769, processing_day#55771, count#56001L, MS[0]#55836L, MS[1]#55837L, MS[2]#55838L, MS[3]#55839L, MS[4]#55840L, MS[5]#55841L, MS[6]#55842L, MS[7]#55843L, MS[8]#55844L, MS[9]#55845L, MS[10]#55846L, MS[11]#55847L, MS[12]#55848L, MS[13]#55849L, MS[14]#55850L, MS[15]#55851L, MS[16]#55852L, MS[17]#55853L, MS[18]#55854L, MS[19]#55855L, MS[20]#55856L, MS[21]#55857L, MS[22]#55858L, MS[23]#55859L, MS[24]#55860L, MS[25]#55861L, MS[26]#55862L, MS[27]#55863L, MS[28]#55864L, MS[29]#55865L, MS[30]#55866L, MS[31]#55867L, MS[32]#55868L, MS[33]#55869L, MS[34]#55870L, MS[35]#55871L, MS[36]#55872L, MS[37]#55873L, MS[38]#55874L, MS[39]#55875L, MS[40]#55876L, MS[41]#55877L, MS[42]#55878L, MS[43]#55879L, MS[44]#55880L, MS[45]#55881L, MS[46]#55882L, MS[47]#55883L, MS[48]#55884L, MS[49]#55885L, MS[50]#55886L, MS[51]#55887L, sum#56002L, sum#56003, sum#56004, count#56005L]
Arguments: hashpartitioning(segment#55769, processing_day#55771, 200), ENSURE_REQUIREMENTS, [plan_id=5284]
(6) ShuffleQueryStage
Output [59]: [segment#55769, processing_day#55771, count#56001L, MS[0]#55836L, MS[1]#55837L, MS[2]#55838L, MS[3]#55839L, MS[4]#55840L, MS[5]#55841L, MS[6]#55842L, MS[7]#55843L, MS[8]#55844L, MS[9]#55845L, MS[10]#55846L, MS[11]#55847L, MS[12]#55848L, MS[13]#55849L, MS[14]#55850L, MS[15]#55851L, MS[16]#55852L, MS[17]#55853L, MS[18]#55854L, MS[19]#55855L, MS[20]#55856L, MS[21]#55857L, MS[22]#55858L, MS[23]#55859L, MS[24]#55860L, MS[25]#55861L, MS[26]#55862L, MS[27]#55863L, MS[28]#55864L, MS[29]#55865L, MS[30]#55866L, MS[31]#55867L, MS[32]#55868L, MS[33]#55869L, MS[34]#55870L, MS[35]#55871L, MS[36]#55872L, MS[37]#55873L, MS[38]#55874L, MS[39]#55875L, MS[40]#55876L, MS[41]#55877L, MS[42]#55878L, MS[43]#55879L, MS[44]#55880L, MS[45]#55881L, MS[46]#55882L, MS[47]#55883L, MS[48]#55884L, MS[49]#55885L, MS[50]#55886L, MS[51]#55887L, sum#56002L, sum#56003, sum#56004, count#56005L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#55769, processing_day#55771, count#56001L, MS[0]#55836L, MS[1]#55837L, MS[2]#55838L, MS[3]#55839L, MS[4]#55840L, MS[5]#55841L, MS[6]#55842L, MS[7]#55843L, MS[8]#55844L, MS[9]#55845L, MS[10]#55846L, MS[11]#55847L, MS[12]#55848L, MS[13]#55849L, MS[14]#55850L, MS[15]#55851L, MS[16]#55852L, MS[17]#55853L, MS[18]#55854L, MS[19]#55855L, MS[20]#55856L, MS[21]#55857L, MS[22]#55858L, MS[23]#55859L, MS[24]#55860L, MS[25]#55861L, MS[26]#55862L, MS[27]#55863L, MS[28]#55864L, MS[29]#55865L, MS[30]#55866L, MS[31]#55867L, MS[32]#55868L, MS[33]#55869L, MS[34]#55870L, MS[35]#55871L, MS[36]#55872L, MS[37]#55873L, MS[38]#55874L, MS[39]#55875L, MS[40]#55876L, MS[41]#55877L, MS[42]#55878L, MS[43]#55879L, MS[44]#55880L, MS[45]#55881L, MS[46]#55882L, MS[47]#55883L, MS[48]#55884L, MS[49]#55885L, MS[50]#55886L, MS[51]#55887L, sum#56002L, sum#56003, sum#56004, count#56005L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#55769, processing_day#55771, count#56001L, MS[0]#55836L, MS[1]#55837L, MS[2]#55838L, MS[3]#55839L, MS[4]#55840L, MS[5]#55841L, MS[6]#55842L, MS[7]#55843L, MS[8]#55844L, MS[9]#55845L, MS[10]#55846L, MS[11]#55847L, MS[12]#55848L, MS[13]#55849L, MS[14]#55850L, MS[15]#55851L, MS[16]#55852L, MS[17]#55853L, MS[18]#55854L, MS[19]#55855L, MS[20]#55856L, MS[21]#55857L, MS[22]#55858L, MS[23]#55859L, MS[24]#55860L, MS[25]#55861L, MS[26]#55862L, MS[27]#55863L, MS[28]#55864L, MS[29]#55865L, MS[30]#55866L, MS[31]#55867L, MS[32]#55868L, MS[33]#55869L, MS[34]#55870L, MS[35]#55871L, MS[36]#55872L, MS[37]#55873L, MS[38]#55874L, MS[39]#55875L, MS[40]#55876L, MS[41]#55877L, MS[42]#55878L, MS[43]#55879L, MS[44]#55880L, MS[45]#55881L, MS[46]#55882L, MS[47]#55883L, MS[48]#55884L, MS[49]#55885L, MS[50]#55886L, MS[51]#55887L, sum#56002L, sum#56003, sum#56004, count#56005L]
Keys [2]: [segment#55769, processing_day#55771]
Functions [5]: [count(1), approx_count_distinct(customer_id#55765L, 0.05, 0, 0), sum(events#55775), sum(weighted_amount#55777), avg(amount#55773)]
Aggregate Attributes [5]: [count(1)#55783L, approx_count_distinct(customer_id#55765L, 0.05, 0, 0)#55888L, sum(events#55775)#55889L, sum(weighted_amount#55777)#55890, avg(amount#55773)#55891]
Results [7]: [segment#55769, processing_day#55771, count(1)#55783L AS row_count#55778L, approx_count_distinct(customer_id#55765L, 0.05, 0, 0)#55888L AS unique_customers#55779L, sum(events#55775)#55889L AS event_sum#55780L, sum(weighted_amount#55777)#55890 AS weighted_amount_sum#55781, avg(amount#55773)#55891 AS avg_amount#55782]
(9) Exchange
Input [7]: [segment#55769, processing_day#55771, row_count#55778L, unique_customers#55779L, event_sum#55780L, weighted_amount_sum#55781, avg_amount#55782]
Arguments: rangepartitioning(segment#55769 ASC NULLS FIRST, processing_day#55771 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=5306]
(10) ShuffleQueryStage
Output [7]: [segment#55769, processing_day#55771, row_count#55778L, unique_customers#55779L, event_sum#55780L, weighted_amount_sum#55781, avg_amount#55782]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#55769, processing_day#55771, row_count#55778L, unique_customers#55779L, event_sum#55780L, weighted_amount_sum#55781, avg_amount#55782]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#55769, processing_day#55771, row_count#55778L, unique_customers#55779L, event_sum#55780L, weighted_amount_sum#55781, avg_amount#55782]
Arguments: [segment#55769 ASC NULLS FIRST, processing_day#55771 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#55769, processing_day#55771, row_count#55778L, unique_customers#55779L, event_sum#55780L, weighted_amount_sum#55781, avg_amount#55782]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#55765L, segment#55769, processing_day#55771, amount#55773, events#55775, weighted_amount#55777]
Keys [2]: [segment#55769, processing_day#55771]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#55765L, 0.05, 0, 0), partial_sum(events#55775), partial_sum(weighted_amount#55777), partial_avg(amount#55773)]
Aggregate Attributes [57]: [count#55996L, MS[0]#55784L, MS[1]#55785L, MS[2]#55786L, MS[3]#55787L, MS[4]#55788L, MS[5]#55789L, MS[6]#55790L, MS[7]#55791L, MS[8]#55792L, MS[9]#55793L, MS[10]#55794L, MS[11]#55795L, MS[12]#55796L, MS[13]#55797L, MS[14]#55798L, MS[15]#55799L, MS[16]#55800L, MS[17]#55801L, MS[18]#55802L, MS[19]#55803L, MS[20]#55804L, MS[21]#55805L, MS[22]#55806L, MS[23]#55807L, MS[24]#55808L, MS[25]#55809L, MS[26]#55810L, MS[27]#55811L, MS[28]#55812L, MS[29]#55813L, MS[30]#55814L, MS[31]#55815L, MS[32]#55816L, MS[33]#55817L, MS[34]#55818L, MS[35]#55819L, MS[36]#55820L, MS[37]#55821L, MS[38]#55822L, MS[39]#55823L, MS[40]#55824L, MS[41]#55825L, MS[42]#55826L, MS[43]#55827L, MS[44]#55828L, MS[45]#55829L, MS[46]#55830L, MS[47]#55831L, MS[48]#55832L, MS[49]#55833L, MS[50]#55834L, MS[51]#55835L, sum#55997L, sum#55998, sum#55999, count#56000L]
Results [59]: [segment#55769, processing_day#55771, count#56001L, MS[0]#55836L, MS[1]#55837L, MS[2]#55838L, MS[3]#55839L, MS[4]#55840L, MS[5]#55841L, MS[6]#55842L, MS[7]#55843L, MS[8]#55844L, MS[9]#55845L, MS[10]#55846L, MS[11]#55847L, MS[12]#55848L, MS[13]#55849L, MS[14]#55850L, MS[15]#55851L, MS[16]#55852L, MS[17]#55853L, MS[18]#55854L, MS[19]#55855L, MS[20]#55856L, MS[21]#55857L, MS[22]#55858L, MS[23]#55859L, MS[24]#55860L, MS[25]#55861L, MS[26]#55862L, MS[27]#55863L, MS[28]#55864L, MS[29]#55865L, MS[30]#55866L, MS[31]#55867L, MS[32]#55868L, MS[33]#55869L, MS[34]#55870L, MS[35]#55871L, MS[36]#55872L, MS[37]#55873L, MS[38]#55874L, MS[39]#55875L, MS[40]#55876L, MS[41]#55877L, MS[42]#55878L, MS[43]#55879L, MS[44]#55880L, MS[45]#55881L, MS[46]#55882L, MS[47]#55883L, MS[48]#55884L, MS[49]#55885L, MS[50]#55886L, MS[51]#55887L, sum#56002L, sum#56003, sum#56004, count#56005L]
(15) Exchange
Input [59]: [segment#55769, processing_day#55771, count#56001L, MS[0]#55836L, MS[1]#55837L, MS[2]#55838L, MS[3]#55839L, MS[4]#55840L, MS[5]#55841L, MS[6]#55842L, MS[7]#55843L, MS[8]#55844L, MS[9]#55845L, MS[10]#55846L, MS[11]#55847L, MS[12]#55848L, MS[13]#55849L, MS[14]#55850L, MS[15]#55851L, MS[16]#55852L, MS[17]#55853L, MS[18]#55854L, MS[19]#55855L, MS[20]#55856L, MS[21]#55857L, MS[22]#55858L, MS[23]#55859L, MS[24]#55860L, MS[25]#55861L, MS[26]#55862L, MS[27]#55863L, MS[28]#55864L, MS[29]#55865L, MS[30]#55866L, MS[31]#55867L, MS[32]#55868L, MS[33]#55869L, MS[34]#55870L, MS[35]#55871L, MS[36]#55872L, MS[37]#55873L, MS[38]#55874L, MS[39]#55875L, MS[40]#55876L, MS[41]#55877L, MS[42]#55878L, MS[43]#55879L, MS[44]#55880L, MS[45]#55881L, MS[46]#55882L, MS[47]#55883L, MS[48]#55884L, MS[49]#55885L, MS[50]#55886L, MS[51]#55887L, sum#56002L, sum#56003, sum#56004, count#56005L]
Arguments: hashpartitioning(segment#55769, processing_day#55771, 200), ENSURE_REQUIREMENTS, [plan_id=5264]
(16) HashAggregate
Input [59]: [segment#55769, processing_day#55771, count#56001L, MS[0]#55836L, MS[1]#55837L, MS[2]#55838L, MS[3]#55839L, MS[4]#55840L, MS[5]#55841L, MS[6]#55842L, MS[7]#55843L, MS[8]#55844L, MS[9]#55845L, MS[10]#55846L, MS[11]#55847L, MS[12]#55848L, MS[13]#55849L, MS[14]#55850L, MS[15]#55851L, MS[16]#55852L, MS[17]#55853L, MS[18]#55854L, MS[19]#55855L, MS[20]#55856L, MS[21]#55857L, MS[22]#55858L, MS[23]#55859L, MS[24]#55860L, MS[25]#55861L, MS[26]#55862L, MS[27]#55863L, MS[28]#55864L, MS[29]#55865L, MS[30]#55866L, MS[31]#55867L, MS[32]#55868L, MS[33]#55869L, MS[34]#55870L, MS[35]#55871L, MS[36]#55872L, MS[37]#55873L, MS[38]#55874L, MS[39]#55875L, MS[40]#55876L, MS[41]#55877L, MS[42]#55878L, MS[43]#55879L, MS[44]#55880L, MS[45]#55881L, MS[46]#55882L, MS[47]#55883L, MS[48]#55884L, MS[49]#55885L, MS[50]#55886L, MS[51]#55887L, sum#56002L, sum#56003, sum#56004, count#56005L]
Keys [2]: [segment#55769, processing_day#55771]
Functions [5]: [count(1), approx_count_distinct(customer_id#55765L, 0.05, 0, 0), sum(events#55775), sum(weighted_amount#55777), avg(amount#55773)]
Aggregate Attributes [5]: [count(1)#55783L, approx_count_distinct(customer_id#55765L, 0.05, 0, 0)#55888L, sum(events#55775)#55889L, sum(weighted_amount#55777)#55890, avg(amount#55773)#55891]
Results [7]: [segment#55769, processing_day#55771, count(1)#55783L AS row_count#55778L, approx_count_distinct(customer_id#55765L, 0.05, 0, 0)#55888L AS unique_customers#55779L, sum(events#55775)#55889L AS event_sum#55780L, sum(weighted_amount#55777)#55890 AS weighted_amount_sum#55781, avg(amount#55773)#55891 AS avg_amount#55782]
(17) Exchange
Input [7]: [segment#55769, processing_day#55771, row_count#55778L, unique_customers#55779L, event_sum#55780L, weighted_amount_sum#55781, avg_amount#55782]
Arguments: rangepartitioning(segment#55769 ASC NULLS FIRST, processing_day#55771 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=5267]
(18) Sort
Input [7]: [segment#55769, processing_day#55771, row_count#55778L, unique_customers#55779L, event_sum#55780L, weighted_amount_sum#55781, avg_amount#55782]
Arguments: [segment#55769 ASC NULLS FIRST, processing_day#55771 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#55769, processing_day#55771, row_count#55778L, unique_customers#55779L, event_sum#55780L, weighted_amount_sum#55781, avg_amount#55782]
Arguments: isFinalPlan=true