[jira] [Updated] (AVRO-2366) 1.9

2019-04-01 Thread Raman Gupta (JIRA)


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

Raman Gupta updated AVRO-2366:
--
Description: 
Followup to AVRO-2035.

I am testing 1.9 SNAPSHOT. I set `Schema.Parser.setValidateDefaults` to false, 
and still get a failure at compile-time if the default does not match the 
schema. For example, a field definition of:

{{
{"name": "name", "type": "string", "default": null}
}}

Should this definition succeed if `setValidateDefaults(false)` is called? If 
not, should the `setValidateDefaults` method just be removed?

The exception is:

{{
Caused by: org.apache.avro.AvroTypeException: Invalid default for field name: 
null not a {"type":"string","avro.java.string":"String"}
at org.apache.avro.Schema.validateDefault(Schema.java:1482)
at org.apache.avro.Schema.access$300(Schema.java:84)
at org.apache.avro.Schema$Field.(Schema.java:493)
at org.apache.avro.Schema$Field.(Schema.java:485)
at org.apache.avro.Schema$Field.(Schema.java:504)
at 
org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:689)
at 
org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:668)
at 
org.apache.avro.compiler.specific.SpecificCompiler.compile(SpecificCompiler.java:598)
at 
org.apache.avro.compiler.specific.SpecificCompiler.compileToDestination(SpecificCompiler.java:527)
}}

  was:
Followup to AVRO-2035.

I am testing 1.9 SNAPSHOT. I set `Schema.Parser.setValidateDefaults` to false, 
and still get a failure at compile-time if the default does not match the 
schema. For example, a field definition of:

{"name": "name", "type": "string", "default": null}

Should this definition succeed if `setValidateDefaults(false)` is called? If 
not, should the `setValidateDefaults` method just be removed?

The exception is:

{{Caused by: org.apache.avro.AvroTypeException: Invalid default for field name: 
null not a \{"type":"string","avro.java.string":"String"}}}
{{ at org.apache.avro.Schema.validateDefault(Schema.java:1482)}}
{{ at org.apache.avro.Schema.access$300(Schema.java:84)}}
{{ at org.apache.avro.Schema$Field.(Schema.java:493)}}
{{ at org.apache.avro.Schema$Field.(Schema.java:485)}}
{{ at org.apache.avro.Schema$Field.(Schema.java:504)}}
{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:689)}}
{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:668)}}
{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.compile(SpecificCompiler.java:598)}}
{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.compileToDestination(SpecificCompiler.java:527)}}


> 1.9 
> 
>
> Key: AVRO-2366
> URL: https://issues.apache.org/jira/browse/AVRO-2366
> Project: Apache Avro
>  Issue Type: Bug
>Affects Versions: 1.9.0
>Reporter: Raman Gupta
>Priority: Major
>
> Followup to AVRO-2035.
> I am testing 1.9 SNAPSHOT. I set `Schema.Parser.setValidateDefaults` to 
> false, and still get a failure at compile-time if the default does not match 
> the schema. For example, a field definition of:
> {{
> {"name": "name", "type": "string", "default": null}
> }}
> Should this definition succeed if `setValidateDefaults(false)` is called? If 
> not, should the `setValidateDefaults` method just be removed?
> The exception is:
> {{
> Caused by: org.apache.avro.AvroTypeException: Invalid default for field name: 
> null not a {"type":"string","avro.java.string":"String"}
>   at org.apache.avro.Schema.validateDefault(Schema.java:1482)
>   at org.apache.avro.Schema.access$300(Schema.java:84)
>   at org.apache.avro.Schema$Field.(Schema.java:493)
>   at org.apache.avro.Schema$Field.(Schema.java:485)
>   at org.apache.avro.Schema$Field.(Schema.java:504)
>   at 
> org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:689)
>   at 
> org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:668)
>   at 
> org.apache.avro.compiler.specific.SpecificCompiler.compile(SpecificCompiler.java:598)
>   at 
> org.apache.avro.compiler.specific.SpecificCompiler.compileToDestination(SpecificCompiler.java:527)
> }}



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


