Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
joocer committed Jan 25, 2025
1 parent 03364d1 commit 1fe28e3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion opteryx/operators/aggregate_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,11 @@ def build_aggregations(aggregators):
count_options = pyarrow.compute.CountOptions(mode="all")
else:
field_name = field_node.schema_column.identity
if aggregator.value == "COUNT" and aggregator.duplicate_treatment == "Distinct":
aggregator.value = "COUNT_DISTINCT"
function = AGGREGATORS[aggregator.value]
# if the array agg is distinct, base off that function instead
if aggregator.value == "ARRAY_AGG" and aggregator.duplicate_treatment == "Distinct":
if aggregator.value == "ARRAY_AGG" and aggregator.duplicate_treatment == "Distinct":
function = "distinct"
aggs.append((field_name, function, count_options))
column_map[aggregator.schema_column.identity] = f"{field_name}_{function}".replace(
Expand Down

0 comments on commit 1fe28e3

Please sign in to comment.