← between operator page · comparison/between/sc_sc_sc/upper_limit_included

Upper limit included 🟢 all ok

pandas ✅ · DuckDB ✅

Tests:

between(SC_1, SC_2, SC_3) with SC_1 = 10, SC_2 = 5 and SC_3 = 10: an operand equal to the upper limit.

Manual:

Between: "The operator returns true if op is greater than or equal to from and lower than or equal to to. In other terms, it is a shortcut for the following: op >= from and op <= to".

Expected:

SC_r = true, a Boolean: 10 >= 5 and 10 <= 10; it would be false if the limit were excluded.

script.vtl ⇩

SC_r := between(SC_1, SC_2, SC_3);

input/scalars.csv ⇩

SC_1SC_2SC_3
10510

input/scalars.json ⇩

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

expected/scalars.json ⇩

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