From 010d158d877a7295e62bc96b6190db948593f6ca Mon Sep 17 00:00:00 2001 From: Andrey Zvonov Date: Sat, 4 May 2024 21:48:04 +0000 Subject: [PATCH 01/11] set result timezone after query execution --- src/Interpreters/executeQuery.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Interpreters/executeQuery.cpp b/src/Interpreters/executeQuery.cpp index c785de61a18..cd1953f4b09 100644 --- a/src/Interpreters/executeQuery.cpp +++ b/src/Interpreters/executeQuery.cpp @@ -1525,6 +1525,8 @@ void executeQuery( throw; } + result_details.timezone = DateLUT::instance().getTimeZone(); + auto & pipeline = streams.pipeline; std::unique_ptr compressed_buffer; From d269e4eb9ff90723a0af20af97d1faccbe7c01ef Mon Sep 17 00:00:00 2001 From: Andrey Zvonov Date: Sat, 4 May 2024 22:29:53 +0000 Subject: [PATCH 02/11] check X-ClickHouse-Timezone with session_timezone setting --- .../00265_http_content_type_format_timezone.reference | 2 ++ .../0_stateless/00265_http_content_type_format_timezone.sh | 3 +++ ...zone_setting.reference => 02737_session_timezone.reference} | 0 .../{02737_timezone_setting.sql => 02737_session_timezone.sql} | 0 4 files changed, 5 insertions(+) rename tests/queries/0_stateless/{02737_timezone_setting.reference => 02737_session_timezone.reference} (100%) rename tests/queries/0_stateless/{02737_timezone_setting.sql => 02737_session_timezone.sql} (100%) diff --git a/tests/queries/0_stateless/00265_http_content_type_format_timezone.reference b/tests/queries/0_stateless/00265_http_content_type_format_timezone.reference index 9de2c3d4ba4..4b992161128 100644 --- a/tests/queries/0_stateless/00265_http_content_type_format_timezone.reference +++ b/tests/queries/0_stateless/00265_http_content_type_format_timezone.reference @@ -19,3 +19,5 @@ < Content-Type: application/octet-stream < X-ClickHouse-Format: RowBinary < X-ClickHouse-Timezone: CLICKHOUSE_TIMEZONE +< X-ClickHouse-Timezone: Europe/Berlin +< X-ClickHouse-Timezone: Africa/Cairo diff --git a/tests/queries/0_stateless/00265_http_content_type_format_timezone.sh b/tests/queries/0_stateless/00265_http_content_type_format_timezone.sh index 74cbbe7f71d..8b04bd74a96 100755 --- a/tests/queries/0_stateless/00265_http_content_type_format_timezone.sh +++ b/tests/queries/0_stateless/00265_http_content_type_format_timezone.sh @@ -13,3 +13,6 @@ ${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL}" --data-binary @- <<< "SELECT 1 FORMA ${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL}" --data-binary @- <<< "SELECT 1 FORMAT Vertical" 2>&1 | grep -e '< Content-Type' -e '< X-ClickHouse-Format' -e '< X-ClickHouse-Timezone' | sed "s|$CLICKHOUSE_TIMEZONE_ESCAPED|CLICKHOUSE_TIMEZONE|" | sed 's/\r$//' | sort; ${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL}" --data-binary @- <<< "SELECT 1 FORMAT Native" 2>&1 | grep -e '< Content-Type' -e '< X-ClickHouse-Format' -e '< X-ClickHouse-Timezone' | sed "s|$CLICKHOUSE_TIMEZONE_ESCAPED|CLICKHOUSE_TIMEZONE|" | sed 's/\r$//' | sort; ${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL}" --data-binary @- <<< "SELECT 1 FORMAT RowBinary" 2>&1 | grep -e '< Content-Type' -e '< X-ClickHouse-Format' -e '< X-ClickHouse-Timezone' | sed "s|$CLICKHOUSE_TIMEZONE_ESCAPED|CLICKHOUSE_TIMEZONE|" | sed 's/\r$//' | sort; + +${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL}" --data-binary @- <<< "SELECT timezone() SETTINGS session_timezone='Europe/Berlin'" 2>&1 | grep '< X-ClickHouse-Timezone' | grep -v 'GET' | tr -d '\r'; +${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL}" --data-binary @- <<< "SELECT timezone() SETTINGS session_timezone='Africa/Cairo'" 2>&1 | grep '< X-ClickHouse-Timezone' | grep -v 'GET' | tr -d '\r'; diff --git a/tests/queries/0_stateless/02737_timezone_setting.reference b/tests/queries/0_stateless/02737_session_timezone.reference similarity index 100% rename from tests/queries/0_stateless/02737_timezone_setting.reference rename to tests/queries/0_stateless/02737_session_timezone.reference diff --git a/tests/queries/0_stateless/02737_timezone_setting.sql b/tests/queries/0_stateless/02737_session_timezone.sql similarity index 100% rename from tests/queries/0_stateless/02737_timezone_setting.sql rename to tests/queries/0_stateless/02737_session_timezone.sql From 64b8b00f7bc16ec6476ed2c1679ada0f2f4b6ca4 Mon Sep 17 00:00:00 2001 From: Andrey Zvonov Date: Mon, 6 May 2024 07:31:28 +0000 Subject: [PATCH 03/11] add test with session_timezone as http url param --- .../00265_http_content_type_format_timezone.reference | 2 ++ .../0_stateless/00265_http_content_type_format_timezone.sh | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/tests/queries/0_stateless/00265_http_content_type_format_timezone.reference b/tests/queries/0_stateless/00265_http_content_type_format_timezone.reference index 4b992161128..39bc7e8cab8 100644 --- a/tests/queries/0_stateless/00265_http_content_type_format_timezone.reference +++ b/tests/queries/0_stateless/00265_http_content_type_format_timezone.reference @@ -21,3 +21,5 @@ < X-ClickHouse-Timezone: CLICKHOUSE_TIMEZONE < X-ClickHouse-Timezone: Europe/Berlin < X-ClickHouse-Timezone: Africa/Cairo +< X-ClickHouse-Timezone: Europe/Berlin +< X-ClickHouse-Timezone: America/Denver diff --git a/tests/queries/0_stateless/00265_http_content_type_format_timezone.sh b/tests/queries/0_stateless/00265_http_content_type_format_timezone.sh index 8b04bd74a96..e1a938c702c 100755 --- a/tests/queries/0_stateless/00265_http_content_type_format_timezone.sh +++ b/tests/queries/0_stateless/00265_http_content_type_format_timezone.sh @@ -16,3 +16,9 @@ ${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL}" --data-binary @- <<< "SELECT 1 FORMA ${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL}" --data-binary @- <<< "SELECT timezone() SETTINGS session_timezone='Europe/Berlin'" 2>&1 | grep '< X-ClickHouse-Timezone' | grep -v 'GET' | tr -d '\r'; ${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL}" --data-binary @- <<< "SELECT timezone() SETTINGS session_timezone='Africa/Cairo'" 2>&1 | grep '< X-ClickHouse-Timezone' | grep -v 'GET' | tr -d '\r'; + +# Not pretty but working way of removing randomized session_timezone for this part of test +CLICKHOUSE_URL_WO_SESSION_TZ=$(echo "${CLICKHOUSE_URL}" |sed 's/\&session_timezone\=\([A-Za-z]*\(\%2F\|\/\)[A-Za-z]*\|[A-Za-z0-9\+\-]*\)//g' | sed 's/\?session_timezone\=\([A-Za-z]*\(\%2F\|\/\)[A-Za-z]*\|[A-Za-z0-9\+\-]*\)\&/\?/g'); + +${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL_WO_SESSION_TZ}&session_timezone=Europe/Berlin&query=SELECT+timezone()" 2>&1 | grep '< X-ClickHouse-Timezone' | grep -v 'GET' | tr -d '\r'; +${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL_WO_SESSION_TZ}&session_timezone=America/Denver&query=SELECT+timezone()" 2>&1 | grep '< X-ClickHouse-Timezone' | grep -v 'GET' | tr -d '\r'; From 10907ec4ee18a1a7a6090a9e73cebfa0ce242e0f Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Mon, 6 May 2024 11:05:16 +0200 Subject: [PATCH 04/11] Fix data race in reportBrokenPart --- src/Storages/MergeTree/MergeTreeData.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/Storages/MergeTree/MergeTreeData.cpp b/src/Storages/MergeTree/MergeTreeData.cpp index 9350b24c96a..99a5fc25f99 100644 --- a/src/Storages/MergeTree/MergeTreeData.cpp +++ b/src/Storages/MergeTree/MergeTreeData.cpp @@ -7300,10 +7300,19 @@ void MergeTreeData::reportBrokenPart(MergeTreeData::DataPartPtr data_part) const broken_part_callback(part->name); } } - else if (data_part->getState() == MergeTreeDataPartState::Active) - broken_part_callback(data_part->name); else - LOG_DEBUG(log, "Will not check potentially broken part {} because it's not active", data_part->getNameWithState()); + { + MergeTreeDataPartState state = MergeTreeDataPartState::Temporary; + { + auto lock = lockParts(); + state = data_part->getState(); + } + + if (state == MergeTreeDataPartState::Active) + broken_part_callback(data_part->name); + else + LOG_DEBUG(log, "Will not check potentially broken part {} because it's not active", data_part->getNameWithState()); + } } MergeTreeData::MatcherFn MergeTreeData::getPartitionMatcher(const ASTPtr & partition_ast, ContextPtr local_context) const From 14c8af4d55080cb11720632f0a4c54267b0ab237 Mon Sep 17 00:00:00 2001 From: Andrey Zvonov Date: Mon, 6 May 2024 11:27:32 +0000 Subject: [PATCH 05/11] make regexp shorter and better --- .../0_stateless/00265_http_content_type_format_timezone.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/queries/0_stateless/00265_http_content_type_format_timezone.sh b/tests/queries/0_stateless/00265_http_content_type_format_timezone.sh index e1a938c702c..fb5ea456ed7 100755 --- a/tests/queries/0_stateless/00265_http_content_type_format_timezone.sh +++ b/tests/queries/0_stateless/00265_http_content_type_format_timezone.sh @@ -18,7 +18,7 @@ ${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL}" --data-binary @- <<< "SELECT timezon ${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL}" --data-binary @- <<< "SELECT timezone() SETTINGS session_timezone='Africa/Cairo'" 2>&1 | grep '< X-ClickHouse-Timezone' | grep -v 'GET' | tr -d '\r'; # Not pretty but working way of removing randomized session_timezone for this part of test -CLICKHOUSE_URL_WO_SESSION_TZ=$(echo "${CLICKHOUSE_URL}" |sed 's/\&session_timezone\=\([A-Za-z]*\(\%2F\|\/\)[A-Za-z]*\|[A-Za-z0-9\+\-]*\)//g' | sed 's/\?session_timezone\=\([A-Za-z]*\(\%2F\|\/\)[A-Za-z]*\|[A-Za-z0-9\+\-]*\)\&/\?/g'); +CLICKHOUSE_URL_WO_SESSION_TZ=$(echo "${CLICKHOUSE_URL}" |sed 's/\&session_timezone\=[A-Za-z0-9\/\%\_\-\+\-]*//g' | sed 's/\?session_timezone\=[A-Za-z0-9\/\%\_\-\+\-]*\&/\?/g'); ${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL_WO_SESSION_TZ}&session_timezone=Europe/Berlin&query=SELECT+timezone()" 2>&1 | grep '< X-ClickHouse-Timezone' | grep -v 'GET' | tr -d '\r'; ${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL_WO_SESSION_TZ}&session_timezone=America/Denver&query=SELECT+timezone()" 2>&1 | grep '< X-ClickHouse-Timezone' | grep -v 'GET' | tr -d '\r'; From 942bd6af6107a9d1d66c2504f33afaa6f6a0f412 Mon Sep 17 00:00:00 2001 From: Andrey Zvonov <32552679+zvonand@users.noreply.github.com> Date: Mon, 6 May 2024 16:15:32 +0200 Subject: [PATCH 06/11] Explain updating `result_details.timezone` --- src/Interpreters/executeQuery.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Interpreters/executeQuery.cpp b/src/Interpreters/executeQuery.cpp index cd1953f4b09..1923e8ae78a 100644 --- a/src/Interpreters/executeQuery.cpp +++ b/src/Interpreters/executeQuery.cpp @@ -1525,6 +1525,8 @@ void executeQuery( throw; } + /// The timezone was already set before query was processed, + /// But `session_timezone` setting could be modified in the query itself, so we update the value. result_details.timezone = DateLUT::instance().getTimeZone(); auto & pipeline = streams.pipeline; From c3abf7f462985ec4e05fbac076373d787f04721c Mon Sep 17 00:00:00 2001 From: Andrey Zvonov Date: Mon, 6 May 2024 14:55:34 +0000 Subject: [PATCH 07/11] propagate session_timezone to result_details when query fails --- src/Interpreters/executeQuery.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Interpreters/executeQuery.cpp b/src/Interpreters/executeQuery.cpp index 1923e8ae78a..c471035df1d 100644 --- a/src/Interpreters/executeQuery.cpp +++ b/src/Interpreters/executeQuery.cpp @@ -1522,6 +1522,9 @@ void executeQuery( if (output_format) handle_exception_in_output_format(*output_format, format_name, context, output_format_settings); } + /// The timezone was already set before query was processed, + /// But `session_timezone` setting could be modified in the query itself, so we update the value. + result_details.timezone = DateLUT::instance().getTimeZone(); throw; } From 962ebd1a9b8ac03e7874edb15ced7037792a2ba7 Mon Sep 17 00:00:00 2001 From: Andrey Zvonov Date: Mon, 6 May 2024 15:17:46 +0000 Subject: [PATCH 08/11] add test for failing query --- .../00265_http_content_type_format_timezone.reference | 1 + .../0_stateless/00265_http_content_type_format_timezone.sh | 2 ++ 2 files changed, 3 insertions(+) diff --git a/tests/queries/0_stateless/00265_http_content_type_format_timezone.reference b/tests/queries/0_stateless/00265_http_content_type_format_timezone.reference index 39bc7e8cab8..cd44e2d1aa0 100644 --- a/tests/queries/0_stateless/00265_http_content_type_format_timezone.reference +++ b/tests/queries/0_stateless/00265_http_content_type_format_timezone.reference @@ -23,3 +23,4 @@ < X-ClickHouse-Timezone: Africa/Cairo < X-ClickHouse-Timezone: Europe/Berlin < X-ClickHouse-Timezone: America/Denver +< X-ClickHouse-Timezone: Europe/Lisbon diff --git a/tests/queries/0_stateless/00265_http_content_type_format_timezone.sh b/tests/queries/0_stateless/00265_http_content_type_format_timezone.sh index fb5ea456ed7..86e76de133d 100755 --- a/tests/queries/0_stateless/00265_http_content_type_format_timezone.sh +++ b/tests/queries/0_stateless/00265_http_content_type_format_timezone.sh @@ -22,3 +22,5 @@ CLICKHOUSE_URL_WO_SESSION_TZ=$(echo "${CLICKHOUSE_URL}" |sed 's/\&session_timezo ${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL_WO_SESSION_TZ}&session_timezone=Europe/Berlin&query=SELECT+timezone()" 2>&1 | grep '< X-ClickHouse-Timezone' | grep -v 'GET' | tr -d '\r'; ${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL_WO_SESSION_TZ}&session_timezone=America/Denver&query=SELECT+timezone()" 2>&1 | grep '< X-ClickHouse-Timezone' | grep -v 'GET' | tr -d '\r'; +# check that proper X-ClickHouse-Timezone returned on query fail +${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL_WO_SESSION_TZ}&session_timezone=UTC&query=SELECT+intDiv(1,+(3600-timeZoneOffset(now())))+SETTINGS+session_timezone+=+'Europe/Lisbon'" 2>&1 | grep '< X-ClickHouse-Timezone' | grep -v 'GET' | tr -d '\r'; From 8e51419998f6e12a2eeb3f84c1270b67d59670e9 Mon Sep 17 00:00:00 2001 From: Alexander Gololobov Date: Mon, 6 May 2024 17:25:23 +0200 Subject: [PATCH 09/11] Hardcode DateTime instead of now() to make test stable --- .../0_stateless/00265_http_content_type_format_timezone.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/queries/0_stateless/00265_http_content_type_format_timezone.sh b/tests/queries/0_stateless/00265_http_content_type_format_timezone.sh index 86e76de133d..813d839a2ad 100755 --- a/tests/queries/0_stateless/00265_http_content_type_format_timezone.sh +++ b/tests/queries/0_stateless/00265_http_content_type_format_timezone.sh @@ -23,4 +23,4 @@ CLICKHOUSE_URL_WO_SESSION_TZ=$(echo "${CLICKHOUSE_URL}" |sed 's/\&session_timezo ${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL_WO_SESSION_TZ}&session_timezone=Europe/Berlin&query=SELECT+timezone()" 2>&1 | grep '< X-ClickHouse-Timezone' | grep -v 'GET' | tr -d '\r'; ${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL_WO_SESSION_TZ}&session_timezone=America/Denver&query=SELECT+timezone()" 2>&1 | grep '< X-ClickHouse-Timezone' | grep -v 'GET' | tr -d '\r'; # check that proper X-ClickHouse-Timezone returned on query fail -${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL_WO_SESSION_TZ}&session_timezone=UTC&query=SELECT+intDiv(1,+(3600-timeZoneOffset(now())))+SETTINGS+session_timezone+=+'Europe/Lisbon'" 2>&1 | grep '< X-ClickHouse-Timezone' | grep -v 'GET' | tr -d '\r'; +${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL_WO_SESSION_TZ}&session_timezone=UTC&query=SELECT+intDiv(1,+(3600-timeZoneOffset('2024-05-06+12:00:00'::DateTime)))+SETTINGS+session_timezone+=+'Europe/Lisbon'" 2>&1 | grep '< X-ClickHouse-Timezone' | grep -v 'GET' | tr -d '\r'; From c8e761116a9d6fead08472e232438695082d7649 Mon Sep 17 00:00:00 2001 From: Andrey Zvonov Date: Mon, 6 May 2024 15:51:16 +0000 Subject: [PATCH 10/11] add more tests for session_timezone --- .../00265_http_content_type_format_timezone.reference | 1 + .../0_stateless/00265_http_content_type_format_timezone.sh | 2 ++ tests/queries/0_stateless/02737_session_timezone.reference | 1 + tests/queries/0_stateless/02737_session_timezone.sql | 3 +++ 4 files changed, 7 insertions(+) diff --git a/tests/queries/0_stateless/00265_http_content_type_format_timezone.reference b/tests/queries/0_stateless/00265_http_content_type_format_timezone.reference index cd44e2d1aa0..caf1c25eb6c 100644 --- a/tests/queries/0_stateless/00265_http_content_type_format_timezone.reference +++ b/tests/queries/0_stateless/00265_http_content_type_format_timezone.reference @@ -24,3 +24,4 @@ < X-ClickHouse-Timezone: Europe/Berlin < X-ClickHouse-Timezone: America/Denver < X-ClickHouse-Timezone: Europe/Lisbon +< X-ClickHouse-Timezone: Europe/Lisbon diff --git a/tests/queries/0_stateless/00265_http_content_type_format_timezone.sh b/tests/queries/0_stateless/00265_http_content_type_format_timezone.sh index 813d839a2ad..9ca801a1417 100755 --- a/tests/queries/0_stateless/00265_http_content_type_format_timezone.sh +++ b/tests/queries/0_stateless/00265_http_content_type_format_timezone.sh @@ -24,3 +24,5 @@ ${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL_WO_SESSION_TZ}&session_timezone=Europe ${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL_WO_SESSION_TZ}&session_timezone=America/Denver&query=SELECT+timezone()" 2>&1 | grep '< X-ClickHouse-Timezone' | grep -v 'GET' | tr -d '\r'; # check that proper X-ClickHouse-Timezone returned on query fail ${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL_WO_SESSION_TZ}&session_timezone=UTC&query=SELECT+intDiv(1,+(3600-timeZoneOffset('2024-05-06+12:00:00'::DateTime)))+SETTINGS+session_timezone+=+'Europe/Lisbon'" 2>&1 | grep '< X-ClickHouse-Timezone' | grep -v 'GET' | tr -d '\r'; +# main query's session_timezone shall be set in header +${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL_WO_SESSION_TZ}&session_timezone=America/New_York&query=SELECT+1,(SELECT+1+SETTINGS+session_timezone='UTC')+SETTINGS+session_timezone='Europe/Lisbon'" 2>&1 | grep '< X-ClickHouse-Timezone' | grep -v 'GET' | tr -d '\r'; diff --git a/tests/queries/0_stateless/02737_session_timezone.reference b/tests/queries/0_stateless/02737_session_timezone.reference index 578aec4e316..6c6fc2aa93a 100644 --- a/tests/queries/0_stateless/02737_session_timezone.reference +++ b/tests/queries/0_stateless/02737_session_timezone.reference @@ -2,6 +2,7 @@ Pacific/Pitcairn Pacific/Pitcairn Asia/Novosibirsk Asia/Novosibirsk 2022-12-12 17:23:23 2022-12-13 07:23:23.123 +2022-12-13 07:23:23 2022-12-13 07:23:23 2002-12-12 23:23:23 2002-12-12 23:23:23 2002-12-12 23:23:23.123 2002-12-12 23:23:23.123 2000-01-01 01:00:00 diff --git a/tests/queries/0_stateless/02737_session_timezone.sql b/tests/queries/0_stateless/02737_session_timezone.sql index 8543e2a2c82..1afadbde6df 100644 --- a/tests/queries/0_stateless/02737_session_timezone.sql +++ b/tests/queries/0_stateless/02737_session_timezone.sql @@ -9,6 +9,9 @@ SELECT timezone(), timezoneOf(now()); SELECT toDateTime(toDateTime('2022-12-12 23:23:23'), 'Europe/Zurich'); SELECT toDateTime64(toDateTime64('2022-12-12 23:23:23.123', 3), 3, 'Europe/Zurich') SETTINGS session_timezone = 'America/Denver'; +-- subquery shall use main query's session_timezone +SELECT toDateTime(toDateTime('2022-12-12 23:23:23'), 'Europe/Zurich'), (SELECT toDateTime(toDateTime('2022-12-12 23:23:23'), 'Europe/Zurich') SETTINGS session_timezone = 'Europe/Helsinki') SETTINGS session_timezone = 'America/Denver'; + -- test proper serialization SELECT toDateTime('2002-12-12 23:23:23') AS dt, toString(dt) SETTINGS session_timezone = 'Asia/Phnom_Penh'; SELECT toDateTime64('2002-12-12 23:23:23.123', 3) AS dt64, toString(dt64) SETTINGS session_timezone = 'Asia/Phnom_Penh'; From 98fb9f36a90fdc7220557177977e70897d1f0e88 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Tue, 7 May 2024 05:35:04 +0200 Subject: [PATCH 11/11] We are using Shared Catalog in the CI Logs cluster --- docker/test/base/setup_export_logs.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/docker/test/base/setup_export_logs.sh b/docker/test/base/setup_export_logs.sh index 8858e12c50e..dc91a5c927d 100755 --- a/docker/test/base/setup_export_logs.sh +++ b/docker/test/base/setup_export_logs.sh @@ -127,9 +127,6 @@ function setup_logs_replication echo 'Create all configured system logs' clickhouse-client --query "SYSTEM FLUSH LOGS" - # It's doesn't make sense to try creating tables if SYNC fails - echo "SYSTEM SYNC DATABASE REPLICA default" | clickhouse-client "${CONNECTION_ARGS[@]}" || return 0 - debug_or_sanitizer_build=$(clickhouse-client -q "WITH ((SELECT value FROM system.build_options WHERE name='BUILD_TYPE') AS build, (SELECT value FROM system.build_options WHERE name='CXX_FLAGS') as flags) SELECT build='Debug' OR flags LIKE '%fsanitize%'") echo "Build is debug or sanitizer: $debug_or_sanitizer_build"