[sup] Parameters: forward natively server-side, else strict {name:Type} renderer + parity test
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- sql, typescript
調査の方向性
runQuery と /api/cluster/{id}/query リクエストパスから始め、次に core/param-serialize.ts と既存の occurrence scanner を確認します。まず native forwarding が利用可能かどうかを記録してください。利用できない場合は、指定された strict renderer を実装し、結果、型、および toTypeName() が native param_* の動作と一致することを含め、受け入れチェックリストを検証してください。
索引モデルが issue の本文から書いたものです。
説明
Part of #352. Native param_* are not forwarded by the proxy (verified UNKNOWN_QUERY_PARAMETER).
Preferred: forward params server-side (ACM-side ask)
Given tight ACM integration is a plus, the cleanest fix is to have /api/cluster/{id}/query accept a structured param map (and settings) and bind them natively in ClickHouse — no client-side SQL rewriting, full type parity. Raise with the ACM team first; if accepted, this issue reduces to wiring runQuery's params through the request body.
Fallback: strict client-side {name:Type} renderer
If native forwarding isn't available, render typed value placeholders {name:Type} (CH syntax) → SQL literals, typed values only, no free-form/identifier macros. Do not reuse core/param-serialize.ts (it targets the HTTP param_* channel: passes scalar strings raw, treats unknown types as opaque — not inline-SQL-safe or type-equivalent). Instead a separate strict renderTypedSqlExpression:
- explicit allowlist of supported type ASTs (reject unknown);
- parse compound values into structured values (never trust free-form strings);
- quote every textual component; emit explicit casts where CH semantics need them (e.g.
{x:UUID}→CAST('…' AS UUID), Date/DateTime64/Decimal/Enum/IPv4/6/large-int); - reuse the existing occurrence scanner's exact spans (ignores placeholders in literals/comments); replace right-to-left.
Acceptance
- Decision recorded: native forwarding vs. client renderer.
- If renderer: allowlisted types render +
CASTwhere needed; unsupported values fail closed. - Parity test: same query+values via native
param_*(public build) vs. this path → identical results, types, andtoTypeName().
- 主要言語
- TypeScript
- スター
- 8
- フォーク
- 2
- 平均マージ
- 1時間 34分
- マージ済み PR(30日)
- 6
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Altinity/altinity-sql-browser のほかの issue
-
inbox
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Altinity/altinity-sql-browser#605 ·
-
inbox
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Altinity/altinity-sql-browser#509 ·
-
inbox
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Altinity/altinity-sql-browser#489 ·
-
flamegraph オープンenhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
Altinity/altinity-sql-browser#684 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
Altinity/altinity-sql-browser#680 · コメント 2 件 ·
Altinity/altinity-sql-browser の issue をすべて見る
似ている issue
-
Type/Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
OpenNSW/nsw-srilanka#497 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
0xMiden/bridge-portal#132 ·
-
react-doctor severity:warning tech-debt
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
digidem/comapeo-cloud-app#403 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100