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:36:39 UTC

[GitHub] [arrow-datafusion] ygf11 opened a new pull request, #4305: minor: add another test case to cover join ambiguous check

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

   # Which issue does this PR close?
   
   Closes #.
   
   * As @mingmwang suggests, add another test case which works with using-join to cover ambiguous check. 
   * Improve some test cases. 
   
   # Rationale for this change
   
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   # What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   # Are these changes tested?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
   -->
   
   # Are there any user-facing changes?
   
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api change` label.
   -->


-- 
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] mingmwang commented on a diff in pull request #4305: minor: add another test case to cover join ambiguous check

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


##########
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() {

Review Comment:
   column references



-- 
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] mingmwang commented on a diff in pull request #4305: minor: add another test case to cover join ambiguous check

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


##########
datafusion/sql/src/planner.rs:
##########
@@ -6057,7 +6057,7 @@ mod tests {
     }
 
     #[test]
-    fn test_ambiguous_coulmn_referece_in_join() {
+    fn test_ambiguous_coulmn_referece_in_on_join() {

Review Comment:
   Should be `column references`



-- 
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] ygf11 commented on a diff in pull request #4305: minor: add another test case to cover join ambiguous check

Posted by GitBox <gi...@apache.org>.
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


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

Posted by GitBox <gi...@apache.org>.
ygf11 commented on PR #4305:
URL: https://github.com/apache/arrow-datafusion/pull/4305#issuecomment-1323361563

   Thanks for your review @mingmwang, I will fix it.


-- 
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] mingmwang commented on a diff in pull request #4305: minor: add another test case to cover join ambiguous check

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


##########
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:
   Except for typo,  LGTM.
   Thanks for adding the test case.



-- 
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 merged pull request #4305: minor: add another test case to cover join ambiguous check

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


-- 
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] ursabot commented on pull request #4305: minor: add another test case to cover join ambiguous check

Posted by GitBox <gi...@apache.org>.
ursabot commented on PR #4305:
URL: https://github.com/apache/arrow-datafusion/pull/4305#issuecomment-1325474167

   Benchmark runs are scheduled for baseline = 55bf8e9c2ca6d358e7dc4c37e1439de38008f960 and contender = 03f85f1dbe93c536b8ef8bd88e8fd7335cf9ffa1. 03f85f1dbe93c536b8ef8bd88e8fd7335cf9ffa1 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
   Conbench compare runs links:
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ec2-t3-xlarge-us-east-2] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/bd6a149aee8f4b0bbfe0d5c3f954f8e1...25f25e542bfa4db78f0234d750007e97/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/17dac7d9674d4e2fa1893e733375aef3...7356d35e2fe24f5fa786136fd4e87628/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/d467bd0b100a42308e8530c4c877fc9a...83e97f0c0338487cb1a8ca3a2087a95d/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/9ea7c1f57552426a9f1faa48e33f9167...a9a671eecdb04e6eb8df20fc457e829b/)
   Buildkite builds:
   Supported benchmarks:
   ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
   test-mac-arm: Supported benchmark langs: C++, Python, R
   ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
   ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java
   


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