Repository navigation
fix(isthmus)!: honor signed integer arithmetic options - #1392
Conversation
SQL CONCAT and || now emit null_handling ACCEPT_NULLS for the standard Substrait concat function. Import accepts that behavior, including as a fallback preference, instead of silently discarding options. BREAKING CHANGE: Standard concat calls with null_handling preferences that do not include ACCEPT_NULLS, unknown options, or empty preference lists are rejected. Include ACCEPT_NULLS only when null propagation is acceptable.
Use one option policy for the standard concat, like, replace, starts_with, ends_with, strpos, substring, lower, upper and initcap mappings. Export the behavior implemented by the Calcite operator and reject import preferences that do not permit it. Other extensions and unmapped option policies are unchanged. BREAKING CHANGE: The covered standard string functions reject unknown options, empty preferences and preferences that do not include the mapped Calcite behavior. Allow that behavior only when it is acceptable for the query.
Select supported signed integer arithmetic preferences from spec v0.103.0, use checked Calcite operators for overflow=ERROR, and export the native operator behavior. Keep the existing operator when options are omitted. BREAKING CHANGE: Isthmus rejects signed integer arithmetic option preferences that it cannot honor instead of silently ignoring them.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (10)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughInteger arithmetic option handling is added to scalar function conversion. Tests cover option resolution, execution, export, and round trips. Existing arithmetic test inputs and a lambda fixture now specify silent overflow. ChangesInteger arithmetic options
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to This change makes Isthmus reject signed integer arithmetic options it cannot honor and exports the native operator behavior. No merge-blocking issue was found in the supplied context. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
nielspardon
left a comment
There was a problem hiding this comment.
Thanks for this. One thing to settle before the rest: for TINYINT/SMALLINT the exported overflow option doesn't match what Calcite does for nullable operands.
nielspardon
left a comment
There was a problem hiding this comment.
Thanks, the narrow-type fix and the mixed-width export look good. A few small things left. Please also extend the BREAKING CHANGE: footer: export now writes single-value overflow and division options on integer add, subtract, multiply, divide and modulus, so a plan without options gains them on a round trip.
Handle signed integer arithmetic preferences using native and checked Calcite operators. Plain i8/i16 operators omit overflow because their behavior depends on nullability; explicit SILENT import for these widths remains unsupported.
Export describes the Rex operator at conversion time. Later Calcite Prepare can replace it according to conformance. Option matching is case-insensitive; undeclared values are rejected before fallback selection.
Part of #1173.
BREAKING CHANGE: Unsupported integer preferences are rejected. Export adds single-value arithmetic options, except overflow on plain i8/i16 operators. Consumers without those policies must reject these plans. Undeclared values fail even with a supported fallback.