-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
area/sql/cacheIssues or PRs related to sql cacheIssues or PRs related to sql cache
Description
Describe the bug
When partition cache is not cached continuely, range query may fail. For example, partition key 20201011 and 20201013 is cached, but rang query is between 20201011 and 20201013, the query will not hit the cache.
To Reproduce
Steps to reproduce the behavior:
- create a table with paritition 20201011 to 20201013
CREATE TABLEdynamic_partition(
k1bigint(20) NULL COMMENT "",
k2int(11) NULL COMMENT "",
k3smallint(6) NULL COMMENT ""
) ENGINE=OLAP
DUPLICATE KEY(k1,k2,k3)
COMMENT "OLAP"
PARTITION BY RANGE(k1)
(PARTITION p20201209 VALUES [("20201209"), ("20201210")),
PARTITION p20201210 VALUES [("20201210"), ("20201211")),
PARTITION p20201211 VALUES [("20201211"), ("20201212")),
PARTITION p20201212 VALUES [("20201212"), ("20201213")),
PARTITION p20201213 VALUES [("20201213"), ("20201214")),
PARTITION p20201214 VALUES [("20201214"), ("20201215")),
PARTITION p20201215 VALUES [("20201215"), ("20201216")),
PARTITION p20201216 VALUES [("20201216"), ("20201217")))
DISTRIBUTED BY HASH(k2) BUCKETS 32
PROPERTIES (
"replication_num" = "1",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.time_zone" = "Asia/Shanghai",
"dynamic_partition.start" = "-6",
"dynamic_partition.end" = "6",
"dynamic_partition.prefix" = "p",
"dynamic_partition.replication_num" = "1",
"dynamic_partition.buckets" = "32",
"in_memory" = "false",
"storage_format" = "V2"
); - insert into parition 20201011, 20201012,20201013 one item of data
- enable partition cache and execute a query twice:
set enable_partition_cache=true;
select k1 from dynamic_partition where k1 >= 20201011 and k1 <= 20201213 group by k1; - can not hit the cache
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
area/sql/cacheIssues or PRs related to sql cacheIssues or PRs related to sql cache