https://nightlies.apache.org/flink/flink-docs-release-1.15/zh/docs/dev/table/types/
MySQL type | PostgreSQL type | Flink SQL type |
---|---|---|
TINYINT | TINYINT | |
SMALLINT, TINYINT UNSIGNED |
SMALLINT, INT2, SMALLSERIAL, SERIAL2 |
SMALLINT |
INT, MEDIUMINT, SMALLINT UNSIGNED |
INTEGER, SERIAL |
INT |
BIGINT, INT UNSIGNED |
BIGINT, BIGSERIAL |
BIGINT |
BIGINT UNSIGNED | DECIMAL(20,0) | |
BIGINT | BIGINT | BIGINT |
FLOAT | REAL, FLOAT4 |
FLOAT |
DOUBLE, DOUBLE PRECISION |
FLOAT8, DOUBLE PRECISION |
DOUBLE |
NUMERIC(p, s), DECIMAL(p, s) |
NUMERIC(p, s), DECIMAL(p, s) |
DECIMAL(p, s) |
BOOLEAN, TINYINT(1) |
BOOLEAN | BOOLEAN |
DATE | DATE | DATE |
TIME [(p)] | TIME [(p)] [WITHOUT TIMEZONE] | TIME [(p)] [WITHOUT TIMEZONE] |
DATETIME [(p)] | TIMESTAMP [(p)] [WITHOUT TIMEZONE] | TIMESTAMP [(p)] [WITHOUT TIMEZONE] |
CHAR(n), VARCHAR(n), TEXT |
CHAR(n), CHARACTER(n), VARCHAR(n), CHARACTER VARYING(n), TEXT |
STRING |
BINARY, VARBINARY, BLOB |
BYTEA | BYTES |
ARRAY | ARRAY |