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/04/11 19:35:58 UTC

[GitHub] [arrow-datafusion] alamb opened a new pull request, #5967: Minor: Add Expr::between and clean up boilerplate

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

   # Which issue does this PR close?
   
   related to https://github.com/apache/arrow-datafusion/pull/5929
   
   # Rationale for this change
   
   While reviewing https://github.com/apache/arrow-datafusion/pull/5929 I noticed there was no way to create `Expr::Between` simply
   
   # What changes are included in this PR?
   
   Add `Expr::between` and `Expr::not_between`
   
   # Are these changes tested?
   Yes
   
   # Are there any user-facing changes?
   
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api change` label.
   -->


-- 
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 #5967: minor: Add `Expr::between` to clean up boilerplate

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


-- 
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 #5967: Minor: Add Expr::between and clean up boilerplate

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


##########
datafusion/optimizer/src/analyzer/type_coercion.rs:
##########
@@ -1013,20 +1012,12 @@ mod test {
 
     #[test]
     fn between_case() -> Result<()> {
-        let expr = Expr::Between(Between::new(
-            Box::new(col("a")),
-            false,
-            Box::new(Expr::Literal(Utf8(Some("2002-05-08".to_string())))),
+        let expr = col("a").between(

Review Comment:
   I think this is easier to understand what is happening



-- 
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 commented on pull request #5967: minor: Add `Expr::between` to clean up boilerplate

Posted by "jackwener (via GitHub)" <gi...@apache.org>.
jackwener commented on PR #5967:
URL: https://github.com/apache/arrow-datafusion/pull/5967#issuecomment-1504722776

   review it carefully again, no problem so merge it.


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