@@ -55,22 +55,22 @@ struct<plan:string>
55
55
56
56
== Analyzed Logical Plan ==
57
57
sum(DISTINCT val): bigint
58
- Aggregate [sum(distinct cast( val#x as bigint) ) AS sum(DISTINCT val)#xL]
58
+ Aggregate [sum(distinct val#x) AS sum(DISTINCT val)#xL]
59
59
+- SubqueryAlias spark_catalog.default.explain_temp1
60
60
+- Relation[key#x,val#x] parquet
61
61
62
62
== Optimized Logical Plan ==
63
- Aggregate [sum(distinct cast( val#x as bigint) ) AS sum(DISTINCT val)#xL]
63
+ Aggregate [sum(distinct val#x) AS sum(DISTINCT val)#xL]
64
64
+- Project [val#x]
65
65
+- Relation[key#x,val#x] parquet
66
66
67
67
== Physical Plan ==
68
- *HashAggregate(keys=[], functions=[sum(distinct cast( val#x as bigint)#xL )], output=[sum(DISTINCT val)#xL])
68
+ *HashAggregate(keys=[], functions=[sum(distinct val#x)], output=[sum(DISTINCT val)#xL])
69
69
+- Exchange SinglePartition, ENSURE_REQUIREMENTS, [id=#x]
70
- +- *HashAggregate(keys=[], functions=[partial_sum(distinct cast( val#x as bigint)#xL )], output=[sum#xL])
71
- +- *HashAggregate(keys=[cast( val#x as bigint)#xL ], functions=[], output=[cast( val#x as bigint)#xL ])
72
- +- Exchange hashpartitioning(cast( val#x as bigint)#xL , 4), ENSURE_REQUIREMENTS, [id=#x]
73
- +- *HashAggregate(keys=[cast( val#x as bigint) AS cast(val#x as bigint)#xL ], functions=[], output=[cast( val#x as bigint)#xL ])
70
+ +- *HashAggregate(keys=[], functions=[partial_sum(distinct val#x)], output=[sum#xL])
71
+ +- *HashAggregate(keys=[val#x], functions=[], output=[val#x])
72
+ +- Exchange hashpartitioning(val#x, 4), ENSURE_REQUIREMENTS, [id=#x]
73
+ +- *HashAggregate(keys=[val#x], functions=[], output=[val#x])
74
74
+- *ColumnarToRow
75
75
+- FileScan parquet default.explain_temp1[val#x] Batched: true, DataFilters: [], Format: Parquet, Location [not included in comparison]/{warehouse_dir}/explain_temp1], PartitionFilters: [], PushedFilters: [], ReadSchema: struct<val:int>
76
76
@@ -620,7 +620,7 @@ Input [2]: [key#x, val#x]
620
620
(15) HashAggregate [codegen id : 1]
621
621
Input [1]: [key#x]
622
622
Keys: []
623
- Functions [1]: [partial_avg(cast( key#x as bigint) )]
623
+ Functions [1]: [partial_avg(key#x)]
624
624
Aggregate Attributes [2]: [sum#x, count#xL]
625
625
Results [2]: [sum#x, count#xL]
626
626
@@ -631,9 +631,9 @@ Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#x]
631
631
(17) HashAggregate [codegen id : 2]
632
632
Input [2]: [sum#x, count#xL]
633
633
Keys: []
634
- Functions [1]: [avg(cast( key#x as bigint) )]
635
- Aggregate Attributes [1]: [avg(cast( key#x as bigint) )#x]
636
- Results [1]: [avg(cast( key#x as bigint) )#x AS avg(key)#x]
634
+ Functions [1]: [avg(key#x)]
635
+ Aggregate Attributes [1]: [avg(key#x)#x]
636
+ Results [1]: [avg(key#x)#x AS avg(key)#x]
637
637
638
638
639
639
-- !query
@@ -684,7 +684,7 @@ Input [1]: [key#x]
684
684
(6) HashAggregate [codegen id : 1]
685
685
Input [1]: [key#x]
686
686
Keys: []
687
- Functions [1]: [partial_avg(cast( key#x as bigint) )]
687
+ Functions [1]: [partial_avg(key#x)]
688
688
Aggregate Attributes [2]: [sum#x, count#xL]
689
689
Results [2]: [sum#x, count#xL]
690
690
@@ -695,9 +695,9 @@ Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#x]
695
695
(8) HashAggregate [codegen id : 2]
696
696
Input [2]: [sum#x, count#xL]
697
697
Keys: []
698
- Functions [1]: [avg(cast( key#x as bigint) )]
699
- Aggregate Attributes [1]: [avg(cast( key#x as bigint) )#x]
700
- Results [1]: [avg(cast( key#x as bigint) )#x AS avg(key)#x]
698
+ Functions [1]: [avg(key#x)]
699
+ Aggregate Attributes [1]: [avg(key#x)#x]
700
+ Results [1]: [avg(key#x)#x AS avg(key)#x]
701
701
702
702
Subquery:2 Hosting operator id = 3 Hosting Expression = ReusedSubquery Subquery scalar-subquery#x, [id=#x]
703
703
@@ -895,7 +895,7 @@ Input [2]: [key#x, val#x]
895
895
(3) HashAggregate [codegen id : 1]
896
896
Input [2]: [key#x, val#x]
897
897
Keys: []
898
- Functions [3]: [partial_count(val#x), partial_sum(cast( key#x as bigint) ), partial_count(key#x) FILTER (WHERE (val#x > 1))]
898
+ Functions [3]: [partial_count(val#x), partial_sum(key#x), partial_count(key#x) FILTER (WHERE (val#x > 1))]
899
899
Aggregate Attributes [3]: [count#xL, sum#xL, count#xL]
900
900
Results [3]: [count#xL, sum#xL, count#xL]
901
901
@@ -906,9 +906,9 @@ Arguments: SinglePartition, ENSURE_REQUIREMENTS, [id=#x]
906
906
(5) HashAggregate [codegen id : 2]
907
907
Input [3]: [count#xL, sum#xL, count#xL]
908
908
Keys: []
909
- Functions [3]: [count(val#x), sum(cast( key#x as bigint) ), count(key#x)]
910
- Aggregate Attributes [3]: [count(val#x)#xL, sum(cast( key#x as bigint) )#xL, count(key#x)#xL]
911
- Results [2]: [(count(val#x)#xL + sum(cast( key#x as bigint) )#xL) AS TOTAL#xL, count(key#x)#xL AS count(key) FILTER (WHERE (val > 1))#xL]
909
+ Functions [3]: [count(val#x), sum(key#x), count(key#x)]
910
+ Aggregate Attributes [3]: [count(val#x)#xL, sum(key#x)#xL, count(key#x)#xL]
911
+ Results [2]: [(count(val#x)#xL + sum(key#x)#xL) AS TOTAL#xL, count(key#x)#xL AS count(key) FILTER (WHERE (val > 1))#xL]
912
912
913
913
914
914
-- !query
0 commit comments