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

2017-02-17 Thread Sean Busbey (JIRA)

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

Sean Busbey commented on AVRO-1738:
---

I'd love to see this get done. Any interest in picking up the current patch and 
making the changes suggested above, [~osheroff]?

> 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] [Commented] (AVRO-1973) Upgrade netty to the latest 3.x release

2017-02-17 Thread Sean Busbey (JIRA)

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

Sean Busbey commented on AVRO-1973:
---

+1 for 1.9.0 (I'm -0 on putting this into a 1.8 release due to the behavior 
change we call out in release notes. If someone else is fine with it, I don't 
object).

Please squash into a single commit before pushing.

> Upgrade netty to the latest 3.x release
> ---
>
> Key: AVRO-1973
> URL: https://issues.apache.org/jira/browse/AVRO-1973
> Project: Avro
>  Issue Type: Improvement
>  Components: java
>Affects Versions: 1.8.1
>Reporter: Gabor Szadovszky
>Assignee: Gabor Szadovszky
>
> Netty version {{3.5.13}} is pretty old. Shall be updated to the latest 3.x 
> release: {{3.10.6}}. 
> (Not suggesting to upgrade to 4.x as it requires much more effort due to API 
> incompatibilities.)



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


[jira] [Updated] (AVRO-1937) C++ generator for recursive structure crashes

