版本 2.0.13
期望 biz_date 写入 '2024-08-13' 实际写入 '2024-08-14' 经测试1.2.7版本无此问题
以下为测试用例
建表语句
CREATE TABLE tmp.`biz_date_insert` (
`biz_date` date NULL COMMENT '业务日期',
`etl_time` datetime NULL COMMENT 'etl时间'
) ENGINE=OLAP
UNIQUE KEY(`biz_date`)
COMMENT 'biz_date'
DISTRIBUTED BY HASH(`biz_date`) BUCKETS 1
PROPERTIES (
"replication_allocation" = "tag.location.default: 1",
"storage_medium" = "hdd",
"storage_format" = "V2",
"enable_unique_key_merge_on_write" = "true",
"light_schema_change" = "true",
"disable_auto_compaction" = "false"
);
写入语句
insert into tmp.`biz_date_insert`
select case when now() > '2024-08-14 06:00:00' and now() < '2024-08-14 18:00:00' then '2024-08-13' else '2024-08-14' end,now()