pub fn plan_native_transfer(inputs: &NativePlanInputs<'_>) -> Option<NativePlan>Expand description
Decide whether a native byte-passthrough fast path applies, and which.
Deterministic and pure. First the pipeline-owned gates run — these are unconditional and no capability can waive them:
- transforms or any quality/contract/masking pass (
has_transforms/has_governance): those need per-recordValueaccess, which a byte passthrough never produces — running them would silently skip governance; - a configured DLQ (
has_dlq): a byte batch cannot be split into per-row successes/failures, so the DLQ would be silently inert; - any delivery other than
DeliveryMode::AtLeastOnce: the native runner implements no commit-token protocol, so exactly-once is rejected structurally rather than sold as a capability flag.
Then it walks the source’s formats in preference order and returns the
first one for which some sink capability matches on format and lists the
run’s write mode. Source preference order therefore breaks ties when the
sink offers several matching formats. Returns None when no mechanism
qualifies — the caller then falls through to the columnar or Value path
unchanged.