Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Bug]: Support ALTER VIEW ... REFRESH syntax added in Trino 477

Đang mở Phù hợp với người mới
#493 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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:

Proposed Grammar Changes (TrinoSql.g4):

  1. Add a new alternative rule to the statement block:
statement
    : ...
    | KW_ALTER KW_VIEW from=viewRef KW_REFRESH # refreshView
    | ...
    ;

(Alternatively, it can be named alterView if extracted into a separate rule).

  1. Ensure REFRESH is 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

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của DTStack/dt-sql-parser

Tất cả issue của DTStack/dt-sql-parser

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.