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/02/06 18:12:11 UTC

[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #5153: Ambiguity check for where selection

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


##########
datafusion/sql/tests/integration_test.rs:
##########
@@ -527,6 +527,16 @@ fn join_with_ambiguous_column() {
     quick_test(sql, expected);
 }
 
+#[test]
+fn where_selection_with_ambiguous_column() {
+    let sql = "SELECT * FROM person a, person b WHERE id = id + 1";
+    let err = logical_plan(sql).expect_err("query should have failed");
+    assert_eq!(
+        "Internal(\"column reference id is ambiguous\")",

Review Comment:
   I think this error should be Plan (not Internal) as it was due to some bad input from the user rather than some bug in datafusion
   
   We can fix that as a follow on PR as well



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