Skip to content

Commit 615f486

Browse files
fix bool horizontal aggregates
1 parent 18a3c57 commit 615f486

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

bigframes/core/compile/polars/compiler.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,10 @@ def _(self, op: ops.ArrayReduceOp, input: pl.Expr) -> pl.Expr:
375375
return input.list.std()
376376
if isinstance(op.aggregation, agg_ops.VarOp):
377377
return input.list.var()
378+
if isinstance(op.aggregation, agg_ops.AnyOp):
379+
return input.list.any()
380+
if isinstance(op.aggregation, agg_ops.AllOp):
381+
return input.list.all()
378382
else:
379383
raise NotImplementedError(
380384
f"Haven't implemented array aggregation: {op.aggregation}"

third_party/bigframes_vendored/ibis/expr/types/logical.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,9 @@ def resolve_exists_subquery(outer):
353353
return Deferred(Call(resolve_exists_subquery, _))
354354
elif len(parents) == 1:
355355
op = ops.Any(self, where=self._bind_to_parent_table(where))
356+
elif len(parents) == 0:
357+
# array reduction case
358+
op = ops.Any(self, where=self._bind_to_parent_table(where))
356359
else:
357360
raise NotImplementedError(
358361
f'Cannot compute "any" for expression of type {type(self)} '

0 commit comments

Comments
 (0)