PartiQL SELECT: a call on a quoted name in the select list gets a position length without the quotes, where DynamoDB counts them

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

Los mantenedores suelen responder en 5 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
82/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
rust, sqlite
Área
databases

Línea de trabajo

Lee crates/core/src/partiql/parser/statements.rs en projection_path y luego compara el tratamiento de la longitud de los tokens con crates/core/src/partiql/lexer.rs y parser.rs. Busca pruebas relevantes del parser y ejecútalas; el issue no menciona ningún archivo de pruebas. Se considera terminado cuando un nombre entre comillas, como "size", indica una longitud de posición de 6, igual que DynamoDB, mientras ambos lados siguen devolviendo ValidationException.

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

Descripción

Both sides refuse a call in the select list with Unexpected path component at <line>:<column>:<length>. For a quoted name, SELECT "size"(a) ..., Amazon DynamoDB gives the length of the name with its quotes, 6 for "size". ExtendDB gives the length without them, 4. Both sides answer ValidationException.

Measured in us-east-1 on 2026-11-16. Each statement went out twice and got the same answer both times. ExecuteStatement on a table <t> keyed on pk S HASH that holds the item {"pk": {"S": "q"}, "a": {"S": "xyz"}}.

Statement DynamoDB ExtendDB
SELECT "size"(a) FROM "<t>" WHERE pk = 'q' Unexpected path component at 1:8:6 Unexpected path component at 1:8:4

A call on an unquoted name, SELECT size(a) ..., was not measured here. Its name has no quotes, so the two counts agree.

ExtendDB answers 1:8:4 on SQLite, measured on 2026-11-17, the only backend measured. The position comes from projection_path (crates/core/src/partiql/parser/statements.rs, line 151), which is the same at origin/main 381c8c78a. It sets root_len to the length of the token's text (lines 159 to 162), and writes the message with it (line 180). For TokenKind::QuotedIdent, that text is the name without its quotes. The lexer gives a quoted name token a length that spans the quotes (crates/core/src/partiql/lexer.rs, lines 235 to 241). span (parser.rs, line 308) uses that length for the other positions in the parser. The engine reports the text once it resolves the table (crates/engine/src/partiql/select.rs, line 167).

Proposed change: in projection_path, use the token's length (self.span()) for the position instead of root_len.

Lenguaje dominante
Rust
Estrellas
517
Forks
60
Merge medio
5 d 14 h
PR fusionados (30 d)
124

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.