[jira] [Updated] (AVRO-2366) 1.9

2019-04-01 Thread Raman Gupta (JIRA)


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

Raman Gupta updated AVRO-2366:
--
Description: 
Followup to AVRO-2035.

I am testing 1.9 SNAPSHOT. I set `Schema.Parser.setValidateDefaults` to false, 
and still get a failure at compile-time if the default does not match the 
schema. For example, a field definition of:

{"name": "name", "type": "string", "default": null}

Should this definition succeed if `setValidateDefaults(false)` is called? If 
not, should the `setValidateDefaults` method just be removed?

The exception is:

{{Caused by: org.apache.avro.AvroTypeException: Invalid default for field name: 
null not a \{"type":"string","avro.java.string":"String"}}}
{{ at org.apache.avro.Schema.validateDefault(Schema.java:1482)}}
{{ at org.apache.avro.Schema.access$300(Schema.java:84)}}
{{ at org.apache.avro.Schema$Field.(Schema.java:493)}}
{{ at org.apache.avro.Schema$Field.(Schema.java:485)}}
{{ at org.apache.avro.Schema$Field.(Schema.java:504)}}
{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:689)}}
{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:668)}}
{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.compile(SpecificCompiler.java:598)}}
{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.compileToDestination(SpecificCompiler.java:527)}}

  was:
Followup to AVRO-2035.

I am testing 1.9 SNAPSHOT. I set `Schema.Parser.setValidateDefaults` to false, 
and still get a failure at compile-time if the default does not match the 
schema. For example, a field definition of:

{"name": "name", "type": "string", "default": null}

Should this definition succeed if `setValidateDefaults(false)` is called? If 
not, should the `setValidateDefaults` method just be removed?

The exception is:

{{Caused by: org.apache.avro.AvroTypeException: Invalid default for field name: 
null not a \{"type":"string","avro.java.string":"String"}}}
{{ at org.apache.avro.Schema.validateDefault(Schema.java:1482)}}
{{ at org.apache.avro.Schema.access$300(Schema.java:84)}}
{{ at org.apache.avro.Schema$Field.(Schema.java:493)}}
{{ at org.apache.avro.Schema$Field.(Schema.java:485)}}
{{ at org.apache.avro.Schema$Field.(Schema.java:504)}}
{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:689)}}
{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:668)}}
{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.compile(SpecificCompiler.java:598)}}
{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.compileToDestination(SpecificCompiler.java:527)}}

 


> 1.9 
> 
>
> Key: AVRO-2366
> URL: https://issues.apache.org/jira/browse/AVRO-2366
> Project: Apache Avro
>  Issue Type: Bug
>Affects Versions: 1.9.0
>Reporter: Raman Gupta
>Priority: Major
>
> Followup to AVRO-2035.
> I am testing 1.9 SNAPSHOT. I set `Schema.Parser.setValidateDefaults` to 
> false, and still get a failure at compile-time if the default does not match 
> the schema. For example, a field definition of:
> {"name": "name", "type": "string", "default": null}
> Should this definition succeed if `setValidateDefaults(false)` is called? If 
> not, should the `setValidateDefaults` method just be removed?
> The exception is:
> {{Caused by: org.apache.avro.AvroTypeException: Invalid default for field 
> name: null not a \{"type":"string","avro.java.string":"String"}}}
> {{ at org.apache.avro.Schema.validateDefault(Schema.java:1482)}}
> {{ at org.apache.avro.Schema.access$300(Schema.java:84)}}
> {{ at org.apache.avro.Schema$Field.(Schema.java:493)}}
> {{ at org.apache.avro.Schema$Field.(Schema.java:485)}}
> {{ at org.apache.avro.Schema$Field.(Schema.java:504)}}
> {{ at 
> org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:689)}}
> {{ at 
> org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:668)}}
> {{ at 
> org.apache.avro.compiler.specific.SpecificCompiler.compile(SpecificCompiler.java:598)}}
> {{ at 
> org.apache.avro.compiler.specific.SpecificCompiler.compileToDestination(SpecificCompiler.java:527)}}



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


[jira] [Updated] (AVRO-2366) 1.9

