dbms: added test for prev. revision [#METR-14449].

This commit is contained in:
Alexey Milovidov 2014-12-23 23:33:38 +03:00
parent 10553e7840
commit ffd5b1b410
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,2 @@
2014-01-02 0 0 0000-00-00 00:00:00 2014-01-02 03:04:06
1 2014-01-02 03:04:06

View File

@ -0,0 +1,13 @@
DROP TABLE IF EXISTS default.test_table;
DROP TABLE IF EXISTS default.test_view;
CREATE TABLE default.test_table (EventDate Date, CounterID UInt32, UserID UInt64, EventTime DateTime, UTCEventTime DateTime) ENGINE = Memory;
CREATE MATERIALIZED VIEW default.test_view (Rows UInt64, MaxHitTime DateTime) ENGINE = Memory AS SELECT count() AS Rows, max(UTCEventTime) AS MaxHitTime FROM default.test_table;
INSERT INTO test_table (EventDate, UTCEventTime) VALUES ('2014-01-02', '2014-01-02 03:04:06');
SELECT * FROM default.test_table;
SELECT * FROM default.test_view;
DROP TABLE default.test_table;
DROP TABLE default.test_view;