Found this issue while investigating SPARK-16344.
For the following Parquet schema
message root {
optional group f (LIST) {
repeated group list {
optional group element {
optional int64 element;
}
}
}
}
parquet-avro decodes it as something like this:
record SingleElement {
int element;
}
record NestedSingleElement {
SingleElement element;
}
record Spark16344Wrong {
array<NestedSingleElement> f;
}
while correct interpretation should be:
record SingleElement {
int element;
}
record Spark16344 {
array<SingleElement> f;
}
The reason is that the element syntactic group for LIST in
<list-repetition> group <name> (LIST) {
repeated group list {
<element-repetition> <element-type> element;
}
}
is recognized as a record field named element. The problematic code lies in AvroRecordConverter.isElementType(). We should probably check the standard 3-level layout first before falling back to the legacy 2-level layout.
Reporter: Cheng Lian / @liancheng
Assignee: Ryan Blue / @rdblue
Related issues:
PRs and other links:
Note: This issue was originally created as PARQUET-651. Please see the migration documentation for further details.
Found this issue while investigating SPARK-16344.
For the following Parquet schema
parquet-avro decodes it as something like this:
while correct interpretation should be:
The reason is that the
elementsyntactic group for LIST inis recognized as a record field named
element. The problematic code lies inAvroRecordConverter.isElementType(). We should probably check the standard 3-level layout first before falling back to the legacy 2-level layout.Reporter: Cheng Lian / @liancheng
Assignee: Ryan Blue / @rdblue
Related issues:
PRs and other links:
Note: This issue was originally created as PARQUET-651. Please see the migration documentation for further details.