2019-04-01 Thread Raman Gupta (JIRA)


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

Raman Gupta updated AVRO-2366:
--
Description: 
Followup to AVRO-2035.

I am testing 1.9 SNAPSHOT. I set `Schema.Parser.setValidateDefaults` to false, 
and still get a failure at compile-time if the default does not match the 
schema. For example, a field definition of:

{"name": "name", "type": "string", "default": null}

Should this definition succeed if `setValidateDefaults(false)` is called? If 
not, should the `setValidateDefaults` method just be removed?

The exception is:

{{Caused by: org.apache.avro.AvroTypeException: Invalid default for field name: 
null not a \{"type":"string","avro.java.string":"String"}}}
{{ at org.apache.avro.Schema.validateDefault(Schema.java:1482)}}
{{ at org.apache.avro.Schema.access$300(Schema.java:84)}}
{{ at org.apache.avro.Schema$Field.(Schema.java:493)}}
{{ at org.apache.avro.Schema$Field.(Schema.java:485)}}
{{ at org.apache.avro.Schema$Field.(Schema.java:504)}}
{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:689)}}
{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:668)}}
{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.compile(SpecificCompiler.java:598)}}
{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.compileToDestination(SpecificCompiler.java:527)}}

 

  was:
Followup to AVRO-2035.

I am testing 1.9 SNAPSHOT. I set `Schema.Parser.setValidateDefaults` to false, 
and still get a failure at compile-time if the default does not match the 
schema. For example, a field definition of:

{"name": "name", "type": "string", "default": null}

Should this definition succeed if `setValidateDefaults(false)` is called? If 
not, should the `setValidateDefaults` method just be removed?

The exception is:

{\{ at org.apache.avro.Schema.validateDefault(Schema.java:1482)}}
 \{{ at org.apache.avro.Schema.access$300(Schema.java:84)}}
 \{{ at org.apache.avro.Schema$Field.(Schema.java:493)}}
 \{{ at org.apache.avro.Schema$Field.(Schema.java:485)}}
 \{{ at org.apache.avro.Schema$Field.(Schema.java:504)}}
 \{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:689)}}
 \{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:668)}}
 \{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.compile(SpecificCompiler.java:598)}}
 \{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.compileToDestination(SpecificCompiler.java:527)}}

 


> 1.9 
> 
>
> Key: AVRO-2366
> URL: https://issues.apache.org/jira/browse/AVRO-2366
> Project: Apache Avro
>  Issue Type: Bug
>Affects Versions: 1.9.0
>Reporter: Raman Gupta
>Priority: Major
>
> Followup to AVRO-2035.
> I am testing 1.9 SNAPSHOT. I set `Schema.Parser.setValidateDefaults` to 
> false, and still get a failure at compile-time if the default does not match 
> the schema. For example, a field definition of:
> {"name": "name", "type": "string", "default": null}
> Should this definition succeed if `setValidateDefaults(false)` is called? If 
> not, should the `setValidateDefaults` method just be removed?
> The exception is:
> {{Caused by: org.apache.avro.AvroTypeException: Invalid default for field 
> name: null not a \{"type":"string","avro.java.string":"String"}}}
> {{ at org.apache.avro.Schema.validateDefault(Schema.java:1482)}}
> {{ at org.apache.avro.Schema.access$300(Schema.java:84)}}
> {{ at org.apache.avro.Schema$Field.(Schema.java:493)}}
> {{ at org.apache.avro.Schema$Field.(Schema.java:485)}}
> {{ at org.apache.avro.Schema$Field.(Schema.java:504)}}
> {{ at 
> org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:689)}}
> {{ at 
> org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:668)}}
> {{ at 
> org.apache.avro.compiler.specific.SpecificCompiler.compile(SpecificCompiler.java:598)}}
> {{ at 
> org.apache.avro.compiler.specific.SpecificCompiler.compileToDestination(SpecificCompiler.java:527)}}
>  



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


[jira] [Updated] (AVRO-2366) 1.9

2019-04-01 Thread Raman Gupta (JIRA)


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

