avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [avro] branch branch-1.8 updated: [FIX] Support applying default null when map exists in schema and not in encoded data (#403)
Date Thu, 20 Dec 2018 20:57:22 GMT
This is an automated email from the ASF dual-hosted git repository.

dkulp pushed a commit to branch branch-1.8
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/branch-1.8 by this push:
     new a18b35e  [FIX] Support applying default null when map exists in schema and not in
encoded data (#403)
a18b35e is described below

commit a18b35e7d284ecd50c353a93e2ac56894b4ff885
Author: Oded Zahavi <oded.z@fiverr.com>
AuthorDate: Thu Dec 20 22:57:18 2018 +0200

    [FIX] Support applying default null when map exists in schema and not in encoded data
(#403)
---
 lang/ruby/lib/avro/schema.rb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lang/ruby/lib/avro/schema.rb b/lang/ruby/lib/avro/schema.rb
index 8e345e3..e77ec43 100644
--- a/lang/ruby/lib/avro/schema.rb
+++ b/lang/ruby/lib/avro/schema.rb
@@ -115,6 +115,7 @@ module Avro
         datum.is_a?(Array) &&
           datum.all?{|d| validate(expected_schema.items, d) }
       when :map
+        datum.is_a?(Hash) &&
           datum.keys.all?{|k| k.is_a? String } &&
           datum.values.all?{|v| validate(expected_schema.values, v) }
       when :union


Mime
View raw message