mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Test the 'partitions' field of system.query_log
This commit is contained in:
parent
2255b0287a
commit
e138289fbf
@ -0,0 +1,2 @@
|
||||
3 3
|
||||
02751_query_log_test_partitions.3
|
@ -0,0 +1,20 @@
|
||||
set log_queries=1;
|
||||
set log_queries_min_type='QUERY_FINISH';
|
||||
|
||||
DROP TABLE IF EXISTS 02751_query_log_test_partitions;
|
||||
CREATE TABLE 02751_query_log_test_partitions (a Int64, b Int64) ENGINE = MergeTree PARTITION BY a ORDER BY b;
|
||||
|
||||
SYSTEM STOP MERGES 02751_query_log_test_partitions;
|
||||
INSERT INTO 02751_query_log_test_partitions SELECT number, number FROM numbers(5);
|
||||
|
||||
SELECT * FROM 02751_query_log_test_partitions WHERE a = 3;
|
||||
SYSTEM FLUSH LOGS;
|
||||
|
||||
SELECT
|
||||
--Remove the prefix string which is a mutable database name.
|
||||
arrayStringConcat(arrayPopFront(splitByString('.', partitions[1])), '.')
|
||||
FROM
|
||||
system.query_log
|
||||
WHERE
|
||||
current_database=currentDatabase() and
|
||||
query = 'SELECT * FROM 02751_query_log_test_partitions WHERE a = 3;'
|
Loading…
Reference in New Issue
Block a user