== 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#31861L]
Arguments: Range (12000000, 13000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#31861L % 250000) AS customer_id#31863L, concat(segment-, cast(cast((id#31861L % 12) as int) as string)) AS segment#31867, cast((id#31861L % 14) as int) AS processing_day#31869, ((cast(((id#31861L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#31871, cast((((id#31861L * 29) % 7) + 1) as int) AS events#31873]
Input [1]: [id#31861L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#31863L, segment#31867, processing_day#31869, amount#31871, events#31873, (amount#31871 * cast(events#31873 as double)) AS weighted_amount#31875]
Input [5]: [customer_id#31863L, segment#31867, processing_day#31869, amount#31871, events#31873]
(4) HashAggregate
Input [6]: [customer_id#31863L, segment#31867, processing_day#31869, amount#31871, events#31873, weighted_amount#31875]
Keys [2]: [segment#31867, processing_day#31869]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#31863L, 0.05, 0, 0), partial_sum(events#31873), partial_sum(weighted_amount#31875), partial_avg(amount#31871)]
Aggregate Attributes [57]: [count#32094L, MS[0]#31882L, MS[1]#31883L, MS[2]#31884L, MS[3]#31885L, MS[4]#31886L, MS[5]#31887L, MS[6]#31888L, MS[7]#31889L, MS[8]#31890L, MS[9]#31891L, MS[10]#31892L, MS[11]#31893L, MS[12]#31894L, MS[13]#31895L, MS[14]#31896L, MS[15]#31897L, MS[16]#31898L, MS[17]#31899L, MS[18]#31900L, MS[19]#31901L, MS[20]#31902L, MS[21]#31903L, MS[22]#31904L, MS[23]#31905L, MS[24]#31906L, MS[25]#31907L, MS[26]#31908L, MS[27]#31909L, MS[28]#31910L, MS[29]#31911L, MS[30]#31912L, MS[31]#31913L, MS[32]#31914L, MS[33]#31915L, MS[34]#31916L, MS[35]#31917L, MS[36]#31918L, MS[37]#31919L, MS[38]#31920L, MS[39]#31921L, MS[40]#31922L, MS[41]#31923L, MS[42]#31924L, MS[43]#31925L, MS[44]#31926L, MS[45]#31927L, MS[46]#31928L, MS[47]#31929L, MS[48]#31930L, MS[49]#31931L, MS[50]#31932L, MS[51]#31933L, sum#32095L, sum#32096, sum#32097, count#32098L]
Results [59]: [segment#31867, processing_day#31869, count#32099L, MS[0]#31934L, MS[1]#31935L, MS[2]#31936L, MS[3]#31937L, MS[4]#31938L, MS[5]#31939L, MS[6]#31940L, MS[7]#31941L, MS[8]#31942L, MS[9]#31943L, MS[10]#31944L, MS[11]#31945L, MS[12]#31946L, MS[13]#31947L, MS[14]#31948L, MS[15]#31949L, MS[16]#31950L, MS[17]#31951L, MS[18]#31952L, MS[19]#31953L, MS[20]#31954L, MS[21]#31955L, MS[22]#31956L, MS[23]#31957L, MS[24]#31958L, MS[25]#31959L, MS[26]#31960L, MS[27]#31961L, MS[28]#31962L, MS[29]#31963L, MS[30]#31964L, MS[31]#31965L, MS[32]#31966L, MS[33]#31967L, MS[34]#31968L, MS[35]#31969L, MS[36]#31970L, MS[37]#31971L, MS[38]#31972L, MS[39]#31973L, MS[40]#31974L, MS[41]#31975L, MS[42]#31976L, MS[43]#31977L, MS[44]#31978L, MS[45]#31979L, MS[46]#31980L, MS[47]#31981L, MS[48]#31982L, MS[49]#31983L, MS[50]#31984L, MS[51]#31985L, sum#32100L, sum#32101, sum#32102, count#32103L]
(5) Exchange
Input [59]: [segment#31867, processing_day#31869, count#32099L, MS[0]#31934L, MS[1]#31935L, MS[2]#31936L, MS[3]#31937L, MS[4]#31938L, MS[5]#31939L, MS[6]#31940L, MS[7]#31941L, MS[8]#31942L, MS[9]#31943L, MS[10]#31944L, MS[11]#31945L, MS[12]#31946L, MS[13]#31947L, MS[14]#31948L, MS[15]#31949L, MS[16]#31950L, MS[17]#31951L, MS[18]#31952L, MS[19]#31953L, MS[20]#31954L, MS[21]#31955L, MS[22]#31956L, MS[23]#31957L, MS[24]#31958L, MS[25]#31959L, MS[26]#31960L, MS[27]#31961L, MS[28]#31962L, MS[29]#31963L, MS[30]#31964L, MS[31]#31965L, MS[32]#31966L, MS[33]#31967L, MS[34]#31968L, MS[35]#31969L, MS[36]#31970L, MS[37]#31971L, MS[38]#31972L, MS[39]#31973L, MS[40]#31974L, MS[41]#31975L, MS[42]#31976L, MS[43]#31977L, MS[44]#31978L, MS[45]#31979L, MS[46]#31980L, MS[47]#31981L, MS[48]#31982L, MS[49]#31983L, MS[50]#31984L, MS[51]#31985L, sum#32100L, sum#32101, sum#32102, count#32103L]
Arguments: hashpartitioning(segment#31867, processing_day#31869, 200), ENSURE_REQUIREMENTS, [plan_id=3037]
(6) ShuffleQueryStage
Output [59]: [segment#31867, processing_day#31869, count#32099L, MS[0]#31934L, MS[1]#31935L, MS[2]#31936L, MS[3]#31937L, MS[4]#31938L, MS[5]#31939L, MS[6]#31940L, MS[7]#31941L, MS[8]#31942L, MS[9]#31943L, MS[10]#31944L, MS[11]#31945L, MS[12]#31946L, MS[13]#31947L, MS[14]#31948L, MS[15]#31949L, MS[16]#31950L, MS[17]#31951L, MS[18]#31952L, MS[19]#31953L, MS[20]#31954L, MS[21]#31955L, MS[22]#31956L, MS[23]#31957L, MS[24]#31958L, MS[25]#31959L, MS[26]#31960L, MS[27]#31961L, MS[28]#31962L, MS[29]#31963L, MS[30]#31964L, MS[31]#31965L, MS[32]#31966L, MS[33]#31967L, MS[34]#31968L, MS[35]#31969L, MS[36]#31970L, MS[37]#31971L, MS[38]#31972L, MS[39]#31973L, MS[40]#31974L, MS[41]#31975L, MS[42]#31976L, MS[43]#31977L, MS[44]#31978L, MS[45]#31979L, MS[46]#31980L, MS[47]#31981L, MS[48]#31982L, MS[49]#31983L, MS[50]#31984L, MS[51]#31985L, sum#32100L, sum#32101, sum#32102, count#32103L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#31867, processing_day#31869, count#32099L, MS[0]#31934L, MS[1]#31935L, MS[2]#31936L, MS[3]#31937L, MS[4]#31938L, MS[5]#31939L, MS[6]#31940L, MS[7]#31941L, MS[8]#31942L, MS[9]#31943L, MS[10]#31944L, MS[11]#31945L, MS[12]#31946L, MS[13]#31947L, MS[14]#31948L, MS[15]#31949L, MS[16]#31950L, MS[17]#31951L, MS[18]#31952L, MS[19]#31953L, MS[20]#31954L, MS[21]#31955L, MS[22]#31956L, MS[23]#31957L, MS[24]#31958L, MS[25]#31959L, MS[26]#31960L, MS[27]#31961L, MS[28]#31962L, MS[29]#31963L, MS[30]#31964L, MS[31]#31965L, MS[32]#31966L, MS[33]#31967L, MS[34]#31968L, MS[35]#31969L, MS[36]#31970L, MS[37]#31971L, MS[38]#31972L, MS[39]#31973L, MS[40]#31974L, MS[41]#31975L, MS[42]#31976L, MS[43]#31977L, MS[44]#31978L, MS[45]#31979L, MS[46]#31980L, MS[47]#31981L, MS[48]#31982L, MS[49]#31983L, MS[50]#31984L, MS[51]#31985L, sum#32100L, sum#32101, sum#32102, count#32103L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#31867, processing_day#31869, count#32099L, MS[0]#31934L, MS[1]#31935L, MS[2]#31936L, MS[3]#31937L, MS[4]#31938L, MS[5]#31939L, MS[6]#31940L, MS[7]#31941L, MS[8]#31942L, MS[9]#31943L, MS[10]#31944L, MS[11]#31945L, MS[12]#31946L, MS[13]#31947L, MS[14]#31948L, MS[15]#31949L, MS[16]#31950L, MS[17]#31951L, MS[18]#31952L, MS[19]#31953L, MS[20]#31954L, MS[21]#31955L, MS[22]#31956L, MS[23]#31957L, MS[24]#31958L, MS[25]#31959L, MS[26]#31960L, MS[27]#31961L, MS[28]#31962L, MS[29]#31963L, MS[30]#31964L, MS[31]#31965L, MS[32]#31966L, MS[33]#31967L, MS[34]#31968L, MS[35]#31969L, MS[36]#31970L, MS[37]#31971L, MS[38]#31972L, MS[39]#31973L, MS[40]#31974L, MS[41]#31975L, MS[42]#31976L, MS[43]#31977L, MS[44]#31978L, MS[45]#31979L, MS[46]#31980L, MS[47]#31981L, MS[48]#31982L, MS[49]#31983L, MS[50]#31984L, MS[51]#31985L, sum#32100L, sum#32101, sum#32102, count#32103L]
Keys [2]: [segment#31867, processing_day#31869]
Functions [5]: [count(1), approx_count_distinct(customer_id#31863L, 0.05, 0, 0), sum(events#31873), sum(weighted_amount#31875), avg(amount#31871)]
Aggregate Attributes [5]: [count(1)#31881L, approx_count_distinct(customer_id#31863L, 0.05, 0, 0)#31986L, sum(events#31873)#31987L, sum(weighted_amount#31875)#31988, avg(amount#31871)#31989]
Results [7]: [segment#31867, processing_day#31869, count(1)#31881L AS row_count#31876L, approx_count_distinct(customer_id#31863L, 0.05, 0, 0)#31986L AS unique_customers#31877L, sum(events#31873)#31987L AS event_sum#31878L, sum(weighted_amount#31875)#31988 AS weighted_amount_sum#31879, avg(amount#31871)#31989 AS avg_amount#31880]
(9) Exchange
Input [7]: [segment#31867, processing_day#31869, row_count#31876L, unique_customers#31877L, event_sum#31878L, weighted_amount_sum#31879, avg_amount#31880]
Arguments: rangepartitioning(segment#31867 ASC NULLS FIRST, processing_day#31869 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=3059]
(10) ShuffleQueryStage
Output [7]: [segment#31867, processing_day#31869, row_count#31876L, unique_customers#31877L, event_sum#31878L, weighted_amount_sum#31879, avg_amount#31880]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#31867, processing_day#31869, row_count#31876L, unique_customers#31877L, event_sum#31878L, weighted_amount_sum#31879, avg_amount#31880]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#31867, processing_day#31869, row_count#31876L, unique_customers#31877L, event_sum#31878L, weighted_amount_sum#31879, avg_amount#31880]
Arguments: [segment#31867 ASC NULLS FIRST, processing_day#31869 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#31867, processing_day#31869, row_count#31876L, unique_customers#31877L, event_sum#31878L, weighted_amount_sum#31879, avg_amount#31880]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#31863L, segment#31867, processing_day#31869, amount#31871, events#31873, weighted_amount#31875]
Keys [2]: [segment#31867, processing_day#31869]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#31863L, 0.05, 0, 0), partial_sum(events#31873), partial_sum(weighted_amount#31875), partial_avg(amount#31871)]
Aggregate Attributes [57]: [count#32094L, MS[0]#31882L, MS[1]#31883L, MS[2]#31884L, MS[3]#31885L, MS[4]#31886L, MS[5]#31887L, MS[6]#31888L, MS[7]#31889L, MS[8]#31890L, MS[9]#31891L, MS[10]#31892L, MS[11]#31893L, MS[12]#31894L, MS[13]#31895L, MS[14]#31896L, MS[15]#31897L, MS[16]#31898L, MS[17]#31899L, MS[18]#31900L, MS[19]#31901L, MS[20]#31902L, MS[21]#31903L, MS[22]#31904L, MS[23]#31905L, MS[24]#31906L, MS[25]#31907L, MS[26]#31908L, MS[27]#31909L, MS[28]#31910L, MS[29]#31911L, MS[30]#31912L, MS[31]#31913L, MS[32]#31914L, MS[33]#31915L, MS[34]#31916L, MS[35]#31917L, MS[36]#31918L, MS[37]#31919L, MS[38]#31920L, MS[39]#31921L, MS[40]#31922L, MS[41]#31923L, MS[42]#31924L, MS[43]#31925L, MS[44]#31926L, MS[45]#31927L, MS[46]#31928L, MS[47]#31929L, MS[48]#31930L, MS[49]#31931L, MS[50]#31932L, MS[51]#31933L, sum#32095L, sum#32096, sum#32097, count#32098L]
Results [59]: [segment#31867, processing_day#31869, count#32099L, MS[0]#31934L, MS[1]#31935L, MS[2]#31936L, MS[3]#31937L, MS[4]#31938L, MS[5]#31939L, MS[6]#31940L, MS[7]#31941L, MS[8]#31942L, MS[9]#31943L, MS[10]#31944L, MS[11]#31945L, MS[12]#31946L, MS[13]#31947L, MS[14]#31948L, MS[15]#31949L, MS[16]#31950L, MS[17]#31951L, MS[18]#31952L, MS[19]#31953L, MS[20]#31954L, MS[21]#31955L, MS[22]#31956L, MS[23]#31957L, MS[24]#31958L, MS[25]#31959L, MS[26]#31960L, MS[27]#31961L, MS[28]#31962L, MS[29]#31963L, MS[30]#31964L, MS[31]#31965L, MS[32]#31966L, MS[33]#31967L, MS[34]#31968L, MS[35]#31969L, MS[36]#31970L, MS[37]#31971L, MS[38]#31972L, MS[39]#31973L, MS[40]#31974L, MS[41]#31975L, MS[42]#31976L, MS[43]#31977L, MS[44]#31978L, MS[45]#31979L, MS[46]#31980L, MS[47]#31981L, MS[48]#31982L, MS[49]#31983L, MS[50]#31984L, MS[51]#31985L, sum#32100L, sum#32101, sum#32102, count#32103L]
(15) Exchange
Input [59]: [segment#31867, processing_day#31869, count#32099L, MS[0]#31934L, MS[1]#31935L, MS[2]#31936L, MS[3]#31937L, MS[4]#31938L, MS[5]#31939L, MS[6]#31940L, MS[7]#31941L, MS[8]#31942L, MS[9]#31943L, MS[10]#31944L, MS[11]#31945L, MS[12]#31946L, MS[13]#31947L, MS[14]#31948L, MS[15]#31949L, MS[16]#31950L, MS[17]#31951L, MS[18]#31952L, MS[19]#31953L, MS[20]#31954L, MS[21]#31955L, MS[22]#31956L, MS[23]#31957L, MS[24]#31958L, MS[25]#31959L, MS[26]#31960L, MS[27]#31961L, MS[28]#31962L, MS[29]#31963L, MS[30]#31964L, MS[31]#31965L, MS[32]#31966L, MS[33]#31967L, MS[34]#31968L, MS[35]#31969L, MS[36]#31970L, MS[37]#31971L, MS[38]#31972L, MS[39]#31973L, MS[40]#31974L, MS[41]#31975L, MS[42]#31976L, MS[43]#31977L, MS[44]#31978L, MS[45]#31979L, MS[46]#31980L, MS[47]#31981L, MS[48]#31982L, MS[49]#31983L, MS[50]#31984L, MS[51]#31985L, sum#32100L, sum#32101, sum#32102, count#32103L]
Arguments: hashpartitioning(segment#31867, processing_day#31869, 200), ENSURE_REQUIREMENTS, [plan_id=3017]
(16) HashAggregate
Input [59]: [segment#31867, processing_day#31869, count#32099L, MS[0]#31934L, MS[1]#31935L, MS[2]#31936L, MS[3]#31937L, MS[4]#31938L, MS[5]#31939L, MS[6]#31940L, MS[7]#31941L, MS[8]#31942L, MS[9]#31943L, MS[10]#31944L, MS[11]#31945L, MS[12]#31946L, MS[13]#31947L, MS[14]#31948L, MS[15]#31949L, MS[16]#31950L, MS[17]#31951L, MS[18]#31952L, MS[19]#31953L, MS[20]#31954L, MS[21]#31955L, MS[22]#31956L, MS[23]#31957L, MS[24]#31958L, MS[25]#31959L, MS[26]#31960L, MS[27]#31961L, MS[28]#31962L, MS[29]#31963L, MS[30]#31964L, MS[31]#31965L, MS[32]#31966L, MS[33]#31967L, MS[34]#31968L, MS[35]#31969L, MS[36]#31970L, MS[37]#31971L, MS[38]#31972L, MS[39]#31973L, MS[40]#31974L, MS[41]#31975L, MS[42]#31976L, MS[43]#31977L, MS[44]#31978L, MS[45]#31979L, MS[46]#31980L, MS[47]#31981L, MS[48]#31982L, MS[49]#31983L, MS[50]#31984L, MS[51]#31985L, sum#32100L, sum#32101, sum#32102, count#32103L]
Keys [2]: [segment#31867, processing_day#31869]
Functions [5]: [count(1), approx_count_distinct(customer_id#31863L, 0.05, 0, 0), sum(events#31873), sum(weighted_amount#31875), avg(amount#31871)]
Aggregate Attributes [5]: [count(1)#31881L, approx_count_distinct(customer_id#31863L, 0.05, 0, 0)#31986L, sum(events#31873)#31987L, sum(weighted_amount#31875)#31988, avg(amount#31871)#31989]
Results [7]: [segment#31867, processing_day#31869, count(1)#31881L AS row_count#31876L, approx_count_distinct(customer_id#31863L, 0.05, 0, 0)#31986L AS unique_customers#31877L, sum(events#31873)#31987L AS event_sum#31878L, sum(weighted_amount#31875)#31988 AS weighted_amount_sum#31879, avg(amount#31871)#31989 AS avg_amount#31880]
(17) Exchange
Input [7]: [segment#31867, processing_day#31869, row_count#31876L, unique_customers#31877L, event_sum#31878L, weighted_amount_sum#31879, avg_amount#31880]
Arguments: rangepartitioning(segment#31867 ASC NULLS FIRST, processing_day#31869 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=3020]
(18) Sort
Input [7]: [segment#31867, processing_day#31869, row_count#31876L, unique_customers#31877L, event_sum#31878L, weighted_amount_sum#31879, avg_amount#31880]
Arguments: [segment#31867 ASC NULLS FIRST, processing_day#31869 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#31867, processing_day#31869, row_count#31876L, unique_customers#31877L, event_sum#31878L, weighted_amount_sum#31879, avg_amount#31880]
Arguments: isFinalPlan=true