alamb opened a new issue #1184: URL: https://github.com/apache/arrow-datafusion/issues/1184
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.** I want to be able to use null constants in my datafusion queries (e.g. `NULL < 5`). While at first this seems a silly usecase, we end up with such predicates during automated rewrites in IOx (where sometimes we replace column references with null constants -- See more details on https://github.com/influxdata/influxdb_iox/issues/883) While they are allowed in the SQL or expr language (e.g. `Expr::Literal(ScalarValue::Utf8(None)))` they typically generate some runtime error before execution **Describe the solution you'd like** I want to be able to write expressions like `NULL < 5` in all cases where I could write `col < 5` and have DataFusion evaluate to the correct thing. The proper fix for this ticket is likely first class support for `DataType::Null` and then proper coercion logic in the codebase as required. See the discussion by @Dandandan and @Jimexist on #1179 at https://github.com/apache/arrow-datafusion/issues/1179#issuecomment-952997737 **Task List*** - [ ] Add cast support in arrow-rs to/from NULL to other types - [ ] https://github.com/apache/arrow-datafusion/issues/1179 - [ ] Handle null literals in function calls - [ ] Handle null literals in CASE statements - [ ] Handle null literals in IN LISTS - [ ] TODO review remaining expression types **Additional context** This is a tracking ticket for a variety of null incorrectness issues I found while working on https://github.com/apache/arrow-datafusion/issues/1179 -- 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]
