4paradigm / 4paradigm/OpenMLDB

support function: current_timestamp, current_date, now

Offen
#3,198 0 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @aceforeverd Auf GitHub ansehen
enhancement execute-engine udf
Vorherrschende Sprache
C++
Sterne
1.7k
Forks
331
Ø Merge
12 T. 12 Std.
Gemergte PRs (30 T.)
1

Beschreibung

same functions in Spark SQL.

1. There is `unix_timestamp("")` as a temp solution, not convenient though. unix_timestamp returns unix epouch time in seconds as int64, one must write `timestamp (unix_timestamp("") * 1000)` to archive current_timestamp.
2. all `current_*` function should executed at begining of one SQL, means all `current_*` functions calls in same SQL should guarantee return the same value, no matter where the `current_*` call is.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Look for existing timestamp functions like `unix_timestamp` in the SQL function implementation. The new functions `current_timestamp`, `current_date`, and `now` need to be added, ensuring they return the same value for all calls within a single SQL statement. Check how query execution context is managed to guarantee consistency. Test by writing SQL queries that call these functions multiple times.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
cpp, sql
Bereich
backend, database
Issue-Typ
Feature
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

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