[
https://issues.apache.org/jira/browse/AVRO-1649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14483754#comment-14483754
]
ASF GitHub Bot commented on AVRO-1649:
--------------------------------------
GitHub user kurtharriger opened a pull request:
https://github.com/apache/avro/pull/33
AVRO-1649 - More informative messages for schema compatibility checks
This PR attempts to move forward the the PR originally submitted by
@bcotton
https://github.com/apache/avro/pull/24
The previous PR introduced changes to enum that may have caused backward
compatibility changes.
I initially attempted the proposed resolution of creating and caching the
SchemaPairCompatibility objects in calculateCompatibility, but this resulted in
SchemaPairCompatibilty objects from leaf nodes being returned in the case of
recursion (e.g. line 285
https://github.com/apache/avro/compare/trunk...kurtharriger:AVRO-1649?expand=1#diff-21a81984a51d0e95d688360b526f0b04R285)
and on updating the tests found the resulting error messages confusing without
more context. In some cases just recreating a new SchemaPairCompatibility
would work, but this became messy and more difficult to test.
I decided instead to create a new enum SchemaCompatibilityResult based on
@bcotton's the private methods now use this more informative enum and a new
method getCompatibilityResult and deprecating getCompatibility which now maps
from SchemaCompatibilityResult to SchemaCompatibility.
The static helper method now uses the new method to return
SchemaPairCompatibity objects with the new more informative descriptions.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/kurtharriger/avro AVRO-1649
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/avro/pull/33.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #33
----
commit 1aa7f688bbec3cebbde345ed4ddc028a013dd278
Author: Bob Cotton <[email protected]>
Date: 2015-03-11T20:06:37Z
AVRO-1649: Teach SchemaCompatability to be more descriptive with failing
compatibility checks.
Also adds enums to SchemaCompatability.SchemaCompatibilityType for the
various compatability checks.
commit e2c324c5d4bfb07cebf5ec7cd9084ea1832bc9c7
Author: Kurt Harriger <[email protected]>
Date: 2015-04-07T17:49:47Z
AVRO-1649: Revert prior changes
commit 70495bbbb301fc0d2c4ca6a00952b165b7fd311f
Author: Kurt Harriger <[email protected]>
Date: 2015-04-07T18:02:16Z
AVRO-1649: Add SchemaCompatibilityResult
Modify private methods without breaking backward compatibility
commit f3abb7cb8f3c92aa767e722eedd49bf99fb2cdf3
Author: Kurt Harriger <[email protected]>
Date: 2015-04-07T18:06:12Z
AVRO-1649: Return more informative description
Return SchemaPairCompatibility with a more informative incompatibility
description
----
> SchemaCompatability should be more descriptive when schemas are incompatible
> ----------------------------------------------------------------------------
>
> Key: AVRO-1649
> URL: https://issues.apache.org/jira/browse/AVRO-1649
> Project: Avro
> Issue Type: Improvement
> Components: java
> Affects Versions: 1.7.7
> Reporter: Bob Cotton
> Priority: Minor
>
> When resolving schema incompatibilities it would be nice to have a more
> descriptive error message when schemas are not compatible.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)