hannerwang opened a new pull request, #3929: URL: https://github.com/apache/calcite/pull/3929
### **What changes were proposed in this pull request?** Stop identifiers in a SQL call from being treated as aliases and expanded into select expressions. For example: `select replace(name, 'a', 'b') as name from users group by replace(name, 'a', 'b')` The **name** in GROUP BY clause should not be replaced by `replace(name, 'a', 'b')`, it will be resolved as users.name, i.e. `select replace(users.name, 'a', 'b') as name from users group by replace(users.name, 'a', 'b')` ### **Why are the changes needed?** Make the sql semantics unchanged when treating identifiers within Group By clause as aliases. current calcite behavior: `select replace(**name**, 'a', 'b') as **name** from users group by replace(**name**, 'a', 'b')` will be expanded into `select replace(**name**, 'a', 'b') as **name** from users group by replace(**replace(name, 'a', 'b')**, 'a', 'b')` the semantics has been changed. ### **Does this PR introduce any user-facing change?** No for existing users -- 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]
