query: set() updates from most Iterables, not just Sequences.

This lets it work correctly on set columns.
This commit is contained in:
Brett Smith 2021-03-12 16:27:17 -05:00
parent 2e8e70cff3
commit 5ac2e4a872

View file

@ -394,7 +394,7 @@ class AggregateSet(bc_query_compile.EvalAggregator):
def update(self, store: Store, context: PostingContext) -> None:
"""Update existing storage with new result data."""
value, = self.eval_args(context)
if isinstance(value, Sequence) and not isinstance(value, (str, tuple)):
if isinstance(value, Iterable) and not isinstance(value, (str, tuple)):
store[self.handle].update(value)
else:
store[self.handle].add(value)