You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/06/09 05:37:13 UTC

[GitHub] [spark] c21 opened a new pull request #32834: [SPARK-35690][SS] Stream-stream join keys should be reordered properly

c21 opened a new pull request #32834:
URL: https://github.com/apache/spark/pull/32834


   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
     8. If you want to add or modify an error message, please read the guideline first:
        https://spark.apache.org/error-message-guidelines.html
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   For query with multiple stream-stream joins, unnecessary shuffle can be happened as we don't reorder join keys for stream-stream join. We already reorder join keys for shuffled hash join and sort merge join, so we can also have it for stream-stream join - https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/EnsureRequirements.scala#L232 .
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   Avoid unnecessary shuffle for query.
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   No.
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   -->
   Added test in `StreamingJoinSuite.scala`.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] c21 commented on pull request #32834: [SPARK-35690][SS] Stream-stream join keys should be reordered properly

Posted by GitBox <gi...@apache.org>.
c21 commented on pull request #32834:
URL: https://github.com/apache/spark/pull/32834#issuecomment-857461894


   @HeartSaVioR - got it. State store compatibility is valid concern, thanks for explanation.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #32834: [SPARK-35690][SS] Stream-stream join keys should be reordered properly

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #32834:
URL: https://github.com/apache/spark/pull/32834#issuecomment-857537381


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/44067/
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #32834: [SPARK-35690][SS] Stream-stream join keys should be reordered properly

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32834:
URL: https://github.com/apache/spark/pull/32834#issuecomment-857537381


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/44067/
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] c21 commented on pull request #32834: [SPARK-35690][SS] Stream-stream join keys should be reordered properly

Posted by GitBox <gi...@apache.org>.
c21 commented on pull request #32834:
URL: https://github.com/apache/spark/pull/32834#issuecomment-857440253


   > I meant the final key.
   
   Sorry I still don't get it. Are you referring the `key` in state store?


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HeartSaVioR commented on pull request #32834: [SPARK-35690][SS] Stream-stream join keys should be reordered properly

Posted by GitBox <gi...@apache.org>.
HeartSaVioR commented on pull request #32834:
URL: https://github.com/apache/spark/pull/32834#issuecomment-857438284


   >> The different output of reorder breaks compatibility again.
   > Are you referring to the output for join, or something else? Output for join should not be affected.
   
   I meant the final key.
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #32834: [SPARK-35690][SS] Stream-stream join keys should be reordered properly

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #32834:
URL: https://github.com/apache/spark/pull/32834#issuecomment-857393164


   **[Test build #139542 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/139542/testReport)** for PR 32834 at commit [`60efa47`](https://github.com/apache/spark/commit/60efa47af155edd7658bf27595e73348a246406f).


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HeartSaVioR edited a comment on pull request #32834: [SPARK-35690][SS] Stream-stream join keys should be reordered properly

Posted by GitBox <gi...@apache.org>.
HeartSaVioR edited a comment on pull request #32834:
URL: https://github.com/apache/spark/pull/32834#issuecomment-857426847


   Please be aware of "existing state" when dealing with stateful operation. Existing states should have been stored as not-reordered one, hence once we change the key to be reordered one, it will end up with different partitioning, and also unable to find from state store. These are correctness issues.
   
   Even we put aside the existing state a bit, we never ever be able to change the logic on reordering. The different output of reorder breaks compatibility again.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] c21 edited a comment on pull request #32834: [SPARK-35690][SS] Stream-stream join keys should be reordered properly

Posted by GitBox <gi...@apache.org>.
c21 edited a comment on pull request #32834:
URL: https://github.com/apache/spark/pull/32834#issuecomment-857440253


   > I meant the final key.
   
   Sorry I still don't get it. Are you referring the `key` in state store?
   
   I just want to understand clearly what the other problem is, beside state store compatibility. 


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] c21 closed pull request #32834: [SPARK-35690][SS] Stream-stream join keys should be reordered properly

Posted by GitBox <gi...@apache.org>.
c21 closed pull request #32834:
URL: https://github.com/apache/spark/pull/32834


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] c21 edited a comment on pull request #32834: [SPARK-35690][SS] Stream-stream join keys should be reordered properly

