Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Binary statistics truncation test ignores its configured truncation length

Aperta Adatta ai principianti
#3,820 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
88/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
java
Ambito
testing-qa

Direzione di ricerca

Inizia in TestParquetMetadataConverter.testBinaryStatsWithTruncation e ispeziona gli overload di ParquetMetadataConverter utilizzati dall'helper. Esegui questo test mirato, impostalo sull'overload con lunghezza di troncamento esplicita e fai in modo che le asserzioni coprano i valori troncati esatti e i limiti rigidi della dimensione combinata: 4095 byte accettati e 4096 byte omessi.

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

Descrizione

Describe the bug, including details regarding any error messages, version, and platform.

In TestParquetMetadataConverter.testBinaryStatsWithTruncation, the helper creates new ParquetMetadataConverter(truncateLen) but then calls metadataConverter.toParquetStatistics(stats). That method is static and delegates to DEFAULT_STATISTICS_TRUNCATE_LENGTH (Integer.MAX_VALUE), so the requested length never reaches conversion.

The existing assertions do not detect this: unchanged under-limit bounds satisfy the non-strict ordering checks, while oversized inputs are expected to have no bounds, matching the unintended default path. The test therefore does not exercise the finite truncation it describes.

This remains present at master 4b37c193e2f796d553a20cc57ec9835ceaa1c95c. For a deterministic example, minimum a repeated 60 times and maximum b repeated 70 times with length 1 should produce min_value="a" and max_value="c" through the explicit overload. The current helper uses the default overload and leaves those bounds untruncated.

The proposed correction is test-only: call toParquetStatistics(stats, truncateLen), use deterministic exact-byte assertions, and cover the strict 4095-byte accepted/4096-byte omitted combined-size boundary before and after truncation. Constructor validation and current null-count omission behavior remain unchanged.

#3819 addresses null-count serialization in production; this issue concerns a separate gap in truncation-test coverage and does not propose changing that behavior.

Component(s)

Core (parquet-hadoop)

Lingua principale
Java
Stelle
3.1k
Fork
1.6k
Merge medio
4g 9h
PR unite (30g)
32

Preparare l'ambiente

Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/parquet-java

Tutte le issue di apache/parquet-java

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.