omerhadari commented on code in PR #945: URL: https://github.com/apache/iceberg-rust/pull/945#discussion_r1953142107
########## crates/integrations/datafusion/src/physical_plan/expr_to_predicate.rs: ########## @@ -119,7 +122,53 @@ fn to_iceberg_predicate(expr: &Expr) -> TransformedResult { _ => TransformedResult::NotTransformed, } } - Expr::Cast(c) => to_iceberg_predicate(&c.expr), + Expr::Cast(c) => { + if DataType::Date32 == c.data_type || DataType::Date64 == c.data_type { + match c.expr.as_ref() { + Expr::Literal(ScalarValue::Utf8(Some(literal))) => { + let date = literal.split('T').next(); Review Comment: @Fokko currently `date_from_str` supports datetime (i.e. 2025-01-01T11:11:11 will not be truncated). I think this is a mistake given the name of the function (date_from_str and not datetime_from_str) and its documentation, but I don't think I can change its behaviour so drastically now right? Do you suggest I change it, or create another one that is fix? -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org