You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/09/24 07:13:41 UTC

[GitHub] [flink] V1ncentzzZ opened a new pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

V1ncentzzZ opened a new pull request #13472:
URL: https://github.com/apache/flink/pull/13472


   <!--
   *Thank you very much for contributing to Apache Flink - we are happy that you want to help us improve Flink. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
   
   *Please understand that we do not do this to make contributions to Flink a hassle. In order to uphold a high standard of quality for code contributions, while at the same time managing a large number of contributions, we need contributors to prepare the contributions well, and give reviewers enough contextual information for the review. Please also understand that contributions that do not follow this guide will take longer to review and thus typically be picked up with lower priority by the community.*
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [JIRA issue](https://issues.apache.org/jira/projects/FLINK/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no JIRA issue.
     
     - Name the pull request in the form "[FLINK-XXXX] [component] Title of the pull request", where *FLINK-XXXX* should be replaced by the actual issue number. Skip *component* if you are unsure about which is the best component.
     Typo fixes that have no associated JIRA issue should be named following this pattern: `[hotfix] [docs] Fix typo in event time introduction` or `[hotfix] [javadocs] Expand JavaDoc for PuncuatedWatermarkGenerator`.
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
     
     - Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes. You can set up Azure Pipelines CI to do that following [this guide](https://cwiki.apache.org/confluence/display/FLINK/Azure+Pipelines#AzurePipelines-Tutorial:SettingupAzurePipelinesforaforkoftheFlinkrepository).
   
     - Each pull request should address only one issue, not mix up code from multiple issues.
     
     - Each commit in the pull request has a meaningful commit message (including the JIRA id)
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
   
   
   **(The sections below can be removed for hotfixes of typos)**
   -->
   
   ## What is the purpose of the change
   
   Fix a bug in `AvroSchemaConverter.convertToSchema`, it will throw `SchemaParseException` when both row and row array types exist. the `rowTypeCounter` will be duplicate which causes this problem.
   
   
   ## Brief change log
   
     - Replace `rowTypeCounter` with `fieldName` as row name
     - Set default row name to `row_0` in `AvroSchemaConverter.convertToSchema`
   
   
   ## Verifying this change
   
   This change added tests and can be verified as follows:
   
     - Construct a logical type with both row type and row array type
     - Invoke method `AvroSchemaConverter.convertToSchema` and return `Schema`
     - No `SchemaParseException` should be thrown during execute `Schema.toString()` and check the result is as expected
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)
     - The serializers: (no)
     - The runtime per-record code paths (performance sensitive): (no)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (no)
     - The S3 file system connector: (no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (no)
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13472:
URL: https://github.com/apache/flink/pull/13472#issuecomment-698171211


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3e70b29f47767a4221cc15888d469e1e9d90d22e",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6892",
       "triggerID" : "3e70b29f47767a4221cc15888d469e1e9d90d22e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3e70b29f47767a4221cc15888d469e1e9d90d22e Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6892) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] wuchong commented on a change in pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #13472:
URL: https://github.com/apache/flink/pull/13472#discussion_r502180974



##########
File path: flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/typeutils/AvroSchemaConverter.java
##########
@@ -359,13 +359,13 @@ public static Schema convertToSchema(LogicalType logicalType, int rowTypeCounter
 				// we have to make sure the record name is different in a Schema
 				SchemaBuilder.FieldAssembler<Schema> builder = SchemaBuilder
 					.builder()
-					.record("row_" + rowTypeCounter)
+					.record(rowName)
 					.fields();
-				rowTypeCounter++;
 				for (int i = 0; i < rowType.getFieldCount(); i++) {
+					String fieldName = fieldNames.get(i);
 					builder = builder
-						.name(fieldNames.get(i))
-						.type(convertToSchema(rowType.getTypeAt(i), rowTypeCounter))
+						.name(fieldName)
+						.type(convertToSchema(rowType.getTypeAt(i), fieldName))

Review comment:
       I think this doesn't work. Because field names may conflict. We may need to concat the parent row name and the field name as the child name. 

##########
File path: flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/typeutils/AvroSchemaConverter.java
##########
@@ -297,10 +297,10 @@ private static DataType convertToDataType(Schema schema) {
 	 * @return Avro's {@link Schema} matching this logical type.
 	 */
 	public static Schema convertToSchema(LogicalType logicalType) {
-		return convertToSchema(logicalType, 0);
+		return convertToSchema(logicalType, "row_0");

Review comment:
       I think this will conflict if a field name is "row_0".




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] wuchong commented on pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
wuchong commented on pull request #13472:
URL: https://github.com/apache/flink/pull/13472#issuecomment-705987872


   Hi @V1ncentzzZ , sorry, I just can't reproduce the exception using the example posted in JIRA issue FLINK-19291, the same to your new added test case.  Could you add a test to reproduce this problem?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13472:
URL: https://github.com/apache/flink/pull/13472#issuecomment-698171211


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3e70b29f47767a4221cc15888d469e1e9d90d22e",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6892",
       "triggerID" : "3e70b29f47767a4221cc15888d469e1e9d90d22e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8f81fd9dbee3210951156366f041d45dae4301ed",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7360",
       "triggerID" : "8f81fd9dbee3210951156366f041d45dae4301ed",
       "triggerType" : "PUSH"
     }, {
       "hash" : "27a70ae047774c0474519bea4f7a95a25d40c371",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7364",
       "triggerID" : "27a70ae047774c0474519bea4f7a95a25d40c371",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a8b88bc4d52ac3d0aa6fe7a5681bd80a18501934",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a8b88bc4d52ac3d0aa6fe7a5681bd80a18501934",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3e70b29f47767a4221cc15888d469e1e9d90d22e Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6892) 
   * 8f81fd9dbee3210951156366f041d45dae4301ed Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7360) 
   * 27a70ae047774c0474519bea4f7a95a25d40c371 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7364) 
   * a8b88bc4d52ac3d0aa6fe7a5681bd80a18501934 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #13472:
URL: https://github.com/apache/flink/pull/13472#issuecomment-698171211


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3e70b29f47767a4221cc15888d469e1e9d90d22e",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "3e70b29f47767a4221cc15888d469e1e9d90d22e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3e70b29f47767a4221cc15888d469e1e9d90d22e UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] wuchong commented on pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
wuchong commented on pull request #13472:
URL: https://github.com/apache/flink/pull/13472#issuecomment-698176286


   Hi @danny0405 , could you help to review this?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] V1ncentzzZ commented on pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
