Ubik
SQL

What SQL ubik runs

The supported statement and clauses, and the constructs the planner refuses before a query binds, each with the error code it returns.

ubik runs a single SELECT per query, parsed by DuckDB's parser. There is no DDL: a stream is named by --from, not by CREATE TABLE, and a continuous view is a SELECT running live, not a CREATE VIEW (see continuous views).

The supported statement

One SELECT, with these clauses:

  • WHERE
  • GROUP BY, optionally over one window function (TUMBLE, HOP, SESSION)
  • HAVING
  • JOIN / ASOF JOIN against one dimension
  • LIMIT (a constant, no OFFSET)

Scalar functions are DuckDB's, evaluated verbatim, minus the non-deterministic ones (see below). Aggregates are the durable set in aggregates.

What the planner refuses

These are caught at plan time, before the first row, so the error names the construct rather than the row it happened to touch. Each returns the code shown.

ConstructError code
More than one SQL statementNOT_SUPPORTED
Any statement other than SELECT (no DDL or DML)NOT_SUPPORTED
WITH / common table expressionsNOT_SUPPORTED
Subquery or derived table in FROMNOT_SUPPORTED
Multi-way or nested joinNOT_SUPPORTED
Top-level ORDER BYNOT_SUPPORTED
ROLLUP / CUBE / GROUPING SETSNOT_SUPPORTED
DISTINCT aggregateNOT_SUPPORTED
FILTER clause on an aggregateNOT_SUPPORTED
ORDER BY inside an aggregateNOT_SUPPORTED
LIMIT with OFFSET or a non-constant limitNOT_SUPPORTED
Bare-number window intervalNOT_SUPPORTED
Order-dependent aggregate over HOPNOT_SUPPORTED
Unbounded or holistic aggregate over SESSIONNOT_SUPPORTED
window_start used in WHEREBIND_ERROR
Window over a non-TIMESTAMP columnBIND_ERROR
Non-deterministic function (random, uuid, now, ...)DETERMINISM_NOT_SUPPORTED
Aggregate with no durable (checkpointable) codecDURABILITY_NOT_SUPPORTED

The refusals are not arbitrary. A non-deterministic function (DETERMINISM_NOT_SUPPORTED) would not replay identically after a crash, and an aggregate with no checkpointable state (DURABILITY_NOT_SUPPORTED) would break exactly-once at the next checkpoint. ubik refuses both at plan time rather than silently produce a result a resume cannot reproduce. See exactly-once and errors.

On this page