Paimon to Doris Data Type Mapping
The following table describes how Doris 4.2 (branch-4.2) maps Paimon external-table schemas when reading. Writes also depend on the target schema and supported write operations; the read mapping is not an automatic inverse mapping for writes.
| Paimon Type | Doris Type | Comment |
|---|---|---|
| boolean | boolean | |
| tinyint | tinyint | |
| smallint | smallint | |
| integer | int | |
| bigint | bigint | |
| float | float | |
| double | double | |
| decimal(P, S) | decimal(P, S) | |
| varchar(N) | VARCHAR(N) / STRING | VARCHAR(N) for N <= 65533; otherwise STRING. |
| char(N) | CHAR(N) / STRING | CHAR(N) for N <= 255; otherwise STRING. |
| binary(N), varbinary(N) | VARBINARY(N) | Preserves the declared byte length. |
| date | date | |
| timestamp_without_time_zone(P) | DATETIME(P) / TIMESTAMP_NS | DATETIME(P) for P <= 6; in 4.2, P > 6 maps to TIMESTAMP_NS, preserving sub-microsecond precision. |
| timestamp_with_local_time_zone | TIMESTAMPTZ(N) | Since 4.1.5, this type always maps to TIMESTAMPTZ(N). Precision is capped at 6, so higher precision is lost. |
| array | array | |
| map | map | |
| row | struct | |
| variant | VARIANT | Reading requires the FE configuration enable_variant_v2=true. |
| time_without_time_zone | UNSUPPORTED | |
| other | UNSUPPORTED |
Usage Notes
Child fields of complex types use the same mappings recursively. TIMESTAMPTZ represents an instant displayed in the session time_zone.
Precision handling differs for unzoned and local-zoned timestamps: 4.2 can preserve nanoseconds for the former, while the latter is capped at six fractional digits. The TIMESTAMP_NS range is 1677-09-21 00:12:43.145224192 through 2262-04-11 23:47:16.854775807.
In DESCRIBE table_name, WITH_TIMEZONE in the Extra column identifies a timezone-aware source field.
Implementation reference: PaimonUtil.java (branch-4.2).