Merge pull request #52628 from ClickHouse/load-suggestion-only-with-clickhouse-dialect

Load suggestion only with `clickhouse` dialect
This commit is contained in:
Alexey Milovidov 2023-07-28 10:21:53 +03:00 committed by GitHub
commit a465dba311
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 1 deletions

View File

@ -584,7 +584,9 @@ void LocalServer::processConfig()
}
print_stack_trace = config().getBool("stacktrace", false);
load_suggestions = (is_interactive || delayed_interactive) && !config().getBool("disable_suggestion", false);
const std::string clickhouse_dialect{"clickhouse"};
load_suggestions = (is_interactive || delayed_interactive) && !config().getBool("disable_suggestion", false)
&& config().getString("dialect", clickhouse_dialect) == clickhouse_dialect;
auto logging = (config().has("logger.console")
|| config().has("logger.level")

View File

@ -0,0 +1,2 @@
0
[?2004h[?2004lBye.

View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
# Tags: no-fasttest, no-random-settings
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CUR_DIR"/../shell_config.sh
echo "exit" | ${CLICKHOUSE_LOCAL} --query "from s\"SELECT * FROM numbers(1)\"" --dialect prql --interactive