peterxcli opened a new pull request, #5444:
URL: https://github.com/apache/datafusion-comet/pull/5444

   ## Which issue does this PR close?
   
   Closes #5094.
   
   ## Rationale for this change
   
   `DecimalRescaleCheckOverflow` duplicates Arrow's Decimal128 rescale, HALF_UP 
rounding, and precision validation. Delegating the fused operation to Arrow 
removes the sentinel and follow-up null-masking pass while keeping 
Spark-compatible legacy and ANSI behavior.
   
   ## What changes are included in this PR?
   
   - Use `ColumnarValue::cast_to` with DataFusion's default cast options for 
the common one-pass decimal rescale path.
   - Preserve Spark semantics for legacy nulls, ANSI 
`NUMERIC_VALUE_OUT_OF_RANGE` errors, SQL query context, scalar inputs, and 
scale deltas outside Arrow's Decimal128 power table.
   - Port Spark `DecimalExpressionSuite` cases and add boundary coverage for 
rounding, overflow, null propagation, and extreme scale changes.
   - Update the expression audit documentation.
   
   ## How are these changes tested?
   
   - `cargo test --manifest-path native/Cargo.toml -p 
datafusion-comet-spark-expr` (647 unit tests and 5 integration tests)
   - `cargo test --manifest-path native/Cargo.toml -p datafusion-comet 
fused_decimal_overflow_keeps_query_context`
   - `cargo clippy --manifest-path native/Cargo.toml -p 
datafusion-comet-spark-expr -p datafusion-comet --all-targets -- -D warnings`
   - `cargo fmt --manifest-path native/Cargo.toml --all -- --check`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to