Deduplicate repeated footer layout subtrees and reuse their scan rewrites

Offen
#12,213 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
25/100
Issue-Typ
Feature
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
rust
Bereich
data, performance

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
Rust
Sterne
3.2k
Forks
239
Ø Merge
1 T. 4 Std.
Gemergte PRs (30 T.)
684

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus vortex-data/vortex

Alle Issues in vortex-data/vortex

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.