Merge pull request #35918 from kitaisreal/jit-profile-events-added-test

JIT ProfileEvents added test
This commit is contained in:
Maksim Kita 2022-04-05 20:37:23 +02:00 committed by GitHub
commit 2c12c93d9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,4 @@
0
1
0 1 2
1

View File

@ -0,0 +1,31 @@
-- Tags: no-fasttest, no-ubsan, no-cpu-aarch64
SET compile_expressions = 1;
SET min_count_to_compile_expression = 0;
SYSTEM DROP COMPILED EXPRESSION CACHE;
SELECT number + number + number FROM numbers(1);
SYSTEM FLUSH LOGS;
SELECT ProfileEvents['CompileFunction'] FROM system.query_log WHERE
current_database = currentDatabase()
AND type = 'QueryFinish'
AND query == 'SELECT number + number + number FROM numbers(1);'
AND event_date >= yesterday() AND event_time > now() - interval 10 minute
LIMIT 1;
SET compile_aggregate_expressions = 1;
SET min_count_to_compile_aggregate_expression = 0;
SELECT sum(number), sum(number + 1), sum(number + 2) FROM numbers(1) GROUP BY number;
SYSTEM FLUSH LOGS;
SELECT ProfileEvents['CompileFunction'] FROM system.query_log WHERE
current_database = currentDatabase()
AND type = 'QueryFinish'
AND query == 'SELECT sum(number), sum(number + 1), sum(number + 2) FROM numbers(1) GROUP BY number;'
AND event_date >= yesterday() AND event_time > now() - interval 10 minute
LIMIT 1;