== 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#61951L]
Arguments: Range (22000000, 23000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#61951L % 250000) AS customer_id#61953L, concat(segment-, cast(cast((id#61951L % 12) as int) as string)) AS segment#61957, cast((id#61951L % 14) as int) AS processing_day#61959, ((cast(((id#61951L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#61961, cast((((id#61951L * 29) % 7) + 1) as int) AS events#61963]
Input [1]: [id#61951L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#61953L, segment#61957, processing_day#61959, amount#61961, events#61963, (amount#61961 * cast(events#61963 as double)) AS weighted_amount#61965]
Input [5]: [customer_id#61953L, segment#61957, processing_day#61959, amount#61961, events#61963]
(4) HashAggregate
Input [6]: [customer_id#61953L, segment#61957, processing_day#61959, amount#61961, events#61963, weighted_amount#61965]
Keys [2]: [segment#61957, processing_day#61959]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#61953L, 0.05, 0, 0), partial_sum(events#61963), partial_sum(weighted_amount#61965), partial_avg(amount#61961)]
Aggregate Attributes [57]: [count#62184L, MS[0]#61972L, MS[1]#61973L, MS[2]#61974L, MS[3]#61975L, MS[4]#61976L, MS[5]#61977L, MS[6]#61978L, MS[7]#61979L, MS[8]#61980L, MS[9]#61981L, MS[10]#61982L, MS[11]#61983L, MS[12]#61984L, MS[13]#61985L, MS[14]#61986L, MS[15]#61987L, MS[16]#61988L, MS[17]#61989L, MS[18]#61990L, MS[19]#61991L, MS[20]#61992L, MS[21]#61993L, MS[22]#61994L, MS[23]#61995L, MS[24]#61996L, MS[25]#61997L, MS[26]#61998L, MS[27]#61999L, MS[28]#62000L, MS[29]#62001L, MS[30]#62002L, MS[31]#62003L, MS[32]#62004L, MS[33]#62005L, MS[34]#62006L, MS[35]#62007L, MS[36]#62008L, MS[37]#62009L, MS[38]#62010L, MS[39]#62011L, MS[40]#62012L, MS[41]#62013L, MS[42]#62014L, MS[43]#62015L, MS[44]#62016L, MS[45]#62017L, MS[46]#62018L, MS[47]#62019L, MS[48]#62020L, MS[49]#62021L, MS[50]#62022L, MS[51]#62023L, sum#62185L, sum#62186, sum#62187, count#62188L]
Results [59]: [segment#61957, processing_day#61959, count#62189L, MS[0]#62024L, MS[1]#62025L, MS[2]#62026L, MS[3]#62027L, MS[4]#62028L, MS[5]#62029L, MS[6]#62030L, MS[7]#62031L, MS[8]#62032L, MS[9]#62033L, MS[10]#62034L, MS[11]#62035L, MS[12]#62036L, MS[13]#62037L, MS[14]#62038L, MS[15]#62039L, MS[16]#62040L, MS[17]#62041L, MS[18]#62042L, MS[19]#62043L, MS[20]#62044L, MS[21]#62045L, MS[22]#62046L, MS[23]#62047L, MS[24]#62048L, MS[25]#62049L, MS[26]#62050L, MS[27]#62051L, MS[28]#62052L, MS[29]#62053L, MS[30]#62054L, MS[31]#62055L, MS[32]#62056L, MS[33]#62057L, MS[34]#62058L, MS[35]#62059L, MS[36]#62060L, MS[37]#62061L, MS[38]#62062L, MS[39]#62063L, MS[40]#62064L, MS[41]#62065L, MS[42]#62066L, MS[43]#62067L, MS[44]#62068L, MS[45]#62069L, MS[46]#62070L, MS[47]#62071L, MS[48]#62072L, MS[49]#62073L, MS[50]#62074L, MS[51]#62075L, sum#62190L, sum#62191, sum#62192, count#62193L]
(5) Exchange
Input [59]: [segment#61957, processing_day#61959, count#62189L, MS[0]#62024L, MS[1]#62025L, MS[2]#62026L, MS[3]#62027L, MS[4]#62028L, MS[5]#62029L, MS[6]#62030L, MS[7]#62031L, MS[8]#62032L, MS[9]#62033L, MS[10]#62034L, MS[11]#62035L, MS[12]#62036L, MS[13]#62037L, MS[14]#62038L, MS[15]#62039L, MS[16]#62040L, MS[17]#62041L, MS[18]#62042L, MS[19]#62043L, MS[20]#62044L, MS[21]#62045L, MS[22]#62046L, MS[23]#62047L, MS[24]#62048L, MS[25]#62049L, MS[26]#62050L, MS[27]#62051L, MS[28]#62052L, MS[29]#62053L, MS[30]#62054L, MS[31]#62055L, MS[32]#62056L, MS[33]#62057L, MS[34]#62058L, MS[35]#62059L, MS[36]#62060L, MS[37]#62061L, MS[38]#62062L, MS[39]#62063L, MS[40]#62064L, MS[41]#62065L, MS[42]#62066L, MS[43]#62067L, MS[44]#62068L, MS[45]#62069L, MS[46]#62070L, MS[47]#62071L, MS[48]#62072L, MS[49]#62073L, MS[50]#62074L, MS[51]#62075L, sum#62190L, sum#62191, sum#62192, count#62193L]
Arguments: hashpartitioning(segment#61957, processing_day#61959, 200), ENSURE_REQUIREMENTS, [plan_id=5865]
(6) ShuffleQueryStage
Output [59]: [segment#61957, processing_day#61959, count#62189L, MS[0]#62024L, MS[1]#62025L, MS[2]#62026L, MS[3]#62027L, MS[4]#62028L, MS[5]#62029L, MS[6]#62030L, MS[7]#62031L, MS[8]#62032L, MS[9]#62033L, MS[10]#62034L, MS[11]#62035L, MS[12]#62036L, MS[13]#62037L, MS[14]#62038L, MS[15]#62039L, MS[16]#62040L, MS[17]#62041L, MS[18]#62042L, MS[19]#62043L, MS[20]#62044L, MS[21]#62045L, MS[22]#62046L, MS[23]#62047L, MS[24]#62048L, MS[25]#62049L, MS[26]#62050L, MS[27]#62051L, MS[28]#62052L, MS[29]#62053L, MS[30]#62054L, MS[31]#62055L, MS[32]#62056L, MS[33]#62057L, MS[34]#62058L, MS[35]#62059L, MS[36]#62060L, MS[37]#62061L, MS[38]#62062L, MS[39]#62063L, MS[40]#62064L, MS[41]#62065L, MS[42]#62066L, MS[43]#62067L, MS[44]#62068L, MS[45]#62069L, MS[46]#62070L, MS[47]#62071L, MS[48]#62072L, MS[49]#62073L, MS[50]#62074L, MS[51]#62075L, sum#62190L, sum#62191, sum#62192, count#62193L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#61957, processing_day#61959, count#62189L, MS[0]#62024L, MS[1]#62025L, MS[2]#62026L, MS[3]#62027L, MS[4]#62028L, MS[5]#62029L, MS[6]#62030L, MS[7]#62031L, MS[8]#62032L, MS[9]#62033L, MS[10]#62034L, MS[11]#62035L, MS[12]#62036L, MS[13]#62037L, MS[14]#62038L, MS[15]#62039L, MS[16]#62040L, MS[17]#62041L, MS[18]#62042L, MS[19]#62043L, MS[20]#62044L, MS[21]#62045L, MS[22]#62046L, MS[23]#62047L, MS[24]#62048L, MS[25]#62049L, MS[26]#62050L, MS[27]#62051L, MS[28]#62052L, MS[29]#62053L, MS[30]#62054L, MS[31]#62055L, MS[32]#62056L, MS[33]#62057L, MS[34]#62058L, MS[35]#62059L, MS[36]#62060L, MS[37]#62061L, MS[38]#62062L, MS[39]#62063L, MS[40]#62064L, MS[41]#62065L, MS[42]#62066L, MS[43]#62067L, MS[44]#62068L, MS[45]#62069L, MS[46]#62070L, MS[47]#62071L, MS[48]#62072L, MS[49]#62073L, MS[50]#62074L, MS[51]#62075L, sum#62190L, sum#62191, sum#62192, count#62193L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#61957, processing_day#61959, count#62189L, MS[0]#62024L, MS[1]#62025L, MS[2]#62026L, MS[3]#62027L, MS[4]#62028L, MS[5]#62029L, MS[6]#62030L, MS[7]#62031L, MS[8]#62032L, MS[9]#62033L, MS[10]#62034L, MS[11]#62035L, MS[12]#62036L, MS[13]#62037L, MS[14]#62038L, MS[15]#62039L, MS[16]#62040L, MS[17]#62041L, MS[18]#62042L, MS[19]#62043L, MS[20]#62044L, MS[21]#62045L, MS[22]#62046L, MS[23]#62047L, MS[24]#62048L, MS[25]#62049L, MS[26]#62050L, MS[27]#62051L, MS[28]#62052L, MS[29]#62053L, MS[30]#62054L, MS[31]#62055L, MS[32]#62056L, MS[33]#62057L, MS[34]#62058L, MS[35]#62059L, MS[36]#62060L, MS[37]#62061L, MS[38]#62062L, MS[39]#62063L, MS[40]#62064L, MS[41]#62065L, MS[42]#62066L, MS[43]#62067L, MS[44]#62068L, MS[45]#62069L, MS[46]#62070L, MS[47]#62071L, MS[48]#62072L, MS[49]#62073L, MS[50]#62074L, MS[51]#62075L, sum#62190L, sum#62191, sum#62192, count#62193L]
Keys [2]: [segment#61957, processing_day#61959]
Functions [5]: [count(1), approx_count_distinct(customer_id#61953L, 0.05, 0, 0), sum(events#61963), sum(weighted_amount#61965), avg(amount#61961)]
Aggregate Attributes [5]: [count(1)#61971L, approx_count_distinct(customer_id#61953L, 0.05, 0, 0)#62076L, sum(events#61963)#62077L, sum(weighted_amount#61965)#62078, avg(amount#61961)#62079]
Results [7]: [segment#61957, processing_day#61959, count(1)#61971L AS row_count#61966L, approx_count_distinct(customer_id#61953L, 0.05, 0, 0)#62076L AS unique_customers#61967L, sum(events#61963)#62077L AS event_sum#61968L, sum(weighted_amount#61965)#62078 AS weighted_amount_sum#61969, avg(amount#61961)#62079 AS avg_amount#61970]
(9) Exchange
Input [7]: [segment#61957, processing_day#61959, row_count#61966L, unique_customers#61967L, event_sum#61968L, weighted_amount_sum#61969, avg_amount#61970]
Arguments: rangepartitioning(segment#61957 ASC NULLS FIRST, processing_day#61959 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=5887]
(10) ShuffleQueryStage
Output [7]: [segment#61957, processing_day#61959, row_count#61966L, unique_customers#61967L, event_sum#61968L, weighted_amount_sum#61969, avg_amount#61970]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#61957, processing_day#61959, row_count#61966L, unique_customers#61967L, event_sum#61968L, weighted_amount_sum#61969, avg_amount#61970]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#61957, processing_day#61959, row_count#61966L, unique_customers#61967L, event_sum#61968L, weighted_amount_sum#61969, avg_amount#61970]
Arguments: [segment#61957 ASC NULLS FIRST, processing_day#61959 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#61957, processing_day#61959, row_count#61966L, unique_customers#61967L, event_sum#61968L, weighted_amount_sum#61969, avg_amount#61970]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#61953L, segment#61957, processing_day#61959, amount#61961, events#61963, weighted_amount#61965]
Keys [2]: [segment#61957, processing_day#61959]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#61953L, 0.05, 0, 0), partial_sum(events#61963), partial_sum(weighted_amount#61965), partial_avg(amount#61961)]
Aggregate Attributes [57]: [count#62184L, MS[0]#61972L, MS[1]#61973L, MS[2]#61974L, MS[3]#61975L, MS[4]#61976L, MS[5]#61977L, MS[6]#61978L, MS[7]#61979L, MS[8]#61980L, MS[9]#61981L, MS[10]#61982L, MS[11]#61983L, MS[12]#61984L, MS[13]#61985L, MS[14]#61986L, MS[15]#61987L, MS[16]#61988L, MS[17]#61989L, MS[18]#61990L, MS[19]#61991L, MS[20]#61992L, MS[21]#61993L, MS[22]#61994L, MS[23]#61995L, MS[24]#61996L, MS[25]#61997L, MS[26]#61998L, MS[27]#61999L, MS[28]#62000L, MS[29]#62001L, MS[30]#62002L, MS[31]#62003L, MS[32]#62004L, MS[33]#62005L, MS[34]#62006L, MS[35]#62007L, MS[36]#62008L, MS[37]#62009L, MS[38]#62010L, MS[39]#62011L, MS[40]#62012L, MS[41]#62013L, MS[42]#62014L, MS[43]#62015L, MS[44]#62016L, MS[45]#62017L, MS[46]#62018L, MS[47]#62019L, MS[48]#62020L, MS[49]#62021L, MS[50]#62022L, MS[51]#62023L, sum#62185L, sum#62186, sum#62187, count#62188L]
Results [59]: [segment#61957, processing_day#61959, count#62189L, MS[0]#62024L, MS[1]#62025L, MS[2]#62026L, MS[3]#62027L, MS[4]#62028L, MS[5]#62029L, MS[6]#62030L, MS[7]#62031L, MS[8]#62032L, MS[9]#62033L, MS[10]#62034L, MS[11]#62035L, MS[12]#62036L, MS[13]#62037L, MS[14]#62038L, MS[15]#62039L, MS[16]#62040L, MS[17]#62041L, MS[18]#62042L, MS[19]#62043L, MS[20]#62044L, MS[21]#62045L, MS[22]#62046L, MS[23]#62047L, MS[24]#62048L, MS[25]#62049L, MS[26]#62050L, MS[27]#62051L, MS[28]#62052L, MS[29]#62053L, MS[30]#62054L, MS[31]#62055L, MS[32]#62056L, MS[33]#62057L, MS[34]#62058L, MS[35]#62059L, MS[36]#62060L, MS[37]#62061L, MS[38]#62062L, MS[39]#62063L, MS[40]#62064L, MS[41]#62065L, MS[42]#62066L, MS[43]#62067L, MS[44]#62068L, MS[45]#62069L, MS[46]#62070L, MS[47]#62071L, MS[48]#62072L, MS[49]#62073L, MS[50]#62074L, MS[51]#62075L, sum#62190L, sum#62191, sum#62192, count#62193L]
(15) Exchange
Input [59]: [segment#61957, processing_day#61959, count#62189L, MS[0]#62024L, MS[1]#62025L, MS[2]#62026L, MS[3]#62027L, MS[4]#62028L, MS[5]#62029L, MS[6]#62030L, MS[7]#62031L, MS[8]#62032L, MS[9]#62033L, MS[10]#62034L, MS[11]#62035L, MS[12]#62036L, MS[13]#62037L, MS[14]#62038L, MS[15]#62039L, MS[16]#62040L, MS[17]#62041L, MS[18]#62042L, MS[19]#62043L, MS[20]#62044L, MS[21]#62045L, MS[22]#62046L, MS[23]#62047L, MS[24]#62048L, MS[25]#62049L, MS[26]#62050L, MS[27]#62051L, MS[28]#62052L, MS[29]#62053L, MS[30]#62054L, MS[31]#62055L, MS[32]#62056L, MS[33]#62057L, MS[34]#62058L, MS[35]#62059L, MS[36]#62060L, MS[37]#62061L, MS[38]#62062L, MS[39]#62063L, MS[40]#62064L, MS[41]#62065L, MS[42]#62066L, MS[43]#62067L, MS[44]#62068L, MS[45]#62069L, MS[46]#62070L, MS[47]#62071L, MS[48]#62072L, MS[49]#62073L, MS[50]#62074L, MS[51]#62075L, sum#62190L, sum#62191, sum#62192, count#62193L]
Arguments: hashpartitioning(segment#61957, processing_day#61959, 200), ENSURE_REQUIREMENTS, [plan_id=5845]
(16) HashAggregate
Input [59]: [segment#61957, processing_day#61959, count#62189L, MS[0]#62024L, MS[1]#62025L, MS[2]#62026L, MS[3]#62027L, MS[4]#62028L, MS[5]#62029L, MS[6]#62030L, MS[7]#62031L, MS[8]#62032L, MS[9]#62033L, MS[10]#62034L, MS[11]#62035L, MS[12]#62036L, MS[13]#62037L, MS[14]#62038L, MS[15]#62039L, MS[16]#62040L, MS[17]#62041L, MS[18]#62042L, MS[19]#62043L, MS[20]#62044L, MS[21]#62045L, MS[22]#62046L, MS[23]#62047L, MS[24]#62048L, MS[25]#62049L, MS[26]#62050L, MS[27]#62051L, MS[28]#62052L, MS[29]#62053L, MS[30]#62054L, MS[31]#62055L, MS[32]#62056L, MS[33]#62057L, MS[34]#62058L, MS[35]#62059L, MS[36]#62060L, MS[37]#62061L, MS[38]#62062L, MS[39]#62063L, MS[40]#62064L, MS[41]#62065L, MS[42]#62066L, MS[43]#62067L, MS[44]#62068L, MS[45]#62069L, MS[46]#62070L, MS[47]#62071L, MS[48]#62072L, MS[49]#62073L, MS[50]#62074L, MS[51]#62075L, sum#62190L, sum#62191, sum#62192, count#62193L]
Keys [2]: [segment#61957, processing_day#61959]
Functions [5]: [count(1), approx_count_distinct(customer_id#61953L, 0.05, 0, 0), sum(events#61963), sum(weighted_amount#61965), avg(amount#61961)]
Aggregate Attributes [5]: [count(1)#61971L, approx_count_distinct(customer_id#61953L, 0.05, 0, 0)#62076L, sum(events#61963)#62077L, sum(weighted_amount#61965)#62078, avg(amount#61961)#62079]
Results [7]: [segment#61957, processing_day#61959, count(1)#61971L AS row_count#61966L, approx_count_distinct(customer_id#61953L, 0.05, 0, 0)#62076L AS unique_customers#61967L, sum(events#61963)#62077L AS event_sum#61968L, sum(weighted_amount#61965)#62078 AS weighted_amount_sum#61969, avg(amount#61961)#62079 AS avg_amount#61970]
(17) Exchange
Input [7]: [segment#61957, processing_day#61959, row_count#61966L, unique_customers#61967L, event_sum#61968L, weighted_amount_sum#61969, avg_amount#61970]
Arguments: rangepartitioning(segment#61957 ASC NULLS FIRST, processing_day#61959 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=5848]
(18) Sort
Input [7]: [segment#61957, processing_day#61959, row_count#61966L, unique_customers#61967L, event_sum#61968L, weighted_amount_sum#61969, avg_amount#61970]
Arguments: [segment#61957 ASC NULLS FIRST, processing_day#61959 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#61957, processing_day#61959, row_count#61966L, unique_customers#61967L, event_sum#61968L, weighted_amount_sum#61969, avg_amount#61970]
Arguments: isFinalPlan=true