Skip to content

Commit

Permalink
tweak error message
Browse files Browse the repository at this point in the history
  • Loading branch information
rjzamora committed Dec 19, 2024
1 parent e090de5 commit 24b88f2
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions python/cudf_polars/cudf_polars/experimental/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ def _(
# Check group-by keys
if not all(expr.is_pointwise for expr in traversal([e.value for e in ir.keys])):
raise NotImplementedError(
f"GroupBy {ir} does not support multiple partitions."
"GroupBy does not support multiple partitions "
f"for these keys:\n{ir.keys}"
) # pragma: no cover

name_map: MutableMapping[str, Any] = {}
Expand All @@ -69,8 +70,8 @@ def _(
elif isinstance(agg, Agg):
if agg.name not in _GB_AGG_SUPPORTED:
raise NotImplementedError(
f"GroupBy {ir} does not support multiple partitions "
f"with an {agg} expression."
"GroupBy does not support multiple partitions "
f"for this expression:\n{agg}"
)

if agg.name in ("sum", "count"):
Expand Down Expand Up @@ -98,8 +99,8 @@ def _(
else:
# Unsupported expression
raise NotImplementedError(
f"GroupBy {ir} does not support multiple partitions "
f"with an {agg} expression."
"GroupBy does not support multiple partitions "
f"for this expression:\n{agg}"
) # pragma: no cover

gb_pwise = GroupBy(
Expand Down

0 comments on commit 24b88f2

Please sign in to comment.