[
https://issues.apache.org/jira/browse/AVRO-2235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16636784#comment-16636784
]
Thiruvalluvan M. G. commented on AVRO-2235:
-------------------------------------------
The intent was to test the compatibility of the code generated just before and
just after AVRO-1684. So that test need not be touched now. In fact, it should
probably be deleted because the current generated code is not the same as
either of the files here and hence it does not really test anything current.
But if we want to test the compatibility between the code generated before
AVRO-1684 and the *current* version, we should regenerate both the classes. We
need to regenerate them because the schema used for generating those two
classes has changed in the meantime. I personally don't think the pain is worth
it. However, if it should be done, here is how it can be achieved:
# Obtain a copy of old avro-tools jar from
[https://mvnrepository.com/artifact/org.apache.avro/avro-tools/1.7.7.] Click on
the `jar` button to download the jar.
# From lang/java issue the command `java -jar avro-tools-1.7.7.jar compile
schema avro/src/test/resources/record_with_logical_types.avsc tmp`.
# Massage the generated code
(`tmp/org/apache/avro/specific/TestRecordWithLogicalTypes.java`) a bit:
`%s/org.apache.avro.specific.TestRecordWithout/TestRecordWithout/g`
# `cp tmp/org/apache/avro/specific/TestRecordWithLogicalTypes.java
avro/src/test/java/org/apache/avro/specific/TestRecordWithoutLogicalTypes.java`
This is not perfect; but it gets something close to what got generated then.
> Regenerate TestRecordWithLogicalTypes
> -------------------------------------
>
> Key: AVRO-2235
> URL: https://issues.apache.org/jira/browse/AVRO-2235
> Project: Avro
> Issue Type: Bug
> Components: logical types
> Reporter: Raymie Stata
> Assignee: Raymie Stata
> Priority: Major
>
> TestRecordWithLogicalTypes.java is code that was generated by the specific
> compiler and then moved into the testing code tree. It hasn't been changed
> in a while, although the compiler is evolving. I tried to regenerate it and
> found there is a problem with record_with_logical_types.avsc. I will fix the
> schema file and then regenerate TestRecordWithLogicalTypes and check both in.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)