clairemcginty commented on code in PR #1300:
URL: https://github.com/apache/parquet-mr/pull/1300#discussion_r1526502990
##########
parquet-avro/src/main/java/org/apache/parquet/avro/AvroRecordConverter.java:
##########
@@ -930,6 +930,7 @@ public void end() {
static boolean isElementType(Type repeatedType, Schema elementSchema) {
if (repeatedType.isPrimitive()
|| repeatedType.asGroupType().getFieldCount() > 1
+ || repeatedType.getName().equals("array")
Review Comment:
oh interesting, so a schema like this?
```proto
message MySchema {
optional group list_field (LIST) {
repeated group list_field_tuple_1 (LIST) {
repeated int32 int_field_1;
}
repeated group list_field_tuple_2 (LIST) {
repeated int32 int_field_2
}
}
}
```
I think luckily, it's impossible to create this in Avro. I tried running it
through AvroSchemaConverter, and it threw an exception:
```java
> MessageType parquetSchema = MessageTypeParser.parseMessageType(
"message MySchema {\n"
+ " optional group list_field (LIST) {\n"
+ " repeated group list_field_tuple_1 (LIST) {\n"
+ " repeated int32 int_field_1;\n"
+ " }\n"
+ " repeated group list_field_tuple_2 (LIST) {\n"
+ " repeated int32 int_field_2;\n"
+ " }\n"
+ " }\n"
+ "}");
> new AvroSchemaConverter().convert(parquetSchema));
java.lang.UnsupportedOperationException: Invalid list type optional group
list_field (LIST) {
repeated group list_field_tuple_1 (LIST) {
required int32 int_field_1;
}
repeated group list_field_tuple_2 (LIST) {
required int32 int_field_2;
}
}
```
--
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]