[SPARK-60895][SQL] Remove the Java 21 guard for the Hive 4.2 metastore #60110
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 331 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.347
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #60110"
general
weight: 0.35
spark-test
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 threwunsupportedHiveMetastoreVersionForJavaErrorwhenversion == hive.v4_2and!Utils.isJavaVersionAtLeast21.QueryExecutionErrors: removeunsupportedHiveMetastoreVersionForJavaError.error-conditions.json: remove theUNSUPPORTED_HIVE_METASTORE_VERSION_FOR_JAVAerror condition.HiveUtilsanddocs/sql-data-sources-hive-tables.md: remove "Note: Hive 4.2 requires Java 21 or later." from the description ofspark.sql.hive.metastore.version.HiveClientVersions(test): remove the filter that dropped4.2fromversionson Java < 21.versionsis now theSPARK_TEST_HIVE_CLIENT_VERSIONSlist, or the default list that includes4.2.Why are the changes needed?
SPARK-60669 dropped Java 17 support and made Java 21 the minimum, so
Utils.isJavaVersionAtLeast21is 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 loadIsolatedClientLoader. 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_JAVAwas added by SPARK-57263 onmasterand has not been released: it does not exist inbranch-4.x,branch-4.3, or thev4.3.0tag (tagged commit dated 2026-10-27). The removed guard could only fire on a JVM older than Java 21, whichmasterno longer runs on.How was this patch tested?
On JDK 21:
Also checked that nothing references the removed code, and that the error condition is not in any release:
All three print nothing. The same check on
branch-4.xandbranch-4.3also prints nothing.Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Sonnet 5.5