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:
WHEREGROUP BY, optionally over one window function (TUMBLE,HOP,SESSION)HAVINGJOIN/ASOF JOINagainst one dimensionLIMIT(a constant, noOFFSET)
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.
| Construct | Error code |
|---|---|
| More than one SQL statement | NOT_SUPPORTED |
| Any statement other than SELECT (no DDL or DML) | NOT_SUPPORTED |
| WITH / common table expressions | NOT_SUPPORTED |
| Subquery or derived table in FROM | NOT_SUPPORTED |
| Multi-way or nested join | NOT_SUPPORTED |
| Top-level ORDER BY | NOT_SUPPORTED |
| ROLLUP / CUBE / GROUPING SETS | NOT_SUPPORTED |
| DISTINCT aggregate | NOT_SUPPORTED |
| FILTER clause on an aggregate | NOT_SUPPORTED |
| ORDER BY inside an aggregate | NOT_SUPPORTED |
| LIMIT with OFFSET or a non-constant limit | NOT_SUPPORTED |
| Bare-number window interval | NOT_SUPPORTED |
| Order-dependent aggregate over HOP | NOT_SUPPORTED |
| Unbounded or holistic aggregate over SESSION | NOT_SUPPORTED |
| window_start used in WHERE | BIND_ERROR |
| Window over a non-TIMESTAMP column | BIND_ERROR |
| Non-deterministic function (random, uuid, now, ...) | DETERMINISM_NOT_SUPPORTED |
| Aggregate with no durable (checkpointable) codec | DURABILITY_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.
Continuous views
A live GROUP BY with no window is a materialized view, republishing the groups that changed as an upsert changelog keyed by the group tuple, refreshed on --emit-every.
One-shot query
ubik --from <source> "<SQL>", the primary invocation, its sources and sinks, output formats, and every flag the CLI forwards to the engine.