== 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#15913L]
Arguments: Range (18000000, 19000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#15913L % 250000) AS customer_id#15915L, concat(segment-, cast(cast((id#15913L % 12) as int) as string)) AS segment#15919, cast((id#15913L % 14) as int) AS processing_day#15921, ((cast(((id#15913L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#15923, cast((((id#15913L * 29) % 7) + 1) as int) AS events#15925]
Input [1]: [id#15913L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#15915L, segment#15919, processing_day#15921, amount#15923, events#15925, (amount#15923 * cast(events#15925 as double)) AS weighted_amount#15927]
Input [5]: [customer_id#15915L, segment#15919, processing_day#15921, amount#15923, events#15925]
(4) HashAggregate
Input [6]: [customer_id#15915L, segment#15919, processing_day#15921, amount#15923, events#15925, weighted_amount#15927]
Keys [2]: [segment#15919, processing_day#15921]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#15915L, 0.05, 0, 0), partial_sum(events#15925), partial_sum(weighted_amount#15927), partial_avg(amount#15923)]
Aggregate Attributes [57]: [count#16146L, MS[0]#15934L, MS[1]#15935L, MS[2]#15936L, MS[3]#15937L, MS[4]#15938L, MS[5]#15939L, MS[6]#15940L, MS[7]#15941L, MS[8]#15942L, MS[9]#15943L, MS[10]#15944L, MS[11]#15945L, MS[12]#15946L, MS[13]#15947L, MS[14]#15948L, MS[15]#15949L, MS[16]#15950L, MS[17]#15951L, MS[18]#15952L, MS[19]#15953L, MS[20]#15954L, MS[21]#15955L, MS[22]#15956L, MS[23]#15957L, MS[24]#15958L, MS[25]#15959L, MS[26]#15960L, MS[27]#15961L, MS[28]#15962L, MS[29]#15963L, MS[30]#15964L, MS[31]#15965L, MS[32]#15966L, MS[33]#15967L, MS[34]#15968L, MS[35]#15969L, MS[36]#15970L, MS[37]#15971L, MS[38]#15972L, MS[39]#15973L, MS[40]#15974L, MS[41]#15975L, MS[42]#15976L, MS[43]#15977L, MS[44]#15978L, MS[45]#15979L, MS[46]#15980L, MS[47]#15981L, MS[48]#15982L, MS[49]#15983L, MS[50]#15984L, MS[51]#15985L, sum#16147L, sum#16148, sum#16149, count#16150L]
Results [59]: [segment#15919, processing_day#15921, count#16151L, MS[0]#15986L, MS[1]#15987L, MS[2]#15988L, MS[3]#15989L, MS[4]#15990L, MS[5]#15991L, MS[6]#15992L, MS[7]#15993L, MS[8]#15994L, MS[9]#15995L, MS[10]#15996L, MS[11]#15997L, MS[12]#15998L, MS[13]#15999L, MS[14]#16000L, MS[15]#16001L, MS[16]#16002L, MS[17]#16003L, MS[18]#16004L, MS[19]#16005L, MS[20]#16006L, MS[21]#16007L, MS[22]#16008L, MS[23]#16009L, MS[24]#16010L, MS[25]#16011L, MS[26]#16012L, MS[27]#16013L, MS[28]#16014L, MS[29]#16015L, MS[30]#16016L, MS[31]#16017L, MS[32]#16018L, MS[33]#16019L, MS[34]#16020L, MS[35]#16021L, MS[36]#16022L, MS[37]#16023L, MS[38]#16024L, MS[39]#16025L, MS[40]#16026L, MS[41]#16027L, MS[42]#16028L, MS[43]#16029L, MS[44]#16030L, MS[45]#16031L, MS[46]#16032L, MS[47]#16033L, MS[48]#16034L, MS[49]#16035L, MS[50]#16036L, MS[51]#16037L, sum#16152L, sum#16153, sum#16154, count#16155L]
(5) Exchange
Input [59]: [segment#15919, processing_day#15921, count#16151L, MS[0]#15986L, MS[1]#15987L, MS[2]#15988L, MS[3]#15989L, MS[4]#15990L, MS[5]#15991L, MS[6]#15992L, MS[7]#15993L, MS[8]#15994L, MS[9]#15995L, MS[10]#15996L, MS[11]#15997L, MS[12]#15998L, MS[13]#15999L, MS[14]#16000L, MS[15]#16001L, MS[16]#16002L, MS[17]#16003L, MS[18]#16004L, MS[19]#16005L, MS[20]#16006L, MS[21]#16007L, MS[22]#16008L, MS[23]#16009L, MS[24]#16010L, MS[25]#16011L, MS[26]#16012L, MS[27]#16013L, MS[28]#16014L, MS[29]#16015L, MS[30]#16016L, MS[31]#16017L, MS[32]#16018L, MS[33]#16019L, MS[34]#16020L, MS[35]#16021L, MS[36]#16022L, MS[37]#16023L, MS[38]#16024L, MS[39]#16025L, MS[40]#16026L, MS[41]#16027L, MS[42]#16028L, MS[43]#16029L, MS[44]#16030L, MS[45]#16031L, MS[46]#16032L, MS[47]#16033L, MS[48]#16034L, MS[49]#16035L, MS[50]#16036L, MS[51]#16037L, sum#16152L, sum#16153, sum#16154, count#16155L]
Arguments: hashpartitioning(segment#15919, processing_day#15921, 200), ENSURE_REQUIREMENTS, [plan_id=1537]
(6) ShuffleQueryStage
Output [59]: [segment#15919, processing_day#15921, count#16151L, MS[0]#15986L, MS[1]#15987L, MS[2]#15988L, MS[3]#15989L, MS[4]#15990L, MS[5]#15991L, MS[6]#15992L, MS[7]#15993L, MS[8]#15994L, MS[9]#15995L, MS[10]#15996L, MS[11]#15997L, MS[12]#15998L, MS[13]#15999L, MS[14]#16000L, MS[15]#16001L, MS[16]#16002L, MS[17]#16003L, MS[18]#16004L, MS[19]#16005L, MS[20]#16006L, MS[21]#16007L, MS[22]#16008L, MS[23]#16009L, MS[24]#16010L, MS[25]#16011L, MS[26]#16012L, MS[27]#16013L, MS[28]#16014L, MS[29]#16015L, MS[30]#16016L, MS[31]#16017L, MS[32]#16018L, MS[33]#16019L, MS[34]#16020L, MS[35]#16021L, MS[36]#16022L, MS[37]#16023L, MS[38]#16024L, MS[39]#16025L, MS[40]#16026L, MS[41]#16027L, MS[42]#16028L, MS[43]#16029L, MS[44]#16030L, MS[45]#16031L, MS[46]#16032L, MS[47]#16033L, MS[48]#16034L, MS[49]#16035L, MS[50]#16036L, MS[51]#16037L, sum#16152L, sum#16153, sum#16154, count#16155L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#15919, processing_day#15921, count#16151L, MS[0]#15986L, MS[1]#15987L, MS[2]#15988L, MS[3]#15989L, MS[4]#15990L, MS[5]#15991L, MS[6]#15992L, MS[7]#15993L, MS[8]#15994L, MS[9]#15995L, MS[10]#15996L, MS[11]#15997L, MS[12]#15998L, MS[13]#15999L, MS[14]#16000L, MS[15]#16001L, MS[16]#16002L, MS[17]#16003L, MS[18]#16004L, MS[19]#16005L, MS[20]#16006L, MS[21]#16007L, MS[22]#16008L, MS[23]#16009L, MS[24]#16010L, MS[25]#16011L, MS[26]#16012L, MS[27]#16013L, MS[28]#16014L, MS[29]#16015L, MS[30]#16016L, MS[31]#16017L, MS[32]#16018L, MS[33]#16019L, MS[34]#16020L, MS[35]#16021L, MS[36]#16022L, MS[37]#16023L, MS[38]#16024L, MS[39]#16025L, MS[40]#16026L, MS[41]#16027L, MS[42]#16028L, MS[43]#16029L, MS[44]#16030L, MS[45]#16031L, MS[46]#16032L, MS[47]#16033L, MS[48]#16034L, MS[49]#16035L, MS[50]#16036L, MS[51]#16037L, sum#16152L, sum#16153, sum#16154, count#16155L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#15919, processing_day#15921, count#16151L, MS[0]#15986L, MS[1]#15987L, MS[2]#15988L, MS[3]#15989L, MS[4]#15990L, MS[5]#15991L, MS[6]#15992L, MS[7]#15993L, MS[8]#15994L, MS[9]#15995L, MS[10]#15996L, MS[11]#15997L, MS[12]#15998L, MS[13]#15999L, MS[14]#16000L, MS[15]#16001L, MS[16]#16002L, MS[17]#16003L, MS[18]#16004L, MS[19]#16005L, MS[20]#16006L, MS[21]#16007L, MS[22]#16008L, MS[23]#16009L, MS[24]#16010L, MS[25]#16011L, MS[26]#16012L, MS[27]#16013L, MS[28]#16014L, MS[29]#16015L, MS[30]#16016L, MS[31]#16017L, MS[32]#16018L, MS[33]#16019L, MS[34]#16020L, MS[35]#16021L, MS[36]#16022L, MS[37]#16023L, MS[38]#16024L, MS[39]#16025L, MS[40]#16026L, MS[41]#16027L, MS[42]#16028L, MS[43]#16029L, MS[44]#16030L, MS[45]#16031L, MS[46]#16032L, MS[47]#16033L, MS[48]#16034L, MS[49]#16035L, MS[50]#16036L, MS[51]#16037L, sum#16152L, sum#16153, sum#16154, count#16155L]
Keys [2]: [segment#15919, processing_day#15921]
Functions [5]: [count(1), approx_count_distinct(customer_id#15915L, 0.05, 0, 0), sum(events#15925), sum(weighted_amount#15927), avg(amount#15923)]
Aggregate Attributes [5]: [count(1)#15933L, approx_count_distinct(customer_id#15915L, 0.05, 0, 0)#16038L, sum(events#15925)#16039L, sum(weighted_amount#15927)#16040, avg(amount#15923)#16041]
Results [7]: [segment#15919, processing_day#15921, count(1)#15933L AS row_count#15928L, approx_count_distinct(customer_id#15915L, 0.05, 0, 0)#16038L AS unique_customers#15929L, sum(events#15925)#16039L AS event_sum#15930L, sum(weighted_amount#15927)#16040 AS weighted_amount_sum#15931, avg(amount#15923)#16041 AS avg_amount#15932]
(9) Exchange
Input [7]: [segment#15919, processing_day#15921, row_count#15928L, unique_customers#15929L, event_sum#15930L, weighted_amount_sum#15931, avg_amount#15932]
Arguments: rangepartitioning(segment#15919 ASC NULLS FIRST, processing_day#15921 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=1559]
(10) ShuffleQueryStage
Output [7]: [segment#15919, processing_day#15921, row_count#15928L, unique_customers#15929L, event_sum#15930L, weighted_amount_sum#15931, avg_amount#15932]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#15919, processing_day#15921, row_count#15928L, unique_customers#15929L, event_sum#15930L, weighted_amount_sum#15931, avg_amount#15932]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#15919, processing_day#15921, row_count#15928L, unique_customers#15929L, event_sum#15930L, weighted_amount_sum#15931, avg_amount#15932]
Arguments: [segment#15919 ASC NULLS FIRST, processing_day#15921 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#15919, processing_day#15921, row_count#15928L, unique_customers#15929L, event_sum#15930L, weighted_amount_sum#15931, avg_amount#15932]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#15915L, segment#15919, processing_day#15921, amount#15923, events#15925, weighted_amount#15927]
Keys [2]: [segment#15919, processing_day#15921]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#15915L, 0.05, 0, 0), partial_sum(events#15925), partial_sum(weighted_amount#15927), partial_avg(amount#15923)]
Aggregate Attributes [57]: [count#16146L, MS[0]#15934L, MS[1]#15935L, MS[2]#15936L, MS[3]#15937L, MS[4]#15938L, MS[5]#15939L, MS[6]#15940L, MS[7]#15941L, MS[8]#15942L, MS[9]#15943L, MS[10]#15944L, MS[11]#15945L, MS[12]#15946L, MS[13]#15947L, MS[14]#15948L, MS[15]#15949L, MS[16]#15950L, MS[17]#15951L, MS[18]#15952L, MS[19]#15953L, MS[20]#15954L, MS[21]#15955L, MS[22]#15956L, MS[23]#15957L, MS[24]#15958L, MS[25]#15959L, MS[26]#15960L, MS[27]#15961L, MS[28]#15962L, MS[29]#15963L, MS[30]#15964L, MS[31]#15965L, MS[32]#15966L, MS[33]#15967L, MS[34]#15968L, MS[35]#15969L, MS[36]#15970L, MS[37]#15971L, MS[38]#15972L, MS[39]#15973L, MS[40]#15974L, MS[41]#15975L, MS[42]#15976L, MS[43]#15977L, MS[44]#15978L, MS[45]#15979L, MS[46]#15980L, MS[47]#15981L, MS[48]#15982L, MS[49]#15983L, MS[50]#15984L, MS[51]#15985L, sum#16147L, sum#16148, sum#16149, count#16150L]
Results [59]: [segment#15919, processing_day#15921, count#16151L, MS[0]#15986L, MS[1]#15987L, MS[2]#15988L, MS[3]#15989L, MS[4]#15990L, MS[5]#15991L, MS[6]#15992L, MS[7]#15993L, MS[8]#15994L, MS[9]#15995L, MS[10]#15996L, MS[11]#15997L, MS[12]#15998L, MS[13]#15999L, MS[14]#16000L, MS[15]#16001L, MS[16]#16002L, MS[17]#16003L, MS[18]#16004L, MS[19]#16005L, MS[20]#16006L, MS[21]#16007L, MS[22]#16008L, MS[23]#16009L, MS[24]#16010L, MS[25]#16011L, MS[26]#16012L, MS[27]#16013L, MS[28]#16014L, MS[29]#16015L, MS[30]#16016L, MS[31]#16017L, MS[32]#16018L, MS[33]#16019L, MS[34]#16020L, MS[35]#16021L, MS[36]#16022L, MS[37]#16023L, MS[38]#16024L, MS[39]#16025L, MS[40]#16026L, MS[41]#16027L, MS[42]#16028L, MS[43]#16029L, MS[44]#16030L, MS[45]#16031L, MS[46]#16032L, MS[47]#16033L, MS[48]#16034L, MS[49]#16035L, MS[50]#16036L, MS[51]#16037L, sum#16152L, sum#16153, sum#16154, count#16155L]
(15) Exchange
Input [59]: [segment#15919, processing_day#15921, count#16151L, MS[0]#15986L, MS[1]#15987L, MS[2]#15988L, MS[3]#15989L, MS[4]#15990L, MS[5]#15991L, MS[6]#15992L, MS[7]#15993L, MS[8]#15994L, MS[9]#15995L, MS[10]#15996L, MS[11]#15997L, MS[12]#15998L, MS[13]#15999L, MS[14]#16000L, MS[15]#16001L, MS[16]#16002L, MS[17]#16003L, MS[18]#16004L, MS[19]#16005L, MS[20]#16006L, MS[21]#16007L, MS[22]#16008L, MS[23]#16009L, MS[24]#16010L, MS[25]#16011L, MS[26]#16012L, MS[27]#16013L, MS[28]#16014L, MS[29]#16015L, MS[30]#16016L, MS[31]#16017L, MS[32]#16018L, MS[33]#16019L, MS[34]#16020L, MS[35]#16021L, MS[36]#16022L, MS[37]#16023L, MS[38]#16024L, MS[39]#16025L, MS[40]#16026L, MS[41]#16027L, MS[42]#16028L, MS[43]#16029L, MS[44]#16030L, MS[45]#16031L, MS[46]#16032L, MS[47]#16033L, MS[48]#16034L, MS[49]#16035L, MS[50]#16036L, MS[51]#16037L, sum#16152L, sum#16153, sum#16154, count#16155L]
Arguments: hashpartitioning(segment#15919, processing_day#15921, 200), ENSURE_REQUIREMENTS, [plan_id=1517]
(16) HashAggregate
Input [59]: [segment#15919, processing_day#15921, count#16151L, MS[0]#15986L, MS[1]#15987L, MS[2]#15988L, MS[3]#15989L, MS[4]#15990L, MS[5]#15991L, MS[6]#15992L, MS[7]#15993L, MS[8]#15994L, MS[9]#15995L, MS[10]#15996L, MS[11]#15997L, MS[12]#15998L, MS[13]#15999L, MS[14]#16000L, MS[15]#16001L, MS[16]#16002L, MS[17]#16003L, MS[18]#16004L, MS[19]#16005L, MS[20]#16006L, MS[21]#16007L, MS[22]#16008L, MS[23]#16009L, MS[24]#16010L, MS[25]#16011L, MS[26]#16012L, MS[27]#16013L, MS[28]#16014L, MS[29]#16015L, MS[30]#16016L, MS[31]#16017L, MS[32]#16018L, MS[33]#16019L, MS[34]#16020L, MS[35]#16021L, MS[36]#16022L, MS[37]#16023L, MS[38]#16024L, MS[39]#16025L, MS[40]#16026L, MS[41]#16027L, MS[42]#16028L, MS[43]#16029L, MS[44]#16030L, MS[45]#16031L, MS[46]#16032L, MS[47]#16033L, MS[48]#16034L, MS[49]#16035L, MS[50]#16036L, MS[51]#16037L, sum#16152L, sum#16153, sum#16154, count#16155L]
Keys [2]: [segment#15919, processing_day#15921]
Functions [5]: [count(1), approx_count_distinct(customer_id#15915L, 0.05, 0, 0), sum(events#15925), sum(weighted_amount#15927), avg(amount#15923)]
Aggregate Attributes [5]: [count(1)#15933L, approx_count_distinct(customer_id#15915L, 0.05, 0, 0)#16038L, sum(events#15925)#16039L, sum(weighted_amount#15927)#16040, avg(amount#15923)#16041]
Results [7]: [segment#15919, processing_day#15921, count(1)#15933L AS row_count#15928L, approx_count_distinct(customer_id#15915L, 0.05, 0, 0)#16038L AS unique_customers#15929L, sum(events#15925)#16039L AS event_sum#15930L, sum(weighted_amount#15927)#16040 AS weighted_amount_sum#15931, avg(amount#15923)#16041 AS avg_amount#15932]
(17) Exchange
Input [7]: [segment#15919, processing_day#15921, row_count#15928L, unique_customers#15929L, event_sum#15930L, weighted_amount_sum#15931, avg_amount#15932]
Arguments: rangepartitioning(segment#15919 ASC NULLS FIRST, processing_day#15921 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=1520]
(18) Sort
Input [7]: [segment#15919, processing_day#15921, row_count#15928L, unique_customers#15929L, event_sum#15930L, weighted_amount_sum#15931, avg_amount#15932]
Arguments: [segment#15919 ASC NULLS FIRST, processing_day#15921 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#15919, processing_day#15921, row_count#15928L, unique_customers#15929L, event_sum#15930L, weighted_amount_sum#15931, avg_amount#15932]
Arguments: isFinalPlan=true