mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 07:01:59 +00:00
Apply suggestions from code review
Co-authored-by: filimonov <1549571+filimonov@users.noreply.github.com>
This commit is contained in:
parent
77f66e5a09
commit
ef39def7ff
@ -336,7 +336,7 @@ void LocalServer::processQueries()
|
||||
throw Exception("Cannot parse and execute the following part of query: " + String(parse_res.first), ErrorCodes::SYNTAX_ERROR);
|
||||
|
||||
/// we can't mutate global global_context (can lead to races, as it was already passed to some background threads)
|
||||
/// so we can't reuse it safely as a query global_context and need a copy here
|
||||
/// so we can't reuse it safely as a query context and need a copy here
|
||||
auto context = Context(*global_context);
|
||||
|
||||
context.makeSessionContext();
|
||||
|
@ -3,7 +3,7 @@
|
||||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
. "$CURDIR"/../shell_config.sh
|
||||
|
||||
WORKING_FOLDER_01528="${CLICKHOUSE_TMP}/01527_clickhouse_local_optimize"
|
||||
WORKING_FOLDER_01528="${CLICKHOUSE_TMP}/01528_clickhouse_local_prepare_parts"
|
||||
rm -rf "${WORKING_FOLDER_01528}"
|
||||
|
||||
mkdir -p "${WORKING_FOLDER_01528}/metadata/local"
|
||||
@ -80,4 +80,4 @@ ${CLICKHOUSE_LOCAL} --query "OPTIMIZE TABLE local.test FINAL;" -- --path="${WORK
|
||||
${CLICKHOUSE_LOCAL} --query "SELECT toYYYYMM(d) m, uniqExact(_part) FROM local.test GROUP BY m ORDER BY m" -- --path="${WORKING_FOLDER_01528}"
|
||||
|
||||
# cleanup
|
||||
rm -rf "${WORKING_FOLDER_01528}"
|
||||
rm -rf "${WORKING_FOLDER_01528}"
|
||||
|
Loading…
Reference in New Issue
Block a user