discord9 opened a new issue, #15855: URL: https://github.com/apache/datafusion/issues/15855
### Describe the bug as title, `NULL::<Data type>` can't be encode to substrait, WIP fix in #15854 ### To Reproduce try run this unit test: ```rs #[tokio::test] async fn fold_cast_null(){ let state = SessionStateBuilder::default().build(); let empty_schema = DFSchemaRef::new(DFSchema::empty()); let field = Field::new("out", DataType::Int32, false); let expr = Expr::Literal(ScalarValue::Null).cast_to(&DataType::Int32, &empty_schema).unwrap(); let typed_null =to_substrait_extended_expr(&[(&expr, &field)], &empty_schema, &state).unwrap(); } ``` and it will fail with "Null cast is invalid" or something ### Expected behavior _No response_ ### 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: github-unsubscr...@datafusion.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org