Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions docs/source/user-guide/sql/data_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,21 @@ The maximum supported precision for `DECIMAL` types is 76.

## Date/Time Types

| SQL DataType | Arrow DataType |
| ------------ | :------------------------------- |
| `DATE` | `Date32` |
| `TIME` | `Time64(Nanosecond)` |
| `TIMESTAMP` | `Timestamp(Nanosecond, None)` |
| `INTERVAL` | `Interval(IntervalMonthDayNano)` |
| SQL DataType | Arrow DataType |
| ------------------------------------------- | :------------------------------------------------------------ |
| `DATE` | `Date32` |
| `TIME` | `Time64(Nanosecond)` |
| `TIMESTAMP` | `Timestamp(Nanosecond, None)` |
| `TIMESTAMP WITH TIME ZONE` or `TIMESTAMPTZ` | `Timestamp(Nanosecond, Some(datafusion.execution.time_zone))` |
| `INTERVAL` | `Interval(IntervalMonthDayNano)` |

`TIMESTAMP(p)` and `TIMESTAMP(p) WITH TIME ZONE` accept a precision `p` of 0, 3,
6 or 9, selecting second, millisecond, microsecond or nanosecond precision.

Note that `datafusion.execution.time_zone` defaults to unset, in which case
`TIMESTAMP WITH TIME ZONE` maps to the timezone-**naive**
`Timestamp(Nanosecond, None)`. See [Timestamps and Time Zones](timestamps.md)
for what that means for casts, comparisons and the date/time functions.

## Boolean Types

Expand Down
1 change: 1 addition & 0 deletions docs/source/user-guide/sql/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ SQL Reference
:maxdepth: 2

data_types
timestamps
struct_coercion
select
subqueries
Expand Down
Loading
Loading