Skip to content

Commit

Permalink
chore: add type annotation for ArrayValue.filter method input
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud authored and kszucs committed Jul 17, 2023
1 parent 3355dd8 commit 603cb6a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ibis/expr/types/arrays.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,9 @@ def map(self, func: Callable[[ir.Value], ir.Value]) -> ir.ArrayValue:
"""
return ops.ArrayMap(self, func=func).to_expr()

def filter(self, predicate: Callable[[ir.Value], ir.BooleanValue]) -> ir.ArrayValue:
def filter(
self, predicate: Callable[[ir.Value], bool | ir.BooleanValue]
) -> ir.ArrayValue:
"""Filter array elements using `predicate`.
Parameters
Expand Down

1 comment on commit 603cb6a

@ibis-squawk-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 3.

Benchmark suite Current: 603cb6a Previous: c643fca Ratio
ibis/tests/benchmarks/test_benchmarks.py::test_compile[small-bigquery] 1409.220426436967 iter/sec (stddev: 0.0069160965584574114) 6839.433677197207 iter/sec (stddev: 0.000029370217985924143) 4.85

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.