2010YOUY01 commented on issue #13316:
URL: https://github.com/apache/datafusion/issues/13316#issuecomment-2465983459

   I think we can keep this behavior, and add another UDTF with the same name 
(which follows DuckDB behavior):
   ```
   D select generate_series(1,3);
   ┌───────────────────────┐
   │ generate_series(1, 3) │
   │        int64[]        │
   ├───────────────────────┤
   │ [1, 2, 3]             │
   └───────────────────────┘
   D select * from generate_series(1,3);
   ┌─────────────────┐
   │ generate_series │
   │      int64      │
   ├─────────────────┤
   │               1 │
   │               2 │
   │               3 │
   └─────────────────┘
   ```
   I think it's also easy to use: we can operate both array and table column 
with `generate_series()`
   Additionally, it would be great to let the table function only use constant 
memory. For example, if `select * from genereate_series(1, 1000000000)` it 
should generate data batch by batch, instead of materializing everything in 
TableScan node, then start output.
   This way this function can be very useful in many cases like micro 
benchmarks and tests.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to