jychen7 commented on code in PR #2277:
URL: https://github.com/apache/avro/pull/2277#discussion_r1225048635


##########
lang/ruby/lib/avro/io.rb:
##########
@@ -397,8 +397,11 @@ def read_default_value(field_schema, default_value)
           return Integer(default_value)
         when :float, :double
           return Float(default_value)
-        when :boolean, :enum, :fixed, :string, :bytes
+        when :boolean, :enum, :fixed, :string
           return default_value
+        when :bytes
+          return default_value unless field_schema.type_adapter
+          return field_schema.type_adapter.decode(default_value)

Review Comment:
   as my test only cover Decimal, I think it is safe to just use `type_adapter` 
for Decimal only. Separate PR would need if same fix for other logical type



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to