== 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#46923L]
Arguments: Range (5000000, 6000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#46923L % 250000) AS customer_id#46925L, concat(segment-, cast(cast((id#46923L % 12) as int) as string)) AS segment#46929, cast((id#46923L % 14) as int) AS processing_day#46931, ((cast(((id#46923L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#46933, cast((((id#46923L * 29) % 7) + 1) as int) AS events#46935]
Input [1]: [id#46923L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#46925L, segment#46929, processing_day#46931, amount#46933, events#46935, (amount#46933 * cast(events#46935 as double)) AS weighted_amount#46937]
Input [5]: [customer_id#46925L, segment#46929, processing_day#46931, amount#46933, events#46935]
(4) HashAggregate
Input [6]: [customer_id#46925L, segment#46929, processing_day#46931, amount#46933, events#46935, weighted_amount#46937]
Keys [2]: [segment#46929, processing_day#46931]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#46925L, 0.05, 0, 0), partial_sum(events#46935), partial_sum(weighted_amount#46937), partial_avg(amount#46933)]
Aggregate Attributes [57]: [count#47156L, MS[0]#46944L, MS[1]#46945L, MS[2]#46946L, MS[3]#46947L, MS[4]#46948L, MS[5]#46949L, MS[6]#46950L, MS[7]#46951L, MS[8]#46952L, MS[9]#46953L, MS[10]#46954L, MS[11]#46955L, MS[12]#46956L, MS[13]#46957L, MS[14]#46958L, MS[15]#46959L, MS[16]#46960L, MS[17]#46961L, MS[18]#46962L, MS[19]#46963L, MS[20]#46964L, MS[21]#46965L, MS[22]#46966L, MS[23]#46967L, MS[24]#46968L, MS[25]#46969L, MS[26]#46970L, MS[27]#46971L, MS[28]#46972L, MS[29]#46973L, MS[30]#46974L, MS[31]#46975L, MS[32]#46976L, MS[33]#46977L, MS[34]#46978L, MS[35]#46979L, MS[36]#46980L, MS[37]#46981L, MS[38]#46982L, MS[39]#46983L, MS[40]#46984L, MS[41]#46985L, MS[42]#46986L, MS[43]#46987L, MS[44]#46988L, MS[45]#46989L, MS[46]#46990L, MS[47]#46991L, MS[48]#46992L, MS[49]#46993L, MS[50]#46994L, MS[51]#46995L, sum#47157L, sum#47158, sum#47159, count#47160L]
Results [59]: [segment#46929, processing_day#46931, count#47161L, MS[0]#46996L, MS[1]#46997L, MS[2]#46998L, MS[3]#46999L, MS[4]#47000L, MS[5]#47001L, MS[6]#47002L, MS[7]#47003L, MS[8]#47004L, MS[9]#47005L, MS[10]#47006L, MS[11]#47007L, MS[12]#47008L, MS[13]#47009L, MS[14]#47010L, MS[15]#47011L, MS[16]#47012L, MS[17]#47013L, MS[18]#47014L, MS[19]#47015L, MS[20]#47016L, MS[21]#47017L, MS[22]#47018L, MS[23]#47019L, MS[24]#47020L, MS[25]#47021L, MS[26]#47022L, MS[27]#47023L, MS[28]#47024L, MS[29]#47025L, MS[30]#47026L, MS[31]#47027L, MS[32]#47028L, MS[33]#47029L, MS[34]#47030L, MS[35]#47031L, MS[36]#47032L, MS[37]#47033L, MS[38]#47034L, MS[39]#47035L, MS[40]#47036L, MS[41]#47037L, MS[42]#47038L, MS[43]#47039L, MS[44]#47040L, MS[45]#47041L, MS[46]#47042L, MS[47]#47043L, MS[48]#47044L, MS[49]#47045L, MS[50]#47046L, MS[51]#47047L, sum#47162L, sum#47163, sum#47164, count#47165L]
(5) Exchange
Input [59]: [segment#46929, processing_day#46931, count#47161L, MS[0]#46996L, MS[1]#46997L, MS[2]#46998L, MS[3]#46999L, MS[4]#47000L, MS[5]#47001L, MS[6]#47002L, MS[7]#47003L, MS[8]#47004L, MS[9]#47005L, MS[10]#47006L, MS[11]#47007L, MS[12]#47008L, MS[13]#47009L, MS[14]#47010L, MS[15]#47011L, MS[16]#47012L, MS[17]#47013L, MS[18]#47014L, MS[19]#47015L, MS[20]#47016L, MS[21]#47017L, MS[22]#47018L, MS[23]#47019L, MS[24]#47020L, MS[25]#47021L, MS[26]#47022L, MS[27]#47023L, MS[28]#47024L, MS[29]#47025L, MS[30]#47026L, MS[31]#47027L, MS[32]#47028L, MS[33]#47029L, MS[34]#47030L, MS[35]#47031L, MS[36]#47032L, MS[37]#47033L, MS[38]#47034L, MS[39]#47035L, MS[40]#47036L, MS[41]#47037L, MS[42]#47038L, MS[43]#47039L, MS[44]#47040L, MS[45]#47041L, MS[46]#47042L, MS[47]#47043L, MS[48]#47044L, MS[49]#47045L, MS[50]#47046L, MS[51]#47047L, sum#47162L, sum#47163, sum#47164, count#47165L]
Arguments: hashpartitioning(segment#46929, processing_day#46931, 200), ENSURE_REQUIREMENTS, [plan_id=4454]
(6) ShuffleQueryStage
Output [59]: [segment#46929, processing_day#46931, count#47161L, MS[0]#46996L, MS[1]#46997L, MS[2]#46998L, MS[3]#46999L, MS[4]#47000L, MS[5]#47001L, MS[6]#47002L, MS[7]#47003L, MS[8]#47004L, MS[9]#47005L, MS[10]#47006L, MS[11]#47007L, MS[12]#47008L, MS[13]#47009L, MS[14]#47010L, MS[15]#47011L, MS[16]#47012L, MS[17]#47013L, MS[18]#47014L, MS[19]#47015L, MS[20]#47016L, MS[21]#47017L, MS[22]#47018L, MS[23]#47019L, MS[24]#47020L, MS[25]#47021L, MS[26]#47022L, MS[27]#47023L, MS[28]#47024L, MS[29]#47025L, MS[30]#47026L, MS[31]#47027L, MS[32]#47028L, MS[33]#47029L, MS[34]#47030L, MS[35]#47031L, MS[36]#47032L, MS[37]#47033L, MS[38]#47034L, MS[39]#47035L, MS[40]#47036L, MS[41]#47037L, MS[42]#47038L, MS[43]#47039L, MS[44]#47040L, MS[45]#47041L, MS[46]#47042L, MS[47]#47043L, MS[48]#47044L, MS[49]#47045L, MS[50]#47046L, MS[51]#47047L, sum#47162L, sum#47163, sum#47164, count#47165L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#46929, processing_day#46931, count#47161L, MS[0]#46996L, MS[1]#46997L, MS[2]#46998L, MS[3]#46999L, MS[4]#47000L, MS[5]#47001L, MS[6]#47002L, MS[7]#47003L, MS[8]#47004L, MS[9]#47005L, MS[10]#47006L, MS[11]#47007L, MS[12]#47008L, MS[13]#47009L, MS[14]#47010L, MS[15]#47011L, MS[16]#47012L, MS[17]#47013L, MS[18]#47014L, MS[19]#47015L, MS[20]#47016L, MS[21]#47017L, MS[22]#47018L, MS[23]#47019L, MS[24]#47020L, MS[25]#47021L, MS[26]#47022L, MS[27]#47023L, MS[28]#47024L, MS[29]#47025L, MS[30]#47026L, MS[31]#47027L, MS[32]#47028L, MS[33]#47029L, MS[34]#47030L, MS[35]#47031L, MS[36]#47032L, MS[37]#47033L, MS[38]#47034L, MS[39]#47035L, MS[40]#47036L, MS[41]#47037L, MS[42]#47038L, MS[43]#47039L, MS[44]#47040L, MS[45]#47041L, MS[46]#47042L, MS[47]#47043L, MS[48]#47044L, MS[49]#47045L, MS[50]#47046L, MS[51]#47047L, sum#47162L, sum#47163, sum#47164, count#47165L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#46929, processing_day#46931, count#47161L, MS[0]#46996L, MS[1]#46997L, MS[2]#46998L, MS[3]#46999L, MS[4]#47000L, MS[5]#47001L, MS[6]#47002L, MS[7]#47003L, MS[8]#47004L, MS[9]#47005L, MS[10]#47006L, MS[11]#47007L, MS[12]#47008L, MS[13]#47009L, MS[14]#47010L, MS[15]#47011L, MS[16]#47012L, MS[17]#47013L, MS[18]#47014L, MS[19]#47015L, MS[20]#47016L, MS[21]#47017L, MS[22]#47018L, MS[23]#47019L, MS[24]#47020L, MS[25]#47021L, MS[26]#47022L, MS[27]#47023L, MS[28]#47024L, MS[29]#47025L, MS[30]#47026L, MS[31]#47027L, MS[32]#47028L, MS[33]#47029L, MS[34]#47030L, MS[35]#47031L, MS[36]#47032L, MS[37]#47033L, MS[38]#47034L, MS[39]#47035L, MS[40]#47036L, MS[41]#47037L, MS[42]#47038L, MS[43]#47039L, MS[44]#47040L, MS[45]#47041L, MS[46]#47042L, MS[47]#47043L, MS[48]#47044L, MS[49]#47045L, MS[50]#47046L, MS[51]#47047L, sum#47162L, sum#47163, sum#47164, count#47165L]
Keys [2]: [segment#46929, processing_day#46931]
Functions [5]: [count(1), approx_count_distinct(customer_id#46925L, 0.05, 0, 0), sum(events#46935), sum(weighted_amount#46937), avg(amount#46933)]
Aggregate Attributes [5]: [count(1)#46943L, approx_count_distinct(customer_id#46925L, 0.05, 0, 0)#47048L, sum(events#46935)#47049L, sum(weighted_amount#46937)#47050, avg(amount#46933)#47051]
Results [7]: [segment#46929, processing_day#46931, count(1)#46943L AS row_count#46938L, approx_count_distinct(customer_id#46925L, 0.05, 0, 0)#47048L AS unique_customers#46939L, sum(events#46935)#47049L AS event_sum#46940L, sum(weighted_amount#46937)#47050 AS weighted_amount_sum#46941, avg(amount#46933)#47051 AS avg_amount#46942]
(9) Exchange
Input [7]: [segment#46929, processing_day#46931, row_count#46938L, unique_customers#46939L, event_sum#46940L, weighted_amount_sum#46941, avg_amount#46942]
Arguments: rangepartitioning(segment#46929 ASC NULLS FIRST, processing_day#46931 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=4476]
(10) ShuffleQueryStage
Output [7]: [segment#46929, processing_day#46931, row_count#46938L, unique_customers#46939L, event_sum#46940L, weighted_amount_sum#46941, avg_amount#46942]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#46929, processing_day#46931, row_count#46938L, unique_customers#46939L, event_sum#46940L, weighted_amount_sum#46941, avg_amount#46942]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#46929, processing_day#46931, row_count#46938L, unique_customers#46939L, event_sum#46940L, weighted_amount_sum#46941, avg_amount#46942]
Arguments: [segment#46929 ASC NULLS FIRST, processing_day#46931 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#46929, processing_day#46931, row_count#46938L, unique_customers#46939L, event_sum#46940L, weighted_amount_sum#46941, avg_amount#46942]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#46925L, segment#46929, processing_day#46931, amount#46933, events#46935, weighted_amount#46937]
Keys [2]: [segment#46929, processing_day#46931]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#46925L, 0.05, 0, 0), partial_sum(events#46935), partial_sum(weighted_amount#46937), partial_avg(amount#46933)]
Aggregate Attributes [57]: [count#47156L, MS[0]#46944L, MS[1]#46945L, MS[2]#46946L, MS[3]#46947L, MS[4]#46948L, MS[5]#46949L, MS[6]#46950L, MS[7]#46951L, MS[8]#46952L, MS[9]#46953L, MS[10]#46954L, MS[11]#46955L, MS[12]#46956L, MS[13]#46957L, MS[14]#46958L, MS[15]#46959L, MS[16]#46960L, MS[17]#46961L, MS[18]#46962L, MS[19]#46963L, MS[20]#46964L, MS[21]#46965L, MS[22]#46966L, MS[23]#46967L, MS[24]#46968L, MS[25]#46969L, MS[26]#46970L, MS[27]#46971L, MS[28]#46972L, MS[29]#46973L, MS[30]#46974L, MS[31]#46975L, MS[32]#46976L, MS[33]#46977L, MS[34]#46978L, MS[35]#46979L, MS[36]#46980L, MS[37]#46981L, MS[38]#46982L, MS[39]#46983L, MS[40]#46984L, MS[41]#46985L, MS[42]#46986L, MS[43]#46987L, MS[44]#46988L, MS[45]#46989L, MS[46]#46990L, MS[47]#46991L, MS[48]#46992L, MS[49]#46993L, MS[50]#46994L, MS[51]#46995L, sum#47157L, sum#47158, sum#47159, count#47160L]
Results [59]: [segment#46929, processing_day#46931, count#47161L, MS[0]#46996L, MS[1]#46997L, MS[2]#46998L, MS[3]#46999L, MS[4]#47000L, MS[5]#47001L, MS[6]#47002L, MS[7]#47003L, MS[8]#47004L, MS[9]#47005L, MS[10]#47006L, MS[11]#47007L, MS[12]#47008L, MS[13]#47009L, MS[14]#47010L, MS[15]#47011L, MS[16]#47012L, MS[17]#47013L, MS[18]#47014L, MS[19]#47015L, MS[20]#47016L, MS[21]#47017L, MS[22]#47018L, MS[23]#47019L, MS[24]#47020L, MS[25]#47021L, MS[26]#47022L, MS[27]#47023L, MS[28]#47024L, MS[29]#47025L, MS[30]#47026L, MS[31]#47027L, MS[32]#47028L, MS[33]#47029L, MS[34]#47030L, MS[35]#47031L, MS[36]#47032L, MS[37]#47033L, MS[38]#47034L, MS[39]#47035L, MS[40]#47036L, MS[41]#47037L, MS[42]#47038L, MS[43]#47039L, MS[44]#47040L, MS[45]#47041L, MS[46]#47042L, MS[47]#47043L, MS[48]#47044L, MS[49]#47045L, MS[50]#47046L, MS[51]#47047L, sum#47162L, sum#47163, sum#47164, count#47165L]
(15) Exchange
Input [59]: [segment#46929, processing_day#46931, count#47161L, MS[0]#46996L, MS[1]#46997L, MS[2]#46998L, MS[3]#46999L, MS[4]#47000L, MS[5]#47001L, MS[6]#47002L, MS[7]#47003L, MS[8]#47004L, MS[9]#47005L, MS[10]#47006L, MS[11]#47007L, MS[12]#47008L, MS[13]#47009L, MS[14]#47010L, MS[15]#47011L, MS[16]#47012L, MS[17]#47013L, MS[18]#47014L, MS[19]#47015L, MS[20]#47016L, MS[21]#47017L, MS[22]#47018L, MS[23]#47019L, MS[24]#47020L, MS[25]#47021L, MS[26]#47022L, MS[27]#47023L, MS[28]#47024L, MS[29]#47025L, MS[30]#47026L, MS[31]#47027L, MS[32]#47028L, MS[33]#47029L, MS[34]#47030L, MS[35]#47031L, MS[36]#47032L, MS[37]#47033L, MS[38]#47034L, MS[39]#47035L, MS[40]#47036L, MS[41]#47037L, MS[42]#47038L, MS[43]#47039L, MS[44]#47040L, MS[45]#47041L, MS[46]#47042L, MS[47]#47043L, MS[48]#47044L, MS[49]#47045L, MS[50]#47046L, MS[51]#47047L, sum#47162L, sum#47163, sum#47164, count#47165L]
Arguments: hashpartitioning(segment#46929, processing_day#46931, 200), ENSURE_REQUIREMENTS, [plan_id=4434]
(16) HashAggregate
Input [59]: [segment#46929, processing_day#46931, count#47161L, MS[0]#46996L, MS[1]#46997L, MS[2]#46998L, MS[3]#46999L, MS[4]#47000L, MS[5]#47001L, MS[6]#47002L, MS[7]#47003L, MS[8]#47004L, MS[9]#47005L, MS[10]#47006L, MS[11]#47007L, MS[12]#47008L, MS[13]#47009L, MS[14]#47010L, MS[15]#47011L, MS[16]#47012L, MS[17]#47013L, MS[18]#47014L, MS[19]#47015L, MS[20]#47016L, MS[21]#47017L, MS[22]#47018L, MS[23]#47019L, MS[24]#47020L, MS[25]#47021L, MS[26]#47022L, MS[27]#47023L, MS[28]#47024L, MS[29]#47025L, MS[30]#47026L, MS[31]#47027L, MS[32]#47028L, MS[33]#47029L, MS[34]#47030L, MS[35]#47031L, MS[36]#47032L, MS[37]#47033L, MS[38]#47034L, MS[39]#47035L, MS[40]#47036L, MS[41]#47037L, MS[42]#47038L, MS[43]#47039L, MS[44]#47040L, MS[45]#47041L, MS[46]#47042L, MS[47]#47043L, MS[48]#47044L, MS[49]#47045L, MS[50]#47046L, MS[51]#47047L, sum#47162L, sum#47163, sum#47164, count#47165L]
Keys [2]: [segment#46929, processing_day#46931]
Functions [5]: [count(1), approx_count_distinct(customer_id#46925L, 0.05, 0, 0), sum(events#46935), sum(weighted_amount#46937), avg(amount#46933)]
Aggregate Attributes [5]: [count(1)#46943L, approx_count_distinct(customer_id#46925L, 0.05, 0, 0)#47048L, sum(events#46935)#47049L, sum(weighted_amount#46937)#47050, avg(amount#46933)#47051]
Results [7]: [segment#46929, processing_day#46931, count(1)#46943L AS row_count#46938L, approx_count_distinct(customer_id#46925L, 0.05, 0, 0)#47048L AS unique_customers#46939L, sum(events#46935)#47049L AS event_sum#46940L, sum(weighted_amount#46937)#47050 AS weighted_amount_sum#46941, avg(amount#46933)#47051 AS avg_amount#46942]
(17) Exchange
Input [7]: [segment#46929, processing_day#46931, row_count#46938L, unique_customers#46939L, event_sum#46940L, weighted_amount_sum#46941, avg_amount#46942]
Arguments: rangepartitioning(segment#46929 ASC NULLS FIRST, processing_day#46931 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=4437]
(18) Sort
Input [7]: [segment#46929, processing_day#46931, row_count#46938L, unique_customers#46939L, event_sum#46940L, weighted_amount_sum#46941, avg_amount#46942]
Arguments: [segment#46929 ASC NULLS FIRST, processing_day#46931 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#46929, processing_day#46931, row_count#46938L, unique_customers#46939L, event_sum#46940L, weighted_amount_sum#46941, avg_amount#46942]
Arguments: isFinalPlan=true