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

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


The following commit(s) were added to refs/heads/master by this push:
     new 6bb39188c4bf [SPARK-60939][DOC] Fix stale Java 17 comments now that 
Java 21 is the minimum
6bb39188c4bf is described below

commit 6bb39188c4bff4252f43b6d1eaf21477e6b5d62a
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Thu Nov 5 14:28:45 2026 -0800

    [SPARK-60939][DOC] Fix stale Java 17 comments now that Java 21 is the 
minimum
    
    ### What changes were proposed in this pull request?
    
    This PR fixes comments that still refer to Java 17 even though Java 21 is 
now the minimum:
    
    - `dev/scalastyle`, `project/SparkBuild.scala`: "Java 17/25 Maven build" -> 
"Java 21/25 Maven build" (matches the current `build_maven_java21*` / 
`build_maven_java25` workflows).
    - `JavaModuleOptions.java`: the module options are described as required 
for Java 21.
    - `CodeCompiler.scala`: drop the description of the JDK 17 lambda class 
name shape, which no longer exists.
    - `VariantUtil.java`: drop "platform-dependent on Java 17" for the default 
charset (UTF-8 is the default since JDK 18).
    - `SparkConnectDatabaseMetaData.scala`: refer to JDK 21 and the `javase/21` 
API docs link.
    
    Comments describing historical Java 17 behavior (e.g. SPARK-37106, 
`format_string`, `B` day period pattern) and configuration files are 
intentionally left unchanged.
    
    ### Why are the changes needed?
    
    SPARK-60669 raised the minimum Java version to 21. We had better make these 
comments up-to-date.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No. Comment-only change.
    
    ### How was this patch tested?
    
    Pass the CIs. No code change.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    Generated-by: Claude Sonnet 5.5
    
    Closes #60140 from dongjoon-hyun/SPARK-60939.
    
    Authored-by: Dongjoon Hyun <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 .../main/java/org/apache/spark/types/variant/VariantUtil.java    | 3 +--
 dev/scalastyle                                                   | 2 +-
 .../main/java/org/apache/spark/launcher/JavaModuleOptions.java   | 2 +-
 project/SparkBuild.scala                                         | 2 +-
 .../spark/sql/catalyst/expressions/codegen/CodeCompiler.scala    | 9 ++++-----
 .../sql/connect/client/jdbc/SparkConnectDatabaseMetaData.scala   | 4 ++--
 6 files changed, 10 insertions(+), 12 deletions(-)

diff --git 
a/common/variant/src/main/java/org/apache/spark/types/variant/VariantUtil.java 
b/common/variant/src/main/java/org/apache/spark/types/variant/VariantUtil.java
index 26be937a89e9..869fde1d55b7 100644
--- 
a/common/variant/src/main/java/org/apache/spark/types/variant/VariantUtil.java
+++ 
b/common/variant/src/main/java/org/apache/spark/types/variant/VariantUtil.java
@@ -520,8 +520,7 @@ public class VariantUtil {
       }
       checkIndex(start + length - 1, value.length);
       // The string content is UTF-8 encoded (it is written by 
`VariantBuilder.appendString`).
-      // Decode with UTF-8 explicitly rather than relying on the JVM default 
charset, which is
-      // platform-dependent on Java 17.
+      // Decode with UTF-8 explicitly rather than relying on the JVM default 
charset.
       return new String(value, start, length, StandardCharsets.UTF_8);
     }
     throw unexpectedType(Type.STRING);
diff --git a/dev/scalastyle b/dev/scalastyle
index 3db06ada8a89..22687c94b888 100755
--- a/dev/scalastyle
+++ b/dev/scalastyle
@@ -33,7 +33,7 @@ if test ! -z "$ERRORS"; then
     # When running under GitHub Actions, also emit each scalastyle violation as
     # a workflow `::error` annotation so it appears inline on the PR's "Files
     # changed" tab. Without this, a violation cascades into ~7 red CI checks
-    # (Linters, Java 17/25 Maven build, Documentation generation, sparkr,
+    # (Linters, Java 21/25 Maven build, Documentation generation, sparkr,
     # Docker integration, TPC-DS) -- all needing catalyst to compile -- and
     # each only surfaces a generic "exit code 1" with no file/line, forcing
     # the user to download a full job log to find the actual violation.
