cloud-fan commented on a change in pull request #35823:
URL: https://github.com/apache/spark/pull/35823#discussion_r826940304
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/V2ScanRelationPushDown.scala
##########
@@ -92,23 +92,37 @@ object V2ScanRelationPushDown extends Rule[LogicalPlan]
with PredicateHelper {
// update the scan builder with agg pushdown and return a new plan with
agg pushed
case aggNode @ Aggregate(groupingExpressions, resultExpressions, child) =>
child match {
- case ScanOperation(project, filters, sHolder: ScanBuilderHolder)
- if filters.isEmpty &&
project.forall(_.isInstanceOf[AttributeReference]) =>
+ case ScanOperation(project, filters, sHolder: ScanBuilderHolder) if
filters.isEmpty &&
+ project.forall(p => p.isInstanceOf[AttributeReference] ||
p.isInstanceOf[Alias]) =>
Review comment:
if we follow it, then here should be `project.forall(_.deterministic)`
--
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]