Guard AST JIT leaf types, fix null string/decimal literals, and allow string outputs #17113
All Vouch review confidence checks passed
Residual risk 0.26 = Change Risk (0.46) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.46 · 463 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.367
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #17113"
general
weight: 0.35
thirtiseven
Fixes #17111. Contributes to #16385.
Description
Project AST JIT remains experimental and disabled by default (
spark.rapids.sql.projectAstJitEnabled). Before extending AST JIT to additional operators (such asCOALESCE,IF/CASE WHEN,IS NULL, and comparisons), this PR fixes latent leaf/literal bugs onmainand prepares basic type handling:GpuBoundReference.selfSupportsAstJit,GpuLiteral.selfSupportsAstJit, andGpuExpression.supportsAstJit(forAttributeReference) to data types supported by libcudfrow_ir(Boolean,Byte,Short,Int,Long,Float,Double,Date,Timestamp,String,Decimal), instead of accepting unsupported types such asBinaryTypeor nested types.GpuLiteral.convertToAstto handlenullStringTypeliterals viaast.Literal.ofNull(DType.STRING)instead of throwingNullPointerException, and addDecimalTypeliteral conversion (ast.Literal.ofDecimal/ast.Literal.ofNull) while keepingGpuLiteral.selfConvertsToAstaligned forDECIMAL32/DECIMAL64(precision <= Decimal.MAX_LONG_DIGITS).GpuKnownNotNull,GpuKnownFloatingPointNormalized,GpuUnaryPositive,GpuAlias) through AST JIT without triggering compilation on their own.StringTypeoutputs inGpuAstJitExpression.canUseAstJitandGpuProjectAstPlannerAST JIT regions (legacy interpreted AST remains restricted to fixed-width outputs).Validation
Spark 3.5.2 (
buildver=352, NVIDIA RTX 5880 Ada):python3 build/check_shim_compatibility.py coverage: PASS (4,465 checked requirements, 0 findings).mvn -nsu -pl tests -Dbuildver=352 -Dtest=none -Dsurefire.failIfNoSpecifiedTests=false -DwildcardSuites=com.nvidia.spark.rapids.GpuProjectAstJitSuite,com.nvidia.spark.rapids.GpuProjectAstPlannerSuite test: 103 passed, 0 failed.mvn -N -Dbuildver=352 -Dspark.rapids.source.basedir=$PWD antrun:run@scalastyle-all-modules: 2,135 files checked, 0 errors, 0 warnings.Performance
Measured on Spark 3.5.2 (
local[4],8gpinned pool,NVIDIA RTX 5880 Ada, 200M-row INT32 Parquet table, 2 warmup + 5 measured iterations, median) using the depth-8 non-ANSI integral chain (-abs(((i0 + i1) - i2) - i3) 2 + k + i1 - i2).plain_checks for no regression on existing AST JIT expressions;known_not_null_*wrapsi0..i3with CatalystKnownNotNull(verified present asgpuknownnotnullinGpuProject), which previously fell back to regular GPU and now fuses intoAST_JIT. Exact checksums matched across all runs:| Case | Regular
GpuProjectop (med) | AST JITGpuProjectop (med) | Project Op Speedup | Regular E2E (med) | AST JIT E2E (med) ||---|---:|---:|---:|---:|---:|
|
plain_1out| 88.2 ms | 24.8 ms | 3.56x | 1295.6 ms | 1253.4 ms ||
plain_4out| 192.5 ms | 49.3 ms | 3.90x | 1343.9 ms | 1289.2 ms ||
known_not_null_1out| 93.1 ms | 25.7 ms | 3.62x | 1320.5 ms | 1247.0 ms ||
known_not_null_4out| 195.7 ms | 48.2 ms | 4.06x | 1318.3 ms | 1254.4 ms |AI assistance: An AI coding assistant helped draft the code, unit tests, benchmark script, and PR description; the author reviewed and verified the changes.
Checklists
Documentation
Testing
Performance