Skip to content

test: cover signed integers and bool in BitReader::get_batch test#10180

Merged
alamb merged 1 commit into
apache:mainfrom
alamb:test-coverage-bitpacked-get-batch
Jun 22, 2026
Merged

test: cover signed integers and bool in BitReader::get_batch test#10180
alamb merged 1 commit into
apache:mainfrom
alamb:test-coverage-bitpacked-get-batch

Conversation

@alamb

@alamb alamb commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

test_get_batch in parquet/src/util/bit_util.rs only exercised the unsigned
types (u8/u16/u32/u64). BitReader::get_batch is also generic over the
signed integer types (i8/i16/i32/i64) and bool, each with its own
FromBitpacked implementation, but none of those were covered by the test.

What changes are included in this PR?

Extend test_get_batch to also run the signed counterpart of each width and
bool (at its only supported bit width of 1), reusing the existing
test_get_batch_helper.

Are these changes tested?

it is all testes

Are there any user-facing changes?

No.

`test_get_batch` only exercised the unsigned types (`u8`/`u16`/`u32`/`u64`).
`BitReader::get_batch` is generic over the signed integer types and `bool`
as well, each with its own `FromBitpacked` implementation, but none of those
were covered by the test.

Extend the test to also run the signed counterpart of each width and `bool`
(at its only supported bit width of 1). This locks in coverage for those
code paths, which is especially relevant given that `parquet` is not part of
the MIRI CI workflow.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the parquet Changes to the parquet crate label Jun 22, 2026
@alamb alamb marked this pull request as ready for review June 22, 2026 19:16

@etseidl etseidl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@alamb alamb merged commit 3208e4f into apache:main Jun 22, 2026
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

parquet Changes to the parquet crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants