
Velox
Meta’s open-source C++ execution engine library: it takes an already-optimized query plan and runs it with vectorized operators, and it is the engine inside Presto’s C++ workers (Prestissimo) and Apache Gluten’s native Spark.
- What it is
- Query engines
- Type
- Open source
- Made by
- Meta
- License
- Apache 2.0
- Facts checked
- 11 October 2026
What it is
Every query engine has the same parts: a language front end, an optimizer, a runtime that spreads tasks over machines, and an execution engine that does the actual work on one machine. Velox is only that last part, as a library. It has no SQL parser, no dataframe API and no optimizer. A host engine such as Presto or Spark plans the query and hands Velox a plan fragment; Velox runs it with the CPU and memory of the local node. Inside are a type system with nested types, columnar Vectors, a vectorized expression evaluator, Presto- and Spark-compatible function packages, operators (scans, writes, filters, projections, hash, merge and nested-loop joins, aggregations, sorts, exchanges), support for the Parquet, ORC/DWRF and Meta’s Nimble file formats, storage adapters for S3, HDFS, GCS and Azure (ABFS), the Presto and Spark wire formats, and memory management with spilling and caching.
Velox Vectors follow the Apache Arrow layout but add 16-byte string views, out-of-order writes for conditionals, and run-length and constant encodings, so filters and joins can often work on encoded data without decoding it. Velox also adapts as it runs: it tracks how selective each filter is and reorders them, and learns which columns to prefetch. Meta started it in late 2020, open-sourced it in 2022, and develops it with IBM, Intel, Voltron Data, Microsoft, ByteDance and others. It is not part of a foundation: the code lives in Meta’s facebookincubator GitHub organization under a project leadership council of individuals. There are no numbered releases; the repository is tagged by date, most recently v2026.10.02.00.
Why teams pick it
- Large measured gains from replacing JVM execution: in Meta’s VLDB 2022 paper, Prestissimo ran TPC-H Q1 8.4x faster than Presto Java, replayed production queries about 6–7x faster on average, and carried the same workload on 20 servers instead of 60
- One engine, consistent semantics: Presto and Spark function packages give the same results across systems, where Meta once counted at least 12 different
substr()implementations - Built to be extended: custom types, scalar, aggregate and window functions, operators, file formats, storage adapters and network serializers
- Works on encoded data (dictionary, run-length, constant) and delays decoding, which makes filters, joins and unnests over complex types cheaper
Watch out for
- Not for end users: without Presto, Gluten or your own planner on top there is no way to submit SQL, and plans must arrive fully optimized
- No versioned releases, only date-stamped tags, and building it means a C++ toolchain (GCC 11 or Clang 15 or newer) and a long list of dependencies; the
pyveloxPython package was last published in April 2025 - Its vectors differ from Arrow in places, so handing data to Arrow tools is zero-copy only when the layouts match; otherwise Velox rearranges the data
- Meta leads it outside any foundation, so its direction depends on Meta and the companies working with it
Alternatives
What all query engines have in common →
Amazon AthenaAWSAWS’s serverless SQL engine for data in S3: no cluster to run, and on-demand queries cost $5 per TB scanned.
Apache CalciteOpen sourceA Java framework with everything a database needs to understand a query (SQL parser, validator, relational algebra and a rule-based, cost-based optimizer) but no storage of its own, which Hive, Flink, Druid, Dremio, Beam and many other systems embed as their SQL front end and planner.
Apache ZeppelinOpen sourceA self-hosted web notebook where each paragraph runs through an interpreter: Spark, Flink, JDBC, Python and more. Maintained, but behind Jupyter and Databricks in reach.
GizmoSQLOpen sourceA database server that wraps DuckDB (or SQLite) and serves it to many clients over Arrow Flight SQL, with TLS and authentication.
HotdataCommercialA managed SQL engine for AI agents, built in Rust on Apache DataFusion and Arrow: each agent gets short-lived “instant databases” to load data into, then runs read-only SQL, vector, full-text and geospatial queries over an HTTP API or CLI.
IbisOpen sourceA Python dataframe API that compiles to SQL, so the same code runs on DuckDB on a laptop and on BigQuery, Snowflake, PostgreSQL or more than 20 other engines.
Spice.ai OSSOpen sourceA single-binary SQL engine in Rust, built on DataFusion and Arrow, that federates queries across databases, warehouses and lakes, keeps hot datasets in a local accelerated copy, and adds search and LLM APIs on top.How it fits with other technologies
What Velox uses
- Veloxis written inC++
- Veloxruns the C++ workers (Prestissimo) ofPresto (PrestoDB)
- Veloxruns queries, through Apache Gluten, forApache Spark
- Veloxconverts its vectors to and fromApache Arrow
- Veloxreads and writesApache Parquet
- VeloxreadsApache ORC
- Veloxreads and writes files inAmazon S3
- Veloxreads and writes files inGoogle Cloud Storage
- Veloxreads and writes files inAzure Blob Storage
Build a plan by hand and run it on Velox with pyvelox (TPC-H rows generated in memory) · python
# pip install pyvelox==0.2.0 (Python 3.12, macOS arm64)
from pyvelox.plan_builder import PlanBuilder
from pyvelox.runner import LocalRunner, register_tpch
register_tpch("tpch") # a connector that generates TPC-H rows in memory
# Velox takes an already-optimized plan: there is no SQL parser or optimizer
plan = (
PlanBuilder()
.tpch_gen(table_name="lineitem", connector_id="tpch", scale_factor=0.1,
columns=["l_returnflag", "l_quantity", "l_extendedprice", "l_shipdate"])
.filter("l_shipdate <= DATE '1998-09-02'")
.aggregate(grouping_keys=["l_returnflag"],
aggregations=["sum(l_quantity) AS qty", "avg(l_extendedprice) AS avg_price",
"count(1) AS line_items"])
.order_by(["l_returnflag"])
)
runner = LocalRunner(plan.get_plan_node())
for batch in runner.execute():
for i in range(batch.size()):
print([batch.child_at(c)[i] for c in range(4)])
# ['A', '3774200', '38294.602618376986', '147790']
# ['N', '7554554', '38288.665318783744', '295765']
# ['R', '3785523', '38276.82187139619', '148301']Engines that run on Velox#
Prestissimo (Presto C++)
Presto workersA C++ worker that speaks Presto’s HTTP protocol, takes plan fragments from the usual Java coordinator, translates them into Velox plans and runs them. No JVM or garbage collector on the workers. Meta started it in 2020.
Apache Gluten
Spark pluginCreated by Intel. Passes Spark plans to a native engine (Velox or ClickHouse) through a JNI interface built on Arrow and Substrait. Meta reported about 3x efficiency gains on benchmarks. A top-level Apache project since March 2026.
Meta’s internal systems
inside MetaBy 2024 Velox was in different stages of integration with more than 10 data systems at Meta, including stream processing, data ingestion and ML feature engineering.
See it in a real stack
No architecture uses Velox yet. Drop it into the playground and wire it up yourself.Open playground →Where it came from2020–2026
By 2020 Meta ran dozens of specialized data engines for batch ETL, interactive SQL, streaming, ingestion and machine learning. They shared almost no code, were written in different languages and behaved differently: an informal survey found at least 12 implementations of substr(), with different indexing, null handling and errors. Pedro Pedreira and colleagues noticed that the engines differed mostly in their front ends, optimizers and runtimes, while their execution engines were much alike. In late 2020 Meta started writing one execution layer as a reusable, extensible C++ library, so each optimization would be built once and every engine would get it.
The first full integration was Prestissimo, which replaced Presto’s Java workers with C++ ones; in the VLDB 2022 paper it handled the same production workload with a third of the servers. Meta open-sourced Velox in 2022 and announced it publicly in March 2023, with Ahana, Intel and Voltron Data as key collaborators. Intel built Gluten to run Spark on Velox. Velox’s own vector layout had diverged from Apache Arrow, which hurt interoperability, so Meta and Voltron Data worked with the Arrow community for a year until Arrow added StringView, ListView and run-end encoding, all inspired by Velox Vectors.
Why it’s built this way
- Only the execution engine, with no parser or optimizer
- The front end and optimizer are what make each engine specialized; the execution layer was the duplicated part. Taking an optimized plan as input lets Presto, Spark, streaming and ML systems all share it.
- Extend Arrow instead of adopting it unchanged
- Inline string prefixes, out-of-order writes and extra encodings sped up filters, conditionals and joins. The cost was conversion at the boundary, which Meta later reduced by getting similar layouts added to Arrow itself.
- Function packages per SQL dialect
- Engines need their own semantics (0- or 1-based indexes, null handling, errors), so Velox ships Presto and Spark function sets instead of one generic set.
- Vectorization and adaptivity before code generation
- Velox leans on tight batch-at-a-time loops and on learning while it runs (reordering filters, prefetching columns). The 2022 paper still called code generation experimental, worth it only where the gains outweigh compile time.
Timeline
- 2020
Meta starts Velox and the Prestissimo project to replace Presto’s Java workers
- 2022
Open-sourced; VLDB paper reports Prestissimo running the same workload on a third of the servers
- 2023
Meta formally announces Velox in March, with Ahana, Intel and Voltron Data as collaborators
- 2024
Meta reports that Arrow has added StringView, ListView and run-end encoding, inspired by Velox Vectors
- 2026
Apache Gluten, which runs Spark on Velox, becomes a top-level Apache project in March
- Pedreira et al.: Velox, Meta’s Unified Execution Engine (PVLDB 15(12), 2022)
- Engineering at Meta: Introducing Velox, an open source unified execution engine (9 March 2023)
- Engineering at Meta: Composable data management at Meta (22 May 2024; created late 2020, open source 2022, Arrow alignment)
- ASF: Apache Gluten and Apache Polaris become top-level projects (5 March 2026)
Sources8 · facts checked 11 October 2026
- GitHub: facebookincubator/velox README (components, partners, compilers, Apache 2.0)
- GitHub: facebookincubator/velox tags (date-stamped, latest v2026.10.02.00)
- Pedreira et al.: Velox, Meta’s Unified Execution Engine (VLDB 2022): Arrow differences, Prestissimo results, codegen
- Engineering at Meta: Introducing Velox (March 2023): components, runtime optimizations, Gluten
- Engineering at Meta: Composable data management at Meta (May 2024): 10+ systems, Gluten 3x, Arrow convergence
- Velox docs: Technical governance (project leadership council, component maintainers)
- ASF: Apache Gluten becomes a top-level project (5 March 2026)
- PyPI: pyvelox 0.2.0 (15 April 2025)