Spiral SQL is parsed with a dialect compatible with common analytical SQL, then bound into Spiral’s relation plan. The current user-facing surface is a focused subset for local inspection, data selection, batch shaping, and extension work.
SELECTqueries over one table or one table function.VALUESqueries.- Projection, filtering, grouping, aggregate functions,
HAVING,ORDER BY,LIMIT, andOFFSET. - Scalar and aggregate function calls through the SPQL function catalog, including named arguments.
- Built-in table functions for metadata, local Vortex files, Arrow IPC files, Parquet files, and Hugging Face dataset handles.
EXPLAINandEXPLAIN ANALYZE.CREATE VIEWand materializedCREATE TABLE name AS querycatalog entries.COPY TOlocal Vortex and Arrow IPC files.SET tracediagnostics.- REPL-local
CREATE TABLE name (...)andINSERTfor in-memory tables.
Unsupported syntax should fail with an explicit error rather than silently changing query semantics.
Example query
SELECT
category,
count(*) AS rows,
sum(score) AS total_score
FROM examples
WHERE active IS NOT NULL
GROUP BY category
HAVING count(*) > 10
ORDER BY total_score DESC
LIMIT 20;Query paths
Read the supported query shape for projection, filters, grouping, ordering, limits, and table functions.
Use scalar, aggregate, metadata, file, and extension functions registered in the SPQL catalog.
Create views and materialized tables, copy query output, and configure trace diagnostics.
List available table functions, scalar functions, aggregate functions, extension types, and copy formats.
Check exactly what the SQL binder accepts, rejects, and lowers today.
Query forms
Spiral supports standard SELECT:
SELECT id, score
FROM events
WHERE score > 0.8
LIMIT 10;It also parses DuckDB-style FROM-first queries:
FROM events
SELECT id, score
WHERE score > 0.8
LIMIT 10;Use the standard form in docs and examples unless FROM-first syntax is the
point of the example.
Namespaces
Scalar and aggregate functions resolve through the engine callable catalog.
Unqualified scalar calls are mapped to the spql. namespace when possible:
SELECT add(a, b) FROM t;
SELECT spql.add(a, b) FROM t;Table and source functions use their full registered id:
SELECT *
FROM spql.meta.table_functions();
SELECT *
FROM spql.meta.source_functions();
SELECT *
FROM spql.parquet.read('./scores.parquet');Use SQL support when you need an exact current implementation matrix.