V1ncentzzZ commented on pull request #13472:
URL: https://github.com/apache/flink/pull/13472#issuecomment-698705423


   Hi @danny0405 @wuchong  , would you help review this PR? Thank you very much.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13472:
URL: https://github.com/apache/flink/pull/13472#issuecomment-698171211


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3e70b29f47767a4221cc15888d469e1e9d90d22e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6892",
       "triggerID" : "3e70b29f47767a4221cc15888d469e1e9d90d22e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8f81fd9dbee3210951156366f041d45dae4301ed",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7360",
       "triggerID" : "8f81fd9dbee3210951156366f041d45dae4301ed",
       "triggerType" : "PUSH"
     }, {
       "hash" : "27a70ae047774c0474519bea4f7a95a25d40c371",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7364",
       "triggerID" : "27a70ae047774c0474519bea4f7a95a25d40c371",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a8b88bc4d52ac3d0aa6fe7a5681bd80a18501934",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7368",
       "triggerID" : "a8b88bc4d52ac3d0aa6fe7a5681bd80a18501934",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a8b88bc4d52ac3d0aa6fe7a5681bd80a18501934 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7368) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] wuchong commented on pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
wuchong commented on pull request #13472:
URL: https://github.com/apache/flink/pull/13472#issuecomment-706471434


   Thanks @V1ncentzzZ for updating the example in JIRA issue. Could you also update the test in the PR? Because the test can't reproduce the problem too. 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13472:
URL: https://github.com/apache/flink/pull/13472#issuecomment-698171211






----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] V1ncentzzZ commented on pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
V1ncentzzZ commented on pull request #13472:
URL: https://github.com/apache/flink/pull/13472#issuecomment-706482787


   Hi @wuchong  , Thanks for your guidance. I hava been submitted my code, due to the default row name is based on the current millis. it will affect the execution of the test case `org.apache.flink.formats.avro.AvroFormatFactoryTest#testSeDeSchema`. I think it is enough to use a special string as the default row name. Do you hava any suggestions about the default row name?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] wuchong commented on pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
