Skip to content

feat(core): add DynamicParameterBinding support to Plan POJO #774

@bvolpato

Description

@bvolpato

Summary

Add support for DynamicParameterBinding handling at the plan level, as a follow-up to #752 (which added expression-level DynamicParameter support).

Background

The Substrait spec defines DynamicParameterBinding as a plan-level message that maps a parameter_anchor to a runtime literal value. This allows plans with DynamicParameter expression placeholders to be executed with concrete values without re-planning.

message DynamicParameterBinding {
  uint32 parameter_anchor = 1;
  Expression.Literal value = 2;
}

The Plan message has a repeated DynamicParameterBinding parameter_bindings = 7 field that is currently not represented in the substrait-java Plan POJO.

Scope

  1. Plan.java: Add List<DynamicParameterBinding> field (as an @Value.Immutable inner class or standalone)
  2. PlanProtoConverter: Serialize bindings from POJO → Proto
  3. ProtoPlanConverter: Deserialize bindings from Proto → POJO
  4. Type validation: Validate that each binding's literal type matches the type of the corresponding DynamicParameter expression in the plan (similar to what substrait-go does with ValidateParameterBindings)
  5. Tests: Proto roundtrip tests and validation tests

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions