goutamadwant opened a new pull request, #24480:
URL: https://github.com/apache/datafusion/pull/24480

   ## Which issue does this PR close?
   
   - Closes #24425.
   
   ## Rationale for this change
   
   Spark `format_string` used separate final-assembly paths for decimal 
integers and other numeric values. Keeping sign placement, suffix placement, 
and width padding in multiple paths made their behavior easier to drift apart 
when flag combinations changed.
   
   ## What changes are included in this PR?
   
   - Route signed and unsigned decimal integer formatting through the existing 
`write_numeric_parts` assembly helper.
   - Keep integer conversion, grouping, and sign selection in the integer 
formatter.
   - Preserve the existing unsigned integer policy and the separate hexadecimal 
and octal prefix behavior.
   - Add focused Rust and SQLLogicTest coverage for signed and unsigned integer 
flags, decimal parentheses, and non-finite float padding.
   
   ## Are these changes tested?
   
   Yes. The following checks pass:
   
   ```text
   cargo fmt --all -- --check
   cargo clippy --all-targets --all-features -- -D warnings
   cargo test -p datafusion-spark --all-features
   cargo test --test sqllogictests -- spark/string/format_string
   RUST_BACKTRACE=1 cargo test --profile ci --exclude datafusion-examples 
--exclude datafusion-benchmarks --exclude datafusion-cli --workspace --lib 
--tests --bins --features 
avro,json,backtrace,extended_tests,recursive_protection,parquet_encryption
   ```
   
   The signed integer expectations were also cross-checked against Spark 4.2.0 
in both ANSI and non-ANSI modes.
   
   ## Are there any user-facing changes?
   
   No. This is an internal refactor that preserves the existing formatting 
behavior and does not change the public API.


-- 
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