== 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#101799L]
Arguments: Range (19000000, 20000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#101799L % 250000) AS customer_id#101801L, concat(segment-, cast(cast((id#101799L % 12) as int) as string)) AS segment#101805, cast((id#101799L % 14) as int) AS processing_day#101807, ((cast(((id#101799L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#101809, cast((((id#101799L * 29) % 7) + 1) as int) AS events#101811]
Input [1]: [id#101799L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#101801L, segment#101805, processing_day#101807, amount#101809, events#101811, (amount#101809 * cast(events#101811 as double)) AS weighted_amount#101813]
Input [5]: [customer_id#101801L, segment#101805, processing_day#101807, amount#101809, events#101811]
(4) HashAggregate
Input [6]: [customer_id#101801L, segment#101805, processing_day#101807, amount#101809, events#101811, weighted_amount#101813]
Keys [2]: [segment#101805, processing_day#101807]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#101801L, 0.05, 0, 0), partial_sum(events#101811), partial_sum(weighted_amount#101813), partial_avg(amount#101809)]
Aggregate Attributes [57]: [count#102032L, MS[0]#101820L, MS[1]#101821L, MS[2]#101822L, MS[3]#101823L, MS[4]#101824L, MS[5]#101825L, MS[6]#101826L, MS[7]#101827L, MS[8]#101828L, MS[9]#101829L, MS[10]#101830L, MS[11]#101831L, MS[12]#101832L, MS[13]#101833L, MS[14]#101834L, MS[15]#101835L, MS[16]#101836L, MS[17]#101837L, MS[18]#101838L, MS[19]#101839L, MS[20]#101840L, MS[21]#101841L, MS[22]#101842L, MS[23]#101843L, MS[24]#101844L, MS[25]#101845L, MS[26]#101846L, MS[27]#101847L, MS[28]#101848L, MS[29]#101849L, MS[30]#101850L, MS[31]#101851L, MS[32]#101852L, MS[33]#101853L, MS[34]#101854L, MS[35]#101855L, MS[36]#101856L, MS[37]#101857L, MS[38]#101858L, MS[39]#101859L, MS[40]#101860L, MS[41]#101861L, MS[42]#101862L, MS[43]#101863L, MS[44]#101864L, MS[45]#101865L, MS[46]#101866L, MS[47]#101867L, MS[48]#101868L, MS[49]#101869L, MS[50]#101870L, MS[51]#101871L, sum#102033L, sum#102034, sum#102035, count#102036L]
Results [59]: [segment#101805, processing_day#101807, count#102037L, MS[0]#101872L, MS[1]#101873L, MS[2]#101874L, MS[3]#101875L, MS[4]#101876L, MS[5]#101877L, MS[6]#101878L, MS[7]#101879L, MS[8]#101880L, MS[9]#101881L, MS[10]#101882L, MS[11]#101883L, MS[12]#101884L, MS[13]#101885L, MS[14]#101886L, MS[15]#101887L, MS[16]#101888L, MS[17]#101889L, MS[18]#101890L, MS[19]#101891L, MS[20]#101892L, MS[21]#101893L, MS[22]#101894L, MS[23]#101895L, MS[24]#101896L, MS[25]#101897L, MS[26]#101898L, MS[27]#101899L, MS[28]#101900L, MS[29]#101901L, MS[30]#101902L, MS[31]#101903L, MS[32]#101904L, MS[33]#101905L, MS[34]#101906L, MS[35]#101907L, MS[36]#101908L, MS[37]#101909L, MS[38]#101910L, MS[39]#101911L, MS[40]#101912L, MS[41]#101913L, MS[42]#101914L, MS[43]#101915L, MS[44]#101916L, MS[45]#101917L, MS[46]#101918L, MS[47]#101919L, MS[48]#101920L, MS[49]#101921L, MS[50]#101922L, MS[51]#101923L, sum#102038L, sum#102039, sum#102040, count#102041L]
(5) Exchange
Input [59]: [segment#101805, processing_day#101807, count#102037L, MS[0]#101872L, MS[1]#101873L, MS[2]#101874L, MS[3]#101875L, MS[4]#101876L, MS[5]#101877L, MS[6]#101878L, MS[7]#101879L, MS[8]#101880L, MS[9]#101881L, MS[10]#101882L, MS[11]#101883L, MS[12]#101884L, MS[13]#101885L, MS[14]#101886L, MS[15]#101887L, MS[16]#101888L, MS[17]#101889L, MS[18]#101890L, MS[19]#101891L, MS[20]#101892L, MS[21]#101893L, MS[22]#101894L, MS[23]#101895L, MS[24]#101896L, MS[25]#101897L, MS[26]#101898L, MS[27]#101899L, MS[28]#101900L, MS[29]#101901L, MS[30]#101902L, MS[31]#101903L, MS[32]#101904L, MS[33]#101905L, MS[34]#101906L, MS[35]#101907L, MS[36]#101908L, MS[37]#101909L, MS[38]#101910L, MS[39]#101911L, MS[40]#101912L, MS[41]#101913L, MS[42]#101914L, MS[43]#101915L, MS[44]#101916L, MS[45]#101917L, MS[46]#101918L, MS[47]#101919L, MS[48]#101920L, MS[49]#101921L, MS[50]#101922L, MS[51]#101923L, sum#102038L, sum#102039, sum#102040, count#102041L]
Arguments: hashpartitioning(segment#101805, processing_day#101807, 200), ENSURE_REQUIREMENTS, [plan_id=9612]
(6) ShuffleQueryStage
Output [59]: [segment#101805, processing_day#101807, count#102037L, MS[0]#101872L, MS[1]#101873L, MS[2]#101874L, MS[3]#101875L, MS[4]#101876L, MS[5]#101877L, MS[6]#101878L, MS[7]#101879L, MS[8]#101880L, MS[9]#101881L, MS[10]#101882L, MS[11]#101883L, MS[12]#101884L, MS[13]#101885L, MS[14]#101886L, MS[15]#101887L, MS[16]#101888L, MS[17]#101889L, MS[18]#101890L, MS[19]#101891L, MS[20]#101892L, MS[21]#101893L, MS[22]#101894L, MS[23]#101895L, MS[24]#101896L, MS[25]#101897L, MS[26]#101898L, MS[27]#101899L, MS[28]#101900L, MS[29]#101901L, MS[30]#101902L, MS[31]#101903L, MS[32]#101904L, MS[33]#101905L, MS[34]#101906L, MS[35]#101907L, MS[36]#101908L, MS[37]#101909L, MS[38]#101910L, MS[39]#101911L, MS[40]#101912L, MS[41]#101913L, MS[42]#101914L, MS[43]#101915L, MS[44]#101916L, MS[45]#101917L, MS[46]#101918L, MS[47]#101919L, MS[48]#101920L, MS[49]#101921L, MS[50]#101922L, MS[51]#101923L, sum#102038L, sum#102039, sum#102040, count#102041L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#101805, processing_day#101807, count#102037L, MS[0]#101872L, MS[1]#101873L, MS[2]#101874L, MS[3]#101875L, MS[4]#101876L, MS[5]#101877L, MS[6]#101878L, MS[7]#101879L, MS[8]#101880L, MS[9]#101881L, MS[10]#101882L, MS[11]#101883L, MS[12]#101884L, MS[13]#101885L, MS[14]#101886L, MS[15]#101887L, MS[16]#101888L, MS[17]#101889L, MS[18]#101890L, MS[19]#101891L, MS[20]#101892L, MS[21]#101893L, MS[22]#101894L, MS[23]#101895L, MS[24]#101896L, MS[25]#101897L, MS[26]#101898L, MS[27]#101899L, MS[28]#101900L, MS[29]#101901L, MS[30]#101902L, MS[31]#101903L, MS[32]#101904L, MS[33]#101905L, MS[34]#101906L, MS[35]#101907L, MS[36]#101908L, MS[37]#101909L, MS[38]#101910L, MS[39]#101911L, MS[40]#101912L, MS[41]#101913L, MS[42]#101914L, MS[43]#101915L, MS[44]#101916L, MS[45]#101917L, MS[46]#101918L, MS[47]#101919L, MS[48]#101920L, MS[49]#101921L, MS[50]#101922L, MS[51]#101923L, sum#102038L, sum#102039, sum#102040, count#102041L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#101805, processing_day#101807, count#102037L, MS[0]#101872L, MS[1]#101873L, MS[2]#101874L, MS[3]#101875L, MS[4]#101876L, MS[5]#101877L, MS[6]#101878L, MS[7]#101879L, MS[8]#101880L, MS[9]#101881L, MS[10]#101882L, MS[11]#101883L, MS[12]#101884L, MS[13]#101885L, MS[14]#101886L, MS[15]#101887L, MS[16]#101888L, MS[17]#101889L, MS[18]#101890L, MS[19]#101891L, MS[20]#101892L, MS[21]#101893L, MS[22]#101894L, MS[23]#101895L, MS[24]#101896L, MS[25]#101897L, MS[26]#101898L, MS[27]#101899L, MS[28]#101900L, MS[29]#101901L, MS[30]#101902L, MS[31]#101903L, MS[32]#101904L, MS[33]#101905L, MS[34]#101906L, MS[35]#101907L, MS[36]#101908L, MS[37]#101909L, MS[38]#101910L, MS[39]#101911L, MS[40]#101912L, MS[41]#101913L, MS[42]#101914L, MS[43]#101915L, MS[44]#101916L, MS[45]#101917L, MS[46]#101918L, MS[47]#101919L, MS[48]#101920L, MS[49]#101921L, MS[50]#101922L, MS[51]#101923L, sum#102038L, sum#102039, sum#102040, count#102041L]
Keys [2]: [segment#101805, processing_day#101807]
Functions [5]: [count(1), approx_count_distinct(customer_id#101801L, 0.05, 0, 0), sum(events#101811), sum(weighted_amount#101813), avg(amount#101809)]
Aggregate Attributes [5]: [count(1)#101819L, approx_count_distinct(customer_id#101801L, 0.05, 0, 0)#101924L, sum(events#101811)#101925L, sum(weighted_amount#101813)#101926, avg(amount#101809)#101927]
Results [7]: [segment#101805, processing_day#101807, count(1)#101819L AS row_count#101814L, approx_count_distinct(customer_id#101801L, 0.05, 0, 0)#101924L AS unique_customers#101815L, sum(events#101811)#101925L AS event_sum#101816L, sum(weighted_amount#101813)#101926 AS weighted_amount_sum#101817, avg(amount#101809)#101927 AS avg_amount#101818]
(9) Exchange
Input [7]: [segment#101805, processing_day#101807, row_count#101814L, unique_customers#101815L, event_sum#101816L, weighted_amount_sum#101817, avg_amount#101818]
Arguments: rangepartitioning(segment#101805 ASC NULLS FIRST, processing_day#101807 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=9634]
(10) ShuffleQueryStage
Output [7]: [segment#101805, processing_day#101807, row_count#101814L, unique_customers#101815L, event_sum#101816L, weighted_amount_sum#101817, avg_amount#101818]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#101805, processing_day#101807, row_count#101814L, unique_customers#101815L, event_sum#101816L, weighted_amount_sum#101817, avg_amount#101818]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#101805, processing_day#101807, row_count#101814L, unique_customers#101815L, event_sum#101816L, weighted_amount_sum#101817, avg_amount#101818]
Arguments: [segment#101805 ASC NULLS FIRST, processing_day#101807 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#101805, processing_day#101807, row_count#101814L, unique_customers#101815L, event_sum#101816L, weighted_amount_sum#101817, avg_amount#101818]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#101801L, segment#101805, processing_day#101807, amount#101809, events#101811, weighted_amount#101813]
Keys [2]: [segment#101805, processing_day#101807]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#101801L, 0.05, 0, 0), partial_sum(events#101811), partial_sum(weighted_amount#101813), partial_avg(amount#101809)]
Aggregate Attributes [57]: [count#102032L, MS[0]#101820L, MS[1]#101821L, MS[2]#101822L, MS[3]#101823L, MS[4]#101824L, MS[5]#101825L, MS[6]#101826L, MS[7]#101827L, MS[8]#101828L, MS[9]#101829L, MS[10]#101830L, MS[11]#101831L, MS[12]#101832L, MS[13]#101833L, MS[14]#101834L, MS[15]#101835L, MS[16]#101836L, MS[17]#101837L, MS[18]#101838L, MS[19]#101839L, MS[20]#101840L, MS[21]#101841L, MS[22]#101842L, MS[23]#101843L, MS[24]#101844L, MS[25]#101845L, MS[26]#101846L, MS[27]#101847L, MS[28]#101848L, MS[29]#101849L, MS[30]#101850L, MS[31]#101851L, MS[32]#101852L, MS[33]#101853L, MS[34]#101854L, MS[35]#101855L, MS[36]#101856L, MS[37]#101857L, MS[38]#101858L, MS[39]#101859L, MS[40]#101860L, MS[41]#101861L, MS[42]#101862L, MS[43]#101863L, MS[44]#101864L, MS[45]#101865L, MS[46]#101866L, MS[47]#101867L, MS[48]#101868L, MS[49]#101869L, MS[50]#101870L, MS[51]#101871L, sum#102033L, sum#102034, sum#102035, count#102036L]
Results [59]: [segment#101805, processing_day#101807, count#102037L, MS[0]#101872L, MS[1]#101873L, MS[2]#101874L, MS[3]#101875L, MS[4]#101876L, MS[5]#101877L, MS[6]#101878L, MS[7]#101879L, MS[8]#101880L, MS[9]#101881L, MS[10]#101882L, MS[11]#101883L, MS[12]#101884L, MS[13]#101885L, MS[14]#101886L, MS[15]#101887L, MS[16]#101888L, MS[17]#101889L, MS[18]#101890L, MS[19]#101891L, MS[20]#101892L, MS[21]#101893L, MS[22]#101894L, MS[23]#101895L, MS[24]#101896L, MS[25]#101897L, MS[26]#101898L, MS[27]#101899L, MS[28]#101900L, MS[29]#101901L, MS[30]#101902L, MS[31]#101903L, MS[32]#101904L, MS[33]#101905L, MS[34]#101906L, MS[35]#101907L, MS[36]#101908L, MS[37]#101909L, MS[38]#101910L, MS[39]#101911L, MS[40]#101912L, MS[41]#101913L, MS[42]#101914L, MS[43]#101915L, MS[44]#101916L, MS[45]#101917L, MS[46]#101918L, MS[47]#101919L, MS[48]#101920L, MS[49]#101921L, MS[50]#101922L, MS[51]#101923L, sum#102038L, sum#102039, sum#102040, count#102041L]
(15) Exchange
Input [59]: [segment#101805, processing_day#101807, count#102037L, MS[0]#101872L, MS[1]#101873L, MS[2]#101874L, MS[3]#101875L, MS[4]#101876L, MS[5]#101877L, MS[6]#101878L, MS[7]#101879L, MS[8]#101880L, MS[9]#101881L, MS[10]#101882L, MS[11]#101883L, MS[12]#101884L, MS[13]#101885L, MS[14]#101886L, MS[15]#101887L, MS[16]#101888L, MS[17]#101889L, MS[18]#101890L, MS[19]#101891L, MS[20]#101892L, MS[21]#101893L, MS[22]#101894L, MS[23]#101895L, MS[24]#101896L, MS[25]#101897L, MS[26]#101898L, MS[27]#101899L, MS[28]#101900L, MS[29]#101901L, MS[30]#101902L, MS[31]#101903L, MS[32]#101904L, MS[33]#101905L, MS[34]#101906L, MS[35]#101907L, MS[36]#101908L, MS[37]#101909L, MS[38]#101910L, MS[39]#101911L, MS[40]#101912L, MS[41]#101913L, MS[42]#101914L, MS[43]#101915L, MS[44]#101916L, MS[45]#101917L, MS[46]#101918L, MS[47]#101919L, MS[48]#101920L, MS[49]#101921L, MS[50]#101922L, MS[51]#101923L, sum#102038L, sum#102039, sum#102040, count#102041L]
Arguments: hashpartitioning(segment#101805, processing_day#101807, 200), ENSURE_REQUIREMENTS, [plan_id=9592]
(16) HashAggregate
Input [59]: [segment#101805, processing_day#101807, count#102037L, MS[0]#101872L, MS[1]#101873L, MS[2]#101874L, MS[3]#101875L, MS[4]#101876L, MS[5]#101877L, MS[6]#101878L, MS[7]#101879L, MS[8]#101880L, MS[9]#101881L, MS[10]#101882L, MS[11]#101883L, MS[12]#101884L, MS[13]#101885L, MS[14]#101886L, MS[15]#101887L, MS[16]#101888L, MS[17]#101889L, MS[18]#101890L, MS[19]#101891L, MS[20]#101892L, MS[21]#101893L, MS[22]#101894L, MS[23]#101895L, MS[24]#101896L, MS[25]#101897L, MS[26]#101898L, MS[27]#101899L, MS[28]#101900L, MS[29]#101901L, MS[30]#101902L, MS[31]#101903L, MS[32]#101904L, MS[33]#101905L, MS[34]#101906L, MS[35]#101907L, MS[36]#101908L, MS[37]#101909L, MS[38]#101910L, MS[39]#101911L, MS[40]#101912L, MS[41]#101913L, MS[42]#101914L, MS[43]#101915L, MS[44]#101916L, MS[45]#101917L, MS[46]#101918L, MS[47]#101919L, MS[48]#101920L, MS[49]#101921L, MS[50]#101922L, MS[51]#101923L, sum#102038L, sum#102039, sum#102040, count#102041L]
Keys [2]: [segment#101805, processing_day#101807]
Functions [5]: [count(1), approx_count_distinct(customer_id#101801L, 0.05, 0, 0), sum(events#101811), sum(weighted_amount#101813), avg(amount#101809)]
Aggregate Attributes [5]: [count(1)#101819L, approx_count_distinct(customer_id#101801L, 0.05, 0, 0)#101924L, sum(events#101811)#101925L, sum(weighted_amount#101813)#101926, avg(amount#101809)#101927]
Results [7]: [segment#101805, processing_day#101807, count(1)#101819L AS row_count#101814L, approx_count_distinct(customer_id#101801L, 0.05, 0, 0)#101924L AS unique_customers#101815L, sum(events#101811)#101925L AS event_sum#101816L, sum(weighted_amount#101813)#101926 AS weighted_amount_sum#101817, avg(amount#101809)#101927 AS avg_amount#101818]
(17) Exchange
Input [7]: [segment#101805, processing_day#101807, row_count#101814L, unique_customers#101815L, event_sum#101816L, weighted_amount_sum#101817, avg_amount#101818]
Arguments: rangepartitioning(segment#101805 ASC NULLS FIRST, processing_day#101807 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=9595]
(18) Sort
Input [7]: [segment#101805, processing_day#101807, row_count#101814L, unique_customers#101815L, event_sum#101816L, weighted_amount_sum#101817, avg_amount#101818]
Arguments: [segment#101805 ASC NULLS FIRST, processing_day#101807 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#101805, processing_day#101807, row_count#101814L, unique_customers#101815L, event_sum#101816L, weighted_amount_sum#101817, avg_amount#101818]
Arguments: isFinalPlan=true