2010YOUY01 commented on issue #10069: URL: https://github.com/apache/datafusion/issues/10069#issuecomment-2423566208
> That might work, but I wonder how it will be inferred and whether it will cause any conflicts. Some examples that can be ambiguous on top of my head: > > ```sql > select generate_series(1,3), * from generate_series(10, 13) > ``` > > This can be either (postgresql behavior): > > generate_series generate_series > 1 10 > 2 10 > 3 10 > 1 11 > 2 11 > 3 11 > 1 12 > 2 12 > 3 12 > 1 13 > 2 13 > 3 13 > or > > ```sql > +------------------------------------+----------------------------------------------+ > | generate_series(Int64(1),Int64(3)) | UNNEST(generate_series(Int64(10),Int64(13))) | > +------------------------------------+----------------------------------------------+ > | [1, 2, 3] | 10 | > | [1, 2, 3] | 11 | > | [1, 2, 3] | 12 | > | [1, 2, 3] | 13 | > +------------------------------------+----------------------------------------------+ > 4 row(s) fetched. > Elapsed 0.001 seconds. > ``` > > Also, I wonder how the results of something like this would look like 🤔: > > ```sql > select generate_series(1, 3), array_length(generate_series(1, 3)) > ``` Maybe we can use the 2nd interpretation (the same as DuckDB), currently, DataFusion's `generate_series` in expression is already different from Postgres's semantics -- 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