You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jonahgao (via GitHub)" <gi...@apache.org> on 2023/06/28 16:00:30 UTC

[GitHub] [arrow-datafusion] jonahgao opened a new pull request, #6786: fix: incorrect nullability of `between` expr

jonahgao opened a new pull request, #6786:
URL: https://github.com/apache/arrow-datafusion/pull/6786

   # Which issue does this PR close?
   
   None
   
   
   # Rationale for this change
   
   The nullability of  the `between` expression not only depends on the subexpression but may also depend on the `low` or `high` expression.
   
   For example
   ```shell
   DataFusion CLI v27.0.0
   
   ❯ select 1 between null and 2;
   +------------------------------------+
   | Int64(1) BETWEEN NULL AND Int64(2) |
   +------------------------------------+
   |                                    |
   +------------------------------------+
   
   ❯ select 1 between 1 and null;
   +------------------------------------+
   | Int64(1) BETWEEN Int64(1) AND NULL |
   +------------------------------------+
   |                                    |
   +------------------------------------+
   
   ```
   
   
   
   # What changes are included in this PR?
   fix  incorrect nullability of `between` expr
   
   # Are these changes tested?
   Yes
   
   # Are there any user-facing changes?
   No


-- 
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


[GitHub] [arrow-datafusion] jackwener merged pull request #6786: fix: incorrect nullability of `between` expr

Posted by "jackwener (via GitHub)" <gi...@apache.org>.
jackwener merged PR #6786:
URL: https://github.com/apache/arrow-datafusion/pull/6786


-- 
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


[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #6786: fix: incorrect nullability of `between` expr

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #6786:
URL: https://github.com/apache/arrow-datafusion/pull/6786#discussion_r1245587824


##########
datafusion/expr/src/expr_schema.rs:
##########
@@ -175,7 +175,13 @@ impl ExprSchemable for Expr {
             | Expr::Negative(expr)
             | Expr::Sort(Sort { expr, .. })
             | Expr::InList(InList { expr, .. }) => expr.nullable(input_schema),
-            Expr::Between(Between { expr, .. }) => expr.nullable(input_schema),
+
+            Expr::Between(Between {
+                expr, low, high, ..
+            }) => Ok(expr.nullable(input_schema)?

Review Comment:
   👍 



-- 
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