← in operator page · comparison/in/sc_set/member_of_a_set

Member of a set 🟢 all ok

pandas ✅ · DuckDB ✅

Tests:

SC_1 in { 1, 2, 3 } with SC_1 = 1: a scalar that is an element of a set literal.

Manual:

Element of, semantics for scalar operations: "1 in { 1, 2, 3 } returns true".

Expected:

SC_r = true, a Boolean: 1 is an element of the set.

script.vtl ⇩

SC_r := SC_1 in { 1, 2, 3 };

input/scalars.csv ⇩

SC_1
1

input/scalars.json ⇩

{
  "scalars": [
    {"name": "SC_1", "type": "Integer"}
  ]
}

expected/scalars.json ⇩

{
  "scalars": [
    {"name": "SC_r", "type": "Boolean", "value": true}
  ]
}