== 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#53995L]
Arguments: Range (13000000, 14000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#53995L % 250000) AS customer_id#53997L, concat(segment-, cast(cast((id#53995L % 12) as int) as string)) AS segment#54001, cast((id#53995L % 14) as int) AS processing_day#54003, ((cast(((id#53995L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#54005, cast((((id#53995L * 29) % 7) + 1) as int) AS events#54007]
Input [1]: [id#53995L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#53997L, segment#54001, processing_day#54003, amount#54005, events#54007, (amount#54005 * cast(events#54007 as double)) AS weighted_amount#54009]
Input [5]: [customer_id#53997L, segment#54001, processing_day#54003, amount#54005, events#54007]
(4) HashAggregate
Input [6]: [customer_id#53997L, segment#54001, processing_day#54003, amount#54005, events#54007, weighted_amount#54009]
Keys [2]: [segment#54001, processing_day#54003]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#53997L, 0.05, 0, 0), partial_sum(events#54007), partial_sum(weighted_amount#54009), partial_avg(amount#54005)]
Aggregate Attributes [57]: [count#54228L, MS[0]#54016L, MS[1]#54017L, MS[2]#54018L, MS[3]#54019L, MS[4]#54020L, MS[5]#54021L, MS[6]#54022L, MS[7]#54023L, MS[8]#54024L, MS[9]#54025L, MS[10]#54026L, MS[11]#54027L, MS[12]#54028L, MS[13]#54029L, MS[14]#54030L, MS[15]#54031L, MS[16]#54032L, MS[17]#54033L, MS[18]#54034L, MS[19]#54035L, MS[20]#54036L, MS[21]#54037L, MS[22]#54038L, MS[23]#54039L, MS[24]#54040L, MS[25]#54041L, MS[26]#54042L, MS[27]#54043L, MS[28]#54044L, MS[29]#54045L, MS[30]#54046L, MS[31]#54047L, MS[32]#54048L, MS[33]#54049L, MS[34]#54050L, MS[35]#54051L, MS[36]#54052L, MS[37]#54053L, MS[38]#54054L, MS[39]#54055L, MS[40]#54056L, MS[41]#54057L, MS[42]#54058L, MS[43]#54059L, MS[44]#54060L, MS[45]#54061L, MS[46]#54062L, MS[47]#54063L, MS[48]#54064L, MS[49]#54065L, MS[50]#54066L, MS[51]#54067L, sum#54229L, sum#54230, sum#54231, count#54232L]
Results [59]: [segment#54001, processing_day#54003, count#54233L, MS[0]#54068L, MS[1]#54069L, MS[2]#54070L, MS[3]#54071L, MS[4]#54072L, MS[5]#54073L, MS[6]#54074L, MS[7]#54075L, MS[8]#54076L, MS[9]#54077L, MS[10]#54078L, MS[11]#54079L, MS[12]#54080L, MS[13]#54081L, MS[14]#54082L, MS[15]#54083L, MS[16]#54084L, MS[17]#54085L, MS[18]#54086L, MS[19]#54087L, MS[20]#54088L, MS[21]#54089L, MS[22]#54090L, MS[23]#54091L, MS[24]#54092L, MS[25]#54093L, MS[26]#54094L, MS[27]#54095L, MS[28]#54096L, MS[29]#54097L, MS[30]#54098L, MS[31]#54099L, MS[32]#54100L, MS[33]#54101L, MS[34]#54102L, MS[35]#54103L, MS[36]#54104L, MS[37]#54105L, MS[38]#54106L, MS[39]#54107L, MS[40]#54108L, MS[41]#54109L, MS[42]#54110L, MS[43]#54111L, MS[44]#54112L, MS[45]#54113L, MS[46]#54114L, MS[47]#54115L, MS[48]#54116L, MS[49]#54117L, MS[50]#54118L, MS[51]#54119L, sum#54234L, sum#54235, sum#54236, count#54237L]
(5) Exchange
Input [59]: [segment#54001, processing_day#54003, count#54233L, MS[0]#54068L, MS[1]#54069L, MS[2]#54070L, MS[3]#54071L, MS[4]#54072L, MS[5]#54073L, MS[6]#54074L, MS[7]#54075L, MS[8]#54076L, MS[9]#54077L, MS[10]#54078L, MS[11]#54079L, MS[12]#54080L, MS[13]#54081L, MS[14]#54082L, MS[15]#54083L, MS[16]#54084L, MS[17]#54085L, MS[18]#54086L, MS[19]#54087L, MS[20]#54088L, MS[21]#54089L, MS[22]#54090L, MS[23]#54091L, MS[24]#54092L, MS[25]#54093L, MS[26]#54094L, MS[27]#54095L, MS[28]#54096L, MS[29]#54097L, MS[30]#54098L, MS[31]#54099L, MS[32]#54100L, MS[33]#54101L, MS[34]#54102L, MS[35]#54103L, MS[36]#54104L, MS[37]#54105L, MS[38]#54106L, MS[39]#54107L, MS[40]#54108L, MS[41]#54109L, MS[42]#54110L, MS[43]#54111L, MS[44]#54112L, MS[45]#54113L, MS[46]#54114L, MS[47]#54115L, MS[48]#54116L, MS[49]#54117L, MS[50]#54118L, MS[51]#54119L, sum#54234L, sum#54235, sum#54236, count#54237L]
Arguments: hashpartitioning(segment#54001, processing_day#54003, 200), ENSURE_REQUIREMENTS, [plan_id=5118]
(6) ShuffleQueryStage
Output [59]: [segment#54001, processing_day#54003, count#54233L, MS[0]#54068L, MS[1]#54069L, MS[2]#54070L, MS[3]#54071L, MS[4]#54072L, MS[5]#54073L, MS[6]#54074L, MS[7]#54075L, MS[8]#54076L, MS[9]#54077L, MS[10]#54078L, MS[11]#54079L, MS[12]#54080L, MS[13]#54081L, MS[14]#54082L, MS[15]#54083L, MS[16]#54084L, MS[17]#54085L, MS[18]#54086L, MS[19]#54087L, MS[20]#54088L, MS[21]#54089L, MS[22]#54090L, MS[23]#54091L, MS[24]#54092L, MS[25]#54093L, MS[26]#54094L, MS[27]#54095L, MS[28]#54096L, MS[29]#54097L, MS[30]#54098L, MS[31]#54099L, MS[32]#54100L, MS[33]#54101L, MS[34]#54102L, MS[35]#54103L, MS[36]#54104L, MS[37]#54105L, MS[38]#54106L, MS[39]#54107L, MS[40]#54108L, MS[41]#54109L, MS[42]#54110L, MS[43]#54111L, MS[44]#54112L, MS[45]#54113L, MS[46]#54114L, MS[47]#54115L, MS[48]#54116L, MS[49]#54117L, MS[50]#54118L, MS[51]#54119L, sum#54234L, sum#54235, sum#54236, count#54237L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#54001, processing_day#54003, count#54233L, MS[0]#54068L, MS[1]#54069L, MS[2]#54070L, MS[3]#54071L, MS[4]#54072L, MS[5]#54073L, MS[6]#54074L, MS[7]#54075L, MS[8]#54076L, MS[9]#54077L, MS[10]#54078L, MS[11]#54079L, MS[12]#54080L, MS[13]#54081L, MS[14]#54082L, MS[15]#54083L, MS[16]#54084L, MS[17]#54085L, MS[18]#54086L, MS[19]#54087L, MS[20]#54088L, MS[21]#54089L, MS[22]#54090L, MS[23]#54091L, MS[24]#54092L, MS[25]#54093L, MS[26]#54094L, MS[27]#54095L, MS[28]#54096L, MS[29]#54097L, MS[30]#54098L, MS[31]#54099L, MS[32]#54100L, MS[33]#54101L, MS[34]#54102L, MS[35]#54103L, MS[36]#54104L, MS[37]#54105L, MS[38]#54106L, MS[39]#54107L, MS[40]#54108L, MS[41]#54109L, MS[42]#54110L, MS[43]#54111L, MS[44]#54112L, MS[45]#54113L, MS[46]#54114L, MS[47]#54115L, MS[48]#54116L, MS[49]#54117L, MS[50]#54118L, MS[51]#54119L, sum#54234L, sum#54235, sum#54236, count#54237L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#54001, processing_day#54003, count#54233L, MS[0]#54068L, MS[1]#54069L, MS[2]#54070L, MS[3]#54071L, MS[4]#54072L, MS[5]#54073L, MS[6]#54074L, MS[7]#54075L, MS[8]#54076L, MS[9]#54077L, MS[10]#54078L, MS[11]#54079L, MS[12]#54080L, MS[13]#54081L, MS[14]#54082L, MS[15]#54083L, MS[16]#54084L, MS[17]#54085L, MS[18]#54086L, MS[19]#54087L, MS[20]#54088L, MS[21]#54089L, MS[22]#54090L, MS[23]#54091L, MS[24]#54092L, MS[25]#54093L, MS[26]#54094L, MS[27]#54095L, MS[28]#54096L, MS[29]#54097L, MS[30]#54098L, MS[31]#54099L, MS[32]#54100L, MS[33]#54101L, MS[34]#54102L, MS[35]#54103L, MS[36]#54104L, MS[37]#54105L, MS[38]#54106L, MS[39]#54107L, MS[40]#54108L, MS[41]#54109L, MS[42]#54110L, MS[43]#54111L, MS[44]#54112L, MS[45]#54113L, MS[46]#54114L, MS[47]#54115L, MS[48]#54116L, MS[49]#54117L, MS[50]#54118L, MS[51]#54119L, sum#54234L, sum#54235, sum#54236, count#54237L]
Keys [2]: [segment#54001, processing_day#54003]
Functions [5]: [count(1), approx_count_distinct(customer_id#53997L, 0.05, 0, 0), sum(events#54007), sum(weighted_amount#54009), avg(amount#54005)]
Aggregate Attributes [5]: [count(1)#54015L, approx_count_distinct(customer_id#53997L, 0.05, 0, 0)#54120L, sum(events#54007)#54121L, sum(weighted_amount#54009)#54122, avg(amount#54005)#54123]
Results [7]: [segment#54001, processing_day#54003, count(1)#54015L AS row_count#54010L, approx_count_distinct(customer_id#53997L, 0.05, 0, 0)#54120L AS unique_customers#54011L, sum(events#54007)#54121L AS event_sum#54012L, sum(weighted_amount#54009)#54122 AS weighted_amount_sum#54013, avg(amount#54005)#54123 AS avg_amount#54014]
(9) Exchange
Input [7]: [segment#54001, processing_day#54003, row_count#54010L, unique_customers#54011L, event_sum#54012L, weighted_amount_sum#54013, avg_amount#54014]
Arguments: rangepartitioning(segment#54001 ASC NULLS FIRST, processing_day#54003 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=5140]
(10) ShuffleQueryStage
Output [7]: [segment#54001, processing_day#54003, row_count#54010L, unique_customers#54011L, event_sum#54012L, weighted_amount_sum#54013, avg_amount#54014]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#54001, processing_day#54003, row_count#54010L, unique_customers#54011L, event_sum#54012L, weighted_amount_sum#54013, avg_amount#54014]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#54001, processing_day#54003, row_count#54010L, unique_customers#54011L, event_sum#54012L, weighted_amount_sum#54013, avg_amount#54014]
Arguments: [segment#54001 ASC NULLS FIRST, processing_day#54003 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#54001, processing_day#54003, row_count#54010L, unique_customers#54011L, event_sum#54012L, weighted_amount_sum#54013, avg_amount#54014]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#53997L, segment#54001, processing_day#54003, amount#54005, events#54007, weighted_amount#54009]
Keys [2]: [segment#54001, processing_day#54003]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#53997L, 0.05, 0, 0), partial_sum(events#54007), partial_sum(weighted_amount#54009), partial_avg(amount#54005)]
Aggregate Attributes [57]: [count#54228L, MS[0]#54016L, MS[1]#54017L, MS[2]#54018L, MS[3]#54019L, MS[4]#54020L, MS[5]#54021L, MS[6]#54022L, MS[7]#54023L, MS[8]#54024L, MS[9]#54025L, MS[10]#54026L, MS[11]#54027L, MS[12]#54028L, MS[13]#54029L, MS[14]#54030L, MS[15]#54031L, MS[16]#54032L, MS[17]#54033L, MS[18]#54034L, MS[19]#54035L, MS[20]#54036L, MS[21]#54037L, MS[22]#54038L, MS[23]#54039L, MS[24]#54040L, MS[25]#54041L, MS[26]#54042L, MS[27]#54043L, MS[28]#54044L, MS[29]#54045L, MS[30]#54046L, MS[31]#54047L, MS[32]#54048L, MS[33]#54049L, MS[34]#54050L, MS[35]#54051L, MS[36]#54052L, MS[37]#54053L, MS[38]#54054L, MS[39]#54055L, MS[40]#54056L, MS[41]#54057L, MS[42]#54058L, MS[43]#54059L, MS[44]#54060L, MS[45]#54061L, MS[46]#54062L, MS[47]#54063L, MS[48]#54064L, MS[49]#54065L, MS[50]#54066L, MS[51]#54067L, sum#54229L, sum#54230, sum#54231, count#54232L]
Results [59]: [segment#54001, processing_day#54003, count#54233L, MS[0]#54068L, MS[1]#54069L, MS[2]#54070L, MS[3]#54071L, MS[4]#54072L, MS[5]#54073L, MS[6]#54074L, MS[7]#54075L, MS[8]#54076L, MS[9]#54077L, MS[10]#54078L, MS[11]#54079L, MS[12]#54080L, MS[13]#54081L, MS[14]#54082L, MS[15]#54083L, MS[16]#54084L, MS[17]#54085L, MS[18]#54086L, MS[19]#54087L, MS[20]#54088L, MS[21]#54089L, MS[22]#54090L, MS[23]#54091L, MS[24]#54092L, MS[25]#54093L, MS[26]#54094L, MS[27]#54095L, MS[28]#54096L, MS[29]#54097L, MS[30]#54098L, MS[31]#54099L, MS[32]#54100L, MS[33]#54101L, MS[34]#54102L, MS[35]#54103L, MS[36]#54104L, MS[37]#54105L, MS[38]#54106L, MS[39]#54107L, MS[40]#54108L, MS[41]#54109L, MS[42]#54110L, MS[43]#54111L, MS[44]#54112L, MS[45]#54113L, MS[46]#54114L, MS[47]#54115L, MS[48]#54116L, MS[49]#54117L, MS[50]#54118L, MS[51]#54119L, sum#54234L, sum#54235, sum#54236, count#54237L]
(15) Exchange
Input [59]: [segment#54001, processing_day#54003, count#54233L, MS[0]#54068L, MS[1]#54069L, MS[2]#54070L, MS[3]#54071L, MS[4]#54072L, MS[5]#54073L, MS[6]#54074L, MS[7]#54075L, MS[8]#54076L, MS[9]#54077L, MS[10]#54078L, MS[11]#54079L, MS[12]#54080L, MS[13]#54081L, MS[14]#54082L, MS[15]#54083L, MS[16]#54084L, MS[17]#54085L, MS[18]#54086L, MS[19]#54087L, MS[20]#54088L, MS[21]#54089L, MS[22]#54090L, MS[23]#54091L, MS[24]#54092L, MS[25]#54093L, MS[26]#54094L, MS[27]#54095L, MS[28]#54096L, MS[29]#54097L, MS[30]#54098L, MS[31]#54099L, MS[32]#54100L, MS[33]#54101L, MS[34]#54102L, MS[35]#54103L, MS[36]#54104L, MS[37]#54105L, MS[38]#54106L, MS[39]#54107L, MS[40]#54108L, MS[41]#54109L, MS[42]#54110L, MS[43]#54111L, MS[44]#54112L, MS[45]#54113L, MS[46]#54114L, MS[47]#54115L, MS[48]#54116L, MS[49]#54117L, MS[50]#54118L, MS[51]#54119L, sum#54234L, sum#54235, sum#54236, count#54237L]
Arguments: hashpartitioning(segment#54001, processing_day#54003, 200), ENSURE_REQUIREMENTS, [plan_id=5098]
(16) HashAggregate
Input [59]: [segment#54001, processing_day#54003, count#54233L, MS[0]#54068L, MS[1]#54069L, MS[2]#54070L, MS[3]#54071L, MS[4]#54072L, MS[5]#54073L, MS[6]#54074L, MS[7]#54075L, MS[8]#54076L, MS[9]#54077L, MS[10]#54078L, MS[11]#54079L, MS[12]#54080L, MS[13]#54081L, MS[14]#54082L, MS[15]#54083L, MS[16]#54084L, MS[17]#54085L, MS[18]#54086L, MS[19]#54087L, MS[20]#54088L, MS[21]#54089L, MS[22]#54090L, MS[23]#54091L, MS[24]#54092L, MS[25]#54093L, MS[26]#54094L, MS[27]#54095L, MS[28]#54096L, MS[29]#54097L, MS[30]#54098L, MS[31]#54099L, MS[32]#54100L, MS[33]#54101L, MS[34]#54102L, MS[35]#54103L, MS[36]#54104L, MS[37]#54105L, MS[38]#54106L, MS[39]#54107L, MS[40]#54108L, MS[41]#54109L, MS[42]#54110L, MS[43]#54111L, MS[44]#54112L, MS[45]#54113L, MS[46]#54114L, MS[47]#54115L, MS[48]#54116L, MS[49]#54117L, MS[50]#54118L, MS[51]#54119L, sum#54234L, sum#54235, sum#54236, count#54237L]
Keys [2]: [segment#54001, processing_day#54003]
Functions [5]: [count(1), approx_count_distinct(customer_id#53997L, 0.05, 0, 0), sum(events#54007), sum(weighted_amount#54009), avg(amount#54005)]
Aggregate Attributes [5]: [count(1)#54015L, approx_count_distinct(customer_id#53997L, 0.05, 0, 0)#54120L, sum(events#54007)#54121L, sum(weighted_amount#54009)#54122, avg(amount#54005)#54123]
Results [7]: [segment#54001, processing_day#54003, count(1)#54015L AS row_count#54010L, approx_count_distinct(customer_id#53997L, 0.05, 0, 0)#54120L AS unique_customers#54011L, sum(events#54007)#54121L AS event_sum#54012L, sum(weighted_amount#54009)#54122 AS weighted_amount_sum#54013, avg(amount#54005)#54123 AS avg_amount#54014]
(17) Exchange
Input [7]: [segment#54001, processing_day#54003, row_count#54010L, unique_customers#54011L, event_sum#54012L, weighted_amount_sum#54013, avg_amount#54014]
Arguments: rangepartitioning(segment#54001 ASC NULLS FIRST, processing_day#54003 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=5101]
(18) Sort
Input [7]: [segment#54001, processing_day#54003, row_count#54010L, unique_customers#54011L, event_sum#54012L, weighted_amount_sum#54013, avg_amount#54014]
Arguments: [segment#54001 ASC NULLS FIRST, processing_day#54003 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#54001, processing_day#54003, row_count#54010L, unique_customers#54011L, event_sum#54012L, weighted_amount_sum#54013, avg_amount#54014]
Arguments: isFinalPlan=true