Skip to content

fix(pipelinedp4j): validate vector sizes - #515

Open
mnkj0021 wants to merge 1 commit into
google:mainfrom
mnkj0021:fix/507-vector-size-validation
Open

mnkj0021 wants to merge 1 commit into
google:mainfrom
mnkj0021:fix/507-vector-size-validation

Conversation

@mnkj0021

@mnkj0021 mnkj0021 commented Oct 1, 2026

Copy link
Copy Markdown

Summary

  • validate extracted vector length against the declared vectorSize at the shared query extraction boundary
  • fail with a clear error before aggregation when a vector is shorter or longer than declared
  • add regression coverage for both mismatch directions

This shared extraction path is used by the row APIs and Spark DataFrame aggregation path, so the validation is applied before backend aggregation rather than inside an individual combiner.

Fixes #507

Validation

  • git diff --check: passed
  • attempted PipelineDP4j API suite from the documented pipelinedp4j/ workspace:
    bazelisk test //tests/com/google/privacy/differentialprivacy/pipelinedp4j/api:api_tests --test_output=errors
  • the local runner did not reach Kotlin compilation because Bazel's generated local_jdk repository fails while creating a cached JDK symlink. The failure occurs during repository/toolchain setup, before the target is built or tests execute.

The regression test exercises both a shorter vector (1 vs declared 2) and a longer vector (3 vs declared 2).

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.

PipelineDP4j's vector sums aren't safe against differing-length vectors

1 participant