feat: add with_clustering_columns to the update table builder #12
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.40) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 319 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 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.345
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #12"
general
weight: 0.35
nastra
What changes are proposed in this pull request?
Adds
UpdateTableTransactionBuilder::with_clustering_columns(Vec<ColumnName>)and its FFI setterupdate_table_txn_builder_with_clustering_columns.delta.clusteringdomain. An empty list clears the keys.clusteringanddomainMetadatawhen the protocol lacks them, and never removes them. Writes in the same transaction collect stats for the new keys.build()rejects unresolved keys, duplicate keys (case-insensitive), ineligible types, and partitioned tables (including an empty list). No schema field is added or dropped, and no file is rewritten.ALTER TABLEcounts as a table change.Built on the update preparation from #10. Clustering resolves against the configuration that
prepare_update_table_metadatareturns, soprepare_update_table_metadataitself is unchanged. CREATE TABLE now sharesresolve_physical_clustering_columns.Deviations from Java Kernel:
build()(before any I/O), not in the setter, because Rust builder setters are infallible.KernelErrorbecause the Delta error catalog has no clustering condition selected.How was this change tested?
Unit tests cover the last call winning, which actions are emitted, the legacy-protocol upgrade, the Debug output, and the blind-append rejection. Integration tests cover reorder, replace, case-insensitive matching, enabling clustering, nested physical paths in none/name/id mapping modes, the empty list, the omitted setter, reasserting the current keys, resolving against columns added in the same transaction, a Write that changes keys and adds a file, every rejection with nothing committed, and the partitioned table with both the AlterTable and Write operations. An FFI test covers the omitted, empty, and dotted-segment cases.
This pull request and its description were written by Isaac.