comphead commented on PR #3882:
URL:
https://github.com/apache/arrow-datafusion/pull/3882#issuecomment-1293980339
> Postgres allows duplicate column names in a schema but then throws an
error if you try and select one of those columns. We currently fail on creating
a schema with duplicate columns.
>
> I guess the first question is, do we want to be more like Postgres here?
Thanks @andygrove for the feedback.
Most likely we should avoid current naming for not qualified columns as its
not user friendly and hard to use in outer subqueries.
And perhaps its a bigger topic to discuss naming standard, to be like a
Postgres or something else, but we can create a discussion ticket on this
first, to get all options from contributors.
If you ask me, I like how its done in Trino
`
select t.*, 'col_again' from (
select 'col', 2 a, count(1)
) t
`
```
_col0|a|_col2|_col3 |
-----+-+-----+---------+
col |2| 1|col_again|
```
--
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]