mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Add some basic tests to read rows with scalar subqueries
This commit is contained in:
parent
2470a8d380
commit
781fe36391
@ -0,0 +1,9 @@
|
||||
#02136_scalar_subquery_1 999
|
||||
#02136_scalar_subquery_2 999 0
|
||||
#02136_scalar_subquery_3 999 999
|
||||
#02136_scalar_subquery_4 999
|
||||
#02136_scalar_subquery_4 999
|
||||
1001 SELECT \'#02136_scalar_subquery_1\', (SELECT max(number) FROM numbers(1000)) as n;
|
||||
2001 SELECT \'#02136_scalar_subquery_2\', (SELECT max(number) FROM numbers(1000)) as n, (SELECT min(number) FROM numbers(1000)) as n2;
|
||||
1001 SELECT \'#02136_scalar_subquery_3\', (SELECT max(number) FROM numbers(1000)) as n, (SELECT max(number) FROM numbers(1000)) as n2;
|
||||
1002 SELECT \'#02136_scalar_subquery_4\', (SELECT max(number) FROM numbers(1000)) as n FROM system.numbers LIMIT 2;
|
13
tests/queries/0_stateless/02136_scalar_subquery_metrics.sql
Normal file
13
tests/queries/0_stateless/02136_scalar_subquery_metrics.sql
Normal file
@ -0,0 +1,13 @@
|
||||
SELECT '#02136_scalar_subquery_1', (SELECT max(number) FROM numbers(1000)) as n;
|
||||
SELECT '#02136_scalar_subquery_2', (SELECT max(number) FROM numbers(1000)) as n, (SELECT min(number) FROM numbers(1000)) as n2;
|
||||
SELECT '#02136_scalar_subquery_3', (SELECT max(number) FROM numbers(1000)) as n, (SELECT max(number) FROM numbers(1000)) as n2; -- Cached
|
||||
SELECT '#02136_scalar_subquery_4', (SELECT max(number) FROM numbers(1000)) as n FROM system.numbers LIMIT 2; -- Cached
|
||||
|
||||
SYSTEM FLUSH LOGS;
|
||||
SELECT read_rows, query FROM system.query_log
|
||||
WHERE
|
||||
event_date > yesterday()
|
||||
AND type = 'QueryFinish'
|
||||
AND current_database == currentDatabase()
|
||||
AND query LIKE 'SELECT ''#02136_scalar_subquery_%'
|
||||
ORDER BY query ASC;
|
Loading…
Reference in New Issue
Block a user