← not operator page · boolean/not/sc/null_operand

Null operand 🟢 all ok

pandas ✅ · DuckDB ✅

Tests:

not SC_1 with SC_1 null: the operand is null.

Manual:

Logical negation: "not false gives true", "not true gives false" and "not null gives null"; the page's sentence "returns true if op is false, otherwise true" has a typo ("otherwise true" would make not true true) and ignores null, and the listed rows govern.

Expected:

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

script.vtl ⇩

SC_r := not SC_1;

input/scalars.csv ⇩

SC_1

input/scalars.json ⇩

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

expected/scalars.json ⇩

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