apache / apache/datafusion

The return type of EXTRACT

Aperta
#1,992 9 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Rust
Stelle
9.3k
Fork
2.4k
Merge medio
3g 11h
PR unite (30g)
360

Descrizione

I think the result type of u32 is not enough.
From the spark,
```
spark-sql> SELECT EXTRACT(YEAR FROM TIMESTAMP '-2000-12-16 12:21:13');
-2000
```
But this is not related to this issue, I will open a follow up pull request and discuss the returned type.

_Originally posted by @liukun4515 in https://github.com/apache/arrow-datafusion/pull/1991#r824743599_

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start by reproducing the EXTRACT(YEAR FROM TIMESTAMP '-2000-12-16 12:21:13') query and compare its returned type and value with the Spark SQL example in the issue. Locate the EXTRACT implementation and its existing tests; done means negative years are represented without the reported u32 limitation and the relevant test coverage passes.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
rust, sql
Ambito
databases
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.