You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by GitBox <gi...@apache.org> on 2021/04/28 22:28:58 UTC
[GitHub] [avro] andrewthauer commented on a change in pull request #1082: AVRO-3036: add schema matching for bytes decimal logical type in Ruby
andrewthauer commented on a change in pull request #1082:
URL: https://github.com/apache/avro/pull/1082#discussion_r622604010
##########
File path: lang/ruby/lib/avro/schema.rb
##########
@@ -467,6 +475,11 @@ def to_avro(names=nil)
hsh = super
hsh.size == 1 ? type : hsh
end
+
+ def match_schema?(schema)
+ return type_sym == schema.type_sym
Review comment:
Is this essentially just making sure the writer schema is a record as well?
##########
File path: lang/ruby/lib/avro/schema.rb
##########
@@ -38,6 +38,8 @@ class Schema
DEFAULT_VALIDATE_OPTIONS = { recursive: true, encoded: false }.freeze
+ DECIMAL_LOGICAL_TYPE = 'decimal'.freeze
Review comment:
Perhaps not a big deal, but this does not seem to be used anywhere except in the derived FixedSchema. Would it make sense to move it there instead of the base class?
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org