For array type, inconsistent names are used as the array element name.
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 1.6k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 33
Description
When creating a convert for an array, Parquet Avro uses "array" as the field name name ([see here](https://github.com/apache/incubator-parquet-mr/blob/parquet-1.6.0rc7/parquet-avro/src/main/java/parquet/avro/AvroSchemaConverter.java#L131)) , but Parquet Hive SerDe uses "array_element" as the field name [see here](https://github.com/apache/incubator-parquet-mr/blob/parquet-1.6.0rc7/parquet-hive/parquet-hive-storage-handler/src/main/java/org/apache/hadoop/hive/ql/io/parquet/convert/HiveSchemaConverter.java#L109). In Spark SQL, our native Parquet support is following Parquet Avro's convention, for data generated by Parquet Hive SerDe, the array value cannot be correctly read and null will be returned.
**Reporter**: [Yin Huai](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=yhuai)
#### Related issues:
- [Arrays and Maps stored with Hive Parquet Serde may not be able to read by the Parquet support in the Data Souce API](https://issues.apache.org/jira/browse/SPARK-5508) (is related to)
**Note**: *This issue was originally created as [PARQUET-221](https://issues.apache.org/jira/browse/PARQUET-221). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*
Contributor guide
No contributing guide indexed for this repository
Research direction
Compare the array element naming in parquet-avro's AvroSchemaConverter.java and parquet-hive's HiveSchemaConverter.java, as linked in the issue. Reproduce reading Hive Parquet array data through Spark SQL's native Parquet support, then verify that arrays no longer return null while preserving compatibility with existing files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- data-engineering
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100