[Spark] Add a SchemaUtils.isReadCompatible overload for Java callers #8101
All Vouch review confidence checks passed
Residual risk 0.13 = Change Risk (0.33) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.33 · 149 lines diff across 1 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.300
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #8101"
general
weight: 0.35
huan233usc
Which Delta project/connector is this regarding?
Description
The Java helper
v2/utils/SchemaUtils.isReadCompatiblecalled the Scala default-argument gettersof
org.apache.spark.sql.delta.schema.SchemaUtils.isReadCompatibledirectly(
isReadCompatible$default$4()toisReadCompatible$default$8()). These methods are compilerartifacts: their names depend on the parameter positions, so a new parameter changes the Java code
that is necessary.
This PR adds the overload
isReadCompatible(existingSchema, readSchema, forbidTightenNullability).It uses the default value of each other parameter. The Java helper calls it.
How was this patch tested?
Existing tests. The same change was tested in the Databricks Runtime copy of this code:
SchemaUtilsTest(Java, callsv2/utils/SchemaUtils.isReadCompatible) andSchemaUtilsSuitepass, and all Scala callers of
isReadCompatiblecompile with the new overload.Does this PR introduce _any_ user-facing changes?
No. The overload passes the same values as the default arguments.
This pull request and its description were written by Isaac.