dongjoon-hyun opened a new pull request, #60110:
URL: https://github.com/apache/spark/pull/60110

   ### What changes were proposed in this pull request?
   
   This PR removes the "Hive 4.2 requires Java 21 or later" guard that 
SPARK-57263 added together with the Hive 4.2 metastore support, and everything 
that existed only for it:
   
   - `IsolatedClientLoader`: remove the constructor check that threw 
`unsupportedHiveMetastoreVersionForJavaError` when `version == hive.v4_2` and 
`!Utils.isJavaVersionAtLeast21`.
   - `QueryExecutionErrors`: remove 
`unsupportedHiveMetastoreVersionForJavaError`.
   - `error-conditions.json`: remove the 
`UNSUPPORTED_HIVE_METASTORE_VERSION_FOR_JAVA` error condition.
   - `HiveUtils` and `docs/sql-data-sources-hive-tables.md`: remove "Note: Hive 
4.2 requires Java 21 or later." from the description of 
`spark.sql.hive.metastore.version`.
   - `HiveClientVersions` (test): remove the filter that dropped `4.2` from 
`versions` on Java < 21. `versions` is now the 
`SPARK_TEST_HIVE_CLIENT_VERSIONS` list, or the default list that includes `4.2`.
   
   ### Why are the changes needed?
   
   SPARK-60669 dropped Java 17 support and made Java 21 the minimum, so 
`Utils.isJavaVersionAtLeast21` is always true and the guard can never fire. 
Spark is compiled with `--release 21` (class file major version 65), so a JVM 
older than Java 21 cannot even load `IsolatedClientLoader`. What is left is a 
dead branch, an error condition that nothing can raise, and a documentation 
note that now applies to all of Spark rather than to Hive 4.2 only.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No. `UNSUPPORTED_HIVE_METASTORE_VERSION_FOR_JAVA` was added by SPARK-57263 
on `master` and has not been released: it does not exist in `branch-4.x`, 
`branch-4.3`, or the `v4.3.0` tag (tagged commit dated 2026-10-27). The removed 
guard could only fire on a JVM older than Java 21, which `master` no longer 
runs on.
   
   ### How was this patch tested?
   
   On JDK 21:
   
   ```
   build/sbt -Phive catalyst/Test/compile hive/Test/compile
   build/sbt -Phive 'core/testOnly org.apache.spark.SparkThrowableSuite'
   build/sbt -Phive 'hive/testOnly org.apache.spark.sql.hive.HiveUtilsSuite'
   ```
   
   Also checked that nothing references the removed code, and that the error 
condition is not in any release:
   
   ```
   git grep -n -e UNSUPPORTED_HIVE_METASTORE_VERSION_FOR_JAVA -e 
unsupportedHiveMetastoreVersionForJava
   git grep -n isJavaVersionAtLeast21 -- sql/hive
   git grep -n UNSUPPORTED_HIVE_METASTORE_VERSION_FOR_JAVA v4.3.0 -- 
common/utils/src/main/resources/error/error-conditions.json
   ```
   
   All three print nothing. The same check on `branch-4.x` and `branch-4.3` 
also prints nothing.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Sonnet 5.5


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to