[Bug]: Support ALTER VIEW ... REFRESH syntax added in Trino 477
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- sql, typescript
- Lĩnh vực
- databases
Hướng nghiên cứu
Mở TrinoSql.g4 và đọc rule statement cùng với các định nghĩa view-alteration và từ khóa hiện có. Thêm hỗ trợ cho dạng ALTER VIEW view_name REFRESH, sau đó xác minh rằng parser Trino chấp nhận câu lệnh này mà không có lỗi cú pháp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Version
v4.5.1
Which SQL?
Trino
What happened?
Currently, the Trino SQL parser implementation in this repository is based on an older version of Trino SQL grammar. As specified in the grammar file comment:
* current version 450(https://github.com/DTStack/dt-sql-parser/blob/main/src/grammar/trino/TrinoSql.g4#L18C4-L18C23)
Because of this, the parser lacks support for several new DDL statements introduced in later versions of Trino. Specifically, trying to validate or parse the ALTER VIEW ... REFRESH statement results in a syntax error.
TrinoSql.g4 grammar can be updated to support the ALTER VIEW view_name REFRESH statement.
According to the official Trino 477 Release Notes:
- Add support for ALTER VIEW ... REFRESH. (#25906) (https://trino.io/docs/current/release/release-477.html)
Proposed Grammar Changes (TrinoSql.g4):
- Add a new alternative rule to the
statementblock:
statement
: ...
| KW_ALTER KW_VIEW from=viewRef KW_REFRESH # refreshView
| ...
;
(Alternatively, it can be named alterView if extracted into a separate rule).
- Ensure
REFRESHis registered as a keyword/lexer token if it's not fully global.
Additional context
This feature is highly required for correct parsing and auto-completion validation when working with Hive or Memory connectors in modern Trino clusters (v477+).
- Ngôn ngữ chính
- TypeScript
- Star
- 394
- Fork
- 108
- Merge trung bình
- 5 phút
- Pull request đã merge (30 ngày)
- 1
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 DTStack/dt-sql-parser
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
DTStack/dt-sql-parser#490 · 1 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
DTStack/dt-sql-parser#489 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
DTStack/dt-sql-parser#488 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
DTStack/dt-sql-parser#463 ·
-
enhancement improvement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
DTStack/dt-sql-parser#445 · 2 bình luận ·
Tất cả issue của DTStack/dt-sql-parser
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
vercel-labs/just-bash#464 ·
-
looksLikeSlug() is ASCII-only, so non-Latin entity slugs (e.g. Korean) skip exact match and collapse Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
TanStack/tanstack.com#1293 ·