gauravkhatri05 opened a new issue, #2961: URL: https://github.com/apache/parquet-java/issues/2961
### Describe the bug, including details regarding any error messages, version, and platform. **Issue:** I am trying to write Parquet file using S3SinkConnector and when it tries to convert avro schema using a method `AvroSchemaConverter.convert(Schema avroSchema)` it enters into the infinite recursion. Please refer to link below for the problematic code: https://github.com/apache/parquet-java/blob/1de2af8b8b7dc86af120da7c0ce3e43453ea98dc/parquet-avro/src/main/java/org/apache/parquet/avro/AvroSchemaConverter.java#L147C3-L163C4 **Details** Please find schema that is being parsed: ` { "type": "record", "name": "ObjXX", "fields": [ { "name": "id", "type": [ "null", "long" ], "default": null }, { "name": "struct_add_list", "type": [ "null", { "type": "array", "items": [ "null", { "type": "record", "name": "ObjStructAdd", "fields": [ { "name": "name", "type": [ "null", "string" ], "default": null }, { "name": "fld_list", "type": [ "null", { "type": "array", "items": [ "null", { "type": "record", "name": "ObjStructAddFld", "fields": [ { "name": "name", "type": [ "null", "string" ], "default": null }, { "name": "ref_val", "type": [ "null", "ObjStructAdd" ], "default": null } ] } ] } ], "default": null } ] } ] } ], "default": null }, { "name": "kafka_offset", "type": [ "null", "long" ], "default": null }, { "name": "kafka_partition", "type": [ "null", "int" ], "default": null }, { "name": "kafka_timestamp", "type": { "type": "long", "logicalType": "timestamp-millis" } }, { "name": "kafka_key", "type": [ "null", "string" ], "default": null }, { "name": "headers", "type": [ "null", "string" ], "default": null } ] } ` Please find below stack-trace: `[task-thread-parquet-sink-connector-0] ERROR org.apache.kafka.connect.runtime.WorkerSinkTask - WorkerSinkTask{id=parquet-sink-connector-0} Task threw an uncaught and unrecoverable exception. Task is being killed and will not recover until manually restarted. Error: null java.lang.StackOverflowError at org.apache.parquet.avro.AvroSchemaConverter.convertFields(AvroSchemaConverter.java) at org.apache.parquet.avro.AvroSchemaConverter.convertField(AvroSchemaConverter.java:196) at org.apache.parquet.avro.AvroSchemaConverter.convertUnion(AvroSchemaConverter.java:268) at org.apache.parquet.avro.AvroSchemaConverter.convertField(AvroSchemaConverter.java:224) at org.apache.parquet.avro.AvroSchemaConverter.convertField(AvroSchemaConverter.java:166) at org.apache.parquet.avro.AvroSchemaConverter.convertField(AvroSchemaConverter.java:207) at org.apache.parquet.avro.AvroSchemaConverter.convertUnion(AvroSchemaConverter.java:268) at org.apache.parquet.avro.AvroSchemaConverter.convertField(AvroSchemaConverter.java:224) at org.apache.parquet.avro.AvroSchemaConverter.convertField(AvroSchemaConverter.java:166) at org.apache.parquet.avro.AvroSchemaConverter.convertField(AvroSchemaConverter.java:287) at org.apache.parquet.avro.AvroSchemaConverter.convertFields(AvroSchemaConverter.java:160) at org.apache.parquet.avro.AvroSchemaConverter.convertField(AvroSchemaConverter.java:196) at org.apache.parquet.avro.AvroSchemaConverter.convertUnion(AvroSchemaConverter.java:268) at org.apache.parquet.avro.AvroSchemaConverter.convertField(AvroSchemaConverter.java:224) at org.apache.parquet.avro.AvroSchemaConverter.convertField(AvroSchemaConverter.java:166) at org.apache.parquet.avro.AvroSchemaConverter.convertField(AvroSchemaConverter.java:287) at org.apache.parquet.avro.AvroSchemaConverter.convertFields(AvroSchemaConverter.java:160)` Could you please look into this. thanks :-) ### Component(s) _No response_ -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
