Scripts2026年7月21日·1 分钟阅读

Velox — Unified Vectorized Execution Engine by Meta

High-performance C++ vectorized database execution library designed as a shared backend for data processing systems like Presto, Spark, and PyTorch.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Velox Overview
直接安装命令
npx -y tokrepo@latest install ceb66b2f-84e1-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

Velox is an open-source C++ library from Meta that provides a unified, high-performance vectorized execution engine for data processing. Instead of every query engine rebuilding the same operators, Velox offers a shared set of reusable components — type system, vector buffers, expression evaluation, and operators — that any data system can plug into.

What Velox Does

  • Provides a columnar in-memory data format with Apache Arrow compatibility
  • Implements vectorized expression evaluation for SQL-like computations
  • Offers a library of common operators: filter, project, join, aggregate, sort, and exchange
  • Supports adaptive query execution with runtime filter pushdown and dynamic partition pruning
  • Enables extensibility through user-defined functions, types, and connectors

Architecture Overview

Velox operates on columnar vectors using a pull-based iterator model where operators request batches from their children. The expression evaluator compiles SQL expressions into a tree of vector functions that process entire columns at once. Memory management uses arena allocation with spill-to-disk support. Connectors abstract data sources (Hive, Iceberg, S3) behind a unified scan interface.

Self-Hosting & Configuration

  • Build from source on Linux or macOS using make with dependency setup scripts provided
  • Integrate as a C++ library by linking against libvelox in your query engine
  • Configure memory limits, spill directories, and thread pool sizes programmatically
  • Register custom scalar and aggregate functions via the function registry API
  • Use the built-in benchmarking framework to measure operator performance

Key Features

  • Vectorized processing delivers 3-10x speedups over row-at-a-time execution
  • Adaptive execution reorders and prunes operations based on runtime statistics
  • Shared codebase used by Presto, Spark (Gluten), and PyTorch (TorchArrow) at Meta
  • Codegen support for JIT-compiling hot expressions
  • Comprehensive function library covering 300+ Presto-compatible SQL functions

Comparison with Similar Tools

  • Apache DataFusion — Rust-based query engine; Velox is a C++ library designed for embedding into existing engines
  • Apache Arrow Acero — Arrow's built-in execution engine; Velox offers more advanced adaptive execution
  • DuckDB — Standalone analytical database; Velox is a composable library, not a complete database
  • ClickHouse — Full OLAP database; Velox provides building blocks rather than a turnkey solution

FAQ

Q: Is Velox a database? A: No. Velox is an execution library. Query engines like Presto and Spark use Velox as their compute backend.

Q: What languages can use Velox? A: Velox is a C++ library with Python bindings (PyVelox) for experimentation and testing.

Q: Does Velox support GPU acceleration? A: Not natively. Velox focuses on CPU vectorization, though community efforts explore GPU integration.

Q: Who uses Velox in production? A: Meta uses Velox in its Presto deployment. The Gluten project brings Velox to Apache Spark.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产