Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Binary statistics truncation test ignores its configured truncation length

Aberta Para iniciantes
#3,820 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 2 dias

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
88/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
java
Domínio
testing-qa

Direção de pesquisa

Comece em TestParquetMetadataConverter.testBinaryStatsWithTruncation e inspecione as sobrecargas de ParquetMetadataConverter usadas pelo helper. Execute esse teste focado, altere-o para a sobrecarga com comprimento de truncamento explícito e faça com que as asserções cubram os valores truncados exatos, além dos limites estritos de tamanho combinado: 4095 bytes aceitos e 4096 bytes omitidos.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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)

Linguagem predominante
Java
Estrelas
3.1k
Forks
1.6k
Merge médio
4d 9h
PRs com merge (30d)
32

Preparar o ambiente

Ainda não verificamos os arquivos de configuração deste projeto. Comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de apache/parquet-java

Todas as issues de apache/parquet-java

Issues semelhantes

Mais issues de Java

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.