-
Notifications
You must be signed in to change notification settings - Fork 295
Supported Data Types
Anthony Virtuoso edited this page Nov 18, 2019
·
2 revisions
The Athena Query Federation SDK currently support the following data types. The below table shows how these types map to Java and Athena type systems.
ApacheArrow Type | Java Type | Athena Type |
---|---|---|
BIT | int, boolean | BOOLEAN |
DATEMILLI | Date, long, int | TIMESTAMP |
DATEDAY | Date, long, int | DATE |
FLOAT8 | double | DOUBLE |
FLOAT4 | float | REAL |
INT | int, long | INTEGER |
TINYINT | int, byte | TINYINT |
SMALLINT | int, short | SMALLINT |
BIGINT | long | BIGINT |
VARBINARY | byte[] | VARBINARY |
DECIMAL | double, BigDecimal | DECIMAL |
VARCHAR | String, Text | VARCHAR |
STRUCT | Object (w/ FieldResolver) | ROW |
LIST | iterable (w/Optional FieldResolver) | LIST |
UDFs have access to the same type system. When extending UserDefinedFunctionHandler you can expect to recieve the below concrete type mapping.
Athena type | Java type |
---|---|
TIMESTAMP | java.time.LocalDateTime (UTC) |
DATE | java.time.LocalDate (UTC) |
TINYINT | java.lang.Byte |
SMALLINT | java.lang.Short |
REAL | java.lang.Float |
DOUBLE | java.lang.Double |
DECIMAL | java.math.BigDecimal |
BIGINT | java.lang.Long |
INTEGER | java.lang.Int |
VARCHAR | java.lang.String |
VARBINARY | byte[] |
BOOLEAN | java.lang.Boolean |
ARRAY | java.util.List |
ROW | java.util.Map<String, Object> |