Add test for #1647

This commit is contained in:
Alexey Milovidov 2021-04-20 22:28:20 +03:00
parent 3b9e6dd978
commit c7e20282f5
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,2 @@
2017-12-15 1 1
2017-12-15 1 1

View File

@ -0,0 +1,21 @@
DROP TABLE IF EXISTS db;
CREATE TABLE tb
(
date Date,
`index` Int32,
value Int32,
idx Int32 ALIAS `index`
)
ENGINE = MergeTree
PARTITION BY date
ORDER BY (date, `index`);
insert into tb values ('2017-12-15', 1, 1);
SET force_primary_key = 1;
select * from tb where `index` >= 0 AND `index` <= 2;
select * from tb where idx >= 0 AND idx <= 2;
DROP TABLE tb;