(you don't have to strictly follow this form)
Describe the issue
Date filter not working when table is partitioned by week.
How to reproduce
- Which ClickHouse server versions are incompatible 21.4.6
- Table definition -
CREATE TABLE returns.test_tbl
(
vend_nm String,
ship_dt Date
)
ENGINE = MergeTree
PARTITION BY toWeek(ship_dt)
ORDER BY vend_nm
SETTINGS index_granularity = 8192
Sample Data -
insert into returns.test_tbl values('1', '2020-11-11')('1', '2021-01-01');
- Queries to run that lead to unexpected result
- select * From test_tbl where ship_dt>= toDate('2020-11-01') and ship_dt <= toDate('2021-05-05');
This query returns no result.
- select * From test_tbl where ship_dt>= toDate('2020-01-01') and ship_dt <= toDate('2021-05-05');
This query returns 1 record for date - 2021-01-01
This was working fine with version 20.5.3
(you don't have to strictly follow this form)
Describe the issue
Date filter not working when table is partitioned by week.
How to reproduce
CREATE TABLE returns.test_tbl
(
vend_nmString,ship_dtDate)
ENGINE = MergeTree
PARTITION BY toWeek(ship_dt)
ORDER BY vend_nm
SETTINGS index_granularity = 8192
Sample Data -
insert into returns.test_tbl values('1', '2020-11-11')('1', '2021-01-01');
This query returns no result.
This query returns 1 record for date - 2021-01-01
This was working fine with version 20.5.3