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/19 13:15:51 UTC

[GitHub] [arrow-datafusion] ygf11 opened a new pull request, #4292: minor: avoid a clone into string when checking ambiguous

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

   # Which issue does this PR close?
   
   Closes #.
   
   * avoid a clone into string when checking ambiguous
   * improve the test case.
   
   # 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] alamb merged pull request #4292: minor: avoid a clone into string when checking ambiguous

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


-- 
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 commented on pull request #4292: minor: avoid a clone into string when checking ambiguous

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

   CI failure due to https://github.com/apache/arrow-datafusion/issues/4294


-- 
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 commented on a diff in pull request #4292: minor: avoid a clone into string when checking ambiguous

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


##########
datafusion/sql/src/planner.rs:
##########
@@ -6058,15 +6058,19 @@ mod tests {
 
     #[test]
     fn test_ambiguous_coulmn_referece_in_join() {
-        // The error message will be:
-        // reference 'id' is ambiguous, could be p1.id,p2.id;
         let sql = "select p1.id, p1.age, p2.id 
             from person as p1 
             INNER JOIN person as p2 
             ON id = 1";
 
+        let expected =
+            "Error during planning: reference 'id' is ambiguous, could be p1.id,p2.id;";
+
         // It should return error.
-        assert!(logical_plan(sql).is_err());
+        let result = logical_plan(sql);
+        assert!(result.is_err());
+        let err = result.err().unwrap();
+        assert_eq!(format!("{}", err), expected);

Review Comment:
   👍 
   You can also do the same thing like
   
   ```suggestion
           assert_eq!(err.to_string(), expected);
   ```



-- 
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 #4292: minor: avoid a clone into string when checking ambiguous

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

   Benchmark runs are scheduled for baseline = 712b9fdabde0992c07f8203df83966295c3b8b9a and contender = 71e345fcc9c7aa529089230a867e74f151ba0c7a. 71e345fcc9c7aa529089230a867e74f151ba0c7a 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/8e218ea6110a474995d90b36bc0c7756...fb2d1e3413264291a41451139ee04aa6/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/222703808f55462fb49060047d2ee5e6...64587a16e7744b3cb8d2235d0ebc478b/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/038285bc5a204ed396700fc431fc0d8c...38a53ab1a46144b49070be4f5dc2d971/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/754688f7300942f2b471c89780267dfe...dad464370b0c4ccc8c4f175d593db894/)
   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