4paradigm / 4paradigm/OpenMLDB

SQL: support DATE literal and TIMESTAMP literal

Đang mở
#866 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
C++
Star
1.7k
Fork
331
Merge trung bình
12 ngày 12 giờ
Pull request đã merge (30 ngày)
1

Mô tả

**Is your feature request related to a problem? Please describe.**

Now, we have numeric literals and string literals in OpenMLDB. Users are expecting to use DATE literal and TIMESTAMP literal as described in Standard SQL.

In this issue, we are going to support DATE literal and TIMESTAMP literals
```sql
::= DATE
::=

::= TIMESTAMP
::=

::=
::=
::=

::=

```

```sql
SELECT TIMESTAMP "2021-05-20 10:11:12+08", DATE "2021-05-20";
```

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.

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

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

Hướng nghiên cứu

The issue involves extending the SQL parser to recognize DATE and TIMESTAMP literals. Look at the existing literal parsing code in the OpenMLDB codebase, likely in the SQL parser module. Understand the grammar rules provided and implement support for the new literal types. Test with SQL statements like SELECT TIMESTAMP "2021-05-20 10:11:12+08", DATE "2021-05-20"; to ensure they are correctly parsed and evaluated.

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

Đánh giá

Công nghệ
cpp, sql
Lĩnh vực
databases
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
45/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.