== 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#23905L]
Arguments: Range (3000000, 4000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#23905L % 250000) AS customer_id#23907L, concat(segment-, cast(cast((id#23905L % 12) as int) as string)) AS segment#23911, cast((id#23905L % 14) as int) AS processing_day#23913, ((cast(((id#23905L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#23915, cast((((id#23905L * 29) % 7) + 1) as int) AS events#23917]
Input [1]: [id#23905L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#23907L, segment#23911, processing_day#23913, amount#23915, events#23917, (amount#23915 * cast(events#23917 as double)) AS weighted_amount#23919]
Input [5]: [customer_id#23907L, segment#23911, processing_day#23913, amount#23915, events#23917]
(4) HashAggregate
Input [6]: [customer_id#23907L, segment#23911, processing_day#23913, amount#23915, events#23917, weighted_amount#23919]
Keys [2]: [segment#23911, processing_day#23913]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#23907L, 0.05, 0, 0), partial_sum(events#23917), partial_sum(weighted_amount#23919), partial_avg(amount#23915)]
Aggregate Attributes [57]: [count#24138L, MS[0]#23926L, MS[1]#23927L, MS[2]#23928L, MS[3]#23929L, MS[4]#23930L, MS[5]#23931L, MS[6]#23932L, MS[7]#23933L, MS[8]#23934L, MS[9]#23935L, MS[10]#23936L, MS[11]#23937L, MS[12]#23938L, MS[13]#23939L, MS[14]#23940L, MS[15]#23941L, MS[16]#23942L, MS[17]#23943L, MS[18]#23944L, MS[19]#23945L, MS[20]#23946L, MS[21]#23947L, MS[22]#23948L, MS[23]#23949L, MS[24]#23950L, MS[25]#23951L, MS[26]#23952L, MS[27]#23953L, MS[28]#23954L, MS[29]#23955L, MS[30]#23956L, MS[31]#23957L, MS[32]#23958L, MS[33]#23959L, MS[34]#23960L, MS[35]#23961L, MS[36]#23962L, MS[37]#23963L, MS[38]#23964L, MS[39]#23965L, MS[40]#23966L, MS[41]#23967L, MS[42]#23968L, MS[43]#23969L, MS[44]#23970L, MS[45]#23971L, MS[46]#23972L, MS[47]#23973L, MS[48]#23974L, MS[49]#23975L, MS[50]#23976L, MS[51]#23977L, sum#24139L, sum#24140, sum#24141, count#24142L]
Results [59]: [segment#23911, processing_day#23913, count#24143L, MS[0]#23978L, MS[1]#23979L, MS[2]#23980L, MS[3]#23981L, MS[4]#23982L, MS[5]#23983L, MS[6]#23984L, MS[7]#23985L, MS[8]#23986L, MS[9]#23987L, MS[10]#23988L, MS[11]#23989L, MS[12]#23990L, MS[13]#23991L, MS[14]#23992L, MS[15]#23993L, MS[16]#23994L, MS[17]#23995L, MS[18]#23996L, MS[19]#23997L, MS[20]#23998L, MS[21]#23999L, MS[22]#24000L, MS[23]#24001L, MS[24]#24002L, MS[25]#24003L, MS[26]#24004L, MS[27]#24005L, MS[28]#24006L, MS[29]#24007L, MS[30]#24008L, MS[31]#24009L, MS[32]#24010L, MS[33]#24011L, MS[34]#24012L, MS[35]#24013L, MS[36]#24014L, MS[37]#24015L, MS[38]#24016L, MS[39]#24017L, MS[40]#24018L, MS[41]#24019L, MS[42]#24020L, MS[43]#24021L, MS[44]#24022L, MS[45]#24023L, MS[46]#24024L, MS[47]#24025L, MS[48]#24026L, MS[49]#24027L, MS[50]#24028L, MS[51]#24029L, sum#24144L, sum#24145, sum#24146, count#24147L]
(5) Exchange
Input [59]: [segment#23911, processing_day#23913, count#24143L, MS[0]#23978L, MS[1]#23979L, MS[2]#23980L, MS[3]#23981L, MS[4]#23982L, MS[5]#23983L, MS[6]#23984L, MS[7]#23985L, MS[8]#23986L, MS[9]#23987L, MS[10]#23988L, MS[11]#23989L, MS[12]#23990L, MS[13]#23991L, MS[14]#23992L, MS[15]#23993L, MS[16]#23994L, MS[17]#23995L, MS[18]#23996L, MS[19]#23997L, MS[20]#23998L, MS[21]#23999L, MS[22]#24000L, MS[23]#24001L, MS[24]#24002L, MS[25]#24003L, MS[26]#24004L, MS[27]#24005L, MS[28]#24006L, MS[29]#24007L, MS[30]#24008L, MS[31]#24009L, MS[32]#24010L, MS[33]#24011L, MS[34]#24012L, MS[35]#24013L, MS[36]#24014L, MS[37]#24015L, MS[38]#24016L, MS[39]#24017L, MS[40]#24018L, MS[41]#24019L, MS[42]#24020L, MS[43]#24021L, MS[44]#24022L, MS[45]#24023L, MS[46]#24024L, MS[47]#24025L, MS[48]#24026L, MS[49]#24027L, MS[50]#24028L, MS[51]#24029L, sum#24144L, sum#24145, sum#24146, count#24147L]
Arguments: hashpartitioning(segment#23911, processing_day#23913, 200), ENSURE_REQUIREMENTS, [plan_id=2290]
(6) ShuffleQueryStage
Output [59]: [segment#23911, processing_day#23913, count#24143L, MS[0]#23978L, MS[1]#23979L, MS[2]#23980L, MS[3]#23981L, MS[4]#23982L, MS[5]#23983L, MS[6]#23984L, MS[7]#23985L, MS[8]#23986L, MS[9]#23987L, MS[10]#23988L, MS[11]#23989L, MS[12]#23990L, MS[13]#23991L, MS[14]#23992L, MS[15]#23993L, MS[16]#23994L, MS[17]#23995L, MS[18]#23996L, MS[19]#23997L, MS[20]#23998L, MS[21]#23999L, MS[22]#24000L, MS[23]#24001L, MS[24]#24002L, MS[25]#24003L, MS[26]#24004L, MS[27]#24005L, MS[28]#24006L, MS[29]#24007L, MS[30]#24008L, MS[31]#24009L, MS[32]#24010L, MS[33]#24011L, MS[34]#24012L, MS[35]#24013L, MS[36]#24014L, MS[37]#24015L, MS[38]#24016L, MS[39]#24017L, MS[40]#24018L, MS[41]#24019L, MS[42]#24020L, MS[43]#24021L, MS[44]#24022L, MS[45]#24023L, MS[46]#24024L, MS[47]#24025L, MS[48]#24026L, MS[49]#24027L, MS[50]#24028L, MS[51]#24029L, sum#24144L, sum#24145, sum#24146, count#24147L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#23911, processing_day#23913, count#24143L, MS[0]#23978L, MS[1]#23979L, MS[2]#23980L, MS[3]#23981L, MS[4]#23982L, MS[5]#23983L, MS[6]#23984L, MS[7]#23985L, MS[8]#23986L, MS[9]#23987L, MS[10]#23988L, MS[11]#23989L, MS[12]#23990L, MS[13]#23991L, MS[14]#23992L, MS[15]#23993L, MS[16]#23994L, MS[17]#23995L, MS[18]#23996L, MS[19]#23997L, MS[20]#23998L, MS[21]#23999L, MS[22]#24000L, MS[23]#24001L, MS[24]#24002L, MS[25]#24003L, MS[26]#24004L, MS[27]#24005L, MS[28]#24006L, MS[29]#24007L, MS[30]#24008L, MS[31]#24009L, MS[32]#24010L, MS[33]#24011L, MS[34]#24012L, MS[35]#24013L, MS[36]#24014L, MS[37]#24015L, MS[38]#24016L, MS[39]#24017L, MS[40]#24018L, MS[41]#24019L, MS[42]#24020L, MS[43]#24021L, MS[44]#24022L, MS[45]#24023L, MS[46]#24024L, MS[47]#24025L, MS[48]#24026L, MS[49]#24027L, MS[50]#24028L, MS[51]#24029L, sum#24144L, sum#24145, sum#24146, count#24147L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#23911, processing_day#23913, count#24143L, MS[0]#23978L, MS[1]#23979L, MS[2]#23980L, MS[3]#23981L, MS[4]#23982L, MS[5]#23983L, MS[6]#23984L, MS[7]#23985L, MS[8]#23986L, MS[9]#23987L, MS[10]#23988L, MS[11]#23989L, MS[12]#23990L, MS[13]#23991L, MS[14]#23992L, MS[15]#23993L, MS[16]#23994L, MS[17]#23995L, MS[18]#23996L, MS[19]#23997L, MS[20]#23998L, MS[21]#23999L, MS[22]#24000L, MS[23]#24001L, MS[24]#24002L, MS[25]#24003L, MS[26]#24004L, MS[27]#24005L, MS[28]#24006L, MS[29]#24007L, MS[30]#24008L, MS[31]#24009L, MS[32]#24010L, MS[33]#24011L, MS[34]#24012L, MS[35]#24013L, MS[36]#24014L, MS[37]#24015L, MS[38]#24016L, MS[39]#24017L, MS[40]#24018L, MS[41]#24019L, MS[42]#24020L, MS[43]#24021L, MS[44]#24022L, MS[45]#24023L, MS[46]#24024L, MS[47]#24025L, MS[48]#24026L, MS[49]#24027L, MS[50]#24028L, MS[51]#24029L, sum#24144L, sum#24145, sum#24146, count#24147L]
Keys [2]: [segment#23911, processing_day#23913]
Functions [5]: [count(1), approx_count_distinct(customer_id#23907L, 0.05, 0, 0), sum(events#23917), sum(weighted_amount#23919), avg(amount#23915)]
Aggregate Attributes [5]: [count(1)#23925L, approx_count_distinct(customer_id#23907L, 0.05, 0, 0)#24030L, sum(events#23917)#24031L, sum(weighted_amount#23919)#24032, avg(amount#23915)#24033]
Results [7]: [segment#23911, processing_day#23913, count(1)#23925L AS row_count#23920L, approx_count_distinct(customer_id#23907L, 0.05, 0, 0)#24030L AS unique_customers#23921L, sum(events#23917)#24031L AS event_sum#23922L, sum(weighted_amount#23919)#24032 AS weighted_amount_sum#23923, avg(amount#23915)#24033 AS avg_amount#23924]
(9) Exchange
Input [7]: [segment#23911, processing_day#23913, row_count#23920L, unique_customers#23921L, event_sum#23922L, weighted_amount_sum#23923, avg_amount#23924]
Arguments: rangepartitioning(segment#23911 ASC NULLS FIRST, processing_day#23913 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=2312]
(10) ShuffleQueryStage
Output [7]: [segment#23911, processing_day#23913, row_count#23920L, unique_customers#23921L, event_sum#23922L, weighted_amount_sum#23923, avg_amount#23924]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#23911, processing_day#23913, row_count#23920L, unique_customers#23921L, event_sum#23922L, weighted_amount_sum#23923, avg_amount#23924]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#23911, processing_day#23913, row_count#23920L, unique_customers#23921L, event_sum#23922L, weighted_amount_sum#23923, avg_amount#23924]
Arguments: [segment#23911 ASC NULLS FIRST, processing_day#23913 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#23911, processing_day#23913, row_count#23920L, unique_customers#23921L, event_sum#23922L, weighted_amount_sum#23923, avg_amount#23924]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#23907L, segment#23911, processing_day#23913, amount#23915, events#23917, weighted_amount#23919]
Keys [2]: [segment#23911, processing_day#23913]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#23907L, 0.05, 0, 0), partial_sum(events#23917), partial_sum(weighted_amount#23919), partial_avg(amount#23915)]
Aggregate Attributes [57]: [count#24138L, MS[0]#23926L, MS[1]#23927L, MS[2]#23928L, MS[3]#23929L, MS[4]#23930L, MS[5]#23931L, MS[6]#23932L, MS[7]#23933L, MS[8]#23934L, MS[9]#23935L, MS[10]#23936L, MS[11]#23937L, MS[12]#23938L, MS[13]#23939L, MS[14]#23940L, MS[15]#23941L, MS[16]#23942L, MS[17]#23943L, MS[18]#23944L, MS[19]#23945L, MS[20]#23946L, MS[21]#23947L, MS[22]#23948L, MS[23]#23949L, MS[24]#23950L, MS[25]#23951L, MS[26]#23952L, MS[27]#23953L, MS[28]#23954L, MS[29]#23955L, MS[30]#23956L, MS[31]#23957L, MS[32]#23958L, MS[33]#23959L, MS[34]#23960L, MS[35]#23961L, MS[36]#23962L, MS[37]#23963L, MS[38]#23964L, MS[39]#23965L, MS[40]#23966L, MS[41]#23967L, MS[42]#23968L, MS[43]#23969L, MS[44]#23970L, MS[45]#23971L, MS[46]#23972L, MS[47]#23973L, MS[48]#23974L, MS[49]#23975L, MS[50]#23976L, MS[51]#23977L, sum#24139L, sum#24140, sum#24141, count#24142L]
Results [59]: [segment#23911, processing_day#23913, count#24143L, MS[0]#23978L, MS[1]#23979L, MS[2]#23980L, MS[3]#23981L, MS[4]#23982L, MS[5]#23983L, MS[6]#23984L, MS[7]#23985L, MS[8]#23986L, MS[9]#23987L, MS[10]#23988L, MS[11]#23989L, MS[12]#23990L, MS[13]#23991L, MS[14]#23992L, MS[15]#23993L, MS[16]#23994L, MS[17]#23995L, MS[18]#23996L, MS[19]#23997L, MS[20]#23998L, MS[21]#23999L, MS[22]#24000L, MS[23]#24001L, MS[24]#24002L, MS[25]#24003L, MS[26]#24004L, MS[27]#24005L, MS[28]#24006L, MS[29]#24007L, MS[30]#24008L, MS[31]#24009L, MS[32]#24010L, MS[33]#24011L, MS[34]#24012L, MS[35]#24013L, MS[36]#24014L, MS[37]#24015L, MS[38]#24016L, MS[39]#24017L, MS[40]#24018L, MS[41]#24019L, MS[42]#24020L, MS[43]#24021L, MS[44]#24022L, MS[45]#24023L, MS[46]#24024L, MS[47]#24025L, MS[48]#24026L, MS[49]#24027L, MS[50]#24028L, MS[51]#24029L, sum#24144L, sum#24145, sum#24146, count#24147L]
(15) Exchange
Input [59]: [segment#23911, processing_day#23913, count#24143L, MS[0]#23978L, MS[1]#23979L, MS[2]#23980L, MS[3]#23981L, MS[4]#23982L, MS[5]#23983L, MS[6]#23984L, MS[7]#23985L, MS[8]#23986L, MS[9]#23987L, MS[10]#23988L, MS[11]#23989L, MS[12]#23990L, MS[13]#23991L, MS[14]#23992L, MS[15]#23993L, MS[16]#23994L, MS[17]#23995L, MS[18]#23996L, MS[19]#23997L, MS[20]#23998L, MS[21]#23999L, MS[22]#24000L, MS[23]#24001L, MS[24]#24002L, MS[25]#24003L, MS[26]#24004L, MS[27]#24005L, MS[28]#24006L, MS[29]#24007L, MS[30]#24008L, MS[31]#24009L, MS[32]#24010L, MS[33]#24011L, MS[34]#24012L, MS[35]#24013L, MS[36]#24014L, MS[37]#24015L, MS[38]#24016L, MS[39]#24017L, MS[40]#24018L, MS[41]#24019L, MS[42]#24020L, MS[43]#24021L, MS[44]#24022L, MS[45]#24023L, MS[46]#24024L, MS[47]#24025L, MS[48]#24026L, MS[49]#24027L, MS[50]#24028L, MS[51]#24029L, sum#24144L, sum#24145, sum#24146, count#24147L]
Arguments: hashpartitioning(segment#23911, processing_day#23913, 200), ENSURE_REQUIREMENTS, [plan_id=2270]
(16) HashAggregate
Input [59]: [segment#23911, processing_day#23913, count#24143L, MS[0]#23978L, MS[1]#23979L, MS[2]#23980L, MS[3]#23981L, MS[4]#23982L, MS[5]#23983L, MS[6]#23984L, MS[7]#23985L, MS[8]#23986L, MS[9]#23987L, MS[10]#23988L, MS[11]#23989L, MS[12]#23990L, MS[13]#23991L, MS[14]#23992L, MS[15]#23993L, MS[16]#23994L, MS[17]#23995L, MS[18]#23996L, MS[19]#23997L, MS[20]#23998L, MS[21]#23999L, MS[22]#24000L, MS[23]#24001L, MS[24]#24002L, MS[25]#24003L, MS[26]#24004L, MS[27]#24005L, MS[28]#24006L, MS[29]#24007L, MS[30]#24008L, MS[31]#24009L, MS[32]#24010L, MS[33]#24011L, MS[34]#24012L, MS[35]#24013L, MS[36]#24014L, MS[37]#24015L, MS[38]#24016L, MS[39]#24017L, MS[40]#24018L, MS[41]#24019L, MS[42]#24020L, MS[43]#24021L, MS[44]#24022L, MS[45]#24023L, MS[46]#24024L, MS[47]#24025L, MS[48]#24026L, MS[49]#24027L, MS[50]#24028L, MS[51]#24029L, sum#24144L, sum#24145, sum#24146, count#24147L]
Keys [2]: [segment#23911, processing_day#23913]
Functions [5]: [count(1), approx_count_distinct(customer_id#23907L, 0.05, 0, 0), sum(events#23917), sum(weighted_amount#23919), avg(amount#23915)]
Aggregate Attributes [5]: [count(1)#23925L, approx_count_distinct(customer_id#23907L, 0.05, 0, 0)#24030L, sum(events#23917)#24031L, sum(weighted_amount#23919)#24032, avg(amount#23915)#24033]
Results [7]: [segment#23911, processing_day#23913, count(1)#23925L AS row_count#23920L, approx_count_distinct(customer_id#23907L, 0.05, 0, 0)#24030L AS unique_customers#23921L, sum(events#23917)#24031L AS event_sum#23922L, sum(weighted_amount#23919)#24032 AS weighted_amount_sum#23923, avg(amount#23915)#24033 AS avg_amount#23924]
(17) Exchange
Input [7]: [segment#23911, processing_day#23913, row_count#23920L, unique_customers#23921L, event_sum#23922L, weighted_amount_sum#23923, avg_amount#23924]
Arguments: rangepartitioning(segment#23911 ASC NULLS FIRST, processing_day#23913 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=2273]
(18) Sort
Input [7]: [segment#23911, processing_day#23913, row_count#23920L, unique_customers#23921L, event_sum#23922L, weighted_amount_sum#23923, avg_amount#23924]
Arguments: [segment#23911 ASC NULLS FIRST, processing_day#23913 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#23911, processing_day#23913, row_count#23920L, unique_customers#23921L, event_sum#23922L, weighted_amount_sum#23923, avg_amount#23924]
Arguments: isFinalPlan=true