apache / apache/datafusion-sqlparser-rs
Snowflake: TIMESTAMP precision regression
- Lingua principale
- Rust
- Stelle
- 3.5k
- Fork
- 772
- Merge medio
- 4g 9h
- PR unite (30g)
- 17
Descrizione
For Snowflake time formats support precision parameter ([from Snowflake documentation](https://docs.snowflake.com/en/sql-reference/data-types-datetime#timestamp)):
> All timestamp variations, as well as the TIMESTAMP alias, support an optional precision parameter for fractional seconds (for example, TIMESTAMP(3)). Timestamp precision can range from 0 (seconds) to 9 (nanoseconds). The default precision is 9.
Note: this comes from using Python wrapper sqloxide
Query that fails:
```sql
create table hello(test timestamp_ntz(6))
```
Error:
```
sql parser error: Expected: ',' or ')' after column definition, found: ( at Line: 1, Column: 38
```
removing precision from `timestamp_ntz` passes through
Unfortunately I cannot directly link which version (not visible throughintroduced this regression, but it seems to be recent
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia riproducendo la query che fallisce `create table hello(test timestamp_ntz(6))` tramite il wrapper Python sqloxide e traccia come vengono analizzati i tipi timestamp di Snowflake. Il lavoro è completato quando le varianti di timestamp con valori di precisione da 0 a 9 vengono analizzate correttamente senza introdurre regressioni nei timestamp non parametrizzati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python, 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
- 38/100