Skip to content
/ cudf Public
forked from rapidsai/cudf

Commit

Permalink
Correctly raise NotImplementedError on dynamic groupbys
Browse files Browse the repository at this point in the history
Now that the dynamic groupby options are exposed, we can raise without
heuristics.

Partially addresses rapidsai#17144
  • Loading branch information
wence- committed Oct 23, 2024
1 parent 1dc6e77 commit 254de8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/cudf_polars/cudf_polars/dsl/ir.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,11 +666,11 @@ def __init__(
raise NotImplementedError(
"rolling window/groupby"
) # pragma: no cover; rollingwindow constructor has already raised
if self.options.dynamic:
raise NotImplementedError("dynamic group by")
if any(GroupBy.check_agg(a.value) > 1 for a in self.agg_requests):
raise NotImplementedError("Nested aggregations in groupby")
self.agg_infos = [req.collect_agg(depth=0) for req in self.agg_requests]
if len(self.keys) == 0:
raise NotImplementedError("dynamic groupby")

@staticmethod
def check_agg(agg: expr.Expr) -> int:
Expand Down

0 comments on commit 254de8b

Please sign in to comment.