jonahgao opened a new issue, #9553: URL: https://github.com/apache/arrow-datafusion/issues/9553
### Describe the bug Found when working on #9499. When the input contains NULL values, the results of these functions are incorrect. ### To Reproduce Run queries in CLI ```sh DataFusion CLI v36.0.0 ❯ select range(NULL, 10, 1); +--------------------------------+ | range(NULL,Int64(10),Int64(1)) | +--------------------------------+ | [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | +--------------------------------+ 1 row in set. Query took 0.003 seconds. ❯ select generate_series(1, 10, NULL); Execution error: step can't be 0 for function generate_series(start [, stop, step]) ``` ### Expected behavior DuckDB will return NULL results, which seems more reasonable to me. ```sh D select range(NULL, 10, 1), typeof(range(NULL, 10, 1)); ┌────────────────────┬────────────────────────────┐ │ range(NULL, 10, 1) │ typeof(range(NULL, 10, 1)) │ │ int32 │ varchar │ ├────────────────────┼────────────────────────────┤ │ │ NULL │ └────────────────────┴────────────────────────────┘ D select range(1, 10, NULL), typeof(range(1, 10, NULL)); ┌────────────────────┬────────────────────────────┐ │ range(1, 10, NULL) │ typeof(range(1, 10, NULL)) │ │ int32 │ varchar │ ├────────────────────┼────────────────────────────┤ │ │ NULL │ └────────────────────┴────────────────────────────┘ ``` ### Additional context _No response_ -- 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]
