Skip to content

Commit

Permalink
Handle make_empty_column libcudf error
Browse files Browse the repository at this point in the history
  • Loading branch information
shwina committed Mar 25, 2021
1 parent 8bfb319 commit 5444ab7
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions python/cudf/cudf/_lib/groupby.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,23 @@ cdef class GroupBy:
vector[libcudf_groupby.aggregation_result]
] c_result

with nogil:
c_result = move(
self.c_obj.get()[0].aggregate(
c_agg_requests
try:
with nogil:
c_result = move(
self.c_obj.get()[0].aggregate(
c_agg_requests
)
)
)
except RuntimeError as e:
# TODO: remove this try..except after
# https://github.com/rapidsai/cudf/issues/7611
# is resolved
if ("make_empty_column") in str(e):
raise NotImplementedError(
"Aggregation not supported for empty columns"
) from e
else:
raise

grouped_keys = Table.from_unique_ptr(
move(c_result.first),
Expand Down

0 comments on commit 5444ab7

Please sign in to comment.