Apply suggestions from code review

Co-authored-by: filimonov <1549571+filimonov@users.noreply.github.com>
This commit is contained in:
Alexander Kuzmenkov 2020-10-22 20:46:17 +03:00 committed by GitHub
parent 77f66e5a09
commit ef39def7ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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();

View File

@ -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}"