Posted by GitBox <gi...@apache.org>.
c21 edited a comment on pull request #32834:
URL: https://github.com/apache/spark/pull/32834#issuecomment-857461894


   @HeartSaVioR - got it. State store compatibility is valid concern, thanks for explanation. Closing this for now per above discussion.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #32834: [SPARK-35690][SS] Stream-stream join keys should be reordered properly

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32834:
URL: https://github.com/apache/spark/pull/32834#issuecomment-857417826


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/139542/
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] cloud-fan commented on pull request #32834: [SPARK-35690][SS] Stream-stream join keys should be reordered properly

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #32834:
URL: https://github.com/apache/spark/pull/32834#issuecomment-857411344


   looks reasonable


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #32834: [SPARK-35690][SS] Stream-stream join keys should be reordered properly

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32834:
URL: https://github.com/apache/spark/pull/32834#issuecomment-857500074


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44067/
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #32834: [SPARK-35690][SS] Stream-stream join keys should be reordered properly

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #32834:
URL: https://github.com/apache/spark/pull/32834#issuecomment-857417826


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/139542/
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HeartSaVioR edited a comment on pull request #32834: [SPARK-35690][SS] Stream-stream join keys should be reordered properly

Posted by GitBox <gi...@apache.org>.
HeartSaVioR edited a comment on pull request #32834:
URL: https://github.com/apache/spark/pull/32834#issuecomment-857460454


   No, I'm referring the output of reorderKey, which will be used to partition, and compare with key in state store. Both partitioning and comparison should be the same with existing state store.
   
   My point is all about state store compatibility. If there's any chance for the output of reorder to be changed due to various ways like different Spark versions, table metadata (if that can affect the reordering), etc, state store compatibility will be broken.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #32834: [SPARK-35690][SS] Stream-stream join keys should be reordered properly

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32834:
URL: https://github.com/apache/spark/pull/32834#issuecomment-857396323


   **[Test build #139542 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/139542/testReport)** for PR 32834 at commit [`60efa47`](https://github.com/apache/spark/commit/60efa47af155edd7658bf27595e73348a246406f).
    * This patch **fails to build**.
    * This patch merges cleanly.
    * This patch adds no public classes.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun commented on pull request #32834: [SPARK-35690][SS] Stream-stream join keys should be reordered properly

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #32834:
URL: https://github.com/apache/spark/pull/32834#issuecomment-857402212


   cc @viirya 


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #32834: [SPARK-35690][SS] Stream-stream join keys should be reordered properly

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32834:
URL: https://github.com/apache/spark/pull/32834#issuecomment-857393164


   **[Test build #139542 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/139542/testReport)** for PR 32834 at commit [`60efa47`](https://github.com/apache/spark/commit/60efa47af155edd7658bf27595e73348a246406f).


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] c21 commented on pull request #32834: [SPARK-35690][SS] Stream-stream join keys should be reordered properly

Posted by GitBox <gi...@apache.org>.
c21 commented on pull request #32834:
URL: https://github.com/apache/spark/pull/32834#issuecomment-857391723


   cc @cloud-fan if you have time to take a look, thanks.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] viirya commented on pull request #32834: [SPARK-35690][SS] Stream-stream join keys should be reordered properly

Posted by GitBox <gi...@apache.org>.
viirya commented on pull request #32834:
URL: https://github.com/apache/spark/pull/32834#issuecomment-857403433


   cc @HeartSaVioR 


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HeartSaVioR commented on pull request #32834: [SPARK-35690][SS] Stream-stream join keys should be reordered properly

Posted by GitBox <gi...@apache.org>.
HeartSaVioR commented on pull request #32834:
URL: https://github.com/apache/spark/pull/32834#issuecomment-857426847


   Please be aware of "existing state" when dealing with stateful operation. Existing state will be stored as not-reordered one, hence once we change the key to be reordered one, it will end up with different partitioning, and also unable to find from state store. These are correctness issues.
   
   Even we put aside the existing state a bit, we never ever be able to change the logic on reordering. The different output of reorder breaks compatibility again.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HeartSaVioR commented on pull request #32834: [SPARK-35690][SS] Stream-stream join keys should be reordered properly

Posted by GitBox <gi...@apache.org>.
HeartSaVioR commented on pull request #32834:
URL: https://github.com/apache/spark/pull/32834#issuecomment-857460454


   My point is all about state store compatibility. If there's any chance for the output of reorder to be changed due to various ways like different Spark versions, table metadata (if that can affect the reordering), etc, state store compatibility will be broken.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] c21 commented on pull request #32834: [SPARK-35690][SS] Stream-stream join keys should be reordered properly

Posted by GitBox <gi...@apache.org>.
c21 commented on pull request #32834:
URL: https://github.com/apache/spark/pull/32834#issuecomment-857436089


   @HeartSaVioR - yeah, thanks for pointing it out. It seems that state store compatibility is the deal breaker here.
   
   > The different output of reorder breaks compatibility again.
   
   Are you referring to the output for join, or something else? Output for join should not be affected.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #32834: [SPARK-35690][SS] Stream-stream join keys should be reordered properly

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32834:
URL: https://github.com/apache/spark/pull/32834#issuecomment-857531800


   Kubernetes integration test status success
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44067/
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org