[Kernel] Add Snapshot.getClusteringColumnInfos() returning typed descriptors #6753
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.43) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 354 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.351
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #6753"
general
weight: 0.35
yyanyy
Which Delta project/connector is this regarding?
Description
Adds
Snapshot.getClusteringColumnInfos()returning per-clustering-column descriptors with the physical column reference, logical column reference, and data type for each clustering column on the snapshot, cached on first access.The v1 Spark connector already has a
ClusteringColumnInfocarrying the same physical/logical/data-type triple (ClusteringColumn.scala L68-L87). This PR surfaces the equivalent typed descriptor on the v2 KernelSnapshotinterface so callers no longer have to combineSnapshotImpl#getPhysicalClusteringColumns()withColumnMapping.getLogicalColumnNameAndDataTypeand unpack aTuple2themselves.Changes
io.delta.kernel.clustering.ClusteringColumnInfo(@Evolving,@since 4.3.0): three fields + static factoriesresolve,resolveAll,resolveAllFromDomainJson. Constructor is package-private +@VisibleForTesting.Snapshot.getClusteringColumnInfos(). Default body reads thedelta.clusteringdomain and delegates the parse + resolve toClusteringColumnInfo.resolveAllFromDomainJson(no internal- package types in the public interface).SnapshotImploverrides with aLazy<>cache mirroring the existinglazyClusteringColumnspattern.ClusteringMetadataDomainis hardened against incomplete domain JSON: a missing or nullclusteringColumnsfield is coalesced to an empty list instead of NPE-ing on read.How was this patch tested?
DeltaTableClusteringSuite(run under both V1 and V2 transaction-builder variants) covering column-mapping=id, unclustered, no-column-mapping, caching identity, nested-field clustering, andKernelExceptionpropagation for a stale domain.SnapshotGetClusteringColumnInfosDefaultBodySuiteusing aStubSnapshotto exercise the default body directly (absent/populated/empty-list, missing-field coalescing, malformed JSON, unresolvable column).ClusteringMetadataDomaintests pass.Does this PR introduce _any_ user-facing changes?
No. New public API only.