You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/07/03 19:36:40 UTC

[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #6829: fix: incorrect nullability of `Like` expressions

alamb commented on code in PR #6829:
URL: https://github.com/apache/arrow-datafusion/pull/6829#discussion_r1251223063


##########
datafusion/expr/src/expr_schema.rs:
##########
@@ -251,9 +251,11 @@ impl ExprSchemable for Expr {
                 ref right,
                 ..
             }) => Ok(left.nullable(input_schema)? || right.nullable(input_schema)?),
-            Expr::Like(Like { expr, .. }) => expr.nullable(input_schema),
-            Expr::ILike(Like { expr, .. }) => expr.nullable(input_schema),
-            Expr::SimilarTo(Like { expr, .. }) => expr.nullable(input_schema),
+            Expr::Like(Like { expr, pattern, .. })

Review Comment:
   I also verified that there are no other fields (like `pattern` that can be nullable) 👍 
   
   https://docs.rs/datafusion/latest/datafusion/logical_expr/struct.Like.html



-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org