4paradigm / 4paradigm/OpenMLDB
SQL: support DATE literal and TIMESTAMP literal
- 主要语言
- C++
- 星标
- 1.7k
- 派生
- 331
- 平均合并
- 12 天 12 小时
- 30 天内合并 PR
- 1
描述
**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.
贡献指南
调研方向
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.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- cpp, sql
- 领域
- databases
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 45/100