Github user gatorsmile commented on the pull request: https://github.com/apache/spark/pull/9419#issuecomment-153148409 @hvanhovell Your understanding is right. If we merge both grouping and aggregation together, it will introduce extra complexity to generate the logical plan for the following case: "select a + b, b, sum(a - b), sum(a) from mytable group by a + b, b with rollup". Of course, in theory, it is doable, but the code will be harder to maintain in the future. Extra Project will be collapsed by optimizer. Thus, in analyzer, I just introduce the extra Project. I am writing unit test cases. Will try to deliver them ASAP.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org