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/11/21 11:38:08 UTC

[GitHub] [arrow-datafusion] ygf11 commented on a diff in pull request #4305: minor: add another test case to cover join ambiguous check

ygf11 commented on code in PR #4305:
URL: https://github.com/apache/arrow-datafusion/pull/4305#discussion_r1027905397


##########
datafusion/sql/src/planner.rs:
##########
@@ -6070,7 +6070,23 @@ mod tests {
         let result = logical_plan(sql);
         assert!(result.is_err());
         let err = result.err().unwrap();
-        assert_eq!(format!("{}", err), expected);
+        assert_eq!(err.to_string(), expected);
+    }
+
+    #[test]
+    fn test_ambiguous_coulmn_referece_with_in_using_join() {
+        let sql = "select p1.id, p1.age, p2.id 
+            from person as p1 
+            INNER JOIN person as p2 
+            using(id)";
+
+        let expected = "Projection: p1.id, p1.age, p2.id\
+            \n  Inner Join: Using p1.id = p2.id\
+            \n    SubqueryAlias: p1\
+            \n      TableScan: person\
+            \n    SubqueryAlias: p2\
+            \n      TableScan: person";
+        quick_test(sql, expected);

Review Comment:
   cc @mingmwang 



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