== 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#80549L]
Arguments: Range (19000000, 20000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#80549L % 250000) AS customer_id#80551L, concat(segment-, cast(cast((id#80549L % 12) as int) as string)) AS segment#80555, cast((id#80549L % 14) as int) AS processing_day#80557, ((cast(((id#80549L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#80559, cast((((id#80549L * 29) % 7) + 1) as int) AS events#80561]
Input [1]: [id#80549L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#80551L, segment#80555, processing_day#80557, amount#80559, events#80561, (amount#80559 * cast(events#80561 as double)) AS weighted_amount#80563]
Input [5]: [customer_id#80551L, segment#80555, processing_day#80557, amount#80559, events#80561]
(4) HashAggregate
Input [6]: [customer_id#80551L, segment#80555, processing_day#80557, amount#80559, events#80561, weighted_amount#80563]
Keys [2]: [segment#80555, processing_day#80557]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#80551L, 0.05, 0, 0), partial_sum(events#80561), partial_sum(weighted_amount#80563), partial_avg(amount#80559)]
Aggregate Attributes [57]: [count#80782L, MS[0]#80570L, MS[1]#80571L, MS[2]#80572L, MS[3]#80573L, MS[4]#80574L, MS[5]#80575L, MS[6]#80576L, MS[7]#80577L, MS[8]#80578L, MS[9]#80579L, MS[10]#80580L, MS[11]#80581L, MS[12]#80582L, MS[13]#80583L, MS[14]#80584L, MS[15]#80585L, MS[16]#80586L, MS[17]#80587L, MS[18]#80588L, MS[19]#80589L, MS[20]#80590L, MS[21]#80591L, MS[22]#80592L, MS[23]#80593L, MS[24]#80594L, MS[25]#80595L, MS[26]#80596L, MS[27]#80597L, MS[28]#80598L, MS[29]#80599L, MS[30]#80600L, MS[31]#80601L, MS[32]#80602L, MS[33]#80603L, MS[34]#80604L, MS[35]#80605L, MS[36]#80606L, MS[37]#80607L, MS[38]#80608L, MS[39]#80609L, MS[40]#80610L, MS[41]#80611L, MS[42]#80612L, MS[43]#80613L, MS[44]#80614L, MS[45]#80615L, MS[46]#80616L, MS[47]#80617L, MS[48]#80618L, MS[49]#80619L, MS[50]#80620L, MS[51]#80621L, sum#80783L, sum#80784, sum#80785, count#80786L]
Results [59]: [segment#80555, processing_day#80557, count#80787L, MS[0]#80622L, MS[1]#80623L, MS[2]#80624L, MS[3]#80625L, MS[4]#80626L, MS[5]#80627L, MS[6]#80628L, MS[7]#80629L, MS[8]#80630L, MS[9]#80631L, MS[10]#80632L, MS[11]#80633L, MS[12]#80634L, MS[13]#80635L, MS[14]#80636L, MS[15]#80637L, MS[16]#80638L, MS[17]#80639L, MS[18]#80640L, MS[19]#80641L, MS[20]#80642L, MS[21]#80643L, MS[22]#80644L, MS[23]#80645L, MS[24]#80646L, MS[25]#80647L, MS[26]#80648L, MS[27]#80649L, MS[28]#80650L, MS[29]#80651L, MS[30]#80652L, MS[31]#80653L, MS[32]#80654L, MS[33]#80655L, MS[34]#80656L, MS[35]#80657L, MS[36]#80658L, MS[37]#80659L, MS[38]#80660L, MS[39]#80661L, MS[40]#80662L, MS[41]#80663L, MS[42]#80664L, MS[43]#80665L, MS[44]#80666L, MS[45]#80667L, MS[46]#80668L, MS[47]#80669L, MS[48]#80670L, MS[49]#80671L, MS[50]#80672L, MS[51]#80673L, sum#80788L, sum#80789, sum#80790, count#80791L]
(5) Exchange
Input [59]: [segment#80555, processing_day#80557, count#80787L, MS[0]#80622L, MS[1]#80623L, MS[2]#80624L, MS[3]#80625L, MS[4]#80626L, MS[5]#80627L, MS[6]#80628L, MS[7]#80629L, MS[8]#80630L, MS[9]#80631L, MS[10]#80632L, MS[11]#80633L, MS[12]#80634L, MS[13]#80635L, MS[14]#80636L, MS[15]#80637L, MS[16]#80638L, MS[17]#80639L, MS[18]#80640L, MS[19]#80641L, MS[20]#80642L, MS[21]#80643L, MS[22]#80644L, MS[23]#80645L, MS[24]#80646L, MS[25]#80647L, MS[26]#80648L, MS[27]#80649L, MS[28]#80650L, MS[29]#80651L, MS[30]#80652L, MS[31]#80653L, MS[32]#80654L, MS[33]#80655L, MS[34]#80656L, MS[35]#80657L, MS[36]#80658L, MS[37]#80659L, MS[38]#80660L, MS[39]#80661L, MS[40]#80662L, MS[41]#80663L, MS[42]#80664L, MS[43]#80665L, MS[44]#80666L, MS[45]#80667L, MS[46]#80668L, MS[47]#80669L, MS[48]#80670L, MS[49]#80671L, MS[50]#80672L, MS[51]#80673L, sum#80788L, sum#80789, sum#80790, count#80791L]
Arguments: hashpartitioning(segment#80555, processing_day#80557, 200), ENSURE_REQUIREMENTS, [plan_id=7614]
(6) ShuffleQueryStage
Output [59]: [segment#80555, processing_day#80557, count#80787L, MS[0]#80622L, MS[1]#80623L, MS[2]#80624L, MS[3]#80625L, MS[4]#80626L, MS[5]#80627L, MS[6]#80628L, MS[7]#80629L, MS[8]#80630L, MS[9]#80631L, MS[10]#80632L, MS[11]#80633L, MS[12]#80634L, MS[13]#80635L, MS[14]#80636L, MS[15]#80637L, MS[16]#80638L, MS[17]#80639L, MS[18]#80640L, MS[19]#80641L, MS[20]#80642L, MS[21]#80643L, MS[22]#80644L, MS[23]#80645L, MS[24]#80646L, MS[25]#80647L, MS[26]#80648L, MS[27]#80649L, MS[28]#80650L, MS[29]#80651L, MS[30]#80652L, MS[31]#80653L, MS[32]#80654L, MS[33]#80655L, MS[34]#80656L, MS[35]#80657L, MS[36]#80658L, MS[37]#80659L, MS[38]#80660L, MS[39]#80661L, MS[40]#80662L, MS[41]#80663L, MS[42]#80664L, MS[43]#80665L, MS[44]#80666L, MS[45]#80667L, MS[46]#80668L, MS[47]#80669L, MS[48]#80670L, MS[49]#80671L, MS[50]#80672L, MS[51]#80673L, sum#80788L, sum#80789, sum#80790, count#80791L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#80555, processing_day#80557, count#80787L, MS[0]#80622L, MS[1]#80623L, MS[2]#80624L, MS[3]#80625L, MS[4]#80626L, MS[5]#80627L, MS[6]#80628L, MS[7]#80629L, MS[8]#80630L, MS[9]#80631L, MS[10]#80632L, MS[11]#80633L, MS[12]#80634L, MS[13]#80635L, MS[14]#80636L, MS[15]#80637L, MS[16]#80638L, MS[17]#80639L, MS[18]#80640L, MS[19]#80641L, MS[20]#80642L, MS[21]#80643L, MS[22]#80644L, MS[23]#80645L, MS[24]#80646L, MS[25]#80647L, MS[26]#80648L, MS[27]#80649L, MS[28]#80650L, MS[29]#80651L, MS[30]#80652L, MS[31]#80653L, MS[32]#80654L, MS[33]#80655L, MS[34]#80656L, MS[35]#80657L, MS[36]#80658L, MS[37]#80659L, MS[38]#80660L, MS[39]#80661L, MS[40]#80662L, MS[41]#80663L, MS[42]#80664L, MS[43]#80665L, MS[44]#80666L, MS[45]#80667L, MS[46]#80668L, MS[47]#80669L, MS[48]#80670L, MS[49]#80671L, MS[50]#80672L, MS[51]#80673L, sum#80788L, sum#80789, sum#80790, count#80791L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#80555, processing_day#80557, count#80787L, MS[0]#80622L, MS[1]#80623L, MS[2]#80624L, MS[3]#80625L, MS[4]#80626L, MS[5]#80627L, MS[6]#80628L, MS[7]#80629L, MS[8]#80630L, MS[9]#80631L, MS[10]#80632L, MS[11]#80633L, MS[12]#80634L, MS[13]#80635L, MS[14]#80636L, MS[15]#80637L, MS[16]#80638L, MS[17]#80639L, MS[18]#80640L, MS[19]#80641L, MS[20]#80642L, MS[21]#80643L, MS[22]#80644L, MS[23]#80645L, MS[24]#80646L, MS[25]#80647L, MS[26]#80648L, MS[27]#80649L, MS[28]#80650L, MS[29]#80651L, MS[30]#80652L, MS[31]#80653L, MS[32]#80654L, MS[33]#80655L, MS[34]#80656L, MS[35]#80657L, MS[36]#80658L, MS[37]#80659L, MS[38]#80660L, MS[39]#80661L, MS[40]#80662L, MS[41]#80663L, MS[42]#80664L, MS[43]#80665L, MS[44]#80666L, MS[45]#80667L, MS[46]#80668L, MS[47]#80669L, MS[48]#80670L, MS[49]#80671L, MS[50]#80672L, MS[51]#80673L, sum#80788L, sum#80789, sum#80790, count#80791L]
Keys [2]: [segment#80555, processing_day#80557]
Functions [5]: [count(1), approx_count_distinct(customer_id#80551L, 0.05, 0, 0), sum(events#80561), sum(weighted_amount#80563), avg(amount#80559)]
Aggregate Attributes [5]: [count(1)#80569L, approx_count_distinct(customer_id#80551L, 0.05, 0, 0)#80674L, sum(events#80561)#80675L, sum(weighted_amount#80563)#80676, avg(amount#80559)#80677]
Results [7]: [segment#80555, processing_day#80557, count(1)#80569L AS row_count#80564L, approx_count_distinct(customer_id#80551L, 0.05, 0, 0)#80674L AS unique_customers#80565L, sum(events#80561)#80675L AS event_sum#80566L, sum(weighted_amount#80563)#80676 AS weighted_amount_sum#80567, avg(amount#80559)#80677 AS avg_amount#80568]
(9) Exchange
Input [7]: [segment#80555, processing_day#80557, row_count#80564L, unique_customers#80565L, event_sum#80566L, weighted_amount_sum#80567, avg_amount#80568]
Arguments: rangepartitioning(segment#80555 ASC NULLS FIRST, processing_day#80557 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=7636]
(10) ShuffleQueryStage
Output [7]: [segment#80555, processing_day#80557, row_count#80564L, unique_customers#80565L, event_sum#80566L, weighted_amount_sum#80567, avg_amount#80568]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#80555, processing_day#80557, row_count#80564L, unique_customers#80565L, event_sum#80566L, weighted_amount_sum#80567, avg_amount#80568]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#80555, processing_day#80557, row_count#80564L, unique_customers#80565L, event_sum#80566L, weighted_amount_sum#80567, avg_amount#80568]
Arguments: [segment#80555 ASC NULLS FIRST, processing_day#80557 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#80555, processing_day#80557, row_count#80564L, unique_customers#80565L, event_sum#80566L, weighted_amount_sum#80567, avg_amount#80568]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#80551L, segment#80555, processing_day#80557, amount#80559, events#80561, weighted_amount#80563]
Keys [2]: [segment#80555, processing_day#80557]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#80551L, 0.05, 0, 0), partial_sum(events#80561), partial_sum(weighted_amount#80563), partial_avg(amount#80559)]
Aggregate Attributes [57]: [count#80782L, MS[0]#80570L, MS[1]#80571L, MS[2]#80572L, MS[3]#80573L, MS[4]#80574L, MS[5]#80575L, MS[6]#80576L, MS[7]#80577L, MS[8]#80578L, MS[9]#80579L, MS[10]#80580L, MS[11]#80581L, MS[12]#80582L, MS[13]#80583L, MS[14]#80584L, MS[15]#80585L, MS[16]#80586L, MS[17]#80587L, MS[18]#80588L, MS[19]#80589L, MS[20]#80590L, MS[21]#80591L, MS[22]#80592L, MS[23]#80593L, MS[24]#80594L, MS[25]#80595L, MS[26]#80596L, MS[27]#80597L, MS[28]#80598L, MS[29]#80599L, MS[30]#80600L, MS[31]#80601L, MS[32]#80602L, MS[33]#80603L, MS[34]#80604L, MS[35]#80605L, MS[36]#80606L, MS[37]#80607L, MS[38]#80608L, MS[39]#80609L, MS[40]#80610L, MS[41]#80611L, MS[42]#80612L, MS[43]#80613L, MS[44]#80614L, MS[45]#80615L, MS[46]#80616L, MS[47]#80617L, MS[48]#80618L, MS[49]#80619L, MS[50]#80620L, MS[51]#80621L, sum#80783L, sum#80784, sum#80785, count#80786L]
Results [59]: [segment#80555, processing_day#80557, count#80787L, MS[0]#80622L, MS[1]#80623L, MS[2]#80624L, MS[3]#80625L, MS[4]#80626L, MS[5]#80627L, MS[6]#80628L, MS[7]#80629L, MS[8]#80630L, MS[9]#80631L, MS[10]#80632L, MS[11]#80633L, MS[12]#80634L, MS[13]#80635L, MS[14]#80636L, MS[15]#80637L, MS[16]#80638L, MS[17]#80639L, MS[18]#80640L, MS[19]#80641L, MS[20]#80642L, MS[21]#80643L, MS[22]#80644L, MS[23]#80645L, MS[24]#80646L, MS[25]#80647L, MS[26]#80648L, MS[27]#80649L, MS[28]#80650L, MS[29]#80651L, MS[30]#80652L, MS[31]#80653L, MS[32]#80654L, MS[33]#80655L, MS[34]#80656L, MS[35]#80657L, MS[36]#80658L, MS[37]#80659L, MS[38]#80660L, MS[39]#80661L, MS[40]#80662L, MS[41]#80663L, MS[42]#80664L, MS[43]#80665L, MS[44]#80666L, MS[45]#80667L, MS[46]#80668L, MS[47]#80669L, MS[48]#80670L, MS[49]#80671L, MS[50]#80672L, MS[51]#80673L, sum#80788L, sum#80789, sum#80790, count#80791L]
(15) Exchange
Input [59]: [segment#80555, processing_day#80557, count#80787L, MS[0]#80622L, MS[1]#80623L, MS[2]#80624L, MS[3]#80625L, MS[4]#80626L, MS[5]#80627L, MS[6]#80628L, MS[7]#80629L, MS[8]#80630L, MS[9]#80631L, MS[10]#80632L, MS[11]#80633L, MS[12]#80634L, MS[13]#80635L, MS[14]#80636L, MS[15]#80637L, MS[16]#80638L, MS[17]#80639L, MS[18]#80640L, MS[19]#80641L, MS[20]#80642L, MS[21]#80643L, MS[22]#80644L, MS[23]#80645L, MS[24]#80646L, MS[25]#80647L, MS[26]#80648L, MS[27]#80649L, MS[28]#80650L, MS[29]#80651L, MS[30]#80652L, MS[31]#80653L, MS[32]#80654L, MS[33]#80655L, MS[34]#80656L, MS[35]#80657L, MS[36]#80658L, MS[37]#80659L, MS[38]#80660L, MS[39]#80661L, MS[40]#80662L, MS[41]#80663L, MS[42]#80664L, MS[43]#80665L, MS[44]#80666L, MS[45]#80667L, MS[46]#80668L, MS[47]#80669L, MS[48]#80670L, MS[49]#80671L, MS[50]#80672L, MS[51]#80673L, sum#80788L, sum#80789, sum#80790, count#80791L]
Arguments: hashpartitioning(segment#80555, processing_day#80557, 200), ENSURE_REQUIREMENTS, [plan_id=7594]
(16) HashAggregate
Input [59]: [segment#80555, processing_day#80557, count#80787L, MS[0]#80622L, MS[1]#80623L, MS[2]#80624L, MS[3]#80625L, MS[4]#80626L, MS[5]#80627L, MS[6]#80628L, MS[7]#80629L, MS[8]#80630L, MS[9]#80631L, MS[10]#80632L, MS[11]#80633L, MS[12]#80634L, MS[13]#80635L, MS[14]#80636L, MS[15]#80637L, MS[16]#80638L, MS[17]#80639L, MS[18]#80640L, MS[19]#80641L, MS[20]#80642L, MS[21]#80643L, MS[22]#80644L, MS[23]#80645L, MS[24]#80646L, MS[25]#80647L, MS[26]#80648L, MS[27]#80649L, MS[28]#80650L, MS[29]#80651L, MS[30]#80652L, MS[31]#80653L, MS[32]#80654L, MS[33]#80655L, MS[34]#80656L, MS[35]#80657L, MS[36]#80658L, MS[37]#80659L, MS[38]#80660L, MS[39]#80661L, MS[40]#80662L, MS[41]#80663L, MS[42]#80664L, MS[43]#80665L, MS[44]#80666L, MS[45]#80667L, MS[46]#80668L, MS[47]#80669L, MS[48]#80670L, MS[49]#80671L, MS[50]#80672L, MS[51]#80673L, sum#80788L, sum#80789, sum#80790, count#80791L]
Keys [2]: [segment#80555, processing_day#80557]
Functions [5]: [count(1), approx_count_distinct(customer_id#80551L, 0.05, 0, 0), sum(events#80561), sum(weighted_amount#80563), avg(amount#80559)]
Aggregate Attributes [5]: [count(1)#80569L, approx_count_distinct(customer_id#80551L, 0.05, 0, 0)#80674L, sum(events#80561)#80675L, sum(weighted_amount#80563)#80676, avg(amount#80559)#80677]
Results [7]: [segment#80555, processing_day#80557, count(1)#80569L AS row_count#80564L, approx_count_distinct(customer_id#80551L, 0.05, 0, 0)#80674L AS unique_customers#80565L, sum(events#80561)#80675L AS event_sum#80566L, sum(weighted_amount#80563)#80676 AS weighted_amount_sum#80567, avg(amount#80559)#80677 AS avg_amount#80568]
(17) Exchange
Input [7]: [segment#80555, processing_day#80557, row_count#80564L, unique_customers#80565L, event_sum#80566L, weighted_amount_sum#80567, avg_amount#80568]
Arguments: rangepartitioning(segment#80555 ASC NULLS FIRST, processing_day#80557 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=7597]
(18) Sort
Input [7]: [segment#80555, processing_day#80557, row_count#80564L, unique_customers#80565L, event_sum#80566L, weighted_amount_sum#80567, avg_amount#80568]
Arguments: [segment#80555 ASC NULLS FIRST, processing_day#80557 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#80555, processing_day#80557, row_count#80564L, unique_customers#80565L, event_sum#80566L, weighted_amount_sum#80567, avg_amount#80568]
Arguments: isFinalPlan=true