-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
Search before asking
- I had searched in the issues and found no similar issues.
Version
master
What's Wrong?
1, create table like:
CREATE TABLE daily_jtk_ad_cps_user_detial (
date_time date NOT NULL COMMENT "",
adowner varchar(256) NULL DEFAULT """" COMMENT "",
sku_id bigint(20) NULL DEFAULT "0" COMMENT "",
union_id bigint(20) NULL DEFAULT "0" COMMENT "",
plan_id bigint(20) NULL COMMENT "",
plan_type int(11) NULL COMMENT "",
cp_act_id bigint(20) NULL COMMENT "",
cp_union_id bigint(20) NULL COMMENT "",
ware_id bigint(20) NULL COMMENT "",
jtk_uv_cnt hll HLL_UNION NULL COMMENT "",
jtk_click_cnt hll HLL_UNION NULL COMMENT "",
jtk_order_cnt hll HLL_UNION NULL COMMENT "",
jtk_payed_cnt hll HLL_UNION NULL COMMENT "",
jtk_finish_cnt hll HLL_UNION NULL COMMENT ""
) ENGINE=OLAP
AGGREGATE KEY(date_time, adowner, sku_id, union_id, plan_id, plan_type, cp_act_id, cp_union_id, ware_id)
COMMENT "OLAP"
PARTITION BY RANGE(date_time)
(PARTITION p202103 VALUES [('0000-01-01'), ('2021-04-01')),
PARTITION p202104 VALUES [('2021-04-01'), ('2021-05-01')))
DISTRIBUTED BY HASH(adowner) BUCKETS 16
PROPERTIES (
"replication_allocation" = "tag.location.default: 3",
"in_memory" = "false",
"storage_format" = "V2"
)
2, restore partition: p202103 succeed.
3, restore partition: p202104, while query with:
select * from daily_jtk_ad_cps_user_detial where date_time>"2021-03-01" and date_time<"2021-03-30" limit 1;
RESULT:
ERROR 5014 (HY000): errCode = 2, detailMessage = Table state is not NORMAL: 'RESTORING'
What You Expected?
query succeed without error message.
How to Reproduce?
1, create table like:
CREATE TABLE daily_jtk_ad_cps_user_detial (
date_time date NOT NULL COMMENT "",
adowner varchar(256) NULL DEFAULT """" COMMENT "",
sku_id bigint(20) NULL DEFAULT "0" COMMENT "",
union_id bigint(20) NULL DEFAULT "0" COMMENT "",
plan_id bigint(20) NULL COMMENT "",
plan_type int(11) NULL COMMENT "",
cp_act_id bigint(20) NULL COMMENT "",
cp_union_id bigint(20) NULL COMMENT "",
ware_id bigint(20) NULL COMMENT "",
jtk_uv_cnt hll HLL_UNION NULL COMMENT "",
jtk_click_cnt hll HLL_UNION NULL COMMENT "",
jtk_order_cnt hll HLL_UNION NULL COMMENT "",
jtk_payed_cnt hll HLL_UNION NULL COMMENT "",
jtk_finish_cnt hll HLL_UNION NULL COMMENT ""
) ENGINE=OLAP
AGGREGATE KEY(date_time, adowner, sku_id, union_id, plan_id, plan_type, cp_act_id, cp_union_id, ware_id)
COMMENT "OLAP"
PARTITION BY RANGE(date_time)
(PARTITION p202103 VALUES [('0000-01-01'), ('2021-04-01')),
PARTITION p202104 VALUES [('2021-04-01'), ('2021-05-01')))
DISTRIBUTED BY HASH(adowner) BUCKETS 16
PROPERTIES (
"replication_allocation" = "tag.location.default: 3",
"in_memory" = "false",
"storage_format" = "V2"
)
2, restore partition: p202104 succeed.
3, restore partition: p202103, while query with:
select * from daily_jtk_ad_cps_user_detial where date_time>"2021-03-01" and date_time<"2021-03-30" limit 1;
RESULT:
ERROR 5014 (HY000): errCode = 2, detailMessage = Table state is not NORMAL: 'RESTORING'
Anything Else?
NO
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct