Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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_ALL when the row must include every listed option.
  • FILTER_INCLUDE when the field holds one value per row, not several.

Params

Wire: values is a top-level filterer key (beside field), not under params.

NameTypeDefaultDescription
valuesarray—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 is PULSE_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 values resolves 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