[GLUTEN][VL] Read Delta deletion vectors through Velox - #12867
Draft
malinjawi wants to merge 4 commits into
Draft
Conversation
Contributor
Author
|
Run Gluten Clickhouse CI |
|
Run Gluten Clickhouse CI on x86 |
malinjawi
force-pushed
the
agent/delta-dv-velox-range-read
branch
from
August 23, 2026 10:27
3879030 to
3fc14ba
Compare
|
Run Gluten Clickhouse CI on x86 |
Contributor
Author
|
Run Gluten Clickhouse CI |
malinjawi
force-pushed
the
agent/delta-dv-velox-range-read
branch
from
August 23, 2026 11:12
3fc14ba to
4cf7a2a
Compare
Contributor
Author
|
Run Gluten Clickhouse CI |
|
Run Gluten Clickhouse CI on x86 |
malinjawi
force-pushed
the
agent/delta-dv-velox-range-read
branch
from
August 23, 2026 13:02
4cf7a2a to
b4cd479
Compare
Contributor
Author
|
Run Gluten Clickhouse CI |
|
Run Gluten Clickhouse CI on x86 |
malinjawi
force-pushed
the
agent/delta-dv-velox-range-read
branch
from
August 24, 2026 15:35
b4cd479 to
0ed7632
Compare
|
Run Gluten Clickhouse CI on x86 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This is PR B of the Delta deletion-vector performance work and is stacked on #12836.
With
spark.gluten.sql.columnar.delta.dv.nativeRangeRead.enabled=true, the JVM resolves the authoritative absolute DV URI and passes{absolute path, offset, payload size}to Velox. Velox reads that range throughFileHandleFactoryandBufferedInput, allowing DV I/O to use existing split preloading and async data caching. Inline DVs remain on the JVM byte-handoff path because their bytes are already present in Delta metadata.The Substrait change is additive: the existing serialized-byte field remains supported. Before applying a bitmap, the native reader validates the range, Delta length prefix, CRC checksum, Roaring payload, and cardinality.
Until #12836 merges, GitHub shows both stacked commits in this PR. The PR B-specific change is commit
0ed763228.Why are the changes needed?
#12836 removes the approximately 100-second serial driver barrier observed with 2,461 DV files on S3. This optional follow-up removes the remaining executor-JVM materialization and JNI payload copy, and lets Velox overlap and cache DV I/O.
Performance validation
The matched benchmark used Spark 3.5.4, fixed resources, identical queries, balanced arm ordering, and the same immutable Delta snapshot. The validation build retained a temporary legacy-driver control; the final #12836 code does not expose that rollback path.
count(*)sumPR B improves the combined physical-scan median by 1.37x over PR A, from 19.085 s to 13.907 s. The combined median is calculated from each run's
sum + grouped_sumtime and therefore need not equal the sum of the displayed per-query medians.The snapshot contained 2,461 data files, all with DVs: 7,199,920,789 rows before DV application, DV cardinality 720,032,919, and 6,479,887,870 visible rows. All timed applications returned identical results.
A separate metrics run recorded 4,922 native range reads, exactly
2 physical scans × 2,461 DV files, and approximately 623.3 MiB of DV payload. Its 282.4 executor-seconds are summed parallel task time, not wall time; the application completed in approximately 20.84 s and was excluded from timing medians.A separate balanced three-round ingestion matrix over all 24 TPC-DS SF2500 tables produced these medians:
store_salesOnly
store_salescarried DVs. PR A and PR B are effectively tied for full ingestion because writing 6.48 billion visible rows and processing 23 non-DV inputs dominate that workload. All nine applications completed 24 of 24 tables with matching schemas, partition columns, Delta operation metrics, row statistics, and output row/file counts.The supported claim is narrow: #12836 fixes the original driver-side regression; this PR adds a further 1.37x improvement for the isolated physical DV scans. It does not claim a material PR B advantage over PR A for full ingestion, an improvement to DV creation or native writing, or Spark 4 performance.
How was this patch tested?
./dev/format-scala-code.sh./dev/gen-all-config-docs.shgit diff --checkLinux native CI remains authoritative for the C++ build and tests.
Generative AI tooling
Generated-by: IBM BOB