You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "zml1206 (via GitHub)" <gi...@apache.org> on 2024/01/03 11:15:37 UTC

[PR] [SPARK-21492][SQL][FOLLOWUP] Remove invalid attachCleanupResourceChecker in JoinSuite [spark]

zml1206 opened a new pull request, #44573:
URL: https://github.com/apache/spark/pull/44573

   ### What changes were proposed in this pull request?
   Remove `attachCleanupResourceChecker` in `JoinSuite`.
   
   ### Why are the changes needed?
   `attachCleanupResourceChecker` is invalid: 
   1. The matching of `SortExec` needs to be in `QueryExecution.executePlan` not `QueryExecution.sparkPlan`, The correct way is `foreachUp(df.queryExecution.executedPlan){f()}`.
   2. `Mockito` counts the number of function calls, only for objects after spying. Calls to the original object are not counted. eg
   ```
   test() {
       val data = new java.util.ArrayList[String]()
       val _data = spy(data)
       data.add("a");
       data.add("b");
       data.add("b");
       _data.add("b")
       verify(_data, times(0)).add("a")
       verify(_data, times(1)).add("b")
     }
   ```
   Therefore, when using `df.queryExecution.executedPlan` correctly to match, count is always one.
   3. Not all `SortMergeJoin` joinTypes will trigger cleanupResources(), such as 'full outer join'.
   
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   
   ### How was this patch tested?
   Local test, update `attachCleanupResourceChecker` atLeastOnce to nerver, ut is still successful. 
   ```
   verify(sortExec, atLeastOnce).cleanupResources()
   verify(sortExec.rowSorter, atLeastOnce).cleanupResources()
   ```
   to 
   ```
   verify(sortExec, never).cleanupResources()
   verify(sortExec.rowSorter, never).cleanupResources()
   ```
   ### Was this patch authored or co-authored using generative AI tooling?
   No.
   


-- 
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: reviews-unsubscribe@spark.apache.org

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


Re: [PR] [SPARK-46584][SQL][TESTS] Remove invalid attachCleanupResourceChecker in JoinSuite [spark]

Posted by "yaooqinn (via GitHub)" <gi...@apache.org>.
yaooqinn closed pull request #44573: [SPARK-46584][SQL][TESTS] Remove invalid attachCleanupResourceChecker in JoinSuite
URL: https://github.com/apache/spark/pull/44573


-- 
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: reviews-unsubscribe@spark.apache.org

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


Re: [PR] [SPARK-46584][SQL][TESTS] Remove invalid attachCleanupResourceChecker in JoinSuite [spark]

Posted by "zml1206 (via GitHub)" <gi...@apache.org>.
zml1206 commented on PR #44573:
URL: https://github.com/apache/spark/pull/44573#issuecomment-1876206825

   > Let's file a new JIRA otherwise we can't set the version properties properly in the JIRA.
   
   Updated.


-- 
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: reviews-unsubscribe@spark.apache.org

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


Re: [PR] [SPARK-46584][SQL][TESTS] Remove invalid attachCleanupResourceChecker in JoinSuite [spark]

Posted by "zml1206 (via GitHub)" <gi...@apache.org>.
zml1206 commented on PR #44573:
URL: https://github.com/apache/spark/pull/44573#issuecomment-1876229068

   Thank you for review. @yaooqinn @HyukjinKwon 


-- 
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: reviews-unsubscribe@spark.apache.org

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


Re: [PR] [SPARK-21492][SQL][FOLLOWUP] Remove invalid attachCleanupResourceChecker in JoinSuite [spark]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #44573:
URL: https://github.com/apache/spark/pull/44573#issuecomment-1876151412

   Let's file a new JIRA


-- 
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: reviews-unsubscribe@spark.apache.org

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


Re: [PR] [SPARK-46584][SQL][TESTS] Remove invalid attachCleanupResourceChecker in JoinSuite [spark]

Posted by "yaooqinn (via GitHub)" <gi...@apache.org>.
yaooqinn commented on PR #44573:
URL: https://github.com/apache/spark/pull/44573#issuecomment-1876229969

   Thank you all, merged to master


-- 
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: reviews-unsubscribe@spark.apache.org

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