Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Meta Engineering 8 min read Announcement hardMaster

Introducing Velox: An open source unified execution engine

Velox is Meta's open source C++ execution engine that unifies the data-plane components (expression evaluation, aggregation, joins, sorting, I/O, resource management) shared by engines like Presto, Spark and PyTorch's TorchArrow. It takes an optimized plan as input and runs it on a single host. It uses an Arrow-compatible columnar vector layout with multiple encodings, vectorized expression evaluation with dictionary peeling and common subexpression elimination, and runtime optimizations such as dynamic filter pushdown and adaptive prefetching. Replacing Presto Java workers with the Velox-based Prestissimo gave up to an order of magnitude speedup on CPU-bound TPC-H queries and 6-7x average speedups on production interactive workloads. Spark integrates Velox through Intel's Gluten via JNI using Arrow and Substrait.

Assumes: query execution enginescolumnar data formatsSQL query plans

Related posts

  • Composable data management at Meta

    Meta Engineering easyNovice

    Meta has been decomposing its many monolithic data engines (ETL, interactive, streaming, ML preprocessing) into reusable components: language frontend, IR, optimizer, execution library and runtime. Velox, its open-source engine- and dialect-agnostic execution library, is the centerpiece. It uses columnar/vectorized execution, compressed execution via encodings, lazy materialization and adaptive filter/join ordering, and has delivered 3-10x efficiency gains in Presto (Prestissimo) and about 3x in Spark via Gluten. To restore interoperability, Meta upstreamed StringView, ListView and Run-End-Encoding into Apache Arrow. Next steps are the Nimble file format for wide AI/ML tables and hardware-accelerated data systems.

  • Aligning Velox and Apache Arrow: Towards composable data management

    Meta Engineering hardMaster

    Apache Arrow 15 adds three columnar layouts derived from Meta's Velox Vectors: StringView, ListView and Run-End-Encoding (REE). The goal is zero-copy interchange between Velox and the wider Arrow ecosystem. StringView uses 16-byte view objects that inline strings up to 12 bytes and keep a 4-byte prefix otherwise, which enables fail-fast comparisons, zero-copy trim/substr and out-of-order writes. ListView stores both lengths and offsets so containers can be written out of order for vectorized conditionals and sliced zero-copy. REE stores run end offsets rather than run lengths for better random access, and it also covers constant encoding.

  • ClickHouse and Parquet: A foundation for fast Lakehouse analytics

    ClickHouse mediumAdept

    ClickHouse queries Parquet files directly, without ingestion, through a format-specific reader that currently parses via Arrow and then converts into ClickHouse's in-memory format. Performance rests on two things: parallelism and I/O reduction. Parallelism comes from prefetch threads, parsing threads, file streams and processing lanes. File streams are computed as min(max_threads, num_files), and parsing threads per file as max(max_parsing_threads / num_files, 1), with EXPLAIN Pipeline examples showing the resulting plans. A third native reader, "Yet Another Parquet Reader", is in development to drop the Arrow layer and improve parallelism and I/O efficiency, and the current reader serves as the benchmark baseline.

  • How we extended Apache DataFusion to execute one query across many machines

    Datadog Engineering hardMaster

    Datadog built Distributed DataFusion, an open source Rust framework that extends Apache DataFusion's physical execution model so a single interactive query can run across many machines while keeping latency roughly flat as data grows. It reuses DataFusion's partitioning model and adds stages, tasks and network nodes such as NetworkCoalesce and NetworkShuffle. With these it distributes sorts, hash-partitioned aggregations, partitioned and broadcast joins, unions and tree-reduce aggregations, all as streaming execution without intermediate materialization. Datadog chose to extend DataFusion over adopting ClickHouse, Spark, Ballista or Trino because it needed extensibility, low latency, and Arrow/Substrait integration. Some heavy production queries now run up to 10× faster at the same total cost, and the planner keeps small queries on one node to avoid network, serialization and coordination overhead.

  • AI for Systems: Using LLMs to Optimize Database Query Execution

    Together AI hardMaster

    LLMs can act as semantic cardinality estimators that fix join-order mistakes in database physical plans without modifying the engine. DBPlanBench exposes Apache DataFusion's physical operator graph to an LLM through a compact JSON serialization roughly 10x smaller than the native form. GPT-5 proposes localized RFC 6902 JSON Patch edits, such as swapping join sides, and an evolutionary loop keeps only the patches that cut latency. On generated TPC-H and TPC-DS workloads, median speedups were 1.1–1.2x, with up to 4.78x and a drop from 3.3 GB to 411 MB of hash-build memory on one multi-join query. Plans optimized on a small SF3 database transferred to SF10 with similar gains.

The quest for software engineering knowledge.

Look:
Layout: