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

Ismaël Mejía edited comment on BEAM-7829 at 7/30/19 4:12 PM:
-------------------------------------------------------------

This is in part because the Avro API to create Schemas allows this behavior 
(for details see  AVRO-2491). This bad API may disappear in a future version of 
Avro, But in any case name will still be required so we need to address this in 
the Beam side too.


was (Author: iemejia):
This is in part because the Avro API to create Schemas allows this behavior. 
This bad API may dissapear in a future version of Avro, however users need for 
the moment to do a workaround for this problem.

> AvroUtils.toAvroSchema should put a Schema name to pass Avro Schema validation
> ------------------------------------------------------------------------------
>
>                 Key: BEAM-7829
>                 URL: https://issues.apache.org/jira/browse/BEAM-7829
>             Project: Beam
>          Issue Type: Test
>          Components: io-java-avro, sdk-java-core
>            Reporter: Ismaël Mejía
>            Assignee: Ismaël Mejía
>            Priority: Minor
>
> While trying to use an Avro PCollection with the SQL transform I notice you 
> could not do correctly a bijective transform: PCollection<GenericRecord> -> 
> SQL -> PCollection<Row> -> ParDo -> PCollection<GenericRecord> I noticed that 
> some of the Avro metadata gets lost in particular the name of the Avro 
> Schema. This is important because Avro validates that the schema has a name 
> and if it does not it breaks with a ParseException.
> {quote}
> org.apache.avro.SchemaParseException: Illegal character in: EXPR$1
>     at org.apache.avro.Schema.validateName (Schema.java:1151)
>     at org.apache.avro.Schema.access$200 (Schema.java:81)
>     at org.apache.avro.Schema$Field.<init> (Schema.java:403)
>     at org.apache.avro.Schema$Field.<init> (Schema.java:423)
>     at org.apache.avro.Schema$Field.<init> (Schema.java:415){quote}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to