4paradigm / 4paradigm/OpenMLDB

SQL: support DATE literal and TIMESTAMP literal

Offen
#866 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
C++
Sterne
1.7k
Forks
331
Ø Merge
12 T. 12 Std.
Gemergte PRs (30 T.)
1

Beschreibung

**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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
cpp, sql
Bereich
databases
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.