mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
Disable pretty format restrictions when stdout is not TTY
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
parent
3d76de3fec
commit
1525ca4cf0
@ -710,8 +710,8 @@ void ClientBase::adjustSettings()
|
||||
settings.input_format_values_allow_data_after_semicolon.changed = false;
|
||||
}
|
||||
|
||||
/// Do not limit pretty format output in case of --pager specified.
|
||||
if (!pager.empty())
|
||||
/// Do not limit pretty format output in case of --pager specified or in case of stdout is not a tty.
|
||||
if (!pager.empty() || !stdout_is_a_tty)
|
||||
{
|
||||
if (!global_context->getSettingsRef().output_format_pretty_max_rows.changed)
|
||||
{
|
||||
|
@ -0,0 +1 @@
|
||||
100004
|
8
tests/queries/0_stateless/03160_pretty_format_tty.sh
Executable file
8
tests/queries/0_stateless/03160_pretty_format_tty.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
# shellcheck source=../shell_config.sh
|
||||
. "$CUR_DIR"/../shell_config.sh
|
||||
|
||||
# default output_format_pretty_max_rows is 10K
|
||||
$CLICKHOUSE_LOCAL -q "select * from numbers(100e3) format PrettySpace settings max_threads=1" | wc -l
|
Loading…
Reference in New Issue
Block a user