jychen7 commented on code in PR #2277:
URL: https://github.com/apache/avro/pull/2277#discussion_r1230322383
##########
lang/ruby/lib/avro/io.rb:
##########
@@ -397,7 +397,12 @@ 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
+ if field_schema.logical_type == Schema::DECIMAL_LOGICAL_TYPE
+ return field_schema.type_adapter.decode(default_value)
Review Comment:
good point will add tests for them and fix
https://github.com/apache/avro/blob/ac4a2b5afe0c8f0fb9e04ecdedb0ca5cb13cdb1d/lang/ruby/lib/avro/logical_types.rb#L254-L265
--
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]