A Parquet library written in Vx, for reading and, later, writing Parquet files. Reads are meant to run the same scan on the CPU and the Apple GPU.
Status: early and incomplete. Vinyl can parse a Parquet file's metadata, plan a scan, and collect a projected, filtered table of simple columns on the CPU. It cannot yet stream batches or run on the GPU. Nothing here is ready for use.
- Fast Parquet reads for full scans, selective reads and small files, on CPU and GPU.
- Parquet writing, once reading is in place.
- A small API: choose columns, add a filter, then collect a table or stream bounded batches.
- One scan API for every engine. Apple GPU (Metal) comes first; other GPUs come later.
- Safe on untrusted input. Malformed files and unsupported features give clear errors, and a forced GPU scan reports what it cannot do instead of quietly falling back to the CPU.
- A workload that drives Vx. When Vinyl finds a gap in the language, compiler or standard library, the gap is fixed in Vx or logged in docs/FRICTION.md, rather than hidden in foreign code.
The intended API (the syntax is not settled):
scan = parquet.scan("measurements.parquet")
.select(["sensor_id", "temperature"])
.filter(col("temperature") > 20.0)
scan.schema() // column names and types
scan.explain(engine = apple_gpu) // the planned work
scan.collect(engine = cpu) // a host table
scan.batches(engine = apple_gpu, memory_budget = budget)
The first milestone reads local files with required, flat INT32 and FLOAT columns, PLAIN
encoding, uncompressed V1 data pages, and any number of pages and row groups, with column
selection and one numeric comparison filter.
| Area | State |
|---|---|
| File input, footer, Thrift compact protocol | Done |
| Schema, row group, column chunk and page metadata | Done |
scan, select, filter, schema(), plan, explain() |
Done |
| Refusing unsupported columns that a scan reads | Done |
Decoding a column chunk's PLAIN pages on CPU |
Done |
Row selection and collect on CPU, into Arrow-layout host arrays |
Done |
Apple GPU execution: decode, filter and collect into device arrays |
Done (docs/ENGINES.md) |
batches under a memory budget, on CPU and Apple GPU |
Done (docs/BATCHES.md) |
| Arrow C Data Interface export | Not started |
| Benchmarks against pyarrow and Polars | First data-read table (docs/BENCHMARKS.md) |
Later milestones add more types, nullable columns, dictionaries and V2 pages; then compression; then strings, more encodings and logical types; then statistics, page pruning and parallel scheduling. Writing follows reading. docs/TODO.md tracks every item.
Vinyl is built with a pinned revision of the Vx compiler (vx-revision.txt). One build of
that revision is shared with the other projects that pin it, in $VX_SNAPSHOT (default
~/dev/vx-snapshot, which has its own vx-revision.txt and build.sh):
$VX_SNAPSHOT/build.sh # once, and after the snapshot's vx-revision.txt changes
scripts/test-all.sh # Vx tests, the parquet-testing corpus walk, and Python fixture tests
scripts/test-all.sh --fast # the flat code generator only
scripts/test-gpu.sh # the Apple GPU driver's tests, on Metal and on its CPU copyscripts/vxc runs the compiler. scripts/vx-dir.sh chooses the build, and prints it when run:
$VX_DIR, when it is set.- the snapshot, when it was built at the revision in this repository's
vx-revision.txt. .vx/in this repository.scripts/build-vx.shclones and builds the pinned Vx there (from$VX_REPO, default~/dev/vx). Use it when the snapshot is missing or pins another revision.
When you move the pin, move the snapshot's pin and every project's pin together; a project whose pin differs from the snapshot needs its own build.
The Python tests need pyarrow 26.0.1, through uv or $VINYL_PYTHON. The Apple GPU tests
(scripts/test-gpu.sh) and probe (scripts/probe-apple-gpu.sh) run separately and need Apple
silicon.
| Path | Contents |
|---|---|
src/ |
The reading code: input, footer, Thrift, metadata, support checks, scan, decode |
tests/ |
Vx tests, the corpus manifest and the Python fixture tests |
fixtures/ |
Small generated Parquet files with reference output |
probes/, repros/ |
Vx feature probes, and minimal reproductions of Vx issues |
benchmarks/ |
Micro-benchmarks for footer parsing and decoding, and the data-read benchmarks against pyarrow and Polars |
docs/ |
Architecture, engines, decode, Thrift, batches, benchmarks, plan, friction log |
Vinyl is licensed under the Apache License, Version 2.0.