2017-02-17 Thread Thiruvalluvan M. G. (JIRA)

 [ 
https://issues.apache.org/jira/browse/AVRO-1937?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thiruvalluvan M. G. updated AVRO-1937:
--
Resolution: Fixed
Status: Resolved  (was: Patch Available)

Applied the patch.

> C++ generator for recursive structure crashes
> -
>
> Key: AVRO-1937
> URL: https://issues.apache.org/jira/browse/AVRO-1937
> Project: Avro
>  Issue Type: Bug
>  Components: c++
>Affects Versions: 1.8.1
>Reporter: Jared Grubb
> Attachments: AVRO-1937.patch
>
>
> I was testing out a Avro specification for a tree type and the generator 
> crashed. I saw that there was a prior bug (AVRO-1667) that fixed some things 
> in the Java parser. 
> The same test-case on that bug will cause avrogencpp to segfault.
> $ cat tree.avro
> {
> "type":"record",
> "name":"SampleNode",
> "namespace":"org.spf4j.ssdump2.avro",
> "fields":[
>  {"name":"count","type":"int","default":0},
>  {"name":"subNodes","type":
> {"type":"array","items":{
> "type":"record","name":"SamplePair",
> "fields":[
>{"name":"method","type":
>{"type":"record","name":"Method",
>"fields":[
>   
> {"name":"declaringClass","type":{"type":"string","avro.java.string":"String"}},
>   
> {"name":"methodName","type":{"type":"string","avro.java.string":"String"}}
>]}},
>{"name":"node","type":"SampleNode"}
> ]
> }}
> }
> ]
> } 
> $ avrogencpp -i tree.avro -o avro.cpp
> [ segfault ]



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


[jira] [Commented] (AVRO-1937) C++ generator for recursive structure crashes

2017-02-17 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on AVRO-1937:
---

Commit ce36fffca8dd0bf8f5282041ba473e84193483c1 in avro's branch 
refs/heads/master from Thiruvalluvan M G
[ https://git-wip-us.apache.org/repos/asf?p=avro.git;h=ce36fff ]

Fixed AVRO-1937, C++ code genrator now handles recursive structures well


> C++ generator for recursive structure crashes
> -
>
> Key: AVRO-1937
> URL: https://issues.apache.org/jira/browse/AVRO-1937
> Project: Avro
>  Issue Type: Bug
>  Components: c++
>Affects Versions: 1.8.1
>Reporter: Jared Grubb
> Attachments: AVRO-1937.patch
>
>
> I was testing out a Avro specification for a tree type and the generator 
> crashed. I saw that there was a prior bug (AVRO-1667) that fixed some things 
> in the Java parser. 
> The same test-case on that bug will cause avrogencpp to segfault.
> $ cat tree.avro
> {
> "type":"record",
> "name":"SampleNode",
> "namespace":"org.spf4j.ssdump2.avro",
> "fields":[
>  {"name":"count","type":"int","default":0},
>  {"name":"subNodes","type":
> {"type":"array","items":{
> "type":"record","name":"SamplePair",
> "fields":[
>{"name":"method","type":
>{"type":"record","name":"Method",
>"fields":[
>   
> {"name":"declaringClass","type":{"type":"string","avro.java.string":"String"}},
>   
> {"name":"methodName","type":{"type":"string","avro.java.string":"String"}}
>]}},
>{"name":"node","type":"SampleNode"}
> ]
> }}
> }
> ]
> } 
> $ avrogencpp -i tree.avro -o avro.cpp
> [ segfault ]



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


[jira] [Assigned] (AVRO-1898) C++ library cannot parse unions with default values

2017-02-17 Thread Thiruvalluvan M. G. (JIRA)

 [ 
https://issues.apache.org/jira/browse/AVRO-1898?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thiruvalluvan M. G. reassigned AVRO-1898:
-

Assignee: Hua Zhang

> C++ library cannot parse unions with default values
> ---
>
> Key: AVRO-1898
> URL: https://issues.apache.org/jira/browse/AVRO-1898
> Project: Avro
>  Issue Type: Bug
>  Components: c++
>Affects Versions: 1.8.1
>Reporter: Hua Zhang
>Assignee: Hua Zhang
>
> I have a Avro file generated by the Java library, and when I tried to read it 
> using the C++ library, I got:
> Unexpected type for default value: Expected 6, but found 1
> Which basically says the default value should be of type Object, but got type 
> Boolean. After some investigation, I found the exception is thrown when 
> parsing the default value of a union. Looks like the C++ library requires the 
> default value of a union to be an object. This is different from what the 
> Avro specification says, that the default value of a union should be of the 
> first type in the union.
> This field is causing the problem:
> {
> "name" : "fake_name",
> "type" : [ "boolean", "null" ],
> "default" : false
> }
> From the code the C++ library is expecting:
> {
> "name" : "is_track_mau30",
> "type" : [ "boolean", "null" ],
> "default" : {"boolean": false}
> }
> The related code is in impl/Compiler.cc, line 284. If I change it to the 
> following, the Avro file can be parsed:
> {code}
> GenericUnion result(n);
> result.selectBranch(0);
> result.datum() = makeGenericDatum(n->leafAt(0), e, st);
> return GenericDatum(n, result);
> {code}
> Why is the C++ library behaves different than the specification? Can/should 
> it be changed to follow the specification? It will be a breaking change 
> though.
> Thanks and I'll be happy to contribute this change if it's deemed appropriate.



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


[jira] [Commented] (AVRO-1898) C++ library cannot parse unions with default values

2017-02-17 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on AVRO-1898:
---

Commit ec8514f711b739307d460b23bcb6eccc784f419a in avro's branch 
refs/heads/master from Thiruvalluvan M. G
[ https://git-wip-us.apache.org/repos/asf?p=avro.git;h=ec8514f ]

Fixed AVRO-1898, C++ library cannot parse unions with default values


> C++ library cannot parse unions with default values
> ---
>
> Key: AVRO-1898
> URL: https://issues.apache.org/jira/browse/AVRO-1898
> Project: Avro
>  Issue Type: Bug
>  Components: c++
>Affects Versions: 1.8.1
>Reporter: Hua Zhang
>Assignee: Hua Zhang
>
> I have a Avro file generated by the Java library, and when I tried to read it 
> using the C++ library, I got:
> Unexpected type for default value: Expected 6, but found 1
> Which basically says the default value should be of type Object, but got type 
> Boolean. After some investigation, I found the exception is thrown when 
> parsing the default value of a union. Looks like the C++ library requires the 
> default value of a union to be an object. This is different from what the 
> Avro specification says, that the default value of a union should be of the 
> first type in the union.
> This field is causing the problem:
> {
> "name" : "fake_name",
> "type" : [ "boolean", "null" ],
> "default" : false
> }
> From the code the C++ library is expecting:
> {
> "name" : "is_track_mau30",
> "type" : [ "boolean", "null" ],
> "default" : {"boolean": false}
> }
> The related code is in impl/Compiler.cc, line 284. If I change it to the 
> following, the Avro file can be parsed:
> {code}
> GenericUnion result(n);
> result.selectBranch(0);
> result.datum() = makeGenericDatum(n->leafAt(0), e, st);
> return GenericDatum(n, result);
> {code}
> Why is the C++ library behaves different than the specification? Can/should 
> it be changed to follow the specification? It will be a breaking change 
> though.
> Thanks and I'll be happy to contribute this change if it's deemed appropriate.



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


[jira] [Resolved] (AVRO-1898) C++ library cannot parse unions with default values

2017-02-17 Thread Thiruvalluvan M. G. (JIRA)

 [ 
https://issues.apache.org/jira/browse/AVRO-1898?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thiruvalluvan M. G. resolved AVRO-1898.
---
Resolution: Fixed

Thank you [~buckedr...@outlook.com]. Your fix works. Committed the change.

> C++ library cannot parse unions with default values
> ---
>
> Key: AVRO-1898
> URL: https://issues.apache.org/jira/browse/AVRO-1898
> Project: Avro
>  Issue Type: Bug
>  Components: c++
>Affects Versions: 1.8.1
>Reporter: Hua Zhang
>Assignee: Hua Zhang
>
> I have a Avro file generated by the Java library, and when I tried to read it 
> using the C++ library, I got:
> Unexpected type for default value: Expected 6, but found 1
> Which basically says the default value should be of type Object, but got type 
> Boolean. After some investigation, I found the exception is thrown when 
> parsing the default value of a union. Looks like the C++ library requires the 
> default value of a union to be an object. This is different from what the 
> Avro specification says, that the default value of a union should be of the 
> first type in the union.
> This field is causing the problem:
> {
> "name" : "fake_name",
> "type" : [ "boolean", "null" ],
> "default" : false
> }
> From the code the C++ library is expecting:
> {
> "name" : "is_track_mau30",
> "type" : [ "boolean", "null" ],
> "default" : {"boolean": false}
> }
> The related code is in impl/Compiler.cc, line 284. If I change it to the 
> following, the Avro file can be parsed:
> {code}
> GenericUnion result(n);
> result.selectBranch(0);
> result.datum() = makeGenericDatum(n->leafAt(0), e, st);
> return GenericDatum(n, result);
> {code}
> Why is the C++ library behaves different than the specification? Can/should 
> it be changed to follow the specification? It will be a breaking change 
> though.
> Thanks and I'll be happy to contribute this change if it's deemed appropriate.



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


[jira] [Assigned] (AVRO-1940) avrogencpp, scoped enums or c++11 enum class

2017-02-17 Thread Thiruvalluvan M. G. (JIRA)

 [ 
https://issues.apache.org/jira/browse/AVRO-1940?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thiruvalluvan M. G. reassigned AVRO-1940:
-

Assignee: Alexander Moriarty

> avrogencpp, scoped enums or c++11 enum class
> 
>
> Key: AVRO-1940
> URL: https://issues.apache.org/jira/browse/AVRO-1940
> Project: Avro
>  Issue Type: Improvement
>  Components: c++
>Reporter: Alexander Moriarty
>Assignee: Alexander Moriarty
>
> It would be nice if avrogencpp could generated scoped enums.
> Either with C++11 enum class or just adding an additional namespace.
> This sort of relates to the issue I opened a few days ago: #AVRO-1936 in that 
> one way this has been gotten around in the existing AvrogencppTests.cc is by 
> generating one namespace per schema.
> This of course could be a breaking change depending how it is implemented.



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


[jira] [Updated] (AVRO-1940) avrogencpp, scoped enums or c++11 enum class

2017-02-17 Thread Thiruvalluvan M. G. (JIRA)

 [ 
https://issues.apache.org/jira/browse/AVRO-1940?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thiruvalluvan M. G. updated AVRO-1940:
--
Status: Patch Available  (was: Open)

> avrogencpp, scoped enums or c++11 enum class
> 
>
> Key: AVRO-1940
> URL: https://issues.apache.org/jira/browse/AVRO-1940
> Project: Avro
>  Issue Type: Improvement
>  Components: c++
>Reporter: Alexander Moriarty
>Assignee: Alexander Moriarty
>
> It would be nice if avrogencpp could generated scoped enums.
> Either with C++11 enum class or just adding an additional namespace.
> This sort of relates to the issue I opened a few days ago: #AVRO-1936 in that 
> one way this has been gotten around in the existing AvrogencppTests.cc is by 
> generating one namespace per schema.
> This of course could be a breaking change depending how it is implemented.



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


[jira] [Resolved] (AVRO-1958) The generated C++ code doesn't compile if there are several enums with identical item names.

2017-02-17 Thread Thiruvalluvan M. G. (JIRA)

 [ 
https://issues.apache.org/jira/browse/AVRO-1958?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thiruvalluvan M. G. resolved AVRO-1958.
---
Resolution: Duplicate

All good ideas, implementing the solution along with AVRO-1940

> The generated C++ code doesn't compile if there are several enums with 
> identical item names.
> 
>
> Key: AVRO-1958
> URL: https://issues.apache.org/jira/browse/AVRO-1958
> Project: Avro
>  Issue Type: Bug
>  Components: c++
>Reporter: Max Lysenko
> Attachments: DataSchema.avsc
>
>




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


[jira] [Commented] (AVRO-1940) avrogencpp, scoped enums or c++11 enum class

2017-02-17 Thread Thiruvalluvan M. G. (JIRA)

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

Thiruvalluvan M. G. commented on AVRO-1940:
---

AVRO-1958 offers a more general approach. We'll combine this and that issue 
here.

> avrogencpp, scoped enums or c++11 enum class
> 
>
> Key: AVRO-1940
> URL: https://issues.apache.org/jira/browse/AVRO-1940
> Project: Avro
>  Issue Type: Improvement
>  Components: c++
>Reporter: Alexander Moriarty
>Assignee: Alexander Moriarty
>
> It would be nice if avrogencpp could generated scoped enums.
> Either with C++11 enum class or just adding an additional namespace.
> This sort of relates to the issue I opened a few days ago: #AVRO-1936 in that 
> one way this has been gotten around in the existing AvrogencppTests.cc is by 
> generating one namespace per schema.
> This of course could be a breaking change depending how it is implemented.



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


[jira] [Commented] (AVRO-1994) C++ Code Generator Generates Invalid Code if Field is of type Null

2017-02-17 Thread Thiruvalluvan M. G. (JIRA)

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

Thiruvalluvan M. G. commented on AVRO-1994:
---

Hi [~da77a], any updates on this? If you are unable to work on this right now, 
I'd go ahead and commit the current patch. We can revisit the issue because 
this should not affect the clients of the generated code.

> C++ Code Generator Generates Invalid Code if Field is of type Null
> --
>
> Key: AVRO-1994
> URL: https://issues.apache.org/jira/browse/AVRO-1994
> Project: Avro
>  Issue Type: Bug
>  Components: c++
>Reporter: Darryl Green
> Attachments: AVRO-1994.patch
>
>
> An simple schema like this:
> {
> "name": "TestPrimitiveTypes",
> "type": "record",
> "fields": [
> { "name": "Null", "type": "null" },
> { "name": "Boolean", "type": "boolean" },
> { "name": "Int", "type": "int" },
> { "name": "Long", "type": "long" },
> { "name": "Float", "type": "float" },
> { "name": "Double", "type": "double" },
> { "name": "Bytes", "type": "bytes" },
> { "name": "String", "type": "string" }
> ]
> }
> Generates this C++ struct.
> struct TestPrimitiveTypes {
> $Undefined$ Null; // <-- BUG!
> bool Boolean;
> int32_t Int;
> int64_t Long;
> float Float;
> double Double;
> std::vector Bytes;
> std::string String;
> TestPrimitiveTypes() :
> Null($Undefined$()),
> Boolean(bool()),
> Int(int32_t()),
> Long(int64_t()),
> Float(float()),
> Double(double()),
> Bytes(std::vector()),
> String(std::string())
> { }
> };
> Note the C++ type of the field Null is $Undefined$ which is obviously 
> invalid/won't compile. 



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