jychen7 commented on code in PR #2277:
URL: https://github.com/apache/avro/pull/2277#discussion_r1225022195
##########
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:
[for reviewer] or shall I only use `type_adapter` for decimal logical type?
Is there a case where `type_adapter` exists, but `default_value` is already
decoded in schema definition?
--
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]