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

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

Commit 01e039ca12ade8bc08b6b4b33ef87a32f3f06b88 in avro's branch 
refs/heads/master from Justin Lambert
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=01e039c ]

AVRO-2749: Add ruby support for datum hashes with non-string keys (#819)

* support datum hashes with non-string keys in ruby

* lint fixes

* datum keys as string or symbol only

* empty commit

* empty commit, tests

* empty commit, tests

> The Avro ruby gem is unable to encode hashes with non-string keys
> -----------------------------------------------------------------
>
>                 Key: AVRO-2749
>                 URL: https://issues.apache.org/jira/browse/AVRO-2749
>             Project: Apache Avro
>          Issue Type: Improvement
>          Components: ruby
>    Affects Versions: 1.9.2
>            Reporter: Justin Lambert
>            Priority: Major
>
> When trying to encode a ruby hash which uses symbols, an error is raised 
> because the key lookup is expecting a string only.
> {code:java}
> { id: 4, name: "foo"} =>
> The datum nil is not an example of schema "long" 
> (Avro::IO::AvroTypeError){code}
> This error is a bit cryptic and since ruby supports all simple data types as 
> hash keys, all keys should be converted to strings before encoding.
>  
>  



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

Reply via email to