Deduplicate repeated footer layout subtrees and reuse their scan rewrites

Aperta
#12,213 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
data, performance

Direzione di ricerca

Start by reviewing the linked measurement prototype in PR #12185 and the existing footer layout encoding and scan planning paths. The issue calls for format design, compatibility and validation rules, indexed bindings, writer selection, benchmarks, and planner reuse measurements. Done means the landing plan is addressed with storage and read performance measured, and planner reuse validated separately.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Motivation

A Vortex footer stores a layout tree. A column with thousands of Flat chunks can repeat the same leaf description thousands of times, even when only the segment ID and row count vary. A file-local template dictionary could reduce footer reads and give the planner a way to rewrite a repeated child once.

Evidence

The measurement prototype and per-dataset results encode the layout with templates and bindings, decode it, and compare every node with the original. Footer savings below assume replacing the layout section with those encoded bytes. They include packed integers and optional row-count runs, and exclude the cost of a random-access index.

Corpus Files Layout bytes saved Whole footer bytes saved
Regular SQL benchmark matrix, inline array metadata enabled 557 12.8% 12.2%
Retained benchmark objects and published fixtures 1,267 11.8% 11.4%
One FineWeb file, inline array metadata disabled (writer default) 1 89.5% 54.1%

In that FineWeb file, 435 of 505 nodes shared one Flat template and 50 shared one dictionary template with two Flat children. Eleven templates described the whole tree. The layout shrank from 15,240 to 1,594 bytes, taking the projected footer from 25,240 to 11,594 bytes. The suite-wide result for default writes is still an open question. Benchmark CI enables inline array metadata, which makes exact metadata matches less common.

Proposed representation

Intern nodes bottom-up using the layout encoding, exact metadata bytes, segment-slot count, and ordered child template IDs as the key. For a homogeneous Chunked layout, store a repeated child template and bind its count per occurrence. Preserve ordered child IDs for mixed layouts. Row counts and segment IDs are per-occurrence bindings. For example, a chunked dictionary column can store the shape Chunked(Repeat(Dict(values=Flat, codes=Flat))) once while each chunk supplies its own values and codes segments.

Landing plan

  • Run the regular SQL matrix with inline metadata disabled. Compare against a control using the same packed bindings with template sharing disabled to isolate the gain from sharing.
  • Design and measure an index for the bindings. A reader should be able to project a late field or seek a late chunk without walking all preceding instances. Include the index, framing, and alignment in the byte comparison.
  • Specify format detection, version compatibility, and validation of template references, repeat counts, and binding bounds. Land reader support first, followed by an opt-in writer that can select the smaller complete representation. Measure footer size, open time, and projected and random-access reads.
  • Evaluate planner reuse separately. Preserve repeated children through lowering and try pushing a bound expression through a repeated child once. Include dtype and rule-specific guards in reuse decisions. Measure rule invocations, allocations, planning time, and result equivalence on a many-chunk scan.

The prototype measures storage today. Planning speedup remains to be measured.

Lingua principale
Rust
Stelle
3.2k
Fork
239
Merge medio
1g 4h
PR unite (30g)
684

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di vortex-data/vortex

Tutte le issue di vortex-data/vortex

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.