Skip to content

[Feature] Add tests for streaming amplitude encoder coverage #1180

@viiccwen

Description

@viiccwen

ref: #1058

What

Add focused tests for qdp/qdp-core/src/encoding/amplitude.rs so the streaming amplitude encoder is covered by cargo llvm-cov.

Current coverage for this file is still effectively zero:

  • Function coverage: 0.00% (0/4)
  • Line coverage: 0.00% (0/73)

Why

encoding/amplitude.rs contains the streaming Parquet encoding path, but none of its validation or chunk-level behavior is currently exercised in the Rust coverage run.

That means we do not have regression protection for:

  • sample size validation
  • state initialization
  • chunk encoding behavior
  • kernel launch error propagation

How

Add tests under qdp/qdp-core/tests/ that exercise AmplitudeEncoder through the streaming path used by crate::encoding::stream_encode.

Suggested coverage targets:

  • reject sample_size == 0
  • reject sample_size > STAGE_SIZE_ELEMENTS
  • successful init_state() allocation for a valid chunk size
  • at least one end-to-end streaming encode case that reaches encode_chunk()
  • if practical, one failure case that asserts MahoutError::KernelLaunch is surfaced correctly

This issue is done when qdp/qdp-core/src/encoding/amplitude.rs is no longer at 0% coverage in cargo llvm-cov.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions