apache / apache/parquet-java

Difference between parquet-mr implementation and parquet-format documentation

Ouverte
#1,819 3 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Component: Format Component: Java Component: Parquet Priority: Major Type: bug
Langage dominant
Java
Étoiles
3.1k
Forks
1.6k
Merge moyen
3 j 12 h
PR mergées (30 j)
33

Description

Documentation at https://github.com/apache/parquet-format/blob/master/src/thrift/parquet.thrift

```
struct ColumnChunk {
/** File where column data is stored. If not set, assumed to be same file as
* metadata. This path is relative to the current file.
**/
1: optional string file_path

/** Byte offset in file_path to the ColumnMetaData **/
2: required i64 file_offset

...
```

and https://github.com/apache/parquet-format

```
4-byte magic number "PAR1"

...
```

suggests that ColumnChunk data should be followed by ColumnChunkMetaData.

However it looks like parquet-mr doesn't write ColumnMetaData after Columns at all and populates ColumnChunk.file_offset with an offset of the first data page:

from **ParquetMetadataConverter.java:153**:
```Java
for (ColumnChunkMetaData columnMetaData : columns) {
ColumnChunk columnChunk = new ColumnChunk(columnMetaData.getFirstDataPageOffset()); // verify this is the right offset
columnChunk.file_path = block.getPath(); // they are in the same file for now
```

Is it a bug in parquet-mr or in the documentation?

**Reporter**: [Konstantin Shaposhnikov](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=k.shaposhnikov@gmail.com) / @kostya-sh
#### PRs and other links:
- [parquet-format PR #56](https://github.com/apache/parquet-format/pull/56)

**Note**: *This issue was originally created as [PARQUET-291](https://issues.apache.org/jira/browse/PARQUET-291). 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 par ParquetMetadataConverter.java à la ligne 153 et comparez sa construction de ColumnChunk avec la définition de ColumnChunk dans parquet.thrift et la documentation de la structure de parquet-format. Examinez la PR #56 de parquet-format mentionnée dans le lien ainsi que la documentation de migration référencée dans l’issue. Le travail est terminé lorsque l’écart entre l’implémentation et la documentation a fait l’objet d’une résolution clairement consignée.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
java
Domaine
data-engineering
Type d'issue
Documentation
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.