Dandandan commented on a change in pull request #485:
URL: https://github.com/apache/arrow-datafusion/pull/485#discussion_r645052438
##########
File path: datafusion/src/sql/planner.rs
##########
@@ -2285,15 +2297,12 @@ mod tests {
}
#[test]
- fn select_simple_aggregate_with_groupby_cannot_use_alias() {
- let sql = "SELECT state AS x, MAX(age) FROM person GROUP BY x";
- let err = logical_plan(sql).expect_err("query should have failed");
- assert_eq!(
- format!(
- "Plan(\"Invalid identifier \\\'x\\\' for schema {}\")",
- PERSON_COLUMN_NAMES
- ),
- 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",
Review comment:
👍
--
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:
[email protected]