Dandandan commented on code in PR #15254: URL: https://github.com/apache/datafusion/pull/15254#discussion_r1997646536
########## datafusion/expr/src/utils.rs: ########## @@ -1000,6 +1000,107 @@ pub fn can_hash(data_type: &DataType) -> bool { } } +/// Metadata for the columns should be null +pub type NullColumnsSet<'a> = HashSet<(Option<&'a TableReference>, &'a String)>; + +/// Determines if an expression will always evaluate to null +pub fn evaluates_to_null(expr: &Expr, null_columns: &NullColumnsSet<'_>) -> bool { + match expr { Review Comment: I wonder if we can use the const evaluator instead? -- 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 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