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

Abierto Apto para principiantes
#1,413 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
1/5
Tiempo estimado
Menos de una hora
Aptitud para principiantes
88/100
Tipo de issue
Documentación
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
postgresql, rust, sql

Línea de trabajo

Empieza con la sección 8 de docs/design/04-component-storage.md, líneas 776 a 804, y compara su SQL del segmento 2 con el predicado y la cláusula ORDER BY que construye scan_impl en crates/storage-postgres/src/data/query_scan.rs. Se considera terminado cuando el ejemplo usa el predicado emitido y el orden COLLATE "C", y se eliminan las líneas repetidas de la nota de portabilidad. No se nombra ninguna prueba, así que revisa a ojo el Markdown renderizado.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Rust
Estrellas
517
Forks
60
Merge medio
3 d 21 h
PR fusionados (30 d)
116

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de ExtendDB/extenddb

Todos los issues de ExtendDB/extenddb

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.