This is an automated email from the ASF dual-hosted git repository.

dongjoon-hyun pushed a commit to branch branch-4.x
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-4.x by this push:
     new ce066e05af62 [SPARK-60753][4.4][SQL][TEST][FOLLOWUP] Use Thread.getId 
instead of threadId in BaseScriptTransformationSuite
ce066e05af62 is described below

commit ce066e05af62ad77af608bdbc6503aa8150b8e29
Author: YangJie <[email protected]>
AuthorDate: Wed Nov 11 22:49:09 2026 -0800

    [SPARK-60753][4.4][SQL][TEST][FOLLOWUP] Use Thread.getId instead of 
threadId in BaseScriptTransformationSuite
    
    ### What changes were proposed in this pull request?
    
    This replaces `Thread.threadId()` with `Thread.getId` in 
`BaseScriptTransformationSuite`, which the `branch-4.x` backport of SPARK-60753 
(dacba477633) brought over from master.
    
    ### Why are the changes needed?
    
    `Thread.threadId()` was added in Java 19. `branch-4.x` compiles with 
`-release 17`, so the `sql/core` tests no longer compile on this branch. Both 
methods return the same ID.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No, test only.
    
    ### How was this patch tested?
    
    Existing tests. Without this change, the `sql/core` tests of `branch-4.x` 
fail to compile with `value threadId is not a member of Thread`.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    Generated-by: Claude Opus 5.5
    
    Closes #60377 from LuciferYang/SPARK-60753-4.x-java17.
    
    Authored-by: YangJie <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
    
    
    skip-checks: true
---
 .../org/apache/spark/sql/execution/BaseScriptTransformationSuite.scala  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/sql/core/src/test/scala/org/apache/spark/sql/execution/BaseScriptTransformationSuite.scala
 
b/sql/core/src/test/scala/org/apache/spark/sql/execution/BaseScriptTransformationSuite.scala
index 2ed4a0129431..b6b7c0cef6d3 100644
--- 
a/sql/core/src/test/scala/org/apache/spark/sql/execution/BaseScriptTransformationSuite.scala
+++ 
b/sql/core/src/test/scala/org/apache/spark/sql/execution/BaseScriptTransformationSuite.scala
@@ -463,7 +463,7 @@ abstract class BaseScriptTransformationSuite extends 
QueryTest {
     // destroyed script is not logged as an error. The writer threads of 
earlier tests, which have
     // the same name, may still log, so only those of this test are checked.
     assert(uncaughtExceptionHandler.exception.isEmpty)
-    val earlierThreads = before.map(_.threadId())
+    val earlierThreads = before.map(_.getId)
     val errors = logAppender.loggingEvents.filter { event =>
       event.getThreadName.endsWith("WriterThread-Feed") &&
         !earlierThreads.contains(event.getThreadId)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to