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

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

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust, sqlite
領域
databases

調査の方向性

crates/core/src/partiql/parser/statements.rs の projection_path を読み、トークン長の処理を crates/core/src/partiql/lexer.rs および parser.rs と比較してください。関連する parser のテストを探して実行してください。issue ではテストファイルが指定されていません。引用符で囲まれた名前("size" など)が DynamoDB と同じく位置の長さ 6 を報告し、両側が引き続き ValidationException を返す状態を完了とします。

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

説明

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.

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

環境構築

はじめの一歩

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

ExtendDB/extenddb のほかの issue

ExtendDB/extenddb の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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