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

Both operands null 🟢 all ok

pandas ✅ · DuckDB ✅

Tests:

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

Manual:

Logical conjunction: "false and null gives false", "true and null gives null" and "null and null gives null"; the page's sentence "returns true if both operands are true, otherwise false" conflicts with its null rows (true and null is null, not false), and the listed rows govern.

Expected:

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

script.vtl ⇩

SC_r := SC_1 and 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}
  ]
}