mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-21 01:00:48 +00:00
Test that JSON output statistics include the rows read in scalar subqueries
This commit is contained in:
parent
cb22091b33
commit
b71a71d7f5
@ -0,0 +1,50 @@
|
||||
#1
|
||||
{
|
||||
"meta":
|
||||
[
|
||||
{
|
||||
"name": "count()",
|
||||
"type": "UInt64"
|
||||
}
|
||||
],
|
||||
|
||||
"data":
|
||||
[
|
||||
{
|
||||
"count()": "100"
|
||||
}
|
||||
],
|
||||
|
||||
"rows": 1,
|
||||
|
||||
"rows_before_limit_at_least": 100,
|
||||
|
||||
"statistics":
|
||||
{
|
||||
"rows_read": 100,
|
||||
"bytes_read": 800
|
||||
}
|
||||
}
|
||||
#2
|
||||
{
|
||||
"meta":
|
||||
[
|
||||
{
|
||||
"type": "Tuple(UInt64, UInt64)"
|
||||
}
|
||||
],
|
||||
|
||||
"data":
|
||||
[
|
||||
{
|
||||
}
|
||||
],
|
||||
|
||||
"rows": 1,
|
||||
|
||||
"statistics":
|
||||
{
|
||||
"rows_read": 131011,
|
||||
"bytes_read": 1048081
|
||||
}
|
||||
}
|
10
tests/queries/0_stateless/02136_scalar_read_rows_json.sh
Executable file
10
tests/queries/0_stateless/02136_scalar_read_rows_json.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
# Ref: https://github.com/ClickHouse/ClickHouse/issues/1576
|
||||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
# shellcheck source=../shell_config.sh
|
||||
. "$CURDIR"/../shell_config.sh
|
||||
|
||||
echo "#1"
|
||||
${CLICKHOUSE_CLIENT} --query='SELECT count() FROM numbers(100) FORMAT JSON;' | grep -a -v "elapsed"
|
||||
echo "#2"
|
||||
${CLICKHOUSE_CLIENT} --query='SELECT (SELECT max(number), count(number) FROM numbers(100000) as n) FORMAT JSON;' | grep -a -v "elapsed" | grep -v "_subquery"
|
Loading…
Reference in New Issue
Block a user