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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]