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
Plan.java: Add List<DynamicParameterBinding> field (as an @Value.Immutable inner class or standalone)
PlanProtoConverter: Serialize bindings from POJO → Proto
ProtoPlanConverter: Deserialize bindings from Proto → POJO
- 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)
- Tests: Proto roundtrip tests and validation tests
References
Summary
Add support for
DynamicParameterBindinghandling at the plan level, as a follow-up to #752 (which added expression-levelDynamicParametersupport).Background
The Substrait spec defines
DynamicParameterBindingas a plan-level message that maps aparameter_anchorto a runtime literal value. This allows plans withDynamicParameterexpression placeholders to be executed with concrete values without re-planning.The
Planmessage has arepeated DynamicParameterBinding parameter_bindings = 7field that is currently not represented in the substrait-javaPlanPOJO.Scope
Plan.java: AddList<DynamicParameterBinding>field (as an@Value.Immutableinner class or standalone)PlanProtoConverter: Serialize bindings from POJO → ProtoProtoPlanConverter: Deserialize bindings from Proto → POJODynamicParameterexpression in the plan (similar to what substrait-go does withValidateParameterBindings)References
DynamicParameterBinding,ValidateParameterBindings,PlanWithBindingsplan.proto#L101