Deduplicate repeated footer layout subtrees and reuse their scan rewrites

Ouverte
#12,213 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
25/100
Type d'issue
Fonctionnalité
Clarté
Clairement spécifiée
Activité
Active
Stack technique
rust
Domaine
data, performance

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
Rust
Étoiles
3.2k
Forks
239
Merge moyen
1 j 4 h
PR mergées (30 j)
684

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de vortex-data/vortex

Toutes les issues de vortex-data/vortex

Issues similaires

Plus d'issues Rust

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.