You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2023/06/14 19:58:00 UTC

[jira] [Commented] (AVRO-3773) [Ruby] Decimal logical type fail to validate default

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

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

Commit d06342a0a43fa4c1a5536179a6879ea619b279f9 in avro's branch refs/heads/master from Rich
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=d06342a0a ]

AVRO-3773: [ruby] fix validator for decimal default (#2275)



> [Ruby] Decimal logical type fail to validate default
> ----------------------------------------------------
>
>                 Key: AVRO-3773
>                 URL: https://issues.apache.org/jira/browse/AVRO-3773
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: ruby
>    Affects Versions: 1.11.1
>            Reporter: Rich
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> *Background*
> Following is a valid schema from Schema Registry
> {code:java}
> {
>         type: 'record',
>         name: 'account',
>         fields: [
>           {
>             name: 'balance',
>             type: [
>               { type: 'bytes', logicalType: 'decimal', precision: 9, scale: 2          },
>               'null'
>             ],
>             default: '\u00ff'
>           }
>         ]
> } {code}
> *Expect*
> Ruby SDK can parse it successfully
> *Actual*
> {code:java}
> Avro::SchemaParseError(<Error validating default for balance: at . expected type bytes, got null>) {code}
>  



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