== 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#54879L]
Arguments: Range (14000000, 15000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#54879L % 250000) AS customer_id#54881L, concat(segment-, cast(cast((id#54879L % 12) as int) as string)) AS segment#54885, cast((id#54879L % 14) as int) AS processing_day#54887, ((cast(((id#54879L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#54889, cast((((id#54879L * 29) % 7) + 1) as int) AS events#54891]
Input [1]: [id#54879L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#54881L, segment#54885, processing_day#54887, amount#54889, events#54891, (amount#54889 * cast(events#54891 as double)) AS weighted_amount#54893]
Input [5]: [customer_id#54881L, segment#54885, processing_day#54887, amount#54889, events#54891]
(4) HashAggregate
Input [6]: [customer_id#54881L, segment#54885, processing_day#54887, amount#54889, events#54891, weighted_amount#54893]
Keys [2]: [segment#54885, processing_day#54887]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#54881L, 0.05, 0, 0), partial_sum(events#54891), partial_sum(weighted_amount#54893), partial_avg(amount#54889)]
Aggregate Attributes [57]: [count#55112L, MS[0]#54900L, MS[1]#54901L, MS[2]#54902L, MS[3]#54903L, MS[4]#54904L, MS[5]#54905L, MS[6]#54906L, MS[7]#54907L, MS[8]#54908L, MS[9]#54909L, MS[10]#54910L, MS[11]#54911L, MS[12]#54912L, MS[13]#54913L, MS[14]#54914L, MS[15]#54915L, MS[16]#54916L, MS[17]#54917L, MS[18]#54918L, MS[19]#54919L, MS[20]#54920L, MS[21]#54921L, MS[22]#54922L, MS[23]#54923L, MS[24]#54924L, MS[25]#54925L, MS[26]#54926L, MS[27]#54927L, MS[28]#54928L, MS[29]#54929L, MS[30]#54930L, MS[31]#54931L, MS[32]#54932L, MS[33]#54933L, MS[34]#54934L, MS[35]#54935L, MS[36]#54936L, MS[37]#54937L, MS[38]#54938L, MS[39]#54939L, MS[40]#54940L, MS[41]#54941L, MS[42]#54942L, MS[43]#54943L, MS[44]#54944L, MS[45]#54945L, MS[46]#54946L, MS[47]#54947L, MS[48]#54948L, MS[49]#54949L, MS[50]#54950L, MS[51]#54951L, sum#55113L, sum#55114, sum#55115, count#55116L]
Results [59]: [segment#54885, processing_day#54887, count#55117L, MS[0]#54952L, MS[1]#54953L, MS[2]#54954L, MS[3]#54955L, MS[4]#54956L, MS[5]#54957L, MS[6]#54958L, MS[7]#54959L, MS[8]#54960L, MS[9]#54961L, MS[10]#54962L, MS[11]#54963L, MS[12]#54964L, MS[13]#54965L, MS[14]#54966L, MS[15]#54967L, MS[16]#54968L, MS[17]#54969L, MS[18]#54970L, MS[19]#54971L, MS[20]#54972L, MS[21]#54973L, MS[22]#54974L, MS[23]#54975L, MS[24]#54976L, MS[25]#54977L, MS[26]#54978L, MS[27]#54979L, MS[28]#54980L, MS[29]#54981L, MS[30]#54982L, MS[31]#54983L, MS[32]#54984L, MS[33]#54985L, MS[34]#54986L, MS[35]#54987L, MS[36]#54988L, MS[37]#54989L, MS[38]#54990L, MS[39]#54991L, MS[40]#54992L, MS[41]#54993L, MS[42]#54994L, MS[43]#54995L, MS[44]#54996L, MS[45]#54997L, MS[46]#54998L, MS[47]#54999L, MS[48]#55000L, MS[49]#55001L, MS[50]#55002L, MS[51]#55003L, sum#55118L, sum#55119, sum#55120, count#55121L]
(5) Exchange
Input [59]: [segment#54885, processing_day#54887, count#55117L, MS[0]#54952L, MS[1]#54953L, MS[2]#54954L, MS[3]#54955L, MS[4]#54956L, MS[5]#54957L, MS[6]#54958L, MS[7]#54959L, MS[8]#54960L, MS[9]#54961L, MS[10]#54962L, MS[11]#54963L, MS[12]#54964L, MS[13]#54965L, MS[14]#54966L, MS[15]#54967L, MS[16]#54968L, MS[17]#54969L, MS[18]#54970L, MS[19]#54971L, MS[20]#54972L, MS[21]#54973L, MS[22]#54974L, MS[23]#54975L, MS[24]#54976L, MS[25]#54977L, MS[26]#54978L, MS[27]#54979L, MS[28]#54980L, MS[29]#54981L, MS[30]#54982L, MS[31]#54983L, MS[32]#54984L, MS[33]#54985L, MS[34]#54986L, MS[35]#54987L, MS[36]#54988L, MS[37]#54989L, MS[38]#54990L, MS[39]#54991L, MS[40]#54992L, MS[41]#54993L, MS[42]#54994L, MS[43]#54995L, MS[44]#54996L, MS[45]#54997L, MS[46]#54998L, MS[47]#54999L, MS[48]#55000L, MS[49]#55001L, MS[50]#55002L, MS[51]#55003L, sum#55118L, sum#55119, sum#55120, count#55121L]
Arguments: hashpartitioning(segment#54885, processing_day#54887, 200), ENSURE_REQUIREMENTS, [plan_id=5201]
(6) ShuffleQueryStage
Output [59]: [segment#54885, processing_day#54887, count#55117L, MS[0]#54952L, MS[1]#54953L, MS[2]#54954L, MS[3]#54955L, MS[4]#54956L, MS[5]#54957L, MS[6]#54958L, MS[7]#54959L, MS[8]#54960L, MS[9]#54961L, MS[10]#54962L, MS[11]#54963L, MS[12]#54964L, MS[13]#54965L, MS[14]#54966L, MS[15]#54967L, MS[16]#54968L, MS[17]#54969L, MS[18]#54970L, MS[19]#54971L, MS[20]#54972L, MS[21]#54973L, MS[22]#54974L, MS[23]#54975L, MS[24]#54976L, MS[25]#54977L, MS[26]#54978L, MS[27]#54979L, MS[28]#54980L, MS[29]#54981L, MS[30]#54982L, MS[31]#54983L, MS[32]#54984L, MS[33]#54985L, MS[34]#54986L, MS[35]#54987L, MS[36]#54988L, MS[37]#54989L, MS[38]#54990L, MS[39]#54991L, MS[40]#54992L, MS[41]#54993L, MS[42]#54994L, MS[43]#54995L, MS[44]#54996L, MS[45]#54997L, MS[46]#54998L, MS[47]#54999L, MS[48]#55000L, MS[49]#55001L, MS[50]#55002L, MS[51]#55003L, sum#55118L, sum#55119, sum#55120, count#55121L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#54885, processing_day#54887, count#55117L, MS[0]#54952L, MS[1]#54953L, MS[2]#54954L, MS[3]#54955L, MS[4]#54956L, MS[5]#54957L, MS[6]#54958L, MS[7]#54959L, MS[8]#54960L, MS[9]#54961L, MS[10]#54962L, MS[11]#54963L, MS[12]#54964L, MS[13]#54965L, MS[14]#54966L, MS[15]#54967L, MS[16]#54968L, MS[17]#54969L, MS[18]#54970L, MS[19]#54971L, MS[20]#54972L, MS[21]#54973L, MS[22]#54974L, MS[23]#54975L, MS[24]#54976L, MS[25]#54977L, MS[26]#54978L, MS[27]#54979L, MS[28]#54980L, MS[29]#54981L, MS[30]#54982L, MS[31]#54983L, MS[32]#54984L, MS[33]#54985L, MS[34]#54986L, MS[35]#54987L, MS[36]#54988L, MS[37]#54989L, MS[38]#54990L, MS[39]#54991L, MS[40]#54992L, MS[41]#54993L, MS[42]#54994L, MS[43]#54995L, MS[44]#54996L, MS[45]#54997L, MS[46]#54998L, MS[47]#54999L, MS[48]#55000L, MS[49]#55001L, MS[50]#55002L, MS[51]#55003L, sum#55118L, sum#55119, sum#55120, count#55121L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#54885, processing_day#54887, count#55117L, MS[0]#54952L, MS[1]#54953L, MS[2]#54954L, MS[3]#54955L, MS[4]#54956L, MS[5]#54957L, MS[6]#54958L, MS[7]#54959L, MS[8]#54960L, MS[9]#54961L, MS[10]#54962L, MS[11]#54963L, MS[12]#54964L, MS[13]#54965L, MS[14]#54966L, MS[15]#54967L, MS[16]#54968L, MS[17]#54969L, MS[18]#54970L, MS[19]#54971L, MS[20]#54972L, MS[21]#54973L, MS[22]#54974L, MS[23]#54975L, MS[24]#54976L, MS[25]#54977L, MS[26]#54978L, MS[27]#54979L, MS[28]#54980L, MS[29]#54981L, MS[30]#54982L, MS[31]#54983L, MS[32]#54984L, MS[33]#54985L, MS[34]#54986L, MS[35]#54987L, MS[36]#54988L, MS[37]#54989L, MS[38]#54990L, MS[39]#54991L, MS[40]#54992L, MS[41]#54993L, MS[42]#54994L, MS[43]#54995L, MS[44]#54996L, MS[45]#54997L, MS[46]#54998L, MS[47]#54999L, MS[48]#55000L, MS[49]#55001L, MS[50]#55002L, MS[51]#55003L, sum#55118L, sum#55119, sum#55120, count#55121L]
Keys [2]: [segment#54885, processing_day#54887]
Functions [5]: [count(1), approx_count_distinct(customer_id#54881L, 0.05, 0, 0), sum(events#54891), sum(weighted_amount#54893), avg(amount#54889)]
Aggregate Attributes [5]: [count(1)#54899L, approx_count_distinct(customer_id#54881L, 0.05, 0, 0)#55004L, sum(events#54891)#55005L, sum(weighted_amount#54893)#55006, avg(amount#54889)#55007]
Results [7]: [segment#54885, processing_day#54887, count(1)#54899L AS row_count#54894L, approx_count_distinct(customer_id#54881L, 0.05, 0, 0)#55004L AS unique_customers#54895L, sum(events#54891)#55005L AS event_sum#54896L, sum(weighted_amount#54893)#55006 AS weighted_amount_sum#54897, avg(amount#54889)#55007 AS avg_amount#54898]
(9) Exchange
Input [7]: [segment#54885, processing_day#54887, row_count#54894L, unique_customers#54895L, event_sum#54896L, weighted_amount_sum#54897, avg_amount#54898]
Arguments: rangepartitioning(segment#54885 ASC NULLS FIRST, processing_day#54887 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=5223]
(10) ShuffleQueryStage
Output [7]: [segment#54885, processing_day#54887, row_count#54894L, unique_customers#54895L, event_sum#54896L, weighted_amount_sum#54897, avg_amount#54898]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#54885, processing_day#54887, row_count#54894L, unique_customers#54895L, event_sum#54896L, weighted_amount_sum#54897, avg_amount#54898]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#54885, processing_day#54887, row_count#54894L, unique_customers#54895L, event_sum#54896L, weighted_amount_sum#54897, avg_amount#54898]
Arguments: [segment#54885 ASC NULLS FIRST, processing_day#54887 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#54885, processing_day#54887, row_count#54894L, unique_customers#54895L, event_sum#54896L, weighted_amount_sum#54897, avg_amount#54898]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#54881L, segment#54885, processing_day#54887, amount#54889, events#54891, weighted_amount#54893]
Keys [2]: [segment#54885, processing_day#54887]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#54881L, 0.05, 0, 0), partial_sum(events#54891), partial_sum(weighted_amount#54893), partial_avg(amount#54889)]
Aggregate Attributes [57]: [count#55112L, MS[0]#54900L, MS[1]#54901L, MS[2]#54902L, MS[3]#54903L, MS[4]#54904L, MS[5]#54905L, MS[6]#54906L, MS[7]#54907L, MS[8]#54908L, MS[9]#54909L, MS[10]#54910L, MS[11]#54911L, MS[12]#54912L, MS[13]#54913L, MS[14]#54914L, MS[15]#54915L, MS[16]#54916L, MS[17]#54917L, MS[18]#54918L, MS[19]#54919L, MS[20]#54920L, MS[21]#54921L, MS[22]#54922L, MS[23]#54923L, MS[24]#54924L, MS[25]#54925L, MS[26]#54926L, MS[27]#54927L, MS[28]#54928L, MS[29]#54929L, MS[30]#54930L, MS[31]#54931L, MS[32]#54932L, MS[33]#54933L, MS[34]#54934L, MS[35]#54935L, MS[36]#54936L, MS[37]#54937L, MS[38]#54938L, MS[39]#54939L, MS[40]#54940L, MS[41]#54941L, MS[42]#54942L, MS[43]#54943L, MS[44]#54944L, MS[45]#54945L, MS[46]#54946L, MS[47]#54947L, MS[48]#54948L, MS[49]#54949L, MS[50]#54950L, MS[51]#54951L, sum#55113L, sum#55114, sum#55115, count#55116L]
Results [59]: [segment#54885, processing_day#54887, count#55117L, MS[0]#54952L, MS[1]#54953L, MS[2]#54954L, MS[3]#54955L, MS[4]#54956L, MS[5]#54957L, MS[6]#54958L, MS[7]#54959L, MS[8]#54960L, MS[9]#54961L, MS[10]#54962L, MS[11]#54963L, MS[12]#54964L, MS[13]#54965L, MS[14]#54966L, MS[15]#54967L, MS[16]#54968L, MS[17]#54969L, MS[18]#54970L, MS[19]#54971L, MS[20]#54972L, MS[21]#54973L, MS[22]#54974L, MS[23]#54975L, MS[24]#54976L, MS[25]#54977L, MS[26]#54978L, MS[27]#54979L, MS[28]#54980L, MS[29]#54981L, MS[30]#54982L, MS[31]#54983L, MS[32]#54984L, MS[33]#54985L, MS[34]#54986L, MS[35]#54987L, MS[36]#54988L, MS[37]#54989L, MS[38]#54990L, MS[39]#54991L, MS[40]#54992L, MS[41]#54993L, MS[42]#54994L, MS[43]#54995L, MS[44]#54996L, MS[45]#54997L, MS[46]#54998L, MS[47]#54999L, MS[48]#55000L, MS[49]#55001L, MS[50]#55002L, MS[51]#55003L, sum#55118L, sum#55119, sum#55120, count#55121L]
(15) Exchange
Input [59]: [segment#54885, processing_day#54887, count#55117L, MS[0]#54952L, MS[1]#54953L, MS[2]#54954L, MS[3]#54955L, MS[4]#54956L, MS[5]#54957L, MS[6]#54958L, MS[7]#54959L, MS[8]#54960L, MS[9]#54961L, MS[10]#54962L, MS[11]#54963L, MS[12]#54964L, MS[13]#54965L, MS[14]#54966L, MS[15]#54967L, MS[16]#54968L, MS[17]#54969L, MS[18]#54970L, MS[19]#54971L, MS[20]#54972L, MS[21]#54973L, MS[22]#54974L, MS[23]#54975L, MS[24]#54976L, MS[25]#54977L, MS[26]#54978L, MS[27]#54979L, MS[28]#54980L, MS[29]#54981L, MS[30]#54982L, MS[31]#54983L, MS[32]#54984L, MS[33]#54985L, MS[34]#54986L, MS[35]#54987L, MS[36]#54988L, MS[37]#54989L, MS[38]#54990L, MS[39]#54991L, MS[40]#54992L, MS[41]#54993L, MS[42]#54994L, MS[43]#54995L, MS[44]#54996L, MS[45]#54997L, MS[46]#54998L, MS[47]#54999L, MS[48]#55000L, MS[49]#55001L, MS[50]#55002L, MS[51]#55003L, sum#55118L, sum#55119, sum#55120, count#55121L]
Arguments: hashpartitioning(segment#54885, processing_day#54887, 200), ENSURE_REQUIREMENTS, [plan_id=5181]
(16) HashAggregate
Input [59]: [segment#54885, processing_day#54887, count#55117L, MS[0]#54952L, MS[1]#54953L, MS[2]#54954L, MS[3]#54955L, MS[4]#54956L, MS[5]#54957L, MS[6]#54958L, MS[7]#54959L, MS[8]#54960L, MS[9]#54961L, MS[10]#54962L, MS[11]#54963L, MS[12]#54964L, MS[13]#54965L, MS[14]#54966L, MS[15]#54967L, MS[16]#54968L, MS[17]#54969L, MS[18]#54970L, MS[19]#54971L, MS[20]#54972L, MS[21]#54973L, MS[22]#54974L, MS[23]#54975L, MS[24]#54976L, MS[25]#54977L, MS[26]#54978L, MS[27]#54979L, MS[28]#54980L, MS[29]#54981L, MS[30]#54982L, MS[31]#54983L, MS[32]#54984L, MS[33]#54985L, MS[34]#54986L, MS[35]#54987L, MS[36]#54988L, MS[37]#54989L, MS[38]#54990L, MS[39]#54991L, MS[40]#54992L, MS[41]#54993L, MS[42]#54994L, MS[43]#54995L, MS[44]#54996L, MS[45]#54997L, MS[46]#54998L, MS[47]#54999L, MS[48]#55000L, MS[49]#55001L, MS[50]#55002L, MS[51]#55003L, sum#55118L, sum#55119, sum#55120, count#55121L]
Keys [2]: [segment#54885, processing_day#54887]
Functions [5]: [count(1), approx_count_distinct(customer_id#54881L, 0.05, 0, 0), sum(events#54891), sum(weighted_amount#54893), avg(amount#54889)]
Aggregate Attributes [5]: [count(1)#54899L, approx_count_distinct(customer_id#54881L, 0.05, 0, 0)#55004L, sum(events#54891)#55005L, sum(weighted_amount#54893)#55006, avg(amount#54889)#55007]
Results [7]: [segment#54885, processing_day#54887, count(1)#54899L AS row_count#54894L, approx_count_distinct(customer_id#54881L, 0.05, 0, 0)#55004L AS unique_customers#54895L, sum(events#54891)#55005L AS event_sum#54896L, sum(weighted_amount#54893)#55006 AS weighted_amount_sum#54897, avg(amount#54889)#55007 AS avg_amount#54898]
(17) Exchange
Input [7]: [segment#54885, processing_day#54887, row_count#54894L, unique_customers#54895L, event_sum#54896L, weighted_amount_sum#54897, avg_amount#54898]
Arguments: rangepartitioning(segment#54885 ASC NULLS FIRST, processing_day#54887 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=5184]
(18) Sort
Input [7]: [segment#54885, processing_day#54887, row_count#54894L, unique_customers#54895L, event_sum#54896L, weighted_amount_sum#54897, avg_amount#54898]
Arguments: [segment#54885 ASC NULLS FIRST, processing_day#54887 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#54885, processing_day#54887, row_count#54894L, unique_customers#54895L, event_sum#54896L, weighted_amount_sum#54897, avg_amount#54898]
Arguments: isFinalPlan=true