Skip to content
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
a5b56a8
group_by support
rjzamora Jul 15, 2026
55e8d45
Merge remote-tracking branch 'upstream/main' into ordered-actor-optim…
rjzamora Jul 15, 2026
b2bcfe6
cleanup
rjzamora Jul 15, 2026
f84a8a6
avoid adjust_ordering code path when local aggregation succeeds
rjzamora Jul 16, 2026
6a9d867
Merge remote-tracking branch 'upstream/main' into ordered-actor-groupby
rjzamora Jul 16, 2026
e7577f7
Merge remote-tracking branch 'upstream/main' into ordered-actor-groupby
rjzamora Jul 16, 2026
1aaaf91
fix testing
rjzamora Jul 16, 2026
a8d03ee
update coverage
rjzamora Jul 16, 2026
4bd3d24
Merge branch 'main' into ordered-actor-groupby
rjzamora Jul 17, 2026
f257a83
Merge branch 'main' into ordered-actor-groupby
rjzamora Jul 18, 2026
fd28e30
Merge remote-tracking branch 'upstream/main' into ordered-actor-groupby
rjzamora Jul 20, 2026
3d9b8bc
fix alignment check
rjzamora Jul 20, 2026
4fdbe79
Merge remote-tracking branch 'upstream/main' into ordered-actor-join
rjzamora Jul 20, 2026
0c2c351
implement basic order-preserving join
rjzamora Jul 20, 2026
3a6e97c
Merge remote-tracking branch 'upstream/main' into ordered-actor-join
rjzamora Jul 21, 2026
ffc9c96
add path to sort the smaller side
rjzamora Jul 21, 2026
48e7f18
Merge remote-tracking branch 'upstream/main' into ordered-actor-join
rjzamora Jul 21, 2026
d1a47dd
update branch
rjzamora Aug 20, 2026
5999bfb
Merge remote-tracking branch 'upstream/main' into ordered-actor-join
rjzamora Aug 20, 2026
40bbdeb
align with main
rjzamora Aug 20, 2026
397694f
align api usage
rjzamora Aug 20, 2026
306b409
Merge remote-tracking branch 'upstream/main' into ordered-actor-join
rjzamora Aug 20, 2026
7bb3d9d
cleanup
rjzamora Aug 20, 2026
5c3051b
Merge remote-tracking branch 'upstream/main' into ordered-actor-join
rjzamora Aug 20, 2026
42285e9
adress comments
rjzamora Aug 20, 2026
ac4e0c6
more cleanup
rjzamora Aug 20, 2026
c03317e
self review and cleanup
rjzamora Aug 21, 2026
d46540d
Merge remote-tracking branch 'upstream/main' into ordered-actor-join
rjzamora Aug 21, 2026
f9c384d
cleanup for easier review
rjzamora Aug 21, 2026
bec520f
Merge remote-tracking branch 'upstream/main' into ordered-actor-join
rjzamora Aug 21, 2026
d778be8
simplify optimization for now - both sides must already be ordered.
rjzamora Aug 21, 2026
0d64b5c
break apart JoinStrategy
rjzamora Aug 21, 2026
35aeb4c
use consistent name
rjzamora Aug 21, 2026
3f703a6
Merge remote-tracking branch 'upstream/main' into ordered-actor-join
rjzamora Aug 21, 2026
78e81f8
Merge remote-tracking branch 'upstream/main' into ordered-actor-join
rjzamora Aug 24, 2026
3a4c56c
remove _ordering_with_column_indices
rjzamora Aug 24, 2026
d43f0a3
address partial code review
rjzamora Aug 28, 2026
825ce95
Merge remote-tracking branch 'upstream/main' into ordered-actor-join
rjzamora Aug 28, 2026
eac6f9e
fix CI
rjzamora Aug 28, 2026
d5cd87a
Merge remote-tracking branch 'upstream/main' into ordered-actor-join
rjzamora Aug 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import polars as pl

