avantgardnerio commented on code in PR #2211:
URL:
https://github.com/apache/datafusion-ballista/pull/2211#discussion_r3786025728
##########
ballista/core/src/serde/mod.rs:
##########
@@ -704,6 +891,20 @@ impl PhysicalExtensionCodec for
BallistaPhysicalExtensionCodec {
predicates,
)?))
}
+ PhysicalPlanType::PrefixMerge(node) => {
+ let [input] = inputs else {
+ return Err(DataFusionError::Internal(format!(
+ "PrefixMergeExec expects exactly 1 input, got {}",
+ inputs.len()
+ )));
+ };
+ let schema = input.schema();
+ Ok(Arc::new(PrefixMergeExec::try_new_resolved(
+ input.clone(),
+ decode_window_applies(&node.applies, ctx, schema.as_ref(),
self)?,
+ decode_prefix_state(&node.per_partition_state)?,
+ )?))
Review Comment:
> `Arc<AggregateUDF>`, `Vec<Arc<dyn PhysicalExpr>>`, and `Vec<ScalarValue>`
sketch state all have to cross the wire
Done on this PR. The UDAF crosses by name and is resolved from the
executor's `FunctionRegistry` on decode, args as `PhysicalExprNode`, and state
as `ScalarValue` so sketch state works unchanged. A round trip test covers both
`WindowApply` shapes, the registry lookup, and the distinction between a slot
with no state and a slot with empty state.
Encoding refuses while the prefix state is unresolved, matching
`RangeFilterExec`'s refusal on unresolved bounds. An executor has no route to
that state, so a plan reaching the wire without it could only emit
partition-local aggregates.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]