Add a test

This commit is contained in:
Alexey Milovidov 2024-05-07 06:16:22 +02:00
parent a81f21ea8c
commit e721135777
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,6 @@
7385
7385
7385
7385
86401
86401

View File

@ -0,0 +1,12 @@
DROP TABLE IF EXISTS test;
CREATE TABLE test (d DateTime, PRIMARY KEY (d));
INSERT INTO test SELECT toDateTime('2024-01-01') + number FROM numbers(1e6);
SET max_rows_to_read = 10000;
SELECT count() FROM test WHERE d <= '2024-01-01 02:03:04';
SELECT count() FROM test WHERE d <= toDateTime('2024-01-01 02:03:04');
SELECT count() FROM test WHERE d <= toDateTime64('2024-01-01 02:03:04', 0);
SELECT count() FROM test WHERE d <= toDateTime64('2024-01-01 02:03:04', 3);
SET max_rows_to_read = 100_000;
SELECT count() FROM test WHERE d <= '2024-01-02';
SELECT count() FROM test WHERE d <= toDate('2024-01-02');
DROP TABLE test;