4paradigm / 4paradigm/OpenMLDB
SQL: support DATE literal and TIMESTAMP literal
- Lenguaje dominante
- C++
- Estrellas
- 1.7k
- Forks
- 331
- Merge medio
- 12 d 12 h
- PR fusionados (30 d)
- 1
Descripción
**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.
Guía de contribución
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- cpp, sql
- Área
- databases
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 45/100