Built-in SQL operators. All from DataFusion’s parser; SQE adds none of its own. The list is here for completeness so users do not have to cross-reference the DataFusion docs for the basics.
Equal, not-equal. NULL propagates (returns NULL, not true / false).
<, <=, >, >=
Ordering.
BETWEEN x AND y
Inclusive range. NULL propagates.
NOT BETWEEN x AND y
Negated.
IS DISTINCT FROM
Like <> but treats NULL = NULL as false (i.e. NULLs are equal).
IS NOT DISTINCT FROM
Like = but treats NULL = NULL as true.
-- These differ on NULLs
SELECT a = b FROM (VALUES (1, NULL)) AS t(a, b); -- NULL
SELECT a IS NOT DISTINCT FROM b FROM (VALUES (1, NULL)) AS t(a, b); -- false
SELECT a IS NOT DISTINCT FROM b FROM (VALUES (NULL, NULL)) AS t(a, b); -- true
IS NOT DISTINCT FROM covers what Snowflake DECODE does for NULL = NULL match without needing the conditional construct.
Negated. CARE: NOT IN with NULL in list returns NULL, not TRUE.
EXISTS (subquery)
True if subquery returns any row.
NOT EXISTS (subquery)
Negated. Safer than NOT IN for NULL handling.
ANY (subquery) / SOME (subquery)
Compares to any row. x = ANY (subquery) = x IN (subquery).
ALL (subquery)
Compares to every row.
-- IN (NOT recommended when subquery may produce NULLs)
SELECT * FROM users WHERE id IN (SELECT user_id FROM blocked);
-- NOT EXISTS (safer)
SELECT * FROM users u WHERE NOT EXISTS (
SELECT 1 FROM blocked b WHERE b.user_id = u.id
);
SQL standard cast. Errors on overflow / parse failure.
yes
yes
yes
yes
TRY_CAST(expr AS type)
Returns NULL on failure.
yes
yes
partial
yes
expr::type
Postgres-style shorthand for CAST.
yes
yes
-
yes
try(CAST(...))
try() wraps any expression; same effect for casts.
yes
-
-
-
SELECT CAST('42' AS BIGINT); -- 42
SELECT TRY_CAST('not a number' AS BIGINT); -- NULL (no error)
SELECT '42'::BIGINT; -- 42 (Postgres style)
SELECT try(CAST(payload AS BIGINT)) FROM events;
@>, <@ (Postgres array containment). Use array_has_all / array_contains.
->, ->> (Postgres JSON arrow). Use json_get / json_get_str (DataFusion JSON layer) or json_extract / json_extract_scalar (Trino layer). See JSON.
<<, >> (bit shift). Use power(2, n) * x for left shift; floor(x / power(2, n)) for right shift.
<=> (MySQL null-safe equals). Use IS NOT DISTINCT FROM.
Regex named captures ((?P<name>...)). DataFusion’s regex backend (Rust regex crate) does not support PCRE-style named captures; use numbered captures via regexp_extract(s, p, n).