| |
郝文强
|
|
[hidden email]
|
签名由网易邮箱大师定制
--------- 转发邮件信息 ---------
发件人: 郝文强 <
[hidden email]>
发送日期: 2021年01月14日 17:22
发送至:
[hidden email] <
[hidden email]>
主题: flink-sql字段类型问题
sql-client 创建表 报错java.math.BigInteger cannot be cast to java.lang.Long
麻烦各位帮看一下
源数据表是 mysql的information_schema.tables 表
表结构如下:
table_catalog varchar(64)
table_schema varchar(64)
table_name varchar(64)
table_type enum('base table','view','system view')
engine varchar(64)
version int
row_format enum('fixed','dynamic','compressed','redundant','compact','paged')
table_rows bigint unsigned
avg_row_length bigint unsigned
data_length bigint unsigned
max_data_length bigint unsigned
index_length bigint unsigned
data_free bigint unsigned
auto_increment bigint unsigned
create_time timestamp
update_time datetime
check_time datetime
table_collation varchar(64)
checksum bigint
create_options varchar(256)
table_comment text
我的flink sql 建表语句:
CREATE TABLE info_table (
TABLE_CATALOG STRING,
TABLE_SCHEMA STRING,
TABLE_NAME STRING,
TABLE_TYPE STRING,
ENGINE STRING,
VERSION INT,
ROW_FORMAT STRING,
TABLE_ROWS BIGINT,
AVG_ROW_LENGTH BIGINT,
DATA_LENGTH BIGINT,
MAX_DATA_LENGTH BIGINT,
INDEX_LENGTH BIGINT,
DATA_FREE BIGINT,
AUTO_INCREMENT BIGINT,
CREATE_TIME TIMESTAMP,
UPDATE_TIME TIMESTAMP,
CHECK_TIME TIMESTAMP,
TABLE_COLLATION STRING,
CHECKSUM INTEGER,
CREATE_OPTIONS STRING,
TABLE_COMMENT STRING,
PRIMARY KEY (`TABLE_NAME`) NOT ENFORCED
) WITH (
'connector' = 'jdbc',
'url' = 'jdbc:mysql://localhost:3306/information_schema',
'username' = 'root',
'password' = 'root',
'table-name' = 'TABLES'
);
反复改了几次类型都报错:
java.math.BigInteger cannot be cast to java.lang.Integer
java.lang.Long cannot be cast to java.math.BigDecimal
java.lang.Long cannot be cast to java.lang.Integer
| |
郝文强
|
|
[hidden email]
|
签名由网易邮箱大师定制