[sup] Parameters: forward natively server-side, else strict {name:Type} renderer + parity test
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- sql, typescript
- Lĩnh vực
- backend-api-design, databases
Hướng nghiên cứu
Bắt đầu với runQuery và đường dẫn yêu cầu /api/cluster/{id}/query, sau đó xem xét core/param-serialize.ts và occurrence scanner hiện có. Trước tiên, ghi lại liệu native forwarding có khả dụng hay không; nếu không, hãy triển khai strict renderer được chỉ định và kiểm tra checklist chấp nhận, bao gồm tính tương đương của kết quả, các kiểu và toTypeName() so với hành vi param_* native.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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().
- Ngôn ngữ chính
- TypeScript
- Star
- 8
- Fork
- 2
- Merge trung bình
- 1 giờ 34 phút
- Pull request đã merge (30 ngày)
- 6
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Altinity/altinity-sql-browser
-
inbox
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Altinity/altinity-sql-browser#605 ·
-
inbox
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Altinity/altinity-sql-browser#509 ·
-
inbox
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Altinity/altinity-sql-browser#489 ·
-
flamegraph Đang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Altinity/altinity-sql-browser#684 ·
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
Altinity/altinity-sql-browser#680 · 2 bình luận ·
Tất cả issue của Altinity/altinity-sql-browser
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
bcgov/bc-wallet-mobile#4761 · 1 bình luận ·
-
external-issue to-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
area-deployment area-integrations triage:bot-seen
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 86/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100