nuno-faria opened a new issue, #19998:
URL: https://github.com/apache/datafusion/issues/19998

   ### Describe the bug
   
   The `generate_series` scalar function returns an empty list when the range 
is invalid, while the `generate_series` table function returns an error.
   
   Other systems, like Postgres, DuckDB, and SQLite, return an empty set.
   
   
   ### To Reproduce
   
   
   ```sql
   > select generate_series(0, -1);
   +-------------------------------------+
   | generate_series(Int64(0),Int64(-1)) |
   +-------------------------------------+
   | []                                  |
   +-------------------------------------+
   
   > select * from generate_series(0, -1);
   Error during planning: Start is bigger than end, but increment is positive: 
Cannot generate infinite series
   ```
   
   ### Expected behavior
   
   Return an empty set when the range is invalid.
   
   ### 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]


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

Reply via email to