Skip to main content

region_local_segment

Function region_local_segment 

Source
pub fn region_local_segment(node: &NativeNode) -> bool
Expand description

Whether the dist analyzer places a segment over node region-locally.

A segment is a FusedSeries node the analyzer has to move below the MergeScan for the physical planner to read the scans it names. The FusedSeries arm of Categorizer::check_extension_plan (src/query/src/dist_plan/commutativity.rs) is what decides that, from the bound tree alone: a root that reads_across_series is NonCommutative unless it is a per-series evaluation or the Partial half of a split fold. A segment it refuses stays above the merge, where the physical planner finds neither a region scan nor an explicit-label frame below it, so the statement fails while being planned instead of keeping the plan it had. Segmentation therefore asks that question before it cuts, and cut_as_segment declines the nodes this refuses.