Describe the bug
When update from 0.11.x to 0.12.x, fe.warn.log has warn log like:
WARN 8695 [OlapScanNode.updateScanRangeInfoByNewMVSelector():232] Using the old scan range info instead of the new one. The key type of table is aggregated., The new selected index id 461162, pre aggregation tag false, reason The aggregate operator does not match. The old selected index id 461162 pre aggregation tag true reason null
To Reproduce
Steps to reproduce the behavior:
- update from 0.11.x to 0.12.x
- use ndv() function in query
Expected behavior
No warn log and make new selector enable.
Table structure:
CREATE TABLE dw_table
(cdate
date NOT NULL,chour
int(11) NOT NULL,retail_type
int(11) NOT NULL,business_mode
int(11) NOT NULL,cashier
varchar(25) NOT NULL,posid
varchar(10) NOT NULL,store_id
varchar(25) NOT NULL,siebel_id
varchar(25) NULL,tran_seq_no
varchar(200) NOT NULL,dept
varchar(25) NOT NULL,class
varchar(25) NOT NULL,subclass
varchar(25) NOT NULL,brand_id
varchar(25) NOT NULL,item
varchar(25) NOT NULL,item_name
varchar(200) NOT NULL,sale_channel
varchar(100) NOT NULL,sale_type
varchar(25) NOT NULL,tran_type
varchar(25) NOT NULL,tran_datetime
varchar(25) NOT NULL,ws_promo
decimal(12, 4) SUM NOT NULL,hs_promo
decimal(12, 4) SUM NOT NULL,ws_cost
decimal(12, 4) SUM NOT NULL,ws_wq_amt
decimal(12, 4) SUM NOT NULL,qty
decimal(12, 4) SUM NOT NULL,sale_cost
decimal(12, 4) SUM NOT NULL,sale_amt
decimal(12, 4) SUM NOT NULL,disc_amt
decimal(12, 4) SUM NOT NULL,ws_sh
decimal(12, 4) SUM NOT NULL,hs_sh
decimal(12, 4) SUM NOT NULL,ws_dzwac
decimal(12, 4) SUM NOT NULL,hs_dzwac
decimal(12, 4) SUM NOT NULL,ws_bc
decimal(12, 4) SUM NOT NULL,hs_bc
decimal(12, 4) SUM NOT NULL
) ENGINE=OLAP
AGGREGATE KEY(cdate
, chour
, retail_type
, business_mode
, cashier
, posid
, store_id
, siebel_id
, tran_seq_no
, dept
, class
, subclass
, brand_id
, item
, item_name
, sale_channel
, sale_type
, tran_type
, tran_datetime
)
COMMENT "OLAP"
PARTITION BY RANGE(cdate
)
(
PARTITION p20200701 VALUES [('2020-07-01'), ('2020-07-02')),
PARTITION p20200702 VALUES [('2020-07-02'), ('2020-07-03')))
DISTRIBUTED BY HASH(tran_seq_no
) BUCKETS 4
PROPERTIES (
"storage_type" = "COLUMN",
"bloom_filter_columns" = "store_id, dept, class, subclass, brand_id, item, item_name, sale_channel, sale_type, tran_type"
)
Query sql:
select sum (sale_amt) hs_wq_amt , sum(sale_cost) hs_cost , ndv(tran_seq_no) order_num from dw_table where cdate >= "2020-07-01" and cdate <= "2020-07-02" and store_id in ("12345") and item in ("123456") order by hs_wq_amt desc
暂无答案!
目前还没有任何答案,快来回答吧!