You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Sergey Toy (Jira)" <ji...@apache.org> on 2020/01/08 07:17:00 UTC

[jira] [Created] (AVRO-2677) Decimal logical type don't serialize precision and scale in Ruby

Sergey Toy created AVRO-2677:
--------------------------------

             Summary: 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


```ruby

payload = '\{ "type": "bytes", "logicalType": "decimal", "precision": 9, "scale": 2 }'
result = Avro::Schema.real_parse(JSON.parse(payload))
result.to_avro # => \{"type"=>"bytes", "logicalType"=>"decimal"}

```

Should be

```ruby

{"type"=>"bytes", "logicalType"=>"decimal", "precision"=>9, "scale"=>2}

```



--
This message was sent by Atlassian Jira
(v8.3.4#803005)