apache / apache/parquet-java

For array type, inconsistent names are used as the array element name.

Open
#1,762 1 comment 0 reactions 0 assignees View on GitHub
Component: Java Component: Parquet Priority: Major Type: bug
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

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.