Raman Gupta updated AVRO-2366:
--
Description: 
Followup to AVRO-2035.

I am testing 1.9 SNAPSHOT. I set `Schema.Parser.setValidateDefaults` to false, 
and still get a failure at compile-time if the default does not match the 
schema. For example, a field definition of:

{"name": "name", "type": "string", "default": null}

Should this definition succeed if `setValidateDefaults(false)` is called? If 
not, should the `setValidateDefaults` method just be removed?

The exception is:

{\{ at org.apache.avro.Schema.validateDefault(Schema.java:1482)}}
 \{{ at org.apache.avro.Schema.access$300(Schema.java:84)}}
 \{{ at org.apache.avro.Schema$Field.(Schema.java:493)}}
 \{{ at org.apache.avro.Schema$Field.(Schema.java:485)}}
 \{{ at org.apache.avro.Schema$Field.(Schema.java:504)}}
 \{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:689)}}
 \{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:668)}}
 \{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.compile(SpecificCompiler.java:598)}}
 \{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.compileToDestination(SpecificCompiler.java:527)}}

 

  was:
Followup to AVRO-2035.

I am testing 1.9 SNAPSHOT. I set `Schema.Parser.setValidateDefaults` to false, 
and still get a failure if the default does not match the schema. For example, 
a field definition of:

{"name": "name", "type": "string", "default": null}

Should this definition succeed if `setValidateDefaults(false)` is called? If 
not, should the `setValidateDefaults` method just be removed?

The exception is:

{{Caused by: org.apache.avro.AvroTypeException: Invalid default for field name: 
null not a {"type":"string","avro.java.string":"String"}}}
 \{{ at org.apache.avro.Schema.validateDefault(Schema.java:1482)}}
 \{{ at org.apache.avro.Schema.access$300(Schema.java:84)}}
 \{{ at org.apache.avro.Schema$Field.(Schema.java:493)}}
 \{{ at org.apache.avro.Schema$Field.(Schema.java:485)}}
 \{{ at org.apache.avro.Schema$Field.(Schema.java:504)}}
 \{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:689)}}
 \{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:668)}}
 \{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.compile(SpecificCompiler.java:598)}}
 \{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.compileToDestination(SpecificCompiler.java:527)}}

 


> 1.9 
> 
>
> Key: AVRO-2366
> URL: https://issues.apache.org/jira/browse/AVRO-2366
> Project: Apache Avro
>  Issue Type: Bug
>Affects Versions: 1.9.0
>Reporter: Raman Gupta
>Priority: Major
>
> Followup to AVRO-2035.
> I am testing 1.9 SNAPSHOT. I set `Schema.Parser.setValidateDefaults` to 
> false, and still get a failure at compile-time if the default does not match 
> the schema. For example, a field definition of:
> {"name": "name", "type": "string", "default": null}
> Should this definition succeed if `setValidateDefaults(false)` is called? If 
> not, should the `setValidateDefaults` method just be removed?
> The exception is:
> {\{ at org.apache.avro.Schema.validateDefault(Schema.java:1482)}}
>  \{{ at org.apache.avro.Schema.access$300(Schema.java:84)}}
>  \{{ at org.apache.avro.Schema$Field.(Schema.java:493)}}
>  \{{ at org.apache.avro.Schema$Field.(Schema.java:485)}}
>  \{{ at org.apache.avro.Schema$Field.(Schema.java:504)}}
>  \{{ at 
> org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:689)}}
>  \{{ at 
> org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:668)}}
>  \{{ at 
> org.apache.avro.compiler.specific.SpecificCompiler.compile(SpecificCompiler.java:598)}}
>  \{{ at 
> org.apache.avro.compiler.specific.SpecificCompiler.compileToDestination(SpecificCompiler.java:527)}}
>  



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


[jira] [Updated] (AVRO-2366) 1.9

2019-04-01 Thread Raman Gupta (JIRA)


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

Raman Gupta updated AVRO-2366:
--
Description: 
Followup to AVRO-2035.

I am testing 1.9 SNAPSHOT. I set `Schema.Parser.setValidateDefaults` to false, 
and still get a failure if the default does not match the schema. For example, 
a field definition of:

