You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "ygf11 (via GitHub)" <gi...@apache.org> on 2023/02/22 06:05:45 UTC

[GitHub] [arrow-datafusion] ygf11 opened a new pull request, #5363: Minor: add tests for subquery to join

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

   # Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   Closes #.
   
   Add some special test cases that outer and subquery table are same table.
   
   # 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] ygf11 commented on a diff in pull request #5363: Minor: add tests for subquery to join

Posted by "ygf11 (via GitHub)" <gi...@apache.org>.
ygf11 commented on code in PR #5363:
URL: https://github.com/apache/arrow-datafusion/pull/5363#discussion_r1116623393


##########
datafusion/core/tests/sql/subqueries.rs:
##########
@@ -116,3 +116,69 @@ where o_orderstatus in (
 
     Ok(())
 }
+
+#[tokio::test]
+async fn exists_subquery_with_same_table() -> Result<()> {
+    let test_repartition_joins = vec![true, false];
+    for repartition_joins in test_repartition_joins {
+        let ctx = create_join_context("t1_id", "t2_id", repartition_joins)?;
+
+        // this query will not be rewritten to join

Review Comment:
   Added the comment.



-- 
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] jackwener commented on a diff in pull request #5363: Minor: add tests for subquery to join

Posted by "jackwener (via GitHub)" <gi...@apache.org>.
jackwener commented on code in PR #5363:
URL: https://github.com/apache/arrow-datafusion/pull/5363#discussion_r1115436086


##########
datafusion/core/tests/sql/subqueries.rs:
##########
@@ -116,3 +116,69 @@ where o_orderstatus in (
 
     Ok(())
 }
+
+#[tokio::test]
+async fn exists_subquery_with_same_table() -> Result<()> {
+    let test_repartition_joins = vec![true, false];
+    for repartition_joins in test_repartition_joins {
+        let ctx = create_join_context("t1_id", "t2_id", repartition_joins)?;
+
+        // this query will not be rewritten to join

Review Comment:
   It would be better that add the reason of 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] jackwener commented on a diff in pull request #5363: Minor: add tests for subquery to join

Posted by "jackwener (via GitHub)" <gi...@apache.org>.
jackwener commented on code in PR #5363:
URL: https://github.com/apache/arrow-datafusion/pull/5363#discussion_r1115436086


##########
datafusion/core/tests/sql/subqueries.rs:
##########
@@ -116,3 +116,69 @@ where o_orderstatus in (
 
     Ok(())
 }
+
+#[tokio::test]
+async fn exists_subquery_with_same_table() -> Result<()> {
+    let test_repartition_joins = vec![true, false];
+    for repartition_joins in test_repartition_joins {
+        let ctx = create_join_context("t1_id", "t2_id", repartition_joins)?;
+
+        // this query will not be rewritten to join

Review Comment:
   It would be better that add the reason into comment.



-- 
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 #5363: Minor: add tests for subquery to join

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #5363:
URL: https://github.com/apache/arrow-datafusion/pull/5363


-- 
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 #5363: Minor: add tests for subquery to join

Posted by "ursabot (via GitHub)" <gi...@apache.org>.
ursabot commented on PR #5363:
URL: https://github.com/apache/arrow-datafusion/pull/5363#issuecomment-1445141170

   Benchmark runs are scheduled for baseline = 85ed38673df8ec4f6bb65ba767069ee05348c67c and contender = 248d6fc1b5aa540147cc87debd90105b1d1ad2c0. 248d6fc1b5aa540147cc87debd90105b1d1ad2c0 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/e9944e24e82d49c9b6e5388400dc84a7...4d8bba759cb840ebb9af5be9bb0d9d54/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/285bf6b3e0bc4d6a8bc1ad0a622a9627...0a2de141170e44b3b1b9a7cfc8877dcf/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/e17c699c234b4475960df70a832785c8...896d8f6a7f9a46cf820142cc265cc8a6/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/30ba3cb139874d048d81e706132d7929...f9bb262ff82840c6b9d586e5091e8c31/)
   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