Skip to main content

encode

Function encode 

Source
pub fn encode(plan: &PhysicalPlan) -> Result<Vec<u8>, WireError>
Expand description

Encode a PhysicalPlan to MessagePack bytes.

Returns an error for plans that are node-local by construction and must never be shipped over the QUIC wire:

  • ClusterArray variants (handled on the Control Plane); and
  • QueryOp::ShuffleJoinConsume and QueryOp::ShuffleAggregateConsume (carry node-local staged-file paths; built locally by the part-owner’s consume hook and dispatched only to that same node’s Data Plane).

QueryOp::PartialAggregateState is wire-SHIPPABLE — it carries a collection name plus an optional input sub-plan (a wire-shippable ProviderScan) and is dispatched to a remote producer’s Data Plane — so it is intentionally NOT rejected here.