Delta table scan should be optimized when deletion vectors don't exist [databricks] - #13980
Conversation
Signed-off-by: Jihoon Son <ghoonson@gmail.com>
Greptile OverviewGreptile SummaryFixed regression from PR #13843 where file splitting and predicate pushdown optimizations were disabled for all Delta tables. Now optimizations are only disabled when deletion vectors actually exist ( Key Changes:
Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant DeltaScan as Delta Table Scan
participant Provider as Delta33x/40x Provider
participant FileFormat as DeltaParquetFileFormat
participant GPU as GPU Parquet Reader
DeltaScan->>Provider: toGpuParquetFileFormat(fmt)
Provider->>Provider: Check fmt.hasTablePath
alt Deletion Vectors Exist (hasTablePath == true)
Provider->>Provider: Set optimizationsEnabled = false
Provider->>Provider: Log warning about DV limitations
Provider->>GPU: Create GpuDeltaParquetFileFormat(optimizationsEnabled=false)
Note over GPU: File splitting DISABLED<br/>Predicate pushdown DISABLED
else No Deletion Vectors (hasTablePath == false)
Provider->>Provider: Use fmt.optimizationsEnabled
Provider->>GPU: Create GpuDeltaParquetFileFormat(optimizationsEnabled=true)
Note over GPU: File splitting ENABLED<br/>Predicate pushdown ENABLED
end
GPU->>DeltaScan: Return configured file format
|
|
build |
|
build |
…r return value check
|
build |
There was a problem hiding this comment.
Additional Comments (1)
-
delta-lake/delta-33x/src/main/scala/com/nvidia/spark/rapids/delta/delta33x/Delta33xProvider.scala, line 76-91 (link)style: Check that Delta40xProvider also gets this fix. PR #13843 disabled optimizations unconditionally in
delta-lake/delta-40x/src/main/scala/com/nvidia/spark/rapids/delta/delta40x/Delta40xProvider.scala:80, causing the same regression there.
3 files reviewed, 1 comment
|
build |
There was a problem hiding this comment.
Additional Comments (1)
-
delta-lake/delta-40x/src/main/scala/com/nvidia/spark/rapids/delta/delta40x/Delta40xProvider.scala, line 77 (link)syntax: Missing import for
DeltaConfigs. This will cause a compilation error.Add this to the imports at the top of the file (line 24, similar to Delta33xProvider.scala:24).
4 files reviewed, 1 comment
There was a problem hiding this comment.
Additional Comments (1)
-
integration_tests/src/main/python/delta_lake_test.py, line 152 (link)style: Misleading skip reason. The condition
not is_databricks_runtime()skips when NOT on Databricks, but the message says "not supported on Databricks". Consider updating to: "This test only runs on Databricks runtime"
4 files reviewed, 1 comment
|
build |
|
@jihoonson please retarget to |
|
build |
gerashegalov
left a comment
There was a problem hiding this comment.
LGTM, but stil questions about actionability of the warning
|
build |
|
build |
|
The previous trigger failed due to a blossom glitch. rekicked |
|
build |
…into fix-delta-split
|
build |
| override protected def toGpuParquetFileFormat(fmt: DeltaParquetFileFormat): FileFormat = | ||
| override protected def toGpuParquetFileFormat(fmt: DeltaParquetFileFormat): FileFormat = { | ||
| val optimizationsEnabled = if (fmt.hasTablePath) { | ||
| logWarning("Input Delta table has deletion vectors. Optimizations such as file splitting " + |
There was a problem hiding this comment.
Why are we printing this warning twice? Once here and again in the file format?
There was a problem hiding this comment.
We are not. Perhaps your view is messed up by old commits. Please refresh your browser and check again.
Fixes #13950 and #14004.
Description
Currently, when reading on GPU , the plugin cannot support certain optimizations for Delta tables such as file split or predicate pushdown if the deletion vectors are enabled for them. This change was made in #13843. However, we accidentally disabled the optimizations even for Delta tables without deletion vectors. This PR fixes this regression by disabling the optimization for Delta tables if they have deletion vectors.
Checklists
(Please explain in the PR description how the new code paths are tested, such as names of the new/existing tests that cover them.)