maropu commented on a change in pull request #26420: [SPARK-27986] Support ANSI
SQL filter predicate for aggregate expression.
URL: https://github.com/apache/spark/pull/26420#discussion_r344029034
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/HashAggregateExec.scala
##########
@@ -152,8 +168,9 @@ case class HashAggregateExec(
override def usedInputs: AttributeSet = inputSet
override def supportCodegen: Boolean = {
- // ImperativeAggregate is not supported right now
-
!aggregateExpressions.exists(_.aggregateFunction.isInstanceOf[ImperativeAggregate])
+ // ImperativeAggregate and filter predicate are not supported right now
+
!(aggregateExpressions.exists(_.aggregateFunction.isInstanceOf[ImperativeAggregate])
||
+ aggregateExpressions.exists(_.filter.isDefined))
Review comment:
We cannot support this in the codegen mode? Technically hard? If we support
this filter expr in agg, I personally think we should support in the codegen
mode first.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]