SteveLauC opened a new issue, #9506: URL: https://github.com/apache/arrow-datafusion/issues/9506
### Describe the bug ``` $ datafusion-cli --color DataFusion CLI v36.0.0 ❯ select * from '1.parquet' limit 1 + 1; Error during planning: LIMIT must not be negative ❯ ``` It should work as long as it can be evaluated without schema or data, here is how duckdb handles it: ``` $ duckdb v0.10.0 20b1486d11 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. D create table foo (id int); D select * from foo limit 1 + 1; ┌────────┐ │ id │ │ int32 │ ├────────┤ │ 0 rows │ └────────┘ ``` ### To Reproduce See above, the table (parquet file) should not matter. ### Expected behavior `1 + 1` should be evaluated to constant 2. ### Additional context Related code: https://github.com/apache/arrow-datafusion/blob/fc81bf10ea7cde55c6d58a670e15bfd0581ec8c2/datafusion/sql/src/query.rs#L240-L257 -- 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]
