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

True and false operands 🟢 all ok

pandas ✅ · DuckDB ✅

Tests:

not SC_true and not SC_false: the two boolean values, with SC_true = true and SC_false = false.

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_1 is false and SC_2 is true, both Booleans.

script.vtl ⇩

SC_1 := not SC_true;
SC_2 := not SC_false;

input/scalars.csv ⇩

SC_trueSC_false
truefalse

input/scalars.json ⇩

{
  "scalars": [
    {"name": "SC_true", "type": "Boolean"},
    {"name": "SC_false", "type": "Boolean"}
  ]
}

expected/scalars.json ⇩

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