doris版本doris-2.1.4-rc03
mysql5.7
mysql原表
CREATE TABLE `report` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`ad_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '广告的唯一ID',
`report_utc_date` date NOT NULL DEFAULT '0000-00-00' COMMENT '报告utc时间',
PRIMARY KEY (`id`) USING BTREE,
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='广告产品';
想在doris上创建的表
CREATE TABLE report
UNIQUE KEY(id)
DISTRIBUTED BY HASH(id) BUCKETS 3
PROPERTIES("replication_num"="1")
as SELECT * from mysql_erp.crm.report;
CREATE CATALOG mysql_erp PROPERTIES (
"type"="jdbc",
"user"="root",
"password"="123456",
"jdbc_url" = "jdbc:mysql://192.1.100.101:3306",
"driver_url" = "mysql-connector-j-8.3.0.jar",
"driver_class" = "com.mysql.cj.jdbc.Driver"
)
be新增allow_zero_date=true
报错内容:
mysql> CREATE TABLE report
-> UNIQUE KEY(id)
-> DISTRIBUTED BY HASH(id) BUCKETS 3
-> PROPERTIES("replication_num"="1")
-> as SELECT * from mysql_erp.crm.product_report;
ERROR 1105 (HY000): errCode = 2, detailMessage = (192.1.100.2)[INTERNAL_ERROR]UdfRuntimeException: jdbc get block address:
CAUSED BY: SQLException: Zero date value prohibited
CAUSED BY: DataReadException: Zero date value prohibited