ClickHouse: splitByString(delimiter, expr) -> Array(String). Note
the argument order is reversed compared to the others (separator comes
first in ClickHouse).
MySQL, MariaDB, MSSQL, Oracle, DB2, SQLite: throw. None of these have a
clean way to produce an array/collection from a scalar expression:
MySQL/MariaDB have no array type at all (only SUBSTRING_INDEX for
extracting a single part by position, which is a different contract).
MSSQL's STRING_SPLIT is a table-valued function usable only in a
FROM clause, not as a scalar expression.
Oracle/DB2/SQLite have no built-in split-to-array function; producing
one requires CONNECT BY/recursive CTE tricks that cannot be
expressed as a single SQL fragment.
Split a string on a delimiter, returning an array/collection expression where the dialect has a real mechanism for it.
STRING_TO_ARRAY(expr, delimiter)->text[].SPLIT_TO_ARRAY(expr, delimiter)->SUPERarray (Redshift's SUPER-type based array support).SPLIT(expr, delimiter)->ARRAY(variant).splitByString(delimiter, expr)->Array(String). Note the argument order is reversed compared to the others (separator comes first in ClickHouse).SUBSTRING_INDEXfor extracting a single part by position, which is a different contract).STRING_SPLITis a table-valued function usable only in aFROMclause, not as a scalar expression.CONNECT BY/recursive CTE tricks that cannot be expressed as a single SQL fragment.