You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/06/10 17:33:57 UTC

[GitHub] [arrow-datafusion] alamb opened a new pull request, #2718: WIP: Upgrade to arrow `16.0.0`

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

   re: https://github.com/apache/arrow-rs/issues/1809
   
   This PR validates that DataFusion can be upgraded to the latest arrow


-- 
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] andygrove merged pull request #2718: Upgrade to arrow `16.0.0`

Posted by GitBox <gi...@apache.org>.
andygrove merged PR #2718:
URL: https://github.com/apache/arrow-datafusion/pull/2718


-- 
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 #2718: WIP: Upgrade to arrow `16.0.0`

Posted by GitBox <gi...@apache.org>.
alamb commented on code in PR #2718:
URL: https://github.com/apache/arrow-datafusion/pull/2718#discussion_r894771523


##########
datafusion/core/src/physical_plan/planner.rs:
##########
@@ -1544,20 +1540,22 @@ mod tests {
             .build()?;
         let execution_plan = plan(&logical_plan).await;
 
-        let expected_error = "Unsupported CAST from Utf8 to Boolean";
-        match execution_plan {
-            Ok(_) => panic!("Expected planning failure"),
-            Err(e) => assert!(
-                e.to_string().contains(expected_error),
-                "Error '{}' did not contain expected error '{}'",
-                e,
-                expected_error
-            ),
-        }
+        let e = execution_plan.unwrap_err().to_string();

Review Comment:
   This is great -- arrow 16.0.0 contains support for casting `Utf8` to bool (https://github.com/apache/arrow-rs/pull/1738 - Thanks @MazterQyou) --  so I updated the test to try and cast `Utf8` to some struct.
   
   I also took the opportunity to clean up the test in general



-- 
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 #2718: WIP: Upgrade to arrow `16.0.0`

Posted by GitBox <gi...@apache.org>.
alamb commented on code in PR #2718:
URL: https://github.com/apache/arrow-datafusion/pull/2718#discussion_r894771771


##########
datafusion/core/src/physical_plan/planner.rs:
##########
@@ -1516,10 +1517,7 @@ mod tests {
     #[tokio::test]
     async fn in_list_types() -> Result<()> {
         // expression: "a in ('a', 1)"
-        let list = vec![
-            Expr::Literal(ScalarValue::Utf8(Some("a".to_string()))),
-            Expr::Literal(ScalarValue::Int64(Some(1))),
-        ];
+        let list = vec![lit("a"), lit(1i64)];

Review Comment:
   used more concise construction of `ScalarValue`s



-- 
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 #2718: Upgrade to arrow `16.0.0`

Posted by GitBox <gi...@apache.org>.
alamb commented on code in PR #2718:
URL: https://github.com/apache/arrow-datafusion/pull/2718#discussion_r896076556


##########
datafusion/core/src/physical_plan/planner.rs:
##########
@@ -1544,20 +1540,22 @@ mod tests {
             .build()?;
         let execution_plan = plan(&logical_plan).await;
 
-        let expected_error = "Unsupported CAST from Utf8 to Boolean";
-        match execution_plan {
-            Ok(_) => panic!("Expected planning failure"),
-            Err(e) => assert!(
-                e.to_string().contains(expected_error),
-                "Error '{}' did not contain expected error '{}'",
-                e,
-                expected_error
-            ),
-        }
+        let e = execution_plan.unwrap_err().to_string();
+        assert_contains!(&e, "Unsupported CAST from Struct");
+        assert_contains!(&e, "to Boolean");
 
         Ok(())
     }
 
+    /// Return a `null` literal representing a struct type like: `{ a: bool }`
+    fn struct_literal() -> Expr {

Review Comment:
   Casting from `Utf8` to `Struct` is still not supported
   



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