apache / apache/parquet-java

Parquet reader throws error "Reading past RLE/BitPacking stream" for parquet file with null values

Ouverte
#1,555 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
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

Recently moved from parquet 1.8.x to 1.12 recently.

Dataset has > 20k null values to be written to a complex type. Earlier with 1.8.x, it would create single page but with 1.12 it creates 20 pages (parquet - 1414). Writing nulls to complex types has been optimised to be cached (null cache) that would be flushed on next non null encounter or explicit flush/close. With 1.8, it would have encountered explicit close and flush the null cache and write the page. But with 1.12, after encountering 20k values, the page is written prematurely.

 

Below is the metadata dump in both cases.

1.8 :

index._id TV=111396 RL=0 DL=2 ---------------------------------------------------------------------------- page 0: DLE:RLE RLE:BIT_PACKED VLE:PLAIN ST:[num_nulls: 111396, min/max not defined] SZ:8 VC:111396

 

1.12 :

index._index TV=111396 RL=0 DL=2 ---------------------------------------------------------------------------- page 0: DLE:RLE RLE:BIT_PACKED VLE:PLAIN ST:[no stats for this column] SZ:4 VC:0 ...... page 19: DLE:RLE RLE:BIT_PACKED VLE:PLAIN ST:[no stats for this column] SZ:8 VC:111396

All the pages in 1.12 except the last page have same metadata. Now the issue is when the parquet reader kicks in, it sees that the RLE is bit packed and reads 8 bytes which goes beyond the stream as the size is only 4 (Reading past RLE/BitPacking stream).

**Reporter**: [shyam narayan singh](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=shyamsingh) / @shyambits2004

**Note**: *This issue was originally created as [PARQUET-1575](https://issues.apache.org/jira/browse/PARQUET-1575). 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 reproduire le cas Parquet 1.12 signalé avec plus de 20k valeurs null dans un type complexe, puis examinez la gestion du flux RLE/bit-packed par le reader en fonction des métadonnées de page fournies. C'est terminé lorsque les pages générées peuvent être lues sans l'erreur "Reading past RLE/BitPacking stream" et que les comportements de 1.8 et 1.12 sont réconciliés.

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

Évaluation

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

Recevez les nouvelles issues par e-mail

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