apache / apache/datafusion

PostgreSQL compatibility: `extract(milliseconds ...)` should preserve fractional milliseconds

Open
#22,256 4 comments 0 reactions 1 assignee Claimed by @aguilaredu View on GitHub
bug good first issue
Dominant language
Rust
Stars
9.3k
Forks
2.4k
Avg merge
3d 7h
Merged PRs (30d)
344

Description

Split out from #22247.

### Mismatch

`extract(milliseconds ...)` should preserve fractional milliseconds.

```sql
SELECT extract(milliseconds from timestamp '2020-01-01 00:00:12.345678');
```

PostgreSQL:

```text
12345.678
```

DataFusion:

```text
12345
```

### Expected behavior

For PostgreSQL-compatible SQL semantics, DataFusion should either match PostgreSQL's result or raise the same class of domain/semantic error.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.