Tracking Issue: Support configuring per-field overrides and multiple zone maps via `ZonedLayoutOptions`

オープン
#12,405 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
20/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust
領域
backend

調査の方向性

This is a tracking issue for the writer API; it points to implementation issues #12424, #10928, and #12380, while #7939 is the parent epic. Read those implementation issues first to find the relevant files, tests, and remaining work. The listed API and behavior describe the target, but this issue itself does not define a standalone change to complete.

索引モデルが issue の本文から書いたものです。

説明

Tracks the writer API for choosing the zone maps of each column.

  • Parent epic: #7939
  • Implementation: #12424 (the writer cuts zones itself), #10928 (API, one zone map per column), #12380 (several zone maps per column)

API

ZonedLayoutOptions describes the zone maps of every column. It is plain data, passed to ZonedStrategy::new(child, stats, options) as before:

pub struct ZonedLayoutOptions {
    /// The zone maps of every column, in the order a reader evaluates them.
    pub zone_maps: Vec<ZoneMapOptions>,
    /// Zone maps for the column at exactly this path, instead of `zone_maps`.
    pub field_overrides: HashMap<FieldPath, Vec<ZoneMapOptions>>,
    pub concurrency: NonZeroUsize,
}

pub struct ZoneMapOptions {
    pub zone_len: NonZeroU32,
    pub aggregates: ZoneMapAggregates,
}

pub enum ZoneMapAggregates {
    Inferred,                              // the pruning aggregates for the column's dtype
    Set(Arc<[AggregateFnRef]>),            // exactly these
    InferredWith(Arc<[AggregateFnRef]>),   // the inferred ones, plus these
}
  • The default is one zone map of 8,192-row zones with inferred aggregates.
  • An override replaces the whole list for the column at exactly that path. An empty list writes no zone map. It does not apply to the columns nested under the path: a zone length counts the rows of the column it is set for, and a struct has no zone maps of its own.
  • The zone maps of a column are a flat list, so the cheapest goes first. Their zone lengths are independent of each other and of how the input is chunked.
  • An aggregate that has no state for a column's dtype is left out for that column.
  • WriteStrategyBuilder::with_zoned(options) sets it for a file. Without it, every column gets one zone map of with_row_block_size rows.

Behaviour

  • One zone map is written as vortex.zoned, as today. Several are written as vortex.zoned.v2, which is in the unstable edition; a write that does not permit it fails.
  • The legacy vortex.stats writer writes one zone map, one zone per input chunk, and fails for several.
  • Breaking: the block_size and aggregate_fns fields of ZonedLayoutOptions are replaced by zone_maps, and a zone length is a NonZeroU32.
主要言語
Rust
スター
3.2k
フォーク
239
平均マージ
1日 4時間
マージ済み PR(30日)
684

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

vortex-data/vortex のほかの issue

vortex-data/vortex の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。