alamb opened a new issue, #10654: URL: https://github.com/apache/datafusion/issues/10654
### Describe the bug Expr::field is broken for ScalarValue::Null After https://github.com/apache/datafusion/pull/10375 merged `Expr::field` is broken when we try and do it on `ScalarValue::Null` (in addition to https://github.com/apache/datafusion/issues/10565) If you try to use it, you get an error: > The expression to get an indexed field is only valid for `List`, `Struct`, or `Map` types, got Null ### To Reproduce Add this test to expr_fn ```rust #[test] fn test_get_field_null() { evaluate_expr_test( lit(ScalarValue::Null).field("a"), vec![ "+------------+", "| NULL literal", ], ); } ``` Fails with: > called `Result::unwrap()` on an `Err` value: Plan("The expression to get an indexed field is only valid for `List`, `Struct`, or `Map` types, got Null") ### Expected behavior Result should also be a NULL scalar ### 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