{"name": "name", "type": "string", "default": null}

Should this definition succeed if `setValidateDefaults(false)` is called? If 
not, should the `setValidateDefaults` method just be removed?

The exception is:

{{Caused by: org.apache.avro.AvroTypeException: Invalid default for field name: 
null not a {"type":"string","avro.java.string":"String"}}}
 \{{ at org.apache.avro.Schema.validateDefault(Schema.java:1482)}}
 \{{ at org.apache.avro.Schema.access$300(Schema.java:84)}}
 \{{ at org.apache.avro.Schema$Field.(Schema.java:493)}}
 \{{ at org.apache.avro.Schema$Field.(Schema.java:485)}}
 \{{ at org.apache.avro.Schema$Field.(Schema.java:504)}}
 \{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:689)}}
 \{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:668)}}
 \{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.compile(SpecificCompiler.java:598)}}
 \{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.compileToDestination(SpecificCompiler.java:527)}}

 

  was:
Followup to AVRO-2035.

I am testing 1.9 SNAPSHOT. I set `Schema.Parser.setValidateDefaults` to false, 
and still get a failure if the default does not match the schema. For example, 
a field definition of:

{"name": "name", "type": "string", "default": null}

Should this definition succeed if `setValidateDefaults(false)` is called? If 
not, should the `setValidateDefaults` method just be removed?

The exception is:

{{Caused by: org.apache.avro.AvroTypeException: Invalid default for field name: 
null not a \{"type":"string","avro.java.string":"String"}}}
{{ at org.apache.avro.Schema.validateDefault(Schema.java:1482)}}
{{ at org.apache.avro.Schema.access$300(Schema.java:84)}}
{{ at org.apache.avro.Schema$Field.(Schema.java:493)}}
{{ at org.apache.avro.Schema$Field.(Schema.java:485)}}
{{ at org.apache.avro.Schema$Field.(Schema.java:504)}}
{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:689)}}
{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:668)}}
{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.compile(SpecificCompiler.java:598)}}
{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.compileToDestination(SpecificCompiler.java:527)}}

 


> 1.9 
> 
>
> Key: AVRO-2366
> URL: https://issues.apache.org/jira/browse/AVRO-2366
> Project: Apache Avro
>  Issue Type: Bug
>Affects Versions: 1.9.0
>Reporter: Raman Gupta
>Priority: Major
>
> Followup to AVRO-2035.
> I am testing 1.9 SNAPSHOT. I set `Schema.Parser.setValidateDefaults` to 
> false, and still get a failure if the default does not match the schema. For 
> example, a field definition of:
> {"name": "name", "type": "string", "default": null}
> Should this definition succeed if `setValidateDefaults(false)` is called? If 
> not, should the `setValidateDefaults` method just be removed?
> The exception is:
> {{Caused by: org.apache.avro.AvroTypeException: Invalid default for field 
> name: null not a {"type":"string","avro.java.string":"String"}}}
>  \{{ at org.apache.avro.Schema.validateDefault(Schema.java:1482)}}
>  \{{ at org.apache.avro.Schema.access$300(Schema.java:84)}}
>  \{{ at org.apache.avro.Schema$Field.(Schema.java:493)}}
>  \{{ at org.apache.avro.Schema$Field.(Schema.java:485)}}
>  \{{ at org.apache.avro.Schema$Field.(Schema.java:504)}}
>  \{{ at 
> org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:689)}}
>  \{{ at 
> org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:668)}}
>  \{{ at 
> org.apache.avro.compiler.specific.SpecificCompiler.compile(SpecificCompiler.java:598)}}
>  \{{ at 
> org.apache.avro.compiler.specific.SpecificCompiler.compileToDestination(SpecificCompiler.java:527)}}
>  



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


[jira] [Updated] (AVRO-2366) 1.9

2019-04-01 Thread Raman Gupta (JIRA)


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

Raman Gupta updated AVRO-2366:
--
Description: 
Followup to AVRO-2035.

