cloudparts

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 pyvelox Python 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
Data model
Columnar Vectors close to Apache Arrow, with string views and run-length and constant encodings
Query language
None: it runs optimized plan fragments handed over by a host engine
Storage format
Reads Parquet, ORC/DWRF and Nimble files from S3, HDFS, GCS and Azure
Written in
C++
Ways to run it
A library inside Presto C++ workers, Apache Gluten and other engines

Alternatives

What all query engines have in common →Compare side by side →

How it fits with other technologies

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 workers

A 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 plugin

Created 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 Meta

By 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

  1. 2020

    Meta starts Velox and the Prestissimo project to replace Presto’s Java workers

  2. 2022

    Open-sourced; VLDB paper reports Prestissimo running the same workload on a third of the servers

  3. 2023

    Meta formally announces Velox in March, with Ahana, Intel and Voltron Data as collaborators

  4. 2024

    Meta reports that Arrow has added StringView, ListView and run-end encoding, inspired by Velox Vectors

  5. 2026

    Apache Gluten, which runs Spark on Velox, becomes a top-level Apache project in March

Sources8 · facts checked 11 October 2026

Improve this page on GitHub