Skip to main content

Data Type Mapping

The table below shows how each upstream MySQL column type maps to a Doris column type. There is a single mapping, shared by both sync methods — the only difference is who creates the target table:

  • Auto Table Creation Sync: Doris reads the upstream schema and creates the target table with these Doris column types automatically.
  • SQL Mapping Sync: you create the target table yourself, using a compatible Doris type for each column.

In both cases, the values are written following the same mapping. For types that are not supported, see Limitations.

MySQL to Doris

MySQL TypeDoris TypeNotes
BOOLEAN / TINYINT(1)BOOLEAN
TINYINTTINYINTUNSIGNEDSMALLINT
SMALLINTSMALLINTUNSIGNEDINT
MEDIUMINTINTUNSIGNEDINT
INTINTUNSIGNEDBIGINT
BIGINTBIGINTUNSIGNEDLARGEINT
YEARSMALLINT
FLOATFLOAT
DOUBLEDOUBLE
DECIMAL(p,s)DECIMAL(p,s)Very high precision falls back to STRING
DATEDATE
DATETIMEDATETIME(s)Microsecond scale (0–6) preserved
TIMESTAMPDATETIME(s)Normalized to the server time zone
TIMESTRINGSerialized as a string, e.g. 12:34:56.000000
CHARCHAR
VARCHARVARCHAR
TINYTEXT / TEXT / MEDIUMTEXT / LONGTEXTSTRING
BINARY / VARBINARY / TINYBLOB / BLOB / MEDIUMBLOB / LONGBLOBSTRINGBase64-encoded string
BIT(1)BOOLEAN
BIT(n>1)STRINGBase64-encoded string
JSONSTRINGStored as JSON text
ENUMSTRINGResolved to the label value
SETSTRINGResolved to comma-separated labels
Spatial types (GEOMETRY, POINT, …) and other typesNot supportedAuto Table Creation fails for tables with such columns; use SQL Mapping Sync (cast in SELECT) or exclude the column