[jira] [Work logged] (BEAM-7829) AvroUtils.toAvroSchema should put a Schema name to pass Avro Schema validation
[ https://issues.apache.org/jira/browse/BEAM-7829?focusedWorklogId=303668=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-303668 ] ASF GitHub Bot logged work on BEAM-7829: Author: ASF GitHub Bot Created on: 29/Aug/19 12:45 Start Date: 29/Aug/19 12:45 Worklog Time Spent: 10m Work Description: kanterov commented on pull request #9247: [BEAM-7829] Add schema names when converting with AvroUtils.toAvroSchema URL: https://github.com/apache/beam/pull/9247 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 303668) Time Spent: 2h 40m (was: 2.5h) > 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: Ryan Skraba >Priority: Minor > Fix For: 2.16.0 > > Time Spent: 2h 40m > Remaining Estimate: 0h > > While trying to use an Avro PCollection with the SQL transform I notice you > could not do correctly a bijective transform: PCollection -> > SQL -> PCollection -> ParDo -> PCollection 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. (Schema.java:403) > at org.apache.avro.Schema$Field. (Schema.java:423) > at org.apache.avro.Schema$Field. (Schema.java:415){quote} -- This message was sent by Atlassian Jira (v8.3.2#803003)
[jira] [Work logged] (BEAM-7829) AvroUtils.toAvroSchema should put a Schema name to pass Avro Schema validation
[ https://issues.apache.org/jira/browse/BEAM-7829?focusedWorklogId=303466=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-303466 ] ASF GitHub Bot logged work on BEAM-7829: Author: ASF GitHub Bot Created on: 29/Aug/19 08:54 Start Date: 29/Aug/19 08:54 Worklog Time Spent: 10m Work Description: kanterov commented on issue #9247: [BEAM-7829] Add schema names when converting with AvroUtils.toAvroSchema URL: https://github.com/apache/beam/pull/9247#issuecomment-526092234 Run Java PreCommit This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 303466) Time Spent: 2.5h (was: 2h 20m) > 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: Ryan Skraba >Priority: Minor > Fix For: 2.16.0 > > Time Spent: 2.5h > Remaining Estimate: 0h > > While trying to use an Avro PCollection with the SQL transform I notice you > could not do correctly a bijective transform: PCollection -> > SQL -> PCollection -> ParDo -> PCollection 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. (Schema.java:403) > at org.apache.avro.Schema$Field. (Schema.java:423) > at org.apache.avro.Schema$Field. (Schema.java:415){quote} -- This message was sent by Atlassian Jira (v8.3.2#803003)
[jira] [Work logged] (BEAM-7829) AvroUtils.toAvroSchema should put a Schema name to pass Avro Schema validation
[ https://issues.apache.org/jira/browse/BEAM-7829?focusedWorklogId=303418=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-303418 ] ASF GitHub Bot logged work on BEAM-7829: Author: ASF GitHub Bot Created on: 29/Aug/19 07:20 Start Date: 29/Aug/19 07:20 Worklog Time Spent: 10m Work Description: RyanSkraba commented on issue #9247: [BEAM-7829] Add schema names when converting with AvroUtils.toAvroSchema URL: https://github.com/apache/beam/pull/9247#issuecomment-526059811 Run Java PreCommit This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 303418) Time Spent: 2h 20m (was: 2h 10m) > 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: Ryan Skraba >Priority: Minor > Fix For: 2.16.0 > > Time Spent: 2h 20m > Remaining Estimate: 0h > > While trying to use an Avro PCollection with the SQL transform I notice you > could not do correctly a bijective transform: PCollection -> > SQL -> PCollection -> ParDo -> PCollection 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. (Schema.java:403) > at org.apache.avro.Schema$Field. (Schema.java:423) > at org.apache.avro.Schema$Field. (Schema.java:415){quote} -- This message was sent by Atlassian Jira (v8.3.2#803003)
[jira] [Work logged] (BEAM-7829) AvroUtils.toAvroSchema should put a Schema name to pass Avro Schema validation
[ https://issues.apache.org/jira/browse/BEAM-7829?focusedWorklogId=302939=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-302939 ] ASF GitHub Bot logged work on BEAM-7829: Author: ASF GitHub Bot Created on: 28/Aug/19 15:08 Start Date: 28/Aug/19 15:08 Worklog Time Spent: 10m Work Description: RyanSkraba commented on pull request #9247: [BEAM-7829] Add schema names when converting with AvroUtils.toAvroSchema URL: https://github.com/apache/beam/pull/9247#discussion_r318636099 ## File path: sdks/java/core/src/test/java/org/apache/beam/sdk/schemas/utils/AvroUtilsTest.java ## @@ -324,6 +339,59 @@ public void testFromBeamSchema() { assertEquals(getAvroSchema(), avroSchema); } + @Test + public void testAvroSchemaFromBeamSchemaCanBeParsed() { +String stringSchema = AvroUtils.toAvroSchema(getBeamSchema()).toString(); +org.apache.avro.Schema schema = new org.apache.avro.Schema.Parser().parse(stringSchema); +assertEquals(stringSchema, schema.toString()); Review comment: Changed and rebased with the recent fix on master! I interactively squashed the commits on my end to retain @iemejia's work. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 302939) Time Spent: 2h 10m (was: 2h) > 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: Ryan Skraba >Priority: Minor > Fix For: 2.16.0 > > Time Spent: 2h 10m > Remaining Estimate: 0h > > While trying to use an Avro PCollection with the SQL transform I notice you > could not do correctly a bijective transform: PCollection -> > SQL -> PCollection -> ParDo -> PCollection 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. (Schema.java:403) > at org.apache.avro.Schema$Field. (Schema.java:423) > at org.apache.avro.Schema$Field. (Schema.java:415){quote} -- This message was sent by Atlassian Jira (v8.3.2#803003)
[jira] [Work logged] (BEAM-7829) AvroUtils.toAvroSchema should put a Schema name to pass Avro Schema validation
[ https://issues.apache.org/jira/browse/BEAM-7829?focusedWorklogId=302843=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-302843 ] ASF GitHub Bot logged work on BEAM-7829: Author: ASF GitHub Bot Created on: 28/Aug/19 13:22 Start Date: 28/Aug/19 13:22 Worklog Time Spent: 10m Work Description: kanterov commented on issue #9247: [BEAM-7829] Add schema names when converting with AvroUtils.toAvroSchema URL: https://github.com/apache/beam/pull/9247#issuecomment-525742733 I will wait for master build becoming green, and then we can merge it. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 302843) Time Spent: 2h (was: 1h 50m) > 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: Ryan Skraba >Priority: Minor > Fix For: 2.16.0 > > Time Spent: 2h > Remaining Estimate: 0h > > While trying to use an Avro PCollection with the SQL transform I notice you > could not do correctly a bijective transform: PCollection -> > SQL -> PCollection -> ParDo -> PCollection 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. (Schema.java:403) > at org.apache.avro.Schema$Field. (Schema.java:423) > at org.apache.avro.Schema$Field. (Schema.java:415){quote} -- This message was sent by Atlassian Jira (v8.3.2#803003)
[jira] [Work logged] (BEAM-7829) AvroUtils.toAvroSchema should put a Schema name to pass Avro Schema validation
[ https://issues.apache.org/jira/browse/BEAM-7829?focusedWorklogId=302805=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-302805 ] ASF GitHub Bot logged work on BEAM-7829: Author: ASF GitHub Bot Created on: 28/Aug/19 12:43 Start Date: 28/Aug/19 12:43 Worklog Time Spent: 10m Work Description: kanterov commented on pull request #9247: [BEAM-7829] Add schema names when converting with AvroUtils.toAvroSchema URL: https://github.com/apache/beam/pull/9247#discussion_r318557404 ## File path: sdks/java/core/src/test/java/org/apache/beam/sdk/schemas/utils/AvroUtilsTest.java ## @@ -324,6 +339,59 @@ public void testFromBeamSchema() { assertEquals(getAvroSchema(), avroSchema); } + @Test + public void testAvroSchemaFromBeamSchemaCanBeParsed() { +String stringSchema = AvroUtils.toAvroSchema(getBeamSchema()).toString(); +org.apache.avro.Schema schema = new org.apache.avro.Schema.Parser().parse(stringSchema); +assertEquals(stringSchema, schema.toString()); Review comment: I don't have a preference except that it should be consistent, we can extract it as a separate matcher if having good error messages is something that we want. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 302805) Time Spent: 1h 50m (was: 1h 40m) > 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: Ryan Skraba >Priority: Minor > Fix For: 2.16.0 > > Time Spent: 1h 50m > Remaining Estimate: 0h > > While trying to use an Avro PCollection with the SQL transform I notice you > could not do correctly a bijective transform: PCollection -> > SQL -> PCollection -> ParDo -> PCollection 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. (Schema.java:403) > at org.apache.avro.Schema$Field. (Schema.java:423) > at org.apache.avro.Schema$Field. (Schema.java:415){quote} -- This message was sent by Atlassian Jira (v8.3.2#803003)
[jira] [Work logged] (BEAM-7829) AvroUtils.toAvroSchema should put a Schema name to pass Avro Schema validation
[ https://issues.apache.org/jira/browse/BEAM-7829?focusedWorklogId=302658=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-302658 ] ASF GitHub Bot logged work on BEAM-7829: Author: ASF GitHub Bot Created on: 28/Aug/19 08:23 Start Date: 28/Aug/19 08:23 Worklog Time Spent: 10m Work Description: RyanSkraba commented on pull request #9247: [BEAM-7829] Add schema names when converting with AvroUtils.toAvroSchema URL: https://github.com/apache/beam/pull/9247#discussion_r318451997 ## File path: sdks/java/core/src/test/java/org/apache/beam/sdk/schemas/utils/AvroUtilsTest.java ## @@ -324,6 +339,59 @@ public void testFromBeamSchema() { assertEquals(getAvroSchema(), avroSchema); } + @Test + public void testAvroSchemaFromBeamSchemaCanBeParsed() { +String stringSchema = AvroUtils.toAvroSchema(getBeamSchema()).toString(); +org.apache.avro.Schema schema = new org.apache.avro.Schema.Parser().parse(stringSchema); +assertEquals(stringSchema, schema.toString()); Review comment: Very light preference and habit for comparing Avro schemas as a string, so the junit error messages show the diff on failure! I have no objection to changing it! This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 302658) Time Spent: 1h 40m (was: 1.5h) > 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: Ryan Skraba >Priority: Minor > Fix For: 2.16.0 > > Time Spent: 1h 40m > Remaining Estimate: 0h > > While trying to use an Avro PCollection with the SQL transform I notice you > could not do correctly a bijective transform: PCollection -> > SQL -> PCollection -> ParDo -> PCollection 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. (Schema.java:403) > at org.apache.avro.Schema$Field. (Schema.java:423) > at org.apache.avro.Schema$Field. (Schema.java:415){quote} -- This message was sent by Atlassian Jira (v8.3.2#803003)
[jira] [Work logged] (BEAM-7829) AvroUtils.toAvroSchema should put a Schema name to pass Avro Schema validation
[ https://issues.apache.org/jira/browse/BEAM-7829?focusedWorklogId=302643=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-302643 ] ASF GitHub Bot logged work on BEAM-7829: Author: ASF GitHub Bot Created on: 28/Aug/19 08:06 Start Date: 28/Aug/19 08:06 Worklog Time Spent: 10m Work Description: kanterov commented on pull request #9247: [BEAM-7829] Add schema names when converting with AvroUtils.toAvroSchema URL: https://github.com/apache/beam/pull/9247#discussion_r318444211 ## File path: sdks/java/core/src/test/java/org/apache/beam/sdk/schemas/utils/AvroUtilsTest.java ## @@ -324,6 +339,59 @@ public void testFromBeamSchema() { assertEquals(getAvroSchema(), avroSchema); } + @Test + public void testAvroSchemaFromBeamSchemaCanBeParsed() { +String stringSchema = AvroUtils.toAvroSchema(getBeamSchema()).toString(); +org.apache.avro.Schema schema = new org.apache.avro.Schema.Parser().parse(stringSchema); +assertEquals(stringSchema, schema.toString()); Review comment: Why do we compare JSON representation instead of actual objects? Should we change the rest of the comparisons as well? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 302643) Time Spent: 1.5h (was: 1h 20m) > 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: Ryan Skraba >Priority: Minor > Fix For: 2.16.0 > > Time Spent: 1.5h > Remaining Estimate: 0h > > While trying to use an Avro PCollection with the SQL transform I notice you > could not do correctly a bijective transform: PCollection -> > SQL -> PCollection -> ParDo -> PCollection 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. (Schema.java:403) > at org.apache.avro.Schema$Field. (Schema.java:423) > at org.apache.avro.Schema$Field. (Schema.java:415){quote} -- This message was sent by Atlassian Jira (v8.3.2#803003)
[jira] [Work logged] (BEAM-7829) AvroUtils.toAvroSchema should put a Schema name to pass Avro Schema validation
[ https://issues.apache.org/jira/browse/BEAM-7829?focusedWorklogId=289962=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-289962 ] ASF GitHub Bot logged work on BEAM-7829: Author: ASF GitHub Bot Created on: 06/Aug/19 19:55 Start Date: 06/Aug/19 19:55 Worklog Time Spent: 10m Work Description: RyanSkraba commented on issue #9247: [BEAM-7829] Add schema names when converting with AvroUtils.toAvroSchema URL: https://github.com/apache/beam/pull/9247#issuecomment-518819365 Run Java PreCommit This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 289962) Time Spent: 1h 20m (was: 1h 10m) > 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: Ryan Skraba >Priority: Minor > Time Spent: 1h 20m > Remaining Estimate: 0h > > While trying to use an Avro PCollection with the SQL transform I notice you > could not do correctly a bijective transform: PCollection -> > SQL -> PCollection -> ParDo -> PCollection 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. (Schema.java:403) > at org.apache.avro.Schema$Field. (Schema.java:423) > at org.apache.avro.Schema$Field. (Schema.java:415){quote} -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Work logged] (BEAM-7829) AvroUtils.toAvroSchema should put a Schema name to pass Avro Schema validation
[ https://issues.apache.org/jira/browse/BEAM-7829?focusedWorklogId=289841=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-289841 ] ASF GitHub Bot logged work on BEAM-7829: Author: ASF GitHub Bot Created on: 06/Aug/19 16:54 Start Date: 06/Aug/19 16:54 Worklog Time Spent: 10m Work Description: RyanSkraba commented on issue #9247: [BEAM-7829] Add schema names when converting with AvroUtils.toAvroSchema URL: https://github.com/apache/beam/pull/9247#issuecomment-518754018 R: @kanterov @iemejia: I updated the implementation to use exactly the same naming strategy as Spark for namespaces, and added a test for common collision cased. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 289841) Time Spent: 1h 10m (was: 1h) > 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: Ryan Skraba >Priority: Minor > Time Spent: 1h 10m > Remaining Estimate: 0h > > While trying to use an Avro PCollection with the SQL transform I notice you > could not do correctly a bijective transform: PCollection -> > SQL -> PCollection -> ParDo -> PCollection 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. (Schema.java:403) > at org.apache.avro.Schema$Field. (Schema.java:423) > at org.apache.avro.Schema$Field. (Schema.java:415){quote} -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Work logged] (BEAM-7829) AvroUtils.toAvroSchema should put a Schema name to pass Avro Schema validation
[ https://issues.apache.org/jira/browse/BEAM-7829?focusedWorklogId=289505=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-289505 ] ASF GitHub Bot logged work on BEAM-7829: Author: ASF GitHub Bot Created on: 06/Aug/19 07:58 Start Date: 06/Aug/19 07:58 Worklog Time Spent: 10m Work Description: RyanSkraba commented on issue #9247: [BEAM-7829] Add schema names when converting with AvroUtils.toAvroSchema URL: https://github.com/apache/beam/pull/9247#issuecomment-518555476 Please hold off on reviewing -- taking a look at the Spark strategy for naming schemas, I think this implementation introduces a bug. I'm creating a unit test to check and will push a fix. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 289505) Time Spent: 1h (was: 50m) > 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: Ryan Skraba >Priority: Minor > Time Spent: 1h > Remaining Estimate: 0h > > While trying to use an Avro PCollection with the SQL transform I notice you > could not do correctly a bijective transform: PCollection -> > SQL -> PCollection -> ParDo -> PCollection 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. (Schema.java:403) > at org.apache.avro.Schema$Field. (Schema.java:423) > at org.apache.avro.Schema$Field. (Schema.java:415){quote} -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Work logged] (BEAM-7829) AvroUtils.toAvroSchema should put a Schema name to pass Avro Schema validation
[ https://issues.apache.org/jira/browse/BEAM-7829?focusedWorklogId=289155=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-289155 ] ASF GitHub Bot logged work on BEAM-7829: Author: ASF GitHub Bot Created on: 05/Aug/19 19:22 Start Date: 05/Aug/19 19:22 Worklog Time Spent: 10m Work Description: iemejia commented on issue #9247: [BEAM-7829] Add schema names when converting with AvroUtils.toAvroSchema URL: https://github.com/apache/beam/pull/9247#issuecomment-518365110 Run Spotless PreCommit This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 289155) Time Spent: 50m (was: 40m) > 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: Ryan Skraba >Priority: Minor > Time Spent: 50m > Remaining Estimate: 0h > > While trying to use an Avro PCollection with the SQL transform I notice you > could not do correctly a bijective transform: PCollection -> > SQL -> PCollection -> ParDo -> PCollection 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. (Schema.java:403) > at org.apache.avro.Schema$Field. (Schema.java:423) > at org.apache.avro.Schema$Field. (Schema.java:415){quote} -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Work logged] (BEAM-7829) AvroUtils.toAvroSchema should put a Schema name to pass Avro Schema validation
[ https://issues.apache.org/jira/browse/BEAM-7829?focusedWorklogId=289154=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-289154 ] ASF GitHub Bot logged work on BEAM-7829: Author: ASF GitHub Bot Created on: 05/Aug/19 19:22 Start Date: 05/Aug/19 19:22 Worklog Time Spent: 10m Work Description: iemejia commented on issue #9247: [BEAM-7829] Add schema names when converting with AvroUtils.toAvroSchema URL: https://github.com/apache/beam/pull/9247#issuecomment-518365145 Run Java PreCommit This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 289154) Time Spent: 40m (was: 0.5h) > 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: Ryan Skraba >Priority: Minor > Time Spent: 40m > Remaining Estimate: 0h > > While trying to use an Avro PCollection with the SQL transform I notice you > could not do correctly a bijective transform: PCollection -> > SQL -> PCollection -> ParDo -> PCollection 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. (Schema.java:403) > at org.apache.avro.Schema$Field. (Schema.java:423) > at org.apache.avro.Schema$Field. (Schema.java:415){quote} -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Work logged] (BEAM-7829) AvroUtils.toAvroSchema should put a Schema name to pass Avro Schema validation
[ https://issues.apache.org/jira/browse/BEAM-7829?focusedWorklogId=289153=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-289153 ] ASF GitHub Bot logged work on BEAM-7829: Author: ASF GitHub Bot Created on: 05/Aug/19 19:22 Start Date: 05/Aug/19 19:22 Worklog Time Spent: 10m Work Description: iemejia commented on issue #9247: [BEAM-7829] Add schema names when converting with AvroUtils.toAvroSchema URL: https://github.com/apache/beam/pull/9247#issuecomment-518365145 Run Java PreCommit This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 289153) Time Spent: 0.5h (was: 20m) > 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: Ryan Skraba >Priority: Minor > Time Spent: 0.5h > Remaining Estimate: 0h > > While trying to use an Avro PCollection with the SQL transform I notice you > could not do correctly a bijective transform: PCollection -> > SQL -> PCollection -> ParDo -> PCollection 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. (Schema.java:403) > at org.apache.avro.Schema$Field. (Schema.java:423) > at org.apache.avro.Schema$Field. (Schema.java:415){quote} -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Work logged] (BEAM-7829) AvroUtils.toAvroSchema should put a Schema name to pass Avro Schema validation
[ https://issues.apache.org/jira/browse/BEAM-7829?focusedWorklogId=289152=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-289152 ] ASF GitHub Bot logged work on BEAM-7829: Author: ASF GitHub Bot Created on: 05/Aug/19 19:22 Start Date: 05/Aug/19 19:22 Worklog Time Spent: 10m Work Description: iemejia commented on issue #9247: [BEAM-7829] Add schema names when converting with AvroUtils.toAvroSchema URL: https://github.com/apache/beam/pull/9247#issuecomment-518365110 Run Spotless PreCommit This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 289152) Time Spent: 20m (was: 10m) > 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: Ryan Skraba >Priority: Minor > Time Spent: 20m > Remaining Estimate: 0h > > While trying to use an Avro PCollection with the SQL transform I notice you > could not do correctly a bijective transform: PCollection -> > SQL -> PCollection -> ParDo -> PCollection 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. (Schema.java:403) > at org.apache.avro.Schema$Field. (Schema.java:423) > at org.apache.avro.Schema$Field. (Schema.java:415){quote} -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Work logged] (BEAM-7829) AvroUtils.toAvroSchema should put a Schema name to pass Avro Schema validation
[ https://issues.apache.org/jira/browse/BEAM-7829?focusedWorklogId=288946=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-288946 ] ASF GitHub Bot logged work on BEAM-7829: Author: ASF GitHub Bot Created on: 05/Aug/19 13:40 Start Date: 05/Aug/19 13:40 Worklog Time Spent: 10m Work Description: RyanSkraba commented on pull request #9247: [BEAM-7829] Add schema names when converting with AvroUtils.toAvroSchema URL: https://github.com/apache/beam/pull/9247 There's a subtle problem with unnamed records in Avro and Java -- they can be used to correctly serialize/deserialize binary data as long as nobody counts on serializing/deserializing the actual Avro schema as a JSON string. This *can* work if both reader and writer can infer the schema from another source (like the Beam Schema), but is certain to break when passing the schema or record to a transform that expects the schema to meet the Avro specification. More discussion at: https://issues.apache.org/jira/browse/AVRO-2492 This change ensures that no anonymous Avro records will be created as part of translating a Beam schema. *N.B.* Credit goes to @iemejia for this implementation, I just cleaned up the tests. Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] [**Choose reviewer(s)**](https://beam.apache.org/contribute/#make-your-change) and mention them in a comment (`R: @username`). - [X] Format the pull request title like `[BEAM-XXX] Fixes bug in ApproximateQuantiles`, where you replace `BEAM-XXX` with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue. - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). Post-Commit Tests Status (on master branch) Lang | SDK | Apex | Dataflow | Flink | Gearpump | Samza | Spark --- | --- | --- | --- | --- | --- | --- | --- Go | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Go/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Go/lastCompletedBuild/) | --- | --- | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Go_VR_Flink/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Go_VR_Flink/lastCompletedBuild/) | --- | --- | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Go_VR_Spark/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Go_VR_Spark/lastCompletedBuild/) Java | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Apex/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Apex/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink/lastCompletedBuild/)[![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Batch/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Batch/lastCompletedBuild/)[![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Streaming/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Streaming/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Gearpump/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Gearpump/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark/lastCompletedBuild/)[![Build