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

Đang mở Phù hợp với người mới
#1,413 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
88/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
postgresql, rust, sql
Lĩnh vực
databases, documentation

Hướng nghiên cứu

Bắt đầu từ mục 8 của docs/design/04-component-storage.md, dòng 776 đến 804, và so sánh SQL của đoạn 2 với predicate và mệnh đề ORDER BY mà scan_impl tạo ra trong crates/storage-postgres/src/data/query_scan.rs. Hoàn thành khi ví dụ dùng predicate được tạo ra và thứ tự COLLATE "C", đồng thời các dòng lặp lại của ghi chú về tính khả chuyển được xóa. Không có bài kiểm thử nào được nêu tên, nên hãy kiểm tra bằng mắt phần Markdown đã render.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Rust
Star
517
Fork
60
Merge trung bình
3 ngày 21 giờ
Pull request đã merge (30 ngày)
116

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ExtendDB/extenddb

Tất cả issue của ExtendDB/extenddb

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.