himadripal opened a new pull request, #7191:
URL: https://github.com/apache/arrow-rs/pull/7191

   # Which issue does this PR close?
    - Closes https://github.com/apache/datafusion/issues/10315
    - Follows up - #6905 ,based on the 
(https://github.com/apache/arrow-rs/pull/6905#issuecomment-2590125691)
    - depends on #7179  - tests will pass when this one is merged.
   
   Few important consideration -
   
   - Existing string to decimal conversion uses `parse_string_to_decimal_native`
   - `parse_string_to_decimal_native` does not have support for e-notation
   -  `parse_string_to_decimal_native` does rounding at scale, not truncate
   -  `parse_decimal` an existing method has e-notation support and use 
elsewhere
   -  #6905 added rounding support in `parse_decimal`
   -  moved string to decimal conversion to use `parse_decimal` to get support 
for e-notation.
   
   This PR is a 3rd one to break up #6905 , this one add rounding logic to 
parse_decimal to match the behavior in existing  
`parse_string_to_decimal_native`. 
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and 
enhancements and this helps us generate change logs for our releases. You can 
link an issue to this PR using the GitHub syntax. For example `Closes #123` 
indicates that this PR will close issue #123.
   -->
   
   Closes #.
   
   # Rationale for this change
   
   At present, string to decimal conversion does not support e-notation, in 
arrow, `parse_string_to_decimal_native` is called to get generic string to 
decimal. parse_decimal on the other hand is used from generic parse method and 
it has e-notation support. This PR is adding rounding and scale 0 handling to 
match the behavior or `parse_string_to_decimal_native` method. Then we can 
replace `parse_string_to_decimal_native` call with `parse_decimal`. This way, 
we will get e-notation support too.
    
   
   # What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is 
sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   # Are there any user-facing changes?
   
   
   <!--
   If there are user-facing changes then we may require documentation to be 
updated before approving the PR.
   -->
   
   <!---
   If there are any breaking changes to public APIs, please call them out.
   -->
   


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

Reply via email to