[ 
https://issues.apache.org/jira/browse/AVRO-3782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17732883#comment-17732883
 ] 

ASF subversion and git services commented on AVRO-3782:
-------------------------------------------------------

Commit dc18ac0b49b5cc582623811f1e5be60823d4b179 in avro's branch 
refs/heads/branch-1.11 from theo
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=dc18ac0b4 ]

[Rust]: Incorrect decimal resolving checks (#2289)

* feat: add failing test case

* AVRO-3782: [Rust] Incorrect decimal resolving

Fix the check for max precision that a byte array could provide

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>

---------

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
Co-authored-by: Fedor Telnov <[email protected]>
Co-authored-by: Martin Tzvetanov Grigorov <[email protected]>
(cherry picked from commit adc0b5a2edd422eacc0665f2786b7ac615bbe16c)


> [Rust] Incorrect decimal resolving
> ----------------------------------
>
>                 Key: AVRO-3782
>                 URL: https://issues.apache.org/jira/browse/AVRO-3782
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: rust
>            Reporter: Fedor Telnov
>            Priority: Major
>
> Currently decimal schema provides incorrect resolving checks when working 
> with decimal values, transformed from BigInt bytes(signed big endian form).
> Currently algorithm of resolving checks for decimal validates that their max 
> precision is less then the precision stated in the schema. It calculates 
> "max" precision by applying formulae, stated in the avro specs(see section 
> for Decimals). But it should not do this in such a case - cuz the max 
> precision of input decimal value is, well, amount of digits in that input 
> value.
> To see what am I talking about, try running a test in the supplied PR.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to