-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat: #215 resolve aliases for group by exprs #485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
cc @alamb |
| select_exprs: &[Expr], | ||
| having_expr_opt: &Option<Expr>, | ||
| group_by: &[SQLExpr], | ||
| group_by_exprs: Vec<Expr>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
| format!("{:?}", err) | ||
| fn select_simple_aggregate_with_groupby_can_use_alias() { | ||
| quick_test( | ||
| "SELECT state AS a, MIN(age) AS b FROM person GROUP BY a", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Dandandan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me @jychen7 !!
|
Thank you for the contribution @jychen7 ! |
…#506) ## Which issue does this PR close? Closes apache#485 ## Rationale for this change Compatibility with how Spark handles logarithms of values <=0. ## What changes are included in this PR? Use IfExpr to check when input to log2 is <=0 and return null. This is done to match Spark's behavior, which in turn is implemented to match Hive's behavior. ## How are these changes tested? The existing test for `ln`, `log2` and `log10` was modified so that it includes negative numbers as part of the inputs being tested.
Which issue does this PR close?
Closes #215 .
What changes are included in this PR?
support alias in group by expression
Are there any user-facing changes?
no