== 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#69941L]
Arguments: Range (7000000, 8000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#69941L % 250000) AS customer_id#69943L, concat(segment-, cast(cast((id#69941L % 12) as int) as string)) AS segment#69947, cast((id#69941L % 14) as int) AS processing_day#69949, ((cast(((id#69941L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#69951, cast((((id#69941L * 29) % 7) + 1) as int) AS events#69953]
Input [1]: [id#69941L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#69943L, segment#69947, processing_day#69949, amount#69951, events#69953, (amount#69951 * cast(events#69953 as double)) AS weighted_amount#69955]
Input [5]: [customer_id#69943L, segment#69947, processing_day#69949, amount#69951, events#69953]
(4) HashAggregate
Input [6]: [customer_id#69943L, segment#69947, processing_day#69949, amount#69951, events#69953, weighted_amount#69955]
Keys [2]: [segment#69947, processing_day#69949]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#69943L, 0.05, 0, 0), partial_sum(events#69953), partial_sum(weighted_amount#69955), partial_avg(amount#69951)]
Aggregate Attributes [57]: [count#70174L, MS[0]#69962L, MS[1]#69963L, MS[2]#69964L, MS[3]#69965L, MS[4]#69966L, MS[5]#69967L, MS[6]#69968L, MS[7]#69969L, MS[8]#69970L, MS[9]#69971L, MS[10]#69972L, MS[11]#69973L, MS[12]#69974L, MS[13]#69975L, MS[14]#69976L, MS[15]#69977L, MS[16]#69978L, MS[17]#69979L, MS[18]#69980L, MS[19]#69981L, MS[20]#69982L, MS[21]#69983L, MS[22]#69984L, MS[23]#69985L, MS[24]#69986L, MS[25]#69987L, MS[26]#69988L, MS[27]#69989L, MS[28]#69990L, MS[29]#69991L, MS[30]#69992L, MS[31]#69993L, MS[32]#69994L, MS[33]#69995L, MS[34]#69996L, MS[35]#69997L, MS[36]#69998L, MS[37]#69999L, MS[38]#70000L, MS[39]#70001L, MS[40]#70002L, MS[41]#70003L, MS[42]#70004L, MS[43]#70005L, MS[44]#70006L, MS[45]#70007L, MS[46]#70008L, MS[47]#70009L, MS[48]#70010L, MS[49]#70011L, MS[50]#70012L, MS[51]#70013L, sum#70175L, sum#70176, sum#70177, count#70178L]
Results [59]: [segment#69947, processing_day#69949, count#70179L, MS[0]#70014L, MS[1]#70015L, MS[2]#70016L, MS[3]#70017L, MS[4]#70018L, MS[5]#70019L, MS[6]#70020L, MS[7]#70021L, MS[8]#70022L, MS[9]#70023L, MS[10]#70024L, MS[11]#70025L, MS[12]#70026L, MS[13]#70027L, MS[14]#70028L, MS[15]#70029L, MS[16]#70030L, MS[17]#70031L, MS[18]#70032L, MS[19]#70033L, MS[20]#70034L, MS[21]#70035L, MS[22]#70036L, MS[23]#70037L, MS[24]#70038L, MS[25]#70039L, MS[26]#70040L, MS[27]#70041L, MS[28]#70042L, MS[29]#70043L, MS[30]#70044L, MS[31]#70045L, MS[32]#70046L, MS[33]#70047L, MS[34]#70048L, MS[35]#70049L, MS[36]#70050L, MS[37]#70051L, MS[38]#70052L, MS[39]#70053L, MS[40]#70054L, MS[41]#70055L, MS[42]#70056L, MS[43]#70057L, MS[44]#70058L, MS[45]#70059L, MS[46]#70060L, MS[47]#70061L, MS[48]#70062L, MS[49]#70063L, MS[50]#70064L, MS[51]#70065L, sum#70180L, sum#70181, sum#70182, count#70183L]
(5) Exchange
Input [59]: [segment#69947, processing_day#69949, count#70179L, MS[0]#70014L, MS[1]#70015L, MS[2]#70016L, MS[3]#70017L, MS[4]#70018L, MS[5]#70019L, MS[6]#70020L, MS[7]#70021L, MS[8]#70022L, MS[9]#70023L, MS[10]#70024L, MS[11]#70025L, MS[12]#70026L, MS[13]#70027L, MS[14]#70028L, MS[15]#70029L, MS[16]#70030L, MS[17]#70031L, MS[18]#70032L, MS[19]#70033L, MS[20]#70034L, MS[21]#70035L, MS[22]#70036L, MS[23]#70037L, MS[24]#70038L, MS[25]#70039L, MS[26]#70040L, MS[27]#70041L, MS[28]#70042L, MS[29]#70043L, MS[30]#70044L, MS[31]#70045L, MS[32]#70046L, MS[33]#70047L, MS[34]#70048L, MS[35]#70049L, MS[36]#70050L, MS[37]#70051L, MS[38]#70052L, MS[39]#70053L, MS[40]#70054L, MS[41]#70055L, MS[42]#70056L, MS[43]#70057L, MS[44]#70058L, MS[45]#70059L, MS[46]#70060L, MS[47]#70061L, MS[48]#70062L, MS[49]#70063L, MS[50]#70064L, MS[51]#70065L, sum#70180L, sum#70181, sum#70182, count#70183L]
Arguments: hashpartitioning(segment#69947, processing_day#69949, 200), ENSURE_REQUIREMENTS, [plan_id=6618]
(6) ShuffleQueryStage
Output [59]: [segment#69947, processing_day#69949, count#70179L, MS[0]#70014L, MS[1]#70015L, MS[2]#70016L, MS[3]#70017L, MS[4]#70018L, MS[5]#70019L, MS[6]#70020L, MS[7]#70021L, MS[8]#70022L, MS[9]#70023L, MS[10]#70024L, MS[11]#70025L, MS[12]#70026L, MS[13]#70027L, MS[14]#70028L, MS[15]#70029L, MS[16]#70030L, MS[17]#70031L, MS[18]#70032L, MS[19]#70033L, MS[20]#70034L, MS[21]#70035L, MS[22]#70036L, MS[23]#70037L, MS[24]#70038L, MS[25]#70039L, MS[26]#70040L, MS[27]#70041L, MS[28]#70042L, MS[29]#70043L, MS[30]#70044L, MS[31]#70045L, MS[32]#70046L, MS[33]#70047L, MS[34]#70048L, MS[35]#70049L, MS[36]#70050L, MS[37]#70051L, MS[38]#70052L, MS[39]#70053L, MS[40]#70054L, MS[41]#70055L, MS[42]#70056L, MS[43]#70057L, MS[44]#70058L, MS[45]#70059L, MS[46]#70060L, MS[47]#70061L, MS[48]#70062L, MS[49]#70063L, MS[50]#70064L, MS[51]#70065L, sum#70180L, sum#70181, sum#70182, count#70183L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#69947, processing_day#69949, count#70179L, MS[0]#70014L, MS[1]#70015L, MS[2]#70016L, MS[3]#70017L, MS[4]#70018L, MS[5]#70019L, MS[6]#70020L, MS[7]#70021L, MS[8]#70022L, MS[9]#70023L, MS[10]#70024L, MS[11]#70025L, MS[12]#70026L, MS[13]#70027L, MS[14]#70028L, MS[15]#70029L, MS[16]#70030L, MS[17]#70031L, MS[18]#70032L, MS[19]#70033L, MS[20]#70034L, MS[21]#70035L, MS[22]#70036L, MS[23]#70037L, MS[24]#70038L, MS[25]#70039L, MS[26]#70040L, MS[27]#70041L, MS[28]#70042L, MS[29]#70043L, MS[30]#70044L, MS[31]#70045L, MS[32]#70046L, MS[33]#70047L, MS[34]#70048L, MS[35]#70049L, MS[36]#70050L, MS[37]#70051L, MS[38]#70052L, MS[39]#70053L, MS[40]#70054L, MS[41]#70055L, MS[42]#70056L, MS[43]#70057L, MS[44]#70058L, MS[45]#70059L, MS[46]#70060L, MS[47]#70061L, MS[48]#70062L, MS[49]#70063L, MS[50]#70064L, MS[51]#70065L, sum#70180L, sum#70181, sum#70182, count#70183L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#69947, processing_day#69949, count#70179L, MS[0]#70014L, MS[1]#70015L, MS[2]#70016L, MS[3]#70017L, MS[4]#70018L, MS[5]#70019L, MS[6]#70020L, MS[7]#70021L, MS[8]#70022L, MS[9]#70023L, MS[10]#70024L, MS[11]#70025L, MS[12]#70026L, MS[13]#70027L, MS[14]#70028L, MS[15]#70029L, MS[16]#70030L, MS[17]#70031L, MS[18]#70032L, MS[19]#70033L, MS[20]#70034L, MS[21]#70035L, MS[22]#70036L, MS[23]#70037L, MS[24]#70038L, MS[25]#70039L, MS[26]#70040L, MS[27]#70041L, MS[28]#70042L, MS[29]#70043L, MS[30]#70044L, MS[31]#70045L, MS[32]#70046L, MS[33]#70047L, MS[34]#70048L, MS[35]#70049L, MS[36]#70050L, MS[37]#70051L, MS[38]#70052L, MS[39]#70053L, MS[40]#70054L, MS[41]#70055L, MS[42]#70056L, MS[43]#70057L, MS[44]#70058L, MS[45]#70059L, MS[46]#70060L, MS[47]#70061L, MS[48]#70062L, MS[49]#70063L, MS[50]#70064L, MS[51]#70065L, sum#70180L, sum#70181, sum#70182, count#70183L]
Keys [2]: [segment#69947, processing_day#69949]
Functions [5]: [count(1), approx_count_distinct(customer_id#69943L, 0.05, 0, 0), sum(events#69953), sum(weighted_amount#69955), avg(amount#69951)]
Aggregate Attributes [5]: [count(1)#69961L, approx_count_distinct(customer_id#69943L, 0.05, 0, 0)#70066L, sum(events#69953)#70067L, sum(weighted_amount#69955)#70068, avg(amount#69951)#70069]
Results [7]: [segment#69947, processing_day#69949, count(1)#69961L AS row_count#69956L, approx_count_distinct(customer_id#69943L, 0.05, 0, 0)#70066L AS unique_customers#69957L, sum(events#69953)#70067L AS event_sum#69958L, sum(weighted_amount#69955)#70068 AS weighted_amount_sum#69959, avg(amount#69951)#70069 AS avg_amount#69960]
(9) Exchange
Input [7]: [segment#69947, processing_day#69949, row_count#69956L, unique_customers#69957L, event_sum#69958L, weighted_amount_sum#69959, avg_amount#69960]
Arguments: rangepartitioning(segment#69947 ASC NULLS FIRST, processing_day#69949 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=6640]
(10) ShuffleQueryStage
Output [7]: [segment#69947, processing_day#69949, row_count#69956L, unique_customers#69957L, event_sum#69958L, weighted_amount_sum#69959, avg_amount#69960]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#69947, processing_day#69949, row_count#69956L, unique_customers#69957L, event_sum#69958L, weighted_amount_sum#69959, avg_amount#69960]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#69947, processing_day#69949, row_count#69956L, unique_customers#69957L, event_sum#69958L, weighted_amount_sum#69959, avg_amount#69960]
Arguments: [segment#69947 ASC NULLS FIRST, processing_day#69949 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#69947, processing_day#69949, row_count#69956L, unique_customers#69957L, event_sum#69958L, weighted_amount_sum#69959, avg_amount#69960]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#69943L, segment#69947, processing_day#69949, amount#69951, events#69953, weighted_amount#69955]
Keys [2]: [segment#69947, processing_day#69949]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#69943L, 0.05, 0, 0), partial_sum(events#69953), partial_sum(weighted_amount#69955), partial_avg(amount#69951)]
Aggregate Attributes [57]: [count#70174L, MS[0]#69962L, MS[1]#69963L, MS[2]#69964L, MS[3]#69965L, MS[4]#69966L, MS[5]#69967L, MS[6]#69968L, MS[7]#69969L, MS[8]#69970L, MS[9]#69971L, MS[10]#69972L, MS[11]#69973L, MS[12]#69974L, MS[13]#69975L, MS[14]#69976L, MS[15]#69977L, MS[16]#69978L, MS[17]#69979L, MS[18]#69980L, MS[19]#69981L, MS[20]#69982L, MS[21]#69983L, MS[22]#69984L, MS[23]#69985L, MS[24]#69986L, MS[25]#69987L, MS[26]#69988L, MS[27]#69989L, MS[28]#69990L, MS[29]#69991L, MS[30]#69992L, MS[31]#69993L, MS[32]#69994L, MS[33]#69995L, MS[34]#69996L, MS[35]#69997L, MS[36]#69998L, MS[37]#69999L, MS[38]#70000L, MS[39]#70001L, MS[40]#70002L, MS[41]#70003L, MS[42]#70004L, MS[43]#70005L, MS[44]#70006L, MS[45]#70007L, MS[46]#70008L, MS[47]#70009L, MS[48]#70010L, MS[49]#70011L, MS[50]#70012L, MS[51]#70013L, sum#70175L, sum#70176, sum#70177, count#70178L]
Results [59]: [segment#69947, processing_day#69949, count#70179L, MS[0]#70014L, MS[1]#70015L, MS[2]#70016L, MS[3]#70017L, MS[4]#70018L, MS[5]#70019L, MS[6]#70020L, MS[7]#70021L, MS[8]#70022L, MS[9]#70023L, MS[10]#70024L, MS[11]#70025L, MS[12]#70026L, MS[13]#70027L, MS[14]#70028L, MS[15]#70029L, MS[16]#70030L, MS[17]#70031L, MS[18]#70032L, MS[19]#70033L, MS[20]#70034L, MS[21]#70035L, MS[22]#70036L, MS[23]#70037L, MS[24]#70038L, MS[25]#70039L, MS[26]#70040L, MS[27]#70041L, MS[28]#70042L, MS[29]#70043L, MS[30]#70044L, MS[31]#70045L, MS[32]#70046L, MS[33]#70047L, MS[34]#70048L, MS[35]#70049L, MS[36]#70050L, MS[37]#70051L, MS[38]#70052L, MS[39]#70053L, MS[40]#70054L, MS[41]#70055L, MS[42]#70056L, MS[43]#70057L, MS[44]#70058L, MS[45]#70059L, MS[46]#70060L, MS[47]#70061L, MS[48]#70062L, MS[49]#70063L, MS[50]#70064L, MS[51]#70065L, sum#70180L, sum#70181, sum#70182, count#70183L]
(15) Exchange
Input [59]: [segment#69947, processing_day#69949, count#70179L, MS[0]#70014L, MS[1]#70015L, MS[2]#70016L, MS[3]#70017L, MS[4]#70018L, MS[5]#70019L, MS[6]#70020L, MS[7]#70021L, MS[8]#70022L, MS[9]#70023L, MS[10]#70024L, MS[11]#70025L, MS[12]#70026L, MS[13]#70027L, MS[14]#70028L, MS[15]#70029L, MS[16]#70030L, MS[17]#70031L, MS[18]#70032L, MS[19]#70033L, MS[20]#70034L, MS[21]#70035L, MS[22]#70036L, MS[23]#70037L, MS[24]#70038L, MS[25]#70039L, MS[26]#70040L, MS[27]#70041L, MS[28]#70042L, MS[29]#70043L, MS[30]#70044L, MS[31]#70045L, MS[32]#70046L, MS[33]#70047L, MS[34]#70048L, MS[35]#70049L, MS[36]#70050L, MS[37]#70051L, MS[38]#70052L, MS[39]#70053L, MS[40]#70054L, MS[41]#70055L, MS[42]#70056L, MS[43]#70057L, MS[44]#70058L, MS[45]#70059L, MS[46]#70060L, MS[47]#70061L, MS[48]#70062L, MS[49]#70063L, MS[50]#70064L, MS[51]#70065L, sum#70180L, sum#70181, sum#70182, count#70183L]
Arguments: hashpartitioning(segment#69947, processing_day#69949, 200), ENSURE_REQUIREMENTS, [plan_id=6598]
(16) HashAggregate
Input [59]: [segment#69947, processing_day#69949, count#70179L, MS[0]#70014L, MS[1]#70015L, MS[2]#70016L, MS[3]#70017L, MS[4]#70018L, MS[5]#70019L, MS[6]#70020L, MS[7]#70021L, MS[8]#70022L, MS[9]#70023L, MS[10]#70024L, MS[11]#70025L, MS[12]#70026L, MS[13]#70027L, MS[14]#70028L, MS[15]#70029L, MS[16]#70030L, MS[17]#70031L, MS[18]#70032L, MS[19]#70033L, MS[20]#70034L, MS[21]#70035L, MS[22]#70036L, MS[23]#70037L, MS[24]#70038L, MS[25]#70039L, MS[26]#70040L, MS[27]#70041L, MS[28]#70042L, MS[29]#70043L, MS[30]#70044L, MS[31]#70045L, MS[32]#70046L, MS[33]#70047L, MS[34]#70048L, MS[35]#70049L, MS[36]#70050L, MS[37]#70051L, MS[38]#70052L, MS[39]#70053L, MS[40]#70054L, MS[41]#70055L, MS[42]#70056L, MS[43]#70057L, MS[44]#70058L, MS[45]#70059L, MS[46]#70060L, MS[47]#70061L, MS[48]#70062L, MS[49]#70063L, MS[50]#70064L, MS[51]#70065L, sum#70180L, sum#70181, sum#70182, count#70183L]
Keys [2]: [segment#69947, processing_day#69949]
Functions [5]: [count(1), approx_count_distinct(customer_id#69943L, 0.05, 0, 0), sum(events#69953), sum(weighted_amount#69955), avg(amount#69951)]
Aggregate Attributes [5]: [count(1)#69961L, approx_count_distinct(customer_id#69943L, 0.05, 0, 0)#70066L, sum(events#69953)#70067L, sum(weighted_amount#69955)#70068, avg(amount#69951)#70069]
Results [7]: [segment#69947, processing_day#69949, count(1)#69961L AS row_count#69956L, approx_count_distinct(customer_id#69943L, 0.05, 0, 0)#70066L AS unique_customers#69957L, sum(events#69953)#70067L AS event_sum#69958L, sum(weighted_amount#69955)#70068 AS weighted_amount_sum#69959, avg(amount#69951)#70069 AS avg_amount#69960]
(17) Exchange
Input [7]: [segment#69947, processing_day#69949, row_count#69956L, unique_customers#69957L, event_sum#69958L, weighted_amount_sum#69959, avg_amount#69960]
Arguments: rangepartitioning(segment#69947 ASC NULLS FIRST, processing_day#69949 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=6601]
(18) Sort
Input [7]: [segment#69947, processing_day#69949, row_count#69956L, unique_customers#69957L, event_sum#69958L, weighted_amount_sum#69959, avg_amount#69960]
Arguments: [segment#69947 ASC NULLS FIRST, processing_day#69949 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#69947, processing_day#69949, row_count#69956L, unique_customers#69957L, event_sum#69958L, weighted_amount_sum#69959, avg_amount#69960]
Arguments: isFinalPlan=true