apache / apache/datafusion-sqlparser-rs

Allow to override all the `parser..` methods.

Đang mở
#1,415 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Rust
Star
3.5k
Fork
772
Merge trung bình
4 ngày 9 giờ
Pull request đã merge (30 ngày)
17

Mô tả

We are building a new RDBMS that still has only partial support for the full `SQL` dialect of Postgres.

This means that we need to parse the strings, and then rule out everything we still do not support. It will be easier and probably faster if we can do:

```rust
// As is possible here
pub fn parse_statement(&mut self) -> Result {
let _guard = self.recursion_counter.try_decrease()?;

// allow the dialect to override statement parsing
if let Some(statement) = self.dialect.parse_statement(self) {
return statement;
}
....
}

// Make at least the major components overridable:
pub fn parse_table_and_joins(&mut self) -> Result {
if let Some(result) = self.dialect.parse_table_and_joins(self) {
return result;
}
...
...
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Bắt đầu từ parse_statement override hiện có được hiển thị trong issue, sau đó kiểm tra parse_table_and_joins và dialect interface để xác định cách parser methods được dispatch. Xác định đầy đủ các method nên có thể override và xác minh rằng parsing được hỗ trợ vẫn hoạt động trong khi một dialect có thể intercept các entry point đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
postgresql, rust, sql
Lĩnh vực
databases
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
32/100

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.