Skip to content

test: add DynamicParameter and DynamicParameterBinding roundtrip tests#481

Closed
bvolpato wants to merge 1 commit intosubstrait-io:mainfrom
bvolpato:bv/dynamic-parameter-tests
Closed

test: add DynamicParameter and DynamicParameterBinding roundtrip tests#481
bvolpato wants to merge 1 commit intosubstrait-io:mainfrom
bvolpato:bv/dynamic-parameter-tests

Conversation

@bvolpato
Copy link
Copy Markdown
Member

Summary

Add comprehensive tests validating the auto-generated DynamicParameter and DynamicParameterBinding proto types, ensuring they serialize and deserialize correctly through both protobuf binary and JSON (serde) roundtrips.

This complements the DynamicParameter support recently added in substrait-java#752 and substrait-go#215.

Tests Added (5 tests)

Test Description
dynamic_parameter_expression_roundtrip Proto encode/decode roundtrip for a DynamicParameter as an expression RexType
dynamic_parameter_binding_roundtrip Proto encode/decode roundtrip for DynamicParameterBinding with an i32 literal
plan_with_dynamic_parameter_roundtrip Full plan with a DynamicParameter in a filter condition and a ParameterBinding
multiple_dynamic_parameters_in_plan Plan with two DynamicParameter expressions (i32, fp64) in a project, with two bindings
dynamic_parameter_serde_roundtrip JSON serde roundtrip (requires serde feature) for a plan with dynamic parameters

Validation

  • cargo test --all-features — all 68 tests pass
  • cargo fmt -- --check — clean
  • cargo clippy --all-features -- -D warnings — no warnings

@bvolpato bvolpato force-pushed the bv/dynamic-parameter-tests branch from 6267b90 to 05ac0f5 Compare March 16, 2026 18:47
Add tests validating proto roundtrip for DynamicParameter expressions,
DynamicParameterBinding, plan-level integration with filter and project
relations, multiple parameters, and serde JSON roundtrip.
@bvolpato bvolpato force-pushed the bv/dynamic-parameter-tests branch from 05ac0f5 to 93fb7fc Compare March 16, 2026 18:48
@bvolpato
Copy link
Copy Markdown
Member Author

Spoke with @benbellick in person and we can defer tests for whenever we have builders instead of using bindings directly

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.

1 participant