liukun4515 commented on issue #2067:
URL:
https://github.com/apache/arrow-datafusion/issues/2067#issuecomment-1076968836
> Even more simple/straightforward: `coalesce(sum(x), 0)` after `coalesce`
is supported: (#1969)
I do some experiments on the spark using the `coalesce`
```
spark-sql> desc t2;
c1 int
```
spark plan:
```
spark-sql> explain select coalesce(sum(c1),0) from t2;
== Physical Plan ==
AdaptiveSparkPlan isFinalPlan=false
+- HashAggregate(keys=[], functions=[sum(c1#127)])
+- Exchange SinglePartition, ENSURE_REQUIREMENTS, [id=#252]
+- HashAggregate(keys=[], functions=[partial_sum(c1#127)])
+- Scan hive default.t2 [c1#127], HiveTableRelation
[`default`.`t2`, org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, Data Cols:
[c1#127], Partition Cols: []]
```
In my user case, the function of `sum0` will be used in the ballista size.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]