drop table ods.ods_week_test;
CREATE TABLE ods.ods_week_test (
dt datetime NULL
) ENGINE=OLAP
PARTITION BY RANGE (dt) ( START ("2022-01-03 00:00:00") END ("2025-12-31 00:00:00") EVERY (INTERVAL 1 week) )
PROPERTIES (
"replication_num" = "1",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "week",
"dynamic_partition.start" = "-1000",
"dynamic_partition.end" = "10",
"dynamic_partition.prefix" = "p",
"in_memory" = "false",
"storage_format" = "DEFAULT",
"enable_persistent_index" = "false"
);
However, in Starrocks, the week function calculation aligns with Linux, both considering the first week as the starting point:
