Support Iceberg v3 deletion vector writes on GPU - #15717
Conversation
Signed-off-by: Ray Liu <liurenjie2008@gmail.com>
Signed-off-by: Ray Liu <liurenjie2008@gmail.com>
Signed-off-by: Ray Liu <liurenjie2008@gmail.com>
Signed-off-by: Ray Liu <liurenjie2008@gmail.com>
Signed-off-by: Ray Liu <liurenjie2008@gmail.com>
Signed-off-by: Ray Liu <liurenjie2008@gmail.com>
Signed-off-by: Ray Liu <liurenjie2008@gmail.com>
Signed-off-by: Ray Liu <liurenjie2008@gmail.com>
Signed-off-by: Ray Liu <liurenjie2008@gmail.com>
Signed-off-by: Ray Liu <liurenjie2008@gmail.com>
Signed-off-by: Ray Liu <liurenjie2008@gmail.com>
Signed-off-by: Ray Liu <liurenjie2008@gmail.com> # Conflicts: # iceberg/common/src/main/java/com/nvidia/spark/rapids/iceberg/IcebergDeletionVector.java # iceberg/common/src/main/java/com/nvidia/spark/rapids/iceberg/IcebergShimUtils.java # iceberg/common/src/main/java/com/nvidia/spark/rapids/iceberg/ShimUtils.java # iceberg/common/src/main/scala/com/nvidia/spark/rapids/iceberg/data/GpuDeleteLoader.scala # iceberg/common/src/main/scala/com/nvidia/spark/rapids/iceberg/parquet/GpuIcebergDeletionVector.scala # iceberg/common/src/main/scala/com/nvidia/spark/rapids/iceberg/parquet/GpuMultiThreadIcebergParquetReader.scala # iceberg/common/src/main/scala/com/nvidia/spark/rapids/iceberg/parquet/GpuSingleThreadIcebergParquetReader.scala # iceberg/common/src/main/scala/com/nvidia/spark/rapids/iceberg/parquet/reader.scala # iceberg/common/src/main/scala/org/apache/iceberg/spark/source/GpuIcebergPartitionReader.scala # iceberg/iceberg-1-10-x/src/main/java/com/nvidia/spark/rapids/iceberg/iceberg110x/ShimUtilsImpl.java # iceberg/iceberg-1-11-x/src/main/java/com/nvidia/spark/rapids/iceberg/iceberg111x/ShimUtilsImpl.java # iceberg/iceberg-1-6-x/src/main/java/com/nvidia/spark/rapids/iceberg/iceberg16x/ShimUtilsImpl.java # iceberg/iceberg-1-9-x/src/main/java/com/nvidia/spark/rapids/iceberg/iceberg19x/ShimUtilsImpl.java # integration_tests/src/main/python/iceberg/iceberg_merge_on_read_test.py # sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuBatchScanExecMetrics.scala # sql-plugin/src/main/scala/com/nvidia/spark/rapids/GpuMetrics.scala
Signed-off-by: Ray Liu <liurenjie2008@gmail.com>
Signed-off-by: Ray Liu <liurenjie2008@gmail.com>
Signed-off-by: Ray Liu <liurenjie2008@gmail.com>
Signed-off-by: Ray Liu <liurenjie2008@gmail.com>
Signed-off-by: Ray Liu <liurenjie2008@gmail.com>
Signed-off-by: Ray Liu <liurenjie2008@gmail.com>
Signed-off-by: Ray Liu <liurenjie2008@gmail.com>
Greptile SummaryThis PR adds GPU support for Iceberg v3 Puffin deletion-vector writes while retaining compatibility across Iceberg 1.6 through 1.11.
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains in the eligible follow-up-review scope. No blocking failure remains. Important Files Changed
Sequence DiagramsequenceDiagram
participant Spark as Spark position-delta write
participant GPU as GPU delta writer
participant Shim as Iceberg version shim
participant DV as Iceberg DV writer
participant Commit as Iceberg commit
Spark->>GPU: Create task writer
GPU->>Shim: Load rewritable deletes
Shim-->>GPU: Version-specific broadcast handle
GPU->>GPU: Produce path/position batches
GPU->>Shim: Construct deletion-vector writer
Shim->>DV: Create PartitioningDVWriter
loop Each position delete
GPU->>DV: Write path and position
end
DV-->>GPU: DeleteWriteResult
GPU->>Shim: Combine data and delete results
Shim-->>Commit: Data, new deletes, referenced data, rewritten deletes
Reviews (5): Last reviewed commit: "Merge remote-tracking branch 'upstream/m..." | Re-trigger Greptile |
Signed-off-by: Ray Liu <liurenjie2008@gmail.com>
Signed-off-by: Ray Liu <liurenjie2008@gmail.com>
|
Better try to ask AI to help reduce duplicate/boilerplate code. |
|
The following steps are on CPU, could we file a follow-up issue to move to GPU?
|
Signed-off-by: Ray Liu <liurenjie2008@gmail.com>
Signed-off-by: Ray Liu <liurenjie2008@gmail.com>
|
build |
|
Filed NVIDIA/cudf-spark-jni#5082 to track the GPU Roaring64 build, union, and portable serialization primitive. |
|
We need to hold the merge, since we need to merge #15866 first. Iceberg v3 will always update lineage metadata when doing dml operations. |
Fixes #15442.
Description
GPU UPDATE and MERGE support also depends on the row-lineage work tracked by #15441.
Iceberg v3 uses Puffin deletion vectors instead of Parquet position-delete files. The GPU
position-delta write path previously rejected the Puffin delete format, so merge-on-read
writes could not produce or update v3 deletion vectors.
This change:
compatibility with Iceberg 1.6, 1.9, 1.10, and 1.11
an Iceberg 1.9+ source layer that is not compiled by the Iceberg 1.6 module
resource management and releases the GPU batch before the row-wise writer handoff
deletion vector per referenced data file
Integration coverage exercises clustered and fanout deletion-vector writes, repeated DV
merges, and conversion of existing v2 Parquet position deletes after upgrading a table to
format v3. DELETE, UPDATE, and MERGE use separate CPU/GPU tables and compare final results
through the CPU reader.
Validation performed:
package layout: 5 passed
on the extra classpath: 5 passed
git diff --checkThe full Spark 3.5.8 reactor currently stops before the Iceberg modules because the current
JNI snapshot deprecates four existing
applyBooleanMaskcall sites under warnings-as-errors.The affected Iceberg modules were built directly as listed above.
The per-row Iceberg writer handoff and potential bulk API optimization are tracked by
NVIDIA/cudf-spark-jni#5070.
Checklists
Documentation
Testing
(Please provide the names of the existing tests in the PR description.)
Performance