== 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#47807L]
Arguments: Range (6000000, 7000000, step=1, splits=Some(24))
(2) Project [codegen id : 1]
Output [5]: [(id#47807L % 250000) AS customer_id#47809L, concat(segment-, cast(cast((id#47807L % 12) as int) as string)) AS segment#47813, cast((id#47807L % 14) as int) AS processing_day#47815, ((cast(((id#47807L * 17) % 1000) as double) / 10.0) + 1.0) AS amount#47817, cast((((id#47807L * 29) % 7) + 1) as int) AS events#47819]
Input [1]: [id#47807L]
(3) Project [codegen id : 1]
Output [6]: [customer_id#47809L, segment#47813, processing_day#47815, amount#47817, events#47819, (amount#47817 * cast(events#47819 as double)) AS weighted_amount#47821]
Input [5]: [customer_id#47809L, segment#47813, processing_day#47815, amount#47817, events#47819]
(4) HashAggregate
Input [6]: [customer_id#47809L, segment#47813, processing_day#47815, amount#47817, events#47819, weighted_amount#47821]
Keys [2]: [segment#47813, processing_day#47815]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#47809L, 0.05, 0, 0), partial_sum(events#47819), partial_sum(weighted_amount#47821), partial_avg(amount#47817)]
Aggregate Attributes [57]: [count#48040L, MS[0]#47828L, MS[1]#47829L, MS[2]#47830L, MS[3]#47831L, MS[4]#47832L, MS[5]#47833L, MS[6]#47834L, MS[7]#47835L, MS[8]#47836L, MS[9]#47837L, MS[10]#47838L, MS[11]#47839L, MS[12]#47840L, MS[13]#47841L, MS[14]#47842L, MS[15]#47843L, MS[16]#47844L, MS[17]#47845L, MS[18]#47846L, MS[19]#47847L, MS[20]#47848L, MS[21]#47849L, MS[22]#47850L, MS[23]#47851L, MS[24]#47852L, MS[25]#47853L, MS[26]#47854L, MS[27]#47855L, MS[28]#47856L, MS[29]#47857L, MS[30]#47858L, MS[31]#47859L, MS[32]#47860L, MS[33]#47861L, MS[34]#47862L, MS[35]#47863L, MS[36]#47864L, MS[37]#47865L, MS[38]#47866L, MS[39]#47867L, MS[40]#47868L, MS[41]#47869L, MS[42]#47870L, MS[43]#47871L, MS[44]#47872L, MS[45]#47873L, MS[46]#47874L, MS[47]#47875L, MS[48]#47876L, MS[49]#47877L, MS[50]#47878L, MS[51]#47879L, sum#48041L, sum#48042, sum#48043, count#48044L]
Results [59]: [segment#47813, processing_day#47815, count#48045L, MS[0]#47880L, MS[1]#47881L, MS[2]#47882L, MS[3]#47883L, MS[4]#47884L, MS[5]#47885L, MS[6]#47886L, MS[7]#47887L, MS[8]#47888L, MS[9]#47889L, MS[10]#47890L, MS[11]#47891L, MS[12]#47892L, MS[13]#47893L, MS[14]#47894L, MS[15]#47895L, MS[16]#47896L, MS[17]#47897L, MS[18]#47898L, MS[19]#47899L, MS[20]#47900L, MS[21]#47901L, MS[22]#47902L, MS[23]#47903L, MS[24]#47904L, MS[25]#47905L, MS[26]#47906L, MS[27]#47907L, MS[28]#47908L, MS[29]#47909L, MS[30]#47910L, MS[31]#47911L, MS[32]#47912L, MS[33]#47913L, MS[34]#47914L, MS[35]#47915L, MS[36]#47916L, MS[37]#47917L, MS[38]#47918L, MS[39]#47919L, MS[40]#47920L, MS[41]#47921L, MS[42]#47922L, MS[43]#47923L, MS[44]#47924L, MS[45]#47925L, MS[46]#47926L, MS[47]#47927L, MS[48]#47928L, MS[49]#47929L, MS[50]#47930L, MS[51]#47931L, sum#48046L, sum#48047, sum#48048, count#48049L]
(5) Exchange
Input [59]: [segment#47813, processing_day#47815, count#48045L, MS[0]#47880L, MS[1]#47881L, MS[2]#47882L, MS[3]#47883L, MS[4]#47884L, MS[5]#47885L, MS[6]#47886L, MS[7]#47887L, MS[8]#47888L, MS[9]#47889L, MS[10]#47890L, MS[11]#47891L, MS[12]#47892L, MS[13]#47893L, MS[14]#47894L, MS[15]#47895L, MS[16]#47896L, MS[17]#47897L, MS[18]#47898L, MS[19]#47899L, MS[20]#47900L, MS[21]#47901L, MS[22]#47902L, MS[23]#47903L, MS[24]#47904L, MS[25]#47905L, MS[26]#47906L, MS[27]#47907L, MS[28]#47908L, MS[29]#47909L, MS[30]#47910L, MS[31]#47911L, MS[32]#47912L, MS[33]#47913L, MS[34]#47914L, MS[35]#47915L, MS[36]#47916L, MS[37]#47917L, MS[38]#47918L, MS[39]#47919L, MS[40]#47920L, MS[41]#47921L, MS[42]#47922L, MS[43]#47923L, MS[44]#47924L, MS[45]#47925L, MS[46]#47926L, MS[47]#47927L, MS[48]#47928L, MS[49]#47929L, MS[50]#47930L, MS[51]#47931L, sum#48046L, sum#48047, sum#48048, count#48049L]
Arguments: hashpartitioning(segment#47813, processing_day#47815, 200), ENSURE_REQUIREMENTS, [plan_id=4537]
(6) ShuffleQueryStage
Output [59]: [segment#47813, processing_day#47815, count#48045L, MS[0]#47880L, MS[1]#47881L, MS[2]#47882L, MS[3]#47883L, MS[4]#47884L, MS[5]#47885L, MS[6]#47886L, MS[7]#47887L, MS[8]#47888L, MS[9]#47889L, MS[10]#47890L, MS[11]#47891L, MS[12]#47892L, MS[13]#47893L, MS[14]#47894L, MS[15]#47895L, MS[16]#47896L, MS[17]#47897L, MS[18]#47898L, MS[19]#47899L, MS[20]#47900L, MS[21]#47901L, MS[22]#47902L, MS[23]#47903L, MS[24]#47904L, MS[25]#47905L, MS[26]#47906L, MS[27]#47907L, MS[28]#47908L, MS[29]#47909L, MS[30]#47910L, MS[31]#47911L, MS[32]#47912L, MS[33]#47913L, MS[34]#47914L, MS[35]#47915L, MS[36]#47916L, MS[37]#47917L, MS[38]#47918L, MS[39]#47919L, MS[40]#47920L, MS[41]#47921L, MS[42]#47922L, MS[43]#47923L, MS[44]#47924L, MS[45]#47925L, MS[46]#47926L, MS[47]#47927L, MS[48]#47928L, MS[49]#47929L, MS[50]#47930L, MS[51]#47931L, sum#48046L, sum#48047, sum#48048, count#48049L]
Arguments: 0
(7) AQEShuffleRead
Input [59]: [segment#47813, processing_day#47815, count#48045L, MS[0]#47880L, MS[1]#47881L, MS[2]#47882L, MS[3]#47883L, MS[4]#47884L, MS[5]#47885L, MS[6]#47886L, MS[7]#47887L, MS[8]#47888L, MS[9]#47889L, MS[10]#47890L, MS[11]#47891L, MS[12]#47892L, MS[13]#47893L, MS[14]#47894L, MS[15]#47895L, MS[16]#47896L, MS[17]#47897L, MS[18]#47898L, MS[19]#47899L, MS[20]#47900L, MS[21]#47901L, MS[22]#47902L, MS[23]#47903L, MS[24]#47904L, MS[25]#47905L, MS[26]#47906L, MS[27]#47907L, MS[28]#47908L, MS[29]#47909L, MS[30]#47910L, MS[31]#47911L, MS[32]#47912L, MS[33]#47913L, MS[34]#47914L, MS[35]#47915L, MS[36]#47916L, MS[37]#47917L, MS[38]#47918L, MS[39]#47919L, MS[40]#47920L, MS[41]#47921L, MS[42]#47922L, MS[43]#47923L, MS[44]#47924L, MS[45]#47925L, MS[46]#47926L, MS[47]#47927L, MS[48]#47928L, MS[49]#47929L, MS[50]#47930L, MS[51]#47931L, sum#48046L, sum#48047, sum#48048, count#48049L]
Arguments: coalesced
(8) HashAggregate
Input [59]: [segment#47813, processing_day#47815, count#48045L, MS[0]#47880L, MS[1]#47881L, MS[2]#47882L, MS[3]#47883L, MS[4]#47884L, MS[5]#47885L, MS[6]#47886L, MS[7]#47887L, MS[8]#47888L, MS[9]#47889L, MS[10]#47890L, MS[11]#47891L, MS[12]#47892L, MS[13]#47893L, MS[14]#47894L, MS[15]#47895L, MS[16]#47896L, MS[17]#47897L, MS[18]#47898L, MS[19]#47899L, MS[20]#47900L, MS[21]#47901L, MS[22]#47902L, MS[23]#47903L, MS[24]#47904L, MS[25]#47905L, MS[26]#47906L, MS[27]#47907L, MS[28]#47908L, MS[29]#47909L, MS[30]#47910L, MS[31]#47911L, MS[32]#47912L, MS[33]#47913L, MS[34]#47914L, MS[35]#47915L, MS[36]#47916L, MS[37]#47917L, MS[38]#47918L, MS[39]#47919L, MS[40]#47920L, MS[41]#47921L, MS[42]#47922L, MS[43]#47923L, MS[44]#47924L, MS[45]#47925L, MS[46]#47926L, MS[47]#47927L, MS[48]#47928L, MS[49]#47929L, MS[50]#47930L, MS[51]#47931L, sum#48046L, sum#48047, sum#48048, count#48049L]
Keys [2]: [segment#47813, processing_day#47815]
Functions [5]: [count(1), approx_count_distinct(customer_id#47809L, 0.05, 0, 0), sum(events#47819), sum(weighted_amount#47821), avg(amount#47817)]
Aggregate Attributes [5]: [count(1)#47827L, approx_count_distinct(customer_id#47809L, 0.05, 0, 0)#47932L, sum(events#47819)#47933L, sum(weighted_amount#47821)#47934, avg(amount#47817)#47935]
Results [7]: [segment#47813, processing_day#47815, count(1)#47827L AS row_count#47822L, approx_count_distinct(customer_id#47809L, 0.05, 0, 0)#47932L AS unique_customers#47823L, sum(events#47819)#47933L AS event_sum#47824L, sum(weighted_amount#47821)#47934 AS weighted_amount_sum#47825, avg(amount#47817)#47935 AS avg_amount#47826]
(9) Exchange
Input [7]: [segment#47813, processing_day#47815, row_count#47822L, unique_customers#47823L, event_sum#47824L, weighted_amount_sum#47825, avg_amount#47826]
Arguments: rangepartitioning(segment#47813 ASC NULLS FIRST, processing_day#47815 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=4559]
(10) ShuffleQueryStage
Output [7]: [segment#47813, processing_day#47815, row_count#47822L, unique_customers#47823L, event_sum#47824L, weighted_amount_sum#47825, avg_amount#47826]
Arguments: 1
(11) AQEShuffleRead
Input [7]: [segment#47813, processing_day#47815, row_count#47822L, unique_customers#47823L, event_sum#47824L, weighted_amount_sum#47825, avg_amount#47826]
Arguments: coalesced
(12) Sort [codegen id : 2]
Input [7]: [segment#47813, processing_day#47815, row_count#47822L, unique_customers#47823L, event_sum#47824L, weighted_amount_sum#47825, avg_amount#47826]
Arguments: [segment#47813 ASC NULLS FIRST, processing_day#47815 ASC NULLS FIRST], true, 0
(13) ResultQueryStage
Output [7]: [segment#47813, processing_day#47815, row_count#47822L, unique_customers#47823L, event_sum#47824L, weighted_amount_sum#47825, avg_amount#47826]
Arguments: 2
(14) HashAggregate
Input [6]: [customer_id#47809L, segment#47813, processing_day#47815, amount#47817, events#47819, weighted_amount#47821]
Keys [2]: [segment#47813, processing_day#47815]
Functions [5]: [partial_count(1), partial_approx_count_distinct(customer_id#47809L, 0.05, 0, 0), partial_sum(events#47819), partial_sum(weighted_amount#47821), partial_avg(amount#47817)]
Aggregate Attributes [57]: [count#48040L, MS[0]#47828L, MS[1]#47829L, MS[2]#47830L, MS[3]#47831L, MS[4]#47832L, MS[5]#47833L, MS[6]#47834L, MS[7]#47835L, MS[8]#47836L, MS[9]#47837L, MS[10]#47838L, MS[11]#47839L, MS[12]#47840L, MS[13]#47841L, MS[14]#47842L, MS[15]#47843L, MS[16]#47844L, MS[17]#47845L, MS[18]#47846L, MS[19]#47847L, MS[20]#47848L, MS[21]#47849L, MS[22]#47850L, MS[23]#47851L, MS[24]#47852L, MS[25]#47853L, MS[26]#47854L, MS[27]#47855L, MS[28]#47856L, MS[29]#47857L, MS[30]#47858L, MS[31]#47859L, MS[32]#47860L, MS[33]#47861L, MS[34]#47862L, MS[35]#47863L, MS[36]#47864L, MS[37]#47865L, MS[38]#47866L, MS[39]#47867L, MS[40]#47868L, MS[41]#47869L, MS[42]#47870L, MS[43]#47871L, MS[44]#47872L, MS[45]#47873L, MS[46]#47874L, MS[47]#47875L, MS[48]#47876L, MS[49]#47877L, MS[50]#47878L, MS[51]#47879L, sum#48041L, sum#48042, sum#48043, count#48044L]
Results [59]: [segment#47813, processing_day#47815, count#48045L, MS[0]#47880L, MS[1]#47881L, MS[2]#47882L, MS[3]#47883L, MS[4]#47884L, MS[5]#47885L, MS[6]#47886L, MS[7]#47887L, MS[8]#47888L, MS[9]#47889L, MS[10]#47890L, MS[11]#47891L, MS[12]#47892L, MS[13]#47893L, MS[14]#47894L, MS[15]#47895L, MS[16]#47896L, MS[17]#47897L, MS[18]#47898L, MS[19]#47899L, MS[20]#47900L, MS[21]#47901L, MS[22]#47902L, MS[23]#47903L, MS[24]#47904L, MS[25]#47905L, MS[26]#47906L, MS[27]#47907L, MS[28]#47908L, MS[29]#47909L, MS[30]#47910L, MS[31]#47911L, MS[32]#47912L, MS[33]#47913L, MS[34]#47914L, MS[35]#47915L, MS[36]#47916L, MS[37]#47917L, MS[38]#47918L, MS[39]#47919L, MS[40]#47920L, MS[41]#47921L, MS[42]#47922L, MS[43]#47923L, MS[44]#47924L, MS[45]#47925L, MS[46]#47926L, MS[47]#47927L, MS[48]#47928L, MS[49]#47929L, MS[50]#47930L, MS[51]#47931L, sum#48046L, sum#48047, sum#48048, count#48049L]
(15) Exchange
Input [59]: [segment#47813, processing_day#47815, count#48045L, MS[0]#47880L, MS[1]#47881L, MS[2]#47882L, MS[3]#47883L, MS[4]#47884L, MS[5]#47885L, MS[6]#47886L, MS[7]#47887L, MS[8]#47888L, MS[9]#47889L, MS[10]#47890L, MS[11]#47891L, MS[12]#47892L, MS[13]#47893L, MS[14]#47894L, MS[15]#47895L, MS[16]#47896L, MS[17]#47897L, MS[18]#47898L, MS[19]#47899L, MS[20]#47900L, MS[21]#47901L, MS[22]#47902L, MS[23]#47903L, MS[24]#47904L, MS[25]#47905L, MS[26]#47906L, MS[27]#47907L, MS[28]#47908L, MS[29]#47909L, MS[30]#47910L, MS[31]#47911L, MS[32]#47912L, MS[33]#47913L, MS[34]#47914L, MS[35]#47915L, MS[36]#47916L, MS[37]#47917L, MS[38]#47918L, MS[39]#47919L, MS[40]#47920L, MS[41]#47921L, MS[42]#47922L, MS[43]#47923L, MS[44]#47924L, MS[45]#47925L, MS[46]#47926L, MS[47]#47927L, MS[48]#47928L, MS[49]#47929L, MS[50]#47930L, MS[51]#47931L, sum#48046L, sum#48047, sum#48048, count#48049L]
Arguments: hashpartitioning(segment#47813, processing_day#47815, 200), ENSURE_REQUIREMENTS, [plan_id=4517]
(16) HashAggregate
Input [59]: [segment#47813, processing_day#47815, count#48045L, MS[0]#47880L, MS[1]#47881L, MS[2]#47882L, MS[3]#47883L, MS[4]#47884L, MS[5]#47885L, MS[6]#47886L, MS[7]#47887L, MS[8]#47888L, MS[9]#47889L, MS[10]#47890L, MS[11]#47891L, MS[12]#47892L, MS[13]#47893L, MS[14]#47894L, MS[15]#47895L, MS[16]#47896L, MS[17]#47897L, MS[18]#47898L, MS[19]#47899L, MS[20]#47900L, MS[21]#47901L, MS[22]#47902L, MS[23]#47903L, MS[24]#47904L, MS[25]#47905L, MS[26]#47906L, MS[27]#47907L, MS[28]#47908L, MS[29]#47909L, MS[30]#47910L, MS[31]#47911L, MS[32]#47912L, MS[33]#47913L, MS[34]#47914L, MS[35]#47915L, MS[36]#47916L, MS[37]#47917L, MS[38]#47918L, MS[39]#47919L, MS[40]#47920L, MS[41]#47921L, MS[42]#47922L, MS[43]#47923L, MS[44]#47924L, MS[45]#47925L, MS[46]#47926L, MS[47]#47927L, MS[48]#47928L, MS[49]#47929L, MS[50]#47930L, MS[51]#47931L, sum#48046L, sum#48047, sum#48048, count#48049L]
Keys [2]: [segment#47813, processing_day#47815]
Functions [5]: [count(1), approx_count_distinct(customer_id#47809L, 0.05, 0, 0), sum(events#47819), sum(weighted_amount#47821), avg(amount#47817)]
Aggregate Attributes [5]: [count(1)#47827L, approx_count_distinct(customer_id#47809L, 0.05, 0, 0)#47932L, sum(events#47819)#47933L, sum(weighted_amount#47821)#47934, avg(amount#47817)#47935]
Results [7]: [segment#47813, processing_day#47815, count(1)#47827L AS row_count#47822L, approx_count_distinct(customer_id#47809L, 0.05, 0, 0)#47932L AS unique_customers#47823L, sum(events#47819)#47933L AS event_sum#47824L, sum(weighted_amount#47821)#47934 AS weighted_amount_sum#47825, avg(amount#47817)#47935 AS avg_amount#47826]
(17) Exchange
Input [7]: [segment#47813, processing_day#47815, row_count#47822L, unique_customers#47823L, event_sum#47824L, weighted_amount_sum#47825, avg_amount#47826]
Arguments: rangepartitioning(segment#47813 ASC NULLS FIRST, processing_day#47815 ASC NULLS FIRST, 200), ENSURE_REQUIREMENTS, [plan_id=4520]
(18) Sort
Input [7]: [segment#47813, processing_day#47815, row_count#47822L, unique_customers#47823L, event_sum#47824L, weighted_amount_sum#47825, avg_amount#47826]
Arguments: [segment#47813 ASC NULLS FIRST, processing_day#47815 ASC NULLS FIRST], true, 0
(19) AdaptiveSparkPlan
Output [7]: [segment#47813, processing_day#47815, row_count#47822L, unique_customers#47823L, event_sum#47824L, weighted_amount_sum#47825, avg_amount#47826]
Arguments: isFinalPlan=true