cloud-fan commented on a change in pull request #35130:
URL: https://github.com/apache/spark/pull/35130#discussion_r780294560
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/V2ScanRelationPushDown.scala
##########
@@ -212,7 +224,10 @@ object V2ScanRelationPushDown extends Rule[LogicalPlan]
with PredicateHelper {
private def supportPartialAggPushDown(agg: Aggregation): Boolean = {
// We don't know the agg buffer of `GeneralAggregateFunc`, so can't do
partial agg push down.
- agg.aggregateExpressions().forall(!_.isInstanceOf[GeneralAggregateFunc])
+ agg.aggregateExpressions().forall { aggregateFunc =>
+ !aggregateFunc.isInstanceOf[GeneralAggregateFunc] ||
+ aggregateFunc.asInstanceOf[GeneralAggregateFunc].name() == "AVG"
Review comment:
If `AVG` can be partially pushed, I'd like to create a dedicated class
for it, instead of using `GeneralAggregateFunc`.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]