Fallback Delta file scans to CPU on DB-17.3 [databricks] - #14615
Conversation
Signed-off-by: Niranjan Artal <nartal@nvidia.com>
Greptile SummaryThis PR falls back Confidence Score: 5/5Safe to merge — logic is correct, shim annotations are consistent, and the fallback gate is properly applied. All three files are clean: the base class extraction is mechanical, the 330db shim correctly drops to a single-line delegate, and the 400db173 override correctly intercepts DeltaParquetFileFormat subclasses before convertToGpu is reached. No P0/P1 findings. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[FileSourceScanExec encountered] --> B{Shim version?}
B -- "330db / 332db / 341db / 350db143" --> C[FileSourceScanExecMeta\n spark330db]
B -- "400db173" --> D[FileSourceScanExecMeta\n spark400db173]
C --> E[FileSourceScanExecMetaBase\n tagPlanForGpu]
D --> F[super.tagPlanForGpu\n FileSourceScanExecMetaBase]
F --> E
E --> G{Delta JSON index?}
G -- yes --> H[entirePlanWillNotWork → CPU]
G -- no --> I[ScanExecShims.tagGpuFileSourceScanExecSupport]
I --> J{format class}
J -- ParquetFileFormat subclass --> K[GpuReadParquetFileFormat.tagSupport\n passes for DeltaParquetFileFormat!]
J -- CSV/ORC/JSON --> L[respective GPU tagSupport]
J -- ExternalSource supported --> M[ExternalSource.tagSupportForGpuFileSourceScan]
K --> N{400db173 extra check}
D --> N
N -- "isAssignableFrom ParquetFileFormat\n && != ParquetFileFormat\n && !ExternalSource.isSupportedFormat" --> O[willNotWorkOnGpu → CPU fallback]
N -- plain ParquetFileFormat --> P[GPU scan proceeds]
Reviews (2): Last reviewed commit: "Update sql-plugin/src/main/spark330db/sc..." | Re-trigger Greptile |
Verified with the simple query on DB:Output: |
…hims/FileSourceScanExecMetaBase.scala Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
|
build |
1 similar comment
|
build |
|
build |
3 similar comments
|
build |
|
build |
|
build |
Fixes #14607
Description
DeltaParquetFileFormatwhich requiresDelta-specific columns (e.g. skip_row). Since there is no Delta provider
for DB-17.3, the GPU reader cannot fill these columns.
FileSourceScanExecMetafor the 400db173 shim to detect unsupportedParquetFileFormatsubclasses and fall back the scan to CPU.FileSourceScanExecMetaBaseto share the common logic across DB shims.Tested this manually on DB cluster
Checklists
Documentation
Testing
(Please provide the names of the existing tests in the PR description.)
Performance