[Spark] Add Delta V2 scan builder diagnostics #8066
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 233 lines diff across 2 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.326
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #8066"
general
weight: 0.35
huan233usc
Which Delta project/connector is this regarding?
Description
Add structured DEBUG diagnostics to the Delta V2 scan builder for filter classification, requested and pruned schemas, effective limits, scan construction, and deferred file selection. Summaries include redacted table context, counts, and elapsed time where available.
Filter rendering is defensive: an expression whose
.sqlmethod throws retains its original partition/data-filter classification and gets a diagnostic placeholder. INFO logging does not render expressions. Build and deferred-selection failures emit bounded WARN summaries with the operation, redacted table path, exception class, and elapsed time. They omit stack traces and exception messages; existing failure events and original exception propagation are retained.The file-selection supplier stays deferred. The diff focuses on
DeltaV2ScanBuilderand its existing test suite. Scope and severity review is requested in #8064.How was this patch tested?
All 134 tests passed on Spark 4.1 / Scala 2.13: 43 scan builder tests, 85 scan tests, and 6 batch tests. The scan builder suite includes six new regression cases for throwing SQL renderers on data and partition filters, no rendering at INFO, redacted bounded warnings with original exception identity, and deferred selection at INFO and DEBUG.
Java formatting, Scala style for the changed builder class, and whitespace checks passed.
Does this PR introduce _any_ user-facing changes?
Yes. The Delta V2 scan builder emits DEBUG planning summaries and bounded contextual WARN messages. Query results and the transaction-log format are unchanged.