[jira] [Commented] (AVRO-1340) use default to allow old readers to specify default enum value when encountering new enum symbols

2018-01-24 Thread Felix GV (JIRA)

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

Felix GV commented on AVRO-1340:


But... do I need to specify the default value in the field or in the enum?

> use default to allow old readers to specify default enum value when 
> encountering new enum symbols
> -
>
> Key: AVRO-1340
> URL: https://issues.apache.org/jira/browse/AVRO-1340
> Project: Avro
>  Issue Type: Improvement
>  Components: spec
> Environment: N/A
>Reporter: Jim Donofrio
>Priority: Minor
>
> The schema resolution page says:
> > if both are enums:
> > if the writer's symbol is not present in the reader's enum, then an
> error is signalled.
> This makes it difficult to use enum's because you can never add a enum value 
> and keep old reader's compatible. Why not use the default option to refer to 
> one of enum values so that when a old reader encounters a enum ordinal it 
> does not recognize, it can default to the optional schema provided one. If 
> the old schema does not provide a default then the older reader can continue 
> to fail as it does today.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (AVRO-1340) use default to allow old readers to specify default enum value when encountering new enum symbols

2018-01-24 Thread Doug Cutting (JIRA)

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

Doug Cutting commented on AVRO-1340:


The short version is, if you want something to be able to evolve, specify a 
default value for it.  Fields already have default values, and this issue may 
add one to enums.  If written data uses an enum symbol that's no longer 
present, currently things break.  In the future, the default value would be 
used.

> use default to allow old readers to specify default enum value when 
> encountering new enum symbols
> -
>
> Key: AVRO-1340
> URL: https://issues.apache.org/jira/browse/AVRO-1340
> Project: Avro
>  Issue Type: Improvement
>  Components: spec
> Environment: N/A
>Reporter: Jim Donofrio
>Priority: Minor
>
> The schema resolution page says:
> > if both are enums:
> > if the writer's symbol is not present in the reader's enum, then an
> error is signalled.
> This makes it difficult to use enum's because you can never add a enum value 
> and keep old reader's compatible. Why not use the default option to refer to 
> one of enum values so that when a old reader encounters a enum ordinal it 
> does not recognize, it can default to the optional schema provided one. If 
> the old schema does not provide a default then the older reader can continue 
> to fail as it does today.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (AVRO-2041) set up gitbox integration

2018-01-24 Thread Niels Basjes (JIRA)

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

Niels Basjes commented on AVRO-2041:


Seems the correct URL for the ticket is 

https://issues.apache.org/jira/browse/INFRA-14667
It was closed as "Invalid" months ago stating that Avro is not a gitbox project.
I thought this ticket was to convert Avro into gitbox ?!?!?

> set up gitbox integration
> -
>
> Key: AVRO-2041
> URL: https://issues.apache.org/jira/browse/AVRO-2041
> Project: Avro
>  Issue Type: Task
>  Components: community
>Reporter: Sean Busbey
>Assignee: Sean Busbey
>Priority: Major
>
> We got consensus back in may about [turning on gitbox 
> integration|https://lists.apache.org/thread.html/cdd8ba14c1bf8aca2d71d09862e9780f2dc46af414ed78b1e3fd9c56@%3Cdev.avro.apache.org%3E]
>  so do it.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (AVRO-2122) Cannot validate schemas with recursive definitions

2018-01-24 Thread Bart (JIRA)

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

Bart commented on AVRO-2122:


[~nkollar] Thanks for helping me getting this fixed and merged in the Avro git 
repository!

> Cannot validate schemas with recursive definitions
> --
>
> Key: AVRO-2122
> URL: https://issues.apache.org/jira/browse/AVRO-2122
> Project: Avro
>  Issue Type: Bug
>  Components: java
>Affects Versions: 1.8.2
>Reporter: Bart
>Assignee: Bart
>Priority: Major
> Fix For: 1.7.8, 1.9.0, 1.8.3
>
>
> Validating a schema with a recursive definition will lead to a stack 
> overflow. When using the following schema definition:
> {noformat}
> @namespace("avro")
> protocol Unused {
> record Node {
>   union { null, Node } value = null;
> }
> }
> {noformat}
> {code:java}
> final SchemaValidator backwardValidator = new SchemaValidatorBuilder()
>   .canReadStrategy().validateLatest();
> backwardValidator.validate(Node.SCHEMA$, Arrays.asList(Node.SCHEMA$));
> {code}
> It results in a stack trace:
> {noformat}
> java.lang.StackOverflowError
> at org.apache.avro.io.parsing.Symbol.hasErrors(Symbol.java:406)
> at org.apache.avro.io.parsing.Symbol.hasErrors(Symbol.java:392)
> at org.apache.avro.io.parsing.Symbol.hasErrors(Symbol.java:383)
> at org.apache.avro.io.parsing.Symbol.hasErrors(Symbol.java:406)
> at org.apache.avro.io.parsing.Symbol.hasErrors(Symbol.java:392)
> at org.apache.avro.io.parsing.Symbol.hasErrors(Symbol.java:406)
> at org.apache.avro.io.parsing.Symbol.hasErrors(Symbol.java:374)
> at org.apache.avro.io.parsing.Symbol.hasErrors(Symbol.java:406)
> ...
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (AVRO-2122) Cannot validate schemas with recursive definitions

2018-01-24 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on AVRO-2122:
--

Github user brtm closed the pull request at:

https://github.com/apache/avro/pull/276


> Cannot validate schemas with recursive definitions
> --
>
> Key: AVRO-2122
> URL: https://issues.apache.org/jira/browse/AVRO-2122
> Project: Avro
>  Issue Type: Bug
>  Components: java
>Affects Versions: 1.8.2
>Reporter: Bart
>Assignee: Bart
>Priority: Major
> Fix For: 1.7.8, 1.9.0, 1.8.3
>
>
> Validating a schema with a recursive definition will lead to a stack 
> overflow. When using the following schema definition:
> {noformat}
> @namespace("avro")
> protocol Unused {
> record Node {
>   union { null, Node } value = null;
> }
> }
> {noformat}
> {code:java}
> final SchemaValidator backwardValidator = new SchemaValidatorBuilder()
>   .canReadStrategy().validateLatest();
> backwardValidator.validate(Node.SCHEMA$, Arrays.asList(Node.SCHEMA$));
> {code}
> It results in a stack trace:
> {noformat}
> java.lang.StackOverflowError
> at org.apache.avro.io.parsing.Symbol.hasErrors(Symbol.java:406)
> at org.apache.avro.io.parsing.Symbol.hasErrors(Symbol.java:392)
> at org.apache.avro.io.parsing.Symbol.hasErrors(Symbol.java:383)
> at org.apache.avro.io.parsing.Symbol.hasErrors(Symbol.java:406)
> at org.apache.avro.io.parsing.Symbol.hasErrors(Symbol.java:392)
> at org.apache.avro.io.parsing.Symbol.hasErrors(Symbol.java:406)
> at org.apache.avro.io.parsing.Symbol.hasErrors(Symbol.java:374)
> at org.apache.avro.io.parsing.Symbol.hasErrors(Symbol.java:406)
> ...
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] avro pull request #276: AVRO-2122 track which symbols have been visited to a...

2018-01-24 Thread brtm
Github user brtm closed the pull request at:

https://github.com/apache/avro/pull/276


---


[jira] [Commented] (AVRO-1957) TimeConversions do not implement getRecommendedSchema()

2018-01-24 Thread Nandor Kollar (JIRA)

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

Nandor Kollar commented on AVRO-1957:
-

If nobody has any objection for this PR, then I'd like to commit it soon.

> TimeConversions do not implement getRecommendedSchema()
> ---
>
> Key: AVRO-1957
> URL: https://issues.apache.org/jira/browse/AVRO-1957
> Project: Avro
>  Issue Type: Bug
>Affects Versions: 1.8.1
>Reporter: Sean Timm
>Assignee: Sean Timm
>Priority: Major
> Fix For: 1.8.3
>
>
> org.apache.avro.data.TimeConversions.TimestampConversion and other date and 
> time conversions do not implement getRecommendedSchema(). When trying to 
> dynamically generate an Avro schema from a pojo that contains a DateTime 
> object using ReflectData, I get an unsupported operation exception.
> I think the implementation should be as simple as
> {code}
> @Override
> public Schema getRecommendedSchema() {
>   return 
> LogicalTypes.timestampMillis().addToSchema(Schema.create(Schema.Type.LONG));
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)