← less operator page · comparison/less/sc_sc/alphabetical_string_order

Alphabetical string order 🟢 all ok

pandas ✅ · DuckDB ✅

Tests:

SC_1 < SC_2 with SC_1 = "hello" and SC_2 = "hi": two strings.

Manual:

Less than, semantics for scalar operations: "``"hello" < "hi"`` gives true".

Expected:

SC_r = true, a Boolean, as the page gives it: hello sorts before hi.

script.vtl ⇩

SC_r := SC_1 < SC_2;

input/scalars.csv ⇩

SC_1SC_2
hellohi

input/scalars.json ⇩

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

expected/scalars.json ⇩

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