[FEA] Add Java bindings for multi-output AST JIT - #23828
Conversation
Expose computeTableJit to evaluate compiled AST roots in one libcudf call. Keep scalar-column-backed JIT trees alongside regular trees so compiled literals can be reused across evaluations. Signed-off-by: Haoyang Li <haoyangl@nvidia.com>
Signed-off-by: Haoyang Li <haoyangl@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (7)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 WalkthroughSummary by CodeRabbit
WalkthroughThe AST API now supports explicit default and JIT compilation modes. JIT expressions use mode-specific native execution and support multi-output table computation. Tests cover validation, literals, nullability, overflow, casts, and decimal behavior. ChangesJIT AST execution
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to The PR adds Java bindings for multi-output AST JIT with reported tests and downstream validation passing; no actionable merge-blocking risk remains. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Description
This PR exposes the libcudf AST JIT capabilities introduced by #23615 and #23621 through the Java API.
The execution backend is selected when an expression is compiled:
AstExpression.compile()preserves the existing behavior and produces an expression compatible with default AST consumers.AstExpression.compileJit()produces a JIT-specific expression. EachCompiledExpressionowns only the native AST tree and literal representation required by its compilation mode.CompiledExpression.computeColumn(Table)executes using the compiled expression's mode, avoiding a separatecomputeColumnJitAPI and avoiding duplicate native AST trees.CompiledExpression.computeTableJit(Table, CompiledExpression...)evaluates multiple JIT-compiled expressions in onecompute_table_jitcall. Output order follows the supplied expression order, and libcudf Row IR can eliminate structurally equivalent subexpressions across outputs.For JIT-compiled expressions, literals are converted to one-row columns once during compilation and retained for repeated evaluation. Temporary scalar owners are released after construction completes. Default-compiled expressions retain the existing scalar-backed representation and do not incur the JIT literal-column allocation cost.
The binding also:
computeTableJit;This API is consumed by NVIDIA/cudf-spark#15312 to execute compatible Project expressions as multi-output AST JIT waves.
Validation
mvn -B -Dtest=CompiledExpressionTest surefire:test: 166 tests, 0 failures, 0 errors, 0 skipped.Checklist