Skip to content

Commit 7d0d6e5

Browse files
authored
Merge branch 'main' into jiff-proto
2 parents de1b808 + 9de192a commit 7d0d6e5

File tree

1 file changed

+23
-57
lines changed

1 file changed

+23
-57
lines changed

docs/source/user-guide/sql/data_types.md

Lines changed: 23 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -69,27 +69,32 @@ select arrow_cast(now(), 'Timestamp(Second, None)') as "now()";
6969

7070
| SQL DataType | Arrow DataType |
7171
| ------------ | -------------- |
72-
| `CHAR` | `Utf8` |
73-
| `VARCHAR` | `Utf8` |
74-
| `TEXT` | `Utf8` |
75-
| `STRING` | `Utf8` |
72+
| `CHAR` | `Utf8View` |
73+
| `VARCHAR` | `Utf8View` |
74+
| `TEXT` | `Utf8View` |
75+
| `STRING` | `Utf8View` |
76+
77+
By default, string types are mapped to `Utf8View`. This can be configured using the `datafusion.sql_parser.map_string_types_to_utf8view` setting. When set to `false`, string types are mapped to `Utf8` instead.
7678

7779
## Numeric Types
7880

79-
| SQL DataType | Arrow DataType |
80-
| ------------------------------------ | :----------------------------- |
81-
| `TINYINT` | `Int8` |
82-
| `SMALLINT` | `Int16` |
83-
| `INT` or `INTEGER` | `Int32` |
84-
| `BIGINT` | `Int64` |
85-
| `TINYINT UNSIGNED` | `UInt8` |
86-
| `SMALLINT UNSIGNED` | `UInt16` |
87-
| `INT UNSIGNED` or `INTEGER UNSIGNED` | `UInt32` |
88-
| `BIGINT UNSIGNED` | `UInt64` |
89-
| `FLOAT` | `Float32` |
90-
| `REAL` | `Float32` |
91-
| `DOUBLE` | `Float64` |
92-
| `DECIMAL(precision, scale)` | `Decimal128(precision, scale)` |
81+
| SQL DataType | Arrow DataType |
82+
| ------------------------------------------------ | :----------------------------- |
83+
| `TINYINT` | `Int8` |
84+
| `SMALLINT` | `Int16` |
85+
| `INT` or `INTEGER` | `Int32` |
86+
| `BIGINT` | `Int64` |
87+
| `TINYINT UNSIGNED` | `UInt8` |
88+
| `SMALLINT UNSIGNED` | `UInt16` |
89+
| `INT UNSIGNED` or `INTEGER UNSIGNED` | `UInt32` |
90+
| `BIGINT UNSIGNED` | `UInt64` |
91+
| `FLOAT` | `Float32` |
92+
| `REAL` | `Float32` |
93+
| `DOUBLE` | `Float64` |
94+
| `DECIMAL(precision, scale)` where precision ≤ 38 | `Decimal128(precision, scale)` |
95+
| `DECIMAL(precision, scale)` where precision > 38 | `Decimal256(precision, scale)` |
96+
97+
The maximum supported precision for `DECIMAL` types is 76.
9398

9499
## Date/Time Types
95100

@@ -131,42 +136,3 @@ You can create binary literals using a hex string literal such as
131136
| `ENUM` | _Not yet supported_ |
132137
| `SET` | _Not yet supported_ |
133138
| `DATETIME` | _Not yet supported_ |
134-
135-
## Supported Arrow Types
136-
137-
The following types are supported by the `arrow_typeof` function:
138-
139-
| Arrow Type |
140-
| ----------------------------------------------------------- |
141-
| `Null` |
142-
| `Boolean` |
143-
| `Int8` |
144-
| `Int16` |
145-
| `Int32` |
146-
| `Int64` |
147-
| `UInt8` |
148-
| `UInt16` |
149-
| `UInt32` |
150-
| `UInt64` |
151-
| `Float16` |
152-
| `Float32` |
153-
| `Float64` |
154-
| `Utf8` |
155-
| `LargeUtf8` |
156-
| `Binary` |
157-
| `Timestamp(Second, None)` |
158-
| `Timestamp(Millisecond, None)` |
159-
| `Timestamp(Microsecond, None)` |
160-
| `Timestamp(Nanosecond, None)` |
161-
| `Time32` |
162-
| `Time64` |
163-
| `Duration(Second)` |
164-
| `Duration(Millisecond)` |
165-
| `Duration(Microsecond)` |
166-
| `Duration(Nanosecond)` |
167-
| `Interval(YearMonth)` |
168-
| `Interval(DayTime)` |
169-
| `Interval(MonthDayNano)` |
170-
| `FixedSizeBinary(<len>)` (e.g. `FixedSizeBinary(16)`) |
171-
| `Decimal128(<precision>, <scale>)` e.g. `Decimal128(3, 10)` |
172-
| `Decimal256(<precision>, <scale>)` e.g. `Decimal256(3, 10)` |

0 commit comments

Comments
 (0)