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/04/12 11:33:21 UTC

[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #2194: feat: Support simple Arrays with Literals

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


##########
datafusion/core/src/sql/planner.rs:
##########
@@ -2968,6 +3016,28 @@ mod tests {
         );
     }
 
+    #[test]
+    fn select_array_no_common_type() {
+        let sql = "SELECT [1, true, null]";
+        let err = logical_plan(sql).expect_err("query should have failed");
+
+        // HashSet doesnt guaranty order
+        assert_contains!(
+            format!("{:?}", err),
+            r#"NotImplemented("Arrays with different types are not supported: "#
+        );

Review Comment:
   ```suggestion
           // HashSet doesn't guarantee order
           assert_contains!(
               err.to_string(),
               r#"Arrays with different types are not supported: "#
           );
   ```



##########
datafusion/core/src/sql/planner.rs:
##########
@@ -2968,6 +3016,28 @@ mod tests {
         );
     }
 
+    #[test]
+    fn select_array_no_common_type() {
+        let sql = "SELECT [1, true, null]";
+        let err = logical_plan(sql).expect_err("query should have failed");
+
+        // HashSet doesnt guaranty order
+        assert_contains!(
+            format!("{:?}", err),
+            r#"NotImplemented("Arrays with different types are not supported: "#
+        );

Review Comment:
   Just a suggestion -- what you have here is fine too



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