#22128·cudf

[Story][FEA] Order-aware streaming execution in cuDF-Polars

Author: rjzamoraCreated Apr 13, 2026Updated Sep 16, 2026
Labelsfeature requestcudf-polars

Context

Streaming window and time-oriented operators are tracked in https://github.com/rapidsai/cudf/issues/18633 and https://github.com/rapidsai/cudf/issues/22032. In practice these features almost always sit in sort-based workflows by time or logical sequence.

Today, even when data is already sorted on disk, the executor may destroy that ordering to perform common group_by and join operations. Even when we do apply global sort operations, we do not always preserve enough ordering metadata for downstream operators to avoid redundant sorts, shuffles, or repartitioning.

Making ordering a first-class ChannelMetadata property, similar in spirit to hash partitioning metadata, should make ordered/window and time-series workloads materially cheaper: less shuffle, less memory pressure, and simpler plans.

Dependency / alignment: https://github.com/rapidsai/rapidsmpf/pull/853 added OrderScheme partitioning metadata in rapidsmpf. [DONE]

Sequencing

Current Design Direction

Current PRs favor actor-specific planning guided by metadata and lightweight partitioning hints. The planning pass can tell upstream actors which ordering or strict partitioning would be useful downstream, but each actor still decides locally whether to no-op, preserve metadata, extract boundaries, call adjust_ordering, use tree/local execution, hash shuffle, or use a future order-aware path.

For now, prefer:

  • keeping repartitioning decisions in actors
  • factoring out shared helpers for common metadata checks and transformations
  • avoiding a broad enforce_partitioning API until tiered partitioning semantics are clearer

Expected Impact

This work is expected to reduce unnecessary sorting, shuffling, and memory pressure in:

  • streaming LazyFrame.rolling(...)
  • grouped range windows
  • grouped over(...) execution
  • order-aware grouped reductions
  • order-aware joins
  • future join_asof #24110
  • user-declared sorted input via set_sorted()