doris查询date类型数据返回错误数据

Viewed 6

在2.1.3版本建表:

CREATE TABLE `EC_SettlementTransactions` (
  `SettlementDate` DATE NOT NULL COMMENT '清算日期',
  `SettlementYearMonth` TEXT NULL COMMENT '清算年月',
  `NetworkTransactionAmount` DECIMAL(21, 5) NULL COMMENT '清算网络交易金额'
) ENGINE=OLAP
DUPLICATE KEY(`SettlementDate`)
COMMENT 'OLAP'
AUTO PARTITION BY RANGE (date_trunc(`SettlementDate`, 'month'))
(PARTITION pHistory VALUES [('0000-01-01'), ('2020-01-01')),
PARTITION p20241001000000 VALUES [('2024-10-01'), ('2024-11-01')))
DISTRIBUTED BY HASH(`SettlementDate`) BUCKETS 10
PROPERTIES (
"replication_allocation" = "tag.location.default: 1",
"min_load_replica_num" = "-1",
"is_being_synced" = "false",
"storage_medium" = "hdd",
"storage_format" = "V2",
"inverted_index_storage_format" = "V1",
"light_schema_change" = "true",
"disable_auto_compaction" = "false",
"enable_single_replica_compaction" = "false",
"group_commit_interval_ms" = "10000",
"group_commit_data_bytes" = "134217728"
);

随意插入两条数据,查询结果在不符合常规,如下图
image.png

0 Answers