← or operator page · boolean/or/sc_sc/both_operands_null

Both operands null 🟢 all ok

pandas ✅ · DuckDB ✅

Tests:

SC_1 or SC_2 with both operands null: SC_1 and SC_2 are null Booleans.

Manual:

Logical disjunction: "false or null gives null", "true or null gives true" and "null or null gives null"; the page's sentence "returns true if at least one of the operands is true, otherwise false" conflicts with its null rows (false or null is null, not false), and the listed rows govern.

Expected:

SC_r is null, a Boolean, as in the row "null or null gives null".

script.vtl ⇩

SC_r := SC_1 or SC_2;

input/scalars.csv ⇩

SC_1SC_2

input/scalars.json ⇩

{
  "scalars": [
    {"name": "SC_1", "type": "Boolean"},
    {"name": "SC_2", "type": "Boolean"}
  ]
}

expected/scalars.json ⇩

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