apache / apache/parquet-java

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

Aperta
#1,762 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Component: Java Component: Parquet Priority: Major Type: bug
Lingua principale
Java
Stelle
3.1k
Fork
1.6k
Merge medio
3g 12h
PR unite (30g)
33

Descrizione

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.*

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Confronta la denominazione degli elementi degli array in AvroSchemaConverter.java di parquet-avro e HiveSchemaConverter.java di parquet-hive, come collegati nell'issue. Riproduci la lettura dei dati degli array Hive Parquet tramite il supporto nativo di Parquet di Spark SQL, quindi verifica che gli array non restituiscano più null, preservando al contempo la compatibilità con i file esistenti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
data-engineering
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.