import pylibcudf as plc
from cudf_streaming.channel_metadata import Ordering
from cudf_streaming.partition_utils import (
packed_data_from_cudf_packed_columns,
unpack_and_concat,
Expand All @@ -30,6 +29,7 @@
from cudf_polars.utils.cuda_stream import stream_ordered_after

if TYPE_CHECKING:
from cudf_streaming.channel_metadata import Ordering
from rapidsmpf.communicator.communicator import Communicator
from rapidsmpf.memory.buffer_resource import BufferResource
from rapidsmpf.memory.packed_data import PackedData
Expand All @@ -44,15 +44,6 @@
_PartitionRange = tuple[int, int]


def get_strict_ordering(ordering: Ordering, br: BufferResource) -> Ordering:
"""Return an equivalent Ordering with strict boundaries."""
return Ordering(
ordering.keys,
ordering.get_boundaries(br),
strict_boundaries=True,
)


@dataclass(frozen=True)
class _RoutingPlan:
"""Static ownership and exchange plan for one ordering adjustment."""
Expand Down
Comment thread
rjzamora marked this conversation as resolved.
Resolved
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
find_sort_splits,
)
from cudf_polars.utils.cuda_stream import get_joined_cuda_stream
from cudf_polars.utils.dtypes import make_empty_column

if TYPE_CHECKING:
from rapidsmpf.communicator.communicator import Communicator
Expand Down Expand Up @@ -436,10 +437,14 @@ async def _extract_partitions_and_send(
).table
if table.num_columns() > ncols_out:
table = plc.Table(table.columns()[:ncols_out])
chunk = TableChunk.from_pylibcudf_table(
table, stream, exclusive_view=True, br=context.br()
else:
table = plc.Table(
[make_empty_column(dtype, stream) for dtype in output_schema.values()]
)
await send_chunk(context, ch_out, chunk, partition_id, tracer=tracer)
chunk = TableChunk.from_pylibcudf_table(
table, stream, exclusive_view=True, br=context.br()
)
await send_chunk(context, ch_out, chunk, partition_id, tracer=tracer)

await ch_out.drain(context)

Expand Down
19 changes: 8 additions & 11 deletions python/cudf_polars/cudf_polars/streaming/actor_graph/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
HashScheme,
OrderKey,
OrderScheme,
Ordering,
Partitioning,
)
from cudf_streaming.table_chunk import TableChunk
Expand All @@ -29,7 +28,6 @@
from cudf_polars.streaming.actor_graph.collectives.ordering import (
_partition_range,
adjust_ordering,
get_strict_ordering,
)
from cudf_polars.streaming.actor_graph.collectives.shuffle import ShuffleManager
from cudf_polars.streaming.actor_graph.dispatch import (
Expand Down Expand Up @@ -59,6 +57,7 @@
from cudf_polars.streaming.repartition import Repartition

if TYPE_CHECKING:
from cudf_streaming.channel_metadata import Ordering
from rapidsmpf.communicator.communicator import Communicator
from rapidsmpf.memory.buffer_resource import BufferResource
from rapidsmpf.streaming.core.channel import Channel
Expand Down Expand Up @@ -460,16 +459,15 @@ async def _shuffle_reduce(
def _remap_ordering_keys(
ordering: Ordering,
column_indices: tuple[int, ...],
br: BufferResource,
) -> Ordering:
"""Return ``ordering`` with keys remapped to another schema."""
return Ordering(
[
return ordering.with_keys(
tuple(
OrderKey(index, key.order, key.null_order)
for key, index in zip(ordering.keys, column_indices, strict=True)
],
ordering.get_boundaries(br),
strict_boundaries=ordering.strict_boundaries,
for key, index in zip(
ordering.keys[: len(column_indices)], column_indices, strict=True
)
)
)
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved


Expand Down Expand Up @@ -565,9 +563,8 @@ async def _ordered_adjust_reduce(
partial_input_ordering = _remap_ordering_keys(
input_ordering,
decomposed.shuffle_indices[: len(input_ordering.keys)],
context.br(),
)
partial_output_ordering = get_strict_ordering(partial_input_ordering, context.br())
partial_output_ordering = partial_input_ordering.as_strict()
ch_local = context.create_channel()
ch_adjusted = context.create_channel()
adjusted_metadata = _adjusted_ordering_metadata(
Expand Down
Loading
Loading