Skip to content

The date '2022-01-03' falls in the second week in Starrock, but it falls in the first week on Linux #64725

@gaoxianzhu

Description

@gaoxianzhu

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"
);

Image Image

However, in Starrocks, the week function calculation aligns with Linux, both considering the first week as the starting point:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions