== 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#70825L]
Arguments: Range (8000000, 9000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#70825L % 250000) AS customer_id#70827L, concat(segment-, cast(cast((id#70825L % 12) as int) as string)) AS segment#70831, cast((id#70825L % 14) as int) AS processing_day#70833, ((cast(((id#70825L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#70835, cast((((id#70825L * 29) % 7) + 1) as int) AS events#70837]
Input [1]: [id#70825L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#70827L, segment#70831, processing_day#70833, amount#70835, events#70837, (amount#70835 * cast(events#70837 as double)) AS weighted_amount#70839]
Input [5]: [customer_id#70827L, segment#70831, processing_day#70833, amount#70835, events#70837]
(4) HashAggregate
Input [6]: [customer_id#70827L, segment#70831, processing_day#70833, amount#70835, events#70837, weighted_amount#70839]
Keys [2]: [segment#70831, processing_day#70833]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#70827L, 0.05, 0, 0), partial_sum(events#70837), partial_sum(weighted_amount#70839), partial_avg(amount#70835)]
Aggregate Attributes [57]: [count#71058L, MS[0]#70846L, MS[1]#70847L, MS[2]#70848L, MS[3]#70849L, MS[4]#70850L, MS[5]#70851L, MS[6]#70852L, MS[7]#70853L, MS[8]#70854L, MS[9]#70855L, MS[10]#70856L, MS[11]#70857L, MS[12]#70858L, MS[13]#70859L, MS[14]#70860L, MS[15]#70861L, MS[16]#70862L, MS[17]#70863L, MS[18]#70864L, MS[19]#70865L, MS[20]#70866L, MS[21]#70867L, MS[22]#70868L, MS[23]#70869L, MS[24]#70870L, MS[25]#70871L, MS[26]#70872L, MS[27]#70873L, MS[28]#70874L, MS[29]#70875L, MS[30]#70876L, MS[31]#70877L, MS[32]#70878L, MS[33]#70879L, MS[34]#70880L, MS[35]#70881L, MS[36]#70882L, MS[37]#70883L, MS[38]#70884L, MS[39]#70885L, MS[40]#70886L, MS[41]#70887L, MS[42]#70888L, MS[43]#70889L, MS[44]#70890L, MS[45]#70891L, MS[46]#70892L, MS[47]#70893L, MS[48]#70894L, MS[49]#70895L, MS[50]#70896L, MS[51]#70897L, sum#71059L, sum#71060, sum#71061, count#71062L]
Results [59]: [segment#70831, processing_day#70833, count#71063L, MS[0]#70898L, MS[1]#70899L, MS[2]#70900L, MS[3]#70901L, MS[4]#70902L, MS[5]#70903L, MS[6]#70904L, MS[7]#70905L, MS[8]#70906L, MS[9]#70907L, MS[10]#70908L, MS[11]#70909L, MS[12]#70910L, MS[13]#70911L, MS[14]#70912L, MS[15]#70913L, MS[16]#70914L, MS[17]#70915L, MS[18]#70916L, MS[19]#70917L, MS[20]#70918L, MS[21]#70919L, MS[22]#70920L, MS[23]#70921L, MS[24]#70922L, MS[25]#70923L, MS[26]#70924L, MS[27]#70925L, MS[28]#70926L, MS[29]#70927L, MS[30]#70928L, MS[31]#70929L, MS[32]#70930L, MS[33]#70931L, MS[34]#70932L, MS[35]#70933L, MS[36]#70934L, MS[37]#70935L, MS[38]#70936L, MS[39]#70937L, MS[40]#70938L, MS[41]#70939L, MS[42]#70940L, MS[43]#70941L, MS[44]#70942L, MS[45]#70943L, MS[46]#70944L, MS[47]#70945L, MS[48]#70946L, MS[49]#70947L, MS[50]#70948L, MS[51]#70949L, sum#71064L, sum#71065, sum#71066, count#71067L]
(5) Exchange
Input [59]: [segment#70831, processing_day#70833, count#71063L, MS[0]#70898L, MS[1]#70899L, MS[2]#70900L, MS[3]#70901L, MS[4]#70902L, MS[5]#70903L, MS[6]#70904L, MS[7]#70905L, MS[8]#70906L, MS[9]#70907L, MS[10]#70908L, MS[11]#70909L, MS[12]#70910L, MS[13]#70911L, MS[14]#70912L, MS[15]#70913L, MS[16]#70914L, MS[17]#70915L, MS[18]#70916L, MS[19]#70917L, MS[20]#70918L, MS[21]#70919L, MS[22]#70920L, MS[23]#70921L, MS[24]#70922L, MS[25]#70923L, MS[26]#70924L, MS[27]#70925L, MS[28]#70926L, MS[29]#70927L, MS[30]#70928L, MS[31]#70929L, MS[32]#70930L, MS[33]#70931L, MS[34]#70932L, MS[35]#70933L, MS[36]#70934L, MS[37]#70935L, MS[38]#70936L, MS[39]#70937L, MS[40]#70938L, MS[41]#70939L, MS[42]#70940L, MS[43]#70941L, MS[44]#70942L, MS[45]#70943L, MS[46]#70944L, MS[47]#70945L, MS[48]#70946L, MS[49]#70947L, MS[50]#70948L, MS[51]#70949L, sum#71064L, sum#71065, sum#71066, count#71067L]
Arguments: hashpartitioning(segment#70831, processing_day#70833, 200), ENSURE_REQUIREMENTS, [plan_id=6701]
(6) ShuffleQueryStage
Output [59]: [segment#70831, processing_day#70833, count#71063L, MS[0]#70898L, MS[1]#70899L, MS[2]#70900L, MS[3]#70901L, MS[4]#70902L, MS[5]#70903L, MS[6]#70904L, MS[7]#70905L, MS[8]#70906L, MS[9]#70907L, MS[10]#70908L, MS[11]#70909L, MS[12]#70910L, MS[13]#70911L, MS[14]#70912L, MS[15]#70913L, MS[16]#70914L, MS[17]#70915L, MS[18]#70916L, MS[19]#70917L, MS[20]#70918L, MS[21]#70919L, MS[22]#70920L, MS[23]#70921L, MS[24]#70922L, MS[25]#70923L, MS[26]#70924L, MS[27]#70925L, MS[28]#70926L, MS[29]#70927L, MS[30]#70928L, MS[31]#70929L, MS[32]#70930L, MS[33]#70931L, MS[34]#70932L, MS[35]#70933L, MS[36]#70934L, MS[37]#70935L, MS[38]#70936L, MS[39]#70937L, MS[40]#70938L, MS[41]#70939L, MS[42]#70940L, MS[43]#70941L, MS[44]#70942L, MS[45]#70943L, MS[46]#70944L, MS[47]#70945L, MS[48]#70946L, MS[49]#70947L, MS[50]#70948L, MS[51]#70949L, sum#71064L, sum#71065, sum#71066, count#71067L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#70831, processing_day#70833, count#71063L, MS[0]#70898L, MS[1]#70899L, MS[2]#70900L, MS[3]#70901L, MS[4]#70902L, MS[5]#70903L, MS[6]#70904L, MS[7]#70905L, MS[8]#70906L, MS[9]#70907L, MS[10]#70908L, MS[11]#70909L, MS[12]#70910L, MS[13]#70911L, MS[14]#70912L, MS[15]#70913L, MS[16]#70914L, MS[17]#70915L, MS[18]#70916L, MS[19]#70917L, MS[20]#70918L, MS[21]#70919L, MS[22]#70920L, MS[23]#70921L, MS[24]#70922L, MS[25]#70923L, MS[26]#70924L, MS[27]#70925L, MS[28]#70926L, MS[29]#70927L, MS[30]#70928L, MS[31]#70929L, MS[32]#70930L, MS[33]#70931L, MS[34]#70932L, MS[35]#70933L, MS[36]#70934L, MS[37]#70935L, MS[38]#70936L, MS[39]#70937L, MS[40]#70938L, MS[41]#70939L, MS[42]#70940L, MS[43]#70941L, MS[44]#70942L, MS[45]#70943L, MS[46]#70944L, MS[47]#70945L, MS[48]#70946L, MS[49]#70947L, MS[50]#70948L, MS[51]#70949L, sum#71064L, sum#71065, sum#71066, count#71067L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#70831, processing_day#70833, count#71063L, MS[0]#70898L, MS[1]#70899L, MS[2]#70900L, MS[3]#70901L, MS[4]#70902L, MS[5]#70903L, MS[6]#70904L, MS[7]#70905L, MS[8]#70906L, MS[9]#70907L, MS[10]#70908L, MS[11]#70909L, MS[12]#70910L, MS[13]#70911L, MS[14]#70912L, MS[15]#70913L, MS[16]#70914L, MS[17]#70915L, MS[18]#70916L, MS[19]#70917L, MS[20]#70918L, MS[21]#70919L, MS[22]#70920L, MS[23]#70921L, MS[24]#70922L, MS[25]#70923L, MS[26]#70924L, MS[27]#70925L, MS[28]#70926L, MS[29]#70927L, MS[30]#70928L, MS[31]#70929L, MS[32]#70930L, MS[33]#70931L, MS[34]#70932L, MS[35]#70933L, MS[36]#70934L, MS[37]#70935L, MS[38]#70936L, MS[39]#70937L, MS[40]#70938L, MS[41]#70939L, MS[42]#70940L, MS[43]#70941L, MS[44]#70942L, MS[45]#70943L, MS[46]#70944L, MS[47]#70945L, MS[48]#70946L, MS[49]#70947L, MS[50]#70948L, MS[51]#70949L, sum#71064L, sum#71065, sum#71066, count#71067L]
Keys [2]: [segment#70831, processing_day#70833]
Functions [5]: [count(1), approx_count_distinct(customer_id#70827L, 0.05, 0, 0), sum(events#70837), sum(weighted_amount#70839), avg(amount#70835)]
Aggregate Attributes [5]: [count(1)#70845L, approx_count_distinct(customer_id#70827L, 0.05, 0, 0)#70950L, sum(events#70837)#70951L, sum(weighted_amount#70839)#70952, avg(amount#70835)#70953]
Results [7]: [segment#70831, processing_day#70833, count(1)#70845L AS row_count#70840L, approx_count_distinct(customer_id#70827L, 0.05, 0, 0)#70950L AS unique_customers#70841L, sum(events#70837)#70951L AS event_sum#70842L, sum(weighted_amount#70839)#70952 AS weighted_amount_sum#70843, avg(amount#70835)#70953 AS avg_amount#70844]
(9) Exchange
Input [7]: [segment#70831, processing_day#70833, row_count#70840L, unique_customers#70841L, event_sum#70842L, weighted_amount_sum#70843, avg_amount#70844]
Arguments: rangepartitioning(segment#70831 ASC NULLS FIRST, processing_day#70833 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=6723]
(10) ShuffleQueryStage
Output [7]: [segment#70831, processing_day#70833, row_count#70840L, unique_customers#70841L, event_sum#70842L, weighted_amount_sum#70843, avg_amount#70844]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#70831, processing_day#70833, row_count#70840L, unique_customers#70841L, event_sum#70842L, weighted_amount_sum#70843, avg_amount#70844]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#70831, processing_day#70833, row_count#70840L, unique_customers#70841L, event_sum#70842L, weighted_amount_sum#70843, avg_amount#70844]
Arguments: [segment#70831 ASC NULLS FIRST, processing_day#70833 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#70831, processing_day#70833, row_count#70840L, unique_customers#70841L, event_sum#70842L, weighted_amount_sum#70843, avg_amount#70844]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#70827L, segment#70831, processing_day#70833, amount#70835, events#70837, weighted_amount#70839]
Keys [2]: [segment#70831, processing_day#70833]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#70827L, 0.05, 0, 0), partial_sum(events#70837), partial_sum(weighted_amount#70839), partial_avg(amount#70835)]
Aggregate Attributes [57]: [count#71058L, MS[0]#70846L, MS[1]#70847L, MS[2]#70848L, MS[3]#70849L, MS[4]#70850L, MS[5]#70851L, MS[6]#70852L, MS[7]#70853L, MS[8]#70854L, MS[9]#70855L, MS[10]#70856L, MS[11]#70857L, MS[12]#70858L, MS[13]#70859L, MS[14]#70860L, MS[15]#70861L, MS[16]#70862L, MS[17]#70863L, MS[18]#70864L, MS[19]#70865L, MS[20]#70866L, MS[21]#70867L, MS[22]#70868L, MS[23]#70869L, MS[24]#70870L, MS[25]#70871L, MS[26]#70872L, MS[27]#70873L, MS[28]#70874L, MS[29]#70875L, MS[30]#70876L, MS[31]#70877L, MS[32]#70878L, MS[33]#70879L, MS[34]#70880L, MS[35]#70881L, MS[36]#70882L, MS[37]#70883L, MS[38]#70884L, MS[39]#70885L, MS[40]#70886L, MS[41]#70887L, MS[42]#70888L, MS[43]#70889L, MS[44]#70890L, MS[45]#70891L, MS[46]#70892L, MS[47]#70893L, MS[48]#70894L, MS[49]#70895L, MS[50]#70896L, MS[51]#70897L, sum#71059L, sum#71060, sum#71061, count#71062L]
Results [59]: [segment#70831, processing_day#70833, count#71063L, MS[0]#70898L, MS[1]#70899L, MS[2]#70900L, MS[3]#70901L, MS[4]#70902L, MS[5]#70903L, MS[6]#70904L, MS[7]#70905L, MS[8]#70906L, MS[9]#70907L, MS[10]#70908L, MS[11]#70909L, MS[12]#70910L, MS[13]#70911L, MS[14]#70912L, MS[15]#70913L, MS[16]#70914L, MS[17]#70915L, MS[18]#70916L, MS[19]#70917L, MS[20]#70918L, MS[21]#70919L, MS[22]#70920L, MS[23]#70921L, MS[24]#70922L, MS[25]#70923L, MS[26]#70924L, MS[27]#70925L, MS[28]#70926L, MS[29]#70927L, MS[30]#70928L, MS[31]#70929L, MS[32]#70930L, MS[33]#70931L, MS[34]#70932L, MS[35]#70933L, MS[36]#70934L, MS[37]#70935L, MS[38]#70936L, MS[39]#70937L, MS[40]#70938L, MS[41]#70939L, MS[42]#70940L, MS[43]#70941L, MS[44]#70942L, MS[45]#70943L, MS[46]#70944L, MS[47]#70945L, MS[48]#70946L, MS[49]#70947L, MS[50]#70948L, MS[51]#70949L, sum#71064L, sum#71065, sum#71066, count#71067L]
(15) Exchange
Input [59]: [segment#70831, processing_day#70833, count#71063L, MS[0]#70898L, MS[1]#70899L, MS[2]#70900L, MS[3]#70901L, MS[4]#70902L, MS[5]#70903L, MS[6]#70904L, MS[7]#70905L, MS[8]#70906L, MS[9]#70907L, MS[10]#70908L, MS[11]#70909L, MS[12]#70910L, MS[13]#70911L, MS[14]#70912L, MS[15]#70913L, MS[16]#70914L, MS[17]#70915L, MS[18]#70916L, MS[19]#70917L, MS[20]#70918L, MS[21]#70919L, MS[22]#70920L, MS[23]#70921L, MS[24]#70922L, MS[25]#70923L, MS[26]#70924L, MS[27]#70925L, MS[28]#70926L, MS[29]#70927L, MS[30]#70928L, MS[31]#70929L, MS[32]#70930L, MS[33]#70931L, MS[34]#70932L, MS[35]#70933L, MS[36]#70934L, MS[37]#70935L, MS[38]#70936L, MS[39]#70937L, MS[40]#70938L, MS[41]#70939L, MS[42]#70940L, MS[43]#70941L, MS[44]#70942L, MS[45]#70943L, MS[46]#70944L, MS[47]#70945L, MS[48]#70946L, MS[49]#70947L, MS[50]#70948L, MS[51]#70949L, sum#71064L, sum#71065, sum#71066, count#71067L]
Arguments: hashpartitioning(segment#70831, processing_day#70833, 200), ENSURE_REQUIREMENTS, [plan_id=6681]
(16) HashAggregate
Input [59]: [segment#70831, processing_day#70833, count#71063L, MS[0]#70898L, MS[1]#70899L, MS[2]#70900L, MS[3]#70901L, MS[4]#70902L, MS[5]#70903L, MS[6]#70904L, MS[7]#70905L, MS[8]#70906L, MS[9]#70907L, MS[10]#70908L, MS[11]#70909L, MS[12]#70910L, MS[13]#70911L, MS[14]#70912L, MS[15]#70913L, MS[16]#70914L, MS[17]#70915L, MS[18]#70916L, MS[19]#70917L, MS[20]#70918L, MS[21]#70919L, MS[22]#70920L, MS[23]#70921L, MS[24]#70922L, MS[25]#70923L, MS[26]#70924L, MS[27]#70925L, MS[28]#70926L, MS[29]#70927L, MS[30]#70928L, MS[31]#70929L, MS[32]#70930L, MS[33]#70931L, MS[34]#70932L, MS[35]#70933L, MS[36]#70934L, MS[37]#70935L, MS[38]#70936L, MS[39]#70937L, MS[40]#70938L, MS[41]#70939L, MS[42]#70940L, MS[43]#70941L, MS[44]#70942L, MS[45]#70943L, MS[46]#70944L, MS[47]#70945L, MS[48]#70946L, MS[49]#70947L, MS[50]#70948L, MS[51]#70949L, sum#71064L, sum#71065, sum#71066, count#71067L]
Keys [2]: [segment#70831, processing_day#70833]
Functions [5]: [count(1), approx_count_distinct(customer_id#70827L, 0.05, 0, 0), sum(events#70837), sum(weighted_amount#70839), avg(amount#70835)]
Aggregate Attributes [5]: [count(1)#70845L, approx_count_distinct(customer_id#70827L, 0.05, 0, 0)#70950L, sum(events#70837)#70951L, sum(weighted_amount#70839)#70952, avg(amount#70835)#70953]
Results [7]: [segment#70831, processing_day#70833, count(1)#70845L AS row_count#70840L, approx_count_distinct(customer_id#70827L, 0.05, 0, 0)#70950L AS unique_customers#70841L, sum(events#70837)#70951L AS event_sum#70842L, sum(weighted_amount#70839)#70952 AS weighted_amount_sum#70843, avg(amount#70835)#70953 AS avg_amount#70844]
(17) Exchange
Input [7]: [segment#70831, processing_day#70833, row_count#70840L, unique_customers#70841L, event_sum#70842L, weighted_amount_sum#70843, avg_amount#70844]
Arguments: rangepartitioning(segment#70831 ASC NULLS FIRST, processing_day#70833 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=6684]
(18) Sort
Input [7]: [segment#70831, processing_day#70833, row_count#70840L, unique_customers#70841L, event_sum#70842L, weighted_amount_sum#70843, avg_amount#70844]
Arguments: [segment#70831 ASC NULLS FIRST, processing_day#70833 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#70831, processing_day#70833, row_count#70840L, unique_customers#70841L, event_sum#70842L, weighted_amount_sum#70843, avg_amount#70844]
Arguments: isFinalPlan=true