DuckDB type mapping
DuckDB uses AdvancedDbType with a dedicated converter that bypasses DbType.getExpectedJdbcType and matches directly on DuckDB's type names (see DuckDb.parseDuckDbType). The tables below list every DuckDB column type (DuckDB Data Types) and the resulting Kotlin type. Aliases are canonicalized by DuckDB at CREATE TABLE time, so DataFrame only ever sees the canonical type; they are listed in the same row as the canonical type for reference.
Column nullability is determined from the metadata provided by the JDBC driver. If the driver does not explicitly report a column as non-nullable, it is mapped to a nullable Kotlin type (Int? instead of Int).
Boolean
Canonical | Aliases | DataFrame column type | Notes |
|---|---|---|---|
|
|
|
Signed integer types
Canonical | Aliases | DataFrame column type | Notes |
|---|---|---|---|
|
|
| 1-byte signed. |
|
|
| 2-byte signed. |
|
|
| 4-byte signed. |
|
|
| 8-byte signed. |
| none |
| 16-byte signed ( |
Unsigned integer types
Canonical | Aliases | DataFrame column type | Notes |
|---|---|---|---|
| none |
| 1-byte unsigned; widened to |
| none |
| 2-byte unsigned; widened to |
| none |
| 4-byte unsigned; widened to |
| none |
| 8-byte unsigned; exceeds |
| none |
| 16-byte unsigned. |
Floating-point and fixed-point
Canonical | Aliases | DataFrame column type | Notes |
|---|---|---|---|
|
|
| 4-byte float. |
|
|
| 8-byte float. |
|
|
| Fixed-point; |
String and binary
Canonical | Aliases | DataFrame column type | Notes |
|---|---|---|---|
|
|
| Variable-length text. |
|
|
| Binary large object. |
| none |
| Fixed-length bit string; read as text. |
Date and time
Canonical | Aliases | DataFrame column type | Notes |
|---|---|---|---|
| none |
| Preprocessed from |
| none |
| Preprocessed from |
| none |
| Nanosecond-precision time. |
|
|
| Time with time zone. |
|
|
| Preprocessed from |
| none |
| Millisecond-precision timestamp. |
| none |
| Nanosecond-precision timestamp. |
| none |
| Second-precision timestamp. |
|
|
| Timestamp with time zone. |
| none |
| Read as text. |
Complex / nested types
DuckDB supports nested / composite types, which the DataFrame converter resolves recursively.
Canonical | Aliases | DataFrame column type | Notes |
|---|---|---|---|
| none |
| Element type is resolved recursively. |
| none |
| Same as |
| none |
| Key and value types are resolved recursively. |
| none | column group ( | Fields resolved recursively; array-of-struct becomes a frame column. |
| none |
| Not currently unpacked in Kotlin DataFrame. |
| none |
| Not currently unpacked in Kotlin DataFrame. |
Other
Canonical | Aliases | DataFrame column type | Notes |
|---|---|---|---|
| none |
| Preprocessed from |
| none |
| Read as JSON text and passed through |
| none |
| Read as the enum label. |
| none |
| Binary WKB read as |
| none |
| Fallback for anything not recognised by the converter. |
DuckDB specifics
Nested types (
LIST,ARRAY,MAP,STRUCT) are resolved recursively:INTEGER[]becomesList<Int>,MAP(VARCHAR, INTEGER)becomesMap<String, Int>, and so on.STRUCT(...)becomes a column group (DataRow); arrays ofSTRUCTbecome frame columns (DataFrame).Reading a DuckDB
JSONcolumn parses the JSON text:JSON array is read as
DataFrameinto the frame column;JSON object is read as
DataRowinto the column group;JSON primitives are read as-is;
on fail, keeps raw
String.
Unsupported types
UNIONandVARIANTvalues are read as rawAny— the payload's actual type is not unpacked in Kotlin.INTERVALvalues are read as their text form; noDurationconversion is applied.Extension types (spatial via
duckdb_spatial, full-text search, etc.) are read as the extension's underlying storage type (usuallyBloborString).