== 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#92959L]
Arguments: Range (9000000, 10000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#92959L % 250000) AS customer_id#92961L, concat(segment-, cast(cast((id#92959L % 12) as int) as string)) AS segment#92965, cast((id#92959L % 14) as int) AS processing_day#92967, ((cast(((id#92959L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#92969, cast((((id#92959L * 29) % 7) + 1) as int) AS events#92971]
Input [1]: [id#92959L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#92961L, segment#92965, processing_day#92967, amount#92969, events#92971, (amount#92969 * cast(events#92971 as double)) AS weighted_amount#92973]
Input [5]: [customer_id#92961L, segment#92965, processing_day#92967, amount#92969, events#92971]
(4) HashAggregate
Input [6]: [customer_id#92961L, segment#92965, processing_day#92967, amount#92969, events#92971, weighted_amount#92973]
Keys [2]: [segment#92965, processing_day#92967]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#92961L, 0.05, 0, 0), partial_sum(events#92971), partial_sum(weighted_amount#92973), partial_avg(amount#92969)]
Aggregate Attributes [57]: [count#93192L, MS[0]#92980L, MS[1]#92981L, MS[2]#92982L, MS[3]#92983L, MS[4]#92984L, MS[5]#92985L, MS[6]#92986L, MS[7]#92987L, MS[8]#92988L, MS[9]#92989L, MS[10]#92990L, MS[11]#92991L, MS[12]#92992L, MS[13]#92993L, MS[14]#92994L, MS[15]#92995L, MS[16]#92996L, MS[17]#92997L, MS[18]#92998L, MS[19]#92999L, MS[20]#93000L, MS[21]#93001L, MS[22]#93002L, MS[23]#93003L, MS[24]#93004L, MS[25]#93005L, MS[26]#93006L, MS[27]#93007L, MS[28]#93008L, MS[29]#93009L, MS[30]#93010L, MS[31]#93011L, MS[32]#93012L, MS[33]#93013L, MS[34]#93014L, MS[35]#93015L, MS[36]#93016L, MS[37]#93017L, MS[38]#93018L, MS[39]#93019L, MS[40]#93020L, MS[41]#93021L, MS[42]#93022L, MS[43]#93023L, MS[44]#93024L, MS[45]#93025L, MS[46]#93026L, MS[47]#93027L, MS[48]#93028L, MS[49]#93029L, MS[50]#93030L, MS[51]#93031L, sum#93193L, sum#93194, sum#93195, count#93196L]
Results [59]: [segment#92965, processing_day#92967, count#93197L, MS[0]#93032L, MS[1]#93033L, MS[2]#93034L, MS[3]#93035L, MS[4]#93036L, MS[5]#93037L, MS[6]#93038L, MS[7]#93039L, MS[8]#93040L, MS[9]#93041L, MS[10]#93042L, MS[11]#93043L, MS[12]#93044L, MS[13]#93045L, MS[14]#93046L, MS[15]#93047L, MS[16]#93048L, MS[17]#93049L, MS[18]#93050L, MS[19]#93051L, MS[20]#93052L, MS[21]#93053L, MS[22]#93054L, MS[23]#93055L, MS[24]#93056L, MS[25]#93057L, MS[26]#93058L, MS[27]#93059L, MS[28]#93060L, MS[29]#93061L, MS[30]#93062L, MS[31]#93063L, MS[32]#93064L, MS[33]#93065L, MS[34]#93066L, MS[35]#93067L, MS[36]#93068L, MS[37]#93069L, MS[38]#93070L, MS[39]#93071L, MS[40]#93072L, MS[41]#93073L, MS[42]#93074L, MS[43]#93075L, MS[44]#93076L, MS[45]#93077L, MS[46]#93078L, MS[47]#93079L, MS[48]#93080L, MS[49]#93081L, MS[50]#93082L, MS[51]#93083L, sum#93198L, sum#93199, sum#93200, count#93201L]
(5) Exchange
Input [59]: [segment#92965, processing_day#92967, count#93197L, MS[0]#93032L, MS[1]#93033L, MS[2]#93034L, MS[3]#93035L, MS[4]#93036L, MS[5]#93037L, MS[6]#93038L, MS[7]#93039L, MS[8]#93040L, MS[9]#93041L, MS[10]#93042L, MS[11]#93043L, MS[12]#93044L, MS[13]#93045L, MS[14]#93046L, MS[15]#93047L, MS[16]#93048L, MS[17]#93049L, MS[18]#93050L, MS[19]#93051L, MS[20]#93052L, MS[21]#93053L, MS[22]#93054L, MS[23]#93055L, MS[24]#93056L, MS[25]#93057L, MS[26]#93058L, MS[27]#93059L, MS[28]#93060L, MS[29]#93061L, MS[30]#93062L, MS[31]#93063L, MS[32]#93064L, MS[33]#93065L, MS[34]#93066L, MS[35]#93067L, MS[36]#93068L, MS[37]#93069L, MS[38]#93070L, MS[39]#93071L, MS[40]#93072L, MS[41]#93073L, MS[42]#93074L, MS[43]#93075L, MS[44]#93076L, MS[45]#93077L, MS[46]#93078L, MS[47]#93079L, MS[48]#93080L, MS[49]#93081L, MS[50]#93082L, MS[51]#93083L, sum#93198L, sum#93199, sum#93200, count#93201L]
Arguments: hashpartitioning(segment#92965, processing_day#92967, 200), ENSURE_REQUIREMENTS, [plan_id=8782]
(6) ShuffleQueryStage
Output [59]: [segment#92965, processing_day#92967, count#93197L, MS[0]#93032L, MS[1]#93033L, MS[2]#93034L, MS[3]#93035L, MS[4]#93036L, MS[5]#93037L, MS[6]#93038L, MS[7]#93039L, MS[8]#93040L, MS[9]#93041L, MS[10]#93042L, MS[11]#93043L, MS[12]#93044L, MS[13]#93045L, MS[14]#93046L, MS[15]#93047L, MS[16]#93048L, MS[17]#93049L, MS[18]#93050L, MS[19]#93051L, MS[20]#93052L, MS[21]#93053L, MS[22]#93054L, MS[23]#93055L, MS[24]#93056L, MS[25]#93057L, MS[26]#93058L, MS[27]#93059L, MS[28]#93060L, MS[29]#93061L, MS[30]#93062L, MS[31]#93063L, MS[32]#93064L, MS[33]#93065L, MS[34]#93066L, MS[35]#93067L, MS[36]#93068L, MS[37]#93069L, MS[38]#93070L, MS[39]#93071L, MS[40]#93072L, MS[41]#93073L, MS[42]#93074L, MS[43]#93075L, MS[44]#93076L, MS[45]#93077L, MS[46]#93078L, MS[47]#93079L, MS[48]#93080L, MS[49]#93081L, MS[50]#93082L, MS[51]#93083L, sum#93198L, sum#93199, sum#93200, count#93201L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#92965, processing_day#92967, count#93197L, MS[0]#93032L, MS[1]#93033L, MS[2]#93034L, MS[3]#93035L, MS[4]#93036L, MS[5]#93037L, MS[6]#93038L, MS[7]#93039L, MS[8]#93040L, MS[9]#93041L, MS[10]#93042L, MS[11]#93043L, MS[12]#93044L, MS[13]#93045L, MS[14]#93046L, MS[15]#93047L, MS[16]#93048L, MS[17]#93049L, MS[18]#93050L, MS[19]#93051L, MS[20]#93052L, MS[21]#93053L, MS[22]#93054L, MS[23]#93055L, MS[24]#93056L, MS[25]#93057L, MS[26]#93058L, MS[27]#93059L, MS[28]#93060L, MS[29]#93061L, MS[30]#93062L, MS[31]#93063L, MS[32]#93064L, MS[33]#93065L, MS[34]#93066L, MS[35]#93067L, MS[36]#93068L, MS[37]#93069L, MS[38]#93070L, MS[39]#93071L, MS[40]#93072L, MS[41]#93073L, MS[42]#93074L, MS[43]#93075L, MS[44]#93076L, MS[45]#93077L, MS[46]#93078L, MS[47]#93079L, MS[48]#93080L, MS[49]#93081L, MS[50]#93082L, MS[51]#93083L, sum#93198L, sum#93199, sum#93200, count#93201L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#92965, processing_day#92967, count#93197L, MS[0]#93032L, MS[1]#93033L, MS[2]#93034L, MS[3]#93035L, MS[4]#93036L, MS[5]#93037L, MS[6]#93038L, MS[7]#93039L, MS[8]#93040L, MS[9]#93041L, MS[10]#93042L, MS[11]#93043L, MS[12]#93044L, MS[13]#93045L, MS[14]#93046L, MS[15]#93047L, MS[16]#93048L, MS[17]#93049L, MS[18]#93050L, MS[19]#93051L, MS[20]#93052L, MS[21]#93053L, MS[22]#93054L, MS[23]#93055L, MS[24]#93056L, MS[25]#93057L, MS[26]#93058L, MS[27]#93059L, MS[28]#93060L, MS[29]#93061L, MS[30]#93062L, MS[31]#93063L, MS[32]#93064L, MS[33]#93065L, MS[34]#93066L, MS[35]#93067L, MS[36]#93068L, MS[37]#93069L, MS[38]#93070L, MS[39]#93071L, MS[40]#93072L, MS[41]#93073L, MS[42]#93074L, MS[43]#93075L, MS[44]#93076L, MS[45]#93077L, MS[46]#93078L, MS[47]#93079L, MS[48]#93080L, MS[49]#93081L, MS[50]#93082L, MS[51]#93083L, sum#93198L, sum#93199, sum#93200, count#93201L]
Keys [2]: [segment#92965, processing_day#92967]
Functions [5]: [count(1), approx_count_distinct(customer_id#92961L, 0.05, 0, 0), sum(events#92971), sum(weighted_amount#92973), avg(amount#92969)]
Aggregate Attributes [5]: [count(1)#92979L, approx_count_distinct(customer_id#92961L, 0.05, 0, 0)#93084L, sum(events#92971)#93085L, sum(weighted_amount#92973)#93086, avg(amount#92969)#93087]
Results [7]: [segment#92965, processing_day#92967, count(1)#92979L AS row_count#92974L, approx_count_distinct(customer_id#92961L, 0.05, 0, 0)#93084L AS unique_customers#92975L, sum(events#92971)#93085L AS event_sum#92976L, sum(weighted_amount#92973)#93086 AS weighted_amount_sum#92977, avg(amount#92969)#93087 AS avg_amount#92978]
(9) Exchange
Input [7]: [segment#92965, processing_day#92967, row_count#92974L, unique_customers#92975L, event_sum#92976L, weighted_amount_sum#92977, avg_amount#92978]
Arguments: rangepartitioning(segment#92965 ASC NULLS FIRST, processing_day#92967 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=8804]
(10) ShuffleQueryStage
Output [7]: [segment#92965, processing_day#92967, row_count#92974L, unique_customers#92975L, event_sum#92976L, weighted_amount_sum#92977, avg_amount#92978]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#92965, processing_day#92967, row_count#92974L, unique_customers#92975L, event_sum#92976L, weighted_amount_sum#92977, avg_amount#92978]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#92965, processing_day#92967, row_count#92974L, unique_customers#92975L, event_sum#92976L, weighted_amount_sum#92977, avg_amount#92978]
Arguments: [segment#92965 ASC NULLS FIRST, processing_day#92967 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#92965, processing_day#92967, row_count#92974L, unique_customers#92975L, event_sum#92976L, weighted_amount_sum#92977, avg_amount#92978]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#92961L, segment#92965, processing_day#92967, amount#92969, events#92971, weighted_amount#92973]
Keys [2]: [segment#92965, processing_day#92967]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#92961L, 0.05, 0, 0), partial_sum(events#92971), partial_sum(weighted_amount#92973), partial_avg(amount#92969)]
Aggregate Attributes [57]: [count#93192L, MS[0]#92980L, MS[1]#92981L, MS[2]#92982L, MS[3]#92983L, MS[4]#92984L, MS[5]#92985L, MS[6]#92986L, MS[7]#92987L, MS[8]#92988L, MS[9]#92989L, MS[10]#92990L, MS[11]#92991L, MS[12]#92992L, MS[13]#92993L, MS[14]#92994L, MS[15]#92995L, MS[16]#92996L, MS[17]#92997L, MS[18]#92998L, MS[19]#92999L, MS[20]#93000L, MS[21]#93001L, MS[22]#93002L, MS[23]#93003L, MS[24]#93004L, MS[25]#93005L, MS[26]#93006L, MS[27]#93007L, MS[28]#93008L, MS[29]#93009L, MS[30]#93010L, MS[31]#93011L, MS[32]#93012L, MS[33]#93013L, MS[34]#93014L, MS[35]#93015L, MS[36]#93016L, MS[37]#93017L, MS[38]#93018L, MS[39]#93019L, MS[40]#93020L, MS[41]#93021L, MS[42]#93022L, MS[43]#93023L, MS[44]#93024L, MS[45]#93025L, MS[46]#93026L, MS[47]#93027L, MS[48]#93028L, MS[49]#93029L, MS[50]#93030L, MS[51]#93031L, sum#93193L, sum#93194, sum#93195, count#93196L]
Results [59]: [segment#92965, processing_day#92967, count#93197L, MS[0]#93032L, MS[1]#93033L, MS[2]#93034L, MS[3]#93035L, MS[4]#93036L, MS[5]#93037L, MS[6]#93038L, MS[7]#93039L, MS[8]#93040L, MS[9]#93041L, MS[10]#93042L, MS[11]#93043L, MS[12]#93044L, MS[13]#93045L, MS[14]#93046L, MS[15]#93047L, MS[16]#93048L, MS[17]#93049L, MS[18]#93050L, MS[19]#93051L, MS[20]#93052L, MS[21]#93053L, MS[22]#93054L, MS[23]#93055L, MS[24]#93056L, MS[25]#93057L, MS[26]#93058L, MS[27]#93059L, MS[28]#93060L, MS[29]#93061L, MS[30]#93062L, MS[31]#93063L, MS[32]#93064L, MS[33]#93065L, MS[34]#93066L, MS[35]#93067L, MS[36]#93068L, MS[37]#93069L, MS[38]#93070L, MS[39]#93071L, MS[40]#93072L, MS[41]#93073L, MS[42]#93074L, MS[43]#93075L, MS[44]#93076L, MS[45]#93077L, MS[46]#93078L, MS[47]#93079L, MS[48]#93080L, MS[49]#93081L, MS[50]#93082L, MS[51]#93083L, sum#93198L, sum#93199, sum#93200, count#93201L]
(15) Exchange
Input [59]: [segment#92965, processing_day#92967, count#93197L, MS[0]#93032L, MS[1]#93033L, MS[2]#93034L, MS[3]#93035L, MS[4]#93036L, MS[5]#93037L, MS[6]#93038L, MS[7]#93039L, MS[8]#93040L, MS[9]#93041L, MS[10]#93042L, MS[11]#93043L, MS[12]#93044L, MS[13]#93045L, MS[14]#93046L, MS[15]#93047L, MS[16]#93048L, MS[17]#93049L, MS[18]#93050L, MS[19]#93051L, MS[20]#93052L, MS[21]#93053L, MS[22]#93054L, MS[23]#93055L, MS[24]#93056L, MS[25]#93057L, MS[26]#93058L, MS[27]#93059L, MS[28]#93060L, MS[29]#93061L, MS[30]#93062L, MS[31]#93063L, MS[32]#93064L, MS[33]#93065L, MS[34]#93066L, MS[35]#93067L, MS[36]#93068L, MS[37]#93069L, MS[38]#93070L, MS[39]#93071L, MS[40]#93072L, MS[41]#93073L, MS[42]#93074L, MS[43]#93075L, MS[44]#93076L, MS[45]#93077L, MS[46]#93078L, MS[47]#93079L, MS[48]#93080L, MS[49]#93081L, MS[50]#93082L, MS[51]#93083L, sum#93198L, sum#93199, sum#93200, count#93201L]
Arguments: hashpartitioning(segment#92965, processing_day#92967, 200), ENSURE_REQUIREMENTS, [plan_id=8762]
(16) HashAggregate
Input [59]: [segment#92965, processing_day#92967, count#93197L, MS[0]#93032L, MS[1]#93033L, MS[2]#93034L, MS[3]#93035L, MS[4]#93036L, MS[5]#93037L, MS[6]#93038L, MS[7]#93039L, MS[8]#93040L, MS[9]#93041L, MS[10]#93042L, MS[11]#93043L, MS[12]#93044L, MS[13]#93045L, MS[14]#93046L, MS[15]#93047L, MS[16]#93048L, MS[17]#93049L, MS[18]#93050L, MS[19]#93051L, MS[20]#93052L, MS[21]#93053L, MS[22]#93054L, MS[23]#93055L, MS[24]#93056L, MS[25]#93057L, MS[26]#93058L, MS[27]#93059L, MS[28]#93060L, MS[29]#93061L, MS[30]#93062L, MS[31]#93063L, MS[32]#93064L, MS[33]#93065L, MS[34]#93066L, MS[35]#93067L, MS[36]#93068L, MS[37]#93069L, MS[38]#93070L, MS[39]#93071L, MS[40]#93072L, MS[41]#93073L, MS[42]#93074L, MS[43]#93075L, MS[44]#93076L, MS[45]#93077L, MS[46]#93078L, MS[47]#93079L, MS[48]#93080L, MS[49]#93081L, MS[50]#93082L, MS[51]#93083L, sum#93198L, sum#93199, sum#93200, count#93201L]
Keys [2]: [segment#92965, processing_day#92967]
Functions [5]: [count(1), approx_count_distinct(customer_id#92961L, 0.05, 0, 0), sum(events#92971), sum(weighted_amount#92973), avg(amount#92969)]
Aggregate Attributes [5]: [count(1)#92979L, approx_count_distinct(customer_id#92961L, 0.05, 0, 0)#93084L, sum(events#92971)#93085L, sum(weighted_amount#92973)#93086, avg(amount#92969)#93087]
Results [7]: [segment#92965, processing_day#92967, count(1)#92979L AS row_count#92974L, approx_count_distinct(customer_id#92961L, 0.05, 0, 0)#93084L AS unique_customers#92975L, sum(events#92971)#93085L AS event_sum#92976L, sum(weighted_amount#92973)#93086 AS weighted_amount_sum#92977, avg(amount#92969)#93087 AS avg_amount#92978]
(17) Exchange
Input [7]: [segment#92965, processing_day#92967, row_count#92974L, unique_customers#92975L, event_sum#92976L, weighted_amount_sum#92977, avg_amount#92978]
Arguments: rangepartitioning(segment#92965 ASC NULLS FIRST, processing_day#92967 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=8765]
(18) Sort
Input [7]: [segment#92965, processing_day#92967, row_count#92974L, unique_customers#92975L, event_sum#92976L, weighted_amount_sum#92977, avg_amount#92978]
Arguments: [segment#92965 ASC NULLS FIRST, processing_day#92967 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#92965, processing_day#92967, row_count#92974L, unique_customers#92975L, event_sum#92976L, weighted_amount_sum#92977, avg_amount#92978]
Arguments: isFinalPlan=true