wuchong commented on pull request #13472:
URL: https://github.com/apache/flink/pull/13472#issuecomment-698176286


   Hi @danny0405 , could you help to review this?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13472:
URL: https://github.com/apache/flink/pull/13472#issuecomment-698171211


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3e70b29f47767a4221cc15888d469e1e9d90d22e",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6892",
       "triggerID" : "3e70b29f47767a4221cc15888d469e1e9d90d22e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8f81fd9dbee3210951156366f041d45dae4301ed",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7360",
       "triggerID" : "8f81fd9dbee3210951156366f041d45dae4301ed",
       "triggerType" : "PUSH"
     }, {
       "hash" : "27a70ae047774c0474519bea4f7a95a25d40c371",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "27a70ae047774c0474519bea4f7a95a25d40c371",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3e70b29f47767a4221cc15888d469e1e9d90d22e Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6892) 
   * 8f81fd9dbee3210951156366f041d45dae4301ed Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7360) 
   * 27a70ae047774c0474519bea4f7a95a25d40c371 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] V1ncentzzZ commented on a change in pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
V1ncentzzZ commented on a change in pull request #13472:
URL: https://github.com/apache/flink/pull/13472#discussion_r502364817



##########
File path: flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/typeutils/AvroSchemaConverter.java
##########
@@ -359,13 +359,13 @@ public static Schema convertToSchema(LogicalType logicalType, int rowTypeCounter
 				// we have to make sure the record name is different in a Schema
 				SchemaBuilder.FieldAssembler<Schema> builder = SchemaBuilder
 					.builder()
-					.record("row_" + rowTypeCounter)
+					.record(rowName)
 					.fields();
-				rowTypeCounter++;
 				for (int i = 0; i < rowType.getFieldCount(); i++) {
+					String fieldName = fieldNames.get(i);
 					builder = builder
-						.name(fieldNames.get(i))
-						.type(convertToSchema(rowType.getTypeAt(i), rowTypeCounter))
+						.name(fieldName)
+						.type(convertToSchema(rowType.getTypeAt(i), fieldName))

Review comment:
       It works fine after test when the same field name in each different row type. Because fields in different namespaces.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] wuchong edited a comment on pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
wuchong edited a comment on pull request #13472:
URL: https://github.com/apache/flink/pull/13472#issuecomment-706492795


   Hi @V1ncentzzZ , I think we can use "record" as the top name. As we are concating parant and child name, so it's safe to use a constant literal here. 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13472:
URL: https://github.com/apache/flink/pull/13472#issuecomment-698171211


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3e70b29f47767a4221cc15888d469e1e9d90d22e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6892",
       "triggerID" : "3e70b29f47767a4221cc15888d469e1e9d90d22e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8f81fd9dbee3210951156366f041d45dae4301ed",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7360",
       "triggerID" : "8f81fd9dbee3210951156366f041d45dae4301ed",
       "triggerType" : "PUSH"
     }, {
       "hash" : "27a70ae047774c0474519bea4f7a95a25d40c371",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7364",
       "triggerID" : "27a70ae047774c0474519bea4f7a95a25d40c371",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a8b88bc4d52ac3d0aa6fe7a5681bd80a18501934",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7368",
       "triggerID" : "a8b88bc4d52ac3d0aa6fe7a5681bd80a18501934",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 27a70ae047774c0474519bea4f7a95a25d40c371 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7364) 
   * a8b88bc4d52ac3d0aa6fe7a5681bd80a18501934 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7368) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] wuchong commented on a change in pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #13472:
URL: https://github.com/apache/flink/pull/13472#discussion_r502180974



##########
File path: flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/typeutils/AvroSchemaConverter.java
##########
@@ -359,13 +359,13 @@ public static Schema convertToSchema(LogicalType logicalType, int rowTypeCounter
 				// we have to make sure the record name is different in a Schema
 				SchemaBuilder.FieldAssembler<Schema> builder = SchemaBuilder
 					.builder()
-					.record("row_" + rowTypeCounter)
+					.record(rowName)
 					.fields();
-				rowTypeCounter++;
 				for (int i = 0; i < rowType.getFieldCount(); i++) {
+					String fieldName = fieldNames.get(i);
 					builder = builder
-						.name(fieldNames.get(i))
-						.type(convertToSchema(rowType.getTypeAt(i), rowTypeCounter))
+						.name(fieldName)
+						.type(convertToSchema(rowType.getTypeAt(i), fieldName))

Review comment:
       I think this doesn't work. Because field names may conflict. We may need to concat the parent row name and the field name as the child name. 

##########
File path: flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/typeutils/AvroSchemaConverter.java
##########
@@ -297,10 +297,10 @@ private static DataType convertToDataType(Schema schema) {
 	 * @return Avro's {@link Schema} matching this logical type.
 	 */
 	public static Schema convertToSchema(LogicalType logicalType) {
-		return convertToSchema(logicalType, 0);
+		return convertToSchema(logicalType, "row_0");

Review comment:
       I think this will conflict if a field name is "row_0".




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] wuchong commented on a change in pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #13472:
URL: https://github.com/apache/flink/pull/13472#discussion_r502734646



##########
File path: flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/typeutils/AvroSchemaConverter.java
##########
@@ -359,13 +359,13 @@ public static Schema convertToSchema(LogicalType logicalType, int rowTypeCounter
 				// we have to make sure the record name is different in a Schema
 				SchemaBuilder.FieldAssembler<Schema> builder = SchemaBuilder
 					.builder()
-					.record("row_" + rowTypeCounter)
+					.record(rowName)
 					.fields();
-				rowTypeCounter++;
 				for (int i = 0; i < rowType.getFieldCount(); i++) {
+					String fieldName = fieldNames.get(i);
 					builder = builder
-						.name(fieldNames.get(i))
-						.type(convertToSchema(rowType.getTypeAt(i), rowTypeCounter))
+						.name(fieldName)
+						.type(convertToSchema(rowType.getTypeAt(i), fieldName))

Review comment:
       However, if the parant field name is the same to the child name, there still will be an avro exception. For example, the following example is still failed:
   
   ```java
   	@Test
   	public void test() {
   		RowType rowType = (RowType) TableSchema.builder()
   			.field("row1", DataTypes.ROW(DataTypes.FIELD("a", DataTypes.STRING())))
   			.field("row2", DataTypes.ROW(DataTypes.FIELD("b", DataTypes.STRING())))
   			.field("row3", DataTypes.ROW(
   				DataTypes.FIELD("row3", DataTypes.ROW(DataTypes.FIELD("c", DataTypes.STRING())))))
   			.build().toRowDataType().getLogicalType();
   		Schema schema = AvroSchemaConverter.convertToSchema(rowType);
   		System.out.println(schema.toString(true));
   	}
   ```
   
   This can be fixed by concating parant and child name:
   
   ```java
   String fieldName = rowName + "_" + fieldNames.get(i);
   ```




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] V1ncentzzZ commented on pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
V1ncentzzZ commented on pull request #13472:
URL: https://github.com/apache/flink/pull/13472#issuecomment-706127900


   Hi @wuchong , I updated issue [FLINK-19291](https://issues.apache.org/jira/browse/FLINK-19291), you can using the example posted in JIRA issue FLINK-19291 to reproduce the exception. The root cause of this problem that there are multiple row type fields and the field names in each row type are different. I will update the issue description later. Thanks!


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #13472:
URL: https://github.com/apache/flink/pull/13472#issuecomment-698162980






----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] V1ncentzzZ commented on a change in pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
V1ncentzzZ commented on a change in pull request #13472:
URL: https://github.com/apache/flink/pull/13472#discussion_r502364497



##########
File path: flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/typeutils/AvroSchemaConverter.java
##########
@@ -297,10 +297,10 @@ private static DataType convertToDataType(Schema schema) {
 	 * @return Avro's {@link Schema} matching this logical type.
 	 */
 	public static Schema convertToSchema(LogicalType logicalType) {
-		return convertToSchema(logicalType, 0);
+		return convertToSchema(logicalType, "row_0");

Review comment:
       Yeah, I think we can use "row_" append the current timestamp as default row name. Do you have any good idea?
   




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13472:
URL: https://github.com/apache/flink/pull/13472#issuecomment-698171211


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3e70b29f47767a4221cc15888d469e1e9d90d22e",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6892",
       "triggerID" : "3e70b29f47767a4221cc15888d469e1e9d90d22e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8f81fd9dbee3210951156366f041d45dae4301ed",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7360",
       "triggerID" : "8f81fd9dbee3210951156366f041d45dae4301ed",
       "triggerType" : "PUSH"
     }, {
       "hash" : "27a70ae047774c0474519bea4f7a95a25d40c371",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7364",
       "triggerID" : "27a70ae047774c0474519bea4f7a95a25d40c371",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a8b88bc4d52ac3d0aa6fe7a5681bd80a18501934",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7368",
       "triggerID" : "a8b88bc4d52ac3d0aa6fe7a5681bd80a18501934",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3e70b29f47767a4221cc15888d469e1e9d90d22e Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6892) 
   * 8f81fd9dbee3210951156366f041d45dae4301ed Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7360) 
   * 27a70ae047774c0474519bea4f7a95a25d40c371 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7364) 
   * a8b88bc4d52ac3d0aa6fe7a5681bd80a18501934 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7368) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13472:
URL: https://github.com/apache/flink/pull/13472#issuecomment-698171211


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3e70b29f47767a4221cc15888d469e1e9d90d22e",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6892",
       "triggerID" : "3e70b29f47767a4221cc15888d469e1e9d90d22e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8f81fd9dbee3210951156366f041d45dae4301ed",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "8f81fd9dbee3210951156366f041d45dae4301ed",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3e70b29f47767a4221cc15888d469e1e9d90d22e Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6892) 
   * 8f81fd9dbee3210951156366f041d45dae4301ed UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] V1ncentzzZ commented on a change in pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
V1ncentzzZ commented on a change in pull request #13472:
URL: https://github.com/apache/flink/pull/13472#discussion_r502364497



##########
File path: flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/typeutils/AvroSchemaConverter.java
##########
@@ -297,10 +297,10 @@ private static DataType convertToDataType(Schema schema) {
 	 * @return Avro's {@link Schema} matching this logical type.
 	 */
 	public static Schema convertToSchema(LogicalType logicalType) {
-		return convertToSchema(logicalType, 0);
+		return convertToSchema(logicalType, "row_0");

Review comment:
       Yeah, I think we can use "row_" append the current timestamp as default row name. Do you have any good idea?
   

##########
File path: flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/typeutils/AvroSchemaConverter.java
##########
@@ -359,13 +359,13 @@ public static Schema convertToSchema(LogicalType logicalType, int rowTypeCounter
 				// we have to make sure the record name is different in a Schema
 				SchemaBuilder.FieldAssembler<Schema> builder = SchemaBuilder
 					.builder()
-					.record("row_" + rowTypeCounter)
+					.record(rowName)
 					.fields();
-				rowTypeCounter++;
 				for (int i = 0; i < rowType.getFieldCount(); i++) {
+					String fieldName = fieldNames.get(i);
 					builder = builder
-						.name(fieldNames.get(i))
-						.type(convertToSchema(rowType.getTypeAt(i), rowTypeCounter))
+						.name(fieldName)
+						.type(convertToSchema(rowType.getTypeAt(i), fieldName))

Review comment:
       It works fine after test when the same field name in each different row type. Because fields in different namespaces.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13472:
URL: https://github.com/apache/flink/pull/13472#issuecomment-698171211


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3e70b29f47767a4221cc15888d469e1e9d90d22e",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6892",
       "triggerID" : "3e70b29f47767a4221cc15888d469e1e9d90d22e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3e70b29f47767a4221cc15888d469e1e9d90d22e Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6892) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] wuchong merged pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
wuchong merged pull request #13472:
URL: https://github.com/apache/flink/pull/13472


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] V1ncentzzZ commented on pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
V1ncentzzZ commented on pull request #13472:
URL: https://github.com/apache/flink/pull/13472#issuecomment-706497537


   Hi @wuchong , As you said, I used "record" as top name and optimization test case. Thank you very much.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] wuchong commented on pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
wuchong commented on pull request #13472:
URL: https://github.com/apache/flink/pull/13472#issuecomment-705987872


   Hi @V1ncentzzZ , sorry, I just can't reproduce the exception using the example posted in JIRA issue FLINK-19291, the same to your new added test case.  Could you add a test to reproduce this problem?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #13472:
URL: https://github.com/apache/flink/pull/13472#issuecomment-698162980


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit 3e70b29f47767a4221cc15888d469e1e9d90d22e (Thu Sep 24 07:16:03 UTC 2020)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] V1ncentzzZ commented on a change in pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
V1ncentzzZ commented on a change in pull request #13472:
URL: https://github.com/apache/flink/pull/13472#discussion_r502738368



##########
File path: flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/typeutils/AvroSchemaConverter.java
##########
@@ -359,13 +359,13 @@ public static Schema convertToSchema(LogicalType logicalType, int rowTypeCounter
 				// we have to make sure the record name is different in a Schema
 				SchemaBuilder.FieldAssembler<Schema> builder = SchemaBuilder
 					.builder()
-					.record("row_" + rowTypeCounter)
+					.record(rowName)
 					.fields();
-				rowTypeCounter++;
 				for (int i = 0; i < rowType.getFieldCount(); i++) {
+					String fieldName = fieldNames.get(i);
 					builder = builder
-						.name(fieldNames.get(i))
-						.type(convertToSchema(rowType.getTypeAt(i), rowTypeCounter))
+						.name(fieldName)
+						.type(convertToSchema(rowType.getTypeAt(i), fieldName))

Review comment:
       Okay, I will be update code to fix this problem by concating parant and child name. At the same time, i will update the test case also. Thanks!




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] V1ncentzzZ commented on pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
V1ncentzzZ commented on pull request #13472:
URL: https://github.com/apache/flink/pull/13472#issuecomment-706127900


   Hi @wuchong , I updated issue [FLINK-19291](https://issues.apache.org/jira/browse/FLINK-19291), you can using the example posted in JIRA issue FLINK-19291 to reproduce the exception. The root cause of this problem that there are multiple row type fields and the field names in each row type are different. I will update the issue description later. Thanks!


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] V1ncentzzZ commented on pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
V1ncentzzZ commented on pull request #13472:
URL: https://github.com/apache/flink/pull/13472#issuecomment-698705423


   Hi @danny0405 @wuchong  , would you help review this PR? Thank you very much.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13472:
URL: https://github.com/apache/flink/pull/13472#issuecomment-698171211


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3e70b29f47767a4221cc15888d469e1e9d90d22e",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6892",
       "triggerID" : "3e70b29f47767a4221cc15888d469e1e9d90d22e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8f81fd9dbee3210951156366f041d45dae4301ed",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7360",
       "triggerID" : "8f81fd9dbee3210951156366f041d45dae4301ed",
       "triggerType" : "PUSH"
     }, {
       "hash" : "27a70ae047774c0474519bea4f7a95a25d40c371",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7364",
       "triggerID" : "27a70ae047774c0474519bea4f7a95a25d40c371",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3e70b29f47767a4221cc15888d469e1e9d90d22e Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6892) 
   * 8f81fd9dbee3210951156366f041d45dae4301ed Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7360) 
   * 27a70ae047774c0474519bea4f7a95a25d40c371 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7364) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] wuchong commented on pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
