cloud-fan commented on a change in pull request #32049:
URL: https://github.com/apache/spark/pull/32049#discussion_r667088733
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSourceStrategy.scala
##########
@@ -673,6 +675,27 @@ object DataSourceStrategy
(nonconvertiblePredicates ++ unhandledPredicates, pushedFilters,
handledFilters)
}
+ protected[sql] def translateAggregate(
+ aggregates: AggregateExpression,
+ pushableColumn: PushableColumnBase): Option[AggregateFunc] = {
+ aggregates.aggregateFunction match {
+ case min @ aggregate.Min(pushableColumn(name)) =>
+ Some(Min(FieldReference(Seq(name)), min.dataType))
+ case max @ aggregate.Max(pushableColumn(name)) =>
+ Some(Max(FieldReference(Seq(name)), max.dataType))
+ case count: aggregate.Count =>
+ count.children.head match {
Review comment:
shall we return none if there is more than one child in 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]