mihailoale-db opened a new pull request, #53644:
URL: https://github.com/apache/spark/pull/53644

   ### What changes were proposed in this pull request?
   In this PR I propose to trim aliases from grouping and aggregate expressions 
before handling grouping analytics. This is needed for the following query:
   ```
   SELECT col1 AS k2 FROM values(1) GROUP BY CUBE(k2)
   ```
   Here we have `col1` in the single-pass whereas in the fixed-point we have 
`col1 AS k2` before constructing an `Aggregate` in `ResolveGroupingAnalytics`. 
Change removes the `AS k2` part and keeps the compatibility between single-pass 
and fixed-point analyzers without changing outputs (analyzed plans are 
different, only names).
   
   ### Why are the changes needed?
   To keep the compatibility between fixed-point and single-pass analyzers.
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   Changed tests.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   No.


-- 
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]

Reply via email to