Add an option to allow auto conversion from empty fields to NULL
- Langage dominant
- Java
- Étoiles
- 3.1k
- Forks
- 1.6k
- Merge moyen
- 3 j 12 h
- PR mergées (30 j)
- 33
Description
Right now, Parquet Writer throws out an exception:
`Parquet record is malformed: empty fields are illegal, the field should be ommited completely instead`
when an empty field (array or struct or map I guess?) is written.
The suggestion here is to add an option "auto_convert_empty_fields_to_null" that convert empty fields to null automatically on write.
The LOC to change is [here:](https://sourcegraph.com/github.com/apache/parquet-mr/-/blob/parquet-column/src/main/java/org/apache/parquet/io/MessageColumnIO.java#L328)
> `if (emptyField) {`
> ` {{ throw new ParquetEncodingException("empty fields are illegal, the field should be ommited completely instead");`}}
> ``}
**Reporter**: [Zheng Shao](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=zshao)
**Note**: *This issue was originally created as [PARQUET-1945](https://issues.apache.org/jira/browse/PARQUET-1945). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Commencez dans parquet-column/src/main/java/org/apache/parquet/io/MessageColumnIO.java, autour du bloc `if (emptyField)` à la ligne 328, puis suivez la façon dont les options de Parquet Writer parviennent à ce code. Déterminez où doit se trouver l’option `auto_convert_empty_fields_to_null` et vérifiez que les arrays, structs ou maps vides sont écrits comme null au lieu de déclencher l’exception d’enregistrement malformé ; l’issue ne nomme aucun fichier de test.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java
- Domaine
- data
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100