ROW_NUMBER函数的Bug

Viewed 5

1、doris版本:doris-3.0.8-rc01

2、建表语句:
CREATE TABLE IF NOT EXISTS indicatorods.ts_indicators_strategy
(
product_code varchar(65530) comment "产品code"
,indicator varchar(65530) comment "指标类型(如夏普比率:sharpe,最大回撤:mdd)"
,freq varchar(65530) comment "采样频率(如日频:trading_daily,周频:weekly,月频:monthly)"
,period varchar(65530) comment "数据时间跨度(如最近一年:recent_1y,成立以来:since_found)"
,end_date varchar(65530) comment "计算所属周期内的结束日期"
,start_date varchar(65530) comment "计算所属周期内的开始日期"
,indicator_value decimal(20,4) comment "因子值"
,create_time datetime DEFAULT NULL comment "创建时间"
,update_time datetime DEFAULT NULL comment "更新时间"
,id bigint comment "id"
)
ENGINE=OLAP
UNIQUE KEY(product_code,indicator,freq,period,end_date)
COMMENT ""
DISTRIBUTED BY HASH(product_code,indicator,freq,period,end_date) BUCKETS 3
PROPERTIES(
"enable_unique_key_merge_on_write" = "true",
"replication_allocation" = "tag.location.default: 3",
"compression" = "zstd",
"in_memory" = "false",
"storage_format" = "V2",
"light_schema_change" = "true",
"disable_auto_compaction" = "false"
);

3、用row number函数统计数据时, 打标列出现变动,白话就是打标列的rs不准。
image.png

image.png

哪位大神遇到过这种情况? 为什么会出现这种情况?

0 Answers