Dandandan commented on code in PR #3444:
URL: https://github.com/apache/arrow-datafusion/pull/3444#discussion_r967992083
##########
datafusion/core/tests/sql/aggregates.rs:
##########
@@ -1834,11 +1834,11 @@ async fn aggregate_avg_add() -> Result<()> {
assert_eq!(results.len(), 1);
let expected = vec![
-
"+--------------+-------------------------+-------------------------+-------------------------+",
- "| AVG(test.c1) | AVG(test.c1) + Int64(1) | AVG(test.c1) + Int64(2) |
Int64(1) + AVG(test.c1) |",
-
"+--------------+-------------------------+-------------------------+-------------------------+",
- "| 1.5 | 2.5 | 3.5 |
2.5 |",
-
"+--------------+-------------------------+-------------------------+-------------------------+",
+
"+--------------+---------------------------+---------------------------+---------------------------+",
Review Comment:
This is a concern I also have for a longer time and had a PR open once.
One approach would be to add an alias for every unnamed expression based on
the original query SQL or expression.
This would avoid having the column names changed by the optimizers.
--
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]