You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2020/01/11 12:27:00 UTC
[jira] [Commented] (AVRO-2677) Decimal logical type don't serialize
precision and scale in Ruby
[ https://issues.apache.org/jira/browse/AVRO-2677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17013461#comment-17013461 ]
ASF subversion and git services commented on AVRO-2677:
-------------------------------------------------------
Commit 912c15b36caacdea5cf3a6753316022156681470 in avro's branch refs/heads/master from Sergey Toy
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=912c15b ]
AVRO-2677: Ruby parse/serialize bytes decimal logical type (#761)
* add BytesDecimalSchema class
* remove unnecessary comment
* add tests for decimal schema
* refactor bytes decimal `to_avro`
* refactor BytesDecimalSchema to BytesSchema to works with all bytes schema and not only for decimal
> Decimal logical type don't serialize precision and scale in Ruby
> ----------------------------------------------------------------
>
> Key: AVRO-2677
> URL: https://issues.apache.org/jira/browse/AVRO-2677
> Project: Apache Avro
> Issue Type: Bug
> Components: ruby
> Reporter: Sergey Toy
> Assignee: Sergey Toy
> Priority: Major
>
>
> {code:java}
> payload = '{ "type": "bytes", "logicalType": "decimal", "precision": 9, "scale": 2 }'
> result = Avro::Schema.real_parse(JSON.parse(payload))
> result.to_avro # => {"type"=>"bytes", "logicalType"=>"decimal"}{code}
>
> Should be
> {code:java}
> {"type"=>"bytes", "logicalType"=>"decimal", "precision"=>9, "scale"=>2}{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)