beliefer commented on a change in pull request #35248:
URL: https://github.com/apache/spark/pull/35248#discussion_r794444947
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/AggregatePushDownUtils.scala
##########
@@ -52,8 +52,10 @@ object AggregatePushDownUtils {
def processMinOrMax(agg: AggregateFunc): Boolean = {
val (column, aggType) = agg match {
- case max: Max => (max.column, "max")
- case min: Min => (min.column, "min")
+ case max: Max if max.column().isInstanceOf[NamedReference] =>
+ (max.column.asInstanceOf[NamedReference], "max")
+ case min: Min if min.column().isInstanceOf[NamedReference] =>
+ (min.column.asInstanceOf[NamedReference], "min")
case _ =>
throw new IllegalArgumentException(s"Unexpected type of
AggregateFunc ${agg.describe}")
Review comment:
According to the code, it seems Orc and parquet only support the push
down of max, min and count
--
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]