-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Date range filter doesn't work for table partitioned by toWeek #24422
Copy link
Copy link
Closed
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasemajor
Description
(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_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');
- 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasemajor