Skip to main content
Last updated on

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 TypeDoris TypeComment
booleanboolean
tinyinttinyint
smallintsmallint
integerint
bigintbigint
floatfloat
doubledouble
decimal(P, S)decimal(P, S)
varchar(N)VARCHAR(N) / STRINGVARCHAR(N) for N <= 65533; otherwise STRING.
char(N)CHAR(N) / STRINGCHAR(N) for N <= 255; otherwise STRING.
binary(N), varbinary(N)VARBINARY(N)Preserves the declared byte length.
datedate
timestamp_without_time_zone(P)DATETIME(P) / TIMESTAMP_NSDATETIME(P) for P <= 6; in 4.2, P > 6 maps to TIMESTAMP_NS, preserving sub-microsecond precision.
timestamp_with_local_time_zoneTIMESTAMPTZ(N)Since 4.1.5, this type always maps to TIMESTAMPTZ(N). Precision is capped at 6, so higher precision is lost.
arrayarray
mapmap
rowstruct
variantVARIANTReading requires the FE configuration enable_variant_v2=true.
time_without_time_zoneUNSUPPORTED
otherUNSUPPORTED

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).