From 1fe28e384f5f0eca1dd30f9ffd749a6f30311b88 Mon Sep 17 00:00:00 2001 From: joocer Date: Sat, 25 Jan 2025 00:46:32 +0000 Subject: [PATCH 1/2] #2307 --- opteryx/operators/aggregate_node.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/opteryx/operators/aggregate_node.py b/opteryx/operators/aggregate_node.py index 67fca04a..5bd7f50b 100644 --- a/opteryx/operators/aggregate_node.py +++ b/opteryx/operators/aggregate_node.py @@ -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( From 1a6022c1342ffcf1699364346e3b561ad754fc20 Mon Sep 17 00:00:00 2001 From: XB500 Date: Sat, 25 Jan 2025 00:46:54 +0000 Subject: [PATCH 2/2] Opteryx Version 0.19.2-beta.1031 --- opteryx/__version__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opteryx/__version__.py b/opteryx/__version__.py index 032c12c3..944f38f3 100644 --- a/opteryx/__version__.py +++ b/opteryx/__version__.py @@ -1,4 +1,4 @@ -__build__ = 1030 +__build__ = 1031 # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.