diff --git 
a/launcher/src/main/java/org/apache/spark/launcher/JavaModuleOptions.java 
b/launcher/src/main/java/org/apache/spark/launcher/JavaModuleOptions.java
index feab84380422..2ec582a457f8 100644
--- a/launcher/src/main/java/org/apache/spark/launcher/JavaModuleOptions.java
+++ b/launcher/src/main/java/org/apache/spark/launcher/JavaModuleOptions.java
@@ -19,7 +19,7 @@ package org.apache.spark.launcher;
 
 /**
  * This helper class is used to place some JVM runtime options(eg: 
`--add-opens`)
- * required by Spark when using Java 17. `DEFAULT_MODULE_OPTIONS` has added
+ * required by Spark when using Java 21. `DEFAULT_MODULE_OPTIONS` has added
  * `-XX:+IgnoreUnrecognizedVMOptions` to be robust.
  *
  * @since 3.3.0
diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala
index 8d938a0a580a..97d3be2f6af9 100644
--- a/project/SparkBuild.scala
+++ b/project/SparkBuild.scala
@@ -254,7 +254,7 @@ object SparkBuild extends PomBuild {
   // `(Compile / compile)` -- a violation in one module would otherwise abort
   // compile for that module and every transitive dependent, cascading style
   // failures into every job that recompiles those sources (Build modules,
-  // Documentation generation, Java 17/25 Maven build, sparkr, ...). Each
+  // Documentation generation, Java 21/25 Maven build, sparkr, ...). Each
   // cascaded job then surfaces only a generic "exit code 1" with no file/line.
   // After decoupling, the dedicated lint job is the single place style
   // violations surface, with file/line annotations from `dev/scalastyle`.
diff --git 
a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeCompiler.scala
 
b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeCompiler.scala
index eed3e9c8b64e..4d069831a3cd 100644
--- 
a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeCompiler.scala
+++ 
b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeCompiler.scala
@@ -1075,11 +1075,10 @@ object JdkCodeCompiler extends CodeCompiler with 
Logging {
    * nesting (`Map$Entry`), Scala modules (`Foo$`, `Model$Load$Leaf`), package 
objects
    * (`pkg$Inner`), specialized (`Function1$mcII$sp`) and operator-named 
(`$colon$colon`)
    * classes. Runtime-synthesized classes need not carry it at all: a lambda is
-   * `Outer$$Lambda$14/0x...` on JDK 17 but `Outer$$Lambda/0x...` on 21 and 
later, and a
-   * hidden class is `Host$Named/0x...`. Neither routes on its own name: the 
tokenizer stops
-   * at `/`, and the truncated remainder either resolves to nothing (a lambda) 
or to the
-   * ordinary class the hidden class was defined from, whose own verdict is 
then the one that
-   * answers. On JDK 17 the lambda shape does pass the gate, at the cost of 
one failed load.
+   * `Outer$$Lambda/0x...`, and a hidden class is `Host$Named/0x...`. Neither 
routes on its
+   * own name: the tokenizer stops at `/`, and the truncated remainder either 
resolves to
+   * nothing (a lambda) or to the ordinary class the hidden class was defined 
from, whose own
+   * verdict is then the one that answers.
    *
    * The scan adds one linear pass over the body ahead of the compile-cache 
lookup, behind
    * the intrinsified `$`-digit gate that ordinary generated code fails 
immediately.
diff --git 
a/sql/connect/client/jdbc/src/main/scala/org/apache/spark/sql/connect/client/jdbc/SparkConnectDatabaseMetaData.scala
 
b/sql/connect/client/jdbc/src/main/scala/org/apache/spark/sql/connect/client/jdbc/SparkConnectDatabaseMetaData.scala
index b49894e92809..615e1250794e 100644
--- 
a/sql/connect/client/jdbc/src/main/scala/org/apache/spark/sql/connect/client/jdbc/SparkConnectDatabaseMetaData.scala
+++ 
b/sql/connect/client/jdbc/src/main/scala/org/apache/spark/sql/connect/client/jdbc/SparkConnectDatabaseMetaData.scala
@@ -768,8 +768,8 @@ class SparkConnectDatabaseMetaData(conn: 
SparkConnectConnection) extends Databas
   override def getDatabaseMinorVersion: Int = 
VersionUtils.minorVersion(conn.spark.version)
 
   // JSR-221 defines JDBC 4.0 API Specification - 
https://jcp.org/en/jsr/detail?id=221
-  // JDBC 4.3 is the latest Maintenance version of the JDBC 4.0 specification 
as of JDK 17
-  // 
https://docs.oracle.com/en/java/javase/17/docs/api/java.sql/java/sql/package-summary.html
+  // JDBC 4.3 is the latest Maintenance version of the JDBC 4.0 specification 
as of JDK 21
+  // 
https://docs.oracle.com/en/java/javase/21/docs/api/java.sql/java/sql/package-summary.html
   override def getJDBCMajorVersion: Int = 4
 
   override def getJDBCMinorVersion: Int = 3


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

Reply via email to