I am testing 1.9 SNAPSHOT. I set `Schema.Parser.setValidateDefaults` to false, 
and still get a failure if the default does not match the schema. For example, 
a field definition of:

{"name": "name", "type": "string", "default": null}

Should this definition succeed if `setValidateDefaults(false)` is called? If 
not, should the `setValidateDefaults` method just be removed?

The exception is:

{{Caused by: org.apache.avro.AvroTypeException: Invalid default for field name: 
null not a \{"type":"string","avro.java.string":"String"}}}
{{ at org.apache.avro.Schema.validateDefault(Schema.java:1482)}}
{{ at org.apache.avro.Schema.access$300(Schema.java:84)}}
{{ at org.apache.avro.Schema$Field.(Schema.java:493)}}
{{ at org.apache.avro.Schema$Field.(Schema.java:485)}}
{{ at org.apache.avro.Schema$Field.(Schema.java:504)}}
{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:689)}}
{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:668)}}
{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.compile(SpecificCompiler.java:598)}}
{{ at 
org.apache.avro.compiler.specific.SpecificCompiler.compileToDestination(SpecificCompiler.java:527)}}

 

  was:
Followup to AVRO-2035.

I am testing 1.9 SNAPSHOT. I set `Schema.Parser.setValidateDefaults` to false, 
and still get a failure if the default does not match the schema. For example, 
a field definition of:

{"name": "name", "type": "string", "default": null}

Should this definition succeed if `setValidateDefaults(false)` is called? If 
not, should the `setValidateDefaults` method just be removed?


> 1.9 
> 
>
> Key: AVRO-2366
> URL: https://issues.apache.org/jira/browse/AVRO-2366
> Project: Apache Avro
>  Issue Type: Bug
>Affects Versions: 1.9.0
>Reporter: Raman Gupta
>Priority: Major
>
> Followup to AVRO-2035.
> I am testing 1.9 SNAPSHOT. I set `Schema.Parser.setValidateDefaults` to 
> false, and still get a failure if the default does not match the schema. For 
> example, a field definition of:
> {"name": "name", "type": "string", "default": null}
> Should this definition succeed if `setValidateDefaults(false)` is called? If 
> not, should the `setValidateDefaults` method just be removed?
> The exception is:
> {{Caused by: org.apache.avro.AvroTypeException: Invalid default for field 
> name: null not a \{"type":"string","avro.java.string":"String"}}}
> {{ at org.apache.avro.Schema.validateDefault(Schema.java:1482)}}
> {{ at org.apache.avro.Schema.access$300(Schema.java:84)}}
> {{ at org.apache.avro.Schema$Field.(Schema.java:493)}}
> {{ at org.apache.avro.Schema$Field.(Schema.java:485)}}
> {{ at org.apache.avro.Schema$Field.(Schema.java:504)}}
> {{ at 
> org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:689)}}
> {{ at 
> org.apache.avro.compiler.specific.SpecificCompiler.addStringType(SpecificCompiler.java:668)}}
> {{ at 
> org.apache.avro.compiler.specific.SpecificCompiler.compile(SpecificCompiler.java:598)}}
> {{ at 
> org.apache.avro.compiler.specific.SpecificCompiler.compileToDestination(SpecificCompiler.java:527)}}
>  



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


[jira] [Updated] (AVRO-2366) 1.9

2019-04-01 Thread Raman Gupta (JIRA)


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

Raman Gupta updated AVRO-2366:
--
Affects Version/s: 1.9.0

> 1.9 
> 
>
> Key: AVRO-2366
> URL: https://issues.apache.org/jira/browse/AVRO-2366
> Project: Apache Avro
>  Issue Type: Bug
>Affects Versions: 1.9.0
>Reporter: Raman Gupta
>Priority: Major
>
> Followup to AVRO-2035.
> I am testing 1.9 SNAPSHOT. I set `Schema.Parser.setValidateDefaults` to 
> false, and still get a failure if the default does not match the schema. For 
> example, a field definition of:
> {"name": "name", "type": "string", "default": null}
> Should this definition succeed if `setValidateDefaults(false)` is called? If 
> not, should the `setValidateDefaults` method just be removed?



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