Allow casting durations to different timeunits
- Lingua principale
- Rust
- Stelle
- 9.3k
- Fork
- 2.4k
- Merge medio
- 3g 11h
- PR unite (30g)
- 360
Descrizione
### Is your feature request related to a problem or challenge?
I would like to be able to cast a duration to a different timeunit.
Current behavior:
```
DataFusion CLI v39.0.0
> SELECT arrow_cast(1, 'Duration(Millisecond)');
+----------------------------------------------------+
| arrow_cast(Int64(1),Utf8("Duration(Millisecond)")) |
+----------------------------------------------------+
| 0 days 0 hours 0 mins 0.001 secs |
+----------------------------------------------------+
1 row(s) fetched.
Elapsed 0.065 seconds.
> SELECT arrow_cast(arrow_cast(1, 'Duration(Millisecond)'), 'Duration(Second)');
This feature is not implemented: Unsupported CAST from Duration(Millisecond) to Duration(Second)
```
### Describe the solution you'd like
The cast works
### Describe alternatives you've considered
_No response_
### Additional context
_No response_
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start by reproducing the nested arrow_cast query in the DataFusion CLI, using the Duration(Millisecond) to Duration(Second) example from the issue. Trace the cast handling for duration values and add coverage for conversions between time units. Done means the query succeeds and returns the correctly converted duration.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- database
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100