Commit 1a87b53
Iceberg 1.11 support for Spark 411, part (3/3): accelerate SparkIncrementalAppendScan on GPU [databricks] (#14883)
Part (3/3) of #14853. Parts (1/3) (#14881) and (2/3) (#14882) are
merged; this PR is now based directly on `main`.
### Description
Iceberg 1.11 split `SparkBatchQueryScan` into a new class hierarchy and
the incremental-append query path (`.option("start-snapshot-id", ...)` +
`.option("end-snapshot-id", ...)`) moved into a brand-new class
`org.apache.iceberg.spark.source.SparkIncrementalAppendScan`
(package-private, 1.11-only, extends `SparkRuntimeFilterableScan`).
Before 1.11 the same query path went through `SparkBatchQueryScan` and
was matched by the existing batch-query `ScanRule` in
`IcebergProviderBase`. Without a rule for the new class, the leaf falls
back to CPU and the `GpuTransitionOverrides` partial-columnar assertion
fires, breaking `test_iceberg_incremental_read` (3 variants: PERFILE /
MULTITHREADED / COALESCING).
Adds:
- `GpuSparkIncrementalAppendScan` in `org.apache.iceberg.spark.source` —
mirrors `GpuSparkBatchQueryScan` since both CPU scans extend
`SparkRuntimeFilterableScan` (a
`SparkPartitioningAwareScan<PartitionScanTask>`). Takes the public
`Scan` type and reaches Iceberg internals only through the root-loadable
`GpuSparkScanAccess` bridge + public `SupportsRuntimeV2Filtering`; it
does **not** reference the package-private `SparkIncrementalAppendScan`
directly, so it works under `extraClassPath` / system-classpath
(#14959).
- `iceberg111x.IcebergProviderImpl` overrides `getScans` to register a
third `ScanRule` for `SparkIncrementalAppendScan` on top of the base
provider's two rules. The CPU class is loaded by string (via
`ShimReflectionUtils.loadClass`) because it is package-private.
- CI: `run_iceberg_tests()` in `jenkins/spark-tests.sh` enables the full
Iceberg integration suite on Spark 4.1 / Iceberg 1.11.0 (nightly).
### Review follow-ups deferred from part (2/3) (#14882)
Addressing the applicable review follow-ups deferred to this final split
PR:
- **Assert the selected shim package, not just `detectedVersion()`.**
Exposes `IcebergProvider.shimPackage()` through `IcebergProviderAccess`;
`iceberg_version_detection_test.py` now also asserts the selected shim
sub-package (e.g. Iceberg 1.11.0 → `iceberg111x`), so a correct
`detectedVersion()` paired with a wrong version→shim mapping now fails.
- **Clarified the version matrix comment** in
`run_iceberg_version_detect_tests()` to note that Spark 4.1 / Iceberg
1.11 is covered by nightly CI rather than pre-merge.
### Checklists
Documentation
- [ ] Updated for new or modified user-facing features or behaviors
- [x] No user-facing change
Testing
- [x] Added or modified tests to cover new code paths
(`iceberg_version_detection_test.py` now asserts the selected shim
package for existing version-detection runs.
`iceberg_test.py::test_iceberg_incremental_read` — 3 variants — covers
the GPU incremental-append path in nightly CI.)
- [ ] Covered by existing tests
- [ ] Not required
Performance
- [ ] Tests ran and results are added in the PR description
- [ ] Issue filed with a link in the PR description
- [x] Not required
---------
Signed-off-by: Chong Gao <res_life@163.com>
Signed-off-by: Chong Gao <chongg@nvidia.com>
Co-authored-by: Chong Gao <res_life@163.com>1 parent 8a8d20d commit 1a87b53
6 files changed
Lines changed: 182 additions & 11 deletions
File tree
- iceberg/iceberg-1-11-x/src/main/scala
- com/nvidia/spark/rapids/iceberg/iceberg111x
- org/apache/iceberg/spark/source
- integration_tests/src/main/python/iceberg
- jenkins
- sql-plugin/src/main/java/com/nvidia/spark/rapids/iceberg
Lines changed: 43 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
19 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
20 | 59 | | |
21 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
Lines changed: 97 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
35 | 41 | | |
36 | | - | |
37 | | - | |
| 42 | + | |
| 43 | + | |
38 | 44 | | |
39 | 45 | | |
40 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
41 | 54 | | |
42 | 55 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
175 | 174 | | |
176 | 175 | | |
177 | 176 | | |
| |||
269 | 268 | | |
270 | 269 | | |
271 | 270 | | |
| 271 | + | |
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
271 | | - | |
| 271 | + | |
| 272 | + | |
272 | 273 | | |
273 | 274 | | |
274 | 275 | | |
| |||
277 | 278 | | |
278 | 279 | | |
279 | 280 | | |
| 281 | + | |
280 | 282 | | |
281 | | - | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
282 | 290 | | |
283 | 291 | | |
284 | 292 | | |
| |||
302 | 310 | | |
303 | 311 | | |
304 | 312 | | |
305 | | - | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
306 | 316 | | |
307 | 317 | | |
308 | 318 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
27 | 36 | | |
0 commit comments