Skip to content

Commit 77f1d87

Browse files
authored
Use unique names for null/non-null groupby columns (#289)
1 parent e48d9c1 commit 77f1d87

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

dask_sql/physical/utils/groupby.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ def get_groupby_with_nulls_cols(
2323
is_null_column = ~(group_column.isnull())
2424
non_nan_group_column = group_column.fillna(0)
2525

26+
# split_out doesn't work if both columns have the same name
27+
is_null_column.name = f"{is_null_column.name}_{new_temporary_column(df)}"
28+
2629
group_columns_and_nulls += [is_null_column, non_nan_group_column]
2730

2831
if not group_columns_and_nulls:

0 commit comments

Comments
 (0)