Merge pull request #23379 from ClickHouse/add-test-1647

Add test for #1647
This commit is contained in:
Maksim Kita 2021-04-21 13:34:27 +03:00 committed by GitHub
commit 20b1930ee2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;