[jira] [Commented] (AVRO-1738) add java tool for outputting schema fingerprints

2017-02-22 Thread Ryan Blue (JIRA)

[ 
https://issues.apache.org/jira/browse/AVRO-1738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15878844#comment-15878844
 ] 

Ryan Blue commented on AVRO-1738:
-

The content in NOTICE should be in LICENSE as a third-party work, and anything 
in NOTICE from the original project that applies to the section that was copied 
should be included in the Avro NOTICE. I don't think we need to update headers 
since the content is already licensed to the ASF, but I think it is reasonable 
to keep the comment about where the code came from.

> add java tool for outputting schema fingerprints
> 
>
> Key: AVRO-1738
> URL: https://issues.apache.org/jira/browse/AVRO-1738
> Project: Avro
>  Issue Type: New Feature
>  Components: java
>Reporter: Sean Busbey
>Assignee: Sean Busbey
> Fix For: 1.9.0
>
> Attachments: AVRO-1738.1.patch
>
>
> over in AVRO-1694 I wanted to quickly check that the Java library came up 
> with the same md5/sha fingerprint for some shcemas that the proposed Ruby 
> implementation does.
> I noticed we don't have a tool that exposes the functionality yet, which 
> seems like a commonly useful thing to do.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Comment Edited] (AVRO-1933) SchemaCompatibility class could be more user-friendly about incompatibilities

2017-02-22 Thread Elliot West (JIRA)

[ 
https://issues.apache.org/jira/browse/AVRO-1933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15876140#comment-15876140
 ] 

Elliot West edited comment on AVRO-1933 at 2/22/17 12:01 PM:
-

Thanks for your interest [~epkanol]. JSON Pointer has a 'unusual' escaping 
system. As the {{/}} character is a path separator, any JSON identifiers 
containing said character must have those instances be replaced with {{~0}}. 
The tilde character then holds a special meaning, so then any literal uses in 
JSON identifiers must then be escaped with {{~1}}. The patch I have does this. 
With reference to your question regarding unions, the index of the branch is 
used as the identifier, which translates nicely to JSON Pointer's array index 
specification. The same applies to fields in records. Consider the following 
schema:

{code}
{
  "type" : "record",
  "name" : "myRecord",
  "fields" : [ {
"name" : "myId",
"type" : "long"
  }, {
"name" : "myValue",
"type" : [ "string", "long", "null" ]
  } ]
}
{code}

If say the {{string}} branch of a union was missing in the companion schema, 
the path to the location of the issue in the schema would be: 
{{/fields/1/type/0}}.

I'll certainly add some more test cases :-)


was (Author: teabot):
Thanks for your interest [~epkanol]. JSON Pointer has a 'unusual' escaping 
system. As the {{/}} character is a path separator, any JSON identifiers 
containing said character must have those instances be replaced with {{~0}}. 
The tilde character then holds a special meaning, so then any literal uses in 
JSON identifiers must then be escaped with {{~1}}. The patch I have does this. 
With reference to your question regarding unions, the index of the branch is 
used as the idetifier, which translates nicely to JSON Pointer's array index 
specification. The same applies to fields in records. Consider the following 
schema:

{code}
{
  "type" : "record",
  "name" : "myRecord",
  "fields" : [ {
"name" : "myId",
"type" : "long"
  }, {
"name" : "myValue",
"type" : [ "string", "long", "null" ]
  } ]
}
{code}

If say the {{string}} branch of a union was missing in the companion schema, 
the path to the location of the issue in the schema would be: 
{{/fields/1/type/0}}.

I'll certainly add some more test cases :-)

> SchemaCompatibility class could be more user-friendly about incompatibilities
> -
>
> Key: AVRO-1933
> URL: https://issues.apache.org/jira/browse/AVRO-1933
> Project: Avro
>  Issue Type: Improvement
>  Components: java
>Affects Versions: 1.8.1
> Environment: Any Java env
>Reporter: Anders Sundelin
>Priority: Minor
> Fix For: 1.9.0
>
> Attachments: AVRO-1933-compatible-with-AVRO-1931.patch, 
> AVRO-1933.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Today, the class SchemaCompatibility reports incompatibilities with quite 
> little detail. The whole reader and the whole writer schema is listed, and no 
> particular detail about what was incompatible.
> The attached patch fixes this, introducing a new enum 
> (SchemaIncompatibilityType), and more specific sub-schemas that were 
> incompatible.
> The old, overall picture, is still there - the new compatibility state is 
> encapsulated in the SchemaCompatibilityDetails class.
> Lots of test cases have been added, and there has been refactoring done in 
> the TestSchemaCompatibility and other test classes.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)