[FEA] Add Iceberg dictionary filter timing metric [reduced-it] #16792
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 429 lines diff across 5 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.363
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #16792"
general
weight: 0.35
res-life
Fixes #16790.
Description
GPU Iceberg scans do not expose the time spent on dictionary filtering. Add
icebergDictFilterTimeto the SQL UI at MODERATE and DEBUG levels. It measures dictionary predicate evaluation and dictionary-reader access, excluding statistics and Bloom filtering. Each file uses its own local timer. The reader trait publishes elapsed time throughaddTimeByMetric(metricName, value)using+=. The multithreaded reader overrides this hook to accumulate elapsed time in lazily createdAtomicLongentries inpendingTimers; the task thread publishes the totals when advancing or closing the reader. This avoids sharing mutable timer state or synchronizing metric updates, and records time even when dictionary filtering rejects every row group.Validation:
3fdbf6d759) for Spark 3.5.9 / Iceberg 1.9.x and 1.10.x, and Spark 4.1.1 / Iceberg 1.11.x, covering Scala 2.12 and 2.13./tmp, 800,000 rows in 16 Parquet files, MULTITHREADED reader with 8 workers. Matching and dictionary-rejected predicates produced the same results as CPU execution.GpuBatchScanin SQL execution plans, and task accumulator updates match the collected plan metric values. At ESSENTIAL level, the dictionary timing metric is absent from both collected plans and event-log plans.| Metrics level | Predicate | Matching rows | Event-log dictionary filter time |
| --- | --- | ---: | ---: |
| MODERATE |
id = 1| 0 | 17.58 ms || MODERATE |
id = 2| 400,000 | 9.61 ms || DEBUG |
id = 1| 0 | 6.98 ms || DEBUG |
id = 2| 400,000 | 6.39 ms |No new unit tests; validation uses the local CPU/GPU experiment above. Only the primary timer is updated; the shared metric factory's DEBUG companion remains zero.
Performance: a standalone CPU microbenchmark on Spark 3.5.9 / Iceberg 1.9.2 repeatedly filtered one local dictionary-encoded row group through the multithread reader, including atomic accumulation and publication on the calling task thread. Seven paired samples of 5,000 calls, after warmup and with alternating order, measured median times of 4.16 microseconds with timing disabled and 4.79 microseconds enabled. The sample ranges overlap; this does not establish an end-to-end performance difference.
The related-PR advisory found no new static interactions in completed joint checks. Checks involving #16735 and #16738 are incomplete because those branches conflict with current main; peers beyond the five-peer budget were not jointly checked. #15624 replaces the same filtering method and will need to preserve this timing metric when combined.
Authored with AI.
Checklists
Documentation
Documentation omitted for this timing metric.
Testing
(Please provide the names of the existing tests in the PR description.)
Performance