You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/03/24 15:02:15 UTC

[GitHub] [spark] cloud-fan commented on pull request #31913: [SPARK-34581][SQL] Don't optimize out grouping expressions from aggregate expressions without aggregate function

cloud-fan commented on pull request #31913:
URL: https://github.com/apache/spark/pull/31913#issuecomment-805896134


   Ah this problem is tricky. I think it's error-prone to duplicate the grouping expressions in `Aggregate.groupingExpressions` and `Aggregate.aggregateExpressions`, and assume all the rules will transform them in the same way to keep them the same.
   
   Shall we introduce something like `case class GroupingExprRef(ordinal: Int)` and replace all the grouping expressions with `GroupingExprRef` in `Aggregate.aggregateExpressions` during analysis? Then we don't need to worry about inconsistency anymore.


-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org