From fb3a28f64634d5eb19d33e6e1f1aa9b2e5f24e52 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 9 Jul 2016 03:20:44 +0300 Subject: [PATCH] Added test [#METR-22032]. --- ...index_signed_unsigned_comparison.reference | 4 ++++ ...00345_index_signed_unsigned_comparison.sql | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 dbms/tests/queries/0_stateless/00345_index_signed_unsigned_comparison.reference create mode 100644 dbms/tests/queries/0_stateless/00345_index_signed_unsigned_comparison.sql diff --git a/dbms/tests/queries/0_stateless/00345_index_signed_unsigned_comparison.reference b/dbms/tests/queries/0_stateless/00345_index_signed_unsigned_comparison.reference new file mode 100644 index 00000000000..18fe37021df --- /dev/null +++ b/dbms/tests/queries/0_stateless/00345_index_signed_unsigned_comparison.reference @@ -0,0 +1,4 @@ +1 1 2016-07-07 +-1 -1 2016-07-07 +1 1 2016-07-07 +-1 -1 2016-07-07 diff --git a/dbms/tests/queries/0_stateless/00345_index_signed_unsigned_comparison.sql b/dbms/tests/queries/0_stateless/00345_index_signed_unsigned_comparison.sql new file mode 100644 index 00000000000..6520de33b6e --- /dev/null +++ b/dbms/tests/queries/0_stateless/00345_index_signed_unsigned_comparison.sql @@ -0,0 +1,19 @@ +DROP TABLE IF EXISTS test.index; + +CREATE TABLE test.index +( + key Int32, + name String, + merge_date Date +) ENGINE = MergeTree(merge_date, key, 8192); + +insert into test.index values (1,'1','2016-07-07'); +insert into test.index values (-1,'-1','2016-07-07'); + +select * from test.index where key = 1; +select * from test.index where key = -1; +OPTIMIZE TABLE test.index; +select * from test.index where key = 1; +select * from test.index where key = -1; + +DROP TABLE test.index;