[databricks] CheckOverflowInTableWrite Support#15366
Conversation
Greptile SummaryThis PR adds native GPU support for Databricks Delta's
Confidence Score: 5/5Safe to merge — the change is a well-scoped, DBR-17.3-only expression wrapper that mirrors an already-proven pattern. The implementation faithfully replicates the GpuCheckOverflowInTableInsert structure: delegates to GpuCast, catches ArithmeticException (which covers the SparkArithmeticException subtype thrown by GpuCast in ANSI mode), and re-wraps with Delta's typed error. Resource management is clean — the GpuColumnVector is returned directly on the success path and never partially allocated on the exception path. The provider registration correctly extends super.getExprs rather than replacing it. Both the success and overflow test paths are covered by DBR-17.3-gated integration tests, and the PR title carries the [databricks] tag to trigger Databricks CI. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant Spark as Spark Planner
participant Provider as DeltaSpark400DB173Provider
participant Meta as UnaryExprMeta[CheckOverflowInTableWrite]
participant Gpu as GpuCheckOverflowInTableWrite
participant Cast as GpuCast (child)
participant Delta as DeltaErrors
Spark->>Provider: getExprs()
Provider->>Provider: super.getExprs + exprRule
Provider-->>Spark: Map with CheckOverflowInTableWrite rule
Spark->>Meta: convertToGpu(gpuChild: GpuCast)
Meta-->>Gpu: GpuCheckOverflowInTableWrite(cast, columnName)
Note over Gpu,Cast: At execution time (columnarEval)
Gpu->>Cast: columnarEval(batch)
alt Cast succeeds
Cast-->>Gpu: GpuColumnVector (result)
Gpu-->>Spark: GpuColumnVector
else Cast throws ArithmeticException (overflow)
Cast-->>Gpu: ArithmeticException
Gpu->>Delta: castingCauseOverflowErrorInTableWrite(fromType, toType, columnName)
Delta-->>Spark: SparkException(DELTA_CAST_OVERFLOW_IN_TABLE_WRITE)
end
Reviews (3): Last reviewed commit: "Init Commit" | Re-trigger Greptile |
cb9a5c5 to
d73fa10
Compare
Signed-off-by: Rahul Prabhu <raprabhu@nvidia.com>
d73fa10 to
ddaea75
Compare
Fixes #15234
Description
Add native GPU support for Databricks Delta’s CheckOverflowInTableWrite expression on DBR 17.3. The expression now delegates to GpuCast while preserving Delta’s DELTA_CAST_OVERFLOW_IN_TABLE_WRITE error behavior.
The change also:
Verification
Tested on DBR 17.3 GPU ML:
Checklists
Documentation
Testing
(Please provide the names of the existing tests in the PR description.)
Performance