Size Iceberg scan splits from scan split history #17173
All Vouch review confidence checks passed
Residual risk 0.24 = Change Risk (0.45) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 409 lines diff across 5 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.360
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #17173"
general
weight: 0.35
gerashegalov
Fixes #17172.
Stacked on #17123; until it merges, this PR also shows its three commits. This PR's own commits are the four after
c9e31d31e(#17123's head):7268673c5Key Iceberg scans by their pushed and runtime filters3b9a05797Size Iceberg scan splits from scan split historya51a61a08Test GPU reads of Iceberg scans sized from history against the CPUa024fd644Document Iceberg scans in the scan split heuristic READMEDescription
Scan split history sizes v1, Hive and DSv2 file scan splits from recorded decode-expansion ratios. This applies it to Iceberg scans, under the same configs (
spark.rapids.sql.history.scanSplit.enabledstays false). No new configs.IcebergPlanKeyhashes a scan's table, columns read, and each pushed or runtime filter's operators and columns into the plan hash, and the filter values into the literals hash. Conjuncts and IN values may come in any order.TableScanUtil.planTaskGroupsand Iceberg's batch is rebuilt over the new groups, so partitions keep Iceberg's locality, broadcast table and delete-file handling. The lookup falls back to the split Iceberg grouped by after its adaptive sizing, so with no history Iceberg's groups are unchanged. Each split records its decoded and data bytes (delete files excluded) when read to the end; only the newest planning of a scan is recorded.split-sizeread option, and scans with delete files (the GPU reader disables coalescing and combining for any partition containing one). Failures keep Iceberg's groups and log one warning.SparkBatchis rebuilt reflectively, because its constructor differs between Iceberg 1.6–1.10 and 1.11.Tests:
IcebergPlanKeySuite(5),GpuSparkBatchRegroupSuite(6), andGpuIcebergScanSplitHistorySuite(2), which runs a GPU session with history on and checks that a regrouped GPU read returns the CPU's rows and that a scan with delete files is not regrouped. The Iceberg source suites pass on Spark 3.5.6 (21, Iceberg 1.9/1.10) and Spark 4.0.2 (13, Iceberg 1.10). Scalastyle clean. Not compiled for Iceberg 1.6 or Databricks.Written with AI assistance and reviewed by the author.
Checklists
Documentation
Testing
(Please provide the names of the existing tests in the PR description.)
Performance
Performance
Four Iceberg ETL jobs, Spark 4.0.2, Iceberg 1.11, 6 GPU executors; 5 runs per arm after one recording run, best run of each arm:
| Job | Scan tasks, off / on | Time, off / on | Change |
|---|---|---|---|
| A | 11,138 / 5,396 | 53.6 s / 46.9 s | -13% |
| B | 1,504 / 682 | 45.6 s / 39.5 s | -13% |
| C | 9,750 / 614 | 305 s / 328 s | +8% |
| D | 720 / 720 | unchanged | split below the 64 MB floor |