You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "Tim Perkins (Jira)" <ji...@apache.org> on 2023/06/16 16:15:00 UTC

[jira] [Resolved] (AVRO-3775) [Ruby] decimal default is not converted to BigDecimal

     [ https://issues.apache.org/jira/browse/AVRO-3775?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Perkins resolved AVRO-3775.
-------------------------------
    Fix Version/s: 1.12.0
                   1.11.2
       Resolution: Fixed

Fixed default decoding for all logical types supported in Avro Ruby, not just decimals.

> [Ruby] decimal default is not converted to BigDecimal
> -----------------------------------------------------
>
>                 Key: AVRO-3775
>                 URL: https://issues.apache.org/jira/browse/AVRO-3775
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: ruby
>    Affects Versions: 1.11.1
>            Reporter: Rich
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.12.0, 1.11.2
>
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> *Background*
> https://issues.apache.org/jira/browse/AVRO-3773 is to fix the validation of decimal default
> After it is fixed (or we skip it), we are going to decode it.
> the default value is used when resolving schema resolution.
> *Expect*
> the decoded record should have default value in BigDecimal type, e.g.
> {code:java}
> {"sales" => BigDecimal("12.34"), "tax" => BigDecimal("0.000")} {code}
> *Actual*
> the decoded record have default value in string/bytes type
> {code:java}
> {"sales" => BigDecimal("12.34"), "tax" => "\u0000"} {code}



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