adriangb opened a new pull request, #16498: URL: https://github.com/apache/datafusion/pull/16498
As per https://github.com/apache/datafusion/pull/16491#issuecomment-2993586710 I think it's a bit strange that we try to create a field name from the repr of the value. Consider this example: https://datafusion.apache.org/user-guide/sql/scalar_functions.html#id273 For cases of an array with hundreds of elements it will blow up and make a mess! Could we use a fixed constant like `'lit'` or `'field'` instead? The main issue I could see happening is name collisions, e.g. `select 1, 2, 3` will cause an error which is unfortunate, not sure how to resolve that but also the current behavior isn't much better: ``` > select 1, 1; Error during planning: Projections require unique expression names but the expression "Int64(1)" at position 0 and "Int64(1)" at position 1 have the same name. Consider aliasing ("AS") one of them. ``` FWIW Postgres seems to have the concept of an "un-named" column: ``` ff=# select 1, 2, 3; ?column? | ?column? | ?column? ----------+----------+---------- 1 | 2 | 3 ``` But I'm not sure we want to introduce an "unnamed" field. -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org