Wvlet Engine
The Wvlet engine is an in-process columnar query engine that executes compiled Wvlet plans directly, with no SQL generation and no external database. It is the default engine of wvlet run, wv, wvlet build, and wvlet flow run.
Where it runs
The engine is written in Scala and built from one codebase for every platform, with pure-Scala Parquet and Iceberg readers and no native libraries:
- JVM: the
wvletandwvcommands from Homebrew or a release package (Installation). - Node.js:
wvlet runfrom the npm package@wvlet/cli. - Native binary: the Scala Native build of the CLI.
- Browser: the Playground runs the engine compiled to JavaScript.
- GPU (experimental): an example module offloads joins and aggregations through cudf; see GPU Executor.
What it supports
- Queries over files and registered tables: filters, projections, joins (including ASOF joins), aggregations, window functions, subqueries,
pivot,unnest, lambdas, andshowcommands. - All 22 TPC-H and 99 TPC-DS queries, with rows checked against DuckDB in the engine's conformance tests, and built-in TPC-H and TPC-DS catalogs to try them.
- Reading Parquet, Iceberg, JSON, and CSV data, including Hive-partitioned Parquet folders.
save to,append to, anddeleteon tables, andsave to/append toParquet, CSV, JSON files and Iceberg tables.create table,drop table,truncate,create/drop schema,reshape(or SQLalter table), andrename table.- Persistent tables as Iceberg tables in a warehouse folder; see Tables and Files.
Not supported yet, reported as errors: views, update, execute, table functions such as read_csv(...), and some engine-specific functions. Map values run but can return results that differ from DuckDB. Use -t duckdb (or a DuckDB profile) for these.
Usage
The engine is the default of wvlet run and wv when neither -t nor --profile is given (-t wvlet selects it explicitly):
# Query a local file
wvlet run "from 'data/orders.parquet' where o_totalprice > 1000 limit 10"
# Run a query file
wvlet run -f report.wv
wvlet build and wvlet flow run <flow> run model builds and flow stages on the engine by default. Their tables persist in the project's target/warehouse unless the profile's wvlet connector sets a warehouse; see Engine Support.
With a Trino or Snowflake profile, a query that reads only local files also runs on the engine.
Relative file paths resolve against the working folder (-w).
-t wvlet without --host runs the in-process engine; with --host it connects to a remote wvlet server instead.
Functions
Queries on the engine can call the standard library functions and the functions the engine implements. The engine has its own wvlet dialect context: it runs the DuckDB variants of the standard library (def ... in duckdb), and an engine-only variant can be written as def ... in wvlet. A function it lacks, such as DuckDB's array_unique, fails at compile time instead of at run time:
[FUNCTION_NOT_FOUND] Function array_unique is not supported by the wvlet engine. Use a standard library function, or run the query on the DuckDB connector (a profile with type: duckdb)
When the name is another engine's function that a standard library function covers, the message names that function instead (for example, count_approx_distinct for Trino's approx_distinct). Calls inside sql"..." fragments are not checked until the engine runs them.
Mixing with other connectors
A profile can hold a wvlet connector next to other engines; switch to it with use wvlet (see Working with Multiple Connectors).
Next
- Tables and Files: register tables, use the built-in TPC-H and TPC-DS catalogs, save results, and persist tables as Iceberg.
- Performance: TPC-H and TPC-DS at scale factor 10 against DuckDB.
- GPU Executor: the experimental cudf offload and its DGX Spark results.
- Embedding: running the engine inside your application (planned).