Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
get_window_mode in datafusion::physical_plan::windows - Rust
[go: Go Back, main page]

pub fn get_window_mode(
    partitionby_exprs: &[Arc<dyn PhysicalExpr>],
    orderby_keys: &[PhysicalSortExpr],
    input: &Arc<dyn ExecutionPlan>
) -> Result<Option<(bool, PartitionSearchMode)>, DataFusionError>
Expand description

Compares physical ordering (output ordering of the input operator) with partitionby_exprs and orderby_keys to decide whether existing ordering is sufficient to run the current window operator.

  • A None return value indicates that we can not remove the sort in question (input ordering is not sufficient to run current window executor).
  • A Some((bool, PartitionSearchMode)) value indicates that the window operator can run with existing input ordering, so we can remove SortExec before it. The bool field in the return value represents whether we should reverse window operator to remove SortExec before it. The PartitionSearchMode field represents the mode this window operator should work in to accomodate the existing ordering.