docs: the section 8 parallel Scan example differs from the statement scan_impl emits, and its portability note repeats two lines

オープン 初心者向け
#1,413 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
88/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
postgresql, rust, sql

調査の方向性

docs/design/04-component-storage.md の第8節、776行目から804行目までから始め、そのセグメント2のSQLを、crates/storage-postgres/src/data/query_scan.rs の scan_impl が生成する述語とORDER BY句と比較してください。例で出力された述語と COLLATE "C" による並び順が使われており、移植性に関する注記の繰り返し行が削除されていれば完了です。テスト名は指定されていないため、レンダリングされたMarkdownを目視で確認してください。

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

説明

docs/design/04-component-storage.md, section 8, "Parallel Scan Segment Assignment" (lines 776 to 804 on main at 44cd43667), shows this statement for segment 2 of 4:

SELECT item_data FROM _ddb_Users
WHERE (hashtext(pk)::bigint & x'7FFFFFFF'::bigint) % 4 = 2
ORDER BY pk, sk_s
LIMIT $limit;

scan_impl in crates/storage-postgres/src/data/query_scan.rs emits (hashtext(pk)::bigint & 2147483647) % 4 = 2 for the segment predicate, and ORDER BY pk, sk_s COLLATE "C" for a base table with a string sort key. The mask has the same value in both forms, and the COLLATE "C" is the byte order the doc describes in section 5.1. The texts differ.

The portability note that follows ends with two lines that repeat the end of the sentence before them:

> hash function in the `core` crate (e.g., CRC32 of the partition key bytes)
> that all backends use, and pass the pre-computed segment filter to the
> storage backend.
> crate (e.g., CRC32 of the partition key bytes) that all backends use, and pass the pre-computed segment filter to the
> storage backend.

Proposed change: copy the emitted predicate and ORDER BY into the example, and remove the two repeated lines.

主要言語
Rust
スター
517
フォーク
60
平均マージ
3日 21時間
マージ済み PR(30日)
116

環境構築

はじめの一歩

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

ExtendDB/extenddb のほかの issue

ExtendDB/extenddb の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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