wuchong commented on pull request #13472:
URL: https://github.com/apache/flink/pull/13472#issuecomment-706492795


   Hi @V1ncentzzZ , I think we can use "record" as the top name. As we concating parant and child name, so it's safe to use a constant literal here. 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #13472: [FLINK-19291][Formats] Fix `SchemaParseException` when use `AvroSchemaConverter` converts flink logical type

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13472:
URL: https://github.com/apache/flink/pull/13472#issuecomment-698171211


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3e70b29f47767a4221cc15888d469e1e9d90d22e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6892",
       "triggerID" : "3e70b29f47767a4221cc15888d469e1e9d90d22e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8f81fd9dbee3210951156366f041d45dae4301ed",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7360",
       "triggerID" : "8f81fd9dbee3210951156366f041d45dae4301ed",
       "triggerType" : "PUSH"
     }, {
       "hash" : "27a70ae047774c0474519bea4f7a95a25d40c371",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7364",
       "triggerID" : "27a70ae047774c0474519bea4f7a95a25d40c371",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a8b88bc4d52ac3d0aa6fe7a5681bd80a18501934",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7368",
       "triggerID" : "a8b88bc4d52ac3d0aa6fe7a5681bd80a18501934",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 8f81fd9dbee3210951156366f041d45dae4301ed Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7360) 
   * 27a70ae047774c0474519bea4f7a95a25d40c371 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7364) 
   * a8b88bc4d52ac3d0aa6fe7a5681bd80a18501934 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7368) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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:
users@infra.apache.org