Skip to content

[QDP] Add unit tests for Parquet readers#1203

Open
0lai0 wants to merge 2 commits intoapache:mainfrom
0lai0:test_parquet
Open

[QDP] Add unit tests for Parquet readers#1203
0lai0 wants to merge 2 commits intoapache:mainfrom
0lai0:test_parquet

Conversation

@0lai0
Copy link
Contributor

@0lai0 0lai0 commented Mar 18, 2026

Related Issues

Closes #1184

Changes

  • Bug fix
  • New feature
  • Refactoring
  • Documentation
  • Test
  • CI/CD pipeline
  • Other

Why

qdp/qdp-core/src/readers/parquet.rs had less code coverage. This means there was no regression protection for sample size validation, state initialization, or the streaming encoding path.

How

Added 10 unit tests in qdp/qdp-core/src/readers/parquet.rs :

  1. test_parquet_reader_missing_file — validates missing file returns MahoutError::Io
  2. test_parquet_reader_bad_schema — rejects non-list schema (Int32 column)
  3. test_parquet_reader_too_many_columns — rejects files with more than one column
  4. test_parquet_reader_bad_list_type — rejects List (must be List)
  5. test_parquet_reader_list_f64 — roundtrip List with value and metadata assertions
  6. test_parquet_reader_fixed_size_list_f64 — roundtrip FixedSizeList with value and metadata assertions
  7. test_parquet_reader_inconsistent_sample_sizes — verifies error when list lengths differ across rows
  8. test_parquet_streaming_reader_scalar_f64 — validates scalar Float64 basis encoding path with chunked read_chunk() calls
  9. test_parquet_streaming_reader_list_f64_chunked — streaming read_batch() over List with small batch size
  10. test_parquet_streaming_reader_empty_data — explicit assertion on empty Parquet file error

Checklist

  • Added or updated unit tests for all changes
  • Added or updated documentation for all changes
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Add direct coverage for Parquet readers

1 participant