[jira] [Commented] (AVRO-2074) SchemaValidator can't cope with recursive schemas?

2017-09-20 Thread Zack Kobza (JIRA)

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

Zack Kobza commented on AVRO-2074:
--

Did not investigate any further because we can depend on Avro 1.8.1 in most 
cases. However, we would like to use Avro 1.8.2 because of AVRO-607.

> SchemaValidator can't cope with recursive schemas?
> --
>
> Key: AVRO-2074
> URL: https://issues.apache.org/jira/browse/AVRO-2074
> Project: Avro
>  Issue Type: Bug
>  Components: java
>Reporter: Nandor Kollar
>
> When trying to validate a record which is recursively defined:
> {code}
> Schema record = Schema.createRecord("List", null, null, false);
> record.setFields(list(new Schema.Field("head", 
> Schema.create(Schema.Type.INT), null, null),
>   new Schema.Field("tail", record, null, null)));
> {code}
> then schema validation
> {code}
> new SchemaValidatorBuilder().canReadStrategy().validateAll().validate(record, 
> asList(record));
> {code}
> fails with StackOverflowError:
> {code}
> java.lang.StackOverflowError
>   at 
> org.apache.avro.io.parsing.Symbol$Sequence.flattenedSize(Symbol.java:337)
>   at org.apache.avro.io.parsing.Symbol.flattenedSize(Symbol.java:230)
>   at 
> org.apache.avro.io.parsing.Symbol$Sequence.flattenedSize(Symbol.java:337)
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (AVRO-2074) SchemaValidator can't cope with recursive schemas?

2017-09-20 Thread Nandor Kollar (JIRA)

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

Nandor Kollar commented on AVRO-2074:
-

Hm, interesting, it seems those lines which stuck in infinite recursion are 
submitted with AVRO-328, which was committed quite a long ago. Do you have any 
idea what could be the root cause, what has changed between the two releases 
which broke this logic?

> SchemaValidator can't cope with recursive schemas?
> --
>
> Key: AVRO-2074
> URL: https://issues.apache.org/jira/browse/AVRO-2074
> Project: Avro
>  Issue Type: Bug
>  Components: java
>Reporter: Nandor Kollar
>
> When trying to validate a record which is recursively defined:
> {code}
> Schema record = Schema.createRecord("List", null, null, false);
> record.setFields(list(new Schema.Field("head", 
> Schema.create(Schema.Type.INT), null, null),
>   new Schema.Field("tail", record, null, null)));
> {code}
> then schema validation
> {code}
> new SchemaValidatorBuilder().canReadStrategy().validateAll().validate(record, 
> asList(record));
> {code}
> fails with StackOverflowError:
> {code}
> java.lang.StackOverflowError
>   at 
> org.apache.avro.io.parsing.Symbol$Sequence.flattenedSize(Symbol.java:337)
>   at org.apache.avro.io.parsing.Symbol.flattenedSize(Symbol.java:230)
>   at 
> org.apache.avro.io.parsing.Symbol$Sequence.flattenedSize(Symbol.java:337)
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (AVRO-2074) SchemaValidator can't cope with recursive schemas?

2017-09-20 Thread Zack Kobza (JIRA)

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

Zack Kobza commented on AVRO-2074:
--

This appears to be a bug in Avro 1.8.2. If I downgrade to Avro 1.8.1, I do not 
see this issue when validating schemas.

> SchemaValidator can't cope with recursive schemas?
> --
>
> Key: AVRO-2074
> URL: https://issues.apache.org/jira/browse/AVRO-2074
> Project: Avro
>  Issue Type: Bug
>  Components: java
>Reporter: Nandor Kollar
>
> When trying to validate a record which is recursively defined:
> {code}
> Schema record = Schema.createRecord("List", null, null, false);
> record.setFields(list(new Schema.Field("head", 
> Schema.create(Schema.Type.INT), null, null),
>   new Schema.Field("tail", record, null, null)));
> {code}
> then schema validation
> {code}
> new SchemaValidatorBuilder().canReadStrategy().validateAll().validate(record, 
> asList(record));
> {code}
> fails with StackOverflowError:
> {code}
> java.lang.StackOverflowError
>   at 
> org.apache.avro.io.parsing.Symbol$Sequence.flattenedSize(Symbol.java:337)
>   at org.apache.avro.io.parsing.Symbol.flattenedSize(Symbol.java:230)
>   at 
> org.apache.avro.io.parsing.Symbol$Sequence.flattenedSize(Symbol.java:337)
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)