name: op-filter-set-contains-any
description: Keep records whose set field shares at least one bit with the supplied label mask.
kind: operator
category: FILTER
operator: FILTER_SET_CONTAINS_ANY
type: reference
applies_to: process, compose, predict
examples_tags: [cohort-analysis, streaming-friendly]
Use when
Keeps the rows whose multi-select answer includes at least one of the listed options, such as anyone who uses brand A or B.
Questions it answers:
- What do people who use either of our two apps think of the service?
- Which customers paid by any card at least once?
Use something else:
FILTER_SET_CONTAINS_ALLwhen the row must include every listed option.FILTER_INCLUDEwhen the field holds one value per row, not several.
Params
Wire: values is a top-level filterer key (beside field), not under params.
| Name | Type | Default | Description |
|---|---|---|---|
values | array | — | Dictionary labels. Resolved at build time to a single query mask; per-row check is a single bitwise AND. |
Inputs
field — admitted types: see ## Contract.
Output
Row-level predicate. Pass when row & query != 0. No emitted column.
Contract
- Types (
field):set_*; any other scalar type isPULSE_FIELD_TYPE_UNSUPPORTED. - Weight: not read; a weight in force is skipped.
- Streaming: streamable; components
mergeable. - Components:
n_in,n_out,n_null_input.
Gotchas
- Empty
valuesresolves to a zero query — every row drops. Validate caller input. - Unknown label in
values→PROCESSING_CONFIG. - Label whose dictionary bit position exceeds the set’s width →
PROCESSING_CONFIG. - Null rows DROP (like an include filter).
See
pulse_examples_search tags=[cohort-analysis]- Skills:
aggregation-design,response-components,op-filter-set-contains-all,op-filter-set-contains-none,op-filter-set-equals