From 0a6142a039dfebb086fed6bb7cb38121ed904a33 Mon Sep 17 00:00:00 2001 From: taiyang-li <654010905@qq.com> Date: Sun, 7 Nov 2021 20:20:35 +0800 Subject: [PATCH 001/841] add map function mapFromArrays --- src/Functions/map.cpp | 68 +++++++++++++++++++ .../0_stateless/01651_map_functions.reference | 3 + .../0_stateless/01651_map_functions.sql | 9 ++- 3 files changed, 78 insertions(+), 2 deletions(-) diff --git a/src/Functions/map.cpp b/src/Functions/map.cpp index 03a9da404c2..994eda1ec62 100644 --- a/src/Functions/map.cpp +++ b/src/Functions/map.cpp @@ -26,6 +26,7 @@ namespace ErrorCodes { extern const int NUMBER_OF_ARGUMENTS_DOESNT_MATCH; extern const int ILLEGAL_TYPE_OF_ARGUMENT; + extern const int SIZES_OF_ARRAYS_DOESNT_MATCH; } namespace @@ -144,6 +145,72 @@ public: } }; +// mapFromArrays(keys, values) is a function that allows you to make key-value pair from a pair of arrays +class FunctionMapFromArrays : public IFunction +{ +public: + static constexpr auto name = "mapFromArrays"; + + static FunctionPtr create(ContextPtr) + { + return std::make_shared(); + } + + String getName() const override + { + return name; + } + + size_t getNumberOfArguments() const override + { + return 2; + } + + bool isSuitableForShortCircuitArgumentsExecution(const DataTypesWithConstInfo & /*arguments*/) const override { return false; } + bool useDefaultImplementationForNulls() const override { return false; } + bool useDefaultImplementationForConstants() const override { return true; } + + DataTypePtr getReturnTypeImpl(const DataTypes & arguments) const override + { + if (arguments.size() != 2) + throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, + "Function {} requires 2 arguments, but {} given", getName(), arguments.size()); + + const auto * keys_type = checkAndGetDataType(arguments[0].get()); + if (!keys_type) + throw Exception{"First argument for function " + getName() + " must be a Array", + ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT}; + + const auto * values_type = checkAndGetDataType(arguments[1].get()); + if (!values_type) + throw Exception{"Second argument for function " + getName() + " must be a Array", + ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT}; + + DataTypes tmp; + const auto & key_type = keys_type->getNestedType(); + const auto & value_type = values_type->getNestedType(); + tmp.emplace_back(key_type); + tmp.emplace_back(value_type); + return std::make_shared(tmp); + } + + ColumnPtr executeImpl( + const ColumnsWithTypeAndName & arguments, const DataTypePtr & /* result_type */, size_t /* input_rows_count */) const override + { + const auto * col_keys = typeid_cast(arguments[0].column.get()); + const auto * col_values = typeid_cast(arguments[1].column.get()); + if (!col_keys->hasEqualOffsets(*col_values)) + throw Exception("Array arguments for function " + getName() + " must have equal sizes", ErrorCodes::SIZES_OF_ARRAYS_DOESNT_MATCH); + + const auto & data_keys = col_keys->getDataPtr(); + const auto & data_values = col_values->getDataPtr(); + const auto & offsets = col_keys->getOffsetsPtr(); + auto nested_column = ColumnArray::create( + ColumnTuple::create(Columns{std::move(data_keys), std::move(data_values)}), + std::move(offsets)); + return ColumnMap::create(nested_column); + } +}; struct NameMapContains { static constexpr auto name = "mapContains"; }; @@ -528,6 +595,7 @@ void registerFunctionsMap(FunctionFactory & factory) factory.registerFunction(); factory.registerFunction(); factory.registerFunction(); + factory.registerFunction(); } } diff --git a/tests/queries/0_stateless/01651_map_functions.reference b/tests/queries/0_stateless/01651_map_functions.reference index 06adaf48cfd..30579f8c4ee 100644 --- a/tests/queries/0_stateless/01651_map_functions.reference +++ b/tests/queries/0_stateless/01651_map_functions.reference @@ -8,6 +8,8 @@ 0 ['name','age'] ['name','gender'] +{'name':'zhangsan','age':'10'} +{'name':'lisi','gender':'female'} 1 0 0 1 0 1 1 0 0 @@ -21,3 +23,4 @@ {'aa':4,'bb':5} 1 0 {0:0} 1 {0:0} 0 +{'aa':4,'bb':5} diff --git a/tests/queries/0_stateless/01651_map_functions.sql b/tests/queries/0_stateless/01651_map_functions.sql index bbaaf9bee84..83ee42f17a5 100644 --- a/tests/queries/0_stateless/01651_map_functions.sql +++ b/tests/queries/0_stateless/01651_map_functions.sql @@ -2,14 +2,15 @@ set allow_experimental_map_type = 1; -- String type drop table if exists table_map; -create table table_map (a Map(String, String), b String) engine = Memory; -insert into table_map values ({'name':'zhangsan', 'age':'10'}, 'name'), ({'name':'lisi', 'gender':'female'},'age'); +create table table_map (a Map(String, String), b String, c Array(String), d Array(String)) engine = Memory; +insert into table_map values ({'name':'zhangsan', 'age':'10'}, 'name', ['name', 'age'], ['zhangsan', '10']), ({'name':'lisi', 'gender':'female'},'age',['name', 'gender'], ['lisi', 'female']); select mapContains(a, 'name') from table_map; select mapContains(a, 'gender') from table_map; select mapContains(a, 'abc') from table_map; select mapContains(a, b) from table_map; select mapContains(a, 10) from table_map; -- { serverError 386 } select mapKeys(a) from table_map; +select mapFromArrays(c, d) from table_map; drop table if exists table_map; CREATE TABLE table_map (a Map(UInt8, Int), b UInt8, c UInt32) engine = MergeTree order by tuple(); @@ -27,3 +28,7 @@ select map( 'aa', 4, 'bb' , 5) as m, mapKeys(m), mapValues(m); select map( 'aa', 4, 'bb' , 5) as m, mapContains(m, 'aa'), mapContains(m, 'k'); select map(0, 0) as m, mapContains(m, number % 2) from numbers(2); + +select mapFromArrays(['aa', 'bb'], [4, 5]); +select mapFromArrays(['aa', 'bb'], [4, 5], [6, 7]); -- { serverError 42 } +select mapFromArrays(['aa', 'bb'], [4, 5, 6]); -- { serverError 190 } From 38a1afaca70d93c562b8e71f05a55fb7465f170b Mon Sep 17 00:00:00 2001 From: taiyang-li <654010905@qq.com> Date: Sun, 7 Nov 2021 20:51:14 +0800 Subject: [PATCH 002/841] add docs --- .../functions/tuple-map-functions.md | 32 +++++++++++++++++++ .../0_stateless/01651_map_functions.reference | 3 ++ .../0_stateless/01651_map_functions.sql | 5 +-- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/docs/en/sql-reference/functions/tuple-map-functions.md b/docs/en/sql-reference/functions/tuple-map-functions.md index 47e33806930..3c86dc9c9bb 100644 --- a/docs/en/sql-reference/functions/tuple-map-functions.md +++ b/docs/en/sql-reference/functions/tuple-map-functions.md @@ -429,6 +429,38 @@ Result: │ {} │ └────────────────────────────┘ ``` + + +## mapFromArrays {#mapFromArrays} + +**Syntax** + +```sql +mapFromArrays(keys, values) +``` + +**Parameters** + +- `keys` — Given key array to create a map from. +- `values` - Given value array to create a map from. + +**Returned value** + +- A map whose keys and values are from input arrays respectively. + +**Example** + +Query: + +```sql +select mapFromArrays(['a', 'b', 'c'], [1, 2, 3]) +``` + +```text +┌─mapFromArrays(['a', 'b', 'c'], [1, 2, 3])─┐ +│ {'a':1,'b':2,'c':3} │ +└───────────────────────────────────────────┘ +``` [Original article](https://clickhouse.com/docs/en/sql-reference/functions/tuple-map-functions/) diff --git a/tests/queries/0_stateless/01651_map_functions.reference b/tests/queries/0_stateless/01651_map_functions.reference index 30579f8c4ee..05dcb8f2cf5 100644 --- a/tests/queries/0_stateless/01651_map_functions.reference +++ b/tests/queries/0_stateless/01651_map_functions.reference @@ -19,6 +19,9 @@ [1000] [1001] [1002] +{'1000':'2000','1000':'3000','1000':'4000'} +{'1001':'2002','1001':'3003','1001':'4004'} +{'1002':'2004','1002':'3006','1002':'4008'} {'aa':4,'bb':5} ['aa','bb'] [4,5] {'aa':4,'bb':5} 1 0 {0:0} 1 diff --git a/tests/queries/0_stateless/01651_map_functions.sql b/tests/queries/0_stateless/01651_map_functions.sql index 83ee42f17a5..6ecd5bce494 100644 --- a/tests/queries/0_stateless/01651_map_functions.sql +++ b/tests/queries/0_stateless/01651_map_functions.sql @@ -13,13 +13,14 @@ select mapKeys(a) from table_map; select mapFromArrays(c, d) from table_map; drop table if exists table_map; -CREATE TABLE table_map (a Map(UInt8, Int), b UInt8, c UInt32) engine = MergeTree order by tuple(); -insert into table_map select map(number, number), number, number from numbers(1000, 3); +CREATE TABLE table_map (a Map(UInt8, Int), b UInt8, c UInt32, d Array(String), e Array(String)) engine = MergeTree order by tuple(); +insert into table_map select map(number, number), number, number, [number, number, number], [number*2, number*3, number*4] from numbers(1000, 3); select mapContains(a, b), mapContains(a, c), mapContains(a, 233) from table_map; select mapContains(a, 'aaa') from table_map; -- { serverError 386 } select mapContains(b, 'aaa') from table_map; -- { serverError 43 } select mapKeys(a) from table_map; select mapValues(a) from table_map; +select mapFromArrays(d, e) from table_map; drop table if exists table_map; From 21aadec53de0d460c48678600e98509ba6f8f0b8 Mon Sep 17 00:00:00 2001 From: taiyang-li <654010905@qq.com> Date: Sun, 7 Nov 2021 20:59:46 +0800 Subject: [PATCH 003/841] fix code style --- src/Functions/map.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Functions/map.cpp b/src/Functions/map.cpp index 994eda1ec62..a3a33453e0c 100644 --- a/src/Functions/map.cpp +++ b/src/Functions/map.cpp @@ -175,7 +175,7 @@ public: if (arguments.size() != 2) throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, "Function {} requires 2 arguments, but {} given", getName(), arguments.size()); - + const auto * keys_type = checkAndGetDataType(arguments[0].get()); if (!keys_type) throw Exception{"First argument for function " + getName() + " must be a Array", From 42646c0bba6fe0140fd39567f1407b798c12b5ee Mon Sep 17 00:00:00 2001 From: taiyang-li <654010905@qq.com> Date: Mon, 8 Nov 2021 12:27:31 +0800 Subject: [PATCH 004/841] fix bug --- src/Functions/map.cpp | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/src/Functions/map.cpp b/src/Functions/map.cpp index a3a33453e0c..3756c296bb4 100644 --- a/src/Functions/map.cpp +++ b/src/Functions/map.cpp @@ -27,6 +27,7 @@ namespace ErrorCodes extern const int NUMBER_OF_ARGUMENTS_DOESNT_MATCH; extern const int ILLEGAL_TYPE_OF_ARGUMENT; extern const int SIZES_OF_ARRAYS_DOESNT_MATCH; + extern const int ILLEGAL_COLUMN; } namespace @@ -197,8 +198,33 @@ public: ColumnPtr executeImpl( const ColumnsWithTypeAndName & arguments, const DataTypePtr & /* result_type */, size_t /* input_rows_count */) const override { - const auto * col_keys = typeid_cast(arguments[0].column.get()); - const auto * col_values = typeid_cast(arguments[1].column.get()); + bool is_keys_const = isColumnConst(*arguments[0].column); + const ColumnArray * col_keys; + if (is_keys_const) + { + auto tmp = arguments[0].column->convertToFullColumnIfConst(); + col_keys = checkAndGetColumn(tmp.get()); + } + else + { + col_keys = checkAndGetColumn(arguments[0].column.get()); + } + + bool is_values_const = isColumnConst(*arguments[1].column); + const ColumnArray * col_values; + if (is_values_const) + { + auto tmp = arguments[1].column->convertToFullColumnIfConst(); + col_values = checkAndGetColumn(tmp.get()); + } + else + { + col_values = checkAndGetColumn(arguments[1].column.get()); + } + + if (!col_keys || !col_values) + throw Exception("Arguments of function " + getName() + " must be array.", ErrorCodes::ILLEGAL_COLUMN); + if (!col_keys->hasEqualOffsets(*col_values)) throw Exception("Array arguments for function " + getName() + " must have equal sizes", ErrorCodes::SIZES_OF_ARRAYS_DOESNT_MATCH); From 12834902c060dd941ae486330950ff32ed1a1f85 Mon Sep 17 00:00:00 2001 From: taiyang-li <654010905@qq.com> Date: Mon, 8 Nov 2021 17:04:33 +0800 Subject: [PATCH 005/841] fix mem leak --- src/Functions/map.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Functions/map.cpp b/src/Functions/map.cpp index 3756c296bb4..4f2e072d08a 100644 --- a/src/Functions/map.cpp +++ b/src/Functions/map.cpp @@ -198,24 +198,26 @@ public: ColumnPtr executeImpl( const ColumnsWithTypeAndName & arguments, const DataTypePtr & /* result_type */, size_t /* input_rows_count */) const override { + ColumnPtr holder_keys; bool is_keys_const = isColumnConst(*arguments[0].column); const ColumnArray * col_keys; if (is_keys_const) { - auto tmp = arguments[0].column->convertToFullColumnIfConst(); - col_keys = checkAndGetColumn(tmp.get()); + holder_keys = arguments[0].column->convertToFullColumnIfConst(); + col_keys = checkAndGetColumn(holder_keys.get()); } else { col_keys = checkAndGetColumn(arguments[0].column.get()); } + ColumnPtr holder_values; bool is_values_const = isColumnConst(*arguments[1].column); const ColumnArray * col_values; if (is_values_const) { - auto tmp = arguments[1].column->convertToFullColumnIfConst(); - col_values = checkAndGetColumn(tmp.get()); + holder_values = arguments[1].column->convertToFullColumnIfConst(); + col_values = checkAndGetColumn(holder_values.get()); } else { From 8c93e08fd4ff8a4d5ee137e130ab020ba1519ec4 Mon Sep 17 00:00:00 2001 From: taiyang-li <654010905@qq.com> Date: Mon, 8 Nov 2021 17:09:23 +0800 Subject: [PATCH 006/841] add some full columns test cases --- tests/queries/0_stateless/01651_map_functions.reference | 4 ++++ tests/queries/0_stateless/01651_map_functions.sql | 2 ++ 2 files changed, 6 insertions(+) diff --git a/tests/queries/0_stateless/01651_map_functions.reference b/tests/queries/0_stateless/01651_map_functions.reference index 05dcb8f2cf5..284e27a1b0d 100644 --- a/tests/queries/0_stateless/01651_map_functions.reference +++ b/tests/queries/0_stateless/01651_map_functions.reference @@ -27,3 +27,7 @@ {0:0} 1 {0:0} 0 {'aa':4,'bb':5} +{'aa':4,'bb':5} +{'aa':4,'bb':5} +{'aa':4,'bb':5} +{'aa':4,'bb':5} diff --git a/tests/queries/0_stateless/01651_map_functions.sql b/tests/queries/0_stateless/01651_map_functions.sql index 6ecd5bce494..57023d41470 100644 --- a/tests/queries/0_stateless/01651_map_functions.sql +++ b/tests/queries/0_stateless/01651_map_functions.sql @@ -31,5 +31,7 @@ select map( 'aa', 4, 'bb' , 5) as m, mapContains(m, 'aa'), mapContains(m, 'k'); select map(0, 0) as m, mapContains(m, number % 2) from numbers(2); select mapFromArrays(['aa', 'bb'], [4, 5]); +select mapFromArrays(['aa', 'bb'], materialize([4, 5])); +select mapFromArrays(['aa', 'bb'], materialize([4, 5])) from numbers(3); select mapFromArrays(['aa', 'bb'], [4, 5], [6, 7]); -- { serverError 42 } select mapFromArrays(['aa', 'bb'], [4, 5, 6]); -- { serverError 190 } From af1cdb4aa2e74e995cb155d6fda4f9069321f387 Mon Sep 17 00:00:00 2001 From: maks-buren630501 Date: Tue, 30 Aug 2022 15:13:22 +0300 Subject: [PATCH 007/841] Fix bug with materialized_view and postgresql replication --- src/Processors/Transforms/buildPushingToViewsChain.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Processors/Transforms/buildPushingToViewsChain.cpp b/src/Processors/Transforms/buildPushingToViewsChain.cpp index d71d6901cee..8001bd7607a 100644 --- a/src/Processors/Transforms/buildPushingToViewsChain.cpp +++ b/src/Processors/Transforms/buildPushingToViewsChain.cpp @@ -340,7 +340,8 @@ Chain buildPushingToViewsChain( chains.emplace_back(std::move(out)); /// Add the view to the query access info so it can appear in system.query_log - if (!no_destination) + /// hasQueryContext - for materialized tables with background replication process query context is not added + if (!no_destination && context->hasQueryContext()) { context->getQueryContext()->addQueryAccessInfo( backQuoteIfNeed(database_table.getDatabaseName()), views_data->views.back().runtime_stats->target_name, {}, "", database_table.getFullTableName()); @@ -698,7 +699,6 @@ IProcessor::Status FinalizingViewsTransform::prepare() output.finish(); return Status::Finished; } - return Status::NeedData; } From 64df6ca5209949fe80ca798eb82dc386d5e74652 Mon Sep 17 00:00:00 2001 From: avogar Date: Tue, 3 Jan 2023 19:22:31 +0000 Subject: [PATCH 008/841] Split stress test and backward compatibility check --- docker/test/{stress/stress => ci} | 0 docker/test/stress/Dockerfile | 1 - docker/test/stress/run.sh | 251 +--------- docker/test/upgrade/Dockerfile | 31 ++ docker/test/upgrade/run.sh | 462 ++++++++++++++++++ tests/ci/stress.py | 305 ++++++++++++ tests/ci/stress_check.py | 8 +- tests/ci/upgrade_check.py | 4 + tests/clickhouse-test | 45 +- .../0_stateless/00061_merge_tree_alter.sql | 2 +- ..._replace_partition_from_table_zookeeper.sh | 2 +- ...ost_part_and_alive_part_zookeeper_long.sql | 2 +- .../0_stateless/00942_dataparts_500.sh | 2 +- ...tem_parts_race_condition_drop_zookeeper.sh | 2 +- ...9_parallel_alter_detach_table_zookeeper.sh | 2 +- .../01111_create_drop_replicated_db_stress.sh | 2 +- .../0_stateless/01191_rename_dictionary.sql | 2 +- ...18_long_unsuccessful_mutation_zookeeper.sh | 2 +- .../01378_alter_rename_with_ttl_zookeeper.sql | 2 +- .../0_stateless/01391_join_on_dict_crash.sql | 2 +- .../01555_system_distribution_queue_mask.sql | 2 +- .../01576_alter_low_cardinality_and_select.sh | 2 +- ...ch_patition_with_macro_in_zk_path_long.sql | 2 +- .../0_stateless/01780_column_sparse_alter.sql | 2 +- .../02022_storage_filelog_one_file.sh | 2 +- .../02025_storage_filelog_virtual_col.sh | 2 +- .../0_stateless/02067_lost_part_s3.sql | 2 +- ...2_create_table_without_columns_metadata.sh | 2 +- .../0_stateless/02242_delete_user_race.sh | 2 +- .../0_stateless/02243_drop_user_grant_race.sh | 2 +- tests/queries/0_stateless/02293_hashid.sql | 2 +- .../02302_join_auto_lc_nullable_bug.sql | 2 +- .../02306_window_move_row_number_fix.sql | 2 +- .../02313_cross_join_dup_col_names.sql | 2 +- .../02315_pmj_union_ubsan_35857.sql | 2 +- ...2316_cast_to_ip_address_default_column.sql | 3 - .../02316_const_string_intersact.sql | 2 +- ...02320_mapped_array_witn_const_nullable.sql | 2 +- .../02332_dist_insert_send_logs_level.sh | 2 +- ...45_partial_sort_transform_optimization.sql | 2 +- tests/queries/0_stateless/02354_annoy.sh | 2 +- .../0_stateless/02363_mapupdate_improve.sql | 2 +- .../02366_direct_dictionary_dict_has.sql | 2 +- .../0_stateless/02366_with_fill_date.sql | 2 +- .../02381_compress_marks_and_primary_key.sql | 2 +- ...397_system_parts_race_condition_drop_rm.sh | 2 +- .../02429_low_cardinality_trash.sh | 2 +- .../02450_kill_distributed_query_deadlock.sh | 2 +- 48 files changed, 873 insertions(+), 313 deletions(-) rename docker/test/{stress/stress => ci} (100%) create mode 100644 docker/test/upgrade/Dockerfile create mode 100644 docker/test/upgrade/run.sh create mode 100755 tests/ci/stress.py create mode 100644 tests/ci/upgrade_check.py diff --git a/docker/test/stress/stress b/docker/test/ci similarity index 100% rename from docker/test/stress/stress rename to docker/test/ci diff --git a/docker/test/stress/Dockerfile b/docker/test/stress/Dockerfile index 393508fd551..2778b63774d 100644 --- a/docker/test/stress/Dockerfile +++ b/docker/test/stress/Dockerfile @@ -24,7 +24,6 @@ RUN apt-get update -y \ llvm-9 \ brotli -COPY ./stress /stress COPY run.sh / ENV DATASETS="hits visits" diff --git a/docker/test/stress/run.sh b/docker/test/stress/run.sh index 41245013a4a..c99de2b93e5 100644 --- a/docker/test/stress/run.sh +++ b/docker/test/stress/run.sh @@ -28,6 +28,7 @@ function configure() /usr/share/clickhouse-test/config/install.sh # we mount tests folder from repo to /usr/share + ln -s /usr/share/clickhouse-test/ci/stress.py /usr/bin/stress ln -s /usr/share/clickhouse-test/clickhouse-test /usr/bin/clickhouse-test ln -s /usr/share/clickhouse-test/ci/download_release_packages.py /usr/bin/download_release_packages ln -s /usr/share/clickhouse-test/ci/get_previous_release_tag.py /usr/bin/get_previous_release_tag @@ -278,7 +279,7 @@ sudo chgrp clickhouse /etc/clickhouse-server/config.d/s3_storage_policy_by_defau start -./stress --hung-check --drop-databases --output-folder test_output --skip-func-tests "$SKIP_TESTS_OPTION" --global-time-limit 1200 \ +stress --hung-check --drop-databases --output-folder test_output --skip-func-tests "$SKIP_TESTS_OPTION" --global-time-limit 1200 \ && echo -e 'Test script exit code\tOK' >> /test_output/test_results.tsv \ || echo -e 'Test script failed\tFAIL' >> /test_output/test_results.tsv @@ -292,14 +293,19 @@ unset "${!THREAD_@}" start clickhouse-client --query "SELECT 'Server successfully started', 'OK'" >> /test_output/test_results.tsv \ - || (echo -e 'Server failed to start (see application_errors.txt and clickhouse-server.clean.log)\tFAIL' >> /test_output/test_results.tsv \ + || (echo -e 'Server failed to start (see application_errors.txt and clickhouse-server.final.log)\tFAIL' >> /test_output/test_results.tsv \ && grep -a ".*Application" /var/log/clickhouse-server/clickhouse-server.log > /test_output/application_errors.txt) +# Remove file application_errors.txt if it's empty +[ -s /test_output/application_errors.txt ] || rm /test_output/application_errors.txt + stop [ -f /var/log/clickhouse-server/clickhouse-server.log ] || echo -e "Server log does not exist\tFAIL" [ -f /var/log/clickhouse-server/stderr.log ] || echo -e "Stderr log does not exist\tFAIL" +mv /var/log/clickhouse-server/clickhouse-server.log /var/log/clickhouse-server/clickhouse-server.final.log + # Grep logs for sanitizer asserts, crashes and other critical errors # Sanitizer asserts @@ -312,12 +318,12 @@ rm -f /test_output/tmp # OOM zgrep -Fa " Application: Child process was terminated by signal 9" /var/log/clickhouse-server/clickhouse-server*.log > /dev/null \ - && echo -e 'OOM killer (or signal 9) in clickhouse-server.log\tFAIL' >> /test_output/test_results.tsv \ - || echo -e 'No OOM messages in clickhouse-server.log\tOK' >> /test_output/test_results.tsv + && echo -e 'OOM killer (or signal 9) in server logs\tFAIL' >> /test_output/test_results.tsv \ + || echo -e 'No OOM messages in server logs\tOK' >> /test_output/test_results.tsv # Logical errors zgrep -Fa "Code: 49, e.displayText() = DB::Exception:" /var/log/clickhouse-server/clickhouse-server*.log > /test_output/logical_errors.txt \ - && echo -e 'Logical error thrown (see clickhouse-server.log or logical_errors.txt)\tFAIL' >> /test_output/test_results.tsv \ + && echo -e 'Logical error thrown (see server logs or logical_errors.txt)\tFAIL' >> /test_output/test_results.tsv \ || echo -e 'No logical errors\tOK' >> /test_output/test_results.tsv # Remove file logical_errors.txt if it's empty @@ -325,7 +331,7 @@ zgrep -Fa "Code: 49, e.displayText() = DB::Exception:" /var/log/clickhouse-serve # No such key errors zgrep -Ea "Code: 499.*The specified key does not exist" /var/log/clickhouse-server/clickhouse-server*.log > /test_output/no_such_key_errors.txt \ - && echo -e 'S3_ERROR No such key thrown (see clickhouse-server.log or no_such_key_errors.txt)\tFAIL' >> /test_output/test_results.tsv \ + && echo -e 'S3_ERROR No such key thrown (see server logs or no_such_key_errors.txt)\tFAIL' >> /test_output/test_results.tsv \ || echo -e 'No lost s3 keys\tOK' >> /test_output/test_results.tsv # Remove file no_such_key_errors.txt if it's empty @@ -333,13 +339,13 @@ zgrep -Ea "Code: 499.*The specified key does not exist" /var/log/clickhouse-serv # Crash zgrep -Fa "########################################" /var/log/clickhouse-server/clickhouse-server*.log > /dev/null \ - && echo -e 'Killed by signal (in clickhouse-server.log)\tFAIL' >> /test_output/test_results.tsv \ + && echo -e 'Killed by signal (in server logs)\tFAIL' >> /test_output/test_results.tsv \ || echo -e 'Not crashed\tOK' >> /test_output/test_results.tsv # It also checks for crash without stacktrace (printed by watchdog) zgrep -Fa " " /var/log/clickhouse-server/clickhouse-server*.log > /test_output/fatal_messages.txt \ - && echo -e 'Fatal message in clickhouse-server.log (see fatal_messages.txt)\tFAIL' >> /test_output/test_results.tsv \ - || echo -e 'No fatal messages in clickhouse-server.log\tOK' >> /test_output/test_results.tsv + && echo -e 'Fatal message in server logs (see fatal_messages.txt)\tFAIL' >> /test_output/test_results.tsv \ + || echo -e 'No fatal messages in server logs\tOK' >> /test_output/test_results.tsv # Remove file fatal_messages.txt if it's empty [ -s /test_output/fatal_messages.txt ] || rm /test_output/fatal_messages.txt @@ -350,229 +356,12 @@ zgrep -Fa "########################################" /test_output/* > /dev/null zgrep -Fa " received signal " /test_output/gdb.log > /dev/null \ && echo -e 'Found signal in gdb.log\tFAIL' >> /test_output/test_results.tsv -if [ "$DISABLE_BC_CHECK" -ne "1" ]; then - echo -e "Backward compatibility check\n" +for table in query_log trace_log +do + clickhouse-local --path /var/lib/clickhouse/ --only-system-tables -q "select * from system.$table format TSVWithNamesAndTypes" | pigz > /test_output/$table.tsv.gz ||: +done - echo "Get previous release tag" - previous_release_tag=$(clickhouse-client --version | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | get_previous_release_tag) - echo $previous_release_tag - - echo "Clone previous release repository" - git clone https://github.com/ClickHouse/ClickHouse.git --no-tags --progress --branch=$previous_release_tag --no-recurse-submodules --depth=1 previous_release_repository - - echo "Download clickhouse-server from the previous release" - mkdir previous_release_package_folder - - echo $previous_release_tag | download_release_packages && echo -e 'Download script exit code\tOK' >> /test_output/test_results.tsv \ - || echo -e 'Download script failed\tFAIL' >> /test_output/test_results.tsv - - mv /var/log/clickhouse-server/clickhouse-server.log /var/log/clickhouse-server/clickhouse-server.clean.log - for table in query_log trace_log - do - clickhouse-local --path /var/lib/clickhouse/ --only-system-tables -q "select * from system.$table format TSVWithNamesAndTypes" | pigz > /test_output/$table.tsv.gz ||: - done - - tar -chf /test_output/coordination.tar /var/lib/clickhouse/coordination ||: - - # Check if we cloned previous release repository successfully - if ! [ "$(ls -A previous_release_repository/tests/queries)" ] - then - echo -e "Backward compatibility check: Failed to clone previous release tests\tFAIL" >> /test_output/test_results.tsv - elif ! [ "$(ls -A previous_release_package_folder/clickhouse-common-static_*.deb && ls -A previous_release_package_folder/clickhouse-server_*.deb)" ] - then - echo -e "Backward compatibility check: Failed to download previous release packages\tFAIL" >> /test_output/test_results.tsv - else - echo -e "Successfully cloned previous release tests\tOK" >> /test_output/test_results.tsv - echo -e "Successfully downloaded previous release packages\tOK" >> /test_output/test_results.tsv - - # Uninstall current packages - dpkg --remove clickhouse-client - dpkg --remove clickhouse-server - dpkg --remove clickhouse-common-static-dbg - dpkg --remove clickhouse-common-static - - rm -rf /var/lib/clickhouse/* - - # Make BC check more funny by forcing Ordinary engine for system database - mkdir /var/lib/clickhouse/metadata - echo "ATTACH DATABASE system ENGINE=Ordinary" > /var/lib/clickhouse/metadata/system.sql - - # Install previous release packages - install_packages previous_release_package_folder - - # Start server from previous release - # Previous version may not be ready for fault injections - export ZOOKEEPER_FAULT_INJECTION=0 - configure - - # Avoid "Setting s3_check_objects_after_upload is neither a builtin setting..." - rm -f /etc/clickhouse-server/users.d/enable_blobs_check.xml ||: - rm -f /etc/clickhouse-server/users.d/marks.xml ||: - - # Remove s3 related configs to avoid "there is no disk type `cache`" - rm -f /etc/clickhouse-server/config.d/storage_conf.xml ||: - rm -f /etc/clickhouse-server/config.d/azure_storage_conf.xml ||: - - # Turn on after 22.12 - rm -f /etc/clickhouse-server/config.d/compressed_marks_and_index.xml ||: - # it uses recently introduced settings which previous versions may not have - rm -f /etc/clickhouse-server/users.d/insert_keeper_retries.xml ||: - - start - - clickhouse-client --query="SELECT 'Server version: ', version()" - - # Install new package before running stress test because we should use new - # clickhouse-client and new clickhouse-test. - # - # But we should leave old binary in /usr/bin/ and debug symbols in - # /usr/lib/debug/usr/bin (if any) for gdb and internal DWARF parser, so it - # will print sane stacktraces and also to avoid possible crashes. - # - # FIXME: those files can be extracted directly from debian package, but - # actually better solution will be to use different PATH instead of playing - # games with files from packages. - mv /usr/bin/clickhouse previous_release_package_folder/ - mv /usr/lib/debug/usr/bin/clickhouse.debug previous_release_package_folder/ - install_packages package_folder - mv /usr/bin/clickhouse package_folder/ - mv /usr/lib/debug/usr/bin/clickhouse.debug package_folder/ - mv previous_release_package_folder/clickhouse /usr/bin/ - mv previous_release_package_folder/clickhouse.debug /usr/lib/debug/usr/bin/clickhouse.debug - - mkdir tmp_stress_output - - ./stress --test-cmd="/usr/bin/clickhouse-test --queries=\"previous_release_repository/tests/queries\"" --backward-compatibility-check --output-folder tmp_stress_output --global-time-limit=1200 \ - && echo -e 'Backward compatibility check: Test script exit code\tOK' >> /test_output/test_results.tsv \ - || echo -e 'Backward compatibility check: Test script failed\tFAIL' >> /test_output/test_results.tsv - rm -rf tmp_stress_output - - # We experienced deadlocks in this command in very rare cases. Let's debug it: - timeout 10m clickhouse-client --query="SELECT 'Tables count:', count() FROM system.tables" || - ( - echo "thread apply all backtrace (on select tables count)" >> /test_output/gdb.log - timeout 30m gdb -batch -ex 'thread apply all backtrace' -p "$(cat /var/run/clickhouse-server/clickhouse-server.pid)" | ts '%Y-%m-%d %H:%M:%S' >> /test_output/gdb.log - clickhouse stop --force - ) - - stop 1 - mv /var/log/clickhouse-server/clickhouse-server.log /var/log/clickhouse-server/clickhouse-server.backward.stress.log - - # Start new server - mv package_folder/clickhouse /usr/bin/ - mv package_folder/clickhouse.debug /usr/lib/debug/usr/bin/clickhouse.debug - # Disable fault injections on start (we don't test them here, and it can lead to tons of requests in case of huge number of tables). - export ZOOKEEPER_FAULT_INJECTION=0 - configure - start 500 - clickhouse-client --query "SELECT 'Backward compatibility check: Server successfully started', 'OK'" >> /test_output/test_results.tsv \ - || (echo -e 'Backward compatibility check: Server failed to start\tFAIL' >> /test_output/test_results.tsv \ - && grep -a ".*Application" /var/log/clickhouse-server/clickhouse-server.log >> /test_output/bc_check_application_errors.txt) - - clickhouse-client --query="SELECT 'Server version: ', version()" - - # Let the server run for a while before checking log. - sleep 60 - - stop - mv /var/log/clickhouse-server/clickhouse-server.log /var/log/clickhouse-server/clickhouse-server.backward.dirty.log - - # Error messages (we should ignore some errors) - # FIXME https://github.com/ClickHouse/ClickHouse/issues/38643 ("Unknown index: idx.") - # FIXME https://github.com/ClickHouse/ClickHouse/issues/39174 ("Cannot parse string 'Hello' as UInt64") - # FIXME Not sure if it's expected, but some tests from BC check may not be finished yet when we restarting server. - # Let's just ignore all errors from queries ("} TCPHandler: Code:", "} executeQuery: Code:") - # FIXME https://github.com/ClickHouse/ClickHouse/issues/39197 ("Missing columns: 'v3' while processing query: 'v3, k, v1, v2, p'") - # NOTE Incompatibility was introduced in https://github.com/ClickHouse/ClickHouse/pull/39263, it's expected - # ("This engine is deprecated and is not supported in transactions", "[Queue = DB::MergeMutateRuntimeQueue]: Code: 235. DB::Exception: Part") - # FIXME https://github.com/ClickHouse/ClickHouse/issues/39174 - bad mutation does not indicate backward incompatibility - echo "Check for Error messages in server log:" - zgrep -Fav -e "Code: 236. DB::Exception: Cancelled merging parts" \ - -e "Code: 236. DB::Exception: Cancelled mutating parts" \ - -e "REPLICA_IS_ALREADY_ACTIVE" \ - -e "REPLICA_ALREADY_EXISTS" \ - -e "ALL_REPLICAS_LOST" \ - -e "DDLWorker: Cannot parse DDL task query" \ - -e "RaftInstance: failed to accept a rpc connection due to error 125" \ - -e "UNKNOWN_DATABASE" \ - -e "NETWORK_ERROR" \ - -e "UNKNOWN_TABLE" \ - -e "ZooKeeperClient" \ - -e "KEEPER_EXCEPTION" \ - -e "DirectoryMonitor" \ - -e "TABLE_IS_READ_ONLY" \ - -e "Code: 1000, e.code() = 111, Connection refused" \ - -e "UNFINISHED" \ - -e "NETLINK_ERROR" \ - -e "Renaming unexpected part" \ - -e "PART_IS_TEMPORARILY_LOCKED" \ - -e "and a merge is impossible: we didn't find" \ - -e "found in queue and some source parts for it was lost" \ - -e "is lost forever." \ - -e "Unknown index: idx." \ - -e "Cannot parse string 'Hello' as UInt64" \ - -e "} TCPHandler: Code:" \ - -e "} executeQuery: Code:" \ - -e "Missing columns: 'v3' while processing query: 'v3, k, v1, v2, p'" \ - -e "This engine is deprecated and is not supported in transactions" \ - -e "[Queue = DB::MergeMutateRuntimeQueue]: Code: 235. DB::Exception: Part" \ - -e "The set of parts restored in place of" \ - -e "(ReplicatedMergeTreeAttachThread): Initialization failed. Error" \ - -e "Code: 269. DB::Exception: Destination table is myself" \ - -e "Coordination::Exception: Connection loss" \ - -e "MutateFromLogEntryTask" \ - -e "No connection to ZooKeeper, cannot get shared table ID" \ - -e "Session expired" \ - /var/log/clickhouse-server/clickhouse-server.backward.dirty.log | zgrep -Fa "" > /test_output/bc_check_error_messages.txt \ - && echo -e 'Backward compatibility check: Error message in clickhouse-server.log (see bc_check_error_messages.txt)\tFAIL' >> /test_output/test_results.tsv \ - || echo -e 'Backward compatibility check: No Error messages in clickhouse-server.log\tOK' >> /test_output/test_results.tsv - - # Remove file bc_check_error_messages.txt if it's empty - [ -s /test_output/bc_check_error_messages.txt ] || rm /test_output/bc_check_error_messages.txt - - # Sanitizer asserts - zgrep -Fa "==================" /var/log/clickhouse-server/stderr.log >> /test_output/tmp - zgrep -Fa "WARNING" /var/log/clickhouse-server/stderr.log >> /test_output/tmp - zgrep -Fav -e "ASan doesn't fully support makecontext/swapcontext functions" -e "DB::Exception" /test_output/tmp > /dev/null \ - && echo -e 'Backward compatibility check: Sanitizer assert (in stderr.log)\tFAIL' >> /test_output/test_results.tsv \ - || echo -e 'Backward compatibility check: No sanitizer asserts\tOK' >> /test_output/test_results.tsv - rm -f /test_output/tmp - - # OOM - zgrep -Fa " Application: Child process was terminated by signal 9" /var/log/clickhouse-server/clickhouse-server.backward.*.log > /dev/null \ - && echo -e 'Backward compatibility check: OOM killer (or signal 9) in clickhouse-server.log\tFAIL' >> /test_output/test_results.tsv \ - || echo -e 'Backward compatibility check: No OOM messages in clickhouse-server.log\tOK' >> /test_output/test_results.tsv - - # Logical errors - echo "Check for Logical errors in server log:" - zgrep -Fa -A20 "Code: 49, e.displayText() = DB::Exception:" /var/log/clickhouse-server/clickhouse-server.backward.*.log > /test_output/bc_check_logical_errors.txt \ - && echo -e 'Backward compatibility check: Logical error thrown (see clickhouse-server.log or bc_check_logical_errors.txt)\tFAIL' >> /test_output/test_results.tsv \ - || echo -e 'Backward compatibility check: No logical errors\tOK' >> /test_output/test_results.tsv - - # Remove file bc_check_logical_errors.txt if it's empty - [ -s /test_output/bc_check_logical_errors.txt ] || rm /test_output/bc_check_logical_errors.txt - - # Crash - zgrep -Fa "########################################" /var/log/clickhouse-server/clickhouse-server.backward.*.log > /dev/null \ - && echo -e 'Backward compatibility check: Killed by signal (in clickhouse-server.log)\tFAIL' >> /test_output/test_results.tsv \ - || echo -e 'Backward compatibility check: Not crashed\tOK' >> /test_output/test_results.tsv - - # It also checks for crash without stacktrace (printed by watchdog) - echo "Check for Fatal message in server log:" - zgrep -Fa " " /var/log/clickhouse-server/clickhouse-server.backward.*.log > /test_output/bc_check_fatal_messages.txt \ - && echo -e 'Backward compatibility check: Fatal message in clickhouse-server.log (see bc_check_fatal_messages.txt)\tFAIL' >> /test_output/test_results.tsv \ - || echo -e 'Backward compatibility check: No fatal messages in clickhouse-server.log\tOK' >> /test_output/test_results.tsv - - # Remove file bc_check_fatal_messages.txt if it's empty - [ -s /test_output/bc_check_fatal_messages.txt ] || rm /test_output/bc_check_fatal_messages.txt - - tar -chf /test_output/coordination.backward.tar /var/lib/clickhouse/coordination ||: - for table in query_log trace_log - do - clickhouse-local --path /var/lib/clickhouse/ --only-system-tables -q "select * from system.$table format TSVWithNamesAndTypes" | pigz > /test_output/$table.backward.tsv.gz ||: - done - fi -fi +tar -chf /test_output/coordination.tar /var/lib/clickhouse/coordination ||: dmesg -T > /test_output/dmesg.log diff --git a/docker/test/upgrade/Dockerfile b/docker/test/upgrade/Dockerfile new file mode 100644 index 00000000000..c98220b3403 --- /dev/null +++ b/docker/test/upgrade/Dockerfile @@ -0,0 +1,31 @@ +# rebuild in #33610 +# docker build -t clickhouse/upgrade-check . +ARG FROM_TAG=latest +FROM clickhouse/stateful-test:$FROM_TAG + +RUN apt-get update -y \ + && env DEBIAN_FRONTEND=noninteractive \ + apt-get install --yes --no-install-recommends \ + bash \ + tzdata \ + fakeroot \ + debhelper \ + parallel \ + expect \ + python3 \ + python3-lxml \ + python3-termcolor \ + python3-requests \ + curl \ + sudo \ + openssl \ + netcat-openbsd \ + telnet \ + llvm-9 \ + brotli + +COPY run.sh / + +ENV EXPORT_S3_STORAGE_POLICIES=1 + +CMD ["/bin/bash", "/run.sh"] diff --git a/docker/test/upgrade/run.sh b/docker/test/upgrade/run.sh new file mode 100644 index 00000000000..1a107b6df2a --- /dev/null +++ b/docker/test/upgrade/run.sh @@ -0,0 +1,462 @@ +#!/bin/bash +# shellcheck disable=SC2094 +# shellcheck disable=SC2086 +# shellcheck disable=SC2024 + +# This script is similar to script for common stress test + +# Avoid overlaps with previous runs +dmesg --clear + +set -x + +# core.COMM.PID-TID +sysctl kernel.core_pattern='core.%e.%p-%P' + + +function install_packages() +{ + dpkg -i $1/clickhouse-common-static_*.deb + dpkg -i $1/clickhouse-common-static-dbg_*.deb + dpkg -i $1/clickhouse-server_*.deb + dpkg -i $1/clickhouse-client_*.deb +} + +function configure() +{ + # install test configs + export USE_DATABASE_ORDINARY=1 + export EXPORT_S3_STORAGE_POLICIES=1 + /usr/share/clickhouse-test/config/install.sh + + # we mount tests folder from repo to /usr/share + ln -s /usr/share/clickhouse-test/clickhouse-test /usr/bin/clickhouse-test + ln -s /usr/share/clickhouse-test/ci/download_release_packages.py /usr/bin/download_release_packages + ln -s /usr/share/clickhouse-test/ci/get_previous_release_tag.py /usr/bin/get_previous_release_tag + + # avoid too slow startup + sudo cat /etc/clickhouse-server/config.d/keeper_port.xml | sed "s|100000|10000|" > /etc/clickhouse-server/config.d/keeper_port.xml.tmp + sudo mv /etc/clickhouse-server/config.d/keeper_port.xml.tmp /etc/clickhouse-server/config.d/keeper_port.xml + sudo chown clickhouse /etc/clickhouse-server/config.d/keeper_port.xml + sudo chgrp clickhouse /etc/clickhouse-server/config.d/keeper_port.xml + + # for clickhouse-server (via service) + echo "ASAN_OPTIONS='malloc_context_size=10 verbosity=1 allocator_release_to_os_interval_ms=10000'" >> /etc/environment + # for clickhouse-client + export ASAN_OPTIONS='malloc_context_size=10 allocator_release_to_os_interval_ms=10000' + + # since we run clickhouse from root + sudo chown root: /var/lib/clickhouse + + # Set more frequent update period of asynchronous metrics to more frequently update information about real memory usage (less chance of OOM). + echo "1" \ + > /etc/clickhouse-server/config.d/asynchronous_metrics_update_period_s.xml + + local total_mem + total_mem=$(awk '/MemTotal/ { print $(NF-1) }' /proc/meminfo) # KiB + total_mem=$(( total_mem*1024 )) # bytes + # Set maximum memory usage as half of total memory (less chance of OOM). + # + # But not via max_server_memory_usage but via max_memory_usage_for_user, + # so that we can override this setting and execute service queries, like: + # - hung check + # - show/drop database + # - ... + # + # So max_memory_usage_for_user will be a soft limit, and + # max_server_memory_usage will be hard limit, and queries that should be + # executed regardless memory limits will use max_memory_usage_for_user=0, + # instead of relying on max_untracked_memory + local max_server_mem + max_server_mem=$((total_mem*75/100)) # 75% + echo "Setting max_server_memory_usage=$max_server_mem" + cat > /etc/clickhouse-server/config.d/max_server_memory_usage.xml < + ${max_server_mem} + +EOL + local max_users_mem + max_users_mem=$((total_mem*50/100)) # 50% + echo "Setting max_memory_usage_for_user=$max_users_mem" + cat > /etc/clickhouse-server/users.d/max_memory_usage_for_user.xml < + + + ${max_users_mem} + + + +EOL + + cat > /etc/clickhouse-server/config.d/core.xml < + + + 107374182400 + + + $PWD + +EOL + + # Analyzer is not yet ready for testing + cat > /etc/clickhouse-server/users.d/no_analyzer.xml < + + + + + + + + + + +EOL + +} + +function stop() +{ + local pid + # Preserve the pid, since the server can hung after the PID will be deleted. + pid="$(cat /var/run/clickhouse-server/clickhouse-server.pid)" + + clickhouse stop $max_tries --do-not-kill && return + + if [ -n "$1" ] + then + # temporarily disable it in BC check + clickhouse stop --force + return + fi + + # We failed to stop the server with SIGTERM. Maybe it hang, let's collect stacktraces. + kill -TERM "$(pidof gdb)" ||: + sleep 5 + echo "thread apply all backtrace (on stop)" >> /test_output/gdb.log + timeout 30m gdb -batch -ex 'thread apply all backtrace' -p "$pid" | ts '%Y-%m-%d %H:%M:%S' >> /test_output/gdb.log + clickhouse stop --force +} + +function start() +{ + counter=0 + until clickhouse-client --query "SELECT 1" + do + if [ "$counter" -gt ${1:-120} ] + then + echo "Cannot start clickhouse-server" + echo -e "Cannot start clickhouse-server\tFAIL" >> /test_output/test_results.tsv + cat /var/log/clickhouse-server/stdout.log + tail -n1000 /var/log/clickhouse-server/stderr.log + tail -n100000 /var/log/clickhouse-server/clickhouse-server.log | grep -F -v -e ' RaftInstance:' -e ' RaftInstance' | tail -n1000 + break + fi + # use root to match with current uid + clickhouse start --user root >/var/log/clickhouse-server/stdout.log 2>>/var/log/clickhouse-server/stderr.log + sleep 0.5 + counter=$((counter + 1)) + done + + # Set follow-fork-mode to parent, because we attach to clickhouse-server, not to watchdog + # and clickhouse-server can do fork-exec, for example, to run some bridge. + # Do not set nostop noprint for all signals, because some it may cause gdb to hang, + # explicitly ignore non-fatal signals that are used by server. + # Number of SIGRTMIN can be determined only in runtime. + RTMIN=$(kill -l SIGRTMIN) + echo " +set follow-fork-mode parent +handle SIGHUP nostop noprint pass +handle SIGINT nostop noprint pass +handle SIGQUIT nostop noprint pass +handle SIGPIPE nostop noprint pass +handle SIGTERM nostop noprint pass +handle SIGUSR1 nostop noprint pass +handle SIGUSR2 nostop noprint pass +handle SIG$RTMIN nostop noprint pass +info signals +continue +backtrace full +thread apply all backtrace full +info registers +disassemble /s +up +disassemble /s +up +disassemble /s +p \"done\" +detach +quit +" > script.gdb + + # FIXME Hung check may work incorrectly because of attached gdb + # 1. False positives are possible + # 2. We cannot attach another gdb to get stacktraces if some queries hung + gdb -batch -command script.gdb -p "$(cat /var/run/clickhouse-server/clickhouse-server.pid)" | ts '%Y-%m-%d %H:%M:%S' >> /test_output/gdb.log & + sleep 5 + # gdb will send SIGSTOP, spend some time loading debug info and then send SIGCONT, wait for it (up to send_timeout, 300s) + time clickhouse-client --query "SELECT 'Connected to clickhouse-server after attaching gdb'" ||: +} + +# Thread Fuzzer allows to check more permutations of possible thread scheduling +# and find more potential issues. +# Temporarily disable ThreadFuzzer with tsan because of https://github.com/google/sanitizers/issues/1540 +is_tsan_build=$(clickhouse local -q "select value like '% -fsanitize=thread %' from system.build_options where name='CXX_FLAGS'") +if [ "$is_tsan_build" -eq "0" ]; then + export THREAD_FUZZER_CPU_TIME_PERIOD_US=1000 + export THREAD_FUZZER_SLEEP_PROBABILITY=0.1 + export THREAD_FUZZER_SLEEP_TIME_US=100000 + + export THREAD_FUZZER_pthread_mutex_lock_BEFORE_MIGRATE_PROBABILITY=1 + export THREAD_FUZZER_pthread_mutex_lock_AFTER_MIGRATE_PROBABILITY=1 + export THREAD_FUZZER_pthread_mutex_unlock_BEFORE_MIGRATE_PROBABILITY=1 + export THREAD_FUZZER_pthread_mutex_unlock_AFTER_MIGRATE_PROBABILITY=1 + + export THREAD_FUZZER_pthread_mutex_lock_BEFORE_SLEEP_PROBABILITY=0.001 + export THREAD_FUZZER_pthread_mutex_lock_AFTER_SLEEP_PROBABILITY=0.001 + export THREAD_FUZZER_pthread_mutex_unlock_BEFORE_SLEEP_PROBABILITY=0.001 + export THREAD_FUZZER_pthread_mutex_unlock_AFTER_SLEEP_PROBABILITY=0.001 + export THREAD_FUZZER_pthread_mutex_lock_BEFORE_SLEEP_TIME_US=10000 + + export THREAD_FUZZER_pthread_mutex_lock_AFTER_SLEEP_TIME_US=10000 + export THREAD_FUZZER_pthread_mutex_unlock_BEFORE_SLEEP_TIME_US=10000 + export THREAD_FUZZER_pthread_mutex_unlock_AFTER_SLEEP_TIME_US=10000 +fi + +azurite-blob --blobHost 0.0.0.0 --blobPort 10000 --debug /azurite_log & +./setup_minio.sh stateless # to have a proper environment + +# But we still need default disk because some tables loaded only into it +sudo cat /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml | sed "s|
s3
|
s3
default|" > /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml.tmp +mv /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml.tmp /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml +sudo chown clickhouse /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml +sudo chgrp clickhouse /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml + +echo "Get previous release tag" +previous_release_tag=$(dpkg --info package_folder/clickhouse-client*.deb | grep "Version: " | awk '{print $2}' | get_previous_release_tag) +echo $previous_release_tag + +echo "Clone previous release repository" +git clone https://github.com/ClickHouse/ClickHouse.git --no-tags --progress --branch=$previous_release_tag --no-recurse-submodules --depth=1 previous_release_repository + +echo "Download clickhouse-server from the previous release" +mkdir previous_release_package_folder + +echo $previous_release_tag | download_release_packages && echo -e 'Download script exit code\tOK' >> /test_output/test_results.tsv \ + || echo -e 'Download script failed\tFAIL' >> /test_output/test_results.tsv + +# Check if we cloned previous release repository successfully +if ! [ "$(ls -A previous_release_repository/tests/queries)" ] +then + echo -e "Failed to clone previous release tests\tFAIL" >> /test_output/test_results.tsv +elif ! [ "$(ls -A previous_release_package_folder/clickhouse-common-static_*.deb && ls -A previous_release_package_folder/clickhouse-server_*.deb)" ] +then + echo -e "Failed to download previous release packages\tFAIL" >> /test_output/test_results.tsv +else + echo -e "Successfully cloned previous release tests\tOK" >> /test_output/test_results.tsv + echo -e "Successfully downloaded previous release packages\tOK" >> /test_output/test_results.tsv + + # Make upgrade check more funny by forcing Ordinary engine for system database + mkdir /var/lib/clickhouse/metadata + echo "ATTACH DATABASE system ENGINE=Ordinary" > /var/lib/clickhouse/metadata/system.sql + + # Install previous release packages + install_packages previous_release_package_folder + + # Start server from previous release + # Previous version may not be ready for fault injections + export ZOOKEEPER_FAULT_INJECTION=0 + configure + + # Avoid "Setting s3_check_objects_after_upload is neither a builtin setting..." + rm -f /etc/clickhouse-server/users.d/enable_blobs_check.xml ||: + rm -f /etc/clickhouse-server/users.d/marks.xml ||: + + # Remove s3 related configs to avoid "there is no disk type `cache`" + rm -f /etc/clickhouse-server/config.d/storage_conf.xml ||: + rm -f /etc/clickhouse-server/config.d/azure_storage_conf.xml ||: + + # Turn on after 22.12 + rm -f /etc/clickhouse-server/config.d/compressed_marks_and_index.xml ||: + # it uses recently introduced settings which previous versions may not have + rm -f /etc/clickhouse-server/users.d/insert_keeper_retries.xml ||: + + start + + clickhouse-client --query="SELECT 'Server version: ', version()" + + # Install new package before running stress test because we should use new + # clickhouse-client and new clickhouse-test. + # + # But we should leave old binary in /usr/bin/ and debug symbols in + # /usr/lib/debug/usr/bin (if any) for gdb and internal DWARF parser, so it + # will print sane stacktraces and also to avoid possible crashes. + # + # FIXME: those files can be extracted directly from debian package, but + # actually better solution will be to use different PATH instead of playing + # games with files from packages. + mv /usr/bin/clickhouse previous_release_package_folder/ + mv /usr/lib/debug/usr/bin/clickhouse.debug previous_release_package_folder/ + install_packages package_folder + mv /usr/bin/clickhouse package_folder/ + mv /usr/lib/debug/usr/bin/clickhouse.debug package_folder/ + mv previous_release_package_folder/clickhouse /usr/bin/ + mv previous_release_package_folder/clickhouse.debug /usr/lib/debug/usr/bin/clickhouse.debug + + mkdir tmp_stress_output + + stress --test-cmd="/usr/bin/clickhouse-test --queries=\"previous_release_repository/tests/queries\"" --upgrade-check --output-folder tmp_stress_output --global-time-limit=1200 \ + && echo -e 'Test script exit code\tOK' >> /test_output/test_results.tsv \ + || echo -e 'Test script failed\tFAIL' >> /test_output/test_results.tsv + rm -rf tmp_stress_output + + # We experienced deadlocks in this command in very rare cases. Let's debug it: + timeout 10m clickhouse-client --query="SELECT 'Tables count:', count() FROM system.tables" || + ( + echo "thread apply all backtrace (on select tables count)" >> /test_output/gdb.log + timeout 30m gdb -batch -ex 'thread apply all backtrace' -p "$(cat /var/run/clickhouse-server/clickhouse-server.pid)" | ts '%Y-%m-%d %H:%M:%S' >> /test_output/gdb.log + clickhouse stop --force + ) + + stop 1 + mv /var/log/clickhouse-server/clickhouse-server.log /var/log/clickhouse-server/clickhouse-server.stress.log + + # Start new server + mv package_folder/clickhouse /usr/bin/ + mv package_folder/clickhouse.debug /usr/lib/debug/usr/bin/clickhouse.debug + # Disable fault injections on start (we don't test them here, and it can lead to tons of requests in case of huge number of tables). + export ZOOKEEPER_FAULT_INJECTION=0 + configure + start 500 + clickhouse-client --query "SELECT 'Server successfully started', 'OK'" >> /test_output/test_results.tsv \ + || (echo -e 'Server failed to start\tFAIL' >> /test_output/test_results.tsv \ + && grep -a ".*Application" /var/log/clickhouse-server/clickhouse-server.log >> /test_output/application_errors.txt) + + # Remove file application_errors.txt if it's empty + [ -s /test_output/application_errors.txt ] || rm /test_output/application_errors.txt + + clickhouse-client --query="SELECT 'Server version: ', version()" + + # Let the server run for a while before checking log. + sleep 60 + + stop + mv /var/log/clickhouse-server/clickhouse-server.log /var/log/clickhouse-server/clickhouse-server.upgrade.log + + # Error messages (we should ignore some errors) + # FIXME https://github.com/ClickHouse/ClickHouse/issues/38643 ("Unknown index: idx.") + # FIXME https://github.com/ClickHouse/ClickHouse/issues/39174 ("Cannot parse string 'Hello' as UInt64") + # FIXME Not sure if it's expected, but some tests from stress test may not be finished yet when we restarting server. + # Let's just ignore all errors from queries ("} TCPHandler: Code:", "} executeQuery: Code:") + # FIXME https://github.com/ClickHouse/ClickHouse/issues/39197 ("Missing columns: 'v3' while processing query: 'v3, k, v1, v2, p'") + # NOTE Incompatibility was introduced in https://github.com/ClickHouse/ClickHouse/pull/39263, it's expected + # ("This engine is deprecated and is not supported in transactions", "[Queue = DB::MergeMutateRuntimeQueue]: Code: 235. DB::Exception: Part") + # FIXME https://github.com/ClickHouse/ClickHouse/issues/39174 - bad mutation does not indicate backward incompatibility + echo "Check for Error messages in server log:" + zgrep -Fav -e "Code: 236. DB::Exception: Cancelled merging parts" \ + -e "Code: 236. DB::Exception: Cancelled mutating parts" \ + -e "REPLICA_IS_ALREADY_ACTIVE" \ + -e "REPLICA_ALREADY_EXISTS" \ + -e "ALL_REPLICAS_LOST" \ + -e "DDLWorker: Cannot parse DDL task query" \ + -e "RaftInstance: failed to accept a rpc connection due to error 125" \ + -e "UNKNOWN_DATABASE" \ + -e "NETWORK_ERROR" \ + -e "UNKNOWN_TABLE" \ + -e "ZooKeeperClient" \ + -e "KEEPER_EXCEPTION" \ + -e "DirectoryMonitor" \ + -e "TABLE_IS_READ_ONLY" \ + -e "Code: 1000, e.code() = 111, Connection refused" \ + -e "UNFINISHED" \ + -e "NETLINK_ERROR" \ + -e "Renaming unexpected part" \ + -e "PART_IS_TEMPORARILY_LOCKED" \ + -e "and a merge is impossible: we didn't find" \ + -e "found in queue and some source parts for it was lost" \ + -e "is lost forever." \ + -e "Unknown index: idx." \ + -e "Cannot parse string 'Hello' as UInt64" \ + -e "} TCPHandler: Code:" \ + -e "} executeQuery: Code:" \ + -e "Missing columns: 'v3' while processing query: 'v3, k, v1, v2, p'" \ + -e "This engine is deprecated and is not supported in transactions" \ + -e "[Queue = DB::MergeMutateRuntimeQueue]: Code: 235. DB::Exception: Part" \ + -e "The set of parts restored in place of" \ + -e "(ReplicatedMergeTreeAttachThread): Initialization failed. Error" \ + -e "Code: 269. DB::Exception: Destination table is myself" \ + -e "Coordination::Exception: Connection loss" \ + -e "MutateFromLogEntryTask" \ + -e "No connection to ZooKeeper, cannot get shared table ID" \ + -e "Session expired" \ + /var/log/clickhouse-server/clickhouse-server.upgrade.log | zgrep -Fa "" > /test_output/upgrade_error_messages.txt \ + && echo -e 'Error message in logs after server upgrade (see upgrade_error_messages.txt)\tFAIL' >> /test_output/test_results.tsv \ + || echo -e 'No Error messages after server upgrade\tOK' >> /test_output/test_results.tsv + + # Remove file bc_check_error_messages.txt if it's empty + [ -s /test_output/upgrade_error_messages.txt ] || rm /test_output/upgrade_error_messages.txt + + # Sanitizer asserts + zgrep -Fa "==================" /var/log/clickhouse-server/stderr.log >> /test_output/tmp + zgrep -Fa "WARNING" /var/log/clickhouse-server/stderr.log >> /test_output/tmp + zgrep -Fav -e "ASan doesn't fully support makecontext/swapcontext functions" -e "DB::Exception" /test_output/tmp > /dev/null \ + && echo -e 'Sanitizer assert (in stderr.log)\tFAIL' >> /test_output/test_results.tsv \ + || echo -e 'No sanitizer asserts\tOK' >> /test_output/test_results.tsv + rm -f /test_output/tmp + + # OOM + zgrep -Fa " Application: Child process was terminated by signal 9" /var/log/clickhouse-server/clickhouse-server.*.log > /dev/null \ + && echo -e 'OOM killer (or signal 9) in clickhouse-server.log\tFAIL' >> /test_output/test_results.tsv \ + || echo -e 'No OOM messages in clickhouse-server.log\tOK' >> /test_output/test_results.tsv + + # Logical errors + echo "Check for Logical errors in server log:" + zgrep -Fa -A20 "Code: 49, e.displayText() = DB::Exception:" /var/log/clickhouse-server/clickhouse-server.*.log > /test_output/logical_errors.txt \ + && echo -e 'Logical error thrown (see server logs or logical_errors.txt)\tFAIL' >> /test_output/test_results.tsv \ + || echo -e 'No logical errors\tOK' >> /test_output/test_results.tsv + + # Remove file logical_errors.txt if it's empty + [ -s /test_output/logical_errors.txt ] || rm /test_output/logical_errors.txt + + # Crash + zgrep -Fa "########################################" /var/log/clickhouse-server/clickhouse-server.*.log > /dev/null \ + && echo -e 'Killed by signal (in server logs)\tFAIL' >> /test_output/test_results.tsv \ + || echo -e 'Not crashed\tOK' >> /test_output/test_results.tsv + + # It also checks for crash without stacktrace (printed by watchdog) + echo "Check for Fatal message in server log:" + zgrep -Fa " " /var/log/clickhouse-server/clickhouse-server.*.log > /test_output/fatal_messages.txt \ + && echo -e 'Fatal message in server logs (see bc_check_fatal_messages.txt)\tFAIL' >> /test_output/test_results.tsv \ + || echo -e 'No fatal messages in server logs\tOK' >> /test_output/test_results.tsv + + # Remove file fatal_messages.txt if it's empty + [ -s /test_output/fatal_messages.txt ] || rm /test_output/fatal_messages.txt + + tar -chf /test_output/coordination.tar /var/lib/clickhouse/coordination ||: + for table in query_log trace_log + do + clickhouse-local --path /var/lib/clickhouse/ --only-system-tables -q "select * from system.$table format TSVWithNamesAndTypes" | pigz > /test_output/$table.backward.tsv.gz ||: + done +fi + +dmesg -T > /test_output/dmesg.log + +# OOM in dmesg -- those are real +grep -q -F -e 'Out of memory: Killed process' -e 'oom_reaper: reaped process' -e 'oom-kill:constraint=CONSTRAINT_NONE' /test_output/dmesg.log \ + && echo -e 'OOM in dmesg\tFAIL' >> /test_output/test_results.tsv \ + || echo -e 'No OOM in dmesg\tOK' >> /test_output/test_results.tsv + +mv /var/log/clickhouse-server/stderr.log /test_output/ + +# Write check result into check_status.tsv +clickhouse-local --structure "test String, res String" -q "SELECT 'failure', test FROM table WHERE res != 'OK' order by (lower(test) like '%hung%'), rowNumberInAllBlocks() LIMIT 1" < /test_output/test_results.tsv > /test_output/check_status.tsv +[ -s /test_output/check_status.tsv ] || echo -e "success\tNo errors found" > /test_output/check_status.tsv + +# Core dumps +for core in core.*; do + pigz $core + mv $core.gz /test_output/ +done diff --git a/tests/ci/stress.py b/tests/ci/stress.py new file mode 100755 index 00000000000..ae35afbc5fa --- /dev/null +++ b/tests/ci/stress.py @@ -0,0 +1,305 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +from multiprocessing import cpu_count +from subprocess import Popen, call, check_output, STDOUT +import os +import argparse +import logging +import time + + +def get_options(i, upgrade_check): + options = [] + client_options = [] + if 0 < i: + options.append("--order=random") + + if i % 3 == 2 and not upgrade_check: + options.append( + '''--db-engine="Replicated('/test/db/test_{}', 's1', 'r1')"'''.format(i) + ) + client_options.append("allow_experimental_database_replicated=1") + + # If database name is not specified, new database is created for each functional test. + # Run some threads with one database for all tests. + if i % 2 == 1: + options.append(" --database=test_{}".format(i)) + + if i % 3 == 1: + client_options.append("join_use_nulls=1") + + if i % 2 == 1: + join_alg_num = i // 2 + if join_alg_num % 4 == 0: + client_options.append("join_algorithm='parallel_hash'") + if join_alg_num % 4 == 1: + client_options.append("join_algorithm='partial_merge'") + if join_alg_num % 4 == 2: + client_options.append("join_algorithm='full_sorting_merge'") + if join_alg_num % 4 == 3: + client_options.append("join_algorithm='auto'") + client_options.append('max_rows_in_join=1000') + + if i == 13: + client_options.append("memory_tracker_fault_probability=0.001") + + if i % 2 == 1 and not upgrade_check: + client_options.append("group_by_use_nulls=1") + + if client_options: + options.append(" --client-option " + " ".join(client_options)) + + return " ".join(options) + + +def run_func_test( + cmd, + output_prefix, + num_processes, + skip_tests_option, + global_time_limit, + upgrade_check, +): + upgrade_check_option = ( + "--upgrade-check" if upgrade_check else "" + ) + global_time_limit_option = "" + if global_time_limit: + global_time_limit_option = "--global_time_limit={}".format(global_time_limit) + + output_paths = [ + os.path.join(output_prefix, "stress_test_run_{}.txt".format(i)) + for i in range(num_processes) + ] + pipes = [] + for i in range(0, len(output_paths)): + f = open(output_paths[i], "w") + full_command = "{} {} {} {} {} --stress".format( + cmd, + get_options(i, upgrade_check), + global_time_limit_option, + skip_tests_option, + upgrade_check_option, + ) + logging.info("Run func tests '%s'", full_command) + p = Popen(full_command, shell=True, stdout=f, stderr=f) + pipes.append(p) + time.sleep(0.5) + return pipes + + +def compress_stress_logs(output_path, files_prefix): + cmd = f"cd {output_path} && tar -zcf stress_run_logs.tar.gz {files_prefix}* && rm {files_prefix}*" + check_output(cmd, shell=True) + + +def call_with_retry(query, timeout=30, retry_count=5): + for i in range(retry_count): + code = call(query, shell=True, stderr=STDOUT, timeout=timeout) + if code != 0: + time.sleep(i) + else: + break + + +def make_query_command(query): + return f"""clickhouse client -q "{query}" --max_untracked_memory=1Gi --memory_profiler_step=1Gi --max_memory_usage_for_user=0""" + + +def prepare_for_hung_check(drop_databases): + # FIXME this function should not exist, but... + + # We attach gdb to clickhouse-server before running tests + # to print stacktraces of all crashes even if clickhouse cannot print it for some reason. + # However, it obstruct checking for hung queries. + logging.info("Will terminate gdb (if any)") + call_with_retry("kill -TERM $(pidof gdb)") + + # ThreadFuzzer significantly slows down server and causes false-positive hung check failures + call_with_retry("clickhouse client -q 'SYSTEM STOP THREAD FUZZER'") + + call_with_retry(make_query_command("SELECT 1 FORMAT Null")) + + # Some tests execute SYSTEM STOP MERGES or similar queries. + # It may cause some ALTERs to hang. + # Possibly we should fix tests and forbid to use such queries without specifying table. + call_with_retry(make_query_command("SYSTEM START MERGES")) + call_with_retry(make_query_command("SYSTEM START DISTRIBUTED SENDS")) + call_with_retry(make_query_command("SYSTEM START TTL MERGES")) + call_with_retry(make_query_command("SYSTEM START MOVES")) + call_with_retry(make_query_command("SYSTEM START FETCHES")) + call_with_retry(make_query_command("SYSTEM START REPLICATED SENDS")) + call_with_retry(make_query_command("SYSTEM START REPLICATION QUEUES")) + call_with_retry(make_query_command("SYSTEM DROP MARK CACHE")) + + # Issue #21004, live views are experimental, so let's just suppress it + call_with_retry(make_query_command("KILL QUERY WHERE upper(query) LIKE 'WATCH %'")) + + # Kill other queries which known to be slow + # It's query from 01232_preparing_sets_race_condition_long, it may take up to 1000 seconds in slow builds + call_with_retry( + make_query_command("KILL QUERY WHERE query LIKE 'insert into tableB select %'") + ) + # Long query from 00084_external_agregation + call_with_retry( + make_query_command( + "KILL QUERY WHERE query LIKE 'SELECT URL, uniq(SearchPhrase) AS u FROM test.hits GROUP BY URL ORDER BY u %'" + ) + ) + + if drop_databases: + for i in range(5): + try: + # Here we try to drop all databases in async mode. If some queries really hung, than drop will hung too. + # Otherwise we will get rid of queries which wait for background pool. It can take a long time on slow builds (more than 900 seconds). + # + # Also specify max_untracked_memory to allow 1GiB of memory to overcommit. + databases = ( + check_output( + make_query_command("SHOW DATABASES"), shell=True, timeout=30 + ) + .decode("utf-8") + .strip() + .split() + ) + for db in databases: + if db == "system": + continue + command = make_query_command(f'DETACH DATABASE {db}') + # we don't wait for drop + Popen(command, shell=True) + break + except Exception as ex: + logging.error( + "Failed to SHOW or DROP databasese, will retry %s", str(ex) + ) + time.sleep(i) + else: + raise Exception( + "Cannot drop databases after stress tests. Probably server consumed too much memory and cannot execute simple queries" + ) + + # Wait for last queries to finish if any, not longer than 300 seconds + call( + make_query_command( + """ + select sleepEachRow(( + select maxOrDefault(300 - elapsed) + 1 + from system.processes + where query not like '%from system.processes%' and elapsed < 300 + ) / 300) + from numbers(300) + format Null + """ + ), + shell=True, + stderr=STDOUT, + timeout=330, + ) + + # Even if all clickhouse-test processes are finished, there are probably some sh scripts, + # which still run some new queries. Let's ignore them. + try: + query = """clickhouse client -q "SELECT count() FROM system.processes where where elapsed > 300" """ + output = ( + check_output(query, shell=True, stderr=STDOUT, timeout=30) + .decode("utf-8") + .strip() + ) + if int(output) == 0: + return False + except: + pass + return True + + +if __name__ == "__main__": + logging.basicConfig(level=logging.INFO, format="%(asctime)s %(message)s") + parser = argparse.ArgumentParser( + description="ClickHouse script for running stresstest" + ) + parser.add_argument("--test-cmd", default="/usr/bin/clickhouse-test") + parser.add_argument("--skip-func-tests", default="") + parser.add_argument("--client-cmd", default="clickhouse-client") + parser.add_argument("--server-log-folder", default="/var/log/clickhouse-server") + parser.add_argument("--output-folder") + parser.add_argument("--global-time-limit", type=int, default=1800) + parser.add_argument("--num-parallel", type=int, default=cpu_count()) + parser.add_argument("--upgrade-check", action="store_true") + parser.add_argument("--hung-check", action="store_true", default=False) + # make sense only for hung check + parser.add_argument("--drop-databases", action="store_true", default=False) + + args = parser.parse_args() + if args.drop_databases and not args.hung_check: + raise Exception("--drop-databases only used in hung check (--hung-check)") + func_pipes = [] + func_pipes = run_func_test( + args.test_cmd, + args.output_folder, + args.num_parallel, + args.skip_func_tests, + args.global_time_limit, + args.upgrade_check, + ) + + logging.info("Will wait functests to finish") + while True: + retcodes = [] + for p in func_pipes: + if p.poll() is not None: + retcodes.append(p.returncode) + if len(retcodes) == len(func_pipes): + break + logging.info("Finished %s from %s processes", len(retcodes), len(func_pipes)) + time.sleep(5) + + logging.info("All processes finished") + + logging.info("Compressing stress logs") + compress_stress_logs(args.output_folder, "stress_test_run_") + logging.info("Logs compressed") + + if args.hung_check: + try: + have_long_running_queries = prepare_for_hung_check(args.drop_databases) + except Exception as ex: + have_long_running_queries = True + logging.error("Failed to prepare for hung check %s", str(ex)) + logging.info("Checking if some queries hung") + cmd = " ".join( + [ + args.test_cmd, + # Do not track memory allocations up to 1Gi, + # this will allow to ignore server memory limit (max_server_memory_usage) for this query. + # + # NOTE: memory_profiler_step should be also adjusted, because: + # + # untracked_memory_limit = min(settings.max_untracked_memory, settings.memory_profiler_step) + # + # NOTE: that if there will be queries with GROUP BY, this trick + # will not work due to CurrentMemoryTracker::check() from + # Aggregator code. + # But right now it should work, since neither hung check, nor 00001_select_1 has GROUP BY. + "--client-option", + "max_untracked_memory=1Gi", + "max_memory_usage_for_user=0", + "memory_profiler_step=1Gi", + # Use system database to avoid CREATE/DROP DATABASE queries + "--database=system", + "--hung-check", + "--stress", + "00001_select_1", + ] + ) + res = call(cmd, shell=True, stderr=STDOUT) + hung_check_status = "No queries hung\tOK\n" + if res != 0 and have_long_running_queries: + logging.info("Hung check failed with exit code {}".format(res)) + hung_check_status = "Hung check failed\tFAIL\n" + with open( + os.path.join(args.output_folder, "test_results.tsv"), "w+" + ) as results: + results.write(hung_check_status) + + logging.info("Stress test finished") diff --git a/tests/ci/stress_check.py b/tests/ci/stress_check.py index 37277538867..1437d50f9c5 100644 --- a/tests/ci/stress_check.py +++ b/tests/ci/stress_check.py @@ -34,7 +34,6 @@ def get_run_command( "docker run --cap-add=SYS_PTRACE " # a static link, don't use S3_URL or S3_DOWNLOAD "-e S3_URL='https://s3.amazonaws.com/clickhouse-datasets' " - f"-e DISABLE_BC_CHECK={os.environ.get('DISABLE_BC_CHECK', '0')} " # For dmesg and sysctl "--privileged " f"--volume={build_path}:/package_folder " @@ -100,7 +99,7 @@ def process_results( return state, description, test_results, additional_files -if __name__ == "__main__": +def run_stress_test(docker_image_name): logging.basicConfig(level=logging.INFO) stopwatch = Stopwatch() @@ -123,7 +122,7 @@ if __name__ == "__main__": logging.info("Check is already finished according to github status, exiting") sys.exit(0) - docker_image = get_image_with_version(reports_path, "clickhouse/stress-test") + docker_image = get_image_with_version(reports_path, docker_image_name) packages_path = os.path.join(temp_path, "packages") if not os.path.exists(packages_path): @@ -187,3 +186,6 @@ if __name__ == "__main__": if state == "error": sys.exit(1) + +if __name__ == "__main__": + run_stress_test("clickhouse/stress-test") diff --git a/tests/ci/upgrade_check.py b/tests/ci/upgrade_check.py new file mode 100644 index 00000000000..83b6f9e299f --- /dev/null +++ b/tests/ci/upgrade_check.py @@ -0,0 +1,4 @@ +import stress_check + +if __name__ == "__main__": + stress_check.run_stress_test("clickhouse/upgrade-check") diff --git a/tests/clickhouse-test b/tests/clickhouse-test index 13669981daa..8d80bc58f7d 100755 --- a/tests/clickhouse-test +++ b/tests/clickhouse-test @@ -404,7 +404,7 @@ class FailureReason(enum.Enum): S3_STORAGE = "s3-storage" STRESS = "stress" BUILD = "not running for current build" - BACKWARD_INCOMPATIBLE = "test is backward incompatible" + NO_UPGRADE_CHECK = "not running for upgrade check" # UNKNOWN reasons NO_REFERENCE = "no reference file" @@ -650,35 +650,6 @@ class TestCase: else "" ) - # Check if test contains tag "no-backward-compatibility-check" and we should skip it - def check_backward_incompatible_tag(self) -> bool: - for tag in self.tags: - if tag.startswith("no-backward-compatibility-check"): - split = tag.split(":") - - # If version is not specified in tag, always skip this test. - if len(split) == 1: - return True - version_from_tag = split[1] - - # Check if extracted string from tag is a real ClickHouse version, if not - always skip test. - if re.match(VERSION_PATTERN, version_from_tag) is None: - return True - - server_version = str( - clickhouse_execute(args, "SELECT version()").decode() - ) - # If server version is less or equal from the version specified in tag, we should skip this test. - version_from_tag_split = list(map(int, version_from_tag.split("."))) - server_version_split = list(map(int, server_version.split("."))) - if ( - server_version_split[: len(version_from_tag_split)] - <= version_from_tag_split - ): - return True - - return False - # should skip test, should increment skipped_total, skip reason def should_skip_test(self, suite) -> Optional[FailureReason]: tags = self.tags @@ -726,10 +697,10 @@ class TestCase: elif tags and ("no-replicated-database" in tags) and args.replicated_database: return FailureReason.REPLICATED_DB - elif ( - args.backward_compatibility_check and self.check_backward_incompatible_tag() - ): - return FailureReason.BACKWARD_INCOMPATIBLE + # TODO: remove checking "no-upgrade-check" after 23.1 + elif args.upgrade_check and ( + "no-upgrade-check" in tags or "no-upgrade-check" in tags): + return FailureReason.NO_UPGRADE_CHECK elif tags and ("no-s3-storage" in tags) and args.s3_storage: return FailureReason.S3_STORAGE @@ -2212,9 +2183,9 @@ if __name__ == "__main__": ) group.add_argument( - "--backward-compatibility-check", + "--upgrade-check", action="store_true", - help="Run tests for further backward compatibility testing by ignoring all" + help="Run tests for further server upgrade testing by ignoring all" "drop queries in tests for collecting data from new version of server", ) parser.add_argument( @@ -2332,7 +2303,7 @@ if __name__ == "__main__": else: args.client_database = "default" - if args.backward_compatibility_check: + if args.upgrade_check: args.client += " --fake-drop" if args.client_option or args.secure: diff --git a/tests/queries/0_stateless/00061_merge_tree_alter.sql b/tests/queries/0_stateless/00061_merge_tree_alter.sql index ee5694518d9..2e46b1e16d6 100644 --- a/tests/queries/0_stateless/00061_merge_tree_alter.sql +++ b/tests/queries/0_stateless/00061_merge_tree_alter.sql @@ -1,4 +1,4 @@ --- Tags: no-backward-compatibility-check +-- Tags: no-upgrade-check DROP TABLE IF EXISTS alter_00061; set allow_deprecated_syntax_for_merge_tree=1; diff --git a/tests/queries/0_stateless/00626_replace_partition_from_table_zookeeper.sh b/tests/queries/0_stateless/00626_replace_partition_from_table_zookeeper.sh index 1aa02864815..8b07d9abe35 100755 --- a/tests/queries/0_stateless/00626_replace_partition_from_table_zookeeper.sh +++ b/tests/queries/0_stateless/00626_replace_partition_from_table_zookeeper.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Tags: zookeeper, no-parallel, no-s3-storage, no-backward-compatibility-check +# Tags: zookeeper, no-parallel, no-s3-storage, no-upgrade-check # Because REPLACE PARTITION does not forces immediate removal of replaced data parts from local filesystem # (it tries to do it as quick as possible, but it still performed in separate thread asynchronously) diff --git a/tests/queries/0_stateless/00732_quorum_insert_lost_part_and_alive_part_zookeeper_long.sql b/tests/queries/0_stateless/00732_quorum_insert_lost_part_and_alive_part_zookeeper_long.sql index e8d923389e5..9c02ac795ed 100644 --- a/tests/queries/0_stateless/00732_quorum_insert_lost_part_and_alive_part_zookeeper_long.sql +++ b/tests/queries/0_stateless/00732_quorum_insert_lost_part_and_alive_part_zookeeper_long.sql @@ -1,4 +1,4 @@ --- Tags: long, zookeeper, no-replicated-database, no-backward-compatibility-check +-- Tags: long, zookeeper, no-replicated-database, no-upgrade-check -- Tag no-replicated-database: Fails due to additional replicas or shards SET send_logs_level = 'fatal'; diff --git a/tests/queries/0_stateless/00942_dataparts_500.sh b/tests/queries/0_stateless/00942_dataparts_500.sh index 7e1a7f15810..a6c3fcd4303 100755 --- a/tests/queries/0_stateless/00942_dataparts_500.sh +++ b/tests/queries/0_stateless/00942_dataparts_500.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Tags: no-backward-compatibility-check +# Tags: no-upgrade-check # Test fix for issue #5066 CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) diff --git a/tests/queries/0_stateless/00993_system_parts_race_condition_drop_zookeeper.sh b/tests/queries/0_stateless/00993_system_parts_race_condition_drop_zookeeper.sh index 5ccef802c0c..f143c97bdf4 100755 --- a/tests/queries/0_stateless/00993_system_parts_race_condition_drop_zookeeper.sh +++ b/tests/queries/0_stateless/00993_system_parts_race_condition_drop_zookeeper.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Tags: race, zookeeper, no-parallel, no-backward-compatibility-check +# Tags: race, zookeeper, no-parallel, no-upgrade-check CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh diff --git a/tests/queries/0_stateless/01079_parallel_alter_detach_table_zookeeper.sh b/tests/queries/0_stateless/01079_parallel_alter_detach_table_zookeeper.sh index 1f316b4b389..aec27792603 100755 --- a/tests/queries/0_stateless/01079_parallel_alter_detach_table_zookeeper.sh +++ b/tests/queries/0_stateless/01079_parallel_alter_detach_table_zookeeper.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Tags: zookeeper, no-parallel, no-fasttest, no-backward-compatibility-check +# Tags: zookeeper, no-parallel, no-fasttest, no-upgrade-check CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh diff --git a/tests/queries/0_stateless/01111_create_drop_replicated_db_stress.sh b/tests/queries/0_stateless/01111_create_drop_replicated_db_stress.sh index bbe3a5a51c0..8c9efb75e96 100755 --- a/tests/queries/0_stateless/01111_create_drop_replicated_db_stress.sh +++ b/tests/queries/0_stateless/01111_create_drop_replicated_db_stress.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Tags: race, zookeeper, no-backward-compatibility-check +# Tags: race, zookeeper, no-upgrade-check CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh diff --git a/tests/queries/0_stateless/01191_rename_dictionary.sql b/tests/queries/0_stateless/01191_rename_dictionary.sql index ed9bc8af61b..8074e84f0ed 100644 --- a/tests/queries/0_stateless/01191_rename_dictionary.sql +++ b/tests/queries/0_stateless/01191_rename_dictionary.sql @@ -1,4 +1,4 @@ --- Tags: no-parallel, no-backward-compatibility-check +-- Tags: no-parallel, no-upgrade-check DROP DATABASE IF EXISTS test_01191; CREATE DATABASE test_01191 ENGINE=Atomic; diff --git a/tests/queries/0_stateless/01318_long_unsuccessful_mutation_zookeeper.sh b/tests/queries/0_stateless/01318_long_unsuccessful_mutation_zookeeper.sh index f7615974237..f9a2ec8a34c 100755 --- a/tests/queries/0_stateless/01318_long_unsuccessful_mutation_zookeeper.sh +++ b/tests/queries/0_stateless/01318_long_unsuccessful_mutation_zookeeper.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Tags: long, zookeeper, no-parallel, no-backward-compatibility-check +# Tags: long, zookeeper, no-parallel, no-upgrade-check CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh diff --git a/tests/queries/0_stateless/01378_alter_rename_with_ttl_zookeeper.sql b/tests/queries/0_stateless/01378_alter_rename_with_ttl_zookeeper.sql index 8717c93b468..43c9fa43104 100644 --- a/tests/queries/0_stateless/01378_alter_rename_with_ttl_zookeeper.sql +++ b/tests/queries/0_stateless/01378_alter_rename_with_ttl_zookeeper.sql @@ -1,4 +1,4 @@ --- Tags: zookeeper, no-backward-compatibility-check +-- Tags: zookeeper, no-upgrade-check DROP TABLE IF EXISTS table_rename_with_ttl; diff --git a/tests/queries/0_stateless/01391_join_on_dict_crash.sql b/tests/queries/0_stateless/01391_join_on_dict_crash.sql index 13ebd080621..5321e03767f 100644 --- a/tests/queries/0_stateless/01391_join_on_dict_crash.sql +++ b/tests/queries/0_stateless/01391_join_on_dict_crash.sql @@ -1,4 +1,4 @@ --- Tags: no-parallel, no-backward-compatibility-check +-- Tags: no-parallel, no-upgrade-check DROP DATABASE IF EXISTS db_01391; CREATE DATABASE db_01391; diff --git a/tests/queries/0_stateless/01555_system_distribution_queue_mask.sql b/tests/queries/0_stateless/01555_system_distribution_queue_mask.sql index bdcde1adbad..d2ae05a5f80 100644 --- a/tests/queries/0_stateless/01555_system_distribution_queue_mask.sql +++ b/tests/queries/0_stateless/01555_system_distribution_queue_mask.sql @@ -1,4 +1,4 @@ --- Tags: no-backward-compatibility-check +-- Tags: no-upgrade-check -- force data path with the user/pass in it set use_compact_format_in_distributed_parts_names=0; diff --git a/tests/queries/0_stateless/01576_alter_low_cardinality_and_select.sh b/tests/queries/0_stateless/01576_alter_low_cardinality_and_select.sh index 27de10ab16a..4a9b4beee5b 100755 --- a/tests/queries/0_stateless/01576_alter_low_cardinality_and_select.sh +++ b/tests/queries/0_stateless/01576_alter_low_cardinality_and_select.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Tags: no-backward-compatibility-check +# Tags: no-upgrade-check CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh diff --git a/tests/queries/0_stateless/01650_fetch_patition_with_macro_in_zk_path_long.sql b/tests/queries/0_stateless/01650_fetch_patition_with_macro_in_zk_path_long.sql index 1dae8e7b383..b45a1974611 100644 --- a/tests/queries/0_stateless/01650_fetch_patition_with_macro_in_zk_path_long.sql +++ b/tests/queries/0_stateless/01650_fetch_patition_with_macro_in_zk_path_long.sql @@ -1,4 +1,4 @@ --- Tags: long, no-backward-compatibility-check +-- Tags: long, no-upgrade-check DROP TABLE IF EXISTS test_01640; DROP TABLE IF EXISTS restore_01640; diff --git a/tests/queries/0_stateless/01780_column_sparse_alter.sql b/tests/queries/0_stateless/01780_column_sparse_alter.sql index 925b81ea2c2..bc2f6f7c91f 100644 --- a/tests/queries/0_stateless/01780_column_sparse_alter.sql +++ b/tests/queries/0_stateless/01780_column_sparse_alter.sql @@ -1,4 +1,4 @@ --- Tags: no-backward-compatibility-check +-- Tags: no-upgrade-check SET mutations_sync = 2; diff --git a/tests/queries/0_stateless/02022_storage_filelog_one_file.sh b/tests/queries/0_stateless/02022_storage_filelog_one_file.sh index 2f43423e13e..3abf5c52031 100755 --- a/tests/queries/0_stateless/02022_storage_filelog_one_file.sh +++ b/tests/queries/0_stateless/02022_storage_filelog_one_file.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Tags: no-backward-compatibility-check +# Tags: no-upgrade-check set -eu diff --git a/tests/queries/0_stateless/02025_storage_filelog_virtual_col.sh b/tests/queries/0_stateless/02025_storage_filelog_virtual_col.sh index e4041b2d755..e0f0114d030 100755 --- a/tests/queries/0_stateless/02025_storage_filelog_virtual_col.sh +++ b/tests/queries/0_stateless/02025_storage_filelog_virtual_col.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Tags: no-backward-compatibility-check +# Tags: no-upgrade-check set -eu diff --git a/tests/queries/0_stateless/02067_lost_part_s3.sql b/tests/queries/0_stateless/02067_lost_part_s3.sql index c4e69f68a5d..12afdcd4421 100644 --- a/tests/queries/0_stateless/02067_lost_part_s3.sql +++ b/tests/queries/0_stateless/02067_lost_part_s3.sql @@ -1,4 +1,4 @@ --- Tags: no-backward-compatibility-check, no-fasttest +-- Tags: no-upgrade-check, no-fasttest DROP TABLE IF EXISTS partslost_0; DROP TABLE IF EXISTS partslost_1; diff --git a/tests/queries/0_stateless/02222_create_table_without_columns_metadata.sh b/tests/queries/0_stateless/02222_create_table_without_columns_metadata.sh index 261c389c9f2..26646bd91a0 100755 --- a/tests/queries/0_stateless/02222_create_table_without_columns_metadata.sh +++ b/tests/queries/0_stateless/02222_create_table_without_columns_metadata.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Tags: no-fasttest, no-parallel, no-backward-compatibility-check +# Tags: no-fasttest, no-parallel, no-upgrade-check CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh diff --git a/tests/queries/0_stateless/02242_delete_user_race.sh b/tests/queries/0_stateless/02242_delete_user_race.sh index 8c28cdb57bd..f22b7796bd4 100755 --- a/tests/queries/0_stateless/02242_delete_user_race.sh +++ b/tests/queries/0_stateless/02242_delete_user_race.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Tags: race, no-fasttest, no-parallel, no-backward-compatibility-check +# Tags: race, no-fasttest, no-parallel, no-upgrade-check # Test tries to reproduce a race between threads: # - deletes user diff --git a/tests/queries/0_stateless/02243_drop_user_grant_race.sh b/tests/queries/0_stateless/02243_drop_user_grant_race.sh index d36db47e562..e36be96aa02 100755 --- a/tests/queries/0_stateless/02243_drop_user_grant_race.sh +++ b/tests/queries/0_stateless/02243_drop_user_grant_race.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Tags: race, no-fasttest, no-parallel, no-backward-compatibility-check +# Tags: race, no-fasttest, no-parallel, no-upgrade-check set -e diff --git a/tests/queries/0_stateless/02293_hashid.sql b/tests/queries/0_stateless/02293_hashid.sql index 9938154f169..06af0b5e1d8 100644 --- a/tests/queries/0_stateless/02293_hashid.sql +++ b/tests/queries/0_stateless/02293_hashid.sql @@ -1,4 +1,4 @@ --- Tags: no-backward-compatibility-check +-- Tags: no-upgrade-check SET allow_experimental_hash_functions = 1; select number, hashid(number) from system.numbers limit 5; diff --git a/tests/queries/0_stateless/02302_join_auto_lc_nullable_bug.sql b/tests/queries/0_stateless/02302_join_auto_lc_nullable_bug.sql index 469476c82bf..8e0fb4a55a0 100644 --- a/tests/queries/0_stateless/02302_join_auto_lc_nullable_bug.sql +++ b/tests/queries/0_stateless/02302_join_auto_lc_nullable_bug.sql @@ -1,4 +1,4 @@ --- Tags: no-backward-compatibility-check +-- Tags: no-upgrade-check SET max_bytes_in_join = '100', join_algorithm = 'auto'; diff --git a/tests/queries/0_stateless/02306_window_move_row_number_fix.sql b/tests/queries/0_stateless/02306_window_move_row_number_fix.sql index 5bc0c41b3ee..f73525f92be 100644 --- a/tests/queries/0_stateless/02306_window_move_row_number_fix.sql +++ b/tests/queries/0_stateless/02306_window_move_row_number_fix.sql @@ -1,2 +1,2 @@ --- Tags: no-backward-compatibility-check +-- Tags: no-upgrade-check SELECT nth_value(NULL, 1048577) OVER (Rows BETWEEN 1023 FOLLOWING AND UNBOUNDED FOLLOWING) diff --git a/tests/queries/0_stateless/02313_cross_join_dup_col_names.sql b/tests/queries/0_stateless/02313_cross_join_dup_col_names.sql index 44a4797ae3c..08e8843f763 100644 --- a/tests/queries/0_stateless/02313_cross_join_dup_col_names.sql +++ b/tests/queries/0_stateless/02313_cross_join_dup_col_names.sql @@ -1,4 +1,4 @@ --- Tags: no-backward-compatibility-check +-- Tags: no-upgrade-check -- https://github.com/ClickHouse/ClickHouse/issues/37561 diff --git a/tests/queries/0_stateless/02315_pmj_union_ubsan_35857.sql b/tests/queries/0_stateless/02315_pmj_union_ubsan_35857.sql index 47b47101a79..df20e5c42d4 100644 --- a/tests/queries/0_stateless/02315_pmj_union_ubsan_35857.sql +++ b/tests/queries/0_stateless/02315_pmj_union_ubsan_35857.sql @@ -1,4 +1,4 @@ --- Tags: no-backward-compatibility-check +-- Tags: no-upgrade-check SET join_algorithm = 'partial_merge'; diff --git a/tests/queries/0_stateless/02316_cast_to_ip_address_default_column.sql b/tests/queries/0_stateless/02316_cast_to_ip_address_default_column.sql index 35f210be43d..cac7992e305 100644 --- a/tests/queries/0_stateless/02316_cast_to_ip_address_default_column.sql +++ b/tests/queries/0_stateless/02316_cast_to_ip_address_default_column.sql @@ -1,6 +1,3 @@ --- Tags: no-backward-compatibility-check --- TODO: remove no-backward-compatibility-check after new 22.6 release - SET cast_ipv4_ipv6_default_on_conversion_error = 1; DROP TABLE IF EXISTS ipv4_test; diff --git a/tests/queries/0_stateless/02316_const_string_intersact.sql b/tests/queries/0_stateless/02316_const_string_intersact.sql index 18af398aa5d..148d048952b 100644 --- a/tests/queries/0_stateless/02316_const_string_intersact.sql +++ b/tests/queries/0_stateless/02316_const_string_intersact.sql @@ -1,3 +1,3 @@ --- Tags: no-backward-compatibility-check +-- Tags: no-upgrade-check SELECT 'Play ClickHouse' InterSect SELECT 'Play ClickHouse' diff --git a/tests/queries/0_stateless/02320_mapped_array_witn_const_nullable.sql b/tests/queries/0_stateless/02320_mapped_array_witn_const_nullable.sql index 08651590c76..734c597051e 100644 --- a/tests/queries/0_stateless/02320_mapped_array_witn_const_nullable.sql +++ b/tests/queries/0_stateless/02320_mapped_array_witn_const_nullable.sql @@ -1,4 +1,4 @@ --- Tags: no-backward-compatibility-check +-- Tags: no-upgrade-check select arrayMap(x -> toNullable(1), range(number)) from numbers(3); select arrayFilter(x -> toNullable(1), range(number)) from numbers(3); diff --git a/tests/queries/0_stateless/02332_dist_insert_send_logs_level.sh b/tests/queries/0_stateless/02332_dist_insert_send_logs_level.sh index 653cb25172a..503b94be715 100755 --- a/tests/queries/0_stateless/02332_dist_insert_send_logs_level.sh +++ b/tests/queries/0_stateless/02332_dist_insert_send_logs_level.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Tags: no-backward-compatibility-check +# Tags: no-upgrade-check CLICKHOUSE_CLIENT_SERVER_LOGS_LEVEL=trace CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) diff --git a/tests/queries/0_stateless/02345_partial_sort_transform_optimization.sql b/tests/queries/0_stateless/02345_partial_sort_transform_optimization.sql index eb395e5ec41..07f705acd84 100644 --- a/tests/queries/0_stateless/02345_partial_sort_transform_optimization.sql +++ b/tests/queries/0_stateless/02345_partial_sort_transform_optimization.sql @@ -1,4 +1,4 @@ --- Tags: no-backward-compatibility-check +-- Tags: no-upgrade-check -- Regression for PartialSortingTransform optimization that requires at least 1500 rows. SELECT * FROM (SELECT * FROM (SELECT 0 a, toNullable(number) b, toString(number) c FROM numbers(1e6)) ORDER BY a DESC, b DESC, c LIMIT 1500) limit 10; diff --git a/tests/queries/0_stateless/02354_annoy.sh b/tests/queries/0_stateless/02354_annoy.sh index 526886ec68d..670b31dc2a4 100755 --- a/tests/queries/0_stateless/02354_annoy.sh +++ b/tests/queries/0_stateless/02354_annoy.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Tags: no-fasttest, no-ubsan, no-cpu-aarch64, no-backward-compatibility-check +# Tags: no-fasttest, no-ubsan, no-cpu-aarch64, no-upgrade-check CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh diff --git a/tests/queries/0_stateless/02363_mapupdate_improve.sql b/tests/queries/0_stateless/02363_mapupdate_improve.sql index 6b7723cc9b4..b4a4b8e5d91 100644 --- a/tests/queries/0_stateless/02363_mapupdate_improve.sql +++ b/tests/queries/0_stateless/02363_mapupdate_improve.sql @@ -1,4 +1,4 @@ --- Tags: no-backward-compatibility-check +-- Tags: no-upgrade-check DROP TABLE IF EXISTS map_test; CREATE TABLE map_test(`tags` Map(String, String)) ENGINE = MergeTree PRIMARY KEY tags ORDER BY tags SETTINGS index_granularity = 8192; INSERT INTO map_test (tags) VALUES (map('fruit','apple','color','red')); diff --git a/tests/queries/0_stateless/02366_direct_dictionary_dict_has.sql b/tests/queries/0_stateless/02366_direct_dictionary_dict_has.sql index 9d6950051f0..cf9f2971cb0 100644 --- a/tests/queries/0_stateless/02366_direct_dictionary_dict_has.sql +++ b/tests/queries/0_stateless/02366_direct_dictionary_dict_has.sql @@ -1,4 +1,4 @@ --- Tags: no-backward-compatibility-check +-- Tags: no-upgrade-check DROP TABLE IF EXISTS test_table; CREATE TABLE test_table diff --git a/tests/queries/0_stateless/02366_with_fill_date.sql b/tests/queries/0_stateless/02366_with_fill_date.sql index 64e23b845f8..4d41facf423 100644 --- a/tests/queries/0_stateless/02366_with_fill_date.sql +++ b/tests/queries/0_stateless/02366_with_fill_date.sql @@ -1,4 +1,4 @@ --- Tags: no-backward-compatibility-check +-- Tags: no-upgrade-check SELECT toDate('2022-02-01') AS d1 FROM numbers(18) AS number diff --git a/tests/queries/0_stateless/02381_compress_marks_and_primary_key.sql b/tests/queries/0_stateless/02381_compress_marks_and_primary_key.sql index 0f1b4f638cb..327a09cd96f 100644 --- a/tests/queries/0_stateless/02381_compress_marks_and_primary_key.sql +++ b/tests/queries/0_stateless/02381_compress_marks_and_primary_key.sql @@ -1,4 +1,4 @@ --- Tags: no-backward-compatibility-check +-- Tags: no-upgrade-check drop table if exists test_02381; create table test_02381(a UInt64, b UInt64) ENGINE = MergeTree order by (a, b) SETTINGS compress_marks=false, compress_primary_key=false; diff --git a/tests/queries/0_stateless/02397_system_parts_race_condition_drop_rm.sh b/tests/queries/0_stateless/02397_system_parts_race_condition_drop_rm.sh index 2372d30497e..548179b94c9 100755 --- a/tests/queries/0_stateless/02397_system_parts_race_condition_drop_rm.sh +++ b/tests/queries/0_stateless/02397_system_parts_race_condition_drop_rm.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Tags: race, zookeeper, no-parallel, no-backward-compatibility-check, disabled +# Tags: race, zookeeper, no-parallel, no-upgrade-check, disabled CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh diff --git a/tests/queries/0_stateless/02429_low_cardinality_trash.sh b/tests/queries/0_stateless/02429_low_cardinality_trash.sh index 258f02b4bb6..91618cb2796 100755 --- a/tests/queries/0_stateless/02429_low_cardinality_trash.sh +++ b/tests/queries/0_stateless/02429_low_cardinality_trash.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Tags: long, no-backward-compatibility-check +# Tags: long, no-upgrade-check CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh diff --git a/tests/queries/0_stateless/02450_kill_distributed_query_deadlock.sh b/tests/queries/0_stateless/02450_kill_distributed_query_deadlock.sh index 11ca3f43d8f..abcf1bf4c5b 100755 --- a/tests/queries/0_stateless/02450_kill_distributed_query_deadlock.sh +++ b/tests/queries/0_stateless/02450_kill_distributed_query_deadlock.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Tags: long, no-backward-compatibility-check +# Tags: long, no-upgrade-check CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh From c7366f7906e28c4731234e15e1999a2011fe2e6c Mon Sep 17 00:00:00 2001 From: robot-clickhouse Date: Tue, 3 Jan 2023 19:32:11 +0000 Subject: [PATCH 009/841] Automatic style fix --- tests/ci/stress.py | 8 +++----- tests/ci/stress_check.py | 1 + 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/ci/stress.py b/tests/ci/stress.py index ae35afbc5fa..a1ad1a3f1c5 100755 --- a/tests/ci/stress.py +++ b/tests/ci/stress.py @@ -38,7 +38,7 @@ def get_options(i, upgrade_check): client_options.append("join_algorithm='full_sorting_merge'") if join_alg_num % 4 == 3: client_options.append("join_algorithm='auto'") - client_options.append('max_rows_in_join=1000') + client_options.append("max_rows_in_join=1000") if i == 13: client_options.append("memory_tracker_fault_probability=0.001") @@ -60,9 +60,7 @@ def run_func_test( global_time_limit, upgrade_check, ): - upgrade_check_option = ( - "--upgrade-check" if upgrade_check else "" - ) + upgrade_check_option = "--upgrade-check" if upgrade_check else "" global_time_limit_option = "" if global_time_limit: global_time_limit_option = "--global_time_limit={}".format(global_time_limit) @@ -165,7 +163,7 @@ def prepare_for_hung_check(drop_databases): for db in databases: if db == "system": continue - command = make_query_command(f'DETACH DATABASE {db}') + command = make_query_command(f"DETACH DATABASE {db}") # we don't wait for drop Popen(command, shell=True) break diff --git a/tests/ci/stress_check.py b/tests/ci/stress_check.py index 1437d50f9c5..66905c60569 100644 --- a/tests/ci/stress_check.py +++ b/tests/ci/stress_check.py @@ -187,5 +187,6 @@ def run_stress_test(docker_image_name): if state == "error": sys.exit(1) + if __name__ == "__main__": run_stress_test("clickhouse/stress-test") From de4aca9c6b7a61e8152f9c3a00747f2a3f7a1442 Mon Sep 17 00:00:00 2001 From: avogar Date: Tue, 3 Jan 2023 20:06:43 +0000 Subject: [PATCH 010/841] Update workflows --- .github/workflows/pull_request.yml | 140 ++++++++++++++++++++++++++++- 1 file changed, 138 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index efb7d50dd28..9bdd6a44b21 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -2897,10 +2897,10 @@ jobs: - name: Set envs run: | cat >> "$GITHUB_ENV" << 'EOF' - TEMP_PATH=${{runner.temp}}/stress_thread + TEMP_PATH=${{runner.temp}}/stress_asan REPORTS_PATH=${{runner.temp}}/reports_dir CHECK_NAME=Stress test (asan) - REPO_COPY=${{runner.temp}}/stress_thread/ClickHouse + REPO_COPY=${{runner.temp}}/stress_asan/ClickHouse EOF - name: Download json reports uses: actions/download-artifact@v3 @@ -3059,6 +3059,142 @@ jobs: docker ps --quiet | xargs --no-run-if-empty docker kill ||: docker ps --all --quiet | xargs --no-run-if-empty docker rm -f ||: sudo rm -fr "$TEMP_PATH" + ############################################################################################## + ######################################### UPGRADE CHECK ###################################### + ############################################################################################## + UpgradeCheckAsan: + needs: [BuilderDebAsan] + runs-on: [self-hosted, stress-tester] + steps: + - name: Set envs + run: | + cat >> "$GITHUB_ENV" << 'EOF' + TEMP_PATH=${{runner.temp}}/upgrade_asan + REPORTS_PATH=${{runner.temp}}/reports_dir + CHECK_NAME=Upgrade check (asan) + REPO_COPY=${{runner.temp}}/upgrade_asan/ClickHouse + EOF + - name: Download json reports + uses: actions/download-artifact@v3 + with: + path: ${{ env.REPORTS_PATH }} + - name: Check out repository code + uses: ClickHouse/checkout@v1 + with: + clear-repository: true + - name: Upgrade check + run: | + sudo rm -fr "$TEMP_PATH" + mkdir -p "$TEMP_PATH" + cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" + cd "$REPO_COPY/tests/ci" + python3 upgrade_check.py "$CHECK_NAME" + - name: Cleanup + if: always() + run: | + docker ps --quiet | xargs --no-run-if-empty docker kill ||: + docker ps --all --quiet | xargs --no-run-if-empty docker rm -f ||: + sudo rm -fr "$TEMP_PATH" + UpgradeCheckTsan: + needs: [BuilderDebTsan] + # same as for stress test with tsan + runs-on: [self-hosted, func-tester] + steps: + - name: Set envs + run: | + cat >> "$GITHUB_ENV" << 'EOF' + TEMP_PATH=${{runner.temp}}/upgrade_thread + REPORTS_PATH=${{runner.temp}}/reports_dir + CHECK_NAME=Upgrade check (tsan) + REPO_COPY=${{runner.temp}}/upgrade_thread/ClickHouse + EOF + - name: Download json reports + uses: actions/download-artifact@v3 + with: + path: ${{ env.REPORTS_PATH }} + - name: Check out repository code + uses: ClickHouse/checkout@v1 + with: + clear-repository: true + - name: Upgrade check + run: | + sudo rm -fr "$TEMP_PATH" + mkdir -p "$TEMP_PATH" + cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" + cd "$REPO_COPY/tests/ci" + python3 upgrade_check.py "$CHECK_NAME" + - name: Cleanup + if: always() + run: | + docker ps --quiet | xargs --no-run-if-empty docker kill ||: + docker ps --all --quiet | xargs --no-run-if-empty docker rm -f ||: + sudo rm -fr "$TEMP_PATH" + UpgradeCheckMsan: + needs: [BuilderDebMsan] + runs-on: [self-hosted, stress-tester] + steps: + - name: Set envs + run: | + cat >> "$GITHUB_ENV" << 'EOF' + TEMP_PATH=${{runner.temp}}/upgrade_memory + REPORTS_PATH=${{runner.temp}}/reports_dir + CHECK_NAME=Upgrade check (msan) + REPO_COPY=${{runner.temp}}/upgrade_memory/ClickHouse + EOF + - name: Download json reports + uses: actions/download-artifact@v3 + with: + path: ${{ env.REPORTS_PATH }} + - name: Check out repository code + uses: ClickHouse/checkout@v1 + with: + clear-repository: true + - name: Upgrade check + run: | + sudo rm -fr "$TEMP_PATH" + mkdir -p "$TEMP_PATH" + cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" + cd "$REPO_COPY/tests/ci" + python3 upgrade_check.py "$CHECK_NAME" + - name: Cleanup + if: always() + run: | + docker ps --quiet | xargs --no-run-if-empty docker kill ||: + docker ps --all --quiet | xargs --no-run-if-empty docker rm -f ||: + sudo rm -fr "$TEMP_PATH" + UpgradeCheckDebug: + needs: [BuilderDebDebug] + runs-on: [self-hosted, stress-tester] + steps: + - name: Set envs + run: | + cat >> "$GITHUB_ENV" << 'EOF' + TEMP_PATH=${{runner.temp}}/upgrade_debug + REPORTS_PATH=${{runner.temp}}/reports_dir + CHECK_NAME=Upgrade check (debug) + REPO_COPY=${{runner.temp}}/upgrade_debug/ClickHouse + EOF + - name: Download json reports + uses: actions/download-artifact@v3 + with: + path: ${{ env.REPORTS_PATH }} + - name: Check out repository code + uses: ClickHouse/checkout@v1 + with: + clear-repository: true + - name: Upgrade check + run: | + sudo rm -fr "$TEMP_PATH" + mkdir -p "$TEMP_PATH" + cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" + cd "$REPO_COPY/tests/ci" + python3 upgrade_check.py "$CHECK_NAME" + - name: Cleanup + if: always() + run: | + docker ps --quiet | xargs --no-run-if-empty docker kill ||: + docker ps --all --quiet | xargs --no-run-if-empty docker rm -f ||: + sudo rm -fr "$TEMP_PATH" ############################################################################################## ##################################### AST FUZZERS ############################################ ############################################################################################## From 9fb8b42d376fbfd996e12cb927e0f07143a6a94b Mon Sep 17 00:00:00 2001 From: avogar Date: Tue, 3 Jan 2023 20:13:12 +0000 Subject: [PATCH 011/841] Fix style --- tests/ci/stress.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/ci/stress.py b/tests/ci/stress.py index ae35afbc5fa..337e127cfe6 100755 --- a/tests/ci/stress.py +++ b/tests/ci/stress.py @@ -11,7 +11,7 @@ import time def get_options(i, upgrade_check): options = [] client_options = [] - if 0 < i: + if i > 0: options.append("--order=random") if i % 3 == 2 and not upgrade_check: @@ -72,8 +72,8 @@ def run_func_test( for i in range(num_processes) ] pipes = [] - for i in range(0, len(output_paths)): - f = open(output_paths[i], "w") + for i, path in enumerate(output_paths): + f = open(path, "w") full_command = "{} {} {} {} {} --stress".format( cmd, get_options(i, upgrade_check), @@ -295,7 +295,7 @@ if __name__ == "__main__": res = call(cmd, shell=True, stderr=STDOUT) hung_check_status = "No queries hung\tOK\n" if res != 0 and have_long_running_queries: - logging.info("Hung check failed with exit code {}".format(res)) + logging.info("Hung check failed with exit code %d", res) hung_check_status = "Hung check failed\tFAIL\n" with open( os.path.join(args.output_folder, "test_results.tsv"), "w+" From 399c9aa2354c04ff1b30c60357be26a52d3db0a6 Mon Sep 17 00:00:00 2001 From: avogar Date: Wed, 4 Jan 2023 00:04:38 +0000 Subject: [PATCH 012/841] Update images.json --- docker/images.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker/images.json b/docker/images.json index 8339205b52f..634c2b0c22c 100644 --- a/docker/images.json +++ b/docker/images.json @@ -55,6 +55,10 @@ "name": "clickhouse/stress-test", "dependent": [] }, + "docker/test/upgrade": { + "name": "clickhouse/upgrade-check", + "dependent": [] + }, "docker/test/split_build_smoke_test": { "name": "clickhouse/split-build-smoke-test", "dependent": [] From f1ca7e54d567ca9e229a041ff152a66b722c3715 Mon Sep 17 00:00:00 2001 From: avogar Date: Wed, 4 Jan 2023 15:06:16 +0000 Subject: [PATCH 013/841] Make better --- docker/test/ci | 305 --------------------------------- docker/test/stress/Dockerfile | 3 +- docker/test/upgrade/Dockerfile | 3 +- docker/test/upgrade/run.sh | 1 + 4 files changed, 5 insertions(+), 307 deletions(-) delete mode 100755 docker/test/ci diff --git a/docker/test/ci b/docker/test/ci deleted file mode 100755 index d1860e9e14b..00000000000 --- a/docker/test/ci +++ /dev/null @@ -1,305 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -from multiprocessing import cpu_count -from subprocess import Popen, call, check_output, STDOUT -import os -import argparse -import logging -import time - - -def get_options(i, backward_compatibility_check): - options = [] - client_options = [] - if 0 < i: - options.append("--order=random") - - if i % 3 == 2 and not backward_compatibility_check: - options.append( - '''--db-engine="Replicated('/test/db/test_{}', 's1', 'r1')"'''.format(i) - ) - client_options.append("allow_experimental_database_replicated=1") - - # If database name is not specified, new database is created for each functional test. - # Run some threads with one database for all tests. - if i % 2 == 1: - options.append(" --database=test_{}".format(i)) - - if i % 3 == 1: - client_options.append("join_use_nulls=1") - - if i % 2 == 1: - join_alg_num = i // 2 - if join_alg_num % 4 == 0: - client_options.append("join_algorithm='parallel_hash'") - if join_alg_num % 4 == 1: - client_options.append("join_algorithm='partial_merge'") - if join_alg_num % 4 == 2: - client_options.append("join_algorithm='full_sorting_merge'") - if join_alg_num % 4 == 3: - client_options.append("join_algorithm='auto'") - client_options.append('max_rows_in_join=1000') - - if i == 13: - client_options.append("memory_tracker_fault_probability=0.001") - - if i % 2 == 1 and not backward_compatibility_check: - client_options.append("group_by_use_nulls=1") - - if client_options: - options.append(" --client-option " + " ".join(client_options)) - - return " ".join(options) - - -def run_func_test( - cmd, - output_prefix, - num_processes, - skip_tests_option, - global_time_limit, - backward_compatibility_check, -): - backward_compatibility_check_option = ( - "--backward-compatibility-check" if backward_compatibility_check else "" - ) - global_time_limit_option = "" - if global_time_limit: - global_time_limit_option = "--global_time_limit={}".format(global_time_limit) - - output_paths = [ - os.path.join(output_prefix, "stress_test_run_{}.txt".format(i)) - for i in range(num_processes) - ] - pipes = [] - for i in range(0, len(output_paths)): - f = open(output_paths[i], "w") - full_command = "{} {} {} {} {} --stress".format( - cmd, - get_options(i, backward_compatibility_check), - global_time_limit_option, - skip_tests_option, - backward_compatibility_check_option, - ) - logging.info("Run func tests '%s'", full_command) - p = Popen(full_command, shell=True, stdout=f, stderr=f) - pipes.append(p) - time.sleep(0.5) - return pipes - - -def compress_stress_logs(output_path, files_prefix): - cmd = f"cd {output_path} && tar -zcf stress_run_logs.tar.gz {files_prefix}* && rm {files_prefix}*" - check_output(cmd, shell=True) - - -def call_with_retry(query, timeout=30, retry_count=5): - for i in range(retry_count): - code = call(query, shell=True, stderr=STDOUT, timeout=timeout) - if code != 0: - time.sleep(i) - else: - break - - -def make_query_command(query): - return f"""clickhouse client -q "{query}" --max_untracked_memory=1Gi --memory_profiler_step=1Gi --max_memory_usage_for_user=0""" - - -def prepare_for_hung_check(drop_databases): - # FIXME this function should not exist, but... - - # We attach gdb to clickhouse-server before running tests - # to print stacktraces of all crashes even if clickhouse cannot print it for some reason. - # However, it obstruct checking for hung queries. - logging.info("Will terminate gdb (if any)") - call_with_retry("kill -TERM $(pidof gdb)") - - # ThreadFuzzer significantly slows down server and causes false-positive hung check failures - call_with_retry("clickhouse client -q 'SYSTEM STOP THREAD FUZZER'") - - call_with_retry(make_query_command("SELECT 1 FORMAT Null")) - - # Some tests execute SYSTEM STOP MERGES or similar queries. - # It may cause some ALTERs to hang. - # Possibly we should fix tests and forbid to use such queries without specifying table. - call_with_retry(make_query_command("SYSTEM START MERGES")) - call_with_retry(make_query_command("SYSTEM START DISTRIBUTED SENDS")) - call_with_retry(make_query_command("SYSTEM START TTL MERGES")) - call_with_retry(make_query_command("SYSTEM START MOVES")) - call_with_retry(make_query_command("SYSTEM START FETCHES")) - call_with_retry(make_query_command("SYSTEM START REPLICATED SENDS")) - call_with_retry(make_query_command("SYSTEM START REPLICATION QUEUES")) - call_with_retry(make_query_command("SYSTEM DROP MARK CACHE")) - - # Issue #21004, live views are experimental, so let's just suppress it - call_with_retry(make_query_command("KILL QUERY WHERE upper(query) LIKE 'WATCH %'")) - - # Kill other queries which known to be slow - # It's query from 01232_preparing_sets_race_condition_long, it may take up to 1000 seconds in slow builds - call_with_retry( - make_query_command("KILL QUERY WHERE query LIKE 'insert into tableB select %'") - ) - # Long query from 00084_external_agregation - call_with_retry( - make_query_command( - "KILL QUERY WHERE query LIKE 'SELECT URL, uniq(SearchPhrase) AS u FROM test.hits GROUP BY URL ORDER BY u %'" - ) - ) - - if drop_databases: - for i in range(5): - try: - # Here we try to drop all databases in async mode. If some queries really hung, than drop will hung too. - # Otherwise we will get rid of queries which wait for background pool. It can take a long time on slow builds (more than 900 seconds). - # - # Also specify max_untracked_memory to allow 1GiB of memory to overcommit. - databases = ( - check_output( - make_query_command("SHOW DATABASES"), shell=True, timeout=30 - ) - .decode("utf-8") - .strip() - .split() - ) - for db in databases: - if db == "system": - continue - command = make_query_command(f'DETACH DATABASE {db}') - # we don't wait for drop - Popen(command, shell=True) - break - except Exception as ex: - logging.error( - "Failed to SHOW or DROP databasese, will retry %s", str(ex) - ) - time.sleep(i) - else: - raise Exception( - "Cannot drop databases after stress tests. Probably server consumed too much memory and cannot execute simple queries" - ) - - # Wait for last queries to finish if any, not longer than 300 seconds - call( - make_query_command( - """ - select sleepEachRow(( - select maxOrDefault(300 - elapsed) + 1 - from system.processes - where query not like '%from system.processes%' and elapsed < 300 - ) / 300) - from numbers(300) - format Null - """ - ), - shell=True, - stderr=STDOUT, - timeout=330, - ) - - # Even if all clickhouse-test processes are finished, there are probably some sh scripts, - # which still run some new queries. Let's ignore them. - try: - query = """clickhouse client -q "SELECT count() FROM system.processes where where elapsed > 300" """ - output = ( - check_output(query, shell=True, stderr=STDOUT, timeout=30) - .decode("utf-8") - .strip() - ) - if int(output) == 0: - return False - except: - pass - return True - - -if __name__ == "__main__": - logging.basicConfig(level=logging.INFO, format="%(asctime)s %(message)s") - parser = argparse.ArgumentParser( - description="ClickHouse script for running stresstest" - ) - parser.add_argument("--test-cmd", default="/usr/bin/clickhouse-test") - parser.add_argument("--skip-func-tests", default="") - parser.add_argument("--client-cmd", default="clickhouse-client") - parser.add_argument("--server-log-folder", default="/var/log/clickhouse-server") - parser.add_argument("--output-folder") - parser.add_argument("--global-time-limit", type=int, default=1800) - parser.add_argument("--num-parallel", type=int, default=cpu_count()) - parser.add_argument("--backward-compatibility-check", action="store_true") - parser.add_argument("--hung-check", action="store_true", default=False) - # make sense only for hung check - parser.add_argument("--drop-databases", action="store_true", default=False) - - args = parser.parse_args() - if args.drop_databases and not args.hung_check: - raise Exception("--drop-databases only used in hung check (--hung-check)") - func_pipes = [] - func_pipes = run_func_test( - args.test_cmd, - args.output_folder, - args.num_parallel, - args.skip_func_tests, - args.global_time_limit, - args.backward_compatibility_check, - ) - - logging.info("Will wait functests to finish") - while True: - retcodes = [] - for p in func_pipes: - if p.poll() is not None: - retcodes.append(p.returncode) - if len(retcodes) == len(func_pipes): - break - logging.info("Finished %s from %s processes", len(retcodes), len(func_pipes)) - time.sleep(5) - - logging.info("All processes finished") - - logging.info("Compressing stress logs") - compress_stress_logs(args.output_folder, "stress_test_run_") - logging.info("Logs compressed") - - if args.hung_check: - try: - have_long_running_queries = prepare_for_hung_check(args.drop_databases) - except Exception as ex: - have_long_running_queries = True - logging.error("Failed to prepare for hung check %s", str(ex)) - logging.info("Checking if some queries hung") - cmd = " ".join( - [ - args.test_cmd, - # Do not track memory allocations up to 1Gi, - # this will allow to ignore server memory limit (max_server_memory_usage) for this query. - # - # NOTE: memory_profiler_step should be also adjusted, because: - # - # untracked_memory_limit = min(settings.max_untracked_memory, settings.memory_profiler_step) - # - # NOTE: that if there will be queries with GROUP BY, this trick - # will not work due to CurrentMemoryTracker::check() from - # Aggregator code. - # But right now it should work, since neither hung check, nor 00001_select_1 has GROUP BY. - "--client-option", - "max_untracked_memory=1Gi", - "max_memory_usage_for_user=0", - "memory_profiler_step=1Gi", - # Use system database to avoid CREATE/DROP DATABASE queries - "--database=system", - "--hung-check", - "--stress", - "00001_select_1", - ] - ) - res = call(cmd, shell=True, stderr=STDOUT) - hung_check_status = "No queries hung\tOK\n" - if res != 0 and have_long_running_queries: - logging.info("Hung check failed with exit code {}".format(res)) - hung_check_status = "Hung check failed\tFAIL\n" - with open( - os.path.join(args.output_folder, "test_results.tsv"), "w+" - ) as results: - results.write(hung_check_status) - - logging.info("Stress test finished") diff --git a/docker/test/stress/Dockerfile b/docker/test/stress/Dockerfile index 2778b63774d..1cabea58a65 100644 --- a/docker/test/stress/Dockerfile +++ b/docker/test/stress/Dockerfile @@ -22,7 +22,8 @@ RUN apt-get update -y \ netcat-openbsd \ telnet \ llvm-9 \ - brotli + brotli \ + && apt-get clean COPY run.sh / diff --git a/docker/test/upgrade/Dockerfile b/docker/test/upgrade/Dockerfile index c98220b3403..a91088fb01e 100644 --- a/docker/test/upgrade/Dockerfile +++ b/docker/test/upgrade/Dockerfile @@ -22,7 +22,8 @@ RUN apt-get update -y \ netcat-openbsd \ telnet \ llvm-9 \ - brotli + brotli \ + && apt-get clean COPY run.sh / diff --git a/docker/test/upgrade/run.sh b/docker/test/upgrade/run.sh index 1a107b6df2a..c0a7f279588 100644 --- a/docker/test/upgrade/run.sh +++ b/docker/test/upgrade/run.sh @@ -30,6 +30,7 @@ function configure() /usr/share/clickhouse-test/config/install.sh # we mount tests folder from repo to /usr/share + ln -s /usr/share/clickhouse-test/ci/stress.py /usr/bin/stress ln -s /usr/share/clickhouse-test/clickhouse-test /usr/bin/clickhouse-test ln -s /usr/share/clickhouse-test/ci/download_release_packages.py /usr/bin/download_release_packages ln -s /usr/share/clickhouse-test/ci/get_previous_release_tag.py /usr/bin/get_previous_release_tag From fbe4808b6b73523d756bcebeb8ffb0e38b6a2084 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Tue, 10 Jan 2023 12:28:13 +0000 Subject: [PATCH 014/841] Add support for custom key in parallel replicas --- src/Core/Settings.h | 2 + src/Core/SettingsEnums.cpp | 4 ++ src/Core/SettingsEnums.h | 9 +++ src/Interpreters/Cluster.cpp | 1 - src/Interpreters/InterpreterSelectQuery.cpp | 15 +++++ .../MergeTree/MergeTreeDataSelectExecutor.cpp | 60 +++++++++++++++++-- src/Storages/SelectQueryInfo.h | 2 + 7 files changed, 86 insertions(+), 7 deletions(-) diff --git a/src/Core/Settings.h b/src/Core/Settings.h index 2357948a1f6..a714fc449b7 100644 --- a/src/Core/Settings.h +++ b/src/Core/Settings.h @@ -153,6 +153,8 @@ static constexpr UInt64 operator""_GiB(unsigned long long value) M(UInt64, max_parallel_replicas, 1, "The maximum number of replicas of each shard used when the query is executed. For consistency (to get different parts of the same partition), this option only works for the specified sampling key. The lag of the replicas is not controlled.", 0) \ M(UInt64, parallel_replicas_count, 0, "This is internal setting that should not be used directly and represents an implementation detail of the 'parallel replicas' mode. This setting will be automatically set up by the initiator server for distributed queries to the number of parallel replicas participating in query processing.", 0) \ M(UInt64, parallel_replica_offset, 0, "This is internal setting that should not be used directly and represents an implementation detail of the 'parallel replicas' mode. This setting will be automatically set up by the initiator server for distributed queries to the index of the replica participating in query processing among parallel replicas.", 0) \ + M(String, parallel_replicas_custom_key, "", "Custom key for parallel replicas", 0) \ + M(ParallelReplicasMode, parallel_replicas_mode, ParallelReplicasMode::SAMPLE_KEY, "How to process query using multiple replicas.", 0) \ \ M(Bool, allow_experimental_parallel_reading_from_replicas, false, "If true, ClickHouse will send a SELECT query to all replicas of a table. It will work for any kind on MergeTree table.", 0) \ \ diff --git a/src/Core/SettingsEnums.cpp b/src/Core/SettingsEnums.cpp index 632587106a1..eaeed9dc44c 100644 --- a/src/Core/SettingsEnums.cpp +++ b/src/Core/SettingsEnums.cpp @@ -162,4 +162,8 @@ IMPLEMENT_SETTING_ENUM(MsgPackUUIDRepresentation , ErrorCodes::BAD_ARGUMENTS, IMPLEMENT_SETTING_ENUM(Dialect, ErrorCodes::BAD_ARGUMENTS, {{"clickhouse", Dialect::clickhouse}, {"kusto", Dialect::kusto}}) + +IMPLEMENT_SETTING_ENUM(ParallelReplicasMode, ErrorCodes::BAD_ARGUMENTS, + {{"sample_key", ParallelReplicasMode::SAMPLE_KEY}, + {"custom_key", ParallelReplicasMode::CUSTOM_KEY}}) } diff --git a/src/Core/SettingsEnums.h b/src/Core/SettingsEnums.h index 97c4275c4d2..a2041634d4b 100644 --- a/src/Core/SettingsEnums.h +++ b/src/Core/SettingsEnums.h @@ -191,4 +191,13 @@ enum class Dialect }; DECLARE_SETTING_ENUM(Dialect) + +enum class ParallelReplicasMode : uint8_t +{ + SAMPLE_KEY, + CUSTOM_KEY, +}; + +DECLARE_SETTING_ENUM(ParallelReplicasMode) + } diff --git a/src/Interpreters/Cluster.cpp b/src/Interpreters/Cluster.cpp index b76434b23e7..9f0a9d3b35c 100644 --- a/src/Interpreters/Cluster.cpp +++ b/src/Interpreters/Cluster.cpp @@ -509,7 +509,6 @@ Cluster::Cluster(const Poco::Util::AbstractConfiguration & config, shard_local_addresses.push_back(replica); shard_all_addresses.push_back(replica); } - ConnectionPoolWithFailoverPtr shard_pool = std::make_shared( all_replicas_pools, settings.load_balancing, settings.distributed_replica_error_half_life.totalSeconds(), settings.distributed_replica_error_cap); diff --git a/src/Interpreters/InterpreterSelectQuery.cpp b/src/Interpreters/InterpreterSelectQuery.cpp index ba2c845ead1..2d0436fa9d3 100644 --- a/src/Interpreters/InterpreterSelectQuery.cpp +++ b/src/Interpreters/InterpreterSelectQuery.cpp @@ -319,6 +319,15 @@ static ASTPtr parseAdditionalFilterConditionForTable( return nullptr; } +static ASTPtr parseParallelReplicaCustomKey(const String & setting, const Context & context) +{ + ParserExpression parser; + const auto & settings = context.getSettingsRef(); + return parseQuery( + parser, setting.data(), setting.data() + setting.size(), + "parallel replicas custom key", settings.max_query_size, settings.max_parser_depth); +} + /// Returns true if we should ignore quotas and limits for a specified table in the system database. static bool shouldIgnoreQuotaAndLimits(const StorageID & table_id) { @@ -501,6 +510,12 @@ InterpreterSelectQuery::InterpreterSelectQuery( query_info.additional_filter_ast = parseAdditionalFilterConditionForTable( settings.additional_table_filters, joined_tables.tablesWithColumns().front().table, *context); + if (settings.parallel_replicas_mode == ParallelReplicasMode::CUSTOM_KEY && !settings.parallel_replicas_custom_key.value.empty()) + { + query_info.parallel_replica_custom_key_ast = parseParallelReplicaCustomKey( + settings.parallel_replicas_custom_key, *context); + } + auto analyze = [&] (bool try_move_to_prewhere) { /// Allow push down and other optimizations for VIEW: replace with subquery and rewrite it. diff --git a/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp b/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp index 1ca1779e4b0..3d48c333727 100644 --- a/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp +++ b/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp @@ -34,6 +34,7 @@ #include #include +#include #include #include #include @@ -44,6 +45,8 @@ #include #include +#include +#include namespace DB { @@ -61,6 +64,7 @@ namespace ErrorCodes extern const int DUPLICATED_PART_UUIDS; extern const int NO_SUCH_COLUMN_IN_TABLE; extern const int PROJECTION_NOT_USED; + extern const int BAD_ARGUMENTS; } @@ -470,6 +474,25 @@ QueryPlanPtr MergeTreeDataSelectExecutor::read( return plan; } +namespace +{ + +bool supportsSamplingForParallelReplicas(const SelectQueryInfo & select_query_info, const MergeTreeData & data, const Settings & settings) +{ + if (settings.parallel_replicas_mode == ParallelReplicasMode::CUSTOM_KEY) + { + /// maybe just don't use sampling or try to fallback to SAMPLE_KEY? + if (select_query_info.parallel_replica_custom_key_ast == nullptr) + throw Exception(DB::ErrorCodes::BAD_ARGUMENTS, "Parallel replicas mode set to 'custom_key' but no 'parallel_replicas_custom_key' defined"); + + return true; + } + + return data.supportsSampling(); +} + +} + MergeTreeDataSelectSamplingData MergeTreeDataSelectExecutor::getSampling( const SelectQueryInfo & select_query_info, NamesAndTypesList available_real_columns, @@ -587,9 +610,10 @@ MergeTreeDataSelectSamplingData MergeTreeDataSelectExecutor::getSampling( * It is also important that the entire universe can be covered using SAMPLE 0.1 OFFSET 0, ... OFFSET 0.9 and similar decimals. */ + bool supports_sampling_for_parallel_replicas = supportsSamplingForParallelReplicas(select_query_info, data, settings); /// Parallel replicas has been requested but there is no way to sample data. /// Select all data from first replica and no data from other replicas. - if (settings.parallel_replicas_count > 1 && !data.supportsSampling() && settings.parallel_replica_offset > 0) + if (settings.parallel_replicas_count > 1 && !supports_sampling_for_parallel_replicas && settings.parallel_replica_offset > 0) { LOG_DEBUG(log, "Will use no data on this replica because parallel replicas processing has been requested" " (the setting 'max_parallel_replicas') but the table does not support sampling and this replica is not the first."); @@ -597,16 +621,34 @@ MergeTreeDataSelectSamplingData MergeTreeDataSelectExecutor::getSampling( return sampling; } - sampling.use_sampling = relative_sample_size > 0 || (settings.parallel_replicas_count > 1 && data.supportsSampling()); + sampling.use_sampling = relative_sample_size > 0 || (settings.parallel_replicas_count > 1 && supports_sampling_for_parallel_replicas); bool no_data = false; /// There is nothing left after sampling. + std::optional parallel_replicas_custom_key_description; + const auto get_sampling_key = [&]() -> const KeyDescription & + { + if (settings.parallel_replicas_count > 1 && settings.parallel_replicas_mode == ParallelReplicasMode::CUSTOM_KEY) + { + assert(select_query_info.parallel_replica_custom_key_ast); + + LOG_INFO(log, "Using custom key for sampling while processing with multiple replicas"); + + if (!parallel_replicas_custom_key_description) + parallel_replicas_custom_key_description = KeyDescription::getKeyFromAST(select_query_info.parallel_replica_custom_key_ast, metadata_snapshot->columns, context); + + return *parallel_replicas_custom_key_description; + } + + return metadata_snapshot->getSamplingKey(); + }; + if (sampling.use_sampling) { if (sample_factor_column_queried && relative_sample_size != RelativeSize(0)) sampling.used_sample_factor = 1.0 / boost::rational_cast(relative_sample_size); RelativeSize size_of_universum = 0; - const auto & sampling_key = metadata_snapshot->getSamplingKey(); + const auto & sampling_key = get_sampling_key(); DataTypePtr sampling_column_type = sampling_key.data_types[0]; if (sampling_key.data_types.size() == 1) @@ -681,7 +723,7 @@ MergeTreeDataSelectSamplingData MergeTreeDataSelectExecutor::getSampling( /// If sample and final are used together no need to calculate sampling expression twice. /// The first time it was calculated for final, because sample key is a part of the PK. /// So, assume that we already have calculated column. - ASTPtr sampling_key_ast = metadata_snapshot->getSamplingKeyAST(); + ASTPtr sampling_key_ast = sampling_key.definition_ast; if (final) { @@ -693,8 +735,11 @@ MergeTreeDataSelectSamplingData MergeTreeDataSelectExecutor::getSampling( if (has_lower_limit) { if (!key_condition.addCondition( - sampling_key.column_names[0], Range::createLeftBounded(lower, true, sampling_key.data_types[0]->isNullable()))) + sampling_key.column_names[0], Range::createLeftBounded(lower, true, sampling_key.data_types[0]->isNullable())) + && (settings.parallel_replicas_count <= 1 || settings.parallel_replicas_mode == ParallelReplicasMode::SAMPLE_KEY)) + { throw Exception("Sampling column not in primary key", ErrorCodes::ILLEGAL_COLUMN); + } ASTPtr args = std::make_shared(); args->children.push_back(sampling_key_ast); @@ -711,8 +756,11 @@ MergeTreeDataSelectSamplingData MergeTreeDataSelectExecutor::getSampling( if (has_upper_limit) { if (!key_condition.addCondition( - sampling_key.column_names[0], Range::createRightBounded(upper, false, sampling_key.data_types[0]->isNullable()))) + sampling_key.column_names[0], Range::createRightBounded(upper, false, sampling_key.data_types[0]->isNullable())) + && (settings.parallel_replicas_count <= 1 || settings.parallel_replicas_mode == ParallelReplicasMode::SAMPLE_KEY)) + { throw Exception("Sampling column not in primary key", ErrorCodes::ILLEGAL_COLUMN); + } ASTPtr args = std::make_shared(); args->children.push_back(sampling_key_ast); diff --git a/src/Storages/SelectQueryInfo.h b/src/Storages/SelectQueryInfo.h index a8a8ae4e877..ec3af64d93a 100644 --- a/src/Storages/SelectQueryInfo.h +++ b/src/Storages/SelectQueryInfo.h @@ -209,6 +209,8 @@ struct SelectQueryInfo /// It is needed for PK analysis based on row_level_policy and additional_filters. ASTs filter_asts; + ASTPtr parallel_replica_custom_key_ast; + /// Filter actions dag for current storage ActionsDAGPtr filter_actions_dag; From 19e5988d3312194be35ab0d26c5c2966890a643a Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Wed, 11 Jan 2023 09:57:13 +0000 Subject: [PATCH 015/841] Better --- src/Interpreters/InterpreterSelectQuery.cpp | 63 ++++++++++++++++--- src/Interpreters/InterpreterSelectQuery.h | 2 + .../MergeTree/MergeTreeDataSelectExecutor.cpp | 60 ++---------------- 3 files changed, 61 insertions(+), 64 deletions(-) diff --git a/src/Interpreters/InterpreterSelectQuery.cpp b/src/Interpreters/InterpreterSelectQuery.cpp index 2d0436fa9d3..1cd5d0004fa 100644 --- a/src/Interpreters/InterpreterSelectQuery.cpp +++ b/src/Interpreters/InterpreterSelectQuery.cpp @@ -510,10 +510,37 @@ InterpreterSelectQuery::InterpreterSelectQuery( query_info.additional_filter_ast = parseAdditionalFilterConditionForTable( settings.additional_table_filters, joined_tables.tablesWithColumns().front().table, *context); - if (settings.parallel_replicas_mode == ParallelReplicasMode::CUSTOM_KEY && !settings.parallel_replicas_custom_key.value.empty()) + + ASTPtr parallel_replicas_custom_filter_ast = nullptr; + if (settings.parallel_replicas_count > 1 && settings.parallel_replicas_mode == ParallelReplicasMode::CUSTOM_KEY) { - query_info.parallel_replica_custom_key_ast = parseParallelReplicaCustomKey( + if (settings.parallel_replicas_custom_key.value.empty()) + throw Exception(DB::ErrorCodes::BAD_ARGUMENTS, "Parallel replicas mode set to 'custom_key' but 'parallel_replicas_custom_key' has no value"); + + auto custom_key_ast = parseParallelReplicaCustomKey( settings.parallel_replicas_custom_key, *context); + + // first we do modulo with replica count + ASTPtr args = std::make_shared(); + args->children.push_back(custom_key_ast); + args->children.push_back(std::make_shared(settings.parallel_replicas_count.value)); + + auto modulo_function = std::make_shared(); + modulo_function->name = "positiveModulo"; + modulo_function->arguments = args; + modulo_function->children.push_back(modulo_function->arguments); + + /// then we compare result to the current replica number (offset) + args = std::make_shared(); + args->children.push_back(modulo_function); + args->children.push_back(std::make_shared(settings.parallel_replica_offset.value)); + + auto equals_function = std::make_shared(); + equals_function->name = "equals"; + equals_function->arguments = args; + equals_function->children.push_back(equals_function->arguments); + + parallel_replicas_custom_filter_ast = equals_function; } auto analyze = [&] (bool try_move_to_prewhere) @@ -653,6 +680,16 @@ InterpreterSelectQuery::InterpreterSelectQuery( query_info.filter_asts.push_back(query_info.additional_filter_ast); } + if (parallel_replicas_custom_filter_ast) + { + custom_key_filter_info = generateFilterActions( + table_id, parallel_replicas_custom_filter_ast, context, storage, storage_snapshot, metadata_snapshot, required_columns, + prepared_sets); + + custom_key_filter_info->do_remove_column = true; + query_info.filter_asts.push_back(parallel_replicas_custom_filter_ast); + } + source_header = storage_snapshot->getSampleBlockForColumns(required_columns); } @@ -1396,17 +1433,23 @@ void InterpreterSelectQuery::executeImpl(QueryPlan & query_plan, std::optional

( + auto filter_step = std::make_unique( query_plan.getCurrentDataStream(), - additional_filter_info->actions, - additional_filter_info->column_name, - additional_filter_info->do_remove_column); + new_filter_info->actions, + new_filter_info->column_name, + new_filter_info->do_remove_column); - additional_filter_step->setStepDescription("Additional filter"); - query_plan.addStep(std::move(additional_filter_step)); - } + filter_step->setStepDescription(description); + query_plan.addStep(std::move(filter_step)); + }; + + if (additional_filter_info) + add_filter_step(additional_filter_info, "Additional filter"); + + if (custom_key_filter_info) + add_filter_step(custom_key_filter_info, "Paralel replica custom key filter"); if (expressions.before_array_join) { diff --git a/src/Interpreters/InterpreterSelectQuery.h b/src/Interpreters/InterpreterSelectQuery.h index 761eea8e1b8..5667c0e1fa7 100644 --- a/src/Interpreters/InterpreterSelectQuery.h +++ b/src/Interpreters/InterpreterSelectQuery.h @@ -224,6 +224,8 @@ private: /// For additional_filter setting. FilterDAGInfoPtr additional_filter_info; + FilterDAGInfoPtr custom_key_filter_info; + QueryProcessingStage::Enum from_stage = QueryProcessingStage::FetchColumns; /// List of columns to read to execute the query. diff --git a/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp b/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp index 3d48c333727..d55e3f86f30 100644 --- a/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp +++ b/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp @@ -34,7 +34,6 @@ #include #include -#include #include #include #include @@ -45,8 +44,6 @@ #include #include -#include -#include namespace DB { @@ -64,7 +61,6 @@ namespace ErrorCodes extern const int DUPLICATED_PART_UUIDS; extern const int NO_SUCH_COLUMN_IN_TABLE; extern const int PROJECTION_NOT_USED; - extern const int BAD_ARGUMENTS; } @@ -474,25 +470,6 @@ QueryPlanPtr MergeTreeDataSelectExecutor::read( return plan; } -namespace -{ - -bool supportsSamplingForParallelReplicas(const SelectQueryInfo & select_query_info, const MergeTreeData & data, const Settings & settings) -{ - if (settings.parallel_replicas_mode == ParallelReplicasMode::CUSTOM_KEY) - { - /// maybe just don't use sampling or try to fallback to SAMPLE_KEY? - if (select_query_info.parallel_replica_custom_key_ast == nullptr) - throw Exception(DB::ErrorCodes::BAD_ARGUMENTS, "Parallel replicas mode set to 'custom_key' but no 'parallel_replicas_custom_key' defined"); - - return true; - } - - return data.supportsSampling(); -} - -} - MergeTreeDataSelectSamplingData MergeTreeDataSelectExecutor::getSampling( const SelectQueryInfo & select_query_info, NamesAndTypesList available_real_columns, @@ -610,10 +587,9 @@ MergeTreeDataSelectSamplingData MergeTreeDataSelectExecutor::getSampling( * It is also important that the entire universe can be covered using SAMPLE 0.1 OFFSET 0, ... OFFSET 0.9 and similar decimals. */ - bool supports_sampling_for_parallel_replicas = supportsSamplingForParallelReplicas(select_query_info, data, settings); /// Parallel replicas has been requested but there is no way to sample data. /// Select all data from first replica and no data from other replicas. - if (settings.parallel_replicas_count > 1 && !supports_sampling_for_parallel_replicas && settings.parallel_replica_offset > 0) + if (settings.parallel_replicas_count > 1 && !data.supportsSampling() && settings.parallel_replica_offset > 0) { LOG_DEBUG(log, "Will use no data on this replica because parallel replicas processing has been requested" " (the setting 'max_parallel_replicas') but the table does not support sampling and this replica is not the first."); @@ -621,34 +597,16 @@ MergeTreeDataSelectSamplingData MergeTreeDataSelectExecutor::getSampling( return sampling; } - sampling.use_sampling = relative_sample_size > 0 || (settings.parallel_replicas_count > 1 && supports_sampling_for_parallel_replicas); + sampling.use_sampling = relative_sample_size > 0 || (settings.parallel_replicas_count > 1 && settings.parallel_replicas_mode == ParallelReplicasMode::SAMPLE_KEY && data.supportsSampling()); bool no_data = false; /// There is nothing left after sampling. - std::optional parallel_replicas_custom_key_description; - const auto get_sampling_key = [&]() -> const KeyDescription & - { - if (settings.parallel_replicas_count > 1 && settings.parallel_replicas_mode == ParallelReplicasMode::CUSTOM_KEY) - { - assert(select_query_info.parallel_replica_custom_key_ast); - - LOG_INFO(log, "Using custom key for sampling while processing with multiple replicas"); - - if (!parallel_replicas_custom_key_description) - parallel_replicas_custom_key_description = KeyDescription::getKeyFromAST(select_query_info.parallel_replica_custom_key_ast, metadata_snapshot->columns, context); - - return *parallel_replicas_custom_key_description; - } - - return metadata_snapshot->getSamplingKey(); - }; - if (sampling.use_sampling) { if (sample_factor_column_queried && relative_sample_size != RelativeSize(0)) sampling.used_sample_factor = 1.0 / boost::rational_cast(relative_sample_size); RelativeSize size_of_universum = 0; - const auto & sampling_key = get_sampling_key(); + const auto & sampling_key = metadata_snapshot->getSamplingKey(); DataTypePtr sampling_column_type = sampling_key.data_types[0]; if (sampling_key.data_types.size() == 1) @@ -723,7 +681,7 @@ MergeTreeDataSelectSamplingData MergeTreeDataSelectExecutor::getSampling( /// If sample and final are used together no need to calculate sampling expression twice. /// The first time it was calculated for final, because sample key is a part of the PK. /// So, assume that we already have calculated column. - ASTPtr sampling_key_ast = sampling_key.definition_ast; + ASTPtr sampling_key_ast = metadata_snapshot->getSamplingKeyAST(); if (final) { @@ -735,11 +693,8 @@ MergeTreeDataSelectSamplingData MergeTreeDataSelectExecutor::getSampling( if (has_lower_limit) { if (!key_condition.addCondition( - sampling_key.column_names[0], Range::createLeftBounded(lower, true, sampling_key.data_types[0]->isNullable())) - && (settings.parallel_replicas_count <= 1 || settings.parallel_replicas_mode == ParallelReplicasMode::SAMPLE_KEY)) - { + sampling_key.column_names[0], Range::createLeftBounded(lower, true, sampling_key.data_types[0]->isNullable()))) throw Exception("Sampling column not in primary key", ErrorCodes::ILLEGAL_COLUMN); - } ASTPtr args = std::make_shared(); args->children.push_back(sampling_key_ast); @@ -756,11 +711,8 @@ MergeTreeDataSelectSamplingData MergeTreeDataSelectExecutor::getSampling( if (has_upper_limit) { if (!key_condition.addCondition( - sampling_key.column_names[0], Range::createRightBounded(upper, false, sampling_key.data_types[0]->isNullable())) - && (settings.parallel_replicas_count <= 1 || settings.parallel_replicas_mode == ParallelReplicasMode::SAMPLE_KEY)) - { + sampling_key.column_names[0], Range::createRightBounded(upper, false, sampling_key.data_types[0]->isNullable()))) throw Exception("Sampling column not in primary key", ErrorCodes::ILLEGAL_COLUMN); - } ASTPtr args = std::make_shared(); args->children.push_back(sampling_key_ast); From f950b75ef0adb6543b2c1f24117d51b35482f1bd Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Wed, 11 Jan 2023 10:42:01 +0000 Subject: [PATCH 016/841] Fix --- src/Interpreters/InterpreterSelectQuery.cpp | 9 +++++---- src/Interpreters/InterpreterSelectQuery.h | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Interpreters/InterpreterSelectQuery.cpp b/src/Interpreters/InterpreterSelectQuery.cpp index 1cd5d0004fa..8f03d83c1c9 100644 --- a/src/Interpreters/InterpreterSelectQuery.cpp +++ b/src/Interpreters/InterpreterSelectQuery.cpp @@ -112,6 +112,7 @@ namespace ErrorCodes extern const int INVALID_WITH_FILL_EXPRESSION; extern const int ACCESS_DENIED; extern const int UNKNOWN_IDENTIFIER; + extern const int BAD_ARGUMENTS; } /// Assumes `storage` is set and the table filter (row-level security) is not empty. @@ -682,11 +683,11 @@ InterpreterSelectQuery::InterpreterSelectQuery( if (parallel_replicas_custom_filter_ast) { - custom_key_filter_info = generateFilterActions( + parallel_replicas_custom_filter_info = generateFilterActions( table_id, parallel_replicas_custom_filter_ast, context, storage, storage_snapshot, metadata_snapshot, required_columns, prepared_sets); - custom_key_filter_info->do_remove_column = true; + parallel_replicas_custom_filter_info->do_remove_column = true; query_info.filter_asts.push_back(parallel_replicas_custom_filter_ast); } @@ -1448,8 +1449,8 @@ void InterpreterSelectQuery::executeImpl(QueryPlan & query_plan, std::optional

Date: Thu, 12 Jan 2023 07:56:15 +0000 Subject: [PATCH 017/841] Add READ_TASKS mode --- src/Core/SettingsEnums.cpp | 3 ++- src/Core/SettingsEnums.h | 1 + .../MergeTree/MergeTreeDataSelectExecutor.cpp | 13 +++++++++---- src/Storages/StorageDistributed.cpp | 3 ++- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/Core/SettingsEnums.cpp b/src/Core/SettingsEnums.cpp index eaeed9dc44c..18abac0fe4a 100644 --- a/src/Core/SettingsEnums.cpp +++ b/src/Core/SettingsEnums.cpp @@ -165,5 +165,6 @@ IMPLEMENT_SETTING_ENUM(Dialect, ErrorCodes::BAD_ARGUMENTS, IMPLEMENT_SETTING_ENUM(ParallelReplicasMode, ErrorCodes::BAD_ARGUMENTS, {{"sample_key", ParallelReplicasMode::SAMPLE_KEY}, - {"custom_key", ParallelReplicasMode::CUSTOM_KEY}}) + {"custom_key", ParallelReplicasMode::CUSTOM_KEY}, + {"read_tasks", ParallelReplicasMode::READ_TASKS}}) } diff --git a/src/Core/SettingsEnums.h b/src/Core/SettingsEnums.h index a2041634d4b..4acf2889e37 100644 --- a/src/Core/SettingsEnums.h +++ b/src/Core/SettingsEnums.h @@ -196,6 +196,7 @@ enum class ParallelReplicasMode : uint8_t { SAMPLE_KEY, CUSTOM_KEY, + READ_TASKS, }; DECLARE_SETTING_ENUM(ParallelReplicasMode) diff --git a/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp b/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp index d55e3f86f30..3a4e509163b 100644 --- a/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp +++ b/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp @@ -589,16 +589,21 @@ MergeTreeDataSelectSamplingData MergeTreeDataSelectExecutor::getSampling( /// Parallel replicas has been requested but there is no way to sample data. /// Select all data from first replica and no data from other replicas. - if (settings.parallel_replicas_count > 1 && !data.supportsSampling() && settings.parallel_replica_offset > 0) + if (settings.parallel_replicas_count > 1 && settings.parallel_replicas_mode == ParallelReplicasMode::SAMPLE_KEY + && !data.supportsSampling() && settings.parallel_replica_offset > 0) { - LOG_DEBUG(log, "Will use no data on this replica because parallel replicas processing has been requested" + LOG_DEBUG( + log, + "Will use no data on this replica because parallel replicas processing has been requested" " (the setting 'max_parallel_replicas') but the table does not support sampling and this replica is not the first."); sampling.read_nothing = true; return sampling; } - sampling.use_sampling = relative_sample_size > 0 || (settings.parallel_replicas_count > 1 && settings.parallel_replicas_mode == ParallelReplicasMode::SAMPLE_KEY && data.supportsSampling()); - bool no_data = false; /// There is nothing left after sampling. + sampling.use_sampling = relative_sample_size > 0 + || (settings.parallel_replicas_count > 1 && settings.parallel_replicas_mode == ParallelReplicasMode::SAMPLE_KEY + && data.supportsSampling()); + bool no_data = false; /// There is nothing left after sampling. if (sampling.use_sampling) { diff --git a/src/Storages/StorageDistributed.cpp b/src/Storages/StorageDistributed.cpp index 6473e00cdf2..04b98fa8d20 100644 --- a/src/Storages/StorageDistributed.cpp +++ b/src/Storages/StorageDistributed.cpp @@ -697,7 +697,8 @@ void StorageDistributed::read( auto settings = local_context->getSettingsRef(); - bool parallel_replicas = settings.max_parallel_replicas > 1 && settings.allow_experimental_parallel_reading_from_replicas && !settings.use_hedged_requests; + bool parallel_replicas = settings.max_parallel_replicas > 1 && settings.allow_experimental_parallel_reading_from_replicas + && !settings.use_hedged_requests && settings.parallel_replicas_mode == ParallelReplicasMode::READ_TASKS; if (parallel_replicas) ClusterProxy::executeQueryWithParallelReplicas( From 5589bec33beeced38d3088c8e70800ca5c71a9eb Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Fri, 13 Jan 2023 11:35:37 +0000 Subject: [PATCH 018/841] Update tests --- ...4_shard_distributed_with_many_replicas.sql | 1 - ...here_max_parallel_replicas_distributed.sql | 2 -- .../01034_sample_final_distributed.sql | 2 -- ...099_parallel_distributed_insert_select.sql | 1 - .../01517_select_final_distributed.sql | 2 -- .../01557_max_parallel_replicas_no_sample.sql | 2 -- .../02221_parallel_replicas_bug.sh | 2 +- ...arallel_reading_from_replicas_benchmark.sh | 1 + .../02404_memory_bound_merging.sql | 1 + ...max_parallel_replicas_custom_key.reference | 0 ...02527_max_parallel_replicas_custom_key.sql | 36 +++++++++++++++++++ 11 files changed, 39 insertions(+), 11 deletions(-) create mode 100644 tests/queries/0_stateless/02527_max_parallel_replicas_custom_key.reference create mode 100644 tests/queries/0_stateless/02527_max_parallel_replicas_custom_key.sql diff --git a/tests/queries/0_stateless/00124_shard_distributed_with_many_replicas.sql b/tests/queries/0_stateless/00124_shard_distributed_with_many_replicas.sql index 901b818cbc0..ab4c433ba47 100644 --- a/tests/queries/0_stateless/00124_shard_distributed_with_many_replicas.sql +++ b/tests/queries/0_stateless/00124_shard_distributed_with_many_replicas.sql @@ -1,6 +1,5 @@ -- Tags: replica, distributed -SET allow_experimental_parallel_reading_from_replicas = 0; SET max_parallel_replicas = 2; DROP TABLE IF EXISTS report; diff --git a/tests/queries/0_stateless/01034_prewhere_max_parallel_replicas_distributed.sql b/tests/queries/0_stateless/01034_prewhere_max_parallel_replicas_distributed.sql index 86c84427297..b26c9af14a9 100644 --- a/tests/queries/0_stateless/01034_prewhere_max_parallel_replicas_distributed.sql +++ b/tests/queries/0_stateless/01034_prewhere_max_parallel_replicas_distributed.sql @@ -1,7 +1,5 @@ -- Tags: replica, distributed -set allow_experimental_parallel_reading_from_replicas=0; - drop table if exists test_max_parallel_replicas_lr; -- If you wonder why the table is named with "_lr" suffix in this test. diff --git a/tests/queries/0_stateless/01034_sample_final_distributed.sql b/tests/queries/0_stateless/01034_sample_final_distributed.sql index a81fef645db..b784b35cbb3 100644 --- a/tests/queries/0_stateless/01034_sample_final_distributed.sql +++ b/tests/queries/0_stateless/01034_sample_final_distributed.sql @@ -1,7 +1,5 @@ -- Tags: distributed -set allow_experimental_parallel_reading_from_replicas = 0; - drop table if exists sample_final; create table sample_final (CounterID UInt32, EventDate Date, EventTime DateTime, UserID UInt64, Sign Int8) engine = CollapsingMergeTree(Sign) order by (CounterID, EventDate, intHash32(UserID), EventTime) sample by intHash32(UserID); insert into sample_final select number / (8192 * 4), toDate('2019-01-01'), toDateTime('2019-01-01 00:00:01') + number, number / (8192 * 2), number % 3 = 1 ? -1 : 1 from numbers(1000000); diff --git a/tests/queries/0_stateless/01099_parallel_distributed_insert_select.sql b/tests/queries/0_stateless/01099_parallel_distributed_insert_select.sql index aa924218360..a75a5b2c33d 100644 --- a/tests/queries/0_stateless/01099_parallel_distributed_insert_select.sql +++ b/tests/queries/0_stateless/01099_parallel_distributed_insert_select.sql @@ -2,7 +2,6 @@ -- set insert_distributed_sync = 1; -- see https://github.com/ClickHouse/ClickHouse/issues/18971 -SET allow_experimental_parallel_reading_from_replicas = 0; -- see https://github.com/ClickHouse/ClickHouse/issues/34525 SET prefer_localhost_replica = 1; DROP TABLE IF EXISTS local_01099_a; diff --git a/tests/queries/0_stateless/01517_select_final_distributed.sql b/tests/queries/0_stateless/01517_select_final_distributed.sql index 701828b0b38..a3d1fcfc185 100644 --- a/tests/queries/0_stateless/01517_select_final_distributed.sql +++ b/tests/queries/0_stateless/01517_select_final_distributed.sql @@ -1,7 +1,5 @@ -- Tags: distributed -SET allow_experimental_parallel_reading_from_replicas = 0; - DROP TABLE IF EXISTS test5346; CREATE TABLE test5346 (`Id` String, `Timestamp` DateTime, `updated` DateTime) diff --git a/tests/queries/0_stateless/01557_max_parallel_replicas_no_sample.sql b/tests/queries/0_stateless/01557_max_parallel_replicas_no_sample.sql index 04777f5b31c..2b1a66147a4 100644 --- a/tests/queries/0_stateless/01557_max_parallel_replicas_no_sample.sql +++ b/tests/queries/0_stateless/01557_max_parallel_replicas_no_sample.sql @@ -1,7 +1,5 @@ -- Tags: replica -SET allow_experimental_parallel_reading_from_replicas=0; - DROP TABLE IF EXISTS t; CREATE TABLE t (x String) ENGINE = MergeTree ORDER BY x; INSERT INTO t VALUES ('Hello'); diff --git a/tests/queries/0_stateless/02221_parallel_replicas_bug.sh b/tests/queries/0_stateless/02221_parallel_replicas_bug.sh index cce32bf8272..1a703b20d2a 100755 --- a/tests/queries/0_stateless/02221_parallel_replicas_bug.sh +++ b/tests/queries/0_stateless/02221_parallel_replicas_bug.sh @@ -4,4 +4,4 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) . "$CURDIR"/../shell_config.sh -${CLICKHOUSE_CLIENT} --allow_experimental_parallel_reading_from_replicas=1 -nm < "$CURDIR"/01099_parallel_distributed_insert_select.sql > /dev/null +${CLICKHOUSE_CLIENT} --allow_experimental_parallel_reading_from_replicas=1 --parallel_replicas_mode='read_tasks' -nm < "$CURDIR"/01099_parallel_distributed_insert_select.sql > /dev/null diff --git a/tests/queries/0_stateless/02226_parallel_reading_from_replicas_benchmark.sh b/tests/queries/0_stateless/02226_parallel_reading_from_replicas_benchmark.sh index 2a163746e20..283c51cf0a2 100755 --- a/tests/queries/0_stateless/02226_parallel_reading_from_replicas_benchmark.sh +++ b/tests/queries/0_stateless/02226_parallel_reading_from_replicas_benchmark.sh @@ -15,6 +15,7 @@ as select * from numbers(1); # Logical error: 'Coordinator for parallel reading from replicas is not initialized'. opts=( --allow_experimental_parallel_reading_from_replicas 1 + --parallel_replicas_mode 'read_tasks' --max_parallel_replicas 3 --iterations 1 diff --git a/tests/queries/0_stateless/02404_memory_bound_merging.sql b/tests/queries/0_stateless/02404_memory_bound_merging.sql index c41e2d3abae..fb0c65e6a7c 100644 --- a/tests/queries/0_stateless/02404_memory_bound_merging.sql +++ b/tests/queries/0_stateless/02404_memory_bound_merging.sql @@ -49,6 +49,7 @@ select a, count() from dist_t_different_dbs group by a, b order by a limit 5 off -- { echoOff } -- set allow_experimental_parallel_reading_from_replicas = 1; +set parallel_replicas_mode = 'read_tasks'; set max_parallel_replicas = 3; set use_hedged_requests = 0; diff --git a/tests/queries/0_stateless/02527_max_parallel_replicas_custom_key.reference b/tests/queries/0_stateless/02527_max_parallel_replicas_custom_key.reference new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/queries/0_stateless/02527_max_parallel_replicas_custom_key.sql b/tests/queries/0_stateless/02527_max_parallel_replicas_custom_key.sql new file mode 100644 index 00000000000..b716600b9d5 --- /dev/null +++ b/tests/queries/0_stateless/02527_max_parallel_replicas_custom_key.sql @@ -0,0 +1,36 @@ +-- Tags: replica + +DROP TABLE IF EXISTS t; + +CREATE TABLE t (x String) ENGINE = MergeTree ORDER BY x; +INSERT INTO t VALUES ('Hello'); + +SET max_parallel_replicas = 3; +SET parallel_replicas_mode = 'custom_key'; + +SELECT * FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'sipHash64(x)'; + +DROP TABLE t; + +CREATE TABLE t (x String, y Int32) ENGINE = MergeTree ORDER BY cityHash64(x) SAMPLE BY cityHash64(x); +INSERT INTO t SELECT toString(number), number FROM numbers(1000); + +SET max_parallel_replicas = 1; +SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'y'; +SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x) + y'; +SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x)'; +SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x) + 1'; + +SET max_parallel_replicas = 2; +SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'y'; +SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x) + y'; +SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x)'; +SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x) + 1'; + +SET max_parallel_replicas = 3; +SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'y'; +SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x) + y'; +SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x)'; +SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x) + 1'; + +DROP TABLE t; From e60c2fa77f6c00fd69ea25e7117bf0f8eeba36bf Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Fri, 13 Jan 2023 12:47:38 +0000 Subject: [PATCH 019/841] Update reference --- ...02527_max_parallel_replicas_custom_key.reference | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/queries/0_stateless/02527_max_parallel_replicas_custom_key.reference b/tests/queries/0_stateless/02527_max_parallel_replicas_custom_key.reference index e69de29bb2d..c51a7e10fb2 100644 --- a/tests/queries/0_stateless/02527_max_parallel_replicas_custom_key.reference +++ b/tests/queries/0_stateless/02527_max_parallel_replicas_custom_key.reference @@ -0,0 +1,13 @@ +Hello +1000 +1000 +1000 +1000 +1000 +1000 +1000 +1000 +1000 +1000 +1000 +1000 From 57e771226cb3962941be802e2b272a753024c567 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Mon, 16 Jan 2023 10:11:21 +0000 Subject: [PATCH 020/841] Add range mode for custom key --- src/Core/Settings.h | 3 +- src/Core/SettingsEnums.cpp | 4 + src/Core/SettingsEnums.h | 8 + src/Interpreters/InterpreterSelectQuery.cpp | 186 ++++++++++++++---- ...rallel_replicas_custom_key_range.reference | 13 ++ ...max_parallel_replicas_custom_key_range.sql | 37 ++++ 6 files changed, 214 insertions(+), 37 deletions(-) create mode 100644 tests/queries/0_stateless/02528_max_parallel_replicas_custom_key_range.reference create mode 100644 tests/queries/0_stateless/02528_max_parallel_replicas_custom_key_range.sql diff --git a/src/Core/Settings.h b/src/Core/Settings.h index 573d742ff58..61d1c62bcff 100644 --- a/src/Core/Settings.h +++ b/src/Core/Settings.h @@ -153,7 +153,8 @@ static constexpr UInt64 operator""_GiB(unsigned long long value) M(UInt64, max_parallel_replicas, 1, "The maximum number of replicas of each shard used when the query is executed. For consistency (to get different parts of the same partition), this option only works for the specified sampling key. The lag of the replicas is not controlled.", 0) \ M(UInt64, parallel_replicas_count, 0, "This is internal setting that should not be used directly and represents an implementation detail of the 'parallel replicas' mode. This setting will be automatically set up by the initiator server for distributed queries to the number of parallel replicas participating in query processing.", 0) \ M(UInt64, parallel_replica_offset, 0, "This is internal setting that should not be used directly and represents an implementation detail of the 'parallel replicas' mode. This setting will be automatically set up by the initiator server for distributed queries to the index of the replica participating in query processing among parallel replicas.", 0) \ - M(String, parallel_replicas_custom_key, "", "Custom key for parallel replicas", 0) \ + M(String, parallel_replicas_custom_key, "", "Custom key for parallel replicas using modulo operation on the key for assigning work to replicas.", 0) \ + M(ParallelReplicasCustomKeyFilterType, parallel_replicas_custom_key_filter_type, ParallelReplicasCustomKeyFilterType::DEFAULT, "Type of filter to use with custom key for parallel replicas. default - use modulo operation on the custom key, range - use range filter on custom key using all possible values for the value type of custom key.", 0) \ M(ParallelReplicasMode, parallel_replicas_mode, ParallelReplicasMode::SAMPLE_KEY, "How to process query using multiple replicas.", 0) \ \ M(Bool, allow_experimental_parallel_reading_from_replicas, false, "If true, ClickHouse will send a SELECT query to all replicas of a table. It will work for any kind on MergeTree table.", 0) \ diff --git a/src/Core/SettingsEnums.cpp b/src/Core/SettingsEnums.cpp index 33aba922e95..69fd78d7eb3 100644 --- a/src/Core/SettingsEnums.cpp +++ b/src/Core/SettingsEnums.cpp @@ -168,6 +168,10 @@ IMPLEMENT_SETTING_ENUM(ParallelReplicasMode, ErrorCodes::BAD_ARGUMENTS, {"custom_key", ParallelReplicasMode::CUSTOM_KEY}, {"read_tasks", ParallelReplicasMode::READ_TASKS}}) +IMPLEMENT_SETTING_ENUM(ParallelReplicasCustomKeyFilterType, ErrorCodes::BAD_ARGUMENTS, + {{"default", ParallelReplicasCustomKeyFilterType::DEFAULT}, + {"range", ParallelReplicasCustomKeyFilterType::RANGE}}) + IMPLEMENT_SETTING_ENUM(LocalFSReadMethod, ErrorCodes::BAD_ARGUMENTS, {{"mmap", LocalFSReadMethod::mmap}, {"pread", LocalFSReadMethod::pread}, diff --git a/src/Core/SettingsEnums.h b/src/Core/SettingsEnums.h index 83c12477165..52c1b369f4b 100644 --- a/src/Core/SettingsEnums.h +++ b/src/Core/SettingsEnums.h @@ -202,5 +202,13 @@ enum class ParallelReplicasMode : uint8_t DECLARE_SETTING_ENUM(ParallelReplicasMode) +enum class ParallelReplicasCustomKeyFilterType : uint8_t +{ + DEFAULT, + RANGE, +}; + +DECLARE_SETTING_ENUM(ParallelReplicasCustomKeyFilterType) + DECLARE_SETTING_ENUM(LocalFSReadMethod) } diff --git a/src/Interpreters/InterpreterSelectQuery.cpp b/src/Interpreters/InterpreterSelectQuery.cpp index 28f63d5967c..6b66c75e54f 100644 --- a/src/Interpreters/InterpreterSelectQuery.cpp +++ b/src/Interpreters/InterpreterSelectQuery.cpp @@ -94,6 +94,9 @@ #include #include #include +#include "Core/SettingsEnums.h" + +#include namespace DB { @@ -113,6 +116,7 @@ namespace ErrorCodes extern const int ACCESS_DENIED; extern const int UNKNOWN_IDENTIFIER; extern const int BAD_ARGUMENTS; + extern const int ILLEGAL_TYPE_OF_COLUMN_FOR_FILTER; } /// Assumes `storage` is set and the table filter (row-level security) is not empty. @@ -228,10 +232,13 @@ InterpreterSelectQuery::InterpreterSelectQuery( InterpreterSelectQuery::~InterpreterSelectQuery() = default; +namespace +{ + /** There are no limits on the maximum size of the result for the subquery. * Since the result of the query is not the result of the entire query. */ -static ContextPtr getSubqueryContext(const ContextPtr & context) +ContextPtr getSubqueryContext(const ContextPtr & context) { auto subquery_context = Context::createCopy(context); Settings subquery_settings = context->getSettings(); @@ -243,7 +250,7 @@ static ContextPtr getSubqueryContext(const ContextPtr & context) return subquery_context; } -static void rewriteMultipleJoins(ASTPtr & query, const TablesWithColumns & tables, const String & database, const Settings & settings) +void rewriteMultipleJoins(ASTPtr & query, const TablesWithColumns & tables, const String & database, const Settings & settings) { ASTSelectQuery & select = query->as(); @@ -263,7 +270,7 @@ static void rewriteMultipleJoins(ASTPtr & query, const TablesWithColumns & table } /// Checks that the current user has the SELECT privilege. -static void checkAccessRightsForSelect( +void checkAccessRightsForSelect( const ContextPtr & context, const StorageID & table_id, const StorageMetadataPtr & table_metadata, @@ -293,7 +300,7 @@ static void checkAccessRightsForSelect( context->checkAccess(AccessType::SELECT, table_id, syntax_analyzer_result.requiredSourceColumnsForAccessCheck()); } -static ASTPtr parseAdditionalFilterConditionForTable( +ASTPtr parseAdditionalFilterConditionForTable( const Map & setting, const DatabaseAndTableWithAlias & target, const Context & context) @@ -320,7 +327,7 @@ static ASTPtr parseAdditionalFilterConditionForTable( return nullptr; } -static ASTPtr parseParallelReplicaCustomKey(const String & setting, const Context & context) +ASTPtr parseParallelReplicaCustomKey(const String & setting, const Context & context) { ParserExpression parser; const auto & settings = context.getSettingsRef(); @@ -329,8 +336,142 @@ static ASTPtr parseParallelReplicaCustomKey(const String & setting, const Contex "parallel replicas custom key", settings.max_query_size, settings.max_parser_depth); } +ASTPtr getCustomKeyFilterForParallelReplica(const Settings & settings, const StoragePtr & storage, const ContextPtr & context) +{ + assert(settings.parallel_replicas_count > 1); + + if (settings.parallel_replicas_custom_key.value.empty()) + throw Exception(DB::ErrorCodes::BAD_ARGUMENTS, "Parallel replicas mode set to 'custom_key' but 'parallel_replicas_custom_key' has no value"); + + auto custom_key_ast = parseParallelReplicaCustomKey( + settings.parallel_replicas_custom_key, *context); + + if (settings.parallel_replicas_custom_key_filter_type == ParallelReplicasCustomKeyFilterType::DEFAULT) + { + // first we do modulo with replica count + ASTPtr args = std::make_shared(); + args->children.push_back(custom_key_ast); + args->children.push_back(std::make_shared(settings.parallel_replicas_count.value)); + + auto modulo_function = std::make_shared(); + modulo_function->name = "positiveModulo"; + modulo_function->arguments = args; + modulo_function->children.push_back(modulo_function->arguments); + + /// then we compare result to the current replica number (offset) + args = std::make_shared(); + args->children.push_back(modulo_function); + args->children.push_back(std::make_shared(settings.parallel_replica_offset.value)); + + auto equals_function = std::make_shared(); + equals_function->name = "equals"; + equals_function->arguments = args; + equals_function->children.push_back(equals_function->arguments); + + return equals_function; + } + + // create range query + assert(settings.parallel_replicas_custom_key_filter_type == ParallelReplicasCustomKeyFilterType::RANGE); + + if (!storage) + throw DB::Exception(ErrorCodes::BAD_ARGUMENTS, "Storage is unknown when trying to parse custom key for parallel replica"); + + KeyDescription custom_key_description = KeyDescription::getKeyFromAST(custom_key_ast, storage->getInMemoryMetadataPtr()->columns, context); + + using RelativeSize = boost::rational; + + RelativeSize size_of_universum = 0; + DataTypePtr custom_key_column_type = custom_key_description.data_types[0]; + + if (custom_key_description.data_types.size() == 1) + { + if (typeid_cast(custom_key_column_type.get())) + size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); + else if (typeid_cast(custom_key_column_type.get())) + size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); + else if (typeid_cast(custom_key_column_type.get())) + size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); + else if (typeid_cast(custom_key_column_type.get())) + size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); + } + + if (size_of_universum == RelativeSize(0)) + throw Exception( + ErrorCodes::ILLEGAL_TYPE_OF_COLUMN_FOR_FILTER, + "Invalid custom key column type: {}. Must be one unsigned integer type", custom_key_column_type->getName()); + + RelativeSize relative_range_size = RelativeSize(1) / settings.parallel_replicas_count.value; + RelativeSize relative_range_offset = relative_range_size * RelativeSize(settings.parallel_replica_offset.value); + + /// Calculate the half-interval of `[lower, upper)` column values. + bool has_lower_limit = false; + bool has_upper_limit = false; + + RelativeSize lower_limit_rational = relative_range_offset * size_of_universum; + RelativeSize upper_limit_rational = (relative_range_offset + relative_range_size) * size_of_universum; + + UInt64 lower = boost::rational_cast(lower_limit_rational); + UInt64 upper = boost::rational_cast(upper_limit_rational); + + if (lower > 0) + has_lower_limit = true; + + if (upper_limit_rational < size_of_universum) + has_upper_limit = true; + + assert(has_lower_limit || has_upper_limit); + + /// Let's add the conditions to cut off something else when the index is scanned again and when the request is processed. + std::shared_ptr lower_function; + std::shared_ptr upper_function; + + if (has_lower_limit) + { + ASTPtr args = std::make_shared(); + args->children.push_back(custom_key_ast); + args->children.push_back(std::make_shared(lower)); + + lower_function = std::make_shared(); + lower_function->name = "greaterOrEquals"; + lower_function->arguments = args; + lower_function->children.push_back(lower_function->arguments); + + if (!has_upper_limit) + return lower_function; + } + + if (has_upper_limit) + { + ASTPtr args = std::make_shared(); + args->children.push_back(custom_key_ast); + args->children.push_back(std::make_shared(upper)); + + upper_function = std::make_shared(); + upper_function->name = "less"; + upper_function->arguments = args; + upper_function->children.push_back(upper_function->arguments); + + if (!has_lower_limit) + return upper_function; + } + + assert(has_lower_limit && has_upper_limit); + + ASTPtr args = std::make_shared(); + args->children.push_back(lower_function); + args->children.push_back(upper_function); + + auto filter_function = std::make_shared(); + filter_function->name = "and"; + filter_function->arguments = args; + filter_function->children.push_back(filter_function->arguments); + + return filter_function; +} + /// Returns true if we should ignore quotas and limits for a specified table in the system database. -static bool shouldIgnoreQuotaAndLimits(const StorageID & table_id) +bool shouldIgnoreQuotaAndLimits(const StorageID & table_id) { if (table_id.database_name == DatabaseCatalog::SYSTEM_DATABASE) { @@ -341,6 +482,8 @@ static bool shouldIgnoreQuotaAndLimits(const StorageID & table_id) return false; } +} + InterpreterSelectQuery::InterpreterSelectQuery( const ASTPtr & query_ptr_, const ContextPtr & context_, @@ -511,38 +654,9 @@ InterpreterSelectQuery::InterpreterSelectQuery( query_info.additional_filter_ast = parseAdditionalFilterConditionForTable( settings.additional_table_filters, joined_tables.tablesWithColumns().front().table, *context); - ASTPtr parallel_replicas_custom_filter_ast = nullptr; if (settings.parallel_replicas_count > 1 && settings.parallel_replicas_mode == ParallelReplicasMode::CUSTOM_KEY) - { - if (settings.parallel_replicas_custom_key.value.empty()) - throw Exception(DB::ErrorCodes::BAD_ARGUMENTS, "Parallel replicas mode set to 'custom_key' but 'parallel_replicas_custom_key' has no value"); - - auto custom_key_ast = parseParallelReplicaCustomKey( - settings.parallel_replicas_custom_key, *context); - - // first we do modulo with replica count - ASTPtr args = std::make_shared(); - args->children.push_back(custom_key_ast); - args->children.push_back(std::make_shared(settings.parallel_replicas_count.value)); - - auto modulo_function = std::make_shared(); - modulo_function->name = "positiveModulo"; - modulo_function->arguments = args; - modulo_function->children.push_back(modulo_function->arguments); - - /// then we compare result to the current replica number (offset) - args = std::make_shared(); - args->children.push_back(modulo_function); - args->children.push_back(std::make_shared(settings.parallel_replica_offset.value)); - - auto equals_function = std::make_shared(); - equals_function->name = "equals"; - equals_function->arguments = args; - equals_function->children.push_back(equals_function->arguments); - - parallel_replicas_custom_filter_ast = equals_function; - } + parallel_replicas_custom_filter_ast = getCustomKeyFilterForParallelReplica(settings, storage, context); auto analyze = [&] (bool try_move_to_prewhere) { diff --git a/tests/queries/0_stateless/02528_max_parallel_replicas_custom_key_range.reference b/tests/queries/0_stateless/02528_max_parallel_replicas_custom_key_range.reference new file mode 100644 index 00000000000..c51a7e10fb2 --- /dev/null +++ b/tests/queries/0_stateless/02528_max_parallel_replicas_custom_key_range.reference @@ -0,0 +1,13 @@ +Hello +1000 +1000 +1000 +1000 +1000 +1000 +1000 +1000 +1000 +1000 +1000 +1000 diff --git a/tests/queries/0_stateless/02528_max_parallel_replicas_custom_key_range.sql b/tests/queries/0_stateless/02528_max_parallel_replicas_custom_key_range.sql new file mode 100644 index 00000000000..0c1cb7fb48b --- /dev/null +++ b/tests/queries/0_stateless/02528_max_parallel_replicas_custom_key_range.sql @@ -0,0 +1,37 @@ +-- Tags: replica + +DROP TABLE IF EXISTS t; + +CREATE TABLE t (x String) ENGINE = MergeTree ORDER BY x; +INSERT INTO t VALUES ('Hello'); + +SET max_parallel_replicas = 3; +SET parallel_replicas_mode = 'custom_key'; +SET parallel_replicas_custom_key_filter_type = 'range'; + +SELECT * FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'sipHash64(x)'; + +DROP TABLE t; + +CREATE TABLE t (x String, y Int32) ENGINE = MergeTree ORDER BY cityHash64(x) SAMPLE BY cityHash64(x); +INSERT INTO t SELECT toString(number), number FROM numbers(1000); + +SET max_parallel_replicas = 1; +SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'y'; +SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x) + y'; +SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x)'; +SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x) + 1'; + +SET max_parallel_replicas = 2; +SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'y'; +SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x) + y'; +SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x)'; +SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x) + 1'; + +SET max_parallel_replicas = 3; +SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'y'; +SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x) + y'; +SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x)'; +SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x) + 1'; + +DROP TABLE t; From 5adf44775830d92e1bfba53ebfba5c71a956d48e Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Mon, 16 Jan 2023 11:22:12 +0000 Subject: [PATCH 021/841] Use unsigned integer for column --- .../02528_max_parallel_replicas_custom_key_range.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/queries/0_stateless/02528_max_parallel_replicas_custom_key_range.sql b/tests/queries/0_stateless/02528_max_parallel_replicas_custom_key_range.sql index 0c1cb7fb48b..a8ef9e58d40 100644 --- a/tests/queries/0_stateless/02528_max_parallel_replicas_custom_key_range.sql +++ b/tests/queries/0_stateless/02528_max_parallel_replicas_custom_key_range.sql @@ -13,7 +13,7 @@ SELECT * FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_ DROP TABLE t; -CREATE TABLE t (x String, y Int32) ENGINE = MergeTree ORDER BY cityHash64(x) SAMPLE BY cityHash64(x); +CREATE TABLE t (x String, y UInt32) ENGINE = MergeTree ORDER BY cityHash64(x) SAMPLE BY cityHash64(x); INSERT INTO t SELECT toString(number), number FROM numbers(1000); SET max_parallel_replicas = 1; From bd352068d749d428d909c0b5d81f299a7e85e3f1 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Tue, 17 Jan 2023 12:34:42 +0000 Subject: [PATCH 022/841] Turn replicas into shard for custom_key --- .../ClusterProxy/executeQuery.cpp | 8 +- src/Interpreters/ClusterProxy/executeQuery.h | 3 +- src/Interpreters/InterpreterSelectQuery.cpp | 157 ----------------- src/Storages/StorageDistributed.cpp | 162 +++++++++++++++++- 4 files changed, 169 insertions(+), 161 deletions(-) diff --git a/src/Interpreters/ClusterProxy/executeQuery.cpp b/src/Interpreters/ClusterProxy/executeQuery.cpp index 8ea6298c50b..fc490306e08 100644 --- a/src/Interpreters/ClusterProxy/executeQuery.cpp +++ b/src/Interpreters/ClusterProxy/executeQuery.cpp @@ -127,7 +127,8 @@ void executeQuery( const ASTPtr & query_ast, ContextPtr context, const SelectQueryInfo & query_info, const ExpressionActionsPtr & sharding_key_expr, const std::string & sharding_key_column_name, - const ClusterPtr & not_optimized_cluster) + const ClusterPtr & not_optimized_cluster, + std::function add_additional_shard_filter = {}) { const Settings & settings = context->getSettingsRef(); @@ -177,7 +178,10 @@ void executeQuery( visitor.visit(query_ast_for_shard); } else - query_ast_for_shard = query_ast; + query_ast_for_shard = query_ast->clone(); + + if (add_additional_shard_filter) + add_additional_shard_filter(query_ast_for_shard, shard_info.shard_num); stream_factory.createForShard(shard_info, query_ast_for_shard, main_table, table_func_ptr, diff --git a/src/Interpreters/ClusterProxy/executeQuery.h b/src/Interpreters/ClusterProxy/executeQuery.h index 662fe47ca65..9519fa00efe 100644 --- a/src/Interpreters/ClusterProxy/executeQuery.h +++ b/src/Interpreters/ClusterProxy/executeQuery.h @@ -50,7 +50,8 @@ void executeQuery( const ASTPtr & query_ast, ContextPtr context, const SelectQueryInfo & query_info, const ExpressionActionsPtr & sharding_key_expr, const std::string & sharding_key_column_name, - const ClusterPtr & not_optimized_cluster); + const ClusterPtr & not_optimized_cluster, + std::function add_additional_shard_filter); void executeQueryWithParallelReplicas( diff --git a/src/Interpreters/InterpreterSelectQuery.cpp b/src/Interpreters/InterpreterSelectQuery.cpp index 6b66c75e54f..3afe83ffac3 100644 --- a/src/Interpreters/InterpreterSelectQuery.cpp +++ b/src/Interpreters/InterpreterSelectQuery.cpp @@ -327,149 +327,6 @@ ASTPtr parseAdditionalFilterConditionForTable( return nullptr; } -ASTPtr parseParallelReplicaCustomKey(const String & setting, const Context & context) -{ - ParserExpression parser; - const auto & settings = context.getSettingsRef(); - return parseQuery( - parser, setting.data(), setting.data() + setting.size(), - "parallel replicas custom key", settings.max_query_size, settings.max_parser_depth); -} - -ASTPtr getCustomKeyFilterForParallelReplica(const Settings & settings, const StoragePtr & storage, const ContextPtr & context) -{ - assert(settings.parallel_replicas_count > 1); - - if (settings.parallel_replicas_custom_key.value.empty()) - throw Exception(DB::ErrorCodes::BAD_ARGUMENTS, "Parallel replicas mode set to 'custom_key' but 'parallel_replicas_custom_key' has no value"); - - auto custom_key_ast = parseParallelReplicaCustomKey( - settings.parallel_replicas_custom_key, *context); - - if (settings.parallel_replicas_custom_key_filter_type == ParallelReplicasCustomKeyFilterType::DEFAULT) - { - // first we do modulo with replica count - ASTPtr args = std::make_shared(); - args->children.push_back(custom_key_ast); - args->children.push_back(std::make_shared(settings.parallel_replicas_count.value)); - - auto modulo_function = std::make_shared(); - modulo_function->name = "positiveModulo"; - modulo_function->arguments = args; - modulo_function->children.push_back(modulo_function->arguments); - - /// then we compare result to the current replica number (offset) - args = std::make_shared(); - args->children.push_back(modulo_function); - args->children.push_back(std::make_shared(settings.parallel_replica_offset.value)); - - auto equals_function = std::make_shared(); - equals_function->name = "equals"; - equals_function->arguments = args; - equals_function->children.push_back(equals_function->arguments); - - return equals_function; - } - - // create range query - assert(settings.parallel_replicas_custom_key_filter_type == ParallelReplicasCustomKeyFilterType::RANGE); - - if (!storage) - throw DB::Exception(ErrorCodes::BAD_ARGUMENTS, "Storage is unknown when trying to parse custom key for parallel replica"); - - KeyDescription custom_key_description = KeyDescription::getKeyFromAST(custom_key_ast, storage->getInMemoryMetadataPtr()->columns, context); - - using RelativeSize = boost::rational; - - RelativeSize size_of_universum = 0; - DataTypePtr custom_key_column_type = custom_key_description.data_types[0]; - - if (custom_key_description.data_types.size() == 1) - { - if (typeid_cast(custom_key_column_type.get())) - size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); - else if (typeid_cast(custom_key_column_type.get())) - size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); - else if (typeid_cast(custom_key_column_type.get())) - size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); - else if (typeid_cast(custom_key_column_type.get())) - size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); - } - - if (size_of_universum == RelativeSize(0)) - throw Exception( - ErrorCodes::ILLEGAL_TYPE_OF_COLUMN_FOR_FILTER, - "Invalid custom key column type: {}. Must be one unsigned integer type", custom_key_column_type->getName()); - - RelativeSize relative_range_size = RelativeSize(1) / settings.parallel_replicas_count.value; - RelativeSize relative_range_offset = relative_range_size * RelativeSize(settings.parallel_replica_offset.value); - - /// Calculate the half-interval of `[lower, upper)` column values. - bool has_lower_limit = false; - bool has_upper_limit = false; - - RelativeSize lower_limit_rational = relative_range_offset * size_of_universum; - RelativeSize upper_limit_rational = (relative_range_offset + relative_range_size) * size_of_universum; - - UInt64 lower = boost::rational_cast(lower_limit_rational); - UInt64 upper = boost::rational_cast(upper_limit_rational); - - if (lower > 0) - has_lower_limit = true; - - if (upper_limit_rational < size_of_universum) - has_upper_limit = true; - - assert(has_lower_limit || has_upper_limit); - - /// Let's add the conditions to cut off something else when the index is scanned again and when the request is processed. - std::shared_ptr lower_function; - std::shared_ptr upper_function; - - if (has_lower_limit) - { - ASTPtr args = std::make_shared(); - args->children.push_back(custom_key_ast); - args->children.push_back(std::make_shared(lower)); - - lower_function = std::make_shared(); - lower_function->name = "greaterOrEquals"; - lower_function->arguments = args; - lower_function->children.push_back(lower_function->arguments); - - if (!has_upper_limit) - return lower_function; - } - - if (has_upper_limit) - { - ASTPtr args = std::make_shared(); - args->children.push_back(custom_key_ast); - args->children.push_back(std::make_shared(upper)); - - upper_function = std::make_shared(); - upper_function->name = "less"; - upper_function->arguments = args; - upper_function->children.push_back(upper_function->arguments); - - if (!has_lower_limit) - return upper_function; - } - - assert(has_lower_limit && has_upper_limit); - - ASTPtr args = std::make_shared(); - args->children.push_back(lower_function); - args->children.push_back(upper_function); - - auto filter_function = std::make_shared(); - filter_function->name = "and"; - filter_function->arguments = args; - filter_function->children.push_back(filter_function->arguments); - - return filter_function; -} - /// Returns true if we should ignore quotas and limits for a specified table in the system database. bool shouldIgnoreQuotaAndLimits(const StorageID & table_id) { @@ -654,10 +511,6 @@ InterpreterSelectQuery::InterpreterSelectQuery( query_info.additional_filter_ast = parseAdditionalFilterConditionForTable( settings.additional_table_filters, joined_tables.tablesWithColumns().front().table, *context); - ASTPtr parallel_replicas_custom_filter_ast = nullptr; - if (settings.parallel_replicas_count > 1 && settings.parallel_replicas_mode == ParallelReplicasMode::CUSTOM_KEY) - parallel_replicas_custom_filter_ast = getCustomKeyFilterForParallelReplica(settings, storage, context); - auto analyze = [&] (bool try_move_to_prewhere) { /// Allow push down and other optimizations for VIEW: replace with subquery and rewrite it. @@ -823,16 +676,6 @@ InterpreterSelectQuery::InterpreterSelectQuery( query_info.filter_asts.push_back(query_info.additional_filter_ast); } - if (parallel_replicas_custom_filter_ast) - { - parallel_replicas_custom_filter_info = generateFilterActions( - table_id, parallel_replicas_custom_filter_ast, context, storage, storage_snapshot, metadata_snapshot, required_columns, - prepared_sets); - - parallel_replicas_custom_filter_info->do_remove_column = true; - query_info.filter_asts.push_back(parallel_replicas_custom_filter_ast); - } - source_header = storage_snapshot->getSampleBlockForColumns(required_columns, parameter_values); } diff --git a/src/Storages/StorageDistributed.cpp b/src/Storages/StorageDistributed.cpp index 671ec91609e..56e5bfe9189 100644 --- a/src/Storages/StorageDistributed.cpp +++ b/src/Storages/StorageDistributed.cpp @@ -27,6 +27,7 @@ #include #include #include +#include "Core/SettingsEnums.h" #include #include @@ -88,6 +89,8 @@ #include #include +#include + namespace fs = std::filesystem; @@ -440,6 +443,11 @@ QueryProcessingStage::Enum StorageDistributed::getQueryProcessingStage( const auto & settings = local_context->getSettingsRef(); ClusterPtr cluster = getCluster(); + + // if it's custom_key we will turn replicas into shards and filter specific data on each of them + if (settings.max_parallel_replicas > 1 && cluster->getShardCount() == 1 && settings.parallel_replicas_mode == ParallelReplicasMode::CUSTOM_KEY) + cluster = cluster->getClusterWithReplicasAsShards(settings); + query_info.cluster = cluster; size_t nodes = getClusterQueriedNodes(settings, cluster); @@ -749,6 +757,158 @@ void StorageDistributed::read( bool parallel_replicas = settings.max_parallel_replicas > 1 && settings.allow_experimental_parallel_reading_from_replicas && !settings.use_hedged_requests && settings.parallel_replicas_mode == ParallelReplicasMode::READ_TASKS; + ParserExpression parser; + auto custom_key_ast = parseQuery( + parser, + settings.parallel_replicas_custom_key.value.data(), + settings.parallel_replicas_custom_key.value.data() + settings.parallel_replicas_custom_key.value.size(), + "parallel replicas custom key", + settings.max_query_size, + settings.max_parser_depth); + + auto shard_count = query_info.getCluster()->getShardCount(); + + std::function add_additional_shard_filter; + if (settings.max_parallel_replicas > 1 + && settings.parallel_replicas_mode == ParallelReplicasMode::CUSTOM_KEY) + { + add_additional_shard_filter = [&](ASTPtr & query, uint64_t shard_num) + { + ParserExpression parser; + auto custom_key_ast = parseQuery( + parser, settings.parallel_replicas_custom_key.value.data(), settings.parallel_replicas_custom_key.value.data() + settings.parallel_replicas_custom_key.value.size(), + "parallel replicas custom key", settings.max_query_size, settings.max_parser_depth); + + if (settings.parallel_replicas_custom_key_filter_type == ParallelReplicasCustomKeyFilterType::DEFAULT) + { + // first we do modulo with replica count + ASTPtr args = std::make_shared(); + args->children.push_back(custom_key_ast); + args->children.push_back(std::make_shared(shard_count)); + + auto modulo_function = std::make_shared(); + modulo_function->name = "positiveModulo"; + modulo_function->arguments = args; + modulo_function->children.push_back(modulo_function->arguments); + + /// then we compare result to the current replica number (offset) + args = std::make_shared(); + args->children.push_back(modulo_function); + args->children.push_back(std::make_shared(shard_num - 1)); + + auto equals_function = std::make_shared(); + equals_function->name = "equals"; + equals_function->arguments = args; + equals_function->children.push_back(equals_function->arguments); + + auto & select_query = query->as(); + select_query.setExpression(ASTSelectQuery::Expression::WHERE, std::move(equals_function)); + } + else + { + assert(settings.parallel_replicas_custom_key_filter_type == ParallelReplicasCustomKeyFilterType::RANGE); + auto filter_function = [&] + { + KeyDescription custom_key_description = KeyDescription::getKeyFromAST(custom_key_ast, getInMemoryMetadataPtr()->columns, local_context); + + using RelativeSize = boost::rational; + + RelativeSize size_of_universum = 0; + DataTypePtr custom_key_column_type = custom_key_description.data_types[0]; + + size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); + if (custom_key_description.data_types.size() == 1) + { + if (typeid_cast(custom_key_column_type.get())) + size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); + else if (typeid_cast(custom_key_column_type.get())) + size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); + else if (typeid_cast(custom_key_column_type.get())) + size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); + else if (typeid_cast(custom_key_column_type.get())) + size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); + } + + if (size_of_universum == RelativeSize(0)) + throw Exception( + ErrorCodes::LOGICAL_ERROR, + "Invalid custom key column type: {}. Must be one unsigned integer type", custom_key_column_type->getName()); + + RelativeSize relative_range_size = RelativeSize(1) / query_info.getCluster()->getShardCount(); + RelativeSize relative_range_offset = relative_range_size * RelativeSize(shard_num - 1); + + /// Calculate the half-interval of `[lower, upper)` column values. + bool has_lower_limit = false; + bool has_upper_limit = false; + + RelativeSize lower_limit_rational = relative_range_offset * size_of_universum; + RelativeSize upper_limit_rational = (relative_range_offset + relative_range_size) * size_of_universum; + + UInt64 lower = boost::rational_cast(lower_limit_rational); + UInt64 upper = boost::rational_cast(upper_limit_rational); + + if (lower > 0) + has_lower_limit = true; + + if (upper_limit_rational < size_of_universum) + has_upper_limit = true; + + assert(has_lower_limit || has_upper_limit); + + /// Let's add the conditions to cut off something else when the index is scanned again and when the request is processed. + std::shared_ptr lower_function; + std::shared_ptr upper_function; + + if (has_lower_limit) + { + ASTPtr args = std::make_shared(); + args->children.push_back(custom_key_ast); + args->children.push_back(std::make_shared(lower)); + + lower_function = std::make_shared(); + lower_function->name = "greaterOrEquals"; + lower_function->arguments = args; + lower_function->children.push_back(lower_function->arguments); + + if (!has_upper_limit) + return lower_function; + } + + if (has_upper_limit) + { + ASTPtr args = std::make_shared(); + args->children.push_back(custom_key_ast); + args->children.push_back(std::make_shared(upper)); + + upper_function = std::make_shared(); + upper_function->name = "less"; + upper_function->arguments = args; + upper_function->children.push_back(upper_function->arguments); + + if (!has_lower_limit) + return upper_function; + } + + assert(has_lower_limit && has_upper_limit); + + ASTPtr args = std::make_shared(); + args->children.push_back(lower_function); + args->children.push_back(upper_function); + + auto f = std::make_shared(); + f->name = "and"; + f->arguments = args; + f->children.push_back(f->arguments); + + return f; + }; + + auto & select_query = query->as(); + select_query.setExpression(ASTSelectQuery::Expression::WHERE, filter_function()); + } + }; + } + if (parallel_replicas) ClusterProxy::executeQueryWithParallelReplicas( query_plan, main_table, remote_table_function_ptr, @@ -763,7 +923,7 @@ void StorageDistributed::read( select_stream_factory, log, modified_query_ast, local_context, query_info, sharding_key_expr, sharding_key_column_name, - query_info.cluster); + query_info.cluster, add_additional_shard_filter); /// This is a bug, it is possible only when there is no shards to query, and this is handled earlier. if (!query_plan.isInitialized()) From dd31de18a3dc1f05a90f646216830d03f91fed03 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Tue, 17 Jan 2023 13:31:09 +0000 Subject: [PATCH 023/841] Extend where correctly --- src/Interpreters/InterpreterSelectQuery.cpp | 2 -- src/Storages/StorageDistributed.cpp | 38 ++++++++++++++++----- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/src/Interpreters/InterpreterSelectQuery.cpp b/src/Interpreters/InterpreterSelectQuery.cpp index 3afe83ffac3..6969a068949 100644 --- a/src/Interpreters/InterpreterSelectQuery.cpp +++ b/src/Interpreters/InterpreterSelectQuery.cpp @@ -115,8 +115,6 @@ namespace ErrorCodes extern const int INVALID_WITH_FILL_EXPRESSION; extern const int ACCESS_DENIED; extern const int UNKNOWN_IDENTIFIER; - extern const int BAD_ARGUMENTS; - extern const int ILLEGAL_TYPE_OF_COLUMN_FOR_FILTER; } /// Assumes `storage` is set and the table filter (row-level security) is not empty. diff --git a/src/Storages/StorageDistributed.cpp b/src/Storages/StorageDistributed.cpp index 56e5bfe9189..0309aeabbc7 100644 --- a/src/Storages/StorageDistributed.cpp +++ b/src/Storages/StorageDistributed.cpp @@ -133,6 +133,7 @@ namespace ErrorCodes extern const int ARGUMENT_OUT_OF_BOUND; extern const int TOO_LARGE_DISTRIBUTED_DEPTH; extern const int UNSUPPORTED_METHOD; + extern const int ILLEGAL_TYPE_OF_COLUMN_FOR_FILTER; } namespace ActionLocks @@ -779,6 +780,7 @@ void StorageDistributed::read( parser, settings.parallel_replicas_custom_key.value.data(), settings.parallel_replicas_custom_key.value.data() + settings.parallel_replicas_custom_key.value.size(), "parallel replicas custom key", settings.max_query_size, settings.max_parser_depth); + ASTPtr shard_filter = nullptr ; if (settings.parallel_replicas_custom_key_filter_type == ParallelReplicasCustomKeyFilterType::DEFAULT) { // first we do modulo with replica count @@ -801,8 +803,7 @@ void StorageDistributed::read( equals_function->arguments = args; equals_function->children.push_back(equals_function->arguments); - auto & select_query = query->as(); - select_query.setExpression(ASTSelectQuery::Expression::WHERE, std::move(equals_function)); + shard_filter = equals_function; } else { @@ -895,16 +896,37 @@ void StorageDistributed::read( args->children.push_back(lower_function); args->children.push_back(upper_function); - auto f = std::make_shared(); - f->name = "and"; - f->arguments = args; - f->children.push_back(f->arguments); + auto and_function = std::make_shared(); + and_function->name = "and"; + and_function->arguments = args; + and_function->children.push_back(and_function->arguments); - return f; + return and_function; }; + shard_filter = filter_function(); + } + + if (shard_filter) + { auto & select_query = query->as(); - select_query.setExpression(ASTSelectQuery::Expression::WHERE, filter_function()); + + auto where_expression = select_query.where(); + if (where_expression) + { + ASTPtr args = std::make_shared(); + args->children.push_back(where_expression); + args->children.push_back(shard_filter); + + auto and_function = std::make_shared(); + and_function->name = "and"; + and_function->arguments = args; + and_function->children.push_back(and_function->arguments); + + shard_filter = std::move(and_function); + } + + select_query.setExpression(ASTSelectQuery::Expression::WHERE, std::move(shard_filter)); } }; } From 0e31bd56d88977a91accb1e7f85501bacc4727f3 Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Wed, 18 Jan 2023 06:47:47 +0000 Subject: [PATCH 024/841] Call constructor of TemporaryTableHolder with creator --- src/Interpreters/InterpreterCreateQuery.cpp | 41 +++++++++++++++++++-- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/src/Interpreters/InterpreterCreateQuery.cpp b/src/Interpreters/InterpreterCreateQuery.cpp index ed4fd5699da..cdb3ce58e4c 100644 --- a/src/Interpreters/InterpreterCreateQuery.cpp +++ b/src/Interpreters/InterpreterCreateQuery.cpp @@ -912,9 +912,9 @@ void InterpreterCreateQuery::setEngine(ASTCreateQuery & create) const if (create.temporary) { - if (create.storage && create.storage->engine && create.storage->engine->name != "Memory") - throw Exception(ErrorCodes::INCORRECT_QUERY, "Temporary tables can only be created with ENGINE = Memory, not {}", - create.storage->engine->name); + // if (create.storage && create.storage->engine && create.storage->engine->name != "Memory") + // throw Exception(ErrorCodes::INCORRECT_QUERY, "Temporary tables can only be created with ENGINE = Memory, not {}", + // create.storage->engine->name); /// It's possible if some part of storage definition (such as PARTITION BY) is specified, but ENGINE is not. /// It makes sense when default_table_engine setting is used, but not for temporary tables. @@ -924,7 +924,8 @@ void InterpreterCreateQuery::setEngine(ASTCreateQuery & create) const throw Exception(ErrorCodes::INCORRECT_QUERY, "Invalid storage definition for temporary table: must be either ENGINE = Memory or empty"); auto engine_ast = std::make_shared(); - engine_ast->name = "Memory"; + // engine_ast->name = "Memory"; + engine_ast->name = create.storage->engine->name; engine_ast->no_empty_args = true; auto storage_ast = std::make_shared(); storage_ast->set(storage_ast->engine, engine_ast); @@ -1240,6 +1241,7 @@ bool InterpreterCreateQuery::doCreateTable(ASTCreateQuery & create, const InterpreterCreateQuery::TableProperties & properties, DDLGuardPtr & ddl_guard) { + /* if (create.temporary) { if (create.if_not_exists && getContext()->tryResolveStorageID({"", create.getTable()}, Context::ResolveExternal)) @@ -1250,6 +1252,21 @@ bool InterpreterCreateQuery::doCreateTable(ASTCreateQuery & create, getContext()->getSessionContext()->addExternalTable(temporary_table_name, std::move(temporary_table)); return true; } + */ + + if (create.temporary) + { + // to-do: set correct name + /* + UUID id; + if (create.uuid == UUIDHelpers::Nil) + create.uuid = UUIDHelpers::generateV4(); + id = create.uuid; + create.setTable("_tmp_" + toString(id)); + */ + create.setDatabase(DatabaseCatalog::TEMPORARY_DATABASE); + + } if (!ddl_guard) ddl_guard = DatabaseCatalog::instance().getDDLGuard(create.getDatabase(), create.getTable()); @@ -1382,6 +1399,22 @@ bool InterpreterCreateQuery::doCreateTable(ASTCreateQuery & create, "ATTACH ... FROM ... query is not supported for {} table engine, " "because such tables do not store any data on disk. Use CREATE instead.", res->getName()); + if (create.temporary) + { + // if (create.if_not_exists && getContext()->tryResolveStorageID({"", create.getTable()}, Context::ResolveExternal)) + // return false; + + String temporary_table_name = create.getTable(); + auto creator = [&](const StorageID &) + { + return std::move(res); + }; + auto temporary_table = TemporaryTableHolder(getContext(), creator, query_ptr); + // auto temporary_table = TemporaryTableHolder(getContext(), properties.columns, properties.constraints, query_ptr); + getContext()->getSessionContext()->addExternalTable(temporary_table_name, std::move(temporary_table)); + return true; + } + database->createTable(getContext(), create.getTable(), res, query_ptr); /// Move table data to the proper place. Wo do not move data earlier to avoid situations From 9fa4502b7836db99281515aa518c7a49835eaa19 Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Thu, 19 Jan 2023 07:12:29 +0000 Subject: [PATCH 025/841] Add new constructor for TemporaryTableHolder --- src/Interpreters/DatabaseCatalog.cpp | 5 +++++ src/Interpreters/DatabaseCatalog.h | 2 ++ src/Interpreters/InterpreterCreateQuery.cpp | 4 +--- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Interpreters/DatabaseCatalog.cpp b/src/Interpreters/DatabaseCatalog.cpp index 6ac01a9473f..2daca6a55a8 100644 --- a/src/Interpreters/DatabaseCatalog.cpp +++ b/src/Interpreters/DatabaseCatalog.cpp @@ -53,6 +53,11 @@ namespace ErrorCodes extern const int HAVE_DEPENDENT_OBJECTS; } +TemporaryTableHolder::TemporaryTableHolder(ContextPtr context, const String& table_name, const ASTPtr & query = {}) +{ + +} + TemporaryTableHolder::TemporaryTableHolder(ContextPtr context_, const TemporaryTableHolder::Creator & creator, const ASTPtr & query) : WithContext(context_->getGlobalContext()) , temporary_tables(DatabaseCatalog::instance().getDatabaseForTemporaryTables().get()) diff --git a/src/Interpreters/DatabaseCatalog.h b/src/Interpreters/DatabaseCatalog.h index a3fa4515a69..3028c900599 100644 --- a/src/Interpreters/DatabaseCatalog.h +++ b/src/Interpreters/DatabaseCatalog.h @@ -88,6 +88,8 @@ struct TemporaryTableHolder : boost::noncopyable, WithContext { using Creator = std::function; + TemporaryTableHolder(ContextPtr context, const String & table_name, const ASTPtr & query = {}); + TemporaryTableHolder(ContextPtr context, const Creator & creator, const ASTPtr & query = {}); /// Creates temporary table with Engine=Memory diff --git a/src/Interpreters/InterpreterCreateQuery.cpp b/src/Interpreters/InterpreterCreateQuery.cpp index cdb3ce58e4c..167134bd9ba 100644 --- a/src/Interpreters/InterpreterCreateQuery.cpp +++ b/src/Interpreters/InterpreterCreateQuery.cpp @@ -1256,7 +1256,6 @@ bool InterpreterCreateQuery::doCreateTable(ASTCreateQuery & create, if (create.temporary) { - // to-do: set correct name /* UUID id; if (create.uuid == UUIDHelpers::Nil) @@ -1264,8 +1263,7 @@ bool InterpreterCreateQuery::doCreateTable(ASTCreateQuery & create, id = create.uuid; create.setTable("_tmp_" + toString(id)); */ - create.setDatabase(DatabaseCatalog::TEMPORARY_DATABASE); - + // create.setDatabase(DatabaseCatalog::TEMPORARY_DATABASE); } if (!ddl_guard) From 2a1f35e6612fb07bd12090b9f3563753a0fe7183 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Thu, 19 Jan 2023 07:59:57 +0000 Subject: [PATCH 026/841] Revert some changes --- src/Interpreters/InterpreterSelectQuery.cpp | 42 +++++++-------------- 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/src/Interpreters/InterpreterSelectQuery.cpp b/src/Interpreters/InterpreterSelectQuery.cpp index 6969a068949..48326afda45 100644 --- a/src/Interpreters/InterpreterSelectQuery.cpp +++ b/src/Interpreters/InterpreterSelectQuery.cpp @@ -94,9 +94,6 @@ #include #include #include -#include "Core/SettingsEnums.h" - -#include namespace DB { @@ -230,13 +227,10 @@ InterpreterSelectQuery::InterpreterSelectQuery( InterpreterSelectQuery::~InterpreterSelectQuery() = default; -namespace -{ - /** There are no limits on the maximum size of the result for the subquery. * Since the result of the query is not the result of the entire query. */ -ContextPtr getSubqueryContext(const ContextPtr & context) +static ContextPtr getSubqueryContext(const ContextPtr & context) { auto subquery_context = Context::createCopy(context); Settings subquery_settings = context->getSettings(); @@ -248,7 +242,7 @@ ContextPtr getSubqueryContext(const ContextPtr & context) return subquery_context; } -void rewriteMultipleJoins(ASTPtr & query, const TablesWithColumns & tables, const String & database, const Settings & settings) +static void rewriteMultipleJoins(ASTPtr & query, const TablesWithColumns & tables, const String & database, const Settings & settings) { ASTSelectQuery & select = query->as(); @@ -268,7 +262,7 @@ void rewriteMultipleJoins(ASTPtr & query, const TablesWithColumns & tables, cons } /// Checks that the current user has the SELECT privilege. -void checkAccessRightsForSelect( +static void checkAccessRightsForSelect( const ContextPtr & context, const StorageID & table_id, const StorageMetadataPtr & table_metadata, @@ -298,7 +292,7 @@ void checkAccessRightsForSelect( context->checkAccess(AccessType::SELECT, table_id, syntax_analyzer_result.requiredSourceColumnsForAccessCheck()); } -ASTPtr parseAdditionalFilterConditionForTable( +static ASTPtr parseAdditionalFilterConditionForTable( const Map & setting, const DatabaseAndTableWithAlias & target, const Context & context) @@ -326,7 +320,7 @@ ASTPtr parseAdditionalFilterConditionForTable( } /// Returns true if we should ignore quotas and limits for a specified table in the system database. -bool shouldIgnoreQuotaAndLimits(const StorageID & table_id) +static bool shouldIgnoreQuotaAndLimits(const StorageID & table_id) { if (table_id.database_name == DatabaseCatalog::SYSTEM_DATABASE) { @@ -337,8 +331,6 @@ bool shouldIgnoreQuotaAndLimits(const StorageID & table_id) return false; } -} - InterpreterSelectQuery::InterpreterSelectQuery( const ASTPtr & query_ptr_, const ContextPtr & context_, @@ -1417,23 +1409,17 @@ void InterpreterSelectQuery::executeImpl(QueryPlan & query_plan, std::optional

( - query_plan.getCurrentDataStream(), - new_filter_info->actions, - new_filter_info->column_name, - new_filter_info->do_remove_column); - - filter_step->setStepDescription(description); - query_plan.addStep(std::move(filter_step)); - }; - if (additional_filter_info) - add_filter_step(additional_filter_info, "Additional filter"); + { + auto additional_filter_step = std::make_unique( + query_plan.getCurrentDataStream(), + additional_filter_info->actions, + additional_filter_info->column_name, + additional_filter_info->do_remove_column); - if (parallel_replicas_custom_filter_info) - add_filter_step(parallel_replicas_custom_filter_info, "Parallel replica custom key filter"); + additional_filter_step->setStepDescription("Additional filter"); + query_plan.addStep(std::move(additional_filter_step)); + } if (expressions.before_array_join) { From 1c0a3e38c0adb78ee719310161fdf329393ded55 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Thu, 19 Jan 2023 08:13:59 +0000 Subject: [PATCH 027/841] Fix queries with Distributed storage --- .../ClusterProxy/executeQuery.cpp | 31 ++- src/Interpreters/ClusterProxy/executeQuery.h | 3 +- src/Storages/StorageDistributed.cpp | 236 ++++++++---------- 3 files changed, 137 insertions(+), 133 deletions(-) diff --git a/src/Interpreters/ClusterProxy/executeQuery.cpp b/src/Interpreters/ClusterProxy/executeQuery.cpp index fc490306e08..d8d55b5486b 100644 --- a/src/Interpreters/ClusterProxy/executeQuery.cpp +++ b/src/Interpreters/ClusterProxy/executeQuery.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -16,6 +17,7 @@ #include #include + namespace DB { @@ -128,7 +130,7 @@ void executeQuery( const ExpressionActionsPtr & sharding_key_expr, const std::string & sharding_key_column_name, const ClusterPtr & not_optimized_cluster, - std::function add_additional_shard_filter = {}) + AdditionalShardFilterGenerator shard_filter_generator) { const Settings & settings = context->getSettingsRef(); @@ -180,8 +182,31 @@ void executeQuery( else query_ast_for_shard = query_ast->clone(); - if (add_additional_shard_filter) - add_additional_shard_filter(query_ast_for_shard, shard_info.shard_num); + if (shard_filter_generator) + { + auto shard_filter = shard_filter_generator(shard_info.shard_num); + if (shard_filter) + { + auto & select_query = query_ast_for_shard->as(); + + auto where_expression = select_query.where(); + if (where_expression) + { + ASTPtr args = std::make_shared(); + args->children.push_back(where_expression); + args->children.push_back(shard_filter); + + auto and_function = std::make_shared(); + and_function->name = "and"; + and_function->arguments = args; + and_function->children.push_back(and_function->arguments); + + shard_filter = std::move(and_function); + } + + select_query.setExpression(ASTSelectQuery::Expression::WHERE, std::move(shard_filter)); + } + } stream_factory.createForShard(shard_info, query_ast_for_shard, main_table, table_func_ptr, diff --git a/src/Interpreters/ClusterProxy/executeQuery.h b/src/Interpreters/ClusterProxy/executeQuery.h index 9519fa00efe..25827ebf29a 100644 --- a/src/Interpreters/ClusterProxy/executeQuery.h +++ b/src/Interpreters/ClusterProxy/executeQuery.h @@ -37,6 +37,7 @@ class SelectStreamFactory; ContextMutablePtr updateSettingsForCluster( const Cluster & cluster, ContextPtr context, const Settings & settings, const StorageID & main_table, const SelectQueryInfo * query_info = nullptr, Poco::Logger * log = nullptr); +using AdditionalShardFilterGenerator = std::function; /// Execute a distributed query, creating a query plan, from which the query pipeline can be built. /// `stream_factory` object encapsulates the logic of creating plans for a different type of query /// (currently SELECT, DESCRIBE). @@ -51,7 +52,7 @@ void executeQuery( const ExpressionActionsPtr & sharding_key_expr, const std::string & sharding_key_column_name, const ClusterPtr & not_optimized_cluster, - std::function add_additional_shard_filter); + AdditionalShardFilterGenerator shard_filter_generator = {}); void executeQueryWithParallelReplicas( diff --git a/src/Storages/StorageDistributed.cpp b/src/Storages/StorageDistributed.cpp index 0b36c6c0026..a7c0dafaf62 100644 --- a/src/Storages/StorageDistributed.cpp +++ b/src/Storages/StorageDistributed.cpp @@ -758,22 +758,26 @@ void StorageDistributed::read( bool parallel_replicas = settings.max_parallel_replicas > 1 && settings.allow_experimental_parallel_reading_from_replicas && !settings.use_hedged_requests && settings.parallel_replicas_mode == ParallelReplicasMode::READ_TASKS; - ParserExpression parser; - auto custom_key_ast = parseQuery( - parser, - settings.parallel_replicas_custom_key.value.data(), - settings.parallel_replicas_custom_key.value.data() + settings.parallel_replicas_custom_key.value.size(), - "parallel replicas custom key", - settings.max_query_size, - settings.max_parser_depth); - auto shard_count = query_info.getCluster()->getShardCount(); - std::function add_additional_shard_filter; + ClusterProxy::AdditionalShardFilterGenerator additional_shard_filter_generator; if (settings.max_parallel_replicas > 1 && settings.parallel_replicas_mode == ParallelReplicasMode::CUSTOM_KEY) { - add_additional_shard_filter = [&](ASTPtr & query, uint64_t shard_num) + + const std::string_view custom_key = settings.parallel_replicas_custom_key.value; + assert(!custom_key.empty()); + + ParserExpression parser; + auto custom_key_ast = parseQuery( + parser, + custom_key.data(), + custom_key.data() + custom_key.size(), + "parallel replicas custom key", + settings.max_query_size, + settings.max_parser_depth); + + additional_shard_filter_generator = [&](uint64_t shard_num) -> ASTPtr { ParserExpression parser; auto custom_key_ast = parseQuery( @@ -803,130 +807,104 @@ void StorageDistributed::read( equals_function->arguments = args; equals_function->children.push_back(equals_function->arguments); - shard_filter = equals_function; + return equals_function; } else { assert(settings.parallel_replicas_custom_key_filter_type == ParallelReplicasCustomKeyFilterType::RANGE); - auto filter_function = [&] + + KeyDescription custom_key_description = KeyDescription::getKeyFromAST(custom_key_ast, getInMemoryMetadataPtr()->columns, local_context); + + using RelativeSize = boost::rational; + + RelativeSize size_of_universum = 0; + DataTypePtr custom_key_column_type = custom_key_description.data_types[0]; + + size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); + if (custom_key_description.data_types.size() == 1) { - KeyDescription custom_key_description = KeyDescription::getKeyFromAST(custom_key_ast, getInMemoryMetadataPtr()->columns, local_context); - - using RelativeSize = boost::rational; - - RelativeSize size_of_universum = 0; - DataTypePtr custom_key_column_type = custom_key_description.data_types[0]; - - size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); - if (custom_key_description.data_types.size() == 1) - { - if (typeid_cast(custom_key_column_type.get())) - size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); - else if (typeid_cast(custom_key_column_type.get())) - size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); - else if (typeid_cast(custom_key_column_type.get())) - size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); - else if (typeid_cast(custom_key_column_type.get())) - size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); - } - - if (size_of_universum == RelativeSize(0)) - throw Exception( - ErrorCodes::LOGICAL_ERROR, - "Invalid custom key column type: {}. Must be one unsigned integer type", custom_key_column_type->getName()); - - RelativeSize relative_range_size = RelativeSize(1) / query_info.getCluster()->getShardCount(); - RelativeSize relative_range_offset = relative_range_size * RelativeSize(shard_num - 1); - - /// Calculate the half-interval of `[lower, upper)` column values. - bool has_lower_limit = false; - bool has_upper_limit = false; - - RelativeSize lower_limit_rational = relative_range_offset * size_of_universum; - RelativeSize upper_limit_rational = (relative_range_offset + relative_range_size) * size_of_universum; - - UInt64 lower = boost::rational_cast(lower_limit_rational); - UInt64 upper = boost::rational_cast(upper_limit_rational); - - if (lower > 0) - has_lower_limit = true; - - if (upper_limit_rational < size_of_universum) - has_upper_limit = true; - - assert(has_lower_limit || has_upper_limit); - - /// Let's add the conditions to cut off something else when the index is scanned again and when the request is processed. - std::shared_ptr lower_function; - std::shared_ptr upper_function; - - if (has_lower_limit) - { - ASTPtr args = std::make_shared(); - args->children.push_back(custom_key_ast); - args->children.push_back(std::make_shared(lower)); - - lower_function = std::make_shared(); - lower_function->name = "greaterOrEquals"; - lower_function->arguments = args; - lower_function->children.push_back(lower_function->arguments); - - if (!has_upper_limit) - return lower_function; - } - - if (has_upper_limit) - { - ASTPtr args = std::make_shared(); - args->children.push_back(custom_key_ast); - args->children.push_back(std::make_shared(upper)); - - upper_function = std::make_shared(); - upper_function->name = "less"; - upper_function->arguments = args; - upper_function->children.push_back(upper_function->arguments); - - if (!has_lower_limit) - return upper_function; - } - - assert(has_lower_limit && has_upper_limit); - - ASTPtr args = std::make_shared(); - args->children.push_back(lower_function); - args->children.push_back(upper_function); - - auto and_function = std::make_shared(); - and_function->name = "and"; - and_function->arguments = args; - and_function->children.push_back(and_function->arguments); - - return and_function; - }; - - shard_filter = filter_function(); - } - - if (shard_filter) - { - auto & select_query = query->as(); - - auto where_expression = select_query.where(); - if (where_expression) - { - ASTPtr args = std::make_shared(); - args->children.push_back(where_expression); - args->children.push_back(shard_filter); - - auto and_function = std::make_shared(); - and_function->name = "and"; - and_function->arguments = args; - and_function->children.push_back(and_function->arguments); - - shard_filter = std::move(and_function); + if (typeid_cast(custom_key_column_type.get())) + size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); + else if (typeid_cast(custom_key_column_type.get())) + size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); + else if (typeid_cast(custom_key_column_type.get())) + size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); + else if (typeid_cast(custom_key_column_type.get())) + size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); } - select_query.setExpression(ASTSelectQuery::Expression::WHERE, std::move(shard_filter)); + if (size_of_universum == RelativeSize(0)) + throw Exception( + ErrorCodes::LOGICAL_ERROR, + "Invalid custom key column type: {}. Must be one unsigned integer type", custom_key_column_type->getName()); + + RelativeSize relative_range_size = RelativeSize(1) / query_info.getCluster()->getShardCount(); + RelativeSize relative_range_offset = relative_range_size * RelativeSize(shard_num - 1); + + /// Calculate the half-interval of `[lower, upper)` column values. + bool has_lower_limit = false; + bool has_upper_limit = false; + + RelativeSize lower_limit_rational = relative_range_offset * size_of_universum; + RelativeSize upper_limit_rational = (relative_range_offset + relative_range_size) * size_of_universum; + + UInt64 lower = boost::rational_cast(lower_limit_rational); + UInt64 upper = boost::rational_cast(upper_limit_rational); + + if (lower > 0) + has_lower_limit = true; + + if (upper_limit_rational < size_of_universum) + has_upper_limit = true; + + assert(has_lower_limit || has_upper_limit); + + /// Let's add the conditions to cut off something else when the index is scanned again and when the request is processed. + std::shared_ptr lower_function; + std::shared_ptr upper_function; + + if (has_lower_limit) + { + ASTPtr args = std::make_shared(); + args->children.push_back(custom_key_ast); + args->children.push_back(std::make_shared(lower)); + + lower_function = std::make_shared(); + lower_function->name = "greaterOrEquals"; + lower_function->arguments = args; + lower_function->children.push_back(lower_function->arguments); + + if (!has_upper_limit) + return lower_function; + } + + if (has_upper_limit) + { + ASTPtr args = std::make_shared(); + args->children.push_back(custom_key_ast); + args->children.push_back(std::make_shared(upper)); + + upper_function = std::make_shared(); + upper_function->name = "less"; + upper_function->arguments = args; + upper_function->children.push_back(upper_function->arguments); + + if (!has_lower_limit) + return upper_function; + } + + assert(has_lower_limit && has_upper_limit); + + ASTPtr args = std::make_shared(); + args->children.push_back(lower_function); + args->children.push_back(upper_function); + + auto and_function = std::make_shared(); + and_function->name = "and"; + and_function->arguments = args; + and_function->children.push_back(and_function->arguments); + + return and_function; } }; } @@ -945,7 +923,7 @@ void StorageDistributed::read( select_stream_factory, log, modified_query_ast, local_context, query_info, sharding_key_expr, sharding_key_column_name, - query_info.cluster, add_additional_shard_filter); + query_info.cluster, additional_shard_filter_generator); /// This is a bug, it is possible only when there is no shards to query, and this is handled earlier. if (!query_plan.isInitialized()) From 7a75144ce372da6134ae624668006c1348889d1e Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Thu, 19 Jan 2023 09:20:40 +0000 Subject: [PATCH 028/841] Refactor --- src/Interpreters/Cluster.cpp | 11 +- src/Interpreters/Cluster.h | 4 +- .../ClusterProxy/executeQuery.cpp | 13 +- src/Storages/StorageDistributed.cpp | 207 +++++++----------- 4 files changed, 92 insertions(+), 143 deletions(-) diff --git a/src/Interpreters/Cluster.cpp b/src/Interpreters/Cluster.cpp index 9f0a9d3b35c..7e3e1baf6f2 100644 --- a/src/Interpreters/Cluster.cpp +++ b/src/Interpreters/Cluster.cpp @@ -653,9 +653,9 @@ void Cluster::initMisc() } } -std::unique_ptr Cluster::getClusterWithReplicasAsShards(const Settings & settings) const +std::unique_ptr Cluster::getClusterWithReplicasAsShards(const Settings & settings, size_t max_replicas_from_shard) const { - return std::unique_ptr{ new Cluster(ReplicasAsShardsTag{}, *this, settings)}; + return std::unique_ptr{ new Cluster(ReplicasAsShardsTag{}, *this, settings, max_replicas_from_shard)}; } std::unique_ptr Cluster::getClusterWithSingleShard(size_t index) const @@ -668,7 +668,7 @@ std::unique_ptr Cluster::getClusterWithMultipleShards(const std::vector return std::unique_ptr{ new Cluster(SubclusterTag{}, *this, indices) }; } -Cluster::Cluster(Cluster::ReplicasAsShardsTag, const Cluster & from, const Settings & settings) +Cluster::Cluster(Cluster::ReplicasAsShardsTag, const Cluster & from, const Settings & settings, size_t max_replicas_from_shard) { if (from.addresses_with_failover.empty()) throw Exception("Cluster is empty", ErrorCodes::LOGICAL_ERROR); @@ -678,6 +678,7 @@ Cluster::Cluster(Cluster::ReplicasAsShardsTag, const Cluster & from, const Setti for (size_t shard_index : collections::range(0, from.shards_info.size())) { const auto & replicas = from.addresses_with_failover[shard_index]; + size_t replicas_used = 0; for (const auto & address : replicas) { if (!unique_hosts.emplace(address.host_name, address.port).second) @@ -685,6 +686,7 @@ Cluster::Cluster(Cluster::ReplicasAsShardsTag, const Cluster & from, const Setti ShardInfo info; info.shard_num = ++shard_num; + ++replicas_used; if (address.is_local) info.local_addresses.push_back(address); @@ -711,6 +713,9 @@ Cluster::Cluster(Cluster::ReplicasAsShardsTag, const Cluster & from, const Setti addresses_with_failover.emplace_back(Addresses{address}); shards_info.emplace_back(std::move(info)); + + if (max_replicas_from_shard && replicas_used == max_replicas_from_shard) + break; } } diff --git a/src/Interpreters/Cluster.h b/src/Interpreters/Cluster.h index ada04aa1cae..77e87e48ca7 100644 --- a/src/Interpreters/Cluster.h +++ b/src/Interpreters/Cluster.h @@ -250,7 +250,7 @@ public: std::unique_ptr getClusterWithMultipleShards(const std::vector & indices) const; /// Get a new Cluster that contains all servers (all shards with all replicas) from existing cluster as independent shards. - std::unique_ptr getClusterWithReplicasAsShards(const Settings & settings) const; + std::unique_ptr getClusterWithReplicasAsShards(const Settings & settings, size_t max_replicas_from_shard = 0) const; /// Returns false if cluster configuration doesn't allow to use it for cross-replication. /// NOTE: true does not mean, that it's actually a cross-replication cluster. @@ -271,7 +271,7 @@ private: /// For getClusterWithReplicasAsShards implementation struct ReplicasAsShardsTag {}; - Cluster(ReplicasAsShardsTag, const Cluster & from, const Settings & settings); + Cluster(ReplicasAsShardsTag, const Cluster & from, const Settings & settings, size_t max_replicas_from_shard); /// Inter-server secret String secret; diff --git a/src/Interpreters/ClusterProxy/executeQuery.cpp b/src/Interpreters/ClusterProxy/executeQuery.cpp index d8d55b5486b..02673b9f7ac 100644 --- a/src/Interpreters/ClusterProxy/executeQuery.cpp +++ b/src/Interpreters/ClusterProxy/executeQuery.cpp @@ -191,18 +191,7 @@ void executeQuery( auto where_expression = select_query.where(); if (where_expression) - { - ASTPtr args = std::make_shared(); - args->children.push_back(where_expression); - args->children.push_back(shard_filter); - - auto and_function = std::make_shared(); - and_function->name = "and"; - and_function->arguments = args; - and_function->children.push_back(and_function->arguments); - - shard_filter = std::move(and_function); - } + shard_filter = makeASTFunction("and", where_expression, shard_filter); select_query.setExpression(ASTSelectQuery::Expression::WHERE, std::move(shard_filter)); } diff --git a/src/Storages/StorageDistributed.cpp b/src/Storages/StorageDistributed.cpp index a7c0dafaf62..82c38868cb4 100644 --- a/src/Storages/StorageDistributed.cpp +++ b/src/Storages/StorageDistributed.cpp @@ -445,10 +445,6 @@ QueryProcessingStage::Enum StorageDistributed::getQueryProcessingStage( ClusterPtr cluster = getCluster(); - // if it's custom_key we will turn replicas into shards and filter specific data on each of them - if (settings.max_parallel_replicas > 1 && cluster->getShardCount() == 1 && settings.parallel_replicas_mode == ParallelReplicasMode::CUSTOM_KEY) - cluster = cluster->getClusterWithReplicasAsShards(settings); - query_info.cluster = cluster; size_t nodes = getClusterQueriedNodes(settings, cluster); @@ -758,15 +754,19 @@ void StorageDistributed::read( bool parallel_replicas = settings.max_parallel_replicas > 1 && settings.allow_experimental_parallel_reading_from_replicas && !settings.use_hedged_requests && settings.parallel_replicas_mode == ParallelReplicasMode::READ_TASKS; - auto shard_count = query_info.getCluster()->getShardCount(); - ClusterProxy::AdditionalShardFilterGenerator additional_shard_filter_generator; if (settings.max_parallel_replicas > 1 - && settings.parallel_replicas_mode == ParallelReplicasMode::CUSTOM_KEY) + && settings.parallel_replicas_mode == ParallelReplicasMode::CUSTOM_KEY + && getCluster()->getShardCount() == 1) { + LOG_INFO(log, "Single shard cluster used with custom_key, transforming replicas into shards"); + + query_info.cluster = getCluster()->getClusterWithReplicasAsShards(settings, settings.max_parallel_replicas); + query_info.optimized_cluster = nullptr; // it's a single shard cluster so nothing could've been optimized const std::string_view custom_key = settings.parallel_replicas_custom_key.value; - assert(!custom_key.empty()); + if (custom_key.empty()) + throw Exception(DB::ErrorCodes::BAD_ARGUMENTS, "Parallel replicas mode set to 'custom_key' but 'parallel_replicas_custom_key' has no value"); ParserExpression parser; auto custom_key_ast = parseQuery( @@ -777,135 +777,90 @@ void StorageDistributed::read( settings.max_query_size, settings.max_parser_depth); - additional_shard_filter_generator = [&](uint64_t shard_num) -> ASTPtr + additional_shard_filter_generator = [&, custom_key_ast = std::move(custom_key_ast), shard_count = query_info.cluster->getShardCount()](uint64_t shard_num) mutable -> ASTPtr { - ParserExpression parser; - auto custom_key_ast = parseQuery( - parser, settings.parallel_replicas_custom_key.value.data(), settings.parallel_replicas_custom_key.value.data() + settings.parallel_replicas_custom_key.value.size(), - "parallel replicas custom key", settings.max_query_size, settings.max_parser_depth); - - ASTPtr shard_filter = nullptr ; if (settings.parallel_replicas_custom_key_filter_type == ParallelReplicasCustomKeyFilterType::DEFAULT) { // first we do modulo with replica count - ASTPtr args = std::make_shared(); - args->children.push_back(custom_key_ast); - args->children.push_back(std::make_shared(shard_count)); - - auto modulo_function = std::make_shared(); - modulo_function->name = "positiveModulo"; - modulo_function->arguments = args; - modulo_function->children.push_back(modulo_function->arguments); + auto modulo_function = makeASTFunction("positiveModulo", custom_key_ast, std::make_shared(shard_count)); /// then we compare result to the current replica number (offset) - args = std::make_shared(); - args->children.push_back(modulo_function); - args->children.push_back(std::make_shared(shard_num - 1)); - - auto equals_function = std::make_shared(); - equals_function->name = "equals"; - equals_function->arguments = args; - equals_function->children.push_back(equals_function->arguments); + auto equals_function = makeASTFunction("equals", std::move(modulo_function), std::make_shared(shard_num - 1)); return equals_function; } - else + + assert(settings.parallel_replicas_custom_key_filter_type == ParallelReplicasCustomKeyFilterType::RANGE); + + KeyDescription custom_key_description = KeyDescription::getKeyFromAST(custom_key_ast, getInMemoryMetadataPtr()->columns, local_context); + + using RelativeSize = boost::rational; + + RelativeSize size_of_universum = 0; + DataTypePtr custom_key_column_type = custom_key_description.data_types[0]; + + size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); + if (custom_key_description.data_types.size() == 1) { - assert(settings.parallel_replicas_custom_key_filter_type == ParallelReplicasCustomKeyFilterType::RANGE); - - KeyDescription custom_key_description = KeyDescription::getKeyFromAST(custom_key_ast, getInMemoryMetadataPtr()->columns, local_context); - - using RelativeSize = boost::rational; - - RelativeSize size_of_universum = 0; - DataTypePtr custom_key_column_type = custom_key_description.data_types[0]; - - size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); - if (custom_key_description.data_types.size() == 1) - { - if (typeid_cast(custom_key_column_type.get())) - size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); - else if (typeid_cast(custom_key_column_type.get())) - size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); - else if (typeid_cast(custom_key_column_type.get())) - size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); - else if (typeid_cast(custom_key_column_type.get())) - size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); - } - - if (size_of_universum == RelativeSize(0)) - throw Exception( - ErrorCodes::LOGICAL_ERROR, - "Invalid custom key column type: {}. Must be one unsigned integer type", custom_key_column_type->getName()); - - RelativeSize relative_range_size = RelativeSize(1) / query_info.getCluster()->getShardCount(); - RelativeSize relative_range_offset = relative_range_size * RelativeSize(shard_num - 1); - - /// Calculate the half-interval of `[lower, upper)` column values. - bool has_lower_limit = false; - bool has_upper_limit = false; - - RelativeSize lower_limit_rational = relative_range_offset * size_of_universum; - RelativeSize upper_limit_rational = (relative_range_offset + relative_range_size) * size_of_universum; - - UInt64 lower = boost::rational_cast(lower_limit_rational); - UInt64 upper = boost::rational_cast(upper_limit_rational); - - if (lower > 0) - has_lower_limit = true; - - if (upper_limit_rational < size_of_universum) - has_upper_limit = true; - - assert(has_lower_limit || has_upper_limit); - - /// Let's add the conditions to cut off something else when the index is scanned again and when the request is processed. - std::shared_ptr lower_function; - std::shared_ptr upper_function; - - if (has_lower_limit) - { - ASTPtr args = std::make_shared(); - args->children.push_back(custom_key_ast); - args->children.push_back(std::make_shared(lower)); - - lower_function = std::make_shared(); - lower_function->name = "greaterOrEquals"; - lower_function->arguments = args; - lower_function->children.push_back(lower_function->arguments); - - if (!has_upper_limit) - return lower_function; - } - - if (has_upper_limit) - { - ASTPtr args = std::make_shared(); - args->children.push_back(custom_key_ast); - args->children.push_back(std::make_shared(upper)); - - upper_function = std::make_shared(); - upper_function->name = "less"; - upper_function->arguments = args; - upper_function->children.push_back(upper_function->arguments); - - if (!has_lower_limit) - return upper_function; - } - - assert(has_lower_limit && has_upper_limit); - - ASTPtr args = std::make_shared(); - args->children.push_back(lower_function); - args->children.push_back(upper_function); - - auto and_function = std::make_shared(); - and_function->name = "and"; - and_function->arguments = args; - and_function->children.push_back(and_function->arguments); - - return and_function; + if (typeid_cast(custom_key_column_type.get())) + size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); + else if (typeid_cast(custom_key_column_type.get())) + size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); + else if (typeid_cast(custom_key_column_type.get())) + size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); + else if (typeid_cast(custom_key_column_type.get())) + size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); } + + if (size_of_universum == RelativeSize(0)) + throw Exception( + ErrorCodes::LOGICAL_ERROR, + "Invalid custom key column type: {}. Must be one unsigned integer type", custom_key_column_type->getName()); + + RelativeSize relative_range_size = RelativeSize(1) / shard_count; + RelativeSize relative_range_offset = relative_range_size * RelativeSize(shard_num - 1); + + /// Calculate the half-interval of `[lower, upper)` column values. + bool has_lower_limit = false; + bool has_upper_limit = false; + + RelativeSize lower_limit_rational = relative_range_offset * size_of_universum; + RelativeSize upper_limit_rational = (relative_range_offset + relative_range_size) * size_of_universum; + + UInt64 lower = boost::rational_cast(lower_limit_rational); + UInt64 upper = boost::rational_cast(upper_limit_rational); + + if (lower > 0) + has_lower_limit = true; + + if (upper_limit_rational < size_of_universum) + has_upper_limit = true; + + assert(has_lower_limit || has_upper_limit); + + /// Let's add the conditions to cut off something else when the index is scanned again and when the request is processed. + std::shared_ptr lower_function; + std::shared_ptr upper_function; + + if (has_lower_limit) + { + lower_function = makeASTFunction("greaterOrEquals", custom_key_ast, std::make_shared(lower)); + + if (!has_upper_limit) + return lower_function; + } + + if (has_upper_limit) + { + upper_function = makeASTFunction("less", custom_key_ast, std::make_shared(upper)); + + if (!has_lower_limit) + return upper_function; + } + + assert(upper_function && lower_function); + + return makeASTFunction("and", std::move(lower_function), std::move(upper_function)); }; } From 3b0c63551ec244ae1d9ff38e70c04c98b5342b7d Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Thu, 19 Jan 2023 10:26:38 +0000 Subject: [PATCH 029/841] Combine approaches --- src/Interpreters/InterpreterSelectQuery.cpp | 84 +++++++++++--- .../getCustomKeyFilterForParallelReplicas.cpp | 109 ++++++++++++++++++ .../getCustomKeyFilterForParallelReplicas.h | 21 ++++ src/Storages/StorageDistributed.cpp | 89 +------------- 4 files changed, 206 insertions(+), 97 deletions(-) create mode 100644 src/Interpreters/getCustomKeyFilterForParallelReplicas.cpp create mode 100644 src/Interpreters/getCustomKeyFilterForParallelReplicas.h diff --git a/src/Interpreters/InterpreterSelectQuery.cpp b/src/Interpreters/InterpreterSelectQuery.cpp index 48326afda45..3612458196c 100644 --- a/src/Interpreters/InterpreterSelectQuery.cpp +++ b/src/Interpreters/InterpreterSelectQuery.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -94,6 +95,9 @@ #include #include #include +#include "Core/SettingsEnums.h" + +#include namespace DB { @@ -112,6 +116,8 @@ namespace ErrorCodes extern const int INVALID_WITH_FILL_EXPRESSION; extern const int ACCESS_DENIED; extern const int UNKNOWN_IDENTIFIER; + extern const int BAD_ARGUMENTS; + extern const int ILLEGAL_TYPE_OF_COLUMN_FOR_FILTER; } /// Assumes `storage` is set and the table filter (row-level security) is not empty. @@ -227,10 +233,13 @@ InterpreterSelectQuery::InterpreterSelectQuery( InterpreterSelectQuery::~InterpreterSelectQuery() = default; +namespace +{ + /** There are no limits on the maximum size of the result for the subquery. * Since the result of the query is not the result of the entire query. */ -static ContextPtr getSubqueryContext(const ContextPtr & context) +ContextPtr getSubqueryContext(const ContextPtr & context) { auto subquery_context = Context::createCopy(context); Settings subquery_settings = context->getSettings(); @@ -242,7 +251,7 @@ static ContextPtr getSubqueryContext(const ContextPtr & context) return subquery_context; } -static void rewriteMultipleJoins(ASTPtr & query, const TablesWithColumns & tables, const String & database, const Settings & settings) +void rewriteMultipleJoins(ASTPtr & query, const TablesWithColumns & tables, const String & database, const Settings & settings) { ASTSelectQuery & select = query->as(); @@ -262,7 +271,7 @@ static void rewriteMultipleJoins(ASTPtr & query, const TablesWithColumns & table } /// Checks that the current user has the SELECT privilege. -static void checkAccessRightsForSelect( +void checkAccessRightsForSelect( const ContextPtr & context, const StorageID & table_id, const StorageMetadataPtr & table_metadata, @@ -292,7 +301,7 @@ static void checkAccessRightsForSelect( context->checkAccess(AccessType::SELECT, table_id, syntax_analyzer_result.requiredSourceColumnsForAccessCheck()); } -static ASTPtr parseAdditionalFilterConditionForTable( +ASTPtr parseAdditionalFilterConditionForTable( const Map & setting, const DatabaseAndTableWithAlias & target, const Context & context) @@ -319,8 +328,20 @@ static ASTPtr parseAdditionalFilterConditionForTable( return nullptr; } +ASTPtr parseParallelReplicaCustomKey(const String & setting, const Context & context) +{ + if (setting.empty()) + throw Exception(DB::ErrorCodes::BAD_ARGUMENTS, "Parallel replicas mode set to 'custom_key' but 'parallel_replicas_custom_key' has no value"); + + ParserExpression parser; + const auto & settings = context.getSettingsRef(); + return parseQuery( + parser, setting.data(), setting.data() + setting.size(), + "parallel replicas custom key", settings.max_query_size, settings.max_parser_depth); +} + /// Returns true if we should ignore quotas and limits for a specified table in the system database. -static bool shouldIgnoreQuotaAndLimits(const StorageID & table_id) +bool shouldIgnoreQuotaAndLimits(const StorageID & table_id) { if (table_id.database_name == DatabaseCatalog::SYSTEM_DATABASE) { @@ -331,6 +352,8 @@ static bool shouldIgnoreQuotaAndLimits(const StorageID & table_id) return false; } +} + InterpreterSelectQuery::InterpreterSelectQuery( const ASTPtr & query_ptr_, const ContextPtr & context_, @@ -501,7 +524,24 @@ InterpreterSelectQuery::InterpreterSelectQuery( query_info.additional_filter_ast = parseAdditionalFilterConditionForTable( settings.additional_table_filters, joined_tables.tablesWithColumns().front().table, *context); - auto analyze = [&] (bool try_move_to_prewhere) + ASTPtr parallel_replicas_custom_filter_ast = nullptr; + if (settings.parallel_replicas_count > 1 && settings.parallel_replicas_mode == ParallelReplicasMode::CUSTOM_KEY) + { + LOG_INFO(log, "Processing query on a replica using custom_key"); + if (!storage) + throw DB::Exception(ErrorCodes::BAD_ARGUMENTS, "Storage is unknown when trying to parse custom key for parallel replica"); + + auto custom_key_ast = parseParallelReplicaCustomKey(settings.parallel_replicas_custom_key, *context); + parallel_replicas_custom_filter_ast = getCustomKeyFilterForParallelReplica( + settings.parallel_replicas_count, + settings.parallel_replica_offset, + std::move(custom_key_ast), + settings.parallel_replicas_custom_key_filter_type, + *storage, + context); + } + + auto analyze = [&](bool try_move_to_prewhere) { /// Allow push down and other optimizations for VIEW: replace with subquery and rewrite it. ASTPtr view_table; @@ -666,6 +706,16 @@ InterpreterSelectQuery::InterpreterSelectQuery( query_info.filter_asts.push_back(query_info.additional_filter_ast); } + if (parallel_replicas_custom_filter_ast) + { + parallel_replicas_custom_filter_info = generateFilterActions( + table_id, parallel_replicas_custom_filter_ast, context, storage, storage_snapshot, metadata_snapshot, required_columns, + prepared_sets); + + parallel_replicas_custom_filter_info->do_remove_column = true; + query_info.filter_asts.push_back(parallel_replicas_custom_filter_ast); + } + source_header = storage_snapshot->getSampleBlockForColumns(required_columns, parameter_values); } @@ -1409,17 +1459,23 @@ void InterpreterSelectQuery::executeImpl(QueryPlan & query_plan, std::optional

( + auto filter_step = std::make_unique( query_plan.getCurrentDataStream(), - additional_filter_info->actions, - additional_filter_info->column_name, - additional_filter_info->do_remove_column); + new_filter_info->actions, + new_filter_info->column_name, + new_filter_info->do_remove_column); - additional_filter_step->setStepDescription("Additional filter"); - query_plan.addStep(std::move(additional_filter_step)); - } + filter_step->setStepDescription(description); + query_plan.addStep(std::move(filter_step)); + }; + + if (additional_filter_info) + add_filter_step(additional_filter_info, "Additional filter"); + + if (parallel_replicas_custom_filter_info) + add_filter_step(parallel_replicas_custom_filter_info, "Parallel replica custom key filter"); if (expressions.before_array_join) { diff --git a/src/Interpreters/getCustomKeyFilterForParallelReplicas.cpp b/src/Interpreters/getCustomKeyFilterForParallelReplicas.cpp new file mode 100644 index 00000000000..8e7fa8386fe --- /dev/null +++ b/src/Interpreters/getCustomKeyFilterForParallelReplicas.cpp @@ -0,0 +1,109 @@ +#include + +#include +#include + +#include + +#include + + +namespace DB +{ + +ASTPtr getCustomKeyFilterForParallelReplica( + size_t replicas_count, + size_t replica_num, + ASTPtr custom_key_ast, + ParallelReplicasCustomKeyFilterType filter_type, + const IStorage & storage, + const ContextPtr & context) +{ + assert(replicas_count > 1); + if (filter_type == ParallelReplicasCustomKeyFilterType::DEFAULT) + { + // first we do modulo with replica count + auto modulo_function = makeASTFunction("positiveModulo", custom_key_ast, std::make_shared(replicas_count)); + + /// then we compare result to the current replica number (offset) + auto equals_function = makeASTFunction("equals", std::move(modulo_function), std::make_shared(replica_num)); + + return equals_function; + } + + assert(filter_type == ParallelReplicasCustomKeyFilterType::RANGE); + + KeyDescription custom_key_description + = KeyDescription::getKeyFromAST(custom_key_ast, storage.getInMemoryMetadataPtr()->columns, context); + + using RelativeSize = boost::rational; + + RelativeSize size_of_universum = 0; + DataTypePtr custom_key_column_type = custom_key_description.data_types[0]; + + size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); + if (custom_key_description.data_types.size() == 1) + { + if (typeid_cast(custom_key_column_type.get())) + size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); + else if (typeid_cast(custom_key_column_type.get())) + size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); + else if (typeid_cast(custom_key_column_type.get())) + size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); + else if (typeid_cast(custom_key_column_type.get())) + size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); + } + + if (size_of_universum == RelativeSize(0)) + throw Exception( + ErrorCodes::LOGICAL_ERROR, + "Invalid custom key column type: {}. Must be one unsigned integer type", + custom_key_column_type->getName()); + + RelativeSize relative_range_size = RelativeSize(1) / replicas_count; + RelativeSize relative_range_offset = relative_range_size * RelativeSize(replica_num); + + /// Calculate the half-interval of `[lower, upper)` column values. + bool has_lower_limit = false; + bool has_upper_limit = false; + + RelativeSize lower_limit_rational = relative_range_offset * size_of_universum; + RelativeSize upper_limit_rational = (relative_range_offset + relative_range_size) * size_of_universum; + + UInt64 lower = boost::rational_cast(lower_limit_rational); + UInt64 upper = boost::rational_cast(upper_limit_rational); + + if (lower > 0) + has_lower_limit = true; + + if (upper_limit_rational < size_of_universum) + has_upper_limit = true; + + assert(has_lower_limit || has_upper_limit); + + /// Let's add the conditions to cut off something else when the index is scanned again and when the request is processed. + std::shared_ptr lower_function; + std::shared_ptr upper_function; + + if (has_lower_limit) + { + lower_function = makeASTFunction("greaterOrEquals", custom_key_ast, std::make_shared(lower)); + + if (!has_upper_limit) + return lower_function; + } + + if (has_upper_limit) + { + upper_function = makeASTFunction("less", custom_key_ast, std::make_shared(upper)); + + if (!has_lower_limit) + return upper_function; + } + + assert(upper_function && lower_function); + + return makeASTFunction("and", std::move(lower_function), std::move(upper_function)); +} + +} diff --git a/src/Interpreters/getCustomKeyFilterForParallelReplicas.h b/src/Interpreters/getCustomKeyFilterForParallelReplicas.h new file mode 100644 index 00000000000..3d830d1d606 --- /dev/null +++ b/src/Interpreters/getCustomKeyFilterForParallelReplicas.h @@ -0,0 +1,21 @@ +#pragma once + +#include +#include +#include +#include "Core/SettingsEnums.h" + +namespace DB +{ + +/// Get AST for filter created from custom_key +/// replica_num is the number of the replica for which we are generating filter starting from 0 +ASTPtr getCustomKeyFilterForParallelReplica( + size_t replicas_count, + size_t replica_num, + ASTPtr custom_key_ast, + ParallelReplicasCustomKeyFilterType filter_type, + const IStorage & storage, + const ContextPtr & context); + +} diff --git a/src/Storages/StorageDistributed.cpp b/src/Storages/StorageDistributed.cpp index 82c38868cb4..a0aa646869f 100644 --- a/src/Storages/StorageDistributed.cpp +++ b/src/Storages/StorageDistributed.cpp @@ -61,6 +61,8 @@ #include #include #include +#include + #include #include #include @@ -777,90 +779,11 @@ void StorageDistributed::read( settings.max_query_size, settings.max_parser_depth); - additional_shard_filter_generator = [&, custom_key_ast = std::move(custom_key_ast), shard_count = query_info.cluster->getShardCount()](uint64_t shard_num) mutable -> ASTPtr + additional_shard_filter_generator = + [&, custom_key_ast = std::move(custom_key_ast), shard_count = query_info.cluster->getShardCount()](uint64_t shard_num) -> ASTPtr { - if (settings.parallel_replicas_custom_key_filter_type == ParallelReplicasCustomKeyFilterType::DEFAULT) - { - // first we do modulo with replica count - auto modulo_function = makeASTFunction("positiveModulo", custom_key_ast, std::make_shared(shard_count)); - - /// then we compare result to the current replica number (offset) - auto equals_function = makeASTFunction("equals", std::move(modulo_function), std::make_shared(shard_num - 1)); - - return equals_function; - } - - assert(settings.parallel_replicas_custom_key_filter_type == ParallelReplicasCustomKeyFilterType::RANGE); - - KeyDescription custom_key_description = KeyDescription::getKeyFromAST(custom_key_ast, getInMemoryMetadataPtr()->columns, local_context); - - using RelativeSize = boost::rational; - - RelativeSize size_of_universum = 0; - DataTypePtr custom_key_column_type = custom_key_description.data_types[0]; - - size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); - if (custom_key_description.data_types.size() == 1) - { - if (typeid_cast(custom_key_column_type.get())) - size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); - else if (typeid_cast(custom_key_column_type.get())) - size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); - else if (typeid_cast(custom_key_column_type.get())) - size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); - else if (typeid_cast(custom_key_column_type.get())) - size_of_universum = RelativeSize(std::numeric_limits::max()) + RelativeSize(1); - } - - if (size_of_universum == RelativeSize(0)) - throw Exception( - ErrorCodes::LOGICAL_ERROR, - "Invalid custom key column type: {}. Must be one unsigned integer type", custom_key_column_type->getName()); - - RelativeSize relative_range_size = RelativeSize(1) / shard_count; - RelativeSize relative_range_offset = relative_range_size * RelativeSize(shard_num - 1); - - /// Calculate the half-interval of `[lower, upper)` column values. - bool has_lower_limit = false; - bool has_upper_limit = false; - - RelativeSize lower_limit_rational = relative_range_offset * size_of_universum; - RelativeSize upper_limit_rational = (relative_range_offset + relative_range_size) * size_of_universum; - - UInt64 lower = boost::rational_cast(lower_limit_rational); - UInt64 upper = boost::rational_cast(upper_limit_rational); - - if (lower > 0) - has_lower_limit = true; - - if (upper_limit_rational < size_of_universum) - has_upper_limit = true; - - assert(has_lower_limit || has_upper_limit); - - /// Let's add the conditions to cut off something else when the index is scanned again and when the request is processed. - std::shared_ptr lower_function; - std::shared_ptr upper_function; - - if (has_lower_limit) - { - lower_function = makeASTFunction("greaterOrEquals", custom_key_ast, std::make_shared(lower)); - - if (!has_upper_limit) - return lower_function; - } - - if (has_upper_limit) - { - upper_function = makeASTFunction("less", custom_key_ast, std::make_shared(upper)); - - if (!has_lower_limit) - return upper_function; - } - - assert(upper_function && lower_function); - - return makeASTFunction("and", std::move(lower_function), std::move(upper_function)); + return getCustomKeyFilterForParallelReplica( + shard_count, shard_num - 1, custom_key_ast, settings.parallel_replicas_custom_key_filter_type, *this, local_context); }; } From ddfb913f9991b4e410744ebb0eac260d842df4e2 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Thu, 19 Jan 2023 11:28:26 +0000 Subject: [PATCH 030/841] better --- src/Interpreters/InterpreterSelectQuery.cpp | 18 +---- .../getCustomKeyFilterForParallelReplicas.cpp | 23 +++++- .../getCustomKeyFilterForParallelReplicas.h | 4 +- src/Storages/StorageDistributed.cpp | 75 ++++++++++--------- 4 files changed, 64 insertions(+), 56 deletions(-) diff --git a/src/Interpreters/InterpreterSelectQuery.cpp b/src/Interpreters/InterpreterSelectQuery.cpp index 3612458196c..0aa48ca1998 100644 --- a/src/Interpreters/InterpreterSelectQuery.cpp +++ b/src/Interpreters/InterpreterSelectQuery.cpp @@ -95,9 +95,6 @@ #include #include #include -#include "Core/SettingsEnums.h" - -#include namespace DB { @@ -117,7 +114,6 @@ namespace ErrorCodes extern const int ACCESS_DENIED; extern const int UNKNOWN_IDENTIFIER; extern const int BAD_ARGUMENTS; - extern const int ILLEGAL_TYPE_OF_COLUMN_FOR_FILTER; } /// Assumes `storage` is set and the table filter (row-level security) is not empty. @@ -328,18 +324,6 @@ ASTPtr parseAdditionalFilterConditionForTable( return nullptr; } -ASTPtr parseParallelReplicaCustomKey(const String & setting, const Context & context) -{ - if (setting.empty()) - throw Exception(DB::ErrorCodes::BAD_ARGUMENTS, "Parallel replicas mode set to 'custom_key' but 'parallel_replicas_custom_key' has no value"); - - ParserExpression parser; - const auto & settings = context.getSettingsRef(); - return parseQuery( - parser, setting.data(), setting.data() + setting.size(), - "parallel replicas custom key", settings.max_query_size, settings.max_parser_depth); -} - /// Returns true if we should ignore quotas and limits for a specified table in the system database. bool shouldIgnoreQuotaAndLimits(const StorageID & table_id) { @@ -531,7 +515,7 @@ InterpreterSelectQuery::InterpreterSelectQuery( if (!storage) throw DB::Exception(ErrorCodes::BAD_ARGUMENTS, "Storage is unknown when trying to parse custom key for parallel replica"); - auto custom_key_ast = parseParallelReplicaCustomKey(settings.parallel_replicas_custom_key, *context); + auto custom_key_ast = parseParallelReplicaCustomKey(settings.parallel_replicas_custom_key.value, *context); parallel_replicas_custom_filter_ast = getCustomKeyFilterForParallelReplica( settings.parallel_replicas_count, settings.parallel_replica_offset, diff --git a/src/Interpreters/getCustomKeyFilterForParallelReplicas.cpp b/src/Interpreters/getCustomKeyFilterForParallelReplicas.cpp index 8e7fa8386fe..306ca129e16 100644 --- a/src/Interpreters/getCustomKeyFilterForParallelReplicas.cpp +++ b/src/Interpreters/getCustomKeyFilterForParallelReplicas.cpp @@ -2,6 +2,10 @@ #include #include +#include +#include + +#include #include @@ -11,6 +15,12 @@ namespace DB { +namespace ErrorCodes +{ + extern const int LOGICAL_ERROR; + extern const int ILLEGAL_TYPE_OF_COLUMN_FOR_FILTER; +} + ASTPtr getCustomKeyFilterForParallelReplica( size_t replicas_count, size_t replica_num, @@ -56,7 +66,7 @@ ASTPtr getCustomKeyFilterForParallelReplica( if (size_of_universum == RelativeSize(0)) throw Exception( - ErrorCodes::LOGICAL_ERROR, + ErrorCodes::ILLEGAL_TYPE_OF_COLUMN_FOR_FILTER, "Invalid custom key column type: {}. Must be one unsigned integer type", custom_key_column_type->getName()); @@ -106,4 +116,15 @@ ASTPtr getCustomKeyFilterForParallelReplica( return makeASTFunction("and", std::move(lower_function), std::move(upper_function)); } +ASTPtr parseParallelReplicaCustomKey(std::string_view custom_key, const Context & context) +{ + if (custom_key.empty()) + throw Exception(DB::ErrorCodes::BAD_ARGUMENTS, "Parallel replicas mode set to 'custom_key' but 'parallel_replicas_custom_key' has no value"); + + ParserExpression parser; + const auto & settings = context.getSettingsRef(); + return parseQuery( + parser, custom_key.data(), custom_key.data() + custom_key.size(), + "parallel replicas custom key", settings.max_query_size, settings.max_parser_depth); +} } diff --git a/src/Interpreters/getCustomKeyFilterForParallelReplicas.h b/src/Interpreters/getCustomKeyFilterForParallelReplicas.h index 3d830d1d606..251e72e0a97 100644 --- a/src/Interpreters/getCustomKeyFilterForParallelReplicas.h +++ b/src/Interpreters/getCustomKeyFilterForParallelReplicas.h @@ -3,7 +3,7 @@ #include #include #include -#include "Core/SettingsEnums.h" +#include namespace DB { @@ -18,4 +18,6 @@ ASTPtr getCustomKeyFilterForParallelReplica( const IStorage & storage, const ContextPtr & context); +ASTPtr parseParallelReplicaCustomKey(std::string_view custom_key, const Context & context); + } diff --git a/src/Storages/StorageDistributed.cpp b/src/Storages/StorageDistributed.cpp index a0aa646869f..e66a363003e 100644 --- a/src/Storages/StorageDistributed.cpp +++ b/src/Storages/StorageDistributed.cpp @@ -135,7 +135,6 @@ namespace ErrorCodes extern const int ARGUMENT_OUT_OF_BOUND; extern const int TOO_LARGE_DISTRIBUTED_DEPTH; extern const int UNSUPPORTED_METHOD; - extern const int ILLEGAL_TYPE_OF_COLUMN_FOR_FILTER; } namespace ActionLocks @@ -447,29 +446,40 @@ QueryProcessingStage::Enum StorageDistributed::getQueryProcessingStage( ClusterPtr cluster = getCluster(); - query_info.cluster = cluster; - size_t nodes = getClusterQueriedNodes(settings, cluster); - /// Always calculate optimized cluster here, to avoid conditions during read() - /// (Anyway it will be calculated in the read()) - if (nodes > 1 && settings.optimize_skip_unused_shards) + if (settings.max_parallel_replicas > 1 + && settings.parallel_replicas_mode == ParallelReplicasMode::CUSTOM_KEY + && cluster->getShardCount() == 1) { - ClusterPtr optimized_cluster = getOptimizedCluster(local_context, storage_snapshot, query_info.query); - if (optimized_cluster) - { - LOG_DEBUG(log, "Skipping irrelevant shards - the query will be sent to the following shards of the cluster (shard numbers): {}", - makeFormattedListOfShards(optimized_cluster)); + LOG_INFO(log, "Single shard cluster used with custom_key, transforming replicas into virtual shards"); - cluster = optimized_cluster; - query_info.optimized_cluster = cluster; + query_info.cluster = cluster->getClusterWithReplicasAsShards(settings, settings.max_parallel_replicas); + } + else + { + query_info.cluster = cluster; - nodes = getClusterQueriedNodes(settings, cluster); - } - else + if (nodes > 1 && settings.optimize_skip_unused_shards) { - LOG_DEBUG(log, "Unable to figure out irrelevant shards from WHERE/PREWHERE clauses - the query will be sent to all shards of the cluster{}", - has_sharding_key ? "" : " (no sharding key)"); + /// Always calculate optimized cluster here, to avoid conditions during read() + /// (Anyway it will be calculated in the read()) + ClusterPtr optimized_cluster = getOptimizedCluster(local_context, storage_snapshot, query_info.query); + if (optimized_cluster) + { + LOG_DEBUG(log, "Skipping irrelevant shards - the query will be sent to the following shards of the cluster (shard numbers): {}", + makeFormattedListOfShards(optimized_cluster)); + + cluster = optimized_cluster; + query_info.optimized_cluster = cluster; + + nodes = getClusterQueriedNodes(settings, cluster); + } + else + { + LOG_DEBUG(log, "Unable to figure out irrelevant shards from WHERE/PREWHERE clauses - the query will be sent to all shards of the cluster{}", + has_sharding_key ? "" : " (no sharding key)"); + } } } @@ -751,33 +761,21 @@ void StorageDistributed::read( storage_snapshot, processed_stage); - auto settings = local_context->getSettingsRef(); - bool parallel_replicas = settings.max_parallel_replicas > 1 && settings.allow_experimental_parallel_reading_from_replicas - && !settings.use_hedged_requests && settings.parallel_replicas_mode == ParallelReplicasMode::READ_TASKS; ClusterProxy::AdditionalShardFilterGenerator additional_shard_filter_generator; if (settings.max_parallel_replicas > 1 && settings.parallel_replicas_mode == ParallelReplicasMode::CUSTOM_KEY && getCluster()->getShardCount() == 1) { - LOG_INFO(log, "Single shard cluster used with custom_key, transforming replicas into shards"); + if (query_info.getCluster()->getShardCount() == 1) + { + // we are reading from single shard replica but didn't transform replicas + // into virtual shards with custom_key set + throw Exception(ErrorCodes::LOGICAL_ERROR, "Replicas weren't transformed into virtual shards"); + } - query_info.cluster = getCluster()->getClusterWithReplicasAsShards(settings, settings.max_parallel_replicas); - query_info.optimized_cluster = nullptr; // it's a single shard cluster so nothing could've been optimized - - const std::string_view custom_key = settings.parallel_replicas_custom_key.value; - if (custom_key.empty()) - throw Exception(DB::ErrorCodes::BAD_ARGUMENTS, "Parallel replicas mode set to 'custom_key' but 'parallel_replicas_custom_key' has no value"); - - ParserExpression parser; - auto custom_key_ast = parseQuery( - parser, - custom_key.data(), - custom_key.data() + custom_key.size(), - "parallel replicas custom key", - settings.max_query_size, - settings.max_parser_depth); + auto custom_key_ast = parseParallelReplicaCustomKey(settings.parallel_replicas_custom_key.value, *local_context); additional_shard_filter_generator = [&, custom_key_ast = std::move(custom_key_ast), shard_count = query_info.cluster->getShardCount()](uint64_t shard_num) -> ASTPtr @@ -787,6 +785,9 @@ void StorageDistributed::read( }; } + bool parallel_replicas = settings.max_parallel_replicas > 1 && settings.allow_experimental_parallel_reading_from_replicas + && !settings.use_hedged_requests && settings.parallel_replicas_mode == ParallelReplicasMode::READ_TASKS; + if (parallel_replicas) ClusterProxy::executeQueryWithParallelReplicas( query_plan, main_table, remote_table_function_ptr, From 53b53a1ec90c385c2b68806e4a7f4078ecf64945 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Thu, 19 Jan 2023 12:04:07 +0000 Subject: [PATCH 031/841] Add replcia shuffling --- src/Interpreters/Cluster.cpp | 92 ++++++++++++++++++++++++------------ 1 file changed, 61 insertions(+), 31 deletions(-) diff --git a/src/Interpreters/Cluster.cpp b/src/Interpreters/Cluster.cpp index 7e3e1baf6f2..97970691025 100644 --- a/src/Interpreters/Cluster.cpp +++ b/src/Interpreters/Cluster.cpp @@ -15,6 +15,7 @@ #include #include +#include namespace DB { @@ -677,45 +678,74 @@ Cluster::Cluster(Cluster::ReplicasAsShardsTag, const Cluster & from, const Setti std::set> unique_hosts; for (size_t shard_index : collections::range(0, from.shards_info.size())) { - const auto & replicas = from.addresses_with_failover[shard_index]; - size_t replicas_used = 0; - for (const auto & address : replicas) + auto create_shards_from_replicas = [&](std::span replicas) { - if (!unique_hosts.emplace(address.host_name, address.port).second) - continue; /// Duplicate host, skip. + for (const auto & address : replicas) + { + if (!unique_hosts.emplace(address.host_name, address.port).second) + continue; /// Duplicate host, skip. - ShardInfo info; - info.shard_num = ++shard_num; - ++replicas_used; + ShardInfo info; + info.shard_num = ++shard_num; - if (address.is_local) - info.local_addresses.push_back(address); + if (address.is_local) + info.local_addresses.push_back(address); - info.all_addresses.push_back(address); + info.all_addresses.push_back(address); - auto pool = ConnectionPoolFactory::instance().get( - static_cast(settings.distributed_connections_pool_size), - address.host_name, - address.port, - address.default_database, - address.user, - address.password, - address.quota_key, - address.cluster, - address.cluster_secret, - "server", - address.compression, - address.secure, - address.priority); + auto pool = ConnectionPoolFactory::instance().get( + static_cast(settings.distributed_connections_pool_size), + address.host_name, + address.port, + address.default_database, + address.user, + address.password, + address.quota_key, + address.cluster, + address.cluster_secret, + "server", + address.compression, + address.secure, + address.priority); - info.pool = std::make_shared(ConnectionPoolPtrs{pool}, settings.load_balancing); - info.per_replica_pools = {std::move(pool)}; + info.pool = std::make_shared(ConnectionPoolPtrs{pool}, settings.load_balancing); + info.per_replica_pools = {std::move(pool)}; - addresses_with_failover.emplace_back(Addresses{address}); - shards_info.emplace_back(std::move(info)); + addresses_with_failover.emplace_back(Addresses{address}); + shards_info.emplace_back(std::move(info)); + } + }; - if (max_replicas_from_shard && replicas_used == max_replicas_from_shard) - break; + const auto & replicas = from.addresses_with_failover[shard_index]; + if (!max_replicas_from_shard || replicas.size() <= max_replicas_from_shard) + { + create_shards_from_replicas(replicas); + } + else + { + std::random_device rd; + std::mt19937 gen{rd()}; + auto shuffled_replicas = replicas; + + if (settings.prefer_localhost_replica) + { + auto local_replica = std::find_if(shuffled_replicas.begin(), shuffled_replicas.end(), [](const auto & replica) { return replica.is_local; }); + if (local_replica != shuffled_replicas.end()) + { + std::swap(*shuffled_replicas.begin(), *local_replica); + std::shuffle(shuffled_replicas.begin() + 1, shuffled_replicas.end(), gen); + } + else + { + std::shuffle(shuffled_replicas.begin(), shuffled_replicas.end(), gen); + } + } + else + { + std::shuffle(shuffled_replicas.begin(), shuffled_replicas.end(), gen); + } + + create_shards_from_replicas(std::span{shuffled_replicas.begin(), shuffled_replicas.begin() + max_replicas_from_shard}); } } From d8adff35c3e1851e3f85ffa0ffa3780b0114bd51 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Thu, 19 Jan 2023 12:08:32 +0000 Subject: [PATCH 032/841] Fix style --- src/Interpreters/Cluster.cpp | 6 +++++- src/Interpreters/getCustomKeyFilterForParallelReplicas.cpp | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Interpreters/Cluster.cpp b/src/Interpreters/Cluster.cpp index 97970691025..9661b3f4e19 100644 --- a/src/Interpreters/Cluster.cpp +++ b/src/Interpreters/Cluster.cpp @@ -723,16 +723,20 @@ Cluster::Cluster(Cluster::ReplicasAsShardsTag, const Cluster & from, const Setti } else { + // shuffle replicas so we don't always pick the same subset std::random_device rd; std::mt19937 gen{rd()}; auto shuffled_replicas = replicas; if (settings.prefer_localhost_replica) { + // force for local replica to always be included auto local_replica = std::find_if(shuffled_replicas.begin(), shuffled_replicas.end(), [](const auto & replica) { return replica.is_local; }); if (local_replica != shuffled_replicas.end()) { - std::swap(*shuffled_replicas.begin(), *local_replica); + if (local_replica != shuffled_replicas.begin()) + std::swap(*shuffled_replicas.begin(), *local_replica); + std::shuffle(shuffled_replicas.begin() + 1, shuffled_replicas.end(), gen); } else diff --git a/src/Interpreters/getCustomKeyFilterForParallelReplicas.cpp b/src/Interpreters/getCustomKeyFilterForParallelReplicas.cpp index 306ca129e16..fbc1d214164 100644 --- a/src/Interpreters/getCustomKeyFilterForParallelReplicas.cpp +++ b/src/Interpreters/getCustomKeyFilterForParallelReplicas.cpp @@ -17,8 +17,8 @@ namespace DB namespace ErrorCodes { - extern const int LOGICAL_ERROR; extern const int ILLEGAL_TYPE_OF_COLUMN_FOR_FILTER; + extern const int BAD_ARGUMENTS; } ASTPtr getCustomKeyFilterForParallelReplica( From d93cb3e1ddb5192f208e259fa57d4ccd5f29dffa Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Thu, 19 Jan 2023 13:24:35 +0000 Subject: [PATCH 033/841] More correct check --- src/Storages/StorageDistributed.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Storages/StorageDistributed.cpp b/src/Storages/StorageDistributed.cpp index e66a363003e..ea7cb9d33cb 100644 --- a/src/Storages/StorageDistributed.cpp +++ b/src/Storages/StorageDistributed.cpp @@ -307,6 +307,11 @@ size_t getClusterQueriedNodes(const Settings & settings, const ClusterPtr & clus return (num_remote_shards + num_local_shards) * settings.max_parallel_replicas; } +bool useVirtualShards(const Settings & settings, const Cluster & cluster) +{ + return settings.max_parallel_replicas > 1 && settings.parallel_replicas_mode == ParallelReplicasMode::CUSTOM_KEY + && cluster.getShardCount() == 1 && cluster.getShardsInfo()[0].getAllNodeCount() > 1; +} } @@ -448,9 +453,7 @@ QueryProcessingStage::Enum StorageDistributed::getQueryProcessingStage( size_t nodes = getClusterQueriedNodes(settings, cluster); - if (settings.max_parallel_replicas > 1 - && settings.parallel_replicas_mode == ParallelReplicasMode::CUSTOM_KEY - && cluster->getShardCount() == 1) + if (useVirtualShards(settings, *cluster)) { LOG_INFO(log, "Single shard cluster used with custom_key, transforming replicas into virtual shards"); @@ -764,13 +767,11 @@ void StorageDistributed::read( auto settings = local_context->getSettingsRef(); ClusterProxy::AdditionalShardFilterGenerator additional_shard_filter_generator; - if (settings.max_parallel_replicas > 1 - && settings.parallel_replicas_mode == ParallelReplicasMode::CUSTOM_KEY - && getCluster()->getShardCount() == 1) + if (useVirtualShards(settings, *getCluster())) { if (query_info.getCluster()->getShardCount() == 1) { - // we are reading from single shard replica but didn't transform replicas + // we are reading from single shard with multiple replicas but didn't transform replicas // into virtual shards with custom_key set throw Exception(ErrorCodes::LOGICAL_ERROR, "Replicas weren't transformed into virtual shards"); } From 6394a004fb8014f81baf98b500163a779640478c Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Thu, 19 Jan 2023 14:47:58 +0000 Subject: [PATCH 034/841] Refactor --- src/Interpreters/Cluster.cpp | 54 +++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/src/Interpreters/Cluster.cpp b/src/Interpreters/Cluster.cpp index 9661b3f4e19..76609cf1a5b 100644 --- a/src/Interpreters/Cluster.cpp +++ b/src/Interpreters/Cluster.cpp @@ -669,6 +669,33 @@ std::unique_ptr Cluster::getClusterWithMultipleShards(const std::vector return std::unique_ptr{ new Cluster(SubclusterTag{}, *this, indices) }; } +namespace +{ + +void shuffleReplicas(auto & replicas, const Settings & settings) +{ + std::random_device rd; + std::mt19937 gen{rd()}; + + if (settings.prefer_localhost_replica) + { + // force for local replica to always be included + auto local_replica = std::find_if(replicas.begin(), replicas.end(), [](const auto & replica) { return replica.is_local; }); + if (local_replica != replicas.end()) + { + if (local_replica != replicas.begin()) + std::swap(*replicas.begin(), *local_replica); + + std::shuffle(replicas.begin() + 1, replicas.end(), gen); + return; + } + } + + std::shuffle(replicas.begin(), replicas.end(), gen); +} + +} + Cluster::Cluster(Cluster::ReplicasAsShardsTag, const Cluster & from, const Settings & settings, size_t max_replicas_from_shard) { if (from.addresses_with_failover.empty()) @@ -723,32 +750,9 @@ Cluster::Cluster(Cluster::ReplicasAsShardsTag, const Cluster & from, const Setti } else { - // shuffle replicas so we don't always pick the same subset - std::random_device rd; - std::mt19937 gen{rd()}; auto shuffled_replicas = replicas; - - if (settings.prefer_localhost_replica) - { - // force for local replica to always be included - auto local_replica = std::find_if(shuffled_replicas.begin(), shuffled_replicas.end(), [](const auto & replica) { return replica.is_local; }); - if (local_replica != shuffled_replicas.end()) - { - if (local_replica != shuffled_replicas.begin()) - std::swap(*shuffled_replicas.begin(), *local_replica); - - std::shuffle(shuffled_replicas.begin() + 1, shuffled_replicas.end(), gen); - } - else - { - std::shuffle(shuffled_replicas.begin(), shuffled_replicas.end(), gen); - } - } - else - { - std::shuffle(shuffled_replicas.begin(), shuffled_replicas.end(), gen); - } - + // shuffle replicas so we don't always pick the same subset + shuffleReplicas(shuffled_replicas, settings); create_shards_from_replicas(std::span{shuffled_replicas.begin(), shuffled_replicas.begin() + max_replicas_from_shard}); } } From ad429a9312146bb48058af48283ff627cf094b5c Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Thu, 19 Jan 2023 15:16:05 +0000 Subject: [PATCH 035/841] Add missing checks --- src/Client/HedgedConnections.cpp | 4 +++- src/Client/MultiplexedConnections.cpp | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Client/HedgedConnections.cpp b/src/Client/HedgedConnections.cpp index c7392a86a7e..12f1850c282 100644 --- a/src/Client/HedgedConnections.cpp +++ b/src/Client/HedgedConnections.cpp @@ -175,7 +175,9 @@ void HedgedConnections::sendQuery( modified_settings.group_by_two_level_threshold_bytes = 0; } - const bool enable_sample_offset_parallel_processing = settings.max_parallel_replicas > 1 && !settings.allow_experimental_parallel_reading_from_replicas; + const bool enable_sample_offset_parallel_processing = settings.max_parallel_replicas > 1 + && (settings.parallel_replicas_mode != ParallelReplicasMode::READ_TASKS + || !settings.allow_experimental_parallel_reading_from_replicas); if (offset_states.size() > 1 && enable_sample_offset_parallel_processing) { diff --git a/src/Client/MultiplexedConnections.cpp b/src/Client/MultiplexedConnections.cpp index 87eda765a7a..81bae7f501b 100644 --- a/src/Client/MultiplexedConnections.cpp +++ b/src/Client/MultiplexedConnections.cpp @@ -134,6 +134,7 @@ void MultiplexedConnections::sendQuery( } bool parallel_reading_from_replicas = settings.max_parallel_replicas > 1 + && settings.parallel_replicas_mode == ParallelReplicasMode::READ_TASKS && settings.allow_experimental_parallel_reading_from_replicas /// To avoid trying to coordinate with clickhouse-benchmark, /// since it uses the same code. @@ -146,7 +147,9 @@ void MultiplexedConnections::sendQuery( } } - const bool enable_sample_offset_parallel_processing = settings.max_parallel_replicas > 1 && !settings.allow_experimental_parallel_reading_from_replicas; + const bool enable_sample_offset_parallel_processing = settings.max_parallel_replicas > 1 + && (settings.parallel_replicas_mode != ParallelReplicasMode::READ_TASKS + || !settings.allow_experimental_parallel_reading_from_replicas); size_t num_replicas = replica_states.size(); if (num_replicas > 1) From 8453c9d27d92dec1480e77944cb9d5b00a1fb4a2 Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Fri, 20 Jan 2023 07:47:08 +0000 Subject: [PATCH 036/841] Add construction of temporary tables by StorageFactory --- src/Interpreters/DatabaseCatalog.cpp | 5 -- src/Interpreters/DatabaseCatalog.h | 2 - src/Interpreters/InterpreterCreateQuery.cpp | 60 ++++++++++----------- 3 files changed, 29 insertions(+), 38 deletions(-) diff --git a/src/Interpreters/DatabaseCatalog.cpp b/src/Interpreters/DatabaseCatalog.cpp index 2daca6a55a8..6ac01a9473f 100644 --- a/src/Interpreters/DatabaseCatalog.cpp +++ b/src/Interpreters/DatabaseCatalog.cpp @@ -53,11 +53,6 @@ namespace ErrorCodes extern const int HAVE_DEPENDENT_OBJECTS; } -TemporaryTableHolder::TemporaryTableHolder(ContextPtr context, const String& table_name, const ASTPtr & query = {}) -{ - -} - TemporaryTableHolder::TemporaryTableHolder(ContextPtr context_, const TemporaryTableHolder::Creator & creator, const ASTPtr & query) : WithContext(context_->getGlobalContext()) , temporary_tables(DatabaseCatalog::instance().getDatabaseForTemporaryTables().get()) diff --git a/src/Interpreters/DatabaseCatalog.h b/src/Interpreters/DatabaseCatalog.h index 3028c900599..a3fa4515a69 100644 --- a/src/Interpreters/DatabaseCatalog.h +++ b/src/Interpreters/DatabaseCatalog.h @@ -88,8 +88,6 @@ struct TemporaryTableHolder : boost::noncopyable, WithContext { using Creator = std::function; - TemporaryTableHolder(ContextPtr context, const String & table_name, const ASTPtr & query = {}); - TemporaryTableHolder(ContextPtr context, const Creator & creator, const ASTPtr & query = {}); /// Creates temporary table with Engine=Memory diff --git a/src/Interpreters/InterpreterCreateQuery.cpp b/src/Interpreters/InterpreterCreateQuery.cpp index 167134bd9ba..d89fcfbc7cf 100644 --- a/src/Interpreters/InterpreterCreateQuery.cpp +++ b/src/Interpreters/InterpreterCreateQuery.cpp @@ -1256,14 +1256,7 @@ bool InterpreterCreateQuery::doCreateTable(ASTCreateQuery & create, if (create.temporary) { - /* - UUID id; - if (create.uuid == UUIDHelpers::Nil) - create.uuid = UUIDHelpers::generateV4(); - id = create.uuid; - create.setTable("_tmp_" + toString(id)); - */ - // create.setDatabase(DatabaseCatalog::TEMPORARY_DATABASE); + create.setDatabase(DatabaseCatalog::TEMPORARY_DATABASE); } if (!ddl_guard) @@ -1372,13 +1365,34 @@ bool InterpreterCreateQuery::doCreateTable(ASTCreateQuery & create, } else { - res = StorageFactory::instance().get(create, - data_path, - getContext(), - getContext()->getGlobalContext(), - properties.columns, - properties.constraints, - false); + if (create.temporary) + { + String temporary_table_name = create.getTable(); + auto creator = [&](const StorageID &) + { + return StorageFactory::instance().get(create, + data_path, + getContext(), + getContext()->getGlobalContext(), + properties.columns, + properties.constraints, + false); + }; + auto temporary_table = TemporaryTableHolder(getContext(), creator, query_ptr); + + getContext()->getSessionContext()->addExternalTable(temporary_table_name, std::move(temporary_table)); + return true; + } + else + { + res = StorageFactory::instance().get(create, + data_path, + getContext(), + getContext()->getGlobalContext(), + properties.columns, + properties.constraints, + false); + } /// If schema wes inferred while storage creation, add columns description to create query. addColumnsDescriptionToCreateQueryIfNecessary(query_ptr->as(), res); @@ -1397,22 +1411,6 @@ bool InterpreterCreateQuery::doCreateTable(ASTCreateQuery & create, "ATTACH ... FROM ... query is not supported for {} table engine, " "because such tables do not store any data on disk. Use CREATE instead.", res->getName()); - if (create.temporary) - { - // if (create.if_not_exists && getContext()->tryResolveStorageID({"", create.getTable()}, Context::ResolveExternal)) - // return false; - - String temporary_table_name = create.getTable(); - auto creator = [&](const StorageID &) - { - return std::move(res); - }; - auto temporary_table = TemporaryTableHolder(getContext(), creator, query_ptr); - // auto temporary_table = TemporaryTableHolder(getContext(), properties.columns, properties.constraints, query_ptr); - getContext()->getSessionContext()->addExternalTable(temporary_table_name, std::move(temporary_table)); - return true; - } - database->createTable(getContext(), create.getTable(), res, query_ptr); /// Move table data to the proper place. Wo do not move data earlier to avoid situations From 9600d16e9f9983c8df4c79b985a97e389a832ace Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Fri, 20 Jan 2023 10:09:26 +0000 Subject: [PATCH 037/841] better tests for custom_key --- .../02404_memory_bound_merging.sql | 2 +- ...max_parallel_replicas_custom_key.reference | 13 - ...02527_max_parallel_replicas_custom_key.sql | 36 - ...max_parallel_replicas_custom_key.reference | 659 ++++++++++++++++++ .../02535_max_parallel_replicas_custom_key.sh | 47 ++ 5 files changed, 707 insertions(+), 50 deletions(-) delete mode 100644 tests/queries/0_stateless/02527_max_parallel_replicas_custom_key.reference delete mode 100644 tests/queries/0_stateless/02527_max_parallel_replicas_custom_key.sql create mode 100644 tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.reference create mode 100755 tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.sh diff --git a/tests/queries/0_stateless/02404_memory_bound_merging.sql b/tests/queries/0_stateless/02404_memory_bound_merging.sql index fb0c65e6a7c..f7db31dabb3 100644 --- a/tests/queries/0_stateless/02404_memory_bound_merging.sql +++ b/tests/queries/0_stateless/02404_memory_bound_merging.sql @@ -1,4 +1,4 @@ --- Tags: no-parallel +-- Tags: no-parallel, long create table t(a UInt64, b UInt64) engine=MergeTree order by a; system stop merges t; diff --git a/tests/queries/0_stateless/02527_max_parallel_replicas_custom_key.reference b/tests/queries/0_stateless/02527_max_parallel_replicas_custom_key.reference deleted file mode 100644 index c51a7e10fb2..00000000000 --- a/tests/queries/0_stateless/02527_max_parallel_replicas_custom_key.reference +++ /dev/null @@ -1,13 +0,0 @@ -Hello -1000 -1000 -1000 -1000 -1000 -1000 -1000 -1000 -1000 -1000 -1000 -1000 diff --git a/tests/queries/0_stateless/02527_max_parallel_replicas_custom_key.sql b/tests/queries/0_stateless/02527_max_parallel_replicas_custom_key.sql deleted file mode 100644 index b716600b9d5..00000000000 --- a/tests/queries/0_stateless/02527_max_parallel_replicas_custom_key.sql +++ /dev/null @@ -1,36 +0,0 @@ --- Tags: replica - -DROP TABLE IF EXISTS t; - -CREATE TABLE t (x String) ENGINE = MergeTree ORDER BY x; -INSERT INTO t VALUES ('Hello'); - -SET max_parallel_replicas = 3; -SET parallel_replicas_mode = 'custom_key'; - -SELECT * FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'sipHash64(x)'; - -DROP TABLE t; - -CREATE TABLE t (x String, y Int32) ENGINE = MergeTree ORDER BY cityHash64(x) SAMPLE BY cityHash64(x); -INSERT INTO t SELECT toString(number), number FROM numbers(1000); - -SET max_parallel_replicas = 1; -SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'y'; -SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x) + y'; -SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x)'; -SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x) + 1'; - -SET max_parallel_replicas = 2; -SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'y'; -SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x) + y'; -SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x)'; -SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x) + 1'; - -SET max_parallel_replicas = 3; -SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'y'; -SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x) + y'; -SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x)'; -SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x) + 1'; - -DROP TABLE t; diff --git a/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.reference b/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.reference new file mode 100644 index 00000000000..01f48778b34 --- /dev/null +++ b/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.reference @@ -0,0 +1,659 @@ +query='SELECT * FROM cluster(test_cluster_one_shard_three_replicas_localhost, currentDatabase(), 02535_custom_key)' with custom_key='sipHash64(x)' +filter_type='default' max_replicas=1 prefer_localhost_replica=0 +Hello +(ReadFromRemote) +filter_type='default' max_replicas=2 prefer_localhost_replica=0 +Hello +(ReadFromRemote) +filter_type='default' max_replicas=3 prefer_localhost_replica=0 +Hello +(ReadFromRemote) +filter_type='range' max_replicas=1 prefer_localhost_replica=0 +Hello +(ReadFromRemote) +filter_type='range' max_replicas=2 prefer_localhost_replica=0 +Hello +(ReadFromRemote) +filter_type='range' max_replicas=3 prefer_localhost_replica=0 +Hello +(ReadFromRemote) +filter_type='default' max_replicas=1 prefer_localhost_replica=1 +Hello +(Expression) +ExpressionTransform + (ReadFromMergeTree) + MergeTreeInOrder 0 → 1 +filter_type='default' max_replicas=2 prefer_localhost_replica=1 +Hello +(Union) + (Expression) + ExpressionTransform + (Filter) + FilterTransform + (ReadFromMergeTree) + MergeTreeInOrder 0 → 1 + (ReadFromRemote) +filter_type='default' max_replicas=3 prefer_localhost_replica=1 +Hello +(Union) + (Expression) + ExpressionTransform + (Filter) + FilterTransform + (ReadFromMergeTree) + MergeTreeInOrder 0 → 1 + (ReadFromRemote) +filter_type='range' max_replicas=1 prefer_localhost_replica=1 +Hello +(Expression) +ExpressionTransform + (ReadFromMergeTree) + MergeTreeInOrder 0 → 1 +filter_type='range' max_replicas=2 prefer_localhost_replica=1 +Hello +(Union) + (Expression) + ExpressionTransform + (Filter) + FilterTransform + (ReadFromMergeTree) + MergeTreeInOrder 0 → 1 + (ReadFromRemote) +filter_type='range' max_replicas=3 prefer_localhost_replica=1 +Hello +(Union) + (Expression) + ExpressionTransform + (Filter) + FilterTransform + (ReadFromMergeTree) + MergeTreeInOrder 0 → 1 + (ReadFromRemote) +query='SELECT count() FROM cluster(test_cluster_one_shard_three_replicas_localhost, currentDatabase(), 02535_custom_key)' with custom_key='cityHash64(x)' +filter_type='default' max_replicas=1 prefer_localhost_replica=0 +1000 +(ReadFromRemote) +filter_type='default' max_replicas=2 prefer_localhost_replica=0 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 2 → 1 + (ReadFromRemote) +filter_type='default' max_replicas=3 prefer_localhost_replica=0 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 3 → 1 + (ReadFromRemote) +filter_type='range' max_replicas=1 prefer_localhost_replica=0 +1000 +(ReadFromRemote) +filter_type='range' max_replicas=2 prefer_localhost_replica=0 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 2 → 1 + (ReadFromRemote) +filter_type='range' max_replicas=3 prefer_localhost_replica=0 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 3 → 1 + (ReadFromRemote) +filter_type='default' max_replicas=1 prefer_localhost_replica=1 +1000 +(Expression) +ExpressionTransform + (ReadFromStorage) + AggregatingTransform + ExpressionTransform + SourceFromSingleChunk 0 → 1 +filter_type='default' max_replicas=2 prefer_localhost_replica=1 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 2 → 1 + (Union) + (Aggregating) + AggregatingTransform + (Expression) + ExpressionTransform + (Filter) + FilterTransform + (ReadFromMergeTree) + MergeTreeInOrder 0 → 1 + (ReadFromRemote) +filter_type='default' max_replicas=3 prefer_localhost_replica=1 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 3 → 1 + (Union) + (Aggregating) + AggregatingTransform + (Expression) + ExpressionTransform + (Filter) + FilterTransform + (ReadFromMergeTree) + MergeTreeInOrder 0 → 1 + (ReadFromRemote) +filter_type='range' max_replicas=1 prefer_localhost_replica=1 +1000 +(Expression) +ExpressionTransform + (ReadFromStorage) + AggregatingTransform + ExpressionTransform + SourceFromSingleChunk 0 → 1 +filter_type='range' max_replicas=2 prefer_localhost_replica=1 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 2 → 1 + (Union) + (Aggregating) + AggregatingTransform + (Expression) + ExpressionTransform + (Filter) + FilterTransform + (ReadFromMergeTree) + MergeTreeInOrder 0 → 1 + (ReadFromRemote) +filter_type='range' max_replicas=3 prefer_localhost_replica=1 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 3 → 1 + (Union) + (Aggregating) + AggregatingTransform + (Expression) + ExpressionTransform + (Filter) + FilterTransform + (ReadFromMergeTree) + MergeTreeInOrder 0 → 1 + (ReadFromRemote) +query='SELECT count() FROM cluster(test_cluster_one_shard_three_replicas_localhost, currentDatabase(), 02535_custom_key)' with custom_key='y' +filter_type='default' max_replicas=1 prefer_localhost_replica=0 +1000 +(ReadFromRemote) +filter_type='default' max_replicas=2 prefer_localhost_replica=0 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 2 → 1 + (ReadFromRemote) +filter_type='default' max_replicas=3 prefer_localhost_replica=0 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 3 → 1 + (ReadFromRemote) +filter_type='range' max_replicas=1 prefer_localhost_replica=0 +1000 +(ReadFromRemote) +filter_type='range' max_replicas=2 prefer_localhost_replica=0 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 2 → 1 + (ReadFromRemote) +filter_type='range' max_replicas=3 prefer_localhost_replica=0 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 3 → 1 + (ReadFromRemote) +filter_type='default' max_replicas=1 prefer_localhost_replica=1 +1000 +(Expression) +ExpressionTransform + (ReadFromStorage) + AggregatingTransform + ExpressionTransform + SourceFromSingleChunk 0 → 1 +filter_type='default' max_replicas=2 prefer_localhost_replica=1 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 2 → 1 + (Union) + (Aggregating) + AggregatingTransform + (Expression) + ExpressionTransform + (Filter) + FilterTransform + (ReadFromMergeTree) + MergeTreeInOrder 0 → 1 + (ReadFromRemote) +filter_type='default' max_replicas=3 prefer_localhost_replica=1 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 3 → 1 + (Union) + (Aggregating) + AggregatingTransform + (Expression) + ExpressionTransform + (Filter) + FilterTransform + (ReadFromMergeTree) + MergeTreeInOrder 0 → 1 + (ReadFromRemote) +filter_type='range' max_replicas=1 prefer_localhost_replica=1 +1000 +(Expression) +ExpressionTransform + (ReadFromStorage) + AggregatingTransform + ExpressionTransform + SourceFromSingleChunk 0 → 1 +filter_type='range' max_replicas=2 prefer_localhost_replica=1 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 2 → 1 + (Union) + (Aggregating) + AggregatingTransform + (Expression) + ExpressionTransform + (Filter) + FilterTransform + (ReadFromMergeTree) + MergeTreeInOrder 0 → 1 + (ReadFromRemote) +filter_type='range' max_replicas=3 prefer_localhost_replica=1 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 3 → 1 + (Union) + (Aggregating) + AggregatingTransform + (Expression) + ExpressionTransform + (Filter) + FilterTransform + (ReadFromMergeTree) + MergeTreeInOrder 0 → 1 + (ReadFromRemote) +query='SELECT count() FROM cluster(test_cluster_one_shard_three_replicas_localhost, currentDatabase(), 02535_custom_key)' with custom_key='cityHash64(x) + y' +filter_type='default' max_replicas=1 prefer_localhost_replica=0 +1000 +(ReadFromRemote) +filter_type='default' max_replicas=2 prefer_localhost_replica=0 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 2 → 1 + (ReadFromRemote) +filter_type='default' max_replicas=3 prefer_localhost_replica=0 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 3 → 1 + (ReadFromRemote) +filter_type='range' max_replicas=1 prefer_localhost_replica=0 +1000 +(ReadFromRemote) +filter_type='range' max_replicas=2 prefer_localhost_replica=0 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 2 → 1 + (ReadFromRemote) +filter_type='range' max_replicas=3 prefer_localhost_replica=0 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 3 → 1 + (ReadFromRemote) +filter_type='default' max_replicas=1 prefer_localhost_replica=1 +1000 +(Expression) +ExpressionTransform + (ReadFromStorage) + AggregatingTransform + ExpressionTransform + SourceFromSingleChunk 0 → 1 +filter_type='default' max_replicas=2 prefer_localhost_replica=1 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 2 → 1 + (Union) + (Aggregating) + AggregatingTransform + (Expression) + ExpressionTransform + (Filter) + FilterTransform + (ReadFromMergeTree) + MergeTreeInOrder 0 → 1 + (ReadFromRemote) +filter_type='default' max_replicas=3 prefer_localhost_replica=1 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 3 → 1 + (Union) + (Aggregating) + AggregatingTransform + (Expression) + ExpressionTransform + (Filter) + FilterTransform + (ReadFromMergeTree) + MergeTreeInOrder 0 → 1 + (ReadFromRemote) +filter_type='range' max_replicas=1 prefer_localhost_replica=1 +1000 +(Expression) +ExpressionTransform + (ReadFromStorage) + AggregatingTransform + ExpressionTransform + SourceFromSingleChunk 0 → 1 +filter_type='range' max_replicas=2 prefer_localhost_replica=1 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 2 → 1 + (Union) + (Aggregating) + AggregatingTransform + (Expression) + ExpressionTransform + (Filter) + FilterTransform + (ReadFromMergeTree) + MergeTreeInOrder 0 → 1 + (ReadFromRemote) +filter_type='range' max_replicas=3 prefer_localhost_replica=1 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 3 → 1 + (Union) + (Aggregating) + AggregatingTransform + (Expression) + ExpressionTransform + (Filter) + FilterTransform + (ReadFromMergeTree) + MergeTreeInOrder 0 → 1 + (ReadFromRemote) +query='SELECT count() FROM cluster(test_cluster_one_shard_three_replicas_localhost, currentDatabase(), 02535_custom_key)' with custom_key='cityHash64(x) + 1' +filter_type='default' max_replicas=1 prefer_localhost_replica=0 +1000 +(ReadFromRemote) +filter_type='default' max_replicas=2 prefer_localhost_replica=0 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 2 → 1 + (ReadFromRemote) +filter_type='default' max_replicas=3 prefer_localhost_replica=0 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 3 → 1 + (ReadFromRemote) +filter_type='range' max_replicas=1 prefer_localhost_replica=0 +1000 +(ReadFromRemote) +filter_type='range' max_replicas=2 prefer_localhost_replica=0 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 2 → 1 + (ReadFromRemote) +filter_type='range' max_replicas=3 prefer_localhost_replica=0 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 3 → 1 + (ReadFromRemote) +filter_type='default' max_replicas=1 prefer_localhost_replica=1 +1000 +(Expression) +ExpressionTransform + (ReadFromStorage) + AggregatingTransform + ExpressionTransform + SourceFromSingleChunk 0 → 1 +filter_type='default' max_replicas=2 prefer_localhost_replica=1 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 2 → 1 + (Union) + (Aggregating) + AggregatingTransform + (Expression) + ExpressionTransform + (Filter) + FilterTransform + (ReadFromMergeTree) + MergeTreeInOrder 0 → 1 + (ReadFromRemote) +filter_type='default' max_replicas=3 prefer_localhost_replica=1 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 3 → 1 + (Union) + (Aggregating) + AggregatingTransform + (Expression) + ExpressionTransform + (Filter) + FilterTransform + (ReadFromMergeTree) + MergeTreeInOrder 0 → 1 + (ReadFromRemote) +filter_type='range' max_replicas=1 prefer_localhost_replica=1 +1000 +(Expression) +ExpressionTransform + (ReadFromStorage) + AggregatingTransform + ExpressionTransform + SourceFromSingleChunk 0 → 1 +filter_type='range' max_replicas=2 prefer_localhost_replica=1 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 2 → 1 + (Union) + (Aggregating) + AggregatingTransform + (Expression) + ExpressionTransform + (Filter) + FilterTransform + (ReadFromMergeTree) + MergeTreeInOrder 0 → 1 + (ReadFromRemote) +filter_type='range' max_replicas=3 prefer_localhost_replica=1 +1000 +(Expression) +ExpressionTransform × 4 + (MergingAggregated) + Resize 1 → 4 + SortingAggregatedTransform 4 → 1 + MergingAggregatedBucketTransform × 4 + Resize 1 → 4 + GroupingAggregatedTransform 3 → 1 + (Union) + (Aggregating) + AggregatingTransform + (Expression) + ExpressionTransform + (Filter) + FilterTransform + (ReadFromMergeTree) + MergeTreeInOrder 0 → 1 + (ReadFromRemote) diff --git a/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.sh b/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.sh new file mode 100755 index 00000000000..76138842e9a --- /dev/null +++ b/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +# shellcheck source=../shell_config.sh +. "$CURDIR"/../shell_config.sh + +function run_with_custom_key { + echo "query='$1' with custom_key='$2'" + for prefer_localhost_replica in 0 1; do + for filter_type in 'default' 'range'; do + for max_replicas in {1..3}; do + echo "filter_type='$filter_type' max_replicas=$max_replicas prefer_localhost_replica=$prefer_localhost_replica" + query="$1 SETTINGS max_parallel_replicas=$max_replicas\ + , parallel_replicas_mode='custom_key'\ + , parallel_replicas_custom_key='$2'\ + , parallel_replicas_custom_key_filter_type='$filter_type'\ + , max_threads=4\ + , prefer_localhost_replica=$prefer_localhost_replica" + $CLICKHOUSE_CLIENT --query="$query" + $CLICKHOUSE_CLIENT --query="EXPLAIN PIPELINE $query" + done + done + done +} + +$CLICKHOUSE_CLIENT --query="DROP TABLE IF EXISTS 02535_custom_key"; + +$CLICKHOUSE_CLIENT --query="CREATE TABLE 02535_custom_key (x String) ENGINE = MergeTree ORDER BY x"; +$CLICKHOUSE_CLIENT --query="INSERT INTO 02535_custom_key VALUES ('Hello')"; + +run_with_custom_key "SELECT * FROM cluster(test_cluster_one_shard_three_replicas_localhost, currentDatabase(), 02535_custom_key)" "sipHash64(x)" + +$CLICKHOUSE_CLIENT --query="DROP TABLE 02535_custom_key" + +$CLICKHOUSE_CLIENT --query="CREATE TABLE 02535_custom_key (x String, y Int32) ENGINE = MergeTree ORDER BY cityHash64(x)" +$CLICKHOUSE_CLIENT --query="INSERT INTO 02535_custom_key SELECT toString(number), number FROM numbers(1000)" + +function run_count_with_custom_key { + run_with_custom_key "SELECT count() FROM cluster(test_cluster_one_shard_three_replicas_localhost, currentDatabase(), 02535_custom_key)" "$1" +} + +run_count_with_custom_key "cityHash64(x)" +run_count_with_custom_key "y" +run_count_with_custom_key "cityHash64(x) + y" +run_count_with_custom_key "cityHash64(x) + 1" + +$CLICKHOUSE_CLIENT --query="DROP TABLE 02535_custom_key" From 2cb106f1f9f5e893431e776c66c0b26c689a560a Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Fri, 20 Jan 2023 12:55:26 +0000 Subject: [PATCH 038/841] Add integration test for custom_key --- .../__init__.py | 0 .../configs/remote_servers.xml | 50 ++++++++++ .../test_parallel_replicas_custom_key/test.py | 94 +++++++++++++++++++ 3 files changed, 144 insertions(+) create mode 100644 tests/integration/test_parallel_replicas_custom_key/__init__.py create mode 100644 tests/integration/test_parallel_replicas_custom_key/configs/remote_servers.xml create mode 100644 tests/integration/test_parallel_replicas_custom_key/test.py diff --git a/tests/integration/test_parallel_replicas_custom_key/__init__.py b/tests/integration/test_parallel_replicas_custom_key/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/integration/test_parallel_replicas_custom_key/configs/remote_servers.xml b/tests/integration/test_parallel_replicas_custom_key/configs/remote_servers.xml new file mode 100644 index 00000000000..308db461498 --- /dev/null +++ b/tests/integration/test_parallel_replicas_custom_key/configs/remote_servers.xml @@ -0,0 +1,50 @@ + + + + + false + + n1 + 9000 + + + n2 + 9000 + + + + false + + n3 + 9000 + + + n4 + 9000 + + + + + + false + + n1 + 9000 + + + n2 + 9000 + + + n3 + 9000 + + + n4 + 9000 + + + + + + diff --git a/tests/integration/test_parallel_replicas_custom_key/test.py b/tests/integration/test_parallel_replicas_custom_key/test.py new file mode 100644 index 00000000000..0787234a7b1 --- /dev/null +++ b/tests/integration/test_parallel_replicas_custom_key/test.py @@ -0,0 +1,94 @@ +import pytest +from helpers.cluster import ClickHouseCluster + +cluster = ClickHouseCluster(__file__) + +n1 = cluster.add_instance( + "n1", main_configs=["configs/remote_servers.xml"], with_zookeeper=True +) +n2 = cluster.add_instance( + "n2", main_configs=["configs/remote_servers.xml"], with_zookeeper=True +) +n3 = cluster.add_instance( + "n3", main_configs=["configs/remote_servers.xml"], with_zookeeper=True +) +n4 = cluster.add_instance( + "n4", main_configs=["configs/remote_servers.xml"], with_zookeeper=True +) +nodes = [n1, n2, n3, n4] + + +@pytest.fixture(scope="module", autouse=True) +def start_cluster(): + try: + cluster.start() + yield cluster + finally: + cluster.shutdown() + + +def create_tables(cluster): + n1.query("DROP TABLE IF EXISTS dist_table") + n1.query(f"DROP TABLE IF EXISTS test_table ON CLUSTER {cluster}") + + n1.query( + f"CREATE TABLE test_table ON CLUSTER {cluster} (key Int32, value String) Engine=MergeTree ORDER BY (key, sipHash64(value))" + ) + n1.query( + f""" + CREATE TABLE dist_table AS test_table + Engine=Distributed( + {cluster}, + currentDatabase(), + test_table, + rand() + ) + """ + ) + + +def insert_data(cluster, row_num): + create_tables(cluster) + n1.query(f"INSERT INTO dist_table SELECT number, number FROM numbers({row_num})") + n1.query("SYSTEM FLUSH DISTRIBUTED dist_table") + + +@pytest.mark.parametrize("custom_key", ["sipHash64(value)", "key"]) +@pytest.mark.parametrize("filter_type", ["default", "range"]) +@pytest.mark.parametrize( + "cluster", + ["test_multiple_shards_multiple_replicas", "test_single_shard_multiple_replicas"], +) +def test_parallel_replicas_custom_key(start_cluster, cluster, custom_key, filter_type): + for node in nodes: + node.rotate_logs() + + row_num = 1000 + insert_data(cluster, row_num) + assert ( + int( + n1.query( + "SELECT count() FROM dist_table", + settings={ + "prefer_localhost_replica": 0, + "max_parallel_replicas": 3, + "parallel_replicas_mode": "custom_key", + "parallel_replicas_custom_key": custom_key, + "parallel_replicas_custom_key_filter_type": filter_type, + }, + ) + ) + == row_num + ) + + if cluster == "test_multiple_shards_multiple_replicas": + # we simply process query on all replicas for each shard by appending the filter on replica + assert all( + node.contains_in_log("Processing query on a replica using custom_key") + for node in nodes + ) + else: + # we first transform all replicas into shards and then append for each shard filter + assert n1.contains_in_log( + "Single shard cluster used with custom_key, transforming replicas into virtual shards" + ) From ec149c4585c5a7655a275126be59b1694aeafd22 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Fri, 20 Jan 2023 12:56:20 +0000 Subject: [PATCH 039/841] Remove old test --- ...rallel_replicas_custom_key_range.reference | 13 ------- ...max_parallel_replicas_custom_key_range.sql | 37 ------------------- 2 files changed, 50 deletions(-) delete mode 100644 tests/queries/0_stateless/02528_max_parallel_replicas_custom_key_range.reference delete mode 100644 tests/queries/0_stateless/02528_max_parallel_replicas_custom_key_range.sql diff --git a/tests/queries/0_stateless/02528_max_parallel_replicas_custom_key_range.reference b/tests/queries/0_stateless/02528_max_parallel_replicas_custom_key_range.reference deleted file mode 100644 index c51a7e10fb2..00000000000 --- a/tests/queries/0_stateless/02528_max_parallel_replicas_custom_key_range.reference +++ /dev/null @@ -1,13 +0,0 @@ -Hello -1000 -1000 -1000 -1000 -1000 -1000 -1000 -1000 -1000 -1000 -1000 -1000 diff --git a/tests/queries/0_stateless/02528_max_parallel_replicas_custom_key_range.sql b/tests/queries/0_stateless/02528_max_parallel_replicas_custom_key_range.sql deleted file mode 100644 index a8ef9e58d40..00000000000 --- a/tests/queries/0_stateless/02528_max_parallel_replicas_custom_key_range.sql +++ /dev/null @@ -1,37 +0,0 @@ --- Tags: replica - -DROP TABLE IF EXISTS t; - -CREATE TABLE t (x String) ENGINE = MergeTree ORDER BY x; -INSERT INTO t VALUES ('Hello'); - -SET max_parallel_replicas = 3; -SET parallel_replicas_mode = 'custom_key'; -SET parallel_replicas_custom_key_filter_type = 'range'; - -SELECT * FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'sipHash64(x)'; - -DROP TABLE t; - -CREATE TABLE t (x String, y UInt32) ENGINE = MergeTree ORDER BY cityHash64(x) SAMPLE BY cityHash64(x); -INSERT INTO t SELECT toString(number), number FROM numbers(1000); - -SET max_parallel_replicas = 1; -SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'y'; -SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x) + y'; -SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x)'; -SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x) + 1'; - -SET max_parallel_replicas = 2; -SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'y'; -SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x) + y'; -SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x)'; -SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x) + 1'; - -SET max_parallel_replicas = 3; -SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'y'; -SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x) + y'; -SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x)'; -SELECT count() FROM remote('127.0.0.{2|3|4}', currentDatabase(), t) SETTINGS parallel_replicas_custom_key = 'cityHash64(x) + 1'; - -DROP TABLE t; From fa642032258b1d2c3175124b2847bcfde281271d Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Fri, 20 Jan 2023 16:11:37 +0000 Subject: [PATCH 040/841] Add correct data path for temporary tables; Clean temp DB dir on server startup --- src/Databases/DatabaseMemory.cpp | 4 ++-- src/Interpreters/DatabaseCatalog.cpp | 5 +++++ src/Interpreters/InterpreterCreateQuery.cpp | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/Databases/DatabaseMemory.cpp b/src/Databases/DatabaseMemory.cpp index 39295bf499a..ac9a56567d1 100644 --- a/src/Databases/DatabaseMemory.cpp +++ b/src/Databases/DatabaseMemory.cpp @@ -70,7 +70,7 @@ void DatabaseMemory::dropTable( if (table->storesDataOnDisk()) { - assert(getDatabaseName() != DatabaseCatalog::TEMPORARY_DATABASE); + // assert(getDatabaseName() != DatabaseCatalog::TEMPORARY_DATABASE); fs::path table_data_dir{getTableDataPath(table_name)}; if (fs::exists(table_data_dir)) fs::remove_all(table_data_dir); @@ -79,7 +79,7 @@ void DatabaseMemory::dropTable( catch (...) { std::lock_guard lock{mutex}; - assert(database_name != DatabaseCatalog::TEMPORARY_DATABASE); + // assert(database_name != DatabaseCatalog::TEMPORARY_DATABASE); attachTableUnlocked(table_name, table); throw; } diff --git a/src/Interpreters/DatabaseCatalog.cpp b/src/Interpreters/DatabaseCatalog.cpp index 6ac01a9473f..8bfda0b210d 100644 --- a/src/Interpreters/DatabaseCatalog.cpp +++ b/src/Interpreters/DatabaseCatalog.cpp @@ -149,6 +149,11 @@ void DatabaseCatalog::initializeAndLoadTemporaryDatabase() unused_dir_cleanup_period_sec = getContext()->getConfigRef().getInt64("database_catalog_unused_dir_cleanup_period_sec", unused_dir_cleanup_period_sec); auto db_for_temporary_and_external_tables = std::make_shared(TEMPORARY_DATABASE, getContext()); + + /// Temporary database should not have any data on the moment of its creation + /// In case of sudden server shutdown remove database folder of temporary database + db_for_temporary_and_external_tables->drop(getContext()); + attachDatabase(TEMPORARY_DATABASE, db_for_temporary_and_external_tables); } diff --git a/src/Interpreters/InterpreterCreateQuery.cpp b/src/Interpreters/InterpreterCreateQuery.cpp index d89fcfbc7cf..4a3ccfe18a2 100644 --- a/src/Interpreters/InterpreterCreateQuery.cpp +++ b/src/Interpreters/InterpreterCreateQuery.cpp @@ -1368,10 +1368,10 @@ bool InterpreterCreateQuery::doCreateTable(ASTCreateQuery & create, if (create.temporary) { String temporary_table_name = create.getTable(); - auto creator = [&](const StorageID &) + auto creator = [&](const StorageID & table_id) { return StorageFactory::instance().get(create, - data_path, + database->getTableDataPath(table_id.getTableName()), getContext(), getContext()->getGlobalContext(), properties.columns, From 7bfaf88666a28d76d47a5ba4e3bd2b2925ce90fb Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Fri, 20 Jan 2023 16:35:14 +0000 Subject: [PATCH 041/841] Fix stateless tests --- .../0_stateless/00124_shard_distributed_with_many_replicas.sql | 1 + .../01034_prewhere_max_parallel_replicas_distributed.sql | 3 +++ tests/queries/0_stateless/01034_sample_final_distributed.sql | 3 +++ .../0_stateless/01099_parallel_distributed_insert_select.sql | 1 + tests/queries/0_stateless/01517_select_final_distributed.sql | 2 ++ .../0_stateless/01557_max_parallel_replicas_no_sample.sql | 1 + .../0_stateless/02535_max_parallel_replicas_custom_key.sh | 1 + 7 files changed, 12 insertions(+) diff --git a/tests/queries/0_stateless/00124_shard_distributed_with_many_replicas.sql b/tests/queries/0_stateless/00124_shard_distributed_with_many_replicas.sql index ab4c433ba47..795551e5dfa 100644 --- a/tests/queries/0_stateless/00124_shard_distributed_with_many_replicas.sql +++ b/tests/queries/0_stateless/00124_shard_distributed_with_many_replicas.sql @@ -1,6 +1,7 @@ -- Tags: replica, distributed SET max_parallel_replicas = 2; +SET parallel_replicas_mode = 'sample_key'; DROP TABLE IF EXISTS report; set allow_deprecated_syntax_for_merge_tree=1; diff --git a/tests/queries/0_stateless/01034_prewhere_max_parallel_replicas_distributed.sql b/tests/queries/0_stateless/01034_prewhere_max_parallel_replicas_distributed.sql index b26c9af14a9..96d52d7e60e 100644 --- a/tests/queries/0_stateless/01034_prewhere_max_parallel_replicas_distributed.sql +++ b/tests/queries/0_stateless/01034_prewhere_max_parallel_replicas_distributed.sql @@ -9,6 +9,9 @@ CREATE TABLE test_max_parallel_replicas_lr (timestamp UInt64) ENGINE = MergeTree INSERT INTO test_max_parallel_replicas_lr select number as timestamp from system.numbers limit 100; SET max_parallel_replicas = 2; +SET parallel_replicas_mode = 'sample_key'; +SET allow_experimental_parallel_reading_from_replicas = 0; + select count() FROM remote('127.0.0.{2|3}', currentDatabase(), test_max_parallel_replicas_lr) PREWHERE timestamp > 0; drop table test_max_parallel_replicas_lr; diff --git a/tests/queries/0_stateless/01034_sample_final_distributed.sql b/tests/queries/0_stateless/01034_sample_final_distributed.sql index b784b35cbb3..1b1832f7a0d 100644 --- a/tests/queries/0_stateless/01034_sample_final_distributed.sql +++ b/tests/queries/0_stateless/01034_sample_final_distributed.sql @@ -13,7 +13,10 @@ select count() from sample_final sample 1/2; select 'count sample final'; select count() from sample_final final sample 1/2; select 'count final max_parallel_replicas'; + +set allow_experimental_parallel_reading_from_replicas = 0; set max_parallel_replicas=2; +set parallel_replicas_mode='sample_key'; select count() from remote('127.0.0.{2|3}', currentDatabase(), sample_final) final; drop table if exists sample_final; diff --git a/tests/queries/0_stateless/01099_parallel_distributed_insert_select.sql b/tests/queries/0_stateless/01099_parallel_distributed_insert_select.sql index a75a5b2c33d..aa924218360 100644 --- a/tests/queries/0_stateless/01099_parallel_distributed_insert_select.sql +++ b/tests/queries/0_stateless/01099_parallel_distributed_insert_select.sql @@ -2,6 +2,7 @@ -- set insert_distributed_sync = 1; -- see https://github.com/ClickHouse/ClickHouse/issues/18971 +SET allow_experimental_parallel_reading_from_replicas = 0; -- see https://github.com/ClickHouse/ClickHouse/issues/34525 SET prefer_localhost_replica = 1; DROP TABLE IF EXISTS local_01099_a; diff --git a/tests/queries/0_stateless/01517_select_final_distributed.sql b/tests/queries/0_stateless/01517_select_final_distributed.sql index a3d1fcfc185..701828b0b38 100644 --- a/tests/queries/0_stateless/01517_select_final_distributed.sql +++ b/tests/queries/0_stateless/01517_select_final_distributed.sql @@ -1,5 +1,7 @@ -- Tags: distributed +SET allow_experimental_parallel_reading_from_replicas = 0; + DROP TABLE IF EXISTS test5346; CREATE TABLE test5346 (`Id` String, `Timestamp` DateTime, `updated` DateTime) diff --git a/tests/queries/0_stateless/01557_max_parallel_replicas_no_sample.sql b/tests/queries/0_stateless/01557_max_parallel_replicas_no_sample.sql index 2b1a66147a4..c44c335700f 100644 --- a/tests/queries/0_stateless/01557_max_parallel_replicas_no_sample.sql +++ b/tests/queries/0_stateless/01557_max_parallel_replicas_no_sample.sql @@ -4,6 +4,7 @@ DROP TABLE IF EXISTS t; CREATE TABLE t (x String) ENGINE = MergeTree ORDER BY x; INSERT INTO t VALUES ('Hello'); +SET parallel_replicas_mode = 'sample_key'; SET max_parallel_replicas = 3; SELECT * FROM remote('127.0.0.{2|3|4}', currentDatabase(), t); diff --git a/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.sh b/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.sh index 76138842e9a..e97643bd366 100755 --- a/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.sh +++ b/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# Tags: no-parallel, long CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh From fd9b735505ce7bcd090e5a6edada8314c4ea05b1 Mon Sep 17 00:00:00 2001 From: avogar Date: Fri, 20 Jan 2023 20:22:03 +0000 Subject: [PATCH 042/841] Merge with master, add some fixes --- docker/test/stress/run.sh | 2 +- docker/test/upgrade/run.sh | 62 +++++++++++++++++++++----------------- tests/ci/ci_config.py | 12 ++++++++ 3 files changed, 47 insertions(+), 29 deletions(-) diff --git a/docker/test/stress/run.sh b/docker/test/stress/run.sh index 01da3e014e2..5fc0705412f 100644 --- a/docker/test/stress/run.sh +++ b/docker/test/stress/run.sh @@ -362,7 +362,7 @@ rg -Fa " received signal " /test_output/gdb.log > /dev/null \ for table in query_log trace_log do - clickhouse-local --path /var/lib/clickhouse/ --only-system-tables -q "select * from system.$table format TSVWithNamesAndTypes" | pigz > /test_output/$table.tsv.gz ||: + clickhouse-local --path /var/lib/clickhouse/ --only-system-tables -q "select * from system.$table format TSVWithNamesAndTypes" | zstd --threads=0 > /test_output/$table.tsv.zst ||: done tar -chf /test_output/coordination.tar /var/lib/clickhouse/coordination ||: diff --git a/docker/test/upgrade/run.sh b/docker/test/upgrade/run.sh index c0a7f279588..9f6ead84de9 100644 --- a/docker/test/upgrade/run.sh +++ b/docker/test/upgrade/run.sh @@ -53,9 +53,11 @@ function configure() echo "1" \ > /etc/clickhouse-server/config.d/asynchronous_metrics_update_period_s.xml + local total_mem total_mem=$(awk '/MemTotal/ { print $(NF-1) }' /proc/meminfo) # KiB total_mem=$(( total_mem*1024 )) # bytes + # Set maximum memory usage as half of total memory (less chance of OOM). # # But not via max_server_memory_usage but via max_memory_usage_for_user, @@ -68,21 +70,23 @@ function configure() # max_server_memory_usage will be hard limit, and queries that should be # executed regardless memory limits will use max_memory_usage_for_user=0, # instead of relying on max_untracked_memory - local max_server_mem - max_server_mem=$((total_mem*75/100)) # 75% - echo "Setting max_server_memory_usage=$max_server_mem" + + max_server_memory_usage_to_ram_ratio=0.5 + echo "Setting max_server_memory_usage_to_ram_ratio to ${max_server_memory_usage_to_ram_ratio}" cat > /etc/clickhouse-server/config.d/max_server_memory_usage.xml < - ${max_server_mem} + ${max_server_memory_usage_to_ram_ratio} EOL + local max_users_mem - max_users_mem=$((total_mem*50/100)) # 50% - echo "Setting max_memory_usage_for_user=$max_users_mem" + max_users_mem=$((total_mem*30/100)) # 30% + echo "Setting max_memory_usage_for_user=$max_users_mem and max_memory_usage for queries to 10G" cat > /etc/clickhouse-server/users.d/max_memory_usage_for_user.xml < + 10G ${max_users_mem} @@ -100,6 +104,13 @@ EOL --> $PWD +EOL + + # Let OOM killer terminate other processes before clickhouse-server: + cat > /etc/clickhouse-server/config.d/oom_score.xml < + -1000 + EOL # Analyzer is not yet ready for testing @@ -121,18 +132,12 @@ EOL function stop() { + local max_tries="${1:-90}" local pid # Preserve the pid, since the server can hung after the PID will be deleted. pid="$(cat /var/run/clickhouse-server/clickhouse-server.pid)" - clickhouse stop $max_tries --do-not-kill && return - - if [ -n "$1" ] - then - # temporarily disable it in BC check - clickhouse stop --force - return - fi + clickhouse stop --max-tries "$max_tries" --do-not-kill && return # We failed to stop the server with SIGTERM. Maybe it hang, let's collect stacktraces. kill -TERM "$(pidof gdb)" ||: @@ -322,7 +327,8 @@ else clickhouse stop --force ) - stop 1 + # Use bigger timeout for previous version + stop 300 mv /var/log/clickhouse-server/clickhouse-server.log /var/log/clickhouse-server/clickhouse-server.stress.log # Start new server @@ -334,7 +340,7 @@ else start 500 clickhouse-client --query "SELECT 'Server successfully started', 'OK'" >> /test_output/test_results.tsv \ || (echo -e 'Server failed to start\tFAIL' >> /test_output/test_results.tsv \ - && grep -a ".*Application" /var/log/clickhouse-server/clickhouse-server.log >> /test_output/application_errors.txt) + && rg --text ".*Application" /var/log/clickhouse-server/clickhouse-server.log >> /test_output/application_errors.txt) # Remove file application_errors.txt if it's empty [ -s /test_output/application_errors.txt ] || rm /test_output/application_errors.txt @@ -357,7 +363,7 @@ else # ("This engine is deprecated and is not supported in transactions", "[Queue = DB::MergeMutateRuntimeQueue]: Code: 235. DB::Exception: Part") # FIXME https://github.com/ClickHouse/ClickHouse/issues/39174 - bad mutation does not indicate backward incompatibility echo "Check for Error messages in server log:" - zgrep -Fav -e "Code: 236. DB::Exception: Cancelled merging parts" \ + rg -Fav -e "Code: 236. DB::Exception: Cancelled merging parts" \ -e "Code: 236. DB::Exception: Cancelled mutating parts" \ -e "REPLICA_IS_ALREADY_ACTIVE" \ -e "REPLICA_ALREADY_EXISTS" \ @@ -401,21 +407,21 @@ else [ -s /test_output/upgrade_error_messages.txt ] || rm /test_output/upgrade_error_messages.txt # Sanitizer asserts - zgrep -Fa "==================" /var/log/clickhouse-server/stderr.log >> /test_output/tmp - zgrep -Fa "WARNING" /var/log/clickhouse-server/stderr.log >> /test_output/tmp - zgrep -Fav -e "ASan doesn't fully support makecontext/swapcontext functions" -e "DB::Exception" /test_output/tmp > /dev/null \ + rg -Fa "==================" /var/log/clickhouse-server/stderr.log >> /test_output/tmp + rg -Fa "WARNING" /var/log/clickhouse-server/stderr.log >> /test_output/tmp + rg -Fav -e "ASan doesn't fully support makecontext/swapcontext functions" -e "DB::Exception" /test_output/tmp > /dev/null \ && echo -e 'Sanitizer assert (in stderr.log)\tFAIL' >> /test_output/test_results.tsv \ || echo -e 'No sanitizer asserts\tOK' >> /test_output/test_results.tsv rm -f /test_output/tmp # OOM - zgrep -Fa " Application: Child process was terminated by signal 9" /var/log/clickhouse-server/clickhouse-server.*.log > /dev/null \ + rg -Fa " Application: Child process was terminated by signal 9" /var/log/clickhouse-server/clickhouse-server.*.log > /dev/null \ && echo -e 'OOM killer (or signal 9) in clickhouse-server.log\tFAIL' >> /test_output/test_results.tsv \ || echo -e 'No OOM messages in clickhouse-server.log\tOK' >> /test_output/test_results.tsv # Logical errors echo "Check for Logical errors in server log:" - zgrep -Fa -A20 "Code: 49, e.displayText() = DB::Exception:" /var/log/clickhouse-server/clickhouse-server.*.log > /test_output/logical_errors.txt \ + rg -Fa -A20 "Code: 49, e.displayText() = DB::Exception:" /var/log/clickhouse-server/clickhouse-server.*.log > /test_output/logical_errors.txt \ && echo -e 'Logical error thrown (see server logs or logical_errors.txt)\tFAIL' >> /test_output/test_results.tsv \ || echo -e 'No logical errors\tOK' >> /test_output/test_results.tsv @@ -423,13 +429,13 @@ else [ -s /test_output/logical_errors.txt ] || rm /test_output/logical_errors.txt # Crash - zgrep -Fa "########################################" /var/log/clickhouse-server/clickhouse-server.*.log > /dev/null \ + rg -Fa "########################################" /var/log/clickhouse-server/clickhouse-server.*.log > /dev/null \ && echo -e 'Killed by signal (in server logs)\tFAIL' >> /test_output/test_results.tsv \ || echo -e 'Not crashed\tOK' >> /test_output/test_results.tsv # It also checks for crash without stacktrace (printed by watchdog) echo "Check for Fatal message in server log:" - zgrep -Fa " " /var/log/clickhouse-server/clickhouse-server.*.log > /test_output/fatal_messages.txt \ + rg -Fa " " /var/log/clickhouse-server/clickhouse-server.*.log > /test_output/fatal_messages.txt \ && echo -e 'Fatal message in server logs (see bc_check_fatal_messages.txt)\tFAIL' >> /test_output/test_results.tsv \ || echo -e 'No fatal messages in server logs\tOK' >> /test_output/test_results.tsv @@ -439,7 +445,7 @@ else tar -chf /test_output/coordination.tar /var/lib/clickhouse/coordination ||: for table in query_log trace_log do - clickhouse-local --path /var/lib/clickhouse/ --only-system-tables -q "select * from system.$table format TSVWithNamesAndTypes" | pigz > /test_output/$table.backward.tsv.gz ||: + clickhouse-local --path /var/lib/clickhouse/ --only-system-tables -q "select * from system.$table format TSVWithNamesAndTypes" | zstd --threads=0 > /test_output/$table.backward.tsv.zst ||: done fi @@ -457,7 +463,7 @@ clickhouse-local --structure "test String, res String" -q "SELECT 'failure', tes [ -s /test_output/check_status.tsv ] || echo -e "success\tNo errors found" > /test_output/check_status.tsv # Core dumps -for core in core.*; do - pigz $core - mv $core.gz /test_output/ +find . -type f -maxdepth 1 -name 'core.*' | while read core; do + zstd --threads=0 $core + mv $core.zst /test_output/ done diff --git a/tests/ci/ci_config.py b/tests/ci/ci_config.py index c77acfb679f..11a9a24d8a4 100644 --- a/tests/ci/ci_config.py +++ b/tests/ci/ci_config.py @@ -263,6 +263,18 @@ CI_CONFIG = { "Stress test (debug)": { "required_build": "package_debug", }, + "Upgrade check (asan)": { + "required_build": "package_asan", + }, + "Upgrade check (tsan)": { + "required_build": "package_tsan", + }, + "Upgrade check (msan)": { + "required_build": "package_msan", + }, + "Upgrade check (debug)": { + "required_build": "package_debug", + }, "Integration tests (asan)": { "required_build": "package_asan", }, From 40f42aa0789b6e501e7e13ce391896317778a316 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Sun, 22 Jan 2023 14:15:21 +0000 Subject: [PATCH 043/841] Remove pipeline from test --- ...max_parallel_replicas_custom_key.reference | 534 ------------------ .../02535_max_parallel_replicas_custom_key.sh | 2 - 2 files changed, 536 deletions(-) diff --git a/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.reference b/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.reference index 01f48778b34..21ed26b7579 100644 --- a/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.reference +++ b/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.reference @@ -1,659 +1,125 @@ query='SELECT * FROM cluster(test_cluster_one_shard_three_replicas_localhost, currentDatabase(), 02535_custom_key)' with custom_key='sipHash64(x)' filter_type='default' max_replicas=1 prefer_localhost_replica=0 Hello -(ReadFromRemote) filter_type='default' max_replicas=2 prefer_localhost_replica=0 Hello -(ReadFromRemote) filter_type='default' max_replicas=3 prefer_localhost_replica=0 Hello -(ReadFromRemote) filter_type='range' max_replicas=1 prefer_localhost_replica=0 Hello -(ReadFromRemote) filter_type='range' max_replicas=2 prefer_localhost_replica=0 Hello -(ReadFromRemote) filter_type='range' max_replicas=3 prefer_localhost_replica=0 Hello -(ReadFromRemote) filter_type='default' max_replicas=1 prefer_localhost_replica=1 Hello -(Expression) -ExpressionTransform - (ReadFromMergeTree) - MergeTreeInOrder 0 → 1 filter_type='default' max_replicas=2 prefer_localhost_replica=1 Hello -(Union) - (Expression) - ExpressionTransform - (Filter) - FilterTransform - (ReadFromMergeTree) - MergeTreeInOrder 0 → 1 - (ReadFromRemote) filter_type='default' max_replicas=3 prefer_localhost_replica=1 Hello -(Union) - (Expression) - ExpressionTransform - (Filter) - FilterTransform - (ReadFromMergeTree) - MergeTreeInOrder 0 → 1 - (ReadFromRemote) filter_type='range' max_replicas=1 prefer_localhost_replica=1 Hello -(Expression) -ExpressionTransform - (ReadFromMergeTree) - MergeTreeInOrder 0 → 1 filter_type='range' max_replicas=2 prefer_localhost_replica=1 Hello -(Union) - (Expression) - ExpressionTransform - (Filter) - FilterTransform - (ReadFromMergeTree) - MergeTreeInOrder 0 → 1 - (ReadFromRemote) filter_type='range' max_replicas=3 prefer_localhost_replica=1 Hello -(Union) - (Expression) - ExpressionTransform - (Filter) - FilterTransform - (ReadFromMergeTree) - MergeTreeInOrder 0 → 1 - (ReadFromRemote) query='SELECT count() FROM cluster(test_cluster_one_shard_three_replicas_localhost, currentDatabase(), 02535_custom_key)' with custom_key='cityHash64(x)' filter_type='default' max_replicas=1 prefer_localhost_replica=0 1000 -(ReadFromRemote) filter_type='default' max_replicas=2 prefer_localhost_replica=0 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 2 → 1 - (ReadFromRemote) filter_type='default' max_replicas=3 prefer_localhost_replica=0 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 3 → 1 - (ReadFromRemote) filter_type='range' max_replicas=1 prefer_localhost_replica=0 1000 -(ReadFromRemote) filter_type='range' max_replicas=2 prefer_localhost_replica=0 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 2 → 1 - (ReadFromRemote) filter_type='range' max_replicas=3 prefer_localhost_replica=0 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 3 → 1 - (ReadFromRemote) filter_type='default' max_replicas=1 prefer_localhost_replica=1 1000 -(Expression) -ExpressionTransform - (ReadFromStorage) - AggregatingTransform - ExpressionTransform - SourceFromSingleChunk 0 → 1 filter_type='default' max_replicas=2 prefer_localhost_replica=1 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 2 → 1 - (Union) - (Aggregating) - AggregatingTransform - (Expression) - ExpressionTransform - (Filter) - FilterTransform - (ReadFromMergeTree) - MergeTreeInOrder 0 → 1 - (ReadFromRemote) filter_type='default' max_replicas=3 prefer_localhost_replica=1 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 3 → 1 - (Union) - (Aggregating) - AggregatingTransform - (Expression) - ExpressionTransform - (Filter) - FilterTransform - (ReadFromMergeTree) - MergeTreeInOrder 0 → 1 - (ReadFromRemote) filter_type='range' max_replicas=1 prefer_localhost_replica=1 1000 -(Expression) -ExpressionTransform - (ReadFromStorage) - AggregatingTransform - ExpressionTransform - SourceFromSingleChunk 0 → 1 filter_type='range' max_replicas=2 prefer_localhost_replica=1 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 2 → 1 - (Union) - (Aggregating) - AggregatingTransform - (Expression) - ExpressionTransform - (Filter) - FilterTransform - (ReadFromMergeTree) - MergeTreeInOrder 0 → 1 - (ReadFromRemote) filter_type='range' max_replicas=3 prefer_localhost_replica=1 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 3 → 1 - (Union) - (Aggregating) - AggregatingTransform - (Expression) - ExpressionTransform - (Filter) - FilterTransform - (ReadFromMergeTree) - MergeTreeInOrder 0 → 1 - (ReadFromRemote) query='SELECT count() FROM cluster(test_cluster_one_shard_three_replicas_localhost, currentDatabase(), 02535_custom_key)' with custom_key='y' filter_type='default' max_replicas=1 prefer_localhost_replica=0 1000 -(ReadFromRemote) filter_type='default' max_replicas=2 prefer_localhost_replica=0 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 2 → 1 - (ReadFromRemote) filter_type='default' max_replicas=3 prefer_localhost_replica=0 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 3 → 1 - (ReadFromRemote) filter_type='range' max_replicas=1 prefer_localhost_replica=0 1000 -(ReadFromRemote) filter_type='range' max_replicas=2 prefer_localhost_replica=0 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 2 → 1 - (ReadFromRemote) filter_type='range' max_replicas=3 prefer_localhost_replica=0 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 3 → 1 - (ReadFromRemote) filter_type='default' max_replicas=1 prefer_localhost_replica=1 1000 -(Expression) -ExpressionTransform - (ReadFromStorage) - AggregatingTransform - ExpressionTransform - SourceFromSingleChunk 0 → 1 filter_type='default' max_replicas=2 prefer_localhost_replica=1 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 2 → 1 - (Union) - (Aggregating) - AggregatingTransform - (Expression) - ExpressionTransform - (Filter) - FilterTransform - (ReadFromMergeTree) - MergeTreeInOrder 0 → 1 - (ReadFromRemote) filter_type='default' max_replicas=3 prefer_localhost_replica=1 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 3 → 1 - (Union) - (Aggregating) - AggregatingTransform - (Expression) - ExpressionTransform - (Filter) - FilterTransform - (ReadFromMergeTree) - MergeTreeInOrder 0 → 1 - (ReadFromRemote) filter_type='range' max_replicas=1 prefer_localhost_replica=1 1000 -(Expression) -ExpressionTransform - (ReadFromStorage) - AggregatingTransform - ExpressionTransform - SourceFromSingleChunk 0 → 1 filter_type='range' max_replicas=2 prefer_localhost_replica=1 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 2 → 1 - (Union) - (Aggregating) - AggregatingTransform - (Expression) - ExpressionTransform - (Filter) - FilterTransform - (ReadFromMergeTree) - MergeTreeInOrder 0 → 1 - (ReadFromRemote) filter_type='range' max_replicas=3 prefer_localhost_replica=1 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 3 → 1 - (Union) - (Aggregating) - AggregatingTransform - (Expression) - ExpressionTransform - (Filter) - FilterTransform - (ReadFromMergeTree) - MergeTreeInOrder 0 → 1 - (ReadFromRemote) query='SELECT count() FROM cluster(test_cluster_one_shard_three_replicas_localhost, currentDatabase(), 02535_custom_key)' with custom_key='cityHash64(x) + y' filter_type='default' max_replicas=1 prefer_localhost_replica=0 1000 -(ReadFromRemote) filter_type='default' max_replicas=2 prefer_localhost_replica=0 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 2 → 1 - (ReadFromRemote) filter_type='default' max_replicas=3 prefer_localhost_replica=0 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 3 → 1 - (ReadFromRemote) filter_type='range' max_replicas=1 prefer_localhost_replica=0 1000 -(ReadFromRemote) filter_type='range' max_replicas=2 prefer_localhost_replica=0 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 2 → 1 - (ReadFromRemote) filter_type='range' max_replicas=3 prefer_localhost_replica=0 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 3 → 1 - (ReadFromRemote) filter_type='default' max_replicas=1 prefer_localhost_replica=1 1000 -(Expression) -ExpressionTransform - (ReadFromStorage) - AggregatingTransform - ExpressionTransform - SourceFromSingleChunk 0 → 1 filter_type='default' max_replicas=2 prefer_localhost_replica=1 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 2 → 1 - (Union) - (Aggregating) - AggregatingTransform - (Expression) - ExpressionTransform - (Filter) - FilterTransform - (ReadFromMergeTree) - MergeTreeInOrder 0 → 1 - (ReadFromRemote) filter_type='default' max_replicas=3 prefer_localhost_replica=1 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 3 → 1 - (Union) - (Aggregating) - AggregatingTransform - (Expression) - ExpressionTransform - (Filter) - FilterTransform - (ReadFromMergeTree) - MergeTreeInOrder 0 → 1 - (ReadFromRemote) filter_type='range' max_replicas=1 prefer_localhost_replica=1 1000 -(Expression) -ExpressionTransform - (ReadFromStorage) - AggregatingTransform - ExpressionTransform - SourceFromSingleChunk 0 → 1 filter_type='range' max_replicas=2 prefer_localhost_replica=1 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 2 → 1 - (Union) - (Aggregating) - AggregatingTransform - (Expression) - ExpressionTransform - (Filter) - FilterTransform - (ReadFromMergeTree) - MergeTreeInOrder 0 → 1 - (ReadFromRemote) filter_type='range' max_replicas=3 prefer_localhost_replica=1 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 3 → 1 - (Union) - (Aggregating) - AggregatingTransform - (Expression) - ExpressionTransform - (Filter) - FilterTransform - (ReadFromMergeTree) - MergeTreeInOrder 0 → 1 - (ReadFromRemote) query='SELECT count() FROM cluster(test_cluster_one_shard_three_replicas_localhost, currentDatabase(), 02535_custom_key)' with custom_key='cityHash64(x) + 1' filter_type='default' max_replicas=1 prefer_localhost_replica=0 1000 -(ReadFromRemote) filter_type='default' max_replicas=2 prefer_localhost_replica=0 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 2 → 1 - (ReadFromRemote) filter_type='default' max_replicas=3 prefer_localhost_replica=0 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 3 → 1 - (ReadFromRemote) filter_type='range' max_replicas=1 prefer_localhost_replica=0 1000 -(ReadFromRemote) filter_type='range' max_replicas=2 prefer_localhost_replica=0 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 2 → 1 - (ReadFromRemote) filter_type='range' max_replicas=3 prefer_localhost_replica=0 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 3 → 1 - (ReadFromRemote) filter_type='default' max_replicas=1 prefer_localhost_replica=1 1000 -(Expression) -ExpressionTransform - (ReadFromStorage) - AggregatingTransform - ExpressionTransform - SourceFromSingleChunk 0 → 1 filter_type='default' max_replicas=2 prefer_localhost_replica=1 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 2 → 1 - (Union) - (Aggregating) - AggregatingTransform - (Expression) - ExpressionTransform - (Filter) - FilterTransform - (ReadFromMergeTree) - MergeTreeInOrder 0 → 1 - (ReadFromRemote) filter_type='default' max_replicas=3 prefer_localhost_replica=1 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 3 → 1 - (Union) - (Aggregating) - AggregatingTransform - (Expression) - ExpressionTransform - (Filter) - FilterTransform - (ReadFromMergeTree) - MergeTreeInOrder 0 → 1 - (ReadFromRemote) filter_type='range' max_replicas=1 prefer_localhost_replica=1 1000 -(Expression) -ExpressionTransform - (ReadFromStorage) - AggregatingTransform - ExpressionTransform - SourceFromSingleChunk 0 → 1 filter_type='range' max_replicas=2 prefer_localhost_replica=1 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 2 → 1 - (Union) - (Aggregating) - AggregatingTransform - (Expression) - ExpressionTransform - (Filter) - FilterTransform - (ReadFromMergeTree) - MergeTreeInOrder 0 → 1 - (ReadFromRemote) filter_type='range' max_replicas=3 prefer_localhost_replica=1 1000 -(Expression) -ExpressionTransform × 4 - (MergingAggregated) - Resize 1 → 4 - SortingAggregatedTransform 4 → 1 - MergingAggregatedBucketTransform × 4 - Resize 1 → 4 - GroupingAggregatedTransform 3 → 1 - (Union) - (Aggregating) - AggregatingTransform - (Expression) - ExpressionTransform - (Filter) - FilterTransform - (ReadFromMergeTree) - MergeTreeInOrder 0 → 1 - (ReadFromRemote) diff --git a/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.sh b/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.sh index e97643bd366..40f62d39769 100755 --- a/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.sh +++ b/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.sh @@ -15,10 +15,8 @@ function run_with_custom_key { , parallel_replicas_mode='custom_key'\ , parallel_replicas_custom_key='$2'\ , parallel_replicas_custom_key_filter_type='$filter_type'\ - , max_threads=4\ , prefer_localhost_replica=$prefer_localhost_replica" $CLICKHOUSE_CLIENT --query="$query" - $CLICKHOUSE_CLIENT --query="EXPLAIN PIPELINE $query" done done done From 3a0941573376d4e2001b9c5937715a2a021a483a Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Sun, 22 Jan 2023 14:20:25 +0000 Subject: [PATCH 044/841] Refactor integration test --- .../test_parallel_replicas_custom_key/test.py | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/tests/integration/test_parallel_replicas_custom_key/test.py b/tests/integration/test_parallel_replicas_custom_key/test.py index 0787234a7b1..0819aceb8c7 100644 --- a/tests/integration/test_parallel_replicas_custom_key/test.py +++ b/tests/integration/test_parallel_replicas_custom_key/test.py @@ -3,19 +3,12 @@ from helpers.cluster import ClickHouseCluster cluster = ClickHouseCluster(__file__) -n1 = cluster.add_instance( - "n1", main_configs=["configs/remote_servers.xml"], with_zookeeper=True -) -n2 = cluster.add_instance( - "n2", main_configs=["configs/remote_servers.xml"], with_zookeeper=True -) -n3 = cluster.add_instance( - "n3", main_configs=["configs/remote_servers.xml"], with_zookeeper=True -) -n4 = cluster.add_instance( - "n4", main_configs=["configs/remote_servers.xml"], with_zookeeper=True -) -nodes = [n1, n2, n3, n4] +nodes = [ + cluster.add_instance( + f"n{i}", main_configs=["configs/remote_servers.xml"], with_zookeeper=True + ) + for i in range(1, 5) +] @pytest.fixture(scope="module", autouse=True) @@ -28,6 +21,7 @@ def start_cluster(): def create_tables(cluster): + n1 = nodes[0] n1.query("DROP TABLE IF EXISTS dist_table") n1.query(f"DROP TABLE IF EXISTS test_table ON CLUSTER {cluster}") @@ -49,6 +43,7 @@ def create_tables(cluster): def insert_data(cluster, row_num): create_tables(cluster) + n1 = nodes[0] n1.query(f"INSERT INTO dist_table SELECT number, number FROM numbers({row_num})") n1.query("SYSTEM FLUSH DISTRIBUTED dist_table") @@ -65,6 +60,8 @@ def test_parallel_replicas_custom_key(start_cluster, cluster, custom_key, filter row_num = 1000 insert_data(cluster, row_num) + + n1 = nodes[0] assert ( int( n1.query( From d898a4279ad42170b1f17e8a28938b3fae1441be Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Mon, 23 Jan 2023 15:56:45 +0000 Subject: [PATCH 045/841] Add possibility to create MergeTree tables --- src/Interpreters/InterpreterCreateQuery.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Interpreters/InterpreterCreateQuery.cpp b/src/Interpreters/InterpreterCreateQuery.cpp index 4a3ccfe18a2..d17a59b74f4 100644 --- a/src/Interpreters/InterpreterCreateQuery.cpp +++ b/src/Interpreters/InterpreterCreateQuery.cpp @@ -920,6 +920,7 @@ void InterpreterCreateQuery::setEngine(ASTCreateQuery & create) const /// It makes sense when default_table_engine setting is used, but not for temporary tables. /// For temporary tables we ignore this setting to allow CREATE TEMPORARY TABLE query without specifying ENGINE /// even if setting is set to MergeTree or something like that (otherwise MergeTree will be substituted and query will fail). + /* if (create.storage && !create.storage->engine) throw Exception(ErrorCodes::INCORRECT_QUERY, "Invalid storage definition for temporary table: must be either ENGINE = Memory or empty"); @@ -930,6 +931,7 @@ void InterpreterCreateQuery::setEngine(ASTCreateQuery & create) const auto storage_ast = std::make_shared(); storage_ast->set(storage_ast->engine, engine_ast); create.set(create.storage, storage_ast); + */ return; } @@ -1368,6 +1370,7 @@ bool InterpreterCreateQuery::doCreateTable(ASTCreateQuery & create, if (create.temporary) { String temporary_table_name = create.getTable(); + // ASTPtr original_create = create.clone(); auto creator = [&](const StorageID & table_id) { return StorageFactory::instance().get(create, From c15128491bd3fc451abd07807e9ed95cee335710 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Mon, 23 Jan 2023 17:24:48 +0100 Subject: [PATCH 046/841] Update max_parallel_replicas docs --- docs/en/operations/settings/settings.md | 54 ++++++++++++++++++++++++- docs/en/sql-reference/operators/in.md | 13 ++++-- 2 files changed, 61 insertions(+), 6 deletions(-) diff --git a/docs/en/operations/settings/settings.md b/docs/en/operations/settings/settings.md index e3f7bc11ddf..9fd4ccafb18 100644 --- a/docs/en/operations/settings/settings.md +++ b/docs/en/operations/settings/settings.md @@ -1221,7 +1221,9 @@ Possible values: Default value: 1. :::warning -Disable this setting if you use [max_parallel_replicas](#settings-max_parallel_replicas). +Disable this setting if you use [max_parallel_replicas](#settings-max_parallel_replicas) with [parallel_replicas_mode](#settings-parallel_replicas_mode) set to `sample_key` or `read_tasks`. +If [parallel_replicas_mode](#settings-parallel_replicas_mode) is set to `custom_key`, disable this setting only if it's used on a cluster with multiple shards containing multiple replicas. +If it's used on a cluster with a single shard and multiple replicas, disabling this setting will have negative effects. ::: ## totals_mode {#totals-mode} @@ -1246,17 +1248,65 @@ Default value: `1`. **Additional Info** -This setting is useful for replicated tables with a sampling key. A query may be processed faster if it is executed on several servers in parallel. But the query performance may degrade in the following cases: +This options will produce different results depending on the value of [parallel_replicas_mode](#settings-parallel_replicas_mode). + +### `sample_key` + +If [parallel_replicas_mode](#settings-parallel_replicas_mode) is set to `sample_key`, this setting is useful for replicated tables with a sampling key. +A query may be processed faster if it is executed on several servers in parallel. But the query performance may degrade in the following cases: - The position of the sampling key in the partitioning key does not allow efficient range scans. - Adding a sampling key to the table makes filtering by other columns less efficient. - The sampling key is an expression that is expensive to calculate. - The cluster latency distribution has a long tail, so that querying more servers increases the query overall latency. +### `custom_key` + +If [parallel_replicas_mode](#settings-parallel_replicas_mode) is set to `custom_key`, this setting is useful for any replicated table. +A query may be processed faster if it is executed on several servers in parallel but it depends on the used [parallel_replicas_custom_key](#settings-parallel_replicas_custom_key) +and [parallel_replicas_custom_key_filter_type](#settings-parallel_replicas_custom_key_filter_type). + +Use `default` for [parallel_replicas_custom_key_filter_type](#settings-parallel_replicas_custom_key_filter_type) unless the data is split across the entire integer space (e.g. column contains hash values), +then `range` should be used. +Simple expressions using primary keys are preferred. + +If the `custom_key` mode is used on a cluster that consists of a single shard with multiple replicas, those replicas will be converted into virtual shards. +Otherwise, it will behave same as `sample_key` mode, it will use multiple replicas of each shard. + :::warning This setting will produce incorrect results when joins or subqueries are involved, and all tables don't meet certain requirements. See [Distributed Subqueries and max_parallel_replicas](../../sql-reference/operators/in.md/#max_parallel_replica-subqueries) for more details. ::: +## parallel_replicas_mode {#settings-parallel_replicas_mode} + +Mode of splitting work between replicas. + +Possible values: + +- `sample_key` — Use `SAMPLE` key defined in the `SAMPLE BY` clause to split the work between replicas. +- `custom_key` — Define an arbitrary integer expression to use for splitting work between replicas. +- `read_tasks` — Split tasks for reading physical parts between replicas. + +Default value: `sample_key`. + +## parallel_replicas_custom_key {#settings-parallel_replicas_custom_key} + +Arbitrary integer expression that will be used to split work between replicas. +Used only if `parallel_replicas_mode` is set to `custom_key`. + +Default value: `''`. + +## parallel_replicas_custom_key_filter_type {#settings-parallel_replicas_custom_key_filter_type} + +How to use `parallel_replicas_custom_key` expression for splitting work between replicas. + +Possible values: + +- `default` — Use the default implementation using modulo operation on the `parallel_replicas_custom_key`. +- `range` — Split the entire value space of the expression in the ranges. This type of filtering is useful if values of `parallel_replicas_custom_key` are uniformly spread across the entire integer space, e.g. hash values. + +Default value: `default`. + ## compile_expressions {#compile-expressions} Enables or disables compilation of frequently used simple functions and operators to native code with LLVM at runtime. diff --git a/docs/en/sql-reference/operators/in.md b/docs/en/sql-reference/operators/in.md index 58119cfc4f5..e1e4118524a 100644 --- a/docs/en/sql-reference/operators/in.md +++ b/docs/en/sql-reference/operators/in.md @@ -233,11 +233,12 @@ If `some_predicate` is not selective enough, it will return large amount of data ### Distributed Subqueries and max_parallel_replicas -When max_parallel_replicas is greater than 1, distributed queries are further transformed. For example, the following: +When [max_parallel_replicas](#settings-max_parallel_replicas) is greater than 1, distributed queries are further transformed. +For example, if [parallel_replicas_mode](#settings-parallel_replicas_mode) is set to `sample_key`, the following: ```sql SELECT CounterID, count() FROM distributed_table_1 WHERE UserID IN (SELECT UserID FROM local_table_2 WHERE CounterID < 100) -SETTINGS max_parallel_replicas=3 +SETTINGS max_parallel_replicas=3, parallel_replicas_mode='sample_key' ``` is transformed on each server into @@ -247,8 +248,12 @@ SELECT CounterID, count() FROM local_table_1 WHERE UserID IN (SELECT UserID FROM SETTINGS parallel_replicas_count=3, parallel_replicas_offset=M ``` -where M is between 1 and 3 depending on which replica the local query is executing on. These settings affect every MergeTree-family table in the query and have the same effect as applying `SAMPLE 1/3 OFFSET (M-1)/3` on each table. +where M is between 1 and 3 depending on which replica the local query is executing on. -Therefore adding the max_parallel_replicas setting will only produce correct results if both tables have the same replication scheme and are sampled by UserID or a subkey of it. In particular, if local_table_2 does not have a sampling key, incorrect results will be produced. The same rule applies to JOIN. +These settings affect every MergeTree-family table in the query and have the same effect as applying `SAMPLE 1/3 OFFSET (M-1)/3` on each table. + +Therefore adding the [max_parallel_replicas](#settings-max_parallel_replicas) setting will only produce correct results if both tables have the same replication scheme and are sampled by UserID or a subkey of it. In particular, if local_table_2 does not have a sampling key, incorrect results will be produced. The same rule applies to JOIN. One workaround if local_table_2 does not meet the requirements, is to use `GLOBAL IN` or `GLOBAL JOIN`. + +If a table doesn't have a sampling key, more flexible options for [parallel_replicas_mode](#settings-parallel_replicas_mode) can be used that can produce different and more optimal behaviour. From aa0f01a409f164faa11b869531e8ae6c58b06c0c Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Tue, 24 Jan 2023 06:54:19 +0000 Subject: [PATCH 047/841] Fix bug with DROP TEMPORARY TABLE for MergeTree --- src/Interpreters/DatabaseCatalog.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Interpreters/DatabaseCatalog.cpp b/src/Interpreters/DatabaseCatalog.cpp index 8bfda0b210d..1a117705063 100644 --- a/src/Interpreters/DatabaseCatalog.cpp +++ b/src/Interpreters/DatabaseCatalog.cpp @@ -121,9 +121,15 @@ TemporaryTableHolder::~TemporaryTableHolder() { if (id != UUIDHelpers::Nil) { - auto table = getTable(); - table->flushAndShutdown(); - temporary_tables->dropTable(getContext(), "_tmp_" + toString(id)); + // auto table = getTable(); + /// Table maybe dropped before by DROP TEMPORARY TABLE + /// Thus we need to verify the existence of the table before calling dropTable + auto table = temporary_tables->tryGetTable("_tmp_" + toString(id), getContext()); + if (!table) + { + table->flushAndShutdown(); + temporary_tables->dropTable(getContext(), "_tmp_" + toString(id)); + } } } From 78c0a6ab128a2642346c5c2dd2dc1c6372a14b8d Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Tue, 24 Jan 2023 07:23:47 +0000 Subject: [PATCH 048/841] Set Memory engine when there is no storage --- src/Interpreters/InterpreterCreateQuery.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/Interpreters/InterpreterCreateQuery.cpp b/src/Interpreters/InterpreterCreateQuery.cpp index d17a59b74f4..5f1bca6c476 100644 --- a/src/Interpreters/InterpreterCreateQuery.cpp +++ b/src/Interpreters/InterpreterCreateQuery.cpp @@ -923,15 +923,16 @@ void InterpreterCreateQuery::setEngine(ASTCreateQuery & create) const /* if (create.storage && !create.storage->engine) throw Exception(ErrorCodes::INCORRECT_QUERY, "Invalid storage definition for temporary table: must be either ENGINE = Memory or empty"); - - auto engine_ast = std::make_shared(); - // engine_ast->name = "Memory"; - engine_ast->name = create.storage->engine->name; - engine_ast->no_empty_args = true; - auto storage_ast = std::make_shared(); - storage_ast->set(storage_ast->engine, engine_ast); - create.set(create.storage, storage_ast); */ + if (!create.storage) + { + auto engine_ast = std::make_shared(); + engine_ast->name = "Memory"; + engine_ast->no_empty_args = true; + auto storage_ast = std::make_shared(); + storage_ast->set(storage_ast->engine, engine_ast); + create.set(create.storage, storage_ast); + } return; } From 640bb66065c18d41d81e6f3a027345e46f1f5f0a Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Tue, 24 Jan 2023 07:39:29 +0000 Subject: [PATCH 049/841] Move StorageFactory to top of doCreateTable for temp tables --- src/Interpreters/InterpreterCreateQuery.cpp | 59 ++++++++------------- 1 file changed, 22 insertions(+), 37 deletions(-) diff --git a/src/Interpreters/InterpreterCreateQuery.cpp b/src/Interpreters/InterpreterCreateQuery.cpp index 5f1bca6c476..cae18175757 100644 --- a/src/Interpreters/InterpreterCreateQuery.cpp +++ b/src/Interpreters/InterpreterCreateQuery.cpp @@ -1244,23 +1244,30 @@ bool InterpreterCreateQuery::doCreateTable(ASTCreateQuery & create, const InterpreterCreateQuery::TableProperties & properties, DDLGuardPtr & ddl_guard) { - /* if (create.temporary) { if (create.if_not_exists && getContext()->tryResolveStorageID({"", create.getTable()}, Context::ResolveExternal)) return false; + create.setDatabase(DatabaseCatalog::TEMPORARY_DATABASE); + DatabasePtr database = DatabaseCatalog::instance().getDatabase(create.getDatabase()); + String temporary_table_name = create.getTable(); - auto temporary_table = TemporaryTableHolder(getContext(), properties.columns, properties.constraints, query_ptr); + auto creator = [&](const StorageID & table_id) + { + return StorageFactory::instance().get(create, + database->getTableDataPath(table_id.getTableName()), + getContext(), + getContext()->getGlobalContext(), + properties.columns, + properties.constraints, + false); + }; + auto temporary_table = TemporaryTableHolder(getContext(), creator, query_ptr); + getContext()->getSessionContext()->addExternalTable(temporary_table_name, std::move(temporary_table)); return true; } - */ - - if (create.temporary) - { - create.setDatabase(DatabaseCatalog::TEMPORARY_DATABASE); - } if (!ddl_guard) ddl_guard = DatabaseCatalog::instance().getDDLGuard(create.getDatabase(), create.getTable()); @@ -1368,35 +1375,13 @@ bool InterpreterCreateQuery::doCreateTable(ASTCreateQuery & create, } else { - if (create.temporary) - { - String temporary_table_name = create.getTable(); - // ASTPtr original_create = create.clone(); - auto creator = [&](const StorageID & table_id) - { - return StorageFactory::instance().get(create, - database->getTableDataPath(table_id.getTableName()), - getContext(), - getContext()->getGlobalContext(), - properties.columns, - properties.constraints, - false); - }; - auto temporary_table = TemporaryTableHolder(getContext(), creator, query_ptr); - - getContext()->getSessionContext()->addExternalTable(temporary_table_name, std::move(temporary_table)); - return true; - } - else - { - res = StorageFactory::instance().get(create, - data_path, - getContext(), - getContext()->getGlobalContext(), - properties.columns, - properties.constraints, - false); - } + res = StorageFactory::instance().get(create, + data_path, + getContext(), + getContext()->getGlobalContext(), + properties.columns, + properties.constraints, + false); /// If schema wes inferred while storage creation, add columns description to create query. addColumnsDescriptionToCreateQueryIfNecessary(query_ptr->as(), res); From 37b62b3a589d0dd57dcfc72a5043a2608b0c2f20 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Tue, 24 Jan 2023 10:46:47 +0000 Subject: [PATCH 050/841] Use Map for custom_key --- docs/en/operations/settings/settings.md | 8 +- src/Core/Settings.h | 2 +- src/Interpreters/InterpreterSelectQuery.cpp | 24 +++--- .../getCustomKeyFilterForParallelReplicas.cpp | 44 +++++++++-- .../getCustomKeyFilterForParallelReplicas.h | 5 +- src/Storages/StorageDistributed.cpp | 78 ++++++++++++++----- .../test_parallel_replicas_custom_key/test.py | 46 ++++++++++- .../02535_max_parallel_replicas_custom_key.sh | 2 +- 8 files changed, 166 insertions(+), 43 deletions(-) diff --git a/docs/en/operations/settings/settings.md b/docs/en/operations/settings/settings.md index 9fd4ccafb18..68690e8a173 100644 --- a/docs/en/operations/settings/settings.md +++ b/docs/en/operations/settings/settings.md @@ -1291,10 +1291,14 @@ Default value: `sample_key`. ## parallel_replicas_custom_key {#settings-parallel_replicas_custom_key} -Arbitrary integer expression that will be used to split work between replicas. +Map of arbitrary integer expression that can be used to split work between replicas for a specific table. +If it's used with `cluster` function, the key can be name of the local table defined inside the `cluster` function. +If it's used with `Distributed` engine, the key can be name of the distributed table, alias or the local table for which the `Distributed` engine is created. +The value can be any integer expression. + Used only if `parallel_replicas_mode` is set to `custom_key`. -Default value: `''`. +Default value: `{}`. ## parallel_replicas_custom_key_filter_type {#settings-parallel_replicas_custom_key_filter_type} diff --git a/src/Core/Settings.h b/src/Core/Settings.h index 89686c92960..2c8b1c90faa 100644 --- a/src/Core/Settings.h +++ b/src/Core/Settings.h @@ -154,7 +154,7 @@ static constexpr UInt64 operator""_GiB(unsigned long long value) M(UInt64, max_parallel_replicas, 1, "The maximum number of replicas of each shard used when the query is executed. For consistency (to get different parts of the same partition), this option only works for the specified sampling key. The lag of the replicas is not controlled.", 0) \ M(UInt64, parallel_replicas_count, 0, "This is internal setting that should not be used directly and represents an implementation detail of the 'parallel replicas' mode. This setting will be automatically set up by the initiator server for distributed queries to the number of parallel replicas participating in query processing.", 0) \ M(UInt64, parallel_replica_offset, 0, "This is internal setting that should not be used directly and represents an implementation detail of the 'parallel replicas' mode. This setting will be automatically set up by the initiator server for distributed queries to the index of the replica participating in query processing among parallel replicas.", 0) \ - M(String, parallel_replicas_custom_key, "", "Custom key for parallel replicas using modulo operation on the key for assigning work to replicas.", 0) \ + M(Map, parallel_replicas_custom_key, "", "Custom key for parallel replicas using modulo operation on the key for assigning work to replicas.", 0) \ M(ParallelReplicasCustomKeyFilterType, parallel_replicas_custom_key_filter_type, ParallelReplicasCustomKeyFilterType::DEFAULT, "Type of filter to use with custom key for parallel replicas. default - use modulo operation on the custom key, range - use range filter on custom key using all possible values for the value type of custom key.", 0) \ M(ParallelReplicasMode, parallel_replicas_mode, ParallelReplicasMode::SAMPLE_KEY, "How to process query using multiple replicas.", 0) \ \ diff --git a/src/Interpreters/InterpreterSelectQuery.cpp b/src/Interpreters/InterpreterSelectQuery.cpp index 817d40c086a..d174912f66d 100644 --- a/src/Interpreters/InterpreterSelectQuery.cpp +++ b/src/Interpreters/InterpreterSelectQuery.cpp @@ -513,18 +513,20 @@ InterpreterSelectQuery::InterpreterSelectQuery( ASTPtr parallel_replicas_custom_filter_ast = nullptr; if (settings.parallel_replicas_count > 1 && settings.parallel_replicas_mode == ParallelReplicasMode::CUSTOM_KEY) { - LOG_INFO(log, "Processing query on a replica using custom_key"); - if (!storage) - throw DB::Exception(ErrorCodes::BAD_ARGUMENTS, "Storage is unknown when trying to parse custom key for parallel replica"); + if (auto custom_key_ast = parseCustomKeyForTable(settings.parallel_replicas_custom_key, joined_tables.tablesWithColumns().front().table, *context)) + { + LOG_INFO(log, "Processing query on a replica using custom_key"); + if (!storage) + throw DB::Exception(ErrorCodes::BAD_ARGUMENTS, "Storage is unknown when trying to parse custom key for parallel replica"); - auto custom_key_ast = parseParallelReplicaCustomKey(settings.parallel_replicas_custom_key.value, *context); - parallel_replicas_custom_filter_ast = getCustomKeyFilterForParallelReplica( - settings.parallel_replicas_count, - settings.parallel_replica_offset, - std::move(custom_key_ast), - settings.parallel_replicas_custom_key_filter_type, - *storage, - context); + parallel_replicas_custom_filter_ast = getCustomKeyFilterForParallelReplica( + settings.parallel_replicas_count, + settings.parallel_replica_offset, + std::move(custom_key_ast), + settings.parallel_replicas_custom_key_filter_type, + *storage, + context); + } } auto analyze = [&](bool try_move_to_prewhere) diff --git a/src/Interpreters/getCustomKeyFilterForParallelReplicas.cpp b/src/Interpreters/getCustomKeyFilterForParallelReplicas.cpp index fbc1d214164..cfc7cfd6194 100644 --- a/src/Interpreters/getCustomKeyFilterForParallelReplicas.cpp +++ b/src/Interpreters/getCustomKeyFilterForParallelReplicas.cpp @@ -116,15 +116,43 @@ ASTPtr getCustomKeyFilterForParallelReplica( return makeASTFunction("and", std::move(lower_function), std::move(upper_function)); } -ASTPtr parseParallelReplicaCustomKey(std::string_view custom_key, const Context & context) +ASTPtr parseCustomKeyForTable(const Map & custom_keys, const DatabaseAndTableWithAlias & target, const Context & context) { - if (custom_key.empty()) - throw Exception(DB::ErrorCodes::BAD_ARGUMENTS, "Parallel replicas mode set to 'custom_key' but 'parallel_replicas_custom_key' has no value"); + for (size_t i = 0; i < custom_keys.size(); ++i) + { + const auto & tuple = custom_keys[i].safeGet(); + auto & table = tuple.at(0).safeGet(); + auto & filter = tuple.at(1).safeGet(); - ParserExpression parser; - const auto & settings = context.getSettingsRef(); - return parseQuery( - parser, custom_key.data(), custom_key.data() + custom_key.size(), - "parallel replicas custom key", settings.max_query_size, settings.max_parser_depth); + if (table == target.alias || + (table == target.table && context.getCurrentDatabase() == target.database) || + (table == target.database + '.' + target.table)) + { + /// Try to parse expression + ParserExpression parser; + const auto & settings = context.getSettingsRef(); + return parseQuery( + parser, filter.data(), filter.data() + filter.size(), + "parallel replicas custom key", settings.max_query_size, settings.max_parser_depth); + } + } + + return nullptr; } + +bool containsCustomKeyForTable(const Map & custom_keys, const DatabaseAndTableWithAlias & target, const Context & context) +{ + for (size_t i = 0; i < custom_keys.size(); ++i) + { + const auto & tuple = custom_keys[i].safeGet(); + auto & table = tuple.at(0).safeGet(); + + if (table == target.alias || + (table == target.table && context.getCurrentDatabase() == target.database) || + (table == target.database + '.' + target.table)) + return true; + } + return false; +} + } diff --git a/src/Interpreters/getCustomKeyFilterForParallelReplicas.h b/src/Interpreters/getCustomKeyFilterForParallelReplicas.h index 251e72e0a97..fc515132487 100644 --- a/src/Interpreters/getCustomKeyFilterForParallelReplicas.h +++ b/src/Interpreters/getCustomKeyFilterForParallelReplicas.h @@ -4,6 +4,7 @@ #include #include #include +#include namespace DB { @@ -18,6 +19,8 @@ ASTPtr getCustomKeyFilterForParallelReplica( const IStorage & storage, const ContextPtr & context); -ASTPtr parseParallelReplicaCustomKey(std::string_view custom_key, const Context & context); +ASTPtr parseCustomKeyForTable(const Map & custom_keys, const DatabaseAndTableWithAlias & target, const Context & context); + +bool containsCustomKeyForTable(const Map & custom_keys, const DatabaseAndTableWithAlias & target, const Context & context); } diff --git a/src/Storages/StorageDistributed.cpp b/src/Storages/StorageDistributed.cpp index bf9ae2fdd20..7a3bd89e5ff 100644 --- a/src/Storages/StorageDistributed.cpp +++ b/src/Storages/StorageDistributed.cpp @@ -27,7 +27,6 @@ #include #include #include -#include "Core/SettingsEnums.h" #include #include @@ -47,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -80,6 +80,7 @@ #include #include +#include #include #include @@ -91,8 +92,6 @@ #include #include -#include - namespace fs = std::filesystem; @@ -307,13 +306,13 @@ size_t getClusterQueriedNodes(const Settings & settings, const ClusterPtr & clus return (num_remote_shards + num_local_shards) * settings.max_parallel_replicas; } -bool useVirtualShards(const Settings & settings, const Cluster & cluster) +bool canUseCustomKey(const Settings & settings, const Cluster & cluster) { return settings.max_parallel_replicas > 1 && settings.parallel_replicas_mode == ParallelReplicasMode::CUSTOM_KEY && cluster.getShardCount() == 1 && cluster.getShardsInfo()[0].getAllNodeCount() > 1; } -} +} /// For destruction of std::unique_ptr of type that is incomplete in class definition. StorageDistributed::~StorageDistributed() = default; @@ -453,7 +452,33 @@ QueryProcessingStage::Enum StorageDistributed::getQueryProcessingStage( size_t nodes = getClusterQueriedNodes(settings, cluster); - if (useVirtualShards(settings, *cluster)) + const auto use_virtual_shards = [&] + { + if (!canUseCustomKey(settings, *cluster)) + return false; + + auto distributed_table = DatabaseAndTableWithAlias( + *getTableExpression(query_info.query->as(), 0), local_context->getCurrentDatabase()); + + if (containsCustomKeyForTable(settings.parallel_replicas_custom_key, distributed_table, *local_context)) + { + LOG_INFO(log, "Found custom_key for {}", distributed_table.getQualifiedNamePrefix(false)); + return true; + } + + DatabaseAndTableWithAlias remote_table_info; + remote_table_info.database = remote_database; + remote_table_info.table = remote_table; + if (containsCustomKeyForTable(settings.parallel_replicas_custom_key, remote_table_info, *local_context)) + { + LOG_INFO(log, "Found custom_key for {}", remote_table_info.getQualifiedNamePrefix(false)); + return true; + } + + return false; + }; + + if (use_virtual_shards()) { LOG_INFO(log, "Single shard cluster used with custom_key, transforming replicas into virtual shards"); @@ -767,23 +792,40 @@ void StorageDistributed::read( auto settings = local_context->getSettingsRef(); ClusterProxy::AdditionalShardFilterGenerator additional_shard_filter_generator; - if (useVirtualShards(settings, *getCluster())) + if (canUseCustomKey(settings, *getCluster())) { - if (query_info.getCluster()->getShardCount() == 1) + const auto get_custom_key_ast = [&]() -> ASTPtr { - // we are reading from single shard with multiple replicas but didn't transform replicas - // into virtual shards with custom_key set - throw Exception(ErrorCodes::LOGICAL_ERROR, "Replicas weren't transformed into virtual shards"); - } + auto distributed_table = DatabaseAndTableWithAlias( + *getTableExpression(query_info.query->as(), 0), local_context->getCurrentDatabase()); + if (auto custom_key_ast = parseCustomKeyForTable(settings.parallel_replicas_custom_key, distributed_table, *local_context)) + return custom_key_ast; - auto custom_key_ast = parseParallelReplicaCustomKey(settings.parallel_replicas_custom_key.value, *local_context); + DatabaseAndTableWithAlias remote_table_info; + remote_table_info.database = remote_database; + remote_table_info.table = remote_table; + if (auto custom_key_ast = parseCustomKeyForTable(settings.parallel_replicas_custom_key, remote_table_info, *local_context)) + return custom_key_ast; - additional_shard_filter_generator = - [&, custom_key_ast = std::move(custom_key_ast), shard_count = query_info.cluster->getShardCount()](uint64_t shard_num) -> ASTPtr - { - return getCustomKeyFilterForParallelReplica( - shard_count, shard_num - 1, custom_key_ast, settings.parallel_replicas_custom_key_filter_type, *this, local_context); + return nullptr; }; + + if (auto custom_key_ast = get_custom_key_ast()) + { + if (query_info.getCluster()->getShardCount() == 1) + { + // we are reading from single shard with multiple replicas but didn't transform replicas + // into virtual shards with custom_key set + throw Exception(ErrorCodes::LOGICAL_ERROR, "Replicas weren't transformed into virtual shards"); + } + + additional_shard_filter_generator = + [&, custom_key_ast = std::move(custom_key_ast), shard_count = query_info.cluster->getShardCount()](uint64_t shard_num) -> ASTPtr + { + return getCustomKeyFilterForParallelReplica( + shard_count, shard_num - 1, custom_key_ast, settings.parallel_replicas_custom_key_filter_type, *this, local_context); + }; + } } bool parallel_replicas = settings.max_parallel_replicas > 1 && settings.allow_experimental_parallel_reading_from_replicas diff --git a/tests/integration/test_parallel_replicas_custom_key/test.py b/tests/integration/test_parallel_replicas_custom_key/test.py index 0819aceb8c7..c11be610611 100644 --- a/tests/integration/test_parallel_replicas_custom_key/test.py +++ b/tests/integration/test_parallel_replicas_custom_key/test.py @@ -70,7 +70,7 @@ def test_parallel_replicas_custom_key(start_cluster, cluster, custom_key, filter "prefer_localhost_replica": 0, "max_parallel_replicas": 3, "parallel_replicas_mode": "custom_key", - "parallel_replicas_custom_key": custom_key, + "parallel_replicas_custom_key": f"{{'test_table': '{custom_key}'}}", "parallel_replicas_custom_key_filter_type": filter_type, }, ) @@ -89,3 +89,47 @@ def test_parallel_replicas_custom_key(start_cluster, cluster, custom_key, filter assert n1.contains_in_log( "Single shard cluster used with custom_key, transforming replicas into virtual shards" ) + + +def test_custom_key_different_table_names(start_cluster): + def run(table_source, table_name_for_custom_key): + for node in nodes: + node.rotate_logs() + + row_num = 1000 + insert_data("test_single_shard_multiple_replicas", row_num) + + n1 = nodes[0] + assert ( + int( + n1.query( + f"SELECT count() FROM {table_source}", + settings={ + "prefer_localhost_replica": 0, + "max_parallel_replicas": 3, + "parallel_replicas_mode": "custom_key", + "parallel_replicas_custom_key": f"{{'{table_name_for_custom_key}': 'sipHash64(value)'}}", + }, + ) + ) + == row_num + ) + + # we first transform all replicas into shards and then append for each shard filter + assert n1.contains_in_log( + "Single shard cluster used with custom_key, transforming replicas into virtual shards" + ) + + run("dist_table", "dist_table") + run("dist_table as d", "d") + run("dist_table as d", "dist_table") + run("dist_table as d", "test_table") + run( + "cluster('test_single_shard_multiple_replicas', default.test_table)", + "test_table", + ) + run("cluster('test_single_shard_multiple_replicas', default.test_table) as d", "d") + run( + "cluster('test_single_shard_multiple_replicas', default.test_table) as d", + "test_table", + ) diff --git a/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.sh b/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.sh index 40f62d39769..b6e5c853dc2 100755 --- a/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.sh +++ b/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.sh @@ -13,7 +13,7 @@ function run_with_custom_key { echo "filter_type='$filter_type' max_replicas=$max_replicas prefer_localhost_replica=$prefer_localhost_replica" query="$1 SETTINGS max_parallel_replicas=$max_replicas\ , parallel_replicas_mode='custom_key'\ - , parallel_replicas_custom_key='$2'\ + , parallel_replicas_custom_key={'02535_custom_key': '$2'}\ , parallel_replicas_custom_key_filter_type='$filter_type'\ , prefer_localhost_replica=$prefer_localhost_replica" $CLICKHOUSE_CLIENT --query="$query" From 7df545fbe3af5c6ea688c8ee0a06d1004c6fa349 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Tue, 24 Jan 2023 11:21:09 +0000 Subject: [PATCH 051/841] Remove unused define --- src/Interpreters/getCustomKeyFilterForParallelReplicas.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Interpreters/getCustomKeyFilterForParallelReplicas.cpp b/src/Interpreters/getCustomKeyFilterForParallelReplicas.cpp index cfc7cfd6194..229668ceff4 100644 --- a/src/Interpreters/getCustomKeyFilterForParallelReplicas.cpp +++ b/src/Interpreters/getCustomKeyFilterForParallelReplicas.cpp @@ -18,7 +18,6 @@ namespace DB namespace ErrorCodes { extern const int ILLEGAL_TYPE_OF_COLUMN_FOR_FILTER; - extern const int BAD_ARGUMENTS; } ASTPtr getCustomKeyFilterForParallelReplica( From ffa3d1d603d0e77b7cf0fa71a70ac3f53e7671ff Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Tue, 24 Jan 2023 13:58:42 +0000 Subject: [PATCH 052/841] Run query on 1 replica if no custom_key --- src/Interpreters/InterpreterSelectQuery.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Interpreters/InterpreterSelectQuery.cpp b/src/Interpreters/InterpreterSelectQuery.cpp index 996efe2b4cf..9cecd53f6c8 100644 --- a/src/Interpreters/InterpreterSelectQuery.cpp +++ b/src/Interpreters/InterpreterSelectQuery.cpp @@ -511,7 +511,7 @@ InterpreterSelectQuery::InterpreterSelectQuery( settings.additional_table_filters, joined_tables.tablesWithColumns().front().table, *context); ASTPtr parallel_replicas_custom_filter_ast = nullptr; - if (settings.parallel_replicas_count > 1 && settings.parallel_replicas_mode == ParallelReplicasMode::CUSTOM_KEY) + if (settings.parallel_replicas_count > 1 && settings.parallel_replicas_mode == ParallelReplicasMode::CUSTOM_KEY && !joined_tables.tablesWithColumns().empty()) { if (auto custom_key_ast = parseCustomKeyForTable(settings.parallel_replicas_custom_key, joined_tables.tablesWithColumns().front().table, *context)) { @@ -527,6 +527,14 @@ InterpreterSelectQuery::InterpreterSelectQuery( *storage, context); } + else if (settings.parallel_replica_offset > 0) + { + LOG_DEBUG( + log, + "Will use no data on this replica because parallel replicas processing with custom_key has been requested" + " (setting 'max_parallel_replicas') but the table does not have custom_key defined for it (settings `parallel_replicas_custom_key`)"); + parallel_replicas_custom_filter_ast = std::make_shared(false); + } } auto analyze = [&](bool try_move_to_prewhere) From 6da9dc2407cd11aa3347f64d3869a0ccfaac48d0 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Tue, 24 Jan 2023 14:16:26 +0000 Subject: [PATCH 053/841] Correctly handle case with missing custom_key --- .../test_parallel_replicas_custom_key/test.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/integration/test_parallel_replicas_custom_key/test.py b/tests/integration/test_parallel_replicas_custom_key/test.py index c11be610611..9222f417a94 100644 --- a/tests/integration/test_parallel_replicas_custom_key/test.py +++ b/tests/integration/test_parallel_replicas_custom_key/test.py @@ -68,7 +68,7 @@ def test_parallel_replicas_custom_key(start_cluster, cluster, custom_key, filter "SELECT count() FROM dist_table", settings={ "prefer_localhost_replica": 0, - "max_parallel_replicas": 3, + "max_parallel_replicas": 4, "parallel_replicas_mode": "custom_key", "parallel_replicas_custom_key": f"{{'test_table': '{custom_key}'}}", "parallel_replicas_custom_key_filter_type": filter_type, @@ -92,7 +92,7 @@ def test_parallel_replicas_custom_key(start_cluster, cluster, custom_key, filter def test_custom_key_different_table_names(start_cluster): - def run(table_source, table_name_for_custom_key): + def run(table_source, table_name_for_custom_key, should_use_virtual_shard=True): for node in nodes: node.rotate_logs() @@ -106,7 +106,7 @@ def test_custom_key_different_table_names(start_cluster): f"SELECT count() FROM {table_source}", settings={ "prefer_localhost_replica": 0, - "max_parallel_replicas": 3, + "max_parallel_replicas": 4, "parallel_replicas_mode": "custom_key", "parallel_replicas_custom_key": f"{{'{table_name_for_custom_key}': 'sipHash64(value)'}}", }, @@ -116,7 +116,7 @@ def test_custom_key_different_table_names(start_cluster): ) # we first transform all replicas into shards and then append for each shard filter - assert n1.contains_in_log( + assert not should_use_virtual_shard or n1.contains_in_log( "Single shard cluster used with custom_key, transforming replicas into virtual shards" ) @@ -133,3 +133,4 @@ def test_custom_key_different_table_names(start_cluster): "cluster('test_single_shard_multiple_replicas', default.test_table) as d", "test_table", ) + run("dist_table as d", "dist", should_use_virtual_shard=False) From 09951c70c4194b1e9265c2757a159a9e84068581 Mon Sep 17 00:00:00 2001 From: avogar Date: Tue, 24 Jan 2023 16:45:07 +0000 Subject: [PATCH 054/841] Fix --- docker/test/upgrade/run.sh | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/docker/test/upgrade/run.sh b/docker/test/upgrade/run.sh index 9f6ead84de9..503744e8baf 100644 --- a/docker/test/upgrade/run.sh +++ b/docker/test/upgrade/run.sh @@ -29,12 +29,6 @@ function configure() export EXPORT_S3_STORAGE_POLICIES=1 /usr/share/clickhouse-test/config/install.sh - # we mount tests folder from repo to /usr/share - ln -s /usr/share/clickhouse-test/ci/stress.py /usr/bin/stress - ln -s /usr/share/clickhouse-test/clickhouse-test /usr/bin/clickhouse-test - ln -s /usr/share/clickhouse-test/ci/download_release_packages.py /usr/bin/download_release_packages - ln -s /usr/share/clickhouse-test/ci/get_previous_release_tag.py /usr/bin/get_previous_release_tag - # avoid too slow startup sudo cat /etc/clickhouse-server/config.d/keeper_port.xml | sed "s|100000|10000|" > /etc/clickhouse-server/config.d/keeper_port.xml.tmp sudo mv /etc/clickhouse-server/config.d/keeper_port.xml.tmp /etc/clickhouse-server/config.d/keeper_port.xml @@ -241,6 +235,12 @@ mv /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml.tmp /etc/cli sudo chown clickhouse /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml sudo chgrp clickhouse /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml +# we mount tests folder from repo to /usr/share +ln -s /usr/share/clickhouse-test/ci/stress.py /usr/bin/stress +ln -s /usr/share/clickhouse-test/clickhouse-test /usr/bin/clickhouse-test +ln -s /usr/share/clickhouse-test/ci/download_release_packages.py /usr/bin/download_release_packages +ln -s /usr/share/clickhouse-test/ci/get_previous_release_tag.py /usr/bin/get_previous_release_tag + echo "Get previous release tag" previous_release_tag=$(dpkg --info package_folder/clickhouse-client*.deb | grep "Version: " | awk '{print $2}' | get_previous_release_tag) echo $previous_release_tag @@ -294,8 +294,7 @@ else clickhouse-client --query="SELECT 'Server version: ', version()" - # Install new package before running stress test because we should use new - # clickhouse-client and new clickhouse-test. + # Install new package before running stress test because we should use new clickhouse-client. # # But we should leave old binary in /usr/bin/ and debug symbols in # /usr/lib/debug/usr/bin (if any) for gdb and internal DWARF parser, so it @@ -458,6 +457,14 @@ grep -q -F -e 'Out of memory: Killed process' -e 'oom_reaper: reaped process' -e mv /var/log/clickhouse-server/stderr.log /test_output/ +# If we failed to clone repo or download previous release packages, +# we don't have any packages installed, but we need clickhouse-local +# to be installed to create check_status.tsv. +if ! command -v clickhouse-local &> /dev/null +then + install_packages package_folder +fi + # Write check result into check_status.tsv clickhouse-local --structure "test String, res String" -q "SELECT 'failure', test FROM table WHERE res != 'OK' order by (lower(test) like '%hung%'), rowNumberInAllBlocks() LIMIT 1" < /test_output/test_results.tsv > /test_output/check_status.tsv [ -s /test_output/check_status.tsv ] || echo -e "success\tNo errors found" > /test_output/check_status.tsv From 61d836b79d32ac9aa1cd0970ef0c889a534bf113 Mon Sep 17 00:00:00 2001 From: Kruglov Pavel <48961922+Avogar@users.noreply.github.com> Date: Wed, 25 Jan 2023 18:59:50 +0100 Subject: [PATCH 055/841] Update run.sh --- docker/test/upgrade/run.sh | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/docker/test/upgrade/run.sh b/docker/test/upgrade/run.sh index 503744e8baf..95ed588e054 100644 --- a/docker/test/upgrade/run.sh +++ b/docker/test/upgrade/run.sh @@ -242,7 +242,7 @@ ln -s /usr/share/clickhouse-test/ci/download_release_packages.py /usr/bin/downlo ln -s /usr/share/clickhouse-test/ci/get_previous_release_tag.py /usr/bin/get_previous_release_tag echo "Get previous release tag" -previous_release_tag=$(dpkg --info package_folder/clickhouse-client*.deb | grep "Version: " | awk '{print $2}' | get_previous_release_tag) +previous_release_tag=$(dpkg --info package_folder/clickhouse-client*.deb | grep "Version: " | awk '{print $2}' | cut -f1 -d'+' | get_previous_release_tag) echo $previous_release_tag echo "Clone previous release repository" @@ -293,24 +293,7 @@ else start clickhouse-client --query="SELECT 'Server version: ', version()" - - # Install new package before running stress test because we should use new clickhouse-client. - # - # But we should leave old binary in /usr/bin/ and debug symbols in - # /usr/lib/debug/usr/bin (if any) for gdb and internal DWARF parser, so it - # will print sane stacktraces and also to avoid possible crashes. - # - # FIXME: those files can be extracted directly from debian package, but - # actually better solution will be to use different PATH instead of playing - # games with files from packages. - mv /usr/bin/clickhouse previous_release_package_folder/ - mv /usr/lib/debug/usr/bin/clickhouse.debug previous_release_package_folder/ - install_packages package_folder - mv /usr/bin/clickhouse package_folder/ - mv /usr/lib/debug/usr/bin/clickhouse.debug package_folder/ - mv previous_release_package_folder/clickhouse /usr/bin/ - mv previous_release_package_folder/clickhouse.debug /usr/lib/debug/usr/bin/clickhouse.debug - + mkdir tmp_stress_output stress --test-cmd="/usr/bin/clickhouse-test --queries=\"previous_release_repository/tests/queries\"" --upgrade-check --output-folder tmp_stress_output --global-time-limit=1200 \ @@ -330,9 +313,8 @@ else stop 300 mv /var/log/clickhouse-server/clickhouse-server.log /var/log/clickhouse-server/clickhouse-server.stress.log - # Start new server - mv package_folder/clickhouse /usr/bin/ - mv package_folder/clickhouse.debug /usr/lib/debug/usr/bin/clickhouse.debug + # Install and start new server + install_packages package_folder # Disable fault injections on start (we don't test them here, and it can lead to tons of requests in case of huge number of tables). export ZOOKEEPER_FAULT_INJECTION=0 configure From 16428b91ec696b8ff9e90536e0285f42f602214c Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Thu, 26 Jan 2023 09:47:36 +0000 Subject: [PATCH 056/841] Fix removing data on disk for table engines like Log for DatabaseMemory --- src/Databases/DatabaseMemory.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Databases/DatabaseMemory.cpp b/src/Databases/DatabaseMemory.cpp index ac9a56567d1..b46946972ed 100644 --- a/src/Databases/DatabaseMemory.cpp +++ b/src/Databases/DatabaseMemory.cpp @@ -70,8 +70,7 @@ void DatabaseMemory::dropTable( if (table->storesDataOnDisk()) { - // assert(getDatabaseName() != DatabaseCatalog::TEMPORARY_DATABASE); - fs::path table_data_dir{getTableDataPath(table_name)}; + fs::path table_data_dir{fs::path{getContext()->getPath()} / getTableDataPath(table_name)}; if (fs::exists(table_data_dir)) fs::remove_all(table_data_dir); } @@ -79,7 +78,6 @@ void DatabaseMemory::dropTable( catch (...) { std::lock_guard lock{mutex}; - // assert(database_name != DatabaseCatalog::TEMPORARY_DATABASE); attachTableUnlocked(table_name, table); throw; } From c09d8e744fa158b6c76c6809d0d1b087a98d589e Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Thu, 26 Jan 2023 14:15:09 +0000 Subject: [PATCH 057/841] Make MergeTree and Log table engines DROP and clean data --- src/Interpreters/DatabaseCatalog.cpp | 3 +-- src/Interpreters/InterpreterDropQuery.cpp | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Interpreters/DatabaseCatalog.cpp b/src/Interpreters/DatabaseCatalog.cpp index 1a117705063..f15d6d3812e 100644 --- a/src/Interpreters/DatabaseCatalog.cpp +++ b/src/Interpreters/DatabaseCatalog.cpp @@ -121,11 +121,10 @@ TemporaryTableHolder::~TemporaryTableHolder() { if (id != UUIDHelpers::Nil) { - // auto table = getTable(); /// Table maybe dropped before by DROP TEMPORARY TABLE /// Thus we need to verify the existence of the table before calling dropTable auto table = temporary_tables->tryGetTable("_tmp_" + toString(id), getContext()); - if (!table) + if (table && !table->is_dropped) { table->flushAndShutdown(); temporary_tables->dropTable(getContext(), "_tmp_" + toString(id)); diff --git a/src/Interpreters/InterpreterDropQuery.cpp b/src/Interpreters/InterpreterDropQuery.cpp index f237814f879..c54d35f5e46 100644 --- a/src/Interpreters/InterpreterDropQuery.cpp +++ b/src/Interpreters/InterpreterDropQuery.cpp @@ -285,8 +285,9 @@ BlockIO InterpreterDropQuery::executeToTemporaryTable(const String & table_name, table->flushAndShutdown(); auto table_lock = table->lockExclusively(getContext()->getCurrentQueryId(), getContext()->getSettingsRef().lock_acquire_timeout); /// Delete table data - table->drop(); - table->is_dropped = true; + DatabasePtr database = DatabaseCatalog::instance().getDatabase(DatabaseCatalog::TEMPORARY_DATABASE); + UUID table_uuid = table->getStorageID().uuid; + database->dropTable(getContext(), "_tmp_" + toString(table_uuid)); } } } From dc0c1c33bb6364e0caafed2cc6938c8f7c1d1a13 Mon Sep 17 00:00:00 2001 From: avogar Date: Thu, 26 Jan 2023 14:50:59 +0000 Subject: [PATCH 058/841] Update --- docker/test/upgrade/run.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docker/test/upgrade/run.sh b/docker/test/upgrade/run.sh index 95ed588e054..37357297d08 100644 --- a/docker/test/upgrade/run.sh +++ b/docker/test/upgrade/run.sh @@ -152,7 +152,7 @@ function start() echo -e "Cannot start clickhouse-server\tFAIL" >> /test_output/test_results.tsv cat /var/log/clickhouse-server/stdout.log tail -n1000 /var/log/clickhouse-server/stderr.log - tail -n100000 /var/log/clickhouse-server/clickhouse-server.log | grep -F -v -e ' RaftInstance:' -e ' RaftInstance' | tail -n1000 + tail -n100000 /var/log/clickhouse-server/clickhouse-server.log | rg -F -v -e ' RaftInstance:' -e ' RaftInstance' | tail -n1000 break fi # use root to match with current uid @@ -229,12 +229,6 @@ fi azurite-blob --blobHost 0.0.0.0 --blobPort 10000 --debug /azurite_log & ./setup_minio.sh stateless # to have a proper environment -# But we still need default disk because some tables loaded only into it -sudo cat /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml | sed "s|

s3
|
s3
default|" > /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml.tmp -mv /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml.tmp /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml -sudo chown clickhouse /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml -sudo chgrp clickhouse /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml - # we mount tests folder from repo to /usr/share ln -s /usr/share/clickhouse-test/ci/stress.py /usr/bin/stress ln -s /usr/share/clickhouse-test/clickhouse-test /usr/bin/clickhouse-test @@ -277,6 +271,12 @@ else export ZOOKEEPER_FAULT_INJECTION=0 configure + # But we still need default disk because some tables loaded only into it + sudo cat /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml | sed "s|
s3
|
s3
default|" > /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml.tmp + mv /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml.tmp /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml + sudo chown clickhouse /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml + sudo chgrp clickhouse /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml + # Avoid "Setting s3_check_objects_after_upload is neither a builtin setting..." rm -f /etc/clickhouse-server/users.d/enable_blobs_check.xml ||: rm -f /etc/clickhouse-server/users.d/marks.xml ||: From 0a99d421f58a0476ba035a13a14308615c093374 Mon Sep 17 00:00:00 2001 From: avogar Date: Fri, 27 Jan 2023 13:22:50 +0000 Subject: [PATCH 059/841] Fix formats parser resetting, test processing bad messages in kafka --- .../Executors/StreamingFormatExecutor.cpp | 6 + .../Executors/StreamingFormatExecutor.h | 2 +- .../Impl/BSONEachRowRowInputFormat.cpp | 8 + .../Formats/Impl/BSONEachRowRowInputFormat.h | 2 +- .../Formats/Impl/CSVRowInputFormat.cpp | 6 + .../Formats/Impl/CSVRowInputFormat.h | 1 + .../Formats/Impl/ProtobufRowInputFormat.cpp | 40 +++-- .../Formats/Impl/ProtobufRowInputFormat.h | 8 + .../Impl/TabSeparatedRowInputFormat.cpp | 6 + .../Formats/Impl/TabSeparatedRowInputFormat.h | 1 + src/Storages/Kafka/KafkaSource.cpp | 2 +- tests/integration/helpers/cluster.py | 4 + tests/integration/test_storage_kafka/test.py | 165 ++++++++++++++++++ 13 files changed, 237 insertions(+), 14 deletions(-) diff --git a/src/Processors/Executors/StreamingFormatExecutor.cpp b/src/Processors/Executors/StreamingFormatExecutor.cpp index 91db2c09a20..cfe88344198 100644 --- a/src/Processors/Executors/StreamingFormatExecutor.cpp +++ b/src/Processors/Executors/StreamingFormatExecutor.cpp @@ -93,6 +93,12 @@ size_t StreamingFormatExecutor::execute() format->resetParser(); return on_error(result_columns, e); } + catch (std::exception & e) + { + format->resetParser(); + auto exception = Exception(Exception::CreateFromSTDTag{}, e); + return on_error(result_columns, exception); + } } } diff --git a/src/Processors/Executors/StreamingFormatExecutor.h b/src/Processors/Executors/StreamingFormatExecutor.h index f948d833095..46f22d6deb6 100644 --- a/src/Processors/Executors/StreamingFormatExecutor.h +++ b/src/Processors/Executors/StreamingFormatExecutor.h @@ -24,7 +24,7 @@ public: StreamingFormatExecutor( const Block & header_, InputFormatPtr format_, - ErrorCallback on_error_ = [](const MutableColumns &, Exception &) -> size_t { throw; }, + ErrorCallback on_error_ = [](const MutableColumns &, Exception & e) -> size_t { throw e; }, SimpleTransformPtr adding_defaults_transform_ = nullptr); /// Returns numbers of new read rows. diff --git a/src/Processors/Formats/Impl/BSONEachRowRowInputFormat.cpp b/src/Processors/Formats/Impl/BSONEachRowRowInputFormat.cpp index 349b063fabe..7ff27c0fd7d 100644 --- a/src/Processors/Formats/Impl/BSONEachRowRowInputFormat.cpp +++ b/src/Processors/Formats/Impl/BSONEachRowRowInputFormat.cpp @@ -773,6 +773,14 @@ bool BSONEachRowRowInputFormat::readRow(MutableColumns & columns, RowReadExtensi return true; } +void BSONEachRowRowInputFormat::resetParser() +{ + IRowInputFormat::resetParser(); + read_columns.clear(); + seen_columns.clear(); + prev_positions.clear(); +} + BSONEachRowSchemaReader::BSONEachRowSchemaReader(ReadBuffer & in_, const FormatSettings & settings_) : IRowWithNamesSchemaReader(in_, settings_) { diff --git a/src/Processors/Formats/Impl/BSONEachRowRowInputFormat.h b/src/Processors/Formats/Impl/BSONEachRowRowInputFormat.h index d0830ca2781..ad6d712b6dd 100644 --- a/src/Processors/Formats/Impl/BSONEachRowRowInputFormat.h +++ b/src/Processors/Formats/Impl/BSONEachRowRowInputFormat.h @@ -54,7 +54,7 @@ public: ReadBuffer & in_, const Block & header_, Params params_, const FormatSettings & format_settings_); String getName() const override { return "BSONEachRowRowInputFormat"; } - void resetParser() override { } + void resetParser() override; private: void readPrefix() override { } diff --git a/src/Processors/Formats/Impl/CSVRowInputFormat.cpp b/src/Processors/Formats/Impl/CSVRowInputFormat.cpp index 20b0c204c8e..5f18d1f0c14 100644 --- a/src/Processors/Formats/Impl/CSVRowInputFormat.cpp +++ b/src/Processors/Formats/Impl/CSVRowInputFormat.cpp @@ -102,6 +102,12 @@ void CSVRowInputFormat::setReadBuffer(ReadBuffer & in_) buf->setSubBuffer(in_); } +void CSVRowInputFormat::resetParser() +{ + RowInputFormatWithNamesAndTypes::resetParser(); + buf->reset(); +} + static void skipEndOfLine(ReadBuffer & in) { /// \n (Unix) or \r\n (DOS/Windows) or \n\r (Mac OS Classic) diff --git a/src/Processors/Formats/Impl/CSVRowInputFormat.h b/src/Processors/Formats/Impl/CSVRowInputFormat.h index 86f7fe3466c..f51f674e4af 100644 --- a/src/Processors/Formats/Impl/CSVRowInputFormat.h +++ b/src/Processors/Formats/Impl/CSVRowInputFormat.h @@ -27,6 +27,7 @@ public: String getName() const override { return "CSVRowInputFormat"; } void setReadBuffer(ReadBuffer & in_) override; + void resetParser() override; protected: CSVRowInputFormat(const Block & header_, std::shared_ptr in_, const Params & params_, diff --git a/src/Processors/Formats/Impl/ProtobufRowInputFormat.cpp b/src/Processors/Formats/Impl/ProtobufRowInputFormat.cpp index 40f6a2a54a7..ee60501dba5 100644 --- a/src/Processors/Formats/Impl/ProtobufRowInputFormat.cpp +++ b/src/Processors/Formats/Impl/ProtobufRowInputFormat.cpp @@ -13,21 +13,31 @@ namespace DB ProtobufRowInputFormat::ProtobufRowInputFormat(ReadBuffer & in_, const Block & header_, const Params & params_, const FormatSchemaInfo & schema_info_, bool with_length_delimiter_, bool flatten_google_wrappers_) : IRowInputFormat(header_, in_, params_) - , reader(std::make_unique(in_)) - , serializer(ProtobufSerializer::create( - header_.getNames(), - header_.getDataTypes(), - missing_column_indices, - *ProtobufSchemas::instance().getMessageTypeForFormatSchema(schema_info_, ProtobufSchemas::WithEnvelope::No), - with_length_delimiter_, - /* with_envelope = */ false, - flatten_google_wrappers_, - *reader)) + , message_descriptor(ProtobufSchemas::instance().getMessageTypeForFormatSchema(schema_info_, ProtobufSchemas::WithEnvelope::No)) + , with_length_delimiter(with_length_delimiter_) + , flatten_google_wrappers(flatten_google_wrappers_) { } +void ProtobufRowInputFormat::createReaderAndSerializer() +{ + reader = std::make_unique(*in); + serializer = ProtobufSerializer::create( + getPort().getHeader().getNames(), + getPort().getHeader().getDataTypes(), + missing_column_indices, + *message_descriptor, + with_length_delimiter, + /* with_envelope = */ false, + flatten_google_wrappers, + *reader); +} + bool ProtobufRowInputFormat::readRow(MutableColumns & columns, RowReadExtension & row_read_extension) { + if (!reader) + createReaderAndSerializer(); + if (reader->eof()) return false; @@ -46,7 +56,8 @@ bool ProtobufRowInputFormat::readRow(MutableColumns & columns, RowReadExtension void ProtobufRowInputFormat::setReadBuffer(ReadBuffer & in_) { - reader->setReadBuffer(in_); + if (reader) + reader->setReadBuffer(in_); IRowInputFormat::setReadBuffer(in_); } @@ -60,6 +71,13 @@ void ProtobufRowInputFormat::syncAfterError() reader->endMessage(true); } +void ProtobufRowInputFormat::resetParser() +{ + IRowInputFormat::resetParser(); + serializer.reset(); + reader.reset(); +} + void registerInputFormatProtobuf(FormatFactory & factory) { for (bool with_length_delimiter : {false, true}) diff --git a/src/Processors/Formats/Impl/ProtobufRowInputFormat.h b/src/Processors/Formats/Impl/ProtobufRowInputFormat.h index 2e0ed49b768..5c042f7c5ab 100644 --- a/src/Processors/Formats/Impl/ProtobufRowInputFormat.h +++ b/src/Processors/Formats/Impl/ProtobufRowInputFormat.h @@ -6,6 +6,7 @@ # include # include # include +# include namespace DB { @@ -39,15 +40,22 @@ public: String getName() const override { return "ProtobufRowInputFormat"; } void setReadBuffer(ReadBuffer & in_) override; + void resetParser() override; private: bool readRow(MutableColumns & columns, RowReadExtension & row_read_extension) override; bool allowSyncAfterError() const override; void syncAfterError() override; + void createReaderAndSerializer(); + std::unique_ptr reader; std::vector missing_column_indices; std::unique_ptr serializer; + + const google::protobuf::Descriptor * message_descriptor; + bool with_length_delimiter; + bool flatten_google_wrappers; }; class ProtobufSchemaReader : public IExternalSchemaReader diff --git a/src/Processors/Formats/Impl/TabSeparatedRowInputFormat.cpp b/src/Processors/Formats/Impl/TabSeparatedRowInputFormat.cpp index 868639e66c2..6d86d710d21 100644 --- a/src/Processors/Formats/Impl/TabSeparatedRowInputFormat.cpp +++ b/src/Processors/Formats/Impl/TabSeparatedRowInputFormat.cpp @@ -70,6 +70,12 @@ void TabSeparatedRowInputFormat::setReadBuffer(ReadBuffer & in_) buf->setSubBuffer(in_); } +void TabSeparatedRowInputFormat::resetParser() +{ + RowInputFormatWithNamesAndTypes::resetParser(); + buf->reset(); +} + TabSeparatedFormatReader::TabSeparatedFormatReader(PeekableReadBuffer & in_, const FormatSettings & format_settings_, bool is_raw_) : FormatWithNamesAndTypesReader(in_, format_settings_), buf(&in_), is_raw(is_raw_) { diff --git a/src/Processors/Formats/Impl/TabSeparatedRowInputFormat.h b/src/Processors/Formats/Impl/TabSeparatedRowInputFormat.h index 9edcf86b5de..0f4bff8d7d0 100644 --- a/src/Processors/Formats/Impl/TabSeparatedRowInputFormat.h +++ b/src/Processors/Formats/Impl/TabSeparatedRowInputFormat.h @@ -23,6 +23,7 @@ public: String getName() const override { return "TabSeparatedRowInputFormat"; } void setReadBuffer(ReadBuffer & in_) override; + void resetParser() override; private: TabSeparatedRowInputFormat(const Block & header_, std::unique_ptr in_, const Params & params_, diff --git a/src/Storages/Kafka/KafkaSource.cpp b/src/Storages/Kafka/KafkaSource.cpp index c456ab1550a..880935b8c8f 100644 --- a/src/Storages/Kafka/KafkaSource.cpp +++ b/src/Storages/Kafka/KafkaSource.cpp @@ -133,7 +133,7 @@ Chunk KafkaSource::generateImpl() { e.addMessage("while parsing Kafka message (topic: {}, partition: {}, offset: {})'", consumer->currentTopic(), consumer->currentPartition(), consumer->currentOffset()); - throw; + throw e; } }; diff --git a/tests/integration/helpers/cluster.py b/tests/integration/helpers/cluster.py index 3a65a517d9c..548382a7050 100644 --- a/tests/integration/helpers/cluster.py +++ b/tests/integration/helpers/cluster.py @@ -4386,6 +4386,10 @@ class ClickHouseInstance: objects = objects + self.get_s3_data_objects(path) return objects + def create_format_schema(self, file_name, content): + self.exec_in_container( + ["bash", "-c", "echo '{}' > {}".format(content, "/var/lib/clickhouse/format_schemas/" + file_name)] + ) class ClickHouseKiller(object): def __init__(self, clickhouse_node): diff --git a/tests/integration/test_storage_kafka/test.py b/tests/integration/test_storage_kafka/test.py index 9f617369859..9e79b0bc55f 100644 --- a/tests/integration/test_storage_kafka/test.py +++ b/tests/integration/test_storage_kafka/test.py @@ -4440,6 +4440,171 @@ def test_block_based_formats_2(kafka_cluster): kafka_delete_topic(admin_client, format_name) +def test_bad_messages_parsing(kafka_cluster): + admin_client = KafkaAdminClient( + bootstrap_servers="localhost:{}".format(kafka_cluster.kafka_port) + ) + + for format_name in [ + "TSV", + "TSKV", + "CSV", + "Values", + "JSON", + "JSONEachRow", + "JSONCompactEachRow", + "JSONObjectEachRow", + "Avro", + "RowBinary", + "JSONColumns", + "JSONColumnsWithMetadata", + "Native", + "Arrow", + "ArrowStream", + "Parquet", + "ORC", + "JSONCompactColumns", + "BSONEachRow", + "MySQLDump", + ]: + + print(format_name) + + kafka_create_topic(admin_client, f'{format_name}_err') + + instance.query( + f""" + DROP TABLE IF EXISTS test.view; + DROP TABLE IF EXISTS test.kafka; + + CREATE TABLE test.kafka (key UInt64, value UInt64) + ENGINE = Kafka + SETTINGS kafka_broker_list = 'kafka1:19092', + kafka_topic_list = '{format_name}_err', + kafka_group_name = '{format_name}', + kafka_format = '{format_name}', + kafka_handle_error_mode='stream'; + + CREATE MATERIALIZED VIEW test.view Engine=Log AS + SELECT _error FROM test.kafka WHERE length(_error) != 0 ; + """ + ) + + messages = ["qwertyuiop", "asdfghjkl", "zxcvbnm"] + kafka_produce(kafka_cluster, f'{format_name}_err', messages) + + attempt = 0 + rows = 0 + while attempt < 500: + rows = int(instance.query("SELECT count() FROM test.view")) + if rows == len(messages): + break + attempt += 1 + + assert rows == len(messages) + + kafka_delete_topic(admin_client, f'{format_name}_err') + + protobuf_schema=""" +syntax = "proto3"; + +message Message { + uint64 key = 1; + uint64 value = 2; +}; +""" + + instance.create_format_schema("schema_test_errors.proto", protobuf_schema) + + for format_name in ["Protobuf", "ProtobufSingle", "ProtobufList"]: + instance.query( + f""" + DROP TABLE IF EXISTS test.view; + DROP TABLE IF EXISTS test.kafka; + + CREATE TABLE test.kafka (key UInt64, value UInt64) + ENGINE = Kafka + SETTINGS kafka_broker_list = 'kafka1:19092', + kafka_topic_list = '{format_name}_err', + kafka_group_name = '{format_name}', + kafka_format = '{format_name}', + kafka_handle_error_mode='stream', + kafka_schema='schema_test_errors:Message'; + + CREATE MATERIALIZED VIEW test.view Engine=Log AS + SELECT _error FROM test.kafka WHERE length(_error) != 0 ; + """ + ) + + print(format_name) + + kafka_create_topic(admin_client, f'{format_name}_err') + + messages = ["qwertyuiop", "poiuytrewq", "zxcvbnm"] + kafka_produce(kafka_cluster, f'{format_name}_err', messages) + + attempt = 0 + rows = 0 + while attempt < 500: + rows = int(instance.query("SELECT count() FROM test.view")) + if rows == len(messages): + break + attempt += 1 + + assert rows == len(messages) + + kafka_delete_topic(admin_client, f'{format_name}_err') + + capn_proto_schema=""" +@0xd9dd7b35452d1c4f; + +struct Message +{ + key @0 : UInt64; + value @1 : UInt64; +} +""" + + instance.create_format_schema("schema_test_errors.capnp", capn_proto_schema) + instance.query( + f""" + DROP TABLE IF EXISTS test.view; + DROP TABLE IF EXISTS test.kafka; + + CREATE TABLE test.kafka (key UInt64, value UInt64) + ENGINE = Kafka + SETTINGS kafka_broker_list = 'kafka1:19092', + kafka_topic_list = 'CapnProto_err', + kafka_group_name = 'CapnProto', + kafka_format = 'CapnProto', + kafka_handle_error_mode='stream', + kafka_schema='schema_test_errors:Message'; + + CREATE MATERIALIZED VIEW test.view Engine=Log AS + SELECT _error FROM test.kafka WHERE length(_error) != 0 ; + """ + ) + + print("CapnProto") + + kafka_create_topic(admin_client, 'CapnProto_err') + + messages = ["qwertyuiop", "asdfghjkl", "zxcvbnm"] + kafka_produce(kafka_cluster, 'CapnProto_err', messages) + + attempt = 0 + rows = 0 + while attempt < 500: + rows = int(instance.query("SELECT count() FROM test.view")) + if rows == len(messages): + break + attempt += 1 + + assert rows == len(messages) + + kafka_delete_topic(admin_client, 'CapnProto_err') + + if __name__ == "__main__": cluster.start() input("Cluster created, press any key to destroy...") From 81875fe5591ee37f45b6681e1ff46714d96304ec Mon Sep 17 00:00:00 2001 From: Kruglov Pavel <48961922+Avogar@users.noreply.github.com> Date: Fri, 27 Jan 2023 14:45:10 +0100 Subject: [PATCH 060/841] Update run.sh --- docker/test/upgrade/run.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker/test/upgrade/run.sh b/docker/test/upgrade/run.sh index 37357297d08..89731940dd2 100644 --- a/docker/test/upgrade/run.sh +++ b/docker/test/upgrade/run.sh @@ -267,6 +267,8 @@ else install_packages previous_release_package_folder # Start server from previous release + # Let's enable S3 storage by default + export USE_S3_STORAGE_FOR_MERGE_TREE=1 # Previous version may not be ready for fault injections export ZOOKEEPER_FAULT_INJECTION=0 configure From df4a9f111c56c183465c2c205be31fc0041f33f7 Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Mon, 30 Jan 2023 08:08:20 +0000 Subject: [PATCH 061/841] Disallow creation of temporary tables with ON CLUSTER and with Repliacted table engines --- src/Interpreters/InterpreterCreateQuery.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Interpreters/InterpreterCreateQuery.cpp b/src/Interpreters/InterpreterCreateQuery.cpp index cae18175757..01a6bb76f60 100644 --- a/src/Interpreters/InterpreterCreateQuery.cpp +++ b/src/Interpreters/InterpreterCreateQuery.cpp @@ -924,6 +924,13 @@ void InterpreterCreateQuery::setEngine(ASTCreateQuery & create) const if (create.storage && !create.storage->engine) throw Exception(ErrorCodes::INCORRECT_QUERY, "Invalid storage definition for temporary table: must be either ENGINE = Memory or empty"); */ + + if (!create.cluster.empty()) + throw Exception(ErrorCodes::INCORRECT_QUERY, "Temporary tables cannot be created with ON CLUSTER clause"); + + if (create.storage && create.storage->engine && create.storage->engine->name.starts_with("Replicated")) + throw Exception(ErrorCodes::INCORRECT_QUERY, "Temporary tables cannot be created with Replicated table engines"); + if (!create.storage) { auto engine_ast = std::make_shared(); From c65e90da2c1b9b8427fb5fc3d892ba18137ec3bd Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Tue, 31 Jan 2023 10:45:42 +0000 Subject: [PATCH 062/841] Fix SHOW CREATE TEMPORARY TABLE --- src/Parsers/ASTCreateQuery.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Parsers/ASTCreateQuery.cpp b/src/Parsers/ASTCreateQuery.cpp index d7dc4e217b7..27b65030966 100644 --- a/src/Parsers/ASTCreateQuery.cpp +++ b/src/Parsers/ASTCreateQuery.cpp @@ -288,7 +288,7 @@ void ASTCreateQuery::formatQueryImpl(const FormatSettings & settings, FormatStat << what << " " << (if_not_exists ? "IF NOT EXISTS " : "") << (settings.hilite ? hilite_none : "") - << (database ? backQuoteIfNeed(getDatabase()) + "." : "") << backQuoteIfNeed(getTable()); + << (database && !temporary ? backQuoteIfNeed(getDatabase()) + "." : "") << backQuoteIfNeed(getTable()); if (uuid != UUIDHelpers::Nil) settings.ostr << (settings.hilite ? hilite_keyword : "") << " UUID " << (settings.hilite ? hilite_none : "") From eee7df814926fc323be455c348d0fd8d37e76efc Mon Sep 17 00:00:00 2001 From: Dmitry Novik Date: Wed, 1 Feb 2023 13:33:32 +0000 Subject: [PATCH 063/841] WIP on group_by_use_nulls --- src/Analyzer/ColumnNode.h | 6 ++ src/Analyzer/FunctionNode.cpp | 3 +- src/Analyzer/FunctionNode.h | 13 +++- src/Analyzer/IQueryTreeNode.h | 5 ++ src/Analyzer/Passes/QueryAnalysisPass.cpp | 81 +++++++++++++++++++---- src/Interpreters/ActionsDAG.cpp | 32 ++++++++- src/Interpreters/ActionsDAG.h | 8 +++ src/Planner/PlannerActionsVisitor.cpp | 7 +- src/Planner/PlannerExpressionAnalysis.cpp | 5 +- 9 files changed, 139 insertions(+), 21 deletions(-) diff --git a/src/Analyzer/ColumnNode.h b/src/Analyzer/ColumnNode.h index e378bc5f3d0..79c0e23c86f 100644 --- a/src/Analyzer/ColumnNode.h +++ b/src/Analyzer/ColumnNode.h @@ -3,6 +3,7 @@ #include #include +#include namespace DB { @@ -117,6 +118,11 @@ public: return column.type; } + void convertToNullable() override + { + column.type = makeNullableSafe(column.type); + } + void dumpTreeImpl(WriteBuffer & buffer, FormatState & state, size_t indent) const override; protected: diff --git a/src/Analyzer/FunctionNode.cpp b/src/Analyzer/FunctionNode.cpp index 7961bfbae31..718dcf4bb58 100644 --- a/src/Analyzer/FunctionNode.cpp +++ b/src/Analyzer/FunctionNode.cpp @@ -99,7 +99,7 @@ void FunctionNode::dumpTreeImpl(WriteBuffer & buffer, FormatState & format_state buffer << ", function_type: " << function_type; if (function) - buffer << ", result_type: " + function->getResultType()->getName(); + buffer << ", result_type: " + getResultType()->getName(); const auto & parameters = getParameters(); if (!parameters.getNodes().empty()) @@ -177,6 +177,7 @@ QueryTreeNodePtr FunctionNode::cloneImpl() const */ result_function->function = function; result_function->kind = kind; + result_function->wrap_with_nullable = wrap_with_nullable; return result_function; } diff --git a/src/Analyzer/FunctionNode.h b/src/Analyzer/FunctionNode.h index 41751ec3f09..0311783b433 100644 --- a/src/Analyzer/FunctionNode.h +++ b/src/Analyzer/FunctionNode.h @@ -8,6 +8,7 @@ #include #include #include +#include #include namespace DB @@ -170,7 +171,16 @@ public: throw Exception(ErrorCodes::UNSUPPORTED_METHOD, "Function node with name '{}' is not resolved", function_name); - return function->getResultType(); + auto type = function->getResultType(); + if (wrap_with_nullable) + return makeNullableSafe(type); + return type; + } + + void convertToNullable() override + { + chassert(kind == FunctionKind::ORDINARY); + wrap_with_nullable = true; } void dumpTreeImpl(WriteBuffer & buffer, FormatState & format_state, size_t indent) const override; @@ -188,6 +198,7 @@ private: String function_name; FunctionKind kind = FunctionKind::UNKNOWN; IResolvedFunctionPtr function; + bool wrap_with_nullable = false; static constexpr size_t parameters_child_index = 0; static constexpr size_t arguments_child_index = 1; diff --git a/src/Analyzer/IQueryTreeNode.h b/src/Analyzer/IQueryTreeNode.h index 8aa834e60b7..3c8e73b9e31 100644 --- a/src/Analyzer/IQueryTreeNode.h +++ b/src/Analyzer/IQueryTreeNode.h @@ -90,6 +90,11 @@ public: throw Exception(ErrorCodes::UNSUPPORTED_METHOD, "Method getResultType is not supported for {} query node", getNodeTypeName()); } + virtual void convertToNullable() + { + throw Exception(ErrorCodes::UNSUPPORTED_METHOD, "Method convertToNullable is not supported for {} query node", getNodeTypeName()); + } + /** Is tree equal to other tree with node root. * * Aliases of query tree nodes are compared during isEqual call. diff --git a/src/Analyzer/Passes/QueryAnalysisPass.cpp b/src/Analyzer/Passes/QueryAnalysisPass.cpp index 7d1f636754c..4c1d6d309d6 100644 --- a/src/Analyzer/Passes/QueryAnalysisPass.cpp +++ b/src/Analyzer/Passes/QueryAnalysisPass.cpp @@ -1,5 +1,6 @@ #include +#include "Common/logger_useful.h" #include #include @@ -446,6 +447,9 @@ public: alias_name_to_expressions[node_alias].push_back(node); } + if (const auto * function = node->as()) + LOG_DEBUG(&Poco::Logger::get("ExpressionsStack"), "Pushed function {} on stack", function->getFunctionName()); + expressions.emplace_back(node); } @@ -464,6 +468,9 @@ public: alias_name_to_expressions.erase(it); } + if (const auto * function = top_expression->as()) + LOG_DEBUG(&Poco::Logger::get("ExpressionsStack"), "Poped function {} on stack", function->getFunctionName()); + expressions.pop_back(); } @@ -482,6 +489,22 @@ public: return alias_name_to_expressions.contains(alias); } + bool hasAggregateFunction() const + { + const auto & factory = AggregateFunctionFactory::instance(); + for (const auto & node : expressions) + { + const auto * function = node->as(); + if (!function) + continue; + + if (factory.isAggregateFunctionName(function->getFunctionName())) + return true; + LOG_DEBUG(&Poco::Logger::get("ExpressionsStack"), "Function {} is being resolved, but is not aggregate", function->getFunctionName()); + } + return false; + } + QueryTreeNodePtr getExpressionWithAlias(const std::string & alias) const { auto expression_it = alias_name_to_expressions.find(alias); @@ -708,6 +731,8 @@ struct IdentifierResolveScope /// Table expression node to data std::unordered_map table_expression_node_to_data; + QueryTreeNodePtrWithHashSet nullable_group_by_keys; + /// Use identifier lookup to result cache bool use_identifier_lookup_to_result_cache = true; @@ -1221,7 +1246,6 @@ private: /// Results of scalar sub queries std::unordered_map> scalars; - }; /// Utility functions implementation @@ -3092,6 +3116,11 @@ IdentifierResolveResult QueryAnalyzer::tryResolveIdentifier(const IdentifierLook resolve_result.resolve_place = IdentifierResolvePlace::DATABASE_CATALOG; } + if (resolve_result.resolved_identifier + && scope.nullable_group_by_keys.contains(resolve_result.resolved_identifier) + && !scope.expressions_in_resolve_process_stack.hasAggregateFunction()) + resolve_result.resolved_identifier->convertToNullable(); + it->second = resolve_result; /** If identifier was not resolved, or during expression resolution identifier was explicitly added into non cached set, @@ -3099,7 +3128,8 @@ IdentifierResolveResult QueryAnalyzer::tryResolveIdentifier(const IdentifierLook */ if (!resolve_result.resolved_identifier || scope.non_cached_identifier_lookups_during_expression_resolve.contains(identifier_lookup) || - !scope.use_identifier_lookup_to_result_cache) + !scope.use_identifier_lookup_to_result_cache || + scope.context->getSettingsRef().group_by_use_nulls) scope.identifier_lookup_to_result.erase(it); return resolve_result; @@ -4627,6 +4657,8 @@ ProjectionNames QueryAnalyzer::resolveFunction(QueryTreeNodePtr & node, Identifi } function_node.resolveAsFunction(std::move(function_base)); + if (settings.group_by_use_nulls && scope.nullable_group_by_keys.contains(node)) + function_node.convertToNullable(); } catch (Exception & e) { @@ -5873,9 +5905,6 @@ void QueryAnalyzer::resolveQuery(const QueryTreeNodePtr & query_node, Identifier auto & query_node_typed = query_node->as(); const auto & settings = scope.context->getSettingsRef(); - if (settings.group_by_use_nulls) - throw Exception(ErrorCodes::UNSUPPORTED_METHOD, "GROUP BY use nulls is not supported"); - bool is_rollup_or_cube = query_node_typed.isGroupByWithRollup() || query_node_typed.isGroupByWithCube(); if (query_node_typed.isGroupByWithGroupingSets() && query_node_typed.isGroupByWithTotals()) @@ -6011,16 +6040,11 @@ void QueryAnalyzer::resolveQuery(const QueryTreeNodePtr & query_node, Identifier resolveQueryJoinTreeNode(query_node_typed.getJoinTree(), scope, visitor); } - scope.use_identifier_lookup_to_result_cache = true; + if (!settings.group_by_use_nulls) + scope.use_identifier_lookup_to_result_cache = true; /// Resolve query node sections. - auto projection_columns = resolveProjectionExpressionNodeList(query_node_typed.getProjectionNode(), scope); - if (query_node_typed.getProjection().getNodes().empty()) - throw Exception(ErrorCodes::EMPTY_LIST_OF_COLUMNS_QUERIED, - "Empty list of columns in projection. In scope {}", - scope.scope_node->formatASTForErrorMessage()); - if (query_node_typed.hasWith()) resolveExpressionNodeList(query_node_typed.getWithNode(), scope, true /*allow_lambda_expression*/, false /*allow_table_expression*/); @@ -6041,6 +6065,17 @@ void QueryAnalyzer::resolveQuery(const QueryTreeNodePtr & query_node, Identifier resolveExpressionNodeList(grouping_sets_keys_list_node, scope, false /*allow_lambda_expression*/, false /*allow_table_expression*/); } + + for (const auto & grouping_set : query_node_typed.getGroupBy().getNodes()) + { + for (const auto & group_by_elem : grouping_set->as()->getNodes()) + scope.nullable_group_by_keys.insert(group_by_elem->clone()); + } + // for (const auto & grouping_set : query_node_typed.getGroupBy().getNodes()) + // { + // for (const auto & group_by_elem : grouping_set->as()->getNodes()) + // group_by_elem->convertToNullable(); + // } } else { @@ -6048,6 +6083,14 @@ void QueryAnalyzer::resolveQuery(const QueryTreeNodePtr & query_node, Identifier replaceNodesWithPositionalArguments(query_node_typed.getGroupByNode(), query_node_typed.getProjection().getNodes(), scope); resolveExpressionNodeList(query_node_typed.getGroupByNode(), scope, false /*allow_lambda_expression*/, false /*allow_table_expression*/); + + if (settings.group_by_use_nulls) + { + for (const auto & group_by_elem : query_node_typed.getGroupBy().getNodes()) + scope.nullable_group_by_keys.insert(group_by_elem->clone()); + // for (const auto & group_by_elem : query_node_typed.getGroupBy().getNodes()) + // group_by_elem->convertToNullable(); + } } } @@ -6100,6 +6143,12 @@ void QueryAnalyzer::resolveQuery(const QueryTreeNodePtr & query_node, Identifier validateLimitOffsetExpression(query_node_typed.getOffset(), "OFFSET", scope); } + auto projection_columns = resolveProjectionExpressionNodeList(query_node_typed.getProjectionNode(), scope); + if (query_node_typed.getProjection().getNodes().empty()) + throw Exception(ErrorCodes::EMPTY_LIST_OF_COLUMNS_QUERIED, + "Empty list of columns in projection. In scope {}", + scope.scope_node->formatASTForErrorMessage()); + /** Resolve nodes with duplicate aliases. * Table expressions cannot have duplicate aliases. * @@ -6234,7 +6283,9 @@ void QueryAnalyzer::resolveQuery(const QueryTreeNodePtr & query_node, Identifier if (grouping_set_key->as()) continue; - group_by_keys_nodes.push_back(grouping_set_key); + group_by_keys_nodes.push_back(grouping_set_key->clone()); + if (settings.group_by_use_nulls) + group_by_keys_nodes.back()->convertToNullable(); } } else @@ -6242,7 +6293,9 @@ void QueryAnalyzer::resolveQuery(const QueryTreeNodePtr & query_node, Identifier if (node->as()) continue; - group_by_keys_nodes.push_back(node); + group_by_keys_nodes.push_back(node->clone()); + if (settings.group_by_use_nulls) + group_by_keys_nodes.back()->convertToNullable(); } } diff --git a/src/Interpreters/ActionsDAG.cpp b/src/Interpreters/ActionsDAG.cpp index 5f1398fed39..4e7dfe2bef5 100644 --- a/src/Interpreters/ActionsDAG.cpp +++ b/src/Interpreters/ActionsDAG.cpp @@ -1,5 +1,6 @@ #include +#include #include #include #include @@ -199,6 +200,23 @@ const ActionsDAG::Node & ActionsDAG::addFunction( std::move(children), std::move(arguments), std::move(result_name), + function_base->getResultType(), + all_const); +} + +const ActionsDAG::Node & ActionsDAG::addFunction( + const FunctionNode & function, + NodeRawConstPtrs children, + std::string result_name) +{ + auto [arguments, all_const] = getFunctionArguments(children); + + return addFunctionImpl( + function.getFunction(), + std::move(children), + std::move(arguments), + std::move(result_name), + function.getResultType(), all_const); } @@ -214,6 +232,7 @@ const ActionsDAG::Node & ActionsDAG::addFunction( std::move(children), std::move(arguments), std::move(result_name), + function_base->getResultType(), all_const); } @@ -238,6 +257,7 @@ const ActionsDAG::Node & ActionsDAG::addFunctionImpl( NodeRawConstPtrs children, ColumnsWithTypeAndName arguments, std::string result_name, + DataTypePtr result_type, bool all_const) { size_t num_arguments = children.size(); @@ -247,7 +267,7 @@ const ActionsDAG::Node & ActionsDAG::addFunctionImpl( node.children = std::move(children); node.function_base = function_base; - node.result_type = node.function_base->getResultType(); + node.result_type = result_type; node.function = node.function_base->prepare(arguments); node.is_deterministic = node.function_base->isDeterministic(); @@ -2236,7 +2256,15 @@ ActionsDAGPtr ActionsDAG::buildFilterActionsDAG( for (const auto & child : node->children) function_children.push_back(node_to_result_node.find(child)->second); - result_node = &result_dag->addFunction(node->function_base, std::move(function_children), {}); + auto [arguments, all_const] = getFunctionArguments(function_children); + + result_node = &result_dag->addFunctionImpl( + node->function_base, + std::move(function_children), + std::move(arguments), + {}, + node->result_type, + all_const); break; } } diff --git a/src/Interpreters/ActionsDAG.h b/src/Interpreters/ActionsDAG.h index 40bc76fe057..0b240feea0e 100644 --- a/src/Interpreters/ActionsDAG.h +++ b/src/Interpreters/ActionsDAG.h @@ -23,6 +23,8 @@ using FunctionBasePtr = std::shared_ptr; class IFunctionOverloadResolver; using FunctionOverloadResolverPtr = std::shared_ptr; +class FunctionNode; + class IDataType; using DataTypePtr = std::shared_ptr; @@ -139,10 +141,15 @@ public: const FunctionOverloadResolverPtr & function, NodeRawConstPtrs children, std::string result_name); + const Node & addFunction( + const FunctionNode & function, + NodeRawConstPtrs children, + std::string result_name); const Node & addFunction( const FunctionBasePtr & function_base, NodeRawConstPtrs children, std::string result_name); + const Node & addCast(const Node & node_to_cast, const DataTypePtr & cast_type); /// Find first column by name in output nodes. This search is linear. @@ -357,6 +364,7 @@ private: NodeRawConstPtrs children, ColumnsWithTypeAndName arguments, std::string result_name, + DataTypePtr result_type, bool all_const); #if USE_EMBEDDED_COMPILER diff --git a/src/Planner/PlannerActionsVisitor.cpp b/src/Planner/PlannerActionsVisitor.cpp index 95edd93dd9f..13c88d47ca3 100644 --- a/src/Planner/PlannerActionsVisitor.cpp +++ b/src/Planner/PlannerActionsVisitor.cpp @@ -29,6 +29,7 @@ #include #include #include +#include namespace DB { @@ -82,6 +83,7 @@ public: node_name, actions_dag->dumpNames()); + LOG_DEBUG(&Poco::Logger::get("ActionsScopeNode"), "Node: {} {}", it->second->result_name, it->second->result_type->getName()); return it->second; } @@ -122,7 +124,7 @@ public: } template - const ActionsDAG::Node * addFunctionIfNecessary(const std::string & node_name, ActionsDAG::NodeRawConstPtrs children, FunctionOrOverloadResolver function) + const ActionsDAG::Node * addFunctionIfNecessary(const std::string & node_name, ActionsDAG::NodeRawConstPtrs children, const FunctionOrOverloadResolver & function) { auto it = node_name_to_node.find(node_name); if (it != node_name_to_node.end()) @@ -225,6 +227,7 @@ PlannerActionsVisitorImpl::NodeNameAndNodeMinLevel PlannerActionsVisitorImpl::vi PlannerActionsVisitorImpl::NodeNameAndNodeMinLevel PlannerActionsVisitorImpl::visitColumn(const QueryTreeNodePtr & node) { auto column_node_name = calculateActionNodeName(node, *planner_context, node_to_node_name); + LOG_DEBUG(&Poco::Logger::get("PlannerActionsVisitorImpl"), "Processing column with name: {}", column_node_name); const auto & column_node = node->as(); Int64 actions_stack_size = static_cast(actions_stack.size() - 1); @@ -445,7 +448,7 @@ PlannerActionsVisitorImpl::NodeNameAndNodeMinLevel PlannerActionsVisitorImpl::vi } else { - actions_stack[level].addFunctionIfNecessary(function_node_name, children, function_node.getFunction()); + actions_stack[level].addFunctionIfNecessary(function_node_name, children, function_node); } size_t actions_stack_size = actions_stack.size(); diff --git a/src/Planner/PlannerExpressionAnalysis.cpp b/src/Planner/PlannerExpressionAnalysis.cpp index b1017c99c3e..3df6ef640c7 100644 --- a/src/Planner/PlannerExpressionAnalysis.cpp +++ b/src/Planner/PlannerExpressionAnalysis.cpp @@ -299,6 +299,7 @@ ProjectionAnalysisResult analyzeProjection(const QueryNode & query_node, { const auto * chain_available_output_columns = actions_chain.getLastStepAvailableOutputColumnsOrNull(); const auto & projection_input = chain_available_output_columns ? *chain_available_output_columns : join_tree_input_columns; + LOG_DEBUG(&Poco::Logger::get("PlannerExpressionAnalysis"), "Projection node: {}", query_node.getProjectionNode()->dumpTree()); auto projection_actions = buildActionsDAGFromExpressionNode(query_node.getProjectionNode(), projection_input, planner_context); auto projection_columns = query_node.getProjectionColumns(); @@ -320,6 +321,7 @@ ProjectionAnalysisResult analyzeProjection(const QueryNode & query_node, for (size_t i = 0; i < projection_outputs_size; ++i) { auto & projection_column = projection_columns[i]; + LOG_DEBUG(&Poco::Logger::get("PlannerExpressionAnalysis"), "Projection column {}: {} {}", i, projection_column.name, projection_column.type->getName()); const auto * projection_node = projection_actions_outputs[i]; const auto & projection_node_name = projection_node->result_name; @@ -436,7 +438,6 @@ PlannerExpressionsAnalysisResult buildExpressionAnalysisResult(const QueryTreeNo } auto window_analysis_result_optional = analyzeWindow(query_tree, join_tree_input_columns, planner_context, actions_chain); - auto projection_analysis_result = analyzeProjection(query_node, join_tree_input_columns, planner_context, actions_chain); std::optional sort_analysis_result_optional; if (query_node.hasOrderBy()) @@ -447,6 +448,8 @@ PlannerExpressionsAnalysisResult buildExpressionAnalysisResult(const QueryTreeNo if (query_node.hasLimitBy()) limit_by_analysis_result_optional = analyzeLimitBy(query_node, join_tree_input_columns, planner_context, actions_chain); + auto projection_analysis_result = analyzeProjection(query_node, join_tree_input_columns, planner_context, actions_chain); + const auto * chain_available_output_columns = actions_chain.getLastStepAvailableOutputColumnsOrNull(); const auto & project_names_input = chain_available_output_columns ? *chain_available_output_columns : join_tree_input_columns; auto project_names_actions = std::make_shared(project_names_input); From f505b798da9282f7b1e2dfa8481bb299a5f365af Mon Sep 17 00:00:00 2001 From: Dmitry Novik Date: Wed, 1 Feb 2023 17:18:15 +0000 Subject: [PATCH 064/841] Fix ActionDAG construction with group_by_use_nulls --- src/Planner/PlannerExpressionAnalysis.cpp | 80 +++++++++++++---------- 1 file changed, 47 insertions(+), 33 deletions(-) diff --git a/src/Planner/PlannerExpressionAnalysis.cpp b/src/Planner/PlannerExpressionAnalysis.cpp index 3df6ef640c7..c7d38839c85 100644 --- a/src/Planner/PlannerExpressionAnalysis.cpp +++ b/src/Planner/PlannerExpressionAnalysis.cpp @@ -16,6 +16,8 @@ #include #include #include +#include "Common/tests/gtest_global_context.h" +#include "DataTypes/DataTypeNullable.h" namespace DB { @@ -33,12 +35,11 @@ namespace * It is client responsibility to update filter analysis result if filter column must be removed after chain is finalized. */ FilterAnalysisResult analyzeFilter(const QueryTreeNodePtr & filter_expression_node, - const ColumnsWithTypeAndName & join_tree_input_columns, + const ColumnsWithTypeAndName & current_output_columns, const PlannerContextPtr & planner_context, ActionsChain & actions_chain) { - const auto * chain_available_output_columns = actions_chain.getLastStepAvailableOutputColumnsOrNull(); - const auto & filter_input = chain_available_output_columns ? *chain_available_output_columns : join_tree_input_columns; + const auto & filter_input = current_output_columns; FilterAnalysisResult result; @@ -52,8 +53,8 @@ FilterAnalysisResult analyzeFilter(const QueryTreeNodePtr & filter_expression_no /** Construct aggregation analysis result if query tree has GROUP BY or aggregates. * Actions before aggregation are added into actions chain, if result is not null optional. */ -std::optional analyzeAggregation(const QueryTreeNodePtr & query_tree, - const ColumnsWithTypeAndName & join_tree_input_columns, +std::pair, std::optional> analyzeAggregation(const QueryTreeNodePtr & query_tree, + const ColumnsWithTypeAndName & current_output_columns, const PlannerContextPtr & planner_context, ActionsChain & actions_chain) { @@ -62,15 +63,12 @@ std::optional analyzeAggregation(const QueryTreeNodeP auto aggregate_function_nodes = collectAggregateFunctionNodes(query_tree); auto aggregates_descriptions = extractAggregateDescriptions(aggregate_function_nodes, *planner_context); - ColumnsWithTypeAndName aggregates_columns; - aggregates_columns.reserve(aggregates_descriptions.size()); - for (auto & aggregate_description : aggregates_descriptions) - aggregates_columns.emplace_back(nullptr, aggregate_description.function->getResultType(), aggregate_description.column_name); + ColumnsWithTypeAndName aggregated_columns; + aggregated_columns.reserve(aggregates_descriptions.size()); Names aggregation_keys; - const auto * chain_available_output_columns = actions_chain.getLastStepAvailableOutputColumnsOrNull(); - const auto & group_by_input = chain_available_output_columns ? *chain_available_output_columns : join_tree_input_columns; + const auto & group_by_input = current_output_columns; ActionsDAGPtr before_aggregation_actions = std::make_shared(group_by_input); before_aggregation_actions->getOutputs().clear(); @@ -83,6 +81,7 @@ std::optional analyzeAggregation(const QueryTreeNodeP PlannerActionsVisitor actions_visitor(planner_context); /// Add expressions from GROUP BY + bool group_by_use_nulls = planner_context->getQueryContext()->getSettingsRef().group_by_use_nulls; if (query_node.hasGroupBy()) { @@ -107,6 +106,8 @@ std::optional analyzeAggregation(const QueryTreeNodeP if (before_aggregation_actions_output_node_names.contains(expression_dag_node->result_name)) continue; + auto expression_type_after_aggregation = group_by_use_nulls ? makeNullableSafe(expression_dag_node->result_type) : expression_dag_node->result_type; + aggregated_columns.emplace_back(nullptr, expression_type_after_aggregation, expression_dag_node->result_name); aggregation_keys.push_back(expression_dag_node->result_name); before_aggregation_actions->getOutputs().push_back(expression_dag_node); before_aggregation_actions_output_node_names.insert(expression_dag_node->result_name); @@ -150,6 +151,8 @@ std::optional analyzeAggregation(const QueryTreeNodeP if (before_aggregation_actions_output_node_names.contains(expression_dag_node->result_name)) continue; + auto expression_type_after_aggregation = group_by_use_nulls ? makeNullableSafe(expression_dag_node->result_type) : expression_dag_node->result_type; + aggregated_columns.emplace_back(nullptr, expression_type_after_aggregation, expression_dag_node->result_name); aggregation_keys.push_back(expression_dag_node->result_name); before_aggregation_actions->getOutputs().push_back(expression_dag_node); before_aggregation_actions_output_node_names.insert(expression_dag_node->result_name); @@ -157,6 +160,9 @@ std::optional analyzeAggregation(const QueryTreeNodeP } } + for (auto & aggregate_description : aggregates_descriptions) + aggregated_columns.emplace_back(nullptr, aggregate_description.function->getResultType(), aggregate_description.column_name); + /// Add expressions from aggregate functions arguments for (auto & aggregate_function_node : aggregate_function_nodes) @@ -183,10 +189,10 @@ std::optional analyzeAggregation(const QueryTreeNodeP * With set number, which is used as an additional key at the stage of merging aggregating data. */ if (query_node.isGroupByWithRollup() || query_node.isGroupByWithCube() || query_node.isGroupByWithGroupingSets()) - aggregates_columns.emplace_back(nullptr, std::make_shared(), "__grouping_set"); + aggregated_columns.emplace_back(nullptr, std::make_shared(), "__grouping_set"); /// Only aggregation keys and aggregates are available for next steps after GROUP BY step - auto aggregate_step = std::make_unique(before_aggregation_actions, ActionsChainStep::AvailableOutputColumnsStrategy::OUTPUT_NODES, aggregates_columns); + auto aggregate_step = std::make_unique(before_aggregation_actions, ActionsChainStep::AvailableOutputColumnsStrategy::OUTPUT_NODES, aggregated_columns); actions_chain.addStep(std::move(aggregate_step)); AggregationAnalysisResult aggregation_analysis_result; @@ -196,14 +202,14 @@ std::optional analyzeAggregation(const QueryTreeNodeP aggregation_analysis_result.grouping_sets_parameters_list = std::move(grouping_sets_parameters_list); aggregation_analysis_result.group_by_with_constant_keys = group_by_with_constant_keys; - return aggregation_analysis_result; + return { aggregation_analysis_result, aggregated_columns }; } /** Construct window analysis result if query tree has window functions. * Actions before window functions are added into actions chain, if result is not null optional. */ std::optional analyzeWindow(const QueryTreeNodePtr & query_tree, - const ColumnsWithTypeAndName & join_tree_input_columns, + const ColumnsWithTypeAndName & current_output_columns, const PlannerContextPtr & planner_context, ActionsChain & actions_chain) { @@ -213,8 +219,7 @@ std::optional analyzeWindow(const QueryTreeNodePtr & query auto window_descriptions = extractWindowDescriptions(window_function_nodes, *planner_context); - const auto * chain_available_output_columns = actions_chain.getLastStepAvailableOutputColumnsOrNull(); - const auto & window_input = chain_available_output_columns ? *chain_available_output_columns : join_tree_input_columns; + const auto & window_input = current_output_columns; PlannerActionsVisitor actions_visitor(planner_context); @@ -293,12 +298,11 @@ std::optional analyzeWindow(const QueryTreeNodePtr & query * It is client responsibility to update projection analysis result with project names actions after chain is finalized. */ ProjectionAnalysisResult analyzeProjection(const QueryNode & query_node, - const ColumnsWithTypeAndName & join_tree_input_columns, + const ColumnsWithTypeAndName & current_output_columns, const PlannerContextPtr & planner_context, ActionsChain & actions_chain) { - const auto * chain_available_output_columns = actions_chain.getLastStepAvailableOutputColumnsOrNull(); - const auto & projection_input = chain_available_output_columns ? *chain_available_output_columns : join_tree_input_columns; + const auto & projection_input = current_output_columns; LOG_DEBUG(&Poco::Logger::get("PlannerExpressionAnalysis"), "Projection node: {}", query_node.getProjectionNode()->dumpTree()); auto projection_actions = buildActionsDAGFromExpressionNode(query_node.getProjectionNode(), projection_input, planner_context); @@ -344,12 +348,11 @@ ProjectionAnalysisResult analyzeProjection(const QueryNode & query_node, * Actions before sort are added into actions chain. */ SortAnalysisResult analyzeSort(const QueryNode & query_node, - const ColumnsWithTypeAndName & join_tree_input_columns, + const ColumnsWithTypeAndName & current_output_columns, const PlannerContextPtr & planner_context, ActionsChain & actions_chain) { - const auto *chain_available_output_columns = actions_chain.getLastStepAvailableOutputColumnsOrNull(); - const auto & order_by_input = chain_available_output_columns ? *chain_available_output_columns : join_tree_input_columns; + const auto & order_by_input = current_output_columns; ActionsDAGPtr before_sort_actions = std::make_shared(order_by_input); auto & before_sort_actions_outputs = before_sort_actions->getOutputs(); @@ -388,12 +391,11 @@ SortAnalysisResult analyzeSort(const QueryNode & query_node, * Actions before limit by are added into actions chain. */ LimitByAnalysisResult analyzeLimitBy(const QueryNode & query_node, - const ColumnsWithTypeAndName & join_tree_input_columns, + const ColumnsWithTypeAndName & current_output_columns, const PlannerContextPtr & planner_context, ActionsChain & actions_chain) { - const auto * chain_available_output_columns = actions_chain.getLastStepAvailableOutputColumnsOrNull(); - const auto & limit_by_input = chain_available_output_columns ? *chain_available_output_columns : join_tree_input_columns; + const auto & limit_by_input = current_output_columns; auto before_limit_by_actions = buildActionsDAGFromExpressionNode(query_node.getLimitByNode(), limit_by_input, planner_context); Names limit_by_column_names; @@ -420,35 +422,47 @@ PlannerExpressionsAnalysisResult buildExpressionAnalysisResult(const QueryTreeNo std::optional where_analysis_result_optional; std::optional where_action_step_index_optional; + ColumnsWithTypeAndName current_output_columns = join_tree_input_columns; + if (query_node.hasWhere()) { - where_analysis_result_optional = analyzeFilter(query_node.getWhere(), join_tree_input_columns, planner_context, actions_chain); + where_analysis_result_optional = analyzeFilter(query_node.getWhere(), current_output_columns, planner_context, actions_chain); where_action_step_index_optional = actions_chain.getLastStepIndex(); + current_output_columns = actions_chain.getLastStepAvailableOutputColumns(); } - auto aggregation_analysis_result_optional = analyzeAggregation(query_tree, join_tree_input_columns, planner_context, actions_chain); + auto [aggregation_analysis_result_optional, aggregated_columns_optional] = analyzeAggregation(query_tree, current_output_columns, planner_context, actions_chain); + if (aggregated_columns_optional) + current_output_columns = std::move(*aggregated_columns_optional); std::optional having_analysis_result_optional; std::optional having_action_step_index_optional; if (query_node.hasHaving()) { - having_analysis_result_optional = analyzeFilter(query_node.getHaving(), join_tree_input_columns, planner_context, actions_chain); + having_analysis_result_optional = analyzeFilter(query_node.getHaving(), current_output_columns, planner_context, actions_chain); having_action_step_index_optional = actions_chain.getLastStepIndex(); + current_output_columns = actions_chain.getLastStepAvailableOutputColumns(); } - auto window_analysis_result_optional = analyzeWindow(query_tree, join_tree_input_columns, planner_context, actions_chain); + auto window_analysis_result_optional = analyzeWindow(query_tree, current_output_columns, planner_context, actions_chain); std::optional sort_analysis_result_optional; if (query_node.hasOrderBy()) - sort_analysis_result_optional = analyzeSort(query_node, join_tree_input_columns, planner_context, actions_chain); + { + sort_analysis_result_optional = analyzeSort(query_node, current_output_columns, planner_context, actions_chain); + current_output_columns = actions_chain.getLastStepAvailableOutputColumns(); + } std::optional limit_by_analysis_result_optional; if (query_node.hasLimitBy()) - limit_by_analysis_result_optional = analyzeLimitBy(query_node, join_tree_input_columns, planner_context, actions_chain); + { + limit_by_analysis_result_optional = analyzeLimitBy(query_node, current_output_columns, planner_context, actions_chain); + current_output_columns = actions_chain.getLastStepAvailableOutputColumns(); + } - auto projection_analysis_result = analyzeProjection(query_node, join_tree_input_columns, planner_context, actions_chain); + auto projection_analysis_result = analyzeProjection(query_node, current_output_columns, planner_context, actions_chain); const auto * chain_available_output_columns = actions_chain.getLastStepAvailableOutputColumnsOrNull(); const auto & project_names_input = chain_available_output_columns ? *chain_available_output_columns : join_tree_input_columns; From 7e40ab7658e1ad02acbd8ddf7067f4091a07338e Mon Sep 17 00:00:00 2001 From: Dmitry Novik Date: Wed, 1 Feb 2023 18:04:19 +0000 Subject: [PATCH 065/841] Update output columns after WindowStep --- src/Planner/PlannerExpressionAnalysis.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Planner/PlannerExpressionAnalysis.cpp b/src/Planner/PlannerExpressionAnalysis.cpp index c7d38839c85..79feb501f37 100644 --- a/src/Planner/PlannerExpressionAnalysis.cpp +++ b/src/Planner/PlannerExpressionAnalysis.cpp @@ -446,6 +446,8 @@ PlannerExpressionsAnalysisResult buildExpressionAnalysisResult(const QueryTreeNo } auto window_analysis_result_optional = analyzeWindow(query_tree, current_output_columns, planner_context, actions_chain); + if (window_analysis_result_optional) + current_output_columns = actions_chain.getLastStepAvailableOutputColumns(); std::optional sort_analysis_result_optional; if (query_node.hasOrderBy()) From d589864828ed31dcba034947375acf98a6897948 Mon Sep 17 00:00:00 2001 From: Dmitry Novik Date: Wed, 1 Feb 2023 18:12:13 +0000 Subject: [PATCH 066/841] Cleanup code --- src/Analyzer/Passes/QueryAnalysisPass.cpp | 14 -------------- src/Planner/PlannerActionsVisitor.cpp | 3 --- src/Planner/PlannerExpressionAnalysis.cpp | 5 +---- 3 files changed, 1 insertion(+), 21 deletions(-) diff --git a/src/Analyzer/Passes/QueryAnalysisPass.cpp b/src/Analyzer/Passes/QueryAnalysisPass.cpp index 4c1d6d309d6..003944fa8b0 100644 --- a/src/Analyzer/Passes/QueryAnalysisPass.cpp +++ b/src/Analyzer/Passes/QueryAnalysisPass.cpp @@ -447,9 +447,6 @@ public: alias_name_to_expressions[node_alias].push_back(node); } - if (const auto * function = node->as()) - LOG_DEBUG(&Poco::Logger::get("ExpressionsStack"), "Pushed function {} on stack", function->getFunctionName()); - expressions.emplace_back(node); } @@ -468,9 +465,6 @@ public: alias_name_to_expressions.erase(it); } - if (const auto * function = top_expression->as()) - LOG_DEBUG(&Poco::Logger::get("ExpressionsStack"), "Poped function {} on stack", function->getFunctionName()); - expressions.pop_back(); } @@ -500,7 +494,6 @@ public: if (factory.isAggregateFunctionName(function->getFunctionName())) return true; - LOG_DEBUG(&Poco::Logger::get("ExpressionsStack"), "Function {} is being resolved, but is not aggregate", function->getFunctionName()); } return false; } @@ -6071,11 +6064,6 @@ void QueryAnalyzer::resolveQuery(const QueryTreeNodePtr & query_node, Identifier for (const auto & group_by_elem : grouping_set->as()->getNodes()) scope.nullable_group_by_keys.insert(group_by_elem->clone()); } - // for (const auto & grouping_set : query_node_typed.getGroupBy().getNodes()) - // { - // for (const auto & group_by_elem : grouping_set->as()->getNodes()) - // group_by_elem->convertToNullable(); - // } } else { @@ -6088,8 +6076,6 @@ void QueryAnalyzer::resolveQuery(const QueryTreeNodePtr & query_node, Identifier { for (const auto & group_by_elem : query_node_typed.getGroupBy().getNodes()) scope.nullable_group_by_keys.insert(group_by_elem->clone()); - // for (const auto & group_by_elem : query_node_typed.getGroupBy().getNodes()) - // group_by_elem->convertToNullable(); } } } diff --git a/src/Planner/PlannerActionsVisitor.cpp b/src/Planner/PlannerActionsVisitor.cpp index 13c88d47ca3..6bd245858fe 100644 --- a/src/Planner/PlannerActionsVisitor.cpp +++ b/src/Planner/PlannerActionsVisitor.cpp @@ -29,7 +29,6 @@ #include #include #include -#include namespace DB { @@ -83,7 +82,6 @@ public: node_name, actions_dag->dumpNames()); - LOG_DEBUG(&Poco::Logger::get("ActionsScopeNode"), "Node: {} {}", it->second->result_name, it->second->result_type->getName()); return it->second; } @@ -227,7 +225,6 @@ PlannerActionsVisitorImpl::NodeNameAndNodeMinLevel PlannerActionsVisitorImpl::vi PlannerActionsVisitorImpl::NodeNameAndNodeMinLevel PlannerActionsVisitorImpl::visitColumn(const QueryTreeNodePtr & node) { auto column_node_name = calculateActionNodeName(node, *planner_context, node_to_node_name); - LOG_DEBUG(&Poco::Logger::get("PlannerActionsVisitorImpl"), "Processing column with name: {}", column_node_name); const auto & column_node = node->as(); Int64 actions_stack_size = static_cast(actions_stack.size() - 1); diff --git a/src/Planner/PlannerExpressionAnalysis.cpp b/src/Planner/PlannerExpressionAnalysis.cpp index 79feb501f37..99815d89168 100644 --- a/src/Planner/PlannerExpressionAnalysis.cpp +++ b/src/Planner/PlannerExpressionAnalysis.cpp @@ -1,6 +1,7 @@ #include #include +#include #include #include @@ -16,8 +17,6 @@ #include #include #include -#include "Common/tests/gtest_global_context.h" -#include "DataTypes/DataTypeNullable.h" namespace DB { @@ -303,7 +302,6 @@ ProjectionAnalysisResult analyzeProjection(const QueryNode & query_node, ActionsChain & actions_chain) { const auto & projection_input = current_output_columns; - LOG_DEBUG(&Poco::Logger::get("PlannerExpressionAnalysis"), "Projection node: {}", query_node.getProjectionNode()->dumpTree()); auto projection_actions = buildActionsDAGFromExpressionNode(query_node.getProjectionNode(), projection_input, planner_context); auto projection_columns = query_node.getProjectionColumns(); @@ -325,7 +323,6 @@ ProjectionAnalysisResult analyzeProjection(const QueryNode & query_node, for (size_t i = 0; i < projection_outputs_size; ++i) { auto & projection_column = projection_columns[i]; - LOG_DEBUG(&Poco::Logger::get("PlannerExpressionAnalysis"), "Projection column {}: {} {}", i, projection_column.name, projection_column.type->getName()); const auto * projection_node = projection_actions_outputs[i]; const auto & projection_node_name = projection_node->result_name; From bfec300aa9e46eeec49c5deac2f2eb8f08191ea1 Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Thu, 2 Feb 2023 12:33:10 +0000 Subject: [PATCH 067/841] Add 02525_different_engines_in_temporary_tables test --- ...rent_engines_in_temporary_tables.reference | 6 +++++ ..._different_engines_in_temporary_tables.sql | 23 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 tests/queries/0_stateless/02525_different_engines_in_temporary_tables.reference create mode 100644 tests/queries/0_stateless/02525_different_engines_in_temporary_tables.sql diff --git a/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.reference b/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.reference new file mode 100644 index 00000000000..7ca2e136b02 --- /dev/null +++ b/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.reference @@ -0,0 +1,6 @@ +1 a +2 b +3 c +1 a +2 b +3 c diff --git a/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.sql b/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.sql new file mode 100644 index 00000000000..1296c93ed28 --- /dev/null +++ b/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.sql @@ -0,0 +1,23 @@ +DROP TEMPORARY TABLE IF EXISTS table_merge_tree_02525; +CREATE TEMPORARY TABLE table_merge_tree_02525 +( + id UInt64, + info String +) +ENGINE = MergeTree +ORDER BY id +PRIMARY KEY id; +INSERT INTO table_merge_tree_02525 VALUES (1, 'a'), (2, 'b'), (3, 'c'); +SELECT * FROM table_merge_tree_02525; +DROP TEMPORARY TABLE table_merge_tree_02525; + +DROP TEMPORARY TABLE IF EXISTS table_log_02525; +CREATE TEMPORARY TABLE table_log_02525 +( + id UInt64, + info String +) +ENGINE = Log; +INSERT INTO table_log_02525 VALUES (1, 'a'), (2, 'b'), (3, 'c'); +SELECT * FROM table_log_02525; +DROP TEMPORARY TABLE table_log_02525; From fa78c5b45982a96950cf30a59fd15441f8a0c0ad Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Fri, 3 Feb 2023 08:26:04 +0000 Subject: [PATCH 068/841] Add TinyLog and StripeLog table engines to test --- ...rent_engines_in_temporary_tables.reference | 6 +++++ ..._different_engines_in_temporary_tables.sql | 22 +++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.reference b/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.reference index 7ca2e136b02..3ea857b1652 100644 --- a/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.reference +++ b/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.reference @@ -4,3 +4,9 @@ 1 a 2 b 3 c +1 a +2 b +3 c +1 a +2 b +3 c diff --git a/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.sql b/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.sql index 1296c93ed28..2913a38865e 100644 --- a/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.sql +++ b/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.sql @@ -21,3 +21,25 @@ ENGINE = Log; INSERT INTO table_log_02525 VALUES (1, 'a'), (2, 'b'), (3, 'c'); SELECT * FROM table_log_02525; DROP TEMPORARY TABLE table_log_02525; + +DROP TEMPORARY TABLE IF EXISTS table_stripe_log_02525; +CREATE TEMPORARY TABLE table_stripe_log_02525 +( + id UInt64, + info String +) +ENGINE = StripeLog; +INSERT INTO table_stripe_log_02525 VALUES (1, 'a'), (2, 'b'), (3, 'c'); +SELECT * FROM table_stripe_log_02525; +DROP TEMPORARY TABLE table_stripe_log_02525; + +DROP TEMPORARY TABLE IF EXISTS table_tiny_log_02525; +CREATE TEMPORARY TABLE table_tiny_log_02525 +( + id UInt64, + info String +) +ENGINE = TinyLog; +INSERT INTO table_tiny_log_02525 VALUES (1, 'a'), (2, 'b'), (3, 'c'); +SELECT * FROM table_tiny_log_02525; +DROP TEMPORARY TABLE table_tiny_log_02525; From 139a684952d42fd3be4289ca2ada8cfedb7a6591 Mon Sep 17 00:00:00 2001 From: Dmitry Novik Date: Fri, 3 Feb 2023 16:00:25 +0000 Subject: [PATCH 069/841] Move analyzeProjection call --- src/Planner/PlannerExpressionAnalysis.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Planner/PlannerExpressionAnalysis.cpp b/src/Planner/PlannerExpressionAnalysis.cpp index 99815d89168..d0104b0bf2a 100644 --- a/src/Planner/PlannerExpressionAnalysis.cpp +++ b/src/Planner/PlannerExpressionAnalysis.cpp @@ -419,7 +419,8 @@ PlannerExpressionsAnalysisResult buildExpressionAnalysisResult(const QueryTreeNo std::optional where_analysis_result_optional; std::optional where_action_step_index_optional; - ColumnsWithTypeAndName current_output_columns = join_tree_input_columns; + const auto * input_columns = actions_chain.getLastStepAvailableOutputColumnsOrNull(); + ColumnsWithTypeAndName current_output_columns = input_columns ? *input_columns : join_tree_input_columns; if (query_node.hasWhere()) { @@ -446,6 +447,9 @@ PlannerExpressionsAnalysisResult buildExpressionAnalysisResult(const QueryTreeNo if (window_analysis_result_optional) current_output_columns = actions_chain.getLastStepAvailableOutputColumns(); + auto projection_analysis_result = analyzeProjection(query_node, current_output_columns, planner_context, actions_chain); + current_output_columns = actions_chain.getLastStepAvailableOutputColumns(); + std::optional sort_analysis_result_optional; if (query_node.hasOrderBy()) { @@ -461,10 +465,8 @@ PlannerExpressionsAnalysisResult buildExpressionAnalysisResult(const QueryTreeNo current_output_columns = actions_chain.getLastStepAvailableOutputColumns(); } - auto projection_analysis_result = analyzeProjection(query_node, current_output_columns, planner_context, actions_chain); - const auto * chain_available_output_columns = actions_chain.getLastStepAvailableOutputColumnsOrNull(); - const auto & project_names_input = chain_available_output_columns ? *chain_available_output_columns : join_tree_input_columns; + const auto & project_names_input = chain_available_output_columns ? *chain_available_output_columns : current_output_columns; auto project_names_actions = std::make_shared(project_names_input); project_names_actions->project(projection_analysis_result.projection_column_names_with_display_aliases); actions_chain.addStep(std::make_unique(project_names_actions)); From a1362b081f5fc4dd8e4fd8762c91800f5e1f0aff Mon Sep 17 00:00:00 2001 From: Dmitry Novik Date: Fri, 3 Feb 2023 17:14:50 +0000 Subject: [PATCH 070/841] Add test --- ...2535_analyzer_group_by_use_nulls.reference | 256 ++++++++++++++++++ .../02535_analyzer_group_by_use_nulls.sql | 85 ++++++ 2 files changed, 341 insertions(+) create mode 100644 tests/queries/0_stateless/02535_analyzer_group_by_use_nulls.reference create mode 100644 tests/queries/0_stateless/02535_analyzer_group_by_use_nulls.sql diff --git a/tests/queries/0_stateless/02535_analyzer_group_by_use_nulls.reference b/tests/queries/0_stateless/02535_analyzer_group_by_use_nulls.reference new file mode 100644 index 00000000000..50755627996 --- /dev/null +++ b/tests/queries/0_stateless/02535_analyzer_group_by_use_nulls.reference @@ -0,0 +1,256 @@ +-- { echoOn } +SELECT number, number % 2, sum(number) AS val +FROM numbers(10) +GROUP BY ROLLUP(number, number % 2) +ORDER BY (number, number % 2, val) +SETTINGS group_by_use_nulls=1; +0 0 0 +1 1 1 +2 0 2 +3 1 3 +4 0 4 +5 1 5 +6 0 6 +7 1 7 +8 0 8 +9 1 9 +\N \N 45 +set optimize_group_by_function_keys = 0; +SELECT number, number % 2, sum(number) AS val +FROM numbers(10) +GROUP BY ROLLUP(number, number % 2) +ORDER BY (number, number % 2, val) +SETTINGS group_by_use_nulls=1; +0 0 0 +0 \N 0 +1 1 1 +1 \N 1 +2 0 2 +2 \N 2 +3 1 3 +3 \N 3 +4 0 4 +4 \N 4 +5 1 5 +5 \N 5 +6 0 6 +6 \N 6 +7 1 7 +7 \N 7 +8 0 8 +8 \N 8 +9 1 9 +9 \N 9 +\N \N 45 +SELECT number, number % 2, sum(number) AS val +FROM numbers(10) +GROUP BY ROLLUP(number, number % 2) +ORDER BY (number, number % 2, val) +SETTINGS group_by_use_nulls=0; +0 0 0 +0 0 0 +0 0 45 +1 0 1 +1 1 1 +2 0 2 +2 0 2 +3 0 3 +3 1 3 +4 0 4 +4 0 4 +5 0 5 +5 1 5 +6 0 6 +6 0 6 +7 0 7 +7 1 7 +8 0 8 +8 0 8 +9 0 9 +9 1 9 +SELECT number, number % 2, sum(number) AS val +FROM numbers(10) +GROUP BY CUBE(number, number % 2) +ORDER BY (number, number % 2, val) +SETTINGS group_by_use_nulls=1; +0 0 0 +0 \N 0 +1 1 1 +1 \N 1 +2 0 2 +2 \N 2 +3 1 3 +3 \N 3 +4 0 4 +4 \N 4 +5 1 5 +5 \N 5 +6 0 6 +6 \N 6 +7 1 7 +7 \N 7 +8 0 8 +8 \N 8 +9 1 9 +9 \N 9 +\N 0 20 +\N 1 25 +\N \N 45 +SELECT number, number % 2, sum(number) AS val +FROM numbers(10) +GROUP BY CUBE(number, number % 2) +ORDER BY (number, number % 2, val) +SETTINGS group_by_use_nulls=0; +0 0 0 +0 0 0 +0 0 20 +0 0 45 +0 1 25 +1 0 1 +1 1 1 +2 0 2 +2 0 2 +3 0 3 +3 1 3 +4 0 4 +4 0 4 +5 0 5 +5 1 5 +6 0 6 +6 0 6 +7 0 7 +7 1 7 +8 0 8 +8 0 8 +9 0 9 +9 1 9 +SELECT + number, + number % 2, + sum(number) AS val +FROM numbers(10) +GROUP BY + GROUPING SETS ( + (number), + (number % 2) + ) +ORDER BY (number, number % 2, val) +SETTINGS group_by_use_nulls = 1; +0 \N 0 +1 \N 1 +2 \N 2 +3 \N 3 +4 \N 4 +5 \N 5 +6 \N 6 +7 \N 7 +8 \N 8 +9 \N 9 +\N 0 20 +\N 1 25 +SELECT + number, + number % 2, + sum(number) AS val +FROM numbers(10) +GROUP BY + GROUPING SETS ( + (number), + (number % 2) + ) +ORDER BY (number, number % 2, val) +SETTINGS group_by_use_nulls = 0; +0 0 0 +0 0 20 +0 1 25 +1 0 1 +2 0 2 +3 0 3 +4 0 4 +5 0 5 +6 0 6 +7 0 7 +8 0 8 +9 0 9 +SELECT number, number % 2, sum(number) AS val +FROM numbers(10) +GROUP BY ROLLUP(number, number % 2) WITH TOTALS +ORDER BY (number, number % 2, val) +SETTINGS group_by_use_nulls=1; +0 0 0 +0 \N 0 +1 1 1 +1 \N 1 +2 0 2 +2 \N 2 +3 1 3 +3 \N 3 +4 0 4 +4 \N 4 +5 1 5 +5 \N 5 +6 0 6 +6 \N 6 +7 1 7 +7 \N 7 +8 0 8 +8 \N 8 +9 1 9 +9 \N 9 +\N \N 45 + +0 0 45 +SELECT number, number % 2, sum(number) AS val +FROM numbers(10) +GROUP BY CUBE(number, number % 2) WITH TOTALS +ORDER BY (number, number % 2, val) +SETTINGS group_by_use_nulls=1; +0 0 0 +0 \N 0 +1 1 1 +1 \N 1 +2 0 2 +2 \N 2 +3 1 3 +3 \N 3 +4 0 4 +4 \N 4 +5 1 5 +5 \N 5 +6 0 6 +6 \N 6 +7 1 7 +7 \N 7 +8 0 8 +8 \N 8 +9 1 9 +9 \N 9 +\N 0 20 +\N 1 25 +\N \N 45 + +0 0 45 +SELECT + number, + number % 2, + sum(number) AS val +FROM numbers(10) +GROUP BY + GROUPING SETS ( + (number), + (number % 2) + ) +ORDER BY 1, tuple(val) +SETTINGS group_by_use_nulls = 1, max_bytes_before_external_sort=10; +0 \N 0 +1 \N 1 +2 \N 2 +3 \N 3 +4 \N 4 +5 \N 5 +6 \N 6 +7 \N 7 +8 \N 8 +9 \N 9 +\N 0 20 +\N 1 25 diff --git a/tests/queries/0_stateless/02535_analyzer_group_by_use_nulls.sql b/tests/queries/0_stateless/02535_analyzer_group_by_use_nulls.sql new file mode 100644 index 00000000000..a4d4f2f8bc9 --- /dev/null +++ b/tests/queries/0_stateless/02535_analyzer_group_by_use_nulls.sql @@ -0,0 +1,85 @@ +SET allow_experimental_analyzer=1; + +-- { echoOn } +SELECT number, number % 2, sum(number) AS val +FROM numbers(10) +GROUP BY ROLLUP(number, number % 2) +ORDER BY (number, number % 2, val) +SETTINGS group_by_use_nulls=1; + +set optimize_group_by_function_keys = 0; + +SELECT number, number % 2, sum(number) AS val +FROM numbers(10) +GROUP BY ROLLUP(number, number % 2) +ORDER BY (number, number % 2, val) +SETTINGS group_by_use_nulls=1; + +SELECT number, number % 2, sum(number) AS val +FROM numbers(10) +GROUP BY ROLLUP(number, number % 2) +ORDER BY (number, number % 2, val) +SETTINGS group_by_use_nulls=0; + +SELECT number, number % 2, sum(number) AS val +FROM numbers(10) +GROUP BY CUBE(number, number % 2) +ORDER BY (number, number % 2, val) +SETTINGS group_by_use_nulls=1; + +SELECT number, number % 2, sum(number) AS val +FROM numbers(10) +GROUP BY CUBE(number, number % 2) +ORDER BY (number, number % 2, val) +SETTINGS group_by_use_nulls=0; + +SELECT + number, + number % 2, + sum(number) AS val +FROM numbers(10) +GROUP BY + GROUPING SETS ( + (number), + (number % 2) + ) +ORDER BY (number, number % 2, val) +SETTINGS group_by_use_nulls = 1; + +SELECT + number, + number % 2, + sum(number) AS val +FROM numbers(10) +GROUP BY + GROUPING SETS ( + (number), + (number % 2) + ) +ORDER BY (number, number % 2, val) +SETTINGS group_by_use_nulls = 0; + +SELECT number, number % 2, sum(number) AS val +FROM numbers(10) +GROUP BY ROLLUP(number, number % 2) WITH TOTALS +ORDER BY (number, number % 2, val) +SETTINGS group_by_use_nulls=1; + +SELECT number, number % 2, sum(number) AS val +FROM numbers(10) +GROUP BY CUBE(number, number % 2) WITH TOTALS +ORDER BY (number, number % 2, val) +SETTINGS group_by_use_nulls=1; + +SELECT + number, + number % 2, + sum(number) AS val +FROM numbers(10) +GROUP BY + GROUPING SETS ( + (number), + (number % 2) + ) +ORDER BY 1, tuple(val) +SETTINGS group_by_use_nulls = 1, max_bytes_before_external_sort=10; From 3ea3b3545d8c37e20ce5d5674038807030656590 Mon Sep 17 00:00:00 2001 From: Dmitry Novik Date: Fri, 3 Feb 2023 18:02:50 +0000 Subject: [PATCH 071/841] Add statefull test --- .../1_stateful/00173_group_by_use_nulls.sql | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/queries/1_stateful/00173_group_by_use_nulls.sql b/tests/queries/1_stateful/00173_group_by_use_nulls.sql index 7acacc4e579..f110ebb0db4 100644 --- a/tests/queries/1_stateful/00173_group_by_use_nulls.sql +++ b/tests/queries/1_stateful/00173_group_by_use_nulls.sql @@ -8,3 +8,17 @@ ORDER BY CounterID ASC LIMIT 10 SETTINGS group_by_use_nulls = 1; + +-- { echoOn } +set allow_experimental_analyzer = 1; + +SELECT + CounterID AS k, + quantileBFloat16(0.5)(ResolutionWidth) +FROM remote('127.0.0.{1,2}', test, hits) +GROUP BY k +ORDER BY + count() DESC, + CounterID ASC +LIMIT 10 +SETTINGS group_by_use_nulls = 1; From a4079bc360c4872eff00f43e63b2fd43e9af56cb Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Mon, 6 Feb 2023 09:52:52 +0000 Subject: [PATCH 072/841] Update docs for temporary tables --- .../sql-reference/statements/create/table.md | 4 ++-- .../sql-reference/statements/create/table.md | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/en/sql-reference/statements/create/table.md b/docs/en/sql-reference/statements/create/table.md index 68fb968c609..17580f806e6 100644 --- a/docs/en/sql-reference/statements/create/table.md +++ b/docs/en/sql-reference/statements/create/table.md @@ -369,7 +369,7 @@ ENGINE = MergeTree ORDER BY x; ClickHouse supports temporary tables which have the following characteristics: - Temporary tables disappear when the session ends, including if the connection is lost. -- A temporary table uses the Memory engine only. +- A temporary table uses the Memory table engine when engine is not specified and it may use any table engine except for Replicated engines. - The DB can’t be specified for a temporary table. It is created outside of databases. - Impossible to create a temporary table with distributed DDL query on all cluster servers (by using `ON CLUSTER`): this table exists only in the current session. - If a temporary table has the same name as another one and a query specifies the table name without specifying the DB, the temporary table will be used. @@ -383,7 +383,7 @@ CREATE TEMPORARY TABLE [IF NOT EXISTS] table_name name1 [type1] [DEFAULT|MATERIALIZED|ALIAS expr1], name2 [type2] [DEFAULT|MATERIALIZED|ALIAS expr2], ... -) +) [ENGINE = engine] ``` In most cases, temporary tables are not created manually, but when using external data for a query, or for distributed `(GLOBAL) IN`. For more information, see the appropriate sections diff --git a/docs/ru/sql-reference/statements/create/table.md b/docs/ru/sql-reference/statements/create/table.md index c7ee2a62d98..7152f01892e 100644 --- a/docs/ru/sql-reference/statements/create/table.md +++ b/docs/ru/sql-reference/statements/create/table.md @@ -260,8 +260,8 @@ ENGINE = MergeTree() Кодеки шифрования: -- `CODEC('AES-128-GCM-SIV')` — Зашифровывает данные с помощью AES-128 в режиме [RFC 8452](https://tools.ietf.org/html/rfc8452) GCM-SIV. -- `CODEC('AES-256-GCM-SIV')` — Зашифровывает данные с помощью AES-256 в режиме GCM-SIV. +- `CODEC('AES-128-GCM-SIV')` — Зашифровывает данные с помощью AES-128 в режиме [RFC 8452](https://tools.ietf.org/html/rfc8452) GCM-SIV. +- `CODEC('AES-256-GCM-SIV')` — Зашифровывает данные с помощью AES-256 в режиме GCM-SIV. Эти кодеки используют фиксированный одноразовый ключ шифрования. Таким образом, это детерминированное шифрование. Оно совместимо с поддерживающими дедупликацию движками, в частности, [ReplicatedMergeTree](../../../engines/table-engines/mergetree-family/replication.md). Однако у шифрования имеется недостаток: если дважды зашифровать один и тот же блок данных, текст на выходе получится одинаковым, и злоумышленник, у которого есть доступ к диску, заметит эту эквивалентность (при этом доступа к содержимому он не получит). @@ -274,10 +274,10 @@ ENGINE = MergeTree() **Пример** ```sql -CREATE TABLE mytable +CREATE TABLE mytable ( x String Codec(AES_128_GCM_SIV) -) +) ENGINE = MergeTree ORDER BY x; ``` @@ -287,10 +287,10 @@ ENGINE = MergeTree ORDER BY x; **Пример** ```sql -CREATE TABLE mytable +CREATE TABLE mytable ( x String Codec(Delta, LZ4, AES_128_GCM_SIV) -) +) ENGINE = MergeTree ORDER BY x; ``` @@ -299,9 +299,9 @@ ENGINE = MergeTree ORDER BY x; ClickHouse поддерживает временные таблицы со следующими характеристиками: - Временные таблицы исчезают после завершения сессии, в том числе при обрыве соединения. -- Временная таблица использует только модуль памяти. +- Временная таблица использует движок таблиц Memory когда движок не указан и она может использовать любой движок таблиц за исключением движков Replicated. - Невозможно указать базу данных для временной таблицы. Она создается вне баз данных. -- Невозможно создать временную таблицу распределнным DDL запросом на всех серверах кластера (с опцией `ON CLUSTER`): такая таблица существует только в рамках существующей сессии. +- Невозможно создать временную таблицу распределённым DDL запросом на всех серверах кластера (с опцией `ON CLUSTER`): такая таблица существует только в рамках существующей сессии. - Если временная таблица имеет то же имя, что и некоторая другая, то, при упоминании в запросе без указания БД, будет использована временная таблица. - При распределённой обработке запроса, используемые в запросе временные таблицы, передаются на удалённые серверы. @@ -313,7 +313,7 @@ CREATE TEMPORARY TABLE [IF NOT EXISTS] table_name name1 [type1] [DEFAULT|MATERIALIZED|ALIAS expr1], name2 [type2] [DEFAULT|MATERIALIZED|ALIAS expr2], ... -) +) [ENGINE = engine] ``` В большинстве случаев, временные таблицы создаются не вручную, а при использовании внешних данных для запроса, или при распределённом `(GLOBAL) IN`. Подробнее см. соответствующие разделы From aca4f08bf5b2aac5fae6cc897cd0be4b9498b65a Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Mon, 6 Feb 2023 14:33:45 +0000 Subject: [PATCH 073/841] Correctly calculate size after snapshot load --- src/Coordination/CoordinationSettings.cpp | 2 +- src/Coordination/FourLetterCommand.cpp | 9 +++++++ src/Coordination/FourLetterCommand.h | 13 ++++++++++ src/Coordination/KeeperDispatcher.h | 5 ++++ src/Coordination/KeeperServer.cpp | 5 ++++ src/Coordination/KeeperServer.h | 2 ++ src/Coordination/KeeperSnapshotManager.cpp | 28 +++++++++++++--------- src/Coordination/KeeperStateMachine.cpp | 8 +++++++ src/Coordination/KeeperStateMachine.h | 1 + src/Coordination/KeeperStorage.cpp | 20 ++++++++++++++-- src/Coordination/KeeperStorage.h | 5 +++- src/Coordination/SnapshotableHashTable.h | 13 ++++++++++ 12 files changed, 96 insertions(+), 15 deletions(-) diff --git a/src/Coordination/CoordinationSettings.cpp b/src/Coordination/CoordinationSettings.cpp index e665ccb89c7..f5c79d3be7a 100644 --- a/src/Coordination/CoordinationSettings.cpp +++ b/src/Coordination/CoordinationSettings.cpp @@ -36,7 +36,7 @@ void CoordinationSettings::loadFromConfig(const String & config_elem, const Poco } -const String KeeperConfigurationAndSettings::DEFAULT_FOUR_LETTER_WORD_CMD = "conf,cons,crst,envi,ruok,srst,srvr,stat,wchs,dirs,mntr,isro,rcvr,apiv,csnp,lgif,rqld"; +const String KeeperConfigurationAndSettings::DEFAULT_FOUR_LETTER_WORD_CMD = "conf,cons,crst,envi,ruok,srst,srvr,stat,wchs,dirs,mntr,isro,rcvr,apiv,csnp,lgif,rqld,rclc"; KeeperConfigurationAndSettings::KeeperConfigurationAndSettings() : server_id(NOT_EXIST) diff --git a/src/Coordination/FourLetterCommand.cpp b/src/Coordination/FourLetterCommand.cpp index 3e0e5acee0c..6157daad1cd 100644 --- a/src/Coordination/FourLetterCommand.cpp +++ b/src/Coordination/FourLetterCommand.cpp @@ -145,6 +145,9 @@ void FourLetterCommandFactory::registerCommands(KeeperDispatcher & keeper_dispat FourLetterCommandPtr request_leader_command = std::make_shared(keeper_dispatcher); factory.registerCommand(request_leader_command); + FourLetterCommandPtr recalculate_command = std::make_shared(keeper_dispatcher); + factory.registerCommand(recalculate_command); + factory.initializeAllowList(keeper_dispatcher); factory.setInitialize(true); } @@ -515,4 +518,10 @@ String RequestLeaderCommand::run() return keeper_dispatcher.requestLeader() ? "Sent leadership request to leader." : "Failed to send leadership request to leader."; } +String RecalculateCommand::run() +{ + keeper_dispatcher.recalculateStorageStats(); + return "ok"; +} + } diff --git a/src/Coordination/FourLetterCommand.h b/src/Coordination/FourLetterCommand.h index 8a8aacf7a3a..e1fe0333081 100644 --- a/src/Coordination/FourLetterCommand.h +++ b/src/Coordination/FourLetterCommand.h @@ -377,4 +377,17 @@ struct RequestLeaderCommand : public IFourLetterCommand ~RequestLeaderCommand() override = default; }; +/// Request to be leader. +struct RecalculateCommand : public IFourLetterCommand +{ + explicit RecalculateCommand(KeeperDispatcher & keeper_dispatcher_) + : IFourLetterCommand(keeper_dispatcher_) + { + } + + String name() override { return "rclc"; } + String run() override; + ~RecalculateCommand() override = default; +}; + } diff --git a/src/Coordination/KeeperDispatcher.h b/src/Coordination/KeeperDispatcher.h index ff902d8e036..90965d0934e 100644 --- a/src/Coordination/KeeperDispatcher.h +++ b/src/Coordination/KeeperDispatcher.h @@ -225,6 +225,11 @@ public: { return server->requestLeader(); } + + void recalculateStorageStats() + { + return server->recalculateStorageStats(); + } }; } diff --git a/src/Coordination/KeeperServer.cpp b/src/Coordination/KeeperServer.cpp index b823fbc697c..05f97313edd 100644 --- a/src/Coordination/KeeperServer.cpp +++ b/src/Coordination/KeeperServer.cpp @@ -947,4 +947,9 @@ bool KeeperServer::requestLeader() return isLeader() || raft_instance->request_leadership(); } +void KeeperServer::recalculateStorageStats() +{ + state_machine->recalculateStorageStats(); +} + } diff --git a/src/Coordination/KeeperServer.h b/src/Coordination/KeeperServer.h index feadf3bb7ce..bcff81f66f2 100644 --- a/src/Coordination/KeeperServer.h +++ b/src/Coordination/KeeperServer.h @@ -137,6 +137,8 @@ public: KeeperLogInfo getKeeperLogInfo(); bool requestLeader(); + + void recalculateStorageStats(); }; } diff --git a/src/Coordination/KeeperSnapshotManager.cpp b/src/Coordination/KeeperSnapshotManager.cpp index a3f7dbc2c6a..8b80db3e520 100644 --- a/src/Coordination/KeeperSnapshotManager.cpp +++ b/src/Coordination/KeeperSnapshotManager.cpp @@ -361,19 +361,25 @@ void KeeperStorageSnapshot::deserialize(SnapshotDeserializationResult & deserial "If you still want to ignore it, you can set 'keeper_server.ignore_system_path_on_startup' to true", error_msg); } - else if (match_result == EXACT && !is_node_empty(node)) + else if (match_result == EXACT) { - if (keeper_context->ignore_system_path_on_startup || keeper_context->server_state != KeeperContext::Phase::INIT) + if (!is_node_empty(node)) { - LOG_ERROR(&Poco::Logger::get("KeeperSnapshotManager"), "{}. Ignoring it", error_msg); - node = KeeperStorage::Node{}; + if (keeper_context->ignore_system_path_on_startup || keeper_context->server_state != KeeperContext::Phase::INIT) + { + LOG_ERROR(&Poco::Logger::get("KeeperSnapshotManager"), "{}. Ignoring it", error_msg); + node = KeeperStorage::Node{}; + } + else + throw Exception( + ErrorCodes::LOGICAL_ERROR, + "{}. Ignoring it can lead to data loss. " + "If you still want to ignore it, you can set 'keeper_server.ignore_system_path_on_startup' to true", + error_msg); } - else - throw Exception( - ErrorCodes::LOGICAL_ERROR, - "{}. Ignoring it can lead to data loss. " - "If you still want to ignore it, you can set 'keeper_server.ignore_system_path_on_startup' to true", - error_msg); + + // we always ignore the written size for this node + node.recalculateSize(); } storage.container.insertOrReplace(path, node); @@ -390,7 +396,7 @@ void KeeperStorageSnapshot::deserialize(SnapshotDeserializationResult & deserial { auto parent_path = parentPath(itr.key); storage.container.updateValue( - parent_path, [path = itr.key](KeeperStorage::Node & value) { value.addChild(getBaseName(path)); }); + parent_path, [version, path = itr.key](KeeperStorage::Node & value) { value.addChild(getBaseName(path), /*update_size*/ version < SnapshotVersion::V4); }); } } diff --git a/src/Coordination/KeeperStateMachine.cpp b/src/Coordination/KeeperStateMachine.cpp index e591f87c6f1..42ff59f45d9 100644 --- a/src/Coordination/KeeperStateMachine.cpp +++ b/src/Coordination/KeeperStateMachine.cpp @@ -640,4 +640,12 @@ ClusterConfigPtr KeeperStateMachine::getClusterConfig() const return nullptr; } +void KeeperStateMachine::recalculateStorageStats() +{ + std::lock_guard lock(storage_and_responses_lock); + LOG_INFO(log, "Recalculating storage stats"); + storage->recalculateStats(); + LOG_INFO(log, "Done recalculating storage stats"); +} + } diff --git a/src/Coordination/KeeperStateMachine.h b/src/Coordination/KeeperStateMachine.h index ffc7fce1cfe..d8181532f09 100644 --- a/src/Coordination/KeeperStateMachine.h +++ b/src/Coordination/KeeperStateMachine.h @@ -103,6 +103,7 @@ public: uint64_t getKeyArenaSize() const; uint64_t getLatestSnapshotBufSize() const; + void recalculateStorageStats(); private: /// In our state machine we always have a single snapshot which is stored /// in memory in compressed (serialized) format. diff --git a/src/Coordination/KeeperStorage.cpp b/src/Coordination/KeeperStorage.cpp index 0e4d631938c..b1f3b44b1e1 100644 --- a/src/Coordination/KeeperStorage.cpp +++ b/src/Coordination/KeeperStorage.cpp @@ -201,9 +201,10 @@ void KeeperStorage::Node::setData(String new_data) data = std::move(new_data); } -void KeeperStorage::Node::addChild(StringRef child_path) +void KeeperStorage::Node::addChild(StringRef child_path, bool update_size) { - size_bytes += sizeof child_path; + if (update_size) [[likely]] + size_bytes += sizeof child_path; children.insert(child_path); } @@ -234,6 +235,16 @@ void KeeperStorage::Node::shallowCopy(const KeeperStorage::Node & other) cached_digest = other.cached_digest; } +void KeeperStorage::Node::recalculateSize() +{ + size_bytes = sizeof(Node); + + for (const auto child_path : children) + size_bytes += sizeof child_path; + + size_bytes += data.size(); +} + KeeperStorage::KeeperStorage( int64_t tick_time_ms, const String & superdigest_, const KeeperContextPtr & keeper_context_, const bool initialize_system_nodes) : session_expiry_queue(tick_time_ms), keeper_context(keeper_context_), superdigest(superdigest_) @@ -2407,5 +2418,10 @@ uint64_t KeeperStorage::getTotalEphemeralNodesCount() const return ret; } +void KeeperStorage::recalculateStats() +{ + container.recalculateDataSize(); +} + } diff --git a/src/Coordination/KeeperStorage.h b/src/Coordination/KeeperStorage.h index a40cca8e778..be528072df4 100644 --- a/src/Coordination/KeeperStorage.h +++ b/src/Coordination/KeeperStorage.h @@ -47,7 +47,7 @@ public: const auto & getData() const noexcept { return data; } - void addChild(StringRef child_path); + void addChild(StringRef child_path, bool update_size = true); void removeChild(StringRef child_path); @@ -64,6 +64,8 @@ public: // (e.g. we don't need to copy list of children) void shallowCopy(const Node & other); + void recalculateSize(); + private: String data; ChildrenSet children{}; @@ -466,6 +468,7 @@ public: void dumpWatchesByPath(WriteBufferFromOwnString & buf) const; void dumpSessionsAndEphemerals(WriteBufferFromOwnString & buf) const; + void recalculateStats(); private: void removeDigest(const Node & node, std::string_view path); void addDigest(const Node & node, std::string_view path); diff --git a/src/Coordination/SnapshotableHashTable.h b/src/Coordination/SnapshotableHashTable.h index 27572ab86c7..97c7e933334 100644 --- a/src/Coordination/SnapshotableHashTable.h +++ b/src/Coordination/SnapshotableHashTable.h @@ -8,6 +8,8 @@ #include #include +#include + namespace DB { @@ -319,6 +321,17 @@ public: return approximate_data_size; } + void recalculateDataSize() + { + approximate_data_size = 0; + for (auto & node : list) + { + node.value.recalculateSize(); + approximate_data_size += node.key.size; + approximate_data_size += node.value.sizeInBytes(); + } + } + uint64_t keyArenaSize() const { return arena.size(); From 9cde46acff502b8ba8972c9c3ccbc13b904b6563 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Mon, 6 Feb 2023 16:09:56 +0000 Subject: [PATCH 074/841] Correctly calculate size on update --- src/Coordination/SnapshotableHashTable.h | 15 +-- .../test_keeper_mntr_data_size/__init__.py | 0 .../configs/enable_keeper.xml | 29 ++++++ .../test_keeper_mntr_data_size/test.py | 93 +++++++++++++++++++ 4 files changed, 130 insertions(+), 7 deletions(-) create mode 100644 tests/integration/test_keeper_mntr_data_size/__init__.py create mode 100644 tests/integration/test_keeper_mntr_data_size/configs/enable_keeper.xml create mode 100644 tests/integration/test_keeper_mntr_data_size/test.py diff --git a/src/Coordination/SnapshotableHashTable.h b/src/Coordination/SnapshotableHashTable.h index 97c7e933334..5b01ca255f8 100644 --- a/src/Coordination/SnapshotableHashTable.h +++ b/src/Coordination/SnapshotableHashTable.h @@ -8,8 +8,6 @@ #include #include -#include - namespace DB { @@ -66,7 +64,7 @@ private: /// value_size: size of value to add /// old_value_size: size of value to minus /// old_value_size=0 means there is no old value with the same key. - void updateDataSize(OperationType op_type, uint64_t key_size, uint64_t value_size, uint64_t old_value_size) + void updateDataSize(OperationType op_type, uint64_t key_size, uint64_t value_size, uint64_t old_value_size, bool remove_old = true) { switch (op_type) { @@ -96,14 +94,14 @@ private: case UPDATE_VALUE: approximate_data_size += key_size; approximate_data_size += value_size; - if (!snapshot_mode) + if (remove_old) { approximate_data_size -= key_size; approximate_data_size -= old_value_size; } break; case ERASE: - if (!snapshot_mode) + if (remove_old) { approximate_data_size -= key_size; approximate_data_size -= old_value_size; @@ -179,7 +177,7 @@ public: list_itr->value = value; } } - updateDataSize(INSERT_OR_REPLACE, key.size(), value.sizeInBytes(), old_value_size); + updateDataSize(INSERT_OR_REPLACE, key.size(), value.sizeInBytes(), old_value_size, !snapshot_mode); } bool erase(const std::string & key) @@ -224,6 +222,7 @@ public: const_iterator ret; + bool remove_old_size = true; if (snapshot_mode) { /// We in snapshot mode but updating some node which is already more @@ -239,6 +238,8 @@ public: auto itr = list.insert(list.end(), std::move(elem_copy)); it->getMapped() = itr; ret = itr; + + remove_old_size = false; } else { @@ -252,7 +253,7 @@ public: ret = list_itr; } - updateDataSize(UPDATE_VALUE, key.size, ret->value.sizeInBytes(), old_value_size); + updateDataSize(UPDATE_VALUE, key.size, ret->value.sizeInBytes(), old_value_size, remove_old_size); return ret; } diff --git a/tests/integration/test_keeper_mntr_data_size/__init__.py b/tests/integration/test_keeper_mntr_data_size/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/integration/test_keeper_mntr_data_size/configs/enable_keeper.xml b/tests/integration/test_keeper_mntr_data_size/configs/enable_keeper.xml new file mode 100644 index 00000000000..a3217b34501 --- /dev/null +++ b/tests/integration/test_keeper_mntr_data_size/configs/enable_keeper.xml @@ -0,0 +1,29 @@ + + + 9181 + 1 + /var/lib/clickhouse/coordination/log + /var/lib/clickhouse/coordination/snapshots + + + 10 + 5 + 5000 + 10000 + trace + + + 0 + 0 + 0 + + + + + 1 + localhost + 9234 + + + + diff --git a/tests/integration/test_keeper_mntr_data_size/test.py b/tests/integration/test_keeper_mntr_data_size/test.py new file mode 100644 index 00000000000..8789ca0354c --- /dev/null +++ b/tests/integration/test_keeper_mntr_data_size/test.py @@ -0,0 +1,93 @@ +#!/usr/bin/env python3 + +import pytest +from helpers.cluster import ClickHouseCluster +import helpers.keeper_utils as keeper_utils +import random +import string +import os +import time +from kazoo.client import KazooClient, KazooState + + +cluster = ClickHouseCluster(__file__) + +# clickhouse itself will use external zookeeper +node = cluster.add_instance( + "node", + main_configs=["configs/enable_keeper.xml"], + stay_alive=True, + with_zookeeper=True, +) + + +def random_string(length): + return "".join(random.choices(string.ascii_lowercase + string.digits, k=length)) + + +@pytest.fixture(scope="module") +def started_cluster(): + try: + cluster.start() + + yield cluster + + finally: + cluster.shutdown() + + +def get_connection_zk(nodename, timeout=30.0): + _fake_zk_instance = KazooClient( + hosts=cluster.get_instance_ip(nodename) + ":9181", timeout=timeout + ) + _fake_zk_instance.start() + return _fake_zk_instance + + +def restart_clickhouse(): + node.restart_clickhouse() + keeper_utils.wait_until_connected(cluster, node) + + +def test_mntr_data_size_after_restart(started_cluster): + try: + node_zk = None + node_zk = get_connection_zk("node") + + node_zk.create("/test_mntr_data_size", b"somevalue") + for i in range(100): + node_zk.create( + "/test_mntr_data_size/node" + str(i), random_string(123).encode() + ) + + def get_line_with_size(): + return next( + filter( + lambda line: "zk_approximate_data_size" in line, + keeper_utils.send_4lw_cmd(started_cluster, node, "mntr").split( + "\n" + ), + ), + None, + ) + + line_size_before = get_line_with_size() + assert line_size_before != None + + node_zk.stop() + node_zk.close() + node_zk = None + + restart_clickhouse() + + assert get_line_with_size() == line_size_before + + keeper_utils.send_4lw_cmd(started_cluster, node, "rclc") + assert get_line_with_size() == line_size_before + finally: + try: + if node_zk is not None: + node_zk.stop() + node_zk.close() + except: + pass From b11458f14241f81f22129a1476a9220010c2586e Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Tue, 7 Feb 2023 07:51:22 +0000 Subject: [PATCH 075/841] Fix erase --- src/Coordination/SnapshotableHashTable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Coordination/SnapshotableHashTable.h b/src/Coordination/SnapshotableHashTable.h index 5b01ca255f8..cfa3098b4a1 100644 --- a/src/Coordination/SnapshotableHashTable.h +++ b/src/Coordination/SnapshotableHashTable.h @@ -202,7 +202,7 @@ public: list.erase(list_itr); } - updateDataSize(ERASE, key.size(), 0, old_data_size); + updateDataSize(ERASE, key.size(), 0, old_data_size, !snapshot_mode); return true; } From 2b300e06d0b54d25678b44890011fb7c208d5177 Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Tue, 7 Feb 2023 14:24:47 +0000 Subject: [PATCH 076/841] Fix setEngine() for temporary tables --- src/Interpreters/InterpreterCreateQuery.cpp | 24 +++++++++---------- .../02184_default_table_engine.sql | 2 +- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/Interpreters/InterpreterCreateQuery.cpp b/src/Interpreters/InterpreterCreateQuery.cpp index 86e4cdf83f7..b479bc96082 100644 --- a/src/Interpreters/InterpreterCreateQuery.cpp +++ b/src/Interpreters/InterpreterCreateQuery.cpp @@ -925,26 +925,24 @@ void InterpreterCreateQuery::setEngine(ASTCreateQuery & create) const if (create.temporary) { - // if (create.storage && create.storage->engine && create.storage->engine->name != "Memory") - // throw Exception(ErrorCodes::INCORRECT_QUERY, "Temporary tables can only be created with ENGINE = Memory, not {}", - // create.storage->engine->name); - /// It's possible if some part of storage definition (such as PARTITION BY) is specified, but ENGINE is not. /// It makes sense when default_table_engine setting is used, but not for temporary tables. /// For temporary tables we ignore this setting to allow CREATE TEMPORARY TABLE query without specifying ENGINE - /// even if setting is set to MergeTree or something like that (otherwise MergeTree will be substituted and query will fail). - /* - if (create.storage && !create.storage->engine) - throw Exception(ErrorCodes::INCORRECT_QUERY, "Invalid storage definition for temporary table: must be either ENGINE = Memory or empty"); - */ if (!create.cluster.empty()) throw Exception(ErrorCodes::INCORRECT_QUERY, "Temporary tables cannot be created with ON CLUSTER clause"); - if (create.storage && create.storage->engine && create.storage->engine->name.starts_with("Replicated")) - throw Exception(ErrorCodes::INCORRECT_QUERY, "Temporary tables cannot be created with Replicated table engines"); - - if (!create.storage) + if (create.storage) + { + if (create.storage->engine) + { + if (create.storage->engine->name.starts_with("Replicated")) + throw Exception(ErrorCodes::INCORRECT_QUERY, "Temporary tables cannot be created with Replicated table engines"); + } + else + throw Exception(ErrorCodes::INCORRECT_QUERY, "Invalid storage definition for temporary table"); + } + else { auto engine_ast = std::make_shared(); engine_ast->name = "Memory"; diff --git a/tests/queries/0_stateless/02184_default_table_engine.sql b/tests/queries/0_stateless/02184_default_table_engine.sql index 4b5ad6c008c..109875d53a5 100644 --- a/tests/queries/0_stateless/02184_default_table_engine.sql +++ b/tests/queries/0_stateless/02184_default_table_engine.sql @@ -82,7 +82,7 @@ SET default_table_engine = 'Log'; CREATE TEMPORARY TABLE tmp (n int); SHOW CREATE TEMPORARY TABLE tmp; CREATE TEMPORARY TABLE tmp1 (n int) ENGINE=Memory; -CREATE TEMPORARY TABLE tmp2 (n int) ENGINE=Log; -- {serverError 80} +CREATE TEMPORARY TABLE tmp2 (n int) ENGINE=Log; CREATE TEMPORARY TABLE tmp2 (n int) ORDER BY n; -- {serverError 80} CREATE TEMPORARY TABLE tmp2 (n int, PRIMARY KEY (n)); -- {serverError 80} From fe48ab2b1d9006cdb8e0d937ad8d9a9370020c1c Mon Sep 17 00:00:00 2001 From: Anton Popov Date: Tue, 7 Feb 2023 14:58:34 +0000 Subject: [PATCH 077/841] randomize setting 'ratio_of_defaults_for_sparse_serialization' --- tests/clickhouse-test | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/tests/clickhouse-test b/tests/clickhouse-test index 4361b64b62f..e84c9beed5d 100755 --- a/tests/clickhouse-test +++ b/tests/clickhouse-test @@ -511,7 +511,9 @@ class SettingsRandomizer: "merge_tree_coarse_index_granularity": lambda: random.randint(2, 32), "optimize_distinct_in_order": lambda: random.randint(0, 1), "optimize_sorting_by_input_stream_properties": lambda: random.randint(0, 1), - "enable_memory_bound_merging_of_aggregation_results": lambda: random.randint(0, 1), + "enable_memory_bound_merging_of_aggregation_results": lambda: random.randint( + 0, 1 + ), } @staticmethod @@ -524,10 +526,9 @@ class SettingsRandomizer: class MergeTreeSettingsRandomizer: settings = { - # Temporary disable due to large number of failures. TODO: fix. - # "ratio_of_defaults_for_sparse_serialization": threshold_generator( - # 0.1, 0.6, 0.0, 1.0 - # ), + "ratio_of_defaults_for_sparse_serialization": threshold_generator( + 0.3, 0.5, 0.0, 1.0 + ), "prefer_fetch_merged_part_size_threshold": threshold_generator( 0.2, 0.5, 1, 10 * 1024 * 1024 * 1024 ), @@ -1222,7 +1223,7 @@ class TestCase: ) result.check_if_need_retry(args, stdout, stderr, self.runs_count) # to avoid breaking CSV parser - result.description = result.description.replace('\0', '') + result.description = result.description.replace("\0", "") if result.status == TestStatus.FAIL: result.description = self.add_info_about_settings(result.description) @@ -1678,7 +1679,12 @@ def check_server_started(args): print("\nConnection timeout, will not retry") break except Exception as e: - print("\nUexpected exception, will not retry: ", type(e).__name__, ": ", str(e)) + print( + "\nUexpected exception, will not retry: ", + type(e).__name__, + ": ", + str(e), + ) break print("\nAll connection tries failed") @@ -1955,6 +1961,7 @@ def reportCoverage(args): ) ) + def reportLogStats(args): query = """ WITH From ba761e04d72285800aeb7faeb8d073a5745b46c1 Mon Sep 17 00:00:00 2001 From: avogar Date: Thu, 9 Feb 2023 12:31:01 +0000 Subject: [PATCH 078/841] Handle unknown exceptions --- src/Processors/Executors/StreamingFormatExecutor.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Processors/Executors/StreamingFormatExecutor.cpp b/src/Processors/Executors/StreamingFormatExecutor.cpp index cfe88344198..2223721439e 100644 --- a/src/Processors/Executors/StreamingFormatExecutor.cpp +++ b/src/Processors/Executors/StreamingFormatExecutor.cpp @@ -8,6 +8,7 @@ namespace DB namespace ErrorCodes { extern const int LOGICAL_ERROR; + extern const int UNKNOWN_EXCEPTION; } StreamingFormatExecutor::StreamingFormatExecutor( @@ -99,6 +100,12 @@ size_t StreamingFormatExecutor::execute() auto exception = Exception(Exception::CreateFromSTDTag{}, e); return on_error(result_columns, exception); } + catch (...) + { + format->resetParser(); + auto exception = Exception(ErrorCodes::UNKNOWN_EXCEPTION, "Unknowk exception while executing StreamingFormatExecutor with format {}", format->getName()); + return on_error(result_columns, exception); + } } } From 8821074f8393aa63325d6da901a1b0c312d21f99 Mon Sep 17 00:00:00 2001 From: Kruglov Pavel <48961922+Avogar@users.noreply.github.com> Date: Thu, 9 Feb 2023 14:08:24 +0100 Subject: [PATCH 079/841] Fix style --- tests/integration/test_storage_kafka/test.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/integration/test_storage_kafka/test.py b/tests/integration/test_storage_kafka/test.py index 9e79b0bc55f..8be6022a430 100644 --- a/tests/integration/test_storage_kafka/test.py +++ b/tests/integration/test_storage_kafka/test.py @@ -4470,7 +4470,7 @@ def test_bad_messages_parsing(kafka_cluster): print(format_name) - kafka_create_topic(admin_client, f'{format_name}_err') + kafka_create_topic(admin_client, f"{format_name}_err") instance.query( f""" @@ -4491,7 +4491,7 @@ def test_bad_messages_parsing(kafka_cluster): ) messages = ["qwertyuiop", "asdfghjkl", "zxcvbnm"] - kafka_produce(kafka_cluster, f'{format_name}_err', messages) + kafka_produce(kafka_cluster, f"{format_name}_err", messages) attempt = 0 rows = 0 @@ -4503,9 +4503,9 @@ def test_bad_messages_parsing(kafka_cluster): assert rows == len(messages) - kafka_delete_topic(admin_client, f'{format_name}_err') + kafka_delete_topic(admin_client, f"{format_name}_err") - protobuf_schema=""" + protobuf_schema = """ syntax = "proto3"; message Message { @@ -4538,7 +4538,7 @@ message Message { print(format_name) - kafka_create_topic(admin_client, f'{format_name}_err') + kafka_create_topic(admin_client, f"{format_name}_err") messages = ["qwertyuiop", "poiuytrewq", "zxcvbnm"] kafka_produce(kafka_cluster, f'{format_name}_err', messages) @@ -4553,9 +4553,9 @@ message Message { assert rows == len(messages) - kafka_delete_topic(admin_client, f'{format_name}_err') + kafka_delete_topic(admin_client, f"{format_name}_err") - capn_proto_schema=""" + capn_proto_schema = """ @0xd9dd7b35452d1c4f; struct Message @@ -4587,7 +4587,7 @@ struct Message print("CapnProto") - kafka_create_topic(admin_client, 'CapnProto_err') + kafka_create_topic(admin_client, "CapnProto_err") messages = ["qwertyuiop", "asdfghjkl", "zxcvbnm"] kafka_produce(kafka_cluster, 'CapnProto_err', messages) @@ -4602,7 +4602,7 @@ struct Message assert rows == len(messages) - kafka_delete_topic(admin_client, 'CapnProto_err') + kafka_delete_topic(admin_client, "CapnProto_err") if __name__ == "__main__": From 59c52c503dfced06b6fadae16aae4d43222692c3 Mon Sep 17 00:00:00 2001 From: Kruglov Pavel <48961922+Avogar@users.noreply.github.com> Date: Thu, 9 Feb 2023 14:09:46 +0100 Subject: [PATCH 080/841] Fix style --- tests/integration/helpers/cluster.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/integration/helpers/cluster.py b/tests/integration/helpers/cluster.py index 28af442a3d5..a344bf99619 100644 --- a/tests/integration/helpers/cluster.py +++ b/tests/integration/helpers/cluster.py @@ -4401,7 +4401,13 @@ class ClickHouseInstance: def create_format_schema(self, file_name, content): self.exec_in_container( - ["bash", "-c", "echo '{}' > {}".format(content, "/var/lib/clickhouse/format_schemas/" + file_name)] + [ + "bash", + "-c", + "echo '{}' > {}".format( + content, "/var/lib/clickhouse/format_schemas/" + file_name + ), + ] ) class ClickHouseKiller(object): From 82521bb9734d4ecfbfdf5e4842826ea9228f01a0 Mon Sep 17 00:00:00 2001 From: robot-clickhouse Date: Thu, 9 Feb 2023 13:33:49 +0000 Subject: [PATCH 081/841] Automatic style fix --- tests/ci/stress.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ci/stress.py b/tests/ci/stress.py index e21d34da5c0..2c77731a7b6 100755 --- a/tests/ci/stress.py +++ b/tests/ci/stress.py @@ -298,7 +298,7 @@ if __name__ == "__main__": ] ) hung_check_log = os.path.join(args.output_folder, "hung_check.log") - tee = Popen(['/usr/bin/tee', hung_check_log], stdin=PIPE) + tee = Popen(["/usr/bin/tee", hung_check_log], stdin=PIPE) res = call(cmd, shell=True, stdout=tee.stdin, stderr=STDOUT) tee.stdin.close() if res != 0 and have_long_running_queries: From 947923321c9b3ecaa90c15117ba1fab6d424fffd Mon Sep 17 00:00:00 2001 From: Kruglov Pavel <48961922+Avogar@users.noreply.github.com> Date: Thu, 9 Feb 2023 14:55:21 +0100 Subject: [PATCH 082/841] Fix style --- tests/integration/helpers/cluster.py | 1 + tests/integration/test_storage_kafka/test.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/integration/helpers/cluster.py b/tests/integration/helpers/cluster.py index a344bf99619..75632b3c0ea 100644 --- a/tests/integration/helpers/cluster.py +++ b/tests/integration/helpers/cluster.py @@ -4410,6 +4410,7 @@ class ClickHouseInstance: ] ) + class ClickHouseKiller(object): def __init__(self, clickhouse_node): self.clickhouse_node = clickhouse_node diff --git a/tests/integration/test_storage_kafka/test.py b/tests/integration/test_storage_kafka/test.py index 8be6022a430..51871eae3d8 100644 --- a/tests/integration/test_storage_kafka/test.py +++ b/tests/integration/test_storage_kafka/test.py @@ -4541,7 +4541,7 @@ message Message { kafka_create_topic(admin_client, f"{format_name}_err") messages = ["qwertyuiop", "poiuytrewq", "zxcvbnm"] - kafka_produce(kafka_cluster, f'{format_name}_err', messages) + kafka_produce(kafka_cluster, f"{format_name}_err", messages) attempt = 0 rows = 0 @@ -4590,7 +4590,7 @@ struct Message kafka_create_topic(admin_client, "CapnProto_err") messages = ["qwertyuiop", "asdfghjkl", "zxcvbnm"] - kafka_produce(kafka_cluster, 'CapnProto_err', messages) + kafka_produce(kafka_cluster, "CapnProto_err", messages) attempt = 0 rows = 0 From 5c62afd15e8054a66162b4be359248c867709f97 Mon Sep 17 00:00:00 2001 From: Kruglov Pavel <48961922+Avogar@users.noreply.github.com> Date: Thu, 9 Feb 2023 15:01:32 +0100 Subject: [PATCH 083/841] Fix style --- tests/ci/stress.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ci/stress.py b/tests/ci/stress.py index 2c77731a7b6..e62a37fb165 100755 --- a/tests/ci/stress.py +++ b/tests/ci/stress.py @@ -302,7 +302,7 @@ if __name__ == "__main__": res = call(cmd, shell=True, stdout=tee.stdin, stderr=STDOUT) tee.stdin.close() if res != 0 and have_long_running_queries: - logging.info("Hung check failed with exit code {}".format(res)) + logging.info("Hung check failed with exit code %d", res) else: hung_check_status = "No queries hung\tOK\t\\N\t\n" with open( From 93dfbe6617b3b5d47ade4c2127026c1e5b2108c2 Mon Sep 17 00:00:00 2001 From: Kruglov Pavel <48961922+Avogar@users.noreply.github.com> Date: Thu, 9 Feb 2023 15:05:06 +0100 Subject: [PATCH 084/841] Fix mypy style --- tests/ci/stress.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/ci/stress.py b/tests/ci/stress.py index e62a37fb165..979806a87fd 100755 --- a/tests/ci/stress.py +++ b/tests/ci/stress.py @@ -300,7 +300,8 @@ if __name__ == "__main__": hung_check_log = os.path.join(args.output_folder, "hung_check.log") tee = Popen(["/usr/bin/tee", hung_check_log], stdin=PIPE) res = call(cmd, shell=True, stdout=tee.stdin, stderr=STDOUT) - tee.stdin.close() + if tee.stdin is not None: + tee.stdin.close() if res != 0 and have_long_running_queries: logging.info("Hung check failed with exit code %d", res) else: From 94407682b4c360b47967a0b02d8ca9eb83767317 Mon Sep 17 00:00:00 2001 From: Anton Popov Date: Thu, 9 Feb 2023 18:06:15 +0000 Subject: [PATCH 085/841] fix function with sparse columns arguments --- src/Columns/ColumnAggregateFunction.h | 5 +++++ src/Columns/ColumnArray.cpp | 5 +++++ src/Columns/ColumnArray.h | 1 + src/Columns/ColumnCompressed.h | 1 + src/Columns/ColumnConst.h | 5 +++++ src/Columns/ColumnDecimal.h | 5 +++++ src/Columns/ColumnFixedString.h | 5 +++++ src/Columns/ColumnFunction.h | 5 +++++ src/Columns/ColumnLowCardinality.h | 5 +++++ src/Columns/ColumnMap.cpp | 5 +++++ src/Columns/ColumnMap.h | 1 + src/Columns/ColumnNullable.h | 5 +++++ src/Columns/ColumnObject.h | 1 + src/Columns/ColumnSparse.cpp | 13 +++++++++---- src/Columns/ColumnSparse.h | 2 +- src/Columns/ColumnString.h | 5 +++++ src/Columns/ColumnTuple.cpp | 5 +++++ src/Columns/ColumnTuple.h | 1 + src/Columns/ColumnUnique.h | 5 +++++ src/Columns/ColumnVector.h | 5 +++++ src/Columns/IColumn.h | 8 +++++++- src/Columns/IColumnDummy.h | 5 +++++ src/Columns/IColumnImpl.h | 10 ++++++++++ src/Functions/IFunction.cpp | 6 ++++-- 24 files changed, 106 insertions(+), 8 deletions(-) diff --git a/src/Columns/ColumnAggregateFunction.h b/src/Columns/ColumnAggregateFunction.h index 38040d65d3b..ae486d5d24e 100644 --- a/src/Columns/ColumnAggregateFunction.h +++ b/src/Columns/ColumnAggregateFunction.h @@ -223,6 +223,11 @@ public: throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Method getRatioOfDefaultRows is not supported for ColumnAggregateFunction"); } + UInt64 getNumberOfDefaultRows() const override + { + throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Method getNumberOfDefaultRows is not supported for ColumnAggregateFunction"); + } + void getIndicesOfNonDefaultRows(Offsets &, size_t, size_t) const override { throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Method getIndicesOfNonDefaultRows is not supported for ColumnAggregateFunction"); diff --git a/src/Columns/ColumnArray.cpp b/src/Columns/ColumnArray.cpp index 0d085a3275a..cbeebe52141 100644 --- a/src/Columns/ColumnArray.cpp +++ b/src/Columns/ColumnArray.cpp @@ -953,6 +953,11 @@ double ColumnArray::getRatioOfDefaultRows(double sample_ratio) const return getRatioOfDefaultRowsImpl(sample_ratio); } +UInt64 ColumnArray::getNumberOfDefaultRows() const +{ + return getNumberOfDefaultRowsImpl(); +} + void ColumnArray::getIndicesOfNonDefaultRows(Offsets & indices, size_t from, size_t limit) const { return getIndicesOfNonDefaultRowsImpl(indices, from, limit); diff --git a/src/Columns/ColumnArray.h b/src/Columns/ColumnArray.h index 44652fd0c4b..e60c388831d 100644 --- a/src/Columns/ColumnArray.h +++ b/src/Columns/ColumnArray.h @@ -173,6 +173,7 @@ public: } double getRatioOfDefaultRows(double sample_ratio) const override; + UInt64 getNumberOfDefaultRows() const override; void getIndicesOfNonDefaultRows(Offsets & indices, size_t from, size_t limit) const override; diff --git a/src/Columns/ColumnCompressed.h b/src/Columns/ColumnCompressed.h index b258dbac878..d747f8ef5f4 100644 --- a/src/Columns/ColumnCompressed.h +++ b/src/Columns/ColumnCompressed.h @@ -117,6 +117,7 @@ public: void getExtremes(Field &, Field &) const override { throwMustBeDecompressed(); } size_t byteSizeAt(size_t) const override { throwMustBeDecompressed(); } double getRatioOfDefaultRows(double) const override { throwMustBeDecompressed(); } + UInt64 getNumberOfDefaultRows() const override { throwMustBeDecompressed(); } void getIndicesOfNonDefaultRows(Offsets &, size_t, size_t) const override { throwMustBeDecompressed(); } protected: diff --git a/src/Columns/ColumnConst.h b/src/Columns/ColumnConst.h index b86ed393e44..fcdcd2ce224 100644 --- a/src/Columns/ColumnConst.h +++ b/src/Columns/ColumnConst.h @@ -253,6 +253,11 @@ public: return data->isDefaultAt(0) ? 1.0 : 0.0; } + UInt64 getNumberOfDefaultRows() const override + { + return data->isDefaultAt(0) ? s : 0; + } + void getIndicesOfNonDefaultRows(Offsets & indices, size_t from, size_t limit) const override { if (!data->isDefaultAt(0)) diff --git a/src/Columns/ColumnDecimal.h b/src/Columns/ColumnDecimal.h index d47164a178d..03e0b9be558 100644 --- a/src/Columns/ColumnDecimal.h +++ b/src/Columns/ColumnDecimal.h @@ -136,6 +136,11 @@ public: return this->template getRatioOfDefaultRowsImpl(sample_ratio); } + UInt64 getNumberOfDefaultRows() const override + { + return this->template getNumberOfDefaultRowsImpl(); + } + void getIndicesOfNonDefaultRows(IColumn::Offsets & indices, size_t from, size_t limit) const override { return this->template getIndicesOfNonDefaultRowsImpl(indices, from, limit); diff --git a/src/Columns/ColumnFixedString.h b/src/Columns/ColumnFixedString.h index 7c2d9b1a155..39497e3403e 100644 --- a/src/Columns/ColumnFixedString.h +++ b/src/Columns/ColumnFixedString.h @@ -200,6 +200,11 @@ public: return getRatioOfDefaultRowsImpl(sample_ratio); } + UInt64 getNumberOfDefaultRows() const override + { + return getNumberOfDefaultRowsImpl(); + } + void getIndicesOfNonDefaultRows(Offsets & indices, size_t from, size_t limit) const override { return getIndicesOfNonDefaultRowsImpl(indices, from, limit); diff --git a/src/Columns/ColumnFunction.h b/src/Columns/ColumnFunction.h index 7b7ceb29a10..a1f6245c2bd 100644 --- a/src/Columns/ColumnFunction.h +++ b/src/Columns/ColumnFunction.h @@ -168,6 +168,11 @@ public: throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Method getRatioOfDefaultRows is not supported for {}", getName()); } + UInt64 getNumberOfDefaultRows() const override + { + throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Method getNumberOfDefaultRows is not supported for {}", getName()); + } + void getIndicesOfNonDefaultRows(Offsets &, size_t, size_t) const override { throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Method getIndicesOfNonDefaultRows is not supported for {}", getName()); diff --git a/src/Columns/ColumnLowCardinality.h b/src/Columns/ColumnLowCardinality.h index e895bc6b54e..1f2dbdc202e 100644 --- a/src/Columns/ColumnLowCardinality.h +++ b/src/Columns/ColumnLowCardinality.h @@ -199,6 +199,11 @@ public: return getIndexes().getRatioOfDefaultRows(sample_ratio); } + UInt64 getNumberOfDefaultRows() const override + { + return getIndexes().getNumberOfDefaultRows(); + } + void getIndicesOfNonDefaultRows(Offsets & indices, size_t from, size_t limit) const override { return getIndexes().getIndicesOfNonDefaultRows(indices, from, limit); diff --git a/src/Columns/ColumnMap.cpp b/src/Columns/ColumnMap.cpp index 2b5f5f94ee8..b533b68b98d 100644 --- a/src/Columns/ColumnMap.cpp +++ b/src/Columns/ColumnMap.cpp @@ -296,6 +296,11 @@ double ColumnMap::getRatioOfDefaultRows(double sample_ratio) const return getRatioOfDefaultRowsImpl(sample_ratio); } +UInt64 ColumnMap::getNumberOfDefaultRows() const +{ + return getNumberOfDefaultRowsImpl(); +} + void ColumnMap::getIndicesOfNonDefaultRows(Offsets & indices, size_t from, size_t limit) const { return getIndicesOfNonDefaultRowsImpl(indices, from, limit); diff --git a/src/Columns/ColumnMap.h b/src/Columns/ColumnMap.h index db918c3db50..a11905fcaa0 100644 --- a/src/Columns/ColumnMap.h +++ b/src/Columns/ColumnMap.h @@ -92,6 +92,7 @@ public: void forEachSubcolumnRecursively(RecursiveColumnCallback callback) const override; bool structureEquals(const IColumn & rhs) const override; double getRatioOfDefaultRows(double sample_ratio) const override; + UInt64 getNumberOfDefaultRows() const override; void getIndicesOfNonDefaultRows(Offsets & indices, size_t from, size_t limit) const override; void finalize() override { nested->finalize(); } bool isFinalized() const override { return nested->isFinalized(); } diff --git a/src/Columns/ColumnNullable.h b/src/Columns/ColumnNullable.h index 85bf095a9d1..df0088debc9 100644 --- a/src/Columns/ColumnNullable.h +++ b/src/Columns/ColumnNullable.h @@ -156,6 +156,11 @@ public: return getRatioOfDefaultRowsImpl(sample_ratio); } + UInt64 getNumberOfDefaultRows() const override + { + return getNumberOfDefaultRowsImpl(); + } + void getIndicesOfNonDefaultRows(Offsets & indices, size_t from, size_t limit) const override { getIndicesOfNonDefaultRowsImpl(indices, from, limit); diff --git a/src/Columns/ColumnObject.h b/src/Columns/ColumnObject.h index d09974fcc46..91920908542 100644 --- a/src/Columns/ColumnObject.h +++ b/src/Columns/ColumnObject.h @@ -254,6 +254,7 @@ public: bool hasEqualValues() const override { throwMustBeConcrete(); } size_t byteSizeAt(size_t) const override { throwMustBeConcrete(); } double getRatioOfDefaultRows(double) const override { throwMustBeConcrete(); } + UInt64 getNumberOfDefaultRows() const override { throwMustBeConcrete(); } void getIndicesOfNonDefaultRows(Offsets &, size_t, size_t) const override { throwMustBeConcrete(); } private: diff --git a/src/Columns/ColumnSparse.cpp b/src/Columns/ColumnSparse.cpp index 43802b6bbc8..9bc78ef115d 100644 --- a/src/Columns/ColumnSparse.cpp +++ b/src/Columns/ColumnSparse.cpp @@ -470,7 +470,7 @@ int ColumnSparse::compareAtWithCollation(size_t n, size_t m, const IColumn & rhs bool ColumnSparse::hasEqualValues() const { - size_t num_defaults = getNumberOfDefaults(); + size_t num_defaults = getNumberOfDefaultRows(); if (num_defaults == _size) return true; @@ -512,7 +512,7 @@ void ColumnSparse::getPermutationImpl(IColumn::PermutationSortDirection directio else values->getPermutation(direction, stability, limit + 1, null_direction_hint, perm); - size_t num_of_defaults = getNumberOfDefaults(); + size_t num_of_defaults = getNumberOfDefaultRows(); size_t row = 0; const auto & offsets_data = getOffsetsData(); @@ -677,7 +677,7 @@ void ColumnSparse::getExtremes(Field & min, Field & max) const return; } - if (getNumberOfDefaults() == 0) + if (getNumberOfDefaultRows() == 0) { size_t min_idx = 1; size_t max_idx = 1; @@ -709,7 +709,12 @@ void ColumnSparse::getIndicesOfNonDefaultRows(IColumn::Offsets & indices, size_t double ColumnSparse::getRatioOfDefaultRows(double) const { - return static_cast(getNumberOfDefaults()) / _size; + return static_cast(getNumberOfDefaultRows()) / _size; +} + +UInt64 ColumnSparse::getNumberOfDefaultRows() const +{ + return _size - offsets->size(); } MutableColumns ColumnSparse::scatter(ColumnIndex num_columns, const Selector & selector) const diff --git a/src/Columns/ColumnSparse.h b/src/Columns/ColumnSparse.h index ffe392a83c1..d4eb13bf208 100644 --- a/src/Columns/ColumnSparse.h +++ b/src/Columns/ColumnSparse.h @@ -132,6 +132,7 @@ public: void getIndicesOfNonDefaultRows(IColumn::Offsets & indices, size_t from, size_t limit) const override; double getRatioOfDefaultRows(double sample_ratio) const override; + UInt64 getNumberOfDefaultRows() const override; MutableColumns scatter(ColumnIndex num_columns, const Selector & selector) const override; @@ -150,7 +151,6 @@ public: size_t sizeOfValueIfFixed() const override { return values->sizeOfValueIfFixed() + values->sizeOfValueIfFixed(); } bool isCollationSupported() const override { return values->isCollationSupported(); } - size_t getNumberOfDefaults() const { return _size - offsets->size(); } size_t getNumberOfTrailingDefaults() const { return offsets->empty() ? _size : _size - getOffsetsData().back() - 1; diff --git a/src/Columns/ColumnString.h b/src/Columns/ColumnString.h index aa251b1fda0..c9eed212616 100644 --- a/src/Columns/ColumnString.h +++ b/src/Columns/ColumnString.h @@ -273,6 +273,11 @@ public: return getRatioOfDefaultRowsImpl(sample_ratio); } + UInt64 getNumberOfDefaultRows() const override + { + return getNumberOfDefaultRowsImpl(); + } + void getIndicesOfNonDefaultRows(Offsets & indices, size_t from, size_t limit) const override { return getIndicesOfNonDefaultRowsImpl(indices, from, limit); diff --git a/src/Columns/ColumnTuple.cpp b/src/Columns/ColumnTuple.cpp index 903540c1859..369842c7281 100644 --- a/src/Columns/ColumnTuple.cpp +++ b/src/Columns/ColumnTuple.cpp @@ -565,6 +565,11 @@ double ColumnTuple::getRatioOfDefaultRows(double sample_ratio) const return getRatioOfDefaultRowsImpl(sample_ratio); } +UInt64 ColumnTuple::getNumberOfDefaultRows() const +{ + return getNumberOfDefaultRowsImpl(); +} + void ColumnTuple::getIndicesOfNonDefaultRows(Offsets & indices, size_t from, size_t limit) const { return getIndicesOfNonDefaultRowsImpl(indices, from, limit); diff --git a/src/Columns/ColumnTuple.h b/src/Columns/ColumnTuple.h index 25f6328b3fc..281fd94d893 100644 --- a/src/Columns/ColumnTuple.h +++ b/src/Columns/ColumnTuple.h @@ -102,6 +102,7 @@ public: bool isCollationSupported() const override; ColumnPtr compress() const override; double getRatioOfDefaultRows(double sample_ratio) const override; + UInt64 getNumberOfDefaultRows() const override; void getIndicesOfNonDefaultRows(Offsets & indices, size_t from, size_t limit) const override; void finalize() override; bool isFinalized() const override; diff --git a/src/Columns/ColumnUnique.h b/src/Columns/ColumnUnique.h index 8a95726d2be..377255d80c7 100644 --- a/src/Columns/ColumnUnique.h +++ b/src/Columns/ColumnUnique.h @@ -146,6 +146,11 @@ public: throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Method 'getRatioOfDefaultRows' not implemented for ColumnUnique"); } + UInt64 getNumberOfDefaultRows() const override + { + throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Method 'getNumberOfDefaultRows' not implemented for ColumnUnique"); + } + void getIndicesOfNonDefaultRows(IColumn::Offsets &, size_t, size_t) const override { throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Method 'getIndicesOfNonDefaultRows' not implemented for ColumnUnique"); diff --git a/src/Columns/ColumnVector.h b/src/Columns/ColumnVector.h index ded66430160..bf790423d1d 100644 --- a/src/Columns/ColumnVector.h +++ b/src/Columns/ColumnVector.h @@ -358,6 +358,11 @@ public: return this->template getRatioOfDefaultRowsImpl(sample_ratio); } + UInt64 getNumberOfDefaultRows() const override + { + return this->template getNumberOfDefaultRowsImpl(); + } + void getIndicesOfNonDefaultRows(IColumn::Offsets & indices, size_t from, size_t limit) const override { return this->template getIndicesOfNonDefaultRowsImpl(indices, from, limit); diff --git a/src/Columns/IColumn.h b/src/Columns/IColumn.h index 53619c73e5b..d777fd7b240 100644 --- a/src/Columns/IColumn.h +++ b/src/Columns/IColumn.h @@ -441,10 +441,13 @@ public: throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Method structureEquals is not supported for {}", getName()); } - /// Returns ration of values in column, that equal to default value of column. + /// Returns ratio of values in column, that are equal to default value of column. /// Checks only @sample_ratio ratio of rows. [[nodiscard]] virtual double getRatioOfDefaultRows(double sample_ratio = 1.0) const = 0; /// NOLINT + /// Returns number of values in column, that are equal to default value of column. + [[nodiscard]] virtual UInt64 getNumberOfDefaultRows() const = 0; + /// Returns indices of values in column, that not equal to default value of column. virtual void getIndicesOfNonDefaultRows(Offsets & indices, size_t from, size_t limit) const = 0; @@ -584,6 +587,9 @@ protected: template double getRatioOfDefaultRowsImpl(double sample_ratio) const; + template + UInt64 getNumberOfDefaultRowsImpl() const; + template void getIndicesOfNonDefaultRowsImpl(Offsets & indices, size_t from, size_t limit) const; diff --git a/src/Columns/IColumnDummy.h b/src/Columns/IColumnDummy.h index 0b00ebbdd1f..82d4c857b29 100644 --- a/src/Columns/IColumnDummy.h +++ b/src/Columns/IColumnDummy.h @@ -168,6 +168,11 @@ public: throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Method getRatioOfDefaultRows is not supported for {}", getName()); } + UInt64 getNumberOfDefaultRows() const override + { + throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Method getNumberOfDefaultRows is not supported for {}", getName()); + } + void getIndicesOfNonDefaultRows(Offsets &, size_t, size_t) const override { throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Method getIndicesOfNonDefaultRows is not supported for {}", getName()); diff --git a/src/Columns/IColumnImpl.h b/src/Columns/IColumnImpl.h index 8537a4c097c..e676373e211 100644 --- a/src/Columns/IColumnImpl.h +++ b/src/Columns/IColumnImpl.h @@ -194,6 +194,16 @@ double IColumn::getRatioOfDefaultRowsImpl(double sample_ratio) const return static_cast(res) / num_checked_rows; } +template +UInt64 IColumn::getNumberOfDefaultRowsImpl() const +{ + UInt64 res = 0; + size_t num_rows = size(); + for (size_t i = 0; i < num_rows; ++i) + res += static_cast(*this).isDefaultAt(i); + return res; +} + template void IColumn::getIndicesOfNonDefaultRowsImpl(Offsets & indices, size_t from, size_t limit) const { diff --git a/src/Functions/IFunction.cpp b/src/Functions/IFunction.cpp index 1c30dee0482..2163fa27c51 100644 --- a/src/Functions/IFunction.cpp +++ b/src/Functions/IFunction.cpp @@ -321,7 +321,7 @@ ColumnPtr IExecutableFunction::execute(const ColumnsWithTypeAndName & arguments, const auto * column_sparse = checkAndGetColumn(arguments[i].column.get()); /// In rare case, when sparse column doesn't have default values, /// it's more convenient to convert it to full before execution of function. - if (column_sparse && column_sparse->getNumberOfDefaults()) + if (column_sparse && column_sparse->getNumberOfDefaultRows()) { sparse_column_position = i; ++num_sparse_columns; @@ -359,7 +359,9 @@ ColumnPtr IExecutableFunction::execute(const ColumnsWithTypeAndName & arguments, return res->cloneResized(input_rows_count); /// If default of sparse column is changed after execution of function, convert to full column. - if (!result_type->supportsSparseSerialization() || !res->isDefaultAt(0)) + /// If there are any default in non-zero position after execution of function, convert to full column. + /// Currently there is no easy way to rebuild sparse column with new offsets. + if (!result_type->supportsSparseSerialization() || !res->isDefaultAt(0) || res->getNumberOfDefaultRows() != 1) { const auto & offsets_data = assert_cast &>(*sparse_offsets).getData(); return res->createWithOffsets(offsets_data, (*res)[0], input_rows_count, /*shift=*/ 1); From 4067453602b6a2c93550ad11d4e1ddefa887b622 Mon Sep 17 00:00:00 2001 From: Kruglov Pavel <48961922+Avogar@users.noreply.github.com> Date: Fri, 10 Feb 2023 11:57:02 +0100 Subject: [PATCH 086/841] Update run.sh --- docker/test/upgrade/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/test/upgrade/run.sh b/docker/test/upgrade/run.sh index d5b29485afe..bbf24e96685 100644 --- a/docker/test/upgrade/run.sh +++ b/docker/test/upgrade/run.sh @@ -467,7 +467,7 @@ else for table in query_log trace_log do clickhouse-local --path /var/lib/clickhouse/ --only-system-tables -q "select * from system.$table format TSVWithNamesAndTypes" \ - | zstd --threads=0 > /test_output/$table.backward.tsv.zst ||: + | zstd --threads=0 > /test_output/$table.tsv.zst ||: done fi From 43e660ebd2cdb18fadda2a1385c014135654c4d9 Mon Sep 17 00:00:00 2001 From: Kruglov Pavel <48961922+Avogar@users.noreply.github.com> Date: Fri, 10 Feb 2023 18:28:19 +0100 Subject: [PATCH 087/841] Update run.sh --- docker/test/upgrade/run.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/test/upgrade/run.sh b/docker/test/upgrade/run.sh index bbf24e96685..e2392dd4438 100644 --- a/docker/test/upgrade/run.sh +++ b/docker/test/upgrade/run.sh @@ -416,6 +416,7 @@ else -e "Session expired" \ -e "TOO_MANY_PARTS" \ -e "Authentication failed" \ + -e "Container already exists" \ /var/log/clickhouse-server/clickhouse-server.upgrade.log | zgrep -Fa "" > /test_output/upgrade_error_messages.txt \ && echo -e "Error message in clickhouse-server.log (see upgrade_error_messages.txt)$FAIL$(head_escaped /test_output/bc_check_error_messages.txt)" \ >> /test_output/test_results.tsv \ From 8cc768fde2d72c6e5d94c11ac3e9f8a45f87ba77 Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Mon, 13 Feb 2023 16:23:04 +0000 Subject: [PATCH 088/841] Add KeeperMap as disallowed engine for temporary tables --- docs/en/sql-reference/statements/create/table.md | 2 +- docs/ru/sql-reference/statements/create/table.md | 2 +- src/Interpreters/InterpreterCreateQuery.cpp | 4 ++-- .../02525_different_engines_in_temporary_tables.sql | 8 ++++++++ 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/en/sql-reference/statements/create/table.md b/docs/en/sql-reference/statements/create/table.md index 463748ab9a4..efa8c420f1a 100644 --- a/docs/en/sql-reference/statements/create/table.md +++ b/docs/en/sql-reference/statements/create/table.md @@ -370,7 +370,7 @@ ENGINE = MergeTree ORDER BY x; ClickHouse supports temporary tables which have the following characteristics: - Temporary tables disappear when the session ends, including if the connection is lost. -- A temporary table uses the Memory table engine when engine is not specified and it may use any table engine except for Replicated engines. +- A temporary table uses the Memory table engine when engine is not specified and it may use any table engine except for Replicated and `KeeperMap` engines. - The DB can’t be specified for a temporary table. It is created outside of databases. - Impossible to create a temporary table with distributed DDL query on all cluster servers (by using `ON CLUSTER`): this table exists only in the current session. - If a temporary table has the same name as another one and a query specifies the table name without specifying the DB, the temporary table will be used. diff --git a/docs/ru/sql-reference/statements/create/table.md b/docs/ru/sql-reference/statements/create/table.md index 558f9472b30..2ba4c94a2f4 100644 --- a/docs/ru/sql-reference/statements/create/table.md +++ b/docs/ru/sql-reference/statements/create/table.md @@ -299,7 +299,7 @@ ENGINE = MergeTree ORDER BY x; ClickHouse поддерживает временные таблицы со следующими характеристиками: - Временные таблицы исчезают после завершения сессии, в том числе при обрыве соединения. -- Временная таблица использует движок таблиц Memory когда движок не указан и она может использовать любой движок таблиц за исключением движков Replicated. +- Временная таблица использует движок таблиц Memory когда движок не указан и она может использовать любой движок таблиц за исключением движков Replicated и `KeeperMap`. - Невозможно указать базу данных для временной таблицы. Она создается вне баз данных. - Невозможно создать временную таблицу распределённым DDL запросом на всех серверах кластера (с опцией `ON CLUSTER`): такая таблица существует только в рамках существующей сессии. - Если временная таблица имеет то же имя, что и некоторая другая, то, при упоминании в запросе без указания БД, будет использована временная таблица. diff --git a/src/Interpreters/InterpreterCreateQuery.cpp b/src/Interpreters/InterpreterCreateQuery.cpp index b479bc96082..9f75d9c7835 100644 --- a/src/Interpreters/InterpreterCreateQuery.cpp +++ b/src/Interpreters/InterpreterCreateQuery.cpp @@ -936,8 +936,8 @@ void InterpreterCreateQuery::setEngine(ASTCreateQuery & create) const { if (create.storage->engine) { - if (create.storage->engine->name.starts_with("Replicated")) - throw Exception(ErrorCodes::INCORRECT_QUERY, "Temporary tables cannot be created with Replicated table engines"); + if (create.storage->engine->name.starts_with("Replicated") || create.storage->engine->name == "KeeperMap") + throw Exception(ErrorCodes::INCORRECT_QUERY, "Temporary tables cannot be created with Replicated or KeeperMap table engines"); } else throw Exception(ErrorCodes::INCORRECT_QUERY, "Invalid storage definition for temporary table"); diff --git a/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.sql b/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.sql index 2913a38865e..8d8381e92c4 100644 --- a/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.sql +++ b/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.sql @@ -43,3 +43,11 @@ ENGINE = TinyLog; INSERT INTO table_tiny_log_02525 VALUES (1, 'a'), (2, 'b'), (3, 'c'); SELECT * FROM table_tiny_log_02525; DROP TEMPORARY TABLE table_tiny_log_02525; + +DROP TEMPORARY TABLE IF EXISTS table_keeper_map_02525; +CREATE TEMPORARY TABLE table_keeper_map_02525 +( + key String, + value UInt32 +) Engine=KeeperMap('/' || currentDatabase() || '/test02525') +PRIMARY KEY(key); -- { serverError 80 } From 1fce8e4eedf14f3fa8c1b9bc8ff90ef7a52a311f Mon Sep 17 00:00:00 2001 From: Dmitry Novik Date: Mon, 13 Feb 2023 18:35:34 +0000 Subject: [PATCH 089/841] Fix alias resolve with group_by_use_nulls --- src/Analyzer/Passes/QueryAnalysisPass.cpp | 33 +++++++++++++++-------- src/Planner/PlannerExpressionAnalysis.cpp | 3 ++- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/Analyzer/Passes/QueryAnalysisPass.cpp b/src/Analyzer/Passes/QueryAnalysisPass.cpp index 003944fa8b0..2e7d0b2c6db 100644 --- a/src/Analyzer/Passes/QueryAnalysisPass.cpp +++ b/src/Analyzer/Passes/QueryAnalysisPass.cpp @@ -1,6 +1,5 @@ #include -#include "Common/logger_useful.h" #include #include @@ -194,7 +193,6 @@ namespace ErrorCodes * TODO: SELECT (compound_expression).*, (compound_expression).COLUMNS are not supported on parser level. * TODO: SELECT a.b.c.*, a.b.c.COLUMNS. Qualified matcher where identifier size is greater than 2 are not supported on parser level. * TODO: Support function identifier resolve from parent query scope, if lambda in parent scope does not capture any columns. - * TODO: Support group_by_use_nulls. * TODO: Scalar subqueries cache. */ @@ -676,7 +674,11 @@ struct IdentifierResolveScope if (auto * union_node = scope_node->as()) context = union_node->getContext(); else if (auto * query_node = scope_node->as()) + { context = query_node->getContext(); + group_by_use_nulls = context->getSettingsRef().group_by_use_nulls && + (query_node->isGroupByWithGroupingSets() || query_node->isGroupByWithRollup() || query_node->isGroupByWithCube()); + } } QueryTreeNodePtr scope_node; @@ -729,6 +731,9 @@ struct IdentifierResolveScope /// Use identifier lookup to result cache bool use_identifier_lookup_to_result_cache = true; + /// Apply nullability to aggregation keys + bool group_by_use_nulls = false; + /// Subquery depth size_t subquery_depth = 0; @@ -3122,7 +3127,7 @@ IdentifierResolveResult QueryAnalyzer::tryResolveIdentifier(const IdentifierLook if (!resolve_result.resolved_identifier || scope.non_cached_identifier_lookups_during_expression_resolve.contains(identifier_lookup) || !scope.use_identifier_lookup_to_result_cache || - scope.context->getSettingsRef().group_by_use_nulls) + scope.group_by_use_nulls) scope.identifier_lookup_to_result.erase(it); return resolve_result; @@ -4650,7 +4655,7 @@ ProjectionNames QueryAnalyzer::resolveFunction(QueryTreeNodePtr & node, Identifi } function_node.resolveAsFunction(std::move(function_base)); - if (settings.group_by_use_nulls && scope.nullable_group_by_keys.contains(node)) + if (scope.group_by_use_nulls && scope.nullable_group_by_keys.contains(node)) function_node.convertToNullable(); } catch (Exception & e) @@ -4795,8 +4800,8 @@ ProjectionNames QueryAnalyzer::resolveExpressionNode(QueryTreeNodePtr & node, Id node = tryResolveIdentifier({unresolved_identifier, IdentifierLookupContext::TABLE_EXPRESSION}, scope).resolved_identifier; /// If table identifier is resolved as CTE clone it and resolve - auto * subquery_node = node->as(); - auto * union_node = node->as(); + auto * subquery_node = node ? node->as() : nullptr; + auto * union_node = node ? node->as() : nullptr; bool resolved_as_cte = (subquery_node && subquery_node->isCTE()) || (union_node && union_node->isCTE()); if (resolved_as_cte) @@ -4900,6 +4905,12 @@ ProjectionNames QueryAnalyzer::resolveExpressionNode(QueryTreeNodePtr & node, Id if (result_projection_names.empty()) result_projection_names.push_back(column_node.getColumnName()); + if (scope.group_by_use_nulls && scope.nullable_group_by_keys.contains(node)) + { + node = node->clone(); + node->convertToNullable(); + } + break; } case QueryTreeNodeType::FUNCTION: @@ -4986,7 +4997,7 @@ ProjectionNames QueryAnalyzer::resolveExpressionNode(QueryTreeNodePtr & node, Id /** Update aliases after expression node was resolved. * Do not update node in alias table if we resolve it for duplicate alias. */ - if (!node_alias.empty() && use_alias_table) + if (!node_alias.empty() && use_alias_table && !scope.group_by_use_nulls) { auto it = scope.alias_name_to_expression_node.find(node_alias); if (it != scope.alias_name_to_expression_node.end()) @@ -6033,7 +6044,7 @@ void QueryAnalyzer::resolveQuery(const QueryTreeNodePtr & query_node, Identifier resolveQueryJoinTreeNode(query_node_typed.getJoinTree(), scope, visitor); } - if (!settings.group_by_use_nulls) + if (!scope.group_by_use_nulls) scope.use_identifier_lookup_to_result_cache = true; /// Resolve query node sections. @@ -6072,7 +6083,7 @@ void QueryAnalyzer::resolveQuery(const QueryTreeNodePtr & query_node, Identifier resolveExpressionNodeList(query_node_typed.getGroupByNode(), scope, false /*allow_lambda_expression*/, false /*allow_table_expression*/); - if (settings.group_by_use_nulls) + if (scope.group_by_use_nulls) { for (const auto & group_by_elem : query_node_typed.getGroupBy().getNodes()) scope.nullable_group_by_keys.insert(group_by_elem->clone()); @@ -6270,7 +6281,7 @@ void QueryAnalyzer::resolveQuery(const QueryTreeNodePtr & query_node, Identifier continue; group_by_keys_nodes.push_back(grouping_set_key->clone()); - if (settings.group_by_use_nulls) + if (scope.group_by_use_nulls) group_by_keys_nodes.back()->convertToNullable(); } } @@ -6280,7 +6291,7 @@ void QueryAnalyzer::resolveQuery(const QueryTreeNodePtr & query_node, Identifier continue; group_by_keys_nodes.push_back(node->clone()); - if (settings.group_by_use_nulls) + if (scope.group_by_use_nulls) group_by_keys_nodes.back()->convertToNullable(); } } diff --git a/src/Planner/PlannerExpressionAnalysis.cpp b/src/Planner/PlannerExpressionAnalysis.cpp index d0104b0bf2a..55a5da247f9 100644 --- a/src/Planner/PlannerExpressionAnalysis.cpp +++ b/src/Planner/PlannerExpressionAnalysis.cpp @@ -80,7 +80,8 @@ std::pair, std::optionalgetQueryContext()->getSettingsRef().group_by_use_nulls; + bool group_by_use_nulls = planner_context->getQueryContext()->getSettingsRef().group_by_use_nulls && + (query_node.isGroupByWithGroupingSets() || query_node.isGroupByWithRollup() || query_node.isGroupByWithCube()); if (query_node.hasGroupBy()) { From 8a3be450c391e020cbb4497b234243e8dbf5d47f Mon Sep 17 00:00:00 2001 From: Dmitry Novik Date: Mon, 13 Feb 2023 18:38:07 +0000 Subject: [PATCH 090/841] Add test query --- tests/queries/1_stateful/00173_group_by_use_nulls.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/queries/1_stateful/00173_group_by_use_nulls.sql b/tests/queries/1_stateful/00173_group_by_use_nulls.sql index f110ebb0db4..8531e9efaf8 100644 --- a/tests/queries/1_stateful/00173_group_by_use_nulls.sql +++ b/tests/queries/1_stateful/00173_group_by_use_nulls.sql @@ -9,6 +9,17 @@ ORDER BY LIMIT 10 SETTINGS group_by_use_nulls = 1; +SELECT + CounterID AS k, + quantileBFloat16(0.5)(ResolutionWidth) +FROM test.hits +GROUP BY k +ORDER BY + count() DESC, + CounterID ASC +LIMIT 10 +SETTINGS group_by_use_nulls = 1 FORMAT Null; + -- { echoOn } set allow_experimental_analyzer = 1; From 53298f5a17bc88faffef80b1a47f2920912f5bda Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Tue, 14 Feb 2023 11:16:00 +0000 Subject: [PATCH 091/841] Add test for ReplicatedMergeTree --- .../02525_different_engines_in_temporary_tables.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.sql b/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.sql index 8d8381e92c4..1535a190db5 100644 --- a/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.sql +++ b/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.sql @@ -44,6 +44,16 @@ INSERT INTO table_tiny_log_02525 VALUES (1, 'a'), (2, 'b'), (3, 'c'); SELECT * FROM table_tiny_log_02525; DROP TEMPORARY TABLE table_tiny_log_02525; +DROP TEMPORARY TABLE IF EXISTS table_replicated_merge_tree_02525; +CREATE TEMPORARY TABLE table_replicated_merge_tree_02525 +( + id UInt64, + info String +) +ENGINE ReplicatedMergeTree('/clickhouse/tables/{database}/test_02525/table_replicated_merge_tree_02525', 'r1') +ORDER BY id +PRIMARY KEY id; -- { serverError 80 } + DROP TEMPORARY TABLE IF EXISTS table_keeper_map_02525; CREATE TEMPORARY TABLE table_keeper_map_02525 ( From 42f2c537e21a9a9c7fa067e175916af95c327e90 Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Tue, 14 Feb 2023 12:10:44 +0000 Subject: [PATCH 092/841] Remove setting database for create query --- src/Interpreters/InterpreterCreateQuery.cpp | 3 +-- src/Parsers/ASTCreateQuery.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Interpreters/InterpreterCreateQuery.cpp b/src/Interpreters/InterpreterCreateQuery.cpp index 60662346f68..71812c1ab0e 100644 --- a/src/Interpreters/InterpreterCreateQuery.cpp +++ b/src/Interpreters/InterpreterCreateQuery.cpp @@ -1268,8 +1268,7 @@ bool InterpreterCreateQuery::doCreateTable(ASTCreateQuery & create, if (create.if_not_exists && getContext()->tryResolveStorageID({"", create.getTable()}, Context::ResolveExternal)) return false; - create.setDatabase(DatabaseCatalog::TEMPORARY_DATABASE); - DatabasePtr database = DatabaseCatalog::instance().getDatabase(create.getDatabase()); + DatabasePtr database = DatabaseCatalog::instance().getDatabase(DatabaseCatalog::TEMPORARY_DATABASE); String temporary_table_name = create.getTable(); auto creator = [&](const StorageID & table_id) diff --git a/src/Parsers/ASTCreateQuery.cpp b/src/Parsers/ASTCreateQuery.cpp index a5a1b25de8b..e74be6c66c5 100644 --- a/src/Parsers/ASTCreateQuery.cpp +++ b/src/Parsers/ASTCreateQuery.cpp @@ -293,7 +293,7 @@ void ASTCreateQuery::formatQueryImpl(const FormatSettings & settings, FormatStat << what << " " << (if_not_exists ? "IF NOT EXISTS " : "") << (settings.hilite ? hilite_none : "") - << (database && !temporary ? backQuoteIfNeed(getDatabase()) + "." : "") << backQuoteIfNeed(getTable()); + << (database ? backQuoteIfNeed(getDatabase()) + "." : "") << backQuoteIfNeed(getTable()); if (uuid != UUIDHelpers::Nil) settings.ostr << (settings.hilite ? hilite_keyword : "") << " UUID " << (settings.hilite ? hilite_none : "") From b0ced21c30043856b75babea261012e9f45d7d81 Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Tue, 14 Feb 2023 13:22:15 +0000 Subject: [PATCH 093/841] Move temp database clean up into new function removeDataPath() --- src/Databases/DatabaseMemory.cpp | 14 ++++++++++++-- src/Databases/DatabaseMemory.h | 2 ++ src/Interpreters/DatabaseCatalog.cpp | 5 ----- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/Databases/DatabaseMemory.cpp b/src/Databases/DatabaseMemory.cpp index 1aae2b81ccc..3ede69d5362 100644 --- a/src/Databases/DatabaseMemory.cpp +++ b/src/Databases/DatabaseMemory.cpp @@ -26,7 +26,12 @@ namespace ErrorCodes DatabaseMemory::DatabaseMemory(const String & name_, ContextPtr context_) : DatabaseWithOwnTablesBase(name_, "DatabaseMemory(" + name_ + ")", context_) , data_path("data/" + escapeForFileName(database_name) + "/") -{} +{ + /// Temporary database should not have any data on the moment of its creation + /// In case of sudden server shutdown remove database folder of temporary database + if (name_ == DatabaseCatalog::TEMPORARY_DATABASE) + removeDataPath(context_); +} void DatabaseMemory::createTable( ContextPtr /*context*/, @@ -127,10 +132,15 @@ UUID DatabaseMemory::tryGetTableUUID(const String & table_name) const return UUIDHelpers::Nil; } +void DatabaseMemory::removeDataPath(ContextPtr local_context) +{ + std::filesystem::remove_all(local_context->getPath() + data_path); +} + void DatabaseMemory::drop(ContextPtr local_context) { /// Remove data on explicit DROP DATABASE - std::filesystem::remove_all(local_context->getPath() + data_path); + removeDataPath(local_context); } void DatabaseMemory::alterTable(ContextPtr local_context, const StorageID & table_id, const StorageInMemoryMetadata & metadata) diff --git a/src/Databases/DatabaseMemory.h b/src/Databases/DatabaseMemory.h index 6262543b0c1..0f703a0b46e 100644 --- a/src/Databases/DatabaseMemory.h +++ b/src/Databases/DatabaseMemory.h @@ -53,6 +53,8 @@ public: std::vector> getTablesForBackup(const FilterByNameFunction & filter, const ContextPtr & local_context) const override; private: + void removeDataPath(ContextPtr local_context); + const String data_path; using NameToASTCreate = std::unordered_map; NameToASTCreate create_queries TSA_GUARDED_BY(mutex); diff --git a/src/Interpreters/DatabaseCatalog.cpp b/src/Interpreters/DatabaseCatalog.cpp index eb5c97bc583..ac16431b293 100644 --- a/src/Interpreters/DatabaseCatalog.cpp +++ b/src/Interpreters/DatabaseCatalog.cpp @@ -154,11 +154,6 @@ void DatabaseCatalog::initializeAndLoadTemporaryDatabase() unused_dir_cleanup_period_sec = getContext()->getConfigRef().getInt64("database_catalog_unused_dir_cleanup_period_sec", unused_dir_cleanup_period_sec); auto db_for_temporary_and_external_tables = std::make_shared(TEMPORARY_DATABASE, getContext()); - - /// Temporary database should not have any data on the moment of its creation - /// In case of sudden server shutdown remove database folder of temporary database - db_for_temporary_and_external_tables->drop(getContext()); - attachDatabase(TEMPORARY_DATABASE, db_for_temporary_and_external_tables); } From f410834bfb4c57b12acc2ac7615a362db90d700b Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Tue, 14 Feb 2023 17:03:36 +0000 Subject: [PATCH 094/841] Remove dropTable of temp table from InterpreterDropQuery. --- src/Interpreters/DatabaseCatalog.cpp | 11 +++-------- src/Interpreters/InterpreterDropQuery.cpp | 6 ------ 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/Interpreters/DatabaseCatalog.cpp b/src/Interpreters/DatabaseCatalog.cpp index ac16431b293..ad5d9d4d325 100644 --- a/src/Interpreters/DatabaseCatalog.cpp +++ b/src/Interpreters/DatabaseCatalog.cpp @@ -121,14 +121,9 @@ TemporaryTableHolder::~TemporaryTableHolder() { if (id != UUIDHelpers::Nil) { - /// Table maybe dropped before by DROP TEMPORARY TABLE - /// Thus we need to verify the existence of the table before calling dropTable - auto table = temporary_tables->tryGetTable("_tmp_" + toString(id), getContext()); - if (table && !table->is_dropped) - { - table->flushAndShutdown(); - temporary_tables->dropTable(getContext(), "_tmp_" + toString(id)); - } + auto table = getTable(); + table->flushAndShutdown(); + temporary_tables->dropTable(getContext(), "_tmp_" + toString(id)); } } diff --git a/src/Interpreters/InterpreterDropQuery.cpp b/src/Interpreters/InterpreterDropQuery.cpp index ac86842401a..86562183c4a 100644 --- a/src/Interpreters/InterpreterDropQuery.cpp +++ b/src/Interpreters/InterpreterDropQuery.cpp @@ -282,12 +282,6 @@ BlockIO InterpreterDropQuery::executeToTemporaryTable(const String & table_name, else if (kind == ASTDropQuery::Kind::Drop) { context_handle->removeExternalTable(table_name); - table->flushAndShutdown(); - auto table_lock = table->lockExclusively(getContext()->getCurrentQueryId(), getContext()->getSettingsRef().lock_acquire_timeout); - /// Delete table data - DatabasePtr database = DatabaseCatalog::instance().getDatabase(DatabaseCatalog::TEMPORARY_DATABASE); - UUID table_uuid = table->getStorageID().uuid; - database->dropTable(getContext(), "_tmp_" + toString(table_uuid)); } else if (kind == ASTDropQuery::Kind::Detach) { From e460aa6272578f53f85a3cb3e108cf0b411abc7a Mon Sep 17 00:00:00 2001 From: Dmitry Novik Date: Wed, 15 Feb 2023 16:00:51 +0000 Subject: [PATCH 095/841] Fix warning --- src/Planner/PlannerActionsVisitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Planner/PlannerActionsVisitor.cpp b/src/Planner/PlannerActionsVisitor.cpp index 6bd245858fe..c9bae0b2c2a 100644 --- a/src/Planner/PlannerActionsVisitor.cpp +++ b/src/Planner/PlannerActionsVisitor.cpp @@ -327,7 +327,7 @@ PlannerActionsVisitorImpl::NodeNameAndNodeMinLevel PlannerActionsVisitorImpl::vi actions_stack.pop_back(); // TODO: Pass IFunctionBase here not FunctionCaptureOverloadResolver. - actions_stack[level].addFunctionIfNecessary(lambda_node_name, std::move(lambda_children), std::move(function_capture)); + actions_stack[level].addFunctionIfNecessary(lambda_node_name, std::move(lambda_children), function_capture); size_t actions_stack_size = actions_stack.size(); for (size_t i = level + 1; i < actions_stack_size; ++i) From 3730ea388f4e9de81dce547f309f24801d724d2b Mon Sep 17 00:00:00 2001 From: Anton Popov Date: Wed, 15 Feb 2023 19:37:54 +0000 Subject: [PATCH 096/841] fix issues with sparse columns --- src/Client/ClientBase.cpp | 2 +- src/Columns/ColumnAggregateFunction.h | 4 ++-- src/Columns/IColumnImpl.h | 11 +++++------ src/Interpreters/Aggregator.cpp | 4 ++++ .../0_stateless/02432_s3_parallel_parts_cleanup.sql | 4 ++-- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/Client/ClientBase.cpp b/src/Client/ClientBase.cpp index bc8c43af8c6..6c6d22bc037 100644 --- a/src/Client/ClientBase.cpp +++ b/src/Client/ClientBase.cpp @@ -488,7 +488,7 @@ void ClientBase::onTotals(Block & block, ASTPtr parsed_query) void ClientBase::onExtremes(Block & block, ASTPtr parsed_query) { initOutputFormat(block, parsed_query); - output_format->setExtremes(block); + output_format->setExtremes(materializeBlock(block)); } diff --git a/src/Columns/ColumnAggregateFunction.h b/src/Columns/ColumnAggregateFunction.h index ae486d5d24e..f9ce45708c9 100644 --- a/src/Columns/ColumnAggregateFunction.h +++ b/src/Columns/ColumnAggregateFunction.h @@ -220,12 +220,12 @@ public: double getRatioOfDefaultRows(double) const override { - throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Method getRatioOfDefaultRows is not supported for ColumnAggregateFunction"); + return 0.0; } UInt64 getNumberOfDefaultRows() const override { - throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Method getNumberOfDefaultRows is not supported for ColumnAggregateFunction"); + return 0; } void getIndicesOfNonDefaultRows(Offsets &, size_t, size_t) const override diff --git a/src/Columns/IColumnImpl.h b/src/Columns/IColumnImpl.h index e676373e211..20aaefae39c 100644 --- a/src/Columns/IColumnImpl.h +++ b/src/Columns/IColumnImpl.h @@ -164,13 +164,9 @@ double IColumn::getRatioOfDefaultRowsImpl(double sample_ratio) const throw Exception(ErrorCodes::LOGICAL_ERROR, "Value of 'sample_ratio' must be in interval (0.0; 1.0], but got: {}", sample_ratio); - /// Randomize a little to avoid boundary effects. - std::uniform_int_distribution dist(1, static_cast(1.0 / sample_ratio)); - size_t num_rows = size(); - size_t num_sampled_rows = static_cast(num_rows * sample_ratio); - size_t num_checked_rows = dist(thread_local_rng); - num_sampled_rows = std::min(num_sampled_rows + dist(thread_local_rng), num_rows); + size_t num_sampled_rows = std::min(static_cast(num_rows * sample_ratio), num_rows); + size_t num_checked_rows = 0; size_t res = 0; if (num_sampled_rows == num_rows) @@ -191,6 +187,9 @@ double IColumn::getRatioOfDefaultRowsImpl(double sample_ratio) const } } + if (num_checked_rows == 0) + return 0.0; + return static_cast(res) / num_checked_rows; } diff --git a/src/Interpreters/Aggregator.cpp b/src/Interpreters/Aggregator.cpp index da4442f99d3..de172a6d7ac 100644 --- a/src/Interpreters/Aggregator.cpp +++ b/src/Interpreters/Aggregator.cpp @@ -1416,6 +1416,10 @@ void Aggregator::prepareAggregateInstructions( materialized_columns.push_back(columns.at(pos)->convertToFullColumnIfConst()); aggregate_columns[i][j] = materialized_columns.back().get(); + /// Sparse columns without defaults may be handled incorrectly. + if (aggregate_columns[i][j]->getNumberOfDefaultRows() == 0) + allow_sparse_arguments = false; + auto full_column = allow_sparse_arguments ? aggregate_columns[i][j]->getPtr() : recursiveRemoveSparse(aggregate_columns[i][j]->getPtr()); diff --git a/tests/queries/0_stateless/02432_s3_parallel_parts_cleanup.sql b/tests/queries/0_stateless/02432_s3_parallel_parts_cleanup.sql index 235a3335d9d..3688a649d5e 100644 --- a/tests/queries/0_stateless/02432_s3_parallel_parts_cleanup.sql +++ b/tests/queries/0_stateless/02432_s3_parallel_parts_cleanup.sql @@ -7,7 +7,7 @@ drop table if exists rmt2; create table rmt (n int, m int, k int) engine=ReplicatedMergeTree('/test/02432/{database}', '1') order by tuple() settings storage_policy = 's3_cache', allow_remote_fs_zero_copy_replication=1, max_part_removal_threads=10, concurrent_part_removal_threshold=1, cleanup_delay_period=1, cleanup_delay_period_random_add=1, - max_replicated_merges_in_queue=0, max_replicated_mutations_in_queue=0, min_bytes_for_compact_part=0, min_rows_for_compact_part=0; + max_replicated_merges_in_queue=0, max_replicated_mutations_in_queue=0, min_bytes_for_wide_part=0, min_rows_for_wide_part=0; insert into rmt(n, m) values (1, 42); insert into rmt(n, m) values (2, 42); @@ -37,7 +37,7 @@ select count(), sum(n), sum(m) from rmt; create table rmt2 (n int, m int, k String) engine=ReplicatedMergeTree('/test/02432/{database}', '2') order by tuple() settings storage_policy = 's3_cache', allow_remote_fs_zero_copy_replication=1, max_part_removal_threads=10, concurrent_part_removal_threshold=1, cleanup_delay_period=1, cleanup_delay_period_random_add=1, - min_bytes_for_compact_part=0, min_rows_for_compact_part=0, max_replicated_merges_in_queue=1, + min_bytes_for_wide_part=0, min_rows_for_wide_part=0, max_replicated_merges_in_queue=1, old_parts_lifetime=0; alter table rmt2 modify column k Nullable(String); From 537c9914ce77dccf1b2bd66541094f55e0658910 Mon Sep 17 00:00:00 2001 From: MeenaRenganathan22 Date: Thu, 16 Feb 2023 06:21:09 -0800 Subject: [PATCH 097/841] Updating the CMakeLists.txt to include the latest changes in the KRB5 submodule --- contrib/krb5-cmake/CMakeLists.txt | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/contrib/krb5-cmake/CMakeLists.txt b/contrib/krb5-cmake/CMakeLists.txt index ceaa270ad85..be016bb0082 100644 --- a/contrib/krb5-cmake/CMakeLists.txt +++ b/contrib/krb5-cmake/CMakeLists.txt @@ -183,7 +183,6 @@ set(ALL_SRCS "${KRB5_SOURCE_DIR}/lib/crypto/krb/block_size.c" "${KRB5_SOURCE_DIR}/lib/crypto/krb/string_to_key.c" "${KRB5_SOURCE_DIR}/lib/crypto/krb/verify_checksum.c" - "${KRB5_SOURCE_DIR}/lib/crypto/krb/crypto_libinit.c" "${KRB5_SOURCE_DIR}/lib/crypto/krb/derive.c" "${KRB5_SOURCE_DIR}/lib/crypto/krb/random_to_key.c" "${KRB5_SOURCE_DIR}/lib/crypto/krb/verify_checksum_iov.c" @@ -217,9 +216,7 @@ set(ALL_SRCS "${KRB5_SOURCE_DIR}/lib/crypto/krb/s2k_rc4.c" "${KRB5_SOURCE_DIR}/lib/crypto/krb/valid_cksumtype.c" "${KRB5_SOURCE_DIR}/lib/crypto/krb/nfold.c" - "${KRB5_SOURCE_DIR}/lib/crypto/krb/prng_fortuna.c" "${KRB5_SOURCE_DIR}/lib/crypto/krb/encrypt_length.c" - "${KRB5_SOURCE_DIR}/lib/crypto/krb/cmac.c" "${KRB5_SOURCE_DIR}/lib/crypto/krb/keyblocks.c" "${KRB5_SOURCE_DIR}/lib/crypto/krb/prf_rc4.c" "${KRB5_SOURCE_DIR}/lib/crypto/krb/s2k_pbkdf2.c" @@ -228,11 +225,11 @@ set(ALL_SRCS "${KRB5_SOURCE_DIR}/lib/crypto/openssl/enc_provider/rc4.c" "${KRB5_SOURCE_DIR}/lib/crypto/openssl/enc_provider/des3.c" #"${KRB5_SOURCE_DIR}/lib/crypto/openssl/enc_provider/camellia.c" + "${KRB5_SOURCE_DIR}/lib/crypto/openssl/cmac.c" "${KRB5_SOURCE_DIR}/lib/crypto/openssl/sha256.c" "${KRB5_SOURCE_DIR}/lib/crypto/openssl/hmac.c" + "${KRB5_SOURCE_DIR}/lib/crypto/openssl/kdf.c" "${KRB5_SOURCE_DIR}/lib/crypto/openssl/pbkdf2.c" - "${KRB5_SOURCE_DIR}/lib/crypto/openssl/init.c" - "${KRB5_SOURCE_DIR}/lib/crypto/openssl/stubs.c" # "${KRB5_SOURCE_DIR}/lib/crypto/openssl/hash_provider/hash_crc32.c" "${KRB5_SOURCE_DIR}/lib/crypto/openssl/hash_provider/hash_evp.c" "${KRB5_SOURCE_DIR}/lib/crypto/openssl/des/des_keys.c" @@ -312,7 +309,6 @@ set(ALL_SRCS "${KRB5_SOURCE_DIR}/lib/krb5/krb/allow_weak.c" "${KRB5_SOURCE_DIR}/lib/krb5/krb/mk_rep.c" "${KRB5_SOURCE_DIR}/lib/krb5/krb/mk_priv.c" - "${KRB5_SOURCE_DIR}/lib/krb5/krb/s4u_authdata.c" "${KRB5_SOURCE_DIR}/lib/krb5/krb/preauth_otp.c" "${KRB5_SOURCE_DIR}/lib/krb5/krb/init_keyblock.c" "${KRB5_SOURCE_DIR}/lib/krb5/krb/ser_addr.c" @@ -688,6 +684,15 @@ target_include_directories(_krb5 PRIVATE target_compile_definitions(_krb5 PRIVATE KRB5_PRIVATE + K5_OPENSSL_DES + K5_OPENSSL_SHA1 + K5_OPENSSL_SHA2 + K5_OPENSSL_HMAC + K5_OPENSSL_RC4 + K5_OPENSSL_MD4 + K5_OPENSSL_MD5 + K5_OPENSSL_AES + K5_OPENSSL_DES_KEY_PARITY _GSS_STATIC_LINK=1 KRB5_DEPRECATED=1 LOCALEDIR="/usr/local/share/locale" From c24d68e7c9bb03d12d61fb5e64023daea26875c6 Mon Sep 17 00:00:00 2001 From: Anton Popov Date: Thu, 16 Feb 2023 21:53:53 +0000 Subject: [PATCH 098/841] fix tests with sparse columns --- src/Columns/IColumnImpl.h | 6 ++++-- .../0_stateless/01780_column_sparse_distinct.reference | 1 + .../queries/0_stateless/01780_column_sparse_distinct.sql | 2 +- .../0_stateless/02179_sparse_columns_detach.reference | 8 ++++---- tests/queries/0_stateless/02179_sparse_columns_detach.sql | 8 ++++---- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/Columns/IColumnImpl.h b/src/Columns/IColumnImpl.h index 20aaefae39c..0eab9452813 100644 --- a/src/Columns/IColumnImpl.h +++ b/src/Columns/IColumnImpl.h @@ -164,12 +164,14 @@ double IColumn::getRatioOfDefaultRowsImpl(double sample_ratio) const throw Exception(ErrorCodes::LOGICAL_ERROR, "Value of 'sample_ratio' must be in interval (0.0; 1.0], but got: {}", sample_ratio); + static constexpr auto max_number_of_rows_for_full_search = 1000; + size_t num_rows = size(); size_t num_sampled_rows = std::min(static_cast(num_rows * sample_ratio), num_rows); size_t num_checked_rows = 0; size_t res = 0; - if (num_sampled_rows == num_rows) + if (num_sampled_rows == num_rows || num_rows <= max_number_of_rows_for_full_search) { for (size_t i = 0; i < num_rows; ++i) res += static_cast(*this).isDefaultAt(i); @@ -177,7 +179,7 @@ double IColumn::getRatioOfDefaultRowsImpl(double sample_ratio) const } else if (num_sampled_rows != 0) { - for (size_t i = num_checked_rows; i < num_rows; ++i) + for (size_t i = 0; i < num_rows; ++i) { if (num_checked_rows * num_rows <= i * num_sampled_rows) { diff --git a/tests/queries/0_stateless/01780_column_sparse_distinct.reference b/tests/queries/0_stateless/01780_column_sparse_distinct.reference index bb0cebc6540..beb45208e7b 100644 --- a/tests/queries/0_stateless/01780_column_sparse_distinct.reference +++ b/tests/queries/0_stateless/01780_column_sparse_distinct.reference @@ -5,3 +5,4 @@ all_2_2_0 v Sparse 2 3 4 +5 diff --git a/tests/queries/0_stateless/01780_column_sparse_distinct.sql b/tests/queries/0_stateless/01780_column_sparse_distinct.sql index 502ca7600d4..e98bada1aac 100644 --- a/tests/queries/0_stateless/01780_column_sparse_distinct.sql +++ b/tests/queries/0_stateless/01780_column_sparse_distinct.sql @@ -7,7 +7,7 @@ SETTINGS ratio_of_defaults_for_sparse_serialization = 0.9; SYSTEM STOP MERGES t_sparse_distinct; -INSERT INTO t_sparse_distinct SELECT number, number % 5 FROM numbers(100000); +INSERT INTO t_sparse_distinct SELECT number, number % 6 FROM numbers(100000); INSERT INTO t_sparse_distinct SELECT number, number % 100 = 0 FROM numbers(100000); SELECT name, column, serialization_kind diff --git a/tests/queries/0_stateless/02179_sparse_columns_detach.reference b/tests/queries/0_stateless/02179_sparse_columns_detach.reference index 2f9714f7a97..04a9b10c09f 100644 --- a/tests/queries/0_stateless/02179_sparse_columns_detach.reference +++ b/tests/queries/0_stateless/02179_sparse_columns_detach.reference @@ -1,12 +1,12 @@ -1000 +954 id Default s Sparse -1000 +954 id Default s Sparse -1000 +954 id Default s Sparse -1000 +954 id Default s Sparse diff --git a/tests/queries/0_stateless/02179_sparse_columns_detach.sql b/tests/queries/0_stateless/02179_sparse_columns_detach.sql index 4720e6720ba..2ae088fedb4 100644 --- a/tests/queries/0_stateless/02179_sparse_columns_detach.sql +++ b/tests/queries/0_stateless/02179_sparse_columns_detach.sql @@ -4,8 +4,8 @@ CREATE TABLE t_sparse_detach(id UInt64, s String) ENGINE = MergeTree ORDER BY id SETTINGS ratio_of_defaults_for_sparse_serialization = 0.9; -INSERT INTO t_sparse_detach SELECT number, number % 20 = 0 ? toString(number) : '' FROM numbers(10000); -INSERT INTO t_sparse_detach SELECT number, number % 20 = 0 ? toString(number) : '' FROM numbers(10000); +INSERT INTO t_sparse_detach SELECT number, number % 21 = 0 ? toString(number) : '' FROM numbers(10000); +INSERT INTO t_sparse_detach SELECT number, number % 21 = 0 ? toString(number) : '' FROM numbers(10000); OPTIMIZE TABLE t_sparse_detach FINAL; @@ -30,8 +30,8 @@ ALTER TABLE t_sparse_detach MODIFY SETTING vertical_merge_algorithm_min_rows_to_activate = 1, vertical_merge_algorithm_min_columns_to_activate = 1; -INSERT INTO t_sparse_detach SELECT number, number % 20 = 0 ? toString(number) : '' FROM numbers(10000); -INSERT INTO t_sparse_detach SELECT number, number % 20 = 0 ? toString(number) : '' FROM numbers(10000); +INSERT INTO t_sparse_detach SELECT number, number % 21 = 0 ? toString(number) : '' FROM numbers(10000); +INSERT INTO t_sparse_detach SELECT number, number % 21 = 0 ? toString(number) : '' FROM numbers(10000); OPTIMIZE TABLE t_sparse_detach FINAL; From 81f5f9708df0048010d42a2ddb334c6c1add22bb Mon Sep 17 00:00:00 2001 From: artem-yadr Date: Fri, 17 Feb 2023 01:39:23 +0300 Subject: [PATCH 099/841] Added support for MongoDB Replica Set URI with enumiration --- .../MongoDB/include/Poco/MongoDB/Connection.h | 278 +++++++++--------- base/poco/MongoDB/src/Connection.cpp | 196 ++++++++---- 2 files changed, 283 insertions(+), 191 deletions(-) diff --git a/base/poco/MongoDB/include/Poco/MongoDB/Connection.h b/base/poco/MongoDB/include/Poco/MongoDB/Connection.h index de669aa90dd..319e1f93ba0 100644 --- a/base/poco/MongoDB/include/Poco/MongoDB/Connection.h +++ b/base/poco/MongoDB/include/Poco/MongoDB/Connection.h @@ -18,150 +18,154 @@ #define MongoDB_Connection_INCLUDED -#include "Poco/MongoDB/RequestMessage.h" -#include "Poco/MongoDB/ResponseMessage.h" -#include "Poco/Mutex.h" #include "Poco/Net/SocketAddress.h" #include "Poco/Net/StreamSocket.h" +#include "Poco/Mutex.h" +#include "Poco/MongoDB/RequestMessage.h" +#include "Poco/MongoDB/ResponseMessage.h" -namespace Poco +namespace Poco { +namespace MongoDB { + + +class MongoDB_API Connection + /// Represents a connection to a MongoDB server + /// using the MongoDB wire protocol. + /// + /// See https://docs.mongodb.com/manual/reference/mongodb-wire-protocol/ + /// for more information on the wire protocol. { -namespace MongoDB +public: + typedef Poco::SharedPtr Ptr; + + class MongoDB_API SocketFactory + { + public: + SocketFactory(); + /// Creates the SocketFactory. + + virtual ~SocketFactory(); + /// Destroys the SocketFactory. + + virtual Poco::Net::StreamSocket createSocket(const std::string& host, int port, Poco::Timespan connectTimeout, bool secure); + /// Creates a Poco::Net::StreamSocket (if secure is false), or a + /// Poco::Net::SecureStreamSocket (if secure is true) connected to the + /// given host and port number. + /// + /// The default implementation will throw a Poco::NotImplementedException + /// if secure is true. + }; + + Connection(); + /// Creates an unconnected Connection. + /// + /// Use this when you want to connect later on. + + Connection(const std::string& hostAndPort); + /// Creates a Connection connected to the given MongoDB instance at host:port. + /// + /// The host and port must be separated with a colon. + + Connection(const std::string& uri, SocketFactory& socketFactory); + /// Creates a Connection connected to the given MongoDB instance at the + /// given URI. + /// + /// See the corresponding connect() method for more information. + + Connection(const std::string& host, int port); + /// Creates a Connection connected to the given MongoDB instance at host and port. + + Connection(const Poco::Net::SocketAddress& addrs); + /// Creates a Connection connected to the given MongoDB instance at the given address. + + Connection(const Poco::Net::StreamSocket& socket); + /// Creates a Connection connected to the given MongoDB instance using the given socket, + /// which must already be connected. + + virtual ~Connection(); + /// Destroys the Connection. + + Poco::Net::SocketAddress address() const; + /// Returns the address of the MongoDB server. + + std::string uri() const; + /// Returns the uri on which the connection was made. + + void connect(const std::string& hostAndPort); + /// Connects to the given MongoDB server. + /// + /// The host and port must be separated with a colon. + + void connect(const std::string& uri, SocketFactory& socketFactory); + /// Connects to the given MongoDB instance at the given URI. + /// + /// The URI must be in standard MongoDB connection string URI format: + /// + /// mongodb://:@hostname.com:/database-name?options + /// + /// The following options are supported: + /// + /// - ssl: If ssl=true is specified, a custom SocketFactory subclass creating + /// a SecureStreamSocket must be supplied. + /// - connectTimeoutMS: Socket connection timeout in milliseconds. + /// - socketTimeoutMS: Socket send/receive timeout in milliseconds. + /// - authMechanism: Authentication mechanism. Only "SCRAM-SHA-1" (default) + /// and "MONGODB-CR" are supported. + /// + /// Unknown options are silently ignored. + /// + /// Will also attempt to authenticate using the specified credentials, + /// using Database::authenticate(). + /// + /// Throws a Poco::NoPermissionException if authentication fails. + + void connect(const std::string& host, int port); + /// Connects to the given MongoDB server. + + void connect(const Poco::Net::SocketAddress& addrs); + /// Connects to the given MongoDB server. + + void connect(const Poco::Net::StreamSocket& socket); + /// Connects using an already connected socket. + + void disconnect(); + /// Disconnects from the MongoDB server. + + void sendRequest(RequestMessage& request); + /// Sends a request to the MongoDB server. + /// + /// Used for one-way requests without a response. + + void sendRequest(RequestMessage& request, ResponseMessage& response); + /// Sends a request to the MongoDB server and receives the response. + /// + /// Use this when a response is expected: only a "query" or "getmore" + /// request will return a response. + +protected: + void connect(); + +private: + Poco::Net::SocketAddress _address; + Poco::Net::StreamSocket _socket; + std::string _uri; +}; + + +// +// inlines +// +inline Net::SocketAddress Connection::address() const { - - - class MongoDB_API Connection - /// Represents a connection to a MongoDB server - /// using the MongoDB wire protocol. - /// - /// See https://docs.mongodb.com/manual/reference/mongodb-wire-protocol/ - /// for more information on the wire protocol. - { - public: - typedef Poco::SharedPtr Ptr; - - class MongoDB_API SocketFactory - { - public: - SocketFactory(); - /// Creates the SocketFactory. - - virtual ~SocketFactory(); - /// Destroys the SocketFactory. - - virtual Poco::Net::StreamSocket createSocket(const std::string & host, int port, Poco::Timespan connectTimeout, bool secure); - /// Creates a Poco::Net::StreamSocket (if secure is false), or a - /// Poco::Net::SecureStreamSocket (if secure is true) connected to the - /// given host and port number. - /// - /// The default implementation will throw a Poco::NotImplementedException - /// if secure is true. - }; - - Connection(); - /// Creates an unconnected Connection. - /// - /// Use this when you want to connect later on. - - Connection(const std::string & hostAndPort); - /// Creates a Connection connected to the given MongoDB instance at host:port. - /// - /// The host and port must be separated with a colon. - - Connection(const std::string & uri, SocketFactory & socketFactory); - /// Creates a Connection connected to the given MongoDB instance at the - /// given URI. - /// - /// See the corresponding connect() method for more information. - - Connection(const std::string & host, int port); - /// Creates a Connection connected to the given MongoDB instance at host and port. - - Connection(const Poco::Net::SocketAddress & addrs); - /// Creates a Connection connected to the given MongoDB instance at the given address. - - Connection(const Poco::Net::StreamSocket & socket); - /// Creates a Connection connected to the given MongoDB instance using the given socket, - /// which must already be connected. - - virtual ~Connection(); - /// Destroys the Connection. - - Poco::Net::SocketAddress address() const; - /// Returns the address of the MongoDB server. - - void connect(const std::string & hostAndPort); - /// Connects to the given MongoDB server. - /// - /// The host and port must be separated with a colon. - - void connect(const std::string & uri, SocketFactory & socketFactory); - /// Connects to the given MongoDB instance at the given URI. - /// - /// The URI must be in standard MongoDB connection string URI format: - /// - /// mongodb://:@hostname.com:/database-name?options - /// - /// The following options are supported: - /// - /// - ssl: If ssl=true is specified, a custom SocketFactory subclass creating - /// a SecureStreamSocket must be supplied. - /// - connectTimeoutMS: Socket connection timeout in milliseconds. - /// - socketTimeoutMS: Socket send/receive timeout in milliseconds. - /// - authMechanism: Authentication mechanism. Only "SCRAM-SHA-1" (default) - /// and "MONGODB-CR" are supported. - /// - /// Unknown options are silently ignored. - /// - /// Will also attempt to authenticate using the specified credentials, - /// using Database::authenticate(). - /// - /// Throws a Poco::NoPermissionException if authentication fails. - - void connect(const std::string & host, int port); - /// Connects to the given MongoDB server. - - void connect(const Poco::Net::SocketAddress & addrs); - /// Connects to the given MongoDB server. - - void connect(const Poco::Net::StreamSocket & socket); - /// Connects using an already connected socket. - - void disconnect(); - /// Disconnects from the MongoDB server. - - void sendRequest(RequestMessage & request); - /// Sends a request to the MongoDB server. - /// - /// Used for one-way requests without a response. - - void sendRequest(RequestMessage & request, ResponseMessage & response); - /// Sends a request to the MongoDB server and receives the response. - /// - /// Use this when a response is expected: only a "query" or "getmore" - /// request will return a response. - - protected: - void connect(); - - private: - Poco::Net::SocketAddress _address; - Poco::Net::StreamSocket _socket; - }; - - - // - // inlines - // - inline Net::SocketAddress Connection::address() const - { - return _address; - } - - + return _address; } -} // namespace Poco::MongoDB +inline std::string Connection::uri() const +{ + return _uri; +} + +} } // namespace Poco::MongoDB #endif // MongoDB_Connection_INCLUDED diff --git a/base/poco/MongoDB/src/Connection.cpp b/base/poco/MongoDB/src/Connection.cpp index 56bb192cec2..411b59c774e 100644 --- a/base/poco/MongoDB/src/Connection.cpp +++ b/base/poco/MongoDB/src/Connection.cpp @@ -145,71 +145,159 @@ void Connection::connect(const Poco::Net::StreamSocket& socket) void Connection::connect(const std::string& uri, SocketFactory& socketFactory) { - Poco::URI theURI(uri); - if (theURI.getScheme() != "mongodb") throw Poco::UnknownURISchemeException(uri); + std::vector strAddresses; + std::string newURI; - std::string userInfo = theURI.getUserInfo(); - std::string host = theURI.getHost(); - Poco::UInt16 port = theURI.getPort(); - if (port == 0) port = 27017; + if (uri.find(',') != std::string::npos) + { + size_t pos; + size_t head = 0; + if ((pos = uri.find("@")) != std::string::npos) + { + head = pos + 1; + } + else if ((pos = uri.find("://")) != std::string::npos) + { + head = pos + 3; + } - std::string databaseName = theURI.getPath(); - if (!databaseName.empty() && databaseName[0] == '/') databaseName.erase(0, 1); - if (databaseName.empty()) databaseName = "admin"; + std::string tempstr; + std::string::const_iterator it = uri.begin(); + it += head; + size_t tail = head; + for (;it != uri.end() && *it != '?' && *it != '/'; ++it) + { + tempstr += *it; + tail++; + } - bool ssl = false; - Poco::Timespan connectTimeout; - Poco::Timespan socketTimeout; - std::string authMechanism = Database::AUTH_SCRAM_SHA1; + it = tempstr.begin(); + std::string token; + for (;it != tempstr.end(); ++it) + { + if (*it == ',') + { + newURI = uri.substr(0, head) + token + uri.substr(tail, uri.length()); + strAddresses.push_back(newURI); + token = ""; + } + else + { + token += *it; + } + } + newURI = uri.substr(0, head) + token + uri.substr(tail, uri.length()); + strAddresses.push_back(newURI); + } + else + { + strAddresses.push_back(uri); + } - Poco::URI::QueryParameters params = theURI.getQueryParameters(); - for (Poco::URI::QueryParameters::const_iterator it = params.begin(); it != params.end(); ++it) - { - if (it->first == "ssl") - { - ssl = (it->second == "true"); - } - else if (it->first == "connectTimeoutMS") - { - connectTimeout = static_cast(1000)*Poco::NumberParser::parse(it->second); - } - else if (it->first == "socketTimeoutMS") - { - socketTimeout = static_cast(1000)*Poco::NumberParser::parse(it->second); - } - else if (it->first == "authMechanism") - { - authMechanism = it->second; - } - } + newURI = strAddresses.front(); + Poco::URI theURI(newURI); + if (theURI.getScheme() != "mongodb") throw Poco::UnknownURISchemeException(uri); - connect(socketFactory.createSocket(host, port, connectTimeout, ssl)); + std::string userInfo = theURI.getUserInfo(); + std::string databaseName = theURI.getPath(); + if (!databaseName.empty() && databaseName[0] == '/') databaseName.erase(0, 1); + if (databaseName.empty()) databaseName = "admin"; - if (socketTimeout > 0) - { - _socket.setSendTimeout(socketTimeout); - _socket.setReceiveTimeout(socketTimeout); - } + bool ssl = false; + Poco::Timespan connectTimeout; + Poco::Timespan socketTimeout; + std::string authMechanism = Database::AUTH_SCRAM_SHA1; + std::string readPreference="primary"; - if (!userInfo.empty()) - { - std::string username; - std::string password; - std::string::size_type pos = userInfo.find(':'); - if (pos != std::string::npos) - { - username.assign(userInfo, 0, pos++); - password.assign(userInfo, pos, userInfo.size() - pos); - } - else username = userInfo; + Poco::URI::QueryParameters params = theURI.getQueryParameters(); + for (Poco::URI::QueryParameters::const_iterator it = params.begin(); it != params.end(); ++it) + { + if (it->first == "ssl") + { + ssl = (it->second == "true"); + } + else if (it->first == "connectTimeoutMS") + { + connectTimeout = static_cast(1000)*Poco::NumberParser::parse(it->second); + } + else if (it->first == "socketTimeoutMS") + { + socketTimeout = static_cast(1000)*Poco::NumberParser::parse(it->second); + } + else if (it->first == "authMechanism") + { + authMechanism = it->second; + } + else if (it->first == "readPreference") + { + readPreference= it->second; + } + } - Database database(databaseName); - if (!database.authenticate(*this, username, password, authMechanism)) - throw Poco::NoPermissionException(Poco::format("Access to MongoDB database %s denied for user %s", databaseName, username)); - } + for (std::vector::const_iterator it = strAddresses.cbegin();it != strAddresses.cend(); ++it) + { + newURI = *it; + Poco::URI theURI(newURI); + + std::string host = theURI.getHost(); + Poco::UInt16 port = theURI.getPort(); + if (port == 0) port = 27017; + + connect(socketFactory.createSocket(host, port, connectTimeout, ssl)); + _uri = newURI; + if (socketTimeout > 0) + { + _socket.setSendTimeout(socketTimeout); + _socket.setReceiveTimeout(socketTimeout); + } + if (strAddresses.size() > 1) + { + Poco::MongoDB::QueryRequest request("admin.$cmd"); + request.setNumberToReturn(1); + request.selector().add("isMaster", 1); + Poco::MongoDB::ResponseMessage response; + + sendRequest(request, response); + _uri = newURI; + if (!response.documents().empty()) + { + Poco::MongoDB::Document::Ptr doc = response.documents()[0]; + if (doc->get("ismaster") && readPreference == "primary") + { + break; + } + else if (!doc->get("ismaster") && readPreference == "secondary") + { + break; + } + else if (it + 1 == strAddresses.cend()) + { + throw Poco::URISyntaxException(uri); + } + } + } + } + if (!userInfo.empty()) + { + std::string username; + std::string password; + std::string::size_type pos = userInfo.find(':'); + if (pos != std::string::npos) + { + username.assign(userInfo, 0, pos++); + password.assign(userInfo, pos, userInfo.size() - pos); + } + else username = userInfo; + + Database database(databaseName); + + if (!database.authenticate(*this, username, password, authMechanism)) + throw Poco::NoPermissionException(Poco::format("Access to MongoDB database %s denied for user %s", databaseName, username)); + } } + void Connection::disconnect() { _socket.close(); From 4a2efc339bdc25ae5332b3f6fcd08a48e4530653 Mon Sep 17 00:00:00 2001 From: artem-yadr Date: Fri, 17 Feb 2023 01:47:36 +0300 Subject: [PATCH 100/841] Header fix --- .../MongoDB/include/Poco/MongoDB/Connection.h | 280 +++++++++--------- 1 file changed, 142 insertions(+), 138 deletions(-) diff --git a/base/poco/MongoDB/include/Poco/MongoDB/Connection.h b/base/poco/MongoDB/include/Poco/MongoDB/Connection.h index 319e1f93ba0..699b9652eaf 100644 --- a/base/poco/MongoDB/include/Poco/MongoDB/Connection.h +++ b/base/poco/MongoDB/include/Poco/MongoDB/Connection.h @@ -18,154 +18,158 @@ #define MongoDB_Connection_INCLUDED -#include "Poco/Net/SocketAddress.h" -#include "Poco/Net/StreamSocket.h" -#include "Poco/Mutex.h" #include "Poco/MongoDB/RequestMessage.h" #include "Poco/MongoDB/ResponseMessage.h" +#include "Poco/Mutex.h" +#include "Poco/Net/SocketAddress.h" +#include "Poco/Net/StreamSocket.h" -namespace Poco { -namespace MongoDB { - - -class MongoDB_API Connection - /// Represents a connection to a MongoDB server - /// using the MongoDB wire protocol. - /// - /// See https://docs.mongodb.com/manual/reference/mongodb-wire-protocol/ - /// for more information on the wire protocol. +namespace Poco { -public: - typedef Poco::SharedPtr Ptr; - - class MongoDB_API SocketFactory - { - public: - SocketFactory(); - /// Creates the SocketFactory. - - virtual ~SocketFactory(); - /// Destroys the SocketFactory. - - virtual Poco::Net::StreamSocket createSocket(const std::string& host, int port, Poco::Timespan connectTimeout, bool secure); - /// Creates a Poco::Net::StreamSocket (if secure is false), or a - /// Poco::Net::SecureStreamSocket (if secure is true) connected to the - /// given host and port number. - /// - /// The default implementation will throw a Poco::NotImplementedException - /// if secure is true. - }; - - Connection(); - /// Creates an unconnected Connection. - /// - /// Use this when you want to connect later on. - - Connection(const std::string& hostAndPort); - /// Creates a Connection connected to the given MongoDB instance at host:port. - /// - /// The host and port must be separated with a colon. - - Connection(const std::string& uri, SocketFactory& socketFactory); - /// Creates a Connection connected to the given MongoDB instance at the - /// given URI. - /// - /// See the corresponding connect() method for more information. - - Connection(const std::string& host, int port); - /// Creates a Connection connected to the given MongoDB instance at host and port. - - Connection(const Poco::Net::SocketAddress& addrs); - /// Creates a Connection connected to the given MongoDB instance at the given address. - - Connection(const Poco::Net::StreamSocket& socket); - /// Creates a Connection connected to the given MongoDB instance using the given socket, - /// which must already be connected. - - virtual ~Connection(); - /// Destroys the Connection. - - Poco::Net::SocketAddress address() const; - /// Returns the address of the MongoDB server. - - std::string uri() const; - /// Returns the uri on which the connection was made. - - void connect(const std::string& hostAndPort); - /// Connects to the given MongoDB server. - /// - /// The host and port must be separated with a colon. - - void connect(const std::string& uri, SocketFactory& socketFactory); - /// Connects to the given MongoDB instance at the given URI. - /// - /// The URI must be in standard MongoDB connection string URI format: - /// - /// mongodb://:@hostname.com:/database-name?options - /// - /// The following options are supported: - /// - /// - ssl: If ssl=true is specified, a custom SocketFactory subclass creating - /// a SecureStreamSocket must be supplied. - /// - connectTimeoutMS: Socket connection timeout in milliseconds. - /// - socketTimeoutMS: Socket send/receive timeout in milliseconds. - /// - authMechanism: Authentication mechanism. Only "SCRAM-SHA-1" (default) - /// and "MONGODB-CR" are supported. - /// - /// Unknown options are silently ignored. - /// - /// Will also attempt to authenticate using the specified credentials, - /// using Database::authenticate(). - /// - /// Throws a Poco::NoPermissionException if authentication fails. - - void connect(const std::string& host, int port); - /// Connects to the given MongoDB server. - - void connect(const Poco::Net::SocketAddress& addrs); - /// Connects to the given MongoDB server. - - void connect(const Poco::Net::StreamSocket& socket); - /// Connects using an already connected socket. - - void disconnect(); - /// Disconnects from the MongoDB server. - - void sendRequest(RequestMessage& request); - /// Sends a request to the MongoDB server. - /// - /// Used for one-way requests without a response. - - void sendRequest(RequestMessage& request, ResponseMessage& response); - /// Sends a request to the MongoDB server and receives the response. - /// - /// Use this when a response is expected: only a "query" or "getmore" - /// request will return a response. - -protected: - void connect(); - -private: - Poco::Net::SocketAddress _address; - Poco::Net::StreamSocket _socket; - std::string _uri; -}; - - -// -// inlines -// -inline Net::SocketAddress Connection::address() const +namespace MongoDB { - return _address; -} -inline std::string Connection::uri() const + + + class MongoDB_API Connection + /// Represents a connection to a MongoDB server + /// using the MongoDB wire protocol. + /// + /// See https://docs.mongodb.com/manual/reference/mongodb-wire-protocol/ + /// for more information on the wire protocol. + { + public: + typedef Poco::SharedPtr Ptr; + + class MongoDB_API SocketFactory + { + public: + SocketFactory(); + /// Creates the SocketFactory. + + virtual ~SocketFactory(); + /// Destroys the SocketFactory. + + virtual Poco::Net::StreamSocket createSocket(const std::string & host, int port, Poco::Timespan connectTimeout, bool secure); + /// Creates a Poco::Net::StreamSocket (if secure is false), or a + /// Poco::Net::SecureStreamSocket (if secure is true) connected to the + /// given host and port number. + /// + /// The default implementation will throw a Poco::NotImplementedException + /// if secure is true. + }; + + Connection(); + /// Creates an unconnected Connection. + /// + /// Use this when you want to connect later on. + + Connection(const std::string & hostAndPort); + /// Creates a Connection connected to the given MongoDB instance at host:port. + /// + /// The host and port must be separated with a colon. + + Connection(const std::string & uri, SocketFactory & socketFactory); + /// Creates a Connection connected to the given MongoDB instance at the + /// given URI. + /// + /// See the corresponding connect() method for more information. + + Connection(const std::string & host, int port); + /// Creates a Connection connected to the given MongoDB instance at host and port. + + Connection(const Poco::Net::SocketAddress & addrs); + /// Creates a Connection connected to the given MongoDB instance at the given address. + + Connection(const Poco::Net::StreamSocket & socket); + /// Creates a Connection connected to the given MongoDB instance using the given socket, + /// which must already be connected. + + virtual ~Connection(); + /// Destroys the Connection. + + Poco::Net::SocketAddress address() const; + /// Returns the address of the MongoDB server. + + std::string uri() const; + /// Returns the uri on which the connection was made. + + void connect(const std::string & hostAndPort); + /// Connects to the given MongoDB server. + /// + /// The host and port must be separated with a colon. + + void connect(const std::string & uri, SocketFactory & socketFactory); + /// Connects to the given MongoDB instance at the given URI. + /// + /// The URI must be in standard MongoDB connection string URI format: + /// + /// mongodb://:@hostname.com:/database-name?options + /// + /// The following options are supported: + /// + /// - ssl: If ssl=true is specified, a custom SocketFactory subclass creating + /// a SecureStreamSocket must be supplied. + /// - connectTimeoutMS: Socket connection timeout in milliseconds. + /// - socketTimeoutMS: Socket send/receive timeout in milliseconds. + /// - authMechanism: Authentication mechanism. Only "SCRAM-SHA-1" (default) + /// and "MONGODB-CR" are supported. + /// + /// Unknown options are silently ignored. + /// + /// Will also attempt to authenticate using the specified credentials, + /// using Database::authenticate(). + /// + /// Throws a Poco::NoPermissionException if authentication fails. + + void connect(const std::string & host, int port); + /// Connects to the given MongoDB server. + + void connect(const Poco::Net::SocketAddress & addrs); + /// Connects to the given MongoDB server. + + void connect(const Poco::Net::StreamSocket & socket); + /// Connects using an already connected socket. + + void disconnect(); + /// Disconnects from the MongoDB server. + + void sendRequest(RequestMessage & request); + /// Sends a request to the MongoDB server. + /// + /// Used for one-way requests without a response. + + void sendRequest(RequestMessage & request, ResponseMessage & response); + /// Sends a request to the MongoDB server and receives the response. + /// + /// Use this when a response is expected: only a "query" or "getmore" + /// request will return a response. + + protected: + void connect(); + + private: + Poco::Net::SocketAddress _address; + Poco::Net::StreamSocket _socket; + std::string _uri; + }; + + + // + // inlines + // + inline Net::SocketAddress Connection::address() const + { + return _address; + } + inline std::string Connection::uri() const { return _uri; } -} } // namespace Poco::MongoDB + +} +} // namespace Poco::MongoDB #endif // MongoDB_Connection_INCLUDED From 83dbde476b1a9554efa0d1edb6d93e9460964a17 Mon Sep 17 00:00:00 2001 From: artem-yadr Date: Fri, 17 Feb 2023 01:53:42 +0300 Subject: [PATCH 101/841] move brackets and delete newline --- base/poco/MongoDB/src/Connection.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/base/poco/MongoDB/src/Connection.cpp b/base/poco/MongoDB/src/Connection.cpp index 411b59c774e..c75211cf9d7 100644 --- a/base/poco/MongoDB/src/Connection.cpp +++ b/base/poco/MongoDB/src/Connection.cpp @@ -297,7 +297,6 @@ void Connection::connect(const std::string& uri, SocketFactory& socketFactory) } - void Connection::disconnect() { _socket.close(); From 4999d6cb1a0398328ddad048a90d53a0cab89ec7 Mon Sep 17 00:00:00 2001 From: artem-yadr <84010375+artem-yadr@users.noreply.github.com> Date: Fri, 17 Feb 2023 01:58:31 +0300 Subject: [PATCH 102/841] Update Connection.h --- base/poco/MongoDB/include/Poco/MongoDB/Connection.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/poco/MongoDB/include/Poco/MongoDB/Connection.h b/base/poco/MongoDB/include/Poco/MongoDB/Connection.h index 699b9652eaf..8fd9c7919e4 100644 --- a/base/poco/MongoDB/include/Poco/MongoDB/Connection.h +++ b/base/poco/MongoDB/include/Poco/MongoDB/Connection.h @@ -163,9 +163,9 @@ namespace MongoDB return _address; } inline std::string Connection::uri() const -{ + { return _uri; -} + } } From 252456077985fc2f4726c56285f998cc8b311149 Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Fri, 17 Feb 2023 07:28:23 +0000 Subject: [PATCH 103/841] Add sessions test for temporary tables --- .../02561_temporary_table_sessions.reference | 7 +++++ .../02561_temporary_table_sessions.sh | 28 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 tests/queries/0_stateless/02561_temporary_table_sessions.reference create mode 100755 tests/queries/0_stateless/02561_temporary_table_sessions.sh diff --git a/tests/queries/0_stateless/02561_temporary_table_sessions.reference b/tests/queries/0_stateless/02561_temporary_table_sessions.reference new file mode 100644 index 00000000000..b3890873523 --- /dev/null +++ b/tests/queries/0_stateless/02561_temporary_table_sessions.reference @@ -0,0 +1,7 @@ +OK +1 d +2 e +3 f +1 a +2 b +3 c diff --git a/tests/queries/0_stateless/02561_temporary_table_sessions.sh b/tests/queries/0_stateless/02561_temporary_table_sessions.sh new file mode 100755 index 00000000000..a810a48cdf3 --- /dev/null +++ b/tests/queries/0_stateless/02561_temporary_table_sessions.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +# Tags: no-parallel + +CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +# shellcheck source=../shell_config.sh +. "$CURDIR"/../shell_config.sh + +SESSION_ID_A="$RANDOM$RANDOM$RANDOM" +SESSION_ID_B="$RANDOM$RANDOM$RANDOM" + +# Create temporary table and insert in SESSION_ID_A +${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&session_id=${SESSION_ID_A}" -d 'CREATE TEMPORARY TABLE table_merge_tree_02561 (id UInt64, info String) ENGINE = MergeTree ORDER BY id' +${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&session_id=${SESSION_ID_A}" -d "INSERT INTO table_merge_tree_02561 VALUES (1, 'a'), (2, 'b'), (3, 'c')" + +# Select from SESSION_ID_B +${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&session_id=${SESSION_ID_B}" -d "SELECT * FROM table_merge_tree_02561" | tr -d '\n' | grep -F 'UNKNOWN_TABLE' > /dev/null && echo "OK" + +# Create temporary table, insert and select in SESSION_ID_B +${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&session_id=${SESSION_ID_B}" -d 'CREATE TEMPORARY TABLE table_merge_tree_02561 (id UInt64, info String) ENGINE = MergeTree ORDER BY id' +${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&session_id=${SESSION_ID_B}" -d "INSERT INTO table_merge_tree_02561 VALUES (1, 'd'), (2, 'e'), (3, 'f')" +${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&session_id=${SESSION_ID_B}" -d "SELECT * FROM table_merge_tree_02561" + +# Select from SESSION_ID_A +${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&session_id=${SESSION_ID_A}" -d "SELECT * FROM table_merge_tree_02561" + +# Drop tables in both sessions +${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&session_id=${SESSION_ID_A}" -d "DROP TEMPORARY TABLE table_merge_tree_02561" +${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&session_id=${SESSION_ID_B}" -d "DROP TEMPORARY TABLE table_merge_tree_02561" From fde8e7e85876e8b7be4267327c2769dd822acd0c Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Fri, 17 Feb 2023 07:47:23 +0000 Subject: [PATCH 104/841] Add try/catch in TemporaryTableHolder destructor --- src/Interpreters/DatabaseCatalog.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Interpreters/DatabaseCatalog.cpp b/src/Interpreters/DatabaseCatalog.cpp index ad5d9d4d325..78ad76a34a3 100644 --- a/src/Interpreters/DatabaseCatalog.cpp +++ b/src/Interpreters/DatabaseCatalog.cpp @@ -121,9 +121,16 @@ TemporaryTableHolder::~TemporaryTableHolder() { if (id != UUIDHelpers::Nil) { - auto table = getTable(); - table->flushAndShutdown(); - temporary_tables->dropTable(getContext(), "_tmp_" + toString(id)); + try + { + auto table = getTable(); + table->flushAndShutdown(); + temporary_tables->dropTable(getContext(), "_tmp_" + toString(id)); + } + catch (...) + { + tryLogCurrentException("TemporaryTableHolder"); + } } } From 08734d4dc0a0ef5f46838248138488e880f757f2 Mon Sep 17 00:00:00 2001 From: artem-yadr Date: Fri, 17 Feb 2023 14:56:21 +0300 Subject: [PATCH 105/841] poco changes are now used in MongoDBDictionarySource --- src/Dictionaries/MongoDBDictionarySource.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Dictionaries/MongoDBDictionarySource.cpp b/src/Dictionaries/MongoDBDictionarySource.cpp index bec566c29a6..f61efcab026 100644 --- a/src/Dictionaries/MongoDBDictionarySource.cpp +++ b/src/Dictionaries/MongoDBDictionarySource.cpp @@ -114,7 +114,11 @@ MongoDBDictionarySource::MongoDBDictionarySource( { if (!uri.empty()) { - Poco::URI poco_uri(uri); + // Connect with URI. + Poco::MongoDB::Connection::SocketFactory socket_factory; + connection->connect(uri, socket_factory); + + Poco::URI poco_uri(connection.uri()); // Parse database from URI. This is required for correctness -- the // cursor is created using database name and collection name, so we have @@ -134,10 +138,6 @@ MongoDBDictionarySource::MongoDBDictionarySource( { user.resize(separator); } - - // Connect with URI. - Poco::MongoDB::Connection::SocketFactory socket_factory; - connection->connect(uri, socket_factory); } else { From 6b6daf7ae8bdaa98081bb5c2bff259f02522d13f Mon Sep 17 00:00:00 2001 From: robot-clickhouse Date: Fri, 17 Feb 2023 14:45:08 +0000 Subject: [PATCH 106/841] Automatic style fix --- tests/ci/workflow_approve_rerun_lambda/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ci/workflow_approve_rerun_lambda/app.py b/tests/ci/workflow_approve_rerun_lambda/app.py index b563a9786c4..fb14dfd2258 100644 --- a/tests/ci/workflow_approve_rerun_lambda/app.py +++ b/tests/ci/workflow_approve_rerun_lambda/app.py @@ -123,7 +123,7 @@ TRUSTED_CONTRIBUTORS = { "BoloniniD", # Seasoned contributor, HSE "tonickkozlov", # Cloudflare "tylerhannan", # ClickHouse Employee - "myrrc", # Mike Kot, DoubleCloud + "myrrc", # Mike Kot, DoubleCloud ] } From fdde8de47c2a6958e67df9246418cdbe77554d61 Mon Sep 17 00:00:00 2001 From: MeenaRenganathan22 Date: Fri, 17 Feb 2023 07:45:13 -0800 Subject: [PATCH 107/841] Updated the krb5 submodule reference to branch CVE_Fix in ClibMouse/krb5 --- contrib/krb5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/krb5 b/contrib/krb5 index f8262a1b548..220ed8fa13f 160000 --- a/contrib/krb5 +++ b/contrib/krb5 @@ -1 +1 @@ -Subproject commit f8262a1b548eb29d97e059260042036255d07f8d +Subproject commit 220ed8fa13fabe98d2b10bc0ac8f59ad8706861e From 046e2bb8eac0127f56fdaaedf54bee3cbb8f4fea Mon Sep 17 00:00:00 2001 From: Anton Popov Date: Fri, 17 Feb 2023 16:50:20 +0000 Subject: [PATCH 108/841] fix issues with sparse columns --- src/Columns/ColumnSparse.cpp | 6 ++++-- .../01201_read_single_thread_in_order.sql | 2 +- .../01551_mergetree_read_in_order_spread.sql | 2 +- .../01710_projection_optimize_materialize.sql | 2 +- .../0_stateless/02008_materialize_column.sql | 16 ++++++++-------- .../0_stateless/02402_merge_engine_with_view.sql | 4 ++-- 6 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/Columns/ColumnSparse.cpp b/src/Columns/ColumnSparse.cpp index 9bc78ef115d..0e408fca467 100644 --- a/src/Columns/ColumnSparse.cpp +++ b/src/Columns/ColumnSparse.cpp @@ -450,11 +450,13 @@ void ColumnSparse::compareColumn(const IColumn & rhs, size_t rhs_row_num, { const auto & rhs_sparse = assert_cast(rhs); PaddedPODArray nested_result; - values->compareColumn(rhs_sparse.getValuesColumn(), rhs_sparse.getValueIndex(rhs_row_num), + values->compareColumn( + rhs_sparse.getValuesColumn(), + rhs_sparse.getValueIndex(rhs_row_num), nullptr, nested_result, direction, nan_direction_hint); const auto & offsets_data = getOffsetsData(); - compare_results.resize_fill(_size, nested_result[0]); + std::fill(compare_results.begin(), compare_results.end(), nested_result[0]); for (size_t i = 0; i < offsets_data.size(); ++i) compare_results[offsets_data[i]] = nested_result[i + 1]; } diff --git a/tests/queries/0_stateless/01201_read_single_thread_in_order.sql b/tests/queries/0_stateless/01201_read_single_thread_in_order.sql index bfe03192891..71437b2e04c 100644 --- a/tests/queries/0_stateless/01201_read_single_thread_in_order.sql +++ b/tests/queries/0_stateless/01201_read_single_thread_in_order.sql @@ -6,7 +6,7 @@ CREATE TABLE t ) ENGINE = MergeTree ORDER BY number -SETTINGS index_granularity = 128; +SETTINGS index_granularity = 128, ratio_of_defaults_for_sparse_serialization = 1.0; SET min_insert_block_size_rows = 0, min_insert_block_size_bytes = 0; INSERT INTO t SELECT number FROM numbers(10000000); diff --git a/tests/queries/0_stateless/01551_mergetree_read_in_order_spread.sql b/tests/queries/0_stateless/01551_mergetree_read_in_order_spread.sql index 1d21d861e20..41d4ff68824 100644 --- a/tests/queries/0_stateless/01551_mergetree_read_in_order_spread.sql +++ b/tests/queries/0_stateless/01551_mergetree_read_in_order_spread.sql @@ -1,4 +1,4 @@ --- Tags: no-s3-storage +-- Tags: no-s3-storage, no-random-merge-tree-settings DROP TABLE IF EXISTS data_01551; diff --git a/tests/queries/0_stateless/01710_projection_optimize_materialize.sql b/tests/queries/0_stateless/01710_projection_optimize_materialize.sql index d8251aabaf6..92d3ead828c 100644 --- a/tests/queries/0_stateless/01710_projection_optimize_materialize.sql +++ b/tests/queries/0_stateless/01710_projection_optimize_materialize.sql @@ -1,6 +1,6 @@ drop table if exists z; -create table z (pk Int64, d Date, id UInt64, c UInt64) Engine MergeTree partition by d order by pk ; +create table z (pk Int64, d Date, id UInt64, c UInt64) Engine MergeTree partition by d order by pk settings ratio_of_defaults_for_sparse_serialization = 1.0; insert into z select number, '2021-10-24', intDiv (number, 10000), 1 from numbers(1000000); optimize table z final; diff --git a/tests/queries/0_stateless/02008_materialize_column.sql b/tests/queries/0_stateless/02008_materialize_column.sql index 8a8eb2afe83..a78920d2525 100644 --- a/tests/queries/0_stateless/02008_materialize_column.sql +++ b/tests/queries/0_stateless/02008_materialize_column.sql @@ -8,33 +8,33 @@ INSERT INTO tmp SELECT * FROM system.numbers LIMIT 20; ALTER TABLE tmp MATERIALIZE COLUMN x; -- { serverError 36 } ALTER TABLE tmp ADD COLUMN s String DEFAULT toString(x); -SELECT groupArray(x), groupArray(s) FROM tmp; +SELECT arraySort(arraySort(groupArray(x))), groupArray(s) FROM tmp; ALTER TABLE tmp MODIFY COLUMN s String DEFAULT toString(x+1); -SELECT groupArray(x), groupArray(s) FROM tmp; +SELECT arraySort(groupArray(x)), groupArray(s) FROM tmp; ALTER TABLE tmp MATERIALIZE COLUMN s; ALTER TABLE tmp MODIFY COLUMN s String DEFAULT toString(x+2); -SELECT groupArray(x), groupArray(s) FROM tmp; +SELECT arraySort(groupArray(x)), groupArray(s) FROM tmp; ALTER TABLE tmp MATERIALIZE COLUMN s; ALTER TABLE tmp MODIFY COLUMN s String DEFAULT toString(x+3); -SELECT groupArray(x), groupArray(s) FROM tmp; +SELECT arraySort(groupArray(x)), groupArray(s) FROM tmp; ALTER TABLE tmp DROP COLUMN s; ALTER TABLE tmp ADD COLUMN s String MATERIALIZED toString(x); -SELECT groupArray(x), groupArray(s) FROM tmp; +SELECT arraySort(groupArray(x)), groupArray(s) FROM tmp; ALTER TABLE tmp MODIFY COLUMN s String MATERIALIZED toString(x+1); -SELECT groupArray(x), groupArray(s) FROM tmp; +SELECT arraySort(groupArray(x)), groupArray(s) FROM tmp; ALTER TABLE tmp MATERIALIZE COLUMN s; ALTER TABLE tmp MODIFY COLUMN s String MATERIALIZED toString(x+2); -SELECT groupArray(x), groupArray(s) FROM tmp; +SELECT arraySort(groupArray(x)), groupArray(s) FROM tmp; ALTER TABLE tmp MATERIALIZE COLUMN s; ALTER TABLE tmp MODIFY COLUMN s String MATERIALIZED toString(x+3); -SELECT groupArray(x), groupArray(s) FROM tmp; +SELECT arraySort(groupArray(x)), groupArray(s) FROM tmp; ALTER TABLE tmp DROP COLUMN s; DROP TABLE tmp; diff --git a/tests/queries/0_stateless/02402_merge_engine_with_view.sql b/tests/queries/0_stateless/02402_merge_engine_with_view.sql index 64822784845..ae9de1426e7 100644 --- a/tests/queries/0_stateless/02402_merge_engine_with_view.sql +++ b/tests/queries/0_stateless/02402_merge_engine_with_view.sql @@ -1,7 +1,7 @@ -- #40014 -CREATE TABLE m0 (id UInt64) ENGINE=MergeTree ORDER BY id SETTINGS index_granularity = 1; +CREATE TABLE m0 (id UInt64) ENGINE=MergeTree ORDER BY id SETTINGS index_granularity = 1, ratio_of_defaults_for_sparse_serialization = 1.0; INSERT INTO m0 SELECT number FROM numbers(10); -CREATE TABLE m1 (id UInt64, s String) ENGINE=MergeTree ORDER BY id SETTINGS index_granularity = 1; +CREATE TABLE m1 (id UInt64, s String) ENGINE=MergeTree ORDER BY id SETTINGS index_granularity = 1, ratio_of_defaults_for_sparse_serialization = 1.0; INSERT INTO m1 SELECT number, 'boo' FROM numbers(10); CREATE VIEW m1v AS SELECT id FROM m1; From 4496db66b2423fc331668f9b25077cc84e262241 Mon Sep 17 00:00:00 2001 From: pufit Date: Fri, 17 Feb 2023 23:46:09 -0500 Subject: [PATCH 109/841] Implement `system.server_settings` --- programs/server/Server.cpp | 175 +++++++----------- src/Core/ServerSettings.cpp | 19 ++ src/Core/ServerSettings.h | 78 ++++++++ src/Core/SettingsFields.cpp | 6 + src/Core/SettingsFields.h | 6 + .../System/StorageSystemServerSettings.cpp | 37 ++++ .../System/StorageSystemServerSettings.h | 27 +++ src/Storages/System/attachSystemTables.cpp | 2 + 8 files changed, 247 insertions(+), 103 deletions(-) create mode 100644 src/Core/ServerSettings.cpp create mode 100644 src/Core/ServerSettings.h create mode 100644 src/Storages/System/StorageSystemServerSettings.cpp create mode 100644 src/Storages/System/StorageSystemServerSettings.h diff --git a/programs/server/Server.cpp b/programs/server/Server.cpp index b97b48d9c68..5a62bb88427 100644 --- a/programs/server/Server.cpp +++ b/programs/server/Server.cpp @@ -92,6 +92,7 @@ #include #include #include +#include #include #include @@ -663,7 +664,10 @@ try MainThreadStatus::getInstance(); - StackTrace::setShowAddresses(config().getBool("show_addresses_in_stack_traces", true)); + ServerSettings server_settings; + server_settings.loadSettingsFromConfig(config()); + + StackTrace::setShowAddresses(server_settings.show_addresses_in_stack_traces); #if USE_HDFS /// This will point libhdfs3 to the right location for its config. @@ -748,9 +752,9 @@ try // nodes (`from_zk`), because ZooKeeper interface uses the pool. We will // ignore `max_thread_pool_size` in configs we fetch from ZK, but oh well. GlobalThreadPool::initialize( - config().getUInt("max_thread_pool_size", 10000), - config().getUInt("max_thread_pool_free_size", 1000), - config().getUInt("thread_pool_queue_size", 10000)); + server_settings.max_thread_pool_size, + server_settings.max_thread_pool_free_size, + server_settings.thread_pool_queue_size); #if USE_AZURE_BLOB_STORAGE /// It makes sense to deinitialize libxml after joining of all threads @@ -766,9 +770,9 @@ try #endif IOThreadPool::initialize( - config().getUInt("max_io_thread_pool_size", 100), - config().getUInt("max_io_thread_pool_free_size", 0), - config().getUInt("io_thread_pool_queue_size", 10000)); + server_settings.max_io_thread_pool_size, + server_settings.max_io_thread_pool_free_size, + server_settings.io_thread_pool_queue_size); NamedCollectionUtils::loadFromConfig(config()); @@ -786,15 +790,15 @@ try } } - Poco::ThreadPool server_pool(3, config().getUInt("max_connections", 1024)); + Poco::ThreadPool server_pool(3, server_settings.max_connections); std::mutex servers_lock; std::vector servers; std::vector servers_to_start_before_tables; /// This object will periodically calculate some metrics. ServerAsynchronousMetrics async_metrics( global_context, - config().getUInt("asynchronous_metrics_update_period_s", 1), - config().getUInt("asynchronous_heavy_metrics_update_period_s", 120), + server_settings.asynchronous_metrics_update_period_s, + server_settings.asynchronous_heavy_metrics_update_period_s, [&]() -> std::vector { std::vector metrics; @@ -809,7 +813,7 @@ try } ); - ConnectionCollector::init(global_context, config().getUInt("max_threads_for_connection_collector", 10)); + ConnectionCollector::init(global_context, server_settings.max_threads_for_connection_collector); bool has_zookeeper = config().has("zookeeper"); @@ -828,6 +832,9 @@ try Settings::checkNoSettingNamesAtTopLevel(config(), config_path); + /// We need to reload server settings because config could be updated via zookeeper. + server_settings.loadSettingsFromConfig(config()); + #if defined(OS_LINUX) std::string executable_path = getExecutablePath(); @@ -947,7 +954,7 @@ try std::string path_str = getCanonicalPath(config().getString("path", DBMS_DEFAULT_PATH)); fs::path path = path_str; - std::string default_database = config().getString("default_database", "default"); + std::string default_database = server_settings.default_database.toString(); /// Check that the process user id matches the owner of the data. const auto effective_user_id = geteuid(); @@ -1038,21 +1045,18 @@ try LOG_TRACE(log, "Initialized DateLUT with time zone '{}'.", DateLUT::instance().getTimeZone()); /// Storage with temporary data for processing of heavy queries. - if (auto temporary_policy = config().getString("tmp_policy", ""); !temporary_policy.empty()) + if (!server_settings.tmp_policy.value.empty()) { - size_t max_size = config().getUInt64("max_temporary_data_on_disk_size", 0); - global_context->setTemporaryStoragePolicy(temporary_policy, max_size); + global_context->setTemporaryStoragePolicy(server_settings.tmp_policy, server_settings.max_temporary_data_on_disk_size); } - else if (auto temporary_cache = config().getString("temporary_data_in_cache", ""); !temporary_cache.empty()) + else if (!server_settings.temporary_data_in_cache.value.empty()) { - size_t max_size = config().getUInt64("max_temporary_data_on_disk_size", 0); - global_context->setTemporaryStorageInCache(temporary_cache, max_size); + global_context->setTemporaryStorageInCache(server_settings.temporary_data_in_cache, server_settings.max_temporary_data_on_disk_size); } else { std::string temporary_path = config().getString("tmp_path", path / "tmp/"); - size_t max_size = config().getUInt64("max_temporary_data_on_disk_size", 0); - global_context->setTemporaryStoragePath(temporary_path, max_size); + global_context->setTemporaryStoragePath(temporary_path, server_settings.max_temporary_data_on_disk_size); } /** Directory with 'flags': files indicating temporary settings for the server set by system administrator. @@ -1189,10 +1193,12 @@ try { Settings::checkNoSettingNamesAtTopLevel(*config, config_path); - /// Limit on total memory usage - size_t max_server_memory_usage = config->getUInt64("max_server_memory_usage", 0); + ServerSettings server_settings; + server_settings.loadSettingsFromConfig(*config); - double max_server_memory_usage_to_ram_ratio = config->getDouble("max_server_memory_usage_to_ram_ratio", 0.9); + size_t max_server_memory_usage = server_settings.max_server_memory_usage; + + double max_server_memory_usage_to_ram_ratio = server_settings.max_server_memory_usage_to_ram_ratio; size_t default_max_server_memory_usage = static_cast(memory_amount * max_server_memory_usage_to_ram_ratio); if (max_server_memory_usage == 0) @@ -1220,8 +1226,7 @@ try total_memory_tracker.setDescription("(total)"); total_memory_tracker.setMetric(CurrentMetrics::MemoryTracking); - bool allow_use_jemalloc_memory = config->getBool("allow_use_jemalloc_memory", true); - total_memory_tracker.setAllowUseJemallocMemory(allow_use_jemalloc_memory); + total_memory_tracker.setAllowUseJemallocMemory(server_settings.allow_use_jemalloc_memory); auto * global_overcommit_tracker = global_context->getGlobalOvercommitTracker(); total_memory_tracker.setOvercommitTracker(global_overcommit_tracker); @@ -1239,36 +1244,23 @@ try global_context->setRemoteHostFilter(*config); - /// Setup protection to avoid accidental DROP for big tables (that are greater than 50 GB by default) - if (config->has("max_table_size_to_drop")) - global_context->setMaxTableSizeToDrop(config->getUInt64("max_table_size_to_drop")); - - if (config->has("max_partition_size_to_drop")) - global_context->setMaxPartitionSizeToDrop(config->getUInt64("max_partition_size_to_drop")); + global_context->setMaxTableSizeToDrop(server_settings.max_table_size_to_drop); + global_context->setMaxPartitionSizeToDrop(server_settings.max_partition_size_to_drop); ConcurrencyControl::SlotCount concurrent_threads_soft_limit = ConcurrencyControl::Unlimited; - if (config->has("concurrent_threads_soft_limit_num")) + if (server_settings.concurrent_threads_soft_limit_num > 0 && server_settings.concurrent_threads_soft_limit_num < concurrent_threads_soft_limit) + concurrent_threads_soft_limit = server_settings.concurrent_threads_soft_limit_num; + if (server_settings.concurrent_threads_soft_limit_ratio_to_cores > 0) { - auto value = config->getUInt64("concurrent_threads_soft_limit_num", 0); - if (value > 0 && value < concurrent_threads_soft_limit) - concurrent_threads_soft_limit = value; - } - if (config->has("concurrent_threads_soft_limit_ratio_to_cores")) - { - auto value = config->getUInt64("concurrent_threads_soft_limit_ratio_to_cores", 0) * std::thread::hardware_concurrency(); + auto value = server_settings.concurrent_threads_soft_limit_ratio_to_cores * std::thread::hardware_concurrency(); if (value > 0 && value < concurrent_threads_soft_limit) concurrent_threads_soft_limit = value; } ConcurrencyControl::instance().setMaxConcurrency(concurrent_threads_soft_limit); - if (config->has("max_concurrent_queries")) - global_context->getProcessList().setMaxSize(config->getInt("max_concurrent_queries", 0)); - - if (config->has("max_concurrent_insert_queries")) - global_context->getProcessList().setMaxInsertQueriesAmount(config->getInt("max_concurrent_insert_queries", 0)); - - if (config->has("max_concurrent_select_queries")) - global_context->getProcessList().setMaxSelectQueriesAmount(config->getInt("max_concurrent_select_queries", 0)); + global_context->getProcessList().setMaxSize(server_settings.max_concurrent_queries); + global_context->getProcessList().setMaxInsertQueriesAmount(server_settings.max_concurrent_insert_queries); + global_context->getProcessList().setMaxSelectQueriesAmount(server_settings.max_concurrent_select_queries); if (config->has("keeper_server")) global_context->updateKeeperConfiguration(*config); @@ -1277,56 +1269,43 @@ try /// Note: If you specified it in the top level config (not it config of default profile) /// then ClickHouse will use it exactly. /// This is done for backward compatibility. - if (global_context->areBackgroundExecutorsInitialized() && (config->has("background_pool_size") || config->has("background_merges_mutations_concurrency_ratio"))) + if (global_context->areBackgroundExecutorsInitialized() && (server_settings.background_pool_size.changed || server_settings.background_merges_mutations_concurrency_ratio.changed)) { - auto new_pool_size = config->getUInt64("background_pool_size", 16); - auto new_ratio = config->getUInt64("background_merges_mutations_concurrency_ratio", 2); + auto new_pool_size = server_settings.background_pool_size; + auto new_ratio = server_settings.background_merges_mutations_concurrency_ratio; global_context->getMergeMutateExecutor()->increaseThreadsAndMaxTasksCount(new_pool_size, new_pool_size * new_ratio); - auto new_scheduling_policy = config->getString("background_merges_mutations_scheduling_policy", "round_robin"); - global_context->getMergeMutateExecutor()->updateSchedulingPolicy(new_scheduling_policy); + global_context->getMergeMutateExecutor()->updateSchedulingPolicy(server_settings.background_merges_mutations_scheduling_policy.toString()); } - if (global_context->areBackgroundExecutorsInitialized() && config->has("background_move_pool_size")) + if (global_context->areBackgroundExecutorsInitialized() && server_settings.background_move_pool_size.changed) { - auto new_pool_size = config->getUInt64("background_move_pool_size"); + auto new_pool_size = server_settings.background_move_pool_size; global_context->getMovesExecutor()->increaseThreadsAndMaxTasksCount(new_pool_size, new_pool_size); } - if (global_context->areBackgroundExecutorsInitialized() && config->has("background_fetches_pool_size")) + if (global_context->areBackgroundExecutorsInitialized() && server_settings.background_fetches_pool_size.changed) { - auto new_pool_size = config->getUInt64("background_fetches_pool_size"); + auto new_pool_size = server_settings.background_fetches_pool_size; global_context->getFetchesExecutor()->increaseThreadsAndMaxTasksCount(new_pool_size, new_pool_size); } - if (global_context->areBackgroundExecutorsInitialized() && config->has("background_common_pool_size")) + if (global_context->areBackgroundExecutorsInitialized() && server_settings.background_common_pool_size.changed) { - auto new_pool_size = config->getUInt64("background_common_pool_size"); + auto new_pool_size = server_settings.background_common_pool_size; global_context->getCommonExecutor()->increaseThreadsAndMaxTasksCount(new_pool_size, new_pool_size); } - if (config->has("background_buffer_flush_schedule_pool_size")) - { - auto new_pool_size = config->getUInt64("background_buffer_flush_schedule_pool_size"); - global_context->getBufferFlushSchedulePool().increaseThreadsCount(new_pool_size); - } + if (server_settings.background_buffer_flush_schedule_pool_size.changed) + global_context->getBufferFlushSchedulePool().increaseThreadsCount(server_settings.background_buffer_flush_schedule_pool_size); - if (config->has("background_schedule_pool_size")) - { - auto new_pool_size = config->getUInt64("background_schedule_pool_size"); - global_context->getSchedulePool().increaseThreadsCount(new_pool_size); - } + if (server_settings.background_schedule_pool_size.changed) + global_context->getSchedulePool().increaseThreadsCount(server_settings.background_schedule_pool_size); - if (config->has("background_message_broker_schedule_pool_size")) - { - auto new_pool_size = config->getUInt64("background_message_broker_schedule_pool_size"); - global_context->getMessageBrokerSchedulePool().increaseThreadsCount(new_pool_size); - } + if (server_settings.background_message_broker_schedule_pool_size.changed) + global_context->getMessageBrokerSchedulePool().increaseThreadsCount(server_settings.background_message_broker_schedule_pool_size); - if (config->has("background_distributed_schedule_pool_size")) - { - auto new_pool_size = config->getUInt64("background_distributed_schedule_pool_size"); - global_context->getDistributedSchedulePool().increaseThreadsCount(new_pool_size); - } + if (server_settings.background_distributed_schedule_pool_size.changed) + global_context->getDistributedSchedulePool().increaseThreadsCount(server_settings.background_distributed_schedule_pool_size); if (config->has("resources")) { @@ -1471,18 +1450,15 @@ try }); /// Limit on total number of concurrently executed queries. - global_context->getProcessList().setMaxSize(config().getInt("max_concurrent_queries", 0)); + global_context->getProcessList().setMaxSize(server_settings.max_concurrent_queries); /// Set up caches. - /// Lower cache size on low-memory systems. - double cache_size_to_ram_max_ratio = config().getDouble("cache_size_to_ram_max_ratio", 0.5); - size_t max_cache_size = static_cast(memory_amount * cache_size_to_ram_max_ratio); + size_t max_cache_size = static_cast(memory_amount * server_settings.cache_size_to_ram_max_ratio); - /// Size of cache for uncompressed blocks. Zero means disabled. - String uncompressed_cache_policy = config().getString("uncompressed_cache_policy", "SLRU"); + String uncompressed_cache_policy = server_settings.uncompressed_cache_policy; LOG_INFO(log, "Uncompressed cache policy name {}", uncompressed_cache_policy); - size_t uncompressed_cache_size = config().getUInt64("uncompressed_cache_size", 0); + size_t uncompressed_cache_size = server_settings.uncompressed_cache_size; if (uncompressed_cache_size > max_cache_size) { uncompressed_cache_size = max_cache_size; @@ -1504,9 +1480,8 @@ try global_context, settings.async_insert_threads)); - /// Size of cache for marks (index of MergeTree family of tables). - size_t mark_cache_size = config().getUInt64("mark_cache_size", 5368709120); - String mark_cache_policy = config().getString("mark_cache_policy", "SLRU"); + size_t mark_cache_size = server_settings.mark_cache_size; + String mark_cache_policy = server_settings.mark_cache_policy; if (!mark_cache_size) LOG_ERROR(log, "Too low mark cache size will lead to severe performance degradation."); if (mark_cache_size > max_cache_size) @@ -1517,20 +1492,14 @@ try } global_context->setMarkCache(mark_cache_size, mark_cache_policy); - /// Size of cache for uncompressed blocks of MergeTree indices. Zero means disabled. - size_t index_uncompressed_cache_size = config().getUInt64("index_uncompressed_cache_size", 0); - if (index_uncompressed_cache_size) - global_context->setIndexUncompressedCache(index_uncompressed_cache_size); + if (server_settings.index_uncompressed_cache_size) + global_context->setIndexUncompressedCache(server_settings.index_uncompressed_cache_size); - /// Size of cache for index marks (index of MergeTree skip indices). - size_t index_mark_cache_size = config().getUInt64("index_mark_cache_size", 0); - if (index_mark_cache_size) - global_context->setIndexMarkCache(index_mark_cache_size); + if (server_settings.index_mark_cache_size) + global_context->setIndexMarkCache(server_settings.index_mark_cache_size); - /// A cache for mmapped files. - size_t mmap_cache_size = config().getUInt64("mmap_cache_size", 1000); /// The choice of default is arbitrary. - if (mmap_cache_size) - global_context->setMMappedFileCache(mmap_cache_size); + if (server_settings.mmap_cache_size) + global_context->setMMappedFileCache(server_settings.mmap_cache_size); /// A cache for query results. global_context->setQueryCache(config()); @@ -1616,7 +1585,7 @@ try /// context is destroyed. /// In addition this object has to be created before the loading of the tables. std::unique_ptr dns_cache_updater; - if (config().has("disable_internal_dns_cache") && config().getInt("disable_internal_dns_cache")) + if (server_settings.disable_internal_dns_cache) { /// Disable DNS caching at all DNSResolver::instance().setDisableCacheFlag(); @@ -1626,7 +1595,7 @@ try { /// Initialize a watcher periodically updating DNS cache dns_cache_updater = std::make_unique( - global_context, config().getInt("dns_cache_update_period", 15), config().getUInt("dns_max_consecutive_failures", 5)); + global_context, server_settings.dns_cache_update_period, server_settings.dns_max_consecutive_failures); } if (dns_cache_updater) @@ -1890,7 +1859,7 @@ try LOG_INFO(log, "Closed all listening sockets."); /// Killing remaining queries. - if (!config().getBool("shutdown_wait_unfinished_queries", false)) + if (server_settings.shutdown_wait_unfinished_queries) global_context->getProcessList().killAllQueries(); if (current_connections) diff --git a/src/Core/ServerSettings.cpp b/src/Core/ServerSettings.cpp new file mode 100644 index 00000000000..c50a67b04c9 --- /dev/null +++ b/src/Core/ServerSettings.cpp @@ -0,0 +1,19 @@ +#include "ServerSettings.h" +#include + +namespace DB +{ + +IMPLEMENT_SETTINGS_TRAITS(ServerSettingsTraits, SERVER_SETTINGS) + +void ServerSettings::loadSettingsFromConfig(const Poco::Util::AbstractConfiguration & config) +{ + for (auto setting : all()) + { + const auto & name = setting.getName(); + if (config.has(name)) + set(name, config.getString(name)); + } +} + +} diff --git a/src/Core/ServerSettings.h b/src/Core/ServerSettings.h new file mode 100644 index 00000000000..d597cdf1c66 --- /dev/null +++ b/src/Core/ServerSettings.h @@ -0,0 +1,78 @@ +#pragma once + + +#include + + +namespace Poco::Util +{ +class AbstractConfiguration; +} + +namespace DB +{ + +#define SERVER_SETTINGS(M, ALIAS) \ + M(Bool, show_addresses_in_stack_traces, true, "If it is set true will show addresses in stack traces", 0) \ + M(Bool, shutdown_wait_unfinished_queries, false, "If set true ClickHouse will wait for running queries finish before shutdown.", 0) \ + M(UInt64, max_thread_pool_size, 10000, "Max size for global thread pool.", 0) \ + M(UInt64, max_thread_pool_free_size, 1000, "Max free size for global thread pool.", 0) \ + M(UInt64, thread_pool_queue_size, 10000, "Queue size for global thread pool.", 0) \ + M(UInt64, max_io_thread_pool_size, 100, "Max size for IO thread pool.", 0) \ + M(UInt64, max_io_thread_pool_free_size, 0, "Max free size for IO thread pool.", 0) \ + M(UInt64, io_thread_pool_queue_size, 10000, "Queue size for IO thread pool.", 0) \ + M(Int32, max_connections, 1024, "Max server connections.", 0) \ + M(UInt32, asynchronous_metrics_update_period_s, 1, "Period in seconds for updating asynchronous metrics.", 0) \ + M(UInt32, asynchronous_heavy_metrics_update_period_s, 120, "Period in seconds for updating asynchronous metrics.", 0) \ + M(UInt32, max_threads_for_connection_collector, 100, "Max thread count for connection collector.", 0) \ + M(String, default_database, "default", "Default database name.", 0) \ + M(String, tmp_policy, "", "Policy for storage with temporary data.", 0) \ + M(UInt64, max_temporary_data_on_disk_size, 0, "Max data size for temporary storage.", 0) \ + M(String, temporary_data_in_cache, "", "Cache disk name for temporary data.", 0) \ + M(UInt64, max_server_memory_usage, 0, "Limit on total memory usage. Zero means Unlimited.", 0) \ + M(Double, max_server_memory_usage_to_ram_ratio, 0.9, "Same as max_server_memory_usage but in to ram ratio. Allows to lower max memory on low-memory systems.", 0) \ + M(Bool, allow_use_jemalloc_memory, true, "Allows to use jemalloc memory.", 0) \ + \ + M(UInt64, max_concurrent_queries, 0, "Limit on total number of concurrently executed queries. Zero means Unlimited.", 0) \ + M(UInt64, max_concurrent_insert_queries, 0, "Limit on total number of concurrently insert queries. Zero means Unlimited.", 0) \ + M(UInt64, max_concurrent_select_queries, 0, "Limit on total number of concurrently select queries. Zero means Unlimited.", 0) \ + \ + M(Double, cache_size_to_ram_max_ratio, 0.5, "Set cache size ro ram max ratio. Allows to lower cache size on low-memory systems.", 0) \ + M(String, uncompressed_cache_policy, "SLRU", "Uncompressed cache policy name.", 0) \ + M(UInt64, uncompressed_cache_size, 0, "Size of cache for uncompressed blocks. Zero means disabled.", 0) \ + M(UInt64, mark_cache_size, 5368709120, "Size of cache for marks (index of MergeTree family of tables).", 0) \ + M(String, mark_cache_policy, "SLRU", "Mark cache policy name.", 0) \ + M(UInt64, index_uncompressed_cache_size, 0, "Size of cache for uncompressed blocks of MergeTree indices. Zero means disabled.", 0) \ + M(UInt64, index_mark_cache_size, 0, "Size of cache for uncompressed blocks of MergeTree indices. Zero means disabled.", 0) \ + M(UInt64, mmap_cache_size, 1000, "A cache for mmapped files.", 0) /* The choice of default is arbitrary. */ \ + \ + M(Bool, disable_internal_dns_cache, false, "Disable internal DNS caching at all.", 0) \ + M(Int32, dns_cache_update_period, 15, "Internal DNS cache update period in seconds.", 0) \ + M(UInt32, dns_max_consecutive_failures, 1024, "Max server connections.", 0) \ + \ + M(UInt64, max_table_size_to_drop, 50000000000lu, "If size of a table is greater than this value (in bytes) than table could not be dropped with any DROP query.", 0) \ + M(UInt64, max_partition_size_to_drop, 50000000000lu, "Same as max_table_size_to_drop, but for the partitions.", 0) \ + M(UInt64, concurrent_threads_soft_limit_num, 0, "Sets how many concurrent thread can be allocated before applying CPU pressure. Zero means Unlimited.", 0) \ + M(UInt64, concurrent_threads_soft_limit_ratio_to_cores, 1024, "Same as concurrent_threads_soft_limit_num, but with ratio to cores.", 0) \ + \ + M(UInt64, background_pool_size, 16, "Sets background pool size.", 0) \ + M(UInt64, background_merges_mutations_concurrency_ratio, 2, "Sets background merges mutations concurrency ratio.", 0) \ + M(String, background_merges_mutations_scheduling_policy, "round_robin", "Sets background merges mutations scheduling policy.", 0) \ + M(UInt64, background_move_pool_size, 8, "Sets background move pool size.", 0) \ + M(UInt64, background_fetches_pool_size, 8, "Sets background fetches pool size.", 0) \ + M(UInt64, background_common_pool_size, 8, "Sets background common pool size.", 0) \ + M(UInt64, background_buffer_flush_schedule_pool_size, 16, "Sets background flush schedule pool size.", 0) \ + M(UInt64, background_schedule_pool_size, 16, "Sets background schedule pool size.", 0) \ + M(UInt64, background_message_broker_schedule_pool_size, 16, "Sets background message broker schedule pool size.", 0) \ + M(UInt64, background_distributed_schedule_pool_size, 16, "Sets background distributed schedule pool size.", 0) \ + + +DECLARE_SETTINGS_TRAITS(ServerSettingsTraits, SERVER_SETTINGS) + +struct ServerSettings : public BaseSettings +{ + void loadSettingsFromConfig(const Poco::Util::AbstractConfiguration & config); +}; + +} + diff --git a/src/Core/SettingsFields.cpp b/src/Core/SettingsFields.cpp index 4164bf1e27e..06cd53013ec 100644 --- a/src/Core/SettingsFields.cpp +++ b/src/Core/SettingsFields.cpp @@ -150,10 +150,16 @@ template struct SettingFieldNumber; template struct SettingFieldNumber; template struct SettingFieldNumber; template struct SettingFieldNumber; +template struct SettingFieldNumber; +template struct SettingFieldNumber; +template struct SettingFieldNumber; template struct SettingAutoWrapper>; template struct SettingAutoWrapper>; template struct SettingAutoWrapper>; +template struct SettingAutoWrapper>; +template struct SettingAutoWrapper>; +template struct SettingAutoWrapper>; namespace { diff --git a/src/Core/SettingsFields.h b/src/Core/SettingsFields.h index c6fe46c9f6b..3994e402c9a 100644 --- a/src/Core/SettingsFields.h +++ b/src/Core/SettingsFields.h @@ -55,7 +55,10 @@ struct SettingFieldNumber using SettingFieldUInt64 = SettingFieldNumber; using SettingFieldInt64 = SettingFieldNumber; +using SettingFieldUInt32 = SettingFieldNumber; +using SettingFieldInt32 = SettingFieldNumber; using SettingFieldFloat = SettingFieldNumber; +using SettingFieldDouble = SettingFieldNumber; using SettingFieldBool = SettingFieldNumber; /** Wraps any SettingField to support special value 'auto' that can be checked with `is_auto` flag. @@ -129,6 +132,9 @@ struct SettingAutoWrapper using SettingFieldUInt64Auto = SettingAutoWrapper; using SettingFieldInt64Auto = SettingAutoWrapper; using SettingFieldFloatAuto = SettingAutoWrapper; +using SettingFieldUInt32Auto = SettingAutoWrapper; +using SettingFieldInt32Auto = SettingAutoWrapper; +using SettingFieldDoubleAuto = SettingAutoWrapper; /* Similar to SettingFieldUInt64Auto with small differences to behave like regular UInt64, supported to compatibility. * When setting to 'auto' it becomes equal to the number of processor cores without taking into account SMT. diff --git a/src/Storages/System/StorageSystemServerSettings.cpp b/src/Storages/System/StorageSystemServerSettings.cpp new file mode 100644 index 00000000000..0e803d720a9 --- /dev/null +++ b/src/Storages/System/StorageSystemServerSettings.cpp @@ -0,0 +1,37 @@ +#include +#include +#include +#include +#include + +namespace DB +{ +NamesAndTypesList StorageSystemServerSettings::getNamesAndTypes() +{ + return { + {"name", std::make_shared()}, + {"value", std::make_shared()}, + {"changed", std::make_shared()}, + {"description", std::make_shared()}, + {"type", std::make_shared()}, + }; +} + +void StorageSystemServerSettings::fillData(MutableColumns & res_columns, ContextPtr context, const SelectQueryInfo &) const +{ + const auto & config = context->getConfigRef(); + ServerSettings settings; + settings.loadSettingsFromConfig(config); + + for (const auto & setting : settings.all()) + { + const auto & setting_name = setting.getName(); + res_columns[0]->insert(setting_name); + res_columns[1]->insert(setting.getValueString()); + res_columns[2]->insert(setting.isValueChanged()); + res_columns[3]->insert(setting.getDescription()); + res_columns[4]->insert(setting.getTypeName()); + } +} + +} diff --git a/src/Storages/System/StorageSystemServerSettings.h b/src/Storages/System/StorageSystemServerSettings.h new file mode 100644 index 00000000000..b3aa8055853 --- /dev/null +++ b/src/Storages/System/StorageSystemServerSettings.h @@ -0,0 +1,27 @@ +#pragma once + +#include + + +namespace DB +{ + +class Context; + + +/** implements system table "settings", which allows to get information about the current settings. + */ +class StorageSystemServerSettings final : public IStorageSystemOneBlock +{ +public: + std::string getName() const override { return "SystemServerSettings"; } + + static NamesAndTypesList getNamesAndTypes(); + +protected: + using IStorageSystemOneBlock::IStorageSystemOneBlock; + + void fillData(MutableColumns & res_columns, ContextPtr context, const SelectQueryInfo & query_info) const override; +}; + +} diff --git a/src/Storages/System/attachSystemTables.cpp b/src/Storages/System/attachSystemTables.cpp index 07db151069f..61329ab834b 100644 --- a/src/Storages/System/attachSystemTables.cpp +++ b/src/Storages/System/attachSystemTables.cpp @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -105,6 +106,7 @@ void attachSystemTablesLocal(ContextPtr context, IDatabase & system_database) attach(context, system_database, "functions"); attach(context, system_database, "events"); attach(context, system_database, "settings"); + attach(context, system_database, "server_settings"); attach(context, system_database, "settings_changes"); attach>(context, system_database, "merge_tree_settings"); attach>(context, system_database, "replicated_merge_tree_settings"); From 5b10fafbb03d66469512f7863f8f50e456693176 Mon Sep 17 00:00:00 2001 From: pufit Date: Sat, 18 Feb 2023 13:45:33 -0500 Subject: [PATCH 110/841] Additional tests --- tests/integration/test_config_xml_full/test.py | 14 ++++++++++++++ tests/integration/test_config_xml_yaml_mix/test.py | 6 ++++++ 2 files changed, 20 insertions(+) diff --git a/tests/integration/test_config_xml_full/test.py b/tests/integration/test_config_xml_full/test.py index ada3dc3f027..5f0679e5ef8 100644 --- a/tests/integration/test_config_xml_full/test.py +++ b/tests/integration/test_config_xml_full/test.py @@ -58,5 +58,19 @@ def test_xml_full_conf(): == "64999\n" ) + assert ( + node.query( + "select value from system.server_settings where name = 'max_connections'" + ) + == "4096\n" + ) + + assert ( + node.query( + "select changed from system.server_settings where name = 'max_connections'" + ) + == "1\n" + ) + finally: cluster.shutdown() diff --git a/tests/integration/test_config_xml_yaml_mix/test.py b/tests/integration/test_config_xml_yaml_mix/test.py index 373c42b2dea..9896d700ac1 100644 --- a/tests/integration/test_config_xml_yaml_mix/test.py +++ b/tests/integration/test_config_xml_yaml_mix/test.py @@ -64,6 +64,12 @@ def test_extra_yaml_mix(): ) == "64999\n" ) + assert ( + node.query( + "select value from system.server_settings where name = 'mark_cache_size'" + ) + == "8956\n" + ) finally: cluster.shutdown() From ff4e23aca87bea7182be122a5e738e2655ca138d Mon Sep 17 00:00:00 2001 From: pufit Date: Sun, 19 Feb 2023 16:48:55 -0500 Subject: [PATCH 111/841] Update programs/server/Server.cpp Co-authored-by: Sergei Trifonov --- programs/server/Server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/server/Server.cpp b/programs/server/Server.cpp index 5a62bb88427..1f74cc53961 100644 --- a/programs/server/Server.cpp +++ b/programs/server/Server.cpp @@ -1269,7 +1269,7 @@ try /// Note: If you specified it in the top level config (not it config of default profile) /// then ClickHouse will use it exactly. /// This is done for backward compatibility. - if (global_context->areBackgroundExecutorsInitialized() && (server_settings.background_pool_size.changed || server_settings.background_merges_mutations_concurrency_ratio.changed)) + if (global_context->areBackgroundExecutorsInitialized() && (server_settings.background_pool_size.changed || server_settings.background_merges_mutations_concurrency_ratio.changed || server_settings.background_merges_mutations_scheduling_policy.changed)) { auto new_pool_size = server_settings.background_pool_size; auto new_ratio = server_settings.background_merges_mutations_concurrency_ratio; From ec49fbec231c2ad3e10081c118ecd18a8d0a855b Mon Sep 17 00:00:00 2001 From: pufit Date: Sun, 19 Feb 2023 16:49:01 -0500 Subject: [PATCH 112/841] Update src/Core/ServerSettings.h Co-authored-by: Sergei Trifonov --- src/Core/ServerSettings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/ServerSettings.h b/src/Core/ServerSettings.h index d597cdf1c66..43a158839bf 100644 --- a/src/Core/ServerSettings.h +++ b/src/Core/ServerSettings.h @@ -53,7 +53,7 @@ namespace DB M(UInt64, max_table_size_to_drop, 50000000000lu, "If size of a table is greater than this value (in bytes) than table could not be dropped with any DROP query.", 0) \ M(UInt64, max_partition_size_to_drop, 50000000000lu, "Same as max_table_size_to_drop, but for the partitions.", 0) \ M(UInt64, concurrent_threads_soft_limit_num, 0, "Sets how many concurrent thread can be allocated before applying CPU pressure. Zero means Unlimited.", 0) \ - M(UInt64, concurrent_threads_soft_limit_ratio_to_cores, 1024, "Same as concurrent_threads_soft_limit_num, but with ratio to cores.", 0) \ + M(UInt64, concurrent_threads_soft_limit_ratio_to_cores, 0, "Same as concurrent_threads_soft_limit_num, but with ratio to cores.", 0) \ \ M(UInt64, background_pool_size, 16, "Sets background pool size.", 0) \ M(UInt64, background_merges_mutations_concurrency_ratio, 2, "Sets background merges mutations concurrency ratio.", 0) \ From 8da3594cd8463eb0974d79d3829f5ece93cc7477 Mon Sep 17 00:00:00 2001 From: avogar Date: Mon, 20 Feb 2023 17:42:56 +0000 Subject: [PATCH 113/841] Fix IPv4/IPv6 serialization/deserialization in binary formats --- src/Formats/CapnProtoUtils.cpp | 2 + src/Functions/array/FunctionArrayMapped.h | 1 + .../Formats/Impl/ArrowColumnToCHColumn.cpp | 37 ++++++++ .../Formats/Impl/AvroRowInputFormat.cpp | 11 +++ .../Formats/Impl/AvroRowOutputFormat.cpp | 14 +++ .../Impl/BSONEachRowRowInputFormat.cpp | 92 +++++++++++++------ .../Impl/BSONEachRowRowOutputFormat.cpp | 18 ++++ .../Formats/Impl/CHColumnToArrowColumn.cpp | 54 +++++++++++ .../Formats/Impl/CapnProtoRowInputFormat.cpp | 3 + .../Formats/Impl/CapnProtoRowOutputFormat.cpp | 5 + .../Formats/Impl/MsgPackRowInputFormat.cpp | 11 +++ .../Formats/Impl/MsgPackRowOutputFormat.cpp | 12 +++ .../Formats/Impl/ORCBlockOutputFormat.cpp | 15 +++ .../02566_ipv4_ipv6_binary_formats.reference | 18 ++++ .../02566_ipv4_ipv6_binary_formats.sh | 45 +++++++++ .../format_schemas/02566_ipv4_ipv6.capnp | 6 ++ 16 files changed, 316 insertions(+), 28 deletions(-) create mode 100644 tests/queries/0_stateless/02566_ipv4_ipv6_binary_formats.reference create mode 100755 tests/queries/0_stateless/02566_ipv4_ipv6_binary_formats.sh create mode 100644 tests/queries/0_stateless/format_schemas/02566_ipv4_ipv6.capnp diff --git a/src/Formats/CapnProtoUtils.cpp b/src/Formats/CapnProtoUtils.cpp index e5f619faff5..a557b762672 100644 --- a/src/Formats/CapnProtoUtils.cpp +++ b/src/Formats/CapnProtoUtils.cpp @@ -317,6 +317,7 @@ static bool checkCapnProtoType(const capnp::Type & capnp_type, const DataTypePtr case TypeIndex::UInt16: return capnp_type.isUInt16(); case TypeIndex::DateTime: [[fallthrough]]; + case TypeIndex::IPv4: [[fallthrough]]; case TypeIndex::UInt32: return capnp_type.isUInt32(); case TypeIndex::UInt64: @@ -355,6 +356,7 @@ static bool checkCapnProtoType(const capnp::Type & capnp_type, const DataTypePtr case TypeIndex::LowCardinality: return checkCapnProtoType(capnp_type, assert_cast(data_type.get())->getDictionaryType(), mode, error_message, column_name); case TypeIndex::FixedString: [[fallthrough]]; + case TypeIndex::IPv6: [[fallthrough]]; case TypeIndex::String: return capnp_type.isText() || capnp_type.isData(); default: diff --git a/src/Functions/array/FunctionArrayMapped.h b/src/Functions/array/FunctionArrayMapped.h index 5092698d01c..5d758826f6a 100644 --- a/src/Functions/array/FunctionArrayMapped.h +++ b/src/Functions/array/FunctionArrayMapped.h @@ -7,6 +7,7 @@ #include #include #include +#include #include #include diff --git a/src/Processors/Formats/Impl/ArrowColumnToCHColumn.cpp b/src/Processors/Formats/Impl/ArrowColumnToCHColumn.cpp index ef25b5a332f..b7a914427a2 100644 --- a/src/Processors/Formats/Impl/ArrowColumnToCHColumn.cpp +++ b/src/Processors/Formats/Impl/ArrowColumnToCHColumn.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -527,6 +528,38 @@ static std::shared_ptr getNestedArrowColumn(std::shared_ptr return std::make_shared(array_vector); } +static ColumnWithTypeAndName readIPv6ColumnFromBinaryData(std::shared_ptr & arrow_column, const String & column_name) +{ + size_t total_size = 0; + for (int chunk_i = 0, num_chunks = arrow_column->num_chunks(); chunk_i < num_chunks; ++chunk_i) + { + auto & chunk = dynamic_cast(*(arrow_column->chunk(chunk_i))); + const size_t chunk_length = chunk.length(); + + for (size_t i = 0; i != chunk_length; ++i) + { + /// If at least one value size is not 16 bytes, fallback to reading String column and further cast to IPv6. + if (chunk.value_length(i) != sizeof(IPv6)) + return readColumnWithStringData(arrow_column, column_name); + } + total_size += chunk_length; + } + + auto internal_type = std::make_shared(); + auto internal_column = internal_type->createColumn(); + auto & data = assert_cast(*internal_column).getData(); + data.reserve(total_size * sizeof(IPv6)); + + for (int chunk_i = 0, num_chunks = arrow_column->num_chunks(); chunk_i < num_chunks; ++chunk_i) + { + auto & chunk = dynamic_cast(*(arrow_column->chunk(chunk_i))); + std::shared_ptr buffer = chunk.value_data(); + const auto * raw_data = reinterpret_cast(buffer->data()); + data.insert_assume_reserved(raw_data, raw_data + chunk.length()); + } + return {std::move(internal_column), std::move(internal_type), column_name}; +} + static ColumnWithTypeAndName readColumnFromArrowColumn( std::shared_ptr & arrow_column, const std::string & column_name, @@ -558,7 +591,11 @@ static ColumnWithTypeAndName readColumnFromArrowColumn( { case arrow::Type::STRING: case arrow::Type::BINARY: + { + if (type_hint && isIPv6(type_hint)) + return readIPv6ColumnFromBinaryData(arrow_column, column_name); return readColumnWithStringData(arrow_column, column_name); + } case arrow::Type::FIXED_SIZE_BINARY: return readColumnWithFixedStringData(arrow_column, column_name); case arrow::Type::LARGE_BINARY: diff --git a/src/Processors/Formats/Impl/AvroRowInputFormat.cpp b/src/Processors/Formats/Impl/AvroRowInputFormat.cpp index eacd29e0db1..26f5a76776e 100644 --- a/src/Processors/Formats/Impl/AvroRowInputFormat.cpp +++ b/src/Processors/Formats/Impl/AvroRowInputFormat.cpp @@ -145,6 +145,9 @@ static void insertNumber(IColumn & column, WhichDataType type, T value) case TypeIndex::DateTime64: assert_cast &>(column).insertValue(static_cast(value)); break; + case TypeIndex::IPv4: + assert_cast(column).insertValue(IPv4(static_cast(value))); + break; default: throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Type is not compatible with Avro"); } @@ -386,6 +389,14 @@ AvroDeserializer::DeserializeFn AvroDeserializer::createDeserializeFn(avro::Node column.insertData(reinterpret_cast(tmp_fixed.data()), tmp_fixed.size()); }; } + else if (target.isIPv6() && fixed_size == sizeof(IPv6)) + { + return [tmp_fixed = std::vector(fixed_size)](IColumn & column, avro::Decoder & decoder) mutable + { + decoder.decodeFixed(tmp_fixed.size(), tmp_fixed); + column.insertData(reinterpret_cast(tmp_fixed.data()), tmp_fixed.size()); + }; + } break; } case avro::AVRO_SYMBOLIC: diff --git a/src/Processors/Formats/Impl/AvroRowOutputFormat.cpp b/src/Processors/Formats/Impl/AvroRowOutputFormat.cpp index 8483a91df62..1ca56a1c5cc 100644 --- a/src/Processors/Formats/Impl/AvroRowOutputFormat.cpp +++ b/src/Processors/Formats/Impl/AvroRowOutputFormat.cpp @@ -127,6 +127,11 @@ AvroSerializer::SchemaWithSerializeFn AvroSerializer::createSchemaWithSerializeF { encoder.encodeInt(assert_cast(column).getElement(row_num)); }}; + case TypeIndex::IPv4: + return {avro::IntSchema(), [](const IColumn & column, size_t row_num, avro::Encoder & encoder) + { + encoder.encodeInt(assert_cast(column).getElement(row_num)); + }}; case TypeIndex::Int32: return {avro::IntSchema(), [](const IColumn & column, size_t row_num, avro::Encoder & encoder) { @@ -205,6 +210,15 @@ AvroSerializer::SchemaWithSerializeFn AvroSerializer::createSchemaWithSerializeF encoder.encodeFixed(reinterpret_cast(s.data()), s.size()); }}; } + case TypeIndex::IPv6: + { + auto schema = avro::FixedSchema(sizeof(IPv6), "ipv6_" + toString(type_name_increment)); + return {schema, [](const IColumn & column, size_t row_num, avro::Encoder & encoder) + { + const std::string_view & s = assert_cast(column).getDataAt(row_num).toView(); + encoder.encodeFixed(reinterpret_cast(s.data()), s.size()); + }}; + } case TypeIndex::Enum8: { auto schema = avro::EnumSchema("enum8_" + toString(type_name_increment)); /// type names must be different for different types. diff --git a/src/Processors/Formats/Impl/BSONEachRowRowInputFormat.cpp b/src/Processors/Formats/Impl/BSONEachRowRowInputFormat.cpp index c4ffce2bc65..e0064c282b4 100644 --- a/src/Processors/Formats/Impl/BSONEachRowRowInputFormat.cpp +++ b/src/Processors/Formats/Impl/BSONEachRowRowInputFormat.cpp @@ -151,6 +151,17 @@ static void readAndInsertInteger(ReadBuffer & in, IColumn & column, const DataTy } } +static void readAndInsertIPv4(ReadBuffer & in, IColumn & column, BSONType bson_type) +{ + /// We expect BSON type Int32 as IPv4 value. + if (bson_type != BSONType::INT32) + throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Cannot insert BSON Int32 into column with type IPv4"); + + UInt32 value; + readBinary(value, in); + assert_cast(column).insertValue(IPv4(value)); +} + template static void readAndInsertDouble(ReadBuffer & in, IColumn & column, const DataTypePtr & data_type, BSONType bson_type) { @@ -296,37 +307,52 @@ static void readAndInsertString(ReadBuffer & in, IColumn & column, BSONType bson } } +static void readAndInsertIPv6(ReadBuffer & in, IColumn & column, BSONType bson_type) +{ + if (bson_type != BSONType::BINARY) + throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Cannot insert BSON {} into IPv6 column", getBSONTypeName(bson_type)); + + auto size = readBSONSize(in); + auto subtype = getBSONBinarySubtype(readBSONType(in)); + if (subtype != BSONBinarySubtype::BINARY) + throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Cannot insert BSON Binary subtype {} into IPv6 column", getBSONBinarySubtypeName(subtype)); + + if (size != sizeof(IPv6)) + throw Exception( + ErrorCodes::INCORRECT_DATA, + "Cannot parse value of type IPv6, size of binary data is not equal to the binary size of IPv6 value: {} != {}", + size, + sizeof(IPv6)); + + IPv6 value; + readBinary(value, in); + assert_cast(column).insertValue(value); +} + + static void readAndInsertUUID(ReadBuffer & in, IColumn & column, BSONType bson_type) { - if (bson_type == BSONType::BINARY) - { - auto size = readBSONSize(in); - auto subtype = getBSONBinarySubtype(readBSONType(in)); - if (subtype == BSONBinarySubtype::UUID || subtype == BSONBinarySubtype::UUID_OLD) - { - if (size != sizeof(UUID)) - throw Exception( - ErrorCodes::INCORRECT_DATA, - "Cannot parse value of type UUID, size of binary data is not equal to the binary size of UUID value: {} != {}", - size, - sizeof(UUID)); - - UUID value; - readBinary(value, in); - assert_cast(column).insertValue(value); - } - else - { - throw Exception( - ErrorCodes::ILLEGAL_COLUMN, - "Cannot insert BSON Binary subtype {} into UUID column", - getBSONBinarySubtypeName(subtype)); - } - } - else - { + if (bson_type != BSONType::BINARY) throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Cannot insert BSON {} into UUID column", getBSONTypeName(bson_type)); - } + + auto size = readBSONSize(in); + auto subtype = getBSONBinarySubtype(readBSONType(in)); + if (subtype != BSONBinarySubtype::UUID && subtype != BSONBinarySubtype::UUID_OLD) + throw Exception( + ErrorCodes::ILLEGAL_COLUMN, + "Cannot insert BSON Binary subtype {} into UUID column", + getBSONBinarySubtypeName(subtype)); + + if (size != sizeof(UUID)) + throw Exception( + ErrorCodes::INCORRECT_DATA, + "Cannot parse value of type UUID, size of binary data is not equal to the binary size of UUID value: {} != {}", + size, + sizeof(UUID)); + + UUID value; + readBinary(value, in); + assert_cast(column).insertValue(value); } void BSONEachRowRowInputFormat::readArray(IColumn & column, const DataTypePtr & data_type, BSONType bson_type) @@ -591,6 +617,16 @@ bool BSONEachRowRowInputFormat::readField(IColumn & column, const DataTypePtr & readAndInsertString(*in, column, bson_type); return true; } + case TypeIndex::IPv4: + { + readAndInsertIPv4(*in, column, bson_type); + return true; + } + case TypeIndex::IPv6: + { + readAndInsertIPv6(*in, column, bson_type); + return true; + } case TypeIndex::UUID: { readAndInsertUUID(*in, column, bson_type); diff --git a/src/Processors/Formats/Impl/BSONEachRowRowOutputFormat.cpp b/src/Processors/Formats/Impl/BSONEachRowRowOutputFormat.cpp index 211021b0d78..95dd3079687 100644 --- a/src/Processors/Formats/Impl/BSONEachRowRowOutputFormat.cpp +++ b/src/Processors/Formats/Impl/BSONEachRowRowOutputFormat.cpp @@ -124,6 +124,7 @@ size_t BSONEachRowRowOutputFormat::countBSONFieldSize(const IColumn & column, co case TypeIndex::Date: [[fallthrough]]; case TypeIndex::Date32: [[fallthrough]]; case TypeIndex::Decimal32: [[fallthrough]]; + case TypeIndex::IPv4: [[fallthrough]]; case TypeIndex::Int32: { return size + sizeof(Int32); @@ -168,6 +169,10 @@ size_t BSONEachRowRowOutputFormat::countBSONFieldSize(const IColumn & column, co const auto & string_column = assert_cast(column); return size + sizeof(BSONSizeT) + string_column.getN() + 1; // Size of data + data + \0 or BSON subtype (in case of BSON binary) } + case TypeIndex::IPv6: + { + return size + sizeof(BSONSizeT) + 1 + sizeof(IPv6); // Size of data + BSON binary subtype + 16 bytes of value + } case TypeIndex::UUID: { return size + sizeof(BSONSizeT) + 1 + sizeof(UUID); // Size of data + BSON binary subtype + 16 bytes of value @@ -371,6 +376,19 @@ void BSONEachRowRowOutputFormat::serializeField(const IColumn & column, const Da writeBSONString(column, row_num, name, out, settings.bson.output_string_as_string); break; } + case TypeIndex::IPv4: + { + writeBSONNumber(BSONType::INT32, column, row_num, name, out); + break; + } + case TypeIndex::IPv6: + { + writeBSONTypeAndKeyName(BSONType::BINARY, name, out); + writeBSONSize(sizeof(IPv6), out); + writeBSONType(BSONBinarySubtype::BINARY, out); + writeBinary(assert_cast(column).getElement(row_num), out); + break; + } case TypeIndex::UUID: { writeBSONTypeAndKeyName(BSONType::BINARY, name, out); diff --git a/src/Processors/Formats/Impl/CHColumnToArrowColumn.cpp b/src/Processors/Formats/Impl/CHColumnToArrowColumn.cpp index aef54516627..8698b343eb3 100644 --- a/src/Processors/Formats/Impl/CHColumnToArrowColumn.cpp +++ b/src/Processors/Formats/Impl/CHColumnToArrowColumn.cpp @@ -434,6 +434,46 @@ namespace DB checkStatus(status, write_column->getName(), format_name); } + static void fillArrowArrayWithIPv6ColumnData( + ColumnPtr write_column, + const PaddedPODArray * null_bytemap, + const String & format_name, + arrow::ArrayBuilder* array_builder, + size_t start, + size_t end) + { + const auto & internal_column = assert_cast(*write_column); + const auto & internal_data = internal_column.getData(); + size_t fixed_length = sizeof(IPv6); + arrow::FixedSizeBinaryBuilder & builder = assert_cast(*array_builder); + arrow::Status status; + + PaddedPODArray arrow_null_bytemap = revertNullByteMap(null_bytemap, start, end); + const UInt8 * arrow_null_bytemap_raw_ptr = arrow_null_bytemap.empty() ? nullptr : arrow_null_bytemap.data(); + + const uint8_t * data_start = reinterpret_cast(internal_data.data()) + start * fixed_length; + status = builder.AppendValues(data_start, end - start, reinterpret_cast(arrow_null_bytemap_raw_ptr)); + checkStatus(status, write_column->getName(), format_name); + } + + static void fillArrowArrayWithIPv4ColumnData( + ColumnPtr write_column, + const PaddedPODArray * null_bytemap, + const String & format_name, + arrow::ArrayBuilder* array_builder, + size_t start, + size_t end) + { + const auto & internal_data = assert_cast(*write_column).getData(); + auto & builder = assert_cast(*array_builder); + arrow::Status status; + + PaddedPODArray arrow_null_bytemap = revertNullByteMap(null_bytemap, start, end); + const UInt8 * arrow_null_bytemap_raw_ptr = arrow_null_bytemap.empty() ? nullptr : arrow_null_bytemap.data(); + status = builder.AppendValues(&(internal_data.data() + start)->toUnderType(), end - start, reinterpret_cast(arrow_null_bytemap_raw_ptr)); + checkStatus(status, write_column->getName(), format_name); + } + static void fillArrowArrayWithDateColumnData( ColumnPtr write_column, const PaddedPODArray * null_bytemap, @@ -541,6 +581,14 @@ namespace DB else fillArrowArrayWithStringColumnData(column, null_bytemap, format_name, array_builder, start, end); } + else if (isIPv6(column_type)) + { + fillArrowArrayWithIPv6ColumnData(column, null_bytemap, format_name, array_builder, start, end); + } + else if (isIPv4(column_type)) + { + fillArrowArrayWithIPv4ColumnData(column, null_bytemap, format_name, array_builder, start, end); + } else if (isDate(column_type)) { fillArrowArrayWithDateColumnData(column, null_bytemap, format_name, array_builder, start, end); @@ -781,6 +829,12 @@ namespace DB if (isBool(column_type)) return arrow::boolean(); + if (isIPv6(column_type)) + return arrow::fixed_size_binary(sizeof(IPv6)); + + if (isIPv4(column_type)) + return arrow::uint32(); + const std::string type_name = column_type->getFamilyName(); if (const auto * arrow_type_it = std::find_if( internal_type_to_arrow_type.begin(), diff --git a/src/Processors/Formats/Impl/CapnProtoRowInputFormat.cpp b/src/Processors/Formats/Impl/CapnProtoRowInputFormat.cpp index 58ace9cfca5..9f37bcc3219 100644 --- a/src/Processors/Formats/Impl/CapnProtoRowInputFormat.cpp +++ b/src/Processors/Formats/Impl/CapnProtoRowInputFormat.cpp @@ -128,6 +128,9 @@ static void insertUnsignedInteger(IColumn & column, const DataTypePtr & column_t case TypeIndex::UInt64: assert_cast(column).insertValue(value); break; + case TypeIndex::IPv4: + assert_cast(column).insertValue(IPv4(static_cast(value))); + break; default: throw Exception(ErrorCodes::LOGICAL_ERROR, "Column type is not an unsigned integer."); } diff --git a/src/Processors/Formats/Impl/CapnProtoRowOutputFormat.cpp b/src/Processors/Formats/Impl/CapnProtoRowOutputFormat.cpp index dcbd5db5f9b..c0f61bbd586 100644 --- a/src/Processors/Formats/Impl/CapnProtoRowOutputFormat.cpp +++ b/src/Processors/Formats/Impl/CapnProtoRowOutputFormat.cpp @@ -111,7 +111,12 @@ static std::optional convertToDynamicValue( case capnp::DynamicValue::Type::INT: return capnp::DynamicValue::Reader(column->getInt(row_num)); case capnp::DynamicValue::Type::UINT: + { + /// IPv4 column doesn't support getUInt method. + if (isIPv4(data_type)) + return capnp::DynamicValue::Reader(assert_cast(column.get())->getElement(row_num)); return capnp::DynamicValue::Reader(column->getUInt(row_num)); + } case capnp::DynamicValue::Type::BOOL: return capnp::DynamicValue::Reader(column->getBool(row_num)); case capnp::DynamicValue::Type::FLOAT: diff --git a/src/Processors/Formats/Impl/MsgPackRowInputFormat.cpp b/src/Processors/Formats/Impl/MsgPackRowInputFormat.cpp index f337eedbb05..5605b87f3a9 100644 --- a/src/Processors/Formats/Impl/MsgPackRowInputFormat.cpp +++ b/src/Processors/Formats/Impl/MsgPackRowInputFormat.cpp @@ -162,6 +162,11 @@ static void insertInteger(IColumn & column, DataTypePtr type, UInt64 value) assert_cast(column).insertValue(value); break; } + case TypeIndex::IPv4: + { + assert_cast(column).insertValue(IPv4(static_cast(value))); + break; + } default: throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Cannot insert MessagePack integer into column with type {}.", type->getName()); } @@ -190,6 +195,12 @@ static void insertString(IColumn & column, DataTypePtr type, const char * value, return; } + if (isIPv6(type) && bin) + { + assert_cast(column).insertData(value, size); + return; + } + if (!isStringOrFixedString(type)) throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Cannot insert MessagePack string into column with type {}.", type->getName()); diff --git a/src/Processors/Formats/Impl/MsgPackRowOutputFormat.cpp b/src/Processors/Formats/Impl/MsgPackRowOutputFormat.cpp index a1ed45ec40f..07951d42bc6 100644 --- a/src/Processors/Formats/Impl/MsgPackRowOutputFormat.cpp +++ b/src/Processors/Formats/Impl/MsgPackRowOutputFormat.cpp @@ -56,6 +56,11 @@ void MsgPackRowOutputFormat::serializeField(const IColumn & column, DataTypePtr packer.pack_uint32(assert_cast(column).getElement(row_num)); return; } + case TypeIndex::IPv4: + { + packer.pack_uint32(assert_cast(column).getElement(row_num)); + return; + } case TypeIndex::UInt64: { packer.pack_uint64(assert_cast(column).getElement(row_num)); @@ -110,6 +115,13 @@ void MsgPackRowOutputFormat::serializeField(const IColumn & column, DataTypePtr packer.pack_bin_body(string.data(), static_cast(string.size())); return; } + case TypeIndex::IPv6: + { + const std::string_view & data = assert_cast(column).getDataAt(row_num).toView(); + packer.pack_bin(static_cast(data.size())); + packer.pack_bin_body(data.data(), static_cast(data.size())); + return; + } case TypeIndex::Array: { auto nested_type = assert_cast(*data_type).getNestedType(); diff --git a/src/Processors/Formats/Impl/ORCBlockOutputFormat.cpp b/src/Processors/Formats/Impl/ORCBlockOutputFormat.cpp index 42c3e178436..86d9560beb9 100644 --- a/src/Processors/Formats/Impl/ORCBlockOutputFormat.cpp +++ b/src/Processors/Formats/Impl/ORCBlockOutputFormat.cpp @@ -75,6 +75,7 @@ std::unique_ptr ORCBlockOutputFormat::getORCType(const DataTypePtr & return orc::createPrimitiveType(orc::TypeKind::SHORT); } case TypeIndex::UInt32: [[fallthrough]]; + case TypeIndex::IPv4: [[fallthrough]]; case TypeIndex::Int32: { return orc::createPrimitiveType(orc::TypeKind::INT); @@ -109,6 +110,10 @@ std::unique_ptr ORCBlockOutputFormat::getORCType(const DataTypePtr & return orc::createPrimitiveType(orc::TypeKind::STRING); return orc::createPrimitiveType(orc::TypeKind::BINARY); } + case TypeIndex::IPv6: + { + return orc::createPrimitiveType(orc::TypeKind::BINARY); + } case TypeIndex::Nullable: { return getORCType(removeNullable(type)); @@ -309,6 +314,11 @@ void ORCBlockOutputFormat::writeColumn( writeNumbers(orc_column, column, null_bytemap, [](const UInt32 & value){ return value; }); break; } + case TypeIndex::IPv4: + { + writeNumbers(orc_column, column, null_bytemap, [](const IPv4 & value){ return value.toUnderType(); }); + break; + } case TypeIndex::Int64: { writeNumbers(orc_column, column, null_bytemap, [](const Int64 & value){ return value; }); @@ -339,6 +349,11 @@ void ORCBlockOutputFormat::writeColumn( writeStrings(orc_column, column, null_bytemap); break; } + case TypeIndex::IPv6: + { + writeStrings(orc_column, column, null_bytemap); + break; + } case TypeIndex::DateTime: { writeDateTimes( diff --git a/tests/queries/0_stateless/02566_ipv4_ipv6_binary_formats.reference b/tests/queries/0_stateless/02566_ipv4_ipv6_binary_formats.reference new file mode 100644 index 00000000000..e228d911715 --- /dev/null +++ b/tests/queries/0_stateless/02566_ipv4_ipv6_binary_formats.reference @@ -0,0 +1,18 @@ +CapnProto +2001:db8:11a3:9d7:1f34:8a2e:7a0:765d 127.0.0.1 +Avro +2001:db8:11a3:9d7:1f34:8a2e:7a0:765d 127.0.0.1 +Arrow +2001:db8:11a3:9d7:1f34:8a2e:7a0:765d 127.0.0.1 +Parquet +ipv6 Nullable(FixedString(16)) +ipv4 Nullable(Int64) +2001:db8:11a3:9d7:1f34:8a2e:7a0:765d 127.0.0.1 +ORC +ipv6 Nullable(String) +ipv4 Nullable(Int32) +2001:db8:11a3:9d7:1f34:8a2e:7a0:765d 127.0.0.1 +BSONEachRow +2001:db8:11a3:9d7:1f34:8a2e:7a0:765d 127.0.0.1 +MsgPack +2001:db8:11a3:9d7:1f34:8a2e:7a0:765d 127.0.0.1 diff --git a/tests/queries/0_stateless/02566_ipv4_ipv6_binary_formats.sh b/tests/queries/0_stateless/02566_ipv4_ipv6_binary_formats.sh new file mode 100755 index 00000000000..e84c06027e8 --- /dev/null +++ b/tests/queries/0_stateless/02566_ipv4_ipv6_binary_formats.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +# Tags: no-fasttest, no-parallel + +CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +# shellcheck source=../shell_config.sh +. "$CURDIR"/../shell_config.sh + +echo "CapnProto" +${CLICKHOUSE_LOCAL} -q "select '2001:db8:11a3:9d7:1f34:8a2e:7a0:765d'::IPv6 as ipv6, '127.0.0.1'::IPv4 as ipv4 format CapnProto settings format_schema='format_schemas/02566_ipv4_ipv6:Message'" > 02566_ipv4_ipv6_data.capnp +${CLICKHOUSE_LOCAL} -q "select * from file(02566_ipv4_ipv6_data.capnp, auto, 'ipv6 IPv6, ipv4 IPv4') settings format_schema='format_schemas/02566_ipv4_ipv6:Message'" +rm 02566_ipv4_ipv6_data.capnp + +echo "Avro" +${CLICKHOUSE_LOCAL} -q "select '2001:db8:11a3:9d7:1f34:8a2e:7a0:765d'::IPv6 as ipv6, '127.0.0.1'::IPv4 as ipv4 format Avro" > 02566_ipv4_ipv6_data.avro +${CLICKHOUSE_LOCAL} -q "select * from file(02566_ipv4_ipv6_data.avro, auto, 'ipv6 IPv6, ipv4 IPv4')" +rm 02566_ipv4_ipv6_data.avro + +echo "Arrow" +${CLICKHOUSE_LOCAL} -q "select '2001:db8:11a3:9d7:1f34:8a2e:7a0:765d'::IPv6 as ipv6, '127.0.0.1'::IPv4 as ipv4 format Arrow" > 02566_ipv4_ipv6_data.arrow +${CLICKHOUSE_LOCAL} -q "select * from file(02566_ipv4_ipv6_data.arrow, auto, 'ipv6 IPv6, ipv4 IPv4')" +rm 02566_ipv4_ipv6_data.arrow + +echo "Parquet" +${CLICKHOUSE_LOCAL} -q "select '2001:db8:11a3:9d7:1f34:8a2e:7a0:765d'::IPv6 as ipv6, '127.0.0.1'::IPv4 as ipv4 format Parquet" > 02566_ipv4_ipv6_data.parquet +${CLICKHOUSE_LOCAL} -q "desc file(02566_ipv4_ipv6_data.parquet)" +${CLICKHOUSE_LOCAL} -q "select ipv6, toIPv4(ipv4) from file(02566_ipv4_ipv6_data.parquet, auto, 'ipv6 IPv6, ipv4 UInt32')" +rm 02566_ipv4_ipv6_data.parquet + +echo "ORC" +${CLICKHOUSE_LOCAL} -q "select '2001:db8:11a3:9d7:1f34:8a2e:7a0:765d'::IPv6 as ipv6, '127.0.0.1'::IPv4 as ipv4 format ORC" > 02566_ipv4_ipv6_data.orc +${CLICKHOUSE_LOCAL} -q "desc file(02566_ipv4_ipv6_data.orc)" +${CLICKHOUSE_LOCAL} -q "select ipv6, toIPv4(ipv4) from file(02566_ipv4_ipv6_data.orc, auto, 'ipv6 IPv6, ipv4 UInt32')" +rm 02566_ipv4_ipv6_data.orc + +echo "BSONEachRow" +${CLICKHOUSE_LOCAL} -q "select '2001:db8:11a3:9d7:1f34:8a2e:7a0:765d'::IPv6 as ipv6, '127.0.0.1'::IPv4 as ipv4 format BSONEachRow" > 02566_ipv4_ipv6_data.bson +${CLICKHOUSE_LOCAL} -q "select * from file(02566_ipv4_ipv6_data.bson, auto, 'ipv6 IPv6, ipv4 IPv4')" +rm 02566_ipv4_ipv6_data.bson + +echo "MsgPack" +${CLICKHOUSE_LOCAL} -q "select '2001:db8:11a3:9d7:1f34:8a2e:7a0:765d'::IPv6 as ipv6, '127.0.0.1'::IPv4 as ipv4 format MsgPack" > 02566_ipv4_ipv6_data.msgpack +${CLICKHOUSE_LOCAL} -q "select * from file(02566_ipv4_ipv6_data.msgpack, auto, 'ipv6 IPv6, ipv4 IPv4')" +rm 02566_ipv4_ipv6_data.msgpack + + diff --git a/tests/queries/0_stateless/format_schemas/02566_ipv4_ipv6.capnp b/tests/queries/0_stateless/format_schemas/02566_ipv4_ipv6.capnp new file mode 100644 index 00000000000..f999043e2d2 --- /dev/null +++ b/tests/queries/0_stateless/format_schemas/02566_ipv4_ipv6.capnp @@ -0,0 +1,6 @@ +@0xb6ecde1cd54a101d; + +struct Message { + ipv4 @0 :UInt32; + ipv6 @1 :Data; +} From 42ae0582d393c7795187ddf786ef07bcf8ac5fc1 Mon Sep 17 00:00:00 2001 From: avogar Date: Mon, 20 Feb 2023 17:46:54 +0000 Subject: [PATCH 114/841] Try to use parquet v2 instead of v1 in output format --- src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp b/src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp index 0fce98f8a11..375d3878b10 100644 --- a/src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp +++ b/src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp @@ -44,6 +44,7 @@ void ParquetBlockOutputFormat::consume(Chunk chunk) auto sink = std::make_shared(out); parquet::WriterProperties::Builder builder; + builder.version(parquet::ParquetVersion::PARQUET_2_LATEST); #if USE_SNAPPY builder.compression(parquet::Compression::SNAPPY); #endif From e37f6b545775783bac0a21e8e951c01586ab1778 Mon Sep 17 00:00:00 2001 From: avogar Date: Mon, 20 Feb 2023 19:50:25 +0000 Subject: [PATCH 115/841] Update docs --- docs/en/interfaces/formats.md | 209 ++++++++++++++++++---------------- 1 file changed, 111 insertions(+), 98 deletions(-) diff --git a/docs/en/interfaces/formats.md b/docs/en/interfaces/formats.md index e94c6377ae9..f1935131491 100644 --- a/docs/en/interfaces/formats.md +++ b/docs/en/interfaces/formats.md @@ -1232,50 +1232,52 @@ Each row is formatted as a single document and each column is formatted as a sin For output it uses the following correspondence between ClickHouse types and BSON types: -| ClickHouse type | BSON Type | -|-----------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------| -| [Bool](/docs/en/sql-reference/data-types/boolean.md) | `\x08` boolean | -| [Int8/UInt8](/docs/en/sql-reference/data-types/int-uint.md) | `\x10` int32 | -| [Int16UInt16](/docs/en/sql-reference/data-types/int-uint.md) | `\x10` int32 | -| [Int32](/docs/en/sql-reference/data-types/int-uint.md) | `\x10` int32 | -| [UInt32](/docs/en/sql-reference/data-types/int-uint.md) | `\x12` int64 | -| [Int64/UInt64](/docs/en/sql-reference/data-types/int-uint.md) | `\x12` int64 | -| [Float32/Float64](/docs/en/sql-reference/data-types/float.md) | `\x01` double | -| [Date](/docs/en/sql-reference/data-types/date.md)/[Date32](/docs/en/sql-reference/data-types/date32.md) | `\x10` int32 | -| [DateTime](/docs/en/sql-reference/data-types/datetime.md) | `\x12` int64 | -| [DateTime64](/docs/en/sql-reference/data-types/datetime64.md) | `\x09` datetime | -| [Decimal32](/docs/en/sql-reference/data-types/decimal.md) | `\x10` int32 | -| [Decimal64](/docs/en/sql-reference/data-types/decimal.md) | `\x12` int64 | -| [Decimal128](/docs/en/sql-reference/data-types/decimal.md) | `\x05` binary, `\x00` binary subtype, size = 16 | -| [Decimal256](/docs/en/sql-reference/data-types/decimal.md) | `\x05` binary, `\x00` binary subtype, size = 32 | -| [Int128/UInt128](/docs/en/sql-reference/data-types/int-uint.md) | `\x05` binary, `\x00` binary subtype, size = 16 | -| [Int256/UInt256](/docs/en/sql-reference/data-types/int-uint.md) | `\x05` binary, `\x00` binary subtype, size = 32 | +| ClickHouse type | BSON Type | +|-----------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------| +| [Bool](/docs/en/sql-reference/data-types/boolean.md) | `\x08` boolean | +| [Int8/UInt8](/docs/en/sql-reference/data-types/int-uint.md) | `\x10` int32 | +| [Int16UInt16](/docs/en/sql-reference/data-types/int-uint.md) | `\x10` int32 | +| [Int32](/docs/en/sql-reference/data-types/int-uint.md) | `\x10` int32 | +| [UInt32](/docs/en/sql-reference/data-types/int-uint.md) | `\x12` int64 | +| [Int64/UInt64](/docs/en/sql-reference/data-types/int-uint.md) | `\x12` int64 | +| [Float32/Float64](/docs/en/sql-reference/data-types/float.md) | `\x01` double | +| [Date](/docs/en/sql-reference/data-types/date.md)/[Date32](/docs/en/sql-reference/data-types/date32.md) | `\x10` int32 | +| [DateTime](/docs/en/sql-reference/data-types/datetime.md) | `\x12` int64 | +| [DateTime64](/docs/en/sql-reference/data-types/datetime64.md) | `\x09` datetime | +| [Decimal32](/docs/en/sql-reference/data-types/decimal.md) | `\x10` int32 | +| [Decimal64](/docs/en/sql-reference/data-types/decimal.md) | `\x12` int64 | +| [Decimal128](/docs/en/sql-reference/data-types/decimal.md) | `\x05` binary, `\x00` binary subtype, size = 16 | +| [Decimal256](/docs/en/sql-reference/data-types/decimal.md) | `\x05` binary, `\x00` binary subtype, size = 32 | +| [Int128/UInt128](/docs/en/sql-reference/data-types/int-uint.md) | `\x05` binary, `\x00` binary subtype, size = 16 | +| [Int256/UInt256](/docs/en/sql-reference/data-types/int-uint.md) | `\x05` binary, `\x00` binary subtype, size = 32 | | [String](/docs/en/sql-reference/data-types/string.md)/[FixedString](/docs/en/sql-reference/data-types/fixedstring.md) | `\x05` binary, `\x00` binary subtype or \x02 string if setting output_format_bson_string_as_string is enabled | -| [UUID](/docs/en/sql-reference/data-types/uuid.md) | `\x05` binary, `\x04` uuid subtype, size = 16 | -| [Array](/docs/en/sql-reference/data-types/array.md) | `\x04` array | -| [Tuple](/docs/en/sql-reference/data-types/tuple.md) | `\x04` array | -| [Named Tuple](/docs/en/sql-reference/data-types/tuple.md) | `\x03` document | -| [Map](/docs/en/sql-reference/data-types/map.md) (with String keys) | `\x03` document | +| [UUID](/docs/en/sql-reference/data-types/uuid.md) | `\x05` binary, `\x04` uuid subtype, size = 16 | +| [Array](/docs/en/sql-reference/data-types/array.md) | `\x04` array | +| [Tuple](/docs/en/sql-reference/data-types/tuple.md) | `\x04` array | +| [Named Tuple](/docs/en/sql-reference/data-types/tuple.md) | `\x03` document | +| [Map](/docs/en/sql-reference/data-types/map.md) (with String keys) | `\x03` document | +| [IPv4](/docs/en/sql-reference/data-types/domains/ipv4.md) | `\x10` int32 | +| [IPv6](/docs/en/sql-reference/data-types/domains/ipv6.md) | `\x05` binary, `\x00` binary subtype | For input it uses the following correspondence between BSON types and ClickHouse types: -| BSON Type | ClickHouse Type | -|------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `\x01` double | [Float32/Float64](/docs/en/sql-reference/data-types/float.md) | -| `\x02` string | [String](/docs/en/sql-reference/data-types/string.md)/[FixedString](/docs/en/sql-reference/data-types/fixedstring.md) | -| `\x03` document | [Map](/docs/en/sql-reference/data-types/map.md)/[Named Tuple](/docs/en/sql-reference/data-types/tuple.md) | -| `\x04` array | [Array](/docs/en/sql-reference/data-types/array.md)/[Tuple](/docs/en/sql-reference/data-types/tuple.md) | -| `\x05` binary, `\x00` binary subtype | [String](/docs/en/sql-reference/data-types/string.md)/[FixedString](/docs/en/sql-reference/data-types/fixedstring.md) | -| `\x05` binary, `\x02` old binary subtype | [String](/docs/en/sql-reference/data-types/string.md)/[FixedString](/docs/en/sql-reference/data-types/fixedstring.md) | -| `\x05` binary, `\x03` old uuid subtype | [UUID](/docs/en/sql-reference/data-types/uuid.md) | -| `\x05` binary, `\x04` uuid subtype | [UUID](/docs/en/sql-reference/data-types/uuid.md) | -| `\x07` ObjectId | [String](/docs/en/sql-reference/data-types/string.md)/[FixedString](/docs/en/sql-reference/data-types/fixedstring.md) | -| `\x08` boolean | [Bool](/docs/en/sql-reference/data-types/boolean.md) | -| `\x09` datetime | [DateTime64](/docs/en/sql-reference/data-types/datetime64.md) | -| `\x0A` null value | [NULL](/docs/en/sql-reference/data-types/nullable.md) | -| `\x0D` JavaScript code | [String](/docs/en/sql-reference/data-types/string.md)/[FixedString](/docs/en/sql-reference/data-types/fixedstring.md) | -| `\x0E` symbol | [String](/docs/en/sql-reference/data-types/string.md)/[FixedString](/docs/en/sql-reference/data-types/fixedstring.md) | -| `\x10` int32 | [Int32/UInt32](/docs/en/sql-reference/data-types/int-uint.md)/[Decimal32](/docs/en/sql-reference/data-types/decimal.md) | +| BSON Type | ClickHouse Type | +|------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `\x01` double | [Float32/Float64](/docs/en/sql-reference/data-types/float.md) | +| `\x02` string | [String](/docs/en/sql-reference/data-types/string.md)/[FixedString](/docs/en/sql-reference/data-types/fixedstring.md) | +| `\x03` document | [Map](/docs/en/sql-reference/data-types/map.md)/[Named Tuple](/docs/en/sql-reference/data-types/tuple.md) | +| `\x04` array | [Array](/docs/en/sql-reference/data-types/array.md)/[Tuple](/docs/en/sql-reference/data-types/tuple.md) | +| `\x05` binary, `\x00` binary subtype | [String](/docs/en/sql-reference/data-types/string.md)/[FixedString](/docs/en/sql-reference/data-types/fixedstring.md)/[IPv6](/docs/en/sql-reference/data-types/domains/ipv6.md) | +| `\x05` binary, `\x02` old binary subtype | [String](/docs/en/sql-reference/data-types/string.md)/[FixedString](/docs/en/sql-reference/data-types/fixedstring.md) | +| `\x05` binary, `\x03` old uuid subtype | [UUID](/docs/en/sql-reference/data-types/uuid.md) | +| `\x05` binary, `\x04` uuid subtype | [UUID](/docs/en/sql-reference/data-types/uuid.md) | +| `\x07` ObjectId | [String](/docs/en/sql-reference/data-types/string.md)/[FixedString](/docs/en/sql-reference/data-types/fixedstring.md) | +| `\x08` boolean | [Bool](/docs/en/sql-reference/data-types/boolean.md) | +| `\x09` datetime | [DateTime64](/docs/en/sql-reference/data-types/datetime64.md) | +| `\x0A` null value | [NULL](/docs/en/sql-reference/data-types/nullable.md) | +| `\x0D` JavaScript code | [String](/docs/en/sql-reference/data-types/string.md)/[FixedString](/docs/en/sql-reference/data-types/fixedstring.md) | +| `\x0E` symbol | [String](/docs/en/sql-reference/data-types/string.md)/[FixedString](/docs/en/sql-reference/data-types/fixedstring.md) | +| `\x10` int32 | [Int32/UInt32](/docs/en/sql-reference/data-types/int-uint.md)/[Decimal32](/docs/en/sql-reference/data-types/decimal.md)/[IPv4](/docs/en/sql-reference/data-types/domains/ipv4.md) | | `\x12` int64 | [Int64/UInt64](/docs/en/sql-reference/data-types/int-uint.md)/[Decimal64](/docs/en/sql-reference/data-types/decimal.md)/[DateTime64](/docs/en/sql-reference/data-types/datetime64.md) | Other BSON types are not supported. Also, it performs conversion between different integer types (for example, you can insert BSON int32 value into ClickHouse UInt8). @@ -1608,23 +1610,25 @@ See also [Format Schema](#formatschema). The table below shows supported data types and how they match ClickHouse [data types](/docs/en/sql-reference/data-types/index.md) in `INSERT` and `SELECT` queries. -| CapnProto data type (`INSERT`) | ClickHouse data type | CapnProto data type (`SELECT`) | -|--------------------------------|-----------------------------------------------------------|--------------------------------| -| `UINT8`, `BOOL` | [UInt8](/docs/en/sql-reference/data-types/int-uint.md) | `UINT8` | -| `INT8` | [Int8](/docs/en/sql-reference/data-types/int-uint.md) | `INT8` | -| `UINT16` | [UInt16](/docs/en/sql-reference/data-types/int-uint.md), [Date](/docs/en/sql-reference/data-types/date.md) | `UINT16` | -| `INT16` | [Int16](/docs/en/sql-reference/data-types/int-uint.md) | `INT16` | -| `UINT32` | [UInt32](/docs/en/sql-reference/data-types/int-uint.md), [DateTime](/docs/en/sql-reference/data-types/datetime.md) | `UINT32` | -| `INT32` | [Int32](/docs/en/sql-reference/data-types/int-uint.md) | `INT32` | -| `UINT64` | [UInt64](/docs/en/sql-reference/data-types/int-uint.md) | `UINT64` | -| `INT64` | [Int64](/docs/en/sql-reference/data-types/int-uint.md), [DateTime64](/docs/en/sql-reference/data-types/datetime.md) | `INT64` | -| `FLOAT32` | [Float32](/docs/en/sql-reference/data-types/float.md) | `FLOAT32` | -| `FLOAT64` | [Float64](/docs/en/sql-reference/data-types/float.md) | `FLOAT64` | -| `TEXT, DATA` | [String](/docs/en/sql-reference/data-types/string.md), [FixedString](/docs/en/sql-reference/data-types/fixedstring.md) | `TEXT, DATA` | -| `union(T, Void), union(Void, T)` | [Nullable(T)](/docs/en/sql-reference/data-types/date.md) | `union(T, Void), union(Void, T)` | -| `ENUM` | [Enum(8\|16)](/docs/en/sql-reference/data-types/enum.md) | `ENUM` | -| `LIST` | [Array](/docs/en/sql-reference/data-types/array.md) | `LIST` | -| `STRUCT` | [Tuple](/docs/en/sql-reference/data-types/tuple.md) | `STRUCT` | +| CapnProto data type (`INSERT`) | ClickHouse data type | CapnProto data type (`SELECT`) | +|----------------------------------|------------------------------------------------------------------------------------------------------------------------|------------------------------| +| `UINT8`, `BOOL` | [UInt8](/docs/en/sql-reference/data-types/int-uint.md) | `UINT8` | +| `INT8` | [Int8](/docs/en/sql-reference/data-types/int-uint.md) | `INT8` | +| `UINT16` | [UInt16](/docs/en/sql-reference/data-types/int-uint.md), [Date](/docs/en/sql-reference/data-types/date.md) | `UINT16` | +| `INT16` | [Int16](/docs/en/sql-reference/data-types/int-uint.md) | `INT16` | +| `UINT32` | [UInt32](/docs/en/sql-reference/data-types/int-uint.md), [DateTime](/docs/en/sql-reference/data-types/datetime.md) | `UINT32` | +| `INT32` | [Int32](/docs/en/sql-reference/data-types/int-uint.md) | `INT32` | +| `UINT64` | [UInt64](/docs/en/sql-reference/data-types/int-uint.md) | `UINT64` | +| `INT64` | [Int64](/docs/en/sql-reference/data-types/int-uint.md), [DateTime64](/docs/en/sql-reference/data-types/datetime.md) | `INT64` | +| `FLOAT32` | [Float32](/docs/en/sql-reference/data-types/float.md) | `FLOAT32` | +| `FLOAT64` | [Float64](/docs/en/sql-reference/data-types/float.md) | `FLOAT64` | +| `TEXT, DATA` | [String](/docs/en/sql-reference/data-types/string.md), [FixedString](/docs/en/sql-reference/data-types/fixedstring.md) | `TEXT, DATA` | +| `union(T, Void), union(Void, T)` | [Nullable(T)](/docs/en/sql-reference/data-types/date.md) | `union(T, Void), union(Void, T)` | +| `ENUM` | [Enum(8\ |16)](/docs/en/sql-reference/data-types/enum.md) | `ENUM` | +| `LIST` | [Array](/docs/en/sql-reference/data-types/array.md) | `LIST` | +| `STRUCT` | [Tuple](/docs/en/sql-reference/data-types/tuple.md) | `STRUCT` | +| `UINT32` | [IPv4](/docs/en/sql-reference/data-types/domains/ipv4.md) | `UINT32` | +| `DATA` | [IPv6](/docs/en/sql-reference/data-types/domains/ipv6.md) | `DATA` | For working with `Enum` in CapnProto format use the [format_capn_proto_enum_comparising_mode](/docs/en/operations/settings/settings-formats.md/#format_capn_proto_enum_comparising_mode) setting. @@ -1804,21 +1808,23 @@ ClickHouse Avro format supports reading and writing [Avro data files](https://av The table below shows supported data types and how they match ClickHouse [data types](/docs/en/sql-reference/data-types/index.md) in `INSERT` and `SELECT` queries. -| Avro data type `INSERT` | ClickHouse data type | Avro data type `SELECT` | -|---------------------------------------------|----------------------------------------------------------------------------------------------------|------------------------------| -| `boolean`, `int`, `long`, `float`, `double` | [Int(8\|16\|32)](/docs/en/sql-reference/data-types/int-uint.md), [UInt(8\|16\|32)](/docs/en/sql-reference/data-types/int-uint.md) | `int` | -| `boolean`, `int`, `long`, `float`, `double` | [Int64](/docs/en/sql-reference/data-types/int-uint.md), [UInt64](/docs/en/sql-reference/data-types/int-uint.md) | `long` | -| `boolean`, `int`, `long`, `float`, `double` | [Float32](/docs/en/sql-reference/data-types/float.md) | `float` | -| `boolean`, `int`, `long`, `float`, `double` | [Float64](/docs/en/sql-reference/data-types/float.md) | `double` | -| `bytes`, `string`, `fixed`, `enum` | [String](/docs/en/sql-reference/data-types/string.md) | `bytes` or `string` \* | -| `bytes`, `string`, `fixed` | [FixedString(N)](/docs/en/sql-reference/data-types/fixedstring.md) | `fixed(N)` | -| `enum` | [Enum(8\|16)](/docs/en/sql-reference/data-types/enum.md) | `enum` | -| `array(T)` | [Array(T)](/docs/en/sql-reference/data-types/array.md) | `array(T)` | -| `union(null, T)`, `union(T, null)` | [Nullable(T)](/docs/en/sql-reference/data-types/date.md) | `union(null, T)` | -| `null` | [Nullable(Nothing)](/docs/en/sql-reference/data-types/special-data-types/nothing.md) | `null` | -| `int (date)` \** | [Date](/docs/en/sql-reference/data-types/date.md) | `int (date)` \** | -| `long (timestamp-millis)` \** | [DateTime64(3)](/docs/en/sql-reference/data-types/datetime.md) | `long (timestamp-millis)` \* | -| `long (timestamp-micros)` \** | [DateTime64(6)](/docs/en/sql-reference/data-types/datetime.md) | `long (timestamp-micros)` \* | +| Avro data type `INSERT` | ClickHouse data type | Avro data type `SELECT` | +|---------------------------------------------|-----------------------------------------------------------------------------------------------------------------|-------------------------------------------------| +| `boolean`, `int`, `long`, `float`, `double` | [Int(8\ | 16\ |32)](/docs/en/sql-reference/data-types/int-uint.md), [UInt(8\|16\|32)](/docs/en/sql-reference/data-types/int-uint.md) | `int` | +| `boolean`, `int`, `long`, `float`, `double` | [Int64](/docs/en/sql-reference/data-types/int-uint.md), [UInt64](/docs/en/sql-reference/data-types/int-uint.md) | `long` | +| `boolean`, `int`, `long`, `float`, `double` | [Float32](/docs/en/sql-reference/data-types/float.md) | `float` | +| `boolean`, `int`, `long`, `float`, `double` | [Float64](/docs/en/sql-reference/data-types/float.md) | `double` | +| `bytes`, `string`, `fixed`, `enum` | [String](/docs/en/sql-reference/data-types/string.md) | `bytes` or `string` \* | +| `bytes`, `string`, `fixed` | [FixedString(N)](/docs/en/sql-reference/data-types/fixedstring.md) | `fixed(N)` | +| `enum` | [Enum(8\ | 16)](/docs/en/sql-reference/data-types/enum.md) | `enum` | +| `array(T)` | [Array(T)](/docs/en/sql-reference/data-types/array.md) | `array(T)` | +| `union(null, T)`, `union(T, null)` | [Nullable(T)](/docs/en/sql-reference/data-types/date.md) | `union(null, T)` | +| `null` | [Nullable(Nothing)](/docs/en/sql-reference/data-types/special-data-types/nothing.md) | `null` | +| `int (date)` \** | [Date](/docs/en/sql-reference/data-types/date.md) | `int (date)` \** | +| `long (timestamp-millis)` \** | [DateTime64(3)](/docs/en/sql-reference/data-types/datetime.md) | `long (timestamp-millis)` \* | +| `long (timestamp-micros)` \** | [DateTime64(6)](/docs/en/sql-reference/data-types/datetime.md) | `long (timestamp-micros)` \* | +| `int` | [IPv4](/docs/en/sql-reference/data-types/domains/ipv4.md) | `int` | +| `fixed(16)` | [IPv6](/docs/en/sql-reference/data-types/domains/ipv6.md) | `fixed(16)` | \* `bytes` is default, controlled by [output_format_avro_string_column_pattern](/docs/en/operations/settings/settings-formats.md/#output_format_avro_string_column_pattern) \** [Avro logical types](https://avro.apache.org/docs/current/spec.html#Logical+Types) @@ -1918,28 +1924,30 @@ Setting `format_avro_schema_registry_url` needs to be configured in `users.xml` The table below shows supported data types and how they match ClickHouse [data types](/docs/en/sql-reference/data-types/index.md) in `INSERT` and `SELECT` queries. -| Parquet data type (`INSERT`) | ClickHouse data type | Parquet data type (`SELECT`) | -|-----------------------------------------------|-----------------------------------------------------------------|------------------------------| -| `BOOL` | [Bool](/docs/en/sql-reference/data-types/boolean.md) | `BOOL` | -| `UINT8`, `BOOL` | [UInt8](/docs/en/sql-reference/data-types/int-uint.md) | `UINT8` | -| `INT8` | [Int8](/docs/en/sql-reference/data-types/int-uint.md) | `INT8` | -| `UINT16` | [UInt16](/docs/en/sql-reference/data-types/int-uint.md) | `UINT16` | -| `INT16` | [Int16](/docs/en/sql-reference/data-types/int-uint.md) | `INT16` | -| `UINT32` | [UInt32](/docs/en/sql-reference/data-types/int-uint.md) | `UINT32` | -| `INT32` | [Int32](/docs/en/sql-reference/data-types/int-uint.md) | `INT32` | -| `UINT64` | [UInt64](/docs/en/sql-reference/data-types/int-uint.md) | `UINT64` | -| `INT64` | [Int64](/docs/en/sql-reference/data-types/int-uint.md) | `INT64` | -| `FLOAT` | [Float32](/docs/en/sql-reference/data-types/float.md) | `FLOAT` | -| `DOUBLE` | [Float64](/docs/en/sql-reference/data-types/float.md) | `DOUBLE` | -| `DATE` | [Date32](/docs/en/sql-reference/data-types/date.md) | `DATE` | -| `TIME (ms)` | [DateTime](/docs/en/sql-reference/data-types/datetime.md) | `UINT32` | -| `TIMESTAMP`, `TIME (us, ns)` | [DateTime64](/docs/en/sql-reference/data-types/datetime64.md) | `TIMESTAMP` | -| `STRING`, `BINARY` | [String](/docs/en/sql-reference/data-types/string.md) | `BINARY` | -| `STRING`, `BINARY`, `FIXED_LENGTH_BYTE_ARRAY` | [FixedString](/docs/en/sql-reference/data-types/fixedstring.md) | `FIXED_LENGTH_BYTE_ARRAY` | -| `DECIMAL` | [Decimal](/docs/en/sql-reference/data-types/decimal.md) | `DECIMAL` | -| `LIST` | [Array](/docs/en/sql-reference/data-types/array.md) | `LIST` | -| `STRUCT` | [Tuple](/docs/en/sql-reference/data-types/tuple.md) | `STRUCT` | -| `MAP` | [Map](/docs/en/sql-reference/data-types/map.md) | `MAP` | +| Parquet data type (`INSERT`) | ClickHouse data type | Parquet data type (`SELECT`) | +|----------------------------------------------------|-----------------------------------------------------------------|------------------------------| +| `BOOL` | [Bool](/docs/en/sql-reference/data-types/boolean.md) | `BOOL` | +| `UINT8`, `BOOL` | [UInt8](/docs/en/sql-reference/data-types/int-uint.md) | `UINT8` | +| `INT8` | [Int8](/docs/en/sql-reference/data-types/int-uint.md) | `INT8` | +| `UINT16` | [UInt16](/docs/en/sql-reference/data-types/int-uint.md) | `UINT16` | +| `INT16` | [Int16](/docs/en/sql-reference/data-types/int-uint.md) | `INT16` | +| `UINT32` | [UInt32](/docs/en/sql-reference/data-types/int-uint.md) | `UINT32` | +| `INT32` | [Int32](/docs/en/sql-reference/data-types/int-uint.md) | `INT32` | +| `UINT64` | [UInt64](/docs/en/sql-reference/data-types/int-uint.md) | `UINT64` | +| `INT64` | [Int64](/docs/en/sql-reference/data-types/int-uint.md) | `INT64` | +| `FLOAT` | [Float32](/docs/en/sql-reference/data-types/float.md) | `FLOAT` | +| `DOUBLE` | [Float64](/docs/en/sql-reference/data-types/float.md) | `DOUBLE` | +| `DATE` | [Date32](/docs/en/sql-reference/data-types/date.md) | `DATE` | +| `TIME (ms)` | [DateTime](/docs/en/sql-reference/data-types/datetime.md) | `UINT32` | +| `TIMESTAMP`, `TIME (us, ns)` | [DateTime64](/docs/en/sql-reference/data-types/datetime64.md) | `TIMESTAMP` | +| `STRING`, `BINARY` | [String](/docs/en/sql-reference/data-types/string.md) | `BINARY` | +| `STRING`, `BINARY`, `FIXED_LENGTH_BYTE_ARRAY` | [FixedString](/docs/en/sql-reference/data-types/fixedstring.md) | `FIXED_LENGTH_BYTE_ARRAY` | +| `DECIMAL` | [Decimal](/docs/en/sql-reference/data-types/decimal.md) | `DECIMAL` | +| `LIST` | [Array](/docs/en/sql-reference/data-types/array.md) | `LIST` | +| `STRUCT` | [Tuple](/docs/en/sql-reference/data-types/tuple.md) | `STRUCT` | +| `MAP` | [Map](/docs/en/sql-reference/data-types/map.md) | `MAP` | +| `UINT32` | [IPv4](/docs/en/sql-reference/data-types/domains/ipv4.md) | `UINT32` | +| `FIXED_LENGTH_BYTE_ARRAY` | [IPv6](/docs/en/sql-reference/data-types/domains/ipv6.md) | `FIXED_LENGTH_BYTE_ARRAY` | Arrays can be nested and can have a value of the `Nullable` type as an argument. `Tuple` and `Map` types also can be nested. @@ -2006,6 +2014,8 @@ The table below shows supported data types and how they match ClickHouse [data t | `LIST` | [Array](/docs/en/sql-reference/data-types/array.md) | `LIST` | | `STRUCT` | [Tuple](/docs/en/sql-reference/data-types/tuple.md) | `STRUCT` | | `MAP` | [Map](/docs/en/sql-reference/data-types/map.md) | `MAP` | +| `UINT32` | [IPv4](/docs/en/sql-reference/data-types/domains/ipv4.md) | `UINT32` | +| `FIXED_SIZE_BINARY`, `BINARY` | [IPv6](/docs/en/sql-reference/data-types/domains/ipv6.md) | `FIXED_SIZE_BINARY` | Arrays can be nested and can have a value of the `Nullable` type as an argument. `Tuple` and `Map` types also can be nested. @@ -2053,8 +2063,8 @@ $ clickhouse-client --query="SELECT * FROM {some_table} FORMAT Arrow" > {filenam The table below shows supported data types and how they match ClickHouse [data types](/docs/en/sql-reference/data-types/index.md) in `INSERT` and `SELECT` queries. -| ORC data type (`INSERT`) | ClickHouse data type | ORC data type (`SELECT`) | -|---------------------------------------|---------------------------------------------------------|--------------------------| +| ORC data type (`INSERT`) | ClickHouse data type | ORC data type (`SELECT`) | +|---------------------------------------|---------------------------------------------------------------|--------------------------| | `Boolean` | [UInt8](/docs/en/sql-reference/data-types/int-uint.md) | `Boolean` | | `Tinyint` | [Int8](/docs/en/sql-reference/data-types/int-uint.md) | `Tinyint` | | `Smallint` | [Int16](/docs/en/sql-reference/data-types/int-uint.md) | `Smallint` | @@ -2069,6 +2079,7 @@ The table below shows supported data types and how they match ClickHouse [data t | `List` | [Array](/docs/en/sql-reference/data-types/array.md) | `List` | | `Struct` | [Tuple](/docs/en/sql-reference/data-types/tuple.md) | `Struct` | | `Map` | [Map](/docs/en/sql-reference/data-types/map.md) | `Map` | +| `-` | [IPv4](/docs/en/sql-reference/data-types/int-uint.md) | `Int` | Other types are not supported. @@ -2263,8 +2274,8 @@ ClickHouse supports reading and writing [MessagePack](https://msgpack.org/) data ### Data Types Matching {#data-types-matching-msgpack} -| MessagePack data type (`INSERT`) | ClickHouse data type | MessagePack data type (`SELECT`) | -|--------------------------------------------------------------------|-----------------------------------------------------------|------------------------------------| +| MessagePack data type (`INSERT`) | ClickHouse data type | MessagePack data type (`SELECT`) | +|--------------------------------------------------------------------|-----------------------------------------------------------------|------------------------------------| | `uint N`, `positive fixint` | [UIntN](/docs/en/sql-reference/data-types/int-uint.md) | `uint N` | | `int N`, `negative fixint` | [IntN](/docs/en/sql-reference/data-types/int-uint.md) | `int N` | | `bool` | [UInt8](/docs/en/sql-reference/data-types/int-uint.md) | `uint 8` | @@ -2277,6 +2288,8 @@ ClickHouse supports reading and writing [MessagePack](https://msgpack.org/) data | `uint 64` | [DateTime64](/docs/en/sql-reference/data-types/datetime.md) | `uint 64` | | `fixarray`, `array 16`, `array 32` | [Array](/docs/en/sql-reference/data-types/array.md) | `fixarray`, `array 16`, `array 32` | | `fixmap`, `map 16`, `map 32` | [Map](/docs/en/sql-reference/data-types/map.md) | `fixmap`, `map 16`, `map 32` | +| `uint 32` | [IPv4](/docs/en/sql-reference/data-types/domains/ipv4.md) | `uint 32` | +| `bin 8` | [String](/docs/en/sql-reference/data-types/string.md) | `bin 8` | Example: From ce2b04453245780406994bf9c0e25821878a7279 Mon Sep 17 00:00:00 2001 From: Yakov Olkhovskiy Date: Tue, 21 Feb 2023 03:29:14 +0000 Subject: [PATCH 116/841] analyzer - apply limit and offset settings --- src/Analyzer/QueryTreeBuilder.cpp | 11 ++++ src/Planner/Planner.cpp | 17 +++--- src/Storages/StorageView.cpp | 2 + .../02667_analyzer_limit_settings.reference | 54 +++++++++++++++++++ .../02667_analyzer_limit_settings.sql | 24 +++++++++ 5 files changed, 102 insertions(+), 6 deletions(-) create mode 100644 tests/queries/0_stateless/02667_analyzer_limit_settings.reference create mode 100644 tests/queries/0_stateless/02667_analyzer_limit_settings.sql diff --git a/src/Analyzer/QueryTreeBuilder.cpp b/src/Analyzer/QueryTreeBuilder.cpp index 05b643aa6af..57b1ae1c994 100644 --- a/src/Analyzer/QueryTreeBuilder.cpp +++ b/src/Analyzer/QueryTreeBuilder.cpp @@ -233,6 +233,17 @@ QueryTreeNodePtr QueryTreeBuilder::buildSelectExpression(const ASTPtr & select_q auto select_settings = select_query_typed.settings(); SettingsChanges settings_changes; + if (is_subquery) + { + if (const Settings & settings_ref = updated_context->getSettingsRef(); settings_ref.limit || settings_ref.offset) + { + Settings settings = updated_context->getSettings(); + settings.limit = 0; + settings.offset = 0; + updated_context->setSettings(settings); + } + } + if (select_settings) { auto & set_query = select_settings->as(); diff --git a/src/Planner/Planner.cpp b/src/Planner/Planner.cpp index f0fe44e368f..7c2a3ffed78 100644 --- a/src/Planner/Planner.cpp +++ b/src/Planner/Planner.cpp @@ -216,12 +216,17 @@ public: limit_length = query_node.getLimit()->as().getValue().safeGet(); } + if (settings.limit) + limit_length = limit_length ? std::min(limit_length, settings.limit.value) : settings.limit; + if (query_node.hasOffset()) { /// Constness of offset is validated during query analysis stage limit_offset = query_node.getOffset()->as().getValue().safeGet(); } + limit_offset += settings.offset; + /// Partial sort can be done if there is LIMIT, but no DISTINCT, LIMIT WITH TIES, LIMIT BY, ARRAY JOIN if (limit_length != 0 && !query_node.isDistinct() && @@ -720,7 +725,7 @@ bool addPreliminaryLimitOptimizationStepIfNeeded(QueryPlan & query_plan, bool apply_limit = query_processing_info.getToStage() != QueryProcessingStage::WithMergeableStateAfterAggregation; bool apply_prelimit = apply_limit && - query_node.hasLimit() && + query_analysis_result.limit_length && !query_node.isLimitWithTies() && !query_node.isGroupByWithTotals() && !query_analysis_result.query_has_with_totals_in_any_subquery_in_join_tree && @@ -767,7 +772,7 @@ void addPreliminarySortOrDistinctOrLimitStepsIfNeeded(QueryPlan & query_plan, * Otherwise we can take several equal values from different streams * according to limit and skip some distinct values. */ - if (query_node.hasLimit() && query_node.isDistinct()) + if (query_analysis_result.limit_length && query_node.isDistinct()) { addDistinctStep(query_plan, query_analysis_result, @@ -785,7 +790,7 @@ void addPreliminarySortOrDistinctOrLimitStepsIfNeeded(QueryPlan & query_plan, addLimitByStep(query_plan, limit_by_analysis_result, query_node); } - if (query_node.hasLimit()) + if (query_analysis_result.limit_length) addPreliminaryLimitStep(query_plan, query_analysis_result, planner_context, true /*do_not_skip_offset*/); } @@ -1420,7 +1425,7 @@ void Planner::buildPlanForQueryNode() bool apply_offset = query_processing_info.getToStage() != QueryProcessingStage::WithMergeableStateAfterAggregationAndLimit; - if (query_node.hasLimit() && query_node.isLimitWithTies() && apply_offset) + if (query_analysis_result.limit_length && query_node.isLimitWithTies() && apply_offset) addLimitStep(query_plan, query_analysis_result, planner_context, query_node); addExtremesStepIfNeeded(query_plan, planner_context); @@ -1434,9 +1439,9 @@ void Planner::buildPlanForQueryNode() * This is the case for various optimizations for distributed queries, * and when LIMIT cannot be applied it will be applied on the initiator anyway. */ - if (query_node.hasLimit() && apply_limit && !limit_applied && apply_offset) + if (query_analysis_result.limit_length && apply_limit && !limit_applied && apply_offset) addLimitStep(query_plan, query_analysis_result, planner_context, query_node); - else if (!limit_applied && apply_offset && query_node.hasOffset()) + else if (!limit_applied && apply_offset && query_analysis_result.limit_length) addOffsetStep(query_plan, query_analysis_result); /// Project names is not done on shards, because initiator will not find columns in blocks diff --git a/src/Storages/StorageView.cpp b/src/Storages/StorageView.cpp index 1a7050b4dff..d3a2ec470cf 100644 --- a/src/Storages/StorageView.cpp +++ b/src/Storages/StorageView.cpp @@ -95,6 +95,8 @@ ContextPtr getViewContext(ContextPtr context) view_settings.max_result_rows = 0; view_settings.max_result_bytes = 0; view_settings.extremes = false; + view_settings.limit = 0; + view_settings.offset = 0; view_context->setSettings(view_settings); return view_context; } diff --git a/tests/queries/0_stateless/02667_analyzer_limit_settings.reference b/tests/queries/0_stateless/02667_analyzer_limit_settings.reference new file mode 100644 index 00000000000..9e38ed9a59b --- /dev/null +++ b/tests/queries/0_stateless/02667_analyzer_limit_settings.reference @@ -0,0 +1,54 @@ +-- { echoOn } +SET limit = 0; +SELECT * FROM numbers(10); +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +SELECT * FROM numbers(10) SETTINGS limit=5, offset=2; +2 +3 +4 +5 +6 +SELECT count(*) FROM (SELECT * FROM numbers(10)); +10 +SELECT count(*) FROM (SELECT * FROM numbers(10) SETTINGS limit=5); +5 +SELECT count(*) FROM (SELECT * FROM numbers(10)) SETTINGS limit=5; +10 +SELECT count(*) FROM view(SELECT * FROM numbers(10)); +10 +SELECT count(*) FROM view(SELECT * FROM numbers(10) SETTINGS limit=5); +5 +SELECT count(*) FROM view(SELECT * FROM numbers(10)) SETTINGS limit=5; +10 +SET limit = 3; +SELECT * FROM numbers(10); +0 +1 +2 +SELECT * FROM numbers(10) SETTINGS limit=5, offset=2; +2 +3 +4 +5 +6 +SELECT count(*) FROM (SELECT * FROM numbers(10)); +10 +SELECT count(*) FROM (SELECT * FROM numbers(10) SETTINGS limit=5); +5 +SELECT count(*) FROM (SELECT * FROM numbers(10)) SETTINGS limit=5; +10 +SELECT count(*) FROM view(SELECT * FROM numbers(10)); +10 +SELECT count(*) FROM view(SELECT * FROM numbers(10) SETTINGS limit=5); +5 +SELECT count(*) FROM view(SELECT * FROM numbers(10)) SETTINGS limit=5; +10 diff --git a/tests/queries/0_stateless/02667_analyzer_limit_settings.sql b/tests/queries/0_stateless/02667_analyzer_limit_settings.sql new file mode 100644 index 00000000000..35dd65ab33e --- /dev/null +++ b/tests/queries/0_stateless/02667_analyzer_limit_settings.sql @@ -0,0 +1,24 @@ +SET allow_experimental_analyzer = 1; + +-- { echoOn } +SET limit = 0; + +SELECT * FROM numbers(10); +SELECT * FROM numbers(10) SETTINGS limit=5, offset=2; +SELECT count(*) FROM (SELECT * FROM numbers(10)); +SELECT count(*) FROM (SELECT * FROM numbers(10) SETTINGS limit=5); +SELECT count(*) FROM (SELECT * FROM numbers(10)) SETTINGS limit=5; +SELECT count(*) FROM view(SELECT * FROM numbers(10)); +SELECT count(*) FROM view(SELECT * FROM numbers(10) SETTINGS limit=5); +SELECT count(*) FROM view(SELECT * FROM numbers(10)) SETTINGS limit=5; + +SET limit = 3; +SELECT * FROM numbers(10); +SELECT * FROM numbers(10) SETTINGS limit=5, offset=2; +SELECT count(*) FROM (SELECT * FROM numbers(10)); +SELECT count(*) FROM (SELECT * FROM numbers(10) SETTINGS limit=5); +SELECT count(*) FROM (SELECT * FROM numbers(10)) SETTINGS limit=5; +SELECT count(*) FROM view(SELECT * FROM numbers(10)); +SELECT count(*) FROM view(SELECT * FROM numbers(10) SETTINGS limit=5); +SELECT count(*) FROM view(SELECT * FROM numbers(10)) SETTINGS limit=5; +-- { echoOff } From bf020298100a51ed57f10b0d1f9e2eceedd802bb Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Tue, 21 Feb 2023 12:19:58 +0000 Subject: [PATCH 117/841] Add pass for transforming or equality chain to single IN --- .../Passes/OrEqualityChainToInPass.cpp | 117 ++++++++++++++++++ src/Analyzer/Passes/OrEqualityChainToInPass.h | 18 +++ src/Analyzer/QueryTreePassManager.cpp | 4 +- 3 files changed, 138 insertions(+), 1 deletion(-) create mode 100644 src/Analyzer/Passes/OrEqualityChainToInPass.cpp create mode 100644 src/Analyzer/Passes/OrEqualityChainToInPass.h diff --git a/src/Analyzer/Passes/OrEqualityChainToInPass.cpp b/src/Analyzer/Passes/OrEqualityChainToInPass.cpp new file mode 100644 index 00000000000..212e8252ce4 --- /dev/null +++ b/src/Analyzer/Passes/OrEqualityChainToInPass.cpp @@ -0,0 +1,117 @@ +#include + +#include + +#include +#include +#include +#include + +namespace DB +{ + +class OrEqualityChainToInVisitor : public InDepthQueryTreeVisitorWithContext +{ +public: + using Base = InDepthQueryTreeVisitorWithContext; + + explicit OrEqualityChainToInVisitor(ContextPtr context) + : Base(std::move(context)) + {} + + + void visitImpl(QueryTreeNodePtr & node) + { + auto * function_node = node->as(); + + if (!function_node || function_node->getFunctionName() != "or") + return; + + QueryTreeNodes or_operands; + + QueryTreeNodePtrWithHashMap node_to_equals_functions; + + for (const auto & argument : function_node->getArguments()) + { + auto * argument_function = argument->as(); + if (!argument_function) + { + or_operands.push_back(argument); + continue; + } + + /// collect all equality checks (x = value) + if (argument_function->getFunctionName() != "equals") + { + or_operands.push_back(argument); + continue; + } + + const auto & equals_arguments = argument_function->getArguments().getNodes(); + const auto & lhs = equals_arguments[0]; + + const auto * rhs_literal = equals_arguments[1]->as(); + if (!rhs_literal) + { + or_operands.push_back(argument); + continue; + } + + node_to_equals_functions[lhs].push_back(argument); + } + + auto in_function_resolver = FunctionFactory::instance().get("in", getContext()); + + for (auto & [lhs, equals_functions] : node_to_equals_functions) + { + const auto & settings = getSettings(); + if (equals_functions.size() < settings.optimize_min_equality_disjunction_chain_length && !lhs.node->getResultType()->lowCardinality()) + { + std::move(equals_functions.begin(), equals_functions.end(), std::back_inserter(or_operands)); + continue; + } + + Tuple args; + args.reserve(equals_functions.size()); + /// first we create tuple from RHS of equals functions + for (const auto & equals : equals_functions) + { + const auto * equals_function = equals->as(); + assert(equals_function && equals_function->getFunctionName() == "equals"); + const auto * rhs_literal = equals_function->getArguments().getNodes()[1]->as(); + assert(rhs_literal); + args.push_back(rhs_literal->getValue()); + } + + auto rhs_node = std::make_shared(std::move(args)); + + auto in_function = std::make_shared("in"); + + QueryTreeNodes in_arguments; + in_arguments.reserve(2); + in_arguments.push_back(lhs.node); + in_arguments.push_back(std::move(rhs_node)); + + in_function->getArguments().getNodes() = std::move(in_arguments); + in_function->resolveAsFunction(in_function_resolver); + + or_operands.push_back(std::move(in_function)); + } + + if (or_operands.size() == 1) + or_operands.push_back(std::make_shared(static_cast(0))); + + auto or_function_resolver = FunctionFactory::instance().get("or", getContext()); + function_node->getArguments().getNodes() = std::move(or_operands); + function_node->resolveAsFunction(or_function_resolver); + } +}; + + +void OrEqualityChainToInPass::run(QueryTreeNodePtr query_tree_node, ContextPtr context) +{ + OrEqualityChainToInVisitor visitor(std::move(context)); + visitor.visit(query_tree_node); +} + +} diff --git a/src/Analyzer/Passes/OrEqualityChainToInPass.h b/src/Analyzer/Passes/OrEqualityChainToInPass.h new file mode 100644 index 00000000000..86c9c9efd57 --- /dev/null +++ b/src/Analyzer/Passes/OrEqualityChainToInPass.h @@ -0,0 +1,18 @@ +#pragma once + +#include + +namespace DB +{ + +class OrEqualityChainToInPass final : public IQueryTreePass +{ +public: + String getName() override { return "OrEqualityChainToIn"; } + + String getDescription() override { return "Transform all the 'or's with equality check to a single IN function"; } + + void run(QueryTreeNodePtr query_tree_node, ContextPtr context) override; +}; + +} diff --git a/src/Analyzer/QueryTreePassManager.cpp b/src/Analyzer/QueryTreePassManager.cpp index 588457f90f7..e4bc919e051 100644 --- a/src/Analyzer/QueryTreePassManager.cpp +++ b/src/Analyzer/QueryTreePassManager.cpp @@ -38,6 +38,7 @@ #include #include #include +#include namespace DB { @@ -145,7 +146,6 @@ private: /** ClickHouse query tree pass manager. * * TODO: Support _shard_num into shardNum() rewriting. - * TODO: Support logical expressions optimizer. * TODO: Support setting convert_query_to_cnf. * TODO: Support setting optimize_using_constraints. * TODO: Support setting optimize_substitute_columns. @@ -262,6 +262,8 @@ void addQueryTreePasses(QueryTreePassManager & manager) manager.addPass(std::make_unique()); + manager.addPass(std::make_unique()); + manager.addPass(std::make_unique()); } From bdad6a480ed157e0727d449de413a7dac2590dab Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Tue, 21 Feb 2023 12:56:09 +0000 Subject: [PATCH 118/841] Add tests --- src/Analyzer/Passes/OrEqualityChainToInPass.h | 20 + ...00621_regression_for_in_operator.reference | 44 ++ .../00621_regression_for_in_operator.sql | 4 + .../00736_disjunction_optimisation.reference | 426 ++++++++++++++++-- .../00736_disjunction_optimisation.sql | 24 + ...ssions_optimizer_low_cardinality.reference | 42 ++ ..._expressions_optimizer_low_cardinality.sql | 2 + 7 files changed, 526 insertions(+), 36 deletions(-) diff --git a/src/Analyzer/Passes/OrEqualityChainToInPass.h b/src/Analyzer/Passes/OrEqualityChainToInPass.h index 86c9c9efd57..2a9d6818a4f 100644 --- a/src/Analyzer/Passes/OrEqualityChainToInPass.h +++ b/src/Analyzer/Passes/OrEqualityChainToInPass.h @@ -5,6 +5,26 @@ namespace DB { +/** + * This pass replaces chains of equality functions inside an OR with a single IN operator. + * The replacement is done if: + * - rhs of the equality function is a literal + * - length of chain is at least 'optimize_min_equality_disjunction_chain_length' long OR lhs is LowCardinality + * + * E.g. (optimize_min_equality_disjunction_chain_length = 2) + * ------------------------------- + * SELECT * + * FROM table + * WHERE a = 1 OR b = 'test' OR a = 2; + * + * will be transformed into + * + * SELECT * + * FROM TABLE + * WHERE b = 'test' OR a IN (1, 2); + * ------------------------------- + */ + class OrEqualityChainToInPass final : public IQueryTreePass { public: diff --git a/tests/queries/0_stateless/00621_regression_for_in_operator.reference b/tests/queries/0_stateless/00621_regression_for_in_operator.reference index 90f0a70449a..c9eb7a08fc6 100644 --- a/tests/queries/0_stateless/00621_regression_for_in_operator.reference +++ b/tests/queries/0_stateless/00621_regression_for_in_operator.reference @@ -3,3 +3,47 @@ 2 2 2 +QUERY id: 0 + PROJECTION COLUMNS + count() UInt64 + PROJECTION + LIST id: 1, nodes: 1 + FUNCTION id: 2, function_name: count, function_type: aggregate, result_type: UInt64 + JOIN TREE + TABLE id: 3, table_name: default.regression_for_in_operator_view + WHERE + FUNCTION id: 4, function_name: or, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 5, nodes: 2 + FUNCTION id: 6, function_name: in, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 7, nodes: 2 + COLUMN id: 8, column_name: g, result_type: String, source_id: 3 + CONSTANT id: 9, constant_value: Tuple_(\'5\', \'6\'), constant_value_type: Tuple(String, String) + CONSTANT id: 10, constant_value: UInt64_0, constant_value_type: UInt8 + SETTINGS allow_experimental_analyzer=1 +2 +2 +QUERY id: 0 + PROJECTION COLUMNS + count() UInt64 + PROJECTION + LIST id: 1, nodes: 1 + FUNCTION id: 2, function_name: count, function_type: aggregate, result_type: UInt64 + JOIN TREE + TABLE id: 3, table_name: default.regression_for_in_operator_view + WHERE + FUNCTION id: 4, function_name: or, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 5, nodes: 2 + FUNCTION id: 6, function_name: equals, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 7, nodes: 2 + COLUMN id: 8, column_name: g, result_type: String, source_id: 3 + CONSTANT id: 9, constant_value: \'5\', constant_value_type: String + FUNCTION id: 10, function_name: equals, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 11, nodes: 2 + COLUMN id: 8, column_name: g, result_type: String, source_id: 3 + CONSTANT id: 12, constant_value: \'6\', constant_value_type: String + SETTINGS allow_experimental_analyzer=1 diff --git a/tests/queries/0_stateless/00621_regression_for_in_operator.sql b/tests/queries/0_stateless/00621_regression_for_in_operator.sql index 273f930a90f..db1bcb4a39a 100644 --- a/tests/queries/0_stateless/00621_regression_for_in_operator.sql +++ b/tests/queries/0_stateless/00621_regression_for_in_operator.sql @@ -12,9 +12,13 @@ SELECT count() FROM regression_for_in_operator_view WHERE g IN ('5','6'); SET optimize_min_equality_disjunction_chain_length = 1; SELECT count() FROM regression_for_in_operator_view WHERE g = '5' OR g = '6'; +SELECT count() FROM regression_for_in_operator_view WHERE g = '5' OR g = '6' SETTINGS allow_experimental_analyzer = 1; +EXPLAIN QUERY TREE SELECT count() FROM regression_for_in_operator_view WHERE g = '5' OR g = '6' SETTINGS allow_experimental_analyzer = 1; SET optimize_min_equality_disjunction_chain_length = 3; SELECT count() FROM regression_for_in_operator_view WHERE g = '5' OR g = '6'; +SELECT count() FROM regression_for_in_operator_view WHERE g = '5' OR g = '6' SETTINGS allow_experimental_analyzer = 1; +EXPLAIN QUERY TREE SELECT count() FROM regression_for_in_operator_view WHERE g = '5' OR g = '6' SETTINGS allow_experimental_analyzer = 1; DROP TABLE regression_for_in_operator_view; DROP TABLE regression_for_in_operator; diff --git a/tests/queries/0_stateless/00736_disjunction_optimisation.reference b/tests/queries/0_stateless/00736_disjunction_optimisation.reference index afd698b425e..4210571842f 100644 --- a/tests/queries/0_stateless/00736_disjunction_optimisation.reference +++ b/tests/queries/0_stateless/00736_disjunction_optimisation.reference @@ -25,6 +25,97 @@ 3 21 3 22 3 23 +QUERY id: 0 + PROJECTION COLUMNS + k UInt64 + s UInt64 + PROJECTION + LIST id: 1, nodes: 2 + COLUMN id: 2, column_name: k, result_type: UInt64, source_id: 3 + COLUMN id: 4, column_name: s, result_type: UInt64, source_id: 3 + JOIN TREE + TABLE id: 3, table_name: default.bug + WHERE + FUNCTION id: 5, function_name: and, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 6, nodes: 2 + FUNCTION id: 7, function_name: or, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 8, nodes: 2 + FUNCTION id: 9, function_name: in, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 10, nodes: 2 + COLUMN id: 11, column_name: k, result_type: UInt64, source_id: 3 + CONSTANT id: 12, constant_value: Tuple_(UInt64_1, UInt64_2, UInt64_3), constant_value_type: Tuple(UInt8, UInt8, UInt8) + CONSTANT id: 13, constant_value: UInt64_0, constant_value_type: UInt8 + FUNCTION id: 14, function_name: or, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 15, nodes: 2 + FUNCTION id: 16, function_name: in, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 17, nodes: 2 + COLUMN id: 18, column_name: s, result_type: UInt64, source_id: 3 + CONSTANT id: 19, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) + CONSTANT id: 20, constant_value: UInt64_0, constant_value_type: UInt8 + SETTINGS allow_experimental_analyzer=1 +1 21 +1 22 +1 23 +2 21 +2 22 +2 23 +3 21 +3 22 +3 23 +1 21 +1 22 +1 23 +2 21 +2 22 +2 23 +3 21 +3 22 +3 23 +QUERY id: 0 + PROJECTION COLUMNS + k UInt64 + s UInt64 + PROJECTION + LIST id: 1, nodes: 2 + COLUMN id: 2, column_name: k, result_type: UInt64, source_id: 3 + COLUMN id: 4, column_name: s, result_type: UInt64, source_id: 3 + JOIN TREE + QUERY id: 3, is_subquery: 1 + PROJECTION COLUMNS + k UInt64 + s UInt64 + PROJECTION + LIST id: 5, nodes: 2 + COLUMN id: 6, column_name: k, result_type: UInt64, source_id: 7 + COLUMN id: 8, column_name: s, result_type: UInt64, source_id: 7 + JOIN TREE + TABLE id: 7, table_name: default.bug + WHERE + FUNCTION id: 9, function_name: or, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 10, nodes: 2 + FUNCTION id: 11, function_name: in, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 12, nodes: 2 + COLUMN id: 13, column_name: k, result_type: UInt64, source_id: 7 + CONSTANT id: 14, constant_value: Tuple_(UInt64_1, UInt64_2, UInt64_3), constant_value_type: Tuple(UInt8, UInt8, UInt8) + CONSTANT id: 15, constant_value: UInt64_0, constant_value_type: UInt8 + WHERE + FUNCTION id: 16, function_name: or, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 17, nodes: 2 + FUNCTION id: 18, function_name: in, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 19, nodes: 2 + COLUMN id: 20, column_name: s, result_type: UInt64, source_id: 3 + CONSTANT id: 21, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) + CONSTANT id: 22, constant_value: UInt64_0, constant_value_type: UInt8 + SETTINGS allow_experimental_analyzer=1 1 1 21 1 1 1 1 1 22 0 1 1 1 1 23 0 0 1 @@ -34,42 +125,6 @@ 3 1 21 1 1 1 3 1 22 0 1 1 3 1 23 0 0 1 -21 1 -22 1 -23 1 -21 1 -22 1 -23 1 -21 1 -22 1 -23 1 -1 21 -1 22 -1 23 -2 21 -2 22 -2 23 -3 21 -3 22 -3 23 -1 21 -1 22 -1 23 -2 21 -2 22 -2 23 -3 21 -3 22 -3 23 -1 21 -1 22 -1 23 -2 21 -2 22 -2 23 -3 21 -3 22 -3 23 1 1 21 1 1 1 1 1 22 0 1 1 1 1 23 0 0 1 @@ -79,6 +134,53 @@ 3 1 21 1 1 1 3 1 22 0 1 1 3 1 23 0 0 1 +QUERY id: 0 + PROJECTION COLUMNS + k UInt64 + or(equals(k, 1), equals(k, 2), equals(k, 3)) UInt8 + s UInt64 + equals(s, 21) UInt8 + or(equals(s, 21), equals(s, 22)) UInt8 + or(equals(s, 21), equals(s, 22), equals(s, 23)) UInt8 + PROJECTION + LIST id: 1, nodes: 6 + COLUMN id: 2, column_name: k, result_type: UInt64, source_id: 3 + FUNCTION id: 4, function_name: or, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 5, nodes: 2 + FUNCTION id: 6, function_name: in, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 7, nodes: 2 + COLUMN id: 2, column_name: k, result_type: UInt64, source_id: 3 + CONSTANT id: 8, constant_value: Tuple_(UInt64_1, UInt64_2, UInt64_3), constant_value_type: Tuple(UInt8, UInt8, UInt8) + CONSTANT id: 9, constant_value: UInt64_0, constant_value_type: UInt8 + COLUMN id: 10, column_name: s, result_type: UInt64, source_id: 3 + FUNCTION id: 11, function_name: equals, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 12, nodes: 2 + COLUMN id: 10, column_name: s, result_type: UInt64, source_id: 3 + CONSTANT id: 13, constant_value: UInt64_21, constant_value_type: UInt8 + FUNCTION id: 14, function_name: or, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 15, nodes: 2 + FUNCTION id: 16, function_name: in, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 17, nodes: 2 + COLUMN id: 10, column_name: s, result_type: UInt64, source_id: 3 + CONSTANT id: 18, constant_value: Tuple_(UInt64_21, UInt64_22), constant_value_type: Tuple(UInt8, UInt8) + CONSTANT id: 19, constant_value: UInt64_0, constant_value_type: UInt8 + FUNCTION id: 20, function_name: or, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 21, nodes: 2 + FUNCTION id: 22, function_name: in, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 23, nodes: 2 + COLUMN id: 10, column_name: s, result_type: UInt64, source_id: 3 + CONSTANT id: 24, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) + CONSTANT id: 25, constant_value: UInt64_0, constant_value_type: UInt8 + JOIN TREE + TABLE id: 3, table_name: default.bug + SETTINGS allow_experimental_analyzer=1 21 1 22 1 23 1 @@ -88,3 +190,255 @@ 21 1 22 1 23 1 +21 1 +22 1 +23 1 +21 1 +22 1 +23 1 +21 1 +22 1 +23 1 +QUERY id: 0 + PROJECTION COLUMNS + s UInt64 + or(equals(s, 21), equals(s, 22), equals(s, 23)) UInt8 + PROJECTION + LIST id: 1, nodes: 2 + COLUMN id: 2, column_name: s, result_type: UInt64, source_id: 3 + FUNCTION id: 4, function_name: or, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 5, nodes: 2 + FUNCTION id: 6, function_name: in, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 7, nodes: 2 + COLUMN id: 2, column_name: s, result_type: UInt64, source_id: 3 + CONSTANT id: 8, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) + CONSTANT id: 9, constant_value: UInt64_0, constant_value_type: UInt8 + JOIN TREE + TABLE id: 3, table_name: default.bug + SETTINGS allow_experimental_analyzer=1 +1 21 +1 22 +1 23 +2 21 +2 22 +2 23 +3 21 +3 22 +3 23 +1 21 +1 22 +1 23 +2 21 +2 22 +2 23 +3 21 +3 22 +3 23 +1 21 +1 22 +1 23 +2 21 +2 22 +2 23 +3 21 +3 22 +3 23 +QUERY id: 0 + PROJECTION COLUMNS + k UInt64 + s UInt64 + PROJECTION + LIST id: 1, nodes: 2 + COLUMN id: 2, column_name: k, result_type: UInt64, source_id: 3 + COLUMN id: 4, column_name: s, result_type: UInt64, source_id: 3 + JOIN TREE + TABLE id: 3, table_name: default.bug + WHERE + FUNCTION id: 5, function_name: and, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 6, nodes: 2 + FUNCTION id: 7, function_name: or, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 8, nodes: 2 + FUNCTION id: 9, function_name: in, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 10, nodes: 2 + COLUMN id: 11, column_name: k, result_type: UInt64, source_id: 3 + CONSTANT id: 12, constant_value: Tuple_(UInt64_1, UInt64_2, UInt64_3), constant_value_type: Tuple(UInt8, UInt8, UInt8) + CONSTANT id: 13, constant_value: UInt64_0, constant_value_type: UInt8 + FUNCTION id: 14, function_name: or, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 15, nodes: 2 + FUNCTION id: 16, function_name: in, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 17, nodes: 2 + COLUMN id: 18, column_name: s, result_type: UInt64, source_id: 3 + CONSTANT id: 19, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) + CONSTANT id: 20, constant_value: UInt64_0, constant_value_type: UInt8 + SETTINGS allow_experimental_analyzer=1 +1 21 +1 22 +1 23 +2 21 +2 22 +2 23 +3 21 +3 22 +3 23 +1 21 +1 22 +1 23 +2 21 +2 22 +2 23 +3 21 +3 22 +3 23 +QUERY id: 0 + PROJECTION COLUMNS + k UInt64 + s UInt64 + PROJECTION + LIST id: 1, nodes: 2 + COLUMN id: 2, column_name: k, result_type: UInt64, source_id: 3 + COLUMN id: 4, column_name: s, result_type: UInt64, source_id: 3 + JOIN TREE + QUERY id: 3, is_subquery: 1 + PROJECTION COLUMNS + k UInt64 + s UInt64 + PROJECTION + LIST id: 5, nodes: 2 + COLUMN id: 6, column_name: k, result_type: UInt64, source_id: 7 + COLUMN id: 8, column_name: s, result_type: UInt64, source_id: 7 + JOIN TREE + TABLE id: 7, table_name: default.bug + WHERE + FUNCTION id: 9, function_name: or, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 10, nodes: 2 + FUNCTION id: 11, function_name: in, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 12, nodes: 2 + COLUMN id: 13, column_name: k, result_type: UInt64, source_id: 7 + CONSTANT id: 14, constant_value: Tuple_(UInt64_1, UInt64_2, UInt64_3), constant_value_type: Tuple(UInt8, UInt8, UInt8) + CONSTANT id: 15, constant_value: UInt64_0, constant_value_type: UInt8 + WHERE + FUNCTION id: 16, function_name: or, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 17, nodes: 2 + FUNCTION id: 18, function_name: in, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 19, nodes: 2 + COLUMN id: 20, column_name: s, result_type: UInt64, source_id: 3 + CONSTANT id: 21, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) + CONSTANT id: 22, constant_value: UInt64_0, constant_value_type: UInt8 + SETTINGS allow_experimental_analyzer=1 +1 1 21 1 1 1 +1 1 22 0 1 1 +1 1 23 0 0 1 +2 1 21 1 1 1 +2 1 22 0 1 1 +2 1 23 0 0 1 +3 1 21 1 1 1 +3 1 22 0 1 1 +3 1 23 0 0 1 +1 1 21 1 1 1 +1 1 22 0 1 1 +1 1 23 0 0 1 +2 1 21 1 1 1 +2 1 22 0 1 1 +2 1 23 0 0 1 +3 1 21 1 1 1 +3 1 22 0 1 1 +3 1 23 0 0 1 +QUERY id: 0 + PROJECTION COLUMNS + k UInt64 + or(equals(k, 1), equals(k, 2), equals(k, 3)) UInt8 + s UInt64 + equals(s, 21) UInt8 + or(equals(s, 21), equals(s, 22)) UInt8 + or(equals(s, 21), equals(s, 22), equals(s, 23)) UInt8 + PROJECTION + LIST id: 1, nodes: 6 + COLUMN id: 2, column_name: k, result_type: UInt64, source_id: 3 + FUNCTION id: 4, function_name: or, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 5, nodes: 2 + FUNCTION id: 6, function_name: in, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 7, nodes: 2 + COLUMN id: 2, column_name: k, result_type: UInt64, source_id: 3 + CONSTANT id: 8, constant_value: Tuple_(UInt64_1, UInt64_2, UInt64_3), constant_value_type: Tuple(UInt8, UInt8, UInt8) + CONSTANT id: 9, constant_value: UInt64_0, constant_value_type: UInt8 + COLUMN id: 10, column_name: s, result_type: UInt64, source_id: 3 + FUNCTION id: 11, function_name: equals, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 12, nodes: 2 + COLUMN id: 10, column_name: s, result_type: UInt64, source_id: 3 + CONSTANT id: 13, constant_value: UInt64_21, constant_value_type: UInt8 + FUNCTION id: 14, function_name: or, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 15, nodes: 2 + FUNCTION id: 16, function_name: equals, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 17, nodes: 2 + COLUMN id: 10, column_name: s, result_type: UInt64, source_id: 3 + CONSTANT id: 18, constant_value: UInt64_21, constant_value_type: UInt8 + FUNCTION id: 19, function_name: equals, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 20, nodes: 2 + COLUMN id: 10, column_name: s, result_type: UInt64, source_id: 3 + CONSTANT id: 21, constant_value: UInt64_22, constant_value_type: UInt8 + FUNCTION id: 22, function_name: or, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 23, nodes: 2 + FUNCTION id: 24, function_name: in, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 25, nodes: 2 + COLUMN id: 10, column_name: s, result_type: UInt64, source_id: 3 + CONSTANT id: 26, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) + CONSTANT id: 27, constant_value: UInt64_0, constant_value_type: UInt8 + JOIN TREE + TABLE id: 3, table_name: default.bug + SETTINGS allow_experimental_analyzer=1 +21 1 +22 1 +23 1 +21 1 +22 1 +23 1 +21 1 +22 1 +23 1 +21 1 +22 1 +23 1 +21 1 +22 1 +23 1 +21 1 +22 1 +23 1 +QUERY id: 0 + PROJECTION COLUMNS + s UInt64 + or(equals(s, 21), equals(s, 22), equals(s, 23)) UInt8 + PROJECTION + LIST id: 1, nodes: 2 + COLUMN id: 2, column_name: s, result_type: UInt64, source_id: 3 + FUNCTION id: 4, function_name: or, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 5, nodes: 2 + FUNCTION id: 6, function_name: in, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 7, nodes: 2 + COLUMN id: 2, column_name: s, result_type: UInt64, source_id: 3 + CONSTANT id: 8, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) + CONSTANT id: 9, constant_value: UInt64_0, constant_value_type: UInt8 + JOIN TREE + TABLE id: 3, table_name: default.bug + SETTINGS allow_experimental_analyzer=1 diff --git a/tests/queries/0_stateless/00736_disjunction_optimisation.sql b/tests/queries/0_stateless/00736_disjunction_optimisation.sql index 700221ef7f0..e52ed2ab45b 100644 --- a/tests/queries/0_stateless/00736_disjunction_optimisation.sql +++ b/tests/queries/0_stateless/00736_disjunction_optimisation.sql @@ -5,17 +5,41 @@ insert into bug values(1,21),(1,22),(1,23),(2,21),(2,22),(2,23),(3,21),(3,22),(3 set optimize_min_equality_disjunction_chain_length = 2; select * from bug; + select * from bug where (k =1 or k=2 or k =3) and (s=21 or s=22 or s=23); +select * from bug where (k =1 or k=2 or k =3) and (s=21 or s=22 or s=23) SETTINGS allow_experimental_analyzer = 1; +explain query tree select * from bug where (k =1 or k=2 or k =3) and (s=21 or s=22 or s=23) SETTINGS allow_experimental_analyzer = 1;; + select * from (select * from bug where k=1 or k=2 or k=3) where (s=21 or s=22 or s=23); +select * from (select * from bug where k=1 or k=2 or k=3) where (s=21 or s=22 or s=23) SETTINGS allow_experimental_analyzer = 1;; +explain query tree select * from (select * from bug where k=1 or k=2 or k=3) where (s=21 or s=22 or s=23) SETTINGS allow_experimental_analyzer = 1;; + select k, (k=1 or k=2 or k=3), s, (s=21), (s=21 or s=22), (s=21 or s=22 or s=23) from bug; +select k, (k=1 or k=2 or k=3), s, (s=21), (s=21 or s=22), (s=21 or s=22 or s=23) from bug SETTINGS allow_experimental_analyzer = 1;; +explain query tree select k, (k=1 or k=2 or k=3), s, (s=21), (s=21 or s=22), (s=21 or s=22 or s=23) from bug SETTINGS allow_experimental_analyzer = 1;; + select s, (s=21 or s=22 or s=23) from bug; +select s, (s=21 or s=22 or s=23) from bug SETTINGS allow_experimental_analyzer = 1;; +explain query tree select s, (s=21 or s=22 or s=23) from bug SETTINGS allow_experimental_analyzer = 1;; set optimize_min_equality_disjunction_chain_length = 3; select * from bug; + select * from bug where (k =1 or k=2 or k =3) and (s=21 or s=22 or s=23); +select * from bug where (k =1 or k=2 or k =3) and (s=21 or s=22 or s=23) SETTINGS allow_experimental_analyzer = 1; +explain query tree select * from bug where (k =1 or k=2 or k =3) and (s=21 or s=22 or s=23) SETTINGS allow_experimental_analyzer = 1;; + select * from (select * from bug where k=1 or k=2 or k=3) where (s=21 or s=22 or s=23); +select * from (select * from bug where k=1 or k=2 or k=3) where (s=21 or s=22 or s=23) SETTINGS allow_experimental_analyzer = 1;; +explain query tree select * from (select * from bug where k=1 or k=2 or k=3) where (s=21 or s=22 or s=23) SETTINGS allow_experimental_analyzer = 1;; + select k, (k=1 or k=2 or k=3), s, (s=21), (s=21 or s=22), (s=21 or s=22 or s=23) from bug; +select k, (k=1 or k=2 or k=3), s, (s=21), (s=21 or s=22), (s=21 or s=22 or s=23) from bug SETTINGS allow_experimental_analyzer = 1;; +explain query tree select k, (k=1 or k=2 or k=3), s, (s=21), (s=21 or s=22), (s=21 or s=22 or s=23) from bug SETTINGS allow_experimental_analyzer = 1;; + select s, (s=21 or s=22 or s=23) from bug; +select s, (s=21 or s=22 or s=23) from bug SETTINGS allow_experimental_analyzer = 1;; +explain query tree select s, (s=21 or s=22 or s=23) from bug SETTINGS allow_experimental_analyzer = 1;; DROP TABLE bug; diff --git a/tests/queries/0_stateless/02477_logical_expressions_optimizer_low_cardinality.reference b/tests/queries/0_stateless/02477_logical_expressions_optimizer_low_cardinality.reference index dcfcac737c3..086c0a49b59 100644 --- a/tests/queries/0_stateless/02477_logical_expressions_optimizer_low_cardinality.reference +++ b/tests/queries/0_stateless/02477_logical_expressions_optimizer_low_cardinality.reference @@ -1,6 +1,48 @@ SELECT a FROM t_logical_expressions_optimizer_low_cardinality WHERE a IN (\'x\', \'y\') +QUERY id: 0 + PROJECTION COLUMNS + a LowCardinality(String) + PROJECTION + LIST id: 1, nodes: 1 + COLUMN id: 2, column_name: a, result_type: LowCardinality(String), source_id: 3 + JOIN TREE + TABLE id: 3, table_name: default.t_logical_expressions_optimizer_low_cardinality + WHERE + FUNCTION id: 4, function_name: or, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 5, nodes: 2 + FUNCTION id: 6, function_name: in, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 7, nodes: 2 + COLUMN id: 2, column_name: a, result_type: LowCardinality(String), source_id: 3 + CONSTANT id: 8, constant_value: Tuple_(\'x\', \'y\'), constant_value_type: Tuple(String, String) + CONSTANT id: 9, constant_value: UInt64_0, constant_value_type: UInt8 + SETTINGS allow_experimental_analyzer=1 SELECT a FROM t_logical_expressions_optimizer_low_cardinality WHERE (b = 0) OR (b = 1) +QUERY id: 0 + PROJECTION COLUMNS + a LowCardinality(String) + PROJECTION + LIST id: 1, nodes: 1 + COLUMN id: 2, column_name: a, result_type: LowCardinality(String), source_id: 3 + JOIN TREE + TABLE id: 3, table_name: default.t_logical_expressions_optimizer_low_cardinality + WHERE + FUNCTION id: 4, function_name: or, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 5, nodes: 2 + FUNCTION id: 6, function_name: equals, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 7, nodes: 2 + COLUMN id: 8, column_name: b, result_type: UInt32, source_id: 3 + CONSTANT id: 9, constant_value: UInt64_0, constant_value_type: UInt8 + FUNCTION id: 10, function_name: equals, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 11, nodes: 2 + COLUMN id: 8, column_name: b, result_type: UInt32, source_id: 3 + CONSTANT id: 12, constant_value: UInt64_1, constant_value_type: UInt8 + SETTINGS allow_experimental_analyzer=1 diff --git a/tests/queries/0_stateless/02477_logical_expressions_optimizer_low_cardinality.sql b/tests/queries/0_stateless/02477_logical_expressions_optimizer_low_cardinality.sql index be355a05675..f5368679f60 100644 --- a/tests/queries/0_stateless/02477_logical_expressions_optimizer_low_cardinality.sql +++ b/tests/queries/0_stateless/02477_logical_expressions_optimizer_low_cardinality.sql @@ -4,7 +4,9 @@ CREATE TABLE t_logical_expressions_optimizer_low_cardinality (a LowCardinality(S -- LowCardinality case, ignore optimize_min_equality_disjunction_chain_length limit, optimzer applied EXPLAIN SYNTAX SELECT a FROM t_logical_expressions_optimizer_low_cardinality WHERE a = 'x' OR a = 'y'; +EXPLAIN QUERY TREE SELECT a FROM t_logical_expressions_optimizer_low_cardinality WHERE a = 'x' OR a = 'y' SETTINGS allow_experimental_analyzer = 1; -- Non-LowCardinality case, optimizer not applied for short chains EXPLAIN SYNTAX SELECT a FROM t_logical_expressions_optimizer_low_cardinality WHERE b = 0 OR b = 1; +EXPLAIN QUERY TREE SELECT a FROM t_logical_expressions_optimizer_low_cardinality WHERE b = 0 OR b = 1 SETTINGS allow_experimental_analyzer = 1; DROP TABLE t_logical_expressions_optimizer_low_cardinality; From b66a5bdcf0366b751ca5ad1ecbf00cf6e80ddd6a Mon Sep 17 00:00:00 2001 From: Anton Popov Date: Tue, 21 Feb 2023 15:13:29 +0000 Subject: [PATCH 119/841] fix mutations with sparse columns --- src/DataTypes/DataTypeTuple.cpp | 14 +++ src/DataTypes/DataTypeTuple.h | 1 + src/DataTypes/IDataType.cpp | 9 ++ src/DataTypes/IDataType.h | 1 + .../Serializations/SerializationInfo.h | 1 + .../Serializations/SerializationInfoTuple.cpp | 13 +++ .../Serializations/SerializationInfoTuple.h | 2 + src/Storages/AlterCommands.cpp | 7 +- .../MergedColumnOnlyOutputStream.cpp | 1 - src/Storages/MergeTree/MutateTask.cpp | 48 +++++++++-- ...02662_sparse_columns_mutations_1.reference | 13 +++ .../02662_sparse_columns_mutations_1.sql | 49 +++++++++++ ...02662_sparse_columns_mutations_2.reference | 6 ++ .../02662_sparse_columns_mutations_2.sql | 33 +++++++ ...02662_sparse_columns_mutations_3.reference | 11 +++ .../02662_sparse_columns_mutations_3.sql | 85 +++++++++++++++++++ 16 files changed, 280 insertions(+), 14 deletions(-) create mode 100644 tests/queries/0_stateless/02662_sparse_columns_mutations_1.reference create mode 100644 tests/queries/0_stateless/02662_sparse_columns_mutations_1.sql create mode 100644 tests/queries/0_stateless/02662_sparse_columns_mutations_2.reference create mode 100644 tests/queries/0_stateless/02662_sparse_columns_mutations_2.sql create mode 100644 tests/queries/0_stateless/02662_sparse_columns_mutations_3.reference create mode 100644 tests/queries/0_stateless/02662_sparse_columns_mutations_3.sql diff --git a/src/DataTypes/DataTypeTuple.cpp b/src/DataTypes/DataTypeTuple.cpp index 768f87fe3d4..1e28af3ee54 100644 --- a/src/DataTypes/DataTypeTuple.cpp +++ b/src/DataTypes/DataTypeTuple.cpp @@ -312,6 +312,20 @@ MutableSerializationInfoPtr DataTypeTuple::createSerializationInfo(const Seriali return std::make_shared(std::move(infos), names, settings); } +MutableSerializationInfoPtr DataTypeTuple::cloneSerializationInfo(const SerializationInfo & old_info, const SerializationInfo::Settings & settings) const +{ + const auto & old_info_tuple = assert_cast(old_info); + assert(old_info_tuple.getNumElements() == elems.size()); + + MutableSerializationInfos infos; + infos.reserve(elems.size()); + for (size_t i = 0; i < elems.size(); ++i) + infos.push_back(elems[i]->cloneSerializationInfo(*old_info_tuple.getElementInfo(i), settings)); + + return std::make_shared(std::move(infos), names, settings); +} + + SerializationInfoPtr DataTypeTuple::getSerializationInfo(const IColumn & column) const { if (const auto * column_const = checkAndGetColumn(&column)) diff --git a/src/DataTypes/DataTypeTuple.h b/src/DataTypes/DataTypeTuple.h index 152f21015f5..9f3860f78db 100644 --- a/src/DataTypes/DataTypeTuple.h +++ b/src/DataTypes/DataTypeTuple.h @@ -57,6 +57,7 @@ public: SerializationPtr doGetDefaultSerialization() const override; SerializationPtr getSerialization(const SerializationInfo & info) const override; MutableSerializationInfoPtr createSerializationInfo(const SerializationInfo::Settings & settings) const override; + MutableSerializationInfoPtr cloneSerializationInfo(const SerializationInfo & old_info, const SerializationInfo::Settings & settings) const override; SerializationInfoPtr getSerializationInfo(const IColumn & column) const override; const DataTypePtr & getElement(size_t i) const { return elems[i]; } diff --git a/src/DataTypes/IDataType.cpp b/src/DataTypes/IDataType.cpp index e0612fbbf36..5cd0b6f659c 100644 --- a/src/DataTypes/IDataType.cpp +++ b/src/DataTypes/IDataType.cpp @@ -191,6 +191,15 @@ MutableSerializationInfoPtr IDataType::createSerializationInfo(const Serializati return std::make_shared(ISerialization::Kind::DEFAULT, settings); } +MutableSerializationInfoPtr IDataType::cloneSerializationInfo(const SerializationInfo & old_info, const SerializationInfo::Settings & settings) const +{ + auto new_kind = old_info.getKind(); + if (new_kind == ISerialization::Kind::SPARSE && !supportsSparseSerialization()) + new_kind = ISerialization::Kind::DEFAULT; + + return std::make_shared(new_kind, settings); +} + SerializationInfoPtr IDataType::getSerializationInfo(const IColumn & column) const { if (const auto * column_const = checkAndGetColumn(&column)) diff --git a/src/DataTypes/IDataType.h b/src/DataTypes/IDataType.h index bafe03dbc3a..32e3b53fc01 100644 --- a/src/DataTypes/IDataType.h +++ b/src/DataTypes/IDataType.h @@ -104,6 +104,7 @@ public: Names getSubcolumnNames() const; virtual MutableSerializationInfoPtr createSerializationInfo(const SerializationInfo::Settings & settings) const; + virtual MutableSerializationInfoPtr cloneSerializationInfo(const SerializationInfo & old_info, const SerializationInfo::Settings & settings) const; virtual SerializationInfoPtr getSerializationInfo(const IColumn & column) const; /// TODO: support more types. diff --git a/src/DataTypes/Serializations/SerializationInfo.h b/src/DataTypes/Serializations/SerializationInfo.h index a4a5685253f..4ae5cf8c193 100644 --- a/src/DataTypes/Serializations/SerializationInfo.h +++ b/src/DataTypes/Serializations/SerializationInfo.h @@ -51,6 +51,7 @@ public: virtual ~SerializationInfo() = default; virtual bool hasCustomSerialization() const { return kind != ISerialization::Kind::DEFAULT; } + virtual bool structureEquals(const SerializationInfo & rhs) const { return typeid(SerializationInfo) == typeid(rhs); } virtual void add(const IColumn & column); virtual void add(const SerializationInfo & other); diff --git a/src/DataTypes/Serializations/SerializationInfoTuple.cpp b/src/DataTypes/Serializations/SerializationInfoTuple.cpp index 6c326743e8a..1a9639a1566 100644 --- a/src/DataTypes/Serializations/SerializationInfoTuple.cpp +++ b/src/DataTypes/Serializations/SerializationInfoTuple.cpp @@ -28,6 +28,19 @@ bool SerializationInfoTuple::hasCustomSerialization() const return std::any_of(elems.begin(), elems.end(), [](const auto & elem) { return elem->hasCustomSerialization(); }); } +bool SerializationInfoTuple::structureEquals(const SerializationInfo & rhs) const +{ + const auto * rhs_tuple = typeid_cast(&rhs); + if (!rhs_tuple || elems.size() != rhs_tuple->elems.size()) + return false; + + for (size_t i = 0; i < elems.size(); ++i) + if (!elems[i]->structureEquals(*rhs_tuple->elems[i])) + return false; + + return true; +} + void SerializationInfoTuple::add(const IColumn & column) { SerializationInfo::add(column); diff --git a/src/DataTypes/Serializations/SerializationInfoTuple.h b/src/DataTypes/Serializations/SerializationInfoTuple.h index b01c629d2ff..ef288948b9a 100644 --- a/src/DataTypes/Serializations/SerializationInfoTuple.h +++ b/src/DataTypes/Serializations/SerializationInfoTuple.h @@ -11,6 +11,7 @@ public: SerializationInfoTuple(MutableSerializationInfos elems_, Names names_, const Settings & settings_); bool hasCustomSerialization() const override; + bool structureEquals(const SerializationInfo & rhs) const override; void add(const IColumn & column) override; void add(const SerializationInfo & other) override; @@ -25,6 +26,7 @@ public: Poco::JSON::Object toJSON() const override; void fromJSON(const Poco::JSON::Object & object) override; + size_t getNumElements() const { return elems.size(); } const MutableSerializationInfoPtr & getElementInfo(size_t i) const { return elems[i]; } ISerialization::Kind getElementKind(size_t i) const { return elems[i]->getKind(); } diff --git a/src/Storages/AlterCommands.cpp b/src/Storages/AlterCommands.cpp index da11a87eb4d..aff17465466 100644 --- a/src/Storages/AlterCommands.cpp +++ b/src/Storages/AlterCommands.cpp @@ -719,7 +719,7 @@ bool isMetadataOnlyConversion(const IDataType * from, const IDataType * to) { typeid(DataTypeUInt16), typeid(DataTypeDate) }, }; - /// Unwrap some nested and check for valid conevrsions + /// Unwrap some nested and check for valid conversions while (true) { /// types are equal, obviously pure metadata alter @@ -749,10 +749,9 @@ bool isMetadataOnlyConversion(const IDataType * from, const IDataType * to) const auto * nullable_from = typeid_cast(from); const auto * nullable_to = typeid_cast(to); - if (nullable_to) + if (nullable_from && nullable_to) { - /// Here we allow a conversion X -> Nullable(X) to make a metadata-only conversion. - from = nullable_from ? nullable_from->getNestedType().get() : from; + from = nullable_from->getNestedType().get(); to = nullable_to->getNestedType().get(); continue; } diff --git a/src/Storages/MergeTree/MergedColumnOnlyOutputStream.cpp b/src/Storages/MergeTree/MergedColumnOnlyOutputStream.cpp index 03829f1daf9..f6fc40884a1 100644 --- a/src/Storages/MergeTree/MergedColumnOnlyOutputStream.cpp +++ b/src/Storages/MergeTree/MergedColumnOnlyOutputStream.cpp @@ -86,7 +86,6 @@ MergedColumnOnlyOutputStream::fillChecksums( } new_part->setColumns(columns, serialization_infos); - return checksums; } diff --git a/src/Storages/MergeTree/MutateTask.cpp b/src/Storages/MergeTree/MutateTask.cpp index 4b9265488e7..8d95a76b5da 100644 --- a/src/Storages/MergeTree/MutateTask.cpp +++ b/src/Storages/MergeTree/MutateTask.cpp @@ -203,20 +203,50 @@ getColumnsForNewDataPart( } SerializationInfoByName new_serialization_infos; - for (const auto & [name, info] : serialization_infos) + for (const auto & [name, old_info] : serialization_infos) { if (removed_columns.contains(name)) continue; auto it = renamed_columns_from_to.find(name); - if (it != renamed_columns_from_to.end()) - new_serialization_infos.emplace(it->second, info); - else - new_serialization_infos.emplace(name, info); + auto new_name = it == renamed_columns_from_to.end() ? name : it->second; + + if (!updated_header.has(new_name)) + { + new_serialization_infos.emplace(new_name, old_info); + continue; + } + + auto old_type = part_columns.getPhysical(name); + auto new_type = updated_header.getByName(new_name).type; + + if (!new_type->supportsSparseSerialization()) + continue; + + SerializationInfo::Settings settings + { + .ratio_of_defaults_for_sparse = source_part->storage.getSettings()->ratio_of_defaults_for_sparse_serialization, + .choose_kind = false + }; + + auto new_info = new_type->createSerializationInfo(settings); + if (!old_info->structureEquals(*new_info)) + { + new_serialization_infos.emplace(new_name, std::move(new_info)); + continue; + } + + if (!old_info->hasCustomSerialization()) + { + new_serialization_infos.emplace(new_name, old_info); + continue; + } + + new_info = new_type->cloneSerializationInfo(*old_info, settings); + new_serialization_infos.emplace(new_name, std::move(new_info)); } - /// In compact parts we read all columns, because they all stored in a - /// single file + /// In compact parts we read all columns, because they all stored in a single file if (!isWidePart(source_part) || !isFullPartStorage(source_part->getDataPartStorage())) return {updated_header.getNamesAndTypesList(), new_serialization_infos}; @@ -1221,8 +1251,8 @@ private: skip_part_indices, ctx->compression_codec, ctx->txn, - false, - false, + /*reset_columns=*/ true, + /*blocks_are_granules_size=*/ false, ctx->context->getWriteSettings()); ctx->mutating_pipeline = QueryPipelineBuilder::getPipeline(std::move(builder)); diff --git a/tests/queries/0_stateless/02662_sparse_columns_mutations_1.reference b/tests/queries/0_stateless/02662_sparse_columns_mutations_1.reference new file mode 100644 index 00000000000..3f5c8b6ed1f --- /dev/null +++ b/tests/queries/0_stateless/02662_sparse_columns_mutations_1.reference @@ -0,0 +1,13 @@ +1_1_1_0 String Sparse +477 ['','foo'] +1_1_1_0_2 Nullable(String) Default +477 ['','foo'] +1_1_1_0_2 Nullable(String) Default +2_3_3_0 Nullable(String) Default +954 ['','foo'] +1_1_1_0_4 String Default +2_3_3_0_4 String Default +954 ['','foo'] +1_1_1_1_4 String Sparse +2_3_3_1_4 String Sparse +954 ['','foo'] diff --git a/tests/queries/0_stateless/02662_sparse_columns_mutations_1.sql b/tests/queries/0_stateless/02662_sparse_columns_mutations_1.sql new file mode 100644 index 00000000000..3bf37e8e62b --- /dev/null +++ b/tests/queries/0_stateless/02662_sparse_columns_mutations_1.sql @@ -0,0 +1,49 @@ +SET mutations_sync = 2; + +DROP TABLE IF EXISTS t_sparse_mutations_1; + +CREATE TABLE t_sparse_mutations_1 (key UInt8, id UInt64, s String) +ENGINE = MergeTree ORDER BY id PARTITION BY key +SETTINGS ratio_of_defaults_for_sparse_serialization = 0.9; + +INSERT INTO t_sparse_mutations_1 SELECT 1, number, if (number % 21 = 0, 'foo', '') FROM numbers (10000); + +SELECT name, type, serialization_kind FROM system.parts_columns +WHERE database = currentDatabase() AND table = 't_sparse_mutations_1' AND column = 's' AND active +ORDER BY name; + +SELECT countIf(s = 'foo'), arraySort(groupUniqArray(s)) FROM t_sparse_mutations_1; + +ALTER TABLE t_sparse_mutations_1 MODIFY COLUMN s Nullable(String); + +SELECT name, type, serialization_kind FROM system.parts_columns +WHERE database = currentDatabase() AND table = 't_sparse_mutations_1' AND column = 's' AND active +ORDER BY name; + +SELECT countIf(s = 'foo'), arraySort(groupUniqArray(s)) FROM t_sparse_mutations_1; + +INSERT INTO t_sparse_mutations_1 SELECT 2, number, if (number % 21 = 0, 'foo', '') FROM numbers (10000); + +SELECT name, type, serialization_kind FROM system.parts_columns +WHERE database = currentDatabase() AND table = 't_sparse_mutations_1' AND column = 's' AND active +ORDER BY name; + +SELECT countIf(s = 'foo'), arraySort(groupUniqArray(s)) FROM t_sparse_mutations_1; + +ALTER TABLE t_sparse_mutations_1 MODIFY COLUMN s String; + +SELECT name, type, serialization_kind FROM system.parts_columns +WHERE database = currentDatabase() AND table = 't_sparse_mutations_1' AND column = 's' AND active +ORDER BY name; + +SELECT countIf(s = 'foo'), arraySort(groupUniqArray(s)) FROM t_sparse_mutations_1; + +OPTIMIZE TABLE t_sparse_mutations_1 FINAL; + +SELECT name, type, serialization_kind FROM system.parts_columns +WHERE database = currentDatabase() AND table = 't_sparse_mutations_1' AND column = 's' AND active +ORDER BY name; + +SELECT countIf(s = 'foo'), arraySort(groupUniqArray(s)) FROM t_sparse_mutations_1; + +DROP TABLE t_sparse_mutations_1; diff --git a/tests/queries/0_stateless/02662_sparse_columns_mutations_2.reference b/tests/queries/0_stateless/02662_sparse_columns_mutations_2.reference new file mode 100644 index 00000000000..64eb0119982 --- /dev/null +++ b/tests/queries/0_stateless/02662_sparse_columns_mutations_2.reference @@ -0,0 +1,6 @@ +String Default +10000 49995000 +String Default +770 3848845 +String Sparse +770 3848845 diff --git a/tests/queries/0_stateless/02662_sparse_columns_mutations_2.sql b/tests/queries/0_stateless/02662_sparse_columns_mutations_2.sql new file mode 100644 index 00000000000..561bd164200 --- /dev/null +++ b/tests/queries/0_stateless/02662_sparse_columns_mutations_2.sql @@ -0,0 +1,33 @@ +SET mutations_sync = 2; + +DROP TABLE IF EXISTS t_sparse_mutations_2; + +CREATE TABLE t_sparse_mutations_2 (key UInt8, id UInt64, s String) +ENGINE = MergeTree ORDER BY id PARTITION BY key +SETTINGS ratio_of_defaults_for_sparse_serialization = 0.9; + +INSERT INTO t_sparse_mutations_2 SELECT 1, number, toString(number) FROM numbers (10000); + +SELECT type, serialization_kind FROM system.parts_columns +WHERE database = currentDatabase() AND table = 't_sparse_mutations_2' AND column = 's' AND active +ORDER BY name; + +SELECT count(), sum(s::UInt64) FROM t_sparse_mutations_2 WHERE s != ''; + +ALTER TABLE t_sparse_mutations_2 UPDATE s = '' WHERE id % 13 != 0; + +SELECT type, serialization_kind FROM system.parts_columns +WHERE database = currentDatabase() AND table = 't_sparse_mutations_2' AND column = 's' AND active +ORDER BY name; + +SELECT count(), sum(s::UInt64) FROM t_sparse_mutations_2 WHERE s != ''; + +OPTIMIZE TABLE t_sparse_mutations_2 FINAL; + +SELECT type, serialization_kind FROM system.parts_columns +WHERE database = currentDatabase() AND table = 't_sparse_mutations_2' AND column = 's' AND active +ORDER BY name; + +SELECT count(), sum(s::UInt64) FROM t_sparse_mutations_2 WHERE s != ''; + +DROP TABLE t_sparse_mutations_2; diff --git a/tests/queries/0_stateless/02662_sparse_columns_mutations_3.reference b/tests/queries/0_stateless/02662_sparse_columns_mutations_3.reference new file mode 100644 index 00000000000..1501fd27fd5 --- /dev/null +++ b/tests/queries/0_stateless/02662_sparse_columns_mutations_3.reference @@ -0,0 +1,11 @@ +String Default +Tuple(UInt64, UInt64, String, String, String) Default ['1','2','3','4','5'] ['UInt64','UInt64','String','String','String'] ['Default','Default','Default','Default','Default'] +10000 0 ['1'] ['0'] [''] +Tuple(UInt64, UInt64, String, String, String) Default ['1','2','3','4','5'] ['UInt64','UInt64','String','String','String'] ['Default','Sparse','Default','Default','Sparse'] +10000 0 ['1'] ['0'] [''] +Tuple(UInt64, UInt64, UInt64, UInt64, String) Default ['1','2','3','4','5'] ['UInt64','UInt64','UInt64','UInt64','String'] ['Default','Sparse','Default','Default','Sparse'] +10000 0 10000 0 [''] +Tuple(UInt64, UInt64, UInt64, UInt64, String) Default ['1','2','3','4','5'] ['UInt64','UInt64','UInt64','UInt64','String'] ['Default','Sparse','Default','Sparse','Sparse'] +10000 0 10000 0 [''] +Tuple(Nullable(UInt64), Nullable(UInt64), Nullable(UInt64), Nullable(UInt64), Nullable(String)) Default ['1','1.null','2','2.null','3','3.null','4','4.null','5','5.null'] ['Nullable(UInt64)','UInt8','Nullable(UInt64)','UInt8','Nullable(UInt64)','UInt8','Nullable(UInt64)','UInt8','Nullable(String)','UInt8'] ['Default','Default','Default','Default','Default','Default','Default','Default','Default','Default'] +10000 0 10000 0 [''] diff --git a/tests/queries/0_stateless/02662_sparse_columns_mutations_3.sql b/tests/queries/0_stateless/02662_sparse_columns_mutations_3.sql new file mode 100644 index 00000000000..6e66336dcbc --- /dev/null +++ b/tests/queries/0_stateless/02662_sparse_columns_mutations_3.sql @@ -0,0 +1,85 @@ +SET mutations_sync = 2; + +DROP TABLE IF EXISTS t_sparse_mutations_3; + +CREATE TABLE t_sparse_mutations_3 (key UInt8, id UInt64, s String) +ENGINE = MergeTree ORDER BY id PARTITION BY key +SETTINGS ratio_of_defaults_for_sparse_serialization = 0.9; + +INSERT INTO t_sparse_mutations_3 SELECT 1, number, toString(tuple(1, 0, '1', '0', '')) FROM numbers (10000); + +SELECT type, serialization_kind FROM system.parts_columns +WHERE database = currentDatabase() AND table = 't_sparse_mutations_3' AND column = 's' AND active +ORDER BY name; + +ALTER TABLE t_sparse_mutations_3 MODIFY COLUMN s Tuple(UInt64, UInt64, String, String, String); + +SELECT + type, + serialization_kind, + subcolumns.names, + subcolumns.types, + subcolumns.serializations +FROM system.parts_columns +WHERE database = currentDatabase() AND table = 't_sparse_mutations_3' AND column = 's' AND active +ORDER BY name; + +SELECT sum(s.1), sum(s.2), groupUniqArray(s.3), groupUniqArray(s.4), groupUniqArray(s.5) FROM t_sparse_mutations_3; + +OPTIMIZE TABLE t_sparse_mutations_3 FINAL; + +SELECT + type, + serialization_kind, + subcolumns.names, + subcolumns.types, + subcolumns.serializations +FROM system.parts_columns +WHERE database = currentDatabase() AND table = 't_sparse_mutations_3' AND column = 's' AND active +ORDER BY name; + +SELECT sum(s.1), sum(s.2), groupUniqArray(s.3), groupUniqArray(s.4), groupUniqArray(s.5) FROM t_sparse_mutations_3; + +ALTER TABLE t_sparse_mutations_3 MODIFY COLUMN s Tuple(UInt64, UInt64, UInt64, UInt64, String); + +SELECT + type, + serialization_kind, + subcolumns.names, + subcolumns.types, + subcolumns.serializations +FROM system.parts_columns +WHERE database = currentDatabase() AND table = 't_sparse_mutations_3' AND column = 's' AND active +ORDER BY name; + +SELECT sum(s.1), sum(s.2), sum(s.3), sum(s.4), groupUniqArray(s.5) FROM t_sparse_mutations_3; + +OPTIMIZE TABLE t_sparse_mutations_3 FINAL; + +SELECT + type, + serialization_kind, + subcolumns.names, + subcolumns.types, + subcolumns.serializations +FROM system.parts_columns +WHERE database = currentDatabase() AND table = 't_sparse_mutations_3' AND column = 's' AND active +ORDER BY name; + +SELECT sum(s.1), sum(s.2), sum(s.3), sum(s.4), groupUniqArray(s.5) FROM t_sparse_mutations_3; + +ALTER TABLE t_sparse_mutations_3 MODIFY COLUMN s Tuple(Nullable(UInt64), Nullable(UInt64), Nullable(UInt64), Nullable(UInt64), Nullable(String)); + +SELECT + type, + serialization_kind, + subcolumns.names, + subcolumns.types, + subcolumns.serializations +FROM system.parts_columns +WHERE database = currentDatabase() AND table = 't_sparse_mutations_3' AND column = 's' AND active +ORDER BY name; + +SELECT sum(s.1), sum(s.2), sum(s.3), sum(s.4), groupUniqArray(s.5) FROM t_sparse_mutations_3; + +DROP TABLE t_sparse_mutations_3; From a110e0f0225acdc2868423b08efc8b23fe1ad697 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Tue, 21 Feb 2023 15:58:56 +0100 Subject: [PATCH 120/841] Allow to ignore errors while pushing to MATERILIZED VIEW This can be useful in the following scenarious: - you want to duplicate the data to another table and you don't care about the errors - you want to duplicate system.*_log to another server, you are adding materialized view that will push to Distributed table, but you don't want to miss original blocks in the local system.*_log - you want to push some data to a 3d party service, using i.e. URL engine. Signed-off-by: Azat Khuzhin --- .../sql-reference/statements/create/view.md | 2 ++ src/Core/Settings.h | 1 + .../Transforms/buildPushingToViewsChain.cpp | 16 ++++++++-- ...materialized_views_ignore_errors.reference | 17 +++++++++++ ...02572_materialized_views_ignore_errors.sql | 30 +++++++++++++++++++ 5 files changed, 63 insertions(+), 3 deletions(-) create mode 100644 tests/queries/0_stateless/02572_materialized_views_ignore_errors.reference create mode 100644 tests/queries/0_stateless/02572_materialized_views_ignore_errors.sql diff --git a/docs/en/sql-reference/statements/create/view.md b/docs/en/sql-reference/statements/create/view.md index 527b31b36a4..35242ec7a93 100644 --- a/docs/en/sql-reference/statements/create/view.md +++ b/docs/en/sql-reference/statements/create/view.md @@ -66,6 +66,8 @@ A materialized view is implemented as follows: when inserting data to the table Materialized views in ClickHouse use **column names** instead of column order during insertion into destination table. If some column names are not present in the `SELECT` query result, ClickHouse uses a default value, even if the column is not [Nullable](../../data-types/nullable.md). A safe practice would be to add aliases for every column when using Materialized views. Materialized views in ClickHouse are implemented more like insert triggers. If there’s some aggregation in the view query, it’s applied only to the batch of freshly inserted data. Any changes to existing data of source table (like update, delete, drop partition, etc.) does not change the materialized view. + +By default if the will be an error during pushing to the materialized view the data will not be inserted into the table to which the materialized view is attached. You can change this by setting `materialized_views_ignore_errors=true` setting for your `INSERT` query. ::: If you specify `POPULATE`, the existing table data is inserted into the view when creating it, as if making a `CREATE TABLE ... AS SELECT ...` . Otherwise, the query contains only the data inserted in the table after creating the view. We **do not recommend** using `POPULATE`, since data inserted in the table during the view creation will not be inserted in it. diff --git a/src/Core/Settings.h b/src/Core/Settings.h index 3002bcc8b49..ac9a169e2a8 100644 --- a/src/Core/Settings.h +++ b/src/Core/Settings.h @@ -508,6 +508,7 @@ class IColumn; M(Bool, allow_experimental_alter_materialized_view_structure, false, "Allow atomic alter on Materialized views. Work in progress.", 0) \ M(Bool, enable_early_constant_folding, true, "Enable query optimization where we analyze function and subqueries results and rewrite query if there're constants there", 0) \ M(Bool, deduplicate_blocks_in_dependent_materialized_views, false, "Should deduplicate blocks for materialized views if the block is not a duplicate for the table. Use true to always deduplicate in dependent tables.", 0) \ + M(Bool, materialized_views_ignore_errors, false, "Allows to ignore errors for MATERIALIZED VIEW, and deliver original block to the table regardless of MVs", 0) \ M(Bool, use_compact_format_in_distributed_parts_names, true, "Changes format of directories names for distributed table insert parts.", 0) \ M(Bool, validate_polygons, true, "Throw exception if polygon is invalid in function pointInPolygon (e.g. self-tangent, self-intersecting). If the setting is false, the function will accept invalid polygons but may silently return wrong result.", 0) \ M(UInt64, max_parser_depth, DBMS_DEFAULT_MAX_PARSER_DEPTH, "Maximum parser depth (recursion depth of recursive descend parser).", 0) \ diff --git a/src/Processors/Transforms/buildPushingToViewsChain.cpp b/src/Processors/Transforms/buildPushingToViewsChain.cpp index a58d70a8428..154986045d9 100644 --- a/src/Processors/Transforms/buildPushingToViewsChain.cpp +++ b/src/Processors/Transforms/buildPushingToViewsChain.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -173,7 +174,7 @@ class FinalizingViewsTransform final : public IProcessor static InputPorts initPorts(std::vector headers); public: - FinalizingViewsTransform(std::vector headers, ViewsDataPtr data); + FinalizingViewsTransform(std::vector headers, ViewsDataPtr data, bool materialized_views_ignore_errors_); String getName() const override { return "FinalizingViewsTransform"; } Status prepare() override; @@ -184,6 +185,7 @@ private: ViewsDataPtr views_data; std::vector statuses; std::exception_ptr any_exception; + bool materialized_views_ignore_errors; }; @@ -407,7 +409,7 @@ Chain buildPushingToViewsChain( headers.push_back(chain.getOutputHeader()); auto copying_data = std::make_shared(storage_header, views_data); - auto finalizing_views = std::make_shared(std::move(headers), views_data); + auto finalizing_views = std::make_shared(std::move(headers), views_data, settings.materialized_views_ignore_errors); auto out = copying_data->getOutputs().begin(); auto in = finalizing_views->getInputs().begin(); @@ -684,10 +686,11 @@ void PushingToWindowViewSink::consume(Chunk chunk) } -FinalizingViewsTransform::FinalizingViewsTransform(std::vector headers, ViewsDataPtr data) +FinalizingViewsTransform::FinalizingViewsTransform(std::vector headers, ViewsDataPtr data, bool materialized_views_ignore_errors_) : IProcessor(initPorts(std::move(headers)), {Block()}) , output(outputs.front()) , views_data(std::move(data)) + , materialized_views_ignore_errors(materialized_views_ignore_errors_) { statuses.resize(views_data->views.size()); } @@ -788,6 +791,13 @@ void FinalizingViewsTransform::work() auto & status = statuses[i]; ++i; + if (status.exception && materialized_views_ignore_errors) + { + auto exception = addStorageToException(status.exception, view.table_id); + tryLogException(exception, &Poco::Logger::get("PushingToViews"), "Cannot push to the storage, ignoring the error"); + continue; + } + if (status.exception) { if (!any_exception) diff --git a/tests/queries/0_stateless/02572_materialized_views_ignore_errors.reference b/tests/queries/0_stateless/02572_materialized_views_ignore_errors.reference new file mode 100644 index 00000000000..537865e10da --- /dev/null +++ b/tests/queries/0_stateless/02572_materialized_views_ignore_errors.reference @@ -0,0 +1,17 @@ +-- { echoOn } +select * from data_02572 order by key; +insert into data_02572 values (1); -- { serverError UNKNOWN_TABLE } +select * from data_02572 order by key; +1 +insert into data_02572 settings materialized_views_ignore_errors=1 values (2); +select * from data_02572 order by key; +1 +2 +create table receiver_02572 as data_02572; +insert into data_02572 values (3); +select * from data_02572 order by key; +1 +2 +3 +select * from receiver_02572 order by key; +3 diff --git a/tests/queries/0_stateless/02572_materialized_views_ignore_errors.sql b/tests/queries/0_stateless/02572_materialized_views_ignore_errors.sql new file mode 100644 index 00000000000..41fa9e32d1c --- /dev/null +++ b/tests/queries/0_stateless/02572_materialized_views_ignore_errors.sql @@ -0,0 +1,30 @@ +set prefer_localhost_replica=1; + +drop table if exists data_02572; +drop table if exists proxy_02572; +drop table if exists push_to_proxy_mv_02572; +drop table if exists receiver_02572; + +create table data_02572 (key Int) engine=Memory(); + +create table proxy_02572 (key Int) engine=Distributed('test_shard_localhost', currentDatabase(), 'receiver_02572'); +-- ensure that insert fails +insert into proxy_02572 values (1); -- { serverError UNKNOWN_TABLE } + +-- proxy data with MV +create materialized view push_to_proxy_mv_02572 to proxy_02572 as select * from data_02572; + +-- { echoOn } +select * from data_02572 order by key; + +insert into data_02572 values (1); -- { serverError UNKNOWN_TABLE } +select * from data_02572 order by key; + +insert into data_02572 settings materialized_views_ignore_errors=1 values (2); +select * from data_02572 order by key; + +create table receiver_02572 as data_02572; + +insert into data_02572 values (3); +select * from data_02572 order by key; +select * from receiver_02572 order by key; From 6391e2daecad874e29ae444b24f537a64758de0e Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Tue, 21 Feb 2023 16:27:30 +0100 Subject: [PATCH 121/841] Set materialized_views_ignore_errors unconditionally for system.*_log tables Signed-off-by: Azat Khuzhin --- docs/en/sql-reference/statements/create/view.md | 2 ++ src/Interpreters/SystemLog.cpp | 2 ++ ...s_materialized_views_ignore_errors.reference | 0 ...em_logs_materialized_views_ignore_errors.sql | 17 +++++++++++++++++ 4 files changed, 21 insertions(+) create mode 100644 tests/queries/0_stateless/02572_system_logs_materialized_views_ignore_errors.reference create mode 100644 tests/queries/0_stateless/02572_system_logs_materialized_views_ignore_errors.sql diff --git a/docs/en/sql-reference/statements/create/view.md b/docs/en/sql-reference/statements/create/view.md index 35242ec7a93..5d54662326a 100644 --- a/docs/en/sql-reference/statements/create/view.md +++ b/docs/en/sql-reference/statements/create/view.md @@ -68,6 +68,8 @@ Materialized views in ClickHouse use **column names** instead of column order du Materialized views in ClickHouse are implemented more like insert triggers. If there’s some aggregation in the view query, it’s applied only to the batch of freshly inserted data. Any changes to existing data of source table (like update, delete, drop partition, etc.) does not change the materialized view. By default if the will be an error during pushing to the materialized view the data will not be inserted into the table to which the materialized view is attached. You can change this by setting `materialized_views_ignore_errors=true` setting for your `INSERT` query. + +`materialized_views_ignore_errors` set to `true` by default for `system.*_log` tables. ::: If you specify `POPULATE`, the existing table data is inserted into the view when creating it, as if making a `CREATE TABLE ... AS SELECT ...` . Otherwise, the query contains only the data inserted in the table after creating the view. We **do not recommend** using `POPULATE`, since data inserted in the table during the view creation will not be inserted in it. diff --git a/src/Interpreters/SystemLog.cpp b/src/Interpreters/SystemLog.cpp index 9d8547abcf2..78513920236 100644 --- a/src/Interpreters/SystemLog.cpp +++ b/src/Interpreters/SystemLog.cpp @@ -426,6 +426,8 @@ void SystemLog::flushImpl(const std::vector & to_flush, // we need query context to do inserts to target table with MV containing subqueries or joins auto insert_context = Context::createCopy(context); insert_context->makeQueryContext(); + /// We always want to deliver the data to the original table regardless of the MVs + insert_context->setSetting("materialized_views_ignore_errors", true); InterpreterInsertQuery interpreter(query_ptr, insert_context); BlockIO io = interpreter.execute(); diff --git a/tests/queries/0_stateless/02572_system_logs_materialized_views_ignore_errors.reference b/tests/queries/0_stateless/02572_system_logs_materialized_views_ignore_errors.reference new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/queries/0_stateless/02572_system_logs_materialized_views_ignore_errors.sql b/tests/queries/0_stateless/02572_system_logs_materialized_views_ignore_errors.sql new file mode 100644 index 00000000000..d26f86962c4 --- /dev/null +++ b/tests/queries/0_stateless/02572_system_logs_materialized_views_ignore_errors.sql @@ -0,0 +1,17 @@ +-- Tags: no-parallel +-- Tag no-parallel: due to attaching to system.query_log + +-- Attach MV to system.query_log and check that writing query_log will not fail + +drop table if exists log_proxy_02572; +drop table if exists push_to_logs_proxy_mv_02572; + +create table log_proxy_02572 as system.query_log engine=Distributed('test_shard_localhost', currentDatabase(), 'receiver_02572'); +create materialized view push_to_logs_proxy_mv_02572 to log_proxy_02572 as select * from system.query_log; + +set log_queries=1; +system flush logs; +system flush logs; + +drop table log_proxy_02572; +drop table push_to_logs_proxy_mv_02572; From 341a7766174aad17b63fe31ae6fe38705a4d1786 Mon Sep 17 00:00:00 2001 From: Kruglov Pavel <48961922+Avogar@users.noreply.github.com> Date: Tue, 21 Feb 2023 16:41:05 +0100 Subject: [PATCH 122/841] Disable test --- tests/integration/test_storage_kafka/test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/integration/test_storage_kafka/test.py b/tests/integration/test_storage_kafka/test.py index 51871eae3d8..ca189d837ad 100644 --- a/tests/integration/test_storage_kafka/test.py +++ b/tests/integration/test_storage_kafka/test.py @@ -4440,6 +4440,7 @@ def test_block_based_formats_2(kafka_cluster): kafka_delete_topic(admin_client, format_name) +@pytest.mark.skip(reason="Debug") def test_bad_messages_parsing(kafka_cluster): admin_client = KafkaAdminClient( bootstrap_servers="localhost:{}".format(kafka_cluster.kafka_port) From a25255cabc505a41ea4f42c683e0fcc3027746f5 Mon Sep 17 00:00:00 2001 From: Kruglov Pavel <48961922+Avogar@users.noreply.github.com> Date: Tue, 21 Feb 2023 16:57:44 +0100 Subject: [PATCH 123/841] Update StreamingFormatExecutor.h --- src/Processors/Executors/StreamingFormatExecutor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Processors/Executors/StreamingFormatExecutor.h b/src/Processors/Executors/StreamingFormatExecutor.h index 46f22d6deb6..f5a1562a340 100644 --- a/src/Processors/Executors/StreamingFormatExecutor.h +++ b/src/Processors/Executors/StreamingFormatExecutor.h @@ -24,7 +24,7 @@ public: StreamingFormatExecutor( const Block & header_, InputFormatPtr format_, - ErrorCallback on_error_ = [](const MutableColumns &, Exception & e) -> size_t { throw e; }, + ErrorCallback on_error_ = [](const MutableColumns &, Exception & e) -> size_t { throw std::move(e); }, SimpleTransformPtr adding_defaults_transform_ = nullptr); /// Returns numbers of new read rows. From 81435282ec2665ba189511a9427a7ccf6692e963 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Tue, 21 Feb 2023 17:04:58 +0100 Subject: [PATCH 124/841] Add an entry to system.query_views_log regardless of materialized_views_ignore_errors Signed-off-by: Azat Khuzhin --- .../Transforms/buildPushingToViewsChain.cpp | 15 ++++++--------- ...2_materialized_views_ignore_errors.reference | 17 ++++++++++++++--- .../02572_materialized_views_ignore_errors.sql | 16 +++++++++++++--- 3 files changed, 33 insertions(+), 15 deletions(-) diff --git a/src/Processors/Transforms/buildPushingToViewsChain.cpp b/src/Processors/Transforms/buildPushingToViewsChain.cpp index 154986045d9..13c4806590e 100644 --- a/src/Processors/Transforms/buildPushingToViewsChain.cpp +++ b/src/Processors/Transforms/buildPushingToViewsChain.cpp @@ -737,7 +737,7 @@ IProcessor::Status FinalizingViewsTransform::prepare() else statuses[i].exception = data.exception; - if (i == 0 && statuses[0].is_first) + if (i == 0 && statuses[0].is_first && !materialized_views_ignore_errors) { output.pushData(std::move(data)); return Status::PortFull; @@ -754,7 +754,7 @@ IProcessor::Status FinalizingViewsTransform::prepare() if (!statuses.empty()) return Status::Ready; - if (any_exception) + if (any_exception && !materialized_views_ignore_errors) output.pushException(any_exception); output.finish(); @@ -791,19 +791,16 @@ void FinalizingViewsTransform::work() auto & status = statuses[i]; ++i; - if (status.exception && materialized_views_ignore_errors) - { - auto exception = addStorageToException(status.exception, view.table_id); - tryLogException(exception, &Poco::Logger::get("PushingToViews"), "Cannot push to the storage, ignoring the error"); - continue; - } - if (status.exception) { if (!any_exception) any_exception = status.exception; view.setException(addStorageToException(status.exception, view.table_id)); + + /// Exception will be ignored, it is saved here for the system.query_views_log + if (materialized_views_ignore_errors) + tryLogException(view.exception, &Poco::Logger::get("PushingToViews"), "Cannot push to the storage, ignoring the error"); } else { diff --git a/tests/queries/0_stateless/02572_materialized_views_ignore_errors.reference b/tests/queries/0_stateless/02572_materialized_views_ignore_errors.reference index 537865e10da..fc2e6b78122 100644 --- a/tests/queries/0_stateless/02572_materialized_views_ignore_errors.reference +++ b/tests/queries/0_stateless/02572_materialized_views_ignore_errors.reference @@ -1,10 +1,21 @@ -- { echoOn } select * from data_02572 order by key; -insert into data_02572 values (1); -- { serverError UNKNOWN_TABLE } -select * from data_02572 order by key; -1 insert into data_02572 settings materialized_views_ignore_errors=1 values (2); select * from data_02572 order by key; +2 +-- check system.query_views_log +system flush logs; +-- lower(status) to pass through clickhouse-test "exception" check +select lower(status::String), errorCodeToName(exception_code) +from system.query_views_log where + view_name = concatWithSeparator('.', currentDatabase(), 'push_to_proxy_mv_02572') and + view_target = concatWithSeparator('.', currentDatabase(), 'proxy_02572') + order by event_date, event_time +; +exceptionwhileprocessing UNKNOWN_TABLE +-- materialized_views_ignore_errors=0 +insert into data_02572 values (1); -- { serverError UNKNOWN_TABLE } +select * from data_02572 order by key; 1 2 create table receiver_02572 as data_02572; diff --git a/tests/queries/0_stateless/02572_materialized_views_ignore_errors.sql b/tests/queries/0_stateless/02572_materialized_views_ignore_errors.sql index 41fa9e32d1c..2d1f824b9b1 100644 --- a/tests/queries/0_stateless/02572_materialized_views_ignore_errors.sql +++ b/tests/queries/0_stateless/02572_materialized_views_ignore_errors.sql @@ -17,11 +17,21 @@ create materialized view push_to_proxy_mv_02572 to proxy_02572 as select * from -- { echoOn } select * from data_02572 order by key; -insert into data_02572 values (1); -- { serverError UNKNOWN_TABLE } -select * from data_02572 order by key; - insert into data_02572 settings materialized_views_ignore_errors=1 values (2); select * from data_02572 order by key; +-- check system.query_views_log +system flush logs; +-- lower(status) to pass through clickhouse-test "exception" check +select lower(status::String), errorCodeToName(exception_code) +from system.query_views_log where + view_name = concatWithSeparator('.', currentDatabase(), 'push_to_proxy_mv_02572') and + view_target = concatWithSeparator('.', currentDatabase(), 'proxy_02572') + order by event_date, event_time +; + +-- materialized_views_ignore_errors=0 +insert into data_02572 values (1); -- { serverError UNKNOWN_TABLE } +select * from data_02572 order by key; create table receiver_02572 as data_02572; From 83b2f6434107be0852b07b466faeb42f77e8496f Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Tue, 21 Feb 2023 17:23:26 +0100 Subject: [PATCH 125/841] Improve 02572_system_logs_materialized_views_ignore_errors test Signed-off-by: Azat Khuzhin --- ...tem_logs_materialized_views_ignore_errors.reference | 2 ++ ...72_system_logs_materialized_views_ignore_errors.sql | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/queries/0_stateless/02572_system_logs_materialized_views_ignore_errors.reference b/tests/queries/0_stateless/02572_system_logs_materialized_views_ignore_errors.reference index e69de29bb2d..d5446e756a3 100644 --- a/tests/queries/0_stateless/02572_system_logs_materialized_views_ignore_errors.reference +++ b/tests/queries/0_stateless/02572_system_logs_materialized_views_ignore_errors.reference @@ -0,0 +1,2 @@ +10 querystart OK +10 queryfinish OK diff --git a/tests/queries/0_stateless/02572_system_logs_materialized_views_ignore_errors.sql b/tests/queries/0_stateless/02572_system_logs_materialized_views_ignore_errors.sql index d26f86962c4..b7362ac1c33 100644 --- a/tests/queries/0_stateless/02572_system_logs_materialized_views_ignore_errors.sql +++ b/tests/queries/0_stateless/02572_system_logs_materialized_views_ignore_errors.sql @@ -3,15 +3,23 @@ -- Attach MV to system.query_log and check that writing query_log will not fail +set log_queries=1; + drop table if exists log_proxy_02572; drop table if exists push_to_logs_proxy_mv_02572; create table log_proxy_02572 as system.query_log engine=Distributed('test_shard_localhost', currentDatabase(), 'receiver_02572'); create materialized view push_to_logs_proxy_mv_02572 to log_proxy_02572 as select * from system.query_log; -set log_queries=1; +select 1 format Null; system flush logs; system flush logs; drop table log_proxy_02572; drop table push_to_logs_proxy_mv_02572; + +system flush logs; +-- lower() to pass through clickhouse-test "exception" check +select count(), lower(type::String), errorCodeToName(exception_code) + from system.query_log + where current_database = currentDatabase() group by 2, 3; From 4f8da66bb51c0e5f59674b2e2f86dfe49840fe08 Mon Sep 17 00:00:00 2001 From: Anton Popov Date: Tue, 21 Feb 2023 18:25:10 +0000 Subject: [PATCH 126/841] fix unit test with sparse columns --- src/Columns/ColumnSparse.cpp | 1 + src/Columns/tests/gtest_column_sparse.cpp | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Columns/ColumnSparse.cpp b/src/Columns/ColumnSparse.cpp index 0e408fca467..fbab61c879d 100644 --- a/src/Columns/ColumnSparse.cpp +++ b/src/Columns/ColumnSparse.cpp @@ -456,6 +456,7 @@ void ColumnSparse::compareColumn(const IColumn & rhs, size_t rhs_row_num, nullptr, nested_result, direction, nan_direction_hint); const auto & offsets_data = getOffsetsData(); + compare_results.resize(size()); std::fill(compare_results.begin(), compare_results.end(), nested_result[0]); for (size_t i = 0; i < offsets_data.size(); ++i) compare_results[offsets_data[i]] = nested_result[i + 1]; diff --git a/src/Columns/tests/gtest_column_sparse.cpp b/src/Columns/tests/gtest_column_sparse.cpp index b5b226c6862..6062ea51941 100644 --- a/src/Columns/tests/gtest_column_sparse.cpp +++ b/src/Columns/tests/gtest_column_sparse.cpp @@ -327,4 +327,3 @@ TEST(ColumnSparse, GetPermutation) } #undef DUMP_COLUMN -#undef DUMP_NON_DEFAULTS From 3a58951f6446b3aeca13cdc671322f459c4f77a7 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Tue, 21 Feb 2023 19:10:43 +0100 Subject: [PATCH 127/841] Improve documentation for materialized_views_ignore_errors Signed-off-by: Azat Khuzhin --- docs/en/sql-reference/statements/create/view.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/en/sql-reference/statements/create/view.md b/docs/en/sql-reference/statements/create/view.md index 5d54662326a..6e412c13291 100644 --- a/docs/en/sql-reference/statements/create/view.md +++ b/docs/en/sql-reference/statements/create/view.md @@ -67,9 +67,11 @@ Materialized views in ClickHouse use **column names** instead of column order du Materialized views in ClickHouse are implemented more like insert triggers. If there’s some aggregation in the view query, it’s applied only to the batch of freshly inserted data. Any changes to existing data of source table (like update, delete, drop partition, etc.) does not change the materialized view. -By default if the will be an error during pushing to the materialized view the data will not be inserted into the table to which the materialized view is attached. You can change this by setting `materialized_views_ignore_errors=true` setting for your `INSERT` query. +Materialized views in ClickHouse does not have deterministic behaviour in case of errors. This means that blocks that had been already written will be preserved in the destination table, but all blocks after error will not. -`materialized_views_ignore_errors` set to `true` by default for `system.*_log` tables. +By default if pushing to one of views fails, then the INSERT query will fail too, and some blocks may not be written to the destination table. This can be changed using `materialized_views_ignore_errors` setting (you should set it for `INSERT` query), if you will set `materialized_views_ignore_errors=true`, then any errors while pushing to views will be ignored and all blocks will be written to the destination table. + +Also note, that `materialized_views_ignore_errors` set to `true` by default for `system.*_log` tables. ::: If you specify `POPULATE`, the existing table data is inserted into the view when creating it, as if making a `CREATE TABLE ... AS SELECT ...` . Otherwise, the query contains only the data inserted in the table after creating the view. We **do not recommend** using `POPULATE`, since data inserted in the table during the view creation will not be inserted in it. From f5c232707d7e948776a67e761bcf65e19d08e05f Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Tue, 21 Feb 2023 20:04:40 +0100 Subject: [PATCH 128/841] cancel insert queries correctly --- .../PushingAsyncPipelineExecutor.cpp | 4 +- .../Executors/PushingPipelineExecutor.cpp | 4 +- src/Server/GRPCServer.cpp | 5 +- src/Server/TCPHandler.cpp | 15 ++++- src/Storages/StorageReplicatedMergeTree.cpp | 4 +- ...ert_cancellation_native_protocol.reference | 2 + ...434_insert_cancellation_native_protocol.sh | 65 +++++++++++++++++++ 7 files changed, 93 insertions(+), 6 deletions(-) create mode 100644 tests/queries/0_stateless/02434_insert_cancellation_native_protocol.reference create mode 100755 tests/queries/0_stateless/02434_insert_cancellation_native_protocol.sh diff --git a/src/Processors/Executors/PushingAsyncPipelineExecutor.cpp b/src/Processors/Executors/PushingAsyncPipelineExecutor.cpp index 54c1e7bf30f..20f47c6b54c 100644 --- a/src/Processors/Executors/PushingAsyncPipelineExecutor.cpp +++ b/src/Processors/Executors/PushingAsyncPipelineExecutor.cpp @@ -139,9 +139,11 @@ PushingAsyncPipelineExecutor::PushingAsyncPipelineExecutor(QueryPipeline & pipel PushingAsyncPipelineExecutor::~PushingAsyncPipelineExecutor() { + /// It must be finalized explicitly. Otherwise we cancel it assuming it's due to an exception. + chassert(finished || std::uncaught_exceptions()); try { - finish(); + cancel(); } catch (...) { diff --git a/src/Processors/Executors/PushingPipelineExecutor.cpp b/src/Processors/Executors/PushingPipelineExecutor.cpp index d9a14704cd0..ca60932ed6f 100644 --- a/src/Processors/Executors/PushingPipelineExecutor.cpp +++ b/src/Processors/Executors/PushingPipelineExecutor.cpp @@ -63,9 +63,11 @@ PushingPipelineExecutor::PushingPipelineExecutor(QueryPipeline & pipeline_) : pi PushingPipelineExecutor::~PushingPipelineExecutor() { + /// It must be finalized explicitly. Otherwise we cancel it assuming it's due to an exception. + chassert(finished || std::uncaught_exceptions()); try { - finish(); + cancel(); } catch (...) { diff --git a/src/Server/GRPCServer.cpp b/src/Server/GRPCServer.cpp index 595f5a8c2b7..9a4e43b2fde 100644 --- a/src/Server/GRPCServer.cpp +++ b/src/Server/GRPCServer.cpp @@ -984,7 +984,10 @@ namespace executor.push(block); } - executor.finish(); + if (isQueryCancelled()) + executor.cancel(); + else + executor.finish(); } void Call::initializePipeline(const Block & header) diff --git a/src/Server/TCPHandler.cpp b/src/Server/TCPHandler.cpp index f76c342fa9a..f1340764e00 100644 --- a/src/Server/TCPHandler.cpp +++ b/src/Server/TCPHandler.cpp @@ -109,6 +109,7 @@ namespace ErrorCodes extern const int UNEXPECTED_PACKET_FROM_CLIENT; extern const int UNKNOWN_PROTOCOL; extern const int AUTHENTICATION_FAILED; + extern const int QUERY_WAS_CANCELLED; } TCPHandler::TCPHandler(IServer & server_, TCPServer & tcp_server_, const Poco::Net::StreamSocket & socket_, bool parse_proxy_protocol_, std::string server_display_name_) @@ -658,6 +659,7 @@ bool TCPHandler::readDataNext() { LOG_INFO(log, "Client has dropped the connection, cancel the query."); state.is_connection_closed = true; + state.is_cancelled = true; break; } @@ -701,6 +703,9 @@ void TCPHandler::readData() while (readDataNext()) ; + + if (state.is_cancelled) + throw Exception(ErrorCodes::QUERY_WAS_CANCELLED, "Query was cancelled"); } @@ -711,6 +716,9 @@ void TCPHandler::skipData() while (readDataNext()) ; + + if (state.is_cancelled) + throw Exception(ErrorCodes::QUERY_WAS_CANCELLED, "Query was cancelled"); } @@ -747,7 +755,10 @@ void TCPHandler::processInsertQuery() while (readDataNext()) executor.push(std::move(state.block_for_insert)); - executor.finish(); + if (state.is_cancelled) + executor.cancel(); + else + executor.finish(); }; if (num_threads > 1) @@ -1314,6 +1325,8 @@ bool TCPHandler::receivePacket() std::this_thread::sleep_for(ms); } + state.is_cancelled = true; + return false; } diff --git a/src/Storages/StorageReplicatedMergeTree.cpp b/src/Storages/StorageReplicatedMergeTree.cpp index db99007cb4f..b8e889d6182 100644 --- a/src/Storages/StorageReplicatedMergeTree.cpp +++ b/src/Storages/StorageReplicatedMergeTree.cpp @@ -794,7 +794,7 @@ bool StorageReplicatedMergeTree::createTableIfNotExists(const StorageMetadataPtr auto code = zookeeper->tryMulti(ops, responses); if (code == Coordination::Error::ZNODEEXISTS) { - LOG_WARNING(log, "It looks like the table {} was created by another server at the same moment, will retry", zookeeper_path); + LOG_INFO(log, "It looks like the table {} was created by another server at the same moment, will retry", zookeeper_path); continue; } else if (code != Coordination::Error::ZOK) @@ -874,7 +874,7 @@ void StorageReplicatedMergeTree::createReplica(const StorageMetadataPtr & metada case Coordination::Error::ZNODEEXISTS: throw Exception(ErrorCodes::REPLICA_ALREADY_EXISTS, "Replica {} already exists", replica_path); case Coordination::Error::ZBADVERSION: - LOG_ERROR(log, "Retrying createReplica(), because some other replicas were created at the same time"); + LOG_INFO(log, "Retrying createReplica(), because some other replicas were created at the same time"); break; case Coordination::Error::ZNONODE: throw Exception(ErrorCodes::ALL_REPLICAS_LOST, "Table {} was suddenly removed", zookeeper_path); diff --git a/tests/queries/0_stateless/02434_insert_cancellation_native_protocol.reference b/tests/queries/0_stateless/02434_insert_cancellation_native_protocol.reference new file mode 100644 index 00000000000..e3038e03530 --- /dev/null +++ b/tests/queries/0_stateless/02434_insert_cancellation_native_protocol.reference @@ -0,0 +1,2 @@ +5000000 +5000000 diff --git a/tests/queries/0_stateless/02434_insert_cancellation_native_protocol.sh b/tests/queries/0_stateless/02434_insert_cancellation_native_protocol.sh new file mode 100755 index 00000000000..4eb02c38c1a --- /dev/null +++ b/tests/queries/0_stateless/02434_insert_cancellation_native_protocol.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env bash +# shellcheck disable=SC2009 + +CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +# shellcheck source=../shell_config.sh +. "$CURDIR"/../shell_config.sh + +export DATA_FILE="$CLICKHOUSE_TMP/deduptest.tsv" +export TEST_MARK="02434_insert_${CLICKHOUSE_DATABASE}_" + +$CLICKHOUSE_CLIENT -q 'select * from numbers(5000000) format TSV' > $DATA_FILE +$CLICKHOUSE_CLIENT -q 'create table dedup_test(A Int64) Engine = MergeTree order by A settings non_replicated_deduplication_window=1000;' +$CLICKHOUSE_CLIENT --max_block_size=100000 --min_chunk_bytes_for_parallel_parsing=10000 -q 'insert into dedup_test format TSV' < $DATA_FILE +$CLICKHOUSE_CLIENT -q 'select count() from dedup_test' + +function thread_insert +{ + # supress "Killed" messages from bash + function wrap + { + $CLICKHOUSE_CLIENT --max_block_size=100000 --min_chunk_bytes_for_parallel_parsing=10000 --query_id="$ID" -q 'insert into dedup_test format TSV' < $DATA_FILE + } + export -f wrap + while true; do + export ID="$TEST_MARK$RANDOM" + bash -c wrap 2>&1| grep -Fav "Killed" + done +} + +function thread_select +{ + while true; do + $CLICKHOUSE_CLIENT -q "with (select count() from dedup_test) as c select throwIf(c != 5000000, 'Expected 5000000 rows, got ' || toString(c)) format Null" + sleep 0.$RANDOM; + done +} + +function thread_cancel +{ + while true; do + SIGNAL="INT" + if (( RANDOM % 2 )); then + SIGNAL="KILL" + fi + PID=$(ps -ef | grep "$TEST_MARK" | grep -v grep | awk '{print $2}') + if [ ! -z "$PID" ]; then kill -s "$SIGNAL" "$PID" || echo "$PID"; fi + sleep 0.$RANDOM; + sleep 0.$RANDOM; + sleep 0.$RANDOM; + done +} + +export -f thread_insert; +export -f thread_select; +export -f thread_cancel; + +TIMEOUT=30 + +timeout $TIMEOUT bash -c thread_insert & +timeout $TIMEOUT bash -c thread_select & +timeout $TIMEOUT bash -c thread_cancel & + +wait + +$CLICKHOUSE_CLIENT -q 'select count() from dedup_test' From cf493d1dfb83e66af712986f6346d8812da7420f Mon Sep 17 00:00:00 2001 From: Yakov Olkhovskiy Date: Tue, 21 Feb 2023 22:36:02 +0000 Subject: [PATCH 129/841] replace settings limit and offset with corresponding expression nodes --- src/Analyzer/QueryTreeBuilder.cpp | 65 +++++++++++++++---- src/Common/SettingsChanges.cpp | 25 +++++++ src/Common/SettingsChanges.h | 7 ++ src/Planner/Planner.cpp | 5 -- .../02667_analyzer_limit_settings.reference | 16 +++++ .../02667_analyzer_limit_settings.sql | 6 ++ 6 files changed, 107 insertions(+), 17 deletions(-) diff --git a/src/Analyzer/QueryTreeBuilder.cpp b/src/Analyzer/QueryTreeBuilder.cpp index 57b1ae1c994..e9e084615ca 100644 --- a/src/Analyzer/QueryTreeBuilder.cpp +++ b/src/Analyzer/QueryTreeBuilder.cpp @@ -233,22 +233,43 @@ QueryTreeNodePtr QueryTreeBuilder::buildSelectExpression(const ASTPtr & select_q auto select_settings = select_query_typed.settings(); SettingsChanges settings_changes; - if (is_subquery) + /// We are going to remove settings LIMIT and OFFSET and + /// further replace them with corresponding expression nodes + UInt64 limit = 0; + UInt64 offset = 0; + + /// remove global settings limit and offset + if (const Settings & settings_ref = updated_context->getSettingsRef(); settings_ref.limit || settings_ref.offset) { - if (const Settings & settings_ref = updated_context->getSettingsRef(); settings_ref.limit || settings_ref.offset) - { - Settings settings = updated_context->getSettings(); - settings.limit = 0; - settings.offset = 0; - updated_context->setSettings(settings); - } + Settings settings = updated_context->getSettings(); + limit = settings.limit; + offset = settings.offset; + settings.limit = 0; + settings.offset = 0; + updated_context->setSettings(settings); } if (select_settings) { auto & set_query = select_settings->as(); - updated_context->applySettingsChanges(set_query.changes); - settings_changes = set_query.changes; + + /// remove expression settings limit and offset + if (auto * limit_field = set_query.changes.tryGet("limit")) + { + limit = limit_field->safeGet(); + set_query.changes.removeSetting("limit"); + } + if (auto * offset_field = set_query.changes.tryGet("offset")) + { + offset = offset_field->safeGet(); + set_query.changes.removeSetting("offset"); + } + + if (!set_query.changes.empty()) + { + updated_context->applySettingsChanges(set_query.changes); + settings_changes = set_query.changes; + } } auto current_query_tree = std::make_shared(std::move(updated_context), std::move(settings_changes)); @@ -334,12 +355,32 @@ QueryTreeNodePtr QueryTreeBuilder::buildSelectExpression(const ASTPtr & select_q if (select_limit_by) current_query_tree->getLimitByNode() = buildExpressionList(select_limit_by, current_context); + /// combine limit expression with limit setting auto select_limit = select_query_typed.limitLength(); - if (select_limit) + if (select_limit && limit) + { + auto function_node = std::make_shared("least"); + function_node->getArguments().getNodes().push_back(buildExpression(select_limit, current_context)); + function_node->getArguments().getNodes().push_back(std::make_shared(limit)); + current_query_tree->getLimit() = function_node; + } + else if (limit) + current_query_tree->getLimit() = std::make_shared(limit); + else if (select_limit) current_query_tree->getLimit() = buildExpression(select_limit, current_context); + /// combine offset expression with offset setting auto select_offset = select_query_typed.limitOffset(); - if (select_offset) + if (select_offset && offset) + { + auto function_node = std::make_shared("plus"); + function_node->getArguments().getNodes().push_back(buildExpression(select_offset, current_context)); + function_node->getArguments().getNodes().push_back(std::make_shared(offset)); + current_query_tree->getOffset() = function_node; + } + else if (offset) + current_query_tree->getOffset() = std::make_shared(offset); + else if (select_offset) current_query_tree->getOffset() = buildExpression(select_offset, current_context); return current_query_tree; diff --git a/src/Common/SettingsChanges.cpp b/src/Common/SettingsChanges.cpp index 9fb4f361e09..45490f86abc 100644 --- a/src/Common/SettingsChanges.cpp +++ b/src/Common/SettingsChanges.cpp @@ -46,4 +46,29 @@ Field * SettingsChanges::tryGet(std::string_view name) return &change->value; } +bool SettingsChanges::insertSetting(std::string_view name, const Field & value) +{ + if (std::find_if(begin(), end(), [&name](const SettingChange & change) { return change.name == name; }) != end()) + return false; + emplace_back(name, value); + return true; +} + +void SettingsChanges::setSetting(std::string_view name, const Field & value) +{ + if (auto * v = tryGet(name)) + *v = value; + else + insertSetting(name, value); +} + +bool SettingsChanges::removeSetting(std::string_view name) +{ + auto it = std::find_if(begin(), end(), [&name](const SettingChange & change) { return change.name == name; }); + if (it == end()) + return false; + erase(it); + return true; +} + } diff --git a/src/Common/SettingsChanges.h b/src/Common/SettingsChanges.h index 776dacb93e8..d16934dbc76 100644 --- a/src/Common/SettingsChanges.h +++ b/src/Common/SettingsChanges.h @@ -28,6 +28,13 @@ public: bool tryGet(std::string_view name, Field & out_value) const; const Field * tryGet(std::string_view name) const; Field * tryGet(std::string_view name); + + /// inserts element if doesn't exists and returns true, else just returns false + bool insertSetting(std::string_view name, const Field & value); + /// sets element to value, inserts if doesn't exist + void setSetting(std::string_view name, const Field & value); + /// if element exists - removes it and returns true, else returns false + bool removeSetting(std::string_view name); }; } diff --git a/src/Planner/Planner.cpp b/src/Planner/Planner.cpp index 7c2a3ffed78..307e8d73b29 100644 --- a/src/Planner/Planner.cpp +++ b/src/Planner/Planner.cpp @@ -216,17 +216,12 @@ public: limit_length = query_node.getLimit()->as().getValue().safeGet(); } - if (settings.limit) - limit_length = limit_length ? std::min(limit_length, settings.limit.value) : settings.limit; - if (query_node.hasOffset()) { /// Constness of offset is validated during query analysis stage limit_offset = query_node.getOffset()->as().getValue().safeGet(); } - limit_offset += settings.offset; - /// Partial sort can be done if there is LIMIT, but no DISTINCT, LIMIT WITH TIES, LIMIT BY, ARRAY JOIN if (limit_length != 0 && !query_node.isDistinct() && diff --git a/tests/queries/0_stateless/02667_analyzer_limit_settings.reference b/tests/queries/0_stateless/02667_analyzer_limit_settings.reference index 9e38ed9a59b..6f23097612e 100644 --- a/tests/queries/0_stateless/02667_analyzer_limit_settings.reference +++ b/tests/queries/0_stateless/02667_analyzer_limit_settings.reference @@ -52,3 +52,19 @@ SELECT count(*) FROM view(SELECT * FROM numbers(10) SETTINGS limit=5); 5 SELECT count(*) FROM view(SELECT * FROM numbers(10)) SETTINGS limit=5; 10 +SET limit = 4; +SET offset = 1; +SELECT * FROM numbers(10); +1 +2 +3 +4 +SELECT * FROM numbers(10) LIMIT 3 OFFSET 2; +3 +4 +5 +SELECT * FROM numbers(10) LIMIT 5 OFFSET 2; +3 +4 +5 +6 diff --git a/tests/queries/0_stateless/02667_analyzer_limit_settings.sql b/tests/queries/0_stateless/02667_analyzer_limit_settings.sql index 35dd65ab33e..7c02c2d0d20 100644 --- a/tests/queries/0_stateless/02667_analyzer_limit_settings.sql +++ b/tests/queries/0_stateless/02667_analyzer_limit_settings.sql @@ -21,4 +21,10 @@ SELECT count(*) FROM (SELECT * FROM numbers(10)) SETTINGS limit=5; SELECT count(*) FROM view(SELECT * FROM numbers(10)); SELECT count(*) FROM view(SELECT * FROM numbers(10) SETTINGS limit=5); SELECT count(*) FROM view(SELECT * FROM numbers(10)) SETTINGS limit=5; + +SET limit = 4; +SET offset = 1; +SELECT * FROM numbers(10); +SELECT * FROM numbers(10) LIMIT 3 OFFSET 2; +SELECT * FROM numbers(10) LIMIT 5 OFFSET 2; -- { echoOff } From 592af6d652b69c8e5b18e2a8578ac76cbfcffe71 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Wed, 22 Feb 2023 02:34:03 +0100 Subject: [PATCH 130/841] fix incomplete interst through http --- src/Common/StatusFile.cpp | 2 +- src/Core/MySQL/IMySQLReadPacket.cpp | 4 +- src/IO/LimitReadBuffer.cpp | 24 +++++-- src/IO/LimitReadBuffer.h | 8 ++- src/Interpreters/executeQuery.cpp | 2 +- src/Server/HTTP/HTTPServerRequest.cpp | 15 +++- src/Server/MySQLHandler.cpp | 2 +- src/Server/TCPHandler.cpp | 2 +- src/Storages/StorageLog.cpp | 2 +- .../02435_insert_cancellation_http.reference | 2 + .../02435_insert_cancellation_http.sh | 69 +++++++++++++++++++ 11 files changed, 114 insertions(+), 18 deletions(-) create mode 100644 tests/queries/0_stateless/02435_insert_cancellation_http.reference create mode 100755 tests/queries/0_stateless/02435_insert_cancellation_http.sh diff --git a/src/Common/StatusFile.cpp b/src/Common/StatusFile.cpp index d90d50ff96d..e71056fcaa3 100644 --- a/src/Common/StatusFile.cpp +++ b/src/Common/StatusFile.cpp @@ -51,7 +51,7 @@ StatusFile::StatusFile(std::string path_, FillFunction fill_) std::string contents; { ReadBufferFromFile in(path, 1024); - LimitReadBuffer limit_in(in, 1024, false); + LimitReadBuffer limit_in(in, 1024, /* trow_exception */ false, /* exact_limit */ false); readStringUntilEOF(contents, limit_in); } diff --git a/src/Core/MySQL/IMySQLReadPacket.cpp b/src/Core/MySQL/IMySQLReadPacket.cpp index 74f309d0294..c99ae11688b 100644 --- a/src/Core/MySQL/IMySQLReadPacket.cpp +++ b/src/Core/MySQL/IMySQLReadPacket.cpp @@ -33,13 +33,13 @@ void IMySQLReadPacket::readPayloadWithUnpacked(ReadBuffer & in) void LimitedReadPacket::readPayload(ReadBuffer &in, uint8_t &sequence_id) { - LimitReadBuffer limited(in, 10000, true, "too long MySQL packet."); + LimitReadBuffer limited(in, 10000, /* trow_exception */ true, /* exact_limit */ false, "too long MySQL packet."); IMySQLReadPacket::readPayload(limited, sequence_id); } void LimitedReadPacket::readPayloadWithUnpacked(ReadBuffer & in) { - LimitReadBuffer limited(in, 10000, true, "too long MySQL packet."); + LimitReadBuffer limited(in, 10000, /* trow_exception */ true, /* exact_limit */ false, "too long MySQL packet."); IMySQLReadPacket::readPayloadWithUnpacked(limited); } diff --git a/src/IO/LimitReadBuffer.cpp b/src/IO/LimitReadBuffer.cpp index 6b3c383c753..96e2c359b58 100644 --- a/src/IO/LimitReadBuffer.cpp +++ b/src/IO/LimitReadBuffer.cpp @@ -9,6 +9,7 @@ namespace DB namespace ErrorCodes { extern const int LIMIT_EXCEEDED; + extern const int CANNOT_READ_ALL_DATA; } @@ -21,14 +22,22 @@ bool LimitReadBuffer::nextImpl() if (bytes >= limit) { + if (exact_limit && bytes == limit) + return false; + + if (exact_limit && bytes != limit) + throw Exception(ErrorCodes::CANNOT_READ_ALL_DATA, "Unexpected data, got {} bytes, expected {}", bytes, limit); + if (throw_exception) throw Exception(ErrorCodes::LIMIT_EXCEEDED, "Limit for LimitReadBuffer exceeded: {}", exception_message); - else - return false; + + return false; } if (!in->next()) { + if (exact_limit && bytes != limit) + throw Exception(ErrorCodes::CANNOT_READ_ALL_DATA, "Unexpected EOF, got {} of {} bytes", bytes, limit); /// Clearing the buffer with existing data. set(in->position(), 0); return false; @@ -43,12 +52,13 @@ bool LimitReadBuffer::nextImpl() } -LimitReadBuffer::LimitReadBuffer(ReadBuffer * in_, bool owns, UInt64 limit_, bool throw_exception_, std::string exception_message_) +LimitReadBuffer::LimitReadBuffer(ReadBuffer * in_, bool owns, UInt64 limit_, bool throw_exception_, bool exact_limit_, std::string exception_message_) : ReadBuffer(in_ ? in_->position() : nullptr, 0) , in(in_) , owns_in(owns) , limit(limit_) , throw_exception(throw_exception_) + , exact_limit(exact_limit_) , exception_message(std::move(exception_message_)) { assert(in); @@ -61,14 +71,14 @@ LimitReadBuffer::LimitReadBuffer(ReadBuffer * in_, bool owns, UInt64 limit_, boo } -LimitReadBuffer::LimitReadBuffer(ReadBuffer & in_, UInt64 limit_, bool throw_exception_, std::string exception_message_) - : LimitReadBuffer(&in_, false, limit_, throw_exception_, exception_message_) +LimitReadBuffer::LimitReadBuffer(ReadBuffer & in_, UInt64 limit_, bool throw_exception_, bool exact_limit_, std::string exception_message_) + : LimitReadBuffer(&in_, false, limit_, throw_exception_, exact_limit_, exception_message_) { } -LimitReadBuffer::LimitReadBuffer(std::unique_ptr in_, UInt64 limit_, bool throw_exception_, std::string exception_message_) - : LimitReadBuffer(in_.release(), true, limit_, throw_exception_, exception_message_) +LimitReadBuffer::LimitReadBuffer(std::unique_ptr in_, UInt64 limit_, bool throw_exception_, bool exact_limit_, std::string exception_message_) + : LimitReadBuffer(in_.release(), true, limit_, throw_exception_, exact_limit_, exception_message_) { } diff --git a/src/IO/LimitReadBuffer.h b/src/IO/LimitReadBuffer.h index 92e5fbb0aa6..0f99bf2a08d 100644 --- a/src/IO/LimitReadBuffer.h +++ b/src/IO/LimitReadBuffer.h @@ -13,8 +13,9 @@ namespace DB class LimitReadBuffer : public ReadBuffer { public: - LimitReadBuffer(ReadBuffer & in_, UInt64 limit_, bool throw_exception_, std::string exception_message_ = {}); - LimitReadBuffer(std::unique_ptr in_, UInt64 limit_, bool throw_exception_, std::string exception_message_ = {}); + LimitReadBuffer(ReadBuffer & in_, UInt64 limit_, bool throw_exception_, bool exact_limit_, std::string exception_message_ = {}); + LimitReadBuffer(std::unique_ptr in_, UInt64 limit_, bool throw_exception_, bool exact_limit_, + std::string exception_message_ = {}); ~LimitReadBuffer() override; private: @@ -23,9 +24,10 @@ private: UInt64 limit; bool throw_exception; + bool exact_limit; std::string exception_message; - LimitReadBuffer(ReadBuffer * in_, bool owns, UInt64 limit_, bool throw_exception_, std::string exception_message_); + LimitReadBuffer(ReadBuffer * in_, bool owns, UInt64 limit_, bool throw_exception_, bool exact_limit_, std::string exception_message_); bool nextImpl() override; }; diff --git a/src/Interpreters/executeQuery.cpp b/src/Interpreters/executeQuery.cpp index 3bb46462353..aeaacf35051 100644 --- a/src/Interpreters/executeQuery.cpp +++ b/src/Interpreters/executeQuery.cpp @@ -1237,7 +1237,7 @@ void executeQuery( /// If not - copy enough data into 'parse_buf'. WriteBufferFromVector> out(parse_buf); - LimitReadBuffer limit(istr, max_query_size + 1, false); + LimitReadBuffer limit(istr, max_query_size + 1, /* trow_exception */ false, /* exact_limit */ false); copyData(limit, out); out.finalize(); diff --git a/src/Server/HTTP/HTTPServerRequest.cpp b/src/Server/HTTP/HTTPServerRequest.cpp index a82eb95aee1..d2e19d594dc 100644 --- a/src/Server/HTTP/HTTPServerRequest.cpp +++ b/src/Server/HTTP/HTTPServerRequest.cpp @@ -12,6 +12,8 @@ #include #include +#include + #if USE_SSL #include #include @@ -44,12 +46,23 @@ HTTPServerRequest::HTTPServerRequest(HTTPContextPtr context, HTTPServerResponse readRequest(*in); /// Try parse according to RFC7230 + /// If a client crashes, most systems will gracefully terminate the connection with FIN just like it's done on close(). + /// So we will get 0 from recv(...) and will not be able to understand that something went wrong (well, we probably + /// will get RST later on attempt to write to the socket that closed on the other side, but it will happen when the query is finished). + /// If we are extremely unlucky and data format is TSV, for example, then we may stop parsing exactly between rows + /// and decide that it's EOF (but it is not). It may break deduplication, because clients cannot control it + /// and retry with exactly the same (incomplete) set of rows. + /// That's why we have to check body size if it's provided. if (getChunkedTransferEncoding()) stream = std::make_unique(std::move(in), context->getMaxChunkSize()); else if (hasContentLength()) - stream = std::make_unique(std::move(in), getContentLength(), false); + stream = std::make_unique(std::move(in), getContentLength(), /* trow_exception */ true, /* exact_limit */ true); else if (getMethod() != HTTPRequest::HTTP_GET && getMethod() != HTTPRequest::HTTP_HEAD && getMethod() != HTTPRequest::HTTP_DELETE) + { stream = std::move(in); + LOG_WARNING(&Poco::Logger::get("HTTPServerRequest"), "Got an HTTP request with no content length, " + "it may be impossible to distinguish graceful EOF from abnormal connection loss"); + } else /// We have to distinguish empty buffer and nullptr. stream = std::make_unique(); diff --git a/src/Server/MySQLHandler.cpp b/src/Server/MySQLHandler.cpp index 3715d658730..279896da9fa 100644 --- a/src/Server/MySQLHandler.cpp +++ b/src/Server/MySQLHandler.cpp @@ -155,7 +155,7 @@ void MySQLHandler::run() payload.readStrict(command); // For commands which are executed without MemoryTracker. - LimitReadBuffer limited_payload(payload, 10000, true, "too long MySQL packet."); + LimitReadBuffer limited_payload(payload, 10000, /* trow_exception */ true, /* exact_limit */ false, "too long MySQL packet."); LOG_DEBUG(log, "Received command: {}. Connection id: {}.", static_cast(static_cast(command)), connection_id); diff --git a/src/Server/TCPHandler.cpp b/src/Server/TCPHandler.cpp index f1340764e00..3e89d1810c7 100644 --- a/src/Server/TCPHandler.cpp +++ b/src/Server/TCPHandler.cpp @@ -1057,7 +1057,7 @@ bool TCPHandler::receiveProxyHeader() /// Only PROXYv1 is supported. /// Validation of protocol is not fully performed. - LimitReadBuffer limit_in(*in, 107, true); /// Maximum length from the specs. + LimitReadBuffer limit_in(*in, 107, /* trow_exception */ true, /* exact_limit */ false); /// Maximum length from the specs. assertString("PROXY ", limit_in); diff --git a/src/Storages/StorageLog.cpp b/src/Storages/StorageLog.cpp index f2eca42ed0b..388faf1aeb5 100644 --- a/src/Storages/StorageLog.cpp +++ b/src/Storages/StorageLog.cpp @@ -118,7 +118,7 @@ private: if (limited_by_file_size) { - limited.emplace(*plain, file_size - offset, false); + limited.emplace(*plain, file_size - offset, /* trow_exception */ false, /* exact_limit */ false); compressed.emplace(*limited); } else diff --git a/tests/queries/0_stateless/02435_insert_cancellation_http.reference b/tests/queries/0_stateless/02435_insert_cancellation_http.reference new file mode 100644 index 00000000000..e3038e03530 --- /dev/null +++ b/tests/queries/0_stateless/02435_insert_cancellation_http.reference @@ -0,0 +1,2 @@ +5000000 +5000000 diff --git a/tests/queries/0_stateless/02435_insert_cancellation_http.sh b/tests/queries/0_stateless/02435_insert_cancellation_http.sh new file mode 100755 index 00000000000..653ec59f491 --- /dev/null +++ b/tests/queries/0_stateless/02435_insert_cancellation_http.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +# shellcheck disable=SC2009 + +CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +# shellcheck source=../shell_config.sh +. "$CURDIR"/../shell_config.sh + +export DATA_FILE="$CLICKHOUSE_TMP/deduptest.tsv" +export TEST_MARK="02435_insert_${CLICKHOUSE_DATABASE}_" + +$CLICKHOUSE_CLIENT -q 'select * from numbers(5000000) format TSV' > $DATA_FILE +$CLICKHOUSE_CLIENT -q 'create table dedup_test(A Int64) Engine = MergeTree order by A settings non_replicated_deduplication_window=1000;' +$CLICKHOUSE_CURL -sS -X POST --data-binary @- "$CLICKHOUSE_URL&max_insert_block_size=100000&input_format_parallel_parsing=0&query=insert+into+dedup_test+format+TSV" < $DATA_FILE +$CLICKHOUSE_CLIENT -q 'select count() from dedup_test' + +function thread_insert +{ + # supress "Killed" messages from bash + function wrap + { + if (( RANDOM % 2 )); then + $CLICKHOUSE_CURL -sS -X POST --data-binary @- "$CLICKHOUSE_URL&query_id=$ID&max_insert_block_size=100000&input_format_parallel_parsing=0&query=insert+into+dedup_test+format+TSV" < $DATA_FILE + else + $CLICKHOUSE_CURL -sS -X POST -H "Transfer-Encoding: chunked" --data-binary @- "$CLICKHOUSE_URL&query_id=$ID&max_insert_block_size=100000&input_format_parallel_parsing=0&query=insert+into+dedup_test+format+TSV" < $DATA_FILE + fi + } + export -f wrap + while true; do + export ID="$TEST_MARK$RANDOM" + bash -c wrap 2>&1| grep -Fav "Killed" + done +} + +function thread_select +{ + while true; do + $CLICKHOUSE_CLIENT -q "with (select count() from dedup_test) as c select throwIf(c != 5000000, 'Expected 5000000 rows, got ' || toString(c)) format Null" + sleep 0.$RANDOM; + done +} + +function thread_cancel +{ + while true; do + SIGNAL="INT" + if (( RANDOM % 2 )); then + SIGNAL="KILL" + fi + PID=$(ps -ef | grep "$TEST_MARK" | grep -v grep | awk '{print $2}') + if [ ! -z "$PID" ]; then kill -s "$SIGNAL" "$PID" || echo "$PID"; fi + sleep 0.$RANDOM; + sleep 0.$RANDOM; + sleep 0.$RANDOM; + done +} + +export -f thread_insert; +export -f thread_select; +export -f thread_cancel; + +TIMEOUT=30 + +timeout $TIMEOUT bash -c thread_insert & +timeout $TIMEOUT bash -c thread_select & +timeout $TIMEOUT bash -c thread_cancel & + +wait + +$CLICKHOUSE_CLIENT -q 'select count() from dedup_test' From f93b95c6ab771d1acb6fd01f13fc18ed8598c34c Mon Sep 17 00:00:00 2001 From: "ducle.canh" Date: Wed, 22 Feb 2023 10:32:47 +0800 Subject: [PATCH 131/841] fix aggre arithmetic operations in aggregate optimization --- ...egateFunctionsArithmericOperationsPass.cpp | 41 ++++++++++--------- .../ArithmeticOperationsInAgrFuncOptimize.cpp | 19 ++++++--- ...nctions_arithmetic_operators_bug.reference | 2 + ...ate_functions_arithmetic_operators_bug.sql | 2 + 4 files changed, 38 insertions(+), 26 deletions(-) create mode 100644 tests/queries/0_stateless/02498_aggregate_functions_arithmetic_operators_bug.reference create mode 100644 tests/queries/0_stateless/02498_aggregate_functions_arithmetic_operators_bug.sql diff --git a/src/Analyzer/Passes/AggregateFunctionsArithmericOperationsPass.cpp b/src/Analyzer/Passes/AggregateFunctionsArithmericOperationsPass.cpp index df96d83316c..1476a66c892 100644 --- a/src/Analyzer/Passes/AggregateFunctionsArithmericOperationsPass.cpp +++ b/src/Analyzer/Passes/AggregateFunctionsArithmericOperationsPass.cpp @@ -102,19 +102,21 @@ public: if (!left_argument_constant_node && !right_argument_constant_node) return; - /** If we extract negative constant, aggregate function name must be updated. + /** Need reverse max <-> min for: * - * Example: SELECT min(-1 * id); - * Result: SELECT -1 * max(id); + * max(-1*value) -> -1*min(value) + * max(value/-2) -> min(value)/-2 + * max(1-value) -> 1-min(value) */ - std::string aggregate_function_name_if_constant_is_negative; - if (arithmetic_function_name == "multiply" || arithmetic_function_name == "divide") + auto get_reverse_aggregate_function_name = [](const std::string & aggregate_function_name) -> std::string { - if (lower_aggregate_function_name == "min") - aggregate_function_name_if_constant_is_negative = "max"; - else if (lower_aggregate_function_name == "max") - aggregate_function_name_if_constant_is_negative = "min"; - } + if (aggregate_function_name == "min") + return "max"; + else if (aggregate_function_name == "max") + return "min"; + else + return aggregate_function_name; + }; size_t arithmetic_function_argument_index = 0; @@ -126,11 +128,11 @@ public: /// Rewrite `aggregate_function(inner_function(constant, argument))` into `inner_function(constant, aggregate_function(argument))` const auto & left_argument_constant_value_literal = left_argument_constant_node->getValue(); - if (!aggregate_function_name_if_constant_is_negative.empty() && - left_argument_constant_value_literal < zeroField(left_argument_constant_value_literal)) - { - lower_aggregate_function_name = aggregate_function_name_if_constant_is_negative; - } + bool need_reverse = (arithmetic_function_name == "multiply" && left_argument_constant_value_literal < zeroField(left_argument_constant_value_literal)) + || (arithmetic_function_name == "minus"); + + if (need_reverse) + lower_aggregate_function_name = get_reverse_aggregate_function_name(lower_aggregate_function_name); arithmetic_function_argument_index = 1; } @@ -138,11 +140,10 @@ public: { /// Rewrite `aggregate_function(inner_function(argument, constant))` into `inner_function(aggregate_function(argument), constant)` const auto & right_argument_constant_value_literal = right_argument_constant_node->getValue(); - if (!aggregate_function_name_if_constant_is_negative.empty() && - right_argument_constant_value_literal < zeroField(right_argument_constant_value_literal)) - { - lower_aggregate_function_name = aggregate_function_name_if_constant_is_negative; - } + bool need_reverse = (arithmetic_function_name == "multiply" || arithmetic_function_name == "divide") && right_argument_constant_value_literal < zeroField(right_argument_constant_value_literal); + + if (need_reverse) + lower_aggregate_function_name = get_reverse_aggregate_function_name(lower_aggregate_function_name); arithmetic_function_argument_index = 0; } diff --git a/src/Interpreters/ArithmeticOperationsInAgrFuncOptimize.cpp b/src/Interpreters/ArithmeticOperationsInAgrFuncOptimize.cpp index 66e0813b977..fc4fa166f3d 100644 --- a/src/Interpreters/ArithmeticOperationsInAgrFuncOptimize.cpp +++ b/src/Interpreters/ArithmeticOperationsInAgrFuncOptimize.cpp @@ -73,11 +73,11 @@ Field zeroField(const Field & value) throw Exception(ErrorCodes::BAD_TYPE_OF_FIELD, "Unexpected literal type in function"); } -const String & changeNameIfNeeded(const String & func_name, const String & child_name, const ASTLiteral & literal) +const String & changeNameIfNeeded(const String & func_name, const String & child_name, bool need_reverse) { static const std::unordered_map> matches = { - { "min", { "multiply", "divide" } }, - { "max", { "multiply", "divide" } } + { "min", { "multiply", "divide", "minus" } }, + { "max", { "multiply", "divide", "minus" } } }; static const std::unordered_map swap_to = { @@ -85,7 +85,7 @@ const String & changeNameIfNeeded(const String & func_name, const String & child { "max", "min" } }; - if (literal.value < zeroField(literal.value) && matches.contains(func_name) && matches.find(func_name)->second.contains(child_name)) + if (need_reverse && matches.contains(func_name) && matches.find(func_name)->second.contains(child_name)) return swap_to.find(func_name)->second; return func_name; @@ -119,13 +119,20 @@ ASTPtr tryExchangeFunctions(const ASTFunction & func) /// It's possible to rewrite 'sum(1/n)' with 'sum(1) * div(1/n)' but we lose accuracy. Ignored. if (child_func->name == "divide") return {}; + /** Need reverse max <-> min for: + * + * max(-1*value) -> -1*min(value) + * max(value/-2) -> min(value)/-2 + * max(1-value) -> 1 - min(value) + */ + bool need_reverse = first_literal->value < zeroField(first_literal->value) || ((lower_name == "min" || lower_name == "max") && child_func->name == "minus"); - const String & new_name = changeNameIfNeeded(lower_name, child_func->name, *first_literal); + const String & new_name = changeNameIfNeeded(lower_name, child_func->name, need_reverse); optimized_ast = exchangeExtractFirstArgument(new_name, *child_func); } else if (second_literal) /// second or both are consts { - const String & new_name = changeNameIfNeeded(lower_name, child_func->name, *second_literal); + const String & new_name = changeNameIfNeeded(lower_name, child_func->name, second_literal->value < zeroField(second_literal->value)); optimized_ast = exchangeExtractSecondArgument(new_name, *child_func); } diff --git a/tests/queries/0_stateless/02498_aggregate_functions_arithmetic_operators_bug.reference b/tests/queries/0_stateless/02498_aggregate_functions_arithmetic_operators_bug.reference new file mode 100644 index 00000000000..53c33afbf47 --- /dev/null +++ b/tests/queries/0_stateless/02498_aggregate_functions_arithmetic_operators_bug.reference @@ -0,0 +1,2 @@ +100 99 +100 99 diff --git a/tests/queries/0_stateless/02498_aggregate_functions_arithmetic_operators_bug.sql b/tests/queries/0_stateless/02498_aggregate_functions_arithmetic_operators_bug.sql new file mode 100644 index 00000000000..15d2115d84d --- /dev/null +++ b/tests/queries/0_stateless/02498_aggregate_functions_arithmetic_operators_bug.sql @@ -0,0 +1,2 @@ +SELECT max(100-number), min(100-number) FROM numbers(2) SETTINGS optimize_arithmetic_operations_in_aggregate_functions = 1; +SELECT max(100-number), min(100-number) FROM numbers(2) SETTINGS optimize_arithmetic_operations_in_aggregate_functions = 1, allow_experimental_analyzer = 1; From 6d70e97d01ae04dc8cb24ade4514c33328be491c Mon Sep 17 00:00:00 2001 From: "ducle.canh" Date: Wed, 22 Feb 2023 13:30:57 +0800 Subject: [PATCH 132/841] fix logic + better test --- .../ArithmeticOperationsInAgrFuncOptimize.cpp | 56 +++++++++---------- ...tic_operations_in_aggr_func_long.reference | 52 ++++++++--------- ...nctions_arithmetic_operators_bug.reference | 2 - ...ate_functions_arithmetic_operators_bug.sql | 2 - ...s_arithmetic_operations_pass_fix.reference | 1 + ...nctions_arithmetic_operations_pass_fix.sql | 2 + 6 files changed, 56 insertions(+), 59 deletions(-) delete mode 100644 tests/queries/0_stateless/02498_aggregate_functions_arithmetic_operators_bug.reference delete mode 100644 tests/queries/0_stateless/02498_aggregate_functions_arithmetic_operators_bug.sql diff --git a/src/Interpreters/ArithmeticOperationsInAgrFuncOptimize.cpp b/src/Interpreters/ArithmeticOperationsInAgrFuncOptimize.cpp index fc4fa166f3d..ef3e6739f8a 100644 --- a/src/Interpreters/ArithmeticOperationsInAgrFuncOptimize.cpp +++ b/src/Interpreters/ArithmeticOperationsInAgrFuncOptimize.cpp @@ -73,24 +73,6 @@ Field zeroField(const Field & value) throw Exception(ErrorCodes::BAD_TYPE_OF_FIELD, "Unexpected literal type in function"); } -const String & changeNameIfNeeded(const String & func_name, const String & child_name, bool need_reverse) -{ - static const std::unordered_map> matches = { - { "min", { "multiply", "divide", "minus" } }, - { "max", { "multiply", "divide", "minus" } } - }; - - static const std::unordered_map swap_to = { - { "min", "max" }, - { "max", "min" } - }; - - if (need_reverse && matches.contains(func_name) && matches.find(func_name)->second.contains(child_name)) - return swap_to.find(func_name)->second; - - return func_name; -} - ASTPtr tryExchangeFunctions(const ASTFunction & func) { static const std::unordered_map> supported @@ -114,26 +96,42 @@ ASTPtr tryExchangeFunctions(const ASTFunction & func) ASTPtr optimized_ast; + /** Need reverse max <-> min for: + * + * max(-1*value) -> -1*min(value) + * max(value/-2) -> min(value)/-2 + * max(1-value) -> 1-min(value) + */ + auto get_reverse_aggregate_function_name = [](const std::string & aggregate_function_name) -> std::string + { + if (aggregate_function_name == "min") + return "max"; + else if (aggregate_function_name == "max") + return "min"; + else + return aggregate_function_name; + }; + if (first_literal && !second_literal) { /// It's possible to rewrite 'sum(1/n)' with 'sum(1) * div(1/n)' but we lose accuracy. Ignored. if (child_func->name == "divide") return {}; - /** Need reverse max <-> min for: - * - * max(-1*value) -> -1*min(value) - * max(value/-2) -> min(value)/-2 - * max(1-value) -> 1 - min(value) - */ - bool need_reverse = first_literal->value < zeroField(first_literal->value) || ((lower_name == "min" || lower_name == "max") && child_func->name == "minus"); + bool need_reverse + = (child_func->name == "multiply" && first_literal->value < zeroField(first_literal->value)) || child_func->name == "minus"; + if (need_reverse) + lower_name = get_reverse_aggregate_function_name(lower_name); - const String & new_name = changeNameIfNeeded(lower_name, child_func->name, need_reverse); - optimized_ast = exchangeExtractFirstArgument(new_name, *child_func); + optimized_ast = exchangeExtractFirstArgument(lower_name, *child_func); } else if (second_literal) /// second or both are consts { - const String & new_name = changeNameIfNeeded(lower_name, child_func->name, second_literal->value < zeroField(second_literal->value)); - optimized_ast = exchangeExtractSecondArgument(new_name, *child_func); + bool need_reverse + = (child_func->name == "multiply" || child_func->name == "divide") && second_literal->value < zeroField(second_literal->value); + if (need_reverse) + lower_name = get_reverse_aggregate_function_name(lower_name); + + optimized_ast = exchangeExtractSecondArgument(lower_name, *child_func); } if (optimized_ast) diff --git a/tests/queries/0_stateless/01271_optimize_arithmetic_operations_in_aggr_func_long.reference b/tests/queries/0_stateless/01271_optimize_arithmetic_operations_in_aggr_func_long.reference index b50519b9b3a..ea04f155f24 100644 --- a/tests/queries/0_stateless/01271_optimize_arithmetic_operations_in_aggr_func_long.reference +++ b/tests/queries/0_stateless/01271_optimize_arithmetic_operations_in_aggr_func_long.reference @@ -22,7 +22,7 @@ SELECT min(n) + 1, 1 + min(n), min(n) - 1, - 1 - min(n) + 1 - max(n) FROM ( SELECT number AS n @@ -42,7 +42,7 @@ SELECT max(n) + 1, 1 + max(n), max(n) - 1, - 1 - max(n) + 1 - min(n) FROM ( SELECT number AS n @@ -82,7 +82,7 @@ SELECT min(n) + -1, -1 + min(n), min(n) - -1, - -1 - min(n) + -1 - max(n) FROM ( SELECT number AS n @@ -102,7 +102,7 @@ SELECT max(n) + -1, -1 + max(n), max(n) - -1, - -1 - max(n) + -1 - min(n) FROM ( SELECT number AS n @@ -142,7 +142,7 @@ SELECT min(abs(2)) + 1, min(abs(2) + n), min(n - abs(2)), - 1 - min(abs(2)) + 1 - max(abs(2)) FROM ( SELECT number AS n @@ -162,7 +162,7 @@ SELECT max(abs(2)) + 1, max(abs(2) + n), max(n - abs(2)), - 1 - max(abs(2)) + 1 - min(abs(2)) FROM ( SELECT number AS n @@ -202,7 +202,7 @@ SELECT min(abs(n)) + 1, min(abs(n) + n), min(n - abs(n)), - 1 - min(abs(n)) + 1 - max(abs(n)) FROM ( SELECT number AS n @@ -222,7 +222,7 @@ SELECT max(abs(n)) + 1, max(abs(n) + n), max(n - abs(n)), - 1 - max(abs(n)) + 1 - min(abs(n)) FROM ( SELECT number AS n @@ -262,7 +262,7 @@ SELECT min(n * n) + 1, 1 + min(n * n), min(n * n) - 1, - 1 - min(n * n) + 1 - max(n * n) FROM ( SELECT number AS n @@ -282,7 +282,7 @@ SELECT max(n * n) + 1, 1 + max(n * n), max(n * n) - 1, - 1 - max(n * n) + 1 - min(n * n) FROM ( SELECT number AS n @@ -382,7 +382,7 @@ SELECT (min(n) + -1) + -1, (-1 + min(n)) + -1, (min(n) - -1) + -1, - (-1 - min(n)) + -1 + (-1 - max(n)) + -1 FROM ( SELECT number AS n @@ -402,7 +402,7 @@ SELECT (max(n) + -1) + -1, (-1 + max(n)) + -1, (max(n) - -1) + -1, - (-1 - max(n)) + -1 + (-1 - min(n)) + -1 FROM ( SELECT number AS n @@ -430,7 +430,7 @@ FROM SELECT number AS n FROM numbers(10) ) -SELECT (((min(n) + 1) + (1 + min(n))) + (min(n) - 1)) + (1 - min(n)) +SELECT (((min(n) + 1) + (1 + min(n))) + (min(n) - 1)) + (1 - max(n)) FROM ( SELECT number AS n @@ -442,7 +442,7 @@ FROM SELECT number AS n FROM numbers(10) ) -SELECT (((max(n) + 1) + (1 + max(n))) + (max(n) - 1)) + (1 - max(n)) +SELECT (((max(n) + 1) + (1 + max(n))) + (max(n) - 1)) + (1 - min(n)) FROM ( SELECT number AS n @@ -456,15 +456,15 @@ FROM ) 55 55 35 -35 90 90 22.5 inf -1 1 -1 1 +1 1 -1 -8 0 0 0 0.1111111111111111 -10 10 8 -8 +10 10 8 1 18 18 4.5 inf 35 35 55 -55 -90 -90 -22.5 -inf --1 -1 1 -1 +-1 -1 1 -10 -18 -18 -4.5 -inf -8 8 10 -10 +8 8 10 -1 0 0 -0 -0.1111111111111111 30 65 25 -10 40 90 22.5 5 @@ -474,15 +474,15 @@ FROM 4 18 4.5 0.5 55 90 0 -35 90 285 nan inf -1 0 0 1 +1 0 0 -8 0 0 nan 0.1111111111111111 -10 18 0 -8 +10 18 0 1 18 81 nan inf 295 295 275 -275 570 570 142.5 nan -1 1 -1 1 +1 1 -1 -80 0 0 0 nan -82 82 80 -80 +82 82 80 1 162 162 40.5 nan 65 65 45 -25 100 100 32.5 inf @@ -492,15 +492,15 @@ FROM 19 19 5.5 inf 25 25 45 -65 90 90 22.5 inf --2 -2 0 -2 +-2 -2 0 -11 0 0 0 0.1111111111111111 -7 7 9 -11 +7 7 9 -2 18 18 4.5 inf 110 inf -2 +-7 0.1111111111111111 -20 +29 inf -15444 68.62157087543459 diff --git a/tests/queries/0_stateless/02498_aggregate_functions_arithmetic_operators_bug.reference b/tests/queries/0_stateless/02498_aggregate_functions_arithmetic_operators_bug.reference deleted file mode 100644 index 53c33afbf47..00000000000 --- a/tests/queries/0_stateless/02498_aggregate_functions_arithmetic_operators_bug.reference +++ /dev/null @@ -1,2 +0,0 @@ -100 99 -100 99 diff --git a/tests/queries/0_stateless/02498_aggregate_functions_arithmetic_operators_bug.sql b/tests/queries/0_stateless/02498_aggregate_functions_arithmetic_operators_bug.sql deleted file mode 100644 index 15d2115d84d..00000000000 --- a/tests/queries/0_stateless/02498_aggregate_functions_arithmetic_operators_bug.sql +++ /dev/null @@ -1,2 +0,0 @@ -SELECT max(100-number), min(100-number) FROM numbers(2) SETTINGS optimize_arithmetic_operations_in_aggregate_functions = 1; -SELECT max(100-number), min(100-number) FROM numbers(2) SETTINGS optimize_arithmetic_operations_in_aggregate_functions = 1, allow_experimental_analyzer = 1; diff --git a/tests/queries/0_stateless/02498_analyzer_aggregate_functions_arithmetic_operations_pass_fix.reference b/tests/queries/0_stateless/02498_analyzer_aggregate_functions_arithmetic_operations_pass_fix.reference index 4f9430ef608..43282d09bab 100644 --- a/tests/queries/0_stateless/02498_analyzer_aggregate_functions_arithmetic_operations_pass_fix.reference +++ b/tests/queries/0_stateless/02498_analyzer_aggregate_functions_arithmetic_operations_pass_fix.reference @@ -1 +1,2 @@ 4 2 +100 99 diff --git a/tests/queries/0_stateless/02498_analyzer_aggregate_functions_arithmetic_operations_pass_fix.sql b/tests/queries/0_stateless/02498_analyzer_aggregate_functions_arithmetic_operations_pass_fix.sql index e3e508e17be..72be274b222 100644 --- a/tests/queries/0_stateless/02498_analyzer_aggregate_functions_arithmetic_operations_pass_fix.sql +++ b/tests/queries/0_stateless/02498_analyzer_aggregate_functions_arithmetic_operations_pass_fix.sql @@ -12,3 +12,5 @@ INSERT INTO test_table VALUES (1, 1); INSERT INTO test_table VALUES (1, 1); SELECT sum((2 * id) as func), func FROM test_table GROUP BY id; + +SELECT max(100-number), min(100-number) FROM numbers(2); \ No newline at end of file From a3d5a76b37252e93f929f4737753f5fb9a156cc0 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Wed, 22 Feb 2023 08:07:16 +0100 Subject: [PATCH 133/841] Do not run 02572_system_logs_materialized_views_ignore_errors for Replicated CI: https://s3.amazonaws.com/clickhouse-test-reports/46658/3a58951f6446b3aeca13cdc671322f459c4f77a7/stateless_tests__release__databasereplicated__[1/4].html Signed-off-by: Azat Khuzhin --- .../02572_system_logs_materialized_views_ignore_errors.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/queries/0_stateless/02572_system_logs_materialized_views_ignore_errors.sql b/tests/queries/0_stateless/02572_system_logs_materialized_views_ignore_errors.sql index b7362ac1c33..9568bc7af1a 100644 --- a/tests/queries/0_stateless/02572_system_logs_materialized_views_ignore_errors.sql +++ b/tests/queries/0_stateless/02572_system_logs_materialized_views_ignore_errors.sql @@ -1,5 +1,6 @@ --- Tags: no-parallel +-- Tags: no-parallel, no-replicated-database -- Tag no-parallel: due to attaching to system.query_log +-- Tag no-replicated-database: Replicated database will has extra queries -- Attach MV to system.query_log and check that writing query_log will not fail From d0b50adffa98b6db67586098430d8f08f970e174 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Wed, 22 Feb 2023 11:00:14 +0100 Subject: [PATCH 134/841] Remove materialized_views_ignore_errors from FinalizingViewsTransform Signed-off-by: Azat Khuzhin --- .../Transforms/buildPushingToViewsChain.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Processors/Transforms/buildPushingToViewsChain.cpp b/src/Processors/Transforms/buildPushingToViewsChain.cpp index 13c4806590e..dce2c61457c 100644 --- a/src/Processors/Transforms/buildPushingToViewsChain.cpp +++ b/src/Processors/Transforms/buildPushingToViewsChain.cpp @@ -174,7 +174,7 @@ class FinalizingViewsTransform final : public IProcessor static InputPorts initPorts(std::vector headers); public: - FinalizingViewsTransform(std::vector headers, ViewsDataPtr data, bool materialized_views_ignore_errors_); + FinalizingViewsTransform(std::vector headers, ViewsDataPtr data); String getName() const override { return "FinalizingViewsTransform"; } Status prepare() override; @@ -185,7 +185,6 @@ private: ViewsDataPtr views_data; std::vector statuses; std::exception_ptr any_exception; - bool materialized_views_ignore_errors; }; @@ -409,7 +408,7 @@ Chain buildPushingToViewsChain( headers.push_back(chain.getOutputHeader()); auto copying_data = std::make_shared(storage_header, views_data); - auto finalizing_views = std::make_shared(std::move(headers), views_data, settings.materialized_views_ignore_errors); + auto finalizing_views = std::make_shared(std::move(headers), views_data); auto out = copying_data->getOutputs().begin(); auto in = finalizing_views->getInputs().begin(); @@ -686,11 +685,10 @@ void PushingToWindowViewSink::consume(Chunk chunk) } -FinalizingViewsTransform::FinalizingViewsTransform(std::vector headers, ViewsDataPtr data, bool materialized_views_ignore_errors_) +FinalizingViewsTransform::FinalizingViewsTransform(std::vector headers, ViewsDataPtr data) : IProcessor(initPorts(std::move(headers)), {Block()}) , output(outputs.front()) , views_data(std::move(data)) - , materialized_views_ignore_errors(materialized_views_ignore_errors_) { statuses.resize(views_data->views.size()); } @@ -712,6 +710,7 @@ IProcessor::Status FinalizingViewsTransform::prepare() if (!output.canPush()) return Status::PortFull; + bool materialized_views_ignore_errors = views_data->context->getSettingsRef().materialized_views_ignore_errors; size_t num_finished = 0; size_t pos = 0; for (auto & input : inputs) @@ -785,6 +784,8 @@ static std::exception_ptr addStorageToException(std::exception_ptr ptr, const St void FinalizingViewsTransform::work() { + bool materialized_views_ignore_errors = views_data->context->getSettingsRef().materialized_views_ignore_errors; + size_t i = 0; for (auto & view : views_data->views) { From ea244e539032bc0b7f0c1f1f9c081cd42b970bd4 Mon Sep 17 00:00:00 2001 From: Yakov Olkhovskiy Date: Wed, 22 Feb 2023 13:28:45 +0000 Subject: [PATCH 135/841] revert getViewContext --- src/Storages/StorageView.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Storages/StorageView.cpp b/src/Storages/StorageView.cpp index d3a2ec470cf..1a7050b4dff 100644 --- a/src/Storages/StorageView.cpp +++ b/src/Storages/StorageView.cpp @@ -95,8 +95,6 @@ ContextPtr getViewContext(ContextPtr context) view_settings.max_result_rows = 0; view_settings.max_result_bytes = 0; view_settings.extremes = false; - view_settings.limit = 0; - view_settings.offset = 0; view_context->setSettings(view_settings); return view_context; } From 620071bb42df86069aaa12aeca2c432f01fedfc3 Mon Sep 17 00:00:00 2001 From: Yakov Olkhovskiy Date: Wed, 22 Feb 2023 13:33:40 +0000 Subject: [PATCH 136/841] fix --- src/Planner/Planner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Planner/Planner.cpp b/src/Planner/Planner.cpp index 307e8d73b29..c64dfd20f62 100644 --- a/src/Planner/Planner.cpp +++ b/src/Planner/Planner.cpp @@ -1436,7 +1436,7 @@ void Planner::buildPlanForQueryNode() */ if (query_analysis_result.limit_length && apply_limit && !limit_applied && apply_offset) addLimitStep(query_plan, query_analysis_result, planner_context, query_node); - else if (!limit_applied && apply_offset && query_analysis_result.limit_length) + else if (!limit_applied && apply_offset && query_analysis_result.limit_offset) addOffsetStep(query_plan, query_analysis_result); /// Project names is not done on shards, because initiator will not find columns in blocks From e660c0838ca7ddf597f0a7d54b52e305b482a474 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Wed, 22 Feb 2023 17:54:35 +0100 Subject: [PATCH 137/841] fix multipart requests --- src/Common/StatusFile.cpp | 2 +- src/Core/ExternalTable.cpp | 6 ++-- src/Core/MySQL/IMySQLReadPacket.cpp | 4 +-- src/IO/LimitReadBuffer.cpp | 19 +++++++----- src/IO/LimitReadBuffer.h | 9 +++--- src/IO/examples/limit_read_buffer.cpp | 4 +-- src/IO/examples/limit_read_buffer2.cpp | 6 ++-- src/Interpreters/executeQuery.cpp | 2 +- src/Server/HTTP/HTMLForm.cpp | 16 ++++++++-- src/Server/HTTP/HTMLForm.h | 3 ++ src/Server/HTTP/HTTPServerRequest.cpp | 11 +++++-- src/Server/MySQLHandler.cpp | 2 +- src/Server/TCPHandler.cpp | 2 +- src/Storages/StorageLog.cpp | 2 +- .../02435_insert_cancellation_http.sh | 30 ++++++++++++------- 15 files changed, 76 insertions(+), 42 deletions(-) diff --git a/src/Common/StatusFile.cpp b/src/Common/StatusFile.cpp index e71056fcaa3..a9ffce7ddf8 100644 --- a/src/Common/StatusFile.cpp +++ b/src/Common/StatusFile.cpp @@ -51,7 +51,7 @@ StatusFile::StatusFile(std::string path_, FillFunction fill_) std::string contents; { ReadBufferFromFile in(path, 1024); - LimitReadBuffer limit_in(in, 1024, /* trow_exception */ false, /* exact_limit */ false); + LimitReadBuffer limit_in(in, 1024, /* trow_exception */ false, /* exact_limit */ {}); readStringUntilEOF(contents, limit_in); } diff --git a/src/Core/ExternalTable.cpp b/src/Core/ExternalTable.cpp index 217f8808185..36dcc677589 100644 --- a/src/Core/ExternalTable.cpp +++ b/src/Core/ExternalTable.cpp @@ -34,7 +34,7 @@ ExternalTableDataPtr BaseExternalTable::getData(ContextPtr context) { initReadBuffer(); initSampleBlock(); - auto input = context->getInputFormat(format, *read_buffer, sample_block, DEFAULT_BLOCK_SIZE); + auto input = context->getInputFormat(format, *read_buffer, sample_block, context->getSettingsRef().get("max_block_size").get()); auto data = std::make_unique(); data->pipe = std::make_unique(); @@ -135,7 +135,9 @@ void ExternalTablesHandler::handlePart(const Poco::Net::MessageHeader & header, if (settings.http_max_multipart_form_data_size) read_buffer = std::make_unique( stream, settings.http_max_multipart_form_data_size, - true, "the maximum size of multipart/form-data. This limit can be tuned by 'http_max_multipart_form_data_size' setting"); + /* trow_exception */ true, /* exact_limit */ std::optional(), + "the maximum size of multipart/form-data. " + "This limit can be tuned by 'http_max_multipart_form_data_size' setting"); else read_buffer = wrapReadBufferReference(stream); diff --git a/src/Core/MySQL/IMySQLReadPacket.cpp b/src/Core/MySQL/IMySQLReadPacket.cpp index c99ae11688b..39b2e5bbfb5 100644 --- a/src/Core/MySQL/IMySQLReadPacket.cpp +++ b/src/Core/MySQL/IMySQLReadPacket.cpp @@ -33,13 +33,13 @@ void IMySQLReadPacket::readPayloadWithUnpacked(ReadBuffer & in) void LimitedReadPacket::readPayload(ReadBuffer &in, uint8_t &sequence_id) { - LimitReadBuffer limited(in, 10000, /* trow_exception */ true, /* exact_limit */ false, "too long MySQL packet."); + LimitReadBuffer limited(in, 10000, /* trow_exception */ true, /* exact_limit */ {}, "too long MySQL packet."); IMySQLReadPacket::readPayload(limited, sequence_id); } void LimitedReadPacket::readPayloadWithUnpacked(ReadBuffer & in) { - LimitReadBuffer limited(in, 10000, /* trow_exception */ true, /* exact_limit */ false, "too long MySQL packet."); + LimitReadBuffer limited(in, 10000, /* trow_exception */ true, /* exact_limit */ {}, "too long MySQL packet."); IMySQLReadPacket::readPayloadWithUnpacked(limited); } diff --git a/src/IO/LimitReadBuffer.cpp b/src/IO/LimitReadBuffer.cpp index 96e2c359b58..e14112f8d19 100644 --- a/src/IO/LimitReadBuffer.cpp +++ b/src/IO/LimitReadBuffer.cpp @@ -22,11 +22,11 @@ bool LimitReadBuffer::nextImpl() if (bytes >= limit) { - if (exact_limit && bytes == limit) + if (exact_limit && bytes == *exact_limit) return false; - if (exact_limit && bytes != limit) - throw Exception(ErrorCodes::CANNOT_READ_ALL_DATA, "Unexpected data, got {} bytes, expected {}", bytes, limit); + if (exact_limit && bytes != *exact_limit) + throw Exception(ErrorCodes::CANNOT_READ_ALL_DATA, "Unexpected data, got {} bytes, expected {}", bytes, *exact_limit); if (throw_exception) throw Exception(ErrorCodes::LIMIT_EXCEEDED, "Limit for LimitReadBuffer exceeded: {}", exception_message); @@ -36,8 +36,8 @@ bool LimitReadBuffer::nextImpl() if (!in->next()) { - if (exact_limit && bytes != limit) - throw Exception(ErrorCodes::CANNOT_READ_ALL_DATA, "Unexpected EOF, got {} of {} bytes", bytes, limit); + if (exact_limit && bytes != *exact_limit) + throw Exception(ErrorCodes::CANNOT_READ_ALL_DATA, "Unexpected EOF, got {} of {} bytes", bytes, *exact_limit); /// Clearing the buffer with existing data. set(in->position(), 0); return false; @@ -52,7 +52,8 @@ bool LimitReadBuffer::nextImpl() } -LimitReadBuffer::LimitReadBuffer(ReadBuffer * in_, bool owns, UInt64 limit_, bool throw_exception_, bool exact_limit_, std::string exception_message_) +LimitReadBuffer::LimitReadBuffer(ReadBuffer * in_, bool owns, UInt64 limit_, bool throw_exception_, + std::optional exact_limit_, std::string exception_message_) : ReadBuffer(in_ ? in_->position() : nullptr, 0) , in(in_) , owns_in(owns) @@ -71,13 +72,15 @@ LimitReadBuffer::LimitReadBuffer(ReadBuffer * in_, bool owns, UInt64 limit_, boo } -LimitReadBuffer::LimitReadBuffer(ReadBuffer & in_, UInt64 limit_, bool throw_exception_, bool exact_limit_, std::string exception_message_) +LimitReadBuffer::LimitReadBuffer(ReadBuffer & in_, UInt64 limit_, bool throw_exception_, + std::optional exact_limit_, std::string exception_message_) : LimitReadBuffer(&in_, false, limit_, throw_exception_, exact_limit_, exception_message_) { } -LimitReadBuffer::LimitReadBuffer(std::unique_ptr in_, UInt64 limit_, bool throw_exception_, bool exact_limit_, std::string exception_message_) +LimitReadBuffer::LimitReadBuffer(std::unique_ptr in_, UInt64 limit_, bool throw_exception_, + std::optional exact_limit_, std::string exception_message_) : LimitReadBuffer(in_.release(), true, limit_, throw_exception_, exact_limit_, exception_message_) { } diff --git a/src/IO/LimitReadBuffer.h b/src/IO/LimitReadBuffer.h index 0f99bf2a08d..15885c1d850 100644 --- a/src/IO/LimitReadBuffer.h +++ b/src/IO/LimitReadBuffer.h @@ -13,8 +13,9 @@ namespace DB class LimitReadBuffer : public ReadBuffer { public: - LimitReadBuffer(ReadBuffer & in_, UInt64 limit_, bool throw_exception_, bool exact_limit_, std::string exception_message_ = {}); - LimitReadBuffer(std::unique_ptr in_, UInt64 limit_, bool throw_exception_, bool exact_limit_, + LimitReadBuffer(ReadBuffer & in_, UInt64 limit_, bool throw_exception_, + std::optional exact_limit_, std::string exception_message_ = {}); + LimitReadBuffer(std::unique_ptr in_, UInt64 limit_, bool throw_exception_, std::optional exact_limit_, std::string exception_message_ = {}); ~LimitReadBuffer() override; @@ -24,10 +25,10 @@ private: UInt64 limit; bool throw_exception; - bool exact_limit; + std::optional exact_limit; std::string exception_message; - LimitReadBuffer(ReadBuffer * in_, bool owns, UInt64 limit_, bool throw_exception_, bool exact_limit_, std::string exception_message_); + LimitReadBuffer(ReadBuffer * in_, bool owns, UInt64 limit_, bool throw_exception_, std::optional exact_limit_, std::string exception_message_); bool nextImpl() override; }; diff --git a/src/IO/examples/limit_read_buffer.cpp b/src/IO/examples/limit_read_buffer.cpp index 559c87353f0..9c57c175620 100644 --- a/src/IO/examples/limit_read_buffer.cpp +++ b/src/IO/examples/limit_read_buffer.cpp @@ -24,13 +24,13 @@ int main(int argc, char ** argv) writeCString("--- first ---\n", out); { - LimitReadBuffer limit_in(in, limit, false); + LimitReadBuffer limit_in(in, limit, /* trow_exception */ false, /* exact_limit */ {}); copyData(limit_in, out); } writeCString("\n--- second ---\n", out); { - LimitReadBuffer limit_in(in, limit, false); + LimitReadBuffer limit_in(in, limit, /* trow_exception */ false, /* exact_limit */ {}); copyData(limit_in, out); } diff --git a/src/IO/examples/limit_read_buffer2.cpp b/src/IO/examples/limit_read_buffer2.cpp index ac7c43d764c..a0369047d3a 100644 --- a/src/IO/examples/limit_read_buffer2.cpp +++ b/src/IO/examples/limit_read_buffer2.cpp @@ -27,7 +27,7 @@ try ReadBuffer in(src.data(), src.size(), 0); - LimitReadBuffer limit_in(in, 1, false); + LimitReadBuffer limit_in(in, 1, /* trow_exception */ false, /* exact_limit */ {}); { WriteBufferFromString out(dst); @@ -55,7 +55,7 @@ try char x; readChar(x, in); - LimitReadBuffer limit_in(in, 1, false); + LimitReadBuffer limit_in(in, 1, /* trow_exception */ false, /* exact_limit */ {}); copyData(limit_in, out); @@ -85,7 +85,7 @@ try ReadBuffer in(src.data(), src.size(), 0); { - LimitReadBuffer limit_in(in, 1, false); + LimitReadBuffer limit_in(in, 1, /* trow_exception */ false, /* exact_limit */ {}); char x; readChar(x, limit_in); diff --git a/src/Interpreters/executeQuery.cpp b/src/Interpreters/executeQuery.cpp index aeaacf35051..7fcdf1ff0dc 100644 --- a/src/Interpreters/executeQuery.cpp +++ b/src/Interpreters/executeQuery.cpp @@ -1237,7 +1237,7 @@ void executeQuery( /// If not - copy enough data into 'parse_buf'. WriteBufferFromVector> out(parse_buf); - LimitReadBuffer limit(istr, max_query_size + 1, /* trow_exception */ false, /* exact_limit */ false); + LimitReadBuffer limit(istr, max_query_size + 1, /* trow_exception */ false, /* exact_limit */ {}); copyData(limit, out); out.finalize(); diff --git a/src/Server/HTTP/HTMLForm.cpp b/src/Server/HTTP/HTMLForm.cpp index d9d897d20c4..1abf9e5b83e 100644 --- a/src/Server/HTTP/HTMLForm.cpp +++ b/src/Server/HTTP/HTMLForm.cpp @@ -20,6 +20,11 @@ namespace DB { +namespace ErrorCodes +{ + extern const int CANNOT_READ_ALL_DATA; +} + namespace { @@ -229,6 +234,11 @@ void HTMLForm::readMultipart(ReadBuffer & in_, PartHandler & handler) if (!in.skipToNextBoundary()) break; } + + /// It's important to check, because we could get "fake" EOF and incomplete request if a client suddenly died in the middle. + if (!in.isActualEOF()) + throw Exception(ErrorCodes::CANNOT_READ_ALL_DATA, "Unexpected EOF, " + "did not find the last boundary while parsing a multipart HTTP request"); } @@ -244,7 +254,8 @@ bool HTMLForm::MultipartReadBuffer::skipToNextBoundary() if (in.eof()) return false; - assert(boundary_hit); + chassert(boundary_hit); + chassert(!found_last_boundary); boundary_hit = false; @@ -255,7 +266,8 @@ bool HTMLForm::MultipartReadBuffer::skipToNextBoundary() { set(in.position(), 0); next(); /// We need to restrict our buffer to size of next available line. - return !startsWith(line, boundary + "--"); + found_last_boundary = startsWith(line, boundary + "--"); + return !found_last_boundary; } } diff --git a/src/Server/HTTP/HTMLForm.h b/src/Server/HTTP/HTMLForm.h index 16889b41d80..c75dafccaf0 100644 --- a/src/Server/HTTP/HTMLForm.h +++ b/src/Server/HTTP/HTMLForm.h @@ -108,10 +108,13 @@ public: /// Returns false if last boundary found. bool skipToNextBoundary(); + bool isActualEOF() const { return found_last_boundary; } + private: PeekableReadBuffer in; const std::string boundary; bool boundary_hit = true; + bool found_last_boundary = false; std::string readLine(bool append_crlf); diff --git a/src/Server/HTTP/HTTPServerRequest.cpp b/src/Server/HTTP/HTTPServerRequest.cpp index d2e19d594dc..c9ffa3a4c3b 100644 --- a/src/Server/HTTP/HTTPServerRequest.cpp +++ b/src/Server/HTTP/HTTPServerRequest.cpp @@ -56,12 +56,17 @@ HTTPServerRequest::HTTPServerRequest(HTTPContextPtr context, HTTPServerResponse if (getChunkedTransferEncoding()) stream = std::make_unique(std::move(in), context->getMaxChunkSize()); else if (hasContentLength()) - stream = std::make_unique(std::move(in), getContentLength(), /* trow_exception */ true, /* exact_limit */ true); + { + size_t content_length = getContentLength(); + stream = std::make_unique(std::move(in), content_length, + /* trow_exception */ true, /* exact_limit */ content_length); + } else if (getMethod() != HTTPRequest::HTTP_GET && getMethod() != HTTPRequest::HTTP_HEAD && getMethod() != HTTPRequest::HTTP_DELETE) { stream = std::move(in); - LOG_WARNING(&Poco::Logger::get("HTTPServerRequest"), "Got an HTTP request with no content length, " - "it may be impossible to distinguish graceful EOF from abnormal connection loss"); + if (!startsWith(getContentType(), "multipart/form-data")) + LOG_WARNING(&Poco::Logger::get("HTTPServerRequest"), "Got an HTTP request with no content length " + "and no chunked/multipart encoding, it may be impossible to distinguish graceful EOF from abnormal connection loss"); } else /// We have to distinguish empty buffer and nullptr. diff --git a/src/Server/MySQLHandler.cpp b/src/Server/MySQLHandler.cpp index 279896da9fa..4dcbca93e28 100644 --- a/src/Server/MySQLHandler.cpp +++ b/src/Server/MySQLHandler.cpp @@ -155,7 +155,7 @@ void MySQLHandler::run() payload.readStrict(command); // For commands which are executed without MemoryTracker. - LimitReadBuffer limited_payload(payload, 10000, /* trow_exception */ true, /* exact_limit */ false, "too long MySQL packet."); + LimitReadBuffer limited_payload(payload, 10000, /* trow_exception */ true, /* exact_limit */ {}, "too long MySQL packet."); LOG_DEBUG(log, "Received command: {}. Connection id: {}.", static_cast(static_cast(command)), connection_id); diff --git a/src/Server/TCPHandler.cpp b/src/Server/TCPHandler.cpp index 3e89d1810c7..bf5578f2610 100644 --- a/src/Server/TCPHandler.cpp +++ b/src/Server/TCPHandler.cpp @@ -1057,7 +1057,7 @@ bool TCPHandler::receiveProxyHeader() /// Only PROXYv1 is supported. /// Validation of protocol is not fully performed. - LimitReadBuffer limit_in(*in, 107, /* trow_exception */ true, /* exact_limit */ false); /// Maximum length from the specs. + LimitReadBuffer limit_in(*in, 107, /* trow_exception */ true, /* exact_limit */ {}); /// Maximum length from the specs. assertString("PROXY ", limit_in); diff --git a/src/Storages/StorageLog.cpp b/src/Storages/StorageLog.cpp index 388faf1aeb5..014a0ff2424 100644 --- a/src/Storages/StorageLog.cpp +++ b/src/Storages/StorageLog.cpp @@ -118,7 +118,7 @@ private: if (limited_by_file_size) { - limited.emplace(*plain, file_size - offset, /* trow_exception */ false, /* exact_limit */ false); + limited.emplace(*plain, file_size - offset, /* trow_exception */ false, /* exact_limit */ std::optional()); compressed.emplace(*limited); } else diff --git a/tests/queries/0_stateless/02435_insert_cancellation_http.sh b/tests/queries/0_stateless/02435_insert_cancellation_http.sh index 653ec59f491..e3a1645db63 100755 --- a/tests/queries/0_stateless/02435_insert_cancellation_http.sh +++ b/tests/queries/0_stateless/02435_insert_cancellation_http.sh @@ -10,24 +10,32 @@ export TEST_MARK="02435_insert_${CLICKHOUSE_DATABASE}_" $CLICKHOUSE_CLIENT -q 'select * from numbers(5000000) format TSV' > $DATA_FILE $CLICKHOUSE_CLIENT -q 'create table dedup_test(A Int64) Engine = MergeTree order by A settings non_replicated_deduplication_window=1000;' -$CLICKHOUSE_CURL -sS -X POST --data-binary @- "$CLICKHOUSE_URL&max_insert_block_size=100000&input_format_parallel_parsing=0&query=insert+into+dedup_test+format+TSV" < $DATA_FILE + +function insert_data +{ + SETTINGS="query_id=$ID&max_insert_block_size=100000&input_format_parallel_parsing=0" + TRASH_SETTINGS="query_id=$ID&input_format_parallel_parsing=0&max_threads=1&max_insert_threads=1&max_insert_block_size=1100000&max_block_size=1100000&min_insert_block_size_bytes=0&min_insert_block_size_rows=1100000&max_insert_block_size=1100000" + TYPE=$(( RANDOM % 3 )) + if [[ "$TYPE" -eq 0 ]]; then + $CLICKHOUSE_CURL -sS -X POST --data-binary @- "$CLICKHOUSE_URL&$SETTINGS&query=insert+into+dedup_test+format+TSV" < $DATA_FILE + elif [[ "$TYPE" -eq 1 ]]; then + $CLICKHOUSE_CURL -sS -X POST -H "Transfer-Encoding: chunked" --data-binary @- "$CLICKHOUSE_URL&$SETTINGS&query=insert+into+dedup_test+format+TSV" < $DATA_FILE + else + $CLICKHOUSE_CURL -sS -F 'file=@-' "$CLICKHOUSE_URL&$TRASH_SETTINGS&file_format=TSV&file_types=UInt64" -X POST --form-string 'query=insert into dedup_test select * from file' < $DATA_FILE + fi +} + +export -f insert_data + +insert_data $CLICKHOUSE_CLIENT -q 'select count() from dedup_test' function thread_insert { # supress "Killed" messages from bash - function wrap - { - if (( RANDOM % 2 )); then - $CLICKHOUSE_CURL -sS -X POST --data-binary @- "$CLICKHOUSE_URL&query_id=$ID&max_insert_block_size=100000&input_format_parallel_parsing=0&query=insert+into+dedup_test+format+TSV" < $DATA_FILE - else - $CLICKHOUSE_CURL -sS -X POST -H "Transfer-Encoding: chunked" --data-binary @- "$CLICKHOUSE_URL&query_id=$ID&max_insert_block_size=100000&input_format_parallel_parsing=0&query=insert+into+dedup_test+format+TSV" < $DATA_FILE - fi - } - export -f wrap while true; do export ID="$TEST_MARK$RANDOM" - bash -c wrap 2>&1| grep -Fav "Killed" + bash -c insert_data 2>&1| grep -Fav "Killed" done } From 99095446afa6428f3cd62af5c63e2d3987927be9 Mon Sep 17 00:00:00 2001 From: Yakov Olkhovskiy Date: Wed, 22 Feb 2023 17:22:13 +0000 Subject: [PATCH 138/841] review suggestions --- src/Analyzer/QueryTreeBuilder.cpp | 14 ++++---- src/Common/SettingsChanges.cpp | 7 ++-- src/Common/SettingsChanges.h | 6 ++-- ...lyzer_limit_settings_distributed.reference | 14 ++++++++ ...67_analyzer_limit_settings_distributed.sql | 34 +++++++++++++++++++ 5 files changed, 62 insertions(+), 13 deletions(-) create mode 100644 tests/queries/0_stateless/02667_analyzer_limit_settings_distributed.reference create mode 100644 tests/queries/0_stateless/02667_analyzer_limit_settings_distributed.sql diff --git a/src/Analyzer/QueryTreeBuilder.cpp b/src/Analyzer/QueryTreeBuilder.cpp index e9e084615ca..c7b9f9aae08 100644 --- a/src/Analyzer/QueryTreeBuilder.cpp +++ b/src/Analyzer/QueryTreeBuilder.cpp @@ -238,8 +238,8 @@ QueryTreeNodePtr QueryTreeBuilder::buildSelectExpression(const ASTPtr & select_q UInt64 limit = 0; UInt64 offset = 0; - /// remove global settings limit and offset - if (const Settings & settings_ref = updated_context->getSettingsRef(); settings_ref.limit || settings_ref.offset) + /// Remove global settings limit and offset + if (const auto & settings_ref = updated_context->getSettingsRef(); settings_ref.limit || settings_ref.offset) { Settings settings = updated_context->getSettings(); limit = settings.limit; @@ -253,7 +253,7 @@ QueryTreeNodePtr QueryTreeBuilder::buildSelectExpression(const ASTPtr & select_q { auto & set_query = select_settings->as(); - /// remove expression settings limit and offset + /// Remove expression settings limit and offset if (auto * limit_field = set_query.changes.tryGet("limit")) { limit = limit_field->safeGet(); @@ -355,28 +355,28 @@ QueryTreeNodePtr QueryTreeBuilder::buildSelectExpression(const ASTPtr & select_q if (select_limit_by) current_query_tree->getLimitByNode() = buildExpressionList(select_limit_by, current_context); - /// combine limit expression with limit setting + /// Combine limit expression with limit setting auto select_limit = select_query_typed.limitLength(); if (select_limit && limit) { auto function_node = std::make_shared("least"); function_node->getArguments().getNodes().push_back(buildExpression(select_limit, current_context)); function_node->getArguments().getNodes().push_back(std::make_shared(limit)); - current_query_tree->getLimit() = function_node; + current_query_tree->getLimit() = std::move(function_node); } else if (limit) current_query_tree->getLimit() = std::make_shared(limit); else if (select_limit) current_query_tree->getLimit() = buildExpression(select_limit, current_context); - /// combine offset expression with offset setting + /// Combine offset expression with offset setting auto select_offset = select_query_typed.limitOffset(); if (select_offset && offset) { auto function_node = std::make_shared("plus"); function_node->getArguments().getNodes().push_back(buildExpression(select_offset, current_context)); function_node->getArguments().getNodes().push_back(std::make_shared(offset)); - current_query_tree->getOffset() = function_node; + current_query_tree->getOffset() = std::move(function_node); } else if (offset) current_query_tree->getOffset() = std::make_shared(offset); diff --git a/src/Common/SettingsChanges.cpp b/src/Common/SettingsChanges.cpp index 45490f86abc..7790c272606 100644 --- a/src/Common/SettingsChanges.cpp +++ b/src/Common/SettingsChanges.cpp @@ -48,7 +48,8 @@ Field * SettingsChanges::tryGet(std::string_view name) bool SettingsChanges::insertSetting(std::string_view name, const Field & value) { - if (std::find_if(begin(), end(), [&name](const SettingChange & change) { return change.name == name; }) != end()) + auto it = std::find_if(begin(), end(), [&name](const SettingChange & change) { return change.name == name; }); + if (it != end()) return false; emplace_back(name, value); return true; @@ -56,8 +57,8 @@ bool SettingsChanges::insertSetting(std::string_view name, const Field & value) void SettingsChanges::setSetting(std::string_view name, const Field & value) { - if (auto * v = tryGet(name)) - *v = value; + if (auto * setting_value = tryGet(name)) + *setting_value = value; else insertSetting(name, value); } diff --git a/src/Common/SettingsChanges.h b/src/Common/SettingsChanges.h index d16934dbc76..61f5a1c7eba 100644 --- a/src/Common/SettingsChanges.h +++ b/src/Common/SettingsChanges.h @@ -29,11 +29,11 @@ public: const Field * tryGet(std::string_view name) const; Field * tryGet(std::string_view name); - /// inserts element if doesn't exists and returns true, else just returns false + /// Inserts element if doesn't exists and returns true, otherwise just returns false bool insertSetting(std::string_view name, const Field & value); - /// sets element to value, inserts if doesn't exist + /// Sets element to value, inserts if doesn't exist void setSetting(std::string_view name, const Field & value); - /// if element exists - removes it and returns true, else returns false + /// If element exists - removes it and returns true, otherwise returns false bool removeSetting(std::string_view name); }; diff --git a/tests/queries/0_stateless/02667_analyzer_limit_settings_distributed.reference b/tests/queries/0_stateless/02667_analyzer_limit_settings_distributed.reference new file mode 100644 index 00000000000..466e80931e5 --- /dev/null +++ b/tests/queries/0_stateless/02667_analyzer_limit_settings_distributed.reference @@ -0,0 +1,14 @@ +limit 0 +limit 1 +limit 2 +limit 3 +limit 4 +offset 5 +offset 6 +offset 7 +offset 8 +offset 9 +limit w/ GROUP BY 4 4 +limit w/ GROUP BY 4 3 +limit/offset w/ GROUP BY 4 2 +limit/offset w/ GROUP BY 4 1 diff --git a/tests/queries/0_stateless/02667_analyzer_limit_settings_distributed.sql b/tests/queries/0_stateless/02667_analyzer_limit_settings_distributed.sql new file mode 100644 index 00000000000..1624344b5a9 --- /dev/null +++ b/tests/queries/0_stateless/02667_analyzer_limit_settings_distributed.sql @@ -0,0 +1,34 @@ +-- Tags: distributed + +SET allow_experimental_analyzer = 1; + +SELECT 'limit', * FROM remote('127.1', view(SELECT * FROM numbers(10))) SETTINGS limit=5; +SELECT 'offset', * FROM remote('127.1', view(SELECT * FROM numbers(10))) SETTINGS offset=5; + +SELECT + 'limit w/ GROUP BY', + count(), + number +FROM remote('127.{1,2}', view( + SELECT intDiv(number, 2) AS number + FROM numbers(10) +)) +GROUP BY number +ORDER BY + count() ASC, + number DESC +SETTINGS limit=2; + +SELECT + 'limit/offset w/ GROUP BY', + count(), + number +FROM remote('127.{1,2}', view( + SELECT intDiv(number, 2) AS number + FROM numbers(10) +)) +GROUP BY number +ORDER BY + count() ASC, + number DESC +SETTINGS limit=2, offset=2; From 1157bf2d9fef3f447ab7b4a64776efa3d67b9344 Mon Sep 17 00:00:00 2001 From: pufit Date: Wed, 22 Feb 2023 15:15:09 -0500 Subject: [PATCH 139/841] Removed unnecessary ifs --- programs/server/Server.cpp | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/programs/server/Server.cpp b/programs/server/Server.cpp index 1f74cc53961..e301db64c61 100644 --- a/programs/server/Server.cpp +++ b/programs/server/Server.cpp @@ -1269,7 +1269,7 @@ try /// Note: If you specified it in the top level config (not it config of default profile) /// then ClickHouse will use it exactly. /// This is done for backward compatibility. - if (global_context->areBackgroundExecutorsInitialized() && (server_settings.background_pool_size.changed || server_settings.background_merges_mutations_concurrency_ratio.changed || server_settings.background_merges_mutations_scheduling_policy.changed)) + if (global_context->areBackgroundExecutorsInitialized()) { auto new_pool_size = server_settings.background_pool_size; auto new_ratio = server_settings.background_merges_mutations_concurrency_ratio; @@ -1277,35 +1277,28 @@ try global_context->getMergeMutateExecutor()->updateSchedulingPolicy(server_settings.background_merges_mutations_scheduling_policy.toString()); } - if (global_context->areBackgroundExecutorsInitialized() && server_settings.background_move_pool_size.changed) + if (global_context->areBackgroundExecutorsInitialized()) { auto new_pool_size = server_settings.background_move_pool_size; global_context->getMovesExecutor()->increaseThreadsAndMaxTasksCount(new_pool_size, new_pool_size); } - if (global_context->areBackgroundExecutorsInitialized() && server_settings.background_fetches_pool_size.changed) + if (global_context->areBackgroundExecutorsInitialized()) { auto new_pool_size = server_settings.background_fetches_pool_size; global_context->getFetchesExecutor()->increaseThreadsAndMaxTasksCount(new_pool_size, new_pool_size); } - if (global_context->areBackgroundExecutorsInitialized() && server_settings.background_common_pool_size.changed) + if (global_context->areBackgroundExecutorsInitialized()) { auto new_pool_size = server_settings.background_common_pool_size; global_context->getCommonExecutor()->increaseThreadsAndMaxTasksCount(new_pool_size, new_pool_size); } - if (server_settings.background_buffer_flush_schedule_pool_size.changed) - global_context->getBufferFlushSchedulePool().increaseThreadsCount(server_settings.background_buffer_flush_schedule_pool_size); - - if (server_settings.background_schedule_pool_size.changed) - global_context->getSchedulePool().increaseThreadsCount(server_settings.background_schedule_pool_size); - - if (server_settings.background_message_broker_schedule_pool_size.changed) - global_context->getMessageBrokerSchedulePool().increaseThreadsCount(server_settings.background_message_broker_schedule_pool_size); - - if (server_settings.background_distributed_schedule_pool_size.changed) - global_context->getDistributedSchedulePool().increaseThreadsCount(server_settings.background_distributed_schedule_pool_size); + global_context->getBufferFlushSchedulePool().increaseThreadsCount(server_settings.background_buffer_flush_schedule_pool_size); + global_context->getSchedulePool().increaseThreadsCount(server_settings.background_schedule_pool_size); + global_context->getMessageBrokerSchedulePool().increaseThreadsCount(server_settings.background_message_broker_schedule_pool_size); + global_context->getDistributedSchedulePool().increaseThreadsCount(server_settings.background_distributed_schedule_pool_size); if (config->has("resources")) { From 0fcda19d208fa0a4a5c6773dda9990b474763cfa Mon Sep 17 00:00:00 2001 From: pufit Date: Wed, 22 Feb 2023 18:27:23 -0500 Subject: [PATCH 140/841] Fix description typo --- src/Core/ServerSettings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/ServerSettings.h b/src/Core/ServerSettings.h index 43a158839bf..8a87c822f77 100644 --- a/src/Core/ServerSettings.h +++ b/src/Core/ServerSettings.h @@ -43,7 +43,7 @@ namespace DB M(UInt64, mark_cache_size, 5368709120, "Size of cache for marks (index of MergeTree family of tables).", 0) \ M(String, mark_cache_policy, "SLRU", "Mark cache policy name.", 0) \ M(UInt64, index_uncompressed_cache_size, 0, "Size of cache for uncompressed blocks of MergeTree indices. Zero means disabled.", 0) \ - M(UInt64, index_mark_cache_size, 0, "Size of cache for uncompressed blocks of MergeTree indices. Zero means disabled.", 0) \ + M(UInt64, index_mark_cache_size, 0, "Size of cache for index marks. Zero means disabled.", 0) \ M(UInt64, mmap_cache_size, 1000, "A cache for mmapped files.", 0) /* The choice of default is arbitrary. */ \ \ M(Bool, disable_internal_dns_cache, false, "Disable internal DNS caching at all.", 0) \ From b878ef9f0167622e914d4af99bc03200a121c5b6 Mon Sep 17 00:00:00 2001 From: pufit Date: Wed, 22 Feb 2023 18:28:30 -0500 Subject: [PATCH 141/841] en documentation --- .../system-tables/server_settings.md | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 docs/en/operations/system-tables/server_settings.md diff --git a/docs/en/operations/system-tables/server_settings.md b/docs/en/operations/system-tables/server_settings.md new file mode 100644 index 00000000000..cbc50691218 --- /dev/null +++ b/docs/en/operations/system-tables/server_settings.md @@ -0,0 +1,51 @@ +--- +slug: /en/operations/system-tables/server_settings +--- +# server_settings + +Contains information about global settings for the server, which were specified in `config.xml`. +Currently, the table shows only settings from the first layer of `config.xml` and doesn't support nested configs (e.g. [logger](../../operations/server-configuration-parameters/settings.md#server_configuration_parameters-logger)). + +Columns: + +- `name` ([String](../../sql-reference/data-types/string.md)) — Server setting name. +- `value` ([String](../../sql-reference/data-types/string.md)) — Server setting value. +- `changed` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — Shows whether a setting was specified in `config.xml` +- `description` ([String](../../sql-reference/data-types/string.md)) — Short server setting description. +- `type` ([String](../../sql-reference/data-types/string.md)) — Server setting value type. + +**Example** + +The following example shows how to get information about server settings which name contains `thread_pool`. + +``` sql +SELECT * +FROM system.server_settings +WHERE name LIKE '%thread_pool%' +``` + +``` text +┌─name─────────────────────────┬─value─┬─changed─┬─description───────────────────────────┬─type───┐ +│ max_thread_pool_size │ 10000 │ 0 │ Max size for global thread pool. │ UInt64 │ +│ max_thread_pool_free_size │ 1000 │ 0 │ Max free size for global thread pool. │ UInt64 │ +│ thread_pool_queue_size │ 10000 │ 0 │ Queue size for global thread pool. │ UInt64 │ +│ max_io_thread_pool_size │ 100 │ 0 │ Max size for IO thread pool. │ UInt64 │ +│ max_io_thread_pool_free_size │ 0 │ 0 │ Max free size for IO thread pool. │ UInt64 │ +│ io_thread_pool_queue_size │ 10000 │ 0 │ Queue size for IO thread pool. │ UInt64 │ +└──────────────────────────────┴───────┴─────────┴───────────────────────────────────────┴────────┘ +``` + +Using of `WHERE changed` can be useful, for example, when you want to check +whether settings in configuration files are loaded correctly and are in use. + + + +``` sql +SELECT * FROM system.server_settings WHERE changed AND name='max_thread_pool_size' +``` + +**See also** + +- [Settings](../../operations/system-tables/settings.md) +- [Configuration Files](../../operations/configuration-files.md) +- [Server Settings](../../operations/server-configuration-parameters/settings.md) From c4646708a6761e9c55cb50cc97073a8b061d685b Mon Sep 17 00:00:00 2001 From: pufit Date: Wed, 22 Feb 2023 18:54:39 -0500 Subject: [PATCH 142/841] ru documentation --- .../system-tables/server_settings.md | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 docs/ru/operations/system-tables/server_settings.md diff --git a/docs/ru/operations/system-tables/server_settings.md b/docs/ru/operations/system-tables/server_settings.md new file mode 100644 index 00000000000..69bcaa0a241 --- /dev/null +++ b/docs/ru/operations/system-tables/server_settings.md @@ -0,0 +1,52 @@ +--- +slug: /ru/operations/system-tables/server_settings +--- +# system.server_settings + +Содержит информацию о конфигурации сервера. +В настоящий момент таблица содержит только верхнеуровневые параметры из файла `config.xml` и не поддерживает вложенные конфигурации +(например [logger](../../operations/server-configuration-parameters/settings.md#server_configuration_parameters-logger)) + +Столбцы: + +- `name` ([String](../../sql-reference/data-types/string.md)) — имя настройки. +- `value` ([String](../../sql-reference/data-types/string.md)) — значение настройки. +- `changed` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — показывает, была ли настройка указана в `config.xml` или является значением по-умолчанию. +- `description` ([String](../../sql-reference/data-types/string.md)) — краткое описание настройки. +- `type` ([String](../../sql-reference/data-types/string.md)) — тип настройки. + +**Пример** + +Пример показывает как получить информацию о настройках, имена которых содержат `thread_pool`. + +``` sql +SELECT * +FROM system.server_settings +WHERE name LIKE '%thread_pool%' +``` + +``` text +┌─name─────────────────────────┬─value─┬─changed─┬─description───────────────────────────┬─type───┐ +│ max_thread_pool_size │ 10000 │ 0 │ Max size for global thread pool. │ UInt64 │ +│ max_thread_pool_free_size │ 1000 │ 0 │ Max free size for global thread pool. │ UInt64 │ +│ thread_pool_queue_size │ 10000 │ 0 │ Queue size for global thread pool. │ UInt64 │ +│ max_io_thread_pool_size │ 100 │ 0 │ Max size for IO thread pool. │ UInt64 │ +│ max_io_thread_pool_free_size │ 0 │ 0 │ Max free size for IO thread pool. │ UInt64 │ +│ io_thread_pool_queue_size │ 10000 │ 0 │ Queue size for IO thread pool. │ UInt64 │ +└──────────────────────────────┴───────┴─────────┴───────────────────────────────────────┴────────┘ +``` + +Использование `WHERE changed` может быть полезно, например, если необходимо проверить, +что настройки корректно загрузились из конфигурационного файла и используются. + + + +``` sql +SELECT * FROM system.settings WHERE changed AND name='max_thread_pool_size' +``` + +**Cм. также** + +- [Настройки](../../operations/system-tables/settings.md) +- [Конфигурационные файлы](../../operations/configuration-files.md) +- [Настройки сервера](../../operations/server-configuration-parameters/settings.md) From 4ab568b91ada1dabbd8fdee40e18ceb148af723d Mon Sep 17 00:00:00 2001 From: "ducle.canh" Date: Thu, 23 Feb 2023 09:36:20 +0800 Subject: [PATCH 143/841] minor fix test format --- ...lyzer_aggregate_functions_arithmetic_operations_pass_fix.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/queries/0_stateless/02498_analyzer_aggregate_functions_arithmetic_operations_pass_fix.sql b/tests/queries/0_stateless/02498_analyzer_aggregate_functions_arithmetic_operations_pass_fix.sql index 72be274b222..5eba14ea528 100644 --- a/tests/queries/0_stateless/02498_analyzer_aggregate_functions_arithmetic_operations_pass_fix.sql +++ b/tests/queries/0_stateless/02498_analyzer_aggregate_functions_arithmetic_operations_pass_fix.sql @@ -13,4 +13,4 @@ INSERT INTO test_table VALUES (1, 1); SELECT sum((2 * id) as func), func FROM test_table GROUP BY id; -SELECT max(100-number), min(100-number) FROM numbers(2); \ No newline at end of file +SELECT max(100-number), min(100-number) FROM numbers(2); From f49a67752ea252a189f073bb329396cdbea58b2f Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Thu, 23 Feb 2023 13:28:36 +0000 Subject: [PATCH 144/841] Support constant on LHS --- ...ass.cpp => LogicalExpressionOptimizer.cpp} | 53 ++++++++++--------- ...ass.h => LogicalExpressionOptimizerPass.h} | 6 +-- src/Analyzer/QueryTreePassManager.cpp | 4 +- .../00736_disjunction_optimisation.reference | 37 +++++++++++++ .../00736_disjunction_optimisation.sql | 4 ++ ...ssions_optimizer_low_cardinality.reference | 22 ++++++++ ..._expressions_optimizer_low_cardinality.sql | 2 + 7 files changed, 98 insertions(+), 30 deletions(-) rename src/Analyzer/Passes/{OrEqualityChainToInPass.cpp => LogicalExpressionOptimizer.cpp} (63%) rename src/Analyzer/Passes/{OrEqualityChainToInPass.h => LogicalExpressionOptimizerPass.h} (81%) diff --git a/src/Analyzer/Passes/OrEqualityChainToInPass.cpp b/src/Analyzer/Passes/LogicalExpressionOptimizer.cpp similarity index 63% rename from src/Analyzer/Passes/OrEqualityChainToInPass.cpp rename to src/Analyzer/Passes/LogicalExpressionOptimizer.cpp index 212e8252ce4..f9744cdc8d0 100644 --- a/src/Analyzer/Passes/OrEqualityChainToInPass.cpp +++ b/src/Analyzer/Passes/LogicalExpressionOptimizer.cpp @@ -1,4 +1,4 @@ -#include +#include #include @@ -10,12 +10,12 @@ namespace DB { -class OrEqualityChainToInVisitor : public InDepthQueryTreeVisitorWithContext +class LogicalExpressionOptimizerVisitor : public InDepthQueryTreeVisitorWithContext { public: - using Base = InDepthQueryTreeVisitorWithContext; + using Base = InDepthQueryTreeVisitorWithContext; - explicit OrEqualityChainToInVisitor(ContextPtr context) + explicit LogicalExpressionOptimizerVisitor(ContextPtr context) : Base(std::move(context)) {} @@ -34,38 +34,32 @@ public: for (const auto & argument : function_node->getArguments()) { auto * argument_function = argument->as(); - if (!argument_function) + if (!argument_function || argument_function->getFunctionName() != "equals") { or_operands.push_back(argument); continue; } /// collect all equality checks (x = value) - if (argument_function->getFunctionName() != "equals") - { - or_operands.push_back(argument); - continue; - } const auto & equals_arguments = argument_function->getArguments().getNodes(); const auto & lhs = equals_arguments[0]; + const auto & rhs = equals_arguments[1]; - const auto * rhs_literal = equals_arguments[1]->as(); - if (!rhs_literal) - { + if (lhs->as()) + node_to_equals_functions[rhs].push_back(argument); + else if (rhs->as()) + node_to_equals_functions[lhs].push_back(argument); + else or_operands.push_back(argument); - continue; - } - - node_to_equals_functions[lhs].push_back(argument); } auto in_function_resolver = FunctionFactory::instance().get("in", getContext()); - for (auto & [lhs, equals_functions] : node_to_equals_functions) + for (auto & [expression, equals_functions] : node_to_equals_functions) { const auto & settings = getSettings(); - if (equals_functions.size() < settings.optimize_min_equality_disjunction_chain_length && !lhs.node->getResultType()->lowCardinality()) + if (equals_functions.size() < settings.optimize_min_equality_disjunction_chain_length && !expression.node->getResultType()->lowCardinality()) { std::move(equals_functions.begin(), equals_functions.end(), std::back_inserter(or_operands)); continue; @@ -78,9 +72,18 @@ public: { const auto * equals_function = equals->as(); assert(equals_function && equals_function->getFunctionName() == "equals"); - const auto * rhs_literal = equals_function->getArguments().getNodes()[1]->as(); - assert(rhs_literal); - args.push_back(rhs_literal->getValue()); + + const auto & equals_arguments = equals_function->getArguments().getNodes(); + if (const auto * rhs_literal = equals_arguments[1]->as()) + { + args.push_back(rhs_literal->getValue()); + } + else + { + const auto * lhs_literal = equals_arguments[0]->as(); + assert(lhs_literal); + args.push_back(lhs_literal->getValue()); + } } auto rhs_node = std::make_shared(std::move(args)); @@ -89,7 +92,7 @@ public: QueryTreeNodes in_arguments; in_arguments.reserve(2); - in_arguments.push_back(lhs.node); + in_arguments.push_back(expression.node); in_arguments.push_back(std::move(rhs_node)); in_function->getArguments().getNodes() = std::move(in_arguments); @@ -108,9 +111,9 @@ public: }; -void OrEqualityChainToInPass::run(QueryTreeNodePtr query_tree_node, ContextPtr context) +void LogicalExpressionOptimizerPass::run(QueryTreeNodePtr query_tree_node, ContextPtr context) { - OrEqualityChainToInVisitor visitor(std::move(context)); + LogicalExpressionOptimizerVisitor visitor(std::move(context)); visitor.visit(query_tree_node); } diff --git a/src/Analyzer/Passes/OrEqualityChainToInPass.h b/src/Analyzer/Passes/LogicalExpressionOptimizerPass.h similarity index 81% rename from src/Analyzer/Passes/OrEqualityChainToInPass.h rename to src/Analyzer/Passes/LogicalExpressionOptimizerPass.h index 2a9d6818a4f..327ae3c3fee 100644 --- a/src/Analyzer/Passes/OrEqualityChainToInPass.h +++ b/src/Analyzer/Passes/LogicalExpressionOptimizerPass.h @@ -8,7 +8,7 @@ namespace DB /** * This pass replaces chains of equality functions inside an OR with a single IN operator. * The replacement is done if: - * - rhs of the equality function is a literal + * - rhs of the equality function is a constant * - length of chain is at least 'optimize_min_equality_disjunction_chain_length' long OR lhs is LowCardinality * * E.g. (optimize_min_equality_disjunction_chain_length = 2) @@ -25,10 +25,10 @@ namespace DB * ------------------------------- */ -class OrEqualityChainToInPass final : public IQueryTreePass +class LogicalExpressionOptimizerPass final : public IQueryTreePass { public: - String getName() override { return "OrEqualityChainToIn"; } + String getName() override { return "LogicalExpressionOptimizer"; } String getDescription() override { return "Transform all the 'or's with equality check to a single IN function"; } diff --git a/src/Analyzer/QueryTreePassManager.cpp b/src/Analyzer/QueryTreePassManager.cpp index dbbedfd1aaa..da419f0e5bd 100644 --- a/src/Analyzer/QueryTreePassManager.cpp +++ b/src/Analyzer/QueryTreePassManager.cpp @@ -39,7 +39,7 @@ #include #include #include -#include +#include namespace DB @@ -264,7 +264,7 @@ void addQueryTreePasses(QueryTreePassManager & manager) manager.addPass(std::make_unique()); - manager.addPass(std::make_unique()); + manager.addPass(std::make_unique()); manager.addPass(std::make_unique()); diff --git a/tests/queries/0_stateless/00736_disjunction_optimisation.reference b/tests/queries/0_stateless/00736_disjunction_optimisation.reference index 4210571842f..fa395dccdc8 100644 --- a/tests/queries/0_stateless/00736_disjunction_optimisation.reference +++ b/tests/queries/0_stateless/00736_disjunction_optimisation.reference @@ -442,3 +442,40 @@ QUERY id: 0 JOIN TREE TABLE id: 3, table_name: default.bug SETTINGS allow_experimental_analyzer=1 +21 1 +22 1 +23 1 +21 1 +22 1 +23 1 +21 1 +22 1 +23 1 +21 1 +22 1 +23 1 +21 1 +22 1 +23 1 +21 1 +22 1 +23 1 +QUERY id: 0 + PROJECTION COLUMNS + s UInt64 + or(equals(s, 21), equals(22, s), equals(23, s)) UInt8 + PROJECTION + LIST id: 1, nodes: 2 + COLUMN id: 2, column_name: s, result_type: UInt64, source_id: 3 + FUNCTION id: 4, function_name: or, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 5, nodes: 2 + FUNCTION id: 6, function_name: in, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 7, nodes: 2 + COLUMN id: 2, column_name: s, result_type: UInt64, source_id: 3 + CONSTANT id: 8, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) + CONSTANT id: 9, constant_value: UInt64_0, constant_value_type: UInt8 + JOIN TREE + TABLE id: 3, table_name: default.bug + SETTINGS allow_experimental_analyzer=1 diff --git a/tests/queries/0_stateless/00736_disjunction_optimisation.sql b/tests/queries/0_stateless/00736_disjunction_optimisation.sql index e52ed2ab45b..e5bfc81f7ae 100644 --- a/tests/queries/0_stateless/00736_disjunction_optimisation.sql +++ b/tests/queries/0_stateless/00736_disjunction_optimisation.sql @@ -42,4 +42,8 @@ select s, (s=21 or s=22 or s=23) from bug; select s, (s=21 or s=22 or s=23) from bug SETTINGS allow_experimental_analyzer = 1;; explain query tree select s, (s=21 or s=22 or s=23) from bug SETTINGS allow_experimental_analyzer = 1;; +select s, (s=21 or 22=s or 23=s) from bug; +select s, (s=21 or 22=s or 23=s) from bug SETTINGS allow_experimental_analyzer = 1;; +explain query tree select s, (s=21 or 22=s or 23=s) from bug SETTINGS allow_experimental_analyzer = 1;; + DROP TABLE bug; diff --git a/tests/queries/0_stateless/02477_logical_expressions_optimizer_low_cardinality.reference b/tests/queries/0_stateless/02477_logical_expressions_optimizer_low_cardinality.reference index 086c0a49b59..617bdde183e 100644 --- a/tests/queries/0_stateless/02477_logical_expressions_optimizer_low_cardinality.reference +++ b/tests/queries/0_stateless/02477_logical_expressions_optimizer_low_cardinality.reference @@ -22,6 +22,28 @@ QUERY id: 0 SETTINGS allow_experimental_analyzer=1 SELECT a FROM t_logical_expressions_optimizer_low_cardinality +WHERE (a = \'x\') OR (\'y\' = a) +QUERY id: 0 + PROJECTION COLUMNS + a LowCardinality(String) + PROJECTION + LIST id: 1, nodes: 1 + COLUMN id: 2, column_name: a, result_type: LowCardinality(String), source_id: 3 + JOIN TREE + TABLE id: 3, table_name: default.t_logical_expressions_optimizer_low_cardinality + WHERE + FUNCTION id: 4, function_name: or, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 5, nodes: 2 + FUNCTION id: 6, function_name: in, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 7, nodes: 2 + COLUMN id: 2, column_name: a, result_type: LowCardinality(String), source_id: 3 + CONSTANT id: 8, constant_value: Tuple_(\'x\', \'y\'), constant_value_type: Tuple(String, String) + CONSTANT id: 9, constant_value: UInt64_0, constant_value_type: UInt8 + SETTINGS allow_experimental_analyzer=1 +SELECT a +FROM t_logical_expressions_optimizer_low_cardinality WHERE (b = 0) OR (b = 1) QUERY id: 0 PROJECTION COLUMNS diff --git a/tests/queries/0_stateless/02477_logical_expressions_optimizer_low_cardinality.sql b/tests/queries/0_stateless/02477_logical_expressions_optimizer_low_cardinality.sql index f5368679f60..14f8ad830e7 100644 --- a/tests/queries/0_stateless/02477_logical_expressions_optimizer_low_cardinality.sql +++ b/tests/queries/0_stateless/02477_logical_expressions_optimizer_low_cardinality.sql @@ -5,6 +5,8 @@ CREATE TABLE t_logical_expressions_optimizer_low_cardinality (a LowCardinality(S -- LowCardinality case, ignore optimize_min_equality_disjunction_chain_length limit, optimzer applied EXPLAIN SYNTAX SELECT a FROM t_logical_expressions_optimizer_low_cardinality WHERE a = 'x' OR a = 'y'; EXPLAIN QUERY TREE SELECT a FROM t_logical_expressions_optimizer_low_cardinality WHERE a = 'x' OR a = 'y' SETTINGS allow_experimental_analyzer = 1; +EXPLAIN SYNTAX SELECT a FROM t_logical_expressions_optimizer_low_cardinality WHERE a = 'x' OR 'y' = a; +EXPLAIN QUERY TREE SELECT a FROM t_logical_expressions_optimizer_low_cardinality WHERE a = 'x' OR 'y' = a SETTINGS allow_experimental_analyzer = 1; -- Non-LowCardinality case, optimizer not applied for short chains EXPLAIN SYNTAX SELECT a FROM t_logical_expressions_optimizer_low_cardinality WHERE b = 0 OR b = 1; EXPLAIN QUERY TREE SELECT a FROM t_logical_expressions_optimizer_low_cardinality WHERE b = 0 OR b = 1 SETTINGS allow_experimental_analyzer = 1; From bda1ce73679349413475a86d359e11964faedd63 Mon Sep 17 00:00:00 2001 From: Kruglov Pavel <48961922+Avogar@users.noreply.github.com> Date: Thu, 23 Feb 2023 14:47:29 +0100 Subject: [PATCH 145/841] Update test.py --- tests/integration/test_storage_kafka/test.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/integration/test_storage_kafka/test.py b/tests/integration/test_storage_kafka/test.py index ca189d837ad..51871eae3d8 100644 --- a/tests/integration/test_storage_kafka/test.py +++ b/tests/integration/test_storage_kafka/test.py @@ -4440,7 +4440,6 @@ def test_block_based_formats_2(kafka_cluster): kafka_delete_topic(admin_client, format_name) -@pytest.mark.skip(reason="Debug") def test_bad_messages_parsing(kafka_cluster): admin_client = KafkaAdminClient( bootstrap_servers="localhost:{}".format(kafka_cluster.kafka_port) From 88f322ace267dc1c194f85db5be1e94ba29c05c8 Mon Sep 17 00:00:00 2001 From: Kruglov Pavel <48961922+Avogar@users.noreply.github.com> Date: Thu, 23 Feb 2023 14:50:58 +0100 Subject: [PATCH 146/841] Try fix test --- tests/queries/0_stateless/02566_ipv4_ipv6_binary_formats.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/queries/0_stateless/02566_ipv4_ipv6_binary_formats.sh b/tests/queries/0_stateless/02566_ipv4_ipv6_binary_formats.sh index e84c06027e8..d27a2f9fcbb 100755 --- a/tests/queries/0_stateless/02566_ipv4_ipv6_binary_formats.sh +++ b/tests/queries/0_stateless/02566_ipv4_ipv6_binary_formats.sh @@ -6,8 +6,8 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) . "$CURDIR"/../shell_config.sh echo "CapnProto" -${CLICKHOUSE_LOCAL} -q "select '2001:db8:11a3:9d7:1f34:8a2e:7a0:765d'::IPv6 as ipv6, '127.0.0.1'::IPv4 as ipv4 format CapnProto settings format_schema='format_schemas/02566_ipv4_ipv6:Message'" > 02566_ipv4_ipv6_data.capnp -${CLICKHOUSE_LOCAL} -q "select * from file(02566_ipv4_ipv6_data.capnp, auto, 'ipv6 IPv6, ipv4 IPv4') settings format_schema='format_schemas/02566_ipv4_ipv6:Message'" +${CLICKHOUSE_LOCAL} -q "select '2001:db8:11a3:9d7:1f34:8a2e:7a0:765d'::IPv6 as ipv6, '127.0.0.1'::IPv4 as ipv4 format CapnProto settings format_schema='$CURDIR/format_schemas/02566_ipv4_ipv6:Message'" > 02566_ipv4_ipv6_data.capnp +${CLICKHOUSE_LOCAL} -q "select * from file(02566_ipv4_ipv6_data.capnp, auto, 'ipv6 IPv6, ipv4 IPv4') settings format_schema='$CURDIR/format_schemas/02566_ipv4_ipv6:Message'" rm 02566_ipv4_ipv6_data.capnp echo "Avro" From e37a3801ca4478bb88d21cc9d8eda029ba4dbc8a Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Thu, 23 Feb 2023 16:04:51 +0000 Subject: [PATCH 147/841] Add new logical optimizations --- .../Passes/LogicalExpressionOptimizer.cpp | 148 ++++++++++++++++-- ...00621_regression_for_in_operator.reference | 4 +- .../00736_disjunction_optimisation.reference | 64 ++++---- ...ssions_optimizer_low_cardinality.reference | 8 +- ...imizer_removing_redundant_checks.reference | 0 ...al_optimizer_removing_redundant_checks.sql | 26 +++ 6 files changed, 202 insertions(+), 48 deletions(-) create mode 100644 tests/queries/0_stateless/02668_logical_optimizer_removing_redundant_checks.reference create mode 100644 tests/queries/0_stateless/02668_logical_optimizer_removing_redundant_checks.sql diff --git a/src/Analyzer/Passes/LogicalExpressionOptimizer.cpp b/src/Analyzer/Passes/LogicalExpressionOptimizer.cpp index f9744cdc8d0..c29d38c7865 100644 --- a/src/Analyzer/Passes/LogicalExpressionOptimizer.cpp +++ b/src/Analyzer/Passes/LogicalExpressionOptimizer.cpp @@ -7,6 +7,8 @@ #include #include +#include + namespace DB { @@ -17,21 +19,115 @@ public: explicit LogicalExpressionOptimizerVisitor(ContextPtr context) : Base(std::move(context)) + , cast_function_resolver(FunctionFactory::instance().get("_CAST", getContext())) {} - void visitImpl(QueryTreeNodePtr & node) { auto * function_node = node->as(); - if (!function_node || function_node->getFunctionName() != "or") + if (!function_node) return; + if (function_node->getFunctionName() == "or") + { + tryReplaceOrEqualsChainWithIn(node); + return; + } + + if (function_node->getFunctionName() == "and") + { + tryReplaceAndEqualsChainsWithConstant(node); + return; + } + } +private: + void tryReplaceAndEqualsChainsWithConstant(QueryTreeNodePtr & node) + { + auto & function_node = node->as(); + assert(function_node.getFunctionName() == "and"); + + if (function_node.getResultType()->isNullable()) + return; + + QueryTreeNodes and_operands; + + QueryTreeNodePtrWithHashMap node_to_constants; + + for (const auto & argument : function_node.getArguments()) + { + auto * argument_function = argument->as(); + if (!argument_function || argument_function->getFunctionName() != "equals") + { + and_operands.push_back(argument); + continue; + } + + const auto & equals_arguments = argument_function->getArguments().getNodes(); + const auto & lhs = equals_arguments[0]; + const auto & rhs = equals_arguments[1]; + + const auto has_and_with_different_constant = [&](const QueryTreeNodePtr & expression, const ConstantNode * constant) + { + if (auto it = node_to_constants.find(expression); it != node_to_constants.end()) + { + if (!it->second->isEqual(*constant)) + return true; + } + else + { + node_to_constants.emplace(expression, constant); + and_operands.push_back(argument); + } + + return false; + }; + + bool collapse_to_false = false; + + if (const auto * lhs_literal = lhs->as()) + { + collapse_to_false = has_and_with_different_constant(rhs, lhs_literal); + } + else if (const auto * rhs_literal = rhs->as()) + { + collapse_to_false = has_and_with_different_constant(lhs, rhs_literal); + } + else + continue; + + if (collapse_to_false) + { + auto false_value = std::make_shared(0u, function_node.getResultType()); + auto false_node = std::make_shared(std::move(false_value)); + node = std::move(false_node); + return; + } + } + + if (and_operands.size() == 1) + { + assert(!function_node.getResultType()->isNullable()); + resolveAsCast(function_node, std::move(and_operands[0])); + return; + } + + auto and_function_resolver = FunctionFactory::instance().get("and", getContext()); + function_node.getArguments().getNodes() = std::move(and_operands); + function_node.resolveAsFunction(and_function_resolver); + } + + void tryReplaceOrEqualsChainWithIn(QueryTreeNodePtr & node) + { + auto & function_node = node->as(); + assert(function_node.getFunctionName() == "or"); + QueryTreeNodes or_operands; QueryTreeNodePtrWithHashMap node_to_equals_functions; + QueryTreeNodePtrWithHashMap node_to_constants; - for (const auto & argument : function_node->getArguments()) + for (const auto & argument : function_node.getArguments()) { auto * argument_function = argument->as(); if (!argument_function || argument_function->getFunctionName() != "equals") @@ -46,10 +142,20 @@ public: const auto & lhs = equals_arguments[0]; const auto & rhs = equals_arguments[1]; - if (lhs->as()) - node_to_equals_functions[rhs].push_back(argument); - else if (rhs->as()) - node_to_equals_functions[lhs].push_back(argument); + const auto add_equals_function_if_not_present = [&](const auto & expression_node, const ConstantNode * constant) + { + auto & constant_set = node_to_constants[expression_node]; + if (!constant_set.contains(constant)) + { + constant_set.insert(constant); + node_to_equals_functions[expression_node].push_back(argument); + } + }; + + if (const auto * lhs_literal = lhs->as()) + add_equals_function_if_not_present(rhs, lhs_literal); + else if (const auto * rhs_literal = rhs->as()) + add_equals_function_if_not_present(lhs, rhs_literal); else or_operands.push_back(argument); } @@ -102,12 +208,34 @@ public: } if (or_operands.size() == 1) - or_operands.push_back(std::make_shared(static_cast(0))); + { + assert(!function_node.getResultType()->isNullable()); + resolveAsCast(function_node, std::move(or_operands[0])); + return; + } auto or_function_resolver = FunctionFactory::instance().get("or", getContext()); - function_node->getArguments().getNodes() = std::move(or_operands); - function_node->resolveAsFunction(or_function_resolver); + function_node.getArguments().getNodes() = std::move(or_operands); + function_node.resolveAsFunction(or_function_resolver); } + + void resolveAsCast(FunctionNode & function_node, QueryTreeNodePtr operand) + { + std::string cast_type = function_node.getResultType()->getName(); + auto cast_type_constant_value = std::make_shared(std::move(cast_type), std::make_shared()); + auto cast_type_constant_node = std::make_shared(std::move(cast_type_constant_value)); + + QueryTreeNodes arguments; + arguments.reserve(2); + arguments.push_back(std::move(operand)); + arguments.push_back(std::move(cast_type_constant_node)); + + function_node.getArguments().getNodes() = std::move(arguments); + + function_node.resolveAsFunction(cast_function_resolver); + } + + const FunctionOverloadResolverPtr cast_function_resolver; }; diff --git a/tests/queries/0_stateless/00621_regression_for_in_operator.reference b/tests/queries/0_stateless/00621_regression_for_in_operator.reference index c9eb7a08fc6..54b345b65c0 100644 --- a/tests/queries/0_stateless/00621_regression_for_in_operator.reference +++ b/tests/queries/0_stateless/00621_regression_for_in_operator.reference @@ -12,7 +12,7 @@ QUERY id: 0 JOIN TREE TABLE id: 3, table_name: default.regression_for_in_operator_view WHERE - FUNCTION id: 4, function_name: or, function_type: ordinary, result_type: UInt8 + FUNCTION id: 4, function_name: _CAST, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 5, nodes: 2 FUNCTION id: 6, function_name: in, function_type: ordinary, result_type: UInt8 @@ -20,7 +20,7 @@ QUERY id: 0 LIST id: 7, nodes: 2 COLUMN id: 8, column_name: g, result_type: String, source_id: 3 CONSTANT id: 9, constant_value: Tuple_(\'5\', \'6\'), constant_value_type: Tuple(String, String) - CONSTANT id: 10, constant_value: UInt64_0, constant_value_type: UInt8 + CONSTANT id: 10, constant_value: \'UInt8\', constant_value_type: String SETTINGS allow_experimental_analyzer=1 2 2 diff --git a/tests/queries/0_stateless/00736_disjunction_optimisation.reference b/tests/queries/0_stateless/00736_disjunction_optimisation.reference index fa395dccdc8..4b899527913 100644 --- a/tests/queries/0_stateless/00736_disjunction_optimisation.reference +++ b/tests/queries/0_stateless/00736_disjunction_optimisation.reference @@ -39,7 +39,7 @@ QUERY id: 0 FUNCTION id: 5, function_name: and, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 6, nodes: 2 - FUNCTION id: 7, function_name: or, function_type: ordinary, result_type: UInt8 + FUNCTION id: 7, function_name: _CAST, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 8, nodes: 2 FUNCTION id: 9, function_name: in, function_type: ordinary, result_type: UInt8 @@ -47,8 +47,8 @@ QUERY id: 0 LIST id: 10, nodes: 2 COLUMN id: 11, column_name: k, result_type: UInt64, source_id: 3 CONSTANT id: 12, constant_value: Tuple_(UInt64_1, UInt64_2, UInt64_3), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 13, constant_value: UInt64_0, constant_value_type: UInt8 - FUNCTION id: 14, function_name: or, function_type: ordinary, result_type: UInt8 + CONSTANT id: 13, constant_value: \'UInt8\', constant_value_type: String + FUNCTION id: 14, function_name: _CAST, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 15, nodes: 2 FUNCTION id: 16, function_name: in, function_type: ordinary, result_type: UInt8 @@ -56,7 +56,7 @@ QUERY id: 0 LIST id: 17, nodes: 2 COLUMN id: 18, column_name: s, result_type: UInt64, source_id: 3 CONSTANT id: 19, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 20, constant_value: UInt64_0, constant_value_type: UInt8 + CONSTANT id: 20, constant_value: \'UInt8\', constant_value_type: String SETTINGS allow_experimental_analyzer=1 1 21 1 22 @@ -96,7 +96,7 @@ QUERY id: 0 JOIN TREE TABLE id: 7, table_name: default.bug WHERE - FUNCTION id: 9, function_name: or, function_type: ordinary, result_type: UInt8 + FUNCTION id: 9, function_name: _CAST, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 10, nodes: 2 FUNCTION id: 11, function_name: in, function_type: ordinary, result_type: UInt8 @@ -104,9 +104,9 @@ QUERY id: 0 LIST id: 12, nodes: 2 COLUMN id: 13, column_name: k, result_type: UInt64, source_id: 7 CONSTANT id: 14, constant_value: Tuple_(UInt64_1, UInt64_2, UInt64_3), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 15, constant_value: UInt64_0, constant_value_type: UInt8 + CONSTANT id: 15, constant_value: \'UInt8\', constant_value_type: String WHERE - FUNCTION id: 16, function_name: or, function_type: ordinary, result_type: UInt8 + FUNCTION id: 16, function_name: _CAST, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 17, nodes: 2 FUNCTION id: 18, function_name: in, function_type: ordinary, result_type: UInt8 @@ -114,7 +114,7 @@ QUERY id: 0 LIST id: 19, nodes: 2 COLUMN id: 20, column_name: s, result_type: UInt64, source_id: 3 CONSTANT id: 21, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 22, constant_value: UInt64_0, constant_value_type: UInt8 + CONSTANT id: 22, constant_value: \'UInt8\', constant_value_type: String SETTINGS allow_experimental_analyzer=1 1 1 21 1 1 1 1 1 22 0 1 1 @@ -145,7 +145,7 @@ QUERY id: 0 PROJECTION LIST id: 1, nodes: 6 COLUMN id: 2, column_name: k, result_type: UInt64, source_id: 3 - FUNCTION id: 4, function_name: or, function_type: ordinary, result_type: UInt8 + FUNCTION id: 4, function_name: _CAST, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 5, nodes: 2 FUNCTION id: 6, function_name: in, function_type: ordinary, result_type: UInt8 @@ -153,14 +153,14 @@ QUERY id: 0 LIST id: 7, nodes: 2 COLUMN id: 2, column_name: k, result_type: UInt64, source_id: 3 CONSTANT id: 8, constant_value: Tuple_(UInt64_1, UInt64_2, UInt64_3), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 9, constant_value: UInt64_0, constant_value_type: UInt8 + CONSTANT id: 9, constant_value: \'UInt8\', constant_value_type: String COLUMN id: 10, column_name: s, result_type: UInt64, source_id: 3 FUNCTION id: 11, function_name: equals, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 12, nodes: 2 COLUMN id: 10, column_name: s, result_type: UInt64, source_id: 3 CONSTANT id: 13, constant_value: UInt64_21, constant_value_type: UInt8 - FUNCTION id: 14, function_name: or, function_type: ordinary, result_type: UInt8 + FUNCTION id: 14, function_name: _CAST, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 15, nodes: 2 FUNCTION id: 16, function_name: in, function_type: ordinary, result_type: UInt8 @@ -168,8 +168,8 @@ QUERY id: 0 LIST id: 17, nodes: 2 COLUMN id: 10, column_name: s, result_type: UInt64, source_id: 3 CONSTANT id: 18, constant_value: Tuple_(UInt64_21, UInt64_22), constant_value_type: Tuple(UInt8, UInt8) - CONSTANT id: 19, constant_value: UInt64_0, constant_value_type: UInt8 - FUNCTION id: 20, function_name: or, function_type: ordinary, result_type: UInt8 + CONSTANT id: 19, constant_value: \'UInt8\', constant_value_type: String + FUNCTION id: 20, function_name: _CAST, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 21, nodes: 2 FUNCTION id: 22, function_name: in, function_type: ordinary, result_type: UInt8 @@ -177,7 +177,7 @@ QUERY id: 0 LIST id: 23, nodes: 2 COLUMN id: 10, column_name: s, result_type: UInt64, source_id: 3 CONSTANT id: 24, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 25, constant_value: UInt64_0, constant_value_type: UInt8 + CONSTANT id: 25, constant_value: \'UInt8\', constant_value_type: String JOIN TREE TABLE id: 3, table_name: default.bug SETTINGS allow_experimental_analyzer=1 @@ -206,7 +206,7 @@ QUERY id: 0 PROJECTION LIST id: 1, nodes: 2 COLUMN id: 2, column_name: s, result_type: UInt64, source_id: 3 - FUNCTION id: 4, function_name: or, function_type: ordinary, result_type: UInt8 + FUNCTION id: 4, function_name: _CAST, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 5, nodes: 2 FUNCTION id: 6, function_name: in, function_type: ordinary, result_type: UInt8 @@ -214,7 +214,7 @@ QUERY id: 0 LIST id: 7, nodes: 2 COLUMN id: 2, column_name: s, result_type: UInt64, source_id: 3 CONSTANT id: 8, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 9, constant_value: UInt64_0, constant_value_type: UInt8 + CONSTANT id: 9, constant_value: \'UInt8\', constant_value_type: String JOIN TREE TABLE id: 3, table_name: default.bug SETTINGS allow_experimental_analyzer=1 @@ -259,7 +259,7 @@ QUERY id: 0 FUNCTION id: 5, function_name: and, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 6, nodes: 2 - FUNCTION id: 7, function_name: or, function_type: ordinary, result_type: UInt8 + FUNCTION id: 7, function_name: _CAST, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 8, nodes: 2 FUNCTION id: 9, function_name: in, function_type: ordinary, result_type: UInt8 @@ -267,8 +267,8 @@ QUERY id: 0 LIST id: 10, nodes: 2 COLUMN id: 11, column_name: k, result_type: UInt64, source_id: 3 CONSTANT id: 12, constant_value: Tuple_(UInt64_1, UInt64_2, UInt64_3), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 13, constant_value: UInt64_0, constant_value_type: UInt8 - FUNCTION id: 14, function_name: or, function_type: ordinary, result_type: UInt8 + CONSTANT id: 13, constant_value: \'UInt8\', constant_value_type: String + FUNCTION id: 14, function_name: _CAST, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 15, nodes: 2 FUNCTION id: 16, function_name: in, function_type: ordinary, result_type: UInt8 @@ -276,7 +276,7 @@ QUERY id: 0 LIST id: 17, nodes: 2 COLUMN id: 18, column_name: s, result_type: UInt64, source_id: 3 CONSTANT id: 19, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 20, constant_value: UInt64_0, constant_value_type: UInt8 + CONSTANT id: 20, constant_value: \'UInt8\', constant_value_type: String SETTINGS allow_experimental_analyzer=1 1 21 1 22 @@ -316,7 +316,7 @@ QUERY id: 0 JOIN TREE TABLE id: 7, table_name: default.bug WHERE - FUNCTION id: 9, function_name: or, function_type: ordinary, result_type: UInt8 + FUNCTION id: 9, function_name: _CAST, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 10, nodes: 2 FUNCTION id: 11, function_name: in, function_type: ordinary, result_type: UInt8 @@ -324,9 +324,9 @@ QUERY id: 0 LIST id: 12, nodes: 2 COLUMN id: 13, column_name: k, result_type: UInt64, source_id: 7 CONSTANT id: 14, constant_value: Tuple_(UInt64_1, UInt64_2, UInt64_3), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 15, constant_value: UInt64_0, constant_value_type: UInt8 + CONSTANT id: 15, constant_value: \'UInt8\', constant_value_type: String WHERE - FUNCTION id: 16, function_name: or, function_type: ordinary, result_type: UInt8 + FUNCTION id: 16, function_name: _CAST, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 17, nodes: 2 FUNCTION id: 18, function_name: in, function_type: ordinary, result_type: UInt8 @@ -334,7 +334,7 @@ QUERY id: 0 LIST id: 19, nodes: 2 COLUMN id: 20, column_name: s, result_type: UInt64, source_id: 3 CONSTANT id: 21, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 22, constant_value: UInt64_0, constant_value_type: UInt8 + CONSTANT id: 22, constant_value: \'UInt8\', constant_value_type: String SETTINGS allow_experimental_analyzer=1 1 1 21 1 1 1 1 1 22 0 1 1 @@ -365,7 +365,7 @@ QUERY id: 0 PROJECTION LIST id: 1, nodes: 6 COLUMN id: 2, column_name: k, result_type: UInt64, source_id: 3 - FUNCTION id: 4, function_name: or, function_type: ordinary, result_type: UInt8 + FUNCTION id: 4, function_name: _CAST, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 5, nodes: 2 FUNCTION id: 6, function_name: in, function_type: ordinary, result_type: UInt8 @@ -373,7 +373,7 @@ QUERY id: 0 LIST id: 7, nodes: 2 COLUMN id: 2, column_name: k, result_type: UInt64, source_id: 3 CONSTANT id: 8, constant_value: Tuple_(UInt64_1, UInt64_2, UInt64_3), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 9, constant_value: UInt64_0, constant_value_type: UInt8 + CONSTANT id: 9, constant_value: \'UInt8\', constant_value_type: String COLUMN id: 10, column_name: s, result_type: UInt64, source_id: 3 FUNCTION id: 11, function_name: equals, function_type: ordinary, result_type: UInt8 ARGUMENTS @@ -393,7 +393,7 @@ QUERY id: 0 LIST id: 20, nodes: 2 COLUMN id: 10, column_name: s, result_type: UInt64, source_id: 3 CONSTANT id: 21, constant_value: UInt64_22, constant_value_type: UInt8 - FUNCTION id: 22, function_name: or, function_type: ordinary, result_type: UInt8 + FUNCTION id: 22, function_name: _CAST, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 23, nodes: 2 FUNCTION id: 24, function_name: in, function_type: ordinary, result_type: UInt8 @@ -401,7 +401,7 @@ QUERY id: 0 LIST id: 25, nodes: 2 COLUMN id: 10, column_name: s, result_type: UInt64, source_id: 3 CONSTANT id: 26, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 27, constant_value: UInt64_0, constant_value_type: UInt8 + CONSTANT id: 27, constant_value: \'UInt8\', constant_value_type: String JOIN TREE TABLE id: 3, table_name: default.bug SETTINGS allow_experimental_analyzer=1 @@ -430,7 +430,7 @@ QUERY id: 0 PROJECTION LIST id: 1, nodes: 2 COLUMN id: 2, column_name: s, result_type: UInt64, source_id: 3 - FUNCTION id: 4, function_name: or, function_type: ordinary, result_type: UInt8 + FUNCTION id: 4, function_name: _CAST, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 5, nodes: 2 FUNCTION id: 6, function_name: in, function_type: ordinary, result_type: UInt8 @@ -438,7 +438,7 @@ QUERY id: 0 LIST id: 7, nodes: 2 COLUMN id: 2, column_name: s, result_type: UInt64, source_id: 3 CONSTANT id: 8, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 9, constant_value: UInt64_0, constant_value_type: UInt8 + CONSTANT id: 9, constant_value: \'UInt8\', constant_value_type: String JOIN TREE TABLE id: 3, table_name: default.bug SETTINGS allow_experimental_analyzer=1 @@ -467,7 +467,7 @@ QUERY id: 0 PROJECTION LIST id: 1, nodes: 2 COLUMN id: 2, column_name: s, result_type: UInt64, source_id: 3 - FUNCTION id: 4, function_name: or, function_type: ordinary, result_type: UInt8 + FUNCTION id: 4, function_name: _CAST, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 5, nodes: 2 FUNCTION id: 6, function_name: in, function_type: ordinary, result_type: UInt8 @@ -475,7 +475,7 @@ QUERY id: 0 LIST id: 7, nodes: 2 COLUMN id: 2, column_name: s, result_type: UInt64, source_id: 3 CONSTANT id: 8, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 9, constant_value: UInt64_0, constant_value_type: UInt8 + CONSTANT id: 9, constant_value: \'UInt8\', constant_value_type: String JOIN TREE TABLE id: 3, table_name: default.bug SETTINGS allow_experimental_analyzer=1 diff --git a/tests/queries/0_stateless/02477_logical_expressions_optimizer_low_cardinality.reference b/tests/queries/0_stateless/02477_logical_expressions_optimizer_low_cardinality.reference index 617bdde183e..22bd68e0ac1 100644 --- a/tests/queries/0_stateless/02477_logical_expressions_optimizer_low_cardinality.reference +++ b/tests/queries/0_stateless/02477_logical_expressions_optimizer_low_cardinality.reference @@ -10,7 +10,7 @@ QUERY id: 0 JOIN TREE TABLE id: 3, table_name: default.t_logical_expressions_optimizer_low_cardinality WHERE - FUNCTION id: 4, function_name: or, function_type: ordinary, result_type: UInt8 + FUNCTION id: 4, function_name: _CAST, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 5, nodes: 2 FUNCTION id: 6, function_name: in, function_type: ordinary, result_type: UInt8 @@ -18,7 +18,7 @@ QUERY id: 0 LIST id: 7, nodes: 2 COLUMN id: 2, column_name: a, result_type: LowCardinality(String), source_id: 3 CONSTANT id: 8, constant_value: Tuple_(\'x\', \'y\'), constant_value_type: Tuple(String, String) - CONSTANT id: 9, constant_value: UInt64_0, constant_value_type: UInt8 + CONSTANT id: 9, constant_value: \'UInt8\', constant_value_type: String SETTINGS allow_experimental_analyzer=1 SELECT a FROM t_logical_expressions_optimizer_low_cardinality @@ -32,7 +32,7 @@ QUERY id: 0 JOIN TREE TABLE id: 3, table_name: default.t_logical_expressions_optimizer_low_cardinality WHERE - FUNCTION id: 4, function_name: or, function_type: ordinary, result_type: UInt8 + FUNCTION id: 4, function_name: _CAST, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 5, nodes: 2 FUNCTION id: 6, function_name: in, function_type: ordinary, result_type: UInt8 @@ -40,7 +40,7 @@ QUERY id: 0 LIST id: 7, nodes: 2 COLUMN id: 2, column_name: a, result_type: LowCardinality(String), source_id: 3 CONSTANT id: 8, constant_value: Tuple_(\'x\', \'y\'), constant_value_type: Tuple(String, String) - CONSTANT id: 9, constant_value: UInt64_0, constant_value_type: UInt8 + CONSTANT id: 9, constant_value: \'UInt8\', constant_value_type: String SETTINGS allow_experimental_analyzer=1 SELECT a FROM t_logical_expressions_optimizer_low_cardinality diff --git a/tests/queries/0_stateless/02668_logical_optimizer_removing_redundant_checks.reference b/tests/queries/0_stateless/02668_logical_optimizer_removing_redundant_checks.reference new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/queries/0_stateless/02668_logical_optimizer_removing_redundant_checks.sql b/tests/queries/0_stateless/02668_logical_optimizer_removing_redundant_checks.sql new file mode 100644 index 00000000000..f20ef412215 --- /dev/null +++ b/tests/queries/0_stateless/02668_logical_optimizer_removing_redundant_checks.sql @@ -0,0 +1,26 @@ +SET allow_experimental_analyzer = 1; + +DROP TABLE IF EXISTS 02668_logical_optimizer; + +CREATE TABLE 02668_logical_optimizer +(a Int32, b LowCardinality(String)) +ENGINE=Memory; + +INSERT INTO 02668_logical_optimizer VALUES (1, 'test'), (2, 'test2'), (3, 'another'); + +SET optimize_min_equality_disjunction_chain_length = 2; + +SELECT * FROM 02668_logical_optimizer WHERE a = 1 OR 3 = a OR 1 = a; +EXPLAIN QUERY TREE SELECT * FROM 02668_logical_optimizer WHERE a = 1 OR 3 = a OR 1 = a; + +SELECT * FROM 02668_logical_optimizer WHERE a = 1 OR 1 = a; +EXPLAIN QUERY TREE SELECT * FROM 02668_logical_optimizer WHERE a = 1 OR 1 = a; + +SELECT * FROM 02668_logical_optimizer WHERE a = 1 AND 2 = a; +EXPLAIN QUERY TREE SELECT * FROM 02668_logical_optimizer WHERE a = 1 AND 2 = a; + +SELECT * FROM 02668_logical_optimizer WHERE 3 = a AND b = 'another' AND a = 3; +EXPLAIN QUERY TREE SELECT * FROM 02668_logical_optimizer WHERE a = 3 AND b = 'another' AND a = 3; + +SELECT * FROM 02668_logical_optimizer WHERE a = 2 AND 2 = a; +EXPLAIN QUERY TREE SELECT * FROM 02668_logical_optimizer WHERE a = 2 AND 2 = a; From 54622566df3447ea970569ef6b26a281af22d53f Mon Sep 17 00:00:00 2001 From: avogar Date: Thu, 23 Feb 2023 16:14:10 +0000 Subject: [PATCH 148/841] Add setting to change parquet version --- docs/en/interfaces/formats.md | 3 ++- docs/en/operations/settings/settings-formats.md | 6 ++++++ src/Core/Settings.h | 1 + src/Core/SettingsChangesHistory.h | 1 + src/Core/SettingsEnums.cpp | 8 ++++++++ src/Core/SettingsEnums.h | 2 ++ src/Formats/FormatFactory.cpp | 1 + src/Formats/FormatSettings.h | 15 ++++++++++++--- .../Formats/Impl/ParquetBlockOutputFormat.cpp | 17 ++++++++++++++++- ...hema_inference_formats_with_schema.reference | 2 +- 10 files changed, 50 insertions(+), 6 deletions(-) diff --git a/docs/en/interfaces/formats.md b/docs/en/interfaces/formats.md index e94c6377ae9..10a9e59176e 100644 --- a/docs/en/interfaces/formats.md +++ b/docs/en/interfaces/formats.md @@ -1971,7 +1971,8 @@ To exchange data with Hadoop, you can use [HDFS table engine](/docs/en/engines/t - [input_format_parquet_case_insensitive_column_matching](/docs/en/operations/settings/settings-formats.md/#input_format_parquet_case_insensitive_column_matching) - ignore case when matching Parquet columns with ClickHouse columns. Default value - `false`. - [input_format_parquet_allow_missing_columns](/docs/en/operations/settings/settings-formats.md/#input_format_parquet_allow_missing_columns) - allow missing columns while reading Parquet data. Default value - `false`. - [input_format_parquet_skip_columns_with_unsupported_types_in_schema_inference](/docs/en/operations/settings/settings-formats.md/#input_format_parquet_skip_columns_with_unsupported_types_in_schema_inference) - allow skipping columns with unsupported types while schema inference for Parquet format. Default value - `false`. -- [output_format_parquet_fixed_string_as_fixed_byte_array](/docs/en/operations/settings/settings-formats.md/#output_format_parquet_fixed_string_as_fixed_byte_array) - use Parquet FIXED_LENGTH_BYTE_ARRAY type instead of Binary/String for FixedString columns. Default value - `true`. +- [output_format_parquet_fixed_string_as_fixed_byte_array](/docs/en/operations/settings/settings-formats.md/#output_format_parquet_fixed_string_as_fixed_byte_array) - use Parquet FIXED_LENGTH_BYTE_ARRAY type instead of Binary/String for FixedString columns. Default value - `true`. +- [output_format_parquet_version](/docs/en/operations/settings/settings-formats.md/#output_format_parquet_version) - The version of Parquet format used in output format. Default value - `v2_latest`. ## Arrow {#data-format-arrow} diff --git a/docs/en/operations/settings/settings-formats.md b/docs/en/operations/settings/settings-formats.md index 3f81dc528f5..84128b1d122 100644 --- a/docs/en/operations/settings/settings-formats.md +++ b/docs/en/operations/settings/settings-formats.md @@ -1099,6 +1099,12 @@ Use Parquet FIXED_LENGTH_BYTE_ARRAY type instead of Binary/String for FixedStrin Enabled by default. +### output_format_parquet_version {#output_format_parquet_version} + +The version of Parquet format used in output format. Supported versions: `v1_0`, `v2_4`, `v2_6` and `v2_latest`. + +Default value: `v2_latest`. + ## Hive format settings {#hive-format-settings} ### input_format_hive_text_fields_delimiter {#input_format_hive_text_fields_delimiter} diff --git a/src/Core/Settings.h b/src/Core/Settings.h index 376395e370f..48caa1740cc 100644 --- a/src/Core/Settings.h +++ b/src/Core/Settings.h @@ -851,6 +851,7 @@ class IColumn; M(UInt64, output_format_parquet_row_group_size, 1000000, "Row group size in rows.", 0) \ M(Bool, output_format_parquet_string_as_string, false, "Use Parquet String type instead of Binary for String columns.", 0) \ M(Bool, output_format_parquet_fixed_string_as_fixed_byte_array, true, "Use Parquet FIXED_LENGTH_BYTE_ARRAY type instead of Binary for FixedString columns.", 0) \ + M(ParquetVersion, output_format_parquet_version, "v2_latest", "Parquet format version for output format. Supported versions: v1_0, v2_4, v2_6 and v2_latest (default)", 0) \ M(String, output_format_avro_codec, "", "Compression codec used for output. Possible values: 'null', 'deflate', 'snappy'.", 0) \ M(UInt64, output_format_avro_sync_interval, 16 * 1024, "Sync interval in bytes.", 0) \ M(String, output_format_avro_string_column_pattern, "", "For Avro format: regexp of String columns to select as AVRO string.", 0) \ diff --git a/src/Core/SettingsChangesHistory.h b/src/Core/SettingsChangesHistory.h index 5684e4f3114..7621ab03f61 100644 --- a/src/Core/SettingsChangesHistory.h +++ b/src/Core/SettingsChangesHistory.h @@ -80,6 +80,7 @@ namespace SettingsChangesHistory /// It's used to implement `compatibility` setting (see https://github.com/ClickHouse/ClickHouse/issues/35972) static std::map settings_changes_history = { + {"23.3", {{"output_format_parquet_version", "v1_0", "v2_latest", "Use latest Parquet format version for output format"}}}, {"23.2", {{"output_format_parquet_fixed_string_as_fixed_byte_array", false, true, "Use Parquet FIXED_LENGTH_BYTE_ARRAY type for FixedString by default"}, {"output_format_arrow_fixed_string_as_fixed_byte_array", false, true, "Use Arrow FIXED_SIZE_BINARY type for FixedString by default"}, {"query_plan_remove_redundant_distinct", false, true, "Remove redundant Distinct step in query plan"}, diff --git a/src/Core/SettingsEnums.cpp b/src/Core/SettingsEnums.cpp index bce4f7c0000..751fbf65281 100644 --- a/src/Core/SettingsEnums.cpp +++ b/src/Core/SettingsEnums.cpp @@ -171,4 +171,12 @@ IMPLEMENT_SETTING_ENUM(LocalFSReadMethod, ErrorCodes::BAD_ARGUMENTS, {{"mmap", LocalFSReadMethod::mmap}, {"pread", LocalFSReadMethod::pread}, {"read", LocalFSReadMethod::read}}) + + +IMPLEMENT_SETTING_ENUM_WITH_RENAME(ParquetVersion, ErrorCodes::BAD_ARGUMENTS, + {{"v1_0", FormatSettings::ParquetVersion::V1_0}, + {"v2_4", FormatSettings::ParquetVersion::V2_4}, + {"v2_6", FormatSettings::ParquetVersion::V2_6}, + {"v2_latest", FormatSettings::ParquetVersion::V2_LATEST}}) + } diff --git a/src/Core/SettingsEnums.h b/src/Core/SettingsEnums.h index 35eb8eb4b6c..139a04f3a5a 100644 --- a/src/Core/SettingsEnums.h +++ b/src/Core/SettingsEnums.h @@ -72,6 +72,8 @@ DECLARE_SETTING_ENUM_WITH_RENAME(DateTimeInputFormat, FormatSettings::DateTimeIn DECLARE_SETTING_ENUM_WITH_RENAME(DateTimeOutputFormat, FormatSettings::DateTimeOutputFormat) +DECLARE_SETTING_ENUM_WITH_RENAME(ParquetVersion, FormatSettings::ParquetVersion) + enum class LogsLevel { none = 0, /// Disable diff --git a/src/Formats/FormatFactory.cpp b/src/Formats/FormatFactory.cpp index 5bee13075fb..0480c92edcf 100644 --- a/src/Formats/FormatFactory.cpp +++ b/src/Formats/FormatFactory.cpp @@ -111,6 +111,7 @@ FormatSettings getFormatSettings(ContextPtr context, const Settings & settings) format_settings.null_as_default = settings.input_format_null_as_default; format_settings.decimal_trailing_zeros = settings.output_format_decimal_trailing_zeros; format_settings.parquet.row_group_size = settings.output_format_parquet_row_group_size; + format_settings.parquet.output_version = settings.output_format_parquet_version; format_settings.parquet.import_nested = settings.input_format_parquet_import_nested; format_settings.parquet.case_insensitive_column_matching = settings.input_format_parquet_case_insensitive_column_matching; format_settings.parquet.allow_missing_columns = settings.input_format_parquet_allow_missing_columns; diff --git a/src/Formats/FormatSettings.h b/src/Formats/FormatSettings.h index 9b657d37862..58823b483be 100644 --- a/src/Formats/FormatSettings.h +++ b/src/Formats/FormatSettings.h @@ -46,9 +46,9 @@ struct FormatSettings enum class DateTimeInputFormat { - Basic, /// Default format for fast parsing: YYYY-MM-DD hh:mm:ss (ISO-8601 without fractional part and timezone) or NNNNNNNNNN unix timestamp. - BestEffort, /// Use sophisticated rules to parse whatever possible. - BestEffortUS /// Use sophisticated rules to parse American style: mm/dd/yyyy + Basic, /// Default format for fast parsing: YYYY-MM-DD hh:mm:ss (ISO-8601 without fractional part and timezone) or NNNNNNNNNN unix timestamp. + BestEffort, /// Use sophisticated rules to parse whatever possible. + BestEffortUS /// Use sophisticated rules to parse American style: mm/dd/yyyy }; DateTimeInputFormat date_time_input_format = DateTimeInputFormat::Basic; @@ -176,6 +176,14 @@ struct FormatSettings String column_for_object_name; } json_object_each_row; + enum class ParquetVersion + { + V1_0, + V2_4, + V2_6, + V2_LATEST, + }; + struct { UInt64 row_group_size = 1000000; @@ -187,6 +195,7 @@ struct FormatSettings bool output_string_as_string = false; bool output_fixed_string_as_fixed_byte_array = true; UInt64 max_block_size = 8192; + ParquetVersion output_version; } parquet; struct Pretty diff --git a/src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp b/src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp index 375d3878b10..18c81f8fd6a 100644 --- a/src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp +++ b/src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp @@ -16,6 +16,21 @@ namespace ErrorCodes extern const int UNKNOWN_EXCEPTION; } +static parquet::ParquetVersion::type getParquetVersion(const FormatSettings & settings) +{ + switch (settings.parquet.output_version) + { + case FormatSettings::ParquetVersion::V1_0: + return parquet::ParquetVersion::PARQUET_1_0; + case FormatSettings::ParquetVersion::V2_4: + return parquet::ParquetVersion::PARQUET_2_4; + case FormatSettings::ParquetVersion::V2_6: + return parquet::ParquetVersion::PARQUET_2_6; + case FormatSettings::ParquetVersion::V2_LATEST: + return parquet::ParquetVersion::PARQUET_2_LATEST; + } +} + ParquetBlockOutputFormat::ParquetBlockOutputFormat(WriteBuffer & out_, const Block & header_, const FormatSettings & format_settings_) : IOutputFormat(header_, out_), format_settings{format_settings_} { @@ -44,7 +59,7 @@ void ParquetBlockOutputFormat::consume(Chunk chunk) auto sink = std::make_shared(out); parquet::WriterProperties::Builder builder; - builder.version(parquet::ParquetVersion::PARQUET_2_LATEST); + builder.version(getParquetVersion(format_settings)); #if USE_SNAPPY builder.compression(parquet::Compression::SNAPPY); #endif diff --git a/tests/queries/0_stateless/02149_schema_inference_formats_with_schema.reference b/tests/queries/0_stateless/02149_schema_inference_formats_with_schema.reference index f3bfd9f1048..47391a77ee8 100644 --- a/tests/queries/0_stateless/02149_schema_inference_formats_with_schema.reference +++ b/tests/queries/0_stateless/02149_schema_inference_formats_with_schema.reference @@ -72,7 +72,7 @@ uint8 Nullable(UInt8) int16 Nullable(Int16) uint16 Nullable(UInt16) int32 Nullable(Int32) -uint32 Nullable(Int64) +uint32 Nullable(UInt32) int64 Nullable(Int64) uint64 Nullable(UInt64) 0 0 0 0 0 0 0 0 From eec6051a50d18088f85f5b8e75b6c08d46144409 Mon Sep 17 00:00:00 2001 From: avogar Date: Thu, 23 Feb 2023 16:16:08 +0000 Subject: [PATCH 149/841] style --- src/Formats/FormatSettings.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Formats/FormatSettings.h b/src/Formats/FormatSettings.h index 58823b483be..44c710e46e2 100644 --- a/src/Formats/FormatSettings.h +++ b/src/Formats/FormatSettings.h @@ -46,9 +46,9 @@ struct FormatSettings enum class DateTimeInputFormat { - Basic, /// Default format for fast parsing: YYYY-MM-DD hh:mm:ss (ISO-8601 without fractional part and timezone) or NNNNNNNNNN unix timestamp. - BestEffort, /// Use sophisticated rules to parse whatever possible. - BestEffortUS /// Use sophisticated rules to parse American style: mm/dd/yyyy + Basic, /// Default format for fast parsing: YYYY-MM-DD hh:mm:ss (ISO-8601 without fractional part and timezone) or NNNNNNNNNN unix timestamp. + BestEffort, /// Use sophisticated rules to parse whatever possible. + BestEffortUS /// Use sophisticated rules to parse American style: mm/dd/yyyy }; DateTimeInputFormat date_time_input_format = DateTimeInputFormat::Basic; From 2ee3e4c577538577147b8e5c3bb1e091067a07a9 Mon Sep 17 00:00:00 2001 From: avoiderboi Date: Thu, 23 Feb 2023 19:30:21 +0100 Subject: [PATCH 150/841] Add first implementation --- src/Functions/widthBucket.cpp | 158 ++++++++++++++++++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100644 src/Functions/widthBucket.cpp diff --git a/src/Functions/widthBucket.cpp b/src/Functions/widthBucket.cpp new file mode 100644 index 00000000000..4f46575525e --- /dev/null +++ b/src/Functions/widthBucket.cpp @@ -0,0 +1,158 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +namespace DB +{ +namespace ErrorCodes +{ + extern const int ILLEGAL_COLUMN; + extern const int ILLEGAL_TYPE_OF_ARGUMENT; +} + + +class FunctionWidthBucket : public IFunction +{ + template TResultType> + static ColumnPtr executeForResultType(const ColumnsWithTypeAndName & arguments, size_t input_rows_count) + { + auto result_column = ColumnVector::create(); + auto & results = result_column->getData(); + results.reserve(input_rows_count); + auto common_type = std::make_shared>(); + + std::vector casted_columns; + casted_columns.reserve(3); + for (const auto & arg : arguments) + { + casted_columns.push_back(castColumn(arg, common_type)); + } + + const auto & operands = checkAndGetColumn>(casted_columns[0].get())->getData(); + const auto & mins = checkAndGetColumn>(casted_columns[1].get())->getData(); + const auto & maxs = checkAndGetColumn>(casted_columns[2].get())->getData(); + const auto & counts = checkAndGetColumn>(arguments[3].column.get())->getData(); + assert(operands.size() == input_rows_count); + assert(mins.size() == input_rows_count); + assert(maxs.size() == input_rows_count); + assert(counts.size() == input_rows_count); + + for (auto i{0u}; i < input_rows_count; ++i) + { + const auto operand = operands[i]; + const auto min = mins[i]; + const auto max = maxs[i]; + const auto count = counts[i]; + if (operand < min || min >= max) + { + results.push_back(0); + } + else if (operand >= max) + { + results.push_back(count + 1); + } + else + { + results.push_back(static_cast(count * ((operand - min) / (max - min)) + 1)); + } + } + + return result_column; + } + +public: + static inline const char * name = "width_bucket"; + + explicit FunctionWidthBucket() = default; + + static FunctionPtr create(ContextPtr) { return std::make_shared(); } + + String getName() const override { return name; } + + size_t getNumberOfArguments() const override { return 4; } + + DataTypePtr getReturnTypeImpl(const DataTypes & arguments) const override + { + for (auto i{0u}; i < 3; ++i) + { + const auto & data_type = arguments[i]; + const auto is_integer_or_float = isInteger(data_type) || isFloat(data_type); + const auto extended = is_integer_or_float ? data_type->getSizeOfValueInMemory() > 8 : false; + if (!is_integer_or_float || extended) + { + throw Exception( + ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, + "The first three arguments of function {} must be Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Float32 or " + "Float64.", + getName()); + } + } + if (!isUnsignedInteger(arguments[3]) || arguments[3]->getSizeOfValueInMemory() > 8) + { + throw Exception( + ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, + "The last argument of function {} must be UInt8, UInt16, UInt32 or UInt64, found {}.", + getName(), + arguments[3]->getName()); + } + switch (arguments[3]->getTypeId()) + { + case TypeIndex::UInt8: + return std::make_shared(); + case TypeIndex::UInt16: + return std::make_shared(); + case TypeIndex::UInt32: + [[fallthrough]]; + case TypeIndex::UInt64: + return std::make_shared(); + default: + break; + } + + UNREACHABLE(); + } + + bool isSuitableForShortCircuitArgumentsExecution(const DataTypesWithConstInfo & /*arguments*/) const override { return true; } + + ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr & result_type, size_t input_rows_count) const override + { + switch (result_type->getTypeId()) + { + case TypeIndex::UInt8: + return executeForResultType(arguments, input_rows_count); + case TypeIndex::UInt16: + return executeForResultType(arguments, input_rows_count); + case TypeIndex::UInt32: + return executeForResultType(arguments, input_rows_count); + case TypeIndex::UInt64: + return executeForResultType(arguments, input_rows_count); + default: + break; + } + + UNREACHABLE(); + } + + bool useDefaultImplementationForConstants() const override { return true; } +}; + +REGISTER_FUNCTION(WidthBucket) +{ + factory.registerFunction({}, FunctionFactory::CaseInsensitive); +} + +} From cfa9573c3ad25285750ce5bd6f097b7c3a3d8159 Mon Sep 17 00:00:00 2001 From: avoiderboi Date: Thu, 23 Feb 2023 20:03:03 +0100 Subject: [PATCH 151/841] Remove unused declaration --- src/Functions/widthBucket.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Functions/widthBucket.cpp b/src/Functions/widthBucket.cpp index 4f46575525e..e576bfdcd3c 100644 --- a/src/Functions/widthBucket.cpp +++ b/src/Functions/widthBucket.cpp @@ -20,11 +20,9 @@ namespace DB { namespace ErrorCodes { - extern const int ILLEGAL_COLUMN; extern const int ILLEGAL_TYPE_OF_ARGUMENT; } - class FunctionWidthBucket : public IFunction { template TResultType> From d21a6a3ba40f2259aba17ff26acf930814a35f16 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Thu, 23 Feb 2023 20:42:46 +0100 Subject: [PATCH 152/841] fix --- .../PushingAsyncPipelineExecutor.cpp | 2 +- .../Executors/PushingPipelineExecutor.cpp | 2 +- ..._cancel_insert_when_client_dies.reference} | 1 + ...> 02434_cancel_insert_when_client_dies.sh} | 29 +++++++-- ...434_insert_cancellation_native_protocol.sh | 65 ------------------- .../02435_insert_cancellation_http.reference | 2 - utils/check-mysql-binlog/main.cpp | 3 +- 7 files changed, 27 insertions(+), 77 deletions(-) rename tests/queries/0_stateless/{02434_insert_cancellation_native_protocol.reference => 02434_cancel_insert_when_client_dies.reference} (88%) rename tests/queries/0_stateless/{02435_insert_cancellation_http.sh => 02434_cancel_insert_when_client_dies.sh} (59%) delete mode 100755 tests/queries/0_stateless/02434_insert_cancellation_native_protocol.sh delete mode 100644 tests/queries/0_stateless/02435_insert_cancellation_http.reference diff --git a/src/Processors/Executors/PushingAsyncPipelineExecutor.cpp b/src/Processors/Executors/PushingAsyncPipelineExecutor.cpp index 20f47c6b54c..70815bb8b3b 100644 --- a/src/Processors/Executors/PushingAsyncPipelineExecutor.cpp +++ b/src/Processors/Executors/PushingAsyncPipelineExecutor.cpp @@ -140,7 +140,7 @@ PushingAsyncPipelineExecutor::PushingAsyncPipelineExecutor(QueryPipeline & pipel PushingAsyncPipelineExecutor::~PushingAsyncPipelineExecutor() { /// It must be finalized explicitly. Otherwise we cancel it assuming it's due to an exception. - chassert(finished || std::uncaught_exceptions()); + chassert(finished || std::uncaught_exceptions() || std::current_exception()); try { cancel(); diff --git a/src/Processors/Executors/PushingPipelineExecutor.cpp b/src/Processors/Executors/PushingPipelineExecutor.cpp index ca60932ed6f..696932932df 100644 --- a/src/Processors/Executors/PushingPipelineExecutor.cpp +++ b/src/Processors/Executors/PushingPipelineExecutor.cpp @@ -64,7 +64,7 @@ PushingPipelineExecutor::PushingPipelineExecutor(QueryPipeline & pipeline_) : pi PushingPipelineExecutor::~PushingPipelineExecutor() { /// It must be finalized explicitly. Otherwise we cancel it assuming it's due to an exception. - chassert(finished || std::uncaught_exceptions()); + chassert(finished || std::uncaught_exceptions() || std::current_exception()); try { cancel(); diff --git a/tests/queries/0_stateless/02434_insert_cancellation_native_protocol.reference b/tests/queries/0_stateless/02434_cancel_insert_when_client_dies.reference similarity index 88% rename from tests/queries/0_stateless/02434_insert_cancellation_native_protocol.reference rename to tests/queries/0_stateless/02434_cancel_insert_when_client_dies.reference index e3038e03530..d2475419998 100644 --- a/tests/queries/0_stateless/02434_insert_cancellation_native_protocol.reference +++ b/tests/queries/0_stateless/02434_cancel_insert_when_client_dies.reference @@ -1,2 +1,3 @@ 5000000 5000000 +1 diff --git a/tests/queries/0_stateless/02435_insert_cancellation_http.sh b/tests/queries/0_stateless/02434_cancel_insert_when_client_dies.sh similarity index 59% rename from tests/queries/0_stateless/02435_insert_cancellation_http.sh rename to tests/queries/0_stateless/02434_cancel_insert_when_client_dies.sh index e3a1645db63..c2cf98f712f 100755 --- a/tests/queries/0_stateless/02435_insert_cancellation_http.sh +++ b/tests/queries/0_stateless/02434_cancel_insert_when_client_dies.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# Tags: no-random-settings # shellcheck disable=SC2009 CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) @@ -6,19 +7,24 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) . "$CURDIR"/../shell_config.sh export DATA_FILE="$CLICKHOUSE_TMP/deduptest.tsv" -export TEST_MARK="02435_insert_${CLICKHOUSE_DATABASE}_" +export TEST_MARK="02434_insert_${CLICKHOUSE_DATABASE}_" $CLICKHOUSE_CLIENT -q 'select * from numbers(5000000) format TSV' > $DATA_FILE $CLICKHOUSE_CLIENT -q 'create table dedup_test(A Int64) Engine = MergeTree order by A settings non_replicated_deduplication_window=1000;' function insert_data { - SETTINGS="query_id=$ID&max_insert_block_size=100000&input_format_parallel_parsing=0" - TRASH_SETTINGS="query_id=$ID&input_format_parallel_parsing=0&max_threads=1&max_insert_threads=1&max_insert_block_size=1100000&max_block_size=1100000&min_insert_block_size_bytes=0&min_insert_block_size_rows=1100000&max_insert_block_size=1100000" - TYPE=$(( RANDOM % 3 )) + SETTINGS="query_id=$ID&max_insert_block_size=110000&min_insert_block_size_rows=110000" + # max_block_size=10000, so external table will contain smaller blocks that will be squashed on insert-select (more chances to catch a bug on query cancellation) + TRASH_SETTINGS="query_id=$ID&input_format_parallel_parsing=0&max_threads=1&max_insert_threads=1&max_insert_block_size=110000&max_block_size=10000&min_insert_block_size_bytes=0&min_insert_block_size_rows=110000&max_insert_block_size=110000" + TYPE=$(( RANDOM % 4 )) + if [[ "$TYPE" -eq 0 ]]; then - $CLICKHOUSE_CURL -sS -X POST --data-binary @- "$CLICKHOUSE_URL&$SETTINGS&query=insert+into+dedup_test+format+TSV" < $DATA_FILE + # client will send 10000-rows blocks, server will squash them into 110000-rows blocks (more chances to catch a bug on query cancellation) + $CLICKHOUSE_CLIENT --max_block_size=10000 --max_insert_block_size=10000 --query_id="$ID" -q 'insert into dedup_test settings max_insert_block_size=110000, min_insert_block_size_rows=110000 format TSV' < $DATA_FILE elif [[ "$TYPE" -eq 1 ]]; then + $CLICKHOUSE_CURL -sS -X POST --data-binary @- "$CLICKHOUSE_URL&$SETTINGS&query=insert+into+dedup_test+format+TSV" < $DATA_FILE + elif [[ "$TYPE" -eq 2 ]]; then $CLICKHOUSE_CURL -sS -X POST -H "Transfer-Encoding: chunked" --data-binary @- "$CLICKHOUSE_URL&$SETTINGS&query=insert+into+dedup_test+format+TSV" < $DATA_FILE else $CLICKHOUSE_CURL -sS -F 'file=@-' "$CLICKHOUSE_URL&$TRASH_SETTINGS&file_format=TSV&file_types=UInt64" -X POST --form-string 'query=insert into dedup_test select * from file' < $DATA_FILE @@ -27,6 +33,7 @@ function insert_data export -f insert_data +ID="02434_insert_init_${CLICKHOUSE_DATABASE}_$RANDOM" insert_data $CLICKHOUSE_CLIENT -q 'select count() from dedup_test' @@ -66,12 +73,20 @@ export -f thread_insert; export -f thread_select; export -f thread_cancel; -TIMEOUT=30 +TIMEOUT=40 # 10 seconds for each TYPE timeout $TIMEOUT bash -c thread_insert & timeout $TIMEOUT bash -c thread_select & -timeout $TIMEOUT bash -c thread_cancel & +timeout $TIMEOUT bash -c thread_cancel 2> /dev/null & wait $CLICKHOUSE_CLIENT -q 'select count() from dedup_test' + +$CLICKHOUSE_CLIENT -q 'system flush logs' + +# We have to ignore stderr from thread_cancel, because our CI finds a bug in ps... +# So use this query to check that thread_cancel do something +$CLICKHOUSE_CLIENT -q "select count() > 0 from system.text_log where event_date >= yesterday() and query_id like '$TEST_MARK%' and ( + message_format_string in ('Unexpected end of file while reading chunk header of HTTP chunked data', 'Unexpected EOF, got {} of {} bytes') or + message like '%Connection reset by peer%')" diff --git a/tests/queries/0_stateless/02434_insert_cancellation_native_protocol.sh b/tests/queries/0_stateless/02434_insert_cancellation_native_protocol.sh deleted file mode 100755 index 4eb02c38c1a..00000000000 --- a/tests/queries/0_stateless/02434_insert_cancellation_native_protocol.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env bash -# shellcheck disable=SC2009 - -CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -# shellcheck source=../shell_config.sh -. "$CURDIR"/../shell_config.sh - -export DATA_FILE="$CLICKHOUSE_TMP/deduptest.tsv" -export TEST_MARK="02434_insert_${CLICKHOUSE_DATABASE}_" - -$CLICKHOUSE_CLIENT -q 'select * from numbers(5000000) format TSV' > $DATA_FILE -$CLICKHOUSE_CLIENT -q 'create table dedup_test(A Int64) Engine = MergeTree order by A settings non_replicated_deduplication_window=1000;' -$CLICKHOUSE_CLIENT --max_block_size=100000 --min_chunk_bytes_for_parallel_parsing=10000 -q 'insert into dedup_test format TSV' < $DATA_FILE -$CLICKHOUSE_CLIENT -q 'select count() from dedup_test' - -function thread_insert -{ - # supress "Killed" messages from bash - function wrap - { - $CLICKHOUSE_CLIENT --max_block_size=100000 --min_chunk_bytes_for_parallel_parsing=10000 --query_id="$ID" -q 'insert into dedup_test format TSV' < $DATA_FILE - } - export -f wrap - while true; do - export ID="$TEST_MARK$RANDOM" - bash -c wrap 2>&1| grep -Fav "Killed" - done -} - -function thread_select -{ - while true; do - $CLICKHOUSE_CLIENT -q "with (select count() from dedup_test) as c select throwIf(c != 5000000, 'Expected 5000000 rows, got ' || toString(c)) format Null" - sleep 0.$RANDOM; - done -} - -function thread_cancel -{ - while true; do - SIGNAL="INT" - if (( RANDOM % 2 )); then - SIGNAL="KILL" - fi - PID=$(ps -ef | grep "$TEST_MARK" | grep -v grep | awk '{print $2}') - if [ ! -z "$PID" ]; then kill -s "$SIGNAL" "$PID" || echo "$PID"; fi - sleep 0.$RANDOM; - sleep 0.$RANDOM; - sleep 0.$RANDOM; - done -} - -export -f thread_insert; -export -f thread_select; -export -f thread_cancel; - -TIMEOUT=30 - -timeout $TIMEOUT bash -c thread_insert & -timeout $TIMEOUT bash -c thread_select & -timeout $TIMEOUT bash -c thread_cancel & - -wait - -$CLICKHOUSE_CLIENT -q 'select count() from dedup_test' diff --git a/tests/queries/0_stateless/02435_insert_cancellation_http.reference b/tests/queries/0_stateless/02435_insert_cancellation_http.reference deleted file mode 100644 index e3038e03530..00000000000 --- a/tests/queries/0_stateless/02435_insert_cancellation_http.reference +++ /dev/null @@ -1,2 +0,0 @@ -5000000 -5000000 diff --git a/utils/check-mysql-binlog/main.cpp b/utils/check-mysql-binlog/main.cpp index 7dd387ba5be..cf2a27e8aac 100644 --- a/utils/check-mysql-binlog/main.cpp +++ b/utils/check-mysql-binlog/main.cpp @@ -17,7 +17,8 @@ static DB::MySQLReplication::BinlogEventPtr parseSingleEventBody( std::shared_ptr & last_table_map_event, bool exist_checksum) { DB::MySQLReplication::BinlogEventPtr event; - DB::ReadBufferPtr limit_read_buffer = std::make_shared(payload, header.event_size - 19, false); + DB::ReadBufferPtr limit_read_buffer = std::make_shared(payload, header.event_size - 19, + /* trow_exception */ false, /* exact_limit */ {}); DB::ReadBufferPtr event_payload = std::make_shared(*limit_read_buffer, exist_checksum ? 4 : 0); switch (header.type) From a938f276d18db18b588f7cf746bbc33c6f121634 Mon Sep 17 00:00:00 2001 From: avoiderboi Date: Thu, 23 Feb 2023 22:40:22 +0100 Subject: [PATCH 153/841] Handle `ColumnConst` efficiently --- src/Functions/widthBucket.cpp | 131 +++++++++++++++++++++++----------- 1 file changed, 91 insertions(+), 40 deletions(-) diff --git a/src/Functions/widthBucket.cpp b/src/Functions/widthBucket.cpp index e576bfdcd3c..f49b6d50af9 100644 --- a/src/Functions/widthBucket.cpp +++ b/src/Functions/widthBucket.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -6,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -25,48 +27,99 @@ namespace ErrorCodes class FunctionWidthBucket : public IFunction { - template TResultType> + template + static const typename ColumnVector::Container * getDataIfNotNull(const ColumnVector * col_vec) + { + if (nullptr == col_vec) + { + return nullptr; + } + return &col_vec->getData(); + } + + template + static TDataType + getValue(const ColumnConst * col_const, const typename ColumnVector::Container * col_vec, const size_t index) + { + if (nullptr != col_const) + { + return col_const->getValue(); + } + return col_vec->data()[index]; + } + + template + static TResultType calculate(const Float64 operand, const Float64 min, const Float64 max, const TCountType count) + { + if (operand < min || min >= max) + { + return 0; + } + else if (operand >= max) + { + return count + 1; + } + + return static_cast(count * ((operand - min) / (max - min)) + 1); + } + + template TCountType> static ColumnPtr executeForResultType(const ColumnsWithTypeAndName & arguments, size_t input_rows_count) { - auto result_column = ColumnVector::create(); - auto & results = result_column->getData(); - results.reserve(input_rows_count); + using ResultType = typename NumberTraits::Construct::Type; auto common_type = std::make_shared>(); std::vector casted_columns; casted_columns.reserve(3); - for (const auto & arg : arguments) + for (const auto argument_index : collections::range(0, 3)) { - casted_columns.push_back(castColumn(arg, common_type)); + casted_columns.push_back(castColumn(arguments[argument_index], common_type)); } - const auto & operands = checkAndGetColumn>(casted_columns[0].get())->getData(); - const auto & mins = checkAndGetColumn>(casted_columns[1].get())->getData(); - const auto & maxs = checkAndGetColumn>(casted_columns[2].get())->getData(); - const auto & counts = checkAndGetColumn>(arguments[3].column.get())->getData(); - assert(operands.size() == input_rows_count); - assert(mins.size() == input_rows_count); - assert(maxs.size() == input_rows_count); - assert(counts.size() == input_rows_count); + const auto * operands_vec = getDataIfNotNull(checkAndGetColumn>(casted_columns[0].get())); + const auto * mins_vec = getDataIfNotNull(checkAndGetColumn>(casted_columns[1].get())); + const auto * maxs_vec = getDataIfNotNull(checkAndGetColumn>(casted_columns[2].get())); + const auto * counts_vec = getDataIfNotNull(checkAndGetColumn>(arguments[3].column.get())); - for (auto i{0u}; i < input_rows_count; ++i) + const auto * operands_col_const = checkAndGetColumnConst>(casted_columns[0].get()); + const auto * mins_col_const = checkAndGetColumnConst>(casted_columns[1].get()); + const auto * maxs_col_const = checkAndGetColumnConst>(casted_columns[2].get()); + const auto * counts_col_const = checkAndGetColumnConst>(arguments[3].column.get()); + + assert((nullptr != operands_col_const) ^ (nullptr != operands_vec && operands_vec->size() == input_rows_count)); + assert((nullptr != mins_col_const) ^ (nullptr != mins_vec && mins_vec->size() == input_rows_count)); + assert((nullptr != maxs_col_const) ^ (nullptr != maxs_vec && maxs_vec->size() == input_rows_count)); + assert((nullptr != counts_col_const) ^ (nullptr != counts_vec && counts_vec->size() == input_rows_count)); + + const auto are_all_const_cols + = nullptr != operands_col_const && nullptr != mins_col_const && nullptr != maxs_col_const && nullptr != counts_col_const; + + + if (are_all_const_cols) { - const auto operand = operands[i]; - const auto min = mins[i]; - const auto max = maxs[i]; - const auto count = counts[i]; - if (operand < min || min >= max) - { - results.push_back(0); - } - else if (operand >= max) - { - results.push_back(count + 1); - } - else - { - results.push_back(static_cast(count * ((operand - min) / (max - min)) + 1)); - } + auto result_column = ColumnVector::create(); + result_column->reserve(1); + auto & result_data = result_column->getData(); + result_data.push_back(calculate( + operands_col_const->getValue(), + mins_col_const->getValue(), + maxs_col_const->getValue(), + counts_col_const->template getValue())); + + return ColumnConst::create(std::move(result_column), input_rows_count); + } + + auto result_column = ColumnVector::create(); + result_column->reserve(1); + auto & result_data = result_column->getData(); + + for (const auto row_index : collections::range(0, input_rows_count)) + { + const auto operand = getValue(operands_col_const, operands_vec, row_index); + const auto min = getValue(mins_col_const, mins_vec, row_index); + const auto max = getValue(maxs_col_const, maxs_vec, row_index); + const auto count = getValue(counts_col_const, counts_vec, row_index); + result_data.push_back(calculate(operand, min, max, count)); } return result_column; @@ -85,17 +138,14 @@ public: DataTypePtr getReturnTypeImpl(const DataTypes & arguments) const override { - for (auto i{0u}; i < 3; ++i) + for (const auto argument_index : collections::range(0, arguments.size())) { - const auto & data_type = arguments[i]; - const auto is_integer_or_float = isInteger(data_type) || isFloat(data_type); - const auto extended = is_integer_or_float ? data_type->getSizeOfValueInMemory() > 8 : false; - if (!is_integer_or_float || extended) + if (!isNativeNumber(arguments[argument_index])) { throw Exception( ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, - "The first three arguments of function {} must be Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Float32 or " - "Float64.", + "The first three arguments of function {} must be a Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Float32 " + "or Float64.", getName()); } } @@ -126,9 +176,10 @@ public: bool isSuitableForShortCircuitArgumentsExecution(const DataTypesWithConstInfo & /*arguments*/) const override { return true; } - ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr & result_type, size_t input_rows_count) const override + ColumnPtr + executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr & /*result_type*/, size_t input_rows_count) const override { - switch (result_type->getTypeId()) + switch (arguments[3].type->getTypeId()) { case TypeIndex::UInt8: return executeForResultType(arguments, input_rows_count); From 240e0070e5b4ea55b22a687fcad375131cbdad70 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Thu, 23 Feb 2023 23:07:35 +0100 Subject: [PATCH 154/841] fix --- src/Interpreters/AsynchronousInsertQueue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Interpreters/AsynchronousInsertQueue.cpp b/src/Interpreters/AsynchronousInsertQueue.cpp index ac8101d4ca2..78b173de6dc 100644 --- a/src/Interpreters/AsynchronousInsertQueue.cpp +++ b/src/Interpreters/AsynchronousInsertQueue.cpp @@ -210,7 +210,7 @@ AsynchronousInsertQueue::push(ASTPtr query, ContextPtr query_context) /// to avoid buffering of huge amount of data in memory. auto read_buf = getReadBufferFromASTInsertQuery(query); - LimitReadBuffer limit_buf(*read_buf, settings.async_insert_max_data_size, false); + LimitReadBuffer limit_buf(*read_buf, settings.async_insert_max_data_size, /* trow_exception */ false, /* exact_limit */ {}); WriteBufferFromString write_buf(bytes); copyData(limit_buf, write_buf); From 5e5e802348af021c6dbeefd5a05e2ad98c1a21bf Mon Sep 17 00:00:00 2001 From: Anton Popov Date: Thu, 23 Feb 2023 22:54:50 +0000 Subject: [PATCH 155/841] return back optimization for ALTER MODIFY Nullable --- src/Storages/MergeTree/MutateTask.cpp | 45 +++++++++++++++++-- .../02669_alter_modify_to_nullable.reference | 8 ++++ .../02669_alter_modify_to_nullable.sql | 31 +++++++++++++ 3 files changed, 80 insertions(+), 4 deletions(-) create mode 100644 tests/queries/0_stateless/02669_alter_modify_to_nullable.reference create mode 100644 tests/queries/0_stateless/02669_alter_modify_to_nullable.sql diff --git a/src/Storages/MergeTree/MutateTask.cpp b/src/Storages/MergeTree/MutateTask.cpp index 8d95a76b5da..de623c58538 100644 --- a/src/Storages/MergeTree/MutateTask.cpp +++ b/src/Storages/MergeTree/MutateTask.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include @@ -1568,6 +1569,45 @@ bool MutateTask::execute() return false; } +static bool canSkipConversionToNullable(const MergeTreeDataPartPtr & part, const MutationCommand & command) +{ + if (command.type != MutationCommand::READ_COLUMN) + return false; + + auto part_column = part->tryGetColumn(command.column_name); + if (!part_column) + return false; + + /// For ALTER MODIFY COLUMN from 'Type' to 'Nullable(Type)' we can skip mutatation and + /// apply only metadata conversion. But it doesn't work for custom serialization. + const auto * to_nullable = typeid_cast(command.data_type.get()); + if (!to_nullable) + return false; + + if (!part_column->type->equals(*to_nullable->getNestedType())) + return false; + + auto serialization = part->getSerialization(command.column_name); + if (serialization->getKind() != ISerialization::Kind::DEFAULT) + return false; + + return true; +} + +static bool canSkipMutationCommandForPart(const MergeTreeDataPartPtr & part, const MutationCommand & command, const ContextPtr & context) +{ + if (command.partition) + { + auto command_partition_id = part->storage.getPartitionIDFromQuery(command.partition, context); + if (part->info.partition_id != command_partition_id) + return true; + } + + if (canSkipConversionToNullable(part, command)) + return true; + + return false; +} bool MutateTask::prepare() { @@ -1586,11 +1626,8 @@ bool MutateTask::prepare() context_for_reading->setSetting("force_primary_key", false); for (const auto & command : *ctx->commands) - { - if (command.partition == nullptr || ctx->source_part->info.partition_id == ctx->data->getPartitionIDFromQuery( - command.partition, context_for_reading)) + if (!canSkipMutationCommandForPart(ctx->source_part, command, context_for_reading)) ctx->commands_for_part.emplace_back(command); - } if (ctx->source_part->isStoredOnDisk() && !isStorageTouchedByMutations( *ctx->data, ctx->source_part, ctx->metadata_snapshot, ctx->commands_for_part, context_for_reading)) diff --git a/tests/queries/0_stateless/02669_alter_modify_to_nullable.reference b/tests/queries/0_stateless/02669_alter_modify_to_nullable.reference new file mode 100644 index 00000000000..aff80e1d699 --- /dev/null +++ b/tests/queries/0_stateless/02669_alter_modify_to_nullable.reference @@ -0,0 +1,8 @@ +1_1_1_0 String Default +2_2_2_0 String Sparse +20000 10435 ['','bar','foo'] +1_1_1_0_3 String Default +2_2_2_0_3 Nullable(String) Default +20000 10435 ['','bar','foo'] +1_1_1_0_3 0 +2_2_2_0_3 10000 diff --git a/tests/queries/0_stateless/02669_alter_modify_to_nullable.sql b/tests/queries/0_stateless/02669_alter_modify_to_nullable.sql new file mode 100644 index 00000000000..862280fd7cd --- /dev/null +++ b/tests/queries/0_stateless/02669_alter_modify_to_nullable.sql @@ -0,0 +1,31 @@ +DROP TABLE IF EXISTS t_modify_to_nullable; + +CREATE TABLE t_modify_to_nullable (key UInt64, id UInt64, s String) +ENGINE = MergeTree ORDER BY id PARTITION BY key +SETTINGS min_bytes_for_wide_part = 0, ratio_of_defaults_for_sparse_serialization = 0.9; + +INSERT INTO t_modify_to_nullable SELECT 1, number, 'foo' FROM numbers(10000); +INSERT INTO t_modify_to_nullable SELECT 2, number, if (number % 23 = 0, 'bar', '') FROM numbers(10000); + +SELECT name, type, serialization_kind FROM system.parts_columns +WHERE database = currentDatabase() AND table = 't_modify_to_nullable' AND column = 's' AND active +ORDER BY name; + +SELECT count(s), countIf(s != ''), arraySort(groupUniqArray(s)) FROM t_modify_to_nullable; + +SET mutations_sync = 2; +ALTER TABLE t_modify_to_nullable MODIFY COLUMN s Nullable(String); + +SELECT name, type, serialization_kind FROM system.parts_columns +WHERE database = currentDatabase() AND table = 't_modify_to_nullable' AND column = 's' AND active +ORDER BY name; + +SELECT count(s), countIf(s != ''), arraySort(groupUniqArray(s)) FROM t_modify_to_nullable; + +SYSTEM FLUSH LOGS; + +SELECT part_name, read_rows FROM system.part_log +WHERE database = currentDatabase() AND table = 't_modify_to_nullable' AND event_type = 'MutatePart' +ORDER BY part_name; + +DROP TABLE t_modify_to_nullable; From 2fbe75957d12b083ac19d222d3d88e73cc526f10 Mon Sep 17 00:00:00 2001 From: pufit Date: Thu, 23 Feb 2023 18:24:57 -0500 Subject: [PATCH 156/841] Add `default` column for `system.settings` and `system.server_settings` --- .../system-tables/server_settings.md | 17 +++++----- docs/en/operations/system-tables/settings.md | 1 + .../system-tables/server_settings.md | 17 +++++----- docs/ru/operations/system-tables/settings.md | 1 + src/Core/BaseSettings.h | 33 +++++++++++++++++-- .../System/StorageSystemServerSettings.cpp | 8 +++-- src/Storages/System/StorageSystemSettings.cpp | 6 ++-- .../01221_system_settings.reference | 2 +- .../02117_show_create_table_system.reference | 1 + 9 files changed, 62 insertions(+), 24 deletions(-) diff --git a/docs/en/operations/system-tables/server_settings.md b/docs/en/operations/system-tables/server_settings.md index cbc50691218..67ca856f06b 100644 --- a/docs/en/operations/system-tables/server_settings.md +++ b/docs/en/operations/system-tables/server_settings.md @@ -10,6 +10,7 @@ Columns: - `name` ([String](../../sql-reference/data-types/string.md)) — Server setting name. - `value` ([String](../../sql-reference/data-types/string.md)) — Server setting value. +- `default` ([String](../../sql-reference/data-types/string.md)) — Server setting default value. - `changed` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — Shows whether a setting was specified in `config.xml` - `description` ([String](../../sql-reference/data-types/string.md)) — Short server setting description. - `type` ([String](../../sql-reference/data-types/string.md)) — Server setting value type. @@ -25,14 +26,14 @@ WHERE name LIKE '%thread_pool%' ``` ``` text -┌─name─────────────────────────┬─value─┬─changed─┬─description───────────────────────────┬─type───┐ -│ max_thread_pool_size │ 10000 │ 0 │ Max size for global thread pool. │ UInt64 │ -│ max_thread_pool_free_size │ 1000 │ 0 │ Max free size for global thread pool. │ UInt64 │ -│ thread_pool_queue_size │ 10000 │ 0 │ Queue size for global thread pool. │ UInt64 │ -│ max_io_thread_pool_size │ 100 │ 0 │ Max size for IO thread pool. │ UInt64 │ -│ max_io_thread_pool_free_size │ 0 │ 0 │ Max free size for IO thread pool. │ UInt64 │ -│ io_thread_pool_queue_size │ 10000 │ 0 │ Queue size for IO thread pool. │ UInt64 │ -└──────────────────────────────┴───────┴─────────┴───────────────────────────────────────┴────────┘ +┌─name─────────────────────────┬─value─┬─default─┬─changed─┬─description───────────────────────────┬─type───┐ +│ max_thread_pool_size │ 10000 │ 10000 │ 0 │ Max size for global thread pool. │ UInt64 │ +│ max_thread_pool_free_size │ 1000 │ 1000 │ 0 │ Max free size for global thread pool. │ UInt64 │ +│ thread_pool_queue_size │ 10000 │ 10000 │ 0 │ Queue size for global thread pool. │ UInt64 │ +│ max_io_thread_pool_size │ 100 │ 100 │ 0 │ Max size for IO thread pool. │ UInt64 │ +│ max_io_thread_pool_free_size │ 0 │ 0 │ 0 │ Max free size for IO thread pool. │ UInt64 │ +│ io_thread_pool_queue_size │ 10000 │ 10000 │ 0 │ Queue size for IO thread pool. │ UInt64 │ +└──────────────────────────────┴───────┴─────────┴─────────┴───────────────────────────────────────┴────────┘ ``` Using of `WHERE changed` can be useful, for example, when you want to check diff --git a/docs/en/operations/system-tables/settings.md b/docs/en/operations/system-tables/settings.md index 8ce74ea3ae3..a3dfa937abe 100644 --- a/docs/en/operations/system-tables/settings.md +++ b/docs/en/operations/system-tables/settings.md @@ -16,6 +16,7 @@ Columns: - `readonly` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — Shows whether the current user can change the setting: - `0` — Current user can change the setting. - `1` — Current user can’t change the setting. +- `default` ([String](../../sql-reference/data-types/string.md)) — Setting default value. **Example** diff --git a/docs/ru/operations/system-tables/server_settings.md b/docs/ru/operations/system-tables/server_settings.md index 69bcaa0a241..35da3f4fe6a 100644 --- a/docs/ru/operations/system-tables/server_settings.md +++ b/docs/ru/operations/system-tables/server_settings.md @@ -11,6 +11,7 @@ slug: /ru/operations/system-tables/server_settings - `name` ([String](../../sql-reference/data-types/string.md)) — имя настройки. - `value` ([String](../../sql-reference/data-types/string.md)) — значение настройки. +- `default` ([String](../../sql-reference/data-types/string.md)) — значению настройки по умолчанию. - `changed` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — показывает, была ли настройка указана в `config.xml` или является значением по-умолчанию. - `description` ([String](../../sql-reference/data-types/string.md)) — краткое описание настройки. - `type` ([String](../../sql-reference/data-types/string.md)) — тип настройки. @@ -26,14 +27,14 @@ WHERE name LIKE '%thread_pool%' ``` ``` text -┌─name─────────────────────────┬─value─┬─changed─┬─description───────────────────────────┬─type───┐ -│ max_thread_pool_size │ 10000 │ 0 │ Max size for global thread pool. │ UInt64 │ -│ max_thread_pool_free_size │ 1000 │ 0 │ Max free size for global thread pool. │ UInt64 │ -│ thread_pool_queue_size │ 10000 │ 0 │ Queue size for global thread pool. │ UInt64 │ -│ max_io_thread_pool_size │ 100 │ 0 │ Max size for IO thread pool. │ UInt64 │ -│ max_io_thread_pool_free_size │ 0 │ 0 │ Max free size for IO thread pool. │ UInt64 │ -│ io_thread_pool_queue_size │ 10000 │ 0 │ Queue size for IO thread pool. │ UInt64 │ -└──────────────────────────────┴───────┴─────────┴───────────────────────────────────────┴────────┘ +┌─name─────────────────────────┬─value─┬─default─┬─changed─┬─description───────────────────────────┬─type───┐ +│ max_thread_pool_size │ 10000 │ 10000 │ 0 │ Max size for global thread pool. │ UInt64 │ +│ max_thread_pool_free_size │ 1000 │ 1000 │ 0 │ Max free size for global thread pool. │ UInt64 │ +│ thread_pool_queue_size │ 10000 │ 10000 │ 0 │ Queue size for global thread pool. │ UInt64 │ +│ max_io_thread_pool_size │ 100 │ 100 │ 0 │ Max size for IO thread pool. │ UInt64 │ +│ max_io_thread_pool_free_size │ 0 │ 0 │ 0 │ Max free size for IO thread pool. │ UInt64 │ +│ io_thread_pool_queue_size │ 10000 │ 10000 │ 0 │ Queue size for IO thread pool. │ UInt64 │ +└──────────────────────────────┴───────┴─────────┴─────────┴───────────────────────────────────────┴────────┘ ``` Использование `WHERE changed` может быть полезно, например, если необходимо проверить, diff --git a/docs/ru/operations/system-tables/settings.md b/docs/ru/operations/system-tables/settings.md index 09802415054..31eb77d4d41 100644 --- a/docs/ru/operations/system-tables/settings.md +++ b/docs/ru/operations/system-tables/settings.md @@ -16,6 +16,7 @@ slug: /ru/operations/system-tables/settings - `readonly` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — Показывает, может ли пользователь изменять настройку: - `0` — Текущий пользователь может изменять настройку. - `1` — Текущий пользователь не может изменять настройку. +- `default` ([String](../../sql-reference/data-types/string.md)) — значению настройки по умолчанию. **Пример** diff --git a/src/Core/BaseSettings.h b/src/Core/BaseSettings.h index cae8cecccc9..e28b034a5bd 100644 --- a/src/Core/BaseSettings.h +++ b/src/Core/BaseSettings.h @@ -107,7 +107,9 @@ public: public: const String & getName() const; Field getValue() const; + Field getDefaultValue() const; String getValueString() const; + String getDefaultValueString() const; bool isValueChanged() const; const char * getTypeName() const; const char * getDescription() const; @@ -797,6 +799,17 @@ Field BaseSettings::SettingFieldRef::getValue() const return accessor->getValue(*settings, index); } +template +Field BaseSettings::SettingFieldRef::getDefaultValue() const +{ + if constexpr (Traits::allow_custom_settings) + { + if (custom_setting) + return static_cast(custom_setting->second); + } + return accessor->getDefaultValue(index); +} + template String BaseSettings::SettingFieldRef::getValueString() const { @@ -808,6 +821,17 @@ String BaseSettings::SettingFieldRef::getValueString() const return accessor->getValueString(*settings, index); } +template +String BaseSettings::SettingFieldRef::getDefaultValueString() const +{ + if constexpr (Traits::allow_custom_settings) + { + if (custom_setting) + return custom_setting->second.toString(); + } + return accessor->getDefaultValueString(index); +} + template bool BaseSettings::SettingFieldRef::isValueChanged() const { @@ -902,7 +926,8 @@ using AliasMap = std::unordered_map; void resetValueToDefault(Data & data, size_t index) const { return field_infos[index].reset_value_to_default_function(data); } \ void writeBinary(const Data & data, size_t index, WriteBuffer & out) const { return field_infos[index].write_binary_function(data, out); } \ void readBinary(Data & data, size_t index, ReadBuffer & in) const { return field_infos[index].read_binary_function(data, in); } \ - \ + Field getDefaultValue(size_t index) const { return field_infos[index].get_default_value_function(); } \ + String getDefaultValueString(size_t index) const { return field_infos[index].get_default_value_string_function(); } \ private: \ Accessor(); \ struct FieldInfo \ @@ -923,6 +948,8 @@ using AliasMap = std::unordered_map; void (*reset_value_to_default_function)(Data &) ; \ void (*write_binary_function)(const Data &, WriteBuffer &) ; \ void (*read_binary_function)(Data &, ReadBuffer &) ; \ + Field (*get_default_value_function)() ; \ + String (*get_default_value_string_function)() ; \ }; \ std::vector field_infos; \ std::unordered_map name_to_index_map; \ @@ -1034,6 +1061,8 @@ struct DefineAliases [](const Data & data) -> bool { return data.NAME.changed; }, \ [](Data & data) { data.NAME = SettingField##TYPE{DEFAULT}; }, \ [](const Data & data, WriteBuffer & out) { data.NAME.writeBinary(out); }, \ - [](Data & data, ReadBuffer & in) { data.NAME.readBinary(in); } \ + [](Data & data, ReadBuffer & in) { data.NAME.readBinary(in); }, \ + []() -> Field { return static_cast(SettingField##TYPE{DEFAULT}); }, \ + []() -> String { return SettingField##TYPE{DEFAULT}.toString(); } \ }); } diff --git a/src/Storages/System/StorageSystemServerSettings.cpp b/src/Storages/System/StorageSystemServerSettings.cpp index 0e803d720a9..ad52c6896ac 100644 --- a/src/Storages/System/StorageSystemServerSettings.cpp +++ b/src/Storages/System/StorageSystemServerSettings.cpp @@ -11,6 +11,7 @@ NamesAndTypesList StorageSystemServerSettings::getNamesAndTypes() return { {"name", std::make_shared()}, {"value", std::make_shared()}, + {"default", std::make_shared()}, {"changed", std::make_shared()}, {"description", std::make_shared()}, {"type", std::make_shared()}, @@ -28,9 +29,10 @@ void StorageSystemServerSettings::fillData(MutableColumns & res_columns, Context const auto & setting_name = setting.getName(); res_columns[0]->insert(setting_name); res_columns[1]->insert(setting.getValueString()); - res_columns[2]->insert(setting.isValueChanged()); - res_columns[3]->insert(setting.getDescription()); - res_columns[4]->insert(setting.getTypeName()); + res_columns[2]->insert(setting.getDefaultValueString()); + res_columns[3]->insert(setting.isValueChanged()); + res_columns[4]->insert(setting.getDescription()); + res_columns[5]->insert(setting.getTypeName()); } } diff --git a/src/Storages/System/StorageSystemSettings.cpp b/src/Storages/System/StorageSystemSettings.cpp index bf3a4842187..e13f6c308c4 100644 --- a/src/Storages/System/StorageSystemSettings.cpp +++ b/src/Storages/System/StorageSystemSettings.cpp @@ -19,6 +19,7 @@ NamesAndTypesList StorageSystemSettings::getNamesAndTypes() {"max", std::make_shared(std::make_shared())}, {"readonly", std::make_shared()}, {"type", std::make_shared()}, + {"default", std::make_shared()}, {"alias_for", std::make_shared()}, }; } @@ -53,6 +54,7 @@ void StorageSystemSettings::fillData(MutableColumns & res_columns, ContextPtr co res_columns[5]->insert(max); res_columns[6]->insert(writability == SettingConstraintWritability::CONST); res_columns[7]->insert(setting.getTypeName()); + res_columns[8]->insert(setting.getDefaultValueString()); }; const auto & settings_to_aliases = Settings::Traits::settingsToAliases(); @@ -62,7 +64,7 @@ void StorageSystemSettings::fillData(MutableColumns & res_columns, ContextPtr co res_columns[0]->insert(setting_name); fill_data_for_setting(setting_name, setting); - res_columns[8]->insert(""); + res_columns[9]->insert(""); if (auto it = settings_to_aliases.find(setting_name); it != settings_to_aliases.end()) { @@ -70,7 +72,7 @@ void StorageSystemSettings::fillData(MutableColumns & res_columns, ContextPtr co { res_columns[0]->insert(alias); fill_data_for_setting(alias, setting); - res_columns[8]->insert(setting_name); + res_columns[9]->insert(setting_name); } } } diff --git a/tests/queries/0_stateless/01221_system_settings.reference b/tests/queries/0_stateless/01221_system_settings.reference index 41f96bdceb5..e36b836c807 100644 --- a/tests/queries/0_stateless/01221_system_settings.reference +++ b/tests/queries/0_stateless/01221_system_settings.reference @@ -1,4 +1,4 @@ -send_timeout 300 0 Timeout for sending data to network, in seconds. If client needs to sent some data, but it did not able to send any bytes in this interval, exception is thrown. If you set this setting on client, the \'receive_timeout\' for the socket will be also set on the corresponding connection end on the server. \N \N 0 Seconds +send_timeout 300 0 Timeout for sending data to network, in seconds. If client needs to sent some data, but it did not able to send any bytes in this interval, exception is thrown. If you set this setting on client, the \'receive_timeout\' for the socket will be also set on the corresponding connection end on the server. \N \N 0 Seconds 300 storage_policy default 0 Name of storage disk policy \N \N 0 String 1 1 diff --git a/tests/queries/0_stateless/02117_show_create_table_system.reference b/tests/queries/0_stateless/02117_show_create_table_system.reference index aabe05ea5e2..bbaaf39c5bd 100644 --- a/tests/queries/0_stateless/02117_show_create_table_system.reference +++ b/tests/queries/0_stateless/02117_show_create_table_system.reference @@ -976,6 +976,7 @@ CREATE TABLE system.settings `max` Nullable(String), `readonly` UInt8, `type` String, + `default` String, `alias_for` String ) ENGINE = SystemSettings From 424d4c59256ba751922491c95bb52ef713c6581e Mon Sep 17 00:00:00 2001 From: avoiderboi Date: Fri, 24 Feb 2023 00:41:18 +0100 Subject: [PATCH 157/841] Add functional tests --- .../0_stateless/25337_width_bucket.reference | 151 ++++++++++++++++++ .../0_stateless/25337_width_bucket.sql | 49 ++++++ 2 files changed, 200 insertions(+) create mode 100644 tests/queries/0_stateless/25337_width_bucket.reference create mode 100644 tests/queries/0_stateless/25337_width_bucket.sql diff --git a/tests/queries/0_stateless/25337_width_bucket.reference b/tests/queries/0_stateless/25337_width_bucket.reference new file mode 100644 index 00000000000..e0dce1dfbc0 --- /dev/null +++ b/tests/queries/0_stateless/25337_width_bucket.reference @@ -0,0 +1,151 @@ +-7.6 -10 0 4 1 +-6 -5 -1 2 0 +0 0 10 4 1 +1 3 0 1 0 +3 -100 200 10 4 +3 0 10 3 1 +4.333 1 11 3 1 +4.34 1 11 3 2 +---------- +-7 -10 0 4 2 +-6 -5 -1 2 0 +0 0 10 4 1 +1 3 0 1 0 +3 -100 200 10 4 +3 0 10 3 1 +4 1 11 3 1 +4 1 11 3 1 +---------- +249 65526 0 4 0 +250 65531 4294967295 2 0 +0 0 10 4 1 +1 3 0 1 0 +3 65436 200 10 0 +3 0 10 3 1 +4 1 11 3 1 +4 1 11 3 1 +---------- +UInt16 +UInt32 +UInt64 +UInt64 +5 +3 +1 +0 +4 +1 +1 +1 +0 +0 +0 +0 +1 +1 +1 +1 +0 +0 +1 +0 +1 +1 +1 +1 +1 +0 +1 +0 +10 +3 +4 +4 +5 +3 +5 +2 +11 +4 +4 +4 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +2 +0 +1 +0 +3 +3 +3 +3 +10 +10 +9 +0 +4 +9 +8 +8 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +0 +0 +0 +2 +0 +1 +0 +12 +4 +4 +4 +14 +14 +14 +14 +14 +14 +14 +14 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 diff --git a/tests/queries/0_stateless/25337_width_bucket.sql b/tests/queries/0_stateless/25337_width_bucket.sql new file mode 100644 index 00000000000..897782f84fb --- /dev/null +++ b/tests/queries/0_stateless/25337_width_bucket.sql @@ -0,0 +1,49 @@ +CREATE TABLE mytable +( + operand Float64, + min Float64, + max Float64, + count UInt64, + PRIMARY KEY (operand, min, max, count) +) ENGINE = MergeTree(); + +INSERT INTO mytable VALUES (3, -100, 200, 10), (0, 0, 10, 4), (3, 0, 10, 3), (4.333, 1, 11, 3), (4.34, 1, 11, 3), (-7.6, -10, 0, 4), (-6, -5, -1, 2), (1, 3, 0, 1), (3, 2, 5, 0); + +SELECT operand, min, max, count, WIDTH_BUCKET(operand, min, max, count) FROM mytable WHERE count != 0; +SELECT '----------'; +-- zero is not valid for count +SELECT operand, min, max, count, WIDTH_BUCKET(operand, min, max, count) FROM mytable WHERE count = 0; -- { serverError 36} +-- IntXX types +SELECT toInt64(operand) AS operand, toInt32(min) AS min, toInt16(max) AS max, count, WIDTH_BUCKET(operand, min, max, count) FROM mytable WHERE count != 0; +SELECT '----------'; +-- UIntXX types +SELECT toUInt8(operand) AS operand, toUInt16(min) AS min, toUInt32(max) AS max, count, WIDTH_BUCKET(operand, min, max, count) FROM mytable WHERE count != 0; +SELECT '----------'; +-- Wrong argument types +SELECT WIDTH_BUCKET(1, 2, 3, -1); -- { serverError 43 } +SELECT WIDTH_BUCKET(1, 2, 3, 1.3); -- { serverError 43 } +SELECT WIDTH_BUCKET('a', 1, 2, 3); -- { serverError 43 } +SELECT WIDTH_BUCKET(1, toUInt128(42), 2, 3); -- { serverError 43 } +SELECT WIDTH_BUCKET(1, 2, toInt128(42), 3); -- { serverError 43 } +SELECT WIDTH_BUCKET(1, 2, 3, toInt256(42)); -- { serverError 43 } +-- Return type checks +SELECT toTypeName(WIDTH_BUCKET(1, 2, 3, toUInt8(1))); +SELECT toTypeName(WIDTH_BUCKET(1, 2, 3, toUInt16(1))); +SELECT toTypeName(WIDTH_BUCKET(1, 2, 3, toUInt32(1))); +SELECT toTypeName(WIDTH_BUCKET(1, 2, 3, toUInt64(1))); +-- Test handling ColumnConst +SELECT WIDTH_BUCKET(1, min, max, count) FROM mytable WHERE count != 0; +SELECT WIDTH_BUCKET(operand, 2, max, count) FROM mytable WHERE count != 0; +SELECT WIDTH_BUCKET(3, 3, max, count) FROM mytable WHERE count != 0; +SELECT WIDTH_BUCKET(operand, min, 4, count) FROM mytable WHERE count != 0; +SELECT WIDTH_BUCKET(5, min, 5, count) FROM mytable WHERE count != 0; +SELECT WIDTH_BUCKET(operand, 6, 6, count) FROM mytable WHERE count != 0; +SELECT WIDTH_BUCKET(7, 7, 7, count) FROM mytable WHERE count != 0; +SELECT WIDTH_BUCKET(operand, min, max, 8) FROM mytable WHERE count != 0; +SELECT WIDTH_BUCKET(9, min, max, 9) FROM mytable WHERE count != 0; +SELECT WIDTH_BUCKET(operand, 10, max, 10) FROM mytable WHERE count != 0; +SELECT WIDTH_BUCKET(11, 11, max, 11) FROM mytable WHERE count != 0; +SELECT WIDTH_BUCKET(operand, min, 12, 12) FROM mytable WHERE count != 0; +SELECT WIDTH_BUCKET(13, min, 13, 13) FROM mytable WHERE count != 0; +SELECT WIDTH_BUCKET(operand, 14, 14, 14) FROM mytable WHERE count != 0; +SELECT WIDTH_BUCKET(15, 15, 15, 15) FROM mytable WHERE count != 0; \ No newline at end of file From 6ead388932e9cc9b099a1e5d1421a7f57d89ccaf Mon Sep 17 00:00:00 2001 From: avoiderboi Date: Fri, 24 Feb 2023 00:41:43 +0100 Subject: [PATCH 158/841] Fix handling invalid count values --- src/Functions/widthBucket.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Functions/widthBucket.cpp b/src/Functions/widthBucket.cpp index f49b6d50af9..8714e9ff4a3 100644 --- a/src/Functions/widthBucket.cpp +++ b/src/Functions/widthBucket.cpp @@ -23,12 +23,13 @@ namespace DB namespace ErrorCodes { extern const int ILLEGAL_TYPE_OF_ARGUMENT; + extern const int BAD_ARGUMENTS; } class FunctionWidthBucket : public IFunction { template - static const typename ColumnVector::Container * getDataIfNotNull(const ColumnVector * col_vec) + const typename ColumnVector::Container * getDataIfNotNull(const ColumnVector * col_vec) const { if (nullptr == col_vec) { @@ -49,8 +50,13 @@ class FunctionWidthBucket : public IFunction } template - static TResultType calculate(const Float64 operand, const Float64 min, const Float64 max, const TCountType count) + TResultType calculate(const Float64 operand, const Float64 min, const Float64 max, const TCountType count) const { + if (count == 0) + { + throw Exception(ErrorCodes::BAD_ARGUMENTS, "Last argument (count) for function {} cannot be 0.", getName()); + } + if (operand < min || min >= max) { return 0; @@ -64,7 +70,7 @@ class FunctionWidthBucket : public IFunction } template TCountType> - static ColumnPtr executeForResultType(const ColumnsWithTypeAndName & arguments, size_t input_rows_count) + ColumnPtr executeForResultType(const ColumnsWithTypeAndName & arguments, size_t input_rows_count) const { using ResultType = typename NumberTraits::Construct::Type; auto common_type = std::make_shared>(); From 059bb1df01ce8e39cb086c67da33c8866de36c80 Mon Sep 17 00:00:00 2001 From: avoiderboi Date: Fri, 24 Feb 2023 01:04:47 +0100 Subject: [PATCH 159/841] Rename `min`/`max` to `low`/`high` --- src/Functions/widthBucket.cpp | 32 ++++++++--------- .../0_stateless/25337_width_bucket.sql | 36 +++++++++---------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/Functions/widthBucket.cpp b/src/Functions/widthBucket.cpp index 8714e9ff4a3..5cf4cc6ca64 100644 --- a/src/Functions/widthBucket.cpp +++ b/src/Functions/widthBucket.cpp @@ -50,23 +50,23 @@ class FunctionWidthBucket : public IFunction } template - TResultType calculate(const Float64 operand, const Float64 min, const Float64 max, const TCountType count) const + TResultType calculate(const Float64 operand, const Float64 low, const Float64 high, const TCountType count) const { if (count == 0) { throw Exception(ErrorCodes::BAD_ARGUMENTS, "Last argument (count) for function {} cannot be 0.", getName()); } - if (operand < min || min >= max) + if (operand < low || low >= high) { return 0; } - else if (operand >= max) + else if (operand >= high) { return count + 1; } - return static_cast(count * ((operand - min) / (max - min)) + 1); + return static_cast(count * ((operand - low) / (high - low)) + 1); } template TCountType> @@ -83,22 +83,22 @@ class FunctionWidthBucket : public IFunction } const auto * operands_vec = getDataIfNotNull(checkAndGetColumn>(casted_columns[0].get())); - const auto * mins_vec = getDataIfNotNull(checkAndGetColumn>(casted_columns[1].get())); - const auto * maxs_vec = getDataIfNotNull(checkAndGetColumn>(casted_columns[2].get())); + const auto * lows_vec = getDataIfNotNull(checkAndGetColumn>(casted_columns[1].get())); + const auto * highs_vec = getDataIfNotNull(checkAndGetColumn>(casted_columns[2].get())); const auto * counts_vec = getDataIfNotNull(checkAndGetColumn>(arguments[3].column.get())); const auto * operands_col_const = checkAndGetColumnConst>(casted_columns[0].get()); - const auto * mins_col_const = checkAndGetColumnConst>(casted_columns[1].get()); - const auto * maxs_col_const = checkAndGetColumnConst>(casted_columns[2].get()); + const auto * lows_col_const = checkAndGetColumnConst>(casted_columns[1].get()); + const auto * highs_col_const = checkAndGetColumnConst>(casted_columns[2].get()); const auto * counts_col_const = checkAndGetColumnConst>(arguments[3].column.get()); assert((nullptr != operands_col_const) ^ (nullptr != operands_vec && operands_vec->size() == input_rows_count)); - assert((nullptr != mins_col_const) ^ (nullptr != mins_vec && mins_vec->size() == input_rows_count)); - assert((nullptr != maxs_col_const) ^ (nullptr != maxs_vec && maxs_vec->size() == input_rows_count)); + assert((nullptr != lows_col_const) ^ (nullptr != lows_vec && lows_vec->size() == input_rows_count)); + assert((nullptr != highs_col_const) ^ (nullptr != highs_vec && highs_vec->size() == input_rows_count)); assert((nullptr != counts_col_const) ^ (nullptr != counts_vec && counts_vec->size() == input_rows_count)); const auto are_all_const_cols - = nullptr != operands_col_const && nullptr != mins_col_const && nullptr != maxs_col_const && nullptr != counts_col_const; + = nullptr != operands_col_const && nullptr != lows_col_const && nullptr != highs_col_const && nullptr != counts_col_const; if (are_all_const_cols) @@ -108,8 +108,8 @@ class FunctionWidthBucket : public IFunction auto & result_data = result_column->getData(); result_data.push_back(calculate( operands_col_const->getValue(), - mins_col_const->getValue(), - maxs_col_const->getValue(), + lows_col_const->getValue(), + highs_col_const->getValue(), counts_col_const->template getValue())); return ColumnConst::create(std::move(result_column), input_rows_count); @@ -122,10 +122,10 @@ class FunctionWidthBucket : public IFunction for (const auto row_index : collections::range(0, input_rows_count)) { const auto operand = getValue(operands_col_const, operands_vec, row_index); - const auto min = getValue(mins_col_const, mins_vec, row_index); - const auto max = getValue(maxs_col_const, maxs_vec, row_index); + const auto low = getValue(lows_col_const, lows_vec, row_index); + const auto high = getValue(highs_col_const, highs_vec, row_index); const auto count = getValue(counts_col_const, counts_vec, row_index); - result_data.push_back(calculate(operand, min, max, count)); + result_data.push_back(calculate(operand, low, high, count)); } return result_column; diff --git a/tests/queries/0_stateless/25337_width_bucket.sql b/tests/queries/0_stateless/25337_width_bucket.sql index 897782f84fb..acf63967d58 100644 --- a/tests/queries/0_stateless/25337_width_bucket.sql +++ b/tests/queries/0_stateless/25337_width_bucket.sql @@ -1,23 +1,23 @@ CREATE TABLE mytable ( operand Float64, - min Float64, - max Float64, + low Float64, + high Float64, count UInt64, - PRIMARY KEY (operand, min, max, count) + PRIMARY KEY (operand, low, high, count) ) ENGINE = MergeTree(); INSERT INTO mytable VALUES (3, -100, 200, 10), (0, 0, 10, 4), (3, 0, 10, 3), (4.333, 1, 11, 3), (4.34, 1, 11, 3), (-7.6, -10, 0, 4), (-6, -5, -1, 2), (1, 3, 0, 1), (3, 2, 5, 0); -SELECT operand, min, max, count, WIDTH_BUCKET(operand, min, max, count) FROM mytable WHERE count != 0; +SELECT operand, low, high, count, WIDTH_BUCKET(operand, low, high, count) FROM mytable WHERE count != 0; SELECT '----------'; -- zero is not valid for count -SELECT operand, min, max, count, WIDTH_BUCKET(operand, min, max, count) FROM mytable WHERE count = 0; -- { serverError 36} +SELECT operand, low, high, count, WIDTH_BUCKET(operand, low, high, count) FROM mytable WHERE count = 0; -- { serverError 36} -- IntXX types -SELECT toInt64(operand) AS operand, toInt32(min) AS min, toInt16(max) AS max, count, WIDTH_BUCKET(operand, min, max, count) FROM mytable WHERE count != 0; +SELECT toInt64(operand) AS operand, toInt32(low) AS low, toInt16(high) AS high, count, WIDTH_BUCKET(operand, low, high, count) FROM mytable WHERE count != 0; SELECT '----------'; -- UIntXX types -SELECT toUInt8(operand) AS operand, toUInt16(min) AS min, toUInt32(max) AS max, count, WIDTH_BUCKET(operand, min, max, count) FROM mytable WHERE count != 0; +SELECT toUInt8(operand) AS operand, toUInt16(low) AS low, toUInt32(high) AS high, count, WIDTH_BUCKET(operand, low, high, count) FROM mytable WHERE count != 0; SELECT '----------'; -- Wrong argument types SELECT WIDTH_BUCKET(1, 2, 3, -1); -- { serverError 43 } @@ -32,18 +32,18 @@ SELECT toTypeName(WIDTH_BUCKET(1, 2, 3, toUInt16(1))); SELECT toTypeName(WIDTH_BUCKET(1, 2, 3, toUInt32(1))); SELECT toTypeName(WIDTH_BUCKET(1, 2, 3, toUInt64(1))); -- Test handling ColumnConst -SELECT WIDTH_BUCKET(1, min, max, count) FROM mytable WHERE count != 0; -SELECT WIDTH_BUCKET(operand, 2, max, count) FROM mytable WHERE count != 0; -SELECT WIDTH_BUCKET(3, 3, max, count) FROM mytable WHERE count != 0; -SELECT WIDTH_BUCKET(operand, min, 4, count) FROM mytable WHERE count != 0; -SELECT WIDTH_BUCKET(5, min, 5, count) FROM mytable WHERE count != 0; +SELECT WIDTH_BUCKET(1, low, high, count) FROM mytable WHERE count != 0; +SELECT WIDTH_BUCKET(operand, 2, high, count) FROM mytable WHERE count != 0; +SELECT WIDTH_BUCKET(3, 3, high, count) FROM mytable WHERE count != 0; +SELECT WIDTH_BUCKET(operand, low, 4, count) FROM mytable WHERE count != 0; +SELECT WIDTH_BUCKET(5, low, 5, count) FROM mytable WHERE count != 0; SELECT WIDTH_BUCKET(operand, 6, 6, count) FROM mytable WHERE count != 0; SELECT WIDTH_BUCKET(7, 7, 7, count) FROM mytable WHERE count != 0; -SELECT WIDTH_BUCKET(operand, min, max, 8) FROM mytable WHERE count != 0; -SELECT WIDTH_BUCKET(9, min, max, 9) FROM mytable WHERE count != 0; -SELECT WIDTH_BUCKET(operand, 10, max, 10) FROM mytable WHERE count != 0; -SELECT WIDTH_BUCKET(11, 11, max, 11) FROM mytable WHERE count != 0; -SELECT WIDTH_BUCKET(operand, min, 12, 12) FROM mytable WHERE count != 0; -SELECT WIDTH_BUCKET(13, min, 13, 13) FROM mytable WHERE count != 0; +SELECT WIDTH_BUCKET(operand, low, high, 8) FROM mytable WHERE count != 0; +SELECT WIDTH_BUCKET(9, low, high, 9) FROM mytable WHERE count != 0; +SELECT WIDTH_BUCKET(operand, 10, high, 10) FROM mytable WHERE count != 0; +SELECT WIDTH_BUCKET(11, 11, high, 11) FROM mytable WHERE count != 0; +SELECT WIDTH_BUCKET(operand, low, 12, 12) FROM mytable WHERE count != 0; +SELECT WIDTH_BUCKET(13, low, 13, 13) FROM mytable WHERE count != 0; SELECT WIDTH_BUCKET(operand, 14, 14, 14) FROM mytable WHERE count != 0; SELECT WIDTH_BUCKET(15, 15, 15, 15) FROM mytable WHERE count != 0; \ No newline at end of file From 8a60881a57955df5c25c05ac432d782c1cd9db43 Mon Sep 17 00:00:00 2001 From: avoiderboi Date: Fri, 24 Feb 2023 01:05:40 +0100 Subject: [PATCH 160/841] Add documentation for `WIDTH_BUCKET` --- .../sql-reference/functions/math-functions.md | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/en/sql-reference/functions/math-functions.md b/docs/en/sql-reference/functions/math-functions.md index bcd118ce0be..e197e245235 100644 --- a/docs/en/sql-reference/functions/math-functions.md +++ b/docs/en/sql-reference/functions/math-functions.md @@ -579,3 +579,25 @@ Result: │ 3628800 │ └───────────────┘ ``` + +## width_bucket(operand, low, high, integer) + +Returns the number of the bucket in which `operand` falls in a histogram having `count` equal-width buckets spanning the range `low` to `high`. Returns `0` if `operand < low`, and returns `count+1` if `operand >= high`. + +`operand`, `low`, `high` can be any native number type. `count` can only be unsigned native integer and its value cannot be zero. + +**Example** + +Query: + +``` sql +SELECT WIDTH_BUCKET(10.15, -8.6, 23, 18); +``` + +Result: + +``` text +┌─width_bucket(10.15, -8.6, 23, 18)─┐ +│ 11 │ +└───────────────────────────────────┘ +``` \ No newline at end of file From 4de9c9152940e334bb7a971b1bf6fc6bacb6499c Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Fri, 24 Feb 2023 01:48:06 +0100 Subject: [PATCH 161/841] add a test for transactions --- .../02434_cancel_insert_when_client_dies.sh | 2 +- ...02435_rollback_cancelled_queries.reference | 3 + .../02435_rollback_cancelled_queries.sh | 118 ++++++++++++++++++ 3 files changed, 122 insertions(+), 1 deletion(-) create mode 100644 tests/queries/0_stateless/02435_rollback_cancelled_queries.reference create mode 100755 tests/queries/0_stateless/02435_rollback_cancelled_queries.sh diff --git a/tests/queries/0_stateless/02434_cancel_insert_when_client_dies.sh b/tests/queries/0_stateless/02434_cancel_insert_when_client_dies.sh index c2cf98f712f..6cae90a3cc3 100755 --- a/tests/queries/0_stateless/02434_cancel_insert_when_client_dies.sh +++ b/tests/queries/0_stateless/02434_cancel_insert_when_client_dies.sh @@ -62,7 +62,7 @@ function thread_cancel SIGNAL="KILL" fi PID=$(ps -ef | grep "$TEST_MARK" | grep -v grep | awk '{print $2}') - if [ ! -z "$PID" ]; then kill -s "$SIGNAL" "$PID" || echo "$PID"; fi + if [ ! -z "$PID" ]; then kill -s "$SIGNAL" "$PID"; fi sleep 0.$RANDOM; sleep 0.$RANDOM; sleep 0.$RANDOM; diff --git a/tests/queries/0_stateless/02435_rollback_cancelled_queries.reference b/tests/queries/0_stateless/02435_rollback_cancelled_queries.reference new file mode 100644 index 00000000000..94c627bb5d8 --- /dev/null +++ b/tests/queries/0_stateless/02435_rollback_cancelled_queries.reference @@ -0,0 +1,3 @@ +1000000 +0 1 +1 diff --git a/tests/queries/0_stateless/02435_rollback_cancelled_queries.sh b/tests/queries/0_stateless/02435_rollback_cancelled_queries.sh new file mode 100755 index 00000000000..bc16c54cd1e --- /dev/null +++ b/tests/queries/0_stateless/02435_rollback_cancelled_queries.sh @@ -0,0 +1,118 @@ +#!/usr/bin/env bash +# Tags: no-random-settings, no-ordinary-database +# shellcheck disable=SC2009 + +CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +# shellcheck source=../shell_config.sh +. "$CURDIR"/../shell_config.sh + +export DATA_FILE="$CLICKHOUSE_TMP/deduptest.tsv" +export TEST_MARK="02435_insert_${CLICKHOUSE_DATABASE}_" +export SESSION="02435_session_${CLICKHOUSE_DATABASE}" + +$CLICKHOUSE_CLIENT -q 'select * from numbers(1000000) format TSV' > $DATA_FILE +$CLICKHOUSE_CLIENT -q 'create table dedup_test(A Int64) Engine = MergeTree order by sin(A) partition by intDiv(A, 100000)' + +function insert_data +{ + IMPLICIT=$(( RANDOM % 2 )) + SESSION_ID="${SESSION}_$RANDOM$RANDOM$RANDOM" + TXN_SETTINGS="session_id=$SESSION_ID&throw_on_unsupported_query_inside_transaction=0" + BEGIN="" + COMMIT="" + SETTINGS="query_id=$ID&$TXN_SETTINGS&max_insert_block_size=110000&min_insert_block_size_rows=110000" + if [[ "$IMPLICIT" -eq 0 ]]; then + $CLICKHOUSE_CURL -sS -d 'begin transaction' "$CLICKHOUSE_URL&$TXN_SETTINGS" + BEGIN="begin transaction;" + COMMIT=$(echo -ne "\n\ncommit") + else + TXN_SETTINGS="$TXN_SETTINGS&implicit_transaction=1" + fi + + SETTINGS="query_id=$ID&$TXN_SETTINGS&max_insert_block_size=110000&min_insert_block_size_rows=110000" + # max_block_size=10000, so external table will contain smaller blocks that will be squashed on insert-select (more chances to catch a bug on query cancellation) + TRASH_SETTINGS="query_id=$ID&$TXN_SETTINGS&input_format_parallel_parsing=0&max_threads=1&max_insert_threads=1&max_insert_block_size=110000&max_block_size=10000&min_insert_block_size_bytes=0&min_insert_block_size_rows=110000&max_insert_block_size=110000" + TYPE=$(( RANDOM % 6 )) + + if [[ "$TYPE" -eq 0 ]]; then + $CLICKHOUSE_CURL -sS -X POST --data-binary @- "$CLICKHOUSE_URL&$SETTINGS&query=insert+into+dedup_test+format+TSV" < $DATA_FILE + elif [[ "$TYPE" -eq 1 ]]; then + $CLICKHOUSE_CURL -sS -X POST -H "Transfer-Encoding: chunked" --data-binary @- "$CLICKHOUSE_URL&$SETTINGS&query=insert+into+dedup_test+format+TSV" < $DATA_FILE + elif [[ "$TYPE" -eq 2 ]]; then + $CLICKHOUSE_CURL -sS -F 'file=@-' "$CLICKHOUSE_URL&$TRASH_SETTINGS&file_format=TSV&file_types=UInt64" -X POST --form-string 'query=insert into dedup_test select * from file' < $DATA_FILE + else + # client will send 1000-rows blocks, server will squash them into 110000-rows blocks (more chances to catch a bug on query cancellation) + $CLICKHOUSE_CLIENT --query_id="$ID" --throw_on_unsupported_query_inside_transaction=0 --implicit_transaction="$IMPLICIT" \ + --max_block_size=1000 --max_insert_block_size=1000 --multiquery -q \ + "${BEGIN}insert into dedup_test settings max_insert_block_size=110000, min_insert_block_size_rows=110000 format TSV$COMMIT" < $DATA_FILE \ + | grep -Fv "Transaction is not in RUNNING state" + fi + + if [[ "$IMPLICIT" -eq 0 ]]; then + $CLICKHOUSE_CURL -sS -d 'commit' "$CLICKHOUSE_URL&$TXN_SETTINGS" | grep -Faq "Transaction is not in RUNNING state" && $CLICKHOUSE_CURL -sS -d 'rollback' "$CLICKHOUSE_URL&$TXN_SETTINGS" + fi +} + +export -f insert_data + +ID="02435_insert_init_${CLICKHOUSE_DATABASE}_$RANDOM" +insert_data +$CLICKHOUSE_CLIENT -q 'select count() from dedup_test' + +function thread_insert +{ + # supress "Killed" messages from bash + while true; do + export ID="$TEST_MARK$RANDOM" + bash -c insert_data 2>&1| grep -Fav "Killed" + done +} + +function thread_select +{ + while true; do + $CLICKHOUSE_CLIENT --implicit_transaction=1 -q "with (select count() from dedup_test) as c select throwIf(c % 1000000 != 0, 'Expected 1000000 * N rows, got ' || toString(c)) format Null" + sleep 0.$RANDOM; + done +} + +function thread_cancel +{ + while true; do + SIGNAL="INT" + if (( RANDOM % 2 )); then + SIGNAL="KILL" + fi + PID=$(ps -ef | grep "$TEST_MARK" | grep -v grep | awk '{print $2}') + if [ ! -z "$PID" ]; then kill -s "$SIGNAL" "$PID"; fi + sleep 0.$RANDOM; + done +} + +export -f thread_insert; +export -f thread_select; +export -f thread_cancel; + +TIMEOUT=20 # 5 seconds for each TYPE + +timeout $TIMEOUT bash -c thread_insert & +timeout $TIMEOUT bash -c thread_select & +timeout $TIMEOUT bash -c thread_cancel 2> /dev/null & + +wait +wait_for_queries_to_finish + +$CLICKHOUSE_CLIENT -q 'system flush logs' + +ID="02435_insert_last_${CLICKHOUSE_DATABASE}_$RANDOM" +insert_data + +$CLICKHOUSE_CLIENT --implicit_transaction=1 -q 'select count() % 1000000, count() > 0 from dedup_test' + +# We have to ignore stderr from thread_cancel, because our CI finds a bug in ps... +# So use this query to check that thread_cancel do something +$CLICKHOUSE_CLIENT -q "select count() > 0 from system.text_log where event_date >= yesterday() and query_id like '$TEST_MARK%' and ( + message_format_string in ('Unexpected end of file while reading chunk header of HTTP chunked data', 'Unexpected EOF, got {} of {} bytes') or + message like '%Connection reset by peer%')" + +$CLICKHOUSE_CLIENT --database_atomic_wait_for_drop_and_detach_synchronously=0 -q "drop table dedup_test" From 6f4c742408f77202c0740829d0d10d2d756ea9e9 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Fri, 24 Feb 2023 02:42:45 +0100 Subject: [PATCH 162/841] fix --- .../0_stateless/02435_rollback_cancelled_queries.reference | 2 +- .../queries/0_stateless/02435_rollback_cancelled_queries.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/queries/0_stateless/02435_rollback_cancelled_queries.reference b/tests/queries/0_stateless/02435_rollback_cancelled_queries.reference index 94c627bb5d8..2d32c17ec7c 100644 --- a/tests/queries/0_stateless/02435_rollback_cancelled_queries.reference +++ b/tests/queries/0_stateless/02435_rollback_cancelled_queries.reference @@ -1,3 +1,3 @@ 1000000 -0 1 +0 1 diff --git a/tests/queries/0_stateless/02435_rollback_cancelled_queries.sh b/tests/queries/0_stateless/02435_rollback_cancelled_queries.sh index bc16c54cd1e..18317960cdf 100755 --- a/tests/queries/0_stateless/02435_rollback_cancelled_queries.sh +++ b/tests/queries/0_stateless/02435_rollback_cancelled_queries.sh @@ -42,7 +42,7 @@ function insert_data $CLICKHOUSE_CURL -sS -F 'file=@-' "$CLICKHOUSE_URL&$TRASH_SETTINGS&file_format=TSV&file_types=UInt64" -X POST --form-string 'query=insert into dedup_test select * from file' < $DATA_FILE else # client will send 1000-rows blocks, server will squash them into 110000-rows blocks (more chances to catch a bug on query cancellation) - $CLICKHOUSE_CLIENT --query_id="$ID" --throw_on_unsupported_query_inside_transaction=0 --implicit_transaction="$IMPLICIT" \ + $CLICKHOUSE_CLIENT --stacktrace --query_id="$ID" --throw_on_unsupported_query_inside_transaction=0 --implicit_transaction="$IMPLICIT" \ --max_block_size=1000 --max_insert_block_size=1000 --multiquery -q \ "${BEGIN}insert into dedup_test settings max_insert_block_size=110000, min_insert_block_size_rows=110000 format TSV$COMMIT" < $DATA_FILE \ | grep -Fv "Transaction is not in RUNNING state" @@ -107,7 +107,8 @@ $CLICKHOUSE_CLIENT -q 'system flush logs' ID="02435_insert_last_${CLICKHOUSE_DATABASE}_$RANDOM" insert_data -$CLICKHOUSE_CLIENT --implicit_transaction=1 -q 'select count() % 1000000, count() > 0 from dedup_test' +$CLICKHOUSE_CLIENT --implicit_transaction=1 -q 'select throwIf(count() % 1000000 != 0 or count() = 0) from dedup_test' \ + || $CLICKHOUSE_CLIENT -q "select name, rows, active, visible, creation_tid, creation_csn from system.parts where database=currentDatabase();" # We have to ignore stderr from thread_cancel, because our CI finds a bug in ps... # So use this query to check that thread_cancel do something From 7122ebab4d696b45add7f3d40b066e31a4093b18 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Fri, 24 Feb 2023 03:06:33 +0100 Subject: [PATCH 163/841] fix clickhouse-test --- tests/clickhouse-test | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tests/clickhouse-test b/tests/clickhouse-test index f5d1099c3f4..cfd2546bbdd 100755 --- a/tests/clickhouse-test +++ b/tests/clickhouse-test @@ -73,13 +73,7 @@ def stringhash(s): # First and last lines of the log def trim_for_log(s): - if not s: - return s - lines = s.splitlines() - if len(lines) > 100: - return "\n".join(lines[:50] + ["#" * 100] + lines[-50:]) - else: - return "\n".join(lines) + return s class HTTPError(Exception): From 8227a6e7bfbdaf0d9eb9f71be909dccf3013a3cc Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Fri, 24 Feb 2023 09:12:08 +0000 Subject: [PATCH 164/841] Fix tests --- .../Passes/LogicalExpressionOptimizer.cpp | 30 +-- .../Passes/LogicalExpressionOptimizerPass.h | 50 ++++- ...00621_regression_for_in_operator.reference | 10 +- .../00736_disjunction_optimisation.reference | 210 ++++++------------ ...ssions_optimizer_low_cardinality.reference | 20 +- ...imizer_removing_redundant_checks.reference | 89 ++++++++ 6 files changed, 221 insertions(+), 188 deletions(-) diff --git a/src/Analyzer/Passes/LogicalExpressionOptimizer.cpp b/src/Analyzer/Passes/LogicalExpressionOptimizer.cpp index c29d38c7865..85b44de74da 100644 --- a/src/Analyzer/Passes/LogicalExpressionOptimizer.cpp +++ b/src/Analyzer/Passes/LogicalExpressionOptimizer.cpp @@ -19,7 +19,6 @@ public: explicit LogicalExpressionOptimizerVisitor(ContextPtr context) : Base(std::move(context)) - , cast_function_resolver(FunctionFactory::instance().get("_CAST", getContext())) {} void visitImpl(QueryTreeNodePtr & node) @@ -86,15 +85,11 @@ private: bool collapse_to_false = false; if (const auto * lhs_literal = lhs->as()) - { collapse_to_false = has_and_with_different_constant(rhs, lhs_literal); - } else if (const auto * rhs_literal = rhs->as()) - { collapse_to_false = has_and_with_different_constant(lhs, rhs_literal); - } else - continue; + and_operands.push_back(argument); if (collapse_to_false) { @@ -108,7 +103,7 @@ private: if (and_operands.size() == 1) { assert(!function_node.getResultType()->isNullable()); - resolveAsCast(function_node, std::move(and_operands[0])); + node = std::move(and_operands[0]); return; } @@ -210,7 +205,7 @@ private: if (or_operands.size() == 1) { assert(!function_node.getResultType()->isNullable()); - resolveAsCast(function_node, std::move(or_operands[0])); + node = std::move(or_operands[0]); return; } @@ -218,27 +213,8 @@ private: function_node.getArguments().getNodes() = std::move(or_operands); function_node.resolveAsFunction(or_function_resolver); } - - void resolveAsCast(FunctionNode & function_node, QueryTreeNodePtr operand) - { - std::string cast_type = function_node.getResultType()->getName(); - auto cast_type_constant_value = std::make_shared(std::move(cast_type), std::make_shared()); - auto cast_type_constant_node = std::make_shared(std::move(cast_type_constant_value)); - - QueryTreeNodes arguments; - arguments.reserve(2); - arguments.push_back(std::move(operand)); - arguments.push_back(std::move(cast_type_constant_node)); - - function_node.getArguments().getNodes() = std::move(arguments); - - function_node.resolveAsFunction(cast_function_resolver); - } - - const FunctionOverloadResolverPtr cast_function_resolver; }; - void LogicalExpressionOptimizerPass::run(QueryTreeNodePtr query_tree_node, ContextPtr context) { LogicalExpressionOptimizerVisitor visitor(std::move(context)); diff --git a/src/Analyzer/Passes/LogicalExpressionOptimizerPass.h b/src/Analyzer/Passes/LogicalExpressionOptimizerPass.h index 327ae3c3fee..b436c94fe4c 100644 --- a/src/Analyzer/Passes/LogicalExpressionOptimizerPass.h +++ b/src/Analyzer/Passes/LogicalExpressionOptimizerPass.h @@ -6,10 +6,12 @@ namespace DB { /** - * This pass replaces chains of equality functions inside an OR with a single IN operator. + * This pass tries to do optimizations on logical expression + * + * Replaces chains of equality functions inside an OR with a single IN operator. * The replacement is done if: - * - rhs of the equality function is a constant - * - length of chain is at least 'optimize_min_equality_disjunction_chain_length' long OR lhs is LowCardinality + * - one of the operands of the equality function is a constant + * - length of chain is at least 'optimize_min_equality_disjunction_chain_length' long OR the expression has type of LowCardinality * * E.g. (optimize_min_equality_disjunction_chain_length = 2) * ------------------------------- @@ -23,6 +25,48 @@ namespace DB * FROM TABLE * WHERE b = 'test' OR a IN (1, 2); * ------------------------------- + * + * Removes duplicate OR checks + * ------------------------------- + * SELECT * + * FROM table + * WHERE a = 1 OR b = 'test' OR a = 1; + * + * will be transformed into + * + * SELECT * + * FROM TABLE + * WHERE a = 1 OR b = 'test'; + * ------------------------------- + * + * Replaces AND chains with a single constant. + * The replacement is done if: + * - one of the operands of the equality function is a constant + * - constants are different for same expression + * ------------------------------- + * SELECT * + * FROM table + * WHERE a = 1 AND b = 'test' AND a = 2; + * + * will be transformed into + * + * SELECT * + * FROM TABLE + * WHERE 0; + * ------------------------------- + * + * Removes duplicate AND checks + * ------------------------------- + * SELECT * + * FROM table + * WHERE a = 1 AND b = 'test' AND a = 1; + * + * will be transformed into + * + * SELECT * + * FROM TABLE + * WHERE a = 1 AND b = 'test'; + * ------------------------------- */ class LogicalExpressionOptimizerPass final : public IQueryTreePass diff --git a/tests/queries/0_stateless/00621_regression_for_in_operator.reference b/tests/queries/0_stateless/00621_regression_for_in_operator.reference index 54b345b65c0..ab8bcf307eb 100644 --- a/tests/queries/0_stateless/00621_regression_for_in_operator.reference +++ b/tests/queries/0_stateless/00621_regression_for_in_operator.reference @@ -12,15 +12,11 @@ QUERY id: 0 JOIN TREE TABLE id: 3, table_name: default.regression_for_in_operator_view WHERE - FUNCTION id: 4, function_name: _CAST, function_type: ordinary, result_type: UInt8 + FUNCTION id: 4, function_name: in, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 5, nodes: 2 - FUNCTION id: 6, function_name: in, function_type: ordinary, result_type: UInt8 - ARGUMENTS - LIST id: 7, nodes: 2 - COLUMN id: 8, column_name: g, result_type: String, source_id: 3 - CONSTANT id: 9, constant_value: Tuple_(\'5\', \'6\'), constant_value_type: Tuple(String, String) - CONSTANT id: 10, constant_value: \'UInt8\', constant_value_type: String + COLUMN id: 6, column_name: g, result_type: String, source_id: 3 + CONSTANT id: 7, constant_value: Tuple_(\'5\', \'6\'), constant_value_type: Tuple(String, String) SETTINGS allow_experimental_analyzer=1 2 2 diff --git a/tests/queries/0_stateless/00736_disjunction_optimisation.reference b/tests/queries/0_stateless/00736_disjunction_optimisation.reference index 4b899527913..84477a64057 100644 --- a/tests/queries/0_stateless/00736_disjunction_optimisation.reference +++ b/tests/queries/0_stateless/00736_disjunction_optimisation.reference @@ -39,24 +39,16 @@ QUERY id: 0 FUNCTION id: 5, function_name: and, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 6, nodes: 2 - FUNCTION id: 7, function_name: _CAST, function_type: ordinary, result_type: UInt8 + FUNCTION id: 7, function_name: in, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 8, nodes: 2 - FUNCTION id: 9, function_name: in, function_type: ordinary, result_type: UInt8 - ARGUMENTS - LIST id: 10, nodes: 2 - COLUMN id: 11, column_name: k, result_type: UInt64, source_id: 3 - CONSTANT id: 12, constant_value: Tuple_(UInt64_1, UInt64_2, UInt64_3), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 13, constant_value: \'UInt8\', constant_value_type: String - FUNCTION id: 14, function_name: _CAST, function_type: ordinary, result_type: UInt8 + COLUMN id: 9, column_name: k, result_type: UInt64, source_id: 3 + CONSTANT id: 10, constant_value: Tuple_(UInt64_1, UInt64_2, UInt64_3), constant_value_type: Tuple(UInt8, UInt8, UInt8) + FUNCTION id: 11, function_name: in, function_type: ordinary, result_type: UInt8 ARGUMENTS - LIST id: 15, nodes: 2 - FUNCTION id: 16, function_name: in, function_type: ordinary, result_type: UInt8 - ARGUMENTS - LIST id: 17, nodes: 2 - COLUMN id: 18, column_name: s, result_type: UInt64, source_id: 3 - CONSTANT id: 19, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 20, constant_value: \'UInt8\', constant_value_type: String + LIST id: 12, nodes: 2 + COLUMN id: 13, column_name: s, result_type: UInt64, source_id: 3 + CONSTANT id: 14, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) SETTINGS allow_experimental_analyzer=1 1 21 1 22 @@ -96,25 +88,17 @@ QUERY id: 0 JOIN TREE TABLE id: 7, table_name: default.bug WHERE - FUNCTION id: 9, function_name: _CAST, function_type: ordinary, result_type: UInt8 + FUNCTION id: 9, function_name: in, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 10, nodes: 2 - FUNCTION id: 11, function_name: in, function_type: ordinary, result_type: UInt8 - ARGUMENTS - LIST id: 12, nodes: 2 - COLUMN id: 13, column_name: k, result_type: UInt64, source_id: 7 - CONSTANT id: 14, constant_value: Tuple_(UInt64_1, UInt64_2, UInt64_3), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 15, constant_value: \'UInt8\', constant_value_type: String + COLUMN id: 11, column_name: k, result_type: UInt64, source_id: 7 + CONSTANT id: 12, constant_value: Tuple_(UInt64_1, UInt64_2, UInt64_3), constant_value_type: Tuple(UInt8, UInt8, UInt8) WHERE - FUNCTION id: 16, function_name: _CAST, function_type: ordinary, result_type: UInt8 + FUNCTION id: 13, function_name: in, function_type: ordinary, result_type: UInt8 ARGUMENTS - LIST id: 17, nodes: 2 - FUNCTION id: 18, function_name: in, function_type: ordinary, result_type: UInt8 - ARGUMENTS - LIST id: 19, nodes: 2 - COLUMN id: 20, column_name: s, result_type: UInt64, source_id: 3 - CONSTANT id: 21, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 22, constant_value: \'UInt8\', constant_value_type: String + LIST id: 14, nodes: 2 + COLUMN id: 15, column_name: s, result_type: UInt64, source_id: 3 + CONSTANT id: 16, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) SETTINGS allow_experimental_analyzer=1 1 1 21 1 1 1 1 1 22 0 1 1 @@ -145,39 +129,27 @@ QUERY id: 0 PROJECTION LIST id: 1, nodes: 6 COLUMN id: 2, column_name: k, result_type: UInt64, source_id: 3 - FUNCTION id: 4, function_name: _CAST, function_type: ordinary, result_type: UInt8 + FUNCTION id: 4, function_name: in, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 5, nodes: 2 - FUNCTION id: 6, function_name: in, function_type: ordinary, result_type: UInt8 - ARGUMENTS - LIST id: 7, nodes: 2 - COLUMN id: 2, column_name: k, result_type: UInt64, source_id: 3 - CONSTANT id: 8, constant_value: Tuple_(UInt64_1, UInt64_2, UInt64_3), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 9, constant_value: \'UInt8\', constant_value_type: String - COLUMN id: 10, column_name: s, result_type: UInt64, source_id: 3 - FUNCTION id: 11, function_name: equals, function_type: ordinary, result_type: UInt8 + COLUMN id: 2, column_name: k, result_type: UInt64, source_id: 3 + CONSTANT id: 6, constant_value: Tuple_(UInt64_1, UInt64_2, UInt64_3), constant_value_type: Tuple(UInt8, UInt8, UInt8) + COLUMN id: 7, column_name: s, result_type: UInt64, source_id: 3 + FUNCTION id: 8, function_name: equals, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 9, nodes: 2 + COLUMN id: 7, column_name: s, result_type: UInt64, source_id: 3 + CONSTANT id: 10, constant_value: UInt64_21, constant_value_type: UInt8 + FUNCTION id: 11, function_name: in, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 12, nodes: 2 - COLUMN id: 10, column_name: s, result_type: UInt64, source_id: 3 - CONSTANT id: 13, constant_value: UInt64_21, constant_value_type: UInt8 - FUNCTION id: 14, function_name: _CAST, function_type: ordinary, result_type: UInt8 + COLUMN id: 7, column_name: s, result_type: UInt64, source_id: 3 + CONSTANT id: 13, constant_value: Tuple_(UInt64_21, UInt64_22), constant_value_type: Tuple(UInt8, UInt8) + FUNCTION id: 14, function_name: in, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 15, nodes: 2 - FUNCTION id: 16, function_name: in, function_type: ordinary, result_type: UInt8 - ARGUMENTS - LIST id: 17, nodes: 2 - COLUMN id: 10, column_name: s, result_type: UInt64, source_id: 3 - CONSTANT id: 18, constant_value: Tuple_(UInt64_21, UInt64_22), constant_value_type: Tuple(UInt8, UInt8) - CONSTANT id: 19, constant_value: \'UInt8\', constant_value_type: String - FUNCTION id: 20, function_name: _CAST, function_type: ordinary, result_type: UInt8 - ARGUMENTS - LIST id: 21, nodes: 2 - FUNCTION id: 22, function_name: in, function_type: ordinary, result_type: UInt8 - ARGUMENTS - LIST id: 23, nodes: 2 - COLUMN id: 10, column_name: s, result_type: UInt64, source_id: 3 - CONSTANT id: 24, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 25, constant_value: \'UInt8\', constant_value_type: String + COLUMN id: 7, column_name: s, result_type: UInt64, source_id: 3 + CONSTANT id: 16, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) JOIN TREE TABLE id: 3, table_name: default.bug SETTINGS allow_experimental_analyzer=1 @@ -206,15 +178,11 @@ QUERY id: 0 PROJECTION LIST id: 1, nodes: 2 COLUMN id: 2, column_name: s, result_type: UInt64, source_id: 3 - FUNCTION id: 4, function_name: _CAST, function_type: ordinary, result_type: UInt8 + FUNCTION id: 4, function_name: in, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 5, nodes: 2 - FUNCTION id: 6, function_name: in, function_type: ordinary, result_type: UInt8 - ARGUMENTS - LIST id: 7, nodes: 2 - COLUMN id: 2, column_name: s, result_type: UInt64, source_id: 3 - CONSTANT id: 8, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 9, constant_value: \'UInt8\', constant_value_type: String + COLUMN id: 2, column_name: s, result_type: UInt64, source_id: 3 + CONSTANT id: 6, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) JOIN TREE TABLE id: 3, table_name: default.bug SETTINGS allow_experimental_analyzer=1 @@ -259,24 +227,16 @@ QUERY id: 0 FUNCTION id: 5, function_name: and, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 6, nodes: 2 - FUNCTION id: 7, function_name: _CAST, function_type: ordinary, result_type: UInt8 + FUNCTION id: 7, function_name: in, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 8, nodes: 2 - FUNCTION id: 9, function_name: in, function_type: ordinary, result_type: UInt8 - ARGUMENTS - LIST id: 10, nodes: 2 - COLUMN id: 11, column_name: k, result_type: UInt64, source_id: 3 - CONSTANT id: 12, constant_value: Tuple_(UInt64_1, UInt64_2, UInt64_3), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 13, constant_value: \'UInt8\', constant_value_type: String - FUNCTION id: 14, function_name: _CAST, function_type: ordinary, result_type: UInt8 + COLUMN id: 9, column_name: k, result_type: UInt64, source_id: 3 + CONSTANT id: 10, constant_value: Tuple_(UInt64_1, UInt64_2, UInt64_3), constant_value_type: Tuple(UInt8, UInt8, UInt8) + FUNCTION id: 11, function_name: in, function_type: ordinary, result_type: UInt8 ARGUMENTS - LIST id: 15, nodes: 2 - FUNCTION id: 16, function_name: in, function_type: ordinary, result_type: UInt8 - ARGUMENTS - LIST id: 17, nodes: 2 - COLUMN id: 18, column_name: s, result_type: UInt64, source_id: 3 - CONSTANT id: 19, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 20, constant_value: \'UInt8\', constant_value_type: String + LIST id: 12, nodes: 2 + COLUMN id: 13, column_name: s, result_type: UInt64, source_id: 3 + CONSTANT id: 14, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) SETTINGS allow_experimental_analyzer=1 1 21 1 22 @@ -316,25 +276,17 @@ QUERY id: 0 JOIN TREE TABLE id: 7, table_name: default.bug WHERE - FUNCTION id: 9, function_name: _CAST, function_type: ordinary, result_type: UInt8 + FUNCTION id: 9, function_name: in, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 10, nodes: 2 - FUNCTION id: 11, function_name: in, function_type: ordinary, result_type: UInt8 - ARGUMENTS - LIST id: 12, nodes: 2 - COLUMN id: 13, column_name: k, result_type: UInt64, source_id: 7 - CONSTANT id: 14, constant_value: Tuple_(UInt64_1, UInt64_2, UInt64_3), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 15, constant_value: \'UInt8\', constant_value_type: String + COLUMN id: 11, column_name: k, result_type: UInt64, source_id: 7 + CONSTANT id: 12, constant_value: Tuple_(UInt64_1, UInt64_2, UInt64_3), constant_value_type: Tuple(UInt8, UInt8, UInt8) WHERE - FUNCTION id: 16, function_name: _CAST, function_type: ordinary, result_type: UInt8 + FUNCTION id: 13, function_name: in, function_type: ordinary, result_type: UInt8 ARGUMENTS - LIST id: 17, nodes: 2 - FUNCTION id: 18, function_name: in, function_type: ordinary, result_type: UInt8 - ARGUMENTS - LIST id: 19, nodes: 2 - COLUMN id: 20, column_name: s, result_type: UInt64, source_id: 3 - CONSTANT id: 21, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 22, constant_value: \'UInt8\', constant_value_type: String + LIST id: 14, nodes: 2 + COLUMN id: 15, column_name: s, result_type: UInt64, source_id: 3 + CONSTANT id: 16, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) SETTINGS allow_experimental_analyzer=1 1 1 21 1 1 1 1 1 22 0 1 1 @@ -365,43 +317,35 @@ QUERY id: 0 PROJECTION LIST id: 1, nodes: 6 COLUMN id: 2, column_name: k, result_type: UInt64, source_id: 3 - FUNCTION id: 4, function_name: _CAST, function_type: ordinary, result_type: UInt8 + FUNCTION id: 4, function_name: in, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 5, nodes: 2 - FUNCTION id: 6, function_name: in, function_type: ordinary, result_type: UInt8 - ARGUMENTS - LIST id: 7, nodes: 2 - COLUMN id: 2, column_name: k, result_type: UInt64, source_id: 3 - CONSTANT id: 8, constant_value: Tuple_(UInt64_1, UInt64_2, UInt64_3), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 9, constant_value: \'UInt8\', constant_value_type: String - COLUMN id: 10, column_name: s, result_type: UInt64, source_id: 3 - FUNCTION id: 11, function_name: equals, function_type: ordinary, result_type: UInt8 + COLUMN id: 2, column_name: k, result_type: UInt64, source_id: 3 + CONSTANT id: 6, constant_value: Tuple_(UInt64_1, UInt64_2, UInt64_3), constant_value_type: Tuple(UInt8, UInt8, UInt8) + COLUMN id: 7, column_name: s, result_type: UInt64, source_id: 3 + FUNCTION id: 8, function_name: equals, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 9, nodes: 2 + COLUMN id: 7, column_name: s, result_type: UInt64, source_id: 3 + CONSTANT id: 10, constant_value: UInt64_21, constant_value_type: UInt8 + FUNCTION id: 11, function_name: or, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 12, nodes: 2 - COLUMN id: 10, column_name: s, result_type: UInt64, source_id: 3 - CONSTANT id: 13, constant_value: UInt64_21, constant_value_type: UInt8 - FUNCTION id: 14, function_name: or, function_type: ordinary, result_type: UInt8 - ARGUMENTS - LIST id: 15, nodes: 2 + FUNCTION id: 13, function_name: equals, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 14, nodes: 2 + COLUMN id: 7, column_name: s, result_type: UInt64, source_id: 3 + CONSTANT id: 15, constant_value: UInt64_21, constant_value_type: UInt8 FUNCTION id: 16, function_name: equals, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 17, nodes: 2 - COLUMN id: 10, column_name: s, result_type: UInt64, source_id: 3 - CONSTANT id: 18, constant_value: UInt64_21, constant_value_type: UInt8 - FUNCTION id: 19, function_name: equals, function_type: ordinary, result_type: UInt8 - ARGUMENTS - LIST id: 20, nodes: 2 - COLUMN id: 10, column_name: s, result_type: UInt64, source_id: 3 - CONSTANT id: 21, constant_value: UInt64_22, constant_value_type: UInt8 - FUNCTION id: 22, function_name: _CAST, function_type: ordinary, result_type: UInt8 + COLUMN id: 7, column_name: s, result_type: UInt64, source_id: 3 + CONSTANT id: 18, constant_value: UInt64_22, constant_value_type: UInt8 + FUNCTION id: 19, function_name: in, function_type: ordinary, result_type: UInt8 ARGUMENTS - LIST id: 23, nodes: 2 - FUNCTION id: 24, function_name: in, function_type: ordinary, result_type: UInt8 - ARGUMENTS - LIST id: 25, nodes: 2 - COLUMN id: 10, column_name: s, result_type: UInt64, source_id: 3 - CONSTANT id: 26, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 27, constant_value: \'UInt8\', constant_value_type: String + LIST id: 20, nodes: 2 + COLUMN id: 7, column_name: s, result_type: UInt64, source_id: 3 + CONSTANT id: 21, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) JOIN TREE TABLE id: 3, table_name: default.bug SETTINGS allow_experimental_analyzer=1 @@ -430,15 +374,11 @@ QUERY id: 0 PROJECTION LIST id: 1, nodes: 2 COLUMN id: 2, column_name: s, result_type: UInt64, source_id: 3 - FUNCTION id: 4, function_name: _CAST, function_type: ordinary, result_type: UInt8 + FUNCTION id: 4, function_name: in, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 5, nodes: 2 - FUNCTION id: 6, function_name: in, function_type: ordinary, result_type: UInt8 - ARGUMENTS - LIST id: 7, nodes: 2 - COLUMN id: 2, column_name: s, result_type: UInt64, source_id: 3 - CONSTANT id: 8, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 9, constant_value: \'UInt8\', constant_value_type: String + COLUMN id: 2, column_name: s, result_type: UInt64, source_id: 3 + CONSTANT id: 6, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) JOIN TREE TABLE id: 3, table_name: default.bug SETTINGS allow_experimental_analyzer=1 @@ -467,15 +407,11 @@ QUERY id: 0 PROJECTION LIST id: 1, nodes: 2 COLUMN id: 2, column_name: s, result_type: UInt64, source_id: 3 - FUNCTION id: 4, function_name: _CAST, function_type: ordinary, result_type: UInt8 + FUNCTION id: 4, function_name: in, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 5, nodes: 2 - FUNCTION id: 6, function_name: in, function_type: ordinary, result_type: UInt8 - ARGUMENTS - LIST id: 7, nodes: 2 - COLUMN id: 2, column_name: s, result_type: UInt64, source_id: 3 - CONSTANT id: 8, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) - CONSTANT id: 9, constant_value: \'UInt8\', constant_value_type: String + COLUMN id: 2, column_name: s, result_type: UInt64, source_id: 3 + CONSTANT id: 6, constant_value: Tuple_(UInt64_21, UInt64_22, UInt64_23), constant_value_type: Tuple(UInt8, UInt8, UInt8) JOIN TREE TABLE id: 3, table_name: default.bug SETTINGS allow_experimental_analyzer=1 diff --git a/tests/queries/0_stateless/02477_logical_expressions_optimizer_low_cardinality.reference b/tests/queries/0_stateless/02477_logical_expressions_optimizer_low_cardinality.reference index 22bd68e0ac1..84589668d64 100644 --- a/tests/queries/0_stateless/02477_logical_expressions_optimizer_low_cardinality.reference +++ b/tests/queries/0_stateless/02477_logical_expressions_optimizer_low_cardinality.reference @@ -10,15 +10,11 @@ QUERY id: 0 JOIN TREE TABLE id: 3, table_name: default.t_logical_expressions_optimizer_low_cardinality WHERE - FUNCTION id: 4, function_name: _CAST, function_type: ordinary, result_type: UInt8 + FUNCTION id: 4, function_name: in, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 5, nodes: 2 - FUNCTION id: 6, function_name: in, function_type: ordinary, result_type: UInt8 - ARGUMENTS - LIST id: 7, nodes: 2 - COLUMN id: 2, column_name: a, result_type: LowCardinality(String), source_id: 3 - CONSTANT id: 8, constant_value: Tuple_(\'x\', \'y\'), constant_value_type: Tuple(String, String) - CONSTANT id: 9, constant_value: \'UInt8\', constant_value_type: String + COLUMN id: 2, column_name: a, result_type: LowCardinality(String), source_id: 3 + CONSTANT id: 6, constant_value: Tuple_(\'x\', \'y\'), constant_value_type: Tuple(String, String) SETTINGS allow_experimental_analyzer=1 SELECT a FROM t_logical_expressions_optimizer_low_cardinality @@ -32,15 +28,11 @@ QUERY id: 0 JOIN TREE TABLE id: 3, table_name: default.t_logical_expressions_optimizer_low_cardinality WHERE - FUNCTION id: 4, function_name: _CAST, function_type: ordinary, result_type: UInt8 + FUNCTION id: 4, function_name: in, function_type: ordinary, result_type: UInt8 ARGUMENTS LIST id: 5, nodes: 2 - FUNCTION id: 6, function_name: in, function_type: ordinary, result_type: UInt8 - ARGUMENTS - LIST id: 7, nodes: 2 - COLUMN id: 2, column_name: a, result_type: LowCardinality(String), source_id: 3 - CONSTANT id: 8, constant_value: Tuple_(\'x\', \'y\'), constant_value_type: Tuple(String, String) - CONSTANT id: 9, constant_value: \'UInt8\', constant_value_type: String + COLUMN id: 2, column_name: a, result_type: LowCardinality(String), source_id: 3 + CONSTANT id: 6, constant_value: Tuple_(\'x\', \'y\'), constant_value_type: Tuple(String, String) SETTINGS allow_experimental_analyzer=1 SELECT a FROM t_logical_expressions_optimizer_low_cardinality diff --git a/tests/queries/0_stateless/02668_logical_optimizer_removing_redundant_checks.reference b/tests/queries/0_stateless/02668_logical_optimizer_removing_redundant_checks.reference index e69de29bb2d..d083e178586 100644 --- a/tests/queries/0_stateless/02668_logical_optimizer_removing_redundant_checks.reference +++ b/tests/queries/0_stateless/02668_logical_optimizer_removing_redundant_checks.reference @@ -0,0 +1,89 @@ +1 test +3 another +QUERY id: 0 + PROJECTION COLUMNS + a Int32 + b LowCardinality(String) + PROJECTION + LIST id: 1, nodes: 2 + COLUMN id: 2, column_name: a, result_type: Int32, source_id: 3 + COLUMN id: 4, column_name: b, result_type: LowCardinality(String), source_id: 3 + JOIN TREE + TABLE id: 3, table_name: default.02668_logical_optimizer + WHERE + FUNCTION id: 5, function_name: in, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 6, nodes: 2 + COLUMN id: 7, column_name: a, result_type: Int32, source_id: 3 + CONSTANT id: 8, constant_value: Tuple_(UInt64_1, UInt64_3), constant_value_type: Tuple(UInt8, UInt8) +1 test +QUERY id: 0 + PROJECTION COLUMNS + a Int32 + b LowCardinality(String) + PROJECTION + LIST id: 1, nodes: 2 + COLUMN id: 2, column_name: a, result_type: Int32, source_id: 3 + COLUMN id: 4, column_name: b, result_type: LowCardinality(String), source_id: 3 + JOIN TREE + TABLE id: 3, table_name: default.02668_logical_optimizer + WHERE + FUNCTION id: 5, function_name: equals, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 6, nodes: 2 + COLUMN id: 7, column_name: a, result_type: Int32, source_id: 3 + CONSTANT id: 8, constant_value: UInt64_1, constant_value_type: UInt8 +QUERY id: 0 + PROJECTION COLUMNS + a Int32 + b LowCardinality(String) + PROJECTION + LIST id: 1, nodes: 2 + COLUMN id: 2, column_name: a, result_type: Int32, source_id: 3 + COLUMN id: 4, column_name: b, result_type: LowCardinality(String), source_id: 3 + JOIN TREE + TABLE id: 3, table_name: default.02668_logical_optimizer + WHERE + CONSTANT id: 5, constant_value: UInt64_0, constant_value_type: UInt8 +3 another +QUERY id: 0 + PROJECTION COLUMNS + a Int32 + b LowCardinality(String) + PROJECTION + LIST id: 1, nodes: 2 + COLUMN id: 2, column_name: a, result_type: Int32, source_id: 3 + COLUMN id: 4, column_name: b, result_type: LowCardinality(String), source_id: 3 + JOIN TREE + TABLE id: 3, table_name: default.02668_logical_optimizer + WHERE + FUNCTION id: 5, function_name: and, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 6, nodes: 2 + FUNCTION id: 7, function_name: equals, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 8, nodes: 2 + COLUMN id: 9, column_name: a, result_type: Int32, source_id: 3 + CONSTANT id: 10, constant_value: UInt64_3, constant_value_type: UInt8 + FUNCTION id: 11, function_name: equals, function_type: ordinary, result_type: LowCardinality(UInt8) + ARGUMENTS + LIST id: 12, nodes: 2 + COLUMN id: 13, column_name: b, result_type: LowCardinality(String), source_id: 3 + CONSTANT id: 14, constant_value: \'another\', constant_value_type: String +2 test2 +QUERY id: 0 + PROJECTION COLUMNS + a Int32 + b LowCardinality(String) + PROJECTION + LIST id: 1, nodes: 2 + COLUMN id: 2, column_name: a, result_type: Int32, source_id: 3 + COLUMN id: 4, column_name: b, result_type: LowCardinality(String), source_id: 3 + JOIN TREE + TABLE id: 3, table_name: default.02668_logical_optimizer + WHERE + FUNCTION id: 5, function_name: equals, function_type: ordinary, result_type: UInt8 + ARGUMENTS + LIST id: 6, nodes: 2 + COLUMN id: 7, column_name: a, result_type: Int32, source_id: 3 + CONSTANT id: 8, constant_value: UInt64_2, constant_value_type: UInt8 From ef529de7db112ad5b327f11f2c3d210cb54d5689 Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Thu, 23 Feb 2023 12:58:42 +0000 Subject: [PATCH 165/841] Cosmetics --- src/Common/OptimizedRegularExpression.h | 4 +- src/Common/StringSearcher.h | 166 ++++++++++++------------ 2 files changed, 86 insertions(+), 84 deletions(-) diff --git a/src/Common/OptimizedRegularExpression.h b/src/Common/OptimizedRegularExpression.h index 0c6e32cb383..d8ed1e205c8 100644 --- a/src/Common/OptimizedRegularExpression.h +++ b/src/Common/OptimizedRegularExpression.h @@ -100,8 +100,8 @@ private: bool required_substring_is_prefix; bool is_case_insensitive; std::string required_substring; - std::optional> case_sensitive_substring_searcher; - std::optional> case_insensitive_substring_searcher; + std::optional case_sensitive_substring_searcher; + std::optional case_insensitive_substring_searcher; std::unique_ptr re2; unsigned number_of_subpatterns; diff --git a/src/Common/StringSearcher.h b/src/Common/StringSearcher.h index a80c8c73292..c595c649a27 100644 --- a/src/Common/StringSearcher.h +++ b/src/Common/StringSearcher.h @@ -5,7 +5,6 @@ #include #include #include -#include #include #include #include @@ -32,25 +31,30 @@ namespace ErrorCodes * In most cases, performance is less than Volnitsky (see Volnitsky.h). */ +namespace impl +{ class StringSearcherBase { public: bool force_fallback = false; + #ifdef __SSE2__ protected: - static constexpr auto n = sizeof(__m128i); - const Int64 page_size = ::getPageSize(); + static constexpr size_t N = sizeof(__m128i); - bool pageSafe(const void * const ptr) const + bool isPageSafe(const void * const ptr) const { - return ((page_size - 1) & reinterpret_cast(ptr)) <= page_size - n; + return ((page_size - 1) & reinterpret_cast(ptr)) <= page_size - N; } + +private: + const Int64 page_size = ::getPageSize(); #endif }; -/// Performs case-sensitive and case-insensitive search of UTF-8 strings +/// Performs case-sensitive or case-insensitive search of ASCII or UTF-8 strings template class StringSearcher; /// Case-insensitive UTF-8 searcher @@ -65,9 +69,9 @@ private: const size_t needle_size; const uint8_t * const needle_end = needle + needle_size; /// lower and uppercase variants of the first octet of the first character in `needle` - bool first_needle_symbol_is_ascii{}; - uint8_t l{}; - uint8_t u{}; + bool first_needle_symbol_is_ascii = false; + uint8_t l = 0; + uint8_t u = 0; #ifdef __SSE4_1__ /// vectors filled with `l` and `u`, for determining leftmost position of the first symbol @@ -76,16 +80,17 @@ private: /// lower and uppercase vectors of first 16 characters of `needle` __m128i cachel = _mm_setzero_si128(); __m128i cacheu = _mm_setzero_si128(); - int cachemask{}; - size_t cache_valid_len{}; - size_t cache_actual_len{}; + int cachemask = 0; + size_t cache_valid_len = 0; + size_t cache_actual_len = 0; #endif public: template requires (sizeof(CharT) == 1) - StringSearcher(const CharT * needle_, const size_t needle_size_) - : needle{reinterpret_cast(needle_)}, needle_size{needle_size_} + StringSearcher(const CharT * needle_, size_t needle_size_) + : needle(reinterpret_cast(needle_)) + , needle_size(needle_size_) { if (0 == needle_size) return; @@ -140,7 +145,7 @@ public: const auto * needle_pos = needle; - for (size_t i = 0; i < n;) + for (size_t i = 0; i < N;) { if (needle_pos == needle_end) { @@ -171,18 +176,18 @@ public: } cache_actual_len += src_len; - if (cache_actual_len < n) + if (cache_actual_len < N) cache_valid_len += src_len; - for (size_t j = 0; j < src_len && i < n; ++j, ++i) + for (size_t j = 0; j < src_len && i < N; ++j, ++i) { cachel = _mm_srli_si128(cachel, 1); cacheu = _mm_srli_si128(cacheu, 1); if (needle_pos != needle_end) { - cachel = _mm_insert_epi8(cachel, l_seq[j], n - 1); - cacheu = _mm_insert_epi8(cacheu, u_seq[j], n - 1); + cachel = _mm_insert_epi8(cachel, l_seq[j], N - 1); + cacheu = _mm_insert_epi8(cacheu, u_seq[j], N - 1); cachemask |= 1 << i; ++needle_pos; @@ -225,7 +230,7 @@ public: { #ifdef __SSE4_1__ - if (pageSafe(pos) && !force_fallback) + if (isPageSafe(pos) && !force_fallback) { const auto v_haystack = _mm_loadu_si128(reinterpret_cast(pos)); const auto v_against_l = _mm_cmpeq_epi8(v_haystack, cachel); @@ -275,7 +280,7 @@ public: while (haystack < haystack_end) { #ifdef __SSE4_1__ - if (haystack + n <= haystack_end && pageSafe(haystack) && !force_fallback) + if (haystack + N <= haystack_end && isPageSafe(haystack) && !force_fallback) { const auto v_haystack = _mm_loadu_si128(reinterpret_cast(haystack)); const auto v_against_l = _mm_cmpeq_epi8(v_haystack, patl); @@ -286,7 +291,7 @@ public: if (mask == 0) { - haystack += n; + haystack += N; UTF8::syncForward(haystack, haystack_end); continue; } @@ -294,7 +299,7 @@ public: const auto offset = __builtin_ctz(mask); haystack += offset; - if (haystack + n <= haystack_end && pageSafe(haystack)) + if (haystack + N <= haystack_end && isPageSafe(haystack)) { const auto v_haystack_offset = _mm_loadu_si128(reinterpret_cast(haystack)); const auto v_against_l_offset = _mm_cmpeq_epi8(v_haystack_offset, cachel); @@ -344,7 +349,7 @@ public: template requires (sizeof(CharT) == 1) - const CharT * search(const CharT * haystack, const size_t haystack_size) const + const CharT * search(const CharT * haystack, size_t haystack_size) const { return search(haystack, haystack + haystack_size); } @@ -360,22 +365,23 @@ private: const uint8_t * const needle; const uint8_t * const needle_end; /// lower and uppercase variants of the first character in `needle` - uint8_t l{}; - uint8_t u{}; + uint8_t l = 0; + uint8_t u = 0; #ifdef __SSE4_1__ /// vectors filled with `l` and `u`, for determining leftmost position of the first symbol __m128i patl, patu; /// lower and uppercase vectors of first 16 characters of `needle` __m128i cachel = _mm_setzero_si128(), cacheu = _mm_setzero_si128(); - int cachemask{}; + int cachemask = 0; #endif public: template requires (sizeof(CharT) == 1) - StringSearcher(const CharT * needle_, const size_t needle_size) - : needle{reinterpret_cast(needle_)}, needle_end{needle + needle_size} + StringSearcher(const CharT * needle_, size_t needle_size) + : needle(reinterpret_cast(needle_)) + , needle_end(needle + needle_size) { if (0 == needle_size) return; @@ -389,15 +395,15 @@ public: const auto * needle_pos = needle; - for (const auto i : collections::range(0, n)) + for (size_t i = 0; i < N; ++i) { cachel = _mm_srli_si128(cachel, 1); cacheu = _mm_srli_si128(cacheu, 1); if (needle_pos != needle_end) { - cachel = _mm_insert_epi8(cachel, std::tolower(*needle_pos), n - 1); - cacheu = _mm_insert_epi8(cacheu, std::toupper(*needle_pos), n - 1); + cachel = _mm_insert_epi8(cachel, std::tolower(*needle_pos), N - 1); + cacheu = _mm_insert_epi8(cacheu, std::toupper(*needle_pos), N - 1); cachemask |= 1 << i; ++needle_pos; } @@ -410,7 +416,7 @@ public: ALWAYS_INLINE bool compare(const CharT * /*haystack*/, const CharT * /*haystack_end*/, const CharT * pos) const { #ifdef __SSE4_1__ - if (pageSafe(pos)) + if (isPageSafe(pos)) { const auto v_haystack = _mm_loadu_si128(reinterpret_cast(pos)); const auto v_against_l = _mm_cmpeq_epi8(v_haystack, cachel); @@ -422,8 +428,8 @@ public: { if (mask == cachemask) { - pos += n; - const auto * needle_pos = needle + n; + pos += N; + const auto * needle_pos = needle + N; while (needle_pos < needle_end && std::tolower(*pos) == std::tolower(*needle_pos)) { @@ -470,7 +476,7 @@ public: while (haystack < haystack_end) { #ifdef __SSE4_1__ - if (haystack + n <= haystack_end && pageSafe(haystack)) + if (haystack + N <= haystack_end && isPageSafe(haystack)) { const auto v_haystack = _mm_loadu_si128(reinterpret_cast(haystack)); const auto v_against_l = _mm_cmpeq_epi8(v_haystack, patl); @@ -481,14 +487,14 @@ public: if (mask == 0) { - haystack += n; + haystack += N; continue; } const auto offset = __builtin_ctz(mask); haystack += offset; - if (haystack + n <= haystack_end && pageSafe(haystack)) + if (haystack + N <= haystack_end && isPageSafe(haystack)) { const auto v_haystack_offset = _mm_loadu_si128(reinterpret_cast(haystack)); const auto v_against_l_offset = _mm_cmpeq_epi8(v_haystack_offset, cachel); @@ -500,8 +506,8 @@ public: { if (mask_offset == cachemask) { - const auto * haystack_pos = haystack + n; - const auto * needle_pos = needle + n; + const auto * haystack_pos = haystack + N; + const auto * needle_pos = needle + N; while (haystack_pos < haystack_end && needle_pos < needle_end && std::tolower(*haystack_pos) == std::tolower(*needle_pos)) @@ -550,14 +556,14 @@ public: template requires (sizeof(CharT) == 1) - const CharT * search(const CharT * haystack, const size_t haystack_size) const + const CharT * search(const CharT * haystack, size_t haystack_size) const { return search(haystack, haystack + haystack_size); } }; -/// Case-sensitive searcher (both ASCII and UTF-8) +/// Case-sensitive ASCII and UTF8 searcher template class StringSearcher : public StringSearcherBase { @@ -571,7 +577,7 @@ private: #ifdef __SSE4_1__ /// second character of "needle" (if its length is > 1) uint8_t second_needle_character = 0; - /// The first/second needle character broadcasted into a 16 bytes vector + /// first/second needle character broadcasted into a 16 bytes vector __m128i first_needle_character_vec; __m128i second_needle_character_vec; /// vector of first 16 characters of `needle` @@ -582,10 +588,11 @@ private: public: template requires (sizeof(CharT) == 1) - StringSearcher(const CharT * needle_, const size_t needle_size) - : needle{reinterpret_cast(needle_)}, needle_end{needle + needle_size} + StringSearcher(const CharT * needle_, size_t needle_size) + : needle(reinterpret_cast(needle_)) + , needle_end(needle + needle_size) { - if (0 == needle_size) + if (needle_size == 0) return; first_needle_character = *needle; @@ -599,13 +606,13 @@ public: } const auto * needle_pos = needle; - for (uint8_t i = 0; i < n; ++i) + for (uint8_t i = 0; i < N; ++i) { cache = _mm_srli_si128(cache, 1); if (needle_pos != needle_end) { - cache = _mm_insert_epi8(cache, *needle_pos, n - 1); + cache = _mm_insert_epi8(cache, *needle_pos, N - 1); cachemask |= 1 << i; ++needle_pos; } @@ -618,7 +625,7 @@ public: ALWAYS_INLINE bool compare(const CharT * /*haystack*/, const CharT * /*haystack_end*/, const CharT * pos) const { #ifdef __SSE4_1__ - if (pageSafe(pos)) + if (isPageSafe(pos)) { const __m128i haystack_characters = _mm_loadu_si128(reinterpret_cast(pos)); const __m128i comparison_result = _mm_cmpeq_epi8(haystack_characters, cache); @@ -628,8 +635,8 @@ public: { if (comparison_result_mask == cachemask) { - pos += n; - const auto * needle_pos = needle + n; + pos += N; + const auto * needle_pos = needle + N; while (needle_pos < needle_end && *pos == *needle_pos) ++pos, ++needle_pos; @@ -675,18 +682,18 @@ public: { while (haystack < haystack_end) { - if (haystack + n <= haystack_end && pageSafe(haystack)) + if (haystack + N <= haystack_end && isPageSafe(haystack)) { const __m128i haystack_characters = _mm_loadu_si128(reinterpret_cast(haystack)); const __m128i comparison_result = _mm_cmpeq_epi8(haystack_characters, first_needle_character_vec); const uint16_t comparison_result_mask = _mm_movemask_epi8(comparison_result); if (comparison_result_mask == 0) { - haystack += n; + haystack += N; continue; } - const auto offset = std::countr_zero(comparison_result_mask); + const int offset = std::countr_zero(comparison_result_mask); haystack += offset; return haystack; @@ -711,7 +718,7 @@ public: /// Compare the [0:15] bytes from haystack and broadcasted 16 bytes vector from first character of needle. /// Compare the [1:16] bytes from haystack and broadcasted 16 bytes vector from second character of needle. /// Bit AND the results of above two comparisons and get the mask. - if ((haystack + 1 + n) <= haystack_end && pageSafe(haystack + 1)) + if ((haystack + 1 + N) <= haystack_end && isPageSafe(haystack + 1)) { const __m128i haystack_characters_from_1st = _mm_loadu_si128(reinterpret_cast(haystack)); const __m128i haystack_characters_from_2nd = _mm_loadu_si128(reinterpret_cast(haystack + 1)); @@ -722,14 +729,14 @@ public: /// If the mask = 0, then first two characters [0:1] from needle are not in the [0:17] bytes of haystack. if (comparison_result_mask == 0) { - haystack += n; + haystack += N; continue; } - const auto offset = std::countr_zero(comparison_result_mask); + const int offset = std::countr_zero(comparison_result_mask); haystack += offset; - if (haystack + n <= haystack_end && pageSafe(haystack)) + if (haystack + N <= haystack_end && isPageSafe(haystack)) { /// Already find the haystack position where the [pos:pos + 1] two characters exactly match the first two characters of needle. /// Compare the 16 bytes from needle (cache) and the first 16 bytes from haystack at once if the haystack size >= 16 bytes. @@ -741,8 +748,8 @@ public: { if (mask_offset == cachemask) { - const auto * haystack_pos = haystack + n; - const auto * needle_pos = needle + n; + const auto * haystack_pos = haystack + N; + const auto * needle_pos = needle + N; while (haystack_pos < haystack_end && needle_pos < needle_end && *haystack_pos == *needle_pos) @@ -785,7 +792,7 @@ public: template requires (sizeof(CharT) == 1) - const CharT * search(const CharT * haystack, const size_t haystack_size) const + const CharT * search(const CharT * haystack, size_t haystack_size) const { return search(haystack, haystack + haystack_size); } @@ -804,14 +811,12 @@ class TokenSearcher : public StringSearcherBase public: template requires (sizeof(CharT) == 1) - TokenSearcher(const CharT * needle_, const size_t needle_size_) - : searcher{needle_, needle_size_}, - needle_size(needle_size_) + TokenSearcher(const CharT * needle_, size_t needle_size_) + : searcher(needle_, needle_size_) + , needle_size(needle_size_) { if (std::any_of(needle_, needle_ + needle_size_, isTokenSeparator)) - { throw Exception(ErrorCodes::BAD_ARGUMENTS, "Needle must not contain whitespace or separator characters"); - } } @@ -848,7 +853,7 @@ public: template requires (sizeof(CharT) == 1) - const CharT * search(const CharT * haystack, const size_t haystack_size) const + const CharT * search(const CharT * haystack, size_t haystack_size) const { return search(haystack, haystack + haystack_size); } @@ -867,26 +872,27 @@ public: } }; +} -using ASCIICaseSensitiveStringSearcher = StringSearcher; -using ASCIICaseInsensitiveStringSearcher = StringSearcher; -using UTF8CaseSensitiveStringSearcher = StringSearcher; -using UTF8CaseInsensitiveStringSearcher = StringSearcher; -using ASCIICaseSensitiveTokenSearcher = TokenSearcher; -using ASCIICaseInsensitiveTokenSearcher = TokenSearcher; +using ASCIICaseSensitiveStringSearcher = impl::StringSearcher; +using ASCIICaseInsensitiveStringSearcher = impl::StringSearcher; +using UTF8CaseSensitiveStringSearcher = impl::StringSearcher; +using UTF8CaseInsensitiveStringSearcher = impl::StringSearcher; +using ASCIICaseSensitiveTokenSearcher = impl::TokenSearcher; +using ASCIICaseInsensitiveTokenSearcher = impl::TokenSearcher; /// Use only with short haystacks where cheap initialization is required. template -struct StdLibASCIIStringSearcher : public StringSearcherBase +struct StdLibASCIIStringSearcher { const char * const needle_start; const char * const needle_end; template requires (sizeof(CharT) == 1) - StdLibASCIIStringSearcher(const CharT * const needle_start_, const size_t needle_size_) - : needle_start{reinterpret_cast(needle_start_)} - , needle_end{reinterpret_cast(needle_start) + needle_size_} + StdLibASCIIStringSearcher(const CharT * const needle_start_, size_t needle_size_) + : needle_start(reinterpret_cast(needle_start_)) + , needle_end(reinterpret_cast(needle_start) + needle_size_) {} template @@ -894,22 +900,18 @@ struct StdLibASCIIStringSearcher : public StringSearcherBase const CharT * search(const CharT * haystack_start, const CharT * const haystack_end) const { if constexpr (CaseInsensitive) - { return std::search( haystack_start, haystack_end, needle_start, needle_end, [](char c1, char c2) {return std::toupper(c1) == std::toupper(c2);}); - } else - { return std::search( haystack_start, haystack_end, needle_start, needle_end, [](char c1, char c2) {return c1 == c2;}); - } } template requires (sizeof(CharT) == 1) - const CharT * search(const CharT * haystack_start, const size_t haystack_length) const + const CharT * search(const CharT * haystack_start, size_t haystack_length) const { return search(haystack_start, haystack_start + haystack_length); } From 421afeeae074f70d094f9601aa655dc4bf6d9c7f Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Fri, 24 Feb 2023 10:13:35 +0000 Subject: [PATCH 166/841] Shuffle class order (and just that) --- src/Common/StringSearcher.h | 886 ++++++++++++++++++------------------ 1 file changed, 444 insertions(+), 442 deletions(-) diff --git a/src/Common/StringSearcher.h b/src/Common/StringSearcher.h index c595c649a27..15a8b3a022b 100644 --- a/src/Common/StringSearcher.h +++ b/src/Common/StringSearcher.h @@ -57,6 +57,450 @@ private: /// Performs case-sensitive or case-insensitive search of ASCII or UTF-8 strings template class StringSearcher; + +/// Case-sensitive ASCII and UTF8 searcher +template +class StringSearcher : public StringSearcherBase +{ +private: + /// string to be searched for + const uint8_t * const needle; + const uint8_t * const needle_end; + /// first character in `needle` + uint8_t first_needle_character = 0; + +#ifdef __SSE4_1__ + /// second character of "needle" (if its length is > 1) + uint8_t second_needle_character = 0; + /// first/second needle character broadcasted into a 16 bytes vector + __m128i first_needle_character_vec; + __m128i second_needle_character_vec; + /// vector of first 16 characters of `needle` + __m128i cache = _mm_setzero_si128(); + uint16_t cachemask = 0; +#endif + +public: + template + requires (sizeof(CharT) == 1) + StringSearcher(const CharT * needle_, size_t needle_size) + : needle(reinterpret_cast(needle_)) + , needle_end(needle + needle_size) + { + if (needle_size == 0) + return; + + first_needle_character = *needle; + +#ifdef __SSE4_1__ + first_needle_character_vec = _mm_set1_epi8(first_needle_character); + if (needle_size > 1) + { + second_needle_character = *(needle + 1); + second_needle_character_vec = _mm_set1_epi8(second_needle_character); + } + const auto * needle_pos = needle; + + for (uint8_t i = 0; i < N; ++i) + { + cache = _mm_srli_si128(cache, 1); + + if (needle_pos != needle_end) + { + cache = _mm_insert_epi8(cache, *needle_pos, N - 1); + cachemask |= 1 << i; + ++needle_pos; + } + } +#endif + } + + template + requires (sizeof(CharT) == 1) + ALWAYS_INLINE bool compare(const CharT * /*haystack*/, const CharT * /*haystack_end*/, const CharT * pos) const + { +#ifdef __SSE4_1__ + if (isPageSafe(pos)) + { + const __m128i haystack_characters = _mm_loadu_si128(reinterpret_cast(pos)); + const __m128i comparison_result = _mm_cmpeq_epi8(haystack_characters, cache); + const uint16_t comparison_result_mask = _mm_movemask_epi8(comparison_result); + + if (0xffff == cachemask) + { + if (comparison_result_mask == cachemask) + { + pos += N; + const auto * needle_pos = needle + N; + + while (needle_pos < needle_end && *pos == *needle_pos) + ++pos, ++needle_pos; + + if (needle_pos == needle_end) + return true; + } + } + else if ((comparison_result_mask & cachemask) == cachemask) + return true; + + return false; + } +#endif + + if (*pos == first_needle_character) + { + ++pos; + const auto * needle_pos = needle + 1; + + while (needle_pos < needle_end && *pos == *needle_pos) + ++pos, ++needle_pos; + + if (needle_pos == needle_end) + return true; + } + + return false; + } + + template + requires (sizeof(CharT) == 1) + const CharT * search(const CharT * haystack, const CharT * const haystack_end) const + { + const auto needle_size = needle_end - needle; + + if (needle == needle_end) + return haystack; + +#ifdef __SSE4_1__ + /// Fast path for single-character needles. Compare 16 characters of the haystack against the needle character at once. + if (needle_size == 1) + { + while (haystack < haystack_end) + { + if (haystack + N <= haystack_end && isPageSafe(haystack)) + { + const __m128i haystack_characters = _mm_loadu_si128(reinterpret_cast(haystack)); + const __m128i comparison_result = _mm_cmpeq_epi8(haystack_characters, first_needle_character_vec); + const uint16_t comparison_result_mask = _mm_movemask_epi8(comparison_result); + if (comparison_result_mask == 0) + { + haystack += N; + continue; + } + + const int offset = std::countr_zero(comparison_result_mask); + haystack += offset; + + return haystack; + } + + if (haystack == haystack_end) + return haystack_end; + + if (*haystack == first_needle_character) + return haystack; + + ++haystack; + } + + return haystack_end; + } +#endif + + while (haystack < haystack_end && haystack_end - haystack >= needle_size) + { +#ifdef __SSE4_1__ + /// Compare the [0:15] bytes from haystack and broadcasted 16 bytes vector from first character of needle. + /// Compare the [1:16] bytes from haystack and broadcasted 16 bytes vector from second character of needle. + /// Bit AND the results of above two comparisons and get the mask. + if ((haystack + 1 + N) <= haystack_end && isPageSafe(haystack + 1)) + { + const __m128i haystack_characters_from_1st = _mm_loadu_si128(reinterpret_cast(haystack)); + const __m128i haystack_characters_from_2nd = _mm_loadu_si128(reinterpret_cast(haystack + 1)); + const __m128i comparison_result_1st = _mm_cmpeq_epi8(haystack_characters_from_1st, first_needle_character_vec); + const __m128i comparison_result_2nd = _mm_cmpeq_epi8(haystack_characters_from_2nd, second_needle_character_vec); + const __m128i comparison_result_combined = _mm_and_si128(comparison_result_1st, comparison_result_2nd); + const uint16_t comparison_result_mask = _mm_movemask_epi8(comparison_result_combined); + /// If the mask = 0, then first two characters [0:1] from needle are not in the [0:17] bytes of haystack. + if (comparison_result_mask == 0) + { + haystack += N; + continue; + } + + const int offset = std::countr_zero(comparison_result_mask); + haystack += offset; + + if (haystack + N <= haystack_end && isPageSafe(haystack)) + { + /// Already find the haystack position where the [pos:pos + 1] two characters exactly match the first two characters of needle. + /// Compare the 16 bytes from needle (cache) and the first 16 bytes from haystack at once if the haystack size >= 16 bytes. + const __m128i haystack_characters = _mm_loadu_si128(reinterpret_cast(haystack)); + const __m128i comparison_result_cache = _mm_cmpeq_epi8(haystack_characters, cache); + const uint16_t mask_offset = _mm_movemask_epi8(comparison_result_cache); + + if (0xffff == cachemask) + { + if (mask_offset == cachemask) + { + const auto * haystack_pos = haystack + N; + const auto * needle_pos = needle + N; + + while (haystack_pos < haystack_end && needle_pos < needle_end && + *haystack_pos == *needle_pos) + ++haystack_pos, ++needle_pos; + + if (needle_pos == needle_end) + return haystack; + } + } + else if ((mask_offset & cachemask) == cachemask) + return haystack; + + ++haystack; + continue; + } + } +#endif + + if (haystack == haystack_end) + return haystack_end; + + if (*haystack == first_needle_character) + { + const auto * haystack_pos = haystack + 1; + const auto * needle_pos = needle + 1; + + while (haystack_pos < haystack_end && needle_pos < needle_end && + *haystack_pos == *needle_pos) + ++haystack_pos, ++needle_pos; + + if (needle_pos == needle_end) + return haystack; + } + + ++haystack; + } + + return haystack_end; + } + + template + requires (sizeof(CharT) == 1) + const CharT * search(const CharT * haystack, size_t haystack_size) const + { + return search(haystack, haystack + haystack_size); + } +}; + + +/// Case-insensitive ASCII searcher +template <> +class StringSearcher : public StringSearcherBase +{ +private: + /// string to be searched for + const uint8_t * const needle; + const uint8_t * const needle_end; + /// lower and uppercase variants of the first character in `needle` + uint8_t l = 0; + uint8_t u = 0; + +#ifdef __SSE4_1__ + /// vectors filled with `l` and `u`, for determining leftmost position of the first symbol + __m128i patl, patu; + /// lower and uppercase vectors of first 16 characters of `needle` + __m128i cachel = _mm_setzero_si128(), cacheu = _mm_setzero_si128(); + int cachemask = 0; +#endif + +public: + template + requires (sizeof(CharT) == 1) + StringSearcher(const CharT * needle_, size_t needle_size) + : needle(reinterpret_cast(needle_)) + , needle_end(needle + needle_size) + { + if (0 == needle_size) + return; + + l = static_cast(std::tolower(*needle)); + u = static_cast(std::toupper(*needle)); + +#ifdef __SSE4_1__ + patl = _mm_set1_epi8(l); + patu = _mm_set1_epi8(u); + + const auto * needle_pos = needle; + + for (size_t i = 0; i < N; ++i) + { + cachel = _mm_srli_si128(cachel, 1); + cacheu = _mm_srli_si128(cacheu, 1); + + if (needle_pos != needle_end) + { + cachel = _mm_insert_epi8(cachel, std::tolower(*needle_pos), N - 1); + cacheu = _mm_insert_epi8(cacheu, std::toupper(*needle_pos), N - 1); + cachemask |= 1 << i; + ++needle_pos; + } + } +#endif + } + + template + requires (sizeof(CharT) == 1) + ALWAYS_INLINE bool compare(const CharT * /*haystack*/, const CharT * /*haystack_end*/, const CharT * pos) const + { +#ifdef __SSE4_1__ + if (isPageSafe(pos)) + { + const auto v_haystack = _mm_loadu_si128(reinterpret_cast(pos)); + const auto v_against_l = _mm_cmpeq_epi8(v_haystack, cachel); + const auto v_against_u = _mm_cmpeq_epi8(v_haystack, cacheu); + const auto v_against_l_or_u = _mm_or_si128(v_against_l, v_against_u); + const auto mask = _mm_movemask_epi8(v_against_l_or_u); + + if (0xffff == cachemask) + { + if (mask == cachemask) + { + pos += N; + const auto * needle_pos = needle + N; + + while (needle_pos < needle_end && std::tolower(*pos) == std::tolower(*needle_pos)) + { + ++pos; + ++needle_pos; + } + + if (needle_pos == needle_end) + return true; + } + } + else if ((mask & cachemask) == cachemask) + return true; + + return false; + } +#endif + + if (*pos == l || *pos == u) + { + ++pos; + const auto * needle_pos = needle + 1; + + while (needle_pos < needle_end && std::tolower(*pos) == std::tolower(*needle_pos)) + { + ++pos; + ++needle_pos; + } + + if (needle_pos == needle_end) + return true; + } + + return false; + } + + template + requires (sizeof(CharT) == 1) + const CharT * search(const CharT * haystack, const CharT * const haystack_end) const + { + if (needle == needle_end) + return haystack; + + while (haystack < haystack_end) + { +#ifdef __SSE4_1__ + if (haystack + N <= haystack_end && isPageSafe(haystack)) + { + const auto v_haystack = _mm_loadu_si128(reinterpret_cast(haystack)); + const auto v_against_l = _mm_cmpeq_epi8(v_haystack, patl); + const auto v_against_u = _mm_cmpeq_epi8(v_haystack, patu); + const auto v_against_l_or_u = _mm_or_si128(v_against_l, v_against_u); + + const auto mask = _mm_movemask_epi8(v_against_l_or_u); + + if (mask == 0) + { + haystack += N; + continue; + } + + const auto offset = __builtin_ctz(mask); + haystack += offset; + + if (haystack + N <= haystack_end && isPageSafe(haystack)) + { + const auto v_haystack_offset = _mm_loadu_si128(reinterpret_cast(haystack)); + const auto v_against_l_offset = _mm_cmpeq_epi8(v_haystack_offset, cachel); + const auto v_against_u_offset = _mm_cmpeq_epi8(v_haystack_offset, cacheu); + const auto v_against_l_or_u_offset = _mm_or_si128(v_against_l_offset, v_against_u_offset); + const auto mask_offset = _mm_movemask_epi8(v_against_l_or_u_offset); + + if (0xffff == cachemask) + { + if (mask_offset == cachemask) + { + const auto * haystack_pos = haystack + N; + const auto * needle_pos = needle + N; + + while (haystack_pos < haystack_end && needle_pos < needle_end && + std::tolower(*haystack_pos) == std::tolower(*needle_pos)) + { + ++haystack_pos; + ++needle_pos; + } + + if (needle_pos == needle_end) + return haystack; + } + } + else if ((mask_offset & cachemask) == cachemask) + return haystack; + + ++haystack; + continue; + } + } +#endif + + if (haystack == haystack_end) + return haystack_end; + + if (*haystack == l || *haystack == u) + { + const auto * haystack_pos = haystack + 1; + const auto * needle_pos = needle + 1; + + while (haystack_pos < haystack_end && needle_pos < needle_end && + std::tolower(*haystack_pos) == std::tolower(*needle_pos)) + { + ++haystack_pos; + ++needle_pos; + } + + if (needle_pos == needle_end) + return haystack; + } + + ++haystack; + } + + return haystack_end; + } + + template + requires (sizeof(CharT) == 1) + const CharT * search(const CharT * haystack, size_t haystack_size) const + { + return search(haystack, haystack + haystack_size); + } +}; + + /// Case-insensitive UTF-8 searcher template <> class StringSearcher : public StringSearcherBase @@ -356,448 +800,6 @@ public: }; -/// Case-insensitive ASCII searcher -template <> -class StringSearcher : public StringSearcherBase -{ -private: - /// string to be searched for - const uint8_t * const needle; - const uint8_t * const needle_end; - /// lower and uppercase variants of the first character in `needle` - uint8_t l = 0; - uint8_t u = 0; - -#ifdef __SSE4_1__ - /// vectors filled with `l` and `u`, for determining leftmost position of the first symbol - __m128i patl, patu; - /// lower and uppercase vectors of first 16 characters of `needle` - __m128i cachel = _mm_setzero_si128(), cacheu = _mm_setzero_si128(); - int cachemask = 0; -#endif - -public: - template - requires (sizeof(CharT) == 1) - StringSearcher(const CharT * needle_, size_t needle_size) - : needle(reinterpret_cast(needle_)) - , needle_end(needle + needle_size) - { - if (0 == needle_size) - return; - - l = static_cast(std::tolower(*needle)); - u = static_cast(std::toupper(*needle)); - -#ifdef __SSE4_1__ - patl = _mm_set1_epi8(l); - patu = _mm_set1_epi8(u); - - const auto * needle_pos = needle; - - for (size_t i = 0; i < N; ++i) - { - cachel = _mm_srli_si128(cachel, 1); - cacheu = _mm_srli_si128(cacheu, 1); - - if (needle_pos != needle_end) - { - cachel = _mm_insert_epi8(cachel, std::tolower(*needle_pos), N - 1); - cacheu = _mm_insert_epi8(cacheu, std::toupper(*needle_pos), N - 1); - cachemask |= 1 << i; - ++needle_pos; - } - } -#endif - } - - template - requires (sizeof(CharT) == 1) - ALWAYS_INLINE bool compare(const CharT * /*haystack*/, const CharT * /*haystack_end*/, const CharT * pos) const - { -#ifdef __SSE4_1__ - if (isPageSafe(pos)) - { - const auto v_haystack = _mm_loadu_si128(reinterpret_cast(pos)); - const auto v_against_l = _mm_cmpeq_epi8(v_haystack, cachel); - const auto v_against_u = _mm_cmpeq_epi8(v_haystack, cacheu); - const auto v_against_l_or_u = _mm_or_si128(v_against_l, v_against_u); - const auto mask = _mm_movemask_epi8(v_against_l_or_u); - - if (0xffff == cachemask) - { - if (mask == cachemask) - { - pos += N; - const auto * needle_pos = needle + N; - - while (needle_pos < needle_end && std::tolower(*pos) == std::tolower(*needle_pos)) - { - ++pos; - ++needle_pos; - } - - if (needle_pos == needle_end) - return true; - } - } - else if ((mask & cachemask) == cachemask) - return true; - - return false; - } -#endif - - if (*pos == l || *pos == u) - { - ++pos; - const auto * needle_pos = needle + 1; - - while (needle_pos < needle_end && std::tolower(*pos) == std::tolower(*needle_pos)) - { - ++pos; - ++needle_pos; - } - - if (needle_pos == needle_end) - return true; - } - - return false; - } - - template - requires (sizeof(CharT) == 1) - const CharT * search(const CharT * haystack, const CharT * const haystack_end) const - { - if (needle == needle_end) - return haystack; - - while (haystack < haystack_end) - { -#ifdef __SSE4_1__ - if (haystack + N <= haystack_end && isPageSafe(haystack)) - { - const auto v_haystack = _mm_loadu_si128(reinterpret_cast(haystack)); - const auto v_against_l = _mm_cmpeq_epi8(v_haystack, patl); - const auto v_against_u = _mm_cmpeq_epi8(v_haystack, patu); - const auto v_against_l_or_u = _mm_or_si128(v_against_l, v_against_u); - - const auto mask = _mm_movemask_epi8(v_against_l_or_u); - - if (mask == 0) - { - haystack += N; - continue; - } - - const auto offset = __builtin_ctz(mask); - haystack += offset; - - if (haystack + N <= haystack_end && isPageSafe(haystack)) - { - const auto v_haystack_offset = _mm_loadu_si128(reinterpret_cast(haystack)); - const auto v_against_l_offset = _mm_cmpeq_epi8(v_haystack_offset, cachel); - const auto v_against_u_offset = _mm_cmpeq_epi8(v_haystack_offset, cacheu); - const auto v_against_l_or_u_offset = _mm_or_si128(v_against_l_offset, v_against_u_offset); - const auto mask_offset = _mm_movemask_epi8(v_against_l_or_u_offset); - - if (0xffff == cachemask) - { - if (mask_offset == cachemask) - { - const auto * haystack_pos = haystack + N; - const auto * needle_pos = needle + N; - - while (haystack_pos < haystack_end && needle_pos < needle_end && - std::tolower(*haystack_pos) == std::tolower(*needle_pos)) - { - ++haystack_pos; - ++needle_pos; - } - - if (needle_pos == needle_end) - return haystack; - } - } - else if ((mask_offset & cachemask) == cachemask) - return haystack; - - ++haystack; - continue; - } - } -#endif - - if (haystack == haystack_end) - return haystack_end; - - if (*haystack == l || *haystack == u) - { - const auto * haystack_pos = haystack + 1; - const auto * needle_pos = needle + 1; - - while (haystack_pos < haystack_end && needle_pos < needle_end && - std::tolower(*haystack_pos) == std::tolower(*needle_pos)) - { - ++haystack_pos; - ++needle_pos; - } - - if (needle_pos == needle_end) - return haystack; - } - - ++haystack; - } - - return haystack_end; - } - - template - requires (sizeof(CharT) == 1) - const CharT * search(const CharT * haystack, size_t haystack_size) const - { - return search(haystack, haystack + haystack_size); - } -}; - - -/// Case-sensitive ASCII and UTF8 searcher -template -class StringSearcher : public StringSearcherBase -{ -private: - /// string to be searched for - const uint8_t * const needle; - const uint8_t * const needle_end; - /// first character in `needle` - uint8_t first_needle_character = 0; - -#ifdef __SSE4_1__ - /// second character of "needle" (if its length is > 1) - uint8_t second_needle_character = 0; - /// first/second needle character broadcasted into a 16 bytes vector - __m128i first_needle_character_vec; - __m128i second_needle_character_vec; - /// vector of first 16 characters of `needle` - __m128i cache = _mm_setzero_si128(); - uint16_t cachemask = 0; -#endif - -public: - template - requires (sizeof(CharT) == 1) - StringSearcher(const CharT * needle_, size_t needle_size) - : needle(reinterpret_cast(needle_)) - , needle_end(needle + needle_size) - { - if (needle_size == 0) - return; - - first_needle_character = *needle; - -#ifdef __SSE4_1__ - first_needle_character_vec = _mm_set1_epi8(first_needle_character); - if (needle_size > 1) - { - second_needle_character = *(needle + 1); - second_needle_character_vec = _mm_set1_epi8(second_needle_character); - } - const auto * needle_pos = needle; - - for (uint8_t i = 0; i < N; ++i) - { - cache = _mm_srli_si128(cache, 1); - - if (needle_pos != needle_end) - { - cache = _mm_insert_epi8(cache, *needle_pos, N - 1); - cachemask |= 1 << i; - ++needle_pos; - } - } -#endif - } - - template - requires (sizeof(CharT) == 1) - ALWAYS_INLINE bool compare(const CharT * /*haystack*/, const CharT * /*haystack_end*/, const CharT * pos) const - { -#ifdef __SSE4_1__ - if (isPageSafe(pos)) - { - const __m128i haystack_characters = _mm_loadu_si128(reinterpret_cast(pos)); - const __m128i comparison_result = _mm_cmpeq_epi8(haystack_characters, cache); - const uint16_t comparison_result_mask = _mm_movemask_epi8(comparison_result); - - if (0xffff == cachemask) - { - if (comparison_result_mask == cachemask) - { - pos += N; - const auto * needle_pos = needle + N; - - while (needle_pos < needle_end && *pos == *needle_pos) - ++pos, ++needle_pos; - - if (needle_pos == needle_end) - return true; - } - } - else if ((comparison_result_mask & cachemask) == cachemask) - return true; - - return false; - } -#endif - - if (*pos == first_needle_character) - { - ++pos; - const auto * needle_pos = needle + 1; - - while (needle_pos < needle_end && *pos == *needle_pos) - ++pos, ++needle_pos; - - if (needle_pos == needle_end) - return true; - } - - return false; - } - - template - requires (sizeof(CharT) == 1) - const CharT * search(const CharT * haystack, const CharT * const haystack_end) const - { - const auto needle_size = needle_end - needle; - - if (needle == needle_end) - return haystack; - -#ifdef __SSE4_1__ - /// Fast path for single-character needles. Compare 16 characters of the haystack against the needle character at once. - if (needle_size == 1) - { - while (haystack < haystack_end) - { - if (haystack + N <= haystack_end && isPageSafe(haystack)) - { - const __m128i haystack_characters = _mm_loadu_si128(reinterpret_cast(haystack)); - const __m128i comparison_result = _mm_cmpeq_epi8(haystack_characters, first_needle_character_vec); - const uint16_t comparison_result_mask = _mm_movemask_epi8(comparison_result); - if (comparison_result_mask == 0) - { - haystack += N; - continue; - } - - const int offset = std::countr_zero(comparison_result_mask); - haystack += offset; - - return haystack; - } - - if (haystack == haystack_end) - return haystack_end; - - if (*haystack == first_needle_character) - return haystack; - - ++haystack; - } - - return haystack_end; - } -#endif - - while (haystack < haystack_end && haystack_end - haystack >= needle_size) - { -#ifdef __SSE4_1__ - /// Compare the [0:15] bytes from haystack and broadcasted 16 bytes vector from first character of needle. - /// Compare the [1:16] bytes from haystack and broadcasted 16 bytes vector from second character of needle. - /// Bit AND the results of above two comparisons and get the mask. - if ((haystack + 1 + N) <= haystack_end && isPageSafe(haystack + 1)) - { - const __m128i haystack_characters_from_1st = _mm_loadu_si128(reinterpret_cast(haystack)); - const __m128i haystack_characters_from_2nd = _mm_loadu_si128(reinterpret_cast(haystack + 1)); - const __m128i comparison_result_1st = _mm_cmpeq_epi8(haystack_characters_from_1st, first_needle_character_vec); - const __m128i comparison_result_2nd = _mm_cmpeq_epi8(haystack_characters_from_2nd, second_needle_character_vec); - const __m128i comparison_result_combined = _mm_and_si128(comparison_result_1st, comparison_result_2nd); - const uint16_t comparison_result_mask = _mm_movemask_epi8(comparison_result_combined); - /// If the mask = 0, then first two characters [0:1] from needle are not in the [0:17] bytes of haystack. - if (comparison_result_mask == 0) - { - haystack += N; - continue; - } - - const int offset = std::countr_zero(comparison_result_mask); - haystack += offset; - - if (haystack + N <= haystack_end && isPageSafe(haystack)) - { - /// Already find the haystack position where the [pos:pos + 1] two characters exactly match the first two characters of needle. - /// Compare the 16 bytes from needle (cache) and the first 16 bytes from haystack at once if the haystack size >= 16 bytes. - const __m128i haystack_characters = _mm_loadu_si128(reinterpret_cast(haystack)); - const __m128i comparison_result_cache = _mm_cmpeq_epi8(haystack_characters, cache); - const uint16_t mask_offset = _mm_movemask_epi8(comparison_result_cache); - - if (0xffff == cachemask) - { - if (mask_offset == cachemask) - { - const auto * haystack_pos = haystack + N; - const auto * needle_pos = needle + N; - - while (haystack_pos < haystack_end && needle_pos < needle_end && - *haystack_pos == *needle_pos) - ++haystack_pos, ++needle_pos; - - if (needle_pos == needle_end) - return haystack; - } - } - else if ((mask_offset & cachemask) == cachemask) - return haystack; - - ++haystack; - continue; - } - } -#endif - - if (haystack == haystack_end) - return haystack_end; - - if (*haystack == first_needle_character) - { - const auto * haystack_pos = haystack + 1; - const auto * needle_pos = needle + 1; - - while (haystack_pos < haystack_end && needle_pos < needle_end && - *haystack_pos == *needle_pos) - ++haystack_pos, ++needle_pos; - - if (needle_pos == needle_end) - return haystack; - } - - ++haystack; - } - - return haystack_end; - } - - template - requires (sizeof(CharT) == 1) - const CharT * search(const CharT * haystack, size_t haystack_size) const - { - return search(haystack, haystack + haystack_size); - } -}; - // Searches for needle surrounded by token-separators. // Separators are anything inside ASCII (0-128) and not alphanum. // Any value outside of basic ASCII (>=128) is considered a non-separator symbol, hence UTF-8 strings From 627961d9db017dac6cdc166af39fd982ca3b1a16 Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Fri, 24 Feb 2023 10:14:58 +0000 Subject: [PATCH 167/841] More cosmetics --- src/Common/StringSearcher.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Common/StringSearcher.h b/src/Common/StringSearcher.h index 15a8b3a022b..ae440f9151b 100644 --- a/src/Common/StringSearcher.h +++ b/src/Common/StringSearcher.h @@ -321,7 +321,7 @@ public: : needle(reinterpret_cast(needle_)) , needle_end(needle + needle_size) { - if (0 == needle_size) + if (needle_size == 0) return; l = static_cast(std::tolower(*needle)); @@ -536,7 +536,7 @@ public: : needle(reinterpret_cast(needle_)) , needle_size(needle_size_) { - if (0 == needle_size) + if (needle_size == 0) return; UTF8SequenceBuffer l_seq; @@ -718,7 +718,7 @@ public: requires (sizeof(CharT) == 1) const CharT * search(const CharT * haystack, const CharT * const haystack_end) const { - if (0 == needle_size) + if (needle_size == 0) return haystack; while (haystack < haystack_end) From baad4448ddd9665f639955ffc1c732482e7f108d Mon Sep 17 00:00:00 2001 From: avoiderboi Date: Fri, 24 Feb 2023 11:39:39 +0100 Subject: [PATCH 168/841] Use `WhichDataType::isNativeUInt()` --- src/Functions/widthBucket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Functions/widthBucket.cpp b/src/Functions/widthBucket.cpp index 5cf4cc6ca64..cb25ed41bc4 100644 --- a/src/Functions/widthBucket.cpp +++ b/src/Functions/widthBucket.cpp @@ -155,7 +155,7 @@ public: getName()); } } - if (!isUnsignedInteger(arguments[3]) || arguments[3]->getSizeOfValueInMemory() > 8) + if (!WhichDataType(arguments[3]).isNativeUInt()) { throw Exception( ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, From 3c61afb1ca79982e131938991fc7f23e6c6edc2c Mon Sep 17 00:00:00 2001 From: avoiderboi Date: Fri, 24 Feb 2023 12:31:05 +0100 Subject: [PATCH 169/841] Add docs and proper aliasing to `WIDTH_BUCKET` --- .../sql-reference/functions/math-functions.md | 18 ++++++--- src/Functions/widthBucket.cpp | 37 ++++++++++++++++++- 2 files changed, 48 insertions(+), 7 deletions(-) diff --git a/docs/en/sql-reference/functions/math-functions.md b/docs/en/sql-reference/functions/math-functions.md index e197e245235..10bc73c4a72 100644 --- a/docs/en/sql-reference/functions/math-functions.md +++ b/docs/en/sql-reference/functions/math-functions.md @@ -580,24 +580,32 @@ Result: └───────────────┘ ``` -## width_bucket(operand, low, high, integer) +## width_bucket(operand, low, high, count) Returns the number of the bucket in which `operand` falls in a histogram having `count` equal-width buckets spanning the range `low` to `high`. Returns `0` if `operand < low`, and returns `count+1` if `operand >= high`. `operand`, `low`, `high` can be any native number type. `count` can only be unsigned native integer and its value cannot be zero. +**Syntax** + +```sql +widthBucket(operand, low, high, count) +``` + +There is also a case insensitive alias called `WIDTH_BUCKET` to provide compatibility with other databases. + **Example** Query: ``` sql -SELECT WIDTH_BUCKET(10.15, -8.6, 23, 18); +SELECT widthBucket(10.15, -8.6, 23, 18); ``` Result: ``` text -┌─width_bucket(10.15, -8.6, 23, 18)─┐ -│ 11 │ -└───────────────────────────────────┘ +┌─widthBucket(10.15, -8.6, 23, 18)─┐ +│ 11 │ +└──────────────────────────────────┘ ``` \ No newline at end of file diff --git a/src/Functions/widthBucket.cpp b/src/Functions/widthBucket.cpp index cb25ed41bc4..1c3443e8e9a 100644 --- a/src/Functions/widthBucket.cpp +++ b/src/Functions/widthBucket.cpp @@ -132,7 +132,7 @@ class FunctionWidthBucket : public IFunction } public: - static inline const char * name = "width_bucket"; + static inline const char * name = "widthBucket"; explicit FunctionWidthBucket() = default; @@ -207,7 +207,40 @@ public: REGISTER_FUNCTION(WidthBucket) { - factory.registerFunction({}, FunctionFactory::CaseInsensitive); + factory.registerFunction({ + R"( +Returns the number of the bucket in which `operand` falls in a histogram having `count` equal-width buckets spanning the range `low` to `high`. Returns `0` if `operand < low`, and returns `count+1` if `operand >= high`. + +`operand`, `low`, `high` can be any native number type. `count` can only be unsigned native integer and its value cannot be zero. + +**Syntax** + +```sql +widthBucket(operand, low, high, count) +``` + +There is also a case insensitive alias called `WIDTH_BUCKET` to provide compatibility with other databases. + +**Example** + +Query: +[example:simple] + +Result: + +``` text +┌─widthBucket(10.15, -8.6, 23, 18)─┐ +│ 11 │ +└──────────────────────────────────┘ +``` +)", + Documentation::Examples{ + {"simple", "SELECT widthBucket(10.15, -8.6, 23, 18)"}, + }, + Documentation::Categories{"Mathematical"}, + }); + + factory.registerAlias("width_bucket", "widthBucket", FunctionFactory::CaseInsensitive); } } From 7f10ba57dfe4cdfe76ae41a9d6ebbd3e7abf74f8 Mon Sep 17 00:00:00 2001 From: avoiderboi Date: Fri, 24 Feb 2023 12:37:00 +0100 Subject: [PATCH 170/841] Tidy up tests --- .../0_stateless/25337_width_bucket.reference | 2 ++ .../queries/0_stateless/25337_width_bucket.sql | 17 +++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/tests/queries/0_stateless/25337_width_bucket.reference b/tests/queries/0_stateless/25337_width_bucket.reference index e0dce1dfbc0..c0933e2a76b 100644 --- a/tests/queries/0_stateless/25337_width_bucket.reference +++ b/tests/queries/0_stateless/25337_width_bucket.reference @@ -25,10 +25,12 @@ 4 1 11 3 1 4 1 11 3 1 ---------- +---------- UInt16 UInt32 UInt64 UInt64 +---------- 5 3 1 diff --git a/tests/queries/0_stateless/25337_width_bucket.sql b/tests/queries/0_stateless/25337_width_bucket.sql index acf63967d58..9dd130b43af 100644 --- a/tests/queries/0_stateless/25337_width_bucket.sql +++ b/tests/queries/0_stateless/25337_width_bucket.sql @@ -12,25 +12,26 @@ INSERT INTO mytable VALUES (3, -100, 200, 10), (0, 0, 10, 4), (3, 0, 10, 3), (4. SELECT operand, low, high, count, WIDTH_BUCKET(operand, low, high, count) FROM mytable WHERE count != 0; SELECT '----------'; -- zero is not valid for count -SELECT operand, low, high, count, WIDTH_BUCKET(operand, low, high, count) FROM mytable WHERE count = 0; -- { serverError 36} +SELECT operand, low, high, count, WIDTH_BUCKET(operand, low, high, count) FROM mytable WHERE count = 0; -- { serverError BAD_ARGUMENTS} -- IntXX types SELECT toInt64(operand) AS operand, toInt32(low) AS low, toInt16(high) AS high, count, WIDTH_BUCKET(operand, low, high, count) FROM mytable WHERE count != 0; SELECT '----------'; -- UIntXX types SELECT toUInt8(operand) AS operand, toUInt16(low) AS low, toUInt32(high) AS high, count, WIDTH_BUCKET(operand, low, high, count) FROM mytable WHERE count != 0; SELECT '----------'; --- Wrong argument types -SELECT WIDTH_BUCKET(1, 2, 3, -1); -- { serverError 43 } -SELECT WIDTH_BUCKET(1, 2, 3, 1.3); -- { serverError 43 } -SELECT WIDTH_BUCKET('a', 1, 2, 3); -- { serverError 43 } -SELECT WIDTH_BUCKET(1, toUInt128(42), 2, 3); -- { serverError 43 } -SELECT WIDTH_BUCKET(1, 2, toInt128(42), 3); -- { serverError 43 } -SELECT WIDTH_BUCKET(1, 2, 3, toInt256(42)); -- { serverError 43 } +SELECT WIDTH_BUCKET(1, 2, 3, -1); -- { serverError ILLEGAL_TYPE_OF_ARGUMENT } +SELECT WIDTH_BUCKET(1, 2, 3, 1.3); -- { serverError ILLEGAL_TYPE_OF_ARGUMENT } +SELECT WIDTH_BUCKET('a', 1, 2, 3); -- { serverError ILLEGAL_TYPE_OF_ARGUMENT } +SELECT WIDTH_BUCKET(1, toUInt128(42), 2, 3); -- { serverError ILLEGAL_TYPE_OF_ARGUMENT } +SELECT WIDTH_BUCKET(1, 2, toInt128(42), 3); -- { serverError ILLEGAL_TYPE_OF_ARGUMENT } +SELECT WIDTH_BUCKET(1, 2, 3, toInt256(42)); -- { serverError ILLEGAL_TYPE_OF_ARGUMENT } +SELECT '----------'; -- Return type checks SELECT toTypeName(WIDTH_BUCKET(1, 2, 3, toUInt8(1))); SELECT toTypeName(WIDTH_BUCKET(1, 2, 3, toUInt16(1))); SELECT toTypeName(WIDTH_BUCKET(1, 2, 3, toUInt32(1))); SELECT toTypeName(WIDTH_BUCKET(1, 2, 3, toUInt64(1))); +SELECT '----------'; -- Test handling ColumnConst SELECT WIDTH_BUCKET(1, low, high, count) FROM mytable WHERE count != 0; SELECT WIDTH_BUCKET(operand, 2, high, count) FROM mytable WHERE count != 0; From 16db80552645373a9a160c3d28b795f7025b3eac Mon Sep 17 00:00:00 2001 From: avoiderboi Date: Fri, 24 Feb 2023 12:45:56 +0100 Subject: [PATCH 171/841] Exlude `count` argument from check that meant to the other parameters --- src/Functions/widthBucket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Functions/widthBucket.cpp b/src/Functions/widthBucket.cpp index 1c3443e8e9a..daa76f422ee 100644 --- a/src/Functions/widthBucket.cpp +++ b/src/Functions/widthBucket.cpp @@ -144,7 +144,7 @@ public: DataTypePtr getReturnTypeImpl(const DataTypes & arguments) const override { - for (const auto argument_index : collections::range(0, arguments.size())) + for (const auto argument_index : collections::range(0, 3)) { if (!isNativeNumber(arguments[argument_index])) { From e8527e720b2ab12b3327f1e3886aace402a292c6 Mon Sep 17 00:00:00 2001 From: Han Fei Date: Fri, 24 Feb 2023 13:07:40 +0100 Subject: [PATCH 172/841] refine regexp tree dictionary --- src/Dictionaries/RegExpTreeDictionary.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Dictionaries/RegExpTreeDictionary.cpp b/src/Dictionaries/RegExpTreeDictionary.cpp index c636f200324..5775bb3790d 100644 --- a/src/Dictionaries/RegExpTreeDictionary.cpp +++ b/src/Dictionaries/RegExpTreeDictionary.cpp @@ -99,6 +99,17 @@ struct RegExpTreeDictionary::RegexTreeNode return searcher.Match(haystack, 0, size, re2_st::RE2::Anchor::UNANCHORED, nullptr, 0); } + /// check if this node can cover all the attributes from the query. + bool containsAll(const std::unordered_map & matching_attributes) const + { + for (const auto & [key, value] : matching_attributes) + { + if (!attributes.contains(key)) + return false; + } + return true; + } + struct AttributeValue { Field field; @@ -498,6 +509,8 @@ std::unordered_map RegExpTreeDictionary::match( if (node_ptr->match(reinterpret_cast(keys_data.data()) + offset, length)) { match_result.insertNodeID(node_ptr->id); + if (node_ptr->containsAll(attributes)) + break; } } From a587bcbb8db253647949b6fb657ae9ba85bcdc9b Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Fri, 24 Feb 2023 12:14:51 +0000 Subject: [PATCH 173/841] Use initial range for fetching file size --- src/IO/ReadWriteBufferFromHTTP.h | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/IO/ReadWriteBufferFromHTTP.h b/src/IO/ReadWriteBufferFromHTTP.h index 5bc72c5ff62..dd8a3376607 100644 --- a/src/IO/ReadWriteBufferFromHTTP.h +++ b/src/IO/ReadWriteBufferFromHTTP.h @@ -118,6 +118,7 @@ namespace detail bool use_external_buffer; size_t offset_from_begin_pos = 0; + const Range initial_read_range; Range read_range; std::optional file_size; @@ -145,6 +146,7 @@ namespace detail size_t getOffset() const { return getRangeBegin() + offset_from_begin_pos; } + template std::istream * callImpl(Poco::URI uri_, Poco::Net::HTTPResponse & response, const std::string & method_) { // With empty path poco will send "POST HTTP/1.1" its bug. @@ -154,6 +156,12 @@ namespace detail Poco::Net::HTTPRequest request(method_, uri_.getPathAndQuery(), Poco::Net::HTTPRequest::HTTP_1_1); request.setHost(uri_.getHost()); // use original, not resolved host name in header + Range range; + if constexpr (use_initial_range) + range = Range{initial_read_range.begin.value_or(0), initial_read_range.end}; + else + range = Range{getOffset(), read_range.end}; + if (out_stream_callback) request.setChunkedTransferEncoding(true); @@ -163,10 +171,10 @@ namespace detail if (withPartialContent()) { String range_header_value; - if (read_range.end) - range_header_value = fmt::format("bytes={}-{}", getOffset(), *read_range.end); + if (range.end) + range_header_value = fmt::format("bytes={}-{}", *range.begin, *range.end); else - range_header_value = fmt::format("bytes={}-", getOffset()); + range_header_value = fmt::format("bytes={}-", *range.begin); LOG_TEST(log, "Adding header: Range: {}", range_header_value); request.set("Range", range_header_value); } @@ -206,7 +214,7 @@ namespace detail return *file_size; Poco::Net::HTTPResponse response; - getHeadResponse(response); + getHeadResponse(response); if (response.hasContentLength()) { @@ -235,13 +243,14 @@ namespace detail InitializeError initialization_error = InitializeError::NONE; private: + template void getHeadResponse(Poco::Net::HTTPResponse & response) { for (size_t i = 0; i < settings.http_max_tries; ++i) { try { - callWithRedirects(response, Poco::Net::HTTPRequest::HTTP_HEAD); + callWithRedirects(response, Poco::Net::HTTPRequest::HTTP_HEAD); break; } catch (const Poco::Exception & e) @@ -296,6 +305,7 @@ namespace detail , remote_host_filter {remote_host_filter_} , buffer_size {buffer_size_} , use_external_buffer {use_external_buffer_} + , initial_read_range(read_range_) , read_range(read_range_) , http_skip_not_found_url(http_skip_not_found_url_) , settings {settings_} @@ -359,9 +369,10 @@ namespace detail return location_uri; } + template void callWithRedirects(Poco::Net::HTTPResponse & response, const String & method_, bool throw_on_all_errors = false) { - call(response, method_, throw_on_all_errors); + call(response, method_, throw_on_all_errors); Poco::URI prev_uri = uri; while (isRedirect(response.getStatus())) @@ -373,15 +384,16 @@ namespace detail session->updateSession(uri_redirect); - istr = callImpl(uri_redirect, response, method); + istr = callImpl(uri_redirect, response, method); } } + template void call(Poco::Net::HTTPResponse & response, const String & method_, bool throw_on_all_errors = false) { try { - istr = callImpl(saved_uri_redirect ? *saved_uri_redirect : uri, response, method_); + istr = callImpl(saved_uri_redirect ? *saved_uri_redirect : uri, response, method_); } catch (...) { From c6a30d23aaafcac0be174630bd7d37b6cabce9ff Mon Sep 17 00:00:00 2001 From: avogar Date: Fri, 24 Feb 2023 12:31:09 +0000 Subject: [PATCH 174/841] Add separate test --- .../test_kafka_bad_messages/__init__.py | 0 .../test_kafka_bad_messages/configs/kafka.xml | 20 ++ .../test_kafka_bad_messages/test.py | 285 ++++++++++++++++++ tests/integration/test_storage_kafka/test.py | 165 ---------- 4 files changed, 305 insertions(+), 165 deletions(-) create mode 100644 tests/integration/test_kafka_bad_messages/__init__.py create mode 100644 tests/integration/test_kafka_bad_messages/configs/kafka.xml create mode 100644 tests/integration/test_kafka_bad_messages/test.py diff --git a/tests/integration/test_kafka_bad_messages/__init__.py b/tests/integration/test_kafka_bad_messages/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/integration/test_kafka_bad_messages/configs/kafka.xml b/tests/integration/test_kafka_bad_messages/configs/kafka.xml new file mode 100644 index 00000000000..f05f81f59b7 --- /dev/null +++ b/tests/integration/test_kafka_bad_messages/configs/kafka.xml @@ -0,0 +1,20 @@ + + + earliest + + cgrp,consumer,topic,protocol + + + + + 300 + + 6000 + + diff --git a/tests/integration/test_kafka_bad_messages/test.py b/tests/integration/test_kafka_bad_messages/test.py new file mode 100644 index 00000000000..e04d18154d9 --- /dev/null +++ b/tests/integration/test_kafka_bad_messages/test.py @@ -0,0 +1,285 @@ +import time +import logging +import pytest + +from helpers.cluster import ClickHouseCluster +from kafka import KafkaAdminClient, KafkaProducer, KafkaConsumer, BrokerConnection +from kafka.admin import NewTopic + +cluster = ClickHouseCluster(__file__) +instance = cluster.add_instance( + "instance", + main_configs=["configs/kafka.xml"], + with_kafka=True, +) + +def kafka_create_topic( + admin_client, + topic_name, + num_partitions=1, + replication_factor=1, + max_retries=50, + config=None, +): + logging.debug( + f"Kafka create topic={topic_name}, num_partitions={num_partitions}, replication_factor={replication_factor}" + ) + topics_list = [ + NewTopic( + name=topic_name, + num_partitions=num_partitions, + replication_factor=replication_factor, + topic_configs=config, + ) + ] + retries = 0 + while True: + try: + admin_client.create_topics(new_topics=topics_list, validate_only=False) + logging.debug("Admin client succeed") + return + except Exception as e: + retries += 1 + time.sleep(0.5) + if retries < max_retries: + logging.warning(f"Failed to create topic {e}") + else: + raise + + +def kafka_delete_topic(admin_client, topic, max_retries=50): + result = admin_client.delete_topics([topic]) + for (topic, e) in result.topic_error_codes: + if e == 0: + logging.debug(f"Topic {topic} deleted") + else: + logging.error(f"Failed to delete topic {topic}: {e}") + + retries = 0 + while True: + topics_listed = admin_client.list_topics() + logging.debug(f"TOPICS LISTED: {topics_listed}") + if topic not in topics_listed: + return + else: + retries += 1 + time.sleep(0.5) + if retries > max_retries: + raise Exception(f"Failed to delete topics {topic}, {result}") + + +def get_kafka_producer(port, serializer, retries): + errors = [] + for _ in range(retries): + try: + producer = KafkaProducer( + bootstrap_servers="localhost:{}".format(port), + value_serializer=serializer, + ) + logging.debug("Kafka Connection establised: localhost:{}".format(port)) + return producer + except Exception as e: + errors += [str(e)] + time.sleep(1) + + raise Exception("Connection not establised, {}".format(errors)) + + +def producer_serializer(x): + return x.encode() if isinstance(x, str) else x + + +def kafka_produce(kafka_cluster, topic, messages, timestamp=None, retries=15): + logging.debug( + "kafka_produce server:{}:{} topic:{}".format( + "localhost", kafka_cluster.kafka_port, topic + ) + ) + producer = get_kafka_producer( + kafka_cluster.kafka_port, producer_serializer, retries + ) + for message in messages: + producer.send(topic=topic, value=message, timestamp_ms=timestamp) + producer.flush() + + +@pytest.fixture(scope="module") +def kafka_cluster(): + try: + cluster.start() + kafka_id = instance.cluster.kafka_docker_id + print(("kafka_id is {}".format(kafka_id))) + yield cluster + finally: + cluster.shutdown() + + +def test_bad_messages_parsing(kafka_cluster): + admin_client = KafkaAdminClient( + bootstrap_servers="localhost:{}".format(kafka_cluster.kafka_port) + ) + + for format_name in [ + "TSV", + "TSKV", + "CSV", + "Values", + "JSON", + "JSONEachRow", + "JSONCompactEachRow", + "JSONObjectEachRow", + "Avro", + "RowBinary", + "JSONColumns", + "JSONColumnsWithMetadata", + "Native", + "Arrow", + "ArrowStream", + "Parquet", + "ORC", + "JSONCompactColumns", + "BSONEachRow", + "MySQLDump", + ]: + + print(format_name) + + kafka_create_topic(admin_client, f"{format_name}_err") + + instance.query( + f""" + DROP TABLE IF EXISTS view; + DROP TABLE IF EXISTS kafka; + + CREATE TABLE kafka (key UInt64, value UInt64) + ENGINE = Kafka + SETTINGS kafka_broker_list = 'kafka1:19092', + kafka_topic_list = '{format_name}_err', + kafka_group_name = '{format_name}', + kafka_format = '{format_name}', + kafka_handle_error_mode='stream'; + + CREATE MATERIALIZED VIEW view Engine=Log AS + SELECT _error FROM kafka WHERE length(_error) != 0 ; + """ + ) + + messages = ["qwertyuiop", "asdfghjkl", "zxcvbnm"] + kafka_produce(kafka_cluster, f"{format_name}_err", messages) + + attempt = 0 + rows = 0 + while attempt < 500: + rows = int(instance.query("SELECT count() FROM view")) + if rows == len(messages): + break + attempt += 1 + + assert rows == len(messages) + + kafka_delete_topic(admin_client, f"{format_name}_err") + + protobuf_schema = """ +syntax = "proto3"; + +message Message { + uint64 key = 1; + uint64 value = 2; +}; +""" + + instance.create_format_schema("schema_test_errors.proto", protobuf_schema) + + for format_name in ["Protobuf", "ProtobufSingle", "ProtobufList"]: + instance.query( + f""" + DROP TABLE IF EXISTS view; + DROP TABLE IF EXISTS kafka; + + CREATE TABLE kafka (key UInt64, value UInt64) + ENGINE = Kafka + SETTINGS kafka_broker_list = 'kafka1:19092', + kafka_topic_list = '{format_name}_err', + kafka_group_name = '{format_name}', + kafka_format = '{format_name}', + kafka_handle_error_mode='stream', + kafka_schema='schema_test_errors:Message'; + + CREATE MATERIALIZED VIEW view Engine=Log AS + SELECT _error FROM kafka WHERE length(_error) != 0 ; + """ + ) + + print(format_name) + + kafka_create_topic(admin_client, f"{format_name}_err") + + messages = ["qwertyuiop", "poiuytrewq", "zxcvbnm"] + kafka_produce(kafka_cluster, f"{format_name}_err", messages) + + attempt = 0 + rows = 0 + while attempt < 500: + rows = int(instance.query("SELECT count() FROM view")) + if rows == len(messages): + break + attempt += 1 + + assert rows == len(messages) + + kafka_delete_topic(admin_client, f"{format_name}_err") + + capn_proto_schema = """ +@0xd9dd7b35452d1c4f; + +struct Message +{ + key @0 : UInt64; + value @1 : UInt64; +} +""" + + instance.create_format_schema("schema_test_errors.capnp", capn_proto_schema) + instance.query( + f""" + DROP TABLE IF EXISTS view; + DROP TABLE IF EXISTS kafka; + + CREATE TABLE kafka (key UInt64, value UInt64) + ENGINE = Kafka + SETTINGS kafka_broker_list = 'kafka1:19092', + kafka_topic_list = 'CapnProto_err', + kafka_group_name = 'CapnProto', + kafka_format = 'CapnProto', + kafka_handle_error_mode='stream', + kafka_schema='schema_test_errors:Message'; + + CREATE MATERIALIZED VIEW view Engine=Log AS + SELECT _error FROM kafka WHERE length(_error) != 0 ; + """ + ) + + print("CapnProto") + + kafka_create_topic(admin_client, "CapnProto_err") + + messages = ["qwertyuiop", "asdfghjkl", "zxcvbnm"] + kafka_produce(kafka_cluster, "CapnProto_err", messages) + + attempt = 0 + rows = 0 + while attempt < 500: + rows = int(instance.query("SELECT count() FROM view")) + if rows == len(messages): + break + attempt += 1 + + assert rows == len(messages) + + kafka_delete_topic(admin_client, "CapnProto_err") + + +if __name__ == "__main__": + cluster.start() + input("Cluster created, press any key to destroy...") + cluster.shutdown() diff --git a/tests/integration/test_storage_kafka/test.py b/tests/integration/test_storage_kafka/test.py index 51871eae3d8..9f617369859 100644 --- a/tests/integration/test_storage_kafka/test.py +++ b/tests/integration/test_storage_kafka/test.py @@ -4440,171 +4440,6 @@ def test_block_based_formats_2(kafka_cluster): kafka_delete_topic(admin_client, format_name) -def test_bad_messages_parsing(kafka_cluster): - admin_client = KafkaAdminClient( - bootstrap_servers="localhost:{}".format(kafka_cluster.kafka_port) - ) - - for format_name in [ - "TSV", - "TSKV", - "CSV", - "Values", - "JSON", - "JSONEachRow", - "JSONCompactEachRow", - "JSONObjectEachRow", - "Avro", - "RowBinary", - "JSONColumns", - "JSONColumnsWithMetadata", - "Native", - "Arrow", - "ArrowStream", - "Parquet", - "ORC", - "JSONCompactColumns", - "BSONEachRow", - "MySQLDump", - ]: - - print(format_name) - - kafka_create_topic(admin_client, f"{format_name}_err") - - instance.query( - f""" - DROP TABLE IF EXISTS test.view; - DROP TABLE IF EXISTS test.kafka; - - CREATE TABLE test.kafka (key UInt64, value UInt64) - ENGINE = Kafka - SETTINGS kafka_broker_list = 'kafka1:19092', - kafka_topic_list = '{format_name}_err', - kafka_group_name = '{format_name}', - kafka_format = '{format_name}', - kafka_handle_error_mode='stream'; - - CREATE MATERIALIZED VIEW test.view Engine=Log AS - SELECT _error FROM test.kafka WHERE length(_error) != 0 ; - """ - ) - - messages = ["qwertyuiop", "asdfghjkl", "zxcvbnm"] - kafka_produce(kafka_cluster, f"{format_name}_err", messages) - - attempt = 0 - rows = 0 - while attempt < 500: - rows = int(instance.query("SELECT count() FROM test.view")) - if rows == len(messages): - break - attempt += 1 - - assert rows == len(messages) - - kafka_delete_topic(admin_client, f"{format_name}_err") - - protobuf_schema = """ -syntax = "proto3"; - -message Message { - uint64 key = 1; - uint64 value = 2; -}; -""" - - instance.create_format_schema("schema_test_errors.proto", protobuf_schema) - - for format_name in ["Protobuf", "ProtobufSingle", "ProtobufList"]: - instance.query( - f""" - DROP TABLE IF EXISTS test.view; - DROP TABLE IF EXISTS test.kafka; - - CREATE TABLE test.kafka (key UInt64, value UInt64) - ENGINE = Kafka - SETTINGS kafka_broker_list = 'kafka1:19092', - kafka_topic_list = '{format_name}_err', - kafka_group_name = '{format_name}', - kafka_format = '{format_name}', - kafka_handle_error_mode='stream', - kafka_schema='schema_test_errors:Message'; - - CREATE MATERIALIZED VIEW test.view Engine=Log AS - SELECT _error FROM test.kafka WHERE length(_error) != 0 ; - """ - ) - - print(format_name) - - kafka_create_topic(admin_client, f"{format_name}_err") - - messages = ["qwertyuiop", "poiuytrewq", "zxcvbnm"] - kafka_produce(kafka_cluster, f"{format_name}_err", messages) - - attempt = 0 - rows = 0 - while attempt < 500: - rows = int(instance.query("SELECT count() FROM test.view")) - if rows == len(messages): - break - attempt += 1 - - assert rows == len(messages) - - kafka_delete_topic(admin_client, f"{format_name}_err") - - capn_proto_schema = """ -@0xd9dd7b35452d1c4f; - -struct Message -{ - key @0 : UInt64; - value @1 : UInt64; -} -""" - - instance.create_format_schema("schema_test_errors.capnp", capn_proto_schema) - instance.query( - f""" - DROP TABLE IF EXISTS test.view; - DROP TABLE IF EXISTS test.kafka; - - CREATE TABLE test.kafka (key UInt64, value UInt64) - ENGINE = Kafka - SETTINGS kafka_broker_list = 'kafka1:19092', - kafka_topic_list = 'CapnProto_err', - kafka_group_name = 'CapnProto', - kafka_format = 'CapnProto', - kafka_handle_error_mode='stream', - kafka_schema='schema_test_errors:Message'; - - CREATE MATERIALIZED VIEW test.view Engine=Log AS - SELECT _error FROM test.kafka WHERE length(_error) != 0 ; - """ - ) - - print("CapnProto") - - kafka_create_topic(admin_client, "CapnProto_err") - - messages = ["qwertyuiop", "asdfghjkl", "zxcvbnm"] - kafka_produce(kafka_cluster, "CapnProto_err", messages) - - attempt = 0 - rows = 0 - while attempt < 500: - rows = int(instance.query("SELECT count() FROM test.view")) - if rows == len(messages): - break - attempt += 1 - - assert rows == len(messages) - - kafka_delete_topic(admin_client, "CapnProto_err") - - if __name__ == "__main__": cluster.start() input("Cluster created, press any key to destroy...") From c66d5bc687aa070ea9dcb6c497040754b601d78e Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Fri, 24 Feb 2023 12:51:36 +0000 Subject: [PATCH 175/841] better --- src/IO/ReadWriteBufferFromHTTP.h | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/src/IO/ReadWriteBufferFromHTTP.h b/src/IO/ReadWriteBufferFromHTTP.h index dd8a3376607..e4c48fab741 100644 --- a/src/IO/ReadWriteBufferFromHTTP.h +++ b/src/IO/ReadWriteBufferFromHTTP.h @@ -133,13 +133,13 @@ namespace detail ReadSettings settings; Poco::Logger * log; - bool withPartialContent() const + bool withPartialContent(const Range & range) const { /** * Add range header if we have some passed range (for disk web) * or if we want to retry GET request on purpose. */ - return read_range.begin || read_range.end || retry_with_range_header; + return range.begin || range.end || retry_with_range_header; } size_t getRangeBegin() const { return read_range.begin.value_or(0); } @@ -156,11 +156,6 @@ namespace detail Poco::Net::HTTPRequest request(method_, uri_.getPathAndQuery(), Poco::Net::HTTPRequest::HTTP_1_1); request.setHost(uri_.getHost()); // use original, not resolved host name in header - Range range; - if constexpr (use_initial_range) - range = Range{initial_read_range.begin.value_or(0), initial_read_range.end}; - else - range = Range{getOffset(), read_range.end}; if (out_stream_callback) request.setChunkedTransferEncoding(true); @@ -168,13 +163,25 @@ namespace detail for (auto & [header, value] : http_header_entries) request.set(header, value); - if (withPartialContent()) + std::optional range; + if constexpr (use_initial_range) + { + if (withPartialContent(initial_read_range)) + range = initial_read_range; + } + else + { + if (withPartialContent(read_range)) + range = Range{getOffset(), read_range.end}; + } + + if (range) { String range_header_value; - if (range.end) - range_header_value = fmt::format("bytes={}-{}", *range.begin, *range.end); + if (range->end) + range_header_value = fmt::format("bytes={}-{}", *range->begin, *range->end); else - range_header_value = fmt::format("bytes={}-", *range.begin); + range_header_value = fmt::format("bytes={}-", *range->begin); LOG_TEST(log, "Adding header: Range: {}", range_header_value); request.set("Range", range_header_value); } @@ -448,7 +455,7 @@ namespace detail if (response.hasContentLength()) LOG_DEBUG(log, "Received response with content length: {}", response.getContentLength()); - if (withPartialContent() && response.getStatus() != Poco::Net::HTTPResponse::HTTPStatus::HTTP_PARTIAL_CONTENT) + if (withPartialContent(read_range) && response.getStatus() != Poco::Net::HTTPResponse::HTTPStatus::HTTP_PARTIAL_CONTENT) { /// Having `200 OK` instead of `206 Partial Content` is acceptable in case we retried with range.begin == 0. if (read_range.begin && *read_range.begin != 0) From 12b38ece1d6924e0e7718eb57be41c2e83931cea Mon Sep 17 00:00:00 2001 From: avogar Date: Fri, 24 Feb 2023 13:07:09 +0000 Subject: [PATCH 176/841] Fix build --- src/Processors/Formats/Impl/AvroRowInputFormat.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Processors/Formats/Impl/AvroRowInputFormat.cpp b/src/Processors/Formats/Impl/AvroRowInputFormat.cpp index 1427e6098ed..cb851c4a1e9 100644 --- a/src/Processors/Formats/Impl/AvroRowInputFormat.cpp +++ b/src/Processors/Formats/Impl/AvroRowInputFormat.cpp @@ -433,6 +433,7 @@ AvroDeserializer::DeserializeFn AvroDeserializer::createDeserializeFn(avro::Node { decoder.decodeFixed(tmp_fixed.size(), tmp_fixed); column.insertData(reinterpret_cast(tmp_fixed.data()), tmp_fixed.size()); + return true; }; } break; From f64c5fb3fac2f9e0dc99bc24f06686b600089365 Mon Sep 17 00:00:00 2001 From: Yakov Olkhovskiy Date: Fri, 24 Feb 2023 14:19:36 +0000 Subject: [PATCH 177/841] revert Planner.cpp --- src/Planner/Planner.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Planner/Planner.cpp b/src/Planner/Planner.cpp index c64dfd20f62..f0fe44e368f 100644 --- a/src/Planner/Planner.cpp +++ b/src/Planner/Planner.cpp @@ -720,7 +720,7 @@ bool addPreliminaryLimitOptimizationStepIfNeeded(QueryPlan & query_plan, bool apply_limit = query_processing_info.getToStage() != QueryProcessingStage::WithMergeableStateAfterAggregation; bool apply_prelimit = apply_limit && - query_analysis_result.limit_length && + query_node.hasLimit() && !query_node.isLimitWithTies() && !query_node.isGroupByWithTotals() && !query_analysis_result.query_has_with_totals_in_any_subquery_in_join_tree && @@ -767,7 +767,7 @@ void addPreliminarySortOrDistinctOrLimitStepsIfNeeded(QueryPlan & query_plan, * Otherwise we can take several equal values from different streams * according to limit and skip some distinct values. */ - if (query_analysis_result.limit_length && query_node.isDistinct()) + if (query_node.hasLimit() && query_node.isDistinct()) { addDistinctStep(query_plan, query_analysis_result, @@ -785,7 +785,7 @@ void addPreliminarySortOrDistinctOrLimitStepsIfNeeded(QueryPlan & query_plan, addLimitByStep(query_plan, limit_by_analysis_result, query_node); } - if (query_analysis_result.limit_length) + if (query_node.hasLimit()) addPreliminaryLimitStep(query_plan, query_analysis_result, planner_context, true /*do_not_skip_offset*/); } @@ -1420,7 +1420,7 @@ void Planner::buildPlanForQueryNode() bool apply_offset = query_processing_info.getToStage() != QueryProcessingStage::WithMergeableStateAfterAggregationAndLimit; - if (query_analysis_result.limit_length && query_node.isLimitWithTies() && apply_offset) + if (query_node.hasLimit() && query_node.isLimitWithTies() && apply_offset) addLimitStep(query_plan, query_analysis_result, planner_context, query_node); addExtremesStepIfNeeded(query_plan, planner_context); @@ -1434,9 +1434,9 @@ void Planner::buildPlanForQueryNode() * This is the case for various optimizations for distributed queries, * and when LIMIT cannot be applied it will be applied on the initiator anyway. */ - if (query_analysis_result.limit_length && apply_limit && !limit_applied && apply_offset) + if (query_node.hasLimit() && apply_limit && !limit_applied && apply_offset) addLimitStep(query_plan, query_analysis_result, planner_context, query_node); - else if (!limit_applied && apply_offset && query_analysis_result.limit_offset) + else if (!limit_applied && apply_offset && query_node.hasOffset()) addOffsetStep(query_plan, query_analysis_result); /// Project names is not done on shards, because initiator will not find columns in blocks From 56a126f7af24f59c189f80b9616a9498b5062c18 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Fri, 24 Feb 2023 14:49:14 +0000 Subject: [PATCH 178/841] Fix progress bar with URL --- src/Storages/StorageURL.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Storages/StorageURL.cpp b/src/Storages/StorageURL.cpp index 152dda8f360..76817534da2 100644 --- a/src/Storages/StorageURL.cpp +++ b/src/Storages/StorageURL.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include @@ -17,6 +18,7 @@ #include #include #include +#include #include #include @@ -217,6 +219,8 @@ namespace uri_options.size() == 1, download_threads); + total_size += getFileSizeFromReadBuffer(*read_buf); + auto input_format = FormatFactory::instance().getInput(format, *read_buf, sample_block, context, max_block_size, format_settings); QueryPipelineBuilder builder; @@ -257,7 +261,14 @@ namespace Chunk chunk; if (reader->pull(chunk)) + { + UInt64 num_rows = chunk.getNumRows(); + if (num_rows && total_size) + updateRowsProgressApprox( + *this, chunk, total_size, total_rows_approx_accumulated, total_rows_count_times, total_rows_approx_max); + return chunk; + } pipeline->reset(); reader.reset(); @@ -447,6 +458,11 @@ namespace std::unique_ptr reader; Poco::Net::HTTPBasicCredentials credentials; + + size_t total_size = 0; + UInt64 total_rows_approx_max = 0; + size_t total_rows_count_times = 0; + UInt64 total_rows_approx_accumulated = 0; }; } From 06cc14420f1f283706a0743720b7ca123aae52b0 Mon Sep 17 00:00:00 2001 From: pufit Date: Fri, 24 Feb 2023 10:12:43 -0500 Subject: [PATCH 179/841] Update 01221_system_settings.reference --- tests/queries/0_stateless/01221_system_settings.reference | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/queries/0_stateless/01221_system_settings.reference b/tests/queries/0_stateless/01221_system_settings.reference index e36b836c807..2e06fdcb4fd 100644 --- a/tests/queries/0_stateless/01221_system_settings.reference +++ b/tests/queries/0_stateless/01221_system_settings.reference @@ -1,4 +1,4 @@ send_timeout 300 0 Timeout for sending data to network, in seconds. If client needs to sent some data, but it did not able to send any bytes in this interval, exception is thrown. If you set this setting on client, the \'receive_timeout\' for the socket will be also set on the corresponding connection end on the server. \N \N 0 Seconds 300 -storage_policy default 0 Name of storage disk policy \N \N 0 String +storage_policy default 0 Name of storage disk policy \N \N 0 String 1 1 From 61b859eeaaae889893df619d2520057c6dc81830 Mon Sep 17 00:00:00 2001 From: pufit Date: Fri, 24 Feb 2023 10:18:06 -0500 Subject: [PATCH 180/841] Update server_settings.md --- docs/en/operations/system-tables/server_settings.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/operations/system-tables/server_settings.md b/docs/en/operations/system-tables/server_settings.md index 67ca856f06b..293c670750b 100644 --- a/docs/en/operations/system-tables/server_settings.md +++ b/docs/en/operations/system-tables/server_settings.md @@ -27,7 +27,7 @@ WHERE name LIKE '%thread_pool%' ``` text ┌─name─────────────────────────┬─value─┬─default─┬─changed─┬─description───────────────────────────┬─type───┐ -│ max_thread_pool_size │ 10000 │ 10000 │ 0 │ Max size for global thread pool. │ UInt64 │ +│ max_thread_pool_size │ 5000 │ 10000 │ 1 │ Max size for global thread pool. │ UInt64 │ │ max_thread_pool_free_size │ 1000 │ 1000 │ 0 │ Max free size for global thread pool. │ UInt64 │ │ thread_pool_queue_size │ 10000 │ 10000 │ 0 │ Queue size for global thread pool. │ UInt64 │ │ max_io_thread_pool_size │ 100 │ 100 │ 0 │ Max size for IO thread pool. │ UInt64 │ From efa0ddedfd4bf8521d634803ff738f55200f00de Mon Sep 17 00:00:00 2001 From: pufit Date: Fri, 24 Feb 2023 10:18:26 -0500 Subject: [PATCH 181/841] Update server_settings.md --- docs/ru/operations/system-tables/server_settings.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ru/operations/system-tables/server_settings.md b/docs/ru/operations/system-tables/server_settings.md index 35da3f4fe6a..bd19dbd3862 100644 --- a/docs/ru/operations/system-tables/server_settings.md +++ b/docs/ru/operations/system-tables/server_settings.md @@ -28,7 +28,7 @@ WHERE name LIKE '%thread_pool%' ``` text ┌─name─────────────────────────┬─value─┬─default─┬─changed─┬─description───────────────────────────┬─type───┐ -│ max_thread_pool_size │ 10000 │ 10000 │ 0 │ Max size for global thread pool. │ UInt64 │ +│ max_thread_pool_size │ 5000 │ 10000 │ 1 │ Max size for global thread pool. │ UInt64 │ │ max_thread_pool_free_size │ 1000 │ 1000 │ 0 │ Max free size for global thread pool. │ UInt64 │ │ thread_pool_queue_size │ 10000 │ 10000 │ 0 │ Queue size for global thread pool. │ UInt64 │ │ max_io_thread_pool_size │ 100 │ 100 │ 0 │ Max size for IO thread pool. │ UInt64 │ From 8c6cf28c01ea2428bad31de0efd7e26c0b99e767 Mon Sep 17 00:00:00 2001 From: avogar Date: Fri, 24 Feb 2023 16:43:28 +0000 Subject: [PATCH 182/841] Make better --- docker/test/stress/run.sh | 309 +------------------ docker/test/upgrade/run.sh | 602 +++++++++---------------------------- tests/ci/stress_tests.lib | 305 +++++++++++++++++++ 3 files changed, 463 insertions(+), 753 deletions(-) create mode 100644 tests/ci/stress_tests.lib diff --git a/docker/test/stress/run.sh b/docker/test/stress/run.sh index 86c0bd15979..15f58d6c3a3 100644 --- a/docker/test/stress/run.sh +++ b/docker/test/stress/run.sh @@ -8,230 +8,13 @@ dmesg --clear set -x -# core.COMM.PID-TID -sysctl kernel.core_pattern='core.%e.%p-%P' +# we mount tests folder from repo to /usr/share +ln -s /usr/share/clickhouse-test/ci/stress.py /usr/bin/stress +ln -s /usr/share/clickhouse-test/clickhouse-test /usr/bin/clickhouse-test -OK="\tOK\t\\N\t" -FAIL="\tFAIL\t\\N\t" - -FAILURE_CONTEXT_LINES=50 -FAILURE_CONTEXT_MAX_LINE_WIDTH=400 - -function escaped() -{ - # That's the simplest way I found to escape a string in bash. Yep, bash is the most convenient programming language. - # Also limit lines width just in case (too long lines are not really useful usually) - clickhouse local -S 's String' --input-format=LineAsString -q "select substr(s, 1, $FAILURE_CONTEXT_MAX_LINE_WIDTH) - from table format CustomSeparated settings format_custom_row_after_delimiter='\\\\\\\\n'" -} -function head_escaped() -{ - head -n $FAILURE_CONTEXT_LINES $1 | escaped -} -function unts() -{ - grep -Po "[0-9][0-9]:[0-9][0-9] \K.*" -} -function trim_server_logs() -{ - head -n $FAILURE_CONTEXT_LINES "/test_output/$1" | grep -Eo " \[ [0-9]+ \] \{.*" | escaped -} - -function install_packages() -{ - dpkg -i $1/clickhouse-common-static_*.deb - dpkg -i $1/clickhouse-common-static-dbg_*.deb - dpkg -i $1/clickhouse-server_*.deb - dpkg -i $1/clickhouse-client_*.deb -} - -function configure() -{ - # install test configs - export USE_DATABASE_ORDINARY=1 - export EXPORT_S3_STORAGE_POLICIES=1 - /usr/share/clickhouse-test/config/install.sh - - # we mount tests folder from repo to /usr/share - ln -s /usr/share/clickhouse-test/ci/stress.py /usr/bin/stress - ln -s /usr/share/clickhouse-test/clickhouse-test /usr/bin/clickhouse-test - ln -s /usr/share/clickhouse-test/ci/download_release_packages.py /usr/bin/download_release_packages - ln -s /usr/share/clickhouse-test/ci/get_previous_release_tag.py /usr/bin/get_previous_release_tag - - # avoid too slow startup - sudo cat /etc/clickhouse-server/config.d/keeper_port.xml \ - | sed "s|100000|10000|" \ - > /etc/clickhouse-server/config.d/keeper_port.xml.tmp - sudo mv /etc/clickhouse-server/config.d/keeper_port.xml.tmp /etc/clickhouse-server/config.d/keeper_port.xml - sudo chown clickhouse /etc/clickhouse-server/config.d/keeper_port.xml - sudo chgrp clickhouse /etc/clickhouse-server/config.d/keeper_port.xml - - # for clickhouse-server (via service) - echo "ASAN_OPTIONS='malloc_context_size=10 verbosity=1 allocator_release_to_os_interval_ms=10000'" >> /etc/environment - # for clickhouse-client - export ASAN_OPTIONS='malloc_context_size=10 allocator_release_to_os_interval_ms=10000' - - # since we run clickhouse from root - sudo chown root: /var/lib/clickhouse - - # Set more frequent update period of asynchronous metrics to more frequently update information about real memory usage (less chance of OOM). - echo "1" \ - > /etc/clickhouse-server/config.d/asynchronous_metrics_update_period_s.xml - - local total_mem - total_mem=$(awk '/MemTotal/ { print $(NF-1) }' /proc/meminfo) # KiB - total_mem=$(( total_mem*1024 )) # bytes - - # Set maximum memory usage as half of total memory (less chance of OOM). - # - # But not via max_server_memory_usage but via max_memory_usage_for_user, - # so that we can override this setting and execute service queries, like: - # - hung check - # - show/drop database - # - ... - # - # So max_memory_usage_for_user will be a soft limit, and - # max_server_memory_usage will be hard limit, and queries that should be - # executed regardless memory limits will use max_memory_usage_for_user=0, - # instead of relying on max_untracked_memory - - max_server_memory_usage_to_ram_ratio=0.5 - echo "Setting max_server_memory_usage_to_ram_ratio to ${max_server_memory_usage_to_ram_ratio}" - cat > /etc/clickhouse-server/config.d/max_server_memory_usage.xml < - ${max_server_memory_usage_to_ram_ratio} - -EOL - - local max_users_mem - max_users_mem=$((total_mem*30/100)) # 30% - echo "Setting max_memory_usage_for_user=$max_users_mem and max_memory_usage for queries to 10G" - cat > /etc/clickhouse-server/users.d/max_memory_usage_for_user.xml < - - - 10G - ${max_users_mem} - - - -EOL - - cat > /etc/clickhouse-server/config.d/core.xml < - - - 107374182400 - - - $PWD - -EOL - - # Let OOM killer terminate other processes before clickhouse-server: - cat > /etc/clickhouse-server/config.d/oom_score.xml < - -1000 - -EOL - - # Analyzer is not yet ready for testing - cat > /etc/clickhouse-server/users.d/no_analyzer.xml < - - - - - - - - - - -EOL - -} - -function stop() -{ - local max_tries="${1:-90}" - local pid - # Preserve the pid, since the server can hung after the PID will be deleted. - pid="$(cat /var/run/clickhouse-server/clickhouse-server.pid)" - - clickhouse stop --max-tries "$max_tries" --do-not-kill && return - - # We failed to stop the server with SIGTERM. Maybe it hang, let's collect stacktraces. - echo -e "Possible deadlock on shutdown (see gdb.log)$FAIL" >> /test_output/test_results.tsv - kill -TERM "$(pidof gdb)" ||: - sleep 5 - echo "thread apply all backtrace (on stop)" >> /test_output/gdb.log - timeout 30m gdb -batch -ex 'thread apply all backtrace' -p "$pid" | ts '%Y-%m-%d %H:%M:%S' >> /test_output/gdb.log - clickhouse stop --force -} - -function start() -{ - counter=0 - until clickhouse-client --query "SELECT 1" - do - if [ "$counter" -gt ${1:-120} ] - then - echo "Cannot start clickhouse-server" - rg --text ".*Application" /var/log/clickhouse-server/clickhouse-server.log > /test_output/application_errors.txt ||: - echo -e "Cannot start clickhouse-server$FAIL$(trim_server_logs application_errors.txt)" >> /test_output/test_results.tsv - cat /var/log/clickhouse-server/stdout.log - tail -n100 /var/log/clickhouse-server/stderr.log - tail -n100000 /var/log/clickhouse-server/clickhouse-server.log | rg -F -v -e ' RaftInstance:' -e ' RaftInstance' | tail -n100 - break - fi - # use root to match with current uid - clickhouse start --user root >/var/log/clickhouse-server/stdout.log 2>>/var/log/clickhouse-server/stderr.log - sleep 0.5 - counter=$((counter + 1)) - done - - # Set follow-fork-mode to parent, because we attach to clickhouse-server, not to watchdog - # and clickhouse-server can do fork-exec, for example, to run some bridge. - # Do not set nostop noprint for all signals, because some it may cause gdb to hang, - # explicitly ignore non-fatal signals that are used by server. - # Number of SIGRTMIN can be determined only in runtime. - RTMIN=$(kill -l SIGRTMIN) - echo " -set follow-fork-mode parent -handle SIGHUP nostop noprint pass -handle SIGINT nostop noprint pass -handle SIGQUIT nostop noprint pass -handle SIGPIPE nostop noprint pass -handle SIGTERM nostop noprint pass -handle SIGUSR1 nostop noprint pass -handle SIGUSR2 nostop noprint pass -handle SIG$RTMIN nostop noprint pass -info signals -continue -backtrace full -thread apply all backtrace full -info registers -disassemble /s -up -disassemble /s -up -disassemble /s -p \"done\" -detach -quit -" > script.gdb - - # FIXME Hung check may work incorrectly because of attached gdb - # 1. False positives are possible - # 2. We cannot attach another gdb to get stacktraces if some queries hung - gdb -batch -command script.gdb -p "$(cat /var/run/clickhouse-server/clickhouse-server.pid)" | ts '%Y-%m-%d %H:%M:%S' >> /test_output/gdb.log & - sleep 5 - # gdb will send SIGSTOP, spend some time loading debug info and then send SIGCONT, wait for it (up to send_timeout, 300s) - time clickhouse-client --query "SELECT 'Connected to clickhouse-server after attaching gdb'" ||: -} +# Stress tests and upgrade check uses similar code that was placed +# in a separate bash library. See tests/ci/stress_tests.lib +source /usr/share/clickhouse-test/ci/stress_tests.lib install_packages package_folder @@ -414,13 +197,7 @@ unset "${!THREAD_@}" start -clickhouse-client --query "SELECT 'Server successfully started', 'OK', NULL, ''" >> /test_output/test_results.tsv \ - || (rg --text ".*Application" /var/log/clickhouse-server/clickhouse-server.log > /test_output/application_errors.txt \ - && echo -e "Server failed to start (see application_errors.txt and clickhouse-server.clean.log)$FAIL$(trim_server_logs application_errors.txt)" \ - >> /test_output/test_results.tsv) - -# Remove file application_errors.txt if it's empty -[ -s /test_output/application_errors.txt ] || rm /test_output/application_errors.txt +check_server_start stop @@ -430,71 +207,11 @@ stop mv /var/log/clickhouse-server/clickhouse-server.log /var/log/clickhouse-server/clickhouse-server.final.log # Grep logs for sanitizer asserts, crashes and other critical errors +check_logs_for_critical_errors -# Sanitizer asserts -rg -Fa "==================" /var/log/clickhouse-server/stderr.log | rg -v "in query:" >> /test_output/tmp -rg -Fa "WARNING" /var/log/clickhouse-server/stderr.log >> /test_output/tmp -rg -Fav -e "ASan doesn't fully support makecontext/swapcontext functions" -e "DB::Exception" /test_output/tmp > /dev/null \ - && echo -e "Sanitizer assert (in stderr.log)$FAIL$(head_escaped /test_output/tmp)" >> /test_output/test_results.tsv \ - || echo -e "No sanitizer asserts$OK" >> /test_output/test_results.tsv -rm -f /test_output/tmp +tar -chf /test_output/coordination.tar /var/lib/clickhouse/coordination ||: -# OOM -rg -Fa " Application: Child process was terminated by signal 9" /var/log/clickhouse-server/clickhouse-server*.log > /dev/null \ - && echo -e "Signal 9 in clickhouse-server.log$FAIL" >> /test_output/test_results.tsv \ - || echo -e "No OOM messages in clickhouse-server.log$OK" >> /test_output/test_results.tsv - -# Logical errors -rg -Fa "Code: 49. DB::Exception: " /var/log/clickhouse-server/clickhouse-server*.log > /test_output/logical_errors.txt \ - && echo -e "Logical error thrown (see clickhouse-server.log or logical_errors.txt)$FAIL$(head_escaped /test_output/logical_errors.txt)" >> /test_output/test_results.tsv \ - || echo -e "No logical errors$OK" >> /test_output/test_results.tsv - -# Remove file logical_errors.txt if it's empty -[ -s /test_output/logical_errors.txt ] || rm /test_output/logical_errors.txt - -# No such key errors -rg --text "Code: 499.*The specified key does not exist" /var/log/clickhouse-server/clickhouse-server*.log > /test_output/no_such_key_errors.txt \ - && echo -e "S3_ERROR No such key thrown (see clickhouse-server.log or no_such_key_errors.txt)$FAIL$(trim_server_logs no_such_key_errors.txt)" >> /test_output/test_results.tsv \ - || echo -e "No lost s3 keys$OK" >> /test_output/test_results.tsv - -# Remove file no_such_key_errors.txt if it's empty -[ -s /test_output/no_such_key_errors.txt ] || rm /test_output/no_such_key_errors.txt - -# Crash -rg -Fa "########################################" /var/log/clickhouse-server/clickhouse-server*.log > /dev/null \ - && echo -e "Killed by signal (in clickhouse-server.log)$FAIL" >> /test_output/test_results.tsv \ - || echo -e "Not crashed$OK" >> /test_output/test_results.tsv - -# It also checks for crash without stacktrace (printed by watchdog) -rg -Fa " " /var/log/clickhouse-server/clickhouse-server*.log > /test_output/fatal_messages.txt \ - && echo -e "Fatal message in clickhouse-server.log (see fatal_messages.txt)$FAIL$(trim_server_logs fatal_messages.txt)" >> /test_output/test_results.tsv \ - || echo -e "No fatal messages in clickhouse-server.log$OK" >> /test_output/test_results.tsv - -# Remove file fatal_messages.txt if it's empty -[ -s /test_output/fatal_messages.txt ] || rm /test_output/fatal_messages.txt - -rg -Fa "########################################" /test_output/* > /dev/null \ - && echo -e "Killed by signal (output files)$FAIL" >> /test_output/test_results.tsv - -function get_gdb_log_context() -{ - rg -A50 -Fa " received signal " /test_output/gdb.log | head_escaped -} - -rg -Fa " received signal " /test_output/gdb.log > /dev/null \ - && echo -e "Found signal in gdb.log$FAIL$(get_gdb_log_context)" >> /test_output/test_results.tsv - -for table in query_log trace_log -do - clickhouse-local --path /var/lib/clickhouse/ --only-system-tables -q "select * from system.$table format TSVWithNamesAndTypes" | zstd --threads=0 > /test_output/$table.tsv.zst ||: -done - -dmesg -T > /test_output/dmesg.log - -# OOM in dmesg -- those are real -grep -q -F -e 'Out of memory: Killed process' -e 'oom_reaper: reaped process' -e 'oom-kill:constraint=CONSTRAINT_NONE' /test_output/dmesg.log \ - && echo -e "OOM in dmesg$FAIL$(head_escaped /test_output/dmesg.log)" >> /test_output/test_results.tsv \ - || echo -e "No OOM in dmesg$OK" >> /test_output/test_results.tsv +collect_query_and_trace_logs mv /var/log/clickhouse-server/stderr.log /test_output/ @@ -514,8 +231,4 @@ rowNumberInAllBlocks() LIMIT 1" < /test_output/test_results.tsv > /test_output/check_status.tsv || echo "failure\tCannot parse test_results.tsv" > /test_output/check_status.tsv [ -s /test_output/check_status.tsv ] || echo -e "success\tNo errors found" > /test_output/check_status.tsv -# Core dumps -find . -type f -maxdepth 1 -name 'core.*' | while read core; do - zstd --threads=0 $core - mv $core.zst /test_output/ -done +collect_core_dumps diff --git a/docker/test/upgrade/run.sh b/docker/test/upgrade/run.sh index e2392dd4438..db1f5ae995f 100644 --- a/docker/test/upgrade/run.sh +++ b/docker/test/upgrade/run.sh @@ -3,267 +3,22 @@ # shellcheck disable=SC2086 # shellcheck disable=SC2024 -# This script is similar to script for common stress test - # Avoid overlaps with previous runs dmesg --clear set -x -# core.COMM.PID-TID -sysctl kernel.core_pattern='core.%e.%p-%P' - -OK="\tOK\t\\N\t" -FAIL="\tFAIL\t\\N\t" - -FAILURE_CONTEXT_LINES=50 -FAILURE_CONTEXT_MAX_LINE_WIDTH=400 - -function escaped() -{ - # That's the simplest way I found to escape a string in bash. Yep, bash is the most convenient programming language. - # Also limit lines width just in case (too long lines are not really useful usually) - clickhouse local -S 's String' --input-format=LineAsString -q "select substr(s, 1, $FAILURE_CONTEXT_MAX_LINE_WIDTH) - from table format CustomSeparated settings format_custom_row_after_delimiter='\\\\\\\\n'" -} -function head_escaped() -{ - head -n $FAILURE_CONTEXT_LINES $1 | escaped -} -function unts() -{ - grep -Po "[0-9][0-9]:[0-9][0-9] \K.*" -} -function trim_server_logs() -{ - head -n $FAILURE_CONTEXT_LINES "/test_output/$1" | grep -Eo " \[ [0-9]+ \] \{.*" | escaped -} - -function install_packages() -{ - dpkg -i $1/clickhouse-common-static_*.deb - dpkg -i $1/clickhouse-common-static-dbg_*.deb - dpkg -i $1/clickhouse-server_*.deb - dpkg -i $1/clickhouse-client_*.deb -} - -function configure() -{ - # install test configs - export USE_DATABASE_ORDINARY=1 - export EXPORT_S3_STORAGE_POLICIES=1 - /usr/share/clickhouse-test/config/install.sh - - # avoid too slow startup - sudo cat /etc/clickhouse-server/config.d/keeper_port.xml \ - | sed "s|100000|10000|" \ - > /etc/clickhouse-server/config.d/keeper_port.xml.tmp - sudo mv /etc/clickhouse-server/config.d/keeper_port.xml.tmp /etc/clickhouse-server/config.d/keeper_port.xml - sudo chown clickhouse /etc/clickhouse-server/config.d/keeper_port.xml - sudo chgrp clickhouse /etc/clickhouse-server/config.d/keeper_port.xml - - # for clickhouse-server (via service) - echo "ASAN_OPTIONS='malloc_context_size=10 verbosity=1 allocator_release_to_os_interval_ms=10000'" >> /etc/environment - # for clickhouse-client - export ASAN_OPTIONS='malloc_context_size=10 allocator_release_to_os_interval_ms=10000' - - # since we run clickhouse from root - sudo chown root: /var/lib/clickhouse - - # Set more frequent update period of asynchronous metrics to more frequently update information about real memory usage (less chance of OOM). - echo "1" \ - > /etc/clickhouse-server/config.d/asynchronous_metrics_update_period_s.xml - - - local total_mem - total_mem=$(awk '/MemTotal/ { print $(NF-1) }' /proc/meminfo) # KiB - total_mem=$(( total_mem*1024 )) # bytes - - # Set maximum memory usage as half of total memory (less chance of OOM). - # - # But not via max_server_memory_usage but via max_memory_usage_for_user, - # so that we can override this setting and execute service queries, like: - # - hung check - # - show/drop database - # - ... - # - # So max_memory_usage_for_user will be a soft limit, and - # max_server_memory_usage will be hard limit, and queries that should be - # executed regardless memory limits will use max_memory_usage_for_user=0, - # instead of relying on max_untracked_memory - - max_server_memory_usage_to_ram_ratio=0.5 - echo "Setting max_server_memory_usage_to_ram_ratio to ${max_server_memory_usage_to_ram_ratio}" - cat > /etc/clickhouse-server/config.d/max_server_memory_usage.xml < - ${max_server_memory_usage_to_ram_ratio} - -EOL - - local max_users_mem - max_users_mem=$((total_mem*30/100)) # 30% - echo "Setting max_memory_usage_for_user=$max_users_mem and max_memory_usage for queries to 10G" - cat > /etc/clickhouse-server/users.d/max_memory_usage_for_user.xml < - - - 10G - ${max_users_mem} - - - -EOL - - cat > /etc/clickhouse-server/config.d/core.xml < - - - 107374182400 - - - $PWD - -EOL - - # Let OOM killer terminate other processes before clickhouse-server: - cat > /etc/clickhouse-server/config.d/oom_score.xml < - -1000 - -EOL - - # Analyzer is not yet ready for testing - cat > /etc/clickhouse-server/users.d/no_analyzer.xml < - - - - - - - - - - -EOL - -} - -function stop() -{ - local max_tries="${1:-90}" - local pid - # Preserve the pid, since the server can hung after the PID will be deleted. - pid="$(cat /var/run/clickhouse-server/clickhouse-server.pid)" - - clickhouse stop --max-tries "$max_tries" --do-not-kill && return - - # We failed to stop the server with SIGTERM. Maybe it hang, let's collect stacktraces. - echo -e "Possible deadlock on shutdown (see gdb.log)$FAIL" >> /test_output/test_results.tsv - kill -TERM "$(pidof gdb)" ||: - sleep 5 - echo "thread apply all backtrace (on stop)" >> /test_output/gdb.log - timeout 30m gdb -batch -ex 'thread apply all backtrace' -p "$pid" | ts '%Y-%m-%d %H:%M:%S' >> /test_output/gdb.log - clickhouse stop --force -} - -function start() -{ - counter=0 - until clickhouse-client --query "SELECT 1" - do - if [ "$counter" -gt ${1:-120} ] - then - echo "Cannot start clickhouse-server" - rg --text ".*Application" /var/log/clickhouse-server/clickhouse-server.log > /test_output/application_errors.txt ||: - echo -e "Cannot start clickhouse-server$FAIL$(trim_server_logs application_errors.txt)" >> /test_output/test_results.tsv - cat /var/log/clickhouse-server/stdout.log - tail -n100 /var/log/clickhouse-server/stderr.log - tail -n100000 /var/log/clickhouse-server/clickhouse-server.log | rg -F -v -e ' RaftInstance:' -e ' RaftInstance' | tail -n100 - break - fi - # use root to match with current uid - clickhouse start --user root >/var/log/clickhouse-server/stdout.log 2>>/var/log/clickhouse-server/stderr.log - sleep 0.5 - counter=$((counter + 1)) - done - - # Set follow-fork-mode to parent, because we attach to clickhouse-server, not to watchdog - # and clickhouse-server can do fork-exec, for example, to run some bridge. - # Do not set nostop noprint for all signals, because some it may cause gdb to hang, - # explicitly ignore non-fatal signals that are used by server. - # Number of SIGRTMIN can be determined only in runtime. - RTMIN=$(kill -l SIGRTMIN) - echo " -set follow-fork-mode parent -handle SIGHUP nostop noprint pass -handle SIGINT nostop noprint pass -handle SIGQUIT nostop noprint pass -handle SIGPIPE nostop noprint pass -handle SIGTERM nostop noprint pass -handle SIGUSR1 nostop noprint pass -handle SIGUSR2 nostop noprint pass -handle SIG$RTMIN nostop noprint pass -info signals -continue -backtrace full -thread apply all backtrace full -info registers -disassemble /s -up -disassemble /s -up -disassemble /s -p \"done\" -detach -quit -" > script.gdb - - # FIXME Hung check may work incorrectly because of attached gdb - # 1. False positives are possible - # 2. We cannot attach another gdb to get stacktraces if some queries hung - gdb -batch -command script.gdb -p "$(cat /var/run/clickhouse-server/clickhouse-server.pid)" | ts '%Y-%m-%d %H:%M:%S' >> /test_output/gdb.log & - sleep 5 - # gdb will send SIGSTOP, spend some time loading debug info and then send SIGCONT, wait for it (up to send_timeout, 300s) - time clickhouse-client --query "SELECT 'Connected to clickhouse-server after attaching gdb'" ||: -} - -# Thread Fuzzer allows to check more permutations of possible thread scheduling -# and find more potential issues. -# Temporarily disable ThreadFuzzer with tsan because of https://github.com/google/sanitizers/issues/1540 -is_tsan_build=$(clickhouse local -q "select value like '% -fsanitize=thread %' from system.build_options where name='CXX_FLAGS'") -if [ "$is_tsan_build" -eq "0" ]; then - export THREAD_FUZZER_CPU_TIME_PERIOD_US=1000 - export THREAD_FUZZER_SLEEP_PROBABILITY=0.1 - export THREAD_FUZZER_SLEEP_TIME_US=100000 - - export THREAD_FUZZER_pthread_mutex_lock_BEFORE_MIGRATE_PROBABILITY=1 - export THREAD_FUZZER_pthread_mutex_lock_AFTER_MIGRATE_PROBABILITY=1 - export THREAD_FUZZER_pthread_mutex_unlock_BEFORE_MIGRATE_PROBABILITY=1 - export THREAD_FUZZER_pthread_mutex_unlock_AFTER_MIGRATE_PROBABILITY=1 - - export THREAD_FUZZER_pthread_mutex_lock_BEFORE_SLEEP_PROBABILITY=0.001 - export THREAD_FUZZER_pthread_mutex_lock_AFTER_SLEEP_PROBABILITY=0.001 - export THREAD_FUZZER_pthread_mutex_unlock_BEFORE_SLEEP_PROBABILITY=0.001 - export THREAD_FUZZER_pthread_mutex_unlock_AFTER_SLEEP_PROBABILITY=0.001 - export THREAD_FUZZER_pthread_mutex_lock_BEFORE_SLEEP_TIME_US=10000 - - export THREAD_FUZZER_pthread_mutex_lock_AFTER_SLEEP_TIME_US=10000 - export THREAD_FUZZER_pthread_mutex_unlock_BEFORE_SLEEP_TIME_US=10000 - export THREAD_FUZZER_pthread_mutex_unlock_AFTER_SLEEP_TIME_US=10000 -fi - -azurite-blob --blobHost 0.0.0.0 --blobPort 10000 --debug /azurite_log & -./setup_minio.sh stateless # to have a proper environment - # we mount tests folder from repo to /usr/share ln -s /usr/share/clickhouse-test/ci/stress.py /usr/bin/stress ln -s /usr/share/clickhouse-test/clickhouse-test /usr/bin/clickhouse-test ln -s /usr/share/clickhouse-test/ci/download_release_packages.py /usr/bin/download_release_packages ln -s /usr/share/clickhouse-test/ci/get_previous_release_tag.py /usr/bin/get_previous_release_tag +source /usr/share/clickhouse-test/ci/stress_tests.lib + +azurite-blob --blobHost 0.0.0.0 --blobPort 10000 --debug /azurite_log & +./setup_minio.sh stateless # to have a proper environment + echo "Get previous release tag" previous_release_tag=$(dpkg --info package_folder/clickhouse-client*.deb | grep "Version: " | awk '{print $2}' | cut -f1 -d'+' | get_previous_release_tag) echo $previous_release_tag @@ -274,224 +29,161 @@ git clone https://github.com/ClickHouse/ClickHouse.git --no-tags --progress --br echo "Download clickhouse-server from the previous release" mkdir previous_release_package_folder -echo $previous_release_tag | download_release_packages && echo -e 'Download script exit code\tOK' >> /test_output/test_results.tsv \ - || echo -e 'Download script failed\tFAIL' >> /test_output/test_results.tsv +echo $previous_release_tag | download_release_packages && echo -e "Download script exit code$OK" >> /test_output/test_results.tsv \ + || echo -e "Download script failed$FAIL" >> /test_output/test_results.tsv # Check if we cloned previous release repository successfully if ! [ "$(ls -A previous_release_repository/tests/queries)" ] then - echo -e "Failed to clone previous release tests\tFAIL" >> /test_output/test_results.tsv + echo -e 'failure\tFailed to clone previous release tests' > /test_output/check_status.tsv + exit elif ! [ "$(ls -A previous_release_package_folder/clickhouse-common-static_*.deb && ls -A previous_release_package_folder/clickhouse-server_*.deb)" ] then - echo -e "Failed to download previous release packages\tFAIL" >> /test_output/test_results.tsv -else - echo -e "Successfully cloned previous release tests\tOK" >> /test_output/test_results.tsv - echo -e "Successfully downloaded previous release packages\tOK" >> /test_output/test_results.tsv - - # Make upgrade check more funny by forcing Ordinary engine for system database - mkdir /var/lib/clickhouse/metadata - echo "ATTACH DATABASE system ENGINE=Ordinary" > /var/lib/clickhouse/metadata/system.sql - - # Install previous release packages - install_packages previous_release_package_folder - - # Start server from previous release - # Let's enable S3 storage by default - export USE_S3_STORAGE_FOR_MERGE_TREE=1 - # Previous version may not be ready for fault injections - export ZOOKEEPER_FAULT_INJECTION=0 - configure - - # But we still need default disk because some tables loaded only into it - sudo cat /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml \ - | sed "s|
s3
|
s3
default|" \ - > /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml.tmp mv /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml.tmp /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml - sudo chown clickhouse /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml - sudo chgrp clickhouse /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml - - # Avoid "Setting s3_check_objects_after_upload is neither a builtin setting..." - rm -f /etc/clickhouse-server/users.d/enable_blobs_check.xml ||: - rm -f /etc/clickhouse-server/users.d/marks.xml ||: - - # Remove s3 related configs to avoid "there is no disk type `cache`" - rm -f /etc/clickhouse-server/config.d/storage_conf.xml ||: - rm -f /etc/clickhouse-server/config.d/azure_storage_conf.xml ||: - - # Turn on after 22.12 - rm -f /etc/clickhouse-server/config.d/compressed_marks_and_index.xml ||: - # it uses recently introduced settings which previous versions may not have - rm -f /etc/clickhouse-server/users.d/insert_keeper_retries.xml ||: - - start - - clickhouse-client --query="SELECT 'Server version: ', version()" - - mkdir tmp_stress_output - - stress --test-cmd="/usr/bin/clickhouse-test --queries=\"previous_release_repository/tests/queries\"" --upgrade-check --output-folder tmp_stress_output --global-time-limit=1200 \ - && echo -e "Test script exit code$OK" >> /test_output/test_results.tsv \ - || echo -e "Test script failed$FAIL script exit code: $?" >> /test_output/test_results.tsv - - rm -rf tmp_stress_output - - # We experienced deadlocks in this command in very rare cases. Let's debug it: - timeout 10m clickhouse-client --query="SELECT 'Tables count:', count() FROM system.tables" || - ( - echo "thread apply all backtrace (on select tables count)" >> /test_output/gdb.log - timeout 30m gdb -batch -ex 'thread apply all backtrace' -p "$(cat /var/run/clickhouse-server/clickhouse-server.pid)" | ts '%Y-%m-%d %H:%M:%S' >> /test_output/gdb.log - clickhouse stop --force - ) - - # Use bigger timeout for previous version - stop 300 - mv /var/log/clickhouse-server/clickhouse-server.log /var/log/clickhouse-server/clickhouse-server.stress.log - - # Install and start new server - install_packages package_folder - # Disable fault injections on start (we don't test them here, and it can lead to tons of requests in case of huge number of tables). - export ZOOKEEPER_FAULT_INJECTION=0 - configure - start 500 - clickhouse-client --query "SELECT 'Server successfully started', 'OK', NULL, ''" >> /test_output/test_results.tsv \ - || (rg --text ".*Application" /var/log/clickhouse-server/clickhouse-server.log > /test_output/application_errors.txt \ - && echo -e "Server failed to start (see application_errors.txt and clickhouse-server.clean.log)$FAIL$(trim_server_logs application_errors.txt)" \ - >> /test_output/test_results.tsv) - - # Remove file application_errors.txt if it's empty - [ -s /test_output/application_errors.txt ] || rm /test_output/application_errors.txt - - clickhouse-client --query="SELECT 'Server version: ', version()" - - # Let the server run for a while before checking log. - sleep 60 - - stop - mv /var/log/clickhouse-server/clickhouse-server.log /var/log/clickhouse-server/clickhouse-server.upgrade.log - - # Error messages (we should ignore some errors) - # FIXME https://github.com/ClickHouse/ClickHouse/issues/38643 ("Unknown index: idx.") - # FIXME https://github.com/ClickHouse/ClickHouse/issues/39174 ("Cannot parse string 'Hello' as UInt64") - # FIXME Not sure if it's expected, but some tests from stress test may not be finished yet when we restarting server. - # Let's just ignore all errors from queries ("} TCPHandler: Code:", "} executeQuery: Code:") - # FIXME https://github.com/ClickHouse/ClickHouse/issues/39197 ("Missing columns: 'v3' while processing query: 'v3, k, v1, v2, p'") - # NOTE Incompatibility was introduced in https://github.com/ClickHouse/ClickHouse/pull/39263, it's expected - # ("This engine is deprecated and is not supported in transactions", "[Queue = DB::MergeMutateRuntimeQueue]: Code: 235. DB::Exception: Part") - # FIXME https://github.com/ClickHouse/ClickHouse/issues/39174 - bad mutation does not indicate backward incompatibility - echo "Check for Error messages in server log:" - rg -Fav -e "Code: 236. DB::Exception: Cancelled merging parts" \ - -e "Code: 236. DB::Exception: Cancelled mutating parts" \ - -e "REPLICA_IS_ALREADY_ACTIVE" \ - -e "REPLICA_ALREADY_EXISTS" \ - -e "ALL_REPLICAS_LOST" \ - -e "DDLWorker: Cannot parse DDL task query" \ - -e "RaftInstance: failed to accept a rpc connection due to error 125" \ - -e "UNKNOWN_DATABASE" \ - -e "NETWORK_ERROR" \ - -e "UNKNOWN_TABLE" \ - -e "ZooKeeperClient" \ - -e "KEEPER_EXCEPTION" \ - -e "DirectoryMonitor" \ - -e "TABLE_IS_READ_ONLY" \ - -e "Code: 1000, e.code() = 111, Connection refused" \ - -e "UNFINISHED" \ - -e "NETLINK_ERROR" \ - -e "Renaming unexpected part" \ - -e "PART_IS_TEMPORARILY_LOCKED" \ - -e "and a merge is impossible: we didn't find" \ - -e "found in queue and some source parts for it was lost" \ - -e "is lost forever." \ - -e "Unknown index: idx." \ - -e "Cannot parse string 'Hello' as UInt64" \ - -e "} TCPHandler: Code:" \ - -e "} executeQuery: Code:" \ - -e "Missing columns: 'v3' while processing query: 'v3, k, v1, v2, p'" \ - -e "This engine is deprecated and is not supported in transactions" \ - -e "[Queue = DB::MergeMutateRuntimeQueue]: Code: 235. DB::Exception: Part" \ - -e "The set of parts restored in place of" \ - -e "(ReplicatedMergeTreeAttachThread): Initialization failed. Error" \ - -e "Code: 269. DB::Exception: Destination table is myself" \ - -e "Coordination::Exception: Connection loss" \ - -e "MutateFromLogEntryTask" \ - -e "No connection to ZooKeeper, cannot get shared table ID" \ - -e "Session expired" \ - -e "TOO_MANY_PARTS" \ - -e "Authentication failed" \ - -e "Container already exists" \ - /var/log/clickhouse-server/clickhouse-server.upgrade.log | zgrep -Fa "" > /test_output/upgrade_error_messages.txt \ - && echo -e "Error message in clickhouse-server.log (see upgrade_error_messages.txt)$FAIL$(head_escaped /test_output/bc_check_error_messages.txt)" \ - >> /test_output/test_results.tsv \ - || echo -e "No Error messages after server upgrade$OK" >> /test_output/test_results.tsv - - # Remove file bc_check_error_messages.txt if it's empty - [ -s /test_output/upgrade_error_messages.txt ] || rm /test_output/upgrade_error_messages.txt - - # Sanitizer asserts - rg -Fa "==================" /var/log/clickhouse-server/stderr.log >> /test_output/tmp - rg -Fa "WARNING" /var/log/clickhouse-server/stderr.log >> /test_output/tmp - rg -Fav -e "ASan doesn't fully support makecontext/swapcontext functions" -e "DB::Exception" /test_output/tmp > /dev/null \ - && echo -e "Sanitizer assert (in stderr.log)$FAIL$(head_escaped /test_output/tmp)" >> /test_output/test_results.tsv \ - || echo -e "No sanitizer asserts$OK" >> /test_output/test_results.tsv - rm -f /test_output/tmp - - # OOM - rg -Fa " Application: Child process was terminated by signal 9" /var/log/clickhouse-server/clickhouse-server.*.log > /dev/null \ - && echo -e "Signal 9 in clickhouse-server.log$FAIL" >> /test_output/test_results.tsv \ - || echo -e "No OOM messages in clickhouse-server.log$OK" >> /test_output/test_results.tsv - - # Logical errors - echo "Check for Logical errors in server log:" - rg -Fa -A20 "Code: 49, e.displayText() = DB::Exception:" /var/log/clickhouse-server/clickhouse-server.*.log > /test_output/logical_errors.txt \ - && echo -e "Logical error thrown (see clickhouse-server.log or logical_errors.txt)$FAIL$(head_escaped /test_output/logical_errors.txt)" >> /test_output/test_results.tsv \ - || echo -e "No logical errors$OK" >> /test_output/test_results.tsv - - # Remove file logical_errors.txt if it's empty - [ -s /test_output/logical_errors.txt ] || rm /test_output/logical_errors.txt - - # Crash - rg -Fa "########################################" /var/log/clickhouse-server/clickhouse-server.*.log > /dev/null \ - && echo -e "Killed by signal (in clickhouse-server.log)$FAIL" >> /test_output/test_results.tsv \ - || echo -e "Not crashed$OK" >> /test_output/test_results.tsv - - # It also checks for crash without stacktrace (printed by watchdog) - echo "Check for Fatal message in server log:" - rg -Fa " " /var/log/clickhouse-server/clickhouse-server.*.log > /test_output/fatal_messages.txt \ - && echo -e "Fatal message in clickhouse-server.log (see fatal_messages.txt)$FAIL$(trim_server_logs fatal_messages.txt)" >> /test_output/test_results.tsv \ - || echo -e "No fatal messages in clickhouse-server.log$OK" >> /test_output/test_results.tsv - - # Remove file fatal_messages.txt if it's empty - [ -s /test_output/fatal_messages.txt ] || rm /test_output/fatal_messages.txt - - rg -Fa "########################################" /test_output/* > /dev/null \ - && echo -e "Killed by signal (output files)$FAIL" >> /test_output/test_results.tsv - - tar -chf /test_output/coordination.tar /var/lib/clickhouse/coordination ||: - for table in query_log trace_log - do - clickhouse-local --path /var/lib/clickhouse/ --only-system-tables -q "select * from system.$table format TSVWithNamesAndTypes" \ - | zstd --threads=0 > /test_output/$table.tsv.zst ||: - done + echo -e 'failure\tFailed to download previous release packages' > /test_output/check_status.tsv + exit fi -dmesg -T > /test_output/dmesg.log +echo -e "Successfully cloned previous release tests$OK" >> /test_output/test_results.tsv +echo -e "Successfully downloaded previous release packages$OK" >> /test_output/test_results.tsv -# OOM in dmesg -- those are real -grep -q -F -e 'Out of memory: Killed process' -e 'oom_reaper: reaped process' -e 'oom-kill:constraint=CONSTRAINT_NONE' /test_output/dmesg.log \ - && echo -e "OOM in dmesg$FAIL$(head_escaped /test_output/dmesg.log)" >> /test_output/test_results.tsv \ - || echo -e "No OOM in dmesg$OK" >> /test_output/test_results.tsv +# Make upgrade check more funny by forcing Ordinary engine for system database +mkdir /var/lib/clickhouse/metadata +echo "ATTACH DATABASE system ENGINE=Ordinary" > /var/lib/clickhouse/metadata/system.sql + +# Install previous release packages +install_packages previous_release_package_folder + +# Start server from previous release +# Let's enable S3 storage by default +export USE_S3_STORAGE_FOR_MERGE_TREE=1 +# Previous version may not be ready for fault injections +export ZOOKEEPER_FAULT_INJECTION=0 +configure + +# But we still need default disk because some tables loaded only into it +sudo cat /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml \ + | sed "s|
s3
|
s3
default|" \ + > /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml.tmp mv /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml.tmp /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml +sudo chown clickhouse /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml +sudo chgrp clickhouse /etc/clickhouse-server/config.d/s3_storage_policy_by_default.xml + +start + +clickhouse-client --query="SELECT 'Server version: ', version()" + +mkdir tmp_stress_output + +stress --test-cmd="/usr/bin/clickhouse-test --queries=\"previous_release_repository/tests/queries\"" --upgrade-check --output-folder tmp_stress_output --global-time-limit=1200 \ + && echo -e "Test script exit code$OK" >> /test_output/test_results.tsv \ + || echo -e "Test script failed$FAIL script exit code: $?" >> /test_output/test_results.tsv + +rm -rf tmp_stress_output + +# We experienced deadlocks in this command in very rare cases. Let's debug it: +timeout 10m clickhouse-client --query="SELECT 'Tables count:', count() FROM system.tables" || +( + echo "thread apply all backtrace (on select tables count)" >> /test_output/gdb.log + timeout 30m gdb -batch -ex 'thread apply all backtrace' -p "$(cat /var/run/clickhouse-server/clickhouse-server.pid)" | ts '%Y-%m-%d %H:%M:%S' >> /test_output/gdb.log + clickhouse stop --force +) + +# Use bigger timeout for previous version and disable additional hang check +stop 300 false +mv /var/log/clickhouse-server/clickhouse-server.log /var/log/clickhouse-server/clickhouse-server.stress.log + +# Install and start new server +install_packages package_folder +# Disable fault injections on start (we don't test them here, and it can lead to tons of requests in case of huge number of tables). +export ZOOKEEPER_FAULT_INJECTION=0 +configure +start 500 +clickhouse-client --query "SELECT 'Server successfully started', 'OK', NULL, ''" >> /test_output/test_results.tsv \ + || (rg --text ".*Application" /var/log/clickhouse-server/clickhouse-server.log > /test_output/application_errors.txt \ + && echo -e "Server failed to start (see application_errors.txt and clickhouse-server.clean.log)$FAIL$(trim_server_logs application_errors.txt)" \ + >> /test_output/test_results.tsv) + +# Remove file application_errors.txt if it's empty +[ -s /test_output/application_errors.txt ] || rm /test_output/application_errors.txt + +clickhouse-client --query="SELECT 'Server version: ', version()" + +# Let the server run for a while before checking log. +sleep 60 + +stop +mv /var/log/clickhouse-server/clickhouse-server.log /var/log/clickhouse-server/clickhouse-server.upgrade.log + +# Error messages (we should ignore some errors) +# FIXME https://github.com/ClickHouse/ClickHouse/issues/38643 ("Unknown index: idx.") +# FIXME https://github.com/ClickHouse/ClickHouse/issues/39174 ("Cannot parse string 'Hello' as UInt64") +# FIXME Not sure if it's expected, but some tests from stress test may not be finished yet when we restarting server. +# Let's just ignore all errors from queries ("} TCPHandler: Code:", "} executeQuery: Code:") +# FIXME https://github.com/ClickHouse/ClickHouse/issues/39197 ("Missing columns: 'v3' while processing query: 'v3, k, v1, v2, p'") +# NOTE Incompatibility was introduced in https://github.com/ClickHouse/ClickHouse/pull/39263, it's expected +# ("This engine is deprecated and is not supported in transactions", "[Queue = DB::MergeMutateRuntimeQueue]: Code: 235. DB::Exception: Part") +# FIXME https://github.com/ClickHouse/ClickHouse/issues/39174 - bad mutation does not indicate backward incompatibility +echo "Check for Error messages in server log:" +rg -Fav -e "Code: 236. DB::Exception: Cancelled merging parts" \ + -e "Code: 236. DB::Exception: Cancelled mutating parts" \ + -e "REPLICA_IS_ALREADY_ACTIVE" \ + -e "REPLICA_ALREADY_EXISTS" \ + -e "ALL_REPLICAS_LOST" \ + -e "DDLWorker: Cannot parse DDL task query" \ + -e "RaftInstance: failed to accept a rpc connection due to error 125" \ + -e "UNKNOWN_DATABASE" \ + -e "NETWORK_ERROR" \ + -e "UNKNOWN_TABLE" \ + -e "ZooKeeperClient" \ + -e "KEEPER_EXCEPTION" \ + -e "DirectoryMonitor" \ + -e "TABLE_IS_READ_ONLY" \ + -e "Code: 1000, e.code() = 111, Connection refused" \ + -e "UNFINISHED" \ + -e "NETLINK_ERROR" \ + -e "Renaming unexpected part" \ + -e "PART_IS_TEMPORARILY_LOCKED" \ + -e "and a merge is impossible: we didn't find" \ + -e "found in queue and some source parts for it was lost" \ + -e "is lost forever." \ + -e "Unknown index: idx." \ + -e "Cannot parse string 'Hello' as UInt64" \ + -e "} TCPHandler: Code:" \ + -e "} executeQuery: Code:" \ + -e "Missing columns: 'v3' while processing query: 'v3, k, v1, v2, p'" \ + -e "This engine is deprecated and is not supported in transactions" \ + -e "[Queue = DB::MergeMutateRuntimeQueue]: Code: 235. DB::Exception: Part" \ + -e "The set of parts restored in place of" \ + -e "(ReplicatedMergeTreeAttachThread): Initialization failed. Error" \ + -e "Code: 269. DB::Exception: Destination table is myself" \ + -e "Coordination::Exception: Connection loss" \ + -e "MutateFromLogEntryTask" \ + -e "No connection to ZooKeeper, cannot get shared table ID" \ + -e "Session expired" \ + -e "TOO_MANY_PARTS" \ + -e "Authentication failed" \ + -e "Container already exists" \ + /var/log/clickhouse-server/clickhouse-server.upgrade.log | zgrep -Fa "" > /test_output/upgrade_error_messages.txt \ + && echo -e "Error message in clickhouse-server.log (see upgrade_error_messages.txt)$FAIL$(head_escaped /test_output/bc_check_error_messages.txt)" \ + >> /test_output/test_results.tsv \ + || echo -e "No Error messages after server upgrade$OK" >> /test_output/test_results.tsv + +# Remove file upgrade_error_messages.txt if it's empty +[ -s /test_output/upgrade_error_messages.txt ] || rm /test_output/upgrade_error_messages.txt + +# Grep logs for sanitizer asserts, crashes and other critical errors +check_logs_for_critical_errors + +tar -chf /test_output/coordination.tar /var/lib/clickhouse/coordination ||: + +collect_query_and_trace_logs + +check_oom_in_dmesg mv /var/log/clickhouse-server/stderr.log /test_output/ -# If we failed to clone repo or download previous release packages, -# we don't have any packages installed, but we need clickhouse-local -# to be installed to create check_status.tsv. -if ! command -v clickhouse-local &> /dev/null -then - install_packages package_folder -fi - # Write check result into check_status.tsv # Try to choose most specific error for the whole check status -clickhouse-local --structure "test String, res String" -q "SELECT 'failure', test FROM table WHERE res != 'OK' order by +clickhouse-local --structure "test String, res String, time Nullable(Float32), desc String" -q "SELECT 'failure', test FROM table WHERE res != 'OK' order by (test like '%Sanitizer%') DESC, (test like '%Killed by signal%') DESC, (test like '%gdb.log%') DESC, @@ -504,7 +196,7 @@ clickhouse-local --structure "test String, res String" -q "SELECT 'failure', tes (test like '%Error message%') DESC, (test like '%previous release%') DESC, rowNumberInAllBlocks() -LIMIT 1" < /test_output/test_results.tsv > /test_output/check_status.tsv +LIMIT 1" < /test_output/test_results.tsv > /test_output/check_status.tsv || echo "failure\tCannot parse test_results.tsv" > /test_output/check_status.tsv [ -s /test_output/check_status.tsv ] || echo -e "success\tNo errors found" > /test_output/check_status.tsv # Core dumps diff --git a/tests/ci/stress_tests.lib b/tests/ci/stress_tests.lib new file mode 100644 index 00000000000..97269dc7d75 --- /dev/null +++ b/tests/ci/stress_tests.lib @@ -0,0 +1,305 @@ +#!/bin/bash + +# core.COMM.PID-TID +sysctl kernel.core_pattern='core.%e.%p-%P' + +OK="\tOK\t\\N\t" +FAIL="\tFAIL\t\\N\t" + +FAILURE_CONTEXT_LINES=50 +FAILURE_CONTEXT_MAX_LINE_WIDTH=400 + +function escaped() +{ + # That's the simplest way I found to escape a string in bash. Yep, bash is the most convenient programming language. + # Also limit lines width just in case (too long lines are not really useful usually) + clickhouse local -S 's String' --input-format=LineAsString -q "select substr(s, 1, $FAILURE_CONTEXT_MAX_LINE_WIDTH) + from table format CustomSeparated settings format_custom_row_after_delimiter='\\\\\\\\n'" +} +function head_escaped() +{ + head -n $FAILURE_CONTEXT_LINES $1 | escaped +} +function unts() +{ + grep -Po "[0-9][0-9]:[0-9][0-9] \K.*" +} +function trim_server_logs() +{ + head -n $FAILURE_CONTEXT_LINES "/test_output/$1" | grep -Eo " \[ [0-9]+ \] \{.*" | escaped +} + +function install_packages() +{ + dpkg -i $1/clickhouse-common-static_*.deb + dpkg -i $1/clickhouse-common-static-dbg_*.deb + dpkg -i $1/clickhouse-server_*.deb + dpkg -i $1/clickhouse-client_*.deb +} + +function configure() +{ + # install test configs + export USE_DATABASE_ORDINARY=1 + export EXPORT_S3_STORAGE_POLICIES=1 + /usr/share/clickhouse-test/config/install.sh + + # avoid too slow startup + sudo cat /etc/clickhouse-server/config.d/keeper_port.xml \ + | sed "s|100000|10000|" \ + > /etc/clickhouse-server/config.d/keeper_port.xml.tmp + sudo mv /etc/clickhouse-server/config.d/keeper_port.xml.tmp /etc/clickhouse-server/config.d/keeper_port.xml + sudo chown clickhouse /etc/clickhouse-server/config.d/keeper_port.xml + sudo chgrp clickhouse /etc/clickhouse-server/config.d/keeper_port.xml + + # for clickhouse-server (via service) + echo "ASAN_OPTIONS='malloc_context_size=10 verbosity=1 allocator_release_to_os_interval_ms=10000'" >> /etc/environment + # for clickhouse-client + export ASAN_OPTIONS='malloc_context_size=10 allocator_release_to_os_interval_ms=10000' + + # since we run clickhouse from root + sudo chown root: /var/lib/clickhouse + + # Set more frequent update period of asynchronous metrics to more frequently update information about real memory usage (less chance of OOM). + echo "1" \ + > /etc/clickhouse-server/config.d/asynchronous_metrics_update_period_s.xml + + local total_mem + total_mem=$(awk '/MemTotal/ { print $(NF-1) }' /proc/meminfo) # KiB + total_mem=$(( total_mem*1024 )) # bytes + + # Set maximum memory usage as half of total memory (less chance of OOM). + # + # But not via max_server_memory_usage but via max_memory_usage_for_user, + # so that we can override this setting and execute service queries, like: + # - hung check + # - show/drop database + # - ... + # + # So max_memory_usage_for_user will be a soft limit, and + # max_server_memory_usage will be hard limit, and queries that should be + # executed regardless memory limits will use max_memory_usage_for_user=0, + # instead of relying on max_untracked_memory + + max_server_memory_usage_to_ram_ratio=0.5 + echo "Setting max_server_memory_usage_to_ram_ratio to ${max_server_memory_usage_to_ram_ratio}" + cat > /etc/clickhouse-server/config.d/max_server_memory_usage.xml < + ${max_server_memory_usage_to_ram_ratio} + +EOL + + local max_users_mem + max_users_mem=$((total_mem*30/100)) # 30% + echo "Setting max_memory_usage_for_user=$max_users_mem and max_memory_usage for queries to 10G" + cat > /etc/clickhouse-server/users.d/max_memory_usage_for_user.xml < + + + 10G + ${max_users_mem} + + + +EOL + + cat > /etc/clickhouse-server/config.d/core.xml < + + + 107374182400 + + + $PWD + +EOL + + # Analyzer is not yet ready for testing + cat > /etc/clickhouse-server/users.d/no_analyzer.xml < + + + + + + + + + + +EOL + +} + +function stop() +{ + local max_tries="${1:-90}" + local check_hang="${2:-true}" + local pid + # Preserve the pid, since the server can hung after the PID will be deleted. + pid="$(cat /var/run/clickhouse-server/clickhouse-server.pid)" + + clickhouse stop --max-tries "$max_tries" --do-not-kill && return + + if [ $check_hang == true ] then + # We failed to stop the server with SIGTERM. Maybe it hang, let's collect stacktraces. + echo -e "Possible deadlock on shutdown (see gdb.log)$FAIL" >> /test_output/test_results.tsv + kill -TERM "$(pidof gdb)" ||: + sleep 5 + echo "thread apply all backtrace (on stop)" >> /test_output/gdb.log + timeout 30m gdb -batch -ex 'thread apply all backtrace' -p "$pid" | ts '%Y-%m-%d %H:%M:%S' >> /test_output/gdb.log + clickhouse stop --force + fi +} + +function start() +{ + counter=0 + until clickhouse-client --query "SELECT 1" + do + if [ "$counter" -gt ${1:-120} ] + then + echo "Cannot start clickhouse-server" + rg --text ".*Application" /var/log/clickhouse-server/clickhouse-server.log > /test_output/application_errors.txt ||: + echo -e "Cannot start clickhouse-server$FAIL$(trim_server_logs application_errors.txt)" >> /test_output/test_results.tsv + cat /var/log/clickhouse-server/stdout.log + tail -n100 /var/log/clickhouse-server/stderr.log + tail -n100000 /var/log/clickhouse-server/clickhouse-server.log | rg -F -v -e ' RaftInstance:' -e ' RaftInstance' | tail -n100 + break + fi + # use root to match with current uid + clickhouse start --user root >/var/log/clickhouse-server/stdout.log 2>>/var/log/clickhouse-server/stderr.log + sleep 0.5 + counter=$((counter + 1)) + done + + # Set follow-fork-mode to parent, because we attach to clickhouse-server, not to watchdog + # and clickhouse-server can do fork-exec, for example, to run some bridge. + # Do not set nostop noprint for all signals, because some it may cause gdb to hang, + # explicitly ignore non-fatal signals that are used by server. + # Number of SIGRTMIN can be determined only in runtime. + RTMIN=$(kill -l SIGRTMIN) + echo " +set follow-fork-mode parent +handle SIGHUP nostop noprint pass +handle SIGINT nostop noprint pass +handle SIGQUIT nostop noprint pass +handle SIGPIPE nostop noprint pass +handle SIGTERM nostop noprint pass +handle SIGUSR1 nostop noprint pass +handle SIGUSR2 nostop noprint pass +handle SIG$RTMIN nostop noprint pass +info signals +continue +backtrace full +thread apply all backtrace full +info registers +disassemble /s +up +disassemble /s +up +disassemble /s +p \"done\" +detach +quit +" > script.gdb + + # FIXME Hung check may work incorrectly because of attached gdb + # 1. False positives are possible + # 2. We cannot attach another gdb to get stacktraces if some queries hung + gdb -batch -command script.gdb -p "$(cat /var/run/clickhouse-server/clickhouse-server.pid)" | ts '%Y-%m-%d %H:%M:%S' >> /test_output/gdb.log & + sleep 5 + # gdb will send SIGSTOP, spend some time loading debug info and then send SIGCONT, wait for it (up to send_timeout, 300s) + time clickhouse-client --query "SELECT 'Connected to clickhouse-server after attaching gdb'" ||: +} + +function check_server_start() +{ + clickhouse-client --query "SELECT 'Server successfully started', 'OK', NULL, ''" >> /test_output/test_results.tsv \ + || (rg --text ".*Application" /var/log/clickhouse-server/clickhouse-server.log > /test_output/application_errors.txt \ + && echo -e "Server failed to start (see application_errors.txt and clickhouse-server.clean.log)$FAIL$(trim_server_logs application_errors.txt)" \ + >> /test_output/test_results.tsv) + + # Remove file application_errors.txt if it's empty + [ -s /test_output/application_errors.txt ] || rm /test_output/application_errors.txt +} + +function check_logs_for_critical_errors() +{ + # Sanitizer asserts + rg -Fa "==================" /var/log/clickhouse-server/stderr.log | rg -v "in query:" >> /test_output/tmp + rg -Fa "WARNING" /var/log/clickhouse-server/stderr.log >> /test_output/tmp + rg -Fav -e "ASan doesn't fully support makecontext/swapcontext functions" -e "DB::Exception" /test_output/tmp > /dev/null \ + && echo -e "Sanitizer assert (in stderr.log)$FAIL$(head_escaped /test_output/tmp)" >> /test_output/test_results.tsv \ + || echo -e "No sanitizer asserts$OK" >> /test_output/test_results.tsv + rm -f /test_output/tmp + + # OOM + rg -Fa " Application: Child process was terminated by signal 9" /var/log/clickhouse-server/clickhouse-server*.log > /dev/null \ + && echo -e "Signal 9 in clickhouse-server.log$FAIL" >> /test_output/test_results.tsv \ + || echo -e "No OOM messages in clickhouse-server.log$OK" >> /test_output/test_results.tsv + + # Logical errors + rg -Fa "Code: 49. DB::Exception: " /var/log/clickhouse-server/clickhouse-server*.log > /test_output/logical_errors.txt \ + && echo -e "Logical error thrown (see clickhouse-server.log or logical_errors.txt)$FAIL$(head_escaped /test_output/logical_errors.txt)" >> /test_output/test_results.tsv \ + || echo -e "No logical errors$OK" >> /test_output/test_results.tsv + # Remove file logical_errors.txt if it's empty + [ -s /test_output/logical_errors.txt ] || rm /test_output/logical_errors.txt + + # No such key errors + rg --text "Code: 499.*The specified key does not exist" /var/log/clickhouse-server/clickhouse-server*.log > /test_output/no_such_key_errors.txt \ + && echo -e "S3_ERROR No such key thrown (see clickhouse-server.log or no_such_key_errors.txt)$FAIL$(trim_server_logs no_such_key_errors.txt)" >> /test_output/test_results.tsv \ + || echo -e "No lost s3 keys$OK" >> /test_output/test_results.tsv + + # Remove file no_such_key_errors.txt if it's empty + [ -s /test_output/no_such_key_errors.txt ] || rm /test_output/no_such_key_errors.txt + + # Crash + rg -Fa "########################################" /var/log/clickhouse-server/clickhouse-server*.log > /dev/null \ + && echo -e "Killed by signal (in clickhouse-server.log)$FAIL" >> /test_output/test_results.tsv \ + || echo -e "Not crashed$OK" >> /test_output/test_results.tsv + + # It also checks for crash without stacktrace (printed by watchdog) + rg -Fa " " /var/log/clickhouse-server/clickhouse-server*.log > /test_output/fatal_messages.txt \ + && echo -e "Fatal message in clickhouse-server.log (see fatal_messages.txt)$FAIL$(trim_server_logs fatal_messages.txt)" >> /test_output/test_results.tsv \ + || echo -e "No fatal messages in clickhouse-server.log$OK" >> /test_output/test_results.tsv + + # Remove file fatal_messages.txt if it's empty + [ -s /test_output/fatal_messages.txt ] || rm /test_output/fatal_messages.txt + + rg -Fa "########################################" /test_output/* > /dev/null \ + && echo -e "Killed by signal (output files)$FAIL" >> /test_output/test_results.tsv + + function get_gdb_log_context() + { + rg -A50 -Fa " received signal " /test_output/gdb.log | head_escaped + } + + rg -Fa " received signal " /test_output/gdb.log > /dev/null \ + && echo -e "Found signal in gdb.log$FAIL$(get_gdb_log_context)" >> /test_output/test_results.tsv + + dmesg -T > /test_output/dmesg.log + + # OOM in dmesg -- those are real + grep -q -F -e 'Out of memory: Killed process' -e 'oom_reaper: reaped process' -e 'oom-kill:constraint=CONSTRAINT_NONE' /test_output/dmesg.log \ + && echo -e "OOM in dmesg$FAIL$(head_escaped /test_output/dmesg.log)" >> /test_output/test_results.tsv \ + || echo -e "No OOM in dmesg$OK" >> /test_output/test_results.tsv +} + +function collect_query_and_trace_logs() +{ + for table in query_log trace_log + do + clickhouse-local --path /var/lib/clickhouse/ --only-system-tables -q "select * from system.$table format TSVWithNamesAndTypes" | zstd --threads=0 > /test_output/$table.tsv.zst ||: + done +} + +function collect_core_dumps() +{ + find . -type f -maxdepth 1 -name 'core.*' | while read core; do + zstd --threads=0 $core + mv $core.zst /test_output/ + done +} From e52a995e467d08b03de1bdd279141bcac9eed292 Mon Sep 17 00:00:00 2001 From: avogar Date: Fri, 24 Feb 2023 16:58:36 +0000 Subject: [PATCH 183/841] Fix style --- docker/test/upgrade/run.sh | 2 ++ tests/ci/stress.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docker/test/upgrade/run.sh b/docker/test/upgrade/run.sh index db1f5ae995f..733d3a79d9f 100644 --- a/docker/test/upgrade/run.sh +++ b/docker/test/upgrade/run.sh @@ -14,6 +14,8 @@ ln -s /usr/share/clickhouse-test/clickhouse-test /usr/bin/clickhouse-test ln -s /usr/share/clickhouse-test/ci/download_release_packages.py /usr/bin/download_release_packages ln -s /usr/share/clickhouse-test/ci/get_previous_release_tag.py /usr/bin/get_previous_release_tag +# Stress tests and upgrade check uses similar code that was placed +# in a separate bash library. See tests/ci/stress_tests.lib source /usr/share/clickhouse-test/ci/stress_tests.lib azurite-blob --blobHost 0.0.0.0 --blobPort 10000 --debug /azurite_log & diff --git a/tests/ci/stress.py b/tests/ci/stress.py index 0b6bd2349a6..5a46c4cb2bd 100755 --- a/tests/ci/stress.py +++ b/tests/ci/stress.py @@ -75,8 +75,8 @@ def run_func_test( for i in range(num_processes) ] pipes = [] - for i in range(0, len(output_paths)): - f = open(output_paths[i], "w") + for i, path in enumerate(output_paths): + f = open(path, "w") full_command = "{} {} {} {} {}".format( cmd, get_options(i, upgrade_check), From ff67fc4b06aff50cf5799118f8cc3d51f498c65a Mon Sep 17 00:00:00 2001 From: avogar Date: Fri, 24 Feb 2023 16:59:27 +0000 Subject: [PATCH 184/841] Remove llvm-9 from dependencies --- docker/test/stress/Dockerfile | 1 - docker/test/upgrade/Dockerfile | 1 - 2 files changed, 2 deletions(-) diff --git a/docker/test/stress/Dockerfile b/docker/test/stress/Dockerfile index 1cabea58a65..e9712f430fd 100644 --- a/docker/test/stress/Dockerfile +++ b/docker/test/stress/Dockerfile @@ -21,7 +21,6 @@ RUN apt-get update -y \ openssl \ netcat-openbsd \ telnet \ - llvm-9 \ brotli \ && apt-get clean diff --git a/docker/test/upgrade/Dockerfile b/docker/test/upgrade/Dockerfile index a91088fb01e..8e5890b81a0 100644 --- a/docker/test/upgrade/Dockerfile +++ b/docker/test/upgrade/Dockerfile @@ -21,7 +21,6 @@ RUN apt-get update -y \ openssl \ netcat-openbsd \ telnet \ - llvm-9 \ brotli \ && apt-get clean From 5024f11adc2557b1fbf775b312b3d290bfea97fc Mon Sep 17 00:00:00 2001 From: Anton Popov Date: Fri, 24 Feb 2023 17:18:45 +0000 Subject: [PATCH 185/841] fix order in serialization info --- src/DataTypes/Serializations/SerializationInfo.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/DataTypes/Serializations/SerializationInfo.h b/src/DataTypes/Serializations/SerializationInfo.h index 4ae5cf8c193..7f73d053f1b 100644 --- a/src/DataTypes/Serializations/SerializationInfo.h +++ b/src/DataTypes/Serializations/SerializationInfo.h @@ -86,7 +86,8 @@ using MutableSerializationInfoPtr = std::shared_ptr; using SerializationInfos = std::vector; using MutableSerializationInfos = std::vector; -class SerializationInfoByName : public std::unordered_map +/// The order is important because info is serialized to part metadata. +class SerializationInfoByName : public std::map { public: SerializationInfoByName() = default; From 86406c0f0fa5455a6d12be78a83e8bea76fae350 Mon Sep 17 00:00:00 2001 From: pufit Date: Fri, 24 Feb 2023 13:44:16 -0500 Subject: [PATCH 186/841] fix test --- tests/queries/0_stateless/01221_system_settings.reference | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/queries/0_stateless/01221_system_settings.reference b/tests/queries/0_stateless/01221_system_settings.reference index 2e06fdcb4fd..399b3778b66 100644 --- a/tests/queries/0_stateless/01221_system_settings.reference +++ b/tests/queries/0_stateless/01221_system_settings.reference @@ -1,4 +1,4 @@ -send_timeout 300 0 Timeout for sending data to network, in seconds. If client needs to sent some data, but it did not able to send any bytes in this interval, exception is thrown. If you set this setting on client, the \'receive_timeout\' for the socket will be also set on the corresponding connection end on the server. \N \N 0 Seconds 300 -storage_policy default 0 Name of storage disk policy \N \N 0 String +send_timeout 300 0 Timeout for sending data to network, in seconds. If client needs to sent some data, but it did not able to send any bytes in this interval, exception is thrown. If you set this setting on client, the \'receive_timeout\' for the socket will be also set on the corresponding connection end on the server. \N \N 0 Seconds 300 +storage_policy default 0 Name of storage disk policy \N \N 0 String 1 1 From e77dd810369ad5fcf957393e4fc71a8a6220b04e Mon Sep 17 00:00:00 2001 From: Han Fei Date: Fri, 24 Feb 2023 19:48:46 +0100 Subject: [PATCH 187/841] fix --- src/Dictionaries/RegExpTreeDictionary.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Dictionaries/RegExpTreeDictionary.cpp b/src/Dictionaries/RegExpTreeDictionary.cpp index 5775bb3790d..caba2a52a51 100644 --- a/src/Dictionaries/RegExpTreeDictionary.cpp +++ b/src/Dictionaries/RegExpTreeDictionary.cpp @@ -509,7 +509,8 @@ std::unordered_map RegExpTreeDictionary::match( if (node_ptr->match(reinterpret_cast(keys_data.data()) + offset, length)) { match_result.insertNodeID(node_ptr->id); - if (node_ptr->containsAll(attributes)) + /// When this node is leaf and contains all the required attributes, it means a match. + if (node_ptr->containsAll(attributes) && node_ptr->children.empty()) break; } } From 3a947ecddc5a9f30e91ef74e4f54da97b8c91f9e Mon Sep 17 00:00:00 2001 From: Anton Popov Date: Fri, 24 Feb 2023 19:17:44 +0000 Subject: [PATCH 188/841] do not allow const and non-deterministic secondary indexes --- src/Storages/IndicesDescription.cpp | 10 +------ src/Storages/MergeTree/MergeTreeData.cpp | 1 - src/Storages/MergeTree/MergeTreeIndices.cpp | 26 +++++++++++++++++++ .../02670_constant_skip_index.reference | 0 .../0_stateless/02670_constant_skip_index.sql | 25 ++++++++++++++++++ 5 files changed, 52 insertions(+), 10 deletions(-) create mode 100644 tests/queries/0_stateless/02670_constant_skip_index.reference create mode 100644 tests/queries/0_stateless/02670_constant_skip_index.sql diff --git a/src/Storages/IndicesDescription.cpp b/src/Storages/IndicesDescription.cpp index 2e07aceeaa9..00a3636b605 100644 --- a/src/Storages/IndicesDescription.cpp +++ b/src/Storages/IndicesDescription.cpp @@ -94,15 +94,7 @@ IndexDescription IndexDescription::getIndexFromAST(const ASTPtr & definition_ast auto syntax = TreeRewriter(context).analyze(expr_list, columns.getAllPhysical()); result.expression = ExpressionAnalyzer(expr_list, syntax, context).getActions(true); - Block block_without_columns = result.expression->getSampleBlock(); - - for (size_t i = 0; i < block_without_columns.columns(); ++i) - { - const auto & column = block_without_columns.getByPosition(i); - result.column_names.emplace_back(column.name); - result.data_types.emplace_back(column.type); - result.sample_block.insert(ColumnWithTypeAndName(column.type->createColumn(), column.type, column.name)); - } + result.sample_block = result.expression->getSampleBlock(); const auto & definition_arguments = index_definition->type->arguments; if (definition_arguments) diff --git a/src/Storages/MergeTree/MergeTreeData.cpp b/src/Storages/MergeTree/MergeTreeData.cpp index 0d4e54453d7..f49ecba1385 100644 --- a/src/Storages/MergeTree/MergeTreeData.cpp +++ b/src/Storages/MergeTree/MergeTreeData.cpp @@ -524,7 +524,6 @@ void MergeTreeData::checkProperties( for (const auto & index : new_metadata.secondary_indices) { - MergeTreeIndexFactory::instance().validate(index, attach); if (indices_names.find(index.name) != indices_names.end()) diff --git a/src/Storages/MergeTree/MergeTreeIndices.cpp b/src/Storages/MergeTree/MergeTreeIndices.cpp index 2be9ecd8de3..6ae96d00171 100644 --- a/src/Storages/MergeTree/MergeTreeIndices.cpp +++ b/src/Storages/MergeTree/MergeTreeIndices.cpp @@ -35,6 +35,7 @@ MergeTreeIndexPtr MergeTreeIndexFactory::get( { auto it = creators.find(index.type); if (it == creators.end()) + { throw Exception(ErrorCodes::INCORRECT_QUERY, "Unknown Index type '{}'. Available index types: {}", index.type, std::accumulate(creators.cbegin(), creators.cend(), std::string{}, @@ -46,6 +47,7 @@ MergeTreeIndexPtr MergeTreeIndexFactory::get( return left + ", " + right.first; }) ); + } return it->second(index); } @@ -61,8 +63,31 @@ MergeTreeIndices MergeTreeIndexFactory::getMany(const std::vectorhasArrayJoin()) + throw Exception(ErrorCodes::INCORRECT_QUERY, "Secondary index '{}' cannot contain array joins", index.name); + + try + { + index.expression->assertDeterministic(); + } + catch (Exception & e) + { + e.addMessage(fmt::format("for secondary index '{}'", index.name)); + throw; + } + + for (const auto & elem : index.sample_block) + if (elem.column && (isColumnConst(*elem.column) || elem.column->isDummy())) + throw Exception(ErrorCodes::INCORRECT_QUERY, "Secondary index '{}' cannot contain constants", index.name); + } + auto it = validators.find(index.type); if (it == validators.end()) + { throw Exception(ErrorCodes::INCORRECT_QUERY, "Unknown Index type '{}'. Available index types: {}", index.type, std::accumulate( @@ -77,6 +102,7 @@ void MergeTreeIndexFactory::validate(const IndexDescription & index, bool attach return left + ", " + right.first; }) ); + } it->second(index, attach); } diff --git a/tests/queries/0_stateless/02670_constant_skip_index.reference b/tests/queries/0_stateless/02670_constant_skip_index.reference new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/queries/0_stateless/02670_constant_skip_index.sql b/tests/queries/0_stateless/02670_constant_skip_index.sql new file mode 100644 index 00000000000..97dd2ab33c9 --- /dev/null +++ b/tests/queries/0_stateless/02670_constant_skip_index.sql @@ -0,0 +1,25 @@ + +DROP TABLE IF EXISTS t_constant_index; + +CREATE TABLE t_constant_index +( + id UInt64, + INDEX t_constant_index 'foo' TYPE set(2) GRANULARITY 1 +) ENGINE = MergeTree +ORDER BY id; -- { serverError INCORRECT_QUERY } + +CREATE TABLE t_constant_index +( + id UInt64, + INDEX t_constant_index id + rand() TYPE set(2) GRANULARITY 1 +) ENGINE = MergeTree +ORDER BY id; -- { serverError BAD_ARGUMENTS } + +CREATE TABLE t_constant_index +( + id UInt64, + INDEX t_constant_index id * 2 TYPE set(2) GRANULARITY 1 +) ENGINE = MergeTree +ORDER BY id; + +DROP TABLE t_constant_index; From da326dda03069b56033f6d310b41f0c78c289d19 Mon Sep 17 00:00:00 2001 From: Yakov Olkhovskiy Date: Fri, 24 Feb 2023 19:19:51 +0000 Subject: [PATCH 189/841] comments fix --- src/Common/SettingsChanges.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Common/SettingsChanges.h b/src/Common/SettingsChanges.h index 61f5a1c7eba..514e9a78911 100644 --- a/src/Common/SettingsChanges.h +++ b/src/Common/SettingsChanges.h @@ -29,11 +29,11 @@ public: const Field * tryGet(std::string_view name) const; Field * tryGet(std::string_view name); - /// Inserts element if doesn't exists and returns true, otherwise just returns false + /// Inserts element if doesn't exists and returns true, otherwise just returns false bool insertSetting(std::string_view name, const Field & value); /// Sets element to value, inserts if doesn't exist void setSetting(std::string_view name, const Field & value); - /// If element exists - removes it and returns true, otherwise returns false + /// If element exists - removes it and returns true, otherwise returns false bool removeSetting(std::string_view name); }; From eb5122b00b2620c4d4d4ad6e2672d7a5ffc662cc Mon Sep 17 00:00:00 2001 From: avoiderboi Date: Fri, 24 Feb 2023 20:33:01 +0100 Subject: [PATCH 190/841] Protect against bugs outside the function --- src/Functions/widthBucket.cpp | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/Functions/widthBucket.cpp b/src/Functions/widthBucket.cpp index daa76f422ee..1afe28c27a0 100644 --- a/src/Functions/widthBucket.cpp +++ b/src/Functions/widthBucket.cpp @@ -24,10 +24,24 @@ namespace ErrorCodes { extern const int ILLEGAL_TYPE_OF_ARGUMENT; extern const int BAD_ARGUMENTS; + extern const int LOGIC_ERROR; } class FunctionWidthBucket : public IFunction { + template + void throwIfInvalid( const size_t argument_index, + const ColumnConst * col_const, + const typename ColumnVector::Container * col_vec, + const size_t expected_size) const + { + if ((nullptr == col_const) ^ (nullptr != col_vec && col_vec->size() == expected_size)) + { + throw Exception( + ErrorCodes::LOGICAL_ERROR, "Logical error in function {}: argument {} has unexpected type or size!", getName(), argument_index); + } + } + template const typename ColumnVector::Container * getDataIfNotNull(const ColumnVector * col_vec) const { @@ -92,10 +106,10 @@ class FunctionWidthBucket : public IFunction const auto * highs_col_const = checkAndGetColumnConst>(casted_columns[2].get()); const auto * counts_col_const = checkAndGetColumnConst>(arguments[3].column.get()); - assert((nullptr != operands_col_const) ^ (nullptr != operands_vec && operands_vec->size() == input_rows_count)); - assert((nullptr != lows_col_const) ^ (nullptr != lows_vec && lows_vec->size() == input_rows_count)); - assert((nullptr != highs_col_const) ^ (nullptr != highs_vec && highs_vec->size() == input_rows_count)); - assert((nullptr != counts_col_const) ^ (nullptr != counts_vec && counts_vec->size() == input_rows_count)); + throwIfInvalid(0, operands_col_const, operands_vec, input_rows_count); + throwIfInvalid(1, lows_col_const, lows_vec, input_rows_count); + throwIfInvalid(2, highs_col_const, highs_vec, input_rows_count); + throwIfInvalid(4, counts_col_const, counts_vec, input_rows_count); const auto are_all_const_cols = nullptr != operands_col_const && nullptr != lows_col_const && nullptr != highs_col_const && nullptr != counts_col_const; From 71538c853608eba9081a629311a260f77b491184 Mon Sep 17 00:00:00 2001 From: avoiderboi Date: Fri, 24 Feb 2023 20:33:34 +0100 Subject: [PATCH 191/841] Eliminate unreachable code --- src/Functions/widthBucket.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/Functions/widthBucket.cpp b/src/Functions/widthBucket.cpp index 1afe28c27a0..708bdd6a9c0 100644 --- a/src/Functions/widthBucket.cpp +++ b/src/Functions/widthBucket.cpp @@ -117,16 +117,8 @@ class FunctionWidthBucket : public IFunction if (are_all_const_cols) { - auto result_column = ColumnVector::create(); - result_column->reserve(1); - auto & result_data = result_column->getData(); - result_data.push_back(calculate( - operands_col_const->getValue(), - lows_col_const->getValue(), - highs_col_const->getValue(), - counts_col_const->template getValue())); - - return ColumnConst::create(std::move(result_column), input_rows_count); + throw Exception( + ErrorCodes::LOGICAL_ERROR, "Logical error in function {}: unexpected combination of argument types!", getName()); } auto result_column = ColumnVector::create(); From 1df605f13c960861af412d2d20db446b45c53dc9 Mon Sep 17 00:00:00 2001 From: avoiderboi Date: Fri, 24 Feb 2023 21:21:39 +0100 Subject: [PATCH 192/841] Add tests for handling `NaN` and `Inf` properly --- .../0_stateless/25337_width_bucket.reference | 3 +++ tests/queries/0_stateless/25337_width_bucket.sql | 14 +++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/tests/queries/0_stateless/25337_width_bucket.reference b/tests/queries/0_stateless/25337_width_bucket.reference index c0933e2a76b..aa0e8f2612c 100644 --- a/tests/queries/0_stateless/25337_width_bucket.reference +++ b/tests/queries/0_stateless/25337_width_bucket.reference @@ -7,6 +7,9 @@ 4.333 1 11 3 1 4.34 1 11 3 2 ---------- +0 +11 +---------- -7 -10 0 4 2 -6 -5 -1 2 0 0 0 10 4 1 diff --git a/tests/queries/0_stateless/25337_width_bucket.sql b/tests/queries/0_stateless/25337_width_bucket.sql index 9dd130b43af..d0117ca5d5f 100644 --- a/tests/queries/0_stateless/25337_width_bucket.sql +++ b/tests/queries/0_stateless/25337_width_bucket.sql @@ -12,7 +12,19 @@ INSERT INTO mytable VALUES (3, -100, 200, 10), (0, 0, 10, 4), (3, 0, 10, 3), (4. SELECT operand, low, high, count, WIDTH_BUCKET(operand, low, high, count) FROM mytable WHERE count != 0; SELECT '----------'; -- zero is not valid for count -SELECT operand, low, high, count, WIDTH_BUCKET(operand, low, high, count) FROM mytable WHERE count = 0; -- { serverError BAD_ARGUMENTS} +SELECT operand, low, high, count, WIDTH_BUCKET(operand, low, high, count) FROM mytable WHERE count = 0; -- { serverError BAD_ARGUMENTS } +-- operand, low and high cannot be NaN +SELECT WIDTH_BUCKET(0, 10, NaN, 10); -- { serverError BAD_ARGUMENTS } +SELECT WIDTH_BUCKET(NaN, 0, 10, 10); -- { serverError BAD_ARGUMENTS } +SELECT WIDTH_BUCKET(0, NaN, 10, 10); -- { serverError BAD_ARGUMENTS } +-- low and high cannot be Inf +SELECT WIDTH_BUCKET(1, -Inf, 10, 10); -- { serverError BAD_ARGUMENTS } +-- low and high cannot be Inf +SELECT WIDTH_BUCKET(1, 0, Inf, 10); -- { serverError BAD_ARGUMENTS } +-- operand can be Inf +SELECT WIDTH_BUCKET(-Inf, 0, 10, 10); +SELECT WIDTH_BUCKET(Inf, 0, 10, 10); +SELECT '----------'; -- IntXX types SELECT toInt64(operand) AS operand, toInt32(low) AS low, toInt16(high) AS high, count, WIDTH_BUCKET(operand, low, high, count) FROM mytable WHERE count != 0; SELECT '----------'; From 7f159b9e2d1c2261aec8e775bfe0665d9726d8fe Mon Sep 17 00:00:00 2001 From: avoiderboi Date: Fri, 24 Feb 2023 21:21:49 +0100 Subject: [PATCH 193/841] Handle `Inf` and `NaN` properly --- src/Functions/widthBucket.cpp | 48 +++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 5 deletions(-) diff --git a/src/Functions/widthBucket.cpp b/src/Functions/widthBucket.cpp index 708bdd6a9c0..48d88aee634 100644 --- a/src/Functions/widthBucket.cpp +++ b/src/Functions/widthBucket.cpp @@ -11,11 +11,14 @@ #include #include #include +#include +#include #include #include #include #include +#include #include namespace DB @@ -30,7 +33,8 @@ namespace ErrorCodes class FunctionWidthBucket : public IFunction { template - void throwIfInvalid( const size_t argument_index, + void throwIfInvalid( + const size_t argument_index, const ColumnConst * col_const, const typename ColumnVector::Container * col_vec, const size_t expected_size) const @@ -38,7 +42,10 @@ class FunctionWidthBucket : public IFunction if ((nullptr == col_const) ^ (nullptr != col_vec && col_vec->size() == expected_size)) { throw Exception( - ErrorCodes::LOGICAL_ERROR, "Logical error in function {}: argument {} has unexpected type or size!", getName(), argument_index); + ErrorCodes::LOGICAL_ERROR, + "Logical error in function {}: argument {} has unexpected type or size!", + getName(), + argument_index); } } @@ -63,14 +70,28 @@ class FunctionWidthBucket : public IFunction return col_vec->data()[index]; } + static Float64 calculateRelativeBucket(const Float64 operand, const Float64 low, const Float64 high) + { + return (operand - low) / (high - low); + } + template - TResultType calculate(const Float64 operand, const Float64 low, const Float64 high, const TCountType count) const + std::optional checkArguments(const Float64 operand, const Float64 low, const Float64 high, const TCountType count) const { if (count == 0) { throw Exception(ErrorCodes::BAD_ARGUMENTS, "Last argument (count) for function {} cannot be 0.", getName()); } - + if (isNaN(operand) || isNaN(low) || isNaN(high)) + { + throw Exception( + ErrorCodes::BAD_ARGUMENTS, "The first three arguments (operand, low, high) cannot be NaN in function {}", getName()); + } + // operand can be infinity, the following conditions will take care of it + if (!isFinite(low) || !isFinite(high)) + { + throw Exception(ErrorCodes::BAD_ARGUMENTS, "The second and third arguments (low, high) cannot be Inf function {}", getName()); + } if (operand < low || low >= high) { return 0; @@ -79,8 +100,25 @@ class FunctionWidthBucket : public IFunction { return count + 1; } + return std::nullopt; + } - return static_cast(count * ((operand - low) / (high - low)) + 1); + template + TResultType calculate(const Float64 operand, const Float64 low, const Float64 high, const TCountType count) const + { + if (const auto maybe_early_return = checkArguments(operand, low, high, count); maybe_early_return.has_value()) + { + return *maybe_early_return; + } + + const auto relative_bucket = calculateRelativeBucket(operand, low, high); + + if (isNaN(relative_bucket) || !isFinite(relative_bucket)) + { + throw Exception( + ErrorCodes::LOGICAL_ERROR, "The calculation resulted in NaN or Inf which is unexpected in function {}.", getName()); + } + return static_cast(count * relative_bucket + 1); } template TCountType> From f500de66578fb8b0c2522ac6b1378b45d5dad71a Mon Sep 17 00:00:00 2001 From: avoiderboi Date: Fri, 24 Feb 2023 21:51:52 +0100 Subject: [PATCH 194/841] Fix typo --- src/Functions/widthBucket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Functions/widthBucket.cpp b/src/Functions/widthBucket.cpp index 48d88aee634..46ba56b843d 100644 --- a/src/Functions/widthBucket.cpp +++ b/src/Functions/widthBucket.cpp @@ -27,7 +27,7 @@ namespace ErrorCodes { extern const int ILLEGAL_TYPE_OF_ARGUMENT; extern const int BAD_ARGUMENTS; - extern const int LOGIC_ERROR; + extern const int LOGICAL_ERROR; } class FunctionWidthBucket : public IFunction From 6a99c1b68a6c6ad75ac45b5185b0dab230a6277f Mon Sep 17 00:00:00 2001 From: pufit Date: Fri, 24 Feb 2023 16:17:49 -0500 Subject: [PATCH 195/841] Apply suggestions from code review Co-authored-by: Nikita Mikhaylov --- src/Core/ServerSettings.h | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/Core/ServerSettings.h b/src/Core/ServerSettings.h index 8a87c822f77..1e884266c17 100644 --- a/src/Core/ServerSettings.h +++ b/src/Core/ServerSettings.h @@ -15,19 +15,19 @@ namespace DB #define SERVER_SETTINGS(M, ALIAS) \ M(Bool, show_addresses_in_stack_traces, true, "If it is set true will show addresses in stack traces", 0) \ M(Bool, shutdown_wait_unfinished_queries, false, "If set true ClickHouse will wait for running queries finish before shutdown.", 0) \ - M(UInt64, max_thread_pool_size, 10000, "Max size for global thread pool.", 0) \ - M(UInt64, max_thread_pool_free_size, 1000, "Max free size for global thread pool.", 0) \ - M(UInt64, thread_pool_queue_size, 10000, "Queue size for global thread pool.", 0) \ - M(UInt64, max_io_thread_pool_size, 100, "Max size for IO thread pool.", 0) \ + M(UInt64, max_thread_pool_size, 10000, "The maximum number of threads that could be allocated from the OS and used for query execution and background operations.", 0) \ + M(UInt64, max_thread_pool_free_size, 1000, "The maximum number of threads that will always stay in a global thread pool once allocated and remain idle in case of insufficient number of tasks.", 0) \ + M(UInt64, thread_pool_queue_size, 10000, "The maximum number of tasks that will be placed in a queue and wait for execution.", 0) \ + M(UInt64, max_io_thread_pool_size, 100, "The maximum number of threads that would be used for IO operations", 0) \ M(UInt64, max_io_thread_pool_free_size, 0, "Max free size for IO thread pool.", 0) \ M(UInt64, io_thread_pool_queue_size, 10000, "Queue size for IO thread pool.", 0) \ M(Int32, max_connections, 1024, "Max server connections.", 0) \ M(UInt32, asynchronous_metrics_update_period_s, 1, "Period in seconds for updating asynchronous metrics.", 0) \ M(UInt32, asynchronous_heavy_metrics_update_period_s, 120, "Period in seconds for updating asynchronous metrics.", 0) \ - M(UInt32, max_threads_for_connection_collector, 100, "Max thread count for connection collector.", 0) \ + M(UInt32, max_threads_for_connection_collector, 10, "The maximum number of threads that will be used for draining connections asynchronously in a background upon finishing executing distributed queries.", 0) \ M(String, default_database, "default", "Default database name.", 0) \ M(String, tmp_policy, "", "Policy for storage with temporary data.", 0) \ - M(UInt64, max_temporary_data_on_disk_size, 0, "Max data size for temporary storage.", 0) \ + M(UInt64, max_temporary_data_on_disk_size, 0, "The maximum amount of storage that could be used for external aggregation, joins or sorting., ", 0) \ M(String, temporary_data_in_cache, "", "Cache disk name for temporary data.", 0) \ M(UInt64, max_server_memory_usage, 0, "Limit on total memory usage. Zero means Unlimited.", 0) \ M(Double, max_server_memory_usage_to_ram_ratio, 0.9, "Same as max_server_memory_usage but in to ram ratio. Allows to lower max memory on low-memory systems.", 0) \ @@ -55,16 +55,16 @@ namespace DB M(UInt64, concurrent_threads_soft_limit_num, 0, "Sets how many concurrent thread can be allocated before applying CPU pressure. Zero means Unlimited.", 0) \ M(UInt64, concurrent_threads_soft_limit_ratio_to_cores, 0, "Same as concurrent_threads_soft_limit_num, but with ratio to cores.", 0) \ \ - M(UInt64, background_pool_size, 16, "Sets background pool size.", 0) \ - M(UInt64, background_merges_mutations_concurrency_ratio, 2, "Sets background merges mutations concurrency ratio.", 0) \ - M(String, background_merges_mutations_scheduling_policy, "round_robin", "Sets background merges mutations scheduling policy.", 0) \ - M(UInt64, background_move_pool_size, 8, "Sets background move pool size.", 0) \ - M(UInt64, background_fetches_pool_size, 8, "Sets background fetches pool size.", 0) \ - M(UInt64, background_common_pool_size, 8, "Sets background common pool size.", 0) \ - M(UInt64, background_buffer_flush_schedule_pool_size, 16, "Sets background flush schedule pool size.", 0) \ - M(UInt64, background_schedule_pool_size, 16, "Sets background schedule pool size.", 0) \ - M(UInt64, background_message_broker_schedule_pool_size, 16, "Sets background message broker schedule pool size.", 0) \ - M(UInt64, background_distributed_schedule_pool_size, 16, "Sets background distributed schedule pool size.", 0) \ + M(UInt64, background_pool_size, 16, "The maximum number of threads what will be used for merging or mutating data parts for *MergeTree-engine tables in a background.", 0) \ + M(UInt64, background_merges_mutations_concurrency_ratio, 2, "The multiplier which shows the relation between the number of tasks that could be executed concurrently and the number of threads being used.", 0) \ + M(String, background_merges_mutations_scheduling_policy, "round_robin", "The policy on how to perform a scheduling for background merges and mutations. Possible values are: `round_robin` and `shortest_task_first`. ", 0) \ + M(UInt64, background_move_pool_size, 8, "The maximum number of threads that will be used for moving data parts to another disk or volume for *MergeTree-engine tables in a background.", 0) \ + M(UInt64, background_fetches_pool_size, 8, "The maximum number of threads that will be used for fetching data parts from another replica for *MergeTree-engine tables in a background.", 0) \ + M(UInt64, background_common_pool_size, 8, "The maximum number of threads that will be used for performing a variety of operations (mostly garbage collection) for *MergeTree-engine tables in a background.", 0) \ + M(UInt64, background_buffer_flush_schedule_pool_size, 16, "The maximum number of threads that will be used for performing flush operations for Buffer-engine tables in a background.", 0) \ + M(UInt64, background_schedule_pool_size, 16, "The maximum number of threads that will be used for constantly executing some lightweight periodic operations.", 0) \ + M(UInt64, background_message_broker_schedule_pool_size, 16, "The maximum number of threads that will be used for executing background operations for message streaming.", 0) \ + M(UInt64, background_distributed_schedule_pool_size, 16, "The maximum number of threads that will be used for executing distributed sends.", 0) \ DECLARE_SETTINGS_TRAITS(ServerSettingsTraits, SERVER_SETTINGS) From ebcd00e1c5128649bc632cb9fb86b9e3e9ecd91c Mon Sep 17 00:00:00 2001 From: MeenaRenganathan22 Date: Fri, 24 Feb 2023 13:31:40 -0800 Subject: [PATCH 196/841] Changes to reflect the latest submodule and corresponding CMakeLists.txt --- contrib/krb5 | 2 +- contrib/krb5-cmake/CMakeLists.txt | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/contrib/krb5 b/contrib/krb5 index 220ed8fa13f..b854ad57912 160000 --- a/contrib/krb5 +++ b/contrib/krb5 @@ -1 +1 @@ -Subproject commit 220ed8fa13fabe98d2b10bc0ac8f59ad8706861e +Subproject commit b854ad57912fc2ef21cbe9a69622777d551d3266 diff --git a/contrib/krb5-cmake/CMakeLists.txt b/contrib/krb5-cmake/CMakeLists.txt index be016bb0082..93b90c15201 100644 --- a/contrib/krb5-cmake/CMakeLists.txt +++ b/contrib/krb5-cmake/CMakeLists.txt @@ -160,6 +160,8 @@ set(ALL_SRCS # "${KRB5_SOURCE_DIR}/lib/gssapi/spnego/negoex_trace.c" + "${KRB5_SOURCE_DIR}/lib/crypto/builtin/kdf.c" + "${KRB5_SOURCE_DIR}/lib/crypto/builtin/cmac.c" "${KRB5_SOURCE_DIR}/lib/crypto/krb/prng.c" "${KRB5_SOURCE_DIR}/lib/crypto/krb/enc_dk_cmac.c" # "${KRB5_SOURCE_DIR}/lib/crypto/krb/crc32.c" @@ -684,15 +686,7 @@ target_include_directories(_krb5 PRIVATE target_compile_definitions(_krb5 PRIVATE KRB5_PRIVATE - K5_OPENSSL_DES - K5_OPENSSL_SHA1 - K5_OPENSSL_SHA2 - K5_OPENSSL_HMAC - K5_OPENSSL_RC4 - K5_OPENSSL_MD4 - K5_OPENSSL_MD5 - K5_OPENSSL_AES - K5_OPENSSL_DES_KEY_PARITY + CRYPTO_OPENSSL _GSS_STATIC_LINK=1 KRB5_DEPRECATED=1 LOCALEDIR="/usr/local/share/locale" From cad1e0b7684a691116cef95f1c418df8ef4be740 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Sat, 25 Feb 2023 01:18:34 +0100 Subject: [PATCH 197/841] fix --- src/IO/WriteBufferFromPocoSocket.cpp | 11 +++++--- src/IO/WriteBufferFromPocoSocket.h | 1 + src/Interpreters/executeQuery.cpp | 15 ++++++----- src/QueryPipeline/BlockIO.cpp | 25 ++++++++++++++++++- src/QueryPipeline/BlockIO.h | 3 ++- src/Server/TCPHandler.cpp | 16 +++++++++--- src/Storages/Distributed/DistributedSink.cpp | 20 +++++++++++++++ src/Storages/Distributed/DistributedSink.h | 2 ++ .../test_insert_into_distributed/test.py | 2 +- .../02434_cancel_insert_when_client_dies.sh | 13 +++++++--- .../02435_rollback_cancelled_queries.sh | 2 +- utils/check-mysql-binlog/main.cpp | 2 +- 12 files changed, 89 insertions(+), 23 deletions(-) diff --git a/src/IO/WriteBufferFromPocoSocket.cpp b/src/IO/WriteBufferFromPocoSocket.cpp index e01245849ae..b15149c6f88 100644 --- a/src/IO/WriteBufferFromPocoSocket.cpp +++ b/src/IO/WriteBufferFromPocoSocket.cpp @@ -64,7 +64,8 @@ void WriteBufferFromPocoSocket::nextImpl() } catch (const Poco::Net::NetException & e) { - throw NetException(ErrorCodes::NETWORK_ERROR, "{}, while writing to socket ({})", e.displayText(), peer_address.toString()); + throw NetException(ErrorCodes::NETWORK_ERROR, "{}, while writing to socket ({} -> {})", e.displayText(), + our_address.toString(), peer_address.toString()); } catch (const Poco::TimeoutException &) { @@ -74,18 +75,20 @@ void WriteBufferFromPocoSocket::nextImpl() } catch (const Poco::IOException & e) { - throw NetException(ErrorCodes::NETWORK_ERROR, "{}, while writing to socket ({})", e.displayText(), peer_address.toString()); + throw NetException(ErrorCodes::NETWORK_ERROR, "{}, while writing to socket ({} -> {})", e.displayText(), + our_address.toString(), peer_address.toString()); } if (res < 0) - throw NetException(ErrorCodes::CANNOT_WRITE_TO_SOCKET, "Cannot write to socket ({})", peer_address.toString()); + throw NetException(ErrorCodes::CANNOT_WRITE_TO_SOCKET, "Cannot write to socket ({} -> {})", + our_address.toString(), peer_address.toString()); bytes_written += res; } } WriteBufferFromPocoSocket::WriteBufferFromPocoSocket(Poco::Net::Socket & socket_, size_t buf_size) - : BufferWithOwnMemory(buf_size), socket(socket_), peer_address(socket.peerAddress()) + : BufferWithOwnMemory(buf_size), socket(socket_), peer_address(socket.peerAddress()), our_address(socket.address()) { } diff --git a/src/IO/WriteBufferFromPocoSocket.h b/src/IO/WriteBufferFromPocoSocket.h index 295ca16ecaf..ffe1176c8cd 100644 --- a/src/IO/WriteBufferFromPocoSocket.h +++ b/src/IO/WriteBufferFromPocoSocket.h @@ -28,6 +28,7 @@ protected: * (getpeername will return an error). */ Poco::Net::SocketAddress peer_address; + Poco::Net::SocketAddress our_address; }; } diff --git a/src/Interpreters/executeQuery.cpp b/src/Interpreters/executeQuery.cpp index f3d83a37c59..5e1e4cb58fb 100644 --- a/src/Interpreters/executeQuery.cpp +++ b/src/Interpreters/executeQuery.cpp @@ -176,7 +176,7 @@ static void setExceptionStackTrace(QueryLogElement & elem) /// Log exception (with query info) into text log (not into system table). -static void logException(ContextPtr context, QueryLogElement & elem) +static void logException(ContextPtr context, QueryLogElement & elem, bool log_error = true) { String comment; if (!elem.log_comment.empty()) @@ -187,7 +187,7 @@ static void logException(ContextPtr context, QueryLogElement & elem) PreformattedMessage message; message.format_string = elem.exception_format_string; - if (elem.stack_trace.empty()) + if (elem.stack_trace.empty() || !log_error) message.text = fmt::format("{} (from {}){} (in query: {})", elem.exception, context->getClientInfo().current_address.toString(), comment, @@ -201,7 +201,10 @@ static void logException(ContextPtr context, QueryLogElement & elem) toOneLineQuery(elem.query), elem.stack_trace); - LOG_ERROR(&Poco::Logger::get("executeQuery"), message); + if (log_error) + LOG_ERROR(&Poco::Logger::get("executeQuery"), message); + else + LOG_INFO(&Poco::Logger::get("executeQuery"), message); } static void onExceptionBeforeStart( @@ -1101,7 +1104,7 @@ static std::tuple executeQueryImpl( quota(quota), status_info_to_query_log, implicit_txn_control, - query_span]() mutable + query_span](bool log_error) mutable { if (implicit_txn_control) { @@ -1139,9 +1142,9 @@ static std::tuple executeQueryImpl( elem.query_duration_ms = start_watch.elapsedMilliseconds(); } - if (current_settings.calculate_text_stack_trace) + if (current_settings.calculate_text_stack_trace && log_error) setExceptionStackTrace(elem); - logException(context, elem); + logException(context, elem, log_error); /// In case of exception we log internal queries also if (log_queries && elem.type >= log_queries_min_type && static_cast(elem.query_duration_ms) >= log_queries_min_query_duration_ms) diff --git a/src/QueryPipeline/BlockIO.cpp b/src/QueryPipeline/BlockIO.cpp index 9af7cd2b772..231c369707e 100644 --- a/src/QueryPipeline/BlockIO.cpp +++ b/src/QueryPipeline/BlockIO.cpp @@ -4,6 +4,10 @@ namespace DB { +namespace ErrorCodes +{ + extern const int QUERY_WAS_CANCELLED; +} void BlockIO::reset() { @@ -58,7 +62,26 @@ void BlockIO::onFinish() void BlockIO::onException() { if (exception_callback) - exception_callback(); + exception_callback(/* log_error */ true); + + pipeline.reset(); +} + +void BlockIO::onCancelOrConnectionLoss() +{ + /// Query was not finished gracefully, so we should call exception_callback + /// But we don't have a real exception + if (exception_callback) + { + try + { + throw Exception(ErrorCodes::QUERY_WAS_CANCELLED, "Query was cancelled or a client has unexpectedly dropped the connection"); + } + catch (...) + { + exception_callback(/* log_error */ false); + } + } pipeline.reset(); } diff --git a/src/QueryPipeline/BlockIO.h b/src/QueryPipeline/BlockIO.h index 4c8d29d0ba8..ff85a0d6772 100644 --- a/src/QueryPipeline/BlockIO.h +++ b/src/QueryPipeline/BlockIO.h @@ -26,13 +26,14 @@ struct BlockIO /// Callbacks for query logging could be set here. std::function finish_callback; - std::function exception_callback; + std::function exception_callback; /// When it is true, don't bother sending any non-empty blocks to the out stream bool null_format = false; void onFinish(); void onException(); + void onCancelOrConnectionLoss(); /// Set is_all_data_sent in system.processes for this query. void setAllDataSent() const; diff --git a/src/Server/TCPHandler.cpp b/src/Server/TCPHandler.cpp index 1f06f6a4ae9..9f53e418aec 100644 --- a/src/Server/TCPHandler.cpp +++ b/src/Server/TCPHandler.cpp @@ -416,17 +416,25 @@ void TCPHandler::runImpl() after_check_cancelled.restart(); after_send_progress.restart(); + auto finish_or_cancel = [this]() + { + if (state.is_cancelled) + state.io.onCancelOrConnectionLoss(); + else + state.io.onFinish(); + }; + if (state.io.pipeline.pushing()) { /// FIXME: check explicitly that insert query suggests to receive data via native protocol, state.need_receive_data_for_insert = true; processInsertQuery(); - state.io.onFinish(); + finish_or_cancel(); } else if (state.io.pipeline.pulling()) { processOrdinaryQueryWithProcessors(); - state.io.onFinish(); + finish_or_cancel(); } else if (state.io.pipeline.completed()) { @@ -455,7 +463,7 @@ void TCPHandler::runImpl() executor.execute(); } - state.io.onFinish(); + finish_or_cancel(); std::lock_guard lock(task_callback_mutex); @@ -469,7 +477,7 @@ void TCPHandler::runImpl() } else { - state.io.onFinish(); + finish_or_cancel(); } /// Do it before sending end of stream, to have a chance to show log message in client. diff --git a/src/Storages/Distributed/DistributedSink.cpp b/src/Storages/Distributed/DistributedSink.cpp index bac13ea37cf..b2bbd02f879 100644 --- a/src/Storages/Distributed/DistributedSink.cpp +++ b/src/Storages/Distributed/DistributedSink.cpp @@ -569,6 +569,26 @@ void DistributedSink::onFinish() } } +void DistributedSink::onCancel() +{ + if (pool && !pool->finished()) + { + try + { + pool->wait(); + } + catch (...) + { + tryLogCurrentException(storage.log); + } + } + + for (auto & shard_jobs : per_shard_jobs) + for (JobReplica & job : shard_jobs.replicas_jobs) + if (job.executor) + job.executor->cancel(); +} + IColumn::Selector DistributedSink::createSelector(const Block & source_block) const { diff --git a/src/Storages/Distributed/DistributedSink.h b/src/Storages/Distributed/DistributedSink.h index af0c64cbd78..325d5859289 100644 --- a/src/Storages/Distributed/DistributedSink.h +++ b/src/Storages/Distributed/DistributedSink.h @@ -54,6 +54,8 @@ public: void onFinish() override; private: + void onCancel() override; + IColumn::Selector createSelector(const Block & source_block) const; void writeAsync(const Block & block); diff --git a/tests/integration/test_insert_into_distributed/test.py b/tests/integration/test_insert_into_distributed/test.py index a52809f817c..3bee2149387 100644 --- a/tests/integration/test_insert_into_distributed/test.py +++ b/tests/integration/test_insert_into_distributed/test.py @@ -288,7 +288,7 @@ def test_inserts_single_replica_no_internal_replication(started_cluster): "prefer_localhost_replica": "0", }, ) - assert node2.query("SELECT count(*) FROM single_replicated").strip() == "1" + assert node2.query("SELECT count(*) FROM single_replicated").strip() == "0" finally: node2.query("TRUNCATE TABLE single_replicated") diff --git a/tests/queries/0_stateless/02434_cancel_insert_when_client_dies.sh b/tests/queries/0_stateless/02434_cancel_insert_when_client_dies.sh index 6cae90a3cc3..2e653f2f1a3 100755 --- a/tests/queries/0_stateless/02434_cancel_insert_when_client_dies.sh +++ b/tests/queries/0_stateless/02434_cancel_insert_when_client_dies.sh @@ -11,20 +11,25 @@ export TEST_MARK="02434_insert_${CLICKHOUSE_DATABASE}_" $CLICKHOUSE_CLIENT -q 'select * from numbers(5000000) format TSV' > $DATA_FILE $CLICKHOUSE_CLIENT -q 'create table dedup_test(A Int64) Engine = MergeTree order by A settings non_replicated_deduplication_window=1000;' +$CLICKHOUSE_CLIENT -q "create table dedup_dist(A Int64) Engine = Distributed('test_cluster_one_shard_two_replicas', currentDatabase(), dedup_test)" function insert_data { SETTINGS="query_id=$ID&max_insert_block_size=110000&min_insert_block_size_rows=110000" # max_block_size=10000, so external table will contain smaller blocks that will be squashed on insert-select (more chances to catch a bug on query cancellation) TRASH_SETTINGS="query_id=$ID&input_format_parallel_parsing=0&max_threads=1&max_insert_threads=1&max_insert_block_size=110000&max_block_size=10000&min_insert_block_size_bytes=0&min_insert_block_size_rows=110000&max_insert_block_size=110000" - TYPE=$(( RANDOM % 4 )) + TYPE=$(( RANDOM % 5 )) if [[ "$TYPE" -eq 0 ]]; then # client will send 10000-rows blocks, server will squash them into 110000-rows blocks (more chances to catch a bug on query cancellation) - $CLICKHOUSE_CLIENT --max_block_size=10000 --max_insert_block_size=10000 --query_id="$ID" -q 'insert into dedup_test settings max_insert_block_size=110000, min_insert_block_size_rows=110000 format TSV' < $DATA_FILE + $CLICKHOUSE_CLIENT --max_block_size=10000 --max_insert_block_size=10000 --query_id="$ID" \ + -q 'insert into dedup_test settings max_insert_block_size=110000, min_insert_block_size_rows=110000 format TSV' < $DATA_FILE elif [[ "$TYPE" -eq 1 ]]; then - $CLICKHOUSE_CURL -sS -X POST --data-binary @- "$CLICKHOUSE_URL&$SETTINGS&query=insert+into+dedup_test+format+TSV" < $DATA_FILE + $CLICKHOUSE_CLIENT --max_block_size=10000 --max_insert_block_size=10000 --query_id="$ID" --prefer_localhost_replica="$(( RANDOM % 2))" \ + -q 'insert into dedup_dist settings max_insert_block_size=110000, min_insert_block_size_rows=110000 format TSV' < $DATA_FILE elif [[ "$TYPE" -eq 2 ]]; then + $CLICKHOUSE_CURL -sS -X POST --data-binary @- "$CLICKHOUSE_URL&$SETTINGS&query=insert+into+dedup_test+format+TSV" < $DATA_FILE + elif [[ "$TYPE" -eq 3 ]]; then $CLICKHOUSE_CURL -sS -X POST -H "Transfer-Encoding: chunked" --data-binary @- "$CLICKHOUSE_URL&$SETTINGS&query=insert+into+dedup_test+format+TSV" < $DATA_FILE else $CLICKHOUSE_CURL -sS -F 'file=@-' "$CLICKHOUSE_URL&$TRASH_SETTINGS&file_format=TSV&file_types=UInt64" -X POST --form-string 'query=insert into dedup_test select * from file' < $DATA_FILE @@ -73,7 +78,7 @@ export -f thread_insert; export -f thread_select; export -f thread_cancel; -TIMEOUT=40 # 10 seconds for each TYPE +TIMEOUT=40 timeout $TIMEOUT bash -c thread_insert & timeout $TIMEOUT bash -c thread_select & diff --git a/tests/queries/0_stateless/02435_rollback_cancelled_queries.sh b/tests/queries/0_stateless/02435_rollback_cancelled_queries.sh index 18317960cdf..a69e526c1c8 100755 --- a/tests/queries/0_stateless/02435_rollback_cancelled_queries.sh +++ b/tests/queries/0_stateless/02435_rollback_cancelled_queries.sh @@ -114,6 +114,6 @@ $CLICKHOUSE_CLIENT --implicit_transaction=1 -q 'select throwIf(count() % 1000000 # So use this query to check that thread_cancel do something $CLICKHOUSE_CLIENT -q "select count() > 0 from system.text_log where event_date >= yesterday() and query_id like '$TEST_MARK%' and ( message_format_string in ('Unexpected end of file while reading chunk header of HTTP chunked data', 'Unexpected EOF, got {} of {} bytes') or - message like '%Connection reset by peer%')" + message like '%Connection reset by peer%' or message like '%Broken pipe, while writing to socket%')" $CLICKHOUSE_CLIENT --database_atomic_wait_for_drop_and_detach_synchronously=0 -q "drop table dedup_test" diff --git a/utils/check-mysql-binlog/main.cpp b/utils/check-mysql-binlog/main.cpp index cf2a27e8aac..68558340180 100644 --- a/utils/check-mysql-binlog/main.cpp +++ b/utils/check-mysql-binlog/main.cpp @@ -18,7 +18,7 @@ static DB::MySQLReplication::BinlogEventPtr parseSingleEventBody( { DB::MySQLReplication::BinlogEventPtr event; DB::ReadBufferPtr limit_read_buffer = std::make_shared(payload, header.event_size - 19, - /* trow_exception */ false, /* exact_limit */ {}); + /* trow_exception */ false, /* exact_limit */ std::nullopt); DB::ReadBufferPtr event_payload = std::make_shared(*limit_read_buffer, exist_checksum ? 4 : 0); switch (header.type) From 940035f1086a7e7c6bdb375304d9166024ebddd4 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Sat, 25 Feb 2023 01:31:38 +0100 Subject: [PATCH 198/841] fix --- .../queries/0_stateless/02434_cancel_insert_when_client_dies.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/queries/0_stateless/02434_cancel_insert_when_client_dies.sh b/tests/queries/0_stateless/02434_cancel_insert_when_client_dies.sh index 2e653f2f1a3..2a17095b267 100755 --- a/tests/queries/0_stateless/02434_cancel_insert_when_client_dies.sh +++ b/tests/queries/0_stateless/02434_cancel_insert_when_client_dies.sh @@ -40,6 +40,7 @@ export -f insert_data ID="02434_insert_init_${CLICKHOUSE_DATABASE}_$RANDOM" insert_data +$CLICKHOUSE_CLIENT -q "system flush distributed dedup_dist" $CLICKHOUSE_CLIENT -q 'select count() from dedup_test' function thread_insert From dce319e1c5752c58d222b79d8c5a3c17761721c8 Mon Sep 17 00:00:00 2001 From: Sema Checherinda Date: Mon, 20 Feb 2023 21:30:57 +0100 Subject: [PATCH 199/841] add multitreading for StorageSystemDetachedParts --- .../System/StorageSystemDetachedParts.cpp | 300 +++++++++++++----- 1 file changed, 227 insertions(+), 73 deletions(-) diff --git a/src/Storages/System/StorageSystemDetachedParts.cpp b/src/Storages/System/StorageSystemDetachedParts.cpp index 494f9c9c31f..2da3fb3b988 100644 --- a/src/Storages/System/StorageSystemDetachedParts.cpp +++ b/src/Storages/System/StorageSystemDetachedParts.cpp @@ -8,10 +8,218 @@ #include #include #include +#include +#include + +#include namespace DB { +namespace +{ + +static void partFilesOnDiskImpl(const DiskPtr & disk, const String & from, std::vector & files) +{ + if (disk->isFile(from)) + { + files.push_back(from); + } + else + { + for (auto it = disk->iterateDirectory(from); it->isValid(); it->next()) + partFilesOnDiskImpl(disk, fs::path(from) / it->name(), files); + } +} + +static std::vector partFilesOnDisk(const DiskPtr & disk, const String & from) +{ + std::vector files; + try + { + partFilesOnDiskImpl(disk, from, files); + } + catch (...) + { + tryLogCurrentException(__PRETTY_FUNCTION__); + } + return files; +} + +class SourceState +{ + std::mutex mutex; + StoragesInfoStream stream; + +public: + SourceState(StoragesInfoStream && stream_) + : stream(std::move(stream_)) + {} + + StoragesInfo next() + { + std::lock_guard lock(mutex); + return stream.next(); + } +}; + +class DetachedPartsSource : public ISource +{ +public: + DetachedPartsSource(Block header_, std::shared_ptr state_, std::vector columns_mask_, UInt64 block_size_, + bool has_bytes_on_disk_column_) + : ISource(std::move(header_)) + , state(state_) + , columns_mask(std::move(columns_mask_)) + , block_size(block_size_) + , has_bytes_on_disk_column(has_bytes_on_disk_column_) + {} + + String getName() const override { return "DataPartsSource"; } + +protected: + Chunk generate() override + { + Chunk result; + + while (result.getNumRows() < block_size) + { + if (detached_parts.empty()) + get_more_parts(); + + if (detached_parts.empty()) + { + progress(result.getNumRows(), result.bytes()); + return result; + } + + Chunk chunk = generate_chunk(block_size - result.getNumRows()); + + if (result) + result.append(chunk); + else + result = std::move(chunk); + } + + progress(result.getNumRows(), result.bytes()); + return result; + } + +private: + std::shared_ptr state; + const std::vector columns_mask; + const UInt64 block_size; + const bool has_bytes_on_disk_column; + + StoragesInfo current_info; + DetachedPartsInfo detached_parts; + + void get_more_parts() + { + chassert(detached_parts.empty()); + + current_info = state->next(); + if (!current_info) + return; + + detached_parts = current_info.data->getDetachedParts(); + } + + Chunk generate_chunk(size_t max_rows) + { + chassert(current_info); + + auto rows = std::min(max_rows, detached_parts.size()); + auto begin = detached_parts.size() - rows; + + std::vector> parts_sizes(rows); + + if (has_bytes_on_disk_column) + { + std::vector> futures; + SCOPE_EXIT_SAFE({ + /// Exceptions are not propagated + for (auto & future : futures) + if (future.valid()) + future.wait(); + futures.clear(); + }); + + for (auto p_id = begin; p_id < detached_parts.size(); ++p_id) + { + auto & p = detached_parts.at(p_id); + DiskPtr & disk = p.disk; + + const String part_path = fs::path(MergeTreeData::DETACHED_DIR_NAME) / p.dir_name; + const String relative_path = fs::path(current_info.data->getRelativeDataPath()) / part_path; + + std::vector listing = partFilesOnDisk(disk, relative_path); + chassert(listing.size() > 0); + auto * counter = &parts_sizes[p_id - begin]; + for (const auto & file : listing) + { + futures.push_back( + scheduleFromThreadPool( + [disk, file, counter] () + { + size_t size = disk->getFileSize(file); + counter->fetch_add(size); + }, + IOThreadPool::get(), + "DP_BytesOnDisk")); + } + } + + /// Exceptions are propagated + for (auto & future : futures) + future.get(); + } + + MutableColumns new_columns = getPort().getHeader().cloneEmptyColumns(); + + for (auto p_id = begin; p_id < detached_parts.size(); ++p_id) + { + auto & p = detached_parts.at(p_id); + + size_t src_index = 0; + size_t res_index = 0; + String detached_part_path = fs::path(MergeTreeData::DETACHED_DIR_NAME) / p.dir_name; + if (columns_mask[src_index++]) + new_columns[res_index++]->insert(current_info.database); + if (columns_mask[src_index++]) + new_columns[res_index++]->insert(current_info.table); + if (columns_mask[src_index++]) + new_columns[res_index++]->insert(p.valid_name ? p.partition_id : Field()); + if (columns_mask[src_index++]) + new_columns[res_index++]->insert(p.dir_name); + if (columns_mask[src_index++]) + { + chassert(has_bytes_on_disk_column); + size_t bytes_on_disk = parts_sizes.at(p_id - begin).load(); + new_columns[res_index++]->insert(bytes_on_disk); + } + if (columns_mask[src_index++]) + new_columns[res_index++]->insert(p.disk->getName()); + if (columns_mask[src_index++]) + new_columns[res_index++]->insert((fs::path(current_info.data->getFullPathOnDisk(p.disk)) / detached_part_path).string()); + if (columns_mask[src_index++]) + new_columns[res_index++]->insert(p.valid_name ? p.prefix : Field()); + if (columns_mask[src_index++]) + new_columns[res_index++]->insert(p.valid_name ? p.min_block : Field()); + if (columns_mask[src_index++]) + new_columns[res_index++]->insert(p.valid_name ? p.max_block : Field()); + if (columns_mask[src_index++]) + new_columns[res_index++]->insert(p.valid_name ? p.level : Field()); + } + + detached_parts.resize(begin); + + return {std::move(new_columns), rows}; + } +}; + +} + StorageSystemDetachedParts::StorageSystemDetachedParts(const StorageID & table_id_) : IStorage(table_id_) { @@ -31,33 +239,6 @@ StorageSystemDetachedParts::StorageSystemDetachedParts(const StorageID & table_i }}); setInMemoryMetadata(storage_metadata); } -static void calculateTotalSizeOnDiskImpl(const DiskPtr & disk, const String & from, UInt64 & total_size) -{ - /// Files or directories of detached part may not exist. Only count the size of existing files. - if (disk->isFile(from)) - { - total_size += disk->getFileSize(from); - } - else - { - for (auto it = disk->iterateDirectory(from); it->isValid(); it->next()) - calculateTotalSizeOnDiskImpl(disk, fs::path(from) / it->name(), total_size); - } -} - -static UInt64 calculateTotalSizeOnDisk(const DiskPtr & disk, const String & from) -{ - UInt64 total_size = 0; - try - { - calculateTotalSizeOnDiskImpl(disk, from, total_size); - } - catch (...) - { - tryLogCurrentException(__PRETTY_FUNCTION__); - } - return total_size; -} Pipe StorageSystemDetachedParts::read( const Names & column_names, @@ -65,66 +246,39 @@ Pipe StorageSystemDetachedParts::read( SelectQueryInfo & query_info, ContextPtr context, QueryProcessingStage::Enum /*processed_stage*/, - const size_t /*max_block_size*/, - const size_t /*num_streams*/) + const size_t max_block_size, + const size_t num_streams) { storage_snapshot->check(column_names); - - StoragesInfoStream stream(query_info, context); - - /// Create the result. - Block block = storage_snapshot->metadata->getSampleBlock(); + Block sample_block = storage_snapshot->metadata->getSampleBlock(); NameSet names_set(column_names.begin(), column_names.end()); - std::vector columns_mask(block.columns()); - Block header; - for (size_t i = 0; i < block.columns(); ++i) + Block header; + std::vector columns_mask(sample_block.columns()); + + for (size_t i = 0; i < columns_mask.size(); ++i) { - if (names_set.contains(block.getByPosition(i).name)) + if (names_set.contains(sample_block.getByPosition(i).name)) { columns_mask[i] = 1; - header.insert(block.getByPosition(i)); + header.insert(sample_block.getByPosition(i)); } } - MutableColumns new_columns = header.cloneEmptyColumns(); - while (StoragesInfo info = stream.next()) + bool has_bytes_on_disk_column = names_set.contains("bytes_on_disk"); + + auto state = std::make_shared(StoragesInfoStream(query_info, context)); + + Pipe pipe; + + for (size_t i = 0; i < num_streams; ++i) { - const auto parts = info.data->getDetachedParts(); - for (const auto & p : parts) - { - size_t src_index = 0, res_index = 0; - String detached_part_path = fs::path(MergeTreeData::DETACHED_DIR_NAME) / p.dir_name; - if (columns_mask[src_index++]) - new_columns[res_index++]->insert(info.database); - if (columns_mask[src_index++]) - new_columns[res_index++]->insert(info.table); - if (columns_mask[src_index++]) - new_columns[res_index++]->insert(p.valid_name ? p.partition_id : Field()); - if (columns_mask[src_index++]) - new_columns[res_index++]->insert(p.dir_name); - if (columns_mask[src_index++]) - new_columns[res_index++]->insert(calculateTotalSizeOnDisk(p.disk, fs::path(info.data->getRelativeDataPath()) / detached_part_path)); - if (columns_mask[src_index++]) - new_columns[res_index++]->insert(p.disk->getName()); - if (columns_mask[src_index++]) - new_columns[res_index++]->insert((fs::path(info.data->getFullPathOnDisk(p.disk)) / detached_part_path).string()); - if (columns_mask[src_index++]) - new_columns[res_index++]->insert(p.valid_name ? p.prefix : Field()); - if (columns_mask[src_index++]) - new_columns[res_index++]->insert(p.valid_name ? p.min_block : Field()); - if (columns_mask[src_index++]) - new_columns[res_index++]->insert(p.valid_name ? p.max_block : Field()); - if (columns_mask[src_index++]) - new_columns[res_index++]->insert(p.valid_name ? p.level : Field()); - } + auto source = std::make_shared(header.cloneEmpty(), state, columns_mask, max_block_size, has_bytes_on_disk_column); + pipe.addSource(std::move(source)); } - UInt64 num_rows = new_columns.at(0)->size(); - Chunk chunk(std::move(new_columns), num_rows); - - return Pipe(std::make_shared(std::move(header), std::move(chunk))); + return pipe; } } From 8abc1f0d5deaf6442c0bda4e5a4b19b8f5411da1 Mon Sep 17 00:00:00 2001 From: Sema Checherinda Date: Tue, 21 Feb 2023 11:37:13 +0100 Subject: [PATCH 200/841] fix build and style --- .../System/StorageSystemDetachedParts.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/Storages/System/StorageSystemDetachedParts.cpp b/src/Storages/System/StorageSystemDetachedParts.cpp index 2da3fb3b988..0b92dc0dd3c 100644 --- a/src/Storages/System/StorageSystemDetachedParts.cpp +++ b/src/Storages/System/StorageSystemDetachedParts.cpp @@ -19,7 +19,7 @@ namespace DB namespace { -static void partFilesOnDiskImpl(const DiskPtr & disk, const String & from, std::vector & files) +void partFilesOnDiskImpl(const DiskPtr & disk, const String & from, std::vector & files) { if (disk->isFile(from)) { @@ -32,7 +32,7 @@ static void partFilesOnDiskImpl(const DiskPtr & disk, const String & from, std:: } } -static std::vector partFilesOnDisk(const DiskPtr & disk, const String & from) +std::vector partFilesOnDisk(const DiskPtr & disk, const String & from) { std::vector files; try @@ -85,7 +85,7 @@ protected: while (result.getNumRows() < block_size) { if (detached_parts.empty()) - get_more_parts(); + getMoreParts(); if (detached_parts.empty()) { @@ -93,7 +93,7 @@ protected: return result; } - Chunk chunk = generate_chunk(block_size - result.getNumRows()); + Chunk chunk = generateChunk(block_size - result.getNumRows()); if (result) result.append(chunk); @@ -114,7 +114,7 @@ private: StoragesInfo current_info; DetachedPartsInfo detached_parts; - void get_more_parts() + void getMoreParts() { chassert(detached_parts.empty()); @@ -125,7 +125,7 @@ private: detached_parts = current_info.data->getDetachedParts(); } - Chunk generate_chunk(size_t max_rows) + Chunk generateChunk(size_t max_rows) { chassert(current_info); @@ -152,10 +152,9 @@ private: const String part_path = fs::path(MergeTreeData::DETACHED_DIR_NAME) / p.dir_name; const String relative_path = fs::path(current_info.data->getRelativeDataPath()) / part_path; + auto * counter = &parts_sizes[p_id - begin]; std::vector listing = partFilesOnDisk(disk, relative_path); - chassert(listing.size() > 0); - auto * counter = &parts_sizes[p_id - begin]; for (const auto & file : listing) { futures.push_back( From 3b582493204ea26c7a3b48b2a18d7e1a86c9af96 Mon Sep 17 00:00:00 2001 From: Sema Checherinda Date: Tue, 21 Feb 2023 16:19:28 +0100 Subject: [PATCH 201/841] pack several files in one thread --- .../System/StorageSystemDetachedParts.cpp | 89 ++++++++++--------- 1 file changed, 49 insertions(+), 40 deletions(-) diff --git a/src/Storages/System/StorageSystemDetachedParts.cpp b/src/Storages/System/StorageSystemDetachedParts.cpp index 0b92dc0dd3c..6e40a3a3130 100644 --- a/src/Storages/System/StorageSystemDetachedParts.cpp +++ b/src/Storages/System/StorageSystemDetachedParts.cpp @@ -110,6 +110,7 @@ private: const std::vector columns_mask; const UInt64 block_size; const bool has_bytes_on_disk_column; + static const size_t files_peer_thread = 15; StoragesInfo current_info; DetachedPartsInfo detached_parts; @@ -125,6 +126,53 @@ private: detached_parts = current_info.data->getDetachedParts(); } + void calculatePartSizeOnDisk(size_t begin, std::vector> & parts_sizes) + { + if (!has_bytes_on_disk_column) + return; + + std::vector> futures; + SCOPE_EXIT_SAFE({ + /// Exceptions are not propagated + for (auto & future : futures) + if (future.valid()) + future.wait(); + futures.clear(); + }); + + for (auto p_id = begin; p_id < detached_parts.size(); ++p_id) + { + auto & p = detached_parts.at(p_id); + DiskPtr & disk = p.disk; + + const String part_path = fs::path(MergeTreeData::DETACHED_DIR_NAME) / p.dir_name; + const String relative_path = fs::path(current_info.data->getRelativeDataPath()) / part_path; + std::vector listing = partFilesOnDisk(disk, relative_path); + + auto * counter = &parts_sizes[p_id - begin]; + for (size_t slice_begin = 0; slice_begin < listing.size(); slice_begin += files_peer_thread) + { + size_t slice_end = std::min(slice_begin + files_peer_thread, listing.size()); + auto slice = std::vector(listing.begin() + slice_begin, listing.begin() + slice_end); + futures.push_back( + scheduleFromThreadPool( + [disk, counter, files = std::move(slice)] () + { + size_t partial_files_size = 0; + for (const auto & file : files) + partial_files_size += disk->getFileSize(file); + counter->fetch_add(partial_files_size); + }, + IOThreadPool::get(), + "DP_BytesOnDisk")); + } + } + + /// Exceptions are propagated + for (auto & future : futures) + future.get(); + } + Chunk generateChunk(size_t max_rows) { chassert(current_info); @@ -133,46 +181,7 @@ private: auto begin = detached_parts.size() - rows; std::vector> parts_sizes(rows); - - if (has_bytes_on_disk_column) - { - std::vector> futures; - SCOPE_EXIT_SAFE({ - /// Exceptions are not propagated - for (auto & future : futures) - if (future.valid()) - future.wait(); - futures.clear(); - }); - - for (auto p_id = begin; p_id < detached_parts.size(); ++p_id) - { - auto & p = detached_parts.at(p_id); - DiskPtr & disk = p.disk; - - const String part_path = fs::path(MergeTreeData::DETACHED_DIR_NAME) / p.dir_name; - const String relative_path = fs::path(current_info.data->getRelativeDataPath()) / part_path; - auto * counter = &parts_sizes[p_id - begin]; - - std::vector listing = partFilesOnDisk(disk, relative_path); - for (const auto & file : listing) - { - futures.push_back( - scheduleFromThreadPool( - [disk, file, counter] () - { - size_t size = disk->getFileSize(file); - counter->fetch_add(size); - }, - IOThreadPool::get(), - "DP_BytesOnDisk")); - } - } - - /// Exceptions are propagated - for (auto & future : futures) - future.get(); - } + calculatePartSizeOnDisk(begin, parts_sizes); MutableColumns new_columns = getPort().getHeader().cloneEmptyColumns(); From ef0c1841af125641b6822b899b22bee897f073ca Mon Sep 17 00:00:00 2001 From: Sema Checherinda Date: Tue, 21 Feb 2023 22:55:58 +0100 Subject: [PATCH 202/841] work with comments on review --- .../System/StorageSystemDetachedParts.cpp | 39 +++++++++---------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/src/Storages/System/StorageSystemDetachedParts.cpp b/src/Storages/System/StorageSystemDetachedParts.cpp index 6e40a3a3130..2fae788298c 100644 --- a/src/Storages/System/StorageSystemDetachedParts.cpp +++ b/src/Storages/System/StorageSystemDetachedParts.cpp @@ -78,31 +78,34 @@ public: String getName() const override { return "DataPartsSource"; } protected: + Chunk nullWhenNoRows(MutableColumns && new_columns) + { + chassert(!new_columns.empty()); + const auto rows = new_columns[0]->size(); + + if (!rows) + return {}; + + return {std::move(new_columns), rows}; + } + Chunk generate() override { - Chunk result; + MutableColumns new_columns = getPort().getHeader().cloneEmptyColumns(); + chassert(!new_columns.empty()); - while (result.getNumRows() < block_size) + while (new_columns[0]->size() < block_size) { if (detached_parts.empty()) getMoreParts(); if (detached_parts.empty()) - { - progress(result.getNumRows(), result.bytes()); - return result; - } + return nullWhenNoRows(std::move(new_columns)); - Chunk chunk = generateChunk(block_size - result.getNumRows()); - - if (result) - result.append(chunk); - else - result = std::move(chunk); + generateRows(new_columns, block_size - new_columns[0]->size()); } - progress(result.getNumRows(), result.bytes()); - return result; + return nullWhenNoRows(std::move(new_columns)); } private: @@ -110,7 +113,7 @@ private: const std::vector columns_mask; const UInt64 block_size; const bool has_bytes_on_disk_column; - static const size_t files_peer_thread = 15; + static const size_t files_peer_thread = 30; StoragesInfo current_info; DetachedPartsInfo detached_parts; @@ -173,7 +176,7 @@ private: future.get(); } - Chunk generateChunk(size_t max_rows) + void generateRows(MutableColumns & new_columns, size_t max_rows) { chassert(current_info); @@ -183,8 +186,6 @@ private: std::vector> parts_sizes(rows); calculatePartSizeOnDisk(begin, parts_sizes); - MutableColumns new_columns = getPort().getHeader().cloneEmptyColumns(); - for (auto p_id = begin; p_id < detached_parts.size(); ++p_id) { auto & p = detached_parts.at(p_id); @@ -221,8 +222,6 @@ private: } detached_parts.resize(begin); - - return {std::move(new_columns), rows}; } }; From e5cbe4311eaae25d91aa5470690baf913029f17e Mon Sep 17 00:00:00 2001 From: Sema Checherinda Date: Wed, 22 Feb 2023 14:14:25 +0100 Subject: [PATCH 203/841] create limites count of support threads for a block --- .../System/StorageSystemDetachedParts.cpp | 76 ++++++++++++------- 1 file changed, 47 insertions(+), 29 deletions(-) diff --git a/src/Storages/System/StorageSystemDetachedParts.cpp b/src/Storages/System/StorageSystemDetachedParts.cpp index 2fae788298c..9ca0c921358 100644 --- a/src/Storages/System/StorageSystemDetachedParts.cpp +++ b/src/Storages/System/StorageSystemDetachedParts.cpp @@ -52,7 +52,7 @@ class SourceState StoragesInfoStream stream; public: - SourceState(StoragesInfoStream && stream_) + explicit SourceState(StoragesInfoStream && stream_) : stream(std::move(stream_)) {} @@ -78,7 +78,7 @@ public: String getName() const override { return "DataPartsSource"; } protected: - Chunk nullWhenNoRows(MutableColumns && new_columns) + static Chunk nullWhenNoRows(MutableColumns && new_columns) { chassert(!new_columns.empty()); const auto rows = new_columns[0]->size(); @@ -113,7 +113,7 @@ private: const std::vector columns_mask; const UInt64 block_size; const bool has_bytes_on_disk_column; - static const size_t files_peer_thread = 30; + static const size_t support_threads = 35; StoragesInfo current_info; DetachedPartsInfo detached_parts; @@ -134,6 +134,36 @@ private: if (!has_bytes_on_disk_column) return; + struct Task + { + DiskPtr disk; + String file; + std::atomic * counter = nullptr; + }; + + struct SharedState + { + std::vector tasks; + std::atomic next_task = {0}; + }; + + SharedState shared_state; + + for (auto p_id = begin; p_id < detached_parts.size(); ++p_id) + { + auto & p = detached_parts.at(p_id); + auto & disk = p.disk; + + auto part_path = fs::path(MergeTreeData::DETACHED_DIR_NAME) / p.dir_name; + auto relative_path = fs::path(current_info.data->getRelativeDataPath()) / part_path; + auto listing = partFilesOnDisk(disk, relative_path); + + auto * counter = &parts_sizes[p_id - begin]; + + for (auto & file : listing) + shared_state.tasks.push_back({disk, file, counter}); + } + std::vector> futures; SCOPE_EXIT_SAFE({ /// Exceptions are not propagated @@ -143,32 +173,21 @@ private: futures.clear(); }); - for (auto p_id = begin; p_id < detached_parts.size(); ++p_id) + for (size_t i = 0; i < support_threads; ++i) { - auto & p = detached_parts.at(p_id); - DiskPtr & disk = p.disk; - - const String part_path = fs::path(MergeTreeData::DETACHED_DIR_NAME) / p.dir_name; - const String relative_path = fs::path(current_info.data->getRelativeDataPath()) / part_path; - std::vector listing = partFilesOnDisk(disk, relative_path); - - auto * counter = &parts_sizes[p_id - begin]; - for (size_t slice_begin = 0; slice_begin < listing.size(); slice_begin += files_peer_thread) - { - size_t slice_end = std::min(slice_begin + files_peer_thread, listing.size()); - auto slice = std::vector(listing.begin() + slice_begin, listing.begin() + slice_end); - futures.push_back( - scheduleFromThreadPool( - [disk, counter, files = std::move(slice)] () + futures.push_back( + scheduleFromThreadPool( + [&shared_state] () + { + for (auto id = shared_state.next_task++; id < shared_state.tasks.size(); id = shared_state.next_task++) { - size_t partial_files_size = 0; - for (const auto & file : files) - partial_files_size += disk->getFileSize(file); - counter->fetch_add(partial_files_size); - }, - IOThreadPool::get(), - "DP_BytesOnDisk")); - } + auto & task = shared_state.tasks.at(id); + auto size = task.disk->getFileSize(task.file); + task.counter->fetch_add(size); + } + }, + IOThreadPool::get(), + "DP_BytesOnDisk")); } /// Exceptions are propagated @@ -192,7 +211,6 @@ private: size_t src_index = 0; size_t res_index = 0; - String detached_part_path = fs::path(MergeTreeData::DETACHED_DIR_NAME) / p.dir_name; if (columns_mask[src_index++]) new_columns[res_index++]->insert(current_info.database); if (columns_mask[src_index++]) @@ -210,7 +228,7 @@ private: if (columns_mask[src_index++]) new_columns[res_index++]->insert(p.disk->getName()); if (columns_mask[src_index++]) - new_columns[res_index++]->insert((fs::path(current_info.data->getFullPathOnDisk(p.disk)) / detached_part_path).string()); + new_columns[res_index++]->insert((fs::path(current_info.data->getFullPathOnDisk(p.disk)) / MergeTreeData::DETACHED_DIR_NAME / p.dir_name).string()); if (columns_mask[src_index++]) new_columns[res_index++]->insert(p.valid_name ? p.prefix : Field()); if (columns_mask[src_index++]) From 08dc874a37fdb22827794e152eba212791718dee Mon Sep 17 00:00:00 2001 From: Sema Checherinda Date: Wed, 22 Feb 2023 16:21:08 +0100 Subject: [PATCH 204/841] do not run support threads if no tasks left --- .../System/StorageSystemDetachedParts.cpp | 64 ++++++++++--------- 1 file changed, 35 insertions(+), 29 deletions(-) diff --git a/src/Storages/System/StorageSystemDetachedParts.cpp b/src/Storages/System/StorageSystemDetachedParts.cpp index 9ca0c921358..f03e1542b03 100644 --- a/src/Storages/System/StorageSystemDetachedParts.cpp +++ b/src/Storages/System/StorageSystemDetachedParts.cpp @@ -63,6 +63,19 @@ public: } }; +struct WorkerState +{ + struct Task + { + DiskPtr disk; + String file; + std::atomic * counter = nullptr; + }; + + std::vector tasks; + std::atomic next_task = {0}; +}; + class DetachedPartsSource : public ISource { public: @@ -113,7 +126,7 @@ private: const std::vector columns_mask; const UInt64 block_size; const bool has_bytes_on_disk_column; - static const size_t support_threads = 35; + const size_t support_threads = 35; StoragesInfo current_info; DetachedPartsInfo detached_parts; @@ -134,20 +147,7 @@ private: if (!has_bytes_on_disk_column) return; - struct Task - { - DiskPtr disk; - String file; - std::atomic * counter = nullptr; - }; - - struct SharedState - { - std::vector tasks; - std::atomic next_task = {0}; - }; - - SharedState shared_state; + WorkerState worker_state; for (auto p_id = begin; p_id < detached_parts.size(); ++p_id) { @@ -161,7 +161,7 @@ private: auto * counter = &parts_sizes[p_id - begin]; for (auto & file : listing) - shared_state.tasks.push_back({disk, file, counter}); + worker_state.tasks.push_back({disk, file, counter}); } std::vector> futures; @@ -173,21 +173,27 @@ private: futures.clear(); }); - for (size_t i = 0; i < support_threads; ++i) + auto max_thread_to_run = std::min(support_threads, worker_state.tasks.size() / 10); + for (size_t i = 0; i < max_thread_to_run; ++i) { + if (worker_state.next_task.load() >= worker_state.tasks.size()) + break; + + auto worker = [&worker_state] () + { + for (auto id = worker_state.next_task++; id < worker_state.tasks.size(); id = worker_state.next_task++) + { + auto & task = worker_state.tasks.at(id); + auto size = task.disk->getFileSize(task.file); + task.counter->fetch_add(size); + } + }; + futures.push_back( - scheduleFromThreadPool( - [&shared_state] () - { - for (auto id = shared_state.next_task++; id < shared_state.tasks.size(); id = shared_state.next_task++) - { - auto & task = shared_state.tasks.at(id); - auto size = task.disk->getFileSize(task.file); - task.counter->fetch_add(size); - } - }, - IOThreadPool::get(), - "DP_BytesOnDisk")); + scheduleFromThreadPool( + std::move(worker), + IOThreadPool::get(), + "DP_BytesOnDisk")); } /// Exceptions are propagated From e2bfa834297841d1c1d7d0b44ff66e05a9b3b822 Mon Sep 17 00:00:00 2001 From: Sema Checherinda <104093494+CheSema@users.noreply.github.com> Date: Thu, 23 Feb 2023 12:00:56 +0100 Subject: [PATCH 205/841] cancel workers when exception --- src/Storages/System/StorageSystemDetachedParts.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Storages/System/StorageSystemDetachedParts.cpp b/src/Storages/System/StorageSystemDetachedParts.cpp index f03e1542b03..f8ca31433f0 100644 --- a/src/Storages/System/StorageSystemDetachedParts.cpp +++ b/src/Storages/System/StorageSystemDetachedParts.cpp @@ -166,6 +166,8 @@ private: std::vector> futures; SCOPE_EXIT_SAFE({ + /// Cancel all workers + worker_state.next_task.store(worker_state.tasks.size()); /// Exceptions are not propagated for (auto & future : futures) if (future.valid()) From 57b5f9e7d7662d12988c8ad4f7c05a8b0200e600 Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Thu, 23 Feb 2023 18:14:52 +0000 Subject: [PATCH 206/841] Fix case with no detached parts for table. --- src/Storages/System/StorageSystemDetachedParts.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Storages/System/StorageSystemDetachedParts.cpp b/src/Storages/System/StorageSystemDetachedParts.cpp index f8ca31433f0..7c631b12e04 100644 --- a/src/Storages/System/StorageSystemDetachedParts.cpp +++ b/src/Storages/System/StorageSystemDetachedParts.cpp @@ -135,11 +135,14 @@ private: { chassert(detached_parts.empty()); - current_info = state->next(); - if (!current_info) - return; + while (detached_parts.empty()) + { + current_info = state->next(); + if (!current_info) + return; - detached_parts = current_info.data->getDetachedParts(); + detached_parts = current_info.data->getDetachedParts(); + } } void calculatePartSizeOnDisk(size_t begin, std::vector> & parts_sizes) From 0c9643f1ed7dc13ee0d7c96d3de8f03db5e1beed Mon Sep 17 00:00:00 2001 From: Sema Checherinda Date: Sat, 25 Feb 2023 16:27:27 +0100 Subject: [PATCH 207/841] make listing in parrallel as well --- .../System/StorageSystemDetachedParts.cpp | 89 +++++++++++++++++-- 1 file changed, 80 insertions(+), 9 deletions(-) diff --git a/src/Storages/System/StorageSystemDetachedParts.cpp b/src/Storages/System/StorageSystemDetachedParts.cpp index 7c631b12e04..f456eabd0f5 100644 --- a/src/Storages/System/StorageSystemDetachedParts.cpp +++ b/src/Storages/System/StorageSystemDetachedParts.cpp @@ -63,7 +63,7 @@ public: } }; -struct WorkerState +struct FileSizeWorkerState { struct Task { @@ -76,6 +76,19 @@ struct WorkerState std::atomic next_task = {0}; }; +struct ListingWorkerState +{ + struct Task + { + DiskPtr disk; + String path; + std::vector & files; + }; + + std::vector tasks; + std::atomic next_task = {0}; +}; + class DetachedPartsSource : public ISource { public: @@ -145,25 +158,81 @@ private: } } + std::vector> collectListings(size_t begin) + { + std::vector> listings(detached_parts.size() - begin); + + ListingWorkerState worker_state; + + for (auto p_id = begin; p_id < detached_parts.size(); ++p_id) + { + auto & part = detached_parts[p_id]; + + auto part_path = fs::path(MergeTreeData::DETACHED_DIR_NAME) / part.dir_name; + auto relative_path = fs::path(current_info.data->getRelativeDataPath()) / part_path; + + worker_state.tasks.push_back({part.disk, relative_path, listings.at(p_id - begin)}); + } + + std::vector> futures; + SCOPE_EXIT_SAFE({ + /// Cancel all workers + worker_state.next_task.store(worker_state.tasks.size()); + /// Exceptions are not propagated + for (auto & future : futures) + if (future.valid()) + future.wait(); + futures.clear(); + }); + + auto max_thread_to_run = std::max(size_t(1), std::min(support_threads, detached_parts.size() / 10)); + futures.reserve(max_thread_to_run); + + for (size_t i = 0; i < max_thread_to_run; ++i) + { + if (worker_state.next_task.load() >= worker_state.tasks.size()) + break; + + auto worker = [&worker_state] () + { + for (auto id = worker_state.next_task++; id < worker_state.tasks.size(); id = worker_state.next_task++) + { + auto & task = worker_state.tasks.at(id); + task.files = partFilesOnDisk(task.disk, task.path); + } + }; + + futures.push_back( + scheduleFromThreadPool( + std::move(worker), + IOThreadPool::get(), + "DP_BytesOnDisk")); + } + + /// Exceptions are propagated + for (auto & future : futures) + future.get(); + + return listings; + + } + void calculatePartSizeOnDisk(size_t begin, std::vector> & parts_sizes) { if (!has_bytes_on_disk_column) return; - WorkerState worker_state; + auto listings = collectListings(begin); + + FileSizeWorkerState worker_state; for (auto p_id = begin; p_id < detached_parts.size(); ++p_id) { auto & p = detached_parts.at(p_id); auto & disk = p.disk; - - auto part_path = fs::path(MergeTreeData::DETACHED_DIR_NAME) / p.dir_name; - auto relative_path = fs::path(current_info.data->getRelativeDataPath()) / part_path; - auto listing = partFilesOnDisk(disk, relative_path); - auto * counter = &parts_sizes[p_id - begin]; - for (auto & file : listing) + for (auto & file : listings[p_id - begin]) worker_state.tasks.push_back({disk, file, counter}); } @@ -178,7 +247,9 @@ private: futures.clear(); }); - auto max_thread_to_run = std::min(support_threads, worker_state.tasks.size() / 10); + auto max_thread_to_run = std::max(size_t(1), std::min(support_threads, worker_state.tasks.size() / 10)); + futures.reserve(max_thread_to_run); + for (size_t i = 0; i < max_thread_to_run; ++i) { if (worker_state.next_task.load() >= worker_state.tasks.size()) From 4cc614ce7ac7e544ce611cbbfca12700d65e7690 Mon Sep 17 00:00:00 2001 From: DanRoscigno Date: Sat, 25 Feb 2023 11:05:18 -0500 Subject: [PATCH 208/841] Give users option of overwriting --- docs/_includes/install/universal.sh | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/docs/_includes/install/universal.sh b/docs/_includes/install/universal.sh index de34897a6f6..1699be138c8 100755 --- a/docs/_includes/install/universal.sh +++ b/docs/_includes/install/universal.sh @@ -60,12 +60,21 @@ fi clickhouse_download_filename_prefix="clickhouse" clickhouse="$clickhouse_download_filename_prefix" -i=0 -while [ -f "$clickhouse" ] -do - clickhouse="${clickhouse_download_filename_prefix}.${i}" - i=$(($i+1)) -done +if [ -f "$clickhouse" ] +then + read -p "ClickHouse binary ${clickhouse} already exists. Overwrite? [y/N] " answer + if [ "$answer" = "y" -o "$answer" = "Y" ] + then + rm -f "$clickhouse" + else + i=0 + while [ -f "$clickhouse" ] + do + clickhouse="${clickhouse_download_filename_prefix}.${i}" + i=$(($i+1)) + done + fi +fi URL="https://builds.clickhouse.com/master/${DIR}/clickhouse" echo From 1666527dae0f14d8884cd94837629cba04a60251 Mon Sep 17 00:00:00 2001 From: Sema Checherinda Date: Sat, 25 Feb 2023 22:20:00 +0100 Subject: [PATCH 209/841] do listing combined with getting size in one thread --- .../System/StorageSystemDetachedParts.cpp | 108 +++--------------- 1 file changed, 17 insertions(+), 91 deletions(-) diff --git a/src/Storages/System/StorageSystemDetachedParts.cpp b/src/Storages/System/StorageSystemDetachedParts.cpp index f456eabd0f5..66e610ca653 100644 --- a/src/Storages/System/StorageSystemDetachedParts.cpp +++ b/src/Storages/System/StorageSystemDetachedParts.cpp @@ -19,31 +19,32 @@ namespace DB namespace { -void partFilesOnDiskImpl(const DiskPtr & disk, const String & from, std::vector & files) +void calculateTotalSizeOnDiskImpl(const DiskPtr & disk, const String & from, UInt64 & total_size) { + /// Files or directories of detached part may not exist. Only count the size of existing files. if (disk->isFile(from)) { - files.push_back(from); + total_size += disk->getFileSize(from); } else { for (auto it = disk->iterateDirectory(from); it->isValid(); it->next()) - partFilesOnDiskImpl(disk, fs::path(from) / it->name(), files); + calculateTotalSizeOnDiskImpl(disk, fs::path(from) / it->name(), total_size); } } -std::vector partFilesOnDisk(const DiskPtr & disk, const String & from) +UInt64 calculateTotalSizeOnDisk(const DiskPtr & disk, const String & from) { - std::vector files; + UInt64 total_size = 0; try { - partFilesOnDiskImpl(disk, from, files); + calculateTotalSizeOnDiskImpl(disk, from, total_size); } catch (...) { tryLogCurrentException(__PRETTY_FUNCTION__); } - return files; + return total_size; } class SourceState @@ -63,26 +64,14 @@ public: } }; -struct FileSizeWorkerState -{ - struct Task - { - DiskPtr disk; - String file; - std::atomic * counter = nullptr; - }; - std::vector tasks; - std::atomic next_task = {0}; -}; - -struct ListingWorkerState +struct WorkerState { struct Task { DiskPtr disk; String path; - std::vector & files; + std::atomic * counter = nullptr; }; std::vector tasks; @@ -158,82 +147,19 @@ private: } } - std::vector> collectListings(size_t begin) - { - std::vector> listings(detached_parts.size() - begin); - - ListingWorkerState worker_state; - - for (auto p_id = begin; p_id < detached_parts.size(); ++p_id) - { - auto & part = detached_parts[p_id]; - - auto part_path = fs::path(MergeTreeData::DETACHED_DIR_NAME) / part.dir_name; - auto relative_path = fs::path(current_info.data->getRelativeDataPath()) / part_path; - - worker_state.tasks.push_back({part.disk, relative_path, listings.at(p_id - begin)}); - } - - std::vector> futures; - SCOPE_EXIT_SAFE({ - /// Cancel all workers - worker_state.next_task.store(worker_state.tasks.size()); - /// Exceptions are not propagated - for (auto & future : futures) - if (future.valid()) - future.wait(); - futures.clear(); - }); - - auto max_thread_to_run = std::max(size_t(1), std::min(support_threads, detached_parts.size() / 10)); - futures.reserve(max_thread_to_run); - - for (size_t i = 0; i < max_thread_to_run; ++i) - { - if (worker_state.next_task.load() >= worker_state.tasks.size()) - break; - - auto worker = [&worker_state] () - { - for (auto id = worker_state.next_task++; id < worker_state.tasks.size(); id = worker_state.next_task++) - { - auto & task = worker_state.tasks.at(id); - task.files = partFilesOnDisk(task.disk, task.path); - } - }; - - futures.push_back( - scheduleFromThreadPool( - std::move(worker), - IOThreadPool::get(), - "DP_BytesOnDisk")); - } - - /// Exceptions are propagated - for (auto & future : futures) - future.get(); - - return listings; - - } - void calculatePartSizeOnDisk(size_t begin, std::vector> & parts_sizes) { if (!has_bytes_on_disk_column) return; - auto listings = collectListings(begin); - - FileSizeWorkerState worker_state; + WorkerState worker_state; for (auto p_id = begin; p_id < detached_parts.size(); ++p_id) { - auto & p = detached_parts.at(p_id); - auto & disk = p.disk; - auto * counter = &parts_sizes[p_id - begin]; - - for (auto & file : listings[p_id - begin]) - worker_state.tasks.push_back({disk, file, counter}); + auto & part = detached_parts[p_id]; + auto part_path = fs::path(MergeTreeData::DETACHED_DIR_NAME) / part.dir_name; + auto relative_path = fs::path(current_info.data->getRelativeDataPath()) / part_path; + worker_state.tasks.push_back({part.disk, relative_path, &parts_sizes.at(p_id - begin)}); } std::vector> futures; @@ -260,8 +186,8 @@ private: for (auto id = worker_state.next_task++; id < worker_state.tasks.size(); id = worker_state.next_task++) { auto & task = worker_state.tasks.at(id); - auto size = task.disk->getFileSize(task.file); - task.counter->fetch_add(size); + size_t size = calculateTotalSizeOnDisk(task.disk, task.path); + task.counter->store(size); } }; From 8ad016dbe6f0a260ce476b626c4c9e702f0b5e56 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Mon, 20 Feb 2023 19:30:55 +0100 Subject: [PATCH 210/841] Map field to string fix --- src/Common/FieldVisitorToString.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Common/FieldVisitorToString.cpp b/src/Common/FieldVisitorToString.cpp index e0ec6b7a335..60834afab35 100644 --- a/src/Common/FieldVisitorToString.cpp +++ b/src/Common/FieldVisitorToString.cpp @@ -117,14 +117,14 @@ String FieldVisitorToString::operator() (const Map & x) const { WriteBufferFromOwnString wb; - wb << '('; + wb << '['; for (auto it = x.begin(); it != x.end(); ++it) { if (it != x.begin()) wb << ", "; wb << applyVisitor(*this, *it); } - wb << ')'; + wb << ']'; return wb.str(); } From 046846d08768a174aab0bceea48ae968eff420ff Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Sun, 26 Feb 2023 14:45:02 +0100 Subject: [PATCH 211/841] Added tests --- tests/queries/0_stateless/02670_map_literal_cast.reference | 1 + tests/queries/0_stateless/02670_map_literal_cast.sql | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 tests/queries/0_stateless/02670_map_literal_cast.reference create mode 100644 tests/queries/0_stateless/02670_map_literal_cast.sql diff --git a/tests/queries/0_stateless/02670_map_literal_cast.reference b/tests/queries/0_stateless/02670_map_literal_cast.reference new file mode 100644 index 00000000000..00c28bddfa2 --- /dev/null +++ b/tests/queries/0_stateless/02670_map_literal_cast.reference @@ -0,0 +1 @@ +{'a':1,'b':2} diff --git a/tests/queries/0_stateless/02670_map_literal_cast.sql b/tests/queries/0_stateless/02670_map_literal_cast.sql new file mode 100644 index 00000000000..b196a5068b6 --- /dev/null +++ b/tests/queries/0_stateless/02670_map_literal_cast.sql @@ -0,0 +1,2 @@ +SELECT CAST([('a', 1), ('b', 2)], 'Map(String, UInt8)'); +SELECT CAST((('a', 1), ('b', 2)), 'Map(String, UInt8)'); -- { serverError TYPE_MISMATCH } From cc0c0c6133ee62e63a3c42ceb6c285a2d8f5611f Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Sun, 26 Feb 2023 20:01:35 +0000 Subject: [PATCH 212/841] A better alternative to #46344 The (experimental) inverted index writes/reads files different from the standard files written by the other skip indexes. The original problem was that with database engine "ordinary", DROP TABLE of a table with inverted index finds unknown files in persistence and complains. The same will happen with engine "atomic" but deferred. As a hotfix, the error was silenced by explicitly adding the four files created in a specific test to the deletion code. This PR tries a cleaner solution where all needed files are provided via the normal checksum structure. One drawback remains which is that the affected files were written earlier and we don't have their checksums available. Therefore, the inverted index is currently excluded from CHECK TABLE. Minimal repro: SET allow_experimental_inverted_index = 1; DROP TABLE IF EXISTS tab; CREATE TABLE tab(s String, INDEX af(s) TYPE inverted(2)) ENGINE = MergeTree() ORDER BY s; INSERT INTO tab VALUES ('Alick a01'); CHECK TABLE tab; DROP TABLE IF EXISTS tab; run ./clickhouse-test with --db-engine Ordinary --- .../MergeTree/DataPartStorageOnDiskBase.cpp | 6 ----- .../MergeTree/MergeTreeDataPartChecksum.cpp | 4 ++++ .../MergeTreeDataPartWriterOnDisk.cpp | 22 ++++++++++++++----- src/Storages/MergeTree/checkDataPart.cpp | 6 ++++- .../02346_full_text_search.reference | 1 + .../0_stateless/02346_full_text_search.sql | 3 +++ 6 files changed, 30 insertions(+), 12 deletions(-) diff --git a/src/Storages/MergeTree/DataPartStorageOnDiskBase.cpp b/src/Storages/MergeTree/DataPartStorageOnDiskBase.cpp index d8769a94347..175df9b6e28 100644 --- a/src/Storages/MergeTree/DataPartStorageOnDiskBase.cpp +++ b/src/Storages/MergeTree/DataPartStorageOnDiskBase.cpp @@ -684,12 +684,6 @@ void DataPartStorageOnDiskBase::clearDirectory( request.emplace_back(fs::path(dir) / "delete-on-destroy.txt", true); request.emplace_back(fs::path(dir) / "txn_version.txt", true); - /// Inverted index - request.emplace_back(fs::path(dir) / "skp_idx_af.gin_dict", true); - request.emplace_back(fs::path(dir) / "skp_idx_af.gin_post", true); - request.emplace_back(fs::path(dir) / "skp_idx_af.gin_seg", true); - request.emplace_back(fs::path(dir) / "skp_idx_af.gin_sid", true); - disk->removeSharedFiles(request, !can_remove_shared_data, names_not_to_remove); disk->removeDirectory(dir); } diff --git a/src/Storages/MergeTree/MergeTreeDataPartChecksum.cpp b/src/Storages/MergeTree/MergeTreeDataPartChecksum.cpp index 719a60b2f31..8f4d066baa3 100644 --- a/src/Storages/MergeTree/MergeTreeDataPartChecksum.cpp +++ b/src/Storages/MergeTree/MergeTreeDataPartChecksum.cpp @@ -75,6 +75,10 @@ void MergeTreeDataPartChecksums::checkEqual(const MergeTreeDataPartChecksums & r { const String & name = it.first; + /// Exclude files written by inverted index from check. No correct checksums are available for them currently. + if (name.ends_with(".gin_dict") || name.ends_with(".gin_post") || name.ends_with(".gin_seg") || name.ends_with(".gin_sid")) + continue; + auto jt = rhs.files.find(name); if (jt == rhs.files.end()) throw Exception(ErrorCodes::NO_FILE_IN_DATA_PART, "No file {} in data part", name); diff --git a/src/Storages/MergeTree/MergeTreeDataPartWriterOnDisk.cpp b/src/Storages/MergeTree/MergeTreeDataPartWriterOnDisk.cpp index 1dec7c2cd7c..fe5dbcefabf 100644 --- a/src/Storages/MergeTree/MergeTreeDataPartWriterOnDisk.cpp +++ b/src/Storages/MergeTree/MergeTreeDataPartWriterOnDisk.cpp @@ -208,26 +208,26 @@ void MergeTreeDataPartWriterOnDisk::initSkipIndices() auto ast = parseQuery(codec_parser, "(" + Poco::toUpper(settings.marks_compression_codec) + ")", 0, DBMS_DEFAULT_MAX_PARSER_DEPTH); CompressionCodecPtr marks_compression_codec = CompressionCodecFactory::instance().get(ast, nullptr); - for (const auto & index_helper : skip_indices) + for (const auto & skip_index : skip_indices) { - String stream_name = index_helper->getFileName(); + String stream_name = skip_index->getFileName(); skip_indices_streams.emplace_back( std::make_unique( stream_name, data_part->getDataPartStoragePtr(), - stream_name, index_helper->getSerializedFileExtension(), + stream_name, skip_index->getSerializedFileExtension(), stream_name, marks_file_extension, default_codec, settings.max_compress_block_size, marks_compression_codec, settings.marks_compress_block_size, settings.query_write_settings)); GinIndexStorePtr store = nullptr; - if (dynamic_cast(&*index_helper) != nullptr) + if (dynamic_cast(&*skip_index) != nullptr) { store = std::make_shared(stream_name, data_part->getDataPartStoragePtr(), data_part->getDataPartStoragePtr(), storage.getSettings()->max_digestion_size_per_segment); gin_index_stores[stream_name] = store; } - skip_indices_aggregators.push_back(index_helper->createIndexAggregatorForPart(store)); + skip_indices_aggregators.push_back(skip_index->createIndexAggregatorForPart(store)); skip_index_accumulated_marks.push_back(0); } } @@ -388,6 +388,18 @@ void MergeTreeDataPartWriterOnDisk::fillSkipIndicesChecksums(MergeTreeData::Data auto & stream = *skip_indices_streams[i]; if (!skip_indices_aggregators[i]->empty()) skip_indices_aggregators[i]->getGranuleAndReset()->serializeBinary(stream.compressed_hashing); + + /// Register additional files written only by the inverted index. Required because otherwise DROP TABLE complains about unknown + /// files. Note that the provided actual checksums are bogus. The problem is that at this point the file writes happened already and + /// we'd need to re-open + hash the files (fixing this is TODO). For now, CHECK TABLE skips these four files. + if (dynamic_cast(&*skip_indices[i]) != nullptr) + { + String filename_without_extension = skip_indices[i]->getFileName(); + checksums.files[filename_without_extension + ".gin_dict"] = MergeTreeDataPartChecksums::Checksum(); + checksums.files[filename_without_extension + ".gin_post"] = MergeTreeDataPartChecksums::Checksum(); + checksums.files[filename_without_extension + ".gin_seg"] = MergeTreeDataPartChecksums::Checksum(); + checksums.files[filename_without_extension + ".gin_sid"] = MergeTreeDataPartChecksums::Checksum(); + } } for (auto & stream : skip_indices_streams) diff --git a/src/Storages/MergeTree/checkDataPart.cpp b/src/Storages/MergeTree/checkDataPart.cpp index 2ec83d99eeb..3a33572d047 100644 --- a/src/Storages/MergeTree/checkDataPart.cpp +++ b/src/Storages/MergeTree/checkDataPart.cpp @@ -163,12 +163,16 @@ IMergeTreeDataPart::Checksums checkDataPart( auto file_name = it->name(); /// We will check projections later. - if (data_part_storage.isDirectory(file_name) && endsWith(file_name, ".proj")) + if (data_part_storage.isDirectory(file_name) && file_name.ends_with(".proj")) { projections_on_disk.insert(file_name); continue; } + /// Exclude files written by inverted index from check. No correct checksums are available for them currently. + if (file_name.ends_with(".gin_dict") || file_name.ends_with(".gin_post") || file_name.ends_with(".gin_seg") || file_name.ends_with(".gin_sid")) + continue; + auto checksum_it = checksums_data.files.find(file_name); /// Skip files that we already calculated. Also skip metadata files that are not checksummed. diff --git a/tests/queries/0_stateless/02346_full_text_search.reference b/tests/queries/0_stateless/02346_full_text_search.reference index e035e93867b..f1e21e511d0 100644 --- a/tests/queries/0_stateless/02346_full_text_search.reference +++ b/tests/queries/0_stateless/02346_full_text_search.reference @@ -1,4 +1,5 @@ af inverted +1 101 Alick a01 1 101 Alick a01 diff --git a/tests/queries/0_stateless/02346_full_text_search.sql b/tests/queries/0_stateless/02346_full_text_search.sql index af49c5d52c2..2b10800e78f 100644 --- a/tests/queries/0_stateless/02346_full_text_search.sql +++ b/tests/queries/0_stateless/02346_full_text_search.sql @@ -15,6 +15,9 @@ INSERT INTO tab VALUES (101, 'Alick a01'), (102, 'Blick a02'), (103, 'Click a03' -- check inverted index was created SELECT name, type FROM system.data_skipping_indices WHERE table =='tab' AND database = currentDatabase() LIMIT 1; +-- throw in a random consistency check +CHECK TABLE tab; + -- search inverted index with == SELECT * FROM tab WHERE s == 'Alick a01'; From 4b5d62d5bf34b534693b9f8f579ed87ecf25f1e5 Mon Sep 17 00:00:00 2001 From: Igor Nikonov Date: Sun, 26 Feb 2023 22:19:01 +0000 Subject: [PATCH 213/841] Analyzer: trivial count optimization --- src/Planner/PlannerJoinTree.cpp | 126 ++++++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) diff --git a/src/Planner/PlannerJoinTree.cpp b/src/Planner/PlannerJoinTree.cpp index 59b09f91888..36eb5c59ef5 100644 --- a/src/Planner/PlannerJoinTree.cpp +++ b/src/Planner/PlannerJoinTree.cpp @@ -39,6 +39,14 @@ #include #include #include +#include +#include +#include "Analyzer/AggregationUtils.h" +#include "Analyzer/FunctionNode.h" +#include +#include +#include +#include namespace DB { @@ -143,6 +151,119 @@ NameAndTypePair chooseSmallestColumnToReadFromStorage(const StoragePtr & storage return result; } +bool applyTrivialCountIfPossible( + QueryPlan & query_plan, + const TableNode & table_node, + const SelectQueryInfo & select_query_info, + const ContextPtr & query_context, + const Names & columns_names) +{ + const auto & settings = query_context->getSettingsRef(); + if (!settings.optimize_trivial_count_query) + return false; + + const auto & storage = table_node.getStorage(); + const auto & storage_snapshot = table_node.getStorageSnapshot(); + + bool can_apply_trivial_count = (settings.max_parallel_replicas <= 1) && // + !settings.allow_experimental_query_deduplication && // + !settings.empty_result_for_aggregation_by_empty_set && // + storage && // + storage->getName() != "MaterializedMySQL" && // + !storage->hasLightweightDeletedMask() && // + select_query_info.filter_asts.empty() && // ??? + select_query_info.has_aggregates; + if (!can_apply_trivial_count) + return false; + + QueryTreeNodes aggregates = collectAggregateFunctionNodes(select_query_info.query_tree); + if (aggregates.size() != 1) + return false; + + auto & main_query_node = select_query_info.query_tree->as(); + /// dump main query tree + { + WriteBufferFromOwnString buffer; + IQueryTreeNode::FormatState format_state; + main_query_node.dumpTreeImpl(buffer, format_state, 0); + + LOG_ERROR(&Poco::Logger::get(__PRETTY_FUNCTION__), "main_query_node:\n{}", buffer.str()); + LOG_ERROR(&Poco::Logger::get(__PRETTY_FUNCTION__), "Projection column:\n{}", main_query_node.getProjectionColumns().front().dump()); + } + + { + WriteBufferFromOwnString buffer; + buffer << columns_names; + LOG_ERROR(&Poco::Logger::get(__PRETTY_FUNCTION__), "{}", buffer.str()); + } + + const auto * function_node = typeid_cast(aggregates.front().get()); + if (!function_node) + return false; + + if (!function_node->getAggregateFunction()) + return false; + + LOG_ERROR(&Poco::Logger::get(__PRETTY_FUNCTION__), "Aggregation: {}", function_node->getFunctionName()); + + const auto * count_func = typeid_cast(function_node->getAggregateFunction().get()); + if (!count_func) + return false; + + /// get number of rows + std::optional num_rows{}; + // if (!query_tree. prewhere() && !query.where() && !context->getCurrentTransaction()) + if (!main_query_node.hasPrewhere() && !main_query_node.hasWhere()) + { + num_rows = storage->totalRows(settings); + } + // else // It's possible to optimize count() given only partition predicates + // { + // SelectQueryInfo temp_query_info; + // temp_query_info.query = query_ptr; + // temp_query_info.syntax_analyzer_result = syntax_analyzer_result; + // temp_query_info.prepared_sets = query_analyzer->getPreparedSets(); + // num_rows = storage->totalRowsByPartitionPredicate(temp_query_info, context); + // } + + if (!num_rows) + return false; + + LOG_ERROR(&Poco::Logger::get(__PRETTY_FUNCTION__), "Number of rows: {}", num_rows.value()); + + /// set aggregation state + const AggregateFunctionCount & agg_count = *count_func; + std::vector state(agg_count.sizeOfData()); + AggregateDataPtr place = state.data(); + agg_count.create(place); + // SCOPE_EXIT_MEMORY_SAFE(agg_count.destroy(place)); + agg_count.set(place, num_rows.value()); + + auto column = ColumnAggregateFunction::create(function_node->getAggregateFunction()); + column->insertFrom(place); + + /// get count() argument type + DataTypes argument_types; + argument_types.reserve(columns_names.size()); + { + const Block source_header = storage_snapshot->getSampleBlockForColumns(columns_names); + for (const auto & column_name : columns_names) + argument_types.push_back(source_header.getByName(column_name).type); + } + + Block block_with_count{ + {std::move(column), + std::make_shared(function_node->getAggregateFunction(), argument_types, Array{}), + columns_names.front()}}; + + auto source = std::make_shared(block_with_count); + auto prepared_count = std::make_unique(Pipe(std::move(source))); + prepared_count->setStepDescription("Optimized trivial count"); + query_plan.addStep(std::move(prepared_count)); + + return true; +} + JoinTreeQueryPlan buildQueryPlanForTableExpression(const QueryTreeNodePtr & table_expression, const SelectQueryInfo & select_query_info, const SelectQueryOptions & select_query_options, @@ -287,6 +408,11 @@ JoinTreeQueryPlan buildQueryPlanForTableExpression(const QueryTreeNodePtr & tabl table_expression_data.addColumn(additional_column_to_read, column_identifier); } + /// apply trivial_count optimization if possible + if (is_single_table_expression && table_node + && applyTrivialCountIfPossible(query_plan, *table_node, select_query_info, planner_context->getQueryContext(), columns_names)) + return {std::move(query_plan), from_stage}; + bool need_rewrite_query_with_final = storage->needRewriteQueryWithFinal(columns_names); if (need_rewrite_query_with_final) { From 1e4d9e2421091468bddcce8f59191b87865a05c3 Mon Sep 17 00:00:00 2001 From: Igor Nikonov Date: Sun, 26 Feb 2023 22:37:06 +0000 Subject: [PATCH 214/841] try to fix --- src/Planner/PlannerJoinTree.cpp | 50 ++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/src/Planner/PlannerJoinTree.cpp b/src/Planner/PlannerJoinTree.cpp index 36eb5c59ef5..593bdd7dece 100644 --- a/src/Planner/PlannerJoinTree.cpp +++ b/src/Planner/PlannerJoinTree.cpp @@ -408,11 +408,6 @@ JoinTreeQueryPlan buildQueryPlanForTableExpression(const QueryTreeNodePtr & tabl table_expression_data.addColumn(additional_column_to_read, column_identifier); } - /// apply trivial_count optimization if possible - if (is_single_table_expression && table_node - && applyTrivialCountIfPossible(query_plan, *table_node, select_query_info, planner_context->getQueryContext(), columns_names)) - return {std::move(query_plan), from_stage}; - bool need_rewrite_query_with_final = storage->needRewriteQueryWithFinal(columns_names); if (need_rewrite_query_with_final) { @@ -434,28 +429,39 @@ JoinTreeQueryPlan buildQueryPlanForTableExpression(const QueryTreeNodePtr & tabl } } - storage->read(query_plan, columns_names, storage_snapshot, table_expression_query_info, query_context, from_stage, max_block_size, max_streams); + /// apply trivial_count optimization if possible + bool is_trivial_count_applied = (is_single_table_expression && table_node + && applyTrivialCountIfPossible(query_plan, *table_node, select_query_info, planner_context->getQueryContext(), columns_names)); - if (query_plan.isInitialized()) + if (is_trivial_count_applied) { - /** Specify the number of threads only if it wasn't specified in storage. - * - * But in case of remote query and prefer_localhost_replica=1 (default) - * The inner local query (that is done in the same process, without - * network interaction), it will setMaxThreads earlier and distributed - * query will not update it. - */ - if (!query_plan.getMaxThreads() || is_remote) - query_plan.setMaxThreads(max_threads_execute_query); + from_stage = QueryProcessingStage::WithMergeableState; } else { - /// Create step which reads from empty source if storage has no data. - auto source_header = storage_snapshot->getSampleBlockForColumns(columns_names); - Pipe pipe(std::make_shared(source_header)); - auto read_from_pipe = std::make_unique(std::move(pipe)); - read_from_pipe->setStepDescription("Read from NullSource"); - query_plan.addStep(std::move(read_from_pipe)); + storage->read(query_plan, columns_names, storage_snapshot, table_expression_query_info, query_context, from_stage, max_block_size, max_streams); + + if (query_plan.isInitialized()) + { + /** Specify the number of threads only if it wasn't specified in storage. + * + * But in case of remote query and prefer_localhost_replica=1 (default) + * The inner local query (that is done in the same process, without + * network interaction), it will setMaxThreads earlier and distributed + * query will not update it. + */ + if (!query_plan.getMaxThreads() || is_remote) + query_plan.setMaxThreads(max_threads_execute_query); + } + else + { + /// Create step which reads from empty source if storage has no data. + auto source_header = storage_snapshot->getSampleBlockForColumns(columns_names); + Pipe pipe(std::make_shared(source_header)); + auto read_from_pipe = std::make_unique(std::move(pipe)); + read_from_pipe->setStepDescription("Read from NullSource"); + query_plan.addStep(std::move(read_from_pipe)); + } } } else if (query_node || union_node) From f9a324c47a50e67dfe1933677924e08f921a40e7 Mon Sep 17 00:00:00 2001 From: Igor Nikonov Date: Mon, 27 Feb 2023 09:48:24 +0000 Subject: [PATCH 215/841] Make diagnostic traces debug level --- src/Planner/PlannerJoinTree.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Planner/PlannerJoinTree.cpp b/src/Planner/PlannerJoinTree.cpp index 593bdd7dece..b1e22b40d69 100644 --- a/src/Planner/PlannerJoinTree.cpp +++ b/src/Planner/PlannerJoinTree.cpp @@ -187,14 +187,14 @@ bool applyTrivialCountIfPossible( IQueryTreeNode::FormatState format_state; main_query_node.dumpTreeImpl(buffer, format_state, 0); - LOG_ERROR(&Poco::Logger::get(__PRETTY_FUNCTION__), "main_query_node:\n{}", buffer.str()); - LOG_ERROR(&Poco::Logger::get(__PRETTY_FUNCTION__), "Projection column:\n{}", main_query_node.getProjectionColumns().front().dump()); + LOG_DEBUG(&Poco::Logger::get(__PRETTY_FUNCTION__), "main_query_node:\n{}", buffer.str()); + LOG_DEBUG(&Poco::Logger::get(__PRETTY_FUNCTION__), "Projection column:\n{}", main_query_node.getProjectionColumns().front().dump()); } { WriteBufferFromOwnString buffer; buffer << columns_names; - LOG_ERROR(&Poco::Logger::get(__PRETTY_FUNCTION__), "{}", buffer.str()); + LOG_DEBUG(&Poco::Logger::get(__PRETTY_FUNCTION__), "{}", buffer.str()); } const auto * function_node = typeid_cast(aggregates.front().get()); @@ -204,7 +204,7 @@ bool applyTrivialCountIfPossible( if (!function_node->getAggregateFunction()) return false; - LOG_ERROR(&Poco::Logger::get(__PRETTY_FUNCTION__), "Aggregation: {}", function_node->getFunctionName()); + LOG_DEBUG(&Poco::Logger::get(__PRETTY_FUNCTION__), "Aggregation: {}", function_node->getFunctionName()); const auto * count_func = typeid_cast(function_node->getAggregateFunction().get()); if (!count_func) @@ -229,7 +229,7 @@ bool applyTrivialCountIfPossible( if (!num_rows) return false; - LOG_ERROR(&Poco::Logger::get(__PRETTY_FUNCTION__), "Number of rows: {}", num_rows.value()); + LOG_DEBUG(&Poco::Logger::get(__PRETTY_FUNCTION__), "Number of rows: {}", num_rows.value()); /// set aggregation state const AggregateFunctionCount & agg_count = *count_func; From 4c9b9b362c16ddbbaeda2446284b861c30cef01e Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Mon, 27 Feb 2023 09:30:50 +0000 Subject: [PATCH 216/841] Replace dynamic_cast by typeid_cast --- src/Storages/MergeTree/MergeTreeDataPartWriterOnDisk.cpp | 6 +++--- src/Storages/MergeTree/checkDataPart.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Storages/MergeTree/MergeTreeDataPartWriterOnDisk.cpp b/src/Storages/MergeTree/MergeTreeDataPartWriterOnDisk.cpp index fe5dbcefabf..b0101bb962c 100644 --- a/src/Storages/MergeTree/MergeTreeDataPartWriterOnDisk.cpp +++ b/src/Storages/MergeTree/MergeTreeDataPartWriterOnDisk.cpp @@ -222,7 +222,7 @@ void MergeTreeDataPartWriterOnDisk::initSkipIndices() settings.query_write_settings)); GinIndexStorePtr store = nullptr; - if (dynamic_cast(&*skip_index) != nullptr) + if (typeid_cast(&*skip_index) != nullptr) { store = std::make_shared(stream_name, data_part->getDataPartStoragePtr(), data_part->getDataPartStoragePtr(), storage.getSettings()->max_digestion_size_per_segment); gin_index_stores[stream_name] = store; @@ -284,7 +284,7 @@ void MergeTreeDataPartWriterOnDisk::calculateAndSerializeSkipIndices(const Block WriteBuffer & marks_out = stream.compress_marks ? stream.marks_compressed_hashing : stream.marks_hashing; GinIndexStorePtr store; - if (dynamic_cast(&*index_helper) != nullptr) + if (typeid_cast(&*index_helper) != nullptr) { String stream_name = index_helper->getFileName(); auto it = gin_index_stores.find(stream_name); @@ -392,7 +392,7 @@ void MergeTreeDataPartWriterOnDisk::fillSkipIndicesChecksums(MergeTreeData::Data /// Register additional files written only by the inverted index. Required because otherwise DROP TABLE complains about unknown /// files. Note that the provided actual checksums are bogus. The problem is that at this point the file writes happened already and /// we'd need to re-open + hash the files (fixing this is TODO). For now, CHECK TABLE skips these four files. - if (dynamic_cast(&*skip_indices[i]) != nullptr) + if (typeid_cast(&*skip_indices[i]) != nullptr) { String filename_without_extension = skip_indices[i]->getFileName(); checksums.files[filename_without_extension + ".gin_dict"] = MergeTreeDataPartChecksums::Checksum(); diff --git a/src/Storages/MergeTree/checkDataPart.cpp b/src/Storages/MergeTree/checkDataPart.cpp index 3a33572d047..de31258b2f9 100644 --- a/src/Storages/MergeTree/checkDataPart.cpp +++ b/src/Storages/MergeTree/checkDataPart.cpp @@ -157,7 +157,7 @@ IMergeTreeDataPart::Checksums checkDataPart( } NameSet projections_on_disk; - const auto & checksum_files_txt = checksums_txt.files; + const auto & checksums_txt_files = checksums_txt.files; for (auto it = data_part_storage.iterate(); it->isValid(); it->next()) { auto file_name = it->name(); @@ -178,8 +178,8 @@ IMergeTreeDataPart::Checksums checkDataPart( /// Skip files that we already calculated. Also skip metadata files that are not checksummed. if (checksum_it == checksums_data.files.end() && !files_without_checksums.contains(file_name)) { - auto txt_checksum_it = checksum_files_txt.find(file_name); - if (txt_checksum_it == checksum_files_txt.end() || txt_checksum_it->second.uncompressed_size == 0) + auto txt_checksum_it = checksums_txt_files.find(file_name); + if (txt_checksum_it == checksums_txt_files.end() || txt_checksum_it->second.uncompressed_size == 0) { /// The file is not compressed. checksum_file(file_name); From 758018540d8966e5d16d31efb6200f53fe5f9af3 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Mon, 27 Feb 2023 11:15:39 +0100 Subject: [PATCH 217/841] Fixed tests --- .../02377_extend_protocol_with_query_parameters.reference | 6 +++--- tests/queries/0_stateless/02670_map_literal_cast.reference | 3 +++ tests/queries/0_stateless/02670_map_literal_cast.sql | 7 +++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/queries/0_stateless/02377_extend_protocol_with_query_parameters.reference b/tests/queries/0_stateless/02377_extend_protocol_with_query_parameters.reference index 1da5cd0b7b3..8b384f5e0d1 100644 --- a/tests/queries/0_stateless/02377_extend_protocol_with_query_parameters.reference +++ b/tests/queries/0_stateless/02377_extend_protocol_with_query_parameters.reference @@ -9,8 +9,8 @@ UInt64 String DateTime Map(UUID, Array(Float32)) 1 _CAST(42, \'Int64\') Int64 _CAST([1, 2, 3], \'Array(UInt8)\') Array(UInt8) -_CAST(((\'abc\', 22), (\'def\', 33)), \'Map(String, UInt8)\') Map(String, UInt8) +_CAST([(\'abc\', 22), (\'def\', 33)], \'Map(String, UInt8)\') Map(String, UInt8) _CAST([[4, 5, 6], [7], [8, 9]], \'Array(Array(UInt8))\') Array(Array(UInt8)) -_CAST(((10, [11, 12]), (13, [14, 15])), \'Map(UInt8, Array(UInt8))\') Map(UInt8, Array(UInt8)) -_CAST(((\'ghj\', ((\'klm\', [16, 17]))), (\'nop\', ((\'rst\', [18])))), \'Map(String, Map(String, Array(UInt8)))\') Map(String, Map(String, Array(UInt8))) +_CAST([(10, [11, 12]), (13, [14, 15])], \'Map(UInt8, Array(UInt8))\') Map(UInt8, Array(UInt8)) +_CAST([(\'ghj\', [(\'klm\', [16, 17])]), (\'nop\', [(\'rst\', [18])])], \'Map(String, Map(String, Array(UInt8)))\') Map(String, Map(String, Array(UInt8))) a Int8 diff --git a/tests/queries/0_stateless/02670_map_literal_cast.reference b/tests/queries/0_stateless/02670_map_literal_cast.reference index 00c28bddfa2..9f4e9fd8d08 100644 --- a/tests/queries/0_stateless/02670_map_literal_cast.reference +++ b/tests/queries/0_stateless/02670_map_literal_cast.reference @@ -1 +1,4 @@ {'a':1,'b':2} +{'abc':22,'def':33} +{10:[11,12],13:[14,15]} +{'ghj':{'klm':[16,17]},'nop':{'rst':[18]}} diff --git a/tests/queries/0_stateless/02670_map_literal_cast.sql b/tests/queries/0_stateless/02670_map_literal_cast.sql index b196a5068b6..23bb880889b 100644 --- a/tests/queries/0_stateless/02670_map_literal_cast.sql +++ b/tests/queries/0_stateless/02670_map_literal_cast.sql @@ -1,2 +1,9 @@ SELECT CAST([('a', 1), ('b', 2)], 'Map(String, UInt8)'); +SELECT CAST([('abc', 22), ('def', 33)], 'Map(String, UInt8)'); +SELECT CAST([(10, [11, 12]), (13, [14, 15])], 'Map(UInt8, Array(UInt8))'); +SELECT CAST([('ghj', [('klm', [16, 17])]), ('nop', [('rst', [18])])], 'Map(String, Map(String, Array(UInt8)))'); + SELECT CAST((('a', 1), ('b', 2)), 'Map(String, UInt8)'); -- { serverError TYPE_MISMATCH } +SELECT CAST((('abc', 22), ('def', 33)), 'Map(String, UInt8)'); -- { serverError TYPE_MISMATCH } +SELECT CAST(((10, [11, 12]), (13, [14, 15])), 'Map(UInt8, Array(UInt8))'); -- { serverError TYPE_MISMATCH } +SELECT CAST((('ghj', (('klm', [16, 17]))), ('nop', (('rst', [18])))), 'Map(String, Map(String, Array(UInt8)))'); -- { serverError TYPE_MISMATCH } From cac9e96d0415f52d27a96c873c981f37bd8a2ed7 Mon Sep 17 00:00:00 2001 From: Igor Nikonov Date: Mon, 27 Feb 2023 10:56:59 +0000 Subject: [PATCH 218/841] Fix: do not apply if FINAL --- src/Planner/PlannerJoinTree.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Planner/PlannerJoinTree.cpp b/src/Planner/PlannerJoinTree.cpp index b1e22b40d69..9c005314421 100644 --- a/src/Planner/PlannerJoinTree.cpp +++ b/src/Planner/PlannerJoinTree.cpp @@ -162,6 +162,10 @@ bool applyTrivialCountIfPossible( if (!settings.optimize_trivial_count_query) return false; + /// can't apply if FINAL + if (select_query_info.table_expression_modifiers.has_value() && select_query_info.table_expression_modifiers.value().hasFinal()) + return false; + const auto & storage = table_node.getStorage(); const auto & storage_snapshot = table_node.getStorageSnapshot(); @@ -430,8 +434,8 @@ JoinTreeQueryPlan buildQueryPlanForTableExpression(const QueryTreeNodePtr & tabl } /// apply trivial_count optimization if possible - bool is_trivial_count_applied = (is_single_table_expression && table_node - && applyTrivialCountIfPossible(query_plan, *table_node, select_query_info, planner_context->getQueryContext(), columns_names)); + bool is_trivial_count_applied = is_single_table_expression && table_node + && applyTrivialCountIfPossible(query_plan, *table_node, select_query_info, planner_context->getQueryContext(), columns_names); if (is_trivial_count_applied) { From 10c04d5a38af9875ec2562ad955d613d0c198e18 Mon Sep 17 00:00:00 2001 From: Nikolay Degterinsky <43110995+evillique@users.noreply.github.com> Date: Mon, 27 Feb 2023 12:26:36 +0100 Subject: [PATCH 219/841] Fix clone() for ASTColumnMatchers --- src/Parsers/ASTColumnsMatcher.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Parsers/ASTColumnsMatcher.cpp b/src/Parsers/ASTColumnsMatcher.cpp index 940030577d6..ba398b995be 100644 --- a/src/Parsers/ASTColumnsMatcher.cpp +++ b/src/Parsers/ASTColumnsMatcher.cpp @@ -18,6 +18,7 @@ namespace ErrorCodes ASTPtr ASTColumnsRegexpMatcher::clone() const { auto clone = std::make_shared(*this); + clone->children.clear(); if (expression) { clone->expression = expression->clone(); clone->children.push_back(clone->expression); } if (transformers) { clone->transformers = transformers->clone(); clone->children.push_back(clone->transformers); } @@ -91,6 +92,7 @@ bool ASTColumnsRegexpMatcher::isColumnMatching(const String & column_name) const ASTPtr ASTColumnsListMatcher::clone() const { auto clone = std::make_shared(*this); + clone->children.clear(); if (expression) { clone->expression = expression->clone(); clone->children.push_back(clone->expression); } if (transformers) { clone->transformers = transformers->clone(); clone->children.push_back(clone->transformers); } @@ -150,6 +152,7 @@ void ASTColumnsListMatcher::formatImpl(const FormatSettings & settings, FormatSt ASTPtr ASTQualifiedColumnsRegexpMatcher::clone() const { auto clone = std::make_shared(*this); + clone->children.clear(); if (transformers) { clone->transformers = transformers->clone(); clone->children.push_back(clone->transformers); } @@ -216,6 +219,7 @@ void ASTQualifiedColumnsRegexpMatcher::formatImpl(const FormatSettings & setting ASTPtr ASTQualifiedColumnsListMatcher::clone() const { auto clone = std::make_shared(*this); + clone->children.clear(); if (transformers) { clone->transformers = transformers->clone(); clone->children.push_back(clone->transformers); } From ff9c2fb9fcde2bc83d17e4080d4311270e22ceb2 Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Mon, 27 Feb 2023 11:38:34 +0000 Subject: [PATCH 220/841] Un-inline likePatternToRegexp() --- src/Functions/likePatternToRegexp.cpp | 91 +++++++++++++++++++++++++++ src/Functions/likePatternToRegexp.h | 85 +------------------------ 2 files changed, 93 insertions(+), 83 deletions(-) create mode 100644 src/Functions/likePatternToRegexp.cpp diff --git a/src/Functions/likePatternToRegexp.cpp b/src/Functions/likePatternToRegexp.cpp new file mode 100644 index 00000000000..32281b106fd --- /dev/null +++ b/src/Functions/likePatternToRegexp.cpp @@ -0,0 +1,91 @@ +#include + +#include + +namespace DB +{ + +namespace ErrorCodes +{ + extern const int CANNOT_PARSE_ESCAPE_SEQUENCE; +} + +String likePatternToRegexp(std::string_view pattern) +{ + String res; + res.reserve(pattern.size() * 2); + + const char * pos = pattern.data(); + const char * const end = pattern.begin() + pattern.size(); + + if (pos < end && *pos == '%') + /// Eat leading % + while (++pos < end) + { + if (*pos != '%') + break; + } + else + res = "^"; + + while (pos < end) + { + switch (*pos) + { + /// Quote characters which have a special meaning in re2 + case '^': + case '$': + case '.': + case '[': + case '|': + case '(': + case ')': + case '?': + case '*': + case '+': + case '{': + res += '\\'; + res += *pos; + break; + case '%': + if (pos + 1 != end) + res += ".*"; + else + return res; + break; + case '_': + res += "."; + break; + case '\\': + if (pos + 1 == end) + throw Exception(ErrorCodes::CANNOT_PARSE_ESCAPE_SEQUENCE, "Invalid escape sequence at the end of LIKE pattern '{}'", pattern); + switch (pos[1]) + { + /// Interpret quoted LIKE metacharacters %, _ and \ as literals: + case '%': + case '_': + res += pos[1]; + ++pos; + break; + case '\\': + res += "\\\\"; /// backslash has a special meaning in re2 --> quote it + ++pos; + break; + /// Unknown escape sequence treated literally: as backslash (which must be quoted in re2) + the following character + default: + res += "\\\\"; + break; + } + break; + default: + res += *pos; + break; + } + ++pos; + } + + res += '$'; + return res; +} + +} diff --git a/src/Functions/likePatternToRegexp.h b/src/Functions/likePatternToRegexp.h index 6c0b6241ae2..8c5033254ec 100644 --- a/src/Functions/likePatternToRegexp.h +++ b/src/Functions/likePatternToRegexp.h @@ -1,93 +1,12 @@ #pragma once -#include #include +#include namespace DB { -namespace ErrorCodes -{ - extern const int CANNOT_PARSE_ESCAPE_SEQUENCE; -} - /// Transforms the [I]LIKE expression into regexp re2. For example, abc%def -> ^abc.*def$ -inline String likePatternToRegexp(std::string_view pattern) -{ - String res; - res.reserve(pattern.size() * 2); - - const char * pos = pattern.data(); - const char * const end = pattern.begin() + pattern.size(); - - if (pos < end && *pos == '%') - /// Eat leading % - while (++pos < end) - { - if (*pos != '%') - break; - } - else - res = "^"; - - while (pos < end) - { - switch (*pos) - { - /// Quote characters which have a special meaning in re2 - case '^': - case '$': - case '.': - case '[': - case '|': - case '(': - case ')': - case '?': - case '*': - case '+': - case '{': - res += '\\'; - res += *pos; - break; - case '%': - if (pos + 1 != end) - res += ".*"; - else - return res; - break; - case '_': - res += "."; - break; - case '\\': - if (pos + 1 == end) - throw Exception(ErrorCodes::CANNOT_PARSE_ESCAPE_SEQUENCE, "Invalid escape sequence at the end of LIKE pattern '{}'", pattern); - switch (pos[1]) - { - /// Interpret quoted LIKE metacharacters %, _ and \ as literals: - case '%': - case '_': - res += pos[1]; - ++pos; - break; - case '\\': - res += "\\\\"; /// backslash has a special meaning in re2 --> quote it - ++pos; - break; - /// Unknown escape sequence treated literally: as backslash (which must be quoted in re2) + the following character - default: - res += "\\\\"; - break; - } - break; - default: - res += *pos; - break; - } - ++pos; - } - - res += '$'; - return res; -} +String likePatternToRegexp(std::string_view pattern); } From c78e99eb56f49dcdb9052666b4f24ea9f7b06e8e Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Mon, 27 Feb 2023 12:46:58 +0000 Subject: [PATCH 221/841] ARM: Activate LDAPR with -march flag instead via -XClang The `-XClang ... -Xclang ...` flag is internal, undocumented and also needs `-Wno-unused-command-line-argument`. Enable LDAPR instructions on ARM via "official" -march. For more informations, see - https://developer.arm.com/documentation/101754/0619/armclang-Reference/armclang-Command-line-Options/-march?_ga=2.24245759.493510493.1644226748-1698312558.1644226748 - https://developer.arm.com/documentation/dui0801/g/A64-Data-Transfer-Instructions/LDAPR?lang=en --- cmake/cpu_features.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/cpu_features.cmake b/cmake/cpu_features.cmake index ca68b2ee49a..a79864aae07 100644 --- a/cmake/cpu_features.cmake +++ b/cmake/cpu_features.cmake @@ -57,7 +57,7 @@ elseif (ARCH_AARCH64) # [7] https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html # [8] https://developer.arm.com/documentation/102651/a/What-are-dot-product-intructions- # [9] https://developer.arm.com/documentation/dui0801/g/A64-Data-Transfer-Instructions/LDAPR?lang=en - set (COMPILER_FLAGS "${COMPILER_FLAGS} -march=armv8.2-a+simd+crypto+dotprod+ssbs -Xclang=-target-feature -Xclang=+ldapr -Wno-unused-command-line-argument") + set (COMPILER_FLAGS "${COMPILER_FLAGS} -march=armv8.2-a+simd+crypto+dotprod+ssbs+rcpc") endif () # Best-effort check: The build generates and executes intermediate binaries, e.g. protoc and llvm-tablegen. If we build on ARM for ARM From 67099f2a65a78e8dc898510a4f700b36603fd067 Mon Sep 17 00:00:00 2001 From: Igor Nikonov Date: Mon, 27 Feb 2023 12:53:09 +0000 Subject: [PATCH 222/841] Tests --- .../02674_trivial_count_analyzer.reference | 48 +++++++++++++++++++ .../02674_trivial_count_analyzer.sql | 46 ++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 tests/queries/0_stateless/02674_trivial_count_analyzer.reference create mode 100644 tests/queries/0_stateless/02674_trivial_count_analyzer.sql diff --git a/tests/queries/0_stateless/02674_trivial_count_analyzer.reference b/tests/queries/0_stateless/02674_trivial_count_analyzer.reference new file mode 100644 index 00000000000..2a94fd59d7b --- /dev/null +++ b/tests/queries/0_stateless/02674_trivial_count_analyzer.reference @@ -0,0 +1,48 @@ +-- { echoOn } +set allow_experimental_analyzer=1; +set optimize_trivial_count_query=1; +create table m3(a Int64, b UInt64) Engine=MergeTree order by tuple(); +select count() from m3; +0 +insert into m3 values (0,0); +insert into m3 values (-1,1); +select trimBoth(explain) from (explain select count() from m3) where explain like '%ReadFromPreparedSource (Optimized trivial count)%'; +ReadFromPreparedSource (Optimized trivial count) +select count() from m3; +2 +select count(*) from m3; +2 +select count(a) from m3; +2 +select count(b) from m3; +2 +select count() + 1 from m3; +3 +-- drop table m3; + +-- checking queries with FINAL +create table replacing_m3(a Int64, b UInt64) Engine=ReplacingMergeTree() order by (a, b); +SYSTEM STOP MERGES replacing_m3; +select count() from replacing_m3; +0 +insert into replacing_m3 values (0,0); +insert into replacing_m3 values (0,0); +insert into replacing_m3 values (-1,1); +insert into replacing_m3 values (-2,2); +select trimBoth(explain) from (explain select count() from replacing_m3) where explain like '%ReadFromPreparedSource (Optimized trivial count)%'; +ReadFromPreparedSource (Optimized trivial count) +select count() from replacing_m3; +4 +select count(*) from replacing_m3; +4 +select count(a) from replacing_m3; +4 +select count(b) from replacing_m3; +4 +set optimize_trivial_count_query=0; -- FIXME: wrong result for queries with FINAL +select count() from replacing_m3 FINAL; +3 +select count(a) from replacing_m3 FINAL; +3 +select count(b) from replacing_m3 FINAL; +3 diff --git a/tests/queries/0_stateless/02674_trivial_count_analyzer.sql b/tests/queries/0_stateless/02674_trivial_count_analyzer.sql new file mode 100644 index 00000000000..d4a686e6eff --- /dev/null +++ b/tests/queries/0_stateless/02674_trivial_count_analyzer.sql @@ -0,0 +1,46 @@ +drop table if exists m3; +drop table if exists replacing_m3; + +-- { echoOn } +set allow_experimental_analyzer=1; +set optimize_trivial_count_query=1; + +create table m3(a Int64, b UInt64) Engine=MergeTree order by tuple(); + +select count() from m3; + +insert into m3 values (0,0); +insert into m3 values (-1,1); + +select trimBoth(explain) from (explain select count() from m3) where explain like '%ReadFromPreparedSource (Optimized trivial count)%'; +select count() from m3; +select count(*) from m3; +select count(a) from m3; +select count(b) from m3; +select count() + 1 from m3; + +-- drop table m3; + +-- checking queries with FINAL +create table replacing_m3(a Int64, b UInt64) Engine=ReplacingMergeTree() order by (a, b); +SYSTEM STOP MERGES replacing_m3; + +select count() from replacing_m3; + +insert into replacing_m3 values (0,0); +insert into replacing_m3 values (0,0); +insert into replacing_m3 values (-1,1); +insert into replacing_m3 values (-2,2); + +select trimBoth(explain) from (explain select count() from replacing_m3) where explain like '%ReadFromPreparedSource (Optimized trivial count)%'; +select count() from replacing_m3; +select count(*) from replacing_m3; +select count(a) from replacing_m3; +select count(b) from replacing_m3; + +set optimize_trivial_count_query=0; -- FIXME: wrong result for queries with FINAL +select count() from replacing_m3 FINAL; +select count(a) from replacing_m3 FINAL; +select count(b) from replacing_m3 FINAL; + +-- drop table replacing_m3; From 70d5a41c51a897f5c0a6bc98df2f7ba0eab366e0 Mon Sep 17 00:00:00 2001 From: Nikita Taranov Date: Mon, 27 Feb 2023 13:57:29 +0100 Subject: [PATCH 223/841] impl --- src/Processors/QueryPlan/ReadFromMergeTree.cpp | 5 ++++- ...664_async_reading_with_small_limit.reference | 7 +++++++ .../02664_async_reading_with_small_limit.sql | 17 +++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 tests/queries/0_stateless/02664_async_reading_with_small_limit.reference create mode 100644 tests/queries/0_stateless/02664_async_reading_with_small_limit.sql diff --git a/src/Processors/QueryPlan/ReadFromMergeTree.cpp b/src/Processors/QueryPlan/ReadFromMergeTree.cpp index dfa91bfddad..f8ac2b9fcfd 100644 --- a/src/Processors/QueryPlan/ReadFromMergeTree.cpp +++ b/src/Processors/QueryPlan/ReadFromMergeTree.cpp @@ -155,7 +155,10 @@ ReadFromMergeTree::ReadFromMergeTree( /// When async reading is enabled, allow to read using more streams. /// Will add resize to output_streams_limit to reduce memory usage. output_streams_limit = std::min(requested_num_streams, settings.max_streams_for_merge_tree_reading); - requested_num_streams = std::max(requested_num_streams, settings.max_streams_for_merge_tree_reading); + /// We intentionally set `max_streams` to 1 in InterpreterSelectQuery in case of small limit. + /// Changing it here to `max_streams_for_merge_tree_reading` proven itself as a threat for performance. + if (requested_num_streams != 1) + requested_num_streams = std::max(requested_num_streams, settings.max_streams_for_merge_tree_reading); } else /// Just limit requested_num_streams otherwise. diff --git a/tests/queries/0_stateless/02664_async_reading_with_small_limit.reference b/tests/queries/0_stateless/02664_async_reading_with_small_limit.reference new file mode 100644 index 00000000000..a7f994d4b13 --- /dev/null +++ b/tests/queries/0_stateless/02664_async_reading_with_small_limit.reference @@ -0,0 +1,7 @@ +(Expression) +ExpressionTransform + (Limit) + Limit + (ReadFromMergeTree) + Concat 3 → 1 + MergeTreeInOrder × 3 0 → 1 diff --git a/tests/queries/0_stateless/02664_async_reading_with_small_limit.sql b/tests/queries/0_stateless/02664_async_reading_with_small_limit.sql new file mode 100644 index 00000000000..6ea6f880712 --- /dev/null +++ b/tests/queries/0_stateless/02664_async_reading_with_small_limit.sql @@ -0,0 +1,17 @@ +create table t(a UInt64) engine=MergeTree order by tuple(); + +system stop merges t; + +insert into t select * from numbers_mt(1e3); +insert into t select * from numbers_mt(1e3); +insert into t select * from numbers_mt(1e3); + +set allow_asynchronous_read_from_io_pool_for_merge_tree = 1; +set max_streams_for_merge_tree_reading = 64; +set max_block_size = 65409; + +-- slightly different transforms will be generated by reading steps if we let settings randomisation to change this setting value -- +set read_in_order_two_level_merge_threshold = 1000; + +-- for pretty simple queries (no filter, aggregation and so on) with a limit smaller than the `max_block_size` we request reading using only a single stream for better performance -- +explain pipeline select * from t limit 100; From 0ef83b10cea0d4a66d7a3dcfdec26d110f1044f8 Mon Sep 17 00:00:00 2001 From: avogar Date: Mon, 27 Feb 2023 13:01:07 +0000 Subject: [PATCH 224/841] Fix style --- tests/integration/test_kafka_bad_messages/test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/test_kafka_bad_messages/test.py b/tests/integration/test_kafka_bad_messages/test.py index e04d18154d9..da3cf36c853 100644 --- a/tests/integration/test_kafka_bad_messages/test.py +++ b/tests/integration/test_kafka_bad_messages/test.py @@ -13,6 +13,7 @@ instance = cluster.add_instance( with_kafka=True, ) + def kafka_create_topic( admin_client, topic_name, @@ -49,7 +50,7 @@ def kafka_create_topic( def kafka_delete_topic(admin_client, topic, max_retries=50): result = admin_client.delete_topics([topic]) - for (topic, e) in result.topic_error_codes: + for topic, e in result.topic_error_codes: if e == 0: logging.debug(f"Topic {topic} deleted") else: @@ -141,7 +142,6 @@ def test_bad_messages_parsing(kafka_cluster): "BSONEachRow", "MySQLDump", ]: - print(format_name) kafka_create_topic(admin_client, f"{format_name}_err") From 77607ba0d4fec97171d51643cab226bcf754d5c6 Mon Sep 17 00:00:00 2001 From: bkuschel Date: Thu, 23 Feb 2023 09:42:06 -0500 Subject: [PATCH 225/841] Fix setenv string call --- programs/server/Server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/server/Server.cpp b/programs/server/Server.cpp index 8c60f840b89..c9f5898fb72 100644 --- a/programs/server/Server.cpp +++ b/programs/server/Server.cpp @@ -696,7 +696,7 @@ try { const String config_path = config().getString("config-file", "config.xml"); const auto config_dir = std::filesystem::path{config_path}.replace_filename("openssl.conf"); - setenv("OPENSSL_CONF", config_dir.string(), true); + setenv("OPENSSL_CONF", config_dir.c_str(), true); } #endif From 97fc091b1f860d0d5e5ab283fb05867eb0f8b86b Mon Sep 17 00:00:00 2001 From: bkuschel Date: Thu, 23 Feb 2023 09:45:32 -0500 Subject: [PATCH 226/841] Fix link order for gnu ld --- src/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index aef7dc6a38e..54a3f5651e5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -579,6 +579,7 @@ endif() if (TARGET ch_rust::skim) # Add only -I, library is needed only for clickhouse-client/clickhouse-local dbms_target_include_directories(PRIVATE $) + dbms_target_link_libraries(PUBLIC ch_rust::skim) endif() include ("${ClickHouse_SOURCE_DIR}/cmake/add_check.cmake") From 891cb1e225d82a45bb33574ccf436ba50bb636d2 Mon Sep 17 00:00:00 2001 From: Boris Kuschel Date: Mon, 27 Feb 2023 08:00:53 -0500 Subject: [PATCH 227/841] Update src/CMakeLists.txt Co-authored-by: Yakov Olkhovskiy <99031427+yakov-olkhovskiy@users.noreply.github.com> --- src/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 54a3f5651e5..6c5142813c5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -577,7 +577,6 @@ if (TARGET ch_contrib::annoy) endif() if (TARGET ch_rust::skim) - # Add only -I, library is needed only for clickhouse-client/clickhouse-local dbms_target_include_directories(PRIVATE $) dbms_target_link_libraries(PUBLIC ch_rust::skim) endif() From 8fe08bc458a4aa1655230dc8dee47bee3f810844 Mon Sep 17 00:00:00 2001 From: Peignon Melvyn Date: Mon, 27 Feb 2023 14:02:10 +0100 Subject: [PATCH 228/841] Add a warning to the schema_inference_hints --- docs/en/operations/settings/settings-formats.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/en/operations/settings/settings-formats.md b/docs/en/operations/settings/settings-formats.md index f8c95d8b890..026e695fc1e 100644 --- a/docs/en/operations/settings/settings-formats.md +++ b/docs/en/operations/settings/settings-formats.md @@ -142,6 +142,10 @@ y Nullable(String) z IPv4 ``` +:::warning +If the `schema_inference_hints` is not formated properly, or if there is a typo or a wrong datatype, etc... the whole schema_inference_hints will be ignored. +::: + ## schema_inference_make_columns_nullable {#schema_inference_make_columns_nullable} Controls making inferred types `Nullable` in schema inference for formats without information about nullability. From 7684153100907ad3987980a66b79824158d10dac Mon Sep 17 00:00:00 2001 From: artem-yadr <84010375+artem-yadr@users.noreply.github.com> Date: Mon, 27 Feb 2023 16:18:08 +0300 Subject: [PATCH 229/841] Redeclaration error fix --- base/poco/MongoDB/src/Connection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/poco/MongoDB/src/Connection.cpp b/base/poco/MongoDB/src/Connection.cpp index c75211cf9d7..38c31d2250a 100644 --- a/base/poco/MongoDB/src/Connection.cpp +++ b/base/poco/MongoDB/src/Connection.cpp @@ -237,7 +237,7 @@ void Connection::connect(const std::string& uri, SocketFactory& socketFactory) for (std::vector::const_iterator it = strAddresses.cbegin();it != strAddresses.cend(); ++it) { newURI = *it; - Poco::URI theURI(newURI); + theURI = Poco::URI(newURI); std::string host = theURI.getHost(); Poco::UInt16 port = theURI.getPort(); From 5b6e581c1a86933bf640ceb075f449282500cb3b Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Mon, 27 Feb 2023 14:18:41 +0100 Subject: [PATCH 230/841] Preset description on the tweak reset --- tests/ci/release.py | 2 ++ tests/ci/version_helper.py | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/tests/ci/release.py b/tests/ci/release.py index f7b5155e750..e221bd3d008 100755 --- a/tests/ci/release.py +++ b/tests/ci/release.py @@ -273,7 +273,9 @@ class Release: self, version: ClickHouseVersion, reset_tweak: bool = True ) -> None: if reset_tweak: + desc = version.description version = version.reset_tweak() + version.with_description(desc) update_cmake_version(version) update_contributors(raise_error=True) if self.dry_run: diff --git a/tests/ci/version_helper.py b/tests/ci/version_helper.py index 1ede2c90b55..372974f4eda 100755 --- a/tests/ci/version_helper.py +++ b/tests/ci/version_helper.py @@ -58,6 +58,7 @@ class ClickHouseVersion: elif self._git is not None: self._tweak = self._git.tweak self._describe = "" + self._description = "" def update(self, part: Literal["major", "minor", "patch"]) -> "ClickHouseVersion": """If part is valid, returns a new version""" @@ -125,6 +126,10 @@ class ClickHouseVersion: def describe(self): return self._describe + @property + def description(self) -> str: + return self._description + @property def string(self): return ".".join( @@ -149,6 +154,7 @@ class ClickHouseVersion: def with_description(self, version_type): if version_type not in VersionType.VALID: raise ValueError(f"version type {version_type} not in {VersionType.VALID}") + self._description = version_type self._describe = f"v{self.string}-{version_type}" def __eq__(self, other: Any) -> bool: From 385beda8888dcabc895d0538914b3ce747c7ea67 Mon Sep 17 00:00:00 2001 From: artem-yadr <84010375+artem-yadr@users.noreply.github.com> Date: Mon, 27 Feb 2023 16:25:12 +0300 Subject: [PATCH 231/841] Update base/poco/MongoDB/include/Poco/MongoDB/Connection.h Co-authored-by: Kseniia Sumarokova <54203879+kssenii@users.noreply.github.com> --- base/poco/MongoDB/include/Poco/MongoDB/Connection.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/poco/MongoDB/include/Poco/MongoDB/Connection.h b/base/poco/MongoDB/include/Poco/MongoDB/Connection.h index 8fd9c7919e4..5c5f6f76638 100644 --- a/base/poco/MongoDB/include/Poco/MongoDB/Connection.h +++ b/base/poco/MongoDB/include/Poco/MongoDB/Connection.h @@ -91,7 +91,7 @@ namespace MongoDB Poco::Net::SocketAddress address() const; /// Returns the address of the MongoDB server. - std::string uri() const; + const std::string & uri() const; /// Returns the uri on which the connection was made. void connect(const std::string & hostAndPort); From 014a9c796167831a52eb7cce38de4fd503233ded Mon Sep 17 00:00:00 2001 From: avogar Date: Mon, 27 Feb 2023 13:25:28 +0000 Subject: [PATCH 232/841] Fix lib file --- tests/ci/stress_tests.lib | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/ci/stress_tests.lib b/tests/ci/stress_tests.lib index 97269dc7d75..2cbae112b7f 100644 --- a/tests/ci/stress_tests.lib +++ b/tests/ci/stress_tests.lib @@ -16,14 +16,17 @@ function escaped() clickhouse local -S 's String' --input-format=LineAsString -q "select substr(s, 1, $FAILURE_CONTEXT_MAX_LINE_WIDTH) from table format CustomSeparated settings format_custom_row_after_delimiter='\\\\\\\\n'" } + function head_escaped() { head -n $FAILURE_CONTEXT_LINES $1 | escaped } + function unts() { grep -Po "[0-9][0-9]:[0-9][0-9] \K.*" } + function trim_server_logs() { head -n $FAILURE_CONTEXT_LINES "/test_output/$1" | grep -Eo " \[ [0-9]+ \] \{.*" | escaped @@ -143,7 +146,8 @@ function stop() clickhouse stop --max-tries "$max_tries" --do-not-kill && return - if [ $check_hang == true ] then + if [ $check_hang == true ] + then # We failed to stop the server with SIGTERM. Maybe it hang, let's collect stacktraces. echo -e "Possible deadlock on shutdown (see gdb.log)$FAIL" >> /test_output/test_results.tsv kill -TERM "$(pidof gdb)" ||: From 463dbdc838e019cb505dedf9c4446d922867ce9b Mon Sep 17 00:00:00 2001 From: robot-clickhouse Date: Mon, 27 Feb 2023 13:29:21 +0000 Subject: [PATCH 233/841] Update version_date.tsv and changelogs after v22.3.19.6-lts --- docs/changelogs/v22.3.19.6-lts.md | 17 +++++++++++++++++ utils/list-versions/version_date.tsv | 1 + 2 files changed, 18 insertions(+) create mode 100644 docs/changelogs/v22.3.19.6-lts.md diff --git a/docs/changelogs/v22.3.19.6-lts.md b/docs/changelogs/v22.3.19.6-lts.md new file mode 100644 index 00000000000..d5b45f4ce66 --- /dev/null +++ b/docs/changelogs/v22.3.19.6-lts.md @@ -0,0 +1,17 @@ +--- +sidebar_position: 1 +sidebar_label: 2023 +--- + +# 2023 Changelog + +### ClickHouse release v22.3.19.6-lts (467e0a7bd77) FIXME as compared to v22.3.18.37-lts (fe512717551) + +#### Bug Fix (user-visible misbehavior in official stable or prestable release) + +* Backported in [#46440](https://github.com/ClickHouse/ClickHouse/issues/46440): Fix possible `LOGICAL_ERROR` in asynchronous inserts with invalid data sent in format `VALUES`. [#46350](https://github.com/ClickHouse/ClickHouse/pull/46350) ([Anton Popov](https://github.com/CurtizJ)). + +#### NOT FOR CHANGELOG / INSIGNIFICANT + +* Get rid of legacy DocsReleaseChecks [#46665](https://github.com/ClickHouse/ClickHouse/pull/46665) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). + diff --git a/utils/list-versions/version_date.tsv b/utils/list-versions/version_date.tsv index d4abbdebee1..3814e94bf24 100644 --- a/utils/list-versions/version_date.tsv +++ b/utils/list-versions/version_date.tsv @@ -63,6 +63,7 @@ v22.4.5.9-stable 2022-05-06 v22.4.4.7-stable 2022-04-29 v22.4.3.3-stable 2022-04-26 v22.4.2.1-stable 2022-04-22 +v22.3.19.6-lts 2023-02-27 v22.3.18.37-lts 2023-02-15 v22.3.17.13-lts 2023-01-12 v22.3.16.1190-lts 2023-01-09 From a17edd224a7620dac4b0ed5d9743c371a1d62bd3 Mon Sep 17 00:00:00 2001 From: MeenaRenganathan22 Date: Mon, 27 Feb 2023 05:49:28 -0800 Subject: [PATCH 234/841] Updated the krb5 submodule reference --- contrib/krb5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/krb5 b/contrib/krb5 index b854ad57912..b23ef0fa4cc 160000 --- a/contrib/krb5 +++ b/contrib/krb5 @@ -1 +1 @@ -Subproject commit b854ad57912fc2ef21cbe9a69622777d551d3266 +Subproject commit b23ef0fa4cca9369afd909ac9659696455fefbd2 From 0de2eb8a795908132ed2b6eaaa4bd09fb76e9f2d Mon Sep 17 00:00:00 2001 From: robot-clickhouse Date: Mon, 27 Feb 2023 14:45:39 +0000 Subject: [PATCH 235/841] Update version_date.tsv and changelogs after v22.8.14.53-lts --- docs/changelogs/v22.8.14.53-lts.md | 40 ++++++++++++++++++++++++++++ utils/list-versions/version_date.tsv | 1 + 2 files changed, 41 insertions(+) create mode 100644 docs/changelogs/v22.8.14.53-lts.md diff --git a/docs/changelogs/v22.8.14.53-lts.md b/docs/changelogs/v22.8.14.53-lts.md new file mode 100644 index 00000000000..5978080fa3a --- /dev/null +++ b/docs/changelogs/v22.8.14.53-lts.md @@ -0,0 +1,40 @@ +--- +sidebar_position: 1 +sidebar_label: 2023 +--- + +# 2023 Changelog + +### ClickHouse release v22.8.14.53-lts (4ea67c40077) FIXME as compared to v22.8.13.20-lts (e4817946d18) + +#### Performance Improvement +* Backported in [#45845](https://github.com/ClickHouse/ClickHouse/issues/45845): Fixed performance of short `SELECT` queries that read from tables with large number of`Array`/`Map`/`Nested` columns. [#45630](https://github.com/ClickHouse/ClickHouse/pull/45630) ([Anton Popov](https://github.com/CurtizJ)). +* Backported in [#46374](https://github.com/ClickHouse/ClickHouse/issues/46374): Fix too big memory usage for vertical merges on non-remote disk. Respect `max_insert_delayed_streams_for_parallel_write` for the remote disk. [#46275](https://github.com/ClickHouse/ClickHouse/pull/46275) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Backported in [#46358](https://github.com/ClickHouse/ClickHouse/issues/46358): Allow using Vertical merge algorithm with parts in Compact format. This will allow ClickHouse server to use much less memory for background operations. This closes [#46084](https://github.com/ClickHouse/ClickHouse/issues/46084). [#46282](https://github.com/ClickHouse/ClickHouse/pull/46282) ([Anton Popov](https://github.com/CurtizJ)). + +#### Build/Testing/Packaging Improvement +* Backported in [#46112](https://github.com/ClickHouse/ClickHouse/issues/46112): Remove the dependency on the `adduser` tool from the packages, because we don't use it. This fixes [#44934](https://github.com/ClickHouse/ClickHouse/issues/44934). [#45011](https://github.com/ClickHouse/ClickHouse/pull/45011) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Backported in [#46482](https://github.com/ClickHouse/ClickHouse/issues/46482): Get rid of unnecessary build for standalone clickhouse-keeper. [#46367](https://github.com/ClickHouse/ClickHouse/pull/46367) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Backported in [#46505](https://github.com/ClickHouse/ClickHouse/issues/46505): Some time ago the ccache compression was changed to `zst`, but `gz` archives are downloaded by default. It fixes it by prioritizing zst archive. [#46490](https://github.com/ClickHouse/ClickHouse/pull/46490) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). + +#### Bug Fix (user-visible misbehavior in official stable or prestable release) + +* Backported in [#45908](https://github.com/ClickHouse/ClickHouse/issues/45908): Fixed bug with non-parsable default value for EPHEMERAL column in table metadata. [#44026](https://github.com/ClickHouse/ClickHouse/pull/44026) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Backported in [#46238](https://github.com/ClickHouse/ClickHouse/issues/46238): A couple of seg faults have been reported around `c-ares`. All of the recent stack traces observed fail on inserting into `std::unodered_set<>`. I believe I have found the root cause of this, it seems to be unprocessed queries. Prior to this PR, CH calls `poll` to wait on the file descriptors in the `c-ares` channel. According to the [poll docs](https://man7.org/linux/man-pages/man2/poll.2.html), a negative return value means an error has ocurred. Because of this, we would abort the execution and return failure. The problem is that `poll` will also return a negative value if a system interrupt occurs. A system interrupt does not mean the processing has failed or ended, but we would abort it anyways because we were checking for negative values. Once the execution is aborted, the whole stack is destroyed, which includes the `std::unordered_set` passed to the `void *` parameter of the c-ares callback. Once c-ares completed the request, the callback would be invoked and would access an invalid memory address causing a segfault. [#45629](https://github.com/ClickHouse/ClickHouse/pull/45629) ([Arthur Passos](https://github.com/arthurpassos)). +* Backported in [#45727](https://github.com/ClickHouse/ClickHouse/issues/45727): Fix key description when encountering duplicate primary keys. This can happen in projections. See [#45590](https://github.com/ClickHouse/ClickHouse/issues/45590) for details. [#45686](https://github.com/ClickHouse/ClickHouse/pull/45686) ([Amos Bird](https://github.com/amosbird)). +* Backported in [#46394](https://github.com/ClickHouse/ClickHouse/issues/46394): Fix `SYSTEM UNFREEZE` queries failing with the exception `CANNOT_PARSE_INPUT_ASSERTION_FAILED`. [#46325](https://github.com/ClickHouse/ClickHouse/pull/46325) ([Aleksei Filatov](https://github.com/aalexfvk)). +* Backported in [#46442](https://github.com/ClickHouse/ClickHouse/issues/46442): Fix possible `LOGICAL_ERROR` in asynchronous inserts with invalid data sent in format `VALUES`. [#46350](https://github.com/ClickHouse/ClickHouse/pull/46350) ([Anton Popov](https://github.com/CurtizJ)). +* Backported in [#46674](https://github.com/ClickHouse/ClickHouse/issues/46674): Fix an invalid processing of constant `LowCardinality` argument in function `arrayMap`. This bug could lead to a segfault in release, and logical error `Bad cast` in debug build. [#46569](https://github.com/ClickHouse/ClickHouse/pull/46569) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Backported in [#46879](https://github.com/ClickHouse/ClickHouse/issues/46879): Fix MSan report in the `maxIntersections` function. This closes [#43126](https://github.com/ClickHouse/ClickHouse/issues/43126). [#46847](https://github.com/ClickHouse/ClickHouse/pull/46847) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Backported in [#46871](https://github.com/ClickHouse/ClickHouse/issues/46871): Fix a bug in the `Map` data type. This closes [#46855](https://github.com/ClickHouse/ClickHouse/issues/46855). [#46856](https://github.com/ClickHouse/ClickHouse/pull/46856) ([Alexey Milovidov](https://github.com/alexey-milovidov)). + +#### NOT FOR CHANGELOG / INSIGNIFICANT + +* Another attempt to fix automerge, or at least to have debug footprint [#45476](https://github.com/ClickHouse/ClickHouse/pull/45476) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Add check for running workflows to merge_pr.py [#45803](https://github.com/ClickHouse/ClickHouse/pull/45803) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Get rid of progress timestamps in release publishing [#45818](https://github.com/ClickHouse/ClickHouse/pull/45818) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Add necessary dependency for sanitizers [#45959](https://github.com/ClickHouse/ClickHouse/pull/45959) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Add helping logging to auto-merge script [#46080](https://github.com/ClickHouse/ClickHouse/pull/46080) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Fix write buffer destruction order for vertical merge. [#46205](https://github.com/ClickHouse/ClickHouse/pull/46205) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Get rid of legacy DocsReleaseChecks [#46665](https://github.com/ClickHouse/ClickHouse/pull/46665) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). + diff --git a/utils/list-versions/version_date.tsv b/utils/list-versions/version_date.tsv index 3814e94bf24..50937edb449 100644 --- a/utils/list-versions/version_date.tsv +++ b/utils/list-versions/version_date.tsv @@ -25,6 +25,7 @@ v22.9.4.32-stable 2022-10-26 v22.9.3.18-stable 2022-09-30 v22.9.2.7-stable 2022-09-23 v22.9.1.2603-stable 2022-09-22 +v22.8.14.53-lts 2023-02-27 v22.8.13.20-lts 2023-01-29 v22.8.12.45-lts 2023-01-10 v22.8.11.15-lts 2022-12-08 From 7b85b35534fd65fae459e5ce13b5328da7d6c6b0 Mon Sep 17 00:00:00 2001 From: Anton Popov Date: Mon, 27 Feb 2023 15:11:25 +0000 Subject: [PATCH 236/841] fix skip indexes --- src/Storages/IndicesDescription.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Storages/IndicesDescription.cpp b/src/Storages/IndicesDescription.cpp index 00a3636b605..591a9082f7a 100644 --- a/src/Storages/IndicesDescription.cpp +++ b/src/Storages/IndicesDescription.cpp @@ -96,6 +96,12 @@ IndexDescription IndexDescription::getIndexFromAST(const ASTPtr & definition_ast result.expression = ExpressionAnalyzer(expr_list, syntax, context).getActions(true); result.sample_block = result.expression->getSampleBlock(); + for (const auto & elem : result.sample_block) + { + result.column_names.push_back(elem.name); + result.data_types.push_back(elem.type); + } + const auto & definition_arguments = index_definition->type->arguments; if (definition_arguments) { From bc4418bfb6012146d998d5086c5336395eee98aa Mon Sep 17 00:00:00 2001 From: Derek Chia Date: Mon, 27 Feb 2023 23:14:22 +0800 Subject: [PATCH 237/841] Update schema-inference.md --- docs/en/interfaces/schema-inference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/interfaces/schema-inference.md b/docs/en/interfaces/schema-inference.md index 2b50794c458..25bdb0c36a3 100644 --- a/docs/en/interfaces/schema-inference.md +++ b/docs/en/interfaces/schema-inference.md @@ -229,7 +229,7 @@ To prevent inferring the same schema every time ClickHouse read the data from th There are special settings that control this cache: - `schema_inference_cache_max_elements_for_{file/s3/hdfs/url}` - the maximum number of cached schemas for the corresponding table function. The default value is `4096`. These settings should be set in the server config. -- `use_cache_for_{file,s3,hdfs,url}_schema_inference` - allows turning on/off using cache for schema inference. These settings can be used in queries. +- `schema_inference_use_cache_for_{file,s3,hdfs,url}` - allows turning on/off using cache for schema inference. These settings can be used in queries. The schema of the file can be changed by modifying the data or by changing format settings. For this reason, the schema inference cache identifies the schema by file source, format name, used format settings, and the last modification time of the file. From 12a9ff36b230c0de05b1abfd1b70340c94db8e7c Mon Sep 17 00:00:00 2001 From: avogar Date: Mon, 27 Feb 2023 15:20:56 +0000 Subject: [PATCH 238/841] Better exception messages when schema_inference_hints is ill-formatted --- .../parseColumnsListForTableFunction.cpp | 7 ++- .../parseColumnsListForTableFunction.h | 2 +- src/Processors/Formats/ISchemaReader.cpp | 60 ++++++++++++++----- src/Processors/Formats/ISchemaReader.h | 39 ++++++++---- .../Impl/JSONColumnsBlockInputFormatBase.cpp | 6 +- .../Impl/JSONColumnsBlockInputFormatBase.h | 1 + src/TableFunctions/TableFunctionValues.cpp | 3 +- 7 files changed, 86 insertions(+), 32 deletions(-) diff --git a/src/Interpreters/parseColumnsListForTableFunction.cpp b/src/Interpreters/parseColumnsListForTableFunction.cpp index 9e6326b431a..e7302b6324a 100644 --- a/src/Interpreters/parseColumnsListForTableFunction.cpp +++ b/src/Interpreters/parseColumnsListForTableFunction.cpp @@ -92,12 +92,11 @@ ColumnsDescription parseColumnsListFromString(const std::string & structure, con return columns; } -bool tryParseColumnsListFromString(const std::string & structure, ColumnsDescription & columns, const ContextPtr & context) +bool tryParseColumnsListFromString(const std::string & structure, ColumnsDescription & columns, const ContextPtr & context, String & error) { ParserColumnDeclarationList parser(true, true); const Settings & settings = context->getSettingsRef(); - String error; const char * start = structure.data(); const char * end = structure.data() + structure.size(); ASTPtr columns_list_raw = tryParseQuery(parser, start, end, error, false, "columns declaration list", false, settings.max_query_size, settings.max_parser_depth); @@ -106,7 +105,10 @@ bool tryParseColumnsListFromString(const std::string & structure, ColumnsDescrip auto * columns_list = dynamic_cast(columns_list_raw.get()); if (!columns_list) + { + error = fmt::format("Invalid columns declaration list: \"{}\"", structure); return false; + } try { @@ -118,6 +120,7 @@ bool tryParseColumnsListFromString(const std::string & structure, ColumnsDescrip } catch (...) { + error = getCurrentExceptionMessage(false); return false; } } diff --git a/src/Interpreters/parseColumnsListForTableFunction.h b/src/Interpreters/parseColumnsListForTableFunction.h index 97923bcad77..212c378d3b5 100644 --- a/src/Interpreters/parseColumnsListForTableFunction.h +++ b/src/Interpreters/parseColumnsListForTableFunction.h @@ -33,6 +33,6 @@ void validateDataType(const DataTypePtr & type, const DataTypeValidationSettings /// Parses a common argument for table functions such as table structure given in string ColumnsDescription parseColumnsListFromString(const std::string & structure, const ContextPtr & context); -bool tryParseColumnsListFromString(const std::string & structure, ColumnsDescription & columns, const ContextPtr & context); +bool tryParseColumnsListFromString(const std::string & structure, ColumnsDescription & columns, const ContextPtr & context, String & error); } diff --git a/src/Processors/Formats/ISchemaReader.cpp b/src/Processors/Formats/ISchemaReader.cpp index 48cb093f0ab..c96cb373a2d 100644 --- a/src/Processors/Formats/ISchemaReader.cpp +++ b/src/Processors/Formats/ISchemaReader.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include @@ -15,20 +16,38 @@ namespace ErrorCodes extern const int BAD_ARGUMENTS; } -void checkFinalInferredType(DataTypePtr & type, const String & name, const FormatSettings & settings, const DataTypePtr & default_type, size_t rows_read) +void checkFinalInferredType( + DataTypePtr & type, + const String & name, + const FormatSettings & settings, + const DataTypePtr & default_type, + size_t rows_read, + const String & hints_parsing_error) { if (!checkIfTypeIsComplete(type)) { if (!default_type) - throw Exception( - ErrorCodes::ONLY_NULLS_WHILE_READING_SCHEMA, - "Cannot determine type for column '{}' by first {} rows " - "of data, most likely this column contains only Nulls or empty " - "Arrays/Maps. You can specify the type for this column using setting schema_inference_hints. " - "If your data contains complex JSON objects, try enabling one " - "of the settings allow_experimental_object_type/input_format_json_read_objects_as_strings", - name, - rows_read); + { + if (hints_parsing_error.empty()) + throw Exception( + ErrorCodes::ONLY_NULLS_WHILE_READING_SCHEMA, + "Cannot determine type for column '{}' by first {} rows " + "of data, most likely this column contains only Nulls or empty " + "Arrays/Maps. You can specify the type for this column using setting schema_inference_hints. " + "If your data contains complex JSON objects, try enabling one " + "of the settings allow_experimental_object_type/input_format_json_read_objects_as_strings", + name, + rows_read); + else + throw Exception( + ErrorCodes::ONLY_NULLS_WHILE_READING_SCHEMA, + "Cannot determine type for column '{}' by first {} rows " + "of data, most likely this column contains only Nulls or empty Arrays/Maps. " + "Column types from setting schema_inference_hints couldn't be parsed because of error: {}", + name, + rows_read, + hints_parsing_error); + } type = default_type; } @@ -46,11 +65,15 @@ IIRowSchemaReader::IIRowSchemaReader(ReadBuffer & in_, const FormatSettings & fo void IIRowSchemaReader::setContext(ContextPtr & context) { ColumnsDescription columns; - if (tryParseColumnsListFromString(hints_str, columns, context)) + if (tryParseColumnsListFromString(hints_str, columns, context, hints_parsing_error)) { for (const auto & [name, type] : columns.getAll()) hints[name] = type; } + else + { + LOG_WARNING(&Poco::Logger::get("IIRowSchemaReader"), "Couldn't parse schema inference hints: {}. This setting will be ignored", hints_parsing_error); + } } void IIRowSchemaReader::transformTypesIfNeeded(DataTypePtr & type, DataTypePtr & new_type) @@ -137,7 +160,14 @@ NamesAndTypesList IRowSchemaReader::readSchema() if (!new_data_types[field_index] || hints.contains(column_names[field_index])) continue; - chooseResultColumnType(*this, data_types[field_index], new_data_types[field_index], getDefaultType(field_index), std::to_string(field_index + 1), rows_read); + chooseResultColumnType( + *this, + data_types[field_index], + new_data_types[field_index], + getDefaultType(field_index), + std::to_string(field_index + 1), + rows_read, + hints_parsing_error); } } @@ -149,7 +179,7 @@ NamesAndTypesList IRowSchemaReader::readSchema() { transformFinalTypeIfNeeded(data_types[field_index]); /// Check that we could determine the type of this column. - checkFinalInferredType(data_types[field_index], column_names[field_index], format_settings, getDefaultType(field_index), rows_read); + checkFinalInferredType(data_types[field_index], column_names[field_index], format_settings, getDefaultType(field_index), rows_read, hints_parsing_error); } result.emplace_back(column_names[field_index], data_types[field_index]); } @@ -246,7 +276,7 @@ NamesAndTypesList IRowWithNamesSchemaReader::readSchema() continue; auto & type = it->second; - chooseResultColumnType(*this, type, new_type, default_type, name, rows_read); + chooseResultColumnType(*this, type, new_type, default_type, name, rows_read, hints_parsing_error); } } @@ -263,7 +293,7 @@ NamesAndTypesList IRowWithNamesSchemaReader::readSchema() { transformFinalTypeIfNeeded(type); /// Check that we could determine the type of this column. - checkFinalInferredType(type, name, format_settings, default_type, rows_read); + checkFinalInferredType(type, name, format_settings, default_type, rows_read, hints_parsing_error); } result.emplace_back(name, type); } diff --git a/src/Processors/Formats/ISchemaReader.h b/src/Processors/Formats/ISchemaReader.h index edc5c6068c3..81bc94afa6c 100644 --- a/src/Processors/Formats/ISchemaReader.h +++ b/src/Processors/Formats/ISchemaReader.h @@ -65,6 +65,7 @@ protected: String hints_str; FormatSettings format_settings; std::unordered_map hints; + String hints_parsing_error; }; /// Base class for schema inference for formats that read data row by row. @@ -145,7 +146,8 @@ void chooseResultColumnType( DataTypePtr & new_type, const DataTypePtr & default_type, const String & column_name, - size_t row) + size_t row, + const String & hints_parsing_error = "") { if (!type) { @@ -166,14 +168,25 @@ void chooseResultColumnType( type = default_type; else { - throw Exception( - ErrorCodes::TYPE_MISMATCH, - "Automatically defined type {} for column '{}' in row {} differs from type defined by previous rows: {}. " - "You can specify the type for this column using setting schema_inference_hints", - type->getName(), - column_name, - row, - new_type->getName()); + if (hints_parsing_error.empty()) + throw Exception( + ErrorCodes::TYPE_MISMATCH, + "Automatically defined type {} for column '{}' in row {} differs from type defined by previous rows: {}. " + "You can specify the type for this column using setting schema_inference_hints", + type->getName(), + column_name, + row, + new_type->getName()); + else + throw Exception( + ErrorCodes::TYPE_MISMATCH, + "Automatically defined type {} for column '{}' in row {} differs from type defined by previous rows: {}. " + "Column types from setting schema_inference_hints couldn't be parsed because of error: {}", + type->getName(), + column_name, + row, + new_type->getName(), + hints_parsing_error); } } @@ -196,7 +209,13 @@ void chooseResultColumnTypes( chooseResultColumnType(schema_reader, types[i], new_types[i], default_type, column_names[i], row); } -void checkFinalInferredType(DataTypePtr & type, const String & name, const FormatSettings & settings, const DataTypePtr & default_type, size_t rows_read); +void checkFinalInferredType( + DataTypePtr & type, + const String & name, + const FormatSettings & settings, + const DataTypePtr & default_type, + size_t rows_read, + const String & hints_parsing_error); Strings splitColumnNames(const String & column_names_str); diff --git a/src/Processors/Formats/Impl/JSONColumnsBlockInputFormatBase.cpp b/src/Processors/Formats/Impl/JSONColumnsBlockInputFormatBase.cpp index 204a5077e31..a39722950e4 100644 --- a/src/Processors/Formats/Impl/JSONColumnsBlockInputFormatBase.cpp +++ b/src/Processors/Formats/Impl/JSONColumnsBlockInputFormatBase.cpp @@ -182,7 +182,7 @@ JSONColumnsSchemaReaderBase::JSONColumnsSchemaReaderBase( void JSONColumnsSchemaReaderBase::setContext(ContextPtr & ctx) { ColumnsDescription columns; - if (tryParseColumnsListFromString(hints_str, columns, ctx)) + if (tryParseColumnsListFromString(hints_str, columns, ctx, hints_parsing_error)) { for (const auto & [name, type] : columns.getAll()) hints[name] = type; @@ -238,7 +238,7 @@ NamesAndTypesList JSONColumnsSchemaReaderBase::readSchema() rows_in_block = 0; auto column_type = readColumnAndGetDataType( column_name, rows_in_block, format_settings.max_rows_to_read_for_schema_inference - total_rows_read); - chooseResultColumnType(*this, names_to_types[column_name], column_type, nullptr, column_name, total_rows_read + 1); + chooseResultColumnType(*this, names_to_types[column_name], column_type, nullptr, column_name, total_rows_read + 1, hints_parsing_error); } ++iteration; @@ -260,7 +260,7 @@ NamesAndTypesList JSONColumnsSchemaReaderBase::readSchema() { transformJSONTupleToArrayIfPossible(type, format_settings, &inference_info); /// Check that we could determine the type of this column. - checkFinalInferredType(type, name, format_settings, nullptr, format_settings.max_rows_to_read_for_schema_inference); + checkFinalInferredType(type, name, format_settings, nullptr, format_settings.max_rows_to_read_for_schema_inference, hints_parsing_error); } result.emplace_back(name, type); } diff --git a/src/Processors/Formats/Impl/JSONColumnsBlockInputFormatBase.h b/src/Processors/Formats/Impl/JSONColumnsBlockInputFormatBase.h index 3292b5649c9..2babc0734f9 100644 --- a/src/Processors/Formats/Impl/JSONColumnsBlockInputFormatBase.h +++ b/src/Processors/Formats/Impl/JSONColumnsBlockInputFormatBase.h @@ -91,6 +91,7 @@ private: const FormatSettings format_settings; String hints_str; std::unordered_map hints; + String hints_parsing_error; std::unique_ptr reader; Names column_names_from_settings; JSONInferenceInfo inference_info; diff --git a/src/TableFunctions/TableFunctionValues.cpp b/src/TableFunctions/TableFunctionValues.cpp index 545427f30c9..cf0e20c624c 100644 --- a/src/TableFunctions/TableFunctionValues.cpp +++ b/src/TableFunctions/TableFunctionValues.cpp @@ -92,7 +92,8 @@ void TableFunctionValues::parseArguments(const ASTPtr & ast_function, ContextPtr const auto & literal = args[0]->as(); String value; - if (args.size() > 1 && literal && literal->value.tryGet(value) && tryParseColumnsListFromString(value, structure, context)) + String error; + if (args.size() > 1 && literal && literal->value.tryGet(value) && tryParseColumnsListFromString(value, structure, context, error)) { has_structure_in_arguments = true; return; From c94fbc45bf96b35df61134c3e9b9e2e00dbcc732 Mon Sep 17 00:00:00 2001 From: pufit Date: Mon, 27 Feb 2023 10:31:41 -0500 Subject: [PATCH 239/841] Update docs --- .../operations/system-tables/server_settings.md | 16 ++++++++-------- .../operations/system-tables/server_settings.md | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/en/operations/system-tables/server_settings.md b/docs/en/operations/system-tables/server_settings.md index 293c670750b..e1bf8c3d63f 100644 --- a/docs/en/operations/system-tables/server_settings.md +++ b/docs/en/operations/system-tables/server_settings.md @@ -26,14 +26,14 @@ WHERE name LIKE '%thread_pool%' ``` ``` text -┌─name─────────────────────────┬─value─┬─default─┬─changed─┬─description───────────────────────────┬─type───┐ -│ max_thread_pool_size │ 5000 │ 10000 │ 1 │ Max size for global thread pool. │ UInt64 │ -│ max_thread_pool_free_size │ 1000 │ 1000 │ 0 │ Max free size for global thread pool. │ UInt64 │ -│ thread_pool_queue_size │ 10000 │ 10000 │ 0 │ Queue size for global thread pool. │ UInt64 │ -│ max_io_thread_pool_size │ 100 │ 100 │ 0 │ Max size for IO thread pool. │ UInt64 │ -│ max_io_thread_pool_free_size │ 0 │ 0 │ 0 │ Max free size for IO thread pool. │ UInt64 │ -│ io_thread_pool_queue_size │ 10000 │ 10000 │ 0 │ Queue size for IO thread pool. │ UInt64 │ -└──────────────────────────────┴───────┴─────────┴─────────┴───────────────────────────────────────┴────────┘ +┌─name─────────────────────────┬─value─┬─default─┬─changed─┬─description─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬─type───┐ +│ max_thread_pool_size │ 5000 │ 10000 │ 1 │ The maximum number of threads that could be allocated from the OS and used for query execution and background operations. │ UInt64 │ +│ max_thread_pool_free_size │ 1000 │ 1000 │ 0 │ The maximum number of threads that will always stay in a global thread pool once allocated and remain idle in case of insufficient number of tasks. │ UInt64 │ +│ thread_pool_queue_size │ 10000 │ 10000 │ 0 │ The maximum number of tasks that will be placed in a queue and wait for execution. │ UInt64 │ +│ max_io_thread_pool_size │ 100 │ 100 │ 0 │ The maximum number of threads that would be used for IO operations │ UInt64 │ +│ max_io_thread_pool_free_size │ 0 │ 0 │ 0 │ Max free size for IO thread pool. │ UInt64 │ +│ io_thread_pool_queue_size │ 10000 │ 10000 │ 0 │ Queue size for IO thread pool. │ UInt64 │ +└──────────────────────────────┴───────┴─────────┴─────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────┘ ``` Using of `WHERE changed` can be useful, for example, when you want to check diff --git a/docs/ru/operations/system-tables/server_settings.md b/docs/ru/operations/system-tables/server_settings.md index bd19dbd3862..4c0f4af1da2 100644 --- a/docs/ru/operations/system-tables/server_settings.md +++ b/docs/ru/operations/system-tables/server_settings.md @@ -27,14 +27,14 @@ WHERE name LIKE '%thread_pool%' ``` ``` text -┌─name─────────────────────────┬─value─┬─default─┬─changed─┬─description───────────────────────────┬─type───┐ -│ max_thread_pool_size │ 5000 │ 10000 │ 1 │ Max size for global thread pool. │ UInt64 │ -│ max_thread_pool_free_size │ 1000 │ 1000 │ 0 │ Max free size for global thread pool. │ UInt64 │ -│ thread_pool_queue_size │ 10000 │ 10000 │ 0 │ Queue size for global thread pool. │ UInt64 │ -│ max_io_thread_pool_size │ 100 │ 100 │ 0 │ Max size for IO thread pool. │ UInt64 │ -│ max_io_thread_pool_free_size │ 0 │ 0 │ 0 │ Max free size for IO thread pool. │ UInt64 │ -│ io_thread_pool_queue_size │ 10000 │ 10000 │ 0 │ Queue size for IO thread pool. │ UInt64 │ -└──────────────────────────────┴───────┴─────────┴─────────┴───────────────────────────────────────┴────────┘ +┌─name─────────────────────────┬─value─┬─default─┬─changed─┬─description─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬─type───┐ +│ max_thread_pool_size │ 5000 │ 10000 │ 1 │ The maximum number of threads that could be allocated from the OS and used for query execution and background operations. │ UInt64 │ +│ max_thread_pool_free_size │ 1000 │ 1000 │ 0 │ The maximum number of threads that will always stay in a global thread pool once allocated and remain idle in case of insufficient number of tasks. │ UInt64 │ +│ thread_pool_queue_size │ 10000 │ 10000 │ 0 │ The maximum number of tasks that will be placed in a queue and wait for execution. │ UInt64 │ +│ max_io_thread_pool_size │ 100 │ 100 │ 0 │ The maximum number of threads that would be used for IO operations │ UInt64 │ +│ max_io_thread_pool_free_size │ 0 │ 0 │ 0 │ Max free size for IO thread pool. │ UInt64 │ +│ io_thread_pool_queue_size │ 10000 │ 10000 │ 0 │ Queue size for IO thread pool. │ UInt64 │ +└──────────────────────────────┴───────┴─────────┴─────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────┘ ``` Использование `WHERE changed` может быть полезно, например, если необходимо проверить, From 261c3aa86dd33914e1b6a4a7ebb4db41f47e9dca Mon Sep 17 00:00:00 2001 From: Kruglov Pavel <48961922+Avogar@users.noreply.github.com> Date: Mon, 27 Feb 2023 16:42:29 +0100 Subject: [PATCH 240/841] Update --- docker/test/upgrade/run.sh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/docker/test/upgrade/run.sh b/docker/test/upgrade/run.sh index 733d3a79d9f..b93959ee039 100644 --- a/docker/test/upgrade/run.sh +++ b/docker/test/upgrade/run.sh @@ -121,8 +121,6 @@ mv /var/log/clickhouse-server/clickhouse-server.log /var/log/clickhouse-server/c # FIXME Not sure if it's expected, but some tests from stress test may not be finished yet when we restarting server. # Let's just ignore all errors from queries ("} TCPHandler: Code:", "} executeQuery: Code:") # FIXME https://github.com/ClickHouse/ClickHouse/issues/39197 ("Missing columns: 'v3' while processing query: 'v3, k, v1, v2, p'") -# NOTE Incompatibility was introduced in https://github.com/ClickHouse/ClickHouse/pull/39263, it's expected -# ("This engine is deprecated and is not supported in transactions", "[Queue = DB::MergeMutateRuntimeQueue]: Code: 235. DB::Exception: Part") # FIXME https://github.com/ClickHouse/ClickHouse/issues/39174 - bad mutation does not indicate backward incompatibility echo "Check for Error messages in server log:" rg -Fav -e "Code: 236. DB::Exception: Cancelled merging parts" \ @@ -152,8 +150,6 @@ rg -Fav -e "Code: 236. DB::Exception: Cancelled merging parts" \ -e "} TCPHandler: Code:" \ -e "} executeQuery: Code:" \ -e "Missing columns: 'v3' while processing query: 'v3, k, v1, v2, p'" \ - -e "This engine is deprecated and is not supported in transactions" \ - -e "[Queue = DB::MergeMutateRuntimeQueue]: Code: 235. DB::Exception: Part" \ -e "The set of parts restored in place of" \ -e "(ReplicatedMergeTreeAttachThread): Initialization failed. Error" \ -e "Code: 269. DB::Exception: Destination table is myself" \ @@ -201,8 +197,4 @@ rowNumberInAllBlocks() LIMIT 1" < /test_output/test_results.tsv > /test_output/check_status.tsv || echo "failure\tCannot parse test_results.tsv" > /test_output/check_status.tsv [ -s /test_output/check_status.tsv ] || echo -e "success\tNo errors found" > /test_output/check_status.tsv -# Core dumps -find . -type f -maxdepth 1 -name 'core.*' | while read core; do - zstd --threads=0 $core - mv $core.zst /test_output/ -done +collect_core_dumps From 2e921e3d6b4abcdf61ff4eec0405038f528175c0 Mon Sep 17 00:00:00 2001 From: avogar Date: Mon, 27 Feb 2023 16:00:19 +0000 Subject: [PATCH 241/841] Fix date and int inference from string in JSON --- src/Formats/SchemaInferenceUtils.cpp | 1 + src/Processors/Formats/ISchemaReader.h | 4 ++-- .../02674_date_int_string_json_inference.reference | 1 + .../0_stateless/02674_date_int_string_json_inference.sql | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 tests/queries/0_stateless/02674_date_int_string_json_inference.reference create mode 100644 tests/queries/0_stateless/02674_date_int_string_json_inference.sql diff --git a/src/Formats/SchemaInferenceUtils.cpp b/src/Formats/SchemaInferenceUtils.cpp index 7a242a9f81c..00eb686385d 100644 --- a/src/Formats/SchemaInferenceUtils.cpp +++ b/src/Formats/SchemaInferenceUtils.cpp @@ -131,6 +131,7 @@ namespace type_indexes.erase(TypeIndex::Date); type_indexes.erase(TypeIndex::DateTime); + type_indexes.insert(TypeIndex::String); return; } diff --git a/src/Processors/Formats/ISchemaReader.h b/src/Processors/Formats/ISchemaReader.h index edc5c6068c3..330acc99369 100644 --- a/src/Processors/Formats/ISchemaReader.h +++ b/src/Processors/Formats/ISchemaReader.h @@ -170,10 +170,10 @@ void chooseResultColumnType( ErrorCodes::TYPE_MISMATCH, "Automatically defined type {} for column '{}' in row {} differs from type defined by previous rows: {}. " "You can specify the type for this column using setting schema_inference_hints", - type->getName(), + new_type->getName(), column_name, row, - new_type->getName()); + type->getName()); } } diff --git a/tests/queries/0_stateless/02674_date_int_string_json_inference.reference b/tests/queries/0_stateless/02674_date_int_string_json_inference.reference new file mode 100644 index 00000000000..2e89d6a15a4 --- /dev/null +++ b/tests/queries/0_stateless/02674_date_int_string_json_inference.reference @@ -0,0 +1 @@ +x Nullable(String) diff --git a/tests/queries/0_stateless/02674_date_int_string_json_inference.sql b/tests/queries/0_stateless/02674_date_int_string_json_inference.sql new file mode 100644 index 00000000000..21abf763cbf --- /dev/null +++ b/tests/queries/0_stateless/02674_date_int_string_json_inference.sql @@ -0,0 +1,2 @@ +desc format(JSONEachRow, '{"x" : "2020-01-01"}, {"x" : "1000"}') + From 35f4b426084a5955dd052babd29080ef78f38c7f Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Mon, 27 Feb 2023 16:41:15 +0000 Subject: [PATCH 242/841] Move likePatternToRegexp from Functions/ to Common/ --- src/Access/Common/AllowedClientHosts.cpp | 2 +- src/Analyzer/Passes/ConvertOrLikeChainPass.cpp | 3 ++- src/{Functions => Common}/likePatternToRegexp.cpp | 2 +- src/{Functions => Common}/likePatternToRegexp.h | 0 src/Functions/Regexps.h | 2 +- src/Interpreters/ConvertFunctionOrLikeVisitor.cpp | 2 +- 6 files changed, 6 insertions(+), 5 deletions(-) rename src/{Functions => Common}/likePatternToRegexp.cpp (98%) rename src/{Functions => Common}/likePatternToRegexp.h (100%) diff --git a/src/Access/Common/AllowedClientHosts.cpp b/src/Access/Common/AllowedClientHosts.cpp index 905f7ba08b5..801ccd3748b 100644 --- a/src/Access/Common/AllowedClientHosts.cpp +++ b/src/Access/Common/AllowedClientHosts.cpp @@ -1,8 +1,8 @@ #include #include +#include #include #include -#include #include #include #include diff --git a/src/Analyzer/Passes/ConvertOrLikeChainPass.cpp b/src/Analyzer/Passes/ConvertOrLikeChainPass.cpp index c636e0bdf00..7d7362fb742 100644 --- a/src/Analyzer/Passes/ConvertOrLikeChainPass.cpp +++ b/src/Analyzer/Passes/ConvertOrLikeChainPass.cpp @@ -4,12 +4,13 @@ #include #include +#include + #include #include #include -#include #include diff --git a/src/Functions/likePatternToRegexp.cpp b/src/Common/likePatternToRegexp.cpp similarity index 98% rename from src/Functions/likePatternToRegexp.cpp rename to src/Common/likePatternToRegexp.cpp index 32281b106fd..f9eb3b9c4fb 100644 --- a/src/Functions/likePatternToRegexp.cpp +++ b/src/Common/likePatternToRegexp.cpp @@ -1,4 +1,4 @@ -#include +#include #include diff --git a/src/Functions/likePatternToRegexp.h b/src/Common/likePatternToRegexp.h similarity index 100% rename from src/Functions/likePatternToRegexp.h rename to src/Common/likePatternToRegexp.h diff --git a/src/Functions/Regexps.h b/src/Functions/Regexps.h index 123640e4db3..4bfd10bdbf5 100644 --- a/src/Functions/Regexps.h +++ b/src/Functions/Regexps.h @@ -7,10 +7,10 @@ #include #include #include -#include #include #include #include +#include #include #include #include diff --git a/src/Interpreters/ConvertFunctionOrLikeVisitor.cpp b/src/Interpreters/ConvertFunctionOrLikeVisitor.cpp index 5d48391d56d..084bb0a1bb9 100644 --- a/src/Interpreters/ConvertFunctionOrLikeVisitor.cpp +++ b/src/Interpreters/ConvertFunctionOrLikeVisitor.cpp @@ -1,9 +1,9 @@ -#include #include #include #include #include #include +#include #include From 29da7fc9653c69f6f5aac7cac1a42729845a9a91 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Mon, 27 Feb 2023 17:48:38 +0100 Subject: [PATCH 243/841] Decrease log level in "disks" --- src/Storages/MergeTree/DataPartsExchange.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Storages/MergeTree/DataPartsExchange.cpp b/src/Storages/MergeTree/DataPartsExchange.cpp index b671106f46a..7a38033a126 100644 --- a/src/Storages/MergeTree/DataPartsExchange.cpp +++ b/src/Storages/MergeTree/DataPartsExchange.cpp @@ -493,12 +493,12 @@ MergeTreeData::MutableDataPartPtr Fetcher::fetchSelectedPart( if (!disk) { - LOG_TRACE(log, "Disk for fetch is not provided, reserving space using storage balanced reservation"); + LOG_TEST(log, "Disk for fetch is not provided, reserving space using storage balanced reservation"); reservation = data.balancedReservation(metadata_snapshot, sum_files_size, 0, part_name, part_info, {}, tagger_ptr, &ttl_infos, true); if (!reservation) { - LOG_TRACE(log, "Disk for fetch is not provided, reserving space using TTL rules"); + LOG_TEST(log, "Disk for fetch is not provided, reserving space using TTL rules"); reservation = data.reserveSpacePreferringTTLRules(metadata_snapshot, sum_files_size, ttl_infos, std::time(nullptr), 0, true); } @@ -506,18 +506,18 @@ MergeTreeData::MutableDataPartPtr Fetcher::fetchSelectedPart( } else if (!disk) { - LOG_TRACE(log, "Making balanced reservation"); + LOG_TEST(log, "Making balanced reservation"); reservation = data.balancedReservation(metadata_snapshot, sum_files_size, 0, part_name, part_info, {}, tagger_ptr, nullptr); if (!reservation) { - LOG_TRACE(log, "Making simple reservation"); + LOG_TEST(log, "Making simple reservation"); reservation = data.reserveSpace(sum_files_size); } } } else if (!disk) { - LOG_TRACE(log, "Making reservation on the largest disk"); + LOG_TEST(log, "Making reservation on the largest disk"); /// We don't know real size of part because sender server version is too old reservation = data.makeEmptyReservationOnLargestDisk(); } @@ -525,11 +525,11 @@ MergeTreeData::MutableDataPartPtr Fetcher::fetchSelectedPart( if (!disk) { disk = reservation->getDisk(); - LOG_INFO(log, "Disk for fetch is not provided, getting disk from reservation {} with type {}", disk->getName(), toString(disk->getDataSourceDescription().type)); + LOG_TRACE(log, "Disk for fetch is not provided, getting disk from reservation {} with type {}", disk->getName(), toString(disk->getDataSourceDescription().type)); } else { - LOG_INFO(log, "Disk for fetch is disk {} with type {}", disk->getName(), toString(disk->getDataSourceDescription().type)); + LOG_TEST(log, "Disk for fetch is disk {} with type {}", disk->getName(), toString(disk->getDataSourceDescription().type)); } UInt64 revision = parse(in->getResponseCookie("disk_revision", "0")); From 135961acb7922f7e476335da9f8b772c8ca61134 Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Mon, 27 Feb 2023 17:59:19 +0100 Subject: [PATCH 244/841] Change the cherry-pick PR body --- tests/ci/cherry_pick.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/ci/cherry_pick.py b/tests/ci/cherry_pick.py index 7987ea2643f..585cfd52e87 100644 --- a/tests/ci/cherry_pick.py +++ b/tests/ci/cherry_pick.py @@ -52,7 +52,7 @@ class Labels: class ReleaseBranch: - CHERRYPICK_DESCRIPTION = """This pull-request is a first step of an automated \ + CHERRYPICK_DESCRIPTION = f"""This pull-request is a first step of an automated \ backporting. It contains changes like after calling a local command `git cherry-pick`. If you intend to continue backporting this changes, then resolve all conflicts if any. @@ -60,13 +60,16 @@ Otherwise, if you do not want to backport them, then just close this pull-reques The check results does not matter at this step - you can safely ignore them. Also this pull-request will be merged automatically as it reaches the mergeable state, \ - but you always can merge it manually. +**do not merge it manually**. + +If it stuck, check the original PR for `{Labels.BACKPORTS_CREATED}` and delete it if \ +necessary. """ BACKPORT_DESCRIPTION = """This pull-request is a last step of an automated \ backporting. Treat it as a standard pull-request: look at the checks and resolve conflicts. Merge it only if you intend to backport changes to the target branch, otherwise just \ - close it. +close it. """ REMOTE = "" From e01c9ff5ec080ca9537843e058ea9e0ccea42ac6 Mon Sep 17 00:00:00 2001 From: Igor Nikonov Date: Mon, 27 Feb 2023 17:37:29 +0000 Subject: [PATCH 245/841] Fixes: group by, final --- src/Planner/PlannerJoinTree.cpp | 34 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/src/Planner/PlannerJoinTree.cpp b/src/Planner/PlannerJoinTree.cpp index 9c005314421..8b7489d52c8 100644 --- a/src/Planner/PlannerJoinTree.cpp +++ b/src/Planner/PlannerJoinTree.cpp @@ -154,7 +154,7 @@ NameAndTypePair chooseSmallestColumnToReadFromStorage(const StoragePtr & storage bool applyTrivialCountIfPossible( QueryPlan & query_plan, const TableNode & table_node, - const SelectQueryInfo & select_query_info, + const QueryTreeNodePtr & query_tree, const ContextPtr & query_context, const Names & columns_names) { @@ -163,28 +163,26 @@ bool applyTrivialCountIfPossible( return false; /// can't apply if FINAL - if (select_query_info.table_expression_modifiers.has_value() && select_query_info.table_expression_modifiers.value().hasFinal()) + if (table_node.getTableExpressionModifiers().has_value() && table_node.getTableExpressionModifiers()->hasFinal()) + return false; + + auto & main_query_node = query_tree->as(); + if (main_query_node.hasGroupBy()) return false; const auto & storage = table_node.getStorage(); - const auto & storage_snapshot = table_node.getStorageSnapshot(); - - bool can_apply_trivial_count = (settings.max_parallel_replicas <= 1) && // - !settings.allow_experimental_query_deduplication && // - !settings.empty_result_for_aggregation_by_empty_set && // - storage && // - storage->getName() != "MaterializedMySQL" && // - !storage->hasLightweightDeletedMask() && // - select_query_info.filter_asts.empty() && // ??? - select_query_info.has_aggregates; - if (!can_apply_trivial_count) + if (!storage || storage->hasLightweightDeletedMask()) return false; - QueryTreeNodes aggregates = collectAggregateFunctionNodes(select_query_info.query_tree); + if (settings.max_parallel_replicas > 1 || // + settings.allow_experimental_query_deduplication || // + settings.empty_result_for_aggregation_by_empty_set) + return false; + + QueryTreeNodes aggregates = collectAggregateFunctionNodes(query_tree); if (aggregates.size() != 1) return false; - auto & main_query_node = select_query_info.query_tree->as(); /// dump main query tree { WriteBufferFromOwnString buffer; @@ -250,7 +248,7 @@ bool applyTrivialCountIfPossible( DataTypes argument_types; argument_types.reserve(columns_names.size()); { - const Block source_header = storage_snapshot->getSampleBlockForColumns(columns_names); + const Block source_header = table_node.getStorageSnapshot()->getSampleBlockForColumns(columns_names); for (const auto & column_name : columns_names) argument_types.push_back(source_header.getByName(column_name).type); } @@ -434,8 +432,8 @@ JoinTreeQueryPlan buildQueryPlanForTableExpression(const QueryTreeNodePtr & tabl } /// apply trivial_count optimization if possible - bool is_trivial_count_applied = is_single_table_expression && table_node - && applyTrivialCountIfPossible(query_plan, *table_node, select_query_info, planner_context->getQueryContext(), columns_names); + bool is_trivial_count_applied = is_single_table_expression && table_node && select_query_info.has_aggregates + && applyTrivialCountIfPossible(query_plan, *table_node, select_query_info.query_tree, planner_context->getQueryContext(), columns_names); if (is_trivial_count_applied) { From 36e65f5f84ef01fe4526f83aeb43dd806752426d Mon Sep 17 00:00:00 2001 From: Kruglov Pavel <48961922+Avogar@users.noreply.github.com> Date: Mon, 27 Feb 2023 19:00:40 +0100 Subject: [PATCH 246/841] Use versions vith dots --- docs/en/interfaces/formats.md | 2 +- docs/en/operations/settings/settings-formats.md | 4 ++-- src/Core/Settings.h | 2 +- src/Core/SettingsChangesHistory.h | 2 +- src/Core/SettingsEnums.cpp | 8 ++++---- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/en/interfaces/formats.md b/docs/en/interfaces/formats.md index 27cab588e15..b2b2c6d5b1e 100644 --- a/docs/en/interfaces/formats.md +++ b/docs/en/interfaces/formats.md @@ -1972,7 +1972,7 @@ To exchange data with Hadoop, you can use [HDFS table engine](/docs/en/engines/t - [input_format_parquet_allow_missing_columns](/docs/en/operations/settings/settings-formats.md/#input_format_parquet_allow_missing_columns) - allow missing columns while reading Parquet data. Default value - `false`. - [input_format_parquet_skip_columns_with_unsupported_types_in_schema_inference](/docs/en/operations/settings/settings-formats.md/#input_format_parquet_skip_columns_with_unsupported_types_in_schema_inference) - allow skipping columns with unsupported types while schema inference for Parquet format. Default value - `false`. - [output_format_parquet_fixed_string_as_fixed_byte_array](/docs/en/operations/settings/settings-formats.md/#output_format_parquet_fixed_string_as_fixed_byte_array) - use Parquet FIXED_LENGTH_BYTE_ARRAY type instead of Binary/String for FixedString columns. Default value - `true`. -- [output_format_parquet_version](/docs/en/operations/settings/settings-formats.md/#output_format_parquet_version) - The version of Parquet format used in output format. Default value - `v2_latest`. +- [output_format_parquet_version](/docs/en/operations/settings/settings-formats.md/#output_format_parquet_version) - The version of Parquet format used in output format. Default value - `2.latest`. ## Arrow {#data-format-arrow} diff --git a/docs/en/operations/settings/settings-formats.md b/docs/en/operations/settings/settings-formats.md index 6cc4ba5f2c9..c15b72ce97c 100644 --- a/docs/en/operations/settings/settings-formats.md +++ b/docs/en/operations/settings/settings-formats.md @@ -1104,9 +1104,9 @@ Enabled by default. ### output_format_parquet_version {#output_format_parquet_version} -The version of Parquet format used in output format. Supported versions: `v1_0`, `v2_4`, `v2_6` and `v2_latest`. +The version of Parquet format used in output format. Supported versions: `1.0`, `2.4`, `2.6` and `2.latest`. -Default value: `v2_latest`. +Default value: `2.latest`. ## Hive format settings {#hive-format-settings} diff --git a/src/Core/Settings.h b/src/Core/Settings.h index 82f0356349f..3908254b6f1 100644 --- a/src/Core/Settings.h +++ b/src/Core/Settings.h @@ -856,7 +856,7 @@ class IColumn; M(UInt64, output_format_parquet_row_group_size, 1000000, "Row group size in rows.", 0) \ M(Bool, output_format_parquet_string_as_string, false, "Use Parquet String type instead of Binary for String columns.", 0) \ M(Bool, output_format_parquet_fixed_string_as_fixed_byte_array, true, "Use Parquet FIXED_LENGTH_BYTE_ARRAY type instead of Binary for FixedString columns.", 0) \ - M(ParquetVersion, output_format_parquet_version, "v2_latest", "Parquet format version for output format. Supported versions: v1_0, v2_4, v2_6 and v2_latest (default)", 0) \ + M(ParquetVersion, output_format_parquet_version, "2.latest", "Parquet format version for output format. Supported versions: 1.0, 2.4, 2.6 and 2.latest (default)", 0) \ M(String, output_format_avro_codec, "", "Compression codec used for output. Possible values: 'null', 'deflate', 'snappy'.", 0) \ M(UInt64, output_format_avro_sync_interval, 16 * 1024, "Sync interval in bytes.", 0) \ M(String, output_format_avro_string_column_pattern, "", "For Avro format: regexp of String columns to select as AVRO string.", 0) \ diff --git a/src/Core/SettingsChangesHistory.h b/src/Core/SettingsChangesHistory.h index 80d4958944e..04f328bb665 100644 --- a/src/Core/SettingsChangesHistory.h +++ b/src/Core/SettingsChangesHistory.h @@ -80,7 +80,7 @@ namespace SettingsChangesHistory /// It's used to implement `compatibility` setting (see https://github.com/ClickHouse/ClickHouse/issues/35972) static std::map settings_changes_history = { - {"23.3", {{"output_format_parquet_version", "v1_0", "v2_latest", "Use latest Parquet format version for output format"}, + {"23.3", {{"output_format_parquet_version", "1.0", "2.latest", "Use latest Parquet format version for output format"}, {"input_format_json_ignore_unknown_keys_in_named_tuple", false, true, "Improve parsing JSON objects as named tuples"}}}, {"23.2", {{"output_format_parquet_fixed_string_as_fixed_byte_array", false, true, "Use Parquet FIXED_LENGTH_BYTE_ARRAY type for FixedString by default"}, {"output_format_arrow_fixed_string_as_fixed_byte_array", false, true, "Use Arrow FIXED_SIZE_BINARY type for FixedString by default"}, diff --git a/src/Core/SettingsEnums.cpp b/src/Core/SettingsEnums.cpp index 751fbf65281..9e1ab585bb0 100644 --- a/src/Core/SettingsEnums.cpp +++ b/src/Core/SettingsEnums.cpp @@ -174,9 +174,9 @@ IMPLEMENT_SETTING_ENUM(LocalFSReadMethod, ErrorCodes::BAD_ARGUMENTS, IMPLEMENT_SETTING_ENUM_WITH_RENAME(ParquetVersion, ErrorCodes::BAD_ARGUMENTS, - {{"v1_0", FormatSettings::ParquetVersion::V1_0}, - {"v2_4", FormatSettings::ParquetVersion::V2_4}, - {"v2_6", FormatSettings::ParquetVersion::V2_6}, - {"v2_latest", FormatSettings::ParquetVersion::V2_LATEST}}) + {{"1.0", FormatSettings::ParquetVersion::V1_0}, + {"2.4", FormatSettings::ParquetVersion::V2_4}, + {"2.6", FormatSettings::ParquetVersion::V2_6}, + {"2.latest", FormatSettings::ParquetVersion::V2_LATEST}}) } From af3b8d5cbdcf7d0435184fb6d1acf69ef0efa437 Mon Sep 17 00:00:00 2001 From: Pradeep Chhetri <30620077+chhetripradeep@users.noreply.github.com> Date: Tue, 28 Feb 2023 02:15:15 +0800 Subject: [PATCH 247/841] Revert "Add join_algorithm='grace_hash' to stress tests" --- docker/test/stress/stress | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/docker/test/stress/stress b/docker/test/stress/stress index 4ed8ec838f2..c62bb615183 100755 --- a/docker/test/stress/stress +++ b/docker/test/stress/stress @@ -30,15 +30,13 @@ def get_options(i, backward_compatibility_check): if i % 2 == 1: join_alg_num = i // 2 - if join_alg_num % 5 == 0: + if join_alg_num % 4 == 0: client_options.append("join_algorithm='parallel_hash'") - if join_alg_num % 5 == 1: + if join_alg_num % 4 == 1: client_options.append("join_algorithm='partial_merge'") - if join_alg_num % 5 == 2: + if join_alg_num % 4 == 2: client_options.append("join_algorithm='full_sorting_merge'") - if join_alg_num % 5 == 3: - client_options.append("join_algorithm='grace_hash'") - if join_alg_num % 5 == 4: + if join_alg_num % 4 == 3: client_options.append("join_algorithm='auto'") client_options.append('max_rows_in_join=1000') From ab899bf2f3220e07b4316c1db772eb2cde185087 Mon Sep 17 00:00:00 2001 From: avogar Date: Mon, 27 Feb 2023 19:28:19 +0000 Subject: [PATCH 248/841] Allow types conversion in Native input format --- .../operations/settings/settings-formats.md | 12 ++++++-- src/Core/Settings.h | 2 ++ src/Core/SettingsChangesHistory.h | 3 +- src/DataTypes/DataTypeLowCardinality.h | 2 +- .../DataTypeLowCardinalityHelpers.cpp | 8 ++--- src/Formats/FormatFactory.cpp | 1 + src/Formats/FormatSettings.h | 5 ++++ src/Formats/NativeReader.cpp | 30 +++++++++++++++++-- src/Formats/NativeReader.h | 2 ++ src/Processors/Formats/Impl/NativeFormat.cpp | 1 + .../Algorithms/AggregatingSortedAlgorithm.cpp | 2 +- .../Algorithms/SummingSortedAlgorithm.cpp | 2 +- .../02567_native_type_conversions.reference | 3 ++ .../02567_native_type_conversions.sh | 12 ++++++++ 14 files changed, 72 insertions(+), 13 deletions(-) create mode 100644 tests/queries/0_stateless/02567_native_type_conversions.reference create mode 100755 tests/queries/0_stateless/02567_native_type_conversions.sh diff --git a/docs/en/operations/settings/settings-formats.md b/docs/en/operations/settings/settings-formats.md index c6eb8c1f2c0..a7a7d78ba4d 100644 --- a/docs/en/operations/settings/settings-formats.md +++ b/docs/en/operations/settings/settings-formats.md @@ -1468,7 +1468,7 @@ Default value: `65505`. The name of table that will be used in the output INSERT statement. -Default value: `'table''`. +Default value: `table`. ### output_format_sql_insert_include_column_names {#output_format_sql_insert_include_column_names} @@ -1508,4 +1508,12 @@ Disabled by default. The maximum allowed size for String in RowBinary format. It prevents allocating large amount of memory in case of corrupted data. 0 means there is no limit. -Default value: `1GiB` +Default value: `1GiB`. + +## Native format settings {#native-format-settings} + +### input_format_native_allow_types_conversion {#input_format_native_allow_types_conversion} + +Allow types conversion in Native input format between columns from input data and requested columns. + +Enabled by default. diff --git a/src/Core/Settings.h b/src/Core/Settings.h index c1b396778ab..43207b517ca 100644 --- a/src/Core/Settings.h +++ b/src/Core/Settings.h @@ -819,6 +819,8 @@ class IColumn; M(UInt64, input_format_csv_skip_first_lines, 0, "Skip specified number of lines at the beginning of data in CSV format", 0) \ M(UInt64, input_format_tsv_skip_first_lines, 0, "Skip specified number of lines at the beginning of data in TSV format", 0) \ \ + M(Bool, input_format_native_allow_types_conversion, true, "Allow data types conversion in Native input format", 0) \ + \ M(DateTimeInputFormat, date_time_input_format, FormatSettings::DateTimeInputFormat::Basic, "Method to read DateTime from text input formats. Possible values: 'basic', 'best_effort' and 'best_effort_us'.", 0) \ M(DateTimeOutputFormat, date_time_output_format, FormatSettings::DateTimeOutputFormat::Simple, "Method to write DateTime to text output. Possible values: 'simple', 'iso', 'unix_timestamp'.", 0) \ \ diff --git a/src/Core/SettingsChangesHistory.h b/src/Core/SettingsChangesHistory.h index c9d68b94a5e..b153372dd92 100644 --- a/src/Core/SettingsChangesHistory.h +++ b/src/Core/SettingsChangesHistory.h @@ -80,7 +80,8 @@ namespace SettingsChangesHistory /// It's used to implement `compatibility` setting (see https://github.com/ClickHouse/ClickHouse/issues/35972) static std::map settings_changes_history = { - {"23.3", {{"input_format_json_ignore_unknown_keys_in_named_tuple", false, true, "Improve parsing JSON objects as named tuples"}}}, + {"23.3", {{"input_format_json_ignore_unknown_keys_in_named_tuple", false, true, "Improve parsing JSON objects as named tuples"}, + {"input_format_native_allow_types_conversion", false, true, "Allow types conversion in Native input format"}}}, {"23.2", {{"output_format_parquet_fixed_string_as_fixed_byte_array", false, true, "Use Parquet FIXED_LENGTH_BYTE_ARRAY type for FixedString by default"}, {"output_format_arrow_fixed_string_as_fixed_byte_array", false, true, "Use Arrow FIXED_SIZE_BINARY type for FixedString by default"}, {"query_plan_remove_redundant_distinct", false, true, "Remove redundant Distinct step in query plan"}, diff --git a/src/DataTypes/DataTypeLowCardinality.h b/src/DataTypes/DataTypeLowCardinality.h index 57f67ddad7a..d301a0f5443 100644 --- a/src/DataTypes/DataTypeLowCardinality.h +++ b/src/DataTypes/DataTypeLowCardinality.h @@ -86,6 +86,6 @@ DataTypePtr recursiveRemoveLowCardinality(const DataTypePtr & type); ColumnPtr recursiveRemoveLowCardinality(const ColumnPtr & column); /// Convert column of type from_type to type to_type by converting nested LowCardinality columns. -ColumnPtr recursiveTypeConversion(const ColumnPtr & column, const DataTypePtr & from_type, const DataTypePtr & to_type); +ColumnPtr recursiveLowCardinalityTypeConversion(const ColumnPtr & column, const DataTypePtr & from_type, const DataTypePtr & to_type); } diff --git a/src/DataTypes/DataTypeLowCardinalityHelpers.cpp b/src/DataTypes/DataTypeLowCardinalityHelpers.cpp index 8a61afee420..98eb76267a4 100644 --- a/src/DataTypes/DataTypeLowCardinalityHelpers.cpp +++ b/src/DataTypes/DataTypeLowCardinalityHelpers.cpp @@ -113,7 +113,7 @@ ColumnPtr recursiveRemoveLowCardinality(const ColumnPtr & column) return column; } -ColumnPtr recursiveTypeConversion(const ColumnPtr & column, const DataTypePtr & from_type, const DataTypePtr & to_type) +ColumnPtr recursiveLowCardinalityTypeConversion(const ColumnPtr & column, const DataTypePtr & from_type, const DataTypePtr & to_type) { if (!column) return column; @@ -128,7 +128,7 @@ ColumnPtr recursiveTypeConversion(const ColumnPtr & column, const DataTypePtr & if (const auto * column_const = typeid_cast(column.get())) { const auto & nested = column_const->getDataColumnPtr(); - auto nested_no_lc = recursiveTypeConversion(nested, from_type, to_type); + auto nested_no_lc = recursiveLowCardinalityTypeConversion(nested, from_type, to_type); if (nested.get() == nested_no_lc.get()) return column; @@ -164,7 +164,7 @@ ColumnPtr recursiveTypeConversion(const ColumnPtr & column, const DataTypePtr & const auto & nested_to = to_array_type->getNestedType(); return ColumnArray::create( - recursiveTypeConversion(column_array->getDataPtr(), nested_from, nested_to), + recursiveLowCardinalityTypeConversion(column_array->getDataPtr(), nested_from, nested_to), column_array->getOffsetsPtr()); } } @@ -187,7 +187,7 @@ ColumnPtr recursiveTypeConversion(const ColumnPtr & column, const DataTypePtr & for (size_t i = 0; i < columns.size(); ++i) { auto & element = columns[i]; - auto element_no_lc = recursiveTypeConversion(element, from_elements.at(i), to_elements.at(i)); + auto element_no_lc = recursiveLowCardinalityTypeConversion(element, from_elements.at(i), to_elements.at(i)); if (element.get() != element_no_lc.get()) { element = element_no_lc; diff --git a/src/Formats/FormatFactory.cpp b/src/Formats/FormatFactory.cpp index a22926973ed..f9e704e0445 100644 --- a/src/Formats/FormatFactory.cpp +++ b/src/Formats/FormatFactory.cpp @@ -190,6 +190,7 @@ FormatSettings getFormatSettings(ContextPtr context, const Settings & settings) format_settings.bson.output_string_as_string = settings.output_format_bson_string_as_string; format_settings.bson.skip_fields_with_unsupported_types_in_schema_inference = settings.input_format_bson_skip_fields_with_unsupported_types_in_schema_inference; format_settings.max_binary_string_size = settings.format_binary_max_string_size; + format_settings.native.allow_types_conversion = settings.input_format_native_allow_types_conversion; format_settings.max_parser_depth = context->getSettingsRef().max_parser_depth; format_settings.client_protocol_version = context->getClientProtocolVersion(); diff --git a/src/Formats/FormatSettings.h b/src/Formats/FormatSettings.h index 5e95c629c7c..7ed0e7d069e 100644 --- a/src/Formats/FormatSettings.h +++ b/src/Formats/FormatSettings.h @@ -326,6 +326,11 @@ struct FormatSettings bool output_string_as_string; bool skip_fields_with_unsupported_types_in_schema_inference; } bson; + + struct + { + bool allow_types_conversion = true; + } native; }; } diff --git a/src/Formats/NativeReader.cpp b/src/Formats/NativeReader.cpp index 9f8d4ba1930..eca88a41c13 100644 --- a/src/Formats/NativeReader.cpp +++ b/src/Formats/NativeReader.cpp @@ -15,6 +15,8 @@ #include #include +#include + namespace DB { @@ -39,12 +41,14 @@ NativeReader::NativeReader( UInt64 server_revision_, bool skip_unknown_columns_, bool null_as_default_, + bool allow_types_conversion_, BlockMissingValues * block_missing_values_) : istr(istr_) , header(header_) , server_revision(server_revision_) , skip_unknown_columns(skip_unknown_columns_) , null_as_default(null_as_default_) + , allow_types_conversion(allow_types_conversion_) , block_missing_values(block_missing_values_) { } @@ -204,11 +208,31 @@ Block NativeReader::read() if (null_as_default) insertNullAsDefaultIfNeeded(column, header_column, header.getPositionByName(column.name), block_missing_values); - /// Support insert from old clients without low cardinality type. if (!header_column.type->equals(*column.type)) { - column.column = recursiveTypeConversion(column.column, column.type, header.safeGetByPosition(i).type); - column.type = header.safeGetByPosition(i).type; + if (allow_types_conversion) + { + try + { + column.column = castColumn(column, header_column.type); + } + catch (Exception & e) + { + e.addMessage(fmt::format( + "while converting column \"{}\" from type {} to type {}", + column.name, + column.type->getName(), + header_column.type->getName())); + throw; + } + } + else + { + /// Support insert from old clients without low cardinality type. + column.column = recursiveLowCardinalityTypeConversion(column.column, column.type, header_column.type); + } + + column.type = header_column.type; } } else diff --git a/src/Formats/NativeReader.h b/src/Formats/NativeReader.h index 2d8b16e06eb..3cec4afd997 100644 --- a/src/Formats/NativeReader.h +++ b/src/Formats/NativeReader.h @@ -30,6 +30,7 @@ public: UInt64 server_revision_, bool skip_unknown_columns_ = false, bool null_as_default_ = false, + bool allow_types_conversion_ = false, BlockMissingValues * block_missing_values_ = nullptr); /// For cases when we have an index. It allows to skip columns. Only columns specified in the index will be read. @@ -51,6 +52,7 @@ private: UInt64 server_revision; bool skip_unknown_columns = false; bool null_as_default = false; + bool allow_types_conversion = false; BlockMissingValues * block_missing_values = nullptr; bool use_index = false; diff --git a/src/Processors/Formats/Impl/NativeFormat.cpp b/src/Processors/Formats/Impl/NativeFormat.cpp index bd1b13ce2ef..d3fd9ef73e1 100644 --- a/src/Processors/Formats/Impl/NativeFormat.cpp +++ b/src/Processors/Formats/Impl/NativeFormat.cpp @@ -23,6 +23,7 @@ public: 0, settings.skip_unknown_fields, settings.null_as_default, + settings.native.allow_types_conversion, settings.defaults_for_omitted_fields ? &block_missing_values : nullptr)) , header(header_) {} diff --git a/src/Processors/Merges/Algorithms/AggregatingSortedAlgorithm.cpp b/src/Processors/Merges/Algorithms/AggregatingSortedAlgorithm.cpp index 560be60987b..ef103eb508c 100644 --- a/src/Processors/Merges/Algorithms/AggregatingSortedAlgorithm.cpp +++ b/src/Processors/Merges/Algorithms/AggregatingSortedAlgorithm.cpp @@ -117,7 +117,7 @@ static void postprocessChunk(Chunk & chunk, const AggregatingSortedAlgorithm::Co { const auto & from_type = desc.nested_type; const auto & to_type = desc.real_type; - columns[desc.column_number] = recursiveTypeConversion(columns[desc.column_number], from_type, to_type); + columns[desc.column_number] = recursiveLowCardinalityTypeConversion(columns[desc.column_number], from_type, to_type); } } diff --git a/src/Processors/Merges/Algorithms/SummingSortedAlgorithm.cpp b/src/Processors/Merges/Algorithms/SummingSortedAlgorithm.cpp index 0f1775d4ac0..d8e95e6b950 100644 --- a/src/Processors/Merges/Algorithms/SummingSortedAlgorithm.cpp +++ b/src/Processors/Merges/Algorithms/SummingSortedAlgorithm.cpp @@ -450,7 +450,7 @@ static void postprocessChunk( { const auto & from_type = desc.nested_type; const auto & to_type = desc.real_type; - res_columns[desc.column_numbers[0]] = recursiveTypeConversion(column, from_type, to_type); + res_columns[desc.column_numbers[0]] = recursiveLowCardinalityTypeConversion(column, from_type, to_type); } else res_columns[desc.column_numbers[0]] = std::move(column); diff --git a/tests/queries/0_stateless/02567_native_type_conversions.reference b/tests/queries/0_stateless/02567_native_type_conversions.reference new file mode 100644 index 00000000000..5c223870c11 --- /dev/null +++ b/tests/queries/0_stateless/02567_native_type_conversions.reference @@ -0,0 +1,3 @@ +1 +42 +1 diff --git a/tests/queries/0_stateless/02567_native_type_conversions.sh b/tests/queries/0_stateless/02567_native_type_conversions.sh new file mode 100755 index 00000000000..976c42f07c1 --- /dev/null +++ b/tests/queries/0_stateless/02567_native_type_conversions.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +# shellcheck source=../shell_config.sh +. "$CURDIR"/../shell_config.sh + +$CLICKHOUSE_LOCAL -q "select 42::UInt8 as x format Native" | $CLICKHOUSE_LOCAL --structure="x UInt64" --input-format="Native" -q "select * from table" --input_format_native_allow_types_conversion=0 2>&1 | grep "TYPE_MISMATCH" -c + +$CLICKHOUSE_LOCAL -q "select 42::UInt8 as x format Native" | $CLICKHOUSE_LOCAL --structure="x UInt64" --input-format="Native" -q "select * from table" --input_format_native_allow_types_conversion=1 + +$CLICKHOUSE_LOCAL -q "select 'Hello' as x format Native" | $CLICKHOUSE_LOCAL --structure="x UInt64" --input-format="Native" -q "select * from table" --input_format_native_allow_types_conversion=1 2>&1 | grep 'while converting column "x" from type String to type UInt64' -c + From 76d0fb3cacc6e1a5810b488d265d7fda9c54d8e0 Mon Sep 17 00:00:00 2001 From: Julio Jimenez Date: Mon, 27 Feb 2023 14:43:16 -0500 Subject: [PATCH 249/841] =?UTF-8?q?=F0=9F=90=B3=20Update=20Ubuntu=20Image?= =?UTF-8?q?=20(#46784)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * :whale: Update Ubuntu Image Signed-off-by: Julio Jimenez * Ready for testing Signed-off-by: Julio Jimenez * add back wget Signed-off-by: Julio Jimenez * add back wget Signed-off-by: Julio Jimenez * add back wget Signed-off-by: Julio Jimenez --------- Signed-off-by: Julio Jimenez --- docker/server/Dockerfile.ubuntu | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/docker/server/Dockerfile.ubuntu b/docker/server/Dockerfile.ubuntu index 961c528f19c..5dbb244c298 100644 --- a/docker/server/Dockerfile.ubuntu +++ b/docker/server/Dockerfile.ubuntu @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 # see https://github.com/moby/moby/issues/4032#issuecomment-192327844 ARG DEBIAN_FRONTEND=noninteractive @@ -9,13 +9,14 @@ RUN sed -i "s|http://archive.ubuntu.com|${apt_archive}|g" /etc/apt/sources.list && groupadd -r clickhouse --gid=101 \ && useradd -r -g clickhouse --uid=101 --home-dir=/var/lib/clickhouse --shell=/bin/bash clickhouse \ && apt-get update \ + && apt-get upgrade -yq \ && apt-get install --yes --no-install-recommends \ apt-transport-https \ ca-certificates \ dirmngr \ - gnupg \ - locales \ + gnupg2 \ wget \ + locales \ tzdata \ && apt-get clean @@ -80,15 +81,8 @@ RUN arch=${TARGETARCH:-amd64} \ && mkdir -p /var/lib/clickhouse /var/log/clickhouse-server /etc/clickhouse-server /etc/clickhouse-client \ && chmod ugo+Xrw -R /var/lib/clickhouse /var/log/clickhouse-server /etc/clickhouse-server /etc/clickhouse-client -# Remove as much of Ubuntu as possible. -# ClickHouse does not need Ubuntu. It can run on top of Linux kernel without any OS distribution. -# ClickHouse does not need Docker at all. ClickHouse is above all that. -# It does not care about Ubuntu, Docker, or other cruft and you should neither. -# The fact that this Docker image is based on Ubuntu is just a misconception. -# Some vulnerability scanners are arguing about Ubuntu, which is not relevant to ClickHouse at all. -# ClickHouse does not care when you report false vulnerabilities by running some Docker scanners. - -RUN apt-get remove --purge -y libksba8 && apt-get autoremove -y +RUN apt-get autoremove --purge -yq libksba8 && \ + apt-get autoremove -yq # we need to allow "others" access to clickhouse folder, because docker container # can be started with arbitrary uid (openshift usecase) From e5f4ba75437118983cc490c000983cc561ced6ba Mon Sep 17 00:00:00 2001 From: avogar Date: Mon, 27 Feb 2023 19:44:37 +0000 Subject: [PATCH 250/841] Rename recent tests to fix order --- ...{02661_window_ntile.reference => 02560_window_ntile.reference} | 0 .../{02661_window_ntile.sql => 02560_window_ntile.sql} | 0 ...rence => 02561_sorting_constants_and_distinct_crash.reference} | 0 ...t_crash.sql => 02561_sorting_constants_and_distinct_crash.sql} | 0 ...65_regexp_extract.reference => 02562_regexp_extract.reference} | 0 .../{02665_regexp_extract.sql => 02562_regexp_extract.sql} | 0 ...erence => 02563_progress_when_no_rows_from_prewhere.reference} | 0 ...m_prewhere.sh => 02563_progress_when_no_rows_from_prewhere.sh} | 0 ...al_desc.reference => 02564_read_in_order_final_desc.reference} | 0 ...in_order_final_desc.sql => 02564_read_in_order_final_desc.sql} | 0 ...settings.reference => 02565_analyzer_limit_settings.reference} | 0 ...lyzer_limit_settings.sql => 02565_analyzer_limit_settings.sql} | 0 ...erence => 02566_analyzer_limit_settings_distributed.reference} | 0 ...tributed.sql => 02566_analyzer_limit_settings_distributed.sql} | 0 ..._and_consistency.reference => 02567_and_consistency.reference} | 0 .../{02667_and_consistency.sql => 02567_and_consistency.sql} | 0 ....reference => 02568_array_map_const_low_cardinality.reference} | 0 ..._cardinality.sql => 02568_array_map_const_low_cardinality.sql} | 0 ...n_array_length.reference => 02568_json_array_length.reference} | 0 .../{02667_json_array_length.sql => 02568_json_array_length.sql} | 0 ...sult.reference => 02569_order_by_aggregation_result.reference} | 0 ...gregation_result.sql => 02569_order_by_aggregation_result.sql} | 0 ...nsert.reference => 02570_fallback_from_async_insert.reference} | 0 ...k_from_async_insert.sh => 02570_fallback_from_async_insert.sh} | 0 ...reference => 02571_local_desc_abort_on_twitter_json.reference} | 0 ..._twitter_json.sh => 02571_local_desc_abort_on_twitter_json.sh} | 0 ..._intersections.reference => 02572_max_intersections.reference} | 0 .../{02670_max_intersections.sql => 02572_max_intersections.sql} | 0 ...ile_fuse_msan.reference => 02573_quantile_fuse_msan.reference} | 0 ...{02671_quantile_fuse_msan.sql => 02573_quantile_fuse_msan.sql} | 0 ....reference => 02574_suspicious_low_cardinality_msan.reference} | 0 ...inality_msan.sql => 02574_suspicious_low_cardinality_msan.sql} | 0 ...ap_hashing_msan.reference => 02575_map_hashing_msan.reference} | 0 .../{02673_map_hashing_msan.sql => 02575_map_hashing_msan.sql} | 0 ....reference => 02576_predicate_push_down_sorting_fix.reference} | 0 ..._sorting_fix.sql => 02576_predicate_push_down_sorting_fix.sql} | 0 ..._has.reference => 02576_rewrite_array_exists_to_has.reference} | 0 ...ray_exists_to_has.sql => 02576_rewrite_array_exists_to_has.sh} | 0 ...e.reference => 02577_analyzer_array_join_calc_twice.reference} | 0 ...in_calc_twice.sql => 02577_analyzer_array_join_calc_twice.sql} | 0 ...e_update.reference => 02577_keepermap_delete_update.reference} | 0 ...permap_delete_update.sql => 02577_keepermap_delete_update.sql} | 0 ...38_ipv4_codec_t64.reference => 02578_ipv4_codec_t64.reference} | 0 .../{25338_ipv4_codec_t64.sql => 02578_ipv4_codec_t64.sql} | 0 ...ies.reference => 02578_parameterized_rename_queries.reference} | 0 ..._rename_queries.sql => 02578_parameterized_rename_queries.sql} | 0 ...ill_empty_chunk.reference => 02579_fill_empty_chunk.reference} | 0 .../{25339_fill_empty_chunk.sql => 02579_fill_empty_chunk.sql} | 0 ...ed_replace.reference => 02579_parameterized_replace.reference} | 0 ..._parameterized_replace.sql => 02579_parameterized_replace.sql} | 0 ...ch_bug.reference => 02580_like_substring_search_bug.reference} | 0 ...bstring_search_bug.sql => 02580_like_substring_search_bug.sql} | 0 52 files changed, 0 insertions(+), 0 deletions(-) rename tests/queries/0_stateless/{02661_window_ntile.reference => 02560_window_ntile.reference} (100%) rename tests/queries/0_stateless/{02661_window_ntile.sql => 02560_window_ntile.sql} (100%) rename tests/queries/0_stateless/{02662_sorting_constants_and_distinct_crash.reference => 02561_sorting_constants_and_distinct_crash.reference} (100%) rename tests/queries/0_stateless/{02662_sorting_constants_and_distinct_crash.sql => 02561_sorting_constants_and_distinct_crash.sql} (100%) rename tests/queries/0_stateless/{02665_regexp_extract.reference => 02562_regexp_extract.reference} (100%) rename tests/queries/0_stateless/{02665_regexp_extract.sql => 02562_regexp_extract.sql} (100%) rename tests/queries/0_stateless/{02666_progress_when_no_rows_from_prewhere.reference => 02563_progress_when_no_rows_from_prewhere.reference} (100%) rename tests/queries/0_stateless/{02666_progress_when_no_rows_from_prewhere.sh => 02563_progress_when_no_rows_from_prewhere.sh} (100%) rename tests/queries/0_stateless/{02666_read_in_order_final_desc.reference => 02564_read_in_order_final_desc.reference} (100%) rename tests/queries/0_stateless/{02666_read_in_order_final_desc.sql => 02564_read_in_order_final_desc.sql} (100%) rename tests/queries/0_stateless/{02667_analyzer_limit_settings.reference => 02565_analyzer_limit_settings.reference} (100%) rename tests/queries/0_stateless/{02667_analyzer_limit_settings.sql => 02565_analyzer_limit_settings.sql} (100%) rename tests/queries/0_stateless/{02667_analyzer_limit_settings_distributed.reference => 02566_analyzer_limit_settings_distributed.reference} (100%) rename tests/queries/0_stateless/{02667_analyzer_limit_settings_distributed.sql => 02566_analyzer_limit_settings_distributed.sql} (100%) rename tests/queries/0_stateless/{02667_and_consistency.reference => 02567_and_consistency.reference} (100%) rename tests/queries/0_stateless/{02667_and_consistency.sql => 02567_and_consistency.sql} (100%) rename tests/queries/0_stateless/{02667_array_map_const_low_cardinality.reference => 02568_array_map_const_low_cardinality.reference} (100%) rename tests/queries/0_stateless/{02667_array_map_const_low_cardinality.sql => 02568_array_map_const_low_cardinality.sql} (100%) rename tests/queries/0_stateless/{02667_json_array_length.reference => 02568_json_array_length.reference} (100%) rename tests/queries/0_stateless/{02667_json_array_length.sql => 02568_json_array_length.sql} (100%) rename tests/queries/0_stateless/{02667_order_by_aggregation_result.reference => 02569_order_by_aggregation_result.reference} (100%) rename tests/queries/0_stateless/{02667_order_by_aggregation_result.sql => 02569_order_by_aggregation_result.sql} (100%) rename tests/queries/0_stateless/{02668_fallback_from_async_insert.reference => 02570_fallback_from_async_insert.reference} (100%) rename tests/queries/0_stateless/{02668_fallback_from_async_insert.sh => 02570_fallback_from_async_insert.sh} (100%) rename tests/queries/0_stateless/{02669_local_desc_abort_on_twitter_json.reference => 02571_local_desc_abort_on_twitter_json.reference} (100%) rename tests/queries/0_stateless/{02669_local_desc_abort_on_twitter_json.sh => 02571_local_desc_abort_on_twitter_json.sh} (100%) rename tests/queries/0_stateless/{02670_max_intersections.reference => 02572_max_intersections.reference} (100%) rename tests/queries/0_stateless/{02670_max_intersections.sql => 02572_max_intersections.sql} (100%) rename tests/queries/0_stateless/{02671_quantile_fuse_msan.reference => 02573_quantile_fuse_msan.reference} (100%) rename tests/queries/0_stateless/{02671_quantile_fuse_msan.sql => 02573_quantile_fuse_msan.sql} (100%) rename tests/queries/0_stateless/{02672_suspicious_low_cardinality_msan.reference => 02574_suspicious_low_cardinality_msan.reference} (100%) rename tests/queries/0_stateless/{02672_suspicious_low_cardinality_msan.sql => 02574_suspicious_low_cardinality_msan.sql} (100%) rename tests/queries/0_stateless/{02673_map_hashing_msan.reference => 02575_map_hashing_msan.reference} (100%) rename tests/queries/0_stateless/{02673_map_hashing_msan.sql => 02575_map_hashing_msan.sql} (100%) rename tests/queries/0_stateless/{25337_predicate_push_down_sorting_fix.reference => 02576_predicate_push_down_sorting_fix.reference} (100%) rename tests/queries/0_stateless/{25337_predicate_push_down_sorting_fix.sql => 02576_predicate_push_down_sorting_fix.sql} (100%) rename tests/queries/0_stateless/{02660_rewrite_array_exists_to_has.reference => 02576_rewrite_array_exists_to_has.reference} (100%) rename tests/queries/0_stateless/{02660_rewrite_array_exists_to_has.sql => 02576_rewrite_array_exists_to_has.sh} (100%) rename tests/queries/0_stateless/{25338_analyzer_array_join_calc_twice.reference => 02577_analyzer_array_join_calc_twice.reference} (100%) rename tests/queries/0_stateless/{25338_analyzer_array_join_calc_twice.sql => 02577_analyzer_array_join_calc_twice.sql} (100%) rename tests/queries/0_stateless/{02661_keepermap_delete_update.reference => 02577_keepermap_delete_update.reference} (100%) rename tests/queries/0_stateless/{02661_keepermap_delete_update.sql => 02577_keepermap_delete_update.sql} (100%) rename tests/queries/0_stateless/{25338_ipv4_codec_t64.reference => 02578_ipv4_codec_t64.reference} (100%) rename tests/queries/0_stateless/{25338_ipv4_codec_t64.sql => 02578_ipv4_codec_t64.sql} (100%) rename tests/queries/0_stateless/{02661_parameterized_rename_queries.reference => 02578_parameterized_rename_queries.reference} (100%) rename tests/queries/0_stateless/{02661_parameterized_rename_queries.sql => 02578_parameterized_rename_queries.sql} (100%) rename tests/queries/0_stateless/{25339_fill_empty_chunk.reference => 02579_fill_empty_chunk.reference} (100%) rename tests/queries/0_stateless/{25339_fill_empty_chunk.sql => 02579_fill_empty_chunk.sql} (100%) rename tests/queries/0_stateless/{02661_parameterized_replace.reference => 02579_parameterized_replace.reference} (100%) rename tests/queries/0_stateless/{02661_parameterized_replace.sql => 02579_parameterized_replace.sql} (100%) rename tests/queries/0_stateless/{25339_like_substring_search_bug.reference => 02580_like_substring_search_bug.reference} (100%) rename tests/queries/0_stateless/{25339_like_substring_search_bug.sql => 02580_like_substring_search_bug.sql} (100%) diff --git a/tests/queries/0_stateless/02661_window_ntile.reference b/tests/queries/0_stateless/02560_window_ntile.reference similarity index 100% rename from tests/queries/0_stateless/02661_window_ntile.reference rename to tests/queries/0_stateless/02560_window_ntile.reference diff --git a/tests/queries/0_stateless/02661_window_ntile.sql b/tests/queries/0_stateless/02560_window_ntile.sql similarity index 100% rename from tests/queries/0_stateless/02661_window_ntile.sql rename to tests/queries/0_stateless/02560_window_ntile.sql diff --git a/tests/queries/0_stateless/02662_sorting_constants_and_distinct_crash.reference b/tests/queries/0_stateless/02561_sorting_constants_and_distinct_crash.reference similarity index 100% rename from tests/queries/0_stateless/02662_sorting_constants_and_distinct_crash.reference rename to tests/queries/0_stateless/02561_sorting_constants_and_distinct_crash.reference diff --git a/tests/queries/0_stateless/02662_sorting_constants_and_distinct_crash.sql b/tests/queries/0_stateless/02561_sorting_constants_and_distinct_crash.sql similarity index 100% rename from tests/queries/0_stateless/02662_sorting_constants_and_distinct_crash.sql rename to tests/queries/0_stateless/02561_sorting_constants_and_distinct_crash.sql diff --git a/tests/queries/0_stateless/02665_regexp_extract.reference b/tests/queries/0_stateless/02562_regexp_extract.reference similarity index 100% rename from tests/queries/0_stateless/02665_regexp_extract.reference rename to tests/queries/0_stateless/02562_regexp_extract.reference diff --git a/tests/queries/0_stateless/02665_regexp_extract.sql b/tests/queries/0_stateless/02562_regexp_extract.sql similarity index 100% rename from tests/queries/0_stateless/02665_regexp_extract.sql rename to tests/queries/0_stateless/02562_regexp_extract.sql diff --git a/tests/queries/0_stateless/02666_progress_when_no_rows_from_prewhere.reference b/tests/queries/0_stateless/02563_progress_when_no_rows_from_prewhere.reference similarity index 100% rename from tests/queries/0_stateless/02666_progress_when_no_rows_from_prewhere.reference rename to tests/queries/0_stateless/02563_progress_when_no_rows_from_prewhere.reference diff --git a/tests/queries/0_stateless/02666_progress_when_no_rows_from_prewhere.sh b/tests/queries/0_stateless/02563_progress_when_no_rows_from_prewhere.sh similarity index 100% rename from tests/queries/0_stateless/02666_progress_when_no_rows_from_prewhere.sh rename to tests/queries/0_stateless/02563_progress_when_no_rows_from_prewhere.sh diff --git a/tests/queries/0_stateless/02666_read_in_order_final_desc.reference b/tests/queries/0_stateless/02564_read_in_order_final_desc.reference similarity index 100% rename from tests/queries/0_stateless/02666_read_in_order_final_desc.reference rename to tests/queries/0_stateless/02564_read_in_order_final_desc.reference diff --git a/tests/queries/0_stateless/02666_read_in_order_final_desc.sql b/tests/queries/0_stateless/02564_read_in_order_final_desc.sql similarity index 100% rename from tests/queries/0_stateless/02666_read_in_order_final_desc.sql rename to tests/queries/0_stateless/02564_read_in_order_final_desc.sql diff --git a/tests/queries/0_stateless/02667_analyzer_limit_settings.reference b/tests/queries/0_stateless/02565_analyzer_limit_settings.reference similarity index 100% rename from tests/queries/0_stateless/02667_analyzer_limit_settings.reference rename to tests/queries/0_stateless/02565_analyzer_limit_settings.reference diff --git a/tests/queries/0_stateless/02667_analyzer_limit_settings.sql b/tests/queries/0_stateless/02565_analyzer_limit_settings.sql similarity index 100% rename from tests/queries/0_stateless/02667_analyzer_limit_settings.sql rename to tests/queries/0_stateless/02565_analyzer_limit_settings.sql diff --git a/tests/queries/0_stateless/02667_analyzer_limit_settings_distributed.reference b/tests/queries/0_stateless/02566_analyzer_limit_settings_distributed.reference similarity index 100% rename from tests/queries/0_stateless/02667_analyzer_limit_settings_distributed.reference rename to tests/queries/0_stateless/02566_analyzer_limit_settings_distributed.reference diff --git a/tests/queries/0_stateless/02667_analyzer_limit_settings_distributed.sql b/tests/queries/0_stateless/02566_analyzer_limit_settings_distributed.sql similarity index 100% rename from tests/queries/0_stateless/02667_analyzer_limit_settings_distributed.sql rename to tests/queries/0_stateless/02566_analyzer_limit_settings_distributed.sql diff --git a/tests/queries/0_stateless/02667_and_consistency.reference b/tests/queries/0_stateless/02567_and_consistency.reference similarity index 100% rename from tests/queries/0_stateless/02667_and_consistency.reference rename to tests/queries/0_stateless/02567_and_consistency.reference diff --git a/tests/queries/0_stateless/02667_and_consistency.sql b/tests/queries/0_stateless/02567_and_consistency.sql similarity index 100% rename from tests/queries/0_stateless/02667_and_consistency.sql rename to tests/queries/0_stateless/02567_and_consistency.sql diff --git a/tests/queries/0_stateless/02667_array_map_const_low_cardinality.reference b/tests/queries/0_stateless/02568_array_map_const_low_cardinality.reference similarity index 100% rename from tests/queries/0_stateless/02667_array_map_const_low_cardinality.reference rename to tests/queries/0_stateless/02568_array_map_const_low_cardinality.reference diff --git a/tests/queries/0_stateless/02667_array_map_const_low_cardinality.sql b/tests/queries/0_stateless/02568_array_map_const_low_cardinality.sql similarity index 100% rename from tests/queries/0_stateless/02667_array_map_const_low_cardinality.sql rename to tests/queries/0_stateless/02568_array_map_const_low_cardinality.sql diff --git a/tests/queries/0_stateless/02667_json_array_length.reference b/tests/queries/0_stateless/02568_json_array_length.reference similarity index 100% rename from tests/queries/0_stateless/02667_json_array_length.reference rename to tests/queries/0_stateless/02568_json_array_length.reference diff --git a/tests/queries/0_stateless/02667_json_array_length.sql b/tests/queries/0_stateless/02568_json_array_length.sql similarity index 100% rename from tests/queries/0_stateless/02667_json_array_length.sql rename to tests/queries/0_stateless/02568_json_array_length.sql diff --git a/tests/queries/0_stateless/02667_order_by_aggregation_result.reference b/tests/queries/0_stateless/02569_order_by_aggregation_result.reference similarity index 100% rename from tests/queries/0_stateless/02667_order_by_aggregation_result.reference rename to tests/queries/0_stateless/02569_order_by_aggregation_result.reference diff --git a/tests/queries/0_stateless/02667_order_by_aggregation_result.sql b/tests/queries/0_stateless/02569_order_by_aggregation_result.sql similarity index 100% rename from tests/queries/0_stateless/02667_order_by_aggregation_result.sql rename to tests/queries/0_stateless/02569_order_by_aggregation_result.sql diff --git a/tests/queries/0_stateless/02668_fallback_from_async_insert.reference b/tests/queries/0_stateless/02570_fallback_from_async_insert.reference similarity index 100% rename from tests/queries/0_stateless/02668_fallback_from_async_insert.reference rename to tests/queries/0_stateless/02570_fallback_from_async_insert.reference diff --git a/tests/queries/0_stateless/02668_fallback_from_async_insert.sh b/tests/queries/0_stateless/02570_fallback_from_async_insert.sh similarity index 100% rename from tests/queries/0_stateless/02668_fallback_from_async_insert.sh rename to tests/queries/0_stateless/02570_fallback_from_async_insert.sh diff --git a/tests/queries/0_stateless/02669_local_desc_abort_on_twitter_json.reference b/tests/queries/0_stateless/02571_local_desc_abort_on_twitter_json.reference similarity index 100% rename from tests/queries/0_stateless/02669_local_desc_abort_on_twitter_json.reference rename to tests/queries/0_stateless/02571_local_desc_abort_on_twitter_json.reference diff --git a/tests/queries/0_stateless/02669_local_desc_abort_on_twitter_json.sh b/tests/queries/0_stateless/02571_local_desc_abort_on_twitter_json.sh similarity index 100% rename from tests/queries/0_stateless/02669_local_desc_abort_on_twitter_json.sh rename to tests/queries/0_stateless/02571_local_desc_abort_on_twitter_json.sh diff --git a/tests/queries/0_stateless/02670_max_intersections.reference b/tests/queries/0_stateless/02572_max_intersections.reference similarity index 100% rename from tests/queries/0_stateless/02670_max_intersections.reference rename to tests/queries/0_stateless/02572_max_intersections.reference diff --git a/tests/queries/0_stateless/02670_max_intersections.sql b/tests/queries/0_stateless/02572_max_intersections.sql similarity index 100% rename from tests/queries/0_stateless/02670_max_intersections.sql rename to tests/queries/0_stateless/02572_max_intersections.sql diff --git a/tests/queries/0_stateless/02671_quantile_fuse_msan.reference b/tests/queries/0_stateless/02573_quantile_fuse_msan.reference similarity index 100% rename from tests/queries/0_stateless/02671_quantile_fuse_msan.reference rename to tests/queries/0_stateless/02573_quantile_fuse_msan.reference diff --git a/tests/queries/0_stateless/02671_quantile_fuse_msan.sql b/tests/queries/0_stateless/02573_quantile_fuse_msan.sql similarity index 100% rename from tests/queries/0_stateless/02671_quantile_fuse_msan.sql rename to tests/queries/0_stateless/02573_quantile_fuse_msan.sql diff --git a/tests/queries/0_stateless/02672_suspicious_low_cardinality_msan.reference b/tests/queries/0_stateless/02574_suspicious_low_cardinality_msan.reference similarity index 100% rename from tests/queries/0_stateless/02672_suspicious_low_cardinality_msan.reference rename to tests/queries/0_stateless/02574_suspicious_low_cardinality_msan.reference diff --git a/tests/queries/0_stateless/02672_suspicious_low_cardinality_msan.sql b/tests/queries/0_stateless/02574_suspicious_low_cardinality_msan.sql similarity index 100% rename from tests/queries/0_stateless/02672_suspicious_low_cardinality_msan.sql rename to tests/queries/0_stateless/02574_suspicious_low_cardinality_msan.sql diff --git a/tests/queries/0_stateless/02673_map_hashing_msan.reference b/tests/queries/0_stateless/02575_map_hashing_msan.reference similarity index 100% rename from tests/queries/0_stateless/02673_map_hashing_msan.reference rename to tests/queries/0_stateless/02575_map_hashing_msan.reference diff --git a/tests/queries/0_stateless/02673_map_hashing_msan.sql b/tests/queries/0_stateless/02575_map_hashing_msan.sql similarity index 100% rename from tests/queries/0_stateless/02673_map_hashing_msan.sql rename to tests/queries/0_stateless/02575_map_hashing_msan.sql diff --git a/tests/queries/0_stateless/25337_predicate_push_down_sorting_fix.reference b/tests/queries/0_stateless/02576_predicate_push_down_sorting_fix.reference similarity index 100% rename from tests/queries/0_stateless/25337_predicate_push_down_sorting_fix.reference rename to tests/queries/0_stateless/02576_predicate_push_down_sorting_fix.reference diff --git a/tests/queries/0_stateless/25337_predicate_push_down_sorting_fix.sql b/tests/queries/0_stateless/02576_predicate_push_down_sorting_fix.sql similarity index 100% rename from tests/queries/0_stateless/25337_predicate_push_down_sorting_fix.sql rename to tests/queries/0_stateless/02576_predicate_push_down_sorting_fix.sql diff --git a/tests/queries/0_stateless/02660_rewrite_array_exists_to_has.reference b/tests/queries/0_stateless/02576_rewrite_array_exists_to_has.reference similarity index 100% rename from tests/queries/0_stateless/02660_rewrite_array_exists_to_has.reference rename to tests/queries/0_stateless/02576_rewrite_array_exists_to_has.reference diff --git a/tests/queries/0_stateless/02660_rewrite_array_exists_to_has.sql b/tests/queries/0_stateless/02576_rewrite_array_exists_to_has.sh similarity index 100% rename from tests/queries/0_stateless/02660_rewrite_array_exists_to_has.sql rename to tests/queries/0_stateless/02576_rewrite_array_exists_to_has.sh diff --git a/tests/queries/0_stateless/25338_analyzer_array_join_calc_twice.reference b/tests/queries/0_stateless/02577_analyzer_array_join_calc_twice.reference similarity index 100% rename from tests/queries/0_stateless/25338_analyzer_array_join_calc_twice.reference rename to tests/queries/0_stateless/02577_analyzer_array_join_calc_twice.reference diff --git a/tests/queries/0_stateless/25338_analyzer_array_join_calc_twice.sql b/tests/queries/0_stateless/02577_analyzer_array_join_calc_twice.sql similarity index 100% rename from tests/queries/0_stateless/25338_analyzer_array_join_calc_twice.sql rename to tests/queries/0_stateless/02577_analyzer_array_join_calc_twice.sql diff --git a/tests/queries/0_stateless/02661_keepermap_delete_update.reference b/tests/queries/0_stateless/02577_keepermap_delete_update.reference similarity index 100% rename from tests/queries/0_stateless/02661_keepermap_delete_update.reference rename to tests/queries/0_stateless/02577_keepermap_delete_update.reference diff --git a/tests/queries/0_stateless/02661_keepermap_delete_update.sql b/tests/queries/0_stateless/02577_keepermap_delete_update.sql similarity index 100% rename from tests/queries/0_stateless/02661_keepermap_delete_update.sql rename to tests/queries/0_stateless/02577_keepermap_delete_update.sql diff --git a/tests/queries/0_stateless/25338_ipv4_codec_t64.reference b/tests/queries/0_stateless/02578_ipv4_codec_t64.reference similarity index 100% rename from tests/queries/0_stateless/25338_ipv4_codec_t64.reference rename to tests/queries/0_stateless/02578_ipv4_codec_t64.reference diff --git a/tests/queries/0_stateless/25338_ipv4_codec_t64.sql b/tests/queries/0_stateless/02578_ipv4_codec_t64.sql similarity index 100% rename from tests/queries/0_stateless/25338_ipv4_codec_t64.sql rename to tests/queries/0_stateless/02578_ipv4_codec_t64.sql diff --git a/tests/queries/0_stateless/02661_parameterized_rename_queries.reference b/tests/queries/0_stateless/02578_parameterized_rename_queries.reference similarity index 100% rename from tests/queries/0_stateless/02661_parameterized_rename_queries.reference rename to tests/queries/0_stateless/02578_parameterized_rename_queries.reference diff --git a/tests/queries/0_stateless/02661_parameterized_rename_queries.sql b/tests/queries/0_stateless/02578_parameterized_rename_queries.sql similarity index 100% rename from tests/queries/0_stateless/02661_parameterized_rename_queries.sql rename to tests/queries/0_stateless/02578_parameterized_rename_queries.sql diff --git a/tests/queries/0_stateless/25339_fill_empty_chunk.reference b/tests/queries/0_stateless/02579_fill_empty_chunk.reference similarity index 100% rename from tests/queries/0_stateless/25339_fill_empty_chunk.reference rename to tests/queries/0_stateless/02579_fill_empty_chunk.reference diff --git a/tests/queries/0_stateless/25339_fill_empty_chunk.sql b/tests/queries/0_stateless/02579_fill_empty_chunk.sql similarity index 100% rename from tests/queries/0_stateless/25339_fill_empty_chunk.sql rename to tests/queries/0_stateless/02579_fill_empty_chunk.sql diff --git a/tests/queries/0_stateless/02661_parameterized_replace.reference b/tests/queries/0_stateless/02579_parameterized_replace.reference similarity index 100% rename from tests/queries/0_stateless/02661_parameterized_replace.reference rename to tests/queries/0_stateless/02579_parameterized_replace.reference diff --git a/tests/queries/0_stateless/02661_parameterized_replace.sql b/tests/queries/0_stateless/02579_parameterized_replace.sql similarity index 100% rename from tests/queries/0_stateless/02661_parameterized_replace.sql rename to tests/queries/0_stateless/02579_parameterized_replace.sql diff --git a/tests/queries/0_stateless/25339_like_substring_search_bug.reference b/tests/queries/0_stateless/02580_like_substring_search_bug.reference similarity index 100% rename from tests/queries/0_stateless/25339_like_substring_search_bug.reference rename to tests/queries/0_stateless/02580_like_substring_search_bug.reference diff --git a/tests/queries/0_stateless/25339_like_substring_search_bug.sql b/tests/queries/0_stateless/02580_like_substring_search_bug.sql similarity index 100% rename from tests/queries/0_stateless/25339_like_substring_search_bug.sql rename to tests/queries/0_stateless/02580_like_substring_search_bug.sql From 8a977a2b8318a5dfd74895527f6d78f3a493c6b7 Mon Sep 17 00:00:00 2001 From: avogar Date: Mon, 27 Feb 2023 20:01:48 +0000 Subject: [PATCH 251/841] Fix extension typo --- ...ray_exists_to_has.sh => 02576_rewrite_array_exists_to_has.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tests/queries/0_stateless/{02576_rewrite_array_exists_to_has.sh => 02576_rewrite_array_exists_to_has.sql} (100%) diff --git a/tests/queries/0_stateless/02576_rewrite_array_exists_to_has.sh b/tests/queries/0_stateless/02576_rewrite_array_exists_to_has.sql similarity index 100% rename from tests/queries/0_stateless/02576_rewrite_array_exists_to_has.sh rename to tests/queries/0_stateless/02576_rewrite_array_exists_to_has.sql From 69fa64e85295272ae3eed1bef2ef70accaa5c4df Mon Sep 17 00:00:00 2001 From: Dan Roscigno Date: Mon, 27 Feb 2023 15:16:18 -0500 Subject: [PATCH 252/841] Add example of arrayStringConcat() closes https://github.com/ClickHouse/clickhouse-docs/issues/124 --- .../functions/splitting-merging-functions.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/en/sql-reference/functions/splitting-merging-functions.md b/docs/en/sql-reference/functions/splitting-merging-functions.md index 7cad6b2fbbf..6015bb79b87 100644 --- a/docs/en/sql-reference/functions/splitting-merging-functions.md +++ b/docs/en/sql-reference/functions/splitting-merging-functions.md @@ -226,6 +226,17 @@ SELECT splitByNonAlpha(' 1! a, b. '); Concatenates string representations of values listed in the array with the separator. `separator` is an optional parameter: a constant string, set to an empty string by default. Returns the string. +**Example** + +``` sql +SELECT arrayStringConcat(['12/05/2021', '12:50:00'], ' ') AS DateString; +``` +```text +┌─DateString──────────┐ +│ 12/05/2021 12:50:00 │ +└─────────────────────┘ +``` + ## alphaTokens(s[, max_substrings]), splitByAlpha(s[, max_substrings]) Selects substrings of consecutive bytes from the ranges a-z and A-Z.Returns an array of substrings. @@ -364,4 +375,4 @@ Result: ┌─tokens────────────────────────────┐ │ ['test1','test2','test3','test4'] │ └───────────────────────────────────┘ -``` \ No newline at end of file +``` From f1e270b755c1f4f4bc31895962056b5cd1b12424 Mon Sep 17 00:00:00 2001 From: Dan Roscigno Date: Mon, 27 Feb 2023 15:41:52 -0500 Subject: [PATCH 253/841] Add link to Howto from Materialized view ref. closes https://github.com/ClickHouse/clickhouse-docs/issues/96 --- docs/en/sql-reference/statements/create/view.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/en/sql-reference/statements/create/view.md b/docs/en/sql-reference/statements/create/view.md index 527b31b36a4..acdede3c673 100644 --- a/docs/en/sql-reference/statements/create/view.md +++ b/docs/en/sql-reference/statements/create/view.md @@ -54,6 +54,10 @@ SELECT * FROM view(column1=value1, column2=value2 ...) CREATE MATERIALIZED VIEW [IF NOT EXISTS] [db.]table_name [ON CLUSTER] [TO[db.]name] [ENGINE = engine] [POPULATE] AS SELECT ... ``` +:::tip +Here is a step by step guide on using [Materialized views](docs/en/guides/developer/cascading-materialized-views.md). +::: + Materialized views store data transformed by the corresponding [SELECT](../../../sql-reference/statements/select/index.md) query. When creating a materialized view without `TO [db].[table]`, you must specify `ENGINE` – the table engine for storing data. From 69cdf401a4adb15ae8680b83e4a7ca5283d7b17a Mon Sep 17 00:00:00 2001 From: kssenii Date: Mon, 27 Feb 2023 22:29:16 +0100 Subject: [PATCH 254/841] Add test for materialized view with materialized postgresql --- .../test.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/integration/test_postgresql_replica_database_engine_2/test.py b/tests/integration/test_postgresql_replica_database_engine_2/test.py index 68c7cb96b71..ba75177b89a 100644 --- a/tests/integration/test_postgresql_replica_database_engine_2/test.py +++ b/tests/integration/test_postgresql_replica_database_engine_2/test.py @@ -628,6 +628,27 @@ def test_table_override(started_cluster): assert_eq_with_retry(instance, query, expected) +def test_materialized_view(started_cluster): + cursor = pg_manager.get_db_cursor() + cursor.execute(f"DROP TABLE IF EXISTS test_table") + cursor.execute(f"CREATE TABLE test_table (key integer PRIMARY KEY, value integer)") + cursor.execute(f"INSERT INTO test_table SELECT 1, 2") + instance.query("DROP DATABASE IF EXISTS test_database") + instance.query( + "CREATE DATABASE test_database ENGINE = MaterializedPostgreSQL(postgres1) SETTINGS materialized_postgresql_tables_list='test_table'" + ) + check_tables_are_synchronized(instance, "test_table") + instance.query("DROP TABLE IF EXISTS mv") + instance.query( + "CREATE MATERIALIZED VIEW mv ENGINE=MergeTree ORDER BY tuple() POPULATE AS SELECT * FROM test_database.test_table" + ) + assert "1\t2" == instance.query("SELECT * FROM mv").strip() + cursor.execute(f"INSERT INTO test_table SELECT 3, 4") + check_tables_are_synchronized(instance, "test_table") + assert "1\t2\n3\t4" == instance.query("SELECT * FROM mv").strip() + pg_manager.drop_materialized_db() + + if __name__ == "__main__": cluster.start() input("Cluster created, press any key to destroy...") From f4a8b099de9f9ac9fe52ef32df85b4fb0b90cfc5 Mon Sep 17 00:00:00 2001 From: Yakov Olkhovskiy Date: Mon, 27 Feb 2023 21:36:21 +0000 Subject: [PATCH 255/841] allow IPv4 in range() --- src/Functions/array/range.cpp | 13 +++++++++---- .../queries/0_stateless/02674_range_ipv4.reference | 3 +++ tests/queries/0_stateless/02674_range_ipv4.sql | 3 +++ 3 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 tests/queries/0_stateless/02674_range_ipv4.reference create mode 100644 tests/queries/0_stateless/02674_range_ipv4.sql diff --git a/src/Functions/array/range.cpp b/src/Functions/array/range.cpp index dc09facb81b..f1f0fef8fd9 100644 --- a/src/Functions/array/range.cpp +++ b/src/Functions/array/range.cpp @@ -55,14 +55,19 @@ private: getName(), arguments.size()); } - for (const auto & arg : arguments) + DataTypes arg_types; + for (size_t i = 0, size = arguments.size(); i < size; ++i) { - if (!isInteger(arg)) + if (i < 2 && WhichDataType(arguments[i]).isIPv4()) + arg_types.emplace_back(std::make_shared()); + else if (isInteger(arguments[i])) + arg_types.push_back(arguments[i]); + else throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Illegal type {} of argument of function {}", - arg->getName(), getName()); + arguments[i]->getName(), getName()); } - DataTypePtr common_type = getLeastSupertype(arguments); + DataTypePtr common_type = getLeastSupertype(arg_types); return std::make_shared(common_type); } diff --git a/tests/queries/0_stateless/02674_range_ipv4.reference b/tests/queries/0_stateless/02674_range_ipv4.reference new file mode 100644 index 00000000000..76fc0c45bd3 --- /dev/null +++ b/tests/queries/0_stateless/02674_range_ipv4.reference @@ -0,0 +1,3 @@ +[2887712768,2887712769,2887712770,2887712771,2887712772,2887712773,2887712774,2887712775,2887712776,2887712777] +[2887712768,2887712769,2887712770,2887712771,2887712772,2887712773,2887712774,2887712775,2887712776,2887712777] +[2887712768,2887712769,2887712770,2887712771,2887712772,2887712773,2887712774,2887712775,2887712776,2887712777] diff --git a/tests/queries/0_stateless/02674_range_ipv4.sql b/tests/queries/0_stateless/02674_range_ipv4.sql new file mode 100644 index 00000000000..1241b727014 --- /dev/null +++ b/tests/queries/0_stateless/02674_range_ipv4.sql @@ -0,0 +1,3 @@ +SELECT range(toIPv4('172.31.0.0'), toIPv4('172.31.0.10')); +SELECT range(2887712768, toIPv4('172.31.0.10')); +SELECT range(toIPv4('172.31.0.0'), 2887712778); From d5469c0ab49106ad55aef68a8eaaec17d59d4081 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Tue, 28 Feb 2023 00:07:50 +0100 Subject: [PATCH 256/841] fix clickhouse-test --- tests/clickhouse-test | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/clickhouse-test b/tests/clickhouse-test index cfd2546bbdd..06a30317346 100755 --- a/tests/clickhouse-test +++ b/tests/clickhouse-test @@ -73,7 +73,14 @@ def stringhash(s): # First and last lines of the log def trim_for_log(s): - return s + if not s: + return s + lines = s.splitlines() + if len(lines) > 10000: + separator = "-" * 40 + str(len(lines) - 10000) + " lines are hidden" + "-" * 40 + return "\n".join(lines[:5000] + [] + [separator] + [] + lines[-5000:]) + else: + return "\n".join(lines) class HTTPError(Exception): From 5fb1f20882677f66ca5c50decd01dcaae4677cab Mon Sep 17 00:00:00 2001 From: AndyB Date: Mon, 27 Feb 2023 23:16:34 +0000 Subject: [PATCH 257/841] LOG_DEBUG over LOG_INFO --- src/Interpreters/executeQuery.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Interpreters/executeQuery.cpp b/src/Interpreters/executeQuery.cpp index 435401796a0..f3c103f6af2 100644 --- a/src/Interpreters/executeQuery.cpp +++ b/src/Interpreters/executeQuery.cpp @@ -995,7 +995,7 @@ static std::tuple executeQueryImpl( { double elapsed_seconds = static_cast(info.elapsed_microseconds) / 1000000.0; double rows_per_second = static_cast(elem.read_rows) / elapsed_seconds; - LOG_INFO( + LOG_DEBUG( &Poco::Logger::get("executeQuery"), "Read {} rows, {} in {} sec., {} rows/sec., {}/sec.", elem.read_rows, From ab44740efb829d6d3eaa4663d6b89cf3c5dc3b1c Mon Sep 17 00:00:00 2001 From: Nikita Taranov Date: Tue, 28 Feb 2023 00:26:11 +0100 Subject: [PATCH 258/841] Enable perf tests added in #45364 (#46623) --- tests/performance/aggregation_by_partitions.xml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/performance/aggregation_by_partitions.xml b/tests/performance/aggregation_by_partitions.xml index dbeaf3ce6aa..403f94d8ac8 100644 --- a/tests/performance/aggregation_by_partitions.xml +++ b/tests/performance/aggregation_by_partitions.xml @@ -1,9 +1,8 @@ - - - - + 1 + 1 + 256 0 256 From 3444059649c607ba0b9735fbf80cfef4779f1863 Mon Sep 17 00:00:00 2001 From: Konstantin Bogdanov Date: Tue, 28 Feb 2023 00:42:52 +0100 Subject: [PATCH 259/841] Add thevar1able to trusted contributors (#46998) * Add thevar1able to trusted contributors * Automatic style fix --------- Co-authored-by: robot-clickhouse --- tests/ci/workflow_approve_rerun_lambda/app.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/ci/workflow_approve_rerun_lambda/app.py b/tests/ci/workflow_approve_rerun_lambda/app.py index a4a5a013c36..decf6ce0393 100644 --- a/tests/ci/workflow_approve_rerun_lambda/app.py +++ b/tests/ci/workflow_approve_rerun_lambda/app.py @@ -123,6 +123,7 @@ TRUSTED_CONTRIBUTORS = { "tonickkozlov", # Cloudflare "tylerhannan", # ClickHouse Employee "myrrc", # Mike Kot, DoubleCloud + "thevar1able", # ClickHouse Employee ] } From 76dfb0451117ae50f7c4c7413ced5467477f75aa Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Tue, 28 Feb 2023 07:56:10 +0000 Subject: [PATCH 260/841] Send only temporary tables with StorageMemory --- src/QueryPipeline/RemoteQueryExecutor.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/QueryPipeline/RemoteQueryExecutor.cpp b/src/QueryPipeline/RemoteQueryExecutor.cpp index 5c9995a418d..496ce441729 100644 --- a/src/QueryPipeline/RemoteQueryExecutor.cpp +++ b/src/QueryPipeline/RemoteQueryExecutor.cpp @@ -23,6 +23,7 @@ #include #include #include +#include namespace CurrentMetrics @@ -602,6 +603,9 @@ void RemoteQueryExecutor::sendExternalTables() for (const auto & table : external_tables) { StoragePtr cur = table.second; + /// Send only temporary tables with StorageMemory + if (!std::dynamic_pointer_cast(cur)) + continue; auto data = std::make_unique(); data->table_name = table.first; From bb483ca051ec04635d1c4e2b9721dd7d10a636c9 Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Tue, 28 Feb 2023 08:05:29 +0000 Subject: [PATCH 261/841] Update table.md doc --- docs/en/sql-reference/statements/create/table.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/sql-reference/statements/create/table.md b/docs/en/sql-reference/statements/create/table.md index efa8c420f1a..f0a265b6fbb 100644 --- a/docs/en/sql-reference/statements/create/table.md +++ b/docs/en/sql-reference/statements/create/table.md @@ -370,7 +370,7 @@ ENGINE = MergeTree ORDER BY x; ClickHouse supports temporary tables which have the following characteristics: - Temporary tables disappear when the session ends, including if the connection is lost. -- A temporary table uses the Memory table engine when engine is not specified and it may use any table engine except for Replicated and `KeeperMap` engines. +- A temporary table uses the Memory table engine when engine is not specified and it may use any table engine except Replicated and `KeeperMap` engines. - The DB can’t be specified for a temporary table. It is created outside of databases. - Impossible to create a temporary table with distributed DDL query on all cluster servers (by using `ON CLUSTER`): this table exists only in the current session. - If a temporary table has the same name as another one and a query specifies the table name without specifying the DB, the temporary table will be used. From 8531b17462aa11a28493c8226619117240acf51b Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Tue, 28 Feb 2023 10:03:33 +0000 Subject: [PATCH 262/841] Try to add a very stupid fix for aarch64. Mute ubsan for overflow. --- src/Functions/widthBucket.cpp | 2 +- tests/queries/0_stateless/25337_width_bucket.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Functions/widthBucket.cpp b/src/Functions/widthBucket.cpp index 46ba56b843d..a32fa159c2c 100644 --- a/src/Functions/widthBucket.cpp +++ b/src/Functions/widthBucket.cpp @@ -104,7 +104,7 @@ class FunctionWidthBucket : public IFunction } template - TResultType calculate(const Float64 operand, const Float64 low, const Float64 high, const TCountType count) const + TResultType NO_SANITIZE_UNDEFINED calculate(const Float64 operand, const Float64 low, const Float64 high, const TCountType count) const { if (const auto maybe_early_return = checkArguments(operand, low, high, count); maybe_early_return.has_value()) { diff --git a/tests/queries/0_stateless/25337_width_bucket.sql b/tests/queries/0_stateless/25337_width_bucket.sql index d0117ca5d5f..b375623246a 100644 --- a/tests/queries/0_stateless/25337_width_bucket.sql +++ b/tests/queries/0_stateless/25337_width_bucket.sql @@ -29,7 +29,7 @@ SELECT '----------'; SELECT toInt64(operand) AS operand, toInt32(low) AS low, toInt16(high) AS high, count, WIDTH_BUCKET(operand, low, high, count) FROM mytable WHERE count != 0; SELECT '----------'; -- UIntXX types -SELECT toUInt8(operand) AS operand, toUInt16(low) AS low, toUInt32(high) AS high, count, WIDTH_BUCKET(operand, low, high, count) FROM mytable WHERE count != 0; +SELECT toUInt8(toInt8(operand)) AS operand, toUInt16(toInt16(low)) AS low, toUInt32(toInt32(high)) AS high, count, WIDTH_BUCKET(operand, low, high, count) FROM mytable WHERE count != 0; SELECT '----------'; SELECT WIDTH_BUCKET(1, 2, 3, -1); -- { serverError ILLEGAL_TYPE_OF_ARGUMENT } SELECT WIDTH_BUCKET(1, 2, 3, 1.3); -- { serverError ILLEGAL_TYPE_OF_ARGUMENT } From 93dd9293ff6853acfa0c69024fab6afa495e32a8 Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Tue, 28 Feb 2023 10:04:33 +0000 Subject: [PATCH 263/841] Use INCORRECT_QUERY in test and add query with remote() --- .../02525_different_engines_in_temporary_tables.reference | 8 +++++--- .../02525_different_engines_in_temporary_tables.sql | 7 +++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.reference b/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.reference index 3ea857b1652..3d1916b29f6 100644 --- a/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.reference +++ b/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.reference @@ -1,6 +1,8 @@ -1 a -2 b -3 c +1 a +2 b +3 c +0 +0 1 a 2 b 3 c diff --git a/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.sql b/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.sql index 1535a190db5..7ebc05dfece 100644 --- a/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.sql +++ b/tests/queries/0_stateless/02525_different_engines_in_temporary_tables.sql @@ -9,6 +9,9 @@ ORDER BY id PRIMARY KEY id; INSERT INTO table_merge_tree_02525 VALUES (1, 'a'), (2, 'b'), (3, 'c'); SELECT * FROM table_merge_tree_02525; +-- Check that temporary table with MergeTree is not sent to remote servers +-- The query with remote() should not fail +SELECT dummy FROM remote('127.0.0.{1,2}', system, one); DROP TEMPORARY TABLE table_merge_tree_02525; DROP TEMPORARY TABLE IF EXISTS table_log_02525; @@ -52,7 +55,7 @@ CREATE TEMPORARY TABLE table_replicated_merge_tree_02525 ) ENGINE ReplicatedMergeTree('/clickhouse/tables/{database}/test_02525/table_replicated_merge_tree_02525', 'r1') ORDER BY id -PRIMARY KEY id; -- { serverError 80 } +PRIMARY KEY id; -- { serverError INCORRECT_QUERY } DROP TEMPORARY TABLE IF EXISTS table_keeper_map_02525; CREATE TEMPORARY TABLE table_keeper_map_02525 @@ -60,4 +63,4 @@ CREATE TEMPORARY TABLE table_keeper_map_02525 key String, value UInt32 ) Engine=KeeperMap('/' || currentDatabase() || '/test02525') -PRIMARY KEY(key); -- { serverError 80 } +PRIMARY KEY(key); -- { serverError INCORRECT_QUERY } From f43e00c3cacf019d776c77b83cd2a8c10971e789 Mon Sep 17 00:00:00 2001 From: kssenii Date: Tue, 28 Feb 2023 11:32:33 +0100 Subject: [PATCH 264/841] Add order by to test to fix flakyness --- .../test_postgresql_replica_database_engine_2/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/test_postgresql_replica_database_engine_2/test.py b/tests/integration/test_postgresql_replica_database_engine_2/test.py index ba75177b89a..33796336550 100644 --- a/tests/integration/test_postgresql_replica_database_engine_2/test.py +++ b/tests/integration/test_postgresql_replica_database_engine_2/test.py @@ -645,7 +645,7 @@ def test_materialized_view(started_cluster): assert "1\t2" == instance.query("SELECT * FROM mv").strip() cursor.execute(f"INSERT INTO test_table SELECT 3, 4") check_tables_are_synchronized(instance, "test_table") - assert "1\t2\n3\t4" == instance.query("SELECT * FROM mv").strip() + assert "1\t2\n3\t4" == instance.query("SELECT * FROM mv ORDER BY 1, 2").strip() pg_manager.drop_materialized_db() From cf067c1b67c4e2a8b3a3657126fa7385598612dd Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Tue, 28 Feb 2023 12:00:08 +0100 Subject: [PATCH 265/841] Use /etc/default/clickhouse in systemd too --- packages/clickhouse-server.service | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/clickhouse-server.service b/packages/clickhouse-server.service index 037be826b97..bff2bf8fc2d 100644 --- a/packages/clickhouse-server.service +++ b/packages/clickhouse-server.service @@ -24,6 +24,8 @@ RuntimeDirectory=%p ExecStart=/usr/bin/clickhouse-server --config=/etc/clickhouse-server/config.xml --pid-file=%t/%p/%p.pid # Minus means that this file is optional. EnvironmentFile=-/etc/default/%p +# Bring back /etc/default/clickhouse for backward compatibility +EnvironmentFile=-/etc/default/clickhouse LimitCORE=infinity LimitNOFILE=500000 CapabilityBoundingSet=CAP_NET_ADMIN CAP_IPC_LOCK CAP_SYS_NICE CAP_NET_BIND_SERVICE From 42c5634ae4af14602250e2938d28d70c064d6247 Mon Sep 17 00:00:00 2001 From: Igor Nikonov Date: Tue, 28 Feb 2023 11:35:36 +0000 Subject: [PATCH 266/841] Remove debug logging --- src/Planner/PlannerJoinTree.cpp | 39 ++++++++++----------------------- 1 file changed, 12 insertions(+), 27 deletions(-) diff --git a/src/Planner/PlannerJoinTree.cpp b/src/Planner/PlannerJoinTree.cpp index 8b7489d52c8..11944b4b71d 100644 --- a/src/Planner/PlannerJoinTree.cpp +++ b/src/Planner/PlannerJoinTree.cpp @@ -39,14 +39,14 @@ #include #include #include + #include -#include -#include "Analyzer/AggregationUtils.h" -#include "Analyzer/FunctionNode.h" -#include +#include +#include #include #include #include +#include namespace DB { @@ -183,22 +183,6 @@ bool applyTrivialCountIfPossible( if (aggregates.size() != 1) return false; - /// dump main query tree - { - WriteBufferFromOwnString buffer; - IQueryTreeNode::FormatState format_state; - main_query_node.dumpTreeImpl(buffer, format_state, 0); - - LOG_DEBUG(&Poco::Logger::get(__PRETTY_FUNCTION__), "main_query_node:\n{}", buffer.str()); - LOG_DEBUG(&Poco::Logger::get(__PRETTY_FUNCTION__), "Projection column:\n{}", main_query_node.getProjectionColumns().front().dump()); - } - - { - WriteBufferFromOwnString buffer; - buffer << columns_names; - LOG_DEBUG(&Poco::Logger::get(__PRETTY_FUNCTION__), "{}", buffer.str()); - } - const auto * function_node = typeid_cast(aggregates.front().get()); if (!function_node) return false; @@ -206,19 +190,22 @@ bool applyTrivialCountIfPossible( if (!function_node->getAggregateFunction()) return false; - LOG_DEBUG(&Poco::Logger::get(__PRETTY_FUNCTION__), "Aggregation: {}", function_node->getFunctionName()); - const auto * count_func = typeid_cast(function_node->getAggregateFunction().get()); if (!count_func) return false; /// get number of rows std::optional num_rows{}; - // if (!query_tree. prewhere() && !query.where() && !context->getCurrentTransaction()) - if (!main_query_node.hasPrewhere() && !main_query_node.hasWhere()) + /// Transaction check here is necessary because + /// MergeTree maintains total count for all parts in Active state and it simply returns that number for trivial select count() from table query. + /// But if we have current transaction, then we should return number of rows in current snapshot (that may include parts in Outdated state), + /// so we have to use totalRowsByPartitionPredicate() instead of totalRows even for trivial query + /// See https://github.com/ClickHouse/ClickHouse/pull/24258/files#r828182031 + if (!main_query_node.hasPrewhere() && !main_query_node.hasWhere() && !query_context->getCurrentTransaction()) { num_rows = storage->totalRows(settings); } + // TODO: // else // It's possible to optimize count() given only partition predicates // { // SelectQueryInfo temp_query_info; @@ -231,14 +218,12 @@ bool applyTrivialCountIfPossible( if (!num_rows) return false; - LOG_DEBUG(&Poco::Logger::get(__PRETTY_FUNCTION__), "Number of rows: {}", num_rows.value()); - /// set aggregation state const AggregateFunctionCount & agg_count = *count_func; std::vector state(agg_count.sizeOfData()); AggregateDataPtr place = state.data(); agg_count.create(place); - // SCOPE_EXIT_MEMORY_SAFE(agg_count.destroy(place)); + SCOPE_EXIT_MEMORY_SAFE(agg_count.destroy(place)); agg_count.set(place, num_rows.value()); auto column = ColumnAggregateFunction::create(function_node->getAggregateFunction()); From 73427afe969826da30689f692c5dba17545408cf Mon Sep 17 00:00:00 2001 From: flynn Date: Tue, 28 Feb 2023 11:44:30 +0000 Subject: [PATCH 267/841] Table function null default table structure --- src/TableFunctions/TableFunctionNull.cpp | 3 +++ src/TableFunctions/TableFunctionNull.h | 6 ++++-- .../0_stateless/02674_null_default_structure.reference | 0 tests/queries/0_stateless/02674_null_default_structure.sql | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 tests/queries/0_stateless/02674_null_default_structure.reference create mode 100644 tests/queries/0_stateless/02674_null_default_structure.sql diff --git a/src/TableFunctions/TableFunctionNull.cpp b/src/TableFunctions/TableFunctionNull.cpp index d2c091a7b5f..a1d1ac70d90 100644 --- a/src/TableFunctions/TableFunctionNull.cpp +++ b/src/TableFunctions/TableFunctionNull.cpp @@ -44,6 +44,9 @@ StoragePtr TableFunctionNull::executeImpl(const ASTPtr & /*ast_function*/, Conte columns = getActualTableStructure(context); else if (!structure_hint.empty()) columns = structure_hint; + else + columns = default_structure; + auto res = std::make_shared(StorageID(getDatabaseName(), table_name), columns, ConstraintsDescription(), String{}); res->startup(); return res; diff --git a/src/TableFunctions/TableFunctionNull.h b/src/TableFunctions/TableFunctionNull.h index 329315e00c9..86e9a93f1ec 100644 --- a/src/TableFunctions/TableFunctionNull.h +++ b/src/TableFunctions/TableFunctionNull.h @@ -1,7 +1,8 @@ #pragma once -#include #include +#include +#include namespace DB @@ -29,6 +30,7 @@ private: String structure = "auto"; ColumnsDescription structure_hint; -}; + ColumnsDescription default_structure = ColumnsDescription{NamesAndTypesList{{"dummy", std::make_shared()}}}; +}; } diff --git a/tests/queries/0_stateless/02674_null_default_structure.reference b/tests/queries/0_stateless/02674_null_default_structure.reference new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/queries/0_stateless/02674_null_default_structure.sql b/tests/queries/0_stateless/02674_null_default_structure.sql new file mode 100644 index 00000000000..0c6030590ba --- /dev/null +++ b/tests/queries/0_stateless/02674_null_default_structure.sql @@ -0,0 +1 @@ +SELECT * FROM null(); From 6481e304f1e64ed12448040117ce5316c465a98d Mon Sep 17 00:00:00 2001 From: flynn Date: Tue, 28 Feb 2023 12:30:07 +0000 Subject: [PATCH 268/841] fix --- src/TableFunctions/TableFunctionNull.cpp | 6 ++++-- src/TableFunctions/TableFunctionNull.h | 1 + .../0_stateless/02674_null_default_structure.reference | 1 + tests/queries/0_stateless/02674_null_default_structure.sql | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/TableFunctions/TableFunctionNull.cpp b/src/TableFunctions/TableFunctionNull.cpp index a1d1ac70d90..d25b9e15aa7 100644 --- a/src/TableFunctions/TableFunctionNull.cpp +++ b/src/TableFunctions/TableFunctionNull.cpp @@ -34,14 +34,16 @@ void TableFunctionNull::parseArguments(const ASTPtr & ast_function, ContextPtr c ColumnsDescription TableFunctionNull::getActualTableStructure(ContextPtr context) const { - return parseColumnsListFromString(structure, context); + if (structure != "auto") + return parseColumnsListFromString(structure, context); + return default_structure; } StoragePtr TableFunctionNull::executeImpl(const ASTPtr & /*ast_function*/, ContextPtr context, const std::string & table_name, ColumnsDescription /*cached_columns*/) const { ColumnsDescription columns; if (structure != "auto") - columns = getActualTableStructure(context); + columns = parseColumnsListFromString(structure, context); else if (!structure_hint.empty()) columns = structure_hint; else diff --git a/src/TableFunctions/TableFunctionNull.h b/src/TableFunctions/TableFunctionNull.h index 86e9a93f1ec..93372e5cce7 100644 --- a/src/TableFunctions/TableFunctionNull.h +++ b/src/TableFunctions/TableFunctionNull.h @@ -21,6 +21,7 @@ public: bool needStructureHint() const override { return structure == "auto"; } void setStructureHint(const ColumnsDescription & structure_hint_) override { structure_hint = structure_hint_; } + private: StoragePtr executeImpl(const ASTPtr & ast_function, ContextPtr context, const String & table_name, ColumnsDescription cached_columns) const override; const char * getStorageTypeName() const override { return "Null"; } diff --git a/tests/queries/0_stateless/02674_null_default_structure.reference b/tests/queries/0_stateless/02674_null_default_structure.reference index e69de29bb2d..922b3e34fb4 100644 --- a/tests/queries/0_stateless/02674_null_default_structure.reference +++ b/tests/queries/0_stateless/02674_null_default_structure.reference @@ -0,0 +1 @@ +dummy UInt8 diff --git a/tests/queries/0_stateless/02674_null_default_structure.sql b/tests/queries/0_stateless/02674_null_default_structure.sql index 0c6030590ba..d649ea71b41 100644 --- a/tests/queries/0_stateless/02674_null_default_structure.sql +++ b/tests/queries/0_stateless/02674_null_default_structure.sql @@ -1 +1,2 @@ SELECT * FROM null(); +DESCRIBE null(); From ea30bc7e91272a87a43fe575a9017b146ef6eefe Mon Sep 17 00:00:00 2001 From: vdimir Date: Tue, 28 Feb 2023 12:47:35 +0000 Subject: [PATCH 269/841] Fix tmp_path_template in HTTPHandler::processQuery --- src/Server/HTTPHandler.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Server/HTTPHandler.cpp b/src/Server/HTTPHandler.cpp index d898049209e..702743ef1f0 100644 --- a/src/Server/HTTPHandler.cpp +++ b/src/Server/HTTPHandler.cpp @@ -45,6 +45,9 @@ #include #include +#include + +namespace fs = std::filesystem; #if USE_SSL #include @@ -619,7 +622,7 @@ void HTTPHandler::processQuery( if (buffer_until_eof) { const std::string tmp_path(server.context()->getTemporaryVolume()->getDisk()->getPath()); - const std::string tmp_path_template(tmp_path + "http_buffers/"); + const std::string tmp_path_template(fs::path(tmp_path) / "http_buffers/"); auto create_tmp_disk_buffer = [tmp_path_template] (const WriteBufferPtr &) { From 3a96595c0e4b97fd7ae657f8274acd32947386a6 Mon Sep 17 00:00:00 2001 From: flynn Date: Tue, 28 Feb 2023 12:53:44 +0000 Subject: [PATCH 270/841] update test --- tests/queries/0_stateless/02674_null_default_structure.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/queries/0_stateless/02674_null_default_structure.sql b/tests/queries/0_stateless/02674_null_default_structure.sql index d649ea71b41..fcc5af216d9 100644 --- a/tests/queries/0_stateless/02674_null_default_structure.sql +++ b/tests/queries/0_stateless/02674_null_default_structure.sql @@ -1,2 +1,3 @@ SELECT * FROM null(); DESCRIBE null(); +insert into table function null() select 1, 'str'; From e19f2f3c5b1e7f39fd47cbf391f45303ca26ab24 Mon Sep 17 00:00:00 2001 From: flynn Date: Tue, 28 Feb 2023 13:07:19 +0000 Subject: [PATCH 271/841] fix --- src/TableFunctions/TableFunctionNull.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TableFunctions/TableFunctionNull.h b/src/TableFunctions/TableFunctionNull.h index 93372e5cce7..4fece9e6da9 100644 --- a/src/TableFunctions/TableFunctionNull.h +++ b/src/TableFunctions/TableFunctionNull.h @@ -32,6 +32,6 @@ private: String structure = "auto"; ColumnsDescription structure_hint; - ColumnsDescription default_structure = ColumnsDescription{NamesAndTypesList{{"dummy", std::make_shared()}}}; + const ColumnsDescription default_structure{NamesAndTypesList{{"dummy", std::make_shared()}}}; }; } From 6697059bada962a098b48b8cd59fa8685ac99461 Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Tue, 28 Feb 2023 13:17:18 +0000 Subject: [PATCH 272/841] Fix statx on ARM --- base/glibc-compatibility/glibc-compatibility.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/base/glibc-compatibility/glibc-compatibility.c b/base/glibc-compatibility/glibc-compatibility.c index bae03ad590a..7e8ea5051d7 100644 --- a/base/glibc-compatibility/glibc-compatibility.c +++ b/base/glibc-compatibility/glibc-compatibility.c @@ -195,7 +195,6 @@ long splice(int fd_in, off_t *off_in, int fd_out, off_t *off_out, size_t len, un #include #include -#if !defined(__aarch64__) struct statx { uint32_t stx_mask; uint32_t stx_blksize; @@ -226,7 +225,6 @@ int statx(int fd, const char *restrict path, int flag, { return syscall(SYS_statx, fd, path, flag, mask, statxbuf); } -#endif #include From a06596bdba4846ae5658d048f3bfef4022f23ee4 Mon Sep 17 00:00:00 2001 From: Kruglov Pavel <48961922+Avogar@users.noreply.github.com> Date: Tue, 28 Feb 2023 14:33:41 +0100 Subject: [PATCH 273/841] Fix special build --- src/Storages/Kafka/KafkaSource.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Storages/Kafka/KafkaSource.cpp b/src/Storages/Kafka/KafkaSource.cpp index 880935b8c8f..3c5253f7640 100644 --- a/src/Storages/Kafka/KafkaSource.cpp +++ b/src/Storages/Kafka/KafkaSource.cpp @@ -133,7 +133,7 @@ Chunk KafkaSource::generateImpl() { e.addMessage("while parsing Kafka message (topic: {}, partition: {}, offset: {})'", consumer->currentTopic(), consumer->currentPartition(), consumer->currentOffset()); - throw e; + throw std::move(e); } }; From bb7571427b8f94553886858d227a9d16318602ab Mon Sep 17 00:00:00 2001 From: alesapin Date: Tue, 28 Feb 2023 14:48:46 +0100 Subject: [PATCH 274/841] Fix bug in zero-copy replica disk choice during fetch --- src/Storages/MergeTree/DataPartsExchange.cpp | 24 +++++- .../test_zero_copy_fetch/__init__.py | 1 + .../configs/storage_conf.xml | 30 +++++++ .../integration/test_zero_copy_fetch/test.py | 86 +++++++++++++++++++ 4 files changed, 137 insertions(+), 4 deletions(-) create mode 100644 tests/integration/test_zero_copy_fetch/__init__.py create mode 100644 tests/integration/test_zero_copy_fetch/configs/storage_conf.xml create mode 100644 tests/integration/test_zero_copy_fetch/test.py diff --git a/src/Storages/MergeTree/DataPartsExchange.cpp b/src/Storages/MergeTree/DataPartsExchange.cpp index 7a38033a126..c6efe9c9589 100644 --- a/src/Storages/MergeTree/DataPartsExchange.cpp +++ b/src/Storages/MergeTree/DataPartsExchange.cpp @@ -173,6 +173,7 @@ void Service::processQuery(const HTMLForm & params, ReadBuffer & /*body*/, Write writeUUIDText(part->uuid, out); String remote_fs_metadata = parse(params.get("remote_fs_metadata", "")); + std::regex re("\\s*,\\s*"); Strings capability( std::sregex_token_iterator(remote_fs_metadata.begin(), remote_fs_metadata.end(), re, -1), @@ -477,6 +478,22 @@ MergeTreeData::MutableDataPartPtr Fetcher::fetchSelectedPart( int server_protocol_version = parse(in->getResponseCookie("server_protocol_version", "0")); + String remote_fs_metadata = parse(in->getResponseCookie("remote_fs_metadata", "")); + + DiskPtr preffered_disk = disk; + + if (!preffered_disk) + { + for (const auto & disk_candidate : data.getDisks()) + { + if (toString(disk_candidate->getDataSourceDescription().type) == remote_fs_metadata) + { + preffered_disk = disk_candidate; + break; + } + } + } + ReservationPtr reservation; size_t sum_files_size = 0; if (server_protocol_version >= REPLICATION_PROTOCOL_VERSION_WITH_PARTS_SIZE) @@ -496,11 +513,12 @@ MergeTreeData::MutableDataPartPtr Fetcher::fetchSelectedPart( LOG_TEST(log, "Disk for fetch is not provided, reserving space using storage balanced reservation"); reservation = data.balancedReservation(metadata_snapshot, sum_files_size, 0, part_name, part_info, {}, tagger_ptr, &ttl_infos, true); + if (!reservation) { LOG_TEST(log, "Disk for fetch is not provided, reserving space using TTL rules"); reservation - = data.reserveSpacePreferringTTLRules(metadata_snapshot, sum_files_size, ttl_infos, std::time(nullptr), 0, true); + = data.reserveSpacePreferringTTLRules(metadata_snapshot, sum_files_size, ttl_infos, std::time(nullptr), 0, true, preffered_disk); } } } @@ -525,7 +543,7 @@ MergeTreeData::MutableDataPartPtr Fetcher::fetchSelectedPart( if (!disk) { disk = reservation->getDisk(); - LOG_TRACE(log, "Disk for fetch is not provided, getting disk from reservation {} with type {}", disk->getName(), toString(disk->getDataSourceDescription().type)); + LOG_TRACE(log, "Disk for fetch is not provided, getting disk from reservation {} with type '{}'", disk->getName(), toString(disk->getDataSourceDescription().type)); } else { @@ -552,8 +570,6 @@ MergeTreeData::MutableDataPartPtr Fetcher::fetchSelectedPart( if (server_protocol_version >= REPLICATION_PROTOCOL_VERSION_WITH_PARTS_UUID) readUUIDText(part_uuid, *in); - String remote_fs_metadata = parse(in->getResponseCookie("remote_fs_metadata", "")); - size_t projections = 0; if (server_protocol_version >= REPLICATION_PROTOCOL_VERSION_WITH_PARTS_PROJECTION) readBinary(projections, *in); diff --git a/tests/integration/test_zero_copy_fetch/__init__.py b/tests/integration/test_zero_copy_fetch/__init__.py new file mode 100644 index 00000000000..e5a0d9b4834 --- /dev/null +++ b/tests/integration/test_zero_copy_fetch/__init__.py @@ -0,0 +1 @@ +#!/usr/bin/env python3 diff --git a/tests/integration/test_zero_copy_fetch/configs/storage_conf.xml b/tests/integration/test_zero_copy_fetch/configs/storage_conf.xml new file mode 100644 index 00000000000..257ae0a355c --- /dev/null +++ b/tests/integration/test_zero_copy_fetch/configs/storage_conf.xml @@ -0,0 +1,30 @@ + + + + + s3 + http://minio1:9001/root/data/ + minio + minio123 + + + + + + + default + +
+ s3 + False + True +
+
+
+
+
+ + + true + +
diff --git a/tests/integration/test_zero_copy_fetch/test.py b/tests/integration/test_zero_copy_fetch/test.py new file mode 100644 index 00000000000..cecea9301d3 --- /dev/null +++ b/tests/integration/test_zero_copy_fetch/test.py @@ -0,0 +1,86 @@ +#!/usr/bin/env python3 + +import logging +import random +import string +import time + +import pytest +from helpers.cluster import ClickHouseCluster + + +cluster = ClickHouseCluster(__file__) + +@pytest.fixture(scope="module") +def started_cluster(): + try: + + cluster.add_instance( + "node1", + main_configs=["configs/storage_conf.xml"], + with_minio=True, + with_zookeeper=True, + ) + cluster.add_instance( + "node2", + main_configs=["configs/storage_conf.xml"], + with_minio=True, + with_zookeeper=True, + ) + cluster.start() + + yield cluster + finally: + cluster.shutdown() + + +def test_fetch_correct_volume(started_cluster): + node1 = cluster.instances["node1"] + node2 = cluster.instances["node2"] + + node1.query(""" +CREATE TABLE test1 (EventDate Date, CounterID UInt32) +ENGINE = ReplicatedMergeTree('/clickhouse-tables/test1', 'r1') +PARTITION BY toMonday(EventDate) +ORDER BY (CounterID, EventDate) +SETTINGS index_granularity = 8192, storage_policy = 's3'""") + + node1.query("INSERT INTO test1 SELECT toDate('2023-01-01') + toIntervalDay(number), number + 1000 from system.numbers limit 20") + + def get_part_to_disk(query_result): + part_to_disk = {} + for row in query_result.strip().split('\n'): + print(row) + disk, part = row.split('\t') + part_to_disk[part] = disk + return part_to_disk + + + part_to_disk = get_part_to_disk(node1.query("SELECT disk_name, name FROM system.parts where table = 'test1' and active")) + for disk in part_to_disk.values(): + assert disk == "default" + + node1.query("ALTER TABLE test1 MOVE PARTITION '2022-12-26' TO DISK 's3'") + node1.query("ALTER TABLE test1 MOVE PARTITION '2023-01-02' TO DISK 's3'") + node1.query("ALTER TABLE test1 MOVE PARTITION '2023-01-09' TO DISK 's3'") + + part_to_disk = get_part_to_disk(node1.query("SELECT disk_name, name FROM system.parts where table = 'test1' and active")) + assert part_to_disk['20221226_0_0_0'] == "s3" + assert part_to_disk['20230102_0_0_0'] == "s3" + assert part_to_disk['20230109_0_0_0'] == "s3" + assert part_to_disk['20230116_0_0_0'] == "default" + + node2.query(""" +CREATE TABLE test1 (EventDate Date, CounterID UInt32) +ENGINE = ReplicatedMergeTree('/clickhouse-tables/test1', 'r2') +PARTITION BY toMonday(EventDate) +ORDER BY (CounterID, EventDate) +SETTINGS index_granularity = 8192, storage_policy = 's3'""") + + node2.query("SYSTEM SYNC REPLICA test1") + + part_to_disk = get_part_to_disk(node2.query("SELECT disk_name, name FROM system.parts where table = 'test1' and active")) + assert part_to_disk['20221226_0_0_0'] == "s3" + assert part_to_disk['20230102_0_0_0'] == "s3" + assert part_to_disk['20230109_0_0_0'] == "s3" + assert part_to_disk['20230116_0_0_0'] == "default" From ef58249115a0fb1aac2e060da9f3312caf8aa3c9 Mon Sep 17 00:00:00 2001 From: kssenii Date: Tue, 28 Feb 2023 14:51:02 +0100 Subject: [PATCH 275/841] Fix --- .../integration/test_merge_tree_azure_blob_storage/test.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/integration/test_merge_tree_azure_blob_storage/test.py b/tests/integration/test_merge_tree_azure_blob_storage/test.py index 6c1733fc72f..9e7e258fa83 100644 --- a/tests/integration/test_merge_tree_azure_blob_storage/test.py +++ b/tests/integration/test_merge_tree_azure_blob_storage/test.py @@ -96,8 +96,11 @@ def test_read_after_cache_is_wiped(cluster): node = cluster.instances[NODE_NAME] create_table(node, TABLE_NAME) - values = "('2021-11-13',3,'hello'),('2021-11-14',4,'heyo')" - + # We insert into different partitions, so do it separately to avoid + # test flakyness when retrying the query in case of retriable exception. + values = "('2021-11-13',3,'hello')" + azure_query(node, f"INSERT INTO {TABLE_NAME} VALUES {values}") + values = "('2021-11-14',4,'heyo')" azure_query(node, f"INSERT INTO {TABLE_NAME} VALUES {values}") # Wipe cache From 82be8eb468eb7a268754ee087ebafa8d31e7807b Mon Sep 17 00:00:00 2001 From: robot-clickhouse Date: Tue, 28 Feb 2023 13:56:14 +0000 Subject: [PATCH 276/841] Automatic style fix --- .../integration/test_zero_copy_fetch/test.py | 56 ++++++++++++------- 1 file changed, 37 insertions(+), 19 deletions(-) diff --git a/tests/integration/test_zero_copy_fetch/test.py b/tests/integration/test_zero_copy_fetch/test.py index cecea9301d3..f13eac5e9d1 100644 --- a/tests/integration/test_zero_copy_fetch/test.py +++ b/tests/integration/test_zero_copy_fetch/test.py @@ -11,6 +11,7 @@ from helpers.cluster import ClickHouseCluster cluster = ClickHouseCluster(__file__) + @pytest.fixture(scope="module") def started_cluster(): try: @@ -38,25 +39,32 @@ def test_fetch_correct_volume(started_cluster): node1 = cluster.instances["node1"] node2 = cluster.instances["node2"] - node1.query(""" + node1.query( + """ CREATE TABLE test1 (EventDate Date, CounterID UInt32) ENGINE = ReplicatedMergeTree('/clickhouse-tables/test1', 'r1') PARTITION BY toMonday(EventDate) ORDER BY (CounterID, EventDate) -SETTINGS index_granularity = 8192, storage_policy = 's3'""") +SETTINGS index_granularity = 8192, storage_policy = 's3'""" + ) - node1.query("INSERT INTO test1 SELECT toDate('2023-01-01') + toIntervalDay(number), number + 1000 from system.numbers limit 20") + node1.query( + "INSERT INTO test1 SELECT toDate('2023-01-01') + toIntervalDay(number), number + 1000 from system.numbers limit 20" + ) def get_part_to_disk(query_result): part_to_disk = {} - for row in query_result.strip().split('\n'): + for row in query_result.strip().split("\n"): print(row) - disk, part = row.split('\t') + disk, part = row.split("\t") part_to_disk[part] = disk return part_to_disk - - part_to_disk = get_part_to_disk(node1.query("SELECT disk_name, name FROM system.parts where table = 'test1' and active")) + part_to_disk = get_part_to_disk( + node1.query( + "SELECT disk_name, name FROM system.parts where table = 'test1' and active" + ) + ) for disk in part_to_disk.values(): assert disk == "default" @@ -64,23 +72,33 @@ SETTINGS index_granularity = 8192, storage_policy = 's3'""") node1.query("ALTER TABLE test1 MOVE PARTITION '2023-01-02' TO DISK 's3'") node1.query("ALTER TABLE test1 MOVE PARTITION '2023-01-09' TO DISK 's3'") - part_to_disk = get_part_to_disk(node1.query("SELECT disk_name, name FROM system.parts where table = 'test1' and active")) - assert part_to_disk['20221226_0_0_0'] == "s3" - assert part_to_disk['20230102_0_0_0'] == "s3" - assert part_to_disk['20230109_0_0_0'] == "s3" - assert part_to_disk['20230116_0_0_0'] == "default" + part_to_disk = get_part_to_disk( + node1.query( + "SELECT disk_name, name FROM system.parts where table = 'test1' and active" + ) + ) + assert part_to_disk["20221226_0_0_0"] == "s3" + assert part_to_disk["20230102_0_0_0"] == "s3" + assert part_to_disk["20230109_0_0_0"] == "s3" + assert part_to_disk["20230116_0_0_0"] == "default" - node2.query(""" + node2.query( + """ CREATE TABLE test1 (EventDate Date, CounterID UInt32) ENGINE = ReplicatedMergeTree('/clickhouse-tables/test1', 'r2') PARTITION BY toMonday(EventDate) ORDER BY (CounterID, EventDate) -SETTINGS index_granularity = 8192, storage_policy = 's3'""") +SETTINGS index_granularity = 8192, storage_policy = 's3'""" + ) node2.query("SYSTEM SYNC REPLICA test1") - part_to_disk = get_part_to_disk(node2.query("SELECT disk_name, name FROM system.parts where table = 'test1' and active")) - assert part_to_disk['20221226_0_0_0'] == "s3" - assert part_to_disk['20230102_0_0_0'] == "s3" - assert part_to_disk['20230109_0_0_0'] == "s3" - assert part_to_disk['20230116_0_0_0'] == "default" + part_to_disk = get_part_to_disk( + node2.query( + "SELECT disk_name, name FROM system.parts where table = 'test1' and active" + ) + ) + assert part_to_disk["20221226_0_0_0"] == "s3" + assert part_to_disk["20230102_0_0_0"] == "s3" + assert part_to_disk["20230109_0_0_0"] == "s3" + assert part_to_disk["20230116_0_0_0"] == "default" From 919122948f73d391e938f4bffcdaebdad3a7a256 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Tue, 28 Feb 2023 14:22:44 +0000 Subject: [PATCH 277/841] More fixes and add tests --- src/IO/ReadWriteBufferFromHTTP.h | 135 ++++++++++-------- .../test_storage_url/configs/conf.xml | 4 + tests/integration/test_storage_url/test.py | 26 ++++ 3 files changed, 104 insertions(+), 61 deletions(-) diff --git a/src/IO/ReadWriteBufferFromHTTP.h b/src/IO/ReadWriteBufferFromHTTP.h index 58abf4a6317..edf7b3f5f95 100644 --- a/src/IO/ReadWriteBufferFromHTTP.h +++ b/src/IO/ReadWriteBufferFromHTTP.h @@ -49,22 +49,18 @@ namespace ErrorCodes extern const int UNKNOWN_FILE_SIZE; } -template -class UpdatableSessionBase +template +class UpdatableSession { -protected: - SessionPtr session; - UInt64 redirects{0}; - Poco::URI initial_uri; - ConnectionTimeouts timeouts; - UInt64 max_redirects; - public: - virtual void buildNewSession(const Poco::URI & uri) = 0; + using SessionPtr = typename TSessionFactory::SessionType; - explicit UpdatableSessionBase(const Poco::URI uri, const ConnectionTimeouts & timeouts_, UInt64 max_redirects_) - : initial_uri{uri}, timeouts{timeouts_}, max_redirects{max_redirects_} + explicit UpdatableSession(const Poco::URI & uri, UInt64 max_redirects_, std::shared_ptr session_factory_) + : max_redirects{max_redirects_} + , initial_uri(uri) + , session_factory(std::move(session_factory_)) { + session = session_factory->buildNewSession(uri); } SessionPtr getSession() { return session; } @@ -73,16 +69,21 @@ public: { ++redirects; if (redirects <= max_redirects) - { - buildNewSession(uri); - } + session = session_factory->buildNewSession(uri); else - { throw Exception(ErrorCodes::TOO_MANY_REDIRECTS, "Too many redirects while trying to access {}", initial_uri.toString()); - } } - virtual ~UpdatableSessionBase() = default; + std::shared_ptr> clone(const Poco::URI & uri) + { + return std::make_shared>(uri, max_redirects, session_factory); + } +private: + SessionPtr session; + UInt64 redirects{0}; + UInt64 max_redirects; + Poco::URI initial_uri; + std::shared_ptr session_factory; }; @@ -147,7 +148,7 @@ namespace detail size_t getOffset() const { return getRangeBegin() + offset_from_begin_pos; } template - std::istream * callImpl(Poco::URI uri_, Poco::Net::HTTPResponse & response, const std::string & method_) + std::istream * callImpl(UpdatableSessionPtr & current_session, Poco::URI uri_, Poco::Net::HTTPResponse & response, const std::string & method_) { // With empty path poco will send "POST HTTP/1.1" its bug. if (uri_.getPath().empty()) @@ -156,7 +157,6 @@ namespace detail Poco::Net::HTTPRequest request(method_, uri_.getPathAndQuery(), Poco::Net::HTTPRequest::HTTP_1_1); request.setHost(uri_.getHost()); // use original, not resolved host name in header - if (out_stream_callback) request.setChunkedTransferEncoding(true); @@ -191,8 +191,7 @@ namespace detail LOG_TRACE(log, "Sending request to {}", uri_.toString()); - auto sess = session->getSession(); - + auto sess = current_session->getSession(); try { auto & stream_out = sess->sendRequest(request); @@ -200,11 +199,13 @@ namespace detail if (out_stream_callback) out_stream_callback(stream_out); - istr = receiveResponse(*sess, request, response, true); + auto result_istr = receiveResponse(*sess, request, response, true); response.getCookies(cookies); - content_encoding = response.get("Content-Encoding", ""); - return istr; + if constexpr (!use_initial_range) + content_encoding = response.get("Content-Encoding", ""); + + return result_istr; } catch (const Poco::Exception & e) { @@ -362,7 +363,7 @@ namespace detail non_retriable_errors.begin(), non_retriable_errors.end(), [&](const auto status) { return http_status != status; }); } - Poco::URI getUriAfterRedirect(const Poco::URI & prev_uri, Poco::Net::HTTPResponse & response) + static Poco::URI getUriAfterRedirect(const Poco::URI & prev_uri, Poco::Net::HTTPResponse & response) { auto location = response.get("Location"); auto location_uri = Poco::URI(location); @@ -379,7 +380,14 @@ namespace detail template void callWithRedirects(Poco::Net::HTTPResponse & response, const String & method_, bool throw_on_all_errors = false) { - call(response, method_, throw_on_all_errors); + UpdatableSessionPtr current_session = nullptr; + + if (use_initial_range) + current_session = session->clone(uri); + else + current_session = session; + + call(current_session, response, method_, throw_on_all_errors); Poco::URI prev_uri = uri; while (isRedirect(response.getStatus())) @@ -389,18 +397,22 @@ namespace detail if (remote_host_filter) remote_host_filter->checkURL(uri_redirect); - session->updateSession(uri_redirect); + current_session->updateSession(uri_redirect); - istr = callImpl(uri_redirect, response, method); + auto result_istr = callImpl(current_session, uri_redirect, response, method); + if (!use_initial_range) + istr = result_istr; } } template - void call(Poco::Net::HTTPResponse & response, const String & method_, bool throw_on_all_errors = false) + void call(UpdatableSessionPtr & current_session, Poco::Net::HTTPResponse & response, const String & method_, bool throw_on_all_errors = false) { try { - istr = callImpl(saved_uri_redirect ? *saved_uri_redirect : uri, response, method_); + auto result_istr = callImpl(current_session, saved_uri_redirect ? *saved_uri_redirect : uri, response, method_); + if (!use_initial_range) + istr = result_istr; } catch (...) { @@ -436,7 +448,7 @@ namespace detail { Poco::Net::HTTPResponse response; - call(response, method); + call(session, response, method); if (initialization_error != InitializeError::NONE) return; @@ -448,7 +460,7 @@ namespace detail session->updateSession(uri_redirect); - istr = callImpl(uri_redirect, response, method); + istr = callImpl(session, uri_redirect, response, method); saved_uri_redirect = uri_redirect; } @@ -731,23 +743,24 @@ namespace detail }; } -class UpdatableSession : public UpdatableSessionBase +class SessionFactory { - using Parent = UpdatableSessionBase; - public: - UpdatableSession(const Poco::URI uri, const ConnectionTimeouts & timeouts_, const UInt64 max_redirects_) - : Parent(uri, timeouts_, max_redirects_) - { - session = makeHTTPSession(initial_uri, timeouts); - } + explicit SessionFactory(const ConnectionTimeouts & timeouts_) + : timeouts(timeouts_) + {} - void buildNewSession(const Poco::URI & uri) override { session = makeHTTPSession(uri, timeouts); } + using SessionType = HTTPSessionPtr; + + SessionType buildNewSession(const Poco::URI & uri) { return makeHTTPSession(uri, timeouts); } +private: + ConnectionTimeouts timeouts; }; -class ReadWriteBufferFromHTTP : public detail::ReadWriteBufferFromHTTPBase> +class ReadWriteBufferFromHTTP : public detail::ReadWriteBufferFromHTTPBase>> { - using Parent = detail::ReadWriteBufferFromHTTPBase>; + using SessionType = UpdatableSession; + using Parent = detail::ReadWriteBufferFromHTTPBase>; public: ReadWriteBufferFromHTTP( @@ -766,7 +779,7 @@ public: bool use_external_buffer_ = false, bool skip_not_found_url_ = false) : Parent( - std::make_shared(uri_, timeouts, max_redirects), + std::make_shared(uri_, max_redirects, std::make_shared(timeouts)), uri_, credentials_, method_, @@ -878,27 +891,27 @@ private: bool skip_not_found_url; }; -class UpdatablePooledSession : public UpdatableSessionBase +class PooledSessionFactory { - using Parent = UpdatableSessionBase; - -private: - size_t per_endpoint_pool_size; - public: - explicit UpdatablePooledSession( - const Poco::URI uri, const ConnectionTimeouts & timeouts_, const UInt64 max_redirects_, size_t per_endpoint_pool_size_) - : Parent(uri, timeouts_, max_redirects_), per_endpoint_pool_size{per_endpoint_pool_size_} - { - session = makePooledHTTPSession(initial_uri, timeouts, per_endpoint_pool_size); - } + explicit PooledSessionFactory( + const ConnectionTimeouts & timeouts_, size_t per_endpoint_pool_size_) + : timeouts(timeouts_) + , per_endpoint_pool_size(per_endpoint_pool_size_) + {} - void buildNewSession(const Poco::URI & uri) override { session = makePooledHTTPSession(uri, timeouts, per_endpoint_pool_size); } + using SessionType = PooledHTTPSessionPtr; + + SessionType buildNewSession(const Poco::URI & uri) { return makePooledHTTPSession(uri, timeouts, per_endpoint_pool_size); } +private: + ConnectionTimeouts timeouts; + size_t per_endpoint_pool_size; }; -class PooledReadWriteBufferFromHTTP : public detail::ReadWriteBufferFromHTTPBase> +class PooledReadWriteBufferFromHTTP : public detail::ReadWriteBufferFromHTTPBase>> { - using Parent = detail::ReadWriteBufferFromHTTPBase>; + using SessionType = UpdatableSession; + using Parent = detail::ReadWriteBufferFromHTTPBase>; public: explicit PooledReadWriteBufferFromHTTP( @@ -911,7 +924,7 @@ public: const UInt64 max_redirects = 0, size_t max_connections_per_endpoint = DEFAULT_COUNT_OF_HTTP_CONNECTIONS_PER_ENDPOINT) : Parent( - std::make_shared(uri_, timeouts_, max_redirects, max_connections_per_endpoint), + std::make_shared(uri_, max_redirects, std::make_shared(timeouts_, max_connections_per_endpoint)), uri_, credentials_, method_, diff --git a/tests/integration/test_storage_url/configs/conf.xml b/tests/integration/test_storage_url/configs/conf.xml index 790752c5c04..a9a78f9de71 100644 --- a/tests/integration/test_storage_url/configs/conf.xml +++ b/tests/integration/test_storage_url/configs/conf.xml @@ -6,5 +6,9 @@ TSV column1 UInt32, column2 UInt32, column3 UInt32 + + PUT + column1 UInt32, column2 UInt32, column3 UInt32 + diff --git a/tests/integration/test_storage_url/test.py b/tests/integration/test_storage_url/test.py index 5591e63400c..570f54f354a 100644 --- a/tests/integration/test_storage_url/test.py +++ b/tests/integration/test_storage_url/test.py @@ -75,3 +75,29 @@ def test_table_function_url_access_rights(): ["c3", "Nullable(Int64)"], ] ) + + +@pytest.mark.parametrize("file_format", ["Parquet", "CSV", "TSV", "JSONEachRow"]) +def test_file_formats(file_format): + url = f"http://nginx:80/{file_format}_file" + + values = ', '.join([f"({i}, {i + 1}, {i + 2})" for i in range(100)]) + node1.query( + f"insert into table function url(url_file, url = '{url}', format = '{file_format}') values", + stdin=values + ) + + for download_threads in [1, 4, 16]: + result = node1.query( + f""" +SELECT * +FROM url('{url}', '{file_format}') +LIMIT 10 +SETTINGS remote_read_min_bytes_for_seek = 1, max_read_buffer_size = 1, max_download_buffer_size = 1, max_download_threads = {download_threads} +""") + + expected_result = "" + for i in range(10): + expected_result += f"{i}\t{i + 1}\t{i + 2}\n" + + assert result == expected_result From 3f2afa1fa0d81fd0631f16839a8312de656f1464 Mon Sep 17 00:00:00 2001 From: alesapin Date: Tue, 28 Feb 2023 15:28:17 +0100 Subject: [PATCH 278/841] Temporary enable force_sync for keeper in CI --- tests/config/config.d/keeper_port.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/config/config.d/keeper_port.xml b/tests/config/config.d/keeper_port.xml index cffd325e968..2066dedfa56 100644 --- a/tests/config/config.d/keeper_port.xml +++ b/tests/config/config.d/keeper_port.xml @@ -9,7 +9,8 @@ 10000 100000 10000 - false + + true 240000 1000000000000000 From 38d026ca6e627149eee5cd714be87a1b06a68b88 Mon Sep 17 00:00:00 2001 From: robot-clickhouse Date: Tue, 28 Feb 2023 14:29:24 +0000 Subject: [PATCH 279/841] Automatic style fix --- tests/integration/test_storage_url/test.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/integration/test_storage_url/test.py b/tests/integration/test_storage_url/test.py index 570f54f354a..f3ed087d3d0 100644 --- a/tests/integration/test_storage_url/test.py +++ b/tests/integration/test_storage_url/test.py @@ -81,10 +81,10 @@ def test_table_function_url_access_rights(): def test_file_formats(file_format): url = f"http://nginx:80/{file_format}_file" - values = ', '.join([f"({i}, {i + 1}, {i + 2})" for i in range(100)]) + values = ", ".join([f"({i}, {i + 1}, {i + 2})" for i in range(100)]) node1.query( - f"insert into table function url(url_file, url = '{url}', format = '{file_format}') values", - stdin=values + f"insert into table function url(url_file, url = '{url}', format = '{file_format}') values", + stdin=values, ) for download_threads in [1, 4, 16]: @@ -94,7 +94,8 @@ SELECT * FROM url('{url}', '{file_format}') LIMIT 10 SETTINGS remote_read_min_bytes_for_seek = 1, max_read_buffer_size = 1, max_download_buffer_size = 1, max_download_threads = {download_threads} -""") +""" + ) expected_result = "" for i in range(10): From 6bab9bcbf5c4c0c947c36643966db9d16a2c7171 Mon Sep 17 00:00:00 2001 From: flynn Date: Tue, 28 Feb 2023 14:31:37 +0000 Subject: [PATCH 280/841] fix test --- .../02164_clickhouse_local_interactive_exception.expect | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/queries/0_stateless/02164_clickhouse_local_interactive_exception.expect b/tests/queries/0_stateless/02164_clickhouse_local_interactive_exception.expect index 0c31efc02e9..57a2d1c432b 100755 --- a/tests/queries/0_stateless/02164_clickhouse_local_interactive_exception.expect +++ b/tests/queries/0_stateless/02164_clickhouse_local_interactive_exception.expect @@ -17,7 +17,7 @@ spawn bash -c "source $basedir/../shell_config.sh ; \$CLICKHOUSE_LOCAL --disabl expect ":) " send -- "insert into table function null() format TSV some trash here 123 \n 456\r" -expect "EMPTY_LIST_OF_COLUMNS_PASSED" +expect "CANNOT_PARSE_INPUT_ASSERTION_FAILED" expect ":) " send -- "" From 0286b43a73bf0a07fd4fbbfd2858ecb4f258468c Mon Sep 17 00:00:00 2001 From: Dan Roscigno Date: Tue, 28 Feb 2023 09:32:06 -0500 Subject: [PATCH 281/841] Fix 404 on approx nearest neighbor page closes https://github.com/ClickHouse/clickhouse-docs/issues/846 --- .../table-engines/mergetree-family/annindexes.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/en/engines/table-engines/mergetree-family/annindexes.md b/docs/en/engines/table-engines/mergetree-family/annindexes.md index e482926f400..f841f157376 100644 --- a/docs/en/engines/table-engines/mergetree-family/annindexes.md +++ b/docs/en/engines/table-engines/mergetree-family/annindexes.md @@ -1,6 +1,6 @@ # Approximate Nearest Neighbor Search Indexes [experimental] {#table_engines-ANNIndex} -The main task that indexes achieve is to quickly find nearest neighbors for multidimensional data. An example of such a problem can be finding similar pictures (texts) for a given picture (text). That problem can be reduced to finding the nearest [embeddings](https://cloud.google.com/architecture/overview-extracting-and-serving-feature-embeddings-for-machine-learning). They can be created from data using [UDF](../../../sql-reference/functions/index.md#executable-user-defined-functions). +The main task that indexes achieve is to quickly find nearest neighbors for multidimensional data. An example of such a problem can be finding similar pictures (texts) for a given picture (text). That problem can be reduced to finding the nearest [embeddings](https://cloud.google.com/architecture/overview-extracting-and-serving-feature-embeddings-for-machine-learning). They can be created from data using [UDF](/docs/en/sql-reference/functions/index.md/#executable-user-defined-functions). The next queries find the closest neighbors in N-dimensional space using the L2 (Euclidean) distance: ``` sql @@ -39,7 +39,7 @@ Approximate Nearest Neighbor Search Indexes (`ANNIndexes`) are similar to skip i LIMIT N ``` -In these queries, `DistanceFunction` is selected from [distance functions](../../../sql-reference/functions/distance-functions). `Point` is a known vector (something like `(0.1, 0.1, ... )`). To avoid writing large vectors, use [client parameters](../../../interfaces/cli.md#queries-with-parameters-cli-queries-with-parameters). `Value` - a float value that will bound the neighbourhood. +In these queries, `DistanceFunction` is selected from [distance functions](/docs/en/sql-reference/functions/distance-functions.md). `Point` is a known vector (something like `(0.1, 0.1, ... )`). To avoid writing large vectors, use [client parameters](/docs/en//interfaces/cli.md#queries-with-parameters-cli-queries-with-parameters). `Value` - a float value that will bound the neighbourhood. :::note ANN index can't speed up query that satisfies both types (`where + order by`, only one of them). All queries must have the limit, as algorithms are used to find nearest neighbors and need a specific number of them. @@ -85,13 +85,13 @@ As the indexes are built only during insertions into table, `INSERT` and `OPTIMI You can create your table with index which uses certain algorithm. Now only indices based on the following algorithms are supported: # Index list -- [Annoy](../../../engines/table-engines/mergetree-family/annindexes.md#annoy-annoy) +- [Annoy](/docs/en/engines/table-engines/mergetree-family/annindexes.md#annoy-annoy) # Annoy {#annoy} Implementation of the algorithm was taken from [this repository](https://github.com/spotify/annoy). Short description of the algorithm: -The algorithm recursively divides in half all space by random linear surfaces (lines in 2D, planes in 3D e.t.c.). Thus it makes tree of polyhedrons and points that they contains. Repeating the operation several times for greater accuracy it creates a forest. +The algorithm recursively divides in half all space by random linear surfaces (lines in 2D, planes in 3D etc.). Thus it makes tree of polyhedrons and points that they contains. Repeating the operation several times for greater accuracy it creates a forest. To find K Nearest Neighbours it goes down through the trees and fills the buffer of closest points using the priority queue of polyhedrons. Next, it sorts buffer and return the nearest K points. __Examples__: @@ -118,7 +118,7 @@ ORDER BY id; ``` :::note -Table with array field will work faster, but all arrays **must** have same length. Use [CONSTRAINT](../../../sql-reference/statements/create/table.md#constraints) to avoid errors. For example, `CONSTRAINT constraint_name_1 CHECK length(data) = 256`. +Table with array field will work faster, but all arrays **must** have same length. Use [CONSTRAINT](/docs/en/sql-reference/statements/create/table.md#constraints) to avoid errors. For example, `CONSTRAINT constraint_name_1 CHECK length(data) = 256`. ::: Parameter `NumTrees` is the number of trees which the algorithm will create. The bigger it is, the slower (approximately linear) it works (in both `CREATE` and `SELECT` requests), but the better accuracy you get (adjusted for randomness). By default it is set to `100`. Parameter `DistanceName` is name of distance function. By default it is set to `L2Distance`. It can be set without changing first parameter, for example From 620f3297fa8e1addfae6f3909400a32ac2de10ca Mon Sep 17 00:00:00 2001 From: Amos Bird Date: Tue, 28 Feb 2023 22:41:52 +0800 Subject: [PATCH 282/841] Simplify the LLVM build process --- contrib/llvm-project-cmake/CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/contrib/llvm-project-cmake/CMakeLists.txt b/contrib/llvm-project-cmake/CMakeLists.txt index 8759c16ac3e..fe6cffd33e2 100644 --- a/contrib/llvm-project-cmake/CMakeLists.txt +++ b/contrib/llvm-project-cmake/CMakeLists.txt @@ -98,6 +98,16 @@ set(LLVM_ENABLE_BINDINGS 0 CACHE INTERNAL "") set (LLVM_SOURCE_DIR "${ClickHouse_SOURCE_DIR}/contrib/llvm-project/llvm") set (LLVM_BINARY_DIR "${ClickHouse_BINARY_DIR}/contrib/llvm-project/llvm") + +# Since we always use toolchain files to generate hermatic builds, cmake will +# think it's a cross compilation, and LLVM will try to configure NATIVE LLVM +# targets with all tests enabled, which will slow down cmake configuration and +# compilation (You'll see Building native llvm-tblgen...). Let's disable the +# cross compiling indicator for now. +# +# TODO We should let cmake know whether it's indeed a cross compilation in the +# first place. +set (CMAKE_CROSSCOMPILING 0) add_subdirectory ("${LLVM_SOURCE_DIR}" "${LLVM_BINARY_DIR}") set_directory_properties (PROPERTIES From c996dfe56245971207c81ca2d62f197418847764 Mon Sep 17 00:00:00 2001 From: Amos Bird Date: Tue, 28 Feb 2023 22:43:49 +0800 Subject: [PATCH 283/841] do-while loop trivia --- .clang-tidy | 2 ++ src/QueryPipeline/RemoteQueryExecutor.cpp | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index e9451272681..4dd8b9859c9 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -209,3 +209,5 @@ CheckOptions: # Workaround clang-tidy bug: https://github.com/llvm/llvm-project/issues/46097 - key: readability-identifier-naming.TypeTemplateParameterIgnoredRegexp value: expr-type + - key: cppcoreguidelines-avoid-do-while.IgnoreMacros + value: true diff --git a/src/QueryPipeline/RemoteQueryExecutor.cpp b/src/QueryPipeline/RemoteQueryExecutor.cpp index 5c9995a418d..a10d70d22e9 100644 --- a/src/QueryPipeline/RemoteQueryExecutor.cpp +++ b/src/QueryPipeline/RemoteQueryExecutor.cpp @@ -322,7 +322,7 @@ RemoteQueryExecutor::ReadResult RemoteQueryExecutor::read(std::unique_ptr(*connections); } - do + while (true) { if (!read_context->resumeRoutine()) return ReadResult(Block()); @@ -349,7 +349,6 @@ RemoteQueryExecutor::ReadResult RemoteQueryExecutor::read(std::unique_ptr Date: Tue, 28 Feb 2023 22:45:33 +0800 Subject: [PATCH 284/841] Update flags --- CMakeLists.txt | 10 ++++++---- cmake/warnings.cmake | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b1ffbd54bb..cbb666b81c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -391,10 +391,12 @@ if (COMPILER_CLANG) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstrict-vtable-pointers") - # Set new experimental pass manager, it's a performance, build time and binary size win. - # Can be removed after https://reviews.llvm.org/D66490 merged and released to at least two versions of clang. - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexperimental-new-pass-manager") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexperimental-new-pass-manager") + if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16) + # Set new experimental pass manager, it's a performance, build time and binary size win. + # Can be removed after https://reviews.llvm.org/D66490 merged and released to at least two versions of clang. + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexperimental-new-pass-manager") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexperimental-new-pass-manager") + endif () # We cannot afford to use LTO when compiling unit tests, and it's not enough # to only supply -fno-lto at the final linking stage. So we disable it diff --git a/cmake/warnings.cmake b/cmake/warnings.cmake index 8364b0c2c08..5d116b199cf 100644 --- a/cmake/warnings.cmake +++ b/cmake/warnings.cmake @@ -45,6 +45,7 @@ if (COMPILER_CLANG) no_warning(weak-vtables) no_warning(thread-safety-negative) # experimental flag, too many false positives no_warning(enum-constexpr-conversion) # breaks magic-enum library in clang-16 + no_warning(unsafe-buffer-usage) # too aggressive # TODO Enable conversion, sign-conversion, double-promotion warnings. elseif (COMPILER_GCC) # Add compiler options only to c++ compiler From 57f451ad2d35f349a447efd845f719ede8ffdfc9 Mon Sep 17 00:00:00 2001 From: Dan Roscigno Date: Tue, 28 Feb 2023 09:47:32 -0500 Subject: [PATCH 285/841] Remove table from intro page The table was not kept up to date, removing as the list of table functions is in the nav. In the future the list will be auto generated below the intro material. Closes #46944 --- .../en/sql-reference/table-functions/index.md | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/docs/en/sql-reference/table-functions/index.md b/docs/en/sql-reference/table-functions/index.md index 94b23bc695c..b49c2f8da20 100644 --- a/docs/en/sql-reference/table-functions/index.md +++ b/docs/en/sql-reference/table-functions/index.md @@ -23,23 +23,3 @@ You can use table functions in: :::warning You can’t use table functions if the [allow_ddl](../../operations/settings/permissions-for-queries.md#settings_allow_ddl) setting is disabled. ::: - -| Function | Description | -|------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------| -| [file](../../sql-reference/table-functions/file.md) | Creates a [File](../../engines/table-engines/special/file.md)-engine table. | -| [merge](../../sql-reference/table-functions/merge.md) | Creates a [Merge](../../engines/table-engines/special/merge.md)-engine table. | -| [numbers](../../sql-reference/table-functions/numbers.md) | Creates a table with a single column filled with integer numbers. | -| [remote](../../sql-reference/table-functions/remote.md) | Allows you to access remote servers without creating a [Distributed](../../engines/table-engines/special/distributed.md)-engine table. | -| [url](../../sql-reference/table-functions/url.md) | Creates a [Url](../../engines/table-engines/special/url.md)-engine table. | -| [mysql](../../sql-reference/table-functions/mysql.md) | Creates a [MySQL](../../engines/table-engines/integrations/mysql.md)-engine table. | -| [postgresql](../../sql-reference/table-functions/postgresql.md) | Creates a [PostgreSQL](../../engines/table-engines/integrations/postgresql.md)-engine table. | -| [jdbc](../../sql-reference/table-functions/jdbc.md) | Creates a [JDBC](../../engines/table-engines/integrations/jdbc.md)-engine table. | -| [odbc](../../sql-reference/table-functions/odbc.md) | Creates a [ODBC](../../engines/table-engines/integrations/odbc.md)-engine table. | -| [hdfs](../../sql-reference/table-functions/hdfs.md) | Creates a [HDFS](../../engines/table-engines/integrations/hdfs.md)-engine table. | -| [s3](../../sql-reference/table-functions/s3.md) | Creates a [S3](../../engines/table-engines/integrations/s3.md)-engine table. | -| [sqlite](../../sql-reference/table-functions/sqlite.md) | Creates a [sqlite](../../engines/table-engines/integrations/sqlite.md)-engine table. | - -:::note -Only these table functions are enabled in readonly mode : -null, view, viewIfPermitted, numbers, numbers_mt, generateRandom, values, cluster, clusterAllReplicas -::: \ No newline at end of file From 45dc5dc25d2977409885bf4b14cb9c1847b5d48a Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Tue, 28 Feb 2023 15:11:21 +0000 Subject: [PATCH 286/841] No progress bar if no size --- src/Storages/StorageURL.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Storages/StorageURL.cpp b/src/Storages/StorageURL.cpp index 76817534da2..574f1abad3e 100644 --- a/src/Storages/StorageURL.cpp +++ b/src/Storages/StorageURL.cpp @@ -48,6 +48,7 @@ namespace ErrorCodes extern const int NETWORK_ERROR; extern const int BAD_ARGUMENTS; extern const int LOGICAL_ERROR; + extern const int UNKNOWN_FILE_SIZE; } static constexpr auto bad_arguments_error_message = "Storage URL requires 1-4 arguments: " @@ -219,7 +220,15 @@ namespace uri_options.size() == 1, download_threads); - total_size += getFileSizeFromReadBuffer(*read_buf); + try + { + total_size += getFileSizeFromReadBuffer(*read_buf); + } + catch (const Exception & e) + { + if (e.code() != ErrorCodes::UNKNOWN_FILE_SIZE) + throw; + } auto input_format = FormatFactory::instance().getInput(format, *read_buf, sample_block, context, max_block_size, format_settings); From 7099e76cc343e737210c10097031d7d183accb0c Mon Sep 17 00:00:00 2001 From: Dan Roscigno Date: Tue, 28 Feb 2023 10:47:51 -0500 Subject: [PATCH 287/841] Remove extra `]` closes #46172 --- docs/en/sql-reference/statements/create/table.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/sql-reference/statements/create/table.md b/docs/en/sql-reference/statements/create/table.md index 9e66afba613..bc8e5680e9f 100644 --- a/docs/en/sql-reference/statements/create/table.md +++ b/docs/en/sql-reference/statements/create/table.md @@ -267,7 +267,7 @@ You can define a [primary key](../../../engines/table-engines/mergetree-family/m CREATE TABLE db.table_name ( name1 type1, name2 type2, ..., - PRIMARY KEY(expr1[, expr2,...])] + PRIMARY KEY(expr1[, expr2,...]) ) ENGINE = engine; ``` From d953baa7e359bf768cabc4d7bab799eec8a56ce0 Mon Sep 17 00:00:00 2001 From: Dmitry Novik Date: Tue, 28 Feb 2023 16:12:51 +0000 Subject: [PATCH 288/841] Review improvements + fixup --- src/Analyzer/Passes/QueryAnalysisPass.cpp | 60 +++++++++++------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/src/Analyzer/Passes/QueryAnalysisPass.cpp b/src/Analyzer/Passes/QueryAnalysisPass.cpp index 78291d29908..24e94f095e3 100644 --- a/src/Analyzer/Passes/QueryAnalysisPass.cpp +++ b/src/Analyzer/Passes/QueryAnalysisPass.cpp @@ -445,6 +445,12 @@ public: alias_name_to_expressions[node_alias].push_back(node); } + if (const auto * function = node->as()) + { + if (AggregateFunctionFactory::instance().isAggregateFunctionName(function->getFunctionName())) + ++aggregate_functions_counter; + } + expressions.emplace_back(node); } @@ -463,6 +469,12 @@ public: alias_name_to_expressions.erase(it); } + if (const auto * function = top_expression->as()) + { + if (AggregateFunctionFactory::instance().isAggregateFunctionName(function->getFunctionName())) + --aggregate_functions_counter; + } + expressions.pop_back(); } @@ -483,17 +495,7 @@ public: bool hasAggregateFunction() const { - const auto & factory = AggregateFunctionFactory::instance(); - for (const auto & node : expressions) - { - const auto * function = node->as(); - if (!function) - continue; - - if (factory.isAggregateFunctionName(function->getFunctionName())) - return true; - } - return false; + return aggregate_functions_counter > 0; } QueryTreeNodePtr getExpressionWithAlias(const std::string & alias) const @@ -542,6 +544,7 @@ public: private: QueryTreeNodes expressions; + size_t aggregate_functions_counter = 0; std::unordered_map alias_name_to_expressions; }; @@ -3114,11 +3117,6 @@ IdentifierResolveResult QueryAnalyzer::tryResolveIdentifier(const IdentifierLook resolve_result.resolve_place = IdentifierResolvePlace::DATABASE_CATALOG; } - if (resolve_result.resolved_identifier - && scope.nullable_group_by_keys.contains(resolve_result.resolved_identifier) - && !scope.expressions_in_resolve_process_stack.hasAggregateFunction()) - resolve_result.resolved_identifier->convertToNullable(); - it->second = resolve_result; /** If identifier was not resolved, or during expression resolution identifier was explicitly added into non cached set, @@ -3126,8 +3124,7 @@ IdentifierResolveResult QueryAnalyzer::tryResolveIdentifier(const IdentifierLook */ if (!resolve_result.resolved_identifier || scope.non_cached_identifier_lookups_during_expression_resolve.contains(identifier_lookup) || - !scope.use_identifier_lookup_to_result_cache || - scope.group_by_use_nulls) + !scope.use_identifier_lookup_to_result_cache) scope.identifier_lookup_to_result.erase(it); return resolve_result; @@ -4655,8 +4652,6 @@ ProjectionNames QueryAnalyzer::resolveFunction(QueryTreeNodePtr & node, Identifi } function_node.resolveAsFunction(std::move(function_base)); - if (scope.group_by_use_nulls && scope.nullable_group_by_keys.contains(node)) - function_node.convertToNullable(); } catch (Exception & e) { @@ -4905,12 +4900,6 @@ ProjectionNames QueryAnalyzer::resolveExpressionNode(QueryTreeNodePtr & node, Id if (result_projection_names.empty()) result_projection_names.push_back(column_node.getColumnName()); - if (scope.group_by_use_nulls && scope.nullable_group_by_keys.contains(node)) - { - node = node->clone(); - node->convertToNullable(); - } - break; } case QueryTreeNodeType::FUNCTION: @@ -4994,6 +4983,14 @@ ProjectionNames QueryAnalyzer::resolveExpressionNode(QueryTreeNodePtr & node, Id } } + if (node + && scope.nullable_group_by_keys.contains(node) + && !scope.expressions_in_resolve_process_stack.hasAggregateFunction()) + { + node = node->clone(); + node->convertToNullable(); + } + /** Update aliases after expression node was resolved. * Do not update node in alias table if we resolve it for duplicate alias. */ @@ -6074,10 +6071,13 @@ void QueryAnalyzer::resolveQuery(const QueryTreeNodePtr & query_node, Identifier resolveExpressionNodeList(grouping_sets_keys_list_node, scope, false /*allow_lambda_expression*/, false /*allow_table_expression*/); } - for (const auto & grouping_set : query_node_typed.getGroupBy().getNodes()) + if (scope.group_by_use_nulls) { - for (const auto & group_by_elem : grouping_set->as()->getNodes()) - scope.nullable_group_by_keys.insert(group_by_elem->clone()); + for (const auto & grouping_set : query_node_typed.getGroupBy().getNodes()) + { + for (const auto & group_by_elem : grouping_set->as()->getNodes()) + scope.nullable_group_by_keys.insert(group_by_elem); + } } } else @@ -6090,7 +6090,7 @@ void QueryAnalyzer::resolveQuery(const QueryTreeNodePtr & query_node, Identifier if (scope.group_by_use_nulls) { for (const auto & group_by_elem : query_node_typed.getGroupBy().getNodes()) - scope.nullable_group_by_keys.insert(group_by_elem->clone()); + scope.nullable_group_by_keys.insert(group_by_elem); } } } From 4e0a4e56c959f490d5f1f943e349c8b8b6d49ce4 Mon Sep 17 00:00:00 2001 From: Kruglov Pavel <48961922+Avogar@users.noreply.github.com> Date: Tue, 28 Feb 2023 17:45:04 +0100 Subject: [PATCH 289/841] Add upgrade check to stateful dependent field --- docker/images.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/images.json b/docker/images.json index fcf28a2842d..508138d79af 100644 --- a/docker/images.json +++ b/docker/images.json @@ -43,7 +43,8 @@ "docker/test/stateful": { "name": "clickhouse/stateful-test", "dependent": [ - "docker/test/stress" + "docker/test/stress", + "docker/test/upgrade" ] }, "docker/test/unit": { From abd6500ee3f6fe3afd6d6022fefb4e853561799b Mon Sep 17 00:00:00 2001 From: alesapin Date: Tue, 28 Feb 2023 17:49:16 +0100 Subject: [PATCH 290/841] Better exception message when move was unseccessful --- src/Storages/MergeTree/MergeTreeData.cpp | 42 +++++++++++++++----- src/Storages/MergeTree/MergeTreeData.h | 4 +- src/Storages/MergeTree/MergeTreePartsMover.h | 7 ++++ 3 files changed, 40 insertions(+), 13 deletions(-) diff --git a/src/Storages/MergeTree/MergeTreeData.cpp b/src/Storages/MergeTree/MergeTreeData.cpp index e36ab125f97..5e26b79ec4a 100644 --- a/src/Storages/MergeTree/MergeTreeData.cpp +++ b/src/Storages/MergeTree/MergeTreeData.cpp @@ -4603,8 +4603,18 @@ void MergeTreeData::movePartitionToDisk(const ASTPtr & partition, const String & throw Exception(ErrorCodes::UNKNOWN_DISK, "All parts of partition '{}' are already on disk '{}'", partition_id, disk->getName()); } - if (!movePartsToSpace(parts, std::static_pointer_cast(disk))) - throw Exception(ErrorCodes::ABORTED, "Cannot move parts because moves are manually disabled"); + MovePartsOutcome moves_outcome = movePartsToSpace(parts, std::static_pointer_cast(disk)); + switch (moves_outcome) + { + case MovePartsOutcome::MovesAreCancelled: + throw Exception(ErrorCodes::ABORTED, "Cannot move parts because moves are manually disabled"); + case MovePartsOutcome::NothingToMove: + throw Exception(ErrorCodes::NO_SUCH_DATA_PART, "No parts to move found in partition {}", partition_id); + case MovePartsOutcome::MoveWasPostponedBecauseOfZeroCopy: + throw Exception(ErrorCodes::PART_IS_TEMPORARILY_LOCKED, "Move was not finished, because zero copy mode enabled and someone other moving the same parts right now"); + default: + break; + } } @@ -4656,8 +4666,18 @@ void MergeTreeData::movePartitionToVolume(const ASTPtr & partition, const String throw Exception(ErrorCodes::UNKNOWN_DISK, "All parts of partition '{}' are already on volume '{}'", partition_id, volume->getName()); } - if (!movePartsToSpace(parts, std::static_pointer_cast(volume))) - throw Exception(ErrorCodes::ABORTED, "Cannot move parts because moves are manually disabled"); + MovePartsOutcome moves_outcome = movePartsToSpace(parts, std::static_pointer_cast(volume)); + switch (moves_outcome) + { + case MovePartsOutcome::MovesAreCancelled: + throw Exception(ErrorCodes::ABORTED, "Cannot move parts because moves are manually disabled"); + case MovePartsOutcome::NothingToMove: + throw Exception(ErrorCodes::NO_SUCH_DATA_PART, "No parts to move found in partition {}", partition_id); + case MovePartsOutcome::MoveWasPostponedBecauseOfZeroCopy: + throw Exception(ErrorCodes::PART_IS_TEMPORARILY_LOCKED, "Move was not finished, because zero copy mode enabled and someone other moving the same parts right now"); + default: + break; + } } void MergeTreeData::movePartitionToShard(const ASTPtr & /*partition*/, bool /*move_part*/, const String & /*to*/, ContextPtr /*query_context*/) @@ -7442,7 +7462,7 @@ bool MergeTreeData::scheduleDataMovingJob(BackgroundJobsAssignee & assignee) assignee.scheduleMoveTask(std::make_shared( [this, moving_tagger] () mutable { - return moveParts(moving_tagger); + return moveParts(moving_tagger) == MovePartsOutcome::PartsMoved; }, moves_assignee_trigger, getStorageID())); return true; } @@ -7457,14 +7477,14 @@ bool MergeTreeData::areBackgroundMovesNeeded() const return policy->getVolumes().size() == 1 && policy->getVolumes()[0]->getDisks().size() > 1; } -bool MergeTreeData::movePartsToSpace(const DataPartsVector & parts, SpacePtr space) +MovePartsOutcome MergeTreeData::movePartsToSpace(const DataPartsVector & parts, SpacePtr space) { if (parts_mover.moves_blocker.isCancelled()) - return false; + return MovePartsOutcome::MovesAreCancelled; auto moving_tagger = checkPartsForMove(parts, space); if (moving_tagger->parts_to_move.empty()) - return false; + return MovePartsOutcome::NothingToMove; return moveParts(moving_tagger); } @@ -7521,13 +7541,13 @@ MergeTreeData::CurrentlyMovingPartsTaggerPtr MergeTreeData::checkPartsForMove(co return std::make_shared(std::move(parts_to_move), *this); } -bool MergeTreeData::moveParts(const CurrentlyMovingPartsTaggerPtr & moving_tagger) +MovePartsOutcome MergeTreeData::moveParts(const CurrentlyMovingPartsTaggerPtr & moving_tagger) { LOG_INFO(log, "Got {} parts to move.", moving_tagger->parts_to_move.size()); const auto settings = getSettings(); - bool result = true; + MovePartsOutcome result{MovePartsOutcome::PartsMoved}; for (const auto & moving_part : moving_tagger->parts_to_move) { Stopwatch stopwatch; @@ -7583,7 +7603,7 @@ bool MergeTreeData::moveParts(const CurrentlyMovingPartsTaggerPtr & moving_tagge { /// Move will be retried but with backoff. LOG_DEBUG(log, "Move of part {} postponed, because zero copy mode enabled and someone other moving this part right now", moving_part.part->name); - result = false; + result = MovePartsOutcome::MoveWasPostponedBecauseOfZeroCopy; continue; } } diff --git a/src/Storages/MergeTree/MergeTreeData.h b/src/Storages/MergeTree/MergeTreeData.h index faee69b137f..f7fa4f192cc 100644 --- a/src/Storages/MergeTree/MergeTreeData.h +++ b/src/Storages/MergeTree/MergeTreeData.h @@ -1315,7 +1315,7 @@ protected: /// MergeTree because they store mutations in different way. virtual MutationCommands getFirstAlterMutationCommandsForPart(const DataPartPtr & part) const = 0; /// Moves part to specified space, used in ALTER ... MOVE ... queries - bool movePartsToSpace(const DataPartsVector & parts, SpacePtr space); + MovePartsOutcome movePartsToSpace(const DataPartsVector & parts, SpacePtr space); /// Makes backup entries to backup the parts of this table. BackupEntries backupParts(const DataPartsVector & data_parts, const String & data_path_in_backup, const ContextPtr & local_context); @@ -1456,7 +1456,7 @@ private: using CurrentlyMovingPartsTaggerPtr = std::shared_ptr; /// Move selected parts to corresponding disks - bool moveParts(const CurrentlyMovingPartsTaggerPtr & moving_tagger); + MovePartsOutcome moveParts(const CurrentlyMovingPartsTaggerPtr & moving_tagger); /// Select parts for move and disks for them. Used in background moving processes. CurrentlyMovingPartsTaggerPtr selectPartsForMove(); diff --git a/src/Storages/MergeTree/MergeTreePartsMover.h b/src/Storages/MergeTree/MergeTreePartsMover.h index dfb4bb954d7..1cee98bcba9 100644 --- a/src/Storages/MergeTree/MergeTreePartsMover.h +++ b/src/Storages/MergeTree/MergeTreePartsMover.h @@ -11,6 +11,13 @@ namespace DB { +enum class MovePartsOutcome +{ + PartsMoved, + NothingToMove, + MovesAreCancelled, + MoveWasPostponedBecauseOfZeroCopy, +}; /// Active part from storage and destination reservation where it has to be moved struct MergeTreeMoveEntry From c0f28ace511e216def547a200c6a96e931d6504a Mon Sep 17 00:00:00 2001 From: alesapin Date: Tue, 28 Feb 2023 17:52:21 +0100 Subject: [PATCH 291/841] Better --- src/Storages/MergeTree/MergeTreeData.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Storages/MergeTree/MergeTreeData.cpp b/src/Storages/MergeTree/MergeTreeData.cpp index 5e26b79ec4a..b60dda46e9b 100644 --- a/src/Storages/MergeTree/MergeTreeData.cpp +++ b/src/Storages/MergeTree/MergeTreeData.cpp @@ -4612,7 +4612,7 @@ void MergeTreeData::movePartitionToDisk(const ASTPtr & partition, const String & throw Exception(ErrorCodes::NO_SUCH_DATA_PART, "No parts to move found in partition {}", partition_id); case MovePartsOutcome::MoveWasPostponedBecauseOfZeroCopy: throw Exception(ErrorCodes::PART_IS_TEMPORARILY_LOCKED, "Move was not finished, because zero copy mode enabled and someone other moving the same parts right now"); - default: + case MovePartsOutcome::PartsMoved: break; } } @@ -4675,7 +4675,7 @@ void MergeTreeData::movePartitionToVolume(const ASTPtr & partition, const String throw Exception(ErrorCodes::NO_SUCH_DATA_PART, "No parts to move found in partition {}", partition_id); case MovePartsOutcome::MoveWasPostponedBecauseOfZeroCopy: throw Exception(ErrorCodes::PART_IS_TEMPORARILY_LOCKED, "Move was not finished, because zero copy mode enabled and someone other moving the same parts right now"); - default: + case MovePartsOutcome::PartsMoved: break; } } From 3bc2e84a2ae2c07535f608df983143dfc1a2cf7a Mon Sep 17 00:00:00 2001 From: Mike Kot Date: Tue, 28 Feb 2023 14:22:57 +0300 Subject: [PATCH 292/841] Test tags section stub --- docs/en/development/tests.md | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/docs/en/development/tests.md b/docs/en/development/tests.md index 28aee32c717..0fbd08db72f 100644 --- a/docs/en/development/tests.md +++ b/docs/en/development/tests.md @@ -39,12 +39,44 @@ To add new test, create a `.sql` or `.sh` file in `queries/0_stateless` director Tests should use (create, drop, etc) only tables in `test` database that is assumed to be created beforehand; also tests can use temporary tables. +### Restricting test runs + +A test can have one or more _test tags_ specifying restrictions for test runs. + +For `.sh` tests tags are placed in `.sh` files as comments, example: + +```bash +#!/usr/bin/env bash +# Tags: no-fasttest +``` + +For `.sql` tests tags are placed as SQL comments, example: + +```sql +-- Tags: no-fasttest +SELECT 1 +``` + +|Tag name | What it does | Usage example | +|---|---|---| +| `no-fasttest`| Test is not run under [Fast test](continuous-integration#fast-test) | Test uses MySQL table engine which is disabled in Fast test| +| `zookeeper` | Test requires Zookeeper or ClickHouse Keeper to run || +| `long` | Test's execution time is extended to 10 minutes || +| `no-replicated-database` ||| +| `no-parallel` ||| +| `distributed` ||| +| `no-random-settings` ||| +| `no-backward-compatibility-check` ||| +| `no-cpu-x86_64` ||| +| `no-cpu-aarch64` ||| + +In addition to the above settings, you can use `USE_*` flags from `system.build_options` to define usage of particular ClickHouse features. +For example, if your test uses a MySQL table, you should add a tag `use-mysql`. + ### Choosing the Test Name The name of the test starts with a five-digit prefix followed by a descriptive name, such as `00422_hash_function_constexpr.sql`. To choose the prefix, find the largest prefix already present in the directory, and increment it by one. In the meantime, some other tests might be added with the same numeric prefix, but this is OK and does not lead to any problems, you don't have to change it later. -Some tests are marked with `zookeeper`, `shard` or `long` in their names. `zookeeper` is for tests that are using ZooKeeper. `shard` is for tests that requires server to listen `127.0.0.*`; `distributed` or `global` have the same meaning. `long` is for tests that run slightly longer that one second. You can disable these groups of tests using `--no-zookeeper`, `--no-shard` and `--no-long` options, respectively. Make sure to add a proper prefix to your test name if it needs ZooKeeper or distributed queries. - ### Checking for an Error that Must Occur Sometimes you want to test that a server error occurs for an incorrect query. We support special annotations for this in SQL tests, in the following form: From 8c55ce8d72d7d0dee993943107bf9f7257ca6f63 Mon Sep 17 00:00:00 2001 From: Dan Roscigno Date: Tue, 28 Feb 2023 12:07:11 -0500 Subject: [PATCH 293/841] Correct return vals closes #43145 --- .../sql-reference/aggregate-functions/reference/covarsamp.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/sql-reference/aggregate-functions/reference/covarsamp.md b/docs/en/sql-reference/aggregate-functions/reference/covarsamp.md index 4d29e6f1272..bdcc6c0e3d0 100644 --- a/docs/en/sql-reference/aggregate-functions/reference/covarsamp.md +++ b/docs/en/sql-reference/aggregate-functions/reference/covarsamp.md @@ -7,8 +7,8 @@ sidebar_position: 37 Calculates the value of `Σ((x - x̅)(y - y̅)) / (n - 1)`. -Returns Float64. When `n <= 1`, returns +∞. +Returns Float64. When `n <= 1`, returns `nan`. :::note This function uses a numerically unstable algorithm. If you need [numerical stability](https://en.wikipedia.org/wiki/Numerical_stability) in calculations, use the `covarSampStable` function. It works slower but provides a lower computational error. -::: \ No newline at end of file +::: From f53b65a7cc2568d1c4b6850d1e57a88f94dc51ea Mon Sep 17 00:00:00 2001 From: artem-yadr <84010375+artem-yadr@users.noreply.github.com> Date: Tue, 28 Feb 2023 21:01:03 +0300 Subject: [PATCH 294/841] small fix --- base/poco/MongoDB/include/Poco/MongoDB/Connection.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/poco/MongoDB/include/Poco/MongoDB/Connection.h b/base/poco/MongoDB/include/Poco/MongoDB/Connection.h index 5c5f6f76638..dcb813b75bc 100644 --- a/base/poco/MongoDB/include/Poco/MongoDB/Connection.h +++ b/base/poco/MongoDB/include/Poco/MongoDB/Connection.h @@ -162,7 +162,7 @@ namespace MongoDB { return _address; } - inline std::string Connection::uri() const + inline const std::string & Connection::uri() const { return _uri; } From 9a48539fbef4b4048923cfeb7f8bdda88652ea6c Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Tue, 28 Feb 2023 20:20:04 +0100 Subject: [PATCH 295/841] Rebuild stateful tests image --- docker/test/stateful/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/test/stateful/Dockerfile b/docker/test/stateful/Dockerfile index b67a638188c..71a2e92e3a8 100644 --- a/docker/test/stateful/Dockerfile +++ b/docker/test/stateful/Dockerfile @@ -1,4 +1,4 @@ -# rebuild in #33610 +# rebuild in #47031 # docker build -t clickhouse/stateful-test . ARG FROM_TAG=latest FROM clickhouse/stateless-test:$FROM_TAG From a6ba6f2cd6270ac89672344e6e207aeaccdf9455 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Tue, 28 Feb 2023 20:08:29 +0000 Subject: [PATCH 296/841] Update tests --- .../0_stateless/01455_opentelemetry_distributed.reference | 4 +++- tests/queries/0_stateless/02205_HTTP_user_agent.python | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/queries/0_stateless/01455_opentelemetry_distributed.reference b/tests/queries/0_stateless/01455_opentelemetry_distributed.reference index d48b3738bc2..9cfda01a690 100644 --- a/tests/queries/0_stateless/01455_opentelemetry_distributed.reference +++ b/tests/queries/0_stateless/01455_opentelemetry_distributed.reference @@ -12,10 +12,12 @@ {"query":"select * from url('http:\/\/127.0.0.2:8123\/?query=select%201%20format%20Null', CSV, 'a int')","status":"QueryFinish","tracestate":"another custom state","sorted_by_start_time":1} {"query":"select 1 format Null\n","status":"QueryFinish","tracestate":"another custom state","sorted_by_start_time":1} {"query":"select 1 format Null\n","status":"QueryFinish","tracestate":"another custom state","sorted_by_start_time":1} +{"query":"select 1 format Null\n","status":"QueryFinish","tracestate":"another custom state","sorted_by_start_time":1} +{"query":"select 1 format Null\n","query_status":"QueryFinish","tracestate":"another custom state","sorted_by_finish_time":1} {"query":"select 1 format Null\n","query_status":"QueryFinish","tracestate":"another custom state","sorted_by_finish_time":1} {"query":"select 1 format Null\n","query_status":"QueryFinish","tracestate":"another custom state","sorted_by_finish_time":1} {"query":"select * from url('http:\/\/127.0.0.2:8123\/?query=select%201%20format%20Null', CSV, 'a int')","query_status":"QueryFinish","tracestate":"another custom state","sorted_by_finish_time":1} -{"total spans":"3","unique spans":"3","unique non-zero parent spans":"3"} +{"total spans":"4","unique spans":"4","unique non-zero parent spans":"4"} {"initial query spans with proper parent":"1"} {"unique non-empty tracestate values":"1"} ===sampled=== diff --git a/tests/queries/0_stateless/02205_HTTP_user_agent.python b/tests/queries/0_stateless/02205_HTTP_user_agent.python index 397e06cbe82..0d3a563c094 100644 --- a/tests/queries/0_stateless/02205_HTTP_user_agent.python +++ b/tests/queries/0_stateless/02205_HTTP_user_agent.python @@ -125,7 +125,7 @@ def test_select(): def main(): # HEAD + GET - t = start_server(2) + t = start_server(3) t.start() test_select() t.join() From 7c6e7622d83dc1812cd8b035b98e441daf3db04d Mon Sep 17 00:00:00 2001 From: Dan Roscigno Date: Tue, 28 Feb 2023 15:38:31 -0500 Subject: [PATCH 297/841] docs: sample settings profile and assign to a user closes https://github.com/ClickHouse/ClickHouse/issues/12311 --- .../sql-reference/statements/create/settings-profile.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/en/sql-reference/statements/create/settings-profile.md b/docs/en/sql-reference/statements/create/settings-profile.md index c4ca89f3284..c2424ff6046 100644 --- a/docs/en/sql-reference/statements/create/settings-profile.md +++ b/docs/en/sql-reference/statements/create/settings-profile.md @@ -19,8 +19,15 @@ CREATE SETTINGS PROFILE [IF NOT EXISTS | OR REPLACE] name1 [ON CLUSTER cluster_n ## Example +Create a user: +```sql +CREATE USER robin IDENTIFIED BY 'password'; +``` + Create the `max_memory_usage_profile` settings profile with value and constraints for the `max_memory_usage` setting and assign it to user `robin`: ``` sql -CREATE SETTINGS PROFILE max_memory_usage_profile SETTINGS max_memory_usage = 100000001 MIN 90000000 MAX 110000000 TO robin +CREATE +SETTINGS PROFILE max_memory_usage_profile SETTINGS max_memory_usage = 100000001 MIN 90000000 MAX 110000000 +TO robin ``` From 3f892e52abaf1791b6f1dbe27b3ed6ddad20e7f1 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sun, 22 Jan 2023 13:20:38 +0100 Subject: [PATCH 298/841] Revert "Revert "Merge pull request #44922 from azat/dist/async-INSERT-metrics"" This is the revert of revert since there will be follow up patches to address the issues. This reverts commit a55798626a491139d84692a3c546f27cdde71665. --- src/Storages/Distributed/DirectoryMonitor.cpp | 298 +++++++++--------- src/Storages/Distributed/DirectoryMonitor.h | 27 +- src/Storages/Distributed/DistributedSink.cpp | 20 +- src/Storages/StorageDistributed.cpp | 14 +- src/Storages/StorageDistributed.h | 2 +- ..._INSERT_block_structure_mismatch.reference | 4 +- 6 files changed, 190 insertions(+), 175 deletions(-) diff --git a/src/Storages/Distributed/DirectoryMonitor.cpp b/src/Storages/Distributed/DirectoryMonitor.cpp index cb6659e59ce..f2a3471d839 100644 --- a/src/Storages/Distributed/DirectoryMonitor.cpp +++ b/src/Storages/Distributed/DirectoryMonitor.cpp @@ -59,6 +59,7 @@ namespace ErrorCodes extern const int TOO_MANY_PARTITIONS; extern const int DISTRIBUTED_TOO_MANY_PENDING_BYTES; extern const int ARGUMENT_OUT_OF_BOUND; + extern const int LOGICAL_ERROR; } @@ -363,18 +364,22 @@ StorageDistributedDirectoryMonitor::StorageDistributedDirectoryMonitor( const std::string & relative_path_, ConnectionPoolPtr pool_, ActionBlocker & monitor_blocker_, - BackgroundSchedulePool & bg_pool) + BackgroundSchedulePool & bg_pool, + bool initialize_from_disk) : storage(storage_) , pool(std::move(pool_)) , disk(disk_) , relative_path(relative_path_) , path(fs::path(disk->getPath()) / relative_path / "") + , broken_relative_path(fs::path(relative_path) / "broken") + , broken_path(fs::path(path) / "broken" / "") , should_batch_inserts(storage.getDistributedSettingsRef().monitor_batch_inserts) , split_batch_on_failure(storage.getDistributedSettingsRef().monitor_split_batch_on_failure) , dir_fsync(storage.getDistributedSettingsRef().fsync_directories) , min_batched_block_size_rows(storage.getContext()->getSettingsRef().min_insert_block_size_rows) , min_batched_block_size_bytes(storage.getContext()->getSettingsRef().min_insert_block_size_bytes) , current_batch_file_path(path + "current_batch.txt") + , pending_files(std::numeric_limits::max()) , default_sleep_time(storage.getDistributedSettingsRef().monitor_sleep_time_ms.totalMilliseconds()) , sleep_time(default_sleep_time) , max_sleep_time(storage.getDistributedSettingsRef().monitor_max_sleep_time_ms.totalMilliseconds()) @@ -383,6 +388,11 @@ StorageDistributedDirectoryMonitor::StorageDistributedDirectoryMonitor( , metric_pending_files(CurrentMetrics::DistributedFilesToInsert, 0) , metric_broken_files(CurrentMetrics::BrokenDistributedFilesToInsert, 0) { + fs::create_directory(broken_path); + + if (initialize_from_disk) + initializeFilesFromDisk(); + task_handle = bg_pool.createTask(getLoggerName() + "/Bg", [this]{ run(); }); task_handle->activateAndSchedule(); } @@ -390,35 +400,29 @@ StorageDistributedDirectoryMonitor::StorageDistributedDirectoryMonitor( StorageDistributedDirectoryMonitor::~StorageDistributedDirectoryMonitor() { - if (!quit) + if (!pending_files.isFinished()) { - quit = true; + pending_files.clearAndFinish(); task_handle->deactivate(); } } void StorageDistributedDirectoryMonitor::flushAllData() { - if (quit) + if (pending_files.isFinished()) return; std::lock_guard lock{mutex}; - - const auto & files = getFiles(); - if (!files.empty()) - { - processFiles(files); - - /// Update counters. - getFiles(); - } + if (!hasPendingFiles()) + return; + processFiles(); } void StorageDistributedDirectoryMonitor::shutdownAndDropAllData() { - if (!quit) + if (!pending_files.isFinished()) { - quit = true; + pending_files.clearAndFinish(); task_handle->deactivate(); } @@ -432,19 +436,21 @@ void StorageDistributedDirectoryMonitor::run() std::lock_guard lock{mutex}; bool do_sleep = false; - while (!quit) + while (!pending_files.isFinished()) { do_sleep = true; - const auto & files = getFiles(); - if (files.empty()) + if (!hasPendingFiles()) break; if (!monitor_blocker.isCancelled()) { try { - do_sleep = !processFiles(files); + processFiles(); + /// No errors while processing existing files. + /// Let's see maybe there are more files to process. + do_sleep = false; std::lock_guard status_lock(status_mutex); status.last_exception = std::exception_ptr{}; @@ -469,9 +475,7 @@ void StorageDistributedDirectoryMonitor::run() } } else - { LOG_DEBUG(log, "Skipping send data over distributed table."); - } const auto now = std::chrono::system_clock::now(); if (now - last_decrease_time > decrease_error_count_period) @@ -486,10 +490,7 @@ void StorageDistributedDirectoryMonitor::run() break; } - /// Update counters. - getFiles(); - - if (!quit && do_sleep) + if (!pending_files.isFinished() && do_sleep) task_handle->scheduleAfter(sleep_time.count()); } @@ -567,41 +568,83 @@ ConnectionPoolPtr StorageDistributedDirectoryMonitor::createPool(const std::stri settings.distributed_replica_error_cap); } - -std::map StorageDistributedDirectoryMonitor::getFiles() +bool StorageDistributedDirectoryMonitor::hasPendingFiles() const { - std::map files; + return fs::exists(current_batch_file_path) || !current_batch_file.empty() || !pending_files.empty(); +} + +void StorageDistributedDirectoryMonitor::initializeFilesFromDisk() +{ + /// NOTE: This method does not requires to hold status_mutex, hence, no TSA + /// annotations in the header file. fs::directory_iterator end; - for (fs::directory_iterator it{path}; it != end; ++it) + + /// Initialize pending files { - const auto & file_path_str = it->path(); - if (!it->is_directory() && startsWith(fs::path(file_path_str).extension(), ".bin")) + size_t bytes_count = 0; + + for (fs::directory_iterator it{path}; it != end; ++it) { - files[parse(fs::path(file_path_str).stem())] = file_path_str; + const auto & file_path = it->path(); + const auto & base_name = file_path.stem().string(); + if (!it->is_directory() && startsWith(fs::path(file_path).extension(), ".bin") && parse(base_name)) + { + const std::string & file_path_str = file_path.string(); + if (!pending_files.push(file_path_str)) + throw Exception(ErrorCodes::LOGICAL_ERROR, "Cannot add pending file"); + bytes_count += fs::file_size(file_path); + } + else if (base_name != "tmp" && base_name != "broken") + { + /// It is OK to log current_batch.txt here too (useful for debugging). + LOG_WARNING(log, "Unexpected file {} in {}", file_path.string(), path); + } } + + LOG_TRACE(log, "Files set to {}", pending_files.size()); + LOG_TRACE(log, "Bytes set to {}", bytes_count); + + metric_pending_files.changeTo(pending_files.size()); + status.files_count = pending_files.size(); + status.bytes_count = bytes_count; } - return files; + /// Initialize broken files + { + size_t broken_bytes_count = 0; + size_t broken_files = 0; + + for (fs::directory_iterator it{broken_path}; it != end; ++it) + { + const auto & file_path = it->path(); + if (!it->is_directory() && startsWith(fs::path(file_path).extension(), ".bin") && parse(file_path.stem())) + broken_bytes_count += fs::file_size(file_path); + else + LOG_WARNING(log, "Unexpected file {} in {}", file_path.string(), broken_path); + } + + LOG_TRACE(log, "Broken files set to {}", broken_files); + LOG_TRACE(log, "Broken bytes set to {}", broken_bytes_count); + + metric_broken_files.changeTo(broken_files); + status.broken_files_count = broken_files; + status.broken_bytes_count = broken_bytes_count; + } } -bool StorageDistributedDirectoryMonitor::processFiles(const std::map & files) +void StorageDistributedDirectoryMonitor::processFiles() { if (should_batch_inserts) - { - processFilesWithBatching(files); - } + processFilesWithBatching(); else { - for (const auto & file : files) - { - if (quit) - return true; + /// Process unprocessed file. + if (!current_batch_file.empty()) + processFile(current_batch_file); - processFile(file.second); - } + while (pending_files.tryPop(current_batch_file)) + processFile(current_batch_file); } - - return true; } void StorageDistributedDirectoryMonitor::processFile(const std::string & file_path) @@ -648,7 +691,11 @@ void StorageDistributedDirectoryMonitor::processFile(const std::string & file_pa thread_trace_context->root_span.addAttribute(std::current_exception()); e.addMessage(fmt::format("While sending {}", file_path)); - maybeMarkAsBroken(file_path, e); + if (isFileBrokenErrorCode(e.code(), e.isRemoteException())) + { + markAsBroken(file_path); + current_batch_file.clear(); + } throw; } catch (...) @@ -661,6 +708,7 @@ void StorageDistributedDirectoryMonitor::processFile(const std::string & file_pa auto dir_sync_guard = getDirectorySyncGuard(dir_fsync, disk, relative_path); markAsSend(file_path); + current_batch_file.clear(); LOG_TRACE(log, "Finished processing `{}` (took {} ms)", file_path, watch.elapsedMilliseconds()); } @@ -700,25 +748,19 @@ struct StorageDistributedDirectoryMonitor::BatchHeader struct StorageDistributedDirectoryMonitor::Batch { - /// File indexes for this batch. - std::vector file_indices; size_t total_rows = 0; size_t total_bytes = 0; bool recovered = false; StorageDistributedDirectoryMonitor & parent; - /// Information about all available indexes (not only for the current batch). - const std::map & file_index_to_path; + std::vector files; bool split_batch_on_failure = true; bool fsync = false; bool dir_fsync = false; - Batch( - StorageDistributedDirectoryMonitor & parent_, - const std::map & file_index_to_path_) + explicit Batch(StorageDistributedDirectoryMonitor & parent_) : parent(parent_) - , file_index_to_path(file_index_to_path_) , split_batch_on_failure(parent.split_batch_on_failure) , fsync(parent.storage.getDistributedSettingsRef().fsync_after_insert) , dir_fsync(parent.dir_fsync) @@ -733,7 +775,7 @@ struct StorageDistributedDirectoryMonitor::Batch void send() { - if (file_indices.empty()) + if (files.empty()) return; CurrentMetrics::Increment metric_increment{CurrentMetrics::DistributedSend}; @@ -776,7 +818,7 @@ struct StorageDistributedDirectoryMonitor::Batch } catch (const Exception & e) { - if (split_batch_on_failure && file_indices.size() > 1 && isSplittableErrorCode(e.code(), e.isRemoteException())) + if (split_batch_on_failure && files.size() > 1 && isSplittableErrorCode(e.code(), e.isRemoteException())) { tryLogCurrentException(parent.log, "Trying to split batch due to"); sendSeparateFiles(); @@ -796,49 +838,28 @@ struct StorageDistributedDirectoryMonitor::Batch } else { - std::vector files; - for (auto file_index_info : file_indices | boost::adaptors::indexed()) - { - if (file_index_info.index() > 8) - { - files.push_back("..."); - break; - } - - auto file_index = file_index_info.value(); - auto file_path = file_index_to_path.find(file_index); - if (file_path != file_index_to_path.end()) - files.push_back(file_path->second); - else - files.push_back(fmt::format("#{}.bin (deleted)", file_index)); - } - e.addMessage(fmt::format("While sending batch, size: {}, files: {}", file_indices.size(), fmt::join(files, "\n"))); - + e.addMessage(fmt::format("While sending a batch of {} files, files: {}", files.size(), fmt::join(files, "\n"))); throw; } } if (!batch_broken) { - LOG_TRACE(parent.log, "Sent a batch of {} files (took {} ms).", file_indices.size(), watch.elapsedMilliseconds()); + LOG_TRACE(parent.log, "Sent a batch of {} files (took {} ms).", files.size(), watch.elapsedMilliseconds()); auto dir_sync_guard = getDirectorySyncGuard(dir_fsync, parent.disk, parent.relative_path); - for (UInt64 file_index : file_indices) - parent.markAsSend(file_index_to_path.at(file_index)); + for (const auto & file : files) + parent.markAsSend(file); } else if (!batch_marked_as_broken) { - LOG_ERROR(parent.log, "Marking a batch of {} files as broken.", file_indices.size()); + LOG_ERROR(parent.log, "Marking a batch of {} files as broken, files: {}", files.size(), fmt::join(files, "\n")); - for (UInt64 file_idx : file_indices) - { - auto file_path = file_index_to_path.find(file_idx); - if (file_path != file_index_to_path.end()) - parent.markAsBroken(file_path->second); - } + for (const auto & file : files) + parent.markAsBroken(file); } - file_indices.clear(); + files.clear(); total_rows = 0; total_bytes = 0; recovered = false; @@ -848,8 +869,11 @@ struct StorageDistributedDirectoryMonitor::Batch void writeText(WriteBuffer & out) { - for (UInt64 file_idx : file_indices) - out << file_idx << '\n'; + for (const auto & file : files) + { + UInt64 file_index = parse(fs::path(file).stem()); + out << file_index << '\n'; + } } void readText(ReadBuffer & in) @@ -858,8 +882,9 @@ struct StorageDistributedDirectoryMonitor::Batch { UInt64 idx; in >> idx >> "\n"; - file_indices.push_back(idx); + files.push_back(fmt::format("{}/{}.bin", parent.path, idx)); } + recovered = true; } @@ -871,14 +896,9 @@ private: IConnectionPool::Entry connection; - for (UInt64 file_idx : file_indices) + for (const auto & file : files) { - auto file_path = file_index_to_path.find(file_idx); - if (file_path == file_index_to_path.end()) - throw Exception(ErrorCodes::DISTRIBUTED_BROKEN_BATCH_INFO, - "Failed to send batch: file with index {} is absent", file_idx); - - ReadBufferFromFile in(file_path->second); + ReadBufferFromFile in(file); const auto & distributed_header = readDistributedHeader(in, parent.log); OpenTelemetry::TracingContextHolder thread_trace_context(__PRETTY_FUNCTION__, @@ -892,7 +912,7 @@ private: compression_expected = connection->getCompression() == Protocol::Compression::Enable; LOG_DEBUG(parent.log, "Sending a batch of {} files to {} ({} rows, {} bytes).", - file_indices.size(), + files.size(), connection->getDescription(), formatReadableQuantity(total_rows), formatReadableSizeWithBinarySuffix(total_bytes)); @@ -913,19 +933,11 @@ private: { size_t broken_files = 0; - for (UInt64 file_idx : file_indices) + for (const auto & file : files) { - auto file_path = file_index_to_path.find(file_idx); - if (file_path == file_index_to_path.end()) - { - LOG_ERROR(parent.log, "Failed to send one file from batch: file with index {} is absent", file_idx); - ++broken_files; - continue; - } - try { - ReadBufferFromFile in(file_path->second); + ReadBufferFromFile in(file); const auto & distributed_header = readDistributedHeader(in, parent.log); // this function is called in a separated thread, so we set up the trace context from the file @@ -947,9 +959,11 @@ private: } catch (Exception & e) { - e.addMessage(fmt::format("While sending {}", file_path->second)); - parent.maybeMarkAsBroken(file_path->second, e); - ++broken_files; + if (isFileBrokenErrorCode(e.code(), e.isRemoteException())) + { + parent.markAsBroken(file); + ++broken_files; + } } } @@ -1029,13 +1043,18 @@ std::shared_ptr StorageDistributedDirectoryMonitor::createSourceFromFil return std::make_shared(file_name); } -bool StorageDistributedDirectoryMonitor::addAndSchedule(size_t file_size, size_t ms) +bool StorageDistributedDirectoryMonitor::addAndSchedule(const std::string & file_path, size_t file_size, size_t ms) { - if (quit) + /// NOTE: It is better not to throw in this case, since the file is already + /// on disk (see DistributedSink), and it will be processed next time. + if (pending_files.isFinished()) return false; + if (!pending_files.push(file_path)) + throw Exception(ErrorCodes::LOGICAL_ERROR, "Cannot add pending file"); + { - std::lock_guard status_lock(status_mutex); + std::lock_guard lock(status_mutex); metric_pending_files.add(); status.bytes_count += file_size; ++status.files_count; @@ -1051,33 +1070,25 @@ StorageDistributedDirectoryMonitor::Status StorageDistributedDirectoryMonitor::g return current_status; } -void StorageDistributedDirectoryMonitor::processFilesWithBatching(const std::map & files) +void StorageDistributedDirectoryMonitor::processFilesWithBatching() { - std::unordered_set file_indices_to_skip; - + /// Possibly, we failed to send a batch on the previous iteration. Try to send exactly the same batch. if (fs::exists(current_batch_file_path)) { - /// Possibly, we failed to send a batch on the previous iteration. Try to send exactly the same batch. - Batch batch(*this, files); + Batch batch(*this); ReadBufferFromFile in{current_batch_file_path}; batch.readText(in); - file_indices_to_skip.insert(batch.file_indices.begin(), batch.file_indices.end()); batch.send(); + + auto dir_sync_guard = getDirectorySyncGuard(dir_fsync, disk, relative_path); + fs::remove(current_batch_file_path); } std::unordered_map header_to_batch; - for (const auto & file : files) + std::string file_path; + while (pending_files.tryPop(file_path)) { - if (quit) - return; - - UInt64 file_idx = file.first; - const String & file_path = file.second; - - if (file_indices_to_skip.contains(file_idx)) - continue; - size_t total_rows = 0; size_t total_bytes = 0; Block header; @@ -1116,8 +1127,9 @@ void StorageDistributedDirectoryMonitor::processFilesWithBatching(const std::map } catch (const Exception & e) { - if (maybeMarkAsBroken(file_path, e)) + if (isFileBrokenErrorCode(e.code(), e.isRemoteException())) { + markAsBroken(file_path); tryLogCurrentException(log, "File is marked broken due to"); continue; } @@ -1131,9 +1143,9 @@ void StorageDistributedDirectoryMonitor::processFilesWithBatching(const std::map std::move(distributed_header.client_info), std::move(header) ); - Batch & batch = header_to_batch.try_emplace(batch_header, *this, files).first->second; + Batch & batch = header_to_batch.try_emplace(batch_header, *this).first->second; - batch.file_indices.push_back(file_idx); + batch.files.push_back(file_path); batch.total_rows += total_rows; batch.total_bytes += total_bytes; @@ -1161,16 +1173,10 @@ void StorageDistributedDirectoryMonitor::processFilesWithBatching(const std::map void StorageDistributedDirectoryMonitor::markAsBroken(const std::string & file_path) { - const auto last_path_separator_pos = file_path.rfind('/'); - const auto & base_path = file_path.substr(0, last_path_separator_pos + 1); - const auto & file_name = file_path.substr(last_path_separator_pos + 1); - const String & broken_path = fs::path(base_path) / "broken/"; - const String & broken_file_path = fs::path(broken_path) / file_name; - - fs::create_directory(broken_path); + const String & broken_file_path = fs::path(broken_path) / fs::path(file_path).filename(); auto dir_sync_guard = getDirectorySyncGuard(dir_fsync, disk, relative_path); - auto broken_dir_sync_guard = getDirectorySyncGuard(dir_fsync, disk, fs::path(relative_path) / "broken/"); + auto broken_dir_sync_guard = getDirectorySyncGuard(dir_fsync, disk, broken_relative_path); { std::lock_guard status_lock(status_mutex); @@ -1204,21 +1210,9 @@ void StorageDistributedDirectoryMonitor::markAsSend(const std::string & file_pat fs::remove(file_path); } -bool StorageDistributedDirectoryMonitor::maybeMarkAsBroken(const std::string & file_path, const Exception & e) -{ - /// Mark file as broken if necessary. - if (isFileBrokenErrorCode(e.code(), e.isRemoteException())) - { - markAsBroken(file_path); - return true; - } - else - return false; -} - std::string StorageDistributedDirectoryMonitor::getLoggerName() const { - return storage.getStorageID().getFullTableName() + ".DirectoryMonitor"; + return storage.getStorageID().getFullTableName() + ".DirectoryMonitor." + disk->getName(); } void StorageDistributedDirectoryMonitor::updatePath(const std::string & new_relative_path) diff --git a/src/Storages/Distributed/DirectoryMonitor.h b/src/Storages/Distributed/DirectoryMonitor.h index 030d6acf6e2..313125e16bd 100644 --- a/src/Storages/Distributed/DirectoryMonitor.h +++ b/src/Storages/Distributed/DirectoryMonitor.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include #include @@ -38,7 +39,8 @@ public: const std::string & relative_path_, ConnectionPoolPtr pool_, ActionBlocker & monitor_blocker_, - BackgroundSchedulePool & bg_pool); + BackgroundSchedulePool & bg_pool, + bool initialize_from_disk); ~StorageDistributedDirectoryMonitor(); @@ -53,7 +55,7 @@ public: static std::shared_ptr createSourceFromFile(const String & file_name); /// For scheduling via DistributedSink. - bool addAndSchedule(size_t file_size, size_t ms); + bool addAndSchedule(const std::string & file_path, size_t file_size, size_t ms); struct InternalStatus { @@ -79,14 +81,15 @@ public: private: void run(); - std::map getFiles(); - bool processFiles(const std::map & files); + bool hasPendingFiles() const; + + void initializeFilesFromDisk(); + void processFiles(); void processFile(const std::string & file_path); - void processFilesWithBatching(const std::map & files); + void processFilesWithBatching(); void markAsBroken(const std::string & file_path); void markAsSend(const std::string & file_path); - bool maybeMarkAsBroken(const std::string & file_path, const Exception & e); std::string getLoggerName() const; @@ -96,25 +99,33 @@ private: DiskPtr disk; std::string relative_path; std::string path; + std::string broken_relative_path; + std::string broken_path; const bool should_batch_inserts = false; const bool split_batch_on_failure = true; const bool dir_fsync = false; const size_t min_batched_block_size_rows = 0; const size_t min_batched_block_size_bytes = 0; - String current_batch_file_path; + + /// This is pending data (due to some error) for should_batch_inserts==true + std::string current_batch_file_path; + /// This is pending data (due to some error) for should_batch_inserts==false + std::string current_batch_file; struct BatchHeader; struct Batch; std::mutex status_mutex; + InternalStatus status; + ConcurrentBoundedQueue pending_files; + const std::chrono::milliseconds default_sleep_time; std::chrono::milliseconds sleep_time; const std::chrono::milliseconds max_sleep_time; std::chrono::time_point last_decrease_time {std::chrono::system_clock::now()}; - std::atomic quit {false}; std::mutex mutex; Poco::Logger * log; ActionBlocker & monitor_blocker; diff --git a/src/Storages/Distributed/DistributedSink.cpp b/src/Storages/Distributed/DistributedSink.cpp index bac13ea37cf..edbb2acc923 100644 --- a/src/Storages/Distributed/DistributedSink.cpp +++ b/src/Storages/Distributed/DistributedSink.cpp @@ -724,6 +724,9 @@ void DistributedSink::writeToShard(const Cluster::ShardInfo & shard_info, const return guard; }; + std::vector bin_files; + bin_files.reserve(dir_names.size()); + auto it = dir_names.begin(); /// on first iteration write block to a temporary directory for subsequent /// hardlinking to ensure the inode is not freed until we're done @@ -802,8 +805,8 @@ void DistributedSink::writeToShard(const Cluster::ShardInfo & shard_info, const } // Create hardlink here to reuse increment number - const std::string block_file_path(fs::path(path) / file_name); - createHardLink(first_file_tmp_path, block_file_path); + bin_files.push_back(fs::path(path) / file_name); + createHardLink(first_file_tmp_path, bin_files.back()); auto dir_sync_guard = make_directory_sync_guard(*it); } ++it; @@ -814,8 +817,8 @@ void DistributedSink::writeToShard(const Cluster::ShardInfo & shard_info, const const std::string path(fs::path(disk_path) / (data_path + *it)); fs::create_directory(path); - const std::string block_file_path(fs::path(path) / (toString(storage.file_names_increment.get()) + ".bin")); - createHardLink(first_file_tmp_path, block_file_path); + bin_files.push_back(fs::path(path) / (toString(storage.file_names_increment.get()) + ".bin")); + createHardLink(first_file_tmp_path, bin_files.back()); auto dir_sync_guard = make_directory_sync_guard(*it); } @@ -826,10 +829,13 @@ void DistributedSink::writeToShard(const Cluster::ShardInfo & shard_info, const /// Notify auto sleep_ms = context->getSettingsRef().distributed_directory_monitor_sleep_time_ms; - for (const auto & dir_name : dir_names) + for (size_t i = 0; i < dir_names.size(); ++i) { - auto & directory_monitor = storage.requireDirectoryMonitor(disk, dir_name); - directory_monitor.addAndSchedule(file_size, sleep_ms.totalMilliseconds()); + const auto & dir_name = dir_names[i]; + const auto & bin_file = bin_files[i]; + + auto & directory_monitor = storage.requireDirectoryMonitor(disk, dir_name, /* startup= */ false); + directory_monitor.addAndSchedule(bin_file, file_size, sleep_ms.totalMilliseconds()); } } diff --git a/src/Storages/StorageDistributed.cpp b/src/Storages/StorageDistributed.cpp index 5516d6cadf0..a38beef983c 100644 --- a/src/Storages/StorageDistributed.cpp +++ b/src/Storages/StorageDistributed.cpp @@ -1208,12 +1208,15 @@ void StorageDistributed::createDirectoryMonitors(const DiskPtr & disk) const auto & dir_path = it->path(); if (std::filesystem::is_directory(dir_path)) { + /// Created by DistributedSink const auto & tmp_path = dir_path / "tmp"; - - /// "tmp" created by DistributedSink if (std::filesystem::is_directory(tmp_path) && std::filesystem::is_empty(tmp_path)) std::filesystem::remove(tmp_path); + const auto & broken_path = dir_path / "broken"; + if (std::filesystem::is_directory(broken_path) && std::filesystem::is_empty(broken_path)) + std::filesystem::remove(broken_path); + if (std::filesystem::is_empty(dir_path)) { LOG_DEBUG(log, "Removing {} (used for async INSERT into Distributed)", dir_path.string()); @@ -1222,14 +1225,14 @@ void StorageDistributed::createDirectoryMonitors(const DiskPtr & disk) } else { - requireDirectoryMonitor(disk, dir_path.filename().string()); + requireDirectoryMonitor(disk, dir_path.filename().string(), /* startup= */ true); } } } } -StorageDistributedDirectoryMonitor& StorageDistributed::requireDirectoryMonitor(const DiskPtr & disk, const std::string & name) +StorageDistributedDirectoryMonitor& StorageDistributed::requireDirectoryMonitor(const DiskPtr & disk, const std::string & name, bool startup) { const std::string & disk_path = disk->getPath(); const std::string key(disk_path + name); @@ -1243,7 +1246,8 @@ StorageDistributedDirectoryMonitor& StorageDistributed::requireDirectoryMonitor( *this, disk, relative_data_path + name, node_data.connection_pool, monitors_blocker, - getContext()->getDistributedSchedulePool()); + getContext()->getDistributedSchedulePool(), + /* initialize_from_disk= */ startup); } return *node_data.directory_monitor; } diff --git a/src/Storages/StorageDistributed.h b/src/Storages/StorageDistributed.h index 66fd7b77889..25a752fe795 100644 --- a/src/Storages/StorageDistributed.h +++ b/src/Storages/StorageDistributed.h @@ -166,7 +166,7 @@ private: /// create directory monitors for each existing subdirectory void createDirectoryMonitors(const DiskPtr & disk); /// ensure directory monitor thread and connectoin pool creation by disk and subdirectory name - StorageDistributedDirectoryMonitor & requireDirectoryMonitor(const DiskPtr & disk, const std::string & name); + StorageDistributedDirectoryMonitor & requireDirectoryMonitor(const DiskPtr & disk, const std::string & name, bool startup); /// Return list of metrics for all created monitors /// (note that monitors are created lazily, i.e. until at least one INSERT executed) diff --git a/tests/queries/0_stateless/01791_dist_INSERT_block_structure_mismatch.reference b/tests/queries/0_stateless/01791_dist_INSERT_block_structure_mismatch.reference index f3be69d3279..b0d8284faa5 100644 --- a/tests/queries/0_stateless/01791_dist_INSERT_block_structure_mismatch.reference +++ b/tests/queries/0_stateless/01791_dist_INSERT_block_structure_mismatch.reference @@ -1,7 +1,7 @@ DistributedSink: Structure does not match (remote: n Int8 Int8(size = 0), local: n UInt64 UInt64(size = 1)), implicit conversion will be done. DistributedSink: Structure does not match (remote: n Int8 Int8(size = 0), local: n UInt64 UInt64(size = 1)), implicit conversion will be done. - default.dist_01683.DirectoryMonitor: Structure does not match (remote: n Int8 Int8(size = 0), local: n UInt64 UInt64(size = 0)), implicit conversion will be done - default.dist_01683.DirectoryMonitor: Structure does not match (remote: n Int8 Int8(size = 0), local: n UInt64 UInt64(size = 0)), implicit conversion will be done + default.dist_01683.DirectoryMonitor.default: Structure does not match (remote: n Int8 Int8(size = 0), local: n UInt64 UInt64(size = 0)), implicit conversion will be done + default.dist_01683.DirectoryMonitor.default: Structure does not match (remote: n Int8 Int8(size = 0), local: n UInt64 UInt64(size = 0)), implicit conversion will be done 1 1 2 From 16646c0923338adfd20e2853de4a1b9373534d58 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 21 Jan 2023 10:07:44 +0100 Subject: [PATCH 299/841] Rename DirectoryMonitor::current_batch_file to current_file Signed-off-by: Azat Khuzhin --- src/Storages/Distributed/DirectoryMonitor.cpp | 14 +++++++------- src/Storages/Distributed/DirectoryMonitor.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Storages/Distributed/DirectoryMonitor.cpp b/src/Storages/Distributed/DirectoryMonitor.cpp index f2a3471d839..e536f1e63d8 100644 --- a/src/Storages/Distributed/DirectoryMonitor.cpp +++ b/src/Storages/Distributed/DirectoryMonitor.cpp @@ -570,7 +570,7 @@ ConnectionPoolPtr StorageDistributedDirectoryMonitor::createPool(const std::stri bool StorageDistributedDirectoryMonitor::hasPendingFiles() const { - return fs::exists(current_batch_file_path) || !current_batch_file.empty() || !pending_files.empty(); + return fs::exists(current_batch_file_path) || !current_file.empty() || !pending_files.empty(); } void StorageDistributedDirectoryMonitor::initializeFilesFromDisk() @@ -639,11 +639,11 @@ void StorageDistributedDirectoryMonitor::processFiles() else { /// Process unprocessed file. - if (!current_batch_file.empty()) - processFile(current_batch_file); + if (!current_file.empty()) + processFile(current_file); - while (pending_files.tryPop(current_batch_file)) - processFile(current_batch_file); + while (pending_files.tryPop(current_file)) + processFile(current_file); } } @@ -694,7 +694,7 @@ void StorageDistributedDirectoryMonitor::processFile(const std::string & file_pa if (isFileBrokenErrorCode(e.code(), e.isRemoteException())) { markAsBroken(file_path); - current_batch_file.clear(); + current_file.clear(); } throw; } @@ -708,7 +708,7 @@ void StorageDistributedDirectoryMonitor::processFile(const std::string & file_pa auto dir_sync_guard = getDirectorySyncGuard(dir_fsync, disk, relative_path); markAsSend(file_path); - current_batch_file.clear(); + current_file.clear(); LOG_TRACE(log, "Finished processing `{}` (took {} ms)", file_path, watch.elapsedMilliseconds()); } diff --git a/src/Storages/Distributed/DirectoryMonitor.h b/src/Storages/Distributed/DirectoryMonitor.h index 313125e16bd..06843b77a4b 100644 --- a/src/Storages/Distributed/DirectoryMonitor.h +++ b/src/Storages/Distributed/DirectoryMonitor.h @@ -111,7 +111,7 @@ private: /// This is pending data (due to some error) for should_batch_inserts==true std::string current_batch_file_path; /// This is pending data (due to some error) for should_batch_inserts==false - std::string current_batch_file; + std::string current_file; struct BatchHeader; struct Batch; From ef1e642e059510ff182a6a9dc97d34fdb7c1a071 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 21 Jan 2023 10:12:50 +0100 Subject: [PATCH 300/841] Add log message to StorageDistributedDirectoryMonitor::addAndSchedule() Signed-off-by: Azat Khuzhin --- src/Storages/Distributed/DirectoryMonitor.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Storages/Distributed/DirectoryMonitor.cpp b/src/Storages/Distributed/DirectoryMonitor.cpp index e536f1e63d8..c04e54b6bba 100644 --- a/src/Storages/Distributed/DirectoryMonitor.cpp +++ b/src/Storages/Distributed/DirectoryMonitor.cpp @@ -1048,7 +1048,10 @@ bool StorageDistributedDirectoryMonitor::addAndSchedule(const std::string & file /// NOTE: It is better not to throw in this case, since the file is already /// on disk (see DistributedSink), and it will be processed next time. if (pending_files.isFinished()) + { + LOG_DEBUG(log, "File {} had not been scheduled, since the table had been detached", file_path); return false; + } if (!pending_files.push(file_path)) throw Exception(ErrorCodes::LOGICAL_ERROR, "Cannot add pending file"); From f0a2efa63014ff1349340e28647ab067698cf974 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 21 Jan 2023 10:20:28 +0100 Subject: [PATCH 301/841] Always manipulate with absolute file paths in DirectoryMonitor Otherwise on batch restore we can get the difference in file paths. Signed-off-by: Azat Khuzhin --- src/Storages/Distributed/DirectoryMonitor.cpp | 16 ++++++++++------ src/Storages/Distributed/DirectoryMonitor.h | 3 ++- src/Storages/Distributed/DistributedSink.cpp | 2 +- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/Storages/Distributed/DirectoryMonitor.cpp b/src/Storages/Distributed/DirectoryMonitor.cpp index c04e54b6bba..eead8c8ea42 100644 --- a/src/Storages/Distributed/DirectoryMonitor.cpp +++ b/src/Storages/Distributed/DirectoryMonitor.cpp @@ -573,6 +573,12 @@ bool StorageDistributedDirectoryMonitor::hasPendingFiles() const return fs::exists(current_batch_file_path) || !current_file.empty() || !pending_files.empty(); } +void StorageDistributedDirectoryMonitor::addFile(const std::string & file_path) +{ + if (!pending_files.push(fs::absolute(file_path).string())) + throw Exception(ErrorCodes::LOGICAL_ERROR, "Cannot schedule a file '{}'", file_path); +} + void StorageDistributedDirectoryMonitor::initializeFilesFromDisk() { /// NOTE: This method does not requires to hold status_mutex, hence, no TSA @@ -591,8 +597,7 @@ void StorageDistributedDirectoryMonitor::initializeFilesFromDisk() if (!it->is_directory() && startsWith(fs::path(file_path).extension(), ".bin") && parse(base_name)) { const std::string & file_path_str = file_path.string(); - if (!pending_files.push(file_path_str)) - throw Exception(ErrorCodes::LOGICAL_ERROR, "Cannot add pending file"); + addFile(file_path_str); bytes_count += fs::file_size(file_path); } else if (base_name != "tmp" && base_name != "broken") @@ -882,7 +887,7 @@ struct StorageDistributedDirectoryMonitor::Batch { UInt64 idx; in >> idx >> "\n"; - files.push_back(fmt::format("{}/{}.bin", parent.path, idx)); + files.push_back(fs::absolute(fmt::format("{}/{}.bin", parent.path, idx)).string()); } recovered = true; @@ -1043,7 +1048,7 @@ std::shared_ptr StorageDistributedDirectoryMonitor::createSourceFromFil return std::make_shared(file_name); } -bool StorageDistributedDirectoryMonitor::addAndSchedule(const std::string & file_path, size_t file_size, size_t ms) +bool StorageDistributedDirectoryMonitor::addFileAndSchedule(const std::string & file_path, size_t file_size, size_t ms) { /// NOTE: It is better not to throw in this case, since the file is already /// on disk (see DistributedSink), and it will be processed next time. @@ -1053,8 +1058,7 @@ bool StorageDistributedDirectoryMonitor::addAndSchedule(const std::string & file return false; } - if (!pending_files.push(file_path)) - throw Exception(ErrorCodes::LOGICAL_ERROR, "Cannot add pending file"); + addFile(file_path); { std::lock_guard lock(status_mutex); diff --git a/src/Storages/Distributed/DirectoryMonitor.h b/src/Storages/Distributed/DirectoryMonitor.h index 06843b77a4b..9b1596d45e3 100644 --- a/src/Storages/Distributed/DirectoryMonitor.h +++ b/src/Storages/Distributed/DirectoryMonitor.h @@ -55,7 +55,7 @@ public: static std::shared_ptr createSourceFromFile(const String & file_name); /// For scheduling via DistributedSink. - bool addAndSchedule(const std::string & file_path, size_t file_size, size_t ms); + bool addFileAndSchedule(const std::string & file_path, size_t file_size, size_t ms); struct InternalStatus { @@ -83,6 +83,7 @@ private: bool hasPendingFiles() const; + void addFile(const std::string & file_path); void initializeFilesFromDisk(); void processFiles(); void processFile(const std::string & file_path); diff --git a/src/Storages/Distributed/DistributedSink.cpp b/src/Storages/Distributed/DistributedSink.cpp index edbb2acc923..c9c235596db 100644 --- a/src/Storages/Distributed/DistributedSink.cpp +++ b/src/Storages/Distributed/DistributedSink.cpp @@ -835,7 +835,7 @@ void DistributedSink::writeToShard(const Cluster::ShardInfo & shard_info, const const auto & bin_file = bin_files[i]; auto & directory_monitor = storage.requireDirectoryMonitor(disk, dir_name, /* startup= */ false); - directory_monitor.addAndSchedule(bin_file, file_size, sleep_ms.totalMilliseconds()); + directory_monitor.addFileAndSchedule(bin_file, file_size, sleep_ms.totalMilliseconds()); } } From 13a3e03f19b13f0210e93e28f433e3abee7b3fd9 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 21 Jan 2023 10:27:59 +0100 Subject: [PATCH 302/841] Introduce StorageDistributedDirectoryMonitor::Batch::{de,}serialize() Signed-off-by: Azat Khuzhin --- src/Storages/Distributed/DirectoryMonitor.cpp | 51 +++++++++++-------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/src/Storages/Distributed/DirectoryMonitor.cpp b/src/Storages/Distributed/DirectoryMonitor.cpp index eead8c8ea42..fe5018db821 100644 --- a/src/Storages/Distributed/DirectoryMonitor.cpp +++ b/src/Storages/Distributed/DirectoryMonitor.cpp @@ -793,24 +793,7 @@ struct StorageDistributedDirectoryMonitor::Batch /// we must try to re-send exactly the same batches. /// So we save contents of the current batch into the current_batch_file_path file /// and truncate it afterwards if all went well. - - /// Temporary file is required for atomicity. - String tmp_file{parent.current_batch_file_path + ".tmp"}; - - auto dir_sync_guard = getDirectorySyncGuard(dir_fsync, parent.disk, parent.relative_path); - if (fs::exists(tmp_file)) - LOG_ERROR(parent.log, "Temporary file {} exists. Unclean shutdown?", backQuote(tmp_file)); - - { - WriteBufferFromFile out{tmp_file, O_WRONLY | O_TRUNC | O_CREAT}; - writeText(out); - - out.finalize(); - if (fsync) - out.sync(); - } - - fs::rename(tmp_file, parent.current_batch_file_path); + serialize(); } bool batch_broken = false; @@ -872,6 +855,34 @@ struct StorageDistributedDirectoryMonitor::Batch fs::resize_file(parent.current_batch_file_path, 0); } + void serialize() + { + /// Temporary file is required for atomicity. + String tmp_file{parent.current_batch_file_path + ".tmp"}; + + auto dir_sync_guard = getDirectorySyncGuard(dir_fsync, parent.disk, parent.relative_path); + if (fs::exists(tmp_file)) + LOG_ERROR(parent.log, "Temporary file {} exists. Unclean shutdown?", backQuote(tmp_file)); + + { + WriteBufferFromFile out{tmp_file, O_WRONLY | O_TRUNC | O_CREAT}; + writeText(out); + + out.finalize(); + if (fsync) + out.sync(); + } + + fs::rename(tmp_file, parent.current_batch_file_path); + } + + void deserialize() + { + ReadBufferFromFile in{parent.current_batch_file_path}; + readText(in); + } + +private: void writeText(WriteBuffer & out) { for (const auto & file : files) @@ -893,7 +904,6 @@ struct StorageDistributedDirectoryMonitor::Batch recovered = true; } -private: void sendBatch() { std::unique_ptr remote; @@ -1083,8 +1093,7 @@ void StorageDistributedDirectoryMonitor::processFilesWithBatching() if (fs::exists(current_batch_file_path)) { Batch batch(*this); - ReadBufferFromFile in{current_batch_file_path}; - batch.readText(in); + batch.deserialize(); batch.send(); auto dir_sync_guard = getDirectorySyncGuard(dir_fsync, disk, relative_path); From 0c19a75a1c3225d8ec6625e2ca37434245f63a4c Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 21 Jan 2023 10:29:59 +0100 Subject: [PATCH 303/841] Add log message for batch restore Signed-off-by: Azat Khuzhin --- src/Storages/Distributed/DirectoryMonitor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Storages/Distributed/DirectoryMonitor.cpp b/src/Storages/Distributed/DirectoryMonitor.cpp index fe5018db821..c86661eb2ec 100644 --- a/src/Storages/Distributed/DirectoryMonitor.cpp +++ b/src/Storages/Distributed/DirectoryMonitor.cpp @@ -1092,6 +1092,8 @@ void StorageDistributedDirectoryMonitor::processFilesWithBatching() /// Possibly, we failed to send a batch on the previous iteration. Try to send exactly the same batch. if (fs::exists(current_batch_file_path)) { + LOG_DEBUG(log, "Restoring the batch"); + Batch batch(*this); batch.deserialize(); batch.send(); From 22a39e29f760969607b728a9de671c18071cbfb4 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 21 Jan 2023 10:41:38 +0100 Subject: [PATCH 304/841] Add a comment for StorageDistributedDirectoryMonitor::Batch::recovered Signed-off-by: Azat Khuzhin --- src/Storages/Distributed/DirectoryMonitor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Storages/Distributed/DirectoryMonitor.cpp b/src/Storages/Distributed/DirectoryMonitor.cpp index c86661eb2ec..06aa5219be0 100644 --- a/src/Storages/Distributed/DirectoryMonitor.cpp +++ b/src/Storages/Distributed/DirectoryMonitor.cpp @@ -755,6 +755,7 @@ struct StorageDistributedDirectoryMonitor::Batch { size_t total_rows = 0; size_t total_bytes = 0; + /// Does the batch had been created from the files in current_batch.txt? bool recovered = false; StorageDistributedDirectoryMonitor & parent; From 325a7b23050f3964704f87fabfacc92b0b737e9a Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 21 Jan 2023 16:53:51 +0100 Subject: [PATCH 305/841] Separate out DistributedHeader as DistributedAsyncInsertHeader Signed-off-by: Azat Khuzhin --- src/Storages/Distributed/DirectoryMonitor.cpp | 17 ++- .../DistributedAsyncInsertHeader.cpp | 109 ++++++++++++++++++ .../DistributedAsyncInsertHeader.h | 38 ++++++ 3 files changed, 155 insertions(+), 9 deletions(-) create mode 100644 src/Storages/Distributed/DistributedAsyncInsertHeader.cpp create mode 100644 src/Storages/Distributed/DistributedAsyncInsertHeader.h diff --git a/src/Storages/Distributed/DirectoryMonitor.cpp b/src/Storages/Distributed/DirectoryMonitor.cpp index 06aa5219be0..469f2f90954 100644 --- a/src/Storages/Distributed/DirectoryMonitor.cpp +++ b/src/Storages/Distributed/DirectoryMonitor.cpp @@ -12,10 +12,9 @@ #include #include #include -#include +#include #include #include -#include #include #include #include @@ -277,7 +276,7 @@ namespace return nullptr; } - void writeAndConvert(RemoteInserter & remote, const DistributedHeader & distributed_header, ReadBufferFromFile & in) + void writeAndConvert(RemoteInserter & remote, const DistributedAsyncInsertHeader & distributed_header, ReadBufferFromFile & in) { CompressedReadBuffer decompressing_in(in); NativeReader block_in(decompressing_in, distributed_header.revision); @@ -296,7 +295,7 @@ namespace } void writeRemoteConvert( - const DistributedHeader & distributed_header, + const DistributedAsyncInsertHeader & distributed_header, RemoteInserter & remote, bool compression_expected, ReadBufferFromFile & in, @@ -662,7 +661,7 @@ void StorageDistributedDirectoryMonitor::processFile(const std::string & file_pa CurrentMetrics::Increment metric_increment{CurrentMetrics::DistributedSend}; ReadBufferFromFile in(file_path); - const auto & distributed_header = readDistributedHeader(in, log); + const auto & distributed_header = readDistributedAsyncInsertHeader(in, log); thread_trace_context = std::make_unique(__PRETTY_FUNCTION__, distributed_header.client_info.client_trace_context, @@ -915,7 +914,7 @@ private: for (const auto & file : files) { ReadBufferFromFile in(file); - const auto & distributed_header = readDistributedHeader(in, parent.log); + const auto & distributed_header = readDistributedAsyncInsertHeader(in, parent.log); OpenTelemetry::TracingContextHolder thread_trace_context(__PRETTY_FUNCTION__, distributed_header.client_info.client_trace_context, @@ -954,7 +953,7 @@ private: try { ReadBufferFromFile in(file); - const auto & distributed_header = readDistributedHeader(in, parent.log); + const auto & distributed_header = readDistributedAsyncInsertHeader(in, parent.log); // this function is called in a separated thread, so we set up the trace context from the file OpenTelemetry::TracingContextHolder thread_trace_context(__PRETTY_FUNCTION__, @@ -1111,12 +1110,12 @@ void StorageDistributedDirectoryMonitor::processFilesWithBatching() size_t total_rows = 0; size_t total_bytes = 0; Block header; - DistributedHeader distributed_header; + DistributedAsyncInsertHeader distributed_header; try { /// Determine metadata of the current file and check if it is not broken. ReadBufferFromFile in{file_path}; - distributed_header = readDistributedHeader(in, log); + distributed_header = readDistributedAsyncInsertHeader(in, log); if (distributed_header.rows) { diff --git a/src/Storages/Distributed/DistributedAsyncInsertHeader.cpp b/src/Storages/Distributed/DistributedAsyncInsertHeader.cpp new file mode 100644 index 00000000000..19235c91cc6 --- /dev/null +++ b/src/Storages/Distributed/DistributedAsyncInsertHeader.cpp @@ -0,0 +1,109 @@ +#include +#include +#include +#include +#include +#include +#include +#include + + +namespace DB +{ + +namespace ErrorCodes +{ + extern const int CANNOT_READ_ALL_DATA; + extern const int CHECKSUM_DOESNT_MATCH; +} + +DistributedAsyncInsertHeader readDistributedAsyncInsertHeader(ReadBufferFromFile & in, Poco::Logger * log) +{ + DistributedAsyncInsertHeader distributed_header; + + UInt64 query_size; + readVarUInt(query_size, in); + + if (query_size == DBMS_DISTRIBUTED_SIGNATURE_HEADER) + { + /// Read the header as a string. + String header_data; + readStringBinary(header_data, in); + + /// Check the checksum of the header. + CityHash_v1_0_2::uint128 expected_checksum; + readPODBinary(expected_checksum, in); + CityHash_v1_0_2::uint128 calculated_checksum = + CityHash_v1_0_2::CityHash128(header_data.data(), header_data.size()); + if (expected_checksum != calculated_checksum) + { + throw Exception(ErrorCodes::CHECKSUM_DOESNT_MATCH, + "Checksum of extra info doesn't match: corrupted data. Reference: {}{}. Actual: {}{}.", + getHexUIntLowercase(expected_checksum.first), getHexUIntLowercase(expected_checksum.second), + getHexUIntLowercase(calculated_checksum.first), getHexUIntLowercase(calculated_checksum.second)); + } + + /// Read the parts of the header. + ReadBufferFromString header_buf(header_data); + + readVarUInt(distributed_header.revision, header_buf); + if (DBMS_TCP_PROTOCOL_VERSION < distributed_header.revision) + { + LOG_WARNING(log, "ClickHouse shard version is older than ClickHouse initiator version. It may lack support for new features."); + } + + readStringBinary(distributed_header.insert_query, header_buf); + distributed_header.insert_settings.read(header_buf); + + if (header_buf.hasPendingData()) + distributed_header.client_info.read(header_buf, distributed_header.revision); + + if (header_buf.hasPendingData()) + { + readVarUInt(distributed_header.rows, header_buf); + readVarUInt(distributed_header.bytes, header_buf); + readStringBinary(distributed_header.block_header_string, header_buf); + } + + if (header_buf.hasPendingData()) + { + NativeReader header_block_in(header_buf, distributed_header.revision); + distributed_header.block_header = header_block_in.read(); + if (!distributed_header.block_header) + throw Exception(ErrorCodes::CANNOT_READ_ALL_DATA, + "Cannot read header from the {} batch. Data was written with protocol version {}, current version: {}", + in.getFileName(), distributed_header.revision, DBMS_TCP_PROTOCOL_VERSION); + } + + if (header_buf.hasPendingData()) + { + readVarUInt(distributed_header.shard_num, header_buf); + readStringBinary(distributed_header.cluster, header_buf); + readStringBinary(distributed_header.distributed_table, header_buf); + readStringBinary(distributed_header.remote_table, header_buf); + } + + /// Add handling new data here, for example: + /// + /// if (header_buf.hasPendingData()) + /// readVarUInt(my_new_data, header_buf); + /// + /// And note that it is safe, because we have checksum and size for header. + + return distributed_header; + } + + if (query_size == DBMS_DISTRIBUTED_SIGNATURE_HEADER_OLD_FORMAT) + { + distributed_header.insert_settings.read(in, SettingsWriteFormat::BINARY); + readStringBinary(distributed_header.insert_query, in); + return distributed_header; + } + + distributed_header.insert_query.resize(query_size); + in.readStrict(distributed_header.insert_query.data(), query_size); + + return distributed_header; +} + +} diff --git a/src/Storages/Distributed/DistributedAsyncInsertHeader.h b/src/Storages/Distributed/DistributedAsyncInsertHeader.h new file mode 100644 index 00000000000..2c7a6477b6c --- /dev/null +++ b/src/Storages/Distributed/DistributedAsyncInsertHeader.h @@ -0,0 +1,38 @@ +#pragma once + +#include +#include +#include +#include +#include + +namespace DB +{ + +class ReadBufferFromFile; + +/// Header for the binary files that are stored on disk for async INSERT into Distributed. +struct DistributedAsyncInsertHeader +{ + UInt64 revision = 0; + Settings insert_settings; + std::string insert_query; + ClientInfo client_info; + + /// .bin file cannot have zero rows/bytes. + size_t rows = 0; + size_t bytes = 0; + + UInt32 shard_num = 0; + std::string cluster; + std::string distributed_table; + std::string remote_table; + + /// dumpStructure() of the header -- obsolete + std::string block_header_string; + Block block_header; +}; + +DistributedAsyncInsertHeader readDistributedAsyncInsertHeader(ReadBufferFromFile & in, Poco::Logger * log); + +} From 33b13549ad6f39fabad4474ae6055458ce8a041f Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 21 Jan 2023 17:01:41 +0100 Subject: [PATCH 306/841] Separate out DirectoryMonitorSource as DistributedAsyncInsertSource Signed-off-by: Azat Khuzhin --- src/Storages/Distributed/DirectoryMonitor.cpp | 70 ------------------- .../DistributedAsyncInsertSource.cpp | 62 ++++++++++++++++ .../DistributedAsyncInsertSource.h | 28 ++++++++ src/Storages/StorageFile.cpp | 7 +- 4 files changed, 93 insertions(+), 74 deletions(-) create mode 100644 src/Storages/Distributed/DistributedAsyncInsertSource.cpp create mode 100644 src/Storages/Distributed/DistributedAsyncInsertSource.h diff --git a/src/Storages/Distributed/DirectoryMonitor.cpp b/src/Storages/Distributed/DirectoryMonitor.cpp index 469f2f90954..c51e9c6e061 100644 --- a/src/Storages/Distributed/DirectoryMonitor.cpp +++ b/src/Storages/Distributed/DirectoryMonitor.cpp @@ -988,76 +988,6 @@ private: } }; -class DirectoryMonitorSource : public ISource -{ -public: - - struct Data - { - std::unique_ptr in; - std::unique_ptr decompressing_in; - std::unique_ptr block_in; - - Poco::Logger * log = nullptr; - - Block first_block; - - explicit Data(const String & file_name) - { - in = std::make_unique(file_name); - decompressing_in = std::make_unique(*in); - log = &Poco::Logger::get("DirectoryMonitorSource"); - - auto distributed_header = readDistributedHeader(*in, log); - block_in = std::make_unique(*decompressing_in, distributed_header.revision); - - first_block = block_in->read(); - } - - Data(Data &&) = default; - }; - - explicit DirectoryMonitorSource(const String & file_name) - : DirectoryMonitorSource(Data(file_name)) - { - } - - explicit DirectoryMonitorSource(Data data_) - : ISource(data_.first_block.cloneEmpty()) - , data(std::move(data_)) - { - } - - String getName() const override { return "DirectoryMonitorSource"; } - -protected: - Chunk generate() override - { - if (data.first_block) - { - size_t num_rows = data.first_block.rows(); - Chunk res(data.first_block.getColumns(), num_rows); - data.first_block.clear(); - return res; - } - - auto block = data.block_in->read(); - if (!block) - return {}; - - size_t num_rows = block.rows(); - return Chunk(block.getColumns(), num_rows); - } - -private: - Data data; -}; - -std::shared_ptr StorageDistributedDirectoryMonitor::createSourceFromFile(const String & file_name) -{ - return std::make_shared(file_name); -} - bool StorageDistributedDirectoryMonitor::addFileAndSchedule(const std::string & file_path, size_t file_size, size_t ms) { /// NOTE: It is better not to throw in this case, since the file is already diff --git a/src/Storages/Distributed/DistributedAsyncInsertSource.cpp b/src/Storages/Distributed/DistributedAsyncInsertSource.cpp new file mode 100644 index 00000000000..782cbf9c026 --- /dev/null +++ b/src/Storages/Distributed/DistributedAsyncInsertSource.cpp @@ -0,0 +1,62 @@ +#include +#include +#include +#include +#include +#include + +namespace DB +{ + +struct DistributedAsyncInsertSource::Data +{ + Poco::Logger * log = nullptr; + + ReadBufferFromFile in; + CompressedReadBuffer decompressing_in; + NativeReader block_in; + + Block first_block; + + explicit Data(const String & file_name) + : log(&Poco::Logger::get("DistributedAsyncInsertSource")) + , in(file_name) + , decompressing_in(in) + , block_in(decompressing_in, readDistributedAsyncInsertHeader(in, log).revision) + , first_block(block_in.read()) + { + } +}; + +DistributedAsyncInsertSource::DistributedAsyncInsertSource(const String & file_name) + : DistributedAsyncInsertSource(std::make_unique(file_name)) +{ +} + +DistributedAsyncInsertSource::DistributedAsyncInsertSource(std::unique_ptr data_) + : ISource(data_->first_block.cloneEmpty()) + , data(std::move(data_)) +{ +} + +DistributedAsyncInsertSource::~DistributedAsyncInsertSource() = default; + +Chunk DistributedAsyncInsertSource::generate() +{ + if (data->first_block) + { + size_t num_rows = data->first_block.rows(); + Chunk res(data->first_block.getColumns(), num_rows); + data->first_block.clear(); + return res; + } + + auto block = data->block_in.read(); + if (!block) + return {}; + + size_t num_rows = block.rows(); + return Chunk(block.getColumns(), num_rows); +} + +} diff --git a/src/Storages/Distributed/DistributedAsyncInsertSource.h b/src/Storages/Distributed/DistributedAsyncInsertSource.h new file mode 100644 index 00000000000..35f846151dc --- /dev/null +++ b/src/Storages/Distributed/DistributedAsyncInsertSource.h @@ -0,0 +1,28 @@ +#pragma once + +#include +#include +#include + +namespace DB +{ + +/// Source for the Distributed engine on-disk file for async INSERT. +class DistributedAsyncInsertSource : public ISource +{ + struct Data; + explicit DistributedAsyncInsertSource(std::unique_ptr data); + +public: + explicit DistributedAsyncInsertSource(const String & file_name); + ~DistributedAsyncInsertSource() override; + String getName() const override { return "DistributedAsyncInsertSource"; } + +protected: + Chunk generate() override; + +private: + std::unique_ptr data; +}; + +} diff --git a/src/Storages/StorageFile.cpp b/src/Storages/StorageFile.cpp index e2a2f84bc72..5fd5664b9e6 100644 --- a/src/Storages/StorageFile.cpp +++ b/src/Storages/StorageFile.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include #include @@ -368,8 +368,7 @@ ColumnsDescription StorageFile::getTableStructureFromFile( if (paths.empty()) throw Exception(ErrorCodes::INCORRECT_FILE_NAME, "Cannot get table structure from file, because no files match specified name"); - auto source = StorageDistributedDirectoryMonitor::createSourceFromFile(paths[0]); - return ColumnsDescription(source->getOutputs().front().getHeader().getNamesAndTypesList()); + return ColumnsDescription(DistributedAsyncInsertSource(paths[0]).getOutputs().front().getHeader().getNamesAndTypesList()); } if (paths.empty() && !FormatFactory::instance().checkIfFormatHasExternalSchemaReader(format)) @@ -597,7 +596,7 @@ public: /// Special case for distributed format. Defaults are not needed here. if (storage->format_name == "Distributed") { - pipeline = std::make_unique(StorageDistributedDirectoryMonitor::createSourceFromFile(current_path)); + pipeline = std::make_unique(std::make_shared(current_path)); reader = std::make_unique(*pipeline); continue; } From 1c4659b8e705b9a4c46929524bd392eaa6609f1d Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 21 Jan 2023 18:12:42 +0100 Subject: [PATCH 307/841] Separate out Batch as DistributedAsyncInsertBatch (and also some helpers) Signed-off-by: Azat Khuzhin --- src/Storages/Distributed/DirectoryMonitor.cpp | 598 +++--------------- src/Storages/Distributed/DirectoryMonitor.h | 8 +- .../DistributedAsyncInsertBatch.cpp | 277 ++++++++ .../Distributed/DistributedAsyncInsertBatch.h | 44 ++ .../DistributedAsyncInsertHelpers.cpp | 124 ++++ .../DistributedAsyncInsertHelpers.h | 35 + src/Storages/StorageDistributed.h | 1 + 7 files changed, 559 insertions(+), 528 deletions(-) create mode 100644 src/Storages/Distributed/DistributedAsyncInsertBatch.cpp create mode 100644 src/Storages/Distributed/DistributedAsyncInsertBatch.h create mode 100644 src/Storages/Distributed/DistributedAsyncInsertHelpers.cpp create mode 100644 src/Storages/Distributed/DistributedAsyncInsertHelpers.h diff --git a/src/Storages/Distributed/DirectoryMonitor.cpp b/src/Storages/Distributed/DirectoryMonitor.cpp index c51e9c6e061..d5091003cb3 100644 --- a/src/Storages/Distributed/DirectoryMonitor.cpp +++ b/src/Storages/Distributed/DirectoryMonitor.cpp @@ -1,6 +1,19 @@ +#include +#include +#include +#include +#include #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -21,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -41,13 +55,6 @@ namespace DB namespace ErrorCodes { - extern const int CANNOT_READ_ALL_DATA; - extern const int UNKNOWN_CODEC; - extern const int CANNOT_DECOMPRESS; - extern const int CHECKSUM_DOESNT_MATCH; - extern const int TOO_LARGE_SIZE_COMPRESSED; - extern const int ATTEMPT_TO_READ_AFTER_EOF; - extern const int EMPTY_DATA_PASSED; extern const int INCORRECT_FILE_NAME; extern const int MEMORY_LIMIT_EXCEEDED; extern const int DISTRIBUTED_BROKEN_BATCH_INFO; @@ -64,296 +71,64 @@ namespace ErrorCodes namespace { - constexpr const std::chrono::minutes decrease_error_count_period{5}; - template - ConnectionPoolPtrs createPoolsForAddresses(const std::string & name, PoolFactory && factory, const Cluster::ShardsInfo & shards_info, Poco::Logger * log) +template +ConnectionPoolPtrs createPoolsForAddresses(const std::string & name, PoolFactory && factory, const Cluster::ShardsInfo & shards_info, Poco::Logger * log) +{ + ConnectionPoolPtrs pools; + + auto make_connection = [&](const Cluster::Address & address) { - ConnectionPoolPtrs pools; - - auto make_connection = [&](const Cluster::Address & address) + try { - try - { - pools.emplace_back(factory(address)); - } - catch (const Exception & e) - { - if (e.code() == ErrorCodes::INCORRECT_FILE_NAME) - { - tryLogCurrentException(log); - return; - } - throw; - } - }; - - for (auto it = boost::make_split_iterator(name, boost::first_finder(",")); it != decltype(it){}; ++it) - { - const std::string & dirname = boost::copy_range(*it); - Cluster::Address address = Cluster::Address::fromFullString(dirname); - if (address.shard_index && dirname.ends_with("_all_replicas")) - { - if (address.shard_index > shards_info.size()) - { - LOG_ERROR(log, "No shard with shard_index={} ({})", address.shard_index, name); - continue; - } - - const auto & shard_info = shards_info[address.shard_index - 1]; - size_t replicas = shard_info.per_replica_pools.size(); - - for (size_t replica_index = 1; replica_index <= replicas; ++replica_index) - { - address.replica_index = static_cast(replica_index); - make_connection(address); - } - } - else - make_connection(address); + pools.emplace_back(factory(address)); } - - return pools; - } - - void assertChecksum(CityHash_v1_0_2::uint128 expected, CityHash_v1_0_2::uint128 calculated) - { - if (expected != calculated) + catch (const Exception & e) { - throw Exception(ErrorCodes::CHECKSUM_DOESNT_MATCH, - "Checksum of extra info doesn't match: corrupted data. Reference: {}{}. Actual: {}{}.", - getHexUIntLowercase(expected.first), getHexUIntLowercase(expected.second), - getHexUIntLowercase(calculated.first), getHexUIntLowercase(calculated.second)); + if (e.code() == ErrorCodes::INCORRECT_FILE_NAME) + { + tryLogCurrentException(log); + return; + } + throw; } - } - - struct DistributedHeader - { - UInt64 revision = 0; - Settings insert_settings; - std::string insert_query; - ClientInfo client_info; - - /// .bin file cannot have zero rows/bytes. - size_t rows = 0; - size_t bytes = 0; - - UInt32 shard_num = 0; - std::string cluster; - std::string distributed_table; - std::string remote_table; - - /// dumpStructure() of the header -- obsolete - std::string block_header_string; - Block block_header; }; - DistributedHeader readDistributedHeader(ReadBufferFromFile & in, Poco::Logger * log) + for (auto it = boost::make_split_iterator(name, boost::first_finder(",")); it != decltype(it){}; ++it) { - DistributedHeader distributed_header; - - UInt64 query_size; - readVarUInt(query_size, in); - - if (query_size == DBMS_DISTRIBUTED_SIGNATURE_HEADER) + const std::string & dirname = boost::copy_range(*it); + Cluster::Address address = Cluster::Address::fromFullString(dirname); + if (address.shard_index && dirname.ends_with("_all_replicas")) { - /// Read the header as a string. - String header_data; - readStringBinary(header_data, in); - - /// Check the checksum of the header. - CityHash_v1_0_2::uint128 checksum; - readPODBinary(checksum, in); - assertChecksum(checksum, CityHash_v1_0_2::CityHash128(header_data.data(), header_data.size())); - - /// Read the parts of the header. - ReadBufferFromString header_buf(header_data); - - readVarUInt(distributed_header.revision, header_buf); - if (DBMS_TCP_PROTOCOL_VERSION < distributed_header.revision) + if (address.shard_index > shards_info.size()) { - LOG_WARNING(log, "ClickHouse shard version is older than ClickHouse initiator version. It may lack support for new features."); + LOG_ERROR(log, "No shard with shard_index={} ({})", address.shard_index, name); + continue; } - readStringBinary(distributed_header.insert_query, header_buf); - distributed_header.insert_settings.read(header_buf); + const auto & shard_info = shards_info[address.shard_index - 1]; + size_t replicas = shard_info.per_replica_pools.size(); - if (header_buf.hasPendingData()) - distributed_header.client_info.read(header_buf, distributed_header.revision); - - if (header_buf.hasPendingData()) + for (size_t replica_index = 1; replica_index <= replicas; ++replica_index) { - readVarUInt(distributed_header.rows, header_buf); - readVarUInt(distributed_header.bytes, header_buf); - readStringBinary(distributed_header.block_header_string, header_buf); + address.replica_index = static_cast(replica_index); + make_connection(address); } - - if (header_buf.hasPendingData()) - { - NativeReader header_block_in(header_buf, distributed_header.revision); - distributed_header.block_header = header_block_in.read(); - if (!distributed_header.block_header) - throw Exception(ErrorCodes::CANNOT_READ_ALL_DATA, - "Cannot read header from the {} batch. Data was written with protocol version {}, current version: {}", - in.getFileName(), distributed_header.revision, DBMS_TCP_PROTOCOL_VERSION); - } - - if (header_buf.hasPendingData()) - { - readVarUInt(distributed_header.shard_num, header_buf); - readStringBinary(distributed_header.cluster, header_buf); - readStringBinary(distributed_header.distributed_table, header_buf); - readStringBinary(distributed_header.remote_table, header_buf); - } - - /// Add handling new data here, for example: - /// - /// if (header_buf.hasPendingData()) - /// readVarUInt(my_new_data, header_buf); - /// - /// And note that it is safe, because we have checksum and size for header. - - return distributed_header; } - - if (query_size == DBMS_DISTRIBUTED_SIGNATURE_HEADER_OLD_FORMAT) - { - distributed_header.insert_settings.read(in, SettingsWriteFormat::BINARY); - readStringBinary(distributed_header.insert_query, in); - return distributed_header; - } - - distributed_header.insert_query.resize(query_size); - in.readStrict(distributed_header.insert_query.data(), query_size); - - return distributed_header; + else + make_connection(address); } - /// 'remote_error' argument is used to decide whether some errors should be - /// ignored or not, in particular: - /// - /// - ATTEMPT_TO_READ_AFTER_EOF should not be ignored - /// if we receive it from remote (receiver), since: - /// - the sender will got ATTEMPT_TO_READ_AFTER_EOF when the client just go away, - /// i.e. server had been restarted - /// - since #18853 the file will be checked on the sender locally, and - /// if there is something wrong with the file itself, we will receive - /// ATTEMPT_TO_READ_AFTER_EOF not from the remote at first - /// and mark batch as broken. - bool isFileBrokenErrorCode(int code, bool remote_error) - { - return code == ErrorCodes::CHECKSUM_DOESNT_MATCH - || code == ErrorCodes::EMPTY_DATA_PASSED - || code == ErrorCodes::TOO_LARGE_SIZE_COMPRESSED - || code == ErrorCodes::CANNOT_READ_ALL_DATA - || code == ErrorCodes::UNKNOWN_CODEC - || code == ErrorCodes::CANNOT_DECOMPRESS - || code == ErrorCodes::DISTRIBUTED_BROKEN_BATCH_INFO - || code == ErrorCodes::DISTRIBUTED_BROKEN_BATCH_FILES - || (!remote_error && code == ErrorCodes::ATTEMPT_TO_READ_AFTER_EOF); - } + return pools; +} - /// Can the batch be split and send files from batch one-by-one instead? - bool isSplittableErrorCode(int code, bool remote) - { - return code == ErrorCodes::MEMORY_LIMIT_EXCEEDED - /// FunctionRange::max_elements and similar - || code == ErrorCodes::ARGUMENT_OUT_OF_BOUND - || code == ErrorCodes::TOO_MANY_PARTS - || code == ErrorCodes::TOO_MANY_BYTES - || code == ErrorCodes::TOO_MANY_ROWS_OR_BYTES - || code == ErrorCodes::TOO_MANY_PARTITIONS - || code == ErrorCodes::DISTRIBUTED_TOO_MANY_PENDING_BYTES - || code == ErrorCodes::DISTRIBUTED_BROKEN_BATCH_INFO - || isFileBrokenErrorCode(code, remote) - ; - } +uint64_t doubleToUInt64(double d) +{ + if (d >= static_cast(std::numeric_limits::max())) + return std::numeric_limits::max(); + return static_cast(d); +} - SyncGuardPtr getDirectorySyncGuard(bool dir_fsync, const DiskPtr & disk, const String & path) - { - if (dir_fsync) - return disk->getDirectorySyncGuard(path); - return nullptr; - } - - void writeAndConvert(RemoteInserter & remote, const DistributedAsyncInsertHeader & distributed_header, ReadBufferFromFile & in) - { - CompressedReadBuffer decompressing_in(in); - NativeReader block_in(decompressing_in, distributed_header.revision); - - while (Block block = block_in.read()) - { - auto converting_dag = ActionsDAG::makeConvertingActions( - block.cloneEmpty().getColumnsWithTypeAndName(), - remote.getHeader().getColumnsWithTypeAndName(), - ActionsDAG::MatchColumnsMode::Name); - - auto converting_actions = std::make_shared(std::move(converting_dag)); - converting_actions->execute(block); - remote.write(block); - } - } - - void writeRemoteConvert( - const DistributedAsyncInsertHeader & distributed_header, - RemoteInserter & remote, - bool compression_expected, - ReadBufferFromFile & in, - Poco::Logger * log) - { - if (!remote.getHeader()) - { - CheckingCompressedReadBuffer checking_in(in); - remote.writePrepared(checking_in); - return; - } - - /// This is old format, that does not have header for the block in the file header, - /// applying ConvertingTransform in this case is not a big overhead. - /// - /// Anyway we can get header only from the first block, which contain all rows anyway. - if (!distributed_header.block_header) - { - LOG_TRACE(log, "Processing batch {} with old format (no header)", in.getFileName()); - - writeAndConvert(remote, distributed_header, in); - return; - } - - if (!blocksHaveEqualStructure(distributed_header.block_header, remote.getHeader())) - { - LOG_WARNING(log, - "Structure does not match (remote: {}, local: {}), implicit conversion will be done", - remote.getHeader().dumpStructure(), distributed_header.block_header.dumpStructure()); - - writeAndConvert(remote, distributed_header, in); - return; - } - - /// If connection does not use compression, we have to uncompress the data. - if (!compression_expected) - { - writeAndConvert(remote, distributed_header, in); - return; - } - - if (distributed_header.revision != remote.getServerRevision()) - { - writeAndConvert(remote, distributed_header, in); - return; - } - - /// Otherwise write data as it was already prepared (more efficient path). - CheckingCompressedReadBuffer checking_in(in); - remote.writePrepared(checking_in); - } - - uint64_t doubleToUInt64(double d) - { - if (d >= static_cast(std::numeric_limits::max())) - return std::numeric_limits::max(); - return static_cast(d); - } } @@ -425,13 +200,15 @@ void StorageDistributedDirectoryMonitor::shutdownAndDropAllData() task_handle->deactivate(); } - auto dir_sync_guard = getDirectorySyncGuard(dir_fsync, disk, relative_path); + auto dir_sync_guard = getDirectorySyncGuard(relative_path); fs::remove_all(path); } void StorageDistributedDirectoryMonitor::run() { + constexpr const std::chrono::minutes decrease_error_count_period{5}; + std::lock_guard lock{mutex}; bool do_sleep = false; @@ -695,7 +472,7 @@ void StorageDistributedDirectoryMonitor::processFile(const std::string & file_pa thread_trace_context->root_span.addAttribute(std::current_exception()); e.addMessage(fmt::format("While sending {}", file_path)); - if (isFileBrokenErrorCode(e.code(), e.isRemoteException())) + if (isDistributedSendBroken(e.code(), e.isRemoteException())) { markAsBroken(file_path); current_file.clear(); @@ -710,7 +487,7 @@ void StorageDistributedDirectoryMonitor::processFile(const std::string & file_pa throw; } - auto dir_sync_guard = getDirectorySyncGuard(dir_fsync, disk, relative_path); + auto dir_sync_guard = getDirectorySyncGuard(relative_path); markAsSend(file_path); current_file.clear(); LOG_TRACE(log, "Finished processing `{}` (took {} ms)", file_path, watch.elapsedMilliseconds()); @@ -750,244 +527,6 @@ struct StorageDistributedDirectoryMonitor::BatchHeader }; }; -struct StorageDistributedDirectoryMonitor::Batch -{ - size_t total_rows = 0; - size_t total_bytes = 0; - /// Does the batch had been created from the files in current_batch.txt? - bool recovered = false; - - StorageDistributedDirectoryMonitor & parent; - std::vector files; - - bool split_batch_on_failure = true; - bool fsync = false; - bool dir_fsync = false; - - explicit Batch(StorageDistributedDirectoryMonitor & parent_) - : parent(parent_) - , split_batch_on_failure(parent.split_batch_on_failure) - , fsync(parent.storage.getDistributedSettingsRef().fsync_after_insert) - , dir_fsync(parent.dir_fsync) - {} - - bool isEnoughSize() const - { - return (!parent.min_batched_block_size_rows && !parent.min_batched_block_size_bytes) - || (parent.min_batched_block_size_rows && total_rows >= parent.min_batched_block_size_rows) - || (parent.min_batched_block_size_bytes && total_bytes >= parent.min_batched_block_size_bytes); - } - - void send() - { - if (files.empty()) - return; - - CurrentMetrics::Increment metric_increment{CurrentMetrics::DistributedSend}; - - Stopwatch watch; - - if (!recovered) - { - /// For deduplication in Replicated tables to work, in case of error - /// we must try to re-send exactly the same batches. - /// So we save contents of the current batch into the current_batch_file_path file - /// and truncate it afterwards if all went well. - serialize(); - } - - bool batch_broken = false; - bool batch_marked_as_broken = false; - try - { - try - { - sendBatch(); - } - catch (const Exception & e) - { - if (split_batch_on_failure && files.size() > 1 && isSplittableErrorCode(e.code(), e.isRemoteException())) - { - tryLogCurrentException(parent.log, "Trying to split batch due to"); - sendSeparateFiles(); - } - else - throw; - } - } - catch (Exception & e) - { - if (isFileBrokenErrorCode(e.code(), e.isRemoteException())) - { - tryLogCurrentException(parent.log, "Failed to send batch due to"); - batch_broken = true; - if (!e.isRemoteException() && e.code() == ErrorCodes::DISTRIBUTED_BROKEN_BATCH_FILES) - batch_marked_as_broken = true; - } - else - { - e.addMessage(fmt::format("While sending a batch of {} files, files: {}", files.size(), fmt::join(files, "\n"))); - throw; - } - } - - if (!batch_broken) - { - LOG_TRACE(parent.log, "Sent a batch of {} files (took {} ms).", files.size(), watch.elapsedMilliseconds()); - - auto dir_sync_guard = getDirectorySyncGuard(dir_fsync, parent.disk, parent.relative_path); - for (const auto & file : files) - parent.markAsSend(file); - } - else if (!batch_marked_as_broken) - { - LOG_ERROR(parent.log, "Marking a batch of {} files as broken, files: {}", files.size(), fmt::join(files, "\n")); - - for (const auto & file : files) - parent.markAsBroken(file); - } - - files.clear(); - total_rows = 0; - total_bytes = 0; - recovered = false; - - fs::resize_file(parent.current_batch_file_path, 0); - } - - void serialize() - { - /// Temporary file is required for atomicity. - String tmp_file{parent.current_batch_file_path + ".tmp"}; - - auto dir_sync_guard = getDirectorySyncGuard(dir_fsync, parent.disk, parent.relative_path); - if (fs::exists(tmp_file)) - LOG_ERROR(parent.log, "Temporary file {} exists. Unclean shutdown?", backQuote(tmp_file)); - - { - WriteBufferFromFile out{tmp_file, O_WRONLY | O_TRUNC | O_CREAT}; - writeText(out); - - out.finalize(); - if (fsync) - out.sync(); - } - - fs::rename(tmp_file, parent.current_batch_file_path); - } - - void deserialize() - { - ReadBufferFromFile in{parent.current_batch_file_path}; - readText(in); - } - -private: - void writeText(WriteBuffer & out) - { - for (const auto & file : files) - { - UInt64 file_index = parse(fs::path(file).stem()); - out << file_index << '\n'; - } - } - - void readText(ReadBuffer & in) - { - while (!in.eof()) - { - UInt64 idx; - in >> idx >> "\n"; - files.push_back(fs::absolute(fmt::format("{}/{}.bin", parent.path, idx)).string()); - } - - recovered = true; - } - - void sendBatch() - { - std::unique_ptr remote; - bool compression_expected = false; - - IConnectionPool::Entry connection; - - for (const auto & file : files) - { - ReadBufferFromFile in(file); - const auto & distributed_header = readDistributedAsyncInsertHeader(in, parent.log); - - OpenTelemetry::TracingContextHolder thread_trace_context(__PRETTY_FUNCTION__, - distributed_header.client_info.client_trace_context, - parent.storage.getContext()->getOpenTelemetrySpanLog()); - - if (!remote) - { - auto timeouts = ConnectionTimeouts::getTCPTimeoutsWithFailover(distributed_header.insert_settings); - connection = parent.pool->get(timeouts); - compression_expected = connection->getCompression() == Protocol::Compression::Enable; - - LOG_DEBUG(parent.log, "Sending a batch of {} files to {} ({} rows, {} bytes).", - files.size(), - connection->getDescription(), - formatReadableQuantity(total_rows), - formatReadableSizeWithBinarySuffix(total_bytes)); - - remote = std::make_unique(*connection, timeouts, - distributed_header.insert_query, - distributed_header.insert_settings, - distributed_header.client_info); - } - writeRemoteConvert(distributed_header, *remote, compression_expected, in, parent.log); - } - - if (remote) - remote->onFinish(); - } - - void sendSeparateFiles() - { - size_t broken_files = 0; - - for (const auto & file : files) - { - try - { - ReadBufferFromFile in(file); - const auto & distributed_header = readDistributedAsyncInsertHeader(in, parent.log); - - // this function is called in a separated thread, so we set up the trace context from the file - OpenTelemetry::TracingContextHolder thread_trace_context(__PRETTY_FUNCTION__, - distributed_header.client_info.client_trace_context, - parent.storage.getContext()->getOpenTelemetrySpanLog()); - - auto timeouts = ConnectionTimeouts::getTCPTimeoutsWithFailover(distributed_header.insert_settings); - auto connection = parent.pool->get(timeouts); - bool compression_expected = connection->getCompression() == Protocol::Compression::Enable; - - RemoteInserter remote(*connection, timeouts, - distributed_header.insert_query, - distributed_header.insert_settings, - distributed_header.client_info); - - writeRemoteConvert(distributed_header, remote, compression_expected, in, parent.log); - remote.onFinish(); - } - catch (Exception & e) - { - if (isFileBrokenErrorCode(e.code(), e.isRemoteException())) - { - parent.markAsBroken(file); - ++broken_files; - } - } - } - - if (broken_files) - throw Exception(ErrorCodes::DISTRIBUTED_BROKEN_BATCH_FILES, - "Failed to send {} files", broken_files); - } -}; - bool StorageDistributedDirectoryMonitor::addFileAndSchedule(const std::string & file_path, size_t file_size, size_t ms) { /// NOTE: It is better not to throw in this case, since the file is already @@ -1024,15 +563,15 @@ void StorageDistributedDirectoryMonitor::processFilesWithBatching() { LOG_DEBUG(log, "Restoring the batch"); - Batch batch(*this); + DistributedAsyncInsertBatch batch(*this); batch.deserialize(); batch.send(); - auto dir_sync_guard = getDirectorySyncGuard(dir_fsync, disk, relative_path); + auto dir_sync_guard = getDirectorySyncGuard(relative_path); fs::remove(current_batch_file_path); } - std::unordered_map header_to_batch; + std::unordered_map header_to_batch; std::string file_path; while (pending_files.tryPop(file_path)) @@ -1075,7 +614,7 @@ void StorageDistributedDirectoryMonitor::processFilesWithBatching() } catch (const Exception & e) { - if (isFileBrokenErrorCode(e.code(), e.isRemoteException())) + if (isDistributedSendBroken(e.code(), e.isRemoteException())) { markAsBroken(file_path); tryLogCurrentException(log, "File is marked broken due to"); @@ -1091,7 +630,7 @@ void StorageDistributedDirectoryMonitor::processFilesWithBatching() std::move(distributed_header.client_info), std::move(header) ); - Batch & batch = header_to_batch.try_emplace(batch_header, *this).first->second; + DistributedAsyncInsertBatch & batch = header_to_batch.try_emplace(batch_header, *this).first->second; batch.files.push_back(file_path); batch.total_rows += total_rows; @@ -1105,12 +644,12 @@ void StorageDistributedDirectoryMonitor::processFilesWithBatching() for (auto & kv : header_to_batch) { - Batch & batch = kv.second; + DistributedAsyncInsertBatch & batch = kv.second; batch.send(); } { - auto dir_sync_guard = getDirectorySyncGuard(dir_fsync, disk, relative_path); + auto dir_sync_guard = getDirectorySyncGuard(relative_path); /// current_batch.txt will not exist if there was no send /// (this is the case when all batches that was pending has been marked as pending) @@ -1123,8 +662,8 @@ void StorageDistributedDirectoryMonitor::markAsBroken(const std::string & file_p { const String & broken_file_path = fs::path(broken_path) / fs::path(file_path).filename(); - auto dir_sync_guard = getDirectorySyncGuard(dir_fsync, disk, relative_path); - auto broken_dir_sync_guard = getDirectorySyncGuard(dir_fsync, disk, broken_relative_path); + auto dir_sync_guard = getDirectorySyncGuard(relative_path); + auto broken_dir_sync_guard = getDirectorySyncGuard(broken_relative_path); { std::lock_guard status_lock(status_mutex); @@ -1158,6 +697,13 @@ void StorageDistributedDirectoryMonitor::markAsSend(const std::string & file_pat fs::remove(file_path); } +SyncGuardPtr StorageDistributedDirectoryMonitor::getDirectorySyncGuard(const std::string & dir_path) +{ + if (dir_fsync) + return disk->getDirectorySyncGuard(dir_path); + return nullptr; +} + std::string StorageDistributedDirectoryMonitor::getLoggerName() const { return storage.getStorageID().getFullTableName() + ".DirectoryMonitor." + disk->getName(); diff --git a/src/Storages/Distributed/DirectoryMonitor.h b/src/Storages/Distributed/DirectoryMonitor.h index 9b1596d45e3..8515f5a16a1 100644 --- a/src/Storages/Distributed/DirectoryMonitor.h +++ b/src/Storages/Distributed/DirectoryMonitor.h @@ -3,11 +3,11 @@ #include #include #include - +#include +#include #include #include #include -#include namespace CurrentMetrics { class Increment; } @@ -32,6 +32,8 @@ class ISource; */ class StorageDistributedDirectoryMonitor { + friend class DistributedAsyncInsertBatch; + public: StorageDistributedDirectoryMonitor( StorageDistributed & storage_, @@ -92,6 +94,8 @@ private: void markAsBroken(const std::string & file_path); void markAsSend(const std::string & file_path); + SyncGuardPtr getDirectorySyncGuard(const std::string & path); + std::string getLoggerName() const; StorageDistributed & storage; diff --git a/src/Storages/Distributed/DistributedAsyncInsertBatch.cpp b/src/Storages/Distributed/DistributedAsyncInsertBatch.cpp new file mode 100644 index 00000000000..5f9e78a72e2 --- /dev/null +++ b/src/Storages/Distributed/DistributedAsyncInsertBatch.cpp @@ -0,0 +1,277 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace +{ + +namespace fs = std::filesystem; + +} + +namespace CurrentMetrics +{ + extern const Metric DistributedSend; +} + +namespace DB +{ + +namespace ErrorCodes +{ + extern const int MEMORY_LIMIT_EXCEEDED; + extern const int DISTRIBUTED_BROKEN_BATCH_INFO; + extern const int DISTRIBUTED_BROKEN_BATCH_FILES; + extern const int TOO_MANY_PARTS; + extern const int TOO_MANY_BYTES; + extern const int TOO_MANY_ROWS_OR_BYTES; + extern const int TOO_MANY_PARTITIONS; + extern const int DISTRIBUTED_TOO_MANY_PENDING_BYTES; + extern const int ARGUMENT_OUT_OF_BOUND; +} + +/// Can the batch be split and send files from batch one-by-one instead? +bool isSplittableErrorCode(int code, bool remote) +{ + return code == ErrorCodes::MEMORY_LIMIT_EXCEEDED + /// FunctionRange::max_elements and similar + || code == ErrorCodes::ARGUMENT_OUT_OF_BOUND + || code == ErrorCodes::TOO_MANY_PARTS + || code == ErrorCodes::TOO_MANY_BYTES + || code == ErrorCodes::TOO_MANY_ROWS_OR_BYTES + || code == ErrorCodes::TOO_MANY_PARTITIONS + || code == ErrorCodes::DISTRIBUTED_TOO_MANY_PENDING_BYTES + || code == ErrorCodes::DISTRIBUTED_BROKEN_BATCH_INFO + || isDistributedSendBroken(code, remote) + ; +} + +DistributedAsyncInsertBatch::DistributedAsyncInsertBatch(StorageDistributedDirectoryMonitor & parent_) + : parent(parent_) + , split_batch_on_failure(parent.split_batch_on_failure) + , fsync(parent.storage.getDistributedSettingsRef().fsync_after_insert) + , dir_fsync(parent.dir_fsync) +{} + +bool DistributedAsyncInsertBatch::isEnoughSize() const +{ + return (!parent.min_batched_block_size_rows && !parent.min_batched_block_size_bytes) + || (parent.min_batched_block_size_rows && total_rows >= parent.min_batched_block_size_rows) + || (parent.min_batched_block_size_bytes && total_bytes >= parent.min_batched_block_size_bytes); +} + +void DistributedAsyncInsertBatch::send() +{ + if (files.empty()) + return; + + CurrentMetrics::Increment metric_increment{CurrentMetrics::DistributedSend}; + + Stopwatch watch; + + if (!recovered) + { + /// For deduplication in Replicated tables to work, in case of error + /// we must try to re-send exactly the same batches. + /// So we save contents of the current batch into the current_batch_file_path file + /// and truncate it afterwards if all went well. + serialize(); + } + + bool batch_broken = false; + bool batch_marked_as_broken = false; + try + { + try + { + sendBatch(); + } + catch (const Exception & e) + { + if (split_batch_on_failure && files.size() > 1 && isSplittableErrorCode(e.code(), e.isRemoteException())) + { + tryLogCurrentException(parent.log, "Trying to split batch due to"); + sendSeparateFiles(); + } + else + throw; + } + } + catch (Exception & e) + { + if (isDistributedSendBroken(e.code(), e.isRemoteException())) + { + tryLogCurrentException(parent.log, "Failed to send batch due to"); + batch_broken = true; + if (!e.isRemoteException() && e.code() == ErrorCodes::DISTRIBUTED_BROKEN_BATCH_FILES) + batch_marked_as_broken = true; + } + else + { + e.addMessage(fmt::format("While sending a batch of {} files, files: {}", files.size(), fmt::join(files, "\n"))); + throw; + } + } + + if (!batch_broken) + { + LOG_TRACE(parent.log, "Sent a batch of {} files (took {} ms).", files.size(), watch.elapsedMilliseconds()); + + auto dir_sync_guard = parent.getDirectorySyncGuard(parent.relative_path); + for (const auto & file : files) + parent.markAsSend(file); + } + else if (!batch_marked_as_broken) + { + LOG_ERROR(parent.log, "Marking a batch of {} files as broken, files: {}", files.size(), fmt::join(files, "\n")); + + for (const auto & file : files) + parent.markAsBroken(file); + } + + files.clear(); + total_rows = 0; + total_bytes = 0; + recovered = false; + + fs::resize_file(parent.current_batch_file_path, 0); +} + +void DistributedAsyncInsertBatch::serialize() +{ + /// Temporary file is required for atomicity. + String tmp_file{parent.current_batch_file_path + ".tmp"}; + + auto dir_sync_guard = parent.getDirectorySyncGuard(parent.relative_path); + if (fs::exists(tmp_file)) + LOG_ERROR(parent.log, "Temporary file {} exists. Unclean shutdown?", backQuote(tmp_file)); + + { + WriteBufferFromFile out{tmp_file, O_WRONLY | O_TRUNC | O_CREAT}; + writeText(out); + + out.finalize(); + if (fsync) + out.sync(); + } + + fs::rename(tmp_file, parent.current_batch_file_path); +} + +void DistributedAsyncInsertBatch::deserialize() +{ + ReadBufferFromFile in{parent.current_batch_file_path}; + readText(in); +} + +void DistributedAsyncInsertBatch::writeText(WriteBuffer & out) +{ + for (const auto & file : files) + { + UInt64 file_index = parse(fs::path(file).stem()); + out << file_index << '\n'; + } +} + +void DistributedAsyncInsertBatch::readText(ReadBuffer & in) +{ + while (!in.eof()) + { + UInt64 idx; + in >> idx >> "\n"; + files.push_back(fs::absolute(fmt::format("{}/{}.bin", parent.path, idx)).string()); + } + + recovered = true; +} + +void DistributedAsyncInsertBatch::sendBatch() +{ + std::unique_ptr remote; + bool compression_expected = false; + + IConnectionPool::Entry connection; + + for (const auto & file : files) + { + ReadBufferFromFile in(file); + const auto & distributed_header = readDistributedAsyncInsertHeader(in, parent.log); + + OpenTelemetry::TracingContextHolder thread_trace_context(__PRETTY_FUNCTION__, + distributed_header.client_info.client_trace_context, + parent.storage.getContext()->getOpenTelemetrySpanLog()); + + if (!remote) + { + auto timeouts = ConnectionTimeouts::getTCPTimeoutsWithFailover(distributed_header.insert_settings); + connection = parent.pool->get(timeouts); + compression_expected = connection->getCompression() == Protocol::Compression::Enable; + + LOG_DEBUG(parent.log, "Sending a batch of {} files to {} ({} rows, {} bytes).", + files.size(), + connection->getDescription(), + formatReadableQuantity(total_rows), + formatReadableSizeWithBinarySuffix(total_bytes)); + + remote = std::make_unique(*connection, timeouts, + distributed_header.insert_query, + distributed_header.insert_settings, + distributed_header.client_info); + } + writeRemoteConvert(distributed_header, *remote, compression_expected, in, parent.log); + } + + if (remote) + remote->onFinish(); +} + +void DistributedAsyncInsertBatch::sendSeparateFiles() +{ + size_t broken_files = 0; + + for (const auto & file : files) + { + try + { + ReadBufferFromFile in(file); + const auto & distributed_header = readDistributedAsyncInsertHeader(in, parent.log); + + // This function is called in a separated thread, so we set up the trace context from the file + OpenTelemetry::TracingContextHolder thread_trace_context(__PRETTY_FUNCTION__, + distributed_header.client_info.client_trace_context, + parent.storage.getContext()->getOpenTelemetrySpanLog()); + + auto timeouts = ConnectionTimeouts::getTCPTimeoutsWithFailover(distributed_header.insert_settings); + auto connection = parent.pool->get(timeouts); + bool compression_expected = connection->getCompression() == Protocol::Compression::Enable; + + RemoteInserter remote(*connection, timeouts, + distributed_header.insert_query, + distributed_header.insert_settings, + distributed_header.client_info); + + writeRemoteConvert(distributed_header, remote, compression_expected, in, parent.log); + remote.onFinish(); + } + catch (Exception & e) + { + if (isDistributedSendBroken(e.code(), e.isRemoteException())) + { + parent.markAsBroken(file); + ++broken_files; + } + } + } + + if (broken_files) + throw Exception(ErrorCodes::DISTRIBUTED_BROKEN_BATCH_FILES, + "Failed to send {} files", broken_files); +} + +} diff --git a/src/Storages/Distributed/DistributedAsyncInsertBatch.h b/src/Storages/Distributed/DistributedAsyncInsertBatch.h new file mode 100644 index 00000000000..8b3320155fa --- /dev/null +++ b/src/Storages/Distributed/DistributedAsyncInsertBatch.h @@ -0,0 +1,44 @@ +#pragma once + +#include +#include + +namespace DB +{ + +class StorageDistributedDirectoryMonitor; +class WriteBuffer; +class ReadBuffer; + +class DistributedAsyncInsertBatch +{ +public: + explicit DistributedAsyncInsertBatch(StorageDistributedDirectoryMonitor & parent_); + + bool isEnoughSize() const; + void send(); + + void serialize(); + void deserialize(); + + size_t total_rows = 0; + size_t total_bytes = 0; + std::vector files; + +private: + void writeText(WriteBuffer & out); + void readText(ReadBuffer & in); + void sendBatch(); + void sendSeparateFiles(); + + StorageDistributedDirectoryMonitor & parent; + + /// Does the batch had been created from the files in current_batch.txt? + bool recovered = false; + + bool split_batch_on_failure = true; + bool fsync = false; + bool dir_fsync = false; +}; + +} diff --git a/src/Storages/Distributed/DistributedAsyncInsertHelpers.cpp b/src/Storages/Distributed/DistributedAsyncInsertHelpers.cpp new file mode 100644 index 00000000000..98073ba1e08 --- /dev/null +++ b/src/Storages/Distributed/DistributedAsyncInsertHelpers.cpp @@ -0,0 +1,124 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace DB +{ + +namespace ErrorCodes +{ + extern const int CANNOT_READ_ALL_DATA; + extern const int UNKNOWN_CODEC; + extern const int CANNOT_DECOMPRESS; + extern const int CHECKSUM_DOESNT_MATCH; + extern const int TOO_LARGE_SIZE_COMPRESSED; + extern const int ATTEMPT_TO_READ_AFTER_EOF; + extern const int EMPTY_DATA_PASSED; + extern const int DISTRIBUTED_BROKEN_BATCH_INFO; + extern const int DISTRIBUTED_BROKEN_BATCH_FILES; +} + +/// 'remote_error' argument is used to decide whether some errors should be +/// ignored or not, in particular: +/// +/// - ATTEMPT_TO_READ_AFTER_EOF should not be ignored +/// if we receive it from remote (receiver), since: +/// - the sender will got ATTEMPT_TO_READ_AFTER_EOF when the client just go away, +/// i.e. server had been restarted +/// - since #18853 the file will be checked on the sender locally, and +/// if there is something wrong with the file itself, we will receive +/// ATTEMPT_TO_READ_AFTER_EOF not from the remote at first +/// and mark batch as broken. +bool isDistributedSendBroken(int code, bool remote_error) +{ + return code == ErrorCodes::CHECKSUM_DOESNT_MATCH + || code == ErrorCodes::EMPTY_DATA_PASSED + || code == ErrorCodes::TOO_LARGE_SIZE_COMPRESSED + || code == ErrorCodes::CANNOT_READ_ALL_DATA + || code == ErrorCodes::UNKNOWN_CODEC + || code == ErrorCodes::CANNOT_DECOMPRESS + || code == ErrorCodes::DISTRIBUTED_BROKEN_BATCH_INFO + || code == ErrorCodes::DISTRIBUTED_BROKEN_BATCH_FILES + || (!remote_error && code == ErrorCodes::ATTEMPT_TO_READ_AFTER_EOF); +} + +void writeAndConvert(RemoteInserter & remote, const DistributedAsyncInsertHeader & distributed_header, ReadBufferFromFile & in) +{ + CompressedReadBuffer decompressing_in(in); + NativeReader block_in(decompressing_in, distributed_header.revision); + + while (Block block = block_in.read()) + { + auto converting_dag = ActionsDAG::makeConvertingActions( + block.cloneEmpty().getColumnsWithTypeAndName(), + remote.getHeader().getColumnsWithTypeAndName(), + ActionsDAG::MatchColumnsMode::Name); + + auto converting_actions = std::make_shared(std::move(converting_dag)); + converting_actions->execute(block); + remote.write(block); + } +} + +void writeRemoteConvert( + const DistributedAsyncInsertHeader & distributed_header, + RemoteInserter & remote, + bool compression_expected, + ReadBufferFromFile & in, + Poco::Logger * log) +{ + if (!remote.getHeader()) + { + CheckingCompressedReadBuffer checking_in(in); + remote.writePrepared(checking_in); + return; + } + + /// This is old format, that does not have header for the block in the file header, + /// applying ConvertingTransform in this case is not a big overhead. + /// + /// Anyway we can get header only from the first block, which contain all rows anyway. + if (!distributed_header.block_header) + { + LOG_TRACE(log, "Processing batch {} with old format (no header)", in.getFileName()); + + writeAndConvert(remote, distributed_header, in); + return; + } + + if (!blocksHaveEqualStructure(distributed_header.block_header, remote.getHeader())) + { + LOG_WARNING(log, + "Structure does not match (remote: {}, local: {}), implicit conversion will be done", + remote.getHeader().dumpStructure(), distributed_header.block_header.dumpStructure()); + + writeAndConvert(remote, distributed_header, in); + return; + } + + /// If connection does not use compression, we have to uncompress the data. + if (!compression_expected) + { + writeAndConvert(remote, distributed_header, in); + return; + } + + if (distributed_header.revision != remote.getServerRevision()) + { + writeAndConvert(remote, distributed_header, in); + return; + } + + /// Otherwise write data as it was already prepared (more efficient path). + CheckingCompressedReadBuffer checking_in(in); + remote.writePrepared(checking_in); +} + +} diff --git a/src/Storages/Distributed/DistributedAsyncInsertHelpers.h b/src/Storages/Distributed/DistributedAsyncInsertHelpers.h new file mode 100644 index 00000000000..9543450418c --- /dev/null +++ b/src/Storages/Distributed/DistributedAsyncInsertHelpers.h @@ -0,0 +1,35 @@ +#pragma once + +namespace Poco +{ +class Logger; +} + +namespace DB +{ + +struct DistributedAsyncInsertHeader; +class ReadBufferFromFile; +class RemoteInserter; + +/// 'remote_error' argument is used to decide whether some errors should be +/// ignored or not, in particular: +/// +/// - ATTEMPT_TO_READ_AFTER_EOF should not be ignored +/// if we receive it from remote (receiver), since: +/// - the sender will got ATTEMPT_TO_READ_AFTER_EOF when the client just go away, +/// i.e. server had been restarted +/// - since #18853 the file will be checked on the sender locally, and +/// if there is something wrong with the file itself, we will receive +/// ATTEMPT_TO_READ_AFTER_EOF not from the remote at first +/// and mark batch as broken. +bool isDistributedSendBroken(int code, bool remote_error); + +void writeRemoteConvert( + const DistributedAsyncInsertHeader & distributed_header, + RemoteInserter & remote, + bool compression_expected, + ReadBufferFromFile & in, + Poco::Logger * log); + +} diff --git a/src/Storages/StorageDistributed.h b/src/Storages/StorageDistributed.h index 25a752fe795..432aee047e8 100644 --- a/src/Storages/StorageDistributed.h +++ b/src/Storages/StorageDistributed.h @@ -38,6 +38,7 @@ using ExpressionActionsPtr = std::shared_ptr; class StorageDistributed final : public IStorage, WithContext { friend class DistributedSink; + friend class DistributedAsyncInsertBatch; friend class StorageDistributedDirectoryMonitor; friend class StorageSystemDistributionQueue; From b5434eac3b189a6c588dbc17fba43e180809ed07 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 21 Jan 2023 18:55:14 +0100 Subject: [PATCH 308/841] Rename StorageDistributedDirectoryMonitor to DistributedAsyncInsertDirectoryQueue Since #44922 it is not a directory monitor anymore. v2: Remove unused error codes v3: Contains some header fixes due to conflicts with master Signed-off-by: Azat Khuzhin --- src/Loggers/OwnSplitChannel.cpp | 2 +- .../DistributedAsyncInsertBatch.cpp | 4 +- .../Distributed/DistributedAsyncInsertBatch.h | 6 +- ... DistributedAsyncInsertDirectoryQueue.cpp} | 66 +++++++------------ ...=> DistributedAsyncInsertDirectoryQueue.h} | 25 +++++-- src/Storages/Distributed/DistributedSink.cpp | 4 +- src/Storages/StorageDistributed.cpp | 22 +++---- src/Storages/StorageDistributed.h | 14 ++-- .../System/StorageSystemDistributionQueue.cpp | 3 +- src/TableFunctions/ITableFunctionFileLike.cpp | 1 - ...etry_insert_on_distributed_table.reference | 4 +- 11 files changed, 71 insertions(+), 80 deletions(-) rename src/Storages/Distributed/{DirectoryMonitor.cpp => DistributedAsyncInsertDirectoryQueue.cpp} (90%) rename src/Storages/Distributed/{DirectoryMonitor.h => DistributedAsyncInsertDirectoryQueue.h} (81%) diff --git a/src/Loggers/OwnSplitChannel.cpp b/src/Loggers/OwnSplitChannel.cpp index 7974d5212e1..7a7456823ed 100644 --- a/src/Loggers/OwnSplitChannel.cpp +++ b/src/Loggers/OwnSplitChannel.cpp @@ -56,7 +56,7 @@ void OwnSplitChannel::tryLogSplit(const Poco::Message & msg) /// breaking some functionality because of unexpected "File not /// found" (or similar) error. /// - /// For example StorageDistributedDirectoryMonitor will mark batch + /// For example DistributedAsyncInsertDirectoryQueue will mark batch /// as broken, some MergeTree code can also be affected. /// /// Also note, that we cannot log the exception here, since this diff --git a/src/Storages/Distributed/DistributedAsyncInsertBatch.cpp b/src/Storages/Distributed/DistributedAsyncInsertBatch.cpp index 5f9e78a72e2..80350600caa 100644 --- a/src/Storages/Distributed/DistributedAsyncInsertBatch.cpp +++ b/src/Storages/Distributed/DistributedAsyncInsertBatch.cpp @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include #include #include @@ -52,7 +52,7 @@ bool isSplittableErrorCode(int code, bool remote) ; } -DistributedAsyncInsertBatch::DistributedAsyncInsertBatch(StorageDistributedDirectoryMonitor & parent_) +DistributedAsyncInsertBatch::DistributedAsyncInsertBatch(DistributedAsyncInsertDirectoryQueue & parent_) : parent(parent_) , split_batch_on_failure(parent.split_batch_on_failure) , fsync(parent.storage.getDistributedSettingsRef().fsync_after_insert) diff --git a/src/Storages/Distributed/DistributedAsyncInsertBatch.h b/src/Storages/Distributed/DistributedAsyncInsertBatch.h index 8b3320155fa..867a0de89fa 100644 --- a/src/Storages/Distributed/DistributedAsyncInsertBatch.h +++ b/src/Storages/Distributed/DistributedAsyncInsertBatch.h @@ -6,14 +6,14 @@ namespace DB { -class StorageDistributedDirectoryMonitor; +class DistributedAsyncInsertDirectoryQueue; class WriteBuffer; class ReadBuffer; class DistributedAsyncInsertBatch { public: - explicit DistributedAsyncInsertBatch(StorageDistributedDirectoryMonitor & parent_); + explicit DistributedAsyncInsertBatch(DistributedAsyncInsertDirectoryQueue & parent_); bool isEnoughSize() const; void send(); @@ -31,7 +31,7 @@ private: void sendBatch(); void sendSeparateFiles(); - StorageDistributedDirectoryMonitor & parent; + DistributedAsyncInsertDirectoryQueue & parent; /// Does the batch had been created from the files in current_batch.txt? bool recovered = false; diff --git a/src/Storages/Distributed/DirectoryMonitor.cpp b/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp similarity index 90% rename from src/Storages/Distributed/DirectoryMonitor.cpp rename to src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp index d5091003cb3..2d25c1822d8 100644 --- a/src/Storages/Distributed/DirectoryMonitor.cpp +++ b/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include #include #include @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include @@ -22,19 +21,9 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include +#include +#include #include #include #include @@ -56,15 +45,6 @@ namespace DB namespace ErrorCodes { extern const int INCORRECT_FILE_NAME; - extern const int MEMORY_LIMIT_EXCEEDED; - extern const int DISTRIBUTED_BROKEN_BATCH_INFO; - extern const int DISTRIBUTED_BROKEN_BATCH_FILES; - extern const int TOO_MANY_PARTS; - extern const int TOO_MANY_BYTES; - extern const int TOO_MANY_ROWS_OR_BYTES; - extern const int TOO_MANY_PARTITIONS; - extern const int DISTRIBUTED_TOO_MANY_PENDING_BYTES; - extern const int ARGUMENT_OUT_OF_BOUND; extern const int LOGICAL_ERROR; } @@ -132,7 +112,7 @@ uint64_t doubleToUInt64(double d) } -StorageDistributedDirectoryMonitor::StorageDistributedDirectoryMonitor( +DistributedAsyncInsertDirectoryQueue::DistributedAsyncInsertDirectoryQueue( StorageDistributed & storage_, const DiskPtr & disk_, const std::string & relative_path_, @@ -172,7 +152,7 @@ StorageDistributedDirectoryMonitor::StorageDistributedDirectoryMonitor( } -StorageDistributedDirectoryMonitor::~StorageDistributedDirectoryMonitor() +DistributedAsyncInsertDirectoryQueue::~DistributedAsyncInsertDirectoryQueue() { if (!pending_files.isFinished()) { @@ -181,7 +161,7 @@ StorageDistributedDirectoryMonitor::~StorageDistributedDirectoryMonitor() } } -void StorageDistributedDirectoryMonitor::flushAllData() +void DistributedAsyncInsertDirectoryQueue::flushAllData() { if (pending_files.isFinished()) return; @@ -192,7 +172,7 @@ void StorageDistributedDirectoryMonitor::flushAllData() processFiles(); } -void StorageDistributedDirectoryMonitor::shutdownAndDropAllData() +void DistributedAsyncInsertDirectoryQueue::shutdownAndDropAllData() { if (!pending_files.isFinished()) { @@ -205,7 +185,7 @@ void StorageDistributedDirectoryMonitor::shutdownAndDropAllData() } -void StorageDistributedDirectoryMonitor::run() +void DistributedAsyncInsertDirectoryQueue::run() { constexpr const std::chrono::minutes decrease_error_count_period{5}; @@ -271,7 +251,7 @@ void StorageDistributedDirectoryMonitor::run() } -ConnectionPoolPtr StorageDistributedDirectoryMonitor::createPool(const std::string & name, const StorageDistributed & storage) +ConnectionPoolPtr DistributedAsyncInsertDirectoryQueue::createPool(const std::string & name, const StorageDistributed & storage) { const auto pool_factory = [&storage, &name] (const Cluster::Address & address) -> ConnectionPoolPtr { @@ -344,18 +324,18 @@ ConnectionPoolPtr StorageDistributedDirectoryMonitor::createPool(const std::stri settings.distributed_replica_error_cap); } -bool StorageDistributedDirectoryMonitor::hasPendingFiles() const +bool DistributedAsyncInsertDirectoryQueue::hasPendingFiles() const { return fs::exists(current_batch_file_path) || !current_file.empty() || !pending_files.empty(); } -void StorageDistributedDirectoryMonitor::addFile(const std::string & file_path) +void DistributedAsyncInsertDirectoryQueue::addFile(const std::string & file_path) { if (!pending_files.push(fs::absolute(file_path).string())) throw Exception(ErrorCodes::LOGICAL_ERROR, "Cannot schedule a file '{}'", file_path); } -void StorageDistributedDirectoryMonitor::initializeFilesFromDisk() +void DistributedAsyncInsertDirectoryQueue::initializeFilesFromDisk() { /// NOTE: This method does not requires to hold status_mutex, hence, no TSA /// annotations in the header file. @@ -413,7 +393,7 @@ void StorageDistributedDirectoryMonitor::initializeFilesFromDisk() status.broken_bytes_count = broken_bytes_count; } } -void StorageDistributedDirectoryMonitor::processFiles() +void DistributedAsyncInsertDirectoryQueue::processFiles() { if (should_batch_inserts) processFilesWithBatching(); @@ -428,7 +408,7 @@ void StorageDistributedDirectoryMonitor::processFiles() } } -void StorageDistributedDirectoryMonitor::processFile(const std::string & file_path) +void DistributedAsyncInsertDirectoryQueue::processFile(const std::string & file_path) { OpenTelemetry::TracingContextHolderPtr thread_trace_context; @@ -493,7 +473,7 @@ void StorageDistributedDirectoryMonitor::processFile(const std::string & file_pa LOG_TRACE(log, "Finished processing `{}` (took {} ms)", file_path, watch.elapsedMilliseconds()); } -struct StorageDistributedDirectoryMonitor::BatchHeader +struct DistributedAsyncInsertDirectoryQueue::BatchHeader { Settings settings; String query; @@ -527,7 +507,7 @@ struct StorageDistributedDirectoryMonitor::BatchHeader }; }; -bool StorageDistributedDirectoryMonitor::addFileAndSchedule(const std::string & file_path, size_t file_size, size_t ms) +bool DistributedAsyncInsertDirectoryQueue::addFileAndSchedule(const std::string & file_path, size_t file_size, size_t ms) { /// NOTE: It is better not to throw in this case, since the file is already /// on disk (see DistributedSink), and it will be processed next time. @@ -549,14 +529,14 @@ bool StorageDistributedDirectoryMonitor::addFileAndSchedule(const std::string & return task_handle->scheduleAfter(ms, false); } -StorageDistributedDirectoryMonitor::Status StorageDistributedDirectoryMonitor::getStatus() +DistributedAsyncInsertDirectoryQueue::Status DistributedAsyncInsertDirectoryQueue::getStatus() { std::lock_guard status_lock(status_mutex); Status current_status{status, path, monitor_blocker.isCancelled()}; return current_status; } -void StorageDistributedDirectoryMonitor::processFilesWithBatching() +void DistributedAsyncInsertDirectoryQueue::processFilesWithBatching() { /// Possibly, we failed to send a batch on the previous iteration. Try to send exactly the same batch. if (fs::exists(current_batch_file_path)) @@ -658,7 +638,7 @@ void StorageDistributedDirectoryMonitor::processFilesWithBatching() } } -void StorageDistributedDirectoryMonitor::markAsBroken(const std::string & file_path) +void DistributedAsyncInsertDirectoryQueue::markAsBroken(const std::string & file_path) { const String & broken_file_path = fs::path(broken_path) / fs::path(file_path).filename(); @@ -683,7 +663,7 @@ void StorageDistributedDirectoryMonitor::markAsBroken(const std::string & file_p LOG_ERROR(log, "Renamed `{}` to `{}`", file_path, broken_file_path); } -void StorageDistributedDirectoryMonitor::markAsSend(const std::string & file_path) +void DistributedAsyncInsertDirectoryQueue::markAsSend(const std::string & file_path) { size_t file_size = fs::file_size(file_path); @@ -697,19 +677,19 @@ void StorageDistributedDirectoryMonitor::markAsSend(const std::string & file_pat fs::remove(file_path); } -SyncGuardPtr StorageDistributedDirectoryMonitor::getDirectorySyncGuard(const std::string & dir_path) +SyncGuardPtr DistributedAsyncInsertDirectoryQueue::getDirectorySyncGuard(const std::string & dir_path) { if (dir_fsync) return disk->getDirectorySyncGuard(dir_path); return nullptr; } -std::string StorageDistributedDirectoryMonitor::getLoggerName() const +std::string DistributedAsyncInsertDirectoryQueue::getLoggerName() const { return storage.getStorageID().getFullTableName() + ".DirectoryMonitor." + disk->getName(); } -void StorageDistributedDirectoryMonitor::updatePath(const std::string & new_relative_path) +void DistributedAsyncInsertDirectoryQueue::updatePath(const std::string & new_relative_path) { task_handle->deactivate(); std::lock_guard lock{mutex}; diff --git a/src/Storages/Distributed/DirectoryMonitor.h b/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.h similarity index 81% rename from src/Storages/Distributed/DirectoryMonitor.h rename to src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.h index 8515f5a16a1..90e3d563b4b 100644 --- a/src/Storages/Distributed/DirectoryMonitor.h +++ b/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.h @@ -27,15 +27,28 @@ using ProcessorPtr = std::shared_ptr; class ISource; -/** Details of StorageDistributed. - * This type is not designed for standalone use. - */ -class StorageDistributedDirectoryMonitor +/** Queue for async INSERT Into Distributed engine (insert_distributed_sync=0). + * + * Files are added from two places: + * - from filesystem at startup (StorageDistributed::startup()) + * - on INSERT via DistributedSink + * + * Later, in background, those files will be send to the remote nodes. + * + * The behaviour of this queue can be configured via the following settings: + * - distributed_directory_monitor_batch_inserts + * - distributed_directory_monitor_split_batch_on_failure + * - distributed_directory_monitor_sleep_time_ms + * - distributed_directory_monitor_max_sleep_time_ms + * NOTE: It worth to rename the settings too + * ("directory_monitor" in settings looks too internal). + */ +class DistributedAsyncInsertDirectoryQueue { friend class DistributedAsyncInsertBatch; public: - StorageDistributedDirectoryMonitor( + DistributedAsyncInsertDirectoryQueue( StorageDistributed & storage_, const DiskPtr & disk_, const std::string & relative_path_, @@ -44,7 +57,7 @@ public: BackgroundSchedulePool & bg_pool, bool initialize_from_disk); - ~StorageDistributedDirectoryMonitor(); + ~DistributedAsyncInsertDirectoryQueue(); static ConnectionPoolPtr createPool(const std::string & name, const StorageDistributed & storage); diff --git a/src/Storages/Distributed/DistributedSink.cpp b/src/Storages/Distributed/DistributedSink.cpp index c9c235596db..38aa26fbe0c 100644 --- a/src/Storages/Distributed/DistributedSink.cpp +++ b/src/Storages/Distributed/DistributedSink.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include #include @@ -834,7 +834,7 @@ void DistributedSink::writeToShard(const Cluster::ShardInfo & shard_info, const const auto & dir_name = dir_names[i]; const auto & bin_file = bin_files[i]; - auto & directory_monitor = storage.requireDirectoryMonitor(disk, dir_name, /* startup= */ false); + auto & directory_monitor = storage.getDirectoryQueue(disk, dir_name, /* startup= */ false); directory_monitor.addFileAndSchedule(bin_file, file_size, sleep_ms.totalMilliseconds()); } } diff --git a/src/Storages/StorageDistributed.cpp b/src/Storages/StorageDistributed.cpp index a38beef983c..d95c703216e 100644 --- a/src/Storages/StorageDistributed.cpp +++ b/src/Storages/StorageDistributed.cpp @@ -1094,7 +1094,7 @@ void StorageDistributed::initializeFromDisk() { pool.scheduleOrThrowOnError([&]() { - createDirectoryMonitors(disk); + initializeDirectoryQueuesForDisk(disk); }); } pool.wait(); @@ -1133,7 +1133,7 @@ void StorageDistributed::shutdown() void StorageDistributed::drop() { // Some INSERT in-between shutdown() and drop() can call - // requireDirectoryMonitor() again, so call shutdown() to clear them, but + // getDirectoryQueue() again, so call shutdown() to clear them, but // when the drop() (this function) executed none of INSERT is allowed in // parallel. // @@ -1196,7 +1196,7 @@ StoragePolicyPtr StorageDistributed::getStoragePolicy() const return storage_policy; } -void StorageDistributed::createDirectoryMonitors(const DiskPtr & disk) +void StorageDistributed::initializeDirectoryQueuesForDisk(const DiskPtr & disk) { const std::string path(disk->getPath() + relative_data_path); fs::create_directories(path); @@ -1225,14 +1225,14 @@ void StorageDistributed::createDirectoryMonitors(const DiskPtr & disk) } else { - requireDirectoryMonitor(disk, dir_path.filename().string(), /* startup= */ true); + getDirectoryQueue(disk, dir_path.filename().string(), /* startup= */ true); } } } } -StorageDistributedDirectoryMonitor& StorageDistributed::requireDirectoryMonitor(const DiskPtr & disk, const std::string & name, bool startup) +DistributedAsyncInsertDirectoryQueue & StorageDistributed::getDirectoryQueue(const DiskPtr & disk, const std::string & name, bool startup) { const std::string & disk_path = disk->getPath(); const std::string key(disk_path + name); @@ -1241,8 +1241,8 @@ StorageDistributedDirectoryMonitor& StorageDistributed::requireDirectoryMonitor( auto & node_data = cluster_nodes_data[key]; if (!node_data.directory_monitor) { - node_data.connection_pool = StorageDistributedDirectoryMonitor::createPool(name, *this); - node_data.directory_monitor = std::make_unique( + node_data.connection_pool = DistributedAsyncInsertDirectoryQueue::createPool(name, *this); + node_data.directory_monitor = std::make_unique( *this, disk, relative_data_path + name, node_data.connection_pool, monitors_blocker, @@ -1252,9 +1252,9 @@ StorageDistributedDirectoryMonitor& StorageDistributed::requireDirectoryMonitor( return *node_data.directory_monitor; } -std::vector StorageDistributed::getDirectoryMonitorsStatuses() const +std::vector StorageDistributed::getDirectoryQueueStatuses() const { - std::vector statuses; + std::vector statuses; std::lock_guard lock(cluster_nodes_mutex); statuses.reserve(cluster_nodes_data.size()); for (const auto & node : cluster_nodes_data) @@ -1265,7 +1265,7 @@ std::vector StorageDistributed::getD std::optional StorageDistributed::totalBytes(const Settings &) const { UInt64 total_bytes = 0; - for (const auto & status : getDirectoryMonitorsStatuses()) + for (const auto & status : getDirectoryQueueStatuses()) total_bytes += status.bytes_count; return total_bytes; } @@ -1426,7 +1426,7 @@ void StorageDistributed::flushClusterNodesAllData(ContextPtr local_context) /// Sync SYSTEM FLUSH DISTRIBUTED with TRUNCATE auto table_lock = lockForShare(local_context->getCurrentQueryId(), local_context->getSettingsRef().lock_acquire_timeout); - std::vector> directory_monitors; + std::vector> directory_monitors; { std::lock_guard lock(cluster_nodes_mutex); diff --git a/src/Storages/StorageDistributed.h b/src/Storages/StorageDistributed.h index 432aee047e8..df4c16f0f67 100644 --- a/src/Storages/StorageDistributed.h +++ b/src/Storages/StorageDistributed.h @@ -2,7 +2,7 @@ #include #include -#include +#include #include #include #include @@ -39,7 +39,7 @@ class StorageDistributed final : public IStorage, WithContext { friend class DistributedSink; friend class DistributedAsyncInsertBatch; - friend class StorageDistributedDirectoryMonitor; + friend class DistributedAsyncInsertDirectoryQueue; friend class StorageSystemDistributionQueue; public: @@ -165,15 +165,15 @@ private: const String & getRelativeDataPath() const { return relative_data_path; } /// create directory monitors for each existing subdirectory - void createDirectoryMonitors(const DiskPtr & disk); - /// ensure directory monitor thread and connectoin pool creation by disk and subdirectory name - StorageDistributedDirectoryMonitor & requireDirectoryMonitor(const DiskPtr & disk, const std::string & name, bool startup); + void initializeDirectoryQueuesForDisk(const DiskPtr & disk); + /// ensure directory queue thread and connection pool created by disk and subdirectory name + DistributedAsyncInsertDirectoryQueue & getDirectoryQueue(const DiskPtr & disk, const std::string & name, bool startup); /// Return list of metrics for all created monitors /// (note that monitors are created lazily, i.e. until at least one INSERT executed) /// /// Used by StorageSystemDistributionQueue - std::vector getDirectoryMonitorsStatuses() const; + std::vector getDirectoryQueueStatuses() const; static IColumn::Selector createSelector(ClusterPtr cluster, const ColumnWithTypeAndName & result); /// Apply the following settings: @@ -248,7 +248,7 @@ private: struct ClusterNodeData { - std::shared_ptr directory_monitor; + std::shared_ptr directory_monitor; ConnectionPoolPtr connection_pool; }; std::unordered_map cluster_nodes_data; diff --git a/src/Storages/System/StorageSystemDistributionQueue.cpp b/src/Storages/System/StorageSystemDistributionQueue.cpp index 34cff7df65d..d57269f0638 100644 --- a/src/Storages/System/StorageSystemDistributionQueue.cpp +++ b/src/Storages/System/StorageSystemDistributionQueue.cpp @@ -3,7 +3,6 @@ #include #include #include -#include #include #include #include @@ -174,7 +173,7 @@ void StorageSystemDistributionQueue::fillData(MutableColumns & res_columns, Cont auto & distributed_table = dynamic_cast(*tables[database][table]); - for (const auto & status : distributed_table.getDirectoryMonitorsStatuses()) + for (const auto & status : distributed_table.getDirectoryQueueStatuses()) { size_t col_num = 0; res_columns[col_num++]->insert(database); diff --git a/src/TableFunctions/ITableFunctionFileLike.cpp b/src/TableFunctions/ITableFunctionFileLike.cpp index 8cbffc10e5a..bbaf2b68418 100644 --- a/src/TableFunctions/ITableFunctionFileLike.cpp +++ b/src/TableFunctions/ITableFunctionFileLike.cpp @@ -7,7 +7,6 @@ #include #include -#include #include #include diff --git a/tests/queries/0_stateless/02417_opentelemetry_insert_on_distributed_table.reference b/tests/queries/0_stateless/02417_opentelemetry_insert_on_distributed_table.reference index dde07d4540d..81a1f62ca29 100644 --- a/tests/queries/0_stateless/02417_opentelemetry_insert_on_distributed_table.reference +++ b/tests/queries/0_stateless/02417_opentelemetry_insert_on_distributed_table.reference @@ -1,7 +1,7 @@ {"operation_name":"void DB::DistributedSink::writeToLocal(const Cluster::ShardInfo &, const DB::Block &, size_t)","cluster":"test_cluster_two_shards_localhost","shard":"1","rows":"1","bytes":"8"} {"operation_name":"void DB::DistributedSink::writeToLocal(const Cluster::ShardInfo &, const DB::Block &, size_t)","cluster":"test_cluster_two_shards_localhost","shard":"2","rows":"1","bytes":"8"} -{"operation_name":"void DB::StorageDistributedDirectoryMonitor::processFile(const std::string &)","cluster":"test_cluster_two_shards_localhost","shard":"1","rows":"1","bytes":"8"} -{"operation_name":"void DB::StorageDistributedDirectoryMonitor::processFile(const std::string &)","cluster":"test_cluster_two_shards_localhost","shard":"2","rows":"1","bytes":"8"} +{"operation_name":"void DB::DistributedAsyncInsertDirectoryQueue::processFile(const std::string &)","cluster":"test_cluster_two_shards_localhost","shard":"1","rows":"1","bytes":"8"} +{"operation_name":"void DB::DistributedAsyncInsertDirectoryQueue::processFile(const std::string &)","cluster":"test_cluster_two_shards_localhost","shard":"2","rows":"1","bytes":"8"} {"operation_name":"auto DB::DistributedSink::runWritingJob(DB::DistributedSink::JobReplica &, const DB::Block &, size_t)::(anonymous class)::operator()() const","cluster":"test_cluster_two_shards_localhost","shard":"1","rows":"1","bytes":"8"} {"operation_name":"auto DB::DistributedSink::runWritingJob(DB::DistributedSink::JobReplica &, const DB::Block &, size_t)::(anonymous class)::operator()() const","cluster":"test_cluster_two_shards_localhost","shard":"2","rows":"1","bytes":"8"} {"operation_name":"auto DB::DistributedSink::runWritingJob(DB::DistributedSink::JobReplica &, const DB::Block &, size_t)::(anonymous class)::operator()() const","cluster":"test_cluster_two_shards_localhost","shard":"1","rows":"1","bytes":"8"} From e10fb142fd124455b12d0b359c9866f0349ef26c Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 21 Jan 2023 20:37:12 +0100 Subject: [PATCH 309/841] Fix race for distributed sends from disk Before it was initialized from disk only on startup, but if some INSERT can create the object before, then, it will lead to the situation when it will not be initialized. Signed-off-by: Azat Khuzhin --- .../DistributedAsyncInsertDirectoryQueue.cpp | 6 +-- .../DistributedAsyncInsertDirectoryQueue.h | 3 +- src/Storages/Distributed/DistributedSink.cpp | 38 +++++++++---------- src/Storages/StorageDistributed.cpp | 7 ++-- src/Storages/StorageDistributed.h | 8 +++- 5 files changed, 30 insertions(+), 32 deletions(-) diff --git a/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp b/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp index 2d25c1822d8..3993e9065d5 100644 --- a/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp +++ b/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp @@ -118,8 +118,7 @@ DistributedAsyncInsertDirectoryQueue::DistributedAsyncInsertDirectoryQueue( const std::string & relative_path_, ConnectionPoolPtr pool_, ActionBlocker & monitor_blocker_, - BackgroundSchedulePool & bg_pool, - bool initialize_from_disk) + BackgroundSchedulePool & bg_pool) : storage(storage_) , pool(std::move(pool_)) , disk(disk_) @@ -144,8 +143,7 @@ DistributedAsyncInsertDirectoryQueue::DistributedAsyncInsertDirectoryQueue( { fs::create_directory(broken_path); - if (initialize_from_disk) - initializeFilesFromDisk(); + initializeFilesFromDisk(); task_handle = bg_pool.createTask(getLoggerName() + "/Bg", [this]{ run(); }); task_handle->activateAndSchedule(); diff --git a/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.h b/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.h index 90e3d563b4b..de8bb813824 100644 --- a/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.h +++ b/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.h @@ -54,8 +54,7 @@ public: const std::string & relative_path_, ConnectionPoolPtr pool_, ActionBlocker & monitor_blocker_, - BackgroundSchedulePool & bg_pool, - bool initialize_from_disk); + BackgroundSchedulePool & bg_pool); ~DistributedAsyncInsertDirectoryQueue(); diff --git a/src/Storages/Distributed/DistributedSink.cpp b/src/Storages/Distributed/DistributedSink.cpp index 38aa26fbe0c..3c4e493c34a 100644 --- a/src/Storages/Distributed/DistributedSink.cpp +++ b/src/Storages/Distributed/DistributedSink.cpp @@ -724,8 +724,8 @@ void DistributedSink::writeToShard(const Cluster::ShardInfo & shard_info, const return guard; }; - std::vector bin_files; - bin_files.reserve(dir_names.size()); + auto sleep_ms = context->getSettingsRef().distributed_directory_monitor_sleep_time_ms.totalMilliseconds(); + size_t file_size; auto it = dir_names.begin(); /// on first iteration write block to a temporary directory for subsequent @@ -804,10 +804,16 @@ void DistributedSink::writeToShard(const Cluster::ShardInfo & shard_info, const out.sync(); } + file_size = fs::file_size(first_file_tmp_path); + // Create hardlink here to reuse increment number - bin_files.push_back(fs::path(path) / file_name); - createHardLink(first_file_tmp_path, bin_files.back()); - auto dir_sync_guard = make_directory_sync_guard(*it); + auto bin_file = (fs::path(path) / file_name).string(); + auto & directory_queue = storage.getDirectoryQueue(disk, *it); + { + createHardLink(first_file_tmp_path, bin_file); + auto dir_sync_guard = make_directory_sync_guard(*it); + } + directory_queue.addFileAndSchedule(bin_file, file_size, sleep_ms); } ++it; @@ -817,26 +823,18 @@ void DistributedSink::writeToShard(const Cluster::ShardInfo & shard_info, const const std::string path(fs::path(disk_path) / (data_path + *it)); fs::create_directory(path); - bin_files.push_back(fs::path(path) / (toString(storage.file_names_increment.get()) + ".bin")); - createHardLink(first_file_tmp_path, bin_files.back()); - auto dir_sync_guard = make_directory_sync_guard(*it); + auto bin_file = (fs::path(path) / (toString(storage.file_names_increment.get()) + ".bin")).string(); + auto & directory_monitor = storage.getDirectoryQueue(disk, *it); + { + createHardLink(first_file_tmp_path, bin_file); + auto dir_sync_guard = make_directory_sync_guard(*it); + } + directory_monitor.addFileAndSchedule(bin_file, file_size, sleep_ms); } - auto file_size = fs::file_size(first_file_tmp_path); /// remove the temporary file, enabling the OS to reclaim inode after all threads /// have removed their corresponding files fs::remove(first_file_tmp_path); - - /// Notify - auto sleep_ms = context->getSettingsRef().distributed_directory_monitor_sleep_time_ms; - for (size_t i = 0; i < dir_names.size(); ++i) - { - const auto & dir_name = dir_names[i]; - const auto & bin_file = bin_files[i]; - - auto & directory_monitor = storage.getDirectoryQueue(disk, dir_name, /* startup= */ false); - directory_monitor.addFileAndSchedule(bin_file, file_size, sleep_ms.totalMilliseconds()); - } } } diff --git a/src/Storages/StorageDistributed.cpp b/src/Storages/StorageDistributed.cpp index d95c703216e..9f674ce3bed 100644 --- a/src/Storages/StorageDistributed.cpp +++ b/src/Storages/StorageDistributed.cpp @@ -1225,14 +1225,14 @@ void StorageDistributed::initializeDirectoryQueuesForDisk(const DiskPtr & disk) } else { - getDirectoryQueue(disk, dir_path.filename().string(), /* startup= */ true); + getDirectoryQueue(disk, dir_path.filename().string()); } } } } -DistributedAsyncInsertDirectoryQueue & StorageDistributed::getDirectoryQueue(const DiskPtr & disk, const std::string & name, bool startup) +DistributedAsyncInsertDirectoryQueue & StorageDistributed::getDirectoryQueue(const DiskPtr & disk, const std::string & name) { const std::string & disk_path = disk->getPath(); const std::string key(disk_path + name); @@ -1246,8 +1246,7 @@ DistributedAsyncInsertDirectoryQueue & StorageDistributed::getDirectoryQueue(con *this, disk, relative_data_path + name, node_data.connection_pool, monitors_blocker, - getContext()->getDistributedSchedulePool(), - /* initialize_from_disk= */ startup); + getContext()->getDistributedSchedulePool()); } return *node_data.directory_monitor; } diff --git a/src/Storages/StorageDistributed.h b/src/Storages/StorageDistributed.h index df4c16f0f67..3a7fae44708 100644 --- a/src/Storages/StorageDistributed.h +++ b/src/Storages/StorageDistributed.h @@ -166,8 +166,12 @@ private: /// create directory monitors for each existing subdirectory void initializeDirectoryQueuesForDisk(const DiskPtr & disk); - /// ensure directory queue thread and connection pool created by disk and subdirectory name - DistributedAsyncInsertDirectoryQueue & getDirectoryQueue(const DiskPtr & disk, const std::string & name, bool startup); + + /// Get directory queue thread and connection pool created by disk and subdirectory name + /// + /// Used for the INSERT into Distributed in case of insert_distributed_sync==1, from DistributedSink. + DistributedAsyncInsertDirectoryQueue & getDirectoryQueue(const DiskPtr & disk, const std::string & name); + /// Return list of metrics for all created monitors /// (note that monitors are created lazily, i.e. until at least one INSERT executed) From e83699a8d3b72de7ab5ca3295dcabc59492a7fc4 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 21 Jan 2023 20:51:04 +0100 Subject: [PATCH 310/841] Improve comment for DistributedAsyncInsertDirectoryQueue::initializeFilesFromDisk() Signed-off-by: Azat Khuzhin --- .../Distributed/DistributedAsyncInsertDirectoryQueue.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp b/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp index 3993e9065d5..6530ebc578a 100644 --- a/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp +++ b/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp @@ -335,8 +335,9 @@ void DistributedAsyncInsertDirectoryQueue::addFile(const std::string & file_path void DistributedAsyncInsertDirectoryQueue::initializeFilesFromDisk() { - /// NOTE: This method does not requires to hold status_mutex, hence, no TSA - /// annotations in the header file. + /// NOTE: This method does not requires to hold status_mutex (because this + /// object is not in the list that the caller may iterate over), hence, no + /// TSA annotations in the header file. fs::directory_iterator end; From a76d7b22c1ff11c775986cef17d91c500ca9e7ce Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 21 Jan 2023 20:51:16 +0100 Subject: [PATCH 311/841] Use existing public methods of StorageDistributed in DistributedSink Signed-off-by: Azat Khuzhin --- src/Storages/Distributed/DistributedSink.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Storages/Distributed/DistributedSink.cpp b/src/Storages/Distributed/DistributedSink.cpp index 3c4e493c34a..14febb1a2b4 100644 --- a/src/Storages/Distributed/DistributedSink.cpp +++ b/src/Storages/Distributed/DistributedSink.cpp @@ -340,9 +340,9 @@ DistributedSink::runWritingJob(JobReplica & job, const Block & current_block, si size_t rows = shard_block.rows(); span.addAttribute("clickhouse.shard_num", shard_info.shard_num); - span.addAttribute("clickhouse.cluster", this->storage.cluster_name); - span.addAttribute("clickhouse.distributed", this->storage.getStorageID().getFullNameNotQuoted()); - span.addAttribute("clickhouse.remote", [this]() { return storage.remote_database + "." + storage.remote_table; }); + span.addAttribute("clickhouse.cluster", storage.cluster_name); + span.addAttribute("clickhouse.distributed", storage.getStorageID().getFullNameNotQuoted()); + span.addAttribute("clickhouse.remote", [this]() { return storage.getRemoteDatabaseName() + "." + storage.getRemoteTableName(); }); span.addAttribute("clickhouse.rows", rows); span.addAttribute("clickhouse.bytes", [&shard_block]() { return toString(shard_block.bytes()); }); @@ -476,7 +476,7 @@ void DistributedSink::writeSync(const Block & block) span.addAttribute("clickhouse.start_shard", start); span.addAttribute("clickhouse.end_shard", end); - span.addAttribute("db.statement", this->query_string); + span.addAttribute("db.statement", query_string); if (num_shards > 1) { @@ -659,9 +659,9 @@ void DistributedSink::writeToLocal(const Cluster::ShardInfo & shard_info, const { OpenTelemetry::SpanHolder span(__PRETTY_FUNCTION__); span.addAttribute("clickhouse.shard_num", shard_info.shard_num); - span.addAttribute("clickhouse.cluster", this->storage.cluster_name); - span.addAttribute("clickhouse.distributed", this->storage.getStorageID().getFullNameNotQuoted()); - span.addAttribute("clickhouse.remote", [this]() { return storage.remote_database + "." + storage.remote_table; }); + span.addAttribute("clickhouse.cluster", storage.cluster_name); + span.addAttribute("clickhouse.distributed", storage.getStorageID().getFullNameNotQuoted()); + span.addAttribute("clickhouse.remote", [this]() { return storage.getRemoteDatabaseName() + "." + storage.getRemoteTableName(); }); span.addAttribute("clickhouse.rows", [&block]() { return toString(block.rows()); }); span.addAttribute("clickhouse.bytes", [&block]() { return toString(block.bytes()); }); @@ -782,9 +782,9 @@ void DistributedSink::writeToShard(const Cluster::ShardInfo & shard_info, const } writeVarUInt(shard_info.shard_num, header_buf); - writeStringBinary(this->storage.cluster_name, header_buf); - writeStringBinary(this->storage.getStorageID().getFullNameNotQuoted(), header_buf); - writeStringBinary(this->storage.remote_database + "." + this->storage.remote_table, header_buf); + writeStringBinary(storage.cluster_name, header_buf); + writeStringBinary(storage.getStorageID().getFullNameNotQuoted(), header_buf); + writeStringBinary(storage.getRemoteDatabaseName() + "." + storage.getRemoteTableName(), header_buf); /// Add new fields here, for example: /// writeVarUInt(my_new_data, header_buf); From 00115c6615c311faffc40d24476c1ef51d40312c Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 21 Jan 2023 20:54:49 +0100 Subject: [PATCH 312/841] Rename readDistributedAsyncInsertHeader() Signed-off-by: Azat Khuzhin --- src/Storages/Distributed/DistributedAsyncInsertBatch.cpp | 4 ++-- .../Distributed/DistributedAsyncInsertDirectoryQueue.cpp | 4 ++-- src/Storages/Distributed/DistributedAsyncInsertHeader.cpp | 2 +- src/Storages/Distributed/DistributedAsyncInsertHeader.h | 4 ++-- src/Storages/Distributed/DistributedAsyncInsertSource.cpp | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Storages/Distributed/DistributedAsyncInsertBatch.cpp b/src/Storages/Distributed/DistributedAsyncInsertBatch.cpp index 80350600caa..948b4186ec6 100644 --- a/src/Storages/Distributed/DistributedAsyncInsertBatch.cpp +++ b/src/Storages/Distributed/DistributedAsyncInsertBatch.cpp @@ -201,7 +201,7 @@ void DistributedAsyncInsertBatch::sendBatch() for (const auto & file : files) { ReadBufferFromFile in(file); - const auto & distributed_header = readDistributedAsyncInsertHeader(in, parent.log); + const auto & distributed_header = DistributedAsyncInsertHeader::read(in, parent.log); OpenTelemetry::TracingContextHolder thread_trace_context(__PRETTY_FUNCTION__, distributed_header.client_info.client_trace_context, @@ -240,7 +240,7 @@ void DistributedAsyncInsertBatch::sendSeparateFiles() try { ReadBufferFromFile in(file); - const auto & distributed_header = readDistributedAsyncInsertHeader(in, parent.log); + const auto & distributed_header = DistributedAsyncInsertHeader::read(in, parent.log); // This function is called in a separated thread, so we set up the trace context from the file OpenTelemetry::TracingContextHolder thread_trace_context(__PRETTY_FUNCTION__, diff --git a/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp b/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp index 6530ebc578a..b58096182ec 100644 --- a/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp +++ b/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp @@ -417,7 +417,7 @@ void DistributedAsyncInsertDirectoryQueue::processFile(const std::string & file_ CurrentMetrics::Increment metric_increment{CurrentMetrics::DistributedSend}; ReadBufferFromFile in(file_path); - const auto & distributed_header = readDistributedAsyncInsertHeader(in, log); + const auto & distributed_header = DistributedAsyncInsertHeader::read(in, log); thread_trace_context = std::make_unique(__PRETTY_FUNCTION__, distributed_header.client_info.client_trace_context, @@ -563,7 +563,7 @@ void DistributedAsyncInsertDirectoryQueue::processFilesWithBatching() { /// Determine metadata of the current file and check if it is not broken. ReadBufferFromFile in{file_path}; - distributed_header = readDistributedAsyncInsertHeader(in, log); + distributed_header = DistributedAsyncInsertHeader::read(in, log); if (distributed_header.rows) { diff --git a/src/Storages/Distributed/DistributedAsyncInsertHeader.cpp b/src/Storages/Distributed/DistributedAsyncInsertHeader.cpp index 19235c91cc6..9584d1eebdf 100644 --- a/src/Storages/Distributed/DistributedAsyncInsertHeader.cpp +++ b/src/Storages/Distributed/DistributedAsyncInsertHeader.cpp @@ -17,7 +17,7 @@ namespace ErrorCodes extern const int CHECKSUM_DOESNT_MATCH; } -DistributedAsyncInsertHeader readDistributedAsyncInsertHeader(ReadBufferFromFile & in, Poco::Logger * log) +DistributedAsyncInsertHeader DistributedAsyncInsertHeader::read(ReadBufferFromFile & in, Poco::Logger * log) { DistributedAsyncInsertHeader distributed_header; diff --git a/src/Storages/Distributed/DistributedAsyncInsertHeader.h b/src/Storages/Distributed/DistributedAsyncInsertHeader.h index 2c7a6477b6c..dc048107a47 100644 --- a/src/Storages/Distributed/DistributedAsyncInsertHeader.h +++ b/src/Storages/Distributed/DistributedAsyncInsertHeader.h @@ -31,8 +31,8 @@ struct DistributedAsyncInsertHeader /// dumpStructure() of the header -- obsolete std::string block_header_string; Block block_header; + + static DistributedAsyncInsertHeader read(ReadBufferFromFile & in, Poco::Logger * log); }; -DistributedAsyncInsertHeader readDistributedAsyncInsertHeader(ReadBufferFromFile & in, Poco::Logger * log); - } diff --git a/src/Storages/Distributed/DistributedAsyncInsertSource.cpp b/src/Storages/Distributed/DistributedAsyncInsertSource.cpp index 782cbf9c026..7992636ac11 100644 --- a/src/Storages/Distributed/DistributedAsyncInsertSource.cpp +++ b/src/Storages/Distributed/DistributedAsyncInsertSource.cpp @@ -22,7 +22,7 @@ struct DistributedAsyncInsertSource::Data : log(&Poco::Logger::get("DistributedAsyncInsertSource")) , in(file_name) , decompressing_in(in) - , block_in(decompressing_in, readDistributedAsyncInsertHeader(in, log).revision) + , block_in(decompressing_in, DistributedAsyncInsertHeader::read(in, log).revision) , first_block(block_in.read()) { } From 263c042c6aa6103e5be221fe36c83be593056ac6 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 21 Jan 2023 21:01:54 +0100 Subject: [PATCH 313/841] Fix opentelemetry for distributed batch sends Signed-off-by: Azat Khuzhin --- .../DistributedAsyncInsertBatch.cpp | 79 ++++++++++++------- .../DistributedAsyncInsertDirectoryQueue.cpp | 12 +-- .../DistributedAsyncInsertHeader.cpp | 16 ++++ .../DistributedAsyncInsertHeader.h | 7 ++ 4 files changed, 77 insertions(+), 37 deletions(-) diff --git a/src/Storages/Distributed/DistributedAsyncInsertBatch.cpp b/src/Storages/Distributed/DistributedAsyncInsertBatch.cpp index 948b4186ec6..10bf9b8d66e 100644 --- a/src/Storages/Distributed/DistributedAsyncInsertBatch.cpp +++ b/src/Storages/Distributed/DistributedAsyncInsertBatch.cpp @@ -198,37 +198,59 @@ void DistributedAsyncInsertBatch::sendBatch() IConnectionPool::Entry connection; - for (const auto & file : files) + /// Since the batch is sent as a whole (in case of failure, the whole batch + /// will be repeated), we need to mark the whole batch as failed in case of + /// error). + std::vector tracing_contexts; + UInt64 batch_start_time = clock_gettime_ns(); + + try { - ReadBufferFromFile in(file); - const auto & distributed_header = DistributedAsyncInsertHeader::read(in, parent.log); - - OpenTelemetry::TracingContextHolder thread_trace_context(__PRETTY_FUNCTION__, - distributed_header.client_info.client_trace_context, - parent.storage.getContext()->getOpenTelemetrySpanLog()); - - if (!remote) + for (const auto & file : files) { - auto timeouts = ConnectionTimeouts::getTCPTimeoutsWithFailover(distributed_header.insert_settings); - connection = parent.pool->get(timeouts); - compression_expected = connection->getCompression() == Protocol::Compression::Enable; + ReadBufferFromFile in(file); + const auto & distributed_header = DistributedAsyncInsertHeader::read(in, parent.log); - LOG_DEBUG(parent.log, "Sending a batch of {} files to {} ({} rows, {} bytes).", - files.size(), - connection->getDescription(), - formatReadableQuantity(total_rows), - formatReadableSizeWithBinarySuffix(total_bytes)); + tracing_contexts.emplace_back(distributed_header.createTracingContextHolder( + parent.storage.getContext()->getOpenTelemetrySpanLog())); + tracing_contexts.back()->root_span.addAttribute("clickhouse.distributed_batch_start_time", batch_start_time); - remote = std::make_unique(*connection, timeouts, - distributed_header.insert_query, - distributed_header.insert_settings, - distributed_header.client_info); + if (!remote) + { + auto timeouts = ConnectionTimeouts::getTCPTimeoutsWithFailover(distributed_header.insert_settings); + connection = parent.pool->get(timeouts); + compression_expected = connection->getCompression() == Protocol::Compression::Enable; + + LOG_DEBUG(parent.log, "Sending a batch of {} files to {} ({} rows, {} bytes).", + files.size(), + connection->getDescription(), + formatReadableQuantity(total_rows), + formatReadableSizeWithBinarySuffix(total_bytes)); + + remote = std::make_unique(*connection, timeouts, + distributed_header.insert_query, + distributed_header.insert_settings, + distributed_header.client_info); + } + writeRemoteConvert(distributed_header, *remote, compression_expected, in, parent.log); } - writeRemoteConvert(distributed_header, *remote, compression_expected, in, parent.log); - } - if (remote) - remote->onFinish(); + if (remote) + remote->onFinish(); + } + catch (...) + { + try + { + for (auto & tracing_context : tracing_contexts) + tracing_context->root_span.addAttribute(std::current_exception()); + } + catch (...) + { + tryLogCurrentException(parent.log, "Cannot append exception to tracing context"); + } + throw; + } } void DistributedAsyncInsertBatch::sendSeparateFiles() @@ -237,14 +259,15 @@ void DistributedAsyncInsertBatch::sendSeparateFiles() for (const auto & file : files) { + OpenTelemetry::TracingContextHolderPtr trace_context; + try { ReadBufferFromFile in(file); const auto & distributed_header = DistributedAsyncInsertHeader::read(in, parent.log); // This function is called in a separated thread, so we set up the trace context from the file - OpenTelemetry::TracingContextHolder thread_trace_context(__PRETTY_FUNCTION__, - distributed_header.client_info.client_trace_context, + trace_context = distributed_header.createTracingContextHolder( parent.storage.getContext()->getOpenTelemetrySpanLog()); auto timeouts = ConnectionTimeouts::getTCPTimeoutsWithFailover(distributed_header.insert_settings); @@ -261,6 +284,8 @@ void DistributedAsyncInsertBatch::sendSeparateFiles() } catch (Exception & e) { + trace_context->root_span.addAttribute(std::current_exception()); + if (isDistributedSendBroken(e.code(), e.isRemoteException())) { parent.markAsBroken(file); diff --git a/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp b/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp index b58096182ec..31c621571ab 100644 --- a/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp +++ b/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp @@ -418,16 +418,8 @@ void DistributedAsyncInsertDirectoryQueue::processFile(const std::string & file_ ReadBufferFromFile in(file_path); const auto & distributed_header = DistributedAsyncInsertHeader::read(in, log); - - thread_trace_context = std::make_unique(__PRETTY_FUNCTION__, - distributed_header.client_info.client_trace_context, - this->storage.getContext()->getOpenTelemetrySpanLog()); - thread_trace_context->root_span.addAttribute("clickhouse.shard_num", distributed_header.shard_num); - thread_trace_context->root_span.addAttribute("clickhouse.cluster", distributed_header.cluster); - thread_trace_context->root_span.addAttribute("clickhouse.distributed", distributed_header.distributed_table); - thread_trace_context->root_span.addAttribute("clickhouse.remote", distributed_header.remote_table); - thread_trace_context->root_span.addAttribute("clickhouse.rows", distributed_header.rows); - thread_trace_context->root_span.addAttribute("clickhouse.bytes", distributed_header.bytes); + thread_trace_context = + distributed_header.createTracingContextHolder(storage.getContext()->getOpenTelemetrySpanLog()); auto timeouts = ConnectionTimeouts::getTCPTimeoutsWithFailover(distributed_header.insert_settings); auto connection = pool->get(timeouts, &distributed_header.insert_settings); diff --git a/src/Storages/Distributed/DistributedAsyncInsertHeader.cpp b/src/Storages/Distributed/DistributedAsyncInsertHeader.cpp index 9584d1eebdf..b5c16558eb2 100644 --- a/src/Storages/Distributed/DistributedAsyncInsertHeader.cpp +++ b/src/Storages/Distributed/DistributedAsyncInsertHeader.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include @@ -106,4 +107,19 @@ DistributedAsyncInsertHeader DistributedAsyncInsertHeader::read(ReadBufferFromFi return distributed_header; } +OpenTelemetry::TracingContextHolderPtr DistributedAsyncInsertHeader::createTracingContextHolder(std::shared_ptr open_telemetry_span_log) const +{ + OpenTelemetry::TracingContextHolderPtr trace_context = std::make_unique( + __PRETTY_FUNCTION__, + client_info.client_trace_context, + std::move(open_telemetry_span_log)); + trace_context->root_span.addAttribute("clickhouse.shard_num", shard_num); + trace_context->root_span.addAttribute("clickhouse.cluster", cluster); + trace_context->root_span.addAttribute("clickhouse.distributed", distributed_table); + trace_context->root_span.addAttribute("clickhouse.remote", remote_table); + trace_context->root_span.addAttribute("clickhouse.rows", rows); + trace_context->root_span.addAttribute("clickhouse.bytes", bytes); + return trace_context; +} + } diff --git a/src/Storages/Distributed/DistributedAsyncInsertHeader.h b/src/Storages/Distributed/DistributedAsyncInsertHeader.h index dc048107a47..dfc059d7083 100644 --- a/src/Storages/Distributed/DistributedAsyncInsertHeader.h +++ b/src/Storages/Distributed/DistributedAsyncInsertHeader.h @@ -11,6 +11,12 @@ namespace DB class ReadBufferFromFile; +namespace OpenTelemetry +{ +struct TracingContextHolder; +using TracingContextHolderPtr = std::unique_ptr; +} + /// Header for the binary files that are stored on disk for async INSERT into Distributed. struct DistributedAsyncInsertHeader { @@ -33,6 +39,7 @@ struct DistributedAsyncInsertHeader Block block_header; static DistributedAsyncInsertHeader read(ReadBufferFromFile & in, Poco::Logger * log); + OpenTelemetry::TracingContextHolderPtr createTracingContextHolder(std::shared_ptr open_telemetry_span_log) const; }; } From 572dd76eae2b9e3090e07c388c6baa142a095a57 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 21 Jan 2023 21:53:01 +0100 Subject: [PATCH 314/841] Extend ConcurrentBoundedQueue to deque Signed-off-by: Azat Khuzhin --- src/Common/ConcurrentBoundedQueue.h | 59 +++++++++++++++++++---------- 1 file changed, 39 insertions(+), 20 deletions(-) diff --git a/src/Common/ConcurrentBoundedQueue.h b/src/Common/ConcurrentBoundedQueue.h index fd4a2d5790b..665be69a28f 100644 --- a/src/Common/ConcurrentBoundedQueue.h +++ b/src/Common/ConcurrentBoundedQueue.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include #include @@ -18,7 +18,8 @@ template class ConcurrentBoundedQueue { private: - std::queue queue; + using Container = std::deque; + Container queue; mutable std::mutex queue_mutex; std::condition_variable push_condition; @@ -28,7 +29,7 @@ private: size_t max_fill = 0; - template + template bool emplaceImpl(std::optional timeout_milliseconds, Args &&...args) { { @@ -51,13 +52,17 @@ private: if (is_finished) return false; - queue.emplace(std::forward(args)...); + if constexpr (back) + queue.emplace_back(std::forward(args)...); + else + queue.emplace_front(std::forward(args)...); } pop_condition.notify_one(); return true; } + template bool popImpl(T & x, std::optional timeout_milliseconds) { { @@ -80,8 +85,16 @@ private: if (is_finished && queue.empty()) return false; - detail::moveOrCopyIfThrow(std::move(queue.front()), x); - queue.pop(); + if constexpr (front) + { + detail::moveOrCopyIfThrow(std::move(queue.front()), x); + queue.pop_front(); + } + else + { + detail::moveOrCopyIfThrow(std::move(queue.back()), x); + queue.pop_back(); + } } push_condition.notify_one(); @@ -94,6 +107,12 @@ public: : max_fill(max_fill_) {} + /// Returns false if queue is finished + [[nodiscard]] bool pushFront(const T & x) + { + return emplaceImpl(/* timeout_milliseconds= */ std::nullopt , x); + } + /// Returns false if queue is finished [[nodiscard]] bool push(const T & x) { @@ -109,37 +128,37 @@ public: template [[nodiscard]] bool emplace(Args &&... args) { - return emplaceImpl(std::nullopt /* timeout in milliseconds */, std::forward(args...)); - } - - /// Returns false if queue is finished and empty - [[nodiscard]] bool pop(T & x) - { - return popImpl(x, std::nullopt /*timeout in milliseconds*/); + return emplaceImpl(std::nullopt /* timeout in milliseconds */, std::forward(args...)); } /// Returns false if queue is finished or object was not pushed during timeout [[nodiscard]] bool tryPush(const T & x, UInt64 milliseconds = 0) { - return emplaceImpl(milliseconds, x); + return emplaceImpl(milliseconds, x); } [[nodiscard]] bool tryPush(T && x, UInt64 milliseconds = 0) { - return emplaceImpl(milliseconds, std::move(x)); + return emplaceImpl(milliseconds, std::move(x)); } /// Returns false if queue is finished or object was not emplaced during timeout template [[nodiscard]] bool tryEmplace(UInt64 milliseconds, Args &&... args) { - return emplaceImpl(milliseconds, std::forward(args...)); + return emplaceImpl(milliseconds, std::forward(args...)); + } + + /// Returns false if queue is finished and empty + [[nodiscard]] bool pop(T & x) + { + return popImpl(x, std::nullopt /*timeout in milliseconds*/); } /// Returns false if queue is (finished and empty) or (object was not popped during timeout) [[nodiscard]] bool tryPop(T & x, UInt64 milliseconds) { - return popImpl(x, milliseconds); + return popImpl(x, milliseconds); } /// Returns false if queue is empty. @@ -153,7 +172,7 @@ public: return false; detail::moveOrCopyIfThrow(std::move(queue.front()), x); - queue.pop(); + queue.pop_front(); } push_condition.notify_one(); @@ -222,7 +241,7 @@ public: if (is_finished) return; - std::queue empty_queue; + Container empty_queue; queue.swap(empty_queue); } @@ -235,7 +254,7 @@ public: { std::lock_guard lock(queue_mutex); - std::queue empty_queue; + Container empty_queue; queue.swap(empty_queue); is_finished = true; } From 752d27d663afd9b1b7ce384e9b9b84bf9f4e370e Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 21 Jan 2023 22:00:57 +0100 Subject: [PATCH 315/841] Fix lossing files during distributed batch send v2: do not suppress exceptions in case of errors Signed-off-by: Azat Khuzhin --- .../DistributedAsyncInsertDirectoryQueue.cpp | 128 ++++++++++-------- 1 file changed, 73 insertions(+), 55 deletions(-) diff --git a/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp b/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp index 31c621571ab..32d1823b289 100644 --- a/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp +++ b/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp @@ -545,78 +545,96 @@ void DistributedAsyncInsertDirectoryQueue::processFilesWithBatching() std::unordered_map header_to_batch; std::string file_path; - while (pending_files.tryPop(file_path)) + + try { - size_t total_rows = 0; - size_t total_bytes = 0; - Block header; - DistributedAsyncInsertHeader distributed_header; - try + while (pending_files.tryPop(file_path)) { - /// Determine metadata of the current file and check if it is not broken. - ReadBufferFromFile in{file_path}; - distributed_header = DistributedAsyncInsertHeader::read(in, log); - - if (distributed_header.rows) + size_t total_rows = 0; + size_t total_bytes = 0; + Block header; + DistributedAsyncInsertHeader distributed_header; + try { - total_rows += distributed_header.rows; - total_bytes += distributed_header.bytes; - } + /// Determine metadata of the current file and check if it is not broken. + ReadBufferFromFile in{file_path}; + distributed_header = DistributedAsyncInsertHeader::read(in, log); - if (distributed_header.block_header) - header = distributed_header.block_header; - - if (!total_rows || !header) - { - LOG_DEBUG(log, "Processing batch {} with old format (no header/rows)", in.getFileName()); - - CompressedReadBuffer decompressing_in(in); - NativeReader block_in(decompressing_in, distributed_header.revision); - - while (Block block = block_in.read()) + if (distributed_header.rows) { - total_rows += block.rows(); - total_bytes += block.bytes(); + total_rows += distributed_header.rows; + total_bytes += distributed_header.bytes; + } - if (!header) - header = block.cloneEmpty(); + if (distributed_header.block_header) + header = distributed_header.block_header; + + if (!total_rows || !header) + { + LOG_DEBUG(log, "Processing batch {} with old format (no header/rows)", in.getFileName()); + + CompressedReadBuffer decompressing_in(in); + NativeReader block_in(decompressing_in, distributed_header.revision); + + while (Block block = block_in.read()) + { + total_rows += block.rows(); + total_bytes += block.bytes(); + + if (!header) + header = block.cloneEmpty(); + } } } - } - catch (const Exception & e) - { - if (isDistributedSendBroken(e.code(), e.isRemoteException())) + catch (const Exception & e) { - markAsBroken(file_path); - tryLogCurrentException(log, "File is marked broken due to"); - continue; + if (isDistributedSendBroken(e.code(), e.isRemoteException())) + { + markAsBroken(file_path); + tryLogCurrentException(log, "File is marked broken due to"); + continue; + } + else + throw; + } + + BatchHeader batch_header( + std::move(distributed_header.insert_settings), + std::move(distributed_header.insert_query), + std::move(distributed_header.client_info), + std::move(header) + ); + DistributedAsyncInsertBatch & batch = header_to_batch.try_emplace(batch_header, *this).first->second; + + batch.files.push_back(file_path); + batch.total_rows += total_rows; + batch.total_bytes += total_bytes; + + if (batch.isEnoughSize()) + { + batch.send(); } - else - throw; } - BatchHeader batch_header( - std::move(distributed_header.insert_settings), - std::move(distributed_header.insert_query), - std::move(distributed_header.client_info), - std::move(header) - ); - DistributedAsyncInsertBatch & batch = header_to_batch.try_emplace(batch_header, *this).first->second; - - batch.files.push_back(file_path); - batch.total_rows += total_rows; - batch.total_bytes += total_bytes; - - if (batch.isEnoughSize()) + for (auto & kv : header_to_batch) { + DistributedAsyncInsertBatch & batch = kv.second; batch.send(); } } - - for (auto & kv : header_to_batch) + catch (...) { - DistributedAsyncInsertBatch & batch = kv.second; - batch.send(); + /// Revert uncommitted files. + for (const auto & [_, batch] : header_to_batch) + { + for (const auto & file : batch.files) + { + if (!pending_files.pushFront(file)) + throw Exception(ErrorCodes::LOGICAL_ERROR, "Cannot re-schedule a file '{}'", file); + } + } + /// Rethrow exception + throw; } { From 16bfef3c8ae2f2af3f8a680ae6f4ed4e871ba6cd Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 21 Jan 2023 22:21:48 +0100 Subject: [PATCH 316/841] Fix processing current_batch.txt on init Signed-off-by: Azat Khuzhin --- .../Distributed/DistributedAsyncInsertDirectoryQueue.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp b/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp index 32d1823b289..97aaa8fba54 100644 --- a/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp +++ b/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp @@ -550,6 +550,12 @@ void DistributedAsyncInsertDirectoryQueue::processFilesWithBatching() { while (pending_files.tryPop(file_path)) { + if (!fs::exists(file_path)) + { + LOG_WARNING(log, "File {} does not exists, likely due to current_batch.txt processing", file_path); + continue; + } + size_t total_rows = 0; size_t total_bytes = 0; Block header; From 7063c20b3c4e288397096431c93118f75eea9ca5 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Fri, 17 Feb 2023 16:43:08 +0100 Subject: [PATCH 317/841] Change noisy "Skipping send data over distributed table." message to test Signed-off-by: Azat Khuzhin --- .../Distributed/DistributedAsyncInsertDirectoryQueue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp b/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp index 97aaa8fba54..0e31a759c4f 100644 --- a/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp +++ b/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp @@ -229,7 +229,7 @@ void DistributedAsyncInsertDirectoryQueue::run() } } else - LOG_DEBUG(log, "Skipping send data over distributed table."); + LOG_TEST(log, "Skipping send data over distributed table."); const auto now = std::chrono::system_clock::now(); if (now - last_decrease_time > decrease_error_count_period) From 591fca57f3fd1c072078f386b339157bc42d9ad7 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 18 Feb 2023 22:27:45 +0100 Subject: [PATCH 318/841] Fix function names for opentelemetry spans in StorageDistributed Fixes: 02417_opentelemetry_insert_on_distributed_table Signed-off-by: Azat Khuzhin --- src/Storages/Distributed/DistributedAsyncInsertBatch.cpp | 2 ++ .../Distributed/DistributedAsyncInsertDirectoryQueue.cpp | 5 +++-- src/Storages/Distributed/DistributedAsyncInsertHeader.cpp | 4 ++-- src/Storages/Distributed/DistributedAsyncInsertHeader.h | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Storages/Distributed/DistributedAsyncInsertBatch.cpp b/src/Storages/Distributed/DistributedAsyncInsertBatch.cpp index 10bf9b8d66e..bf410eed6cc 100644 --- a/src/Storages/Distributed/DistributedAsyncInsertBatch.cpp +++ b/src/Storages/Distributed/DistributedAsyncInsertBatch.cpp @@ -212,6 +212,7 @@ void DistributedAsyncInsertBatch::sendBatch() const auto & distributed_header = DistributedAsyncInsertHeader::read(in, parent.log); tracing_contexts.emplace_back(distributed_header.createTracingContextHolder( + __PRETTY_FUNCTION__, parent.storage.getContext()->getOpenTelemetrySpanLog())); tracing_contexts.back()->root_span.addAttribute("clickhouse.distributed_batch_start_time", batch_start_time); @@ -268,6 +269,7 @@ void DistributedAsyncInsertBatch::sendSeparateFiles() // This function is called in a separated thread, so we set up the trace context from the file trace_context = distributed_header.createTracingContextHolder( + __PRETTY_FUNCTION__, parent.storage.getContext()->getOpenTelemetrySpanLog()); auto timeouts = ConnectionTimeouts::getTCPTimeoutsWithFailover(distributed_header.insert_settings); diff --git a/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp b/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp index 0e31a759c4f..c6f675533c6 100644 --- a/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp +++ b/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp @@ -418,8 +418,9 @@ void DistributedAsyncInsertDirectoryQueue::processFile(const std::string & file_ ReadBufferFromFile in(file_path); const auto & distributed_header = DistributedAsyncInsertHeader::read(in, log); - thread_trace_context = - distributed_header.createTracingContextHolder(storage.getContext()->getOpenTelemetrySpanLog()); + thread_trace_context = distributed_header.createTracingContextHolder( + __PRETTY_FUNCTION__, + storage.getContext()->getOpenTelemetrySpanLog()); auto timeouts = ConnectionTimeouts::getTCPTimeoutsWithFailover(distributed_header.insert_settings); auto connection = pool->get(timeouts, &distributed_header.insert_settings); diff --git a/src/Storages/Distributed/DistributedAsyncInsertHeader.cpp b/src/Storages/Distributed/DistributedAsyncInsertHeader.cpp index b5c16558eb2..018c1d863bb 100644 --- a/src/Storages/Distributed/DistributedAsyncInsertHeader.cpp +++ b/src/Storages/Distributed/DistributedAsyncInsertHeader.cpp @@ -107,10 +107,10 @@ DistributedAsyncInsertHeader DistributedAsyncInsertHeader::read(ReadBufferFromFi return distributed_header; } -OpenTelemetry::TracingContextHolderPtr DistributedAsyncInsertHeader::createTracingContextHolder(std::shared_ptr open_telemetry_span_log) const +OpenTelemetry::TracingContextHolderPtr DistributedAsyncInsertHeader::createTracingContextHolder(const char * function, std::shared_ptr open_telemetry_span_log) const { OpenTelemetry::TracingContextHolderPtr trace_context = std::make_unique( - __PRETTY_FUNCTION__, + function, client_info.client_trace_context, std::move(open_telemetry_span_log)); trace_context->root_span.addAttribute("clickhouse.shard_num", shard_num); diff --git a/src/Storages/Distributed/DistributedAsyncInsertHeader.h b/src/Storages/Distributed/DistributedAsyncInsertHeader.h index dfc059d7083..a7330fa5ef1 100644 --- a/src/Storages/Distributed/DistributedAsyncInsertHeader.h +++ b/src/Storages/Distributed/DistributedAsyncInsertHeader.h @@ -39,7 +39,7 @@ struct DistributedAsyncInsertHeader Block block_header; static DistributedAsyncInsertHeader read(ReadBufferFromFile & in, Poco::Logger * log); - OpenTelemetry::TracingContextHolderPtr createTracingContextHolder(std::shared_ptr open_telemetry_span_log) const; + OpenTelemetry::TracingContextHolderPtr createTracingContextHolder(const char * function, std::shared_ptr open_telemetry_span_log) const; }; } From 97c8c2174172a97ab3c85bc278da373c48579789 Mon Sep 17 00:00:00 2001 From: Dan Roscigno Date: Tue, 28 Feb 2023 16:38:00 -0500 Subject: [PATCH 319/841] Add exaple of intDiv closes https://github.com/ClickHouse/ClickHouse/issues/25703 --- .../functions/arithmetic-functions.md | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/docs/en/sql-reference/functions/arithmetic-functions.md b/docs/en/sql-reference/functions/arithmetic-functions.md index a4479fd8589..c5244cf62e3 100644 --- a/docs/en/sql-reference/functions/arithmetic-functions.md +++ b/docs/en/sql-reference/functions/arithmetic-functions.md @@ -48,7 +48,35 @@ When dividing by zero you get ‘inf’, ‘-inf’, or ‘nan’. ## intDiv(a, b) Calculates the quotient of the numbers. Divides into integers, rounding down (by the absolute value). -An exception is thrown when dividing by zero or when dividing a minimal negative number by minus one. + +Returns an integer of the type of the dividend (the first parameter). + +An exception is thrown when dividing by zero, when the quotient does not fit in the range of the dividend, or when dividing a minimal negative number by minus one. + +**Example** + +Query: + +```sql +SELECT + intDiv(toFloat64(1), 0.001) AS res, + toTypeName(res) +``` +```response +┌──res─┬─toTypeName(intDiv(toFloat64(1), 0.001))─┐ +│ 1000 │ Int64 │ +└──────┴─────────────────────────────────────────┘ +``` + +```sql +SELECT + intDiv(1, 0.001) AS res, + toTypeName(res) +``` +```response +Received exception from server (version 23.2.1): +Code: 153. DB::Exception: Received from localhost:9000. DB::Exception: Cannot perform integer division, because it will produce infinite or too large number: While processing intDiv(1, 0.001) AS res, toTypeName(res). (ILLEGAL_DIVISION) +``` ## intDivOrZero(a, b) From d06a4b50d60e6ccb6e8907559abd0a8c5b27edae Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Tue, 28 Feb 2023 22:40:54 +0100 Subject: [PATCH 320/841] Latest review fixes (variable naming: s/monitor/queue) Signed-off-by: Azat Khuzhin --- src/Storages/Distributed/DistributedSink.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Storages/Distributed/DistributedSink.cpp b/src/Storages/Distributed/DistributedSink.cpp index 14febb1a2b4..1c372e87495 100644 --- a/src/Storages/Distributed/DistributedSink.cpp +++ b/src/Storages/Distributed/DistributedSink.cpp @@ -705,7 +705,7 @@ void DistributedSink::writeToShard(const Cluster::ShardInfo & shard_info, const CompressionCodecPtr compression_codec = CompressionCodecFactory::instance().get(compression_method, compression_level); /// tmp directory is used to ensure atomicity of transactions - /// and keep monitor thread out from reading incomplete data + /// and keep directory queue thread out from reading incomplete data std::string first_file_tmp_path; auto reservation = storage.getStoragePolicy()->reserveAndCheck(block.bytes()); @@ -824,12 +824,12 @@ void DistributedSink::writeToShard(const Cluster::ShardInfo & shard_info, const fs::create_directory(path); auto bin_file = (fs::path(path) / (toString(storage.file_names_increment.get()) + ".bin")).string(); - auto & directory_monitor = storage.getDirectoryQueue(disk, *it); + auto & directory_queue = storage.getDirectoryQueue(disk, *it); { createHardLink(first_file_tmp_path, bin_file); auto dir_sync_guard = make_directory_sync_guard(*it); } - directory_monitor.addFileAndSchedule(bin_file, file_size, sleep_ms); + directory_queue.addFileAndSchedule(bin_file, file_size, sleep_ms); } /// remove the temporary file, enabling the OS to reclaim inode after all threads From 99329d868232d9377d7f808763e951e6f15fd71c Mon Sep 17 00:00:00 2001 From: AVMusorin Date: Fri, 10 Feb 2023 13:55:04 +0100 Subject: [PATCH 321/841] Improve tests for Distributed INSERT Signed-off-by: Azat Khuzhin --- .../configs/overrides_1.xml | 2 - .../configs/overrides_2.xml | 2 - .../test.py | 113 +++++++++++------- .../02536_distributed_detach_table.reference | 2 + .../02536_distributed_detach_table.sql | 16 +++ ...ed_loosing_files_after_exception.reference | 16 +++ ...buted_loosing_files_after_exception.sql.j2 | 32 +++++ 7 files changed, 135 insertions(+), 48 deletions(-) create mode 100644 tests/queries/0_stateless/02536_distributed_detach_table.reference create mode 100644 tests/queries/0_stateless/02536_distributed_detach_table.sql create mode 100644 tests/queries/0_stateless/02537_distributed_loosing_files_after_exception.reference create mode 100644 tests/queries/0_stateless/02537_distributed_loosing_files_after_exception.sql.j2 diff --git a/tests/integration/test_distributed_directory_monitor_split_batch_on_failure/configs/overrides_1.xml b/tests/integration/test_distributed_directory_monitor_split_batch_on_failure/configs/overrides_1.xml index 397e05e7a60..a79ce3de1fc 100644 --- a/tests/integration/test_distributed_directory_monitor_split_batch_on_failure/configs/overrides_1.xml +++ b/tests/integration/test_distributed_directory_monitor_split_batch_on_failure/configs/overrides_1.xml @@ -3,8 +3,6 @@ 0 - - 1 1 diff --git a/tests/integration/test_distributed_directory_monitor_split_batch_on_failure/configs/overrides_2.xml b/tests/integration/test_distributed_directory_monitor_split_batch_on_failure/configs/overrides_2.xml index 2ffd5beaf8d..8279fcdbe6d 100644 --- a/tests/integration/test_distributed_directory_monitor_split_batch_on_failure/configs/overrides_2.xml +++ b/tests/integration/test_distributed_directory_monitor_split_batch_on_failure/configs/overrides_2.xml @@ -3,8 +3,6 @@ 0 - - 1 0 diff --git a/tests/integration/test_distributed_directory_monitor_split_batch_on_failure/test.py b/tests/integration/test_distributed_directory_monitor_split_batch_on_failure/test.py index a47268b06fd..faa38af6533 100644 --- a/tests/integration/test_distributed_directory_monitor_split_batch_on_failure/test.py +++ b/tests/integration/test_distributed_directory_monitor_split_batch_on_failure/test.py @@ -18,61 +18,86 @@ node2 = cluster.add_instance( ) +def get_test_settings(): + settings = {"monitor_batch_inserts": [0, 1]} + return [(k, v) for k, values in settings.items() for v in values] + + +def drop_tables(): + tables = ["null_", "dist", "data", "mv", "dist_data"] + query = "\n".join([f"drop table if exists {table};" for table in tables]) + for _, node in cluster.instances.items(): + node.query(query) + + +def create_tables(**dist_settings): + drop_tables() + _settings_values = ",".join([f"{k}={v}" for k, v in dist_settings.items()]) + _settings = f"settings {_settings_values}" if _settings_values else "" + for _, node in cluster.instances.items(): + node.query( + f""" + create table null_ (key Int, value Int) engine=Null(); + create table dist as null_ engine=Distributed(test_cluster, currentDatabase(), null_, key) {_settings}; + create table data (key Int, uniq_values Int) engine=Memory(); + create materialized view mv to data as select key, uniqExact(value) uniq_values from null_ group by key; + system stop distributed sends dist; + + create table dist_data as data engine=Distributed(test_cluster, currentDatabase(), data); + """ + ) + + @pytest.fixture(scope="module") def started_cluster(): try: cluster.start() - - for _, node in cluster.instances.items(): - node.query( - """ - create table null_ (key Int, value Int) engine=Null(); - create table dist as null_ engine=Distributed(test_cluster, currentDatabase(), null_, key); - create table data (key Int, uniq_values Int) engine=Memory(); - create materialized view mv to data as select key, uniqExact(value) uniq_values from null_ group by key; - system stop distributed sends dist; - - create table dist_data as data engine=Distributed(test_cluster, currentDatabase(), data); - """ - ) - yield cluster finally: + drop_tables() cluster.shutdown() def test_distributed_directory_monitor_split_batch_on_failure_OFF(started_cluster): - for i in range(0, 100): - limit = 100e3 - node2.query( - f"insert into dist select number/100, number from system.numbers limit {limit} offset {limit*i}", - settings={ - # max_memory_usage is the limit for the batch on the remote node - # (local query should not be affected since 30MB is enough for 100K rows) - "max_memory_usage": "30Mi", - "max_untracked_memory": "0", - }, - ) - # "Received from" is mandatory, since the exception should be thrown on the remote node. - with pytest.raises( - QueryRuntimeException, - match=r"DB::Exception: Received from.*Memory limit \(for query\) exceeded: .*while pushing to view default\.mv", - ): + for setting, setting_value in get_test_settings(): + create_tables(**{setting: setting_value}) + for i in range(0, 100): + limit = 100e3 + node2.query( + f"insert into dist select number/100, number from system.numbers limit {limit} offset {limit*i}", + settings={ + # max_memory_usage is the limit for the batch on the remote node + # (local query should not be affected since 30MB is enough for 100K rows) + "max_memory_usage": "30Mi", + "max_untracked_memory": "0", + }, + ) + # "Received from" is mandatory, since the exception should be thrown on the remote node. + if setting == "monitor_batch_inserts" and setting_value == 1: + with pytest.raises( + QueryRuntimeException, + match=r"DB::Exception: Received from.*Memory limit \(for query\) exceeded: .*while pushing to view default\.mv", + ): + node2.query("system flush distributed dist") + assert int(node2.query("select count() from dist_data")) == 0 + continue node2.query("system flush distributed dist") - assert int(node2.query("select count() from dist_data")) == 0 + assert int(node2.query("select count() from dist_data")) == 100000 def test_distributed_directory_monitor_split_batch_on_failure_ON(started_cluster): - for i in range(0, 100): - limit = 100e3 - node1.query( - f"insert into dist select number/100, number from system.numbers limit {limit} offset {limit*i}", - settings={ - # max_memory_usage is the limit for the batch on the remote node - # (local query should not be affected since 30MB is enough for 100K rows) - "max_memory_usage": "30Mi", - "max_untracked_memory": "0", - }, - ) - node1.query("system flush distributed dist") - assert int(node1.query("select count() from dist_data")) == 100000 + for setting, setting_value in get_test_settings(): + create_tables(**{setting: setting_value}) + for i in range(0, 100): + limit = 100e3 + node1.query( + f"insert into dist select number/100, number from system.numbers limit {limit} offset {limit*i}", + settings={ + # max_memory_usage is the limit for the batch on the remote node + # (local query should not be affected since 30MB is enough for 100K rows) + "max_memory_usage": "30Mi", + "max_untracked_memory": "0", + }, + ) + node1.query("system flush distributed dist") + assert int(node1.query("select count() from dist_data")) == 100000 diff --git a/tests/queries/0_stateless/02536_distributed_detach_table.reference b/tests/queries/0_stateless/02536_distributed_detach_table.reference new file mode 100644 index 00000000000..f09bace4421 --- /dev/null +++ b/tests/queries/0_stateless/02536_distributed_detach_table.reference @@ -0,0 +1,2 @@ +0 0 +10 20 diff --git a/tests/queries/0_stateless/02536_distributed_detach_table.sql b/tests/queries/0_stateless/02536_distributed_detach_table.sql new file mode 100644 index 00000000000..92bee1ee544 --- /dev/null +++ b/tests/queries/0_stateless/02536_distributed_detach_table.sql @@ -0,0 +1,16 @@ +-- test detach distributed table with pending files +CREATE TABLE test_02536 (n Int8) ENGINE=MergeTree() ORDER BY tuple(); +CREATE TABLE test_dist_02536 (n Int8) ENGINE=Distributed(test_cluster_two_shards, currentDatabase(), test_02536, rand()); +SYSTEM STOP DISTRIBUTED SENDS test_dist_02536; + +INSERT INTO test_dist_02536 SELECT number FROM numbers(5) SETTINGS prefer_localhost_replica=0; +SELECT count(n), sum(n) FROM test_dist_02536; -- 0 0 + +DETACH TABLE test_dist_02536; +ATTACH TABLE test_dist_02536; + +SYSTEM FLUSH DISTRIBUTED test_dist_02536; + +SELECT count(n), sum(n) FROM test_dist_02536; -- 10 20 +DROP TABLE test_02536; +DROP TABLE test_dist_02536; diff --git a/tests/queries/0_stateless/02537_distributed_loosing_files_after_exception.reference b/tests/queries/0_stateless/02537_distributed_loosing_files_after_exception.reference new file mode 100644 index 00000000000..7793e91fcb6 --- /dev/null +++ b/tests/queries/0_stateless/02537_distributed_loosing_files_after_exception.reference @@ -0,0 +1,16 @@ +monitor_batch_insert=0 +1 2 +1 0 +-- { echoOn } +SELECT sum(key), count(key) FROM dist; +2 2 +SELECT sum(key), count(key) FROM underlying; +2 2 +monitor_batch_insert=1 +1 2 +1 0 +-- { echoOn } +SELECT sum(key), count(key) FROM dist; +2 2 +SELECT sum(key), count(key) FROM underlying; +2 2 diff --git a/tests/queries/0_stateless/02537_distributed_loosing_files_after_exception.sql.j2 b/tests/queries/0_stateless/02537_distributed_loosing_files_after_exception.sql.j2 new file mode 100644 index 00000000000..4f8cf1ccffe --- /dev/null +++ b/tests/queries/0_stateless/02537_distributed_loosing_files_after_exception.sql.j2 @@ -0,0 +1,32 @@ +{% for setting in [0, 1] %} +-- Testing that distributed table doesn't loose file after inserts which contain errors + +SELECT 'monitor_batch_insert={{ setting }}'; + +DROP TABLE IF EXISTS dist; +DROP TABLE IF EXISTS underlying; + +CREATE TABLE dist (key Int) ENGINE=Distributed(test_shard_localhost, currentDatabase(), underlying) SETTINGS monitor_batch_inserts={{ setting }}; +SYSTEM STOP DISTRIBUTED SENDS dist; + +INSERT INTO dist SETTINGS prefer_localhost_replica=0, max_threads=1 VALUES (1); +INSERT INTO dist SETTINGS prefer_localhost_replica=0, max_threads=2 VALUES (1); + +SYSTEM FLUSH DISTRIBUTED dist; -- { serverError UNKNOWN_TABLE } +-- check the second since after using queue it may got lost from it +SYSTEM FLUSH DISTRIBUTED dist; -- { serverError UNKNOWN_TABLE } + +SELECT is_blocked, data_files FROM system.distribution_queue WHERE database = currentDatabase() AND table = 'dist'; + +CREATE TABLE underlying (key Int) ENGINE=Memory(); +SYSTEM FLUSH DISTRIBUTED dist; + +-- all data should be flushed +SELECT is_blocked, data_files FROM system.distribution_queue WHERE database = currentDatabase() AND table = 'dist'; + +-- { echoOn } +SELECT sum(key), count(key) FROM dist; +SELECT sum(key), count(key) FROM underlying; +-- { echoOff } + +{% endfor %} From fa5b65a7024f9e43562024d226ba29e7e3a01a8f Mon Sep 17 00:00:00 2001 From: Dan Roscigno Date: Tue, 28 Feb 2023 17:35:52 -0500 Subject: [PATCH 322/841] add comment info to create table closes https://github.com/ClickHouse/ClickHouse/issues/37088 --- docs/en/sql-reference/statements/create/table.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/en/sql-reference/statements/create/table.md b/docs/en/sql-reference/statements/create/table.md index bc8e5680e9f..54977e1b0ab 100644 --- a/docs/en/sql-reference/statements/create/table.md +++ b/docs/en/sql-reference/statements/create/table.md @@ -17,10 +17,11 @@ By default, tables are created only on the current server. Distributed DDL queri ``` sql CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] ( - name1 [type1] [NULL|NOT NULL] [DEFAULT|MATERIALIZED|EPHEMERAL|ALIAS expr1] [compression_codec] [TTL expr1], - name2 [type2] [NULL|NOT NULL] [DEFAULT|MATERIALIZED|EPHEMERAL|ALIAS expr2] [compression_codec] [TTL expr2], + name1 [type1] [NULL|NOT NULL] [DEFAULT|MATERIALIZED|EPHEMERAL|ALIAS expr1] [compression_codec] [TTL expr1] [COMMENT 'comment for column'], + name2 [type2] [NULL|NOT NULL] [DEFAULT|MATERIALIZED|EPHEMERAL|ALIAS expr2] [compression_codec] [TTL expr2] [COMMENT 'comment for column'], ... ) ENGINE = engine + COMMENT 'comment for table' ``` Creates a table named `table_name` in the `db` database or the current database if `db` is not set, with the structure specified in brackets and the `engine` engine. @@ -32,6 +33,8 @@ Expressions can also be defined for default values (see below). If necessary, primary key can be specified, with one or more key expressions. +Comments can be added for columns and for the table. + ### With a Schema Similar to Other Table ``` sql From 2c41ddf60941c4b58024e908fa1438e018eb320c Mon Sep 17 00:00:00 2001 From: Anton Popov Date: Wed, 1 Mar 2023 02:04:06 +0000 Subject: [PATCH 323/841] support Bool in JSONType --- src/Functions/FunctionsJSON.cpp | 5 +++-- tests/queries/0_stateless/00918_json_functions.reference | 2 ++ tests/queries/0_stateless/00918_json_functions.sql | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Functions/FunctionsJSON.cpp b/src/Functions/FunctionsJSON.cpp index 547df77be6a..5df0d1831af 100644 --- a/src/Functions/FunctionsJSON.cpp +++ b/src/Functions/FunctionsJSON.cpp @@ -647,11 +647,12 @@ public: case ElementType::OBJECT: type = '{'; break; + case ElementType::BOOL: + type = 'b'; + break; case ElementType::NULL_VALUE: type = 0; break; - default: - return false; } ColumnVector & col_vec = assert_cast &>(dest); diff --git a/tests/queries/0_stateless/00918_json_functions.reference b/tests/queries/0_stateless/00918_json_functions.reference index 7f5d5fabf12..72e0df5bfda 100644 --- a/tests/queries/0_stateless/00918_json_functions.reference +++ b/tests/queries/0_stateless/00918_json_functions.reference @@ -19,6 +19,7 @@ a --JSONType-- Object Array +Bool --JSONExtract-- -100 200 @@ -172,6 +173,7 @@ a --JSONType-- Object Array +Bool --JSONExtract-- -100 200 diff --git a/tests/queries/0_stateless/00918_json_functions.sql b/tests/queries/0_stateless/00918_json_functions.sql index dfae54dfd16..3314a5b762d 100644 --- a/tests/queries/0_stateless/00918_json_functions.sql +++ b/tests/queries/0_stateless/00918_json_functions.sql @@ -28,6 +28,7 @@ SELECT JSONKey('{"a": "hello", "b": [-100, 200.0, 300]}', -2); SELECT '--JSONType--'; SELECT JSONType('{"a": "hello", "b": [-100, 200.0, 300]}'); SELECT JSONType('{"a": "hello", "b": [-100, 200.0, 300]}', 'b'); +SELECT JSONType('{"a": true}', 'a'); SELECT '--JSONExtract--'; SELECT JSONExtractInt('{"a": "hello", "b": [-100, 200.0, 300]}', 'b', 1); @@ -196,6 +197,7 @@ SELECT JSONKey('{"a": "hello", "b": [-100, 200.0, 300]}', -2); SELECT '--JSONType--'; SELECT JSONType('{"a": "hello", "b": [-100, 200.0, 300]}'); SELECT JSONType('{"a": "hello", "b": [-100, 200.0, 300]}', 'b'); +SELECT JSONType('{"a": true}', 'a'); SELECT '--JSONExtract--'; SELECT JSONExtractInt('{"a": "hello", "b": [-100, 200.0, 300]}', 'b', 1); From 816244649649c3a486f866a7f610fdd7de61e9d1 Mon Sep 17 00:00:00 2001 From: Amos Bird Date: Wed, 1 Mar 2023 11:06:34 +0800 Subject: [PATCH 324/841] The three-way comparison operator Please refer to https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2468r2.html for more information on why it is necessary to modify the code in this way. --- base/poco/Foundation/include/Poco/Timespan.h | 86 +------------------- contrib/capnproto | 2 +- 2 files changed, 2 insertions(+), 86 deletions(-) diff --git a/base/poco/Foundation/include/Poco/Timespan.h b/base/poco/Foundation/include/Poco/Timespan.h index f0657ac0c36..ec7430eeddc 100644 --- a/base/poco/Foundation/include/Poco/Timespan.h +++ b/base/poco/Foundation/include/Poco/Timespan.h @@ -67,19 +67,7 @@ public: void swap(Timespan & timespan); /// Swaps the Timespan with another one. - bool operator==(const Timespan & ts) const; - bool operator!=(const Timespan & ts) const; - bool operator>(const Timespan & ts) const; - bool operator>=(const Timespan & ts) const; - bool operator<(const Timespan & ts) const; - bool operator<=(const Timespan & ts) const; - - bool operator==(TimeDiff microSeconds) const; - bool operator!=(TimeDiff microSeconds) const; - bool operator>(TimeDiff microSeconds) const; - bool operator>=(TimeDiff microSeconds) const; - bool operator<(TimeDiff microSeconds) const; - bool operator<=(TimeDiff microSeconds) const; + auto operator<=>(const Timespan & ts) const = default; Timespan operator+(const Timespan & d) const; Timespan operator-(const Timespan & d) const; @@ -215,78 +203,6 @@ inline Timespan::TimeDiff Timespan::totalMicroseconds() const } -inline bool Timespan::operator==(const Timespan & ts) const -{ - return _span == ts._span; -} - - -inline bool Timespan::operator!=(const Timespan & ts) const -{ - return _span != ts._span; -} - - -inline bool Timespan::operator>(const Timespan & ts) const -{ - return _span > ts._span; -} - - -inline bool Timespan::operator>=(const Timespan & ts) const -{ - return _span >= ts._span; -} - - -inline bool Timespan::operator<(const Timespan & ts) const -{ - return _span < ts._span; -} - - -inline bool Timespan::operator<=(const Timespan & ts) const -{ - return _span <= ts._span; -} - - -inline bool Timespan::operator==(TimeDiff microSeconds) const -{ - return _span == microSeconds; -} - - -inline bool Timespan::operator!=(TimeDiff microSeconds) const -{ - return _span != microSeconds; -} - - -inline bool Timespan::operator>(TimeDiff microSeconds) const -{ - return _span > microSeconds; -} - - -inline bool Timespan::operator>=(TimeDiff microSeconds) const -{ - return _span >= microSeconds; -} - - -inline bool Timespan::operator<(TimeDiff microSeconds) const -{ - return _span < microSeconds; -} - - -inline bool Timespan::operator<=(TimeDiff microSeconds) const -{ - return _span <= microSeconds; -} - - inline void swap(Timespan & s1, Timespan & s2) { s1.swap(s2); diff --git a/contrib/capnproto b/contrib/capnproto index e19cd661e49..dc8b50b9997 160000 --- a/contrib/capnproto +++ b/contrib/capnproto @@ -1 +1 @@ -Subproject commit e19cd661e49dd9022d3f920b69d843333b896451 +Subproject commit dc8b50b999777bcb23c89bb5907c785c3f654441 From 2d8060d843b16f6d560a672c7567562daa88ae1a Mon Sep 17 00:00:00 2001 From: Amos Bird Date: Wed, 1 Mar 2023 11:06:48 +0800 Subject: [PATCH 325/841] Rewrite VersionNumber in ClickHouse way --- src/Common/VersionNumber.cpp | 28 ++++++++++------------------ src/Common/VersionNumber.h | 26 ++++++++------------------ 2 files changed, 18 insertions(+), 36 deletions(-) diff --git a/src/Common/VersionNumber.cpp b/src/Common/VersionNumber.cpp index c8332132d2b..cb02f6f8db2 100644 --- a/src/Common/VersionNumber.cpp +++ b/src/Common/VersionNumber.cpp @@ -1,6 +1,6 @@ #include -#include -#include +#include +#include namespace DB { @@ -10,29 +10,21 @@ VersionNumber::VersionNumber(std::string version_string) if (version_string.empty()) return; - char * start = &version_string.front(); - char * end = start; - const char * eos = &version_string.back() + 1; - - do + ReadBufferFromString rb(version_string); + while (!rb.eof()) { - Int64 value = strtol(start, &end, 10); + Int64 value; + if (!tryReadIntText(value, rb)) + break; components.push_back(value); - start = end + 1; + if (!checkChar('.', rb)) + break; } - while (start < eos && (end < eos && *end == '.')); } std::string VersionNumber::toString() const { - std::string str; - for (Int64 v : components) - { - if (!str.empty()) - str += '.'; - str += std::to_string(v); - } - return str; + return fmt::format("{}", fmt::join(components, ".")); } int VersionNumber::compare(const VersionNumber & rhs) const diff --git a/src/Common/VersionNumber.h b/src/Common/VersionNumber.h index 13c35063632..94bf234c1da 100644 --- a/src/Common/VersionNumber.h +++ b/src/Common/VersionNumber.h @@ -1,6 +1,5 @@ #pragma once -#include #include #include #include @@ -10,33 +9,24 @@ namespace DB { /// Simple numeric version representation. -/// -/// Based on QVersionNumber. struct VersionNumber { explicit VersionNumber() = default; - VersionNumber(const std::initializer_list & init) - : components(init) - {} - VersionNumber(Int64 major, Int64 minor = 0, Int64 patch = 0) /// NOLINT - : components{major, minor, patch} - {} - VersionNumber(const std::vector & components_) /// NOLINT - : components(components_) - {} + VersionNumber(const std::initializer_list & init) : components(init) {} + explicit VersionNumber(Int64 major, Int64 minor = 0, Int64 patch = 0) : components{major, minor, patch} {} + explicit VersionNumber(const std::vector & components_) : components(components_) {} /// Parse version number from string. explicit VersionNumber(std::string version); - /// NOTE: operator<=> can be used once libc++ will be upgraded. - bool operator<(const VersionNumber & rhs) const { return compare(rhs.components) < 0; } - bool operator<=(const VersionNumber & rhs) const { return compare(rhs.components) <= 0; } - bool operator==(const VersionNumber & rhs) const { return compare(rhs.components) == 0; } - bool operator>(const VersionNumber & rhs) const { return compare(rhs.components) > 0; } - bool operator>=(const VersionNumber & rhs) const { return compare(rhs.components) >= 0; } + bool operator==(const VersionNumber & rhs) const = default; + + /// There might be negative version code which differs from default comparison. + auto operator<=>(const VersionNumber & rhs) const { return compare(rhs); } std::string toString() const; + friend std::ostream & operator<<(std::ostream & os, const VersionNumber & v) { return os << v.toString(); From c0fb4ddc3ed9e252f4e6f5391861cc12bf3dcbc7 Mon Sep 17 00:00:00 2001 From: Amos Bird Date: Tue, 28 Feb 2023 22:48:14 +0800 Subject: [PATCH 326/841] Make thread analyzer happy --- src/Storages/MergeTree/MergeTreeData.cpp | 20 +++++++++++++++++++ src/Storages/MergeTree/MergeTreeData.h | 2 +- .../MergeTree/MergeTreeDataSelectExecutor.cpp | 18 +---------------- 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/src/Storages/MergeTree/MergeTreeData.cpp b/src/Storages/MergeTree/MergeTreeData.cpp index e36ab125f97..9a3d1f1d3b3 100644 --- a/src/Storages/MergeTree/MergeTreeData.cpp +++ b/src/Storages/MergeTree/MergeTreeData.cpp @@ -54,6 +54,7 @@ #include #include #include +#include #include #include #include @@ -7763,6 +7764,25 @@ void MergeTreeData::removeQueryIdNoLock(const String & query_id) const query_id_set.erase(query_id); } +std::shared_ptr MergeTreeData::getQueryIdHolder(const String & query_id, UInt64 max_concurrent_queries) const +{ + auto lock = std::lock_guard(query_id_set_mutex); + if (insertQueryIdOrThrowNoLock(query_id, max_concurrent_queries)) + { + try + { + return std::make_shared(query_id, *this); + } + catch (...) + { + /// If we fail to construct the holder, remove query_id explicitly to avoid leak. + removeQueryIdNoLock(query_id); + throw; + } + } + return nullptr; +} + ReservationPtr MergeTreeData::balancedReservation( const StorageMetadataPtr & metadata_snapshot, size_t part_size, diff --git a/src/Storages/MergeTree/MergeTreeData.h b/src/Storages/MergeTree/MergeTreeData.h index faee69b137f..087e5912e9f 100644 --- a/src/Storages/MergeTree/MergeTreeData.h +++ b/src/Storages/MergeTree/MergeTreeData.h @@ -958,7 +958,7 @@ public: /// section from config.xml. CompressionCodecPtr getCompressionCodecForPart(size_t part_size_compressed, const IMergeTreeDataPart::TTLInfos & ttl_infos, time_t current_time) const; - std::lock_guard getQueryIdSetLock() const { return std::lock_guard(query_id_set_mutex); } + std::shared_ptr getQueryIdHolder(const String & query_id, UInt64 max_concurrent_queries) const; /// Record current query id where querying the table. Throw if there are already `max_queries` queries accessing the same table. /// Returns false if the `query_id` already exists in the running set, otherwise return true. diff --git a/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp b/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp index 4fe470efcce..db358e1b6a9 100644 --- a/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp +++ b/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp @@ -1198,7 +1198,6 @@ std::shared_ptr MergeTreeDataSelectExecutor::checkLimits( const MergeTreeData & data, const ReadFromMergeTree::AnalysisResult & result, const ContextPtr & context) - TSA_NO_THREAD_SAFETY_ANALYSIS // disabled because TSA is confused by guaranteed copy elision in data.getQueryIdSetLock() { const auto & settings = context->getSettingsRef(); const auto data_settings = data.getSettings(); @@ -1222,22 +1221,7 @@ std::shared_ptr MergeTreeDataSelectExecutor::checkLimits( { auto query_id = context->getCurrentQueryId(); if (!query_id.empty()) - { - auto lock = data.getQueryIdSetLock(); - if (data.insertQueryIdOrThrowNoLock(query_id, data_settings->max_concurrent_queries)) - { - try - { - return std::make_shared(query_id, data); - } - catch (...) - { - /// If we fail to construct the holder, remove query_id explicitly to avoid leak. - data.removeQueryIdNoLock(query_id); - throw; - } - } - } + return data.getQueryIdHolder(query_id, data_settings->max_concurrent_queries); } return nullptr; } From fe446afb7dbcd3e2bcd8ad323e20efc8d0fc1a1d Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Wed, 1 Mar 2023 06:02:59 +0100 Subject: [PATCH 327/841] Increase `max_replicated_merges_in_queue` --- src/Storages/MergeTree/MergeTreeSettings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Storages/MergeTree/MergeTreeSettings.h b/src/Storages/MergeTree/MergeTreeSettings.h index 933ad8e913a..6d280f3aaec 100644 --- a/src/Storages/MergeTree/MergeTreeSettings.h +++ b/src/Storages/MergeTree/MergeTreeSettings.h @@ -43,7 +43,7 @@ struct Settings; M(UInt64, merge_max_block_size, DEFAULT_MERGE_BLOCK_SIZE, "How many rows in blocks should be formed for merge operations.", 0) \ M(UInt64, max_bytes_to_merge_at_max_space_in_pool, 150ULL * 1024 * 1024 * 1024, "Maximum in total size of parts to merge, when there are maximum free threads in background pool (or entries in replication queue).", 0) \ M(UInt64, max_bytes_to_merge_at_min_space_in_pool, 1024 * 1024, "Maximum in total size of parts to merge, when there are minimum free threads in background pool (or entries in replication queue).", 0) \ - M(UInt64, max_replicated_merges_in_queue, 16, "How many tasks of merging and mutating parts are allowed simultaneously in ReplicatedMergeTree queue.", 0) \ + M(UInt64, max_replicated_merges_in_queue, 1000, "How many tasks of merging and mutating parts are allowed simultaneously in ReplicatedMergeTree queue.", 0) \ M(UInt64, max_replicated_mutations_in_queue, 8, "How many tasks of mutating parts are allowed simultaneously in ReplicatedMergeTree queue.", 0) \ M(UInt64, max_replicated_merges_with_ttl_in_queue, 1, "How many tasks of merging parts with TTL are allowed simultaneously in ReplicatedMergeTree queue.", 0) \ M(UInt64, number_of_free_entries_in_pool_to_lower_max_size_of_merge, 8, "When there is less than specified number of free entries in pool (or replicated queue), start to lower maximum size of merge to process (or to put in queue). This is to allow small merges to process - not filling the pool with long running merges.", 0) \ From 3615c6f4fba5cdf85638192a871bc47186d8973d Mon Sep 17 00:00:00 2001 From: Palash Goel <58967061+palash-goel@users.noreply.github.com> Date: Wed, 1 Mar 2023 10:37:21 +0530 Subject: [PATCH 328/841] Fix typo in service definition --- packages/clickhouse-server.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/clickhouse-server.service b/packages/clickhouse-server.service index bff2bf8fc2d..090461df988 100644 --- a/packages/clickhouse-server.service +++ b/packages/clickhouse-server.service @@ -18,7 +18,7 @@ Group=clickhouse Restart=always RestartSec=30 # Since ClickHouse is systemd aware default 1m30sec may not be enough -TimeoutStartSec=inifinity +TimeoutStartSec=infinity # %p is resolved to the systemd unit name RuntimeDirectory=%p ExecStart=/usr/bin/clickhouse-server --config=/etc/clickhouse-server/config.xml --pid-file=%t/%p/%p.pid From 62d011d0c0c21214b237c732d157ae74c6e4ad2b Mon Sep 17 00:00:00 2001 From: Amos Bird Date: Wed, 1 Mar 2023 15:10:07 +0800 Subject: [PATCH 329/841] Provide more glibc compatibility symbols These are needed by newer capnp. musl does the following: #define fallocate64 fallocate #define pwritev64 pwritev --- base/glibc-compatibility/musl/fallocate.c | 5 +++++ base/glibc-compatibility/musl/pwritev.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/base/glibc-compatibility/musl/fallocate.c b/base/glibc-compatibility/musl/fallocate.c index 31e63822c94..2369f157436 100644 --- a/base/glibc-compatibility/musl/fallocate.c +++ b/base/glibc-compatibility/musl/fallocate.c @@ -8,3 +8,8 @@ int fallocate(int fd, int mode, off_t base, off_t len) { return syscall(SYS_fallocate, fd, mode, base, len); } + +int fallocate64(int fd, int mode, off_t base, off_t len) +{ + return fallocate(fd, mode, base, len); +} diff --git a/base/glibc-compatibility/musl/pwritev.c b/base/glibc-compatibility/musl/pwritev.c index 4cd31fcaea9..bdfeb572423 100644 --- a/base/glibc-compatibility/musl/pwritev.c +++ b/base/glibc-compatibility/musl/pwritev.c @@ -9,3 +9,8 @@ ssize_t pwritev(int fd, const struct iovec *iov, int count, off_t ofs) /// There was cancellable syscall (syscall_cp), but I don't care. return syscall(SYS_pwritev, fd, iov, count, (long)(ofs), (long)(ofs>>32)); } + +ssize_t pwritev64(int fd, const struct iovec *iov, int count, off_t ofs) +{ + return pwritev(fd, iov, count, ofs); +} From c797122dbe4fa97e726536cc5b6784e16a11dd44 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Wed, 1 Mar 2023 08:45:50 +0000 Subject: [PATCH 330/841] Better --- src/Coordination/KeeperStorage.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Coordination/KeeperStorage.cpp b/src/Coordination/KeeperStorage.cpp index b1f3b44b1e1..33b2a91d8bf 100644 --- a/src/Coordination/KeeperStorage.cpp +++ b/src/Coordination/KeeperStorage.cpp @@ -238,10 +238,7 @@ void KeeperStorage::Node::shallowCopy(const KeeperStorage::Node & other) void KeeperStorage::Node::recalculateSize() { size_bytes = sizeof(Node); - - for (const auto child_path : children) - size_bytes += sizeof child_path; - + size_bytes += children.size() * sizeof(decltype(children)::value_type); size_bytes += data.size(); } From ac7caace8a9caa556824588d209652fef07e6260 Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Wed, 1 Mar 2023 09:34:46 +0000 Subject: [PATCH 331/841] Update comments --- cmake/cpu_features.cmake | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/cmake/cpu_features.cmake b/cmake/cpu_features.cmake index a79864aae07..9fc3960c166 100644 --- a/cmake/cpu_features.cmake +++ b/cmake/cpu_features.cmake @@ -30,7 +30,7 @@ elseif (ARCH_AARCH64) # support it. set (COMPILER_FLAGS "${COMPILER_FLAGS} -march=armv8+crc") else () - # ARMv8.2 is quite ancient but the lowest common denominator supported by both Graviton 2 and 3 processors [1]. In particular, it + # ARMv8.2 is quite ancient but the lowest common denominator supported by both Graviton 2 and 3 processors [1, 10]. In particular, it # includes LSE (made mandatory with ARMv8.1) which provides nice speedups without having to fall back to compat flag # "-moutline-atomics" for v8.0 [2, 3, 4] that requires a recent glibc with runtime dispatch helper, limiting our ability to run on # old OSs. @@ -45,18 +45,19 @@ elseif (ARCH_AARCH64) # dotprod: Scalar vector product (SDOT and UDOT instructions). Probably the most obscure extra flag with doubtful performance benefits # but it has been activated since always, so why not enable it. It's not 100% clear in which revision this flag was # introduced as optional, either in v8.2 [7] or in v8.4 [8]. - # ldapr: Load-Acquire RCpc Register. Better support of release/acquire of atomics. Good for allocators and high contention code. - # Optional in v8.2, mandatory in v8.3 [9]. Supported in Graviton 2+, Azure and GCP instances. Generated from clang 15. + # rcpc: Load-Acquire RCpc Register. Better support of release/acquire of atomics. Good for allocators and high contention code. + # Optional in v8.2, mandatory in v8.3 [9]. Supported in Graviton >=2, Azure and GCP instances. # - # [1] https://github.com/aws/aws-graviton-getting-started/blob/main/c-c%2B%2B.md - # [2] https://community.arm.com/arm-community-blogs/b/tools-software-ides-blog/posts/making-the-most-of-the-arm-architecture-in-gcc-10 - # [3] https://mysqlonarm.github.io/ARM-LSE-and-MySQL/ - # [4] https://dev.to/aws-builders/large-system-extensions-for-aws-graviton-processors-3eci - # [5] https://developer.arm.com/tools-and-software/open-source-software/developer-tools/llvm-toolchain/sve-support - # [6] https://developer.arm.com/documentation/100067/0612/armclang-Command-line-Options/-mcpu?lang=en - # [7] https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html - # [8] https://developer.arm.com/documentation/102651/a/What-are-dot-product-intructions- - # [9] https://developer.arm.com/documentation/dui0801/g/A64-Data-Transfer-Instructions/LDAPR?lang=en + # [1] https://github.com/aws/aws-graviton-getting-started/blob/main/c-c%2B%2B.md + # [2] https://community.arm.com/arm-community-blogs/b/tools-software-ides-blog/posts/making-the-most-of-the-arm-architecture-in-gcc-10 + # [3] https://mysqlonarm.github.io/ARM-LSE-and-MySQL/ + # [4] https://dev.to/aws-builders/large-system-extensions-for-aws-graviton-processors-3eci + # [5] https://developer.arm.com/tools-and-software/open-source-software/developer-tools/llvm-toolchain/sve-support + # [6] https://developer.arm.com/documentation/100067/0612/armclang-Command-line-Options/-mcpu?lang=en + # [7] https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html + # [8] https://developer.arm.com/documentation/102651/a/What-are-dot-product-intructions- + # [9] https://developer.arm.com/documentation/dui0801/g/A64-Data-Transfer-Instructions/LDAPR?lang=en + # [10] https://github.com/aws/aws-graviton-getting-started/blob/main/README.md set (COMPILER_FLAGS "${COMPILER_FLAGS} -march=armv8.2-a+simd+crypto+dotprod+ssbs+rcpc") endif () From e1352adced7eb8f5e5201fb12c1634903ade6a59 Mon Sep 17 00:00:00 2001 From: artem-yadr <84010375+artem-yadr@users.noreply.github.com> Date: Wed, 1 Mar 2023 12:50:03 +0300 Subject: [PATCH 332/841] Update MongoDBDictionarySource.cpp --- src/Dictionaries/MongoDBDictionarySource.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Dictionaries/MongoDBDictionarySource.cpp b/src/Dictionaries/MongoDBDictionarySource.cpp index f61efcab026..a9555a94304 100644 --- a/src/Dictionaries/MongoDBDictionarySource.cpp +++ b/src/Dictionaries/MongoDBDictionarySource.cpp @@ -118,7 +118,7 @@ MongoDBDictionarySource::MongoDBDictionarySource( Poco::MongoDB::Connection::SocketFactory socket_factory; connection->connect(uri, socket_factory); - Poco::URI poco_uri(connection.uri()); + Poco::URI poco_uri(connection->uri()); // Parse database from URI. This is required for correctness -- the // cursor is created using database name and collection name, so we have From 5de8a8e776ab61b8cbbb9cc0bc040f82f5e49af9 Mon Sep 17 00:00:00 2001 From: alesapin Date: Wed, 1 Mar 2023 11:50:23 +0100 Subject: [PATCH 333/841] Update src/Storages/MergeTree/MergeTreeData.cpp Co-authored-by: Yakov Olkhovskiy <99031427+yakov-olkhovskiy@users.noreply.github.com> --- src/Storages/MergeTree/MergeTreeData.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Storages/MergeTree/MergeTreeData.cpp b/src/Storages/MergeTree/MergeTreeData.cpp index b60dda46e9b..9646a648690 100644 --- a/src/Storages/MergeTree/MergeTreeData.cpp +++ b/src/Storages/MergeTree/MergeTreeData.cpp @@ -4609,7 +4609,7 @@ void MergeTreeData::movePartitionToDisk(const ASTPtr & partition, const String & case MovePartsOutcome::MovesAreCancelled: throw Exception(ErrorCodes::ABORTED, "Cannot move parts because moves are manually disabled"); case MovePartsOutcome::NothingToMove: - throw Exception(ErrorCodes::NO_SUCH_DATA_PART, "No parts to move found in partition {}", partition_id); + throw Exception(ErrorCodes::NO_SUCH_DATA_PART, "No parts to move are found in partition {}", partition_id); case MovePartsOutcome::MoveWasPostponedBecauseOfZeroCopy: throw Exception(ErrorCodes::PART_IS_TEMPORARILY_LOCKED, "Move was not finished, because zero copy mode enabled and someone other moving the same parts right now"); case MovePartsOutcome::PartsMoved: From be5ef666ba9aeee3536bcafface548c897460de8 Mon Sep 17 00:00:00 2001 From: alesapin Date: Wed, 1 Mar 2023 11:50:29 +0100 Subject: [PATCH 334/841] Update src/Storages/MergeTree/MergeTreeData.cpp Co-authored-by: Yakov Olkhovskiy <99031427+yakov-olkhovskiy@users.noreply.github.com> --- src/Storages/MergeTree/MergeTreeData.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Storages/MergeTree/MergeTreeData.cpp b/src/Storages/MergeTree/MergeTreeData.cpp index 9646a648690..55605fdff16 100644 --- a/src/Storages/MergeTree/MergeTreeData.cpp +++ b/src/Storages/MergeTree/MergeTreeData.cpp @@ -4672,7 +4672,7 @@ void MergeTreeData::movePartitionToVolume(const ASTPtr & partition, const String case MovePartsOutcome::MovesAreCancelled: throw Exception(ErrorCodes::ABORTED, "Cannot move parts because moves are manually disabled"); case MovePartsOutcome::NothingToMove: - throw Exception(ErrorCodes::NO_SUCH_DATA_PART, "No parts to move found in partition {}", partition_id); + throw Exception(ErrorCodes::NO_SUCH_DATA_PART, "No parts to move are found in partition {}", partition_id); case MovePartsOutcome::MoveWasPostponedBecauseOfZeroCopy: throw Exception(ErrorCodes::PART_IS_TEMPORARILY_LOCKED, "Move was not finished, because zero copy mode enabled and someone other moving the same parts right now"); case MovePartsOutcome::PartsMoved: From 8ff77c89eb53ee7cc10e6bb54b6d1a844e243553 Mon Sep 17 00:00:00 2001 From: alesapin Date: Wed, 1 Mar 2023 11:50:35 +0100 Subject: [PATCH 335/841] Update src/Storages/MergeTree/MergeTreeData.cpp Co-authored-by: Yakov Olkhovskiy <99031427+yakov-olkhovskiy@users.noreply.github.com> --- src/Storages/MergeTree/MergeTreeData.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Storages/MergeTree/MergeTreeData.cpp b/src/Storages/MergeTree/MergeTreeData.cpp index 55605fdff16..2ffeff14a10 100644 --- a/src/Storages/MergeTree/MergeTreeData.cpp +++ b/src/Storages/MergeTree/MergeTreeData.cpp @@ -4674,7 +4674,7 @@ void MergeTreeData::movePartitionToVolume(const ASTPtr & partition, const String case MovePartsOutcome::NothingToMove: throw Exception(ErrorCodes::NO_SUCH_DATA_PART, "No parts to move are found in partition {}", partition_id); case MovePartsOutcome::MoveWasPostponedBecauseOfZeroCopy: - throw Exception(ErrorCodes::PART_IS_TEMPORARILY_LOCKED, "Move was not finished, because zero copy mode enabled and someone other moving the same parts right now"); + throw Exception(ErrorCodes::PART_IS_TEMPORARILY_LOCKED, "Move was not finished, because zero copy mode is enabled and someone other is moving the same parts right now"); case MovePartsOutcome::PartsMoved: break; } From d72c310faaab5342d97e2ef70ef6dc2b0a90f192 Mon Sep 17 00:00:00 2001 From: alesapin Date: Wed, 1 Mar 2023 11:54:22 +0100 Subject: [PATCH 336/841] Update src/Storages/MergeTree/MergeTreeData.cpp Co-authored-by: Yakov Olkhovskiy <99031427+yakov-olkhovskiy@users.noreply.github.com> --- src/Storages/MergeTree/MergeTreeData.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Storages/MergeTree/MergeTreeData.cpp b/src/Storages/MergeTree/MergeTreeData.cpp index 2ffeff14a10..63374a089ec 100644 --- a/src/Storages/MergeTree/MergeTreeData.cpp +++ b/src/Storages/MergeTree/MergeTreeData.cpp @@ -4611,7 +4611,7 @@ void MergeTreeData::movePartitionToDisk(const ASTPtr & partition, const String & case MovePartsOutcome::NothingToMove: throw Exception(ErrorCodes::NO_SUCH_DATA_PART, "No parts to move are found in partition {}", partition_id); case MovePartsOutcome::MoveWasPostponedBecauseOfZeroCopy: - throw Exception(ErrorCodes::PART_IS_TEMPORARILY_LOCKED, "Move was not finished, because zero copy mode enabled and someone other moving the same parts right now"); + throw Exception(ErrorCodes::PART_IS_TEMPORARILY_LOCKED, "Move was not finished, because zero copy mode is enabled and someone other is moving the same parts right now"); case MovePartsOutcome::PartsMoved: break; } From 30537d0d1ffead66399cf2a7658c6d3d2bc39437 Mon Sep 17 00:00:00 2001 From: Mike Kot Date: Wed, 1 Mar 2023 14:10:39 +0300 Subject: [PATCH 337/841] updates --- docs/en/development/tests.md | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/docs/en/development/tests.md b/docs/en/development/tests.md index 0fbd08db72f..225f0903043 100644 --- a/docs/en/development/tests.md +++ b/docs/en/development/tests.md @@ -41,16 +41,16 @@ Tests should use (create, drop, etc) only tables in `test` database that is assu ### Restricting test runs -A test can have one or more _test tags_ specifying restrictions for test runs. +A test can have zero or more _test tags_ specifying restrictions for test runs. -For `.sh` tests tags are placed in `.sh` files as comments, example: +For `.sh` tests tags are written as a comment on the second line: ```bash #!/usr/bin/env bash # Tags: no-fasttest ``` -For `.sql` tests tags are placed as SQL comments, example: +For `.sql` tests tags are placed in the first line as a SQL comment: ```sql -- Tags: no-fasttest @@ -59,16 +59,30 @@ SELECT 1 |Tag name | What it does | Usage example | |---|---|---| -| `no-fasttest`| Test is not run under [Fast test](continuous-integration#fast-test) | Test uses MySQL table engine which is disabled in Fast test| -| `zookeeper` | Test requires Zookeeper or ClickHouse Keeper to run || +| `disabled`| Test is not run || | `long` | Test's execution time is extended to 10 minutes || -| `no-replicated-database` ||| -| `no-parallel` ||| +| `race` ||| +| `replica` ||| +| `shard` ||| | `distributed` ||| +| `deadlock` ||| +| `global` ||| +| `zookeeper` | Test requires Zookeeper or ClickHouse Keeper to run | Test uses `ReplicatedMergeTree` | +| `no-fasttest`| Test is not run under [Fast test](continuous-integration#fast-test) | Test uses `MySQL` table engine which is disabled in Fast test| +| `no-replicated-database` ||| +| `no-ordinary-database` ||| +| `no-parallel` | Disables running other tests in parallel with this one | Test reads from `system` tables and invariants may be broken| +| `no-debug` ||| +| `no-polymorphic-parts` ||| +| `no-stress` ||| | `no-random-settings` ||| +| `no-random-merge-tree-settings` ||| | `no-backward-compatibility-check` ||| | `no-cpu-x86_64` ||| | `no-cpu-aarch64` ||| +| `no-cpu-ppc64le` ||| +| `no-s3-storage` ||| +| `no-[asan, tsan, msan, ubsan]` | Disables tests in build with [sanitizers](#sanitizers) | Test is run under QEMU which doesn't work with sanitizers | In addition to the above settings, you can use `USE_*` flags from `system.build_options` to define usage of particular ClickHouse features. For example, if your test uses a MySQL table, you should add a tag `use-mysql`. From 67b271b1fa39719f69154d68ba660770b86e189e Mon Sep 17 00:00:00 2001 From: Alexey Korepanov Date: Wed, 1 Mar 2023 12:20:49 +0100 Subject: [PATCH 338/841] Keep indentation on Enter in the web UI --- programs/server/play.html | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/programs/server/play.html b/programs/server/play.html index c511d13cf91..d90293fbd1b 100644 --- a/programs/server/play.html +++ b/programs/server/play.html @@ -669,6 +669,29 @@ elem.selectionStart = selection_start + 4; elem.selectionEnd = selection_start + 4; + e.preventDefault(); + return false; + } else if (e.key === 'Enter') { + // If the user presses Enter, and the previous line starts with spaces, + // then we will insert the same number of spaces. + const elem = e.target; + if (elem.selectionStart !== elem.selectionEnd) { + // If there is a selection, then we will not insert spaces. + return; + } + const cursor_pos = elem.selectionStart; + + const elem_value = elem.value; + const text_before_cursor = elem_value.substring(0, cursor_pos); + const text_after_cursor = elem_value.substring(cursor_pos); + const prev_lines = text_before_cursor.split('\n'); + const prev_line = prev_lines.pop(); + const lead_spaces = prev_line.match(/^\s*/)[0]; + // Add leading spaces to the current line. + elem.value = text_before_cursor + '\n' + lead_spaces + text_after_cursor; + elem.selectionStart = cursor_pos + lead_spaces.length + 1; + elem.selectionEnd = elem.selectionStart; + e.preventDefault(); return false; } From 3af09d5507b06bb9cb966851990b004467fcea6f Mon Sep 17 00:00:00 2001 From: Mike Kot Date: Wed, 1 Mar 2023 14:24:10 +0300 Subject: [PATCH 339/841] reordering rows --- docs/en/development/tests.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/en/development/tests.md b/docs/en/development/tests.md index 225f0903043..4946b004abc 100644 --- a/docs/en/development/tests.md +++ b/docs/en/development/tests.md @@ -60,21 +60,23 @@ SELECT 1 |Tag name | What it does | Usage example | |---|---|---| | `disabled`| Test is not run || -| `long` | Test's execution time is extended to 10 minutes || -| `race` ||| -| `replica` ||| -| `shard` ||| -| `distributed` ||| -| `deadlock` ||| -| `global` ||| +| `long` | Test's execution time is extended from 1 to 10 minutes || +| `deadlock` | Test tests a possible deadlock or race, so it's run in a loop for a long time || +| `race` | Same as `deadlock`. Prefer `deadlock` || +| `shard` | Server is required to listen to `127.0.0.*` || +| `distributed` | Same as `shard`. Prefer `shard` || +| `global` | Same as `shard`. Prefer `shard` || | `zookeeper` | Test requires Zookeeper or ClickHouse Keeper to run | Test uses `ReplicatedMergeTree` | +| `replica` | Same as `zookeeper`. Prefer `zookeeper` || | `no-fasttest`| Test is not run under [Fast test](continuous-integration#fast-test) | Test uses `MySQL` table engine which is disabled in Fast test| +| `no-[asan, tsan, msan, ubsan]` | Disables tests in build with [sanitizers](#sanitizers) | Test is run under QEMU which doesn't work with sanitizers | | `no-replicated-database` ||| | `no-ordinary-database` ||| | `no-parallel` | Disables running other tests in parallel with this one | Test reads from `system` tables and invariants may be broken| +| `no-parallel-replicas` ||| | `no-debug` ||| -| `no-polymorphic-parts` ||| | `no-stress` ||| +| `no-polymorphic-parts` ||| | `no-random-settings` ||| | `no-random-merge-tree-settings` ||| | `no-backward-compatibility-check` ||| @@ -82,7 +84,6 @@ SELECT 1 | `no-cpu-aarch64` ||| | `no-cpu-ppc64le` ||| | `no-s3-storage` ||| -| `no-[asan, tsan, msan, ubsan]` | Disables tests in build with [sanitizers](#sanitizers) | Test is run under QEMU which doesn't work with sanitizers | In addition to the above settings, you can use `USE_*` flags from `system.build_options` to define usage of particular ClickHouse features. For example, if your test uses a MySQL table, you should add a tag `use-mysql`. From adf2d56a2deae20e3c678b339a9c8bb29116bead Mon Sep 17 00:00:00 2001 From: Kseniia Sumarokova <54203879+kssenii@users.noreply.github.com> Date: Wed, 1 Mar 2023 12:35:01 +0100 Subject: [PATCH 340/841] Update test.py --- tests/integration/test_merge_tree_azure_blob_storage/test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/test_merge_tree_azure_blob_storage/test.py b/tests/integration/test_merge_tree_azure_blob_storage/test.py index 9e7e258fa83..a846bfbe4d7 100644 --- a/tests/integration/test_merge_tree_azure_blob_storage/test.py +++ b/tests/integration/test_merge_tree_azure_blob_storage/test.py @@ -111,8 +111,8 @@ def test_read_after_cache_is_wiped(cluster): # After cache is populated again, only .bin files should be accessed from Blob Storage. assert ( - azure_query(node, f"SELECT * FROM {TABLE_NAME} order by dt, id FORMAT Values") - == values + azure_query(node, f"SELECT * FROM {TABLE_NAME} order by dt, id FORMAT Values").strip() + == "('2021-11-13',3,'hello'),('2021-11-14',4,'heyo')" ) From 43dbd7bc2522ca174ef5065550e5a8031390af94 Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Wed, 1 Mar 2023 12:37:34 +0100 Subject: [PATCH 341/841] Terminate long-running offline non-busy runners in EC2 --- tests/ci/ci_runners_metrics_lambda/app.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/ci/ci_runners_metrics_lambda/app.py b/tests/ci/ci_runners_metrics_lambda/app.py index 44cae9221f5..341e1b674ec 100644 --- a/tests/ci/ci_runners_metrics_lambda/app.py +++ b/tests/ci/ci_runners_metrics_lambda/app.py @@ -37,15 +37,17 @@ RunnerDescriptions = List[RunnerDescription] def get_dead_runners_in_ec2(runners: RunnerDescriptions) -> RunnerDescriptions: + """Returns instances that are offline/dead in EC2, or not found in EC2""" ids = { runner.name: runner for runner in runners # Only `i-deadbead123` are valid names for an instance ID - if runner.offline and not runner.busy and runner.name.startswith("i-") + if runner.name.startswith("i-") and runner.offline and not runner.busy } if not ids: return [] + # Delete all offline runners with wrong name result_to_delete = [ runner for runner in runners @@ -57,7 +59,7 @@ def get_dead_runners_in_ec2(runners: RunnerDescriptions) -> RunnerDescriptions: i = 0 inc = 100 - print("Checking ids", ids.keys()) + print("Checking ids: ", " ".join(ids.keys())) instances_statuses = [] while i < len(ids.keys()): try: @@ -106,6 +108,9 @@ def get_lost_ec2_instances(runners: RunnerDescriptions) -> List[dict]: Filters=[{"Name": "tag-key", "Values": ["github:runner-type"]}] )["Reservations"] lost_instances = [] + offline_runners = [ + runner.name for runner in runners if runner.offline and not runner.busy + ] # Here we refresh the runners to get the most recent state now = datetime.now().timestamp() @@ -126,6 +131,10 @@ def get_lost_ec2_instances(runners: RunnerDescriptions) -> List[dict]: ): continue + if instance["InstanceId"] in offline_runners: + lost_instances.append(instance) + continue + if instance["State"]["Name"] == "running" and ( not [ runner From b9bb7bcce30081dd90970aa51131e16f3ac9f145 Mon Sep 17 00:00:00 2001 From: Kseniia Sumarokova <54203879+kssenii@users.noreply.github.com> Date: Wed, 1 Mar 2023 13:14:53 +0100 Subject: [PATCH 342/841] Update test.py --- tests/integration/test_merge_tree_azure_blob_storage/test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/integration/test_merge_tree_azure_blob_storage/test.py b/tests/integration/test_merge_tree_azure_blob_storage/test.py index a846bfbe4d7..d1b7b64b56f 100644 --- a/tests/integration/test_merge_tree_azure_blob_storage/test.py +++ b/tests/integration/test_merge_tree_azure_blob_storage/test.py @@ -111,7 +111,9 @@ def test_read_after_cache_is_wiped(cluster): # After cache is populated again, only .bin files should be accessed from Blob Storage. assert ( - azure_query(node, f"SELECT * FROM {TABLE_NAME} order by dt, id FORMAT Values").strip() + azure_query( + node, f"SELECT * FROM {TABLE_NAME} order by dt, id FORMAT Values" + ).strip() == "('2021-11-13',3,'hello'),('2021-11-14',4,'heyo')" ) From 02950ecf29e958035cf544b9b05121c5f7fae8e9 Mon Sep 17 00:00:00 2001 From: Mike Kot Date: Wed, 1 Mar 2023 15:34:10 +0300 Subject: [PATCH 343/841] aspell fix --- docs/en/development/tests.md | 2 +- utils/check-style/aspell-ignore/en/aspell-dict.txt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/en/development/tests.md b/docs/en/development/tests.md index 4946b004abc..9ae49e8f707 100644 --- a/docs/en/development/tests.md +++ b/docs/en/development/tests.md @@ -61,7 +61,7 @@ SELECT 1 |---|---|---| | `disabled`| Test is not run || | `long` | Test's execution time is extended from 1 to 10 minutes || -| `deadlock` | Test tests a possible deadlock or race, so it's run in a loop for a long time || +| `deadlock` | Test is run in a loop for a long time || | `race` | Same as `deadlock`. Prefer `deadlock` || | `shard` | Server is required to listen to `127.0.0.*` || | `distributed` | Same as `shard`. Prefer `shard` || diff --git a/utils/check-style/aspell-ignore/en/aspell-dict.txt b/utils/check-style/aspell-ignore/en/aspell-dict.txt index ab03da8cc80..1ad7432a5bf 100644 --- a/utils/check-style/aspell-ignore/en/aspell-dict.txt +++ b/utils/check-style/aspell-ignore/en/aspell-dict.txt @@ -56,6 +56,7 @@ Hostname IPv IntN Integrations +invariants JSONAsString JSONAsObject JSONColumns @@ -130,6 +131,7 @@ ProtobufSingle QTCreator QueryCacheHits QueryCacheMisses +QEMU RBAC RawBLOB RedHat From f540f7f6f97e042ffebcc0db7f72f4150ca4ef15 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Wed, 1 Mar 2023 12:11:06 +0000 Subject: [PATCH 344/841] Fix some tests --- src/IO/ReadWriteBufferFromHTTP.h | 9 ++++----- src/Storages/StorageURL.cpp | 6 ++---- tests/queries/0_stateless/00646_url_engine.python | 3 +++ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/IO/ReadWriteBufferFromHTTP.h b/src/IO/ReadWriteBufferFromHTTP.h index a3a3c318f5a..dc1d6fe34b1 100644 --- a/src/IO/ReadWriteBufferFromHTTP.h +++ b/src/IO/ReadWriteBufferFromHTTP.h @@ -241,12 +241,12 @@ namespace detail { try { - callWithRedirects(response, Poco::Net::HTTPRequest::HTTP_HEAD); + callWithRedirects(response, Poco::Net::HTTPRequest::HTTP_HEAD, true); break; } catch (const Poco::Exception & e) { - if (i == settings.http_max_tries - 1) + if (i == settings.http_max_tries - 1 || !isRetriableError(response.getStatus())) throw; LOG_ERROR(log, "Failed to make HTTP_HEAD request to {}. Error: {}", uri.toString(), e.displayText()); @@ -334,11 +334,12 @@ namespace detail static bool isRetriableError(const Poco::Net::HTTPResponse::HTTPStatus http_status) noexcept { - constexpr std::array non_retriable_errors{ + static constexpr std::array non_retriable_errors{ Poco::Net::HTTPResponse::HTTPStatus::HTTP_BAD_REQUEST, Poco::Net::HTTPResponse::HTTPStatus::HTTP_UNAUTHORIZED, Poco::Net::HTTPResponse::HTTPStatus::HTTP_NOT_FOUND, Poco::Net::HTTPResponse::HTTPStatus::HTTP_FORBIDDEN, + Poco::Net::HTTPResponse::HTTPStatus::HTTP_NOT_IMPLEMENTED, Poco::Net::HTTPResponse::HTTPStatus::HTTP_METHOD_NOT_ALLOWED}; return std::all_of( @@ -386,9 +387,7 @@ namespace detail catch (...) { if (throw_on_all_errors) - { throw; - } auto http_status = response.getStatus(); diff --git a/src/Storages/StorageURL.cpp b/src/Storages/StorageURL.cpp index 574f1abad3e..bce75ac41b2 100644 --- a/src/Storages/StorageURL.cpp +++ b/src/Storages/StorageURL.cpp @@ -48,7 +48,6 @@ namespace ErrorCodes extern const int NETWORK_ERROR; extern const int BAD_ARGUMENTS; extern const int LOGICAL_ERROR; - extern const int UNKNOWN_FILE_SIZE; } static constexpr auto bad_arguments_error_message = "Storage URL requires 1-4 arguments: " @@ -224,10 +223,9 @@ namespace { total_size += getFileSizeFromReadBuffer(*read_buf); } - catch (const Exception & e) + catch (...) { - if (e.code() != ErrorCodes::UNKNOWN_FILE_SIZE) - throw; + // we simply continue without total_size } auto input_format diff --git a/tests/queries/0_stateless/00646_url_engine.python b/tests/queries/0_stateless/00646_url_engine.python index c955eaff643..f68a2a5a260 100644 --- a/tests/queries/0_stateless/00646_url_engine.python +++ b/tests/queries/0_stateless/00646_url_engine.python @@ -82,6 +82,9 @@ class CSVHTTPServer(BaseHTTPRequestHandler): self.wfile.write((', '.join(row) + '\n').encode()) return + def do_HEAD(self): + self.do_GET() + def read_chunk(self): msg = '' while True: From 32c198be45477782ec31fb864894500336216a71 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Wed, 1 Mar 2023 12:47:31 +0000 Subject: [PATCH 345/841] trace raft logs --- tests/config/config.d/keeper_port.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/config/config.d/keeper_port.xml b/tests/config/config.d/keeper_port.xml index 2066dedfa56..03f80bfbe62 100644 --- a/tests/config/config.d/keeper_port.xml +++ b/tests/config/config.d/keeper_port.xml @@ -10,11 +10,12 @@ 100000 10000 - true + false 240000 1000000000000000 100000 + trace 0 From 02b3ae00811c5d79c441465912b6b2c5c579d8cb Mon Sep 17 00:00:00 2001 From: xiedeyantu Date: Wed, 1 Mar 2023 21:05:58 +0800 Subject: [PATCH 346/841] Dec 15, 2021 support for parseDateTimeBestEffort function --- src/IO/parseDateTimeBestEffort.cpp | 5 +++++ .../01442_date_time_with_params.reference | 15 +++++++++++++++ .../0_stateless/01442_date_time_with_params.sql | 15 +++++++++++++++ 3 files changed, 35 insertions(+) diff --git a/src/IO/parseDateTimeBestEffort.cpp b/src/IO/parseDateTimeBestEffort.cpp index d4a7d04540f..b370bee6f3f 100644 --- a/src/IO/parseDateTimeBestEffort.cpp +++ b/src/IO/parseDateTimeBestEffort.cpp @@ -321,6 +321,11 @@ ReturnType parseDateTimeBestEffortImpl( return on_error(ErrorCodes::CANNOT_PARSE_DATETIME, "Cannot read DateTime: unexpected number of decimal digits after hour and minute: {}", num_digits); } } + else if (checkChar(',', in)) + { + if (month && !day_of_month) + day_of_month = hour_or_day_of_month_or_month; + } else if (checkChar('/', in) || checkChar('.', in) || checkChar('-', in)) { if (day_of_month) diff --git a/tests/queries/0_stateless/01442_date_time_with_params.reference b/tests/queries/0_stateless/01442_date_time_with_params.reference index bc819d5f8fc..b5478665a1c 100644 --- a/tests/queries/0_stateless/01442_date_time_with_params.reference +++ b/tests/queries/0_stateless/01442_date_time_with_params.reference @@ -15,6 +15,9 @@ parseDateTimeBestEffort 2020-05-14 03:37:03.253 DateTime64(3, \'UTC\') 2021-12-28 00:00:00.123 DateTime64(3, \'UTC\') 2021-12-28 00:00:00 DateTime(\'UTC\') +2021-12-15 00:00:00 DateTime +2021-12-15 00:00:00 DateTime(\'UTC\') +2021-12-15 00:00:00.000 DateTime64(3, \'UTC\') parseDateTimeBestEffortOrNull \N Nullable(DateTime64(3)) 2020-05-14 03:37:03.000 Nullable(DateTime64(3, \'UTC\')) @@ -29,6 +32,9 @@ parseDateTimeBestEffortOrNull 2020-05-14 03:37:03.253 Nullable(DateTime64(3, \'UTC\')) 2021-12-28 00:00:00.123 Nullable(DateTime64(3, \'UTC\')) 2021-12-28 00:00:00 Nullable(DateTime(\'UTC\')) +2021-12-15 00:00:00 Nullable(DateTime) +2021-12-15 00:00:00 Nullable(DateTime(\'UTC\')) +2021-12-15 00:00:00.000 Nullable(DateTime64(3, \'UTC\')) parseDateTimeBestEffortOrZero 1970-01-01 00:00:00.000 DateTime64(3, \'UTC\') 2020-05-14 03:37:03.000 DateTime64(3, \'UTC\') @@ -43,6 +49,9 @@ parseDateTimeBestEffortOrZero 2020-05-14 03:37:03.253 DateTime64(3, \'UTC\') 2021-12-28 00:00:00.123 DateTime64(3, \'UTC\') 2021-12-28 00:00:00 DateTime(\'UTC\') +2021-12-15 00:00:00 DateTime +2021-12-15 00:00:00 DateTime(\'UTC\') +2021-12-15 00:00:00.000 DateTime64(3, \'UTC\') parseDateTime32BestEffort 2020-05-14 03:37:03 DateTime(\'UTC\') 2020-05-14 03:37:03 DateTime(\'UTC\') @@ -55,6 +64,8 @@ parseDateTime32BestEffort 2020-05-14 06:37:03 DateTime(\'Europe/Minsk\') 2020-05-14 03:37:03 DateTime(\'UTC\') 2021-12-28 00:00:00 DateTime(\'UTC\') +2021-12-15 00:00:00 DateTime +2021-12-15 00:00:00 DateTime(\'UTC\') parseDateTime32BestEffortOrNull \N Nullable(DateTime) 2020-05-14 03:37:03 Nullable(DateTime(\'UTC\')) @@ -68,6 +79,8 @@ parseDateTime32BestEffortOrNull 2020-05-14 06:37:03 Nullable(DateTime(\'Europe/Minsk\')) 2020-05-14 03:37:03 Nullable(DateTime(\'UTC\')) 2021-12-28 00:00:00 Nullable(DateTime(\'UTC\')) +2021-12-15 00:00:00 Nullable(DateTime) +2021-12-15 00:00:00 Nullable(DateTime(\'UTC\')) parseDateTime32BestEffortOrZero 1970-01-01 00:00:00 DateTime(\'UTC\') 2020-05-14 03:37:03 DateTime(\'UTC\') @@ -81,3 +94,5 @@ parseDateTime32BestEffortOrZero 2020-05-14 06:37:03 DateTime(\'Europe/Minsk\') 2020-05-14 03:37:03 DateTime(\'UTC\') 2021-12-28 00:00:00 DateTime(\'UTC\') +2021-12-15 00:00:00 DateTime +2021-12-15 00:00:00 DateTime(\'UTC\') diff --git a/tests/queries/0_stateless/01442_date_time_with_params.sql b/tests/queries/0_stateless/01442_date_time_with_params.sql index aeb9aa597ef..6b32ee4919d 100644 --- a/tests/queries/0_stateless/01442_date_time_with_params.sql +++ b/tests/queries/0_stateless/01442_date_time_with_params.sql @@ -26,6 +26,9 @@ SELECT parseDateTimeBestEffort('2020-05-14T03:37:03.253184Z', 3, 'Europe/Minsk') SELECT parseDateTimeBestEffort(materialize('2020-05-14T03:37:03.253184Z'), 3, 'UTC') AS a, toTypeName(a); SELECT parseDateTimeBestEffort('1640649600123', 3, 'UTC') AS a, toTypeName(a); SELECT parseDateTimeBestEffort('1640649600123', 'UTC') AS a, toTypeName(a); +SELECT parseDateTimeBestEffort('Dec 15, 2021') AS a, toTypeName(a); +SELECT parseDateTimeBestEffort('Dec 15, 2021', 'UTC') AS a, toTypeName(a); +SELECT parseDateTimeBestEffort('Dec 15, 2021', 3, 'UTC') AS a, toTypeName(a); SELECT 'parseDateTimeBestEffortOrNull'; SELECT parseDateTimeBestEffortOrNull('', 3) AS a, toTypeName(a); @@ -41,6 +44,9 @@ SELECT parseDateTimeBestEffortOrNull('2020-05-14T03:37:03.253184Z', 3, 'Europe/M SELECT parseDateTimeBestEffortOrNull(materialize('2020-05-14T03:37:03.253184Z'), 3, 'UTC') AS a, toTypeName(a); SELECT parseDateTimeBestEffortOrNull('1640649600123', 3, 'UTC') AS a, toTypeName(a); SELECT parseDateTimeBestEffortOrNull('1640649600123', 'UTC') AS a, toTypeName(a); +SELECT parseDateTimeBestEffortOrNull('Dec 15, 2021') AS a, toTypeName(a); +SELECT parseDateTimeBestEffortOrNull('Dec 15, 2021', 'UTC') AS a, toTypeName(a); +SELECT parseDateTimeBestEffortOrNull('Dec 15, 2021', 3, 'UTC') AS a, toTypeName(a); SELECT 'parseDateTimeBestEffortOrZero'; SELECT parseDateTimeBestEffortOrZero('', 3, 'UTC') AS a, toTypeName(a); @@ -56,6 +62,9 @@ SELECT parseDateTimeBestEffortOrZero('2020-05-14T03:37:03.253184Z', 3, 'Europe/M SELECT parseDateTimeBestEffortOrZero(materialize('2020-05-14T03:37:03.253184Z'), 3, 'UTC') AS a, toTypeName(a); SELECT parseDateTimeBestEffortOrZero('1640649600123', 3, 'UTC') AS a, toTypeName(a); SELECT parseDateTimeBestEffortOrZero('1640649600123', 'UTC') AS a, toTypeName(a); +SELECT parseDateTimeBestEffortOrZero('Dec 15, 2021') AS a, toTypeName(a); +SELECT parseDateTimeBestEffortOrZero('Dec 15, 2021', 'UTC') AS a, toTypeName(a); +SELECT parseDateTimeBestEffortOrZero('Dec 15, 2021', 3, 'UTC') AS a, toTypeName(a); SELECT 'parseDateTime32BestEffort'; SELECT parseDateTime32BestEffort('') AS a, toTypeName(a); -- {serverError 41} @@ -70,6 +79,8 @@ SELECT parseDateTime32BestEffort('2020-05-14T03:37:03.253184Z', 'UTC') AS a, toT SELECT parseDateTime32BestEffort('2020-05-14T03:37:03.253184Z', 'Europe/Minsk') AS a, toTypeName(a); SELECT parseDateTime32BestEffort(materialize('2020-05-14T03:37:03.253184Z'), 'UTC') AS a, toTypeName(a); SELECT parseDateTime32BestEffort('1640649600123', 'UTC') AS a, toTypeName(a); +SELECT parseDateTime32BestEffort('Dec 15, 2021') AS a, toTypeName(a); +SELECT parseDateTime32BestEffort('Dec 15, 2021', 'UTC') AS a, toTypeName(a); SELECT 'parseDateTime32BestEffortOrNull'; SELECT parseDateTime32BestEffortOrNull('') AS a, toTypeName(a); @@ -84,6 +95,8 @@ SELECT parseDateTime32BestEffortOrNull('2020-05-14T03:37:03.253184Z', 'UTC') AS SELECT parseDateTime32BestEffortOrNull('2020-05-14T03:37:03.253184Z', 'Europe/Minsk') AS a, toTypeName(a); SELECT parseDateTime32BestEffortOrNull(materialize('2020-05-14T03:37:03.253184Z'), 'UTC') AS a, toTypeName(a); SELECT parseDateTime32BestEffortOrNull('1640649600123', 'UTC') AS a, toTypeName(a); +SELECT parseDateTime32BestEffortOrNull('Dec 15, 2021') AS a, toTypeName(a); +SELECT parseDateTime32BestEffortOrNull('Dec 15, 2021', 'UTC') AS a, toTypeName(a); SELECT 'parseDateTime32BestEffortOrZero'; SELECT parseDateTime32BestEffortOrZero('', 'UTC') AS a, toTypeName(a); @@ -98,5 +111,7 @@ SELECT parseDateTime32BestEffortOrZero('2020-05-14T03:37:03.253184Z', 'UTC') AS SELECT parseDateTime32BestEffortOrZero('2020-05-14T03:37:03.253184Z', 'Europe/Minsk') AS a, toTypeName(a); SELECT parseDateTime32BestEffortOrZero(materialize('2020-05-14T03:37:03.253184Z'), 'UTC') AS a, toTypeName(a); SELECT parseDateTime32BestEffortOrZero('1640649600123', 'UTC') AS a, toTypeName(a); +SELECT parseDateTime32BestEffortOrZero('Dec 15, 2021') AS a, toTypeName(a); +SELECT parseDateTime32BestEffortOrZero('Dec 15, 2021', 'UTC') AS a, toTypeName(a); DROP TABLE IF EXISTS test; From 98004eec6b69d28ae735e75d263089ed9822e422 Mon Sep 17 00:00:00 2001 From: vdimir Date: Wed, 1 Mar 2023 13:08:24 +0000 Subject: [PATCH 347/841] Fix NOT_IMPLEMENTED error with CROSS JOIN and algorithm = auto --- src/Interpreters/ExpressionAnalyzer.cpp | 1 + src/Planner/PlannerJoins.cpp | 8 +++-- .../0_stateless/00202_cross_join.reference | 30 +++++++++++++++++++ .../queries/0_stateless/00202_cross_join.sql | 6 ++++ 4 files changed, 43 insertions(+), 2 deletions(-) diff --git a/src/Interpreters/ExpressionAnalyzer.cpp b/src/Interpreters/ExpressionAnalyzer.cpp index 2b88ff6a353..67aace815dc 100644 --- a/src/Interpreters/ExpressionAnalyzer.cpp +++ b/src/Interpreters/ExpressionAnalyzer.cpp @@ -1089,6 +1089,7 @@ static std::shared_ptr chooseJoinAlgorithm( if (MergeJoin::isSupported(analyzed_join)) return std::make_shared(analyzed_join, right_sample_block); + return std::make_shared(analyzed_join, right_sample_block); } throw Exception(ErrorCodes::NOT_IMPLEMENTED, diff --git a/src/Planner/PlannerJoins.cpp b/src/Planner/PlannerJoins.cpp index e1c137ddfb8..2a7bd49d6a3 100644 --- a/src/Planner/PlannerJoins.cpp +++ b/src/Planner/PlannerJoins.cpp @@ -655,7 +655,7 @@ std::shared_ptr chooseJoinAlgorithm(std::shared_ptr & table_jo return std::make_shared(table_join, right_table_expression_header); } - if (!table_join->oneDisjunct() && !table_join->isEnabledAlgorithm(JoinAlgorithm::HASH)) + if (!table_join->oneDisjunct() && !table_join->isEnabledAlgorithm(JoinAlgorithm::HASH) && !table_join->isEnabledAlgorithm(JoinAlgorithm::AUTO)) throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Only `hash` join supports multiple ORs for keys in JOIN ON section"); /// Direct JOIN with special storages that support key value access. For example JOIN with Dictionary @@ -708,7 +708,11 @@ std::shared_ptr chooseJoinAlgorithm(std::shared_ptr & table_jo } if (table_join->isEnabledAlgorithm(JoinAlgorithm::AUTO)) - return std::make_shared(table_join, right_table_expression_header); + { + if (MergeJoin::isSupported(table_join)) + return std::make_shared(table_join, right_table_expression_header); + return std::make_shared(table_join, right_table_expression_header); + } throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Can't execute any of specified algorithms for specified strictness/kind and right storage type"); diff --git a/tests/queries/0_stateless/00202_cross_join.reference b/tests/queries/0_stateless/00202_cross_join.reference index 122cf0a6e06..a8db281730a 100644 --- a/tests/queries/0_stateless/00202_cross_join.reference +++ b/tests/queries/0_stateless/00202_cross_join.reference @@ -13,3 +13,33 @@ 2 2 2 3 2 4 +0 0 +0 1 +0 2 +0 3 +0 4 +1 0 +1 1 +1 2 +1 3 +1 4 +2 0 +2 1 +2 2 +2 3 +2 4 +0 0 +0 1 +0 2 +0 3 +0 4 +1 0 +1 1 +1 2 +1 3 +1 4 +2 0 +2 1 +2 2 +2 3 +2 4 diff --git a/tests/queries/0_stateless/00202_cross_join.sql b/tests/queries/0_stateless/00202_cross_join.sql index ed435d90021..8d62c56b3f1 100644 --- a/tests/queries/0_stateless/00202_cross_join.sql +++ b/tests/queries/0_stateless/00202_cross_join.sql @@ -1 +1,7 @@ SELECT x, y FROM (SELECT number AS x FROM system.numbers LIMIT 3) js1 CROSS JOIN (SELECT number AS y FROM system.numbers LIMIT 5) js2; + +SET join_algorithm = 'auto'; +SELECT x, y FROM (SELECT number AS x FROM system.numbers LIMIT 3) js1 CROSS JOIN (SELECT number AS y FROM system.numbers LIMIT 5) js2; + +SET allow_experimental_analyzer = 1; +SELECT x, y FROM (SELECT number AS x FROM system.numbers LIMIT 3) js1 CROSS JOIN (SELECT number AS y FROM system.numbers LIMIT 5) js2; From f2e1d6d4025a3dcabf0f18828803d31252fc1bd9 Mon Sep 17 00:00:00 2001 From: robot-clickhouse Date: Wed, 1 Mar 2023 13:11:32 +0000 Subject: [PATCH 348/841] Update version_date.tsv and changelogs after v23.2.2.20-stable --- docker/keeper/Dockerfile | 2 +- docker/server/Dockerfile.alpine | 2 +- docker/server/Dockerfile.ubuntu | 2 +- docs/changelogs/v23.2.2.20-stable.md | 30 ++++++++++++++++++++++++++++ utils/list-versions/version_date.tsv | 3 +++ 5 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 docs/changelogs/v23.2.2.20-stable.md diff --git a/docker/keeper/Dockerfile b/docker/keeper/Dockerfile index 09395befdad..532f1531bb8 100644 --- a/docker/keeper/Dockerfile +++ b/docker/keeper/Dockerfile @@ -29,7 +29,7 @@ RUN arch=${TARGETARCH:-amd64} \ esac ARG REPOSITORY="https://s3.amazonaws.com/clickhouse-builds/22.4/31c367d3cd3aefd316778601ff6565119fe36682/package_release" -ARG VERSION="23.2.1.2537" +ARG VERSION="23.2.2.20" ARG PACKAGES="clickhouse-keeper" # user/group precreated explicitly with fixed uid/gid on purpose. diff --git a/docker/server/Dockerfile.alpine b/docker/server/Dockerfile.alpine index 472f25eed2d..f56e177bbe9 100644 --- a/docker/server/Dockerfile.alpine +++ b/docker/server/Dockerfile.alpine @@ -33,7 +33,7 @@ RUN arch=${TARGETARCH:-amd64} \ # lts / testing / prestable / etc ARG REPO_CHANNEL="stable" ARG REPOSITORY="https://packages.clickhouse.com/tgz/${REPO_CHANNEL}" -ARG VERSION="23.2.1.2537" +ARG VERSION="23.2.2.20" ARG PACKAGES="clickhouse-client clickhouse-server clickhouse-common-static" # user/group precreated explicitly with fixed uid/gid on purpose. diff --git a/docker/server/Dockerfile.ubuntu b/docker/server/Dockerfile.ubuntu index 5dbb244c298..1372288978d 100644 --- a/docker/server/Dockerfile.ubuntu +++ b/docker/server/Dockerfile.ubuntu @@ -22,7 +22,7 @@ RUN sed -i "s|http://archive.ubuntu.com|${apt_archive}|g" /etc/apt/sources.list ARG REPO_CHANNEL="stable" ARG REPOSITORY="deb https://packages.clickhouse.com/deb ${REPO_CHANNEL} main" -ARG VERSION="23.2.1.2537" +ARG VERSION="23.2.2.20" ARG PACKAGES="clickhouse-client clickhouse-server clickhouse-common-static" # set non-empty deb_location_url url to create a docker image diff --git a/docs/changelogs/v23.2.2.20-stable.md b/docs/changelogs/v23.2.2.20-stable.md new file mode 100644 index 00000000000..60aeaa66cbf --- /dev/null +++ b/docs/changelogs/v23.2.2.20-stable.md @@ -0,0 +1,30 @@ +--- +sidebar_position: 1 +sidebar_label: 2023 +--- + +# 2023 Changelog + +### ClickHouse release v23.2.2.20-stable (f6c269c8df2) FIXME as compared to v23.2.1.2537-stable (52bf836e03a) + +#### Improvement +* Backported in [#46914](https://github.com/ClickHouse/ClickHouse/issues/46914): Allow PREWHERE for Merge with different DEFAULT expression for column. [#46831](https://github.com/ClickHouse/ClickHouse/pull/46831) ([Azat Khuzhin](https://github.com/azat)). +* Backported in [#47022](https://github.com/ClickHouse/ClickHouse/issues/47022): Allow IPv4 in range(). [#46995](https://github.com/ClickHouse/ClickHouse/pull/46995) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). + +#### Bug Fix +* Backported in [#46828](https://github.com/ClickHouse/ClickHouse/issues/46828): Combined PREWHERE column accumulated from multiple PREWHERE in some cases didn't contain 0's from previous steps. The fix is to apply final filter if we know that it wasn't applied from more than 1 last step. [#46785](https://github.com/ClickHouse/ClickHouse/pull/46785) ([Alexander Gololobov](https://github.com/davenger)). + +#### Build/Testing/Packaging Improvement +* Backported in [#47062](https://github.com/ClickHouse/ClickHouse/issues/47062): Fix error during server startup on old distros (e.g. Amazon Linux 2) and on ARM that glibc 2.28 symbols are not found. [#47008](https://github.com/ClickHouse/ClickHouse/pull/47008) ([Robert Schulze](https://github.com/rschu1ze)). + +#### Bug Fix (user-visible misbehavior in official stable or prestable release) + +* Backported in [#46895](https://github.com/ClickHouse/ClickHouse/issues/46895): Fixed a bug in automatic retries of `DROP TABLE` query with `ReplicatedMergeTree` tables and `Atomic` databases. In rare cases it could lead to `Can't get data for node /zk_path/log_pointer` and `The specified key does not exist` errors if ZooKeeper session expired during DROP and a new replicated table with the same path in ZooKeeper was created in parallel. [#46384](https://github.com/ClickHouse/ClickHouse/pull/46384) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Backported in [#46865](https://github.com/ClickHouse/ClickHouse/issues/46865): Fix a bug in the `Map` data type. This closes [#46855](https://github.com/ClickHouse/ClickHouse/issues/46855). [#46856](https://github.com/ClickHouse/ClickHouse/pull/46856) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Backported in [#46958](https://github.com/ClickHouse/ClickHouse/issues/46958): Fix result of LIKE predicates which translate to substring searches and contain quoted non-LIKE metacharacters. [#46875](https://github.com/ClickHouse/ClickHouse/pull/46875) ([Robert Schulze](https://github.com/rschu1ze)). + +#### NOT FOR CHANGELOG / INSIGNIFICANT + +* More concise logging at trace level for PREWHERE steps [#46771](https://github.com/ClickHouse/ClickHouse/pull/46771) ([Alexander Gololobov](https://github.com/davenger)). +* Reduce updates of Mergeable Check [#46781](https://github.com/ClickHouse/ClickHouse/pull/46781) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). + diff --git a/utils/list-versions/version_date.tsv b/utils/list-versions/version_date.tsv index 3814e94bf24..8a25ceb13cf 100644 --- a/utils/list-versions/version_date.tsv +++ b/utils/list-versions/version_date.tsv @@ -1,4 +1,6 @@ +v23.2.2.20-stable 2023-03-01 v23.2.1.2537-stable 2023-02-23 +v23.1.4.58-stable 2023-03-01 v23.1.3.5-stable 2023-02-03 v23.1.2.9-stable 2023-01-29 v23.1.1.3077-stable 2023-01-25 @@ -25,6 +27,7 @@ v22.9.4.32-stable 2022-10-26 v22.9.3.18-stable 2022-09-30 v22.9.2.7-stable 2022-09-23 v22.9.1.2603-stable 2022-09-22 +v22.8.14.53-lts 2023-02-27 v22.8.13.20-lts 2023-01-29 v22.8.12.45-lts 2023-01-10 v22.8.11.15-lts 2022-12-08 From a898dd556fb475020a6a7fcb1fdf58ac43d826f2 Mon Sep 17 00:00:00 2001 From: robot-clickhouse Date: Wed, 1 Mar 2023 13:12:22 +0000 Subject: [PATCH 349/841] Update version_date.tsv and changelogs after v23.1.4.58-stable --- docs/changelogs/v23.1.4.58-stable.md | 47 ++++++++++++++++++++++++++++ utils/list-versions/version_date.tsv | 2 ++ 2 files changed, 49 insertions(+) create mode 100644 docs/changelogs/v23.1.4.58-stable.md diff --git a/docs/changelogs/v23.1.4.58-stable.md b/docs/changelogs/v23.1.4.58-stable.md new file mode 100644 index 00000000000..d1ffe87f58e --- /dev/null +++ b/docs/changelogs/v23.1.4.58-stable.md @@ -0,0 +1,47 @@ +--- +sidebar_position: 1 +sidebar_label: 2023 +--- + +# 2023 Changelog + +### ClickHouse release v23.1.4.58-stable (9ed562163a5) FIXME as compared to v23.1.3.5-stable (548b494bcce) + +#### Performance Improvement +* Backported in [#46380](https://github.com/ClickHouse/ClickHouse/issues/46380): Fix too big memory usage for vertical merges on non-remote disk. Respect `max_insert_delayed_streams_for_parallel_write` for the remote disk. [#46275](https://github.com/ClickHouse/ClickHouse/pull/46275) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). + +#### Improvement +* Backported in [#46985](https://github.com/ClickHouse/ClickHouse/issues/46985): - Apply `ALTER TABLE table_name ON CLUSTER cluster MOVE PARTITION|PART partition_expr TO DISK|VOLUME 'disk_name'` to all replicas. Because `ALTER TABLE t MOVE` is not replicated. [#46402](https://github.com/ClickHouse/ClickHouse/pull/46402) ([lizhuoyu5](https://github.com/lzydmxy)). +* Backported in [#46778](https://github.com/ClickHouse/ClickHouse/issues/46778): Backward compatibility for T64 codec support for IPv4. [#46747](https://github.com/ClickHouse/ClickHouse/pull/46747) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Backported in [#47020](https://github.com/ClickHouse/ClickHouse/issues/47020): Allow IPv4 in range(). [#46995](https://github.com/ClickHouse/ClickHouse/pull/46995) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). + +#### Build/Testing/Packaging Improvement +* Backported in [#46031](https://github.com/ClickHouse/ClickHouse/issues/46031): Add systemd.service file for clickhouse-keeper. Fixes [#44293](https://github.com/ClickHouse/ClickHouse/issues/44293). [#45568](https://github.com/ClickHouse/ClickHouse/pull/45568) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Backported in [#46477](https://github.com/ClickHouse/ClickHouse/issues/46477): Get rid of unnecessary build for standalone clickhouse-keeper. [#46367](https://github.com/ClickHouse/ClickHouse/pull/46367) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Backported in [#46511](https://github.com/ClickHouse/ClickHouse/issues/46511): Some time ago the ccache compression was changed to `zst`, but `gz` archives are downloaded by default. It fixes it by prioritizing zst archive. [#46490](https://github.com/ClickHouse/ClickHouse/pull/46490) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). + +#### Bug Fix (user-visible misbehavior in official stable or prestable release) + +* Backported in [#46228](https://github.com/ClickHouse/ClickHouse/issues/46228): A couple of seg faults have been reported around `c-ares`. All of the recent stack traces observed fail on inserting into `std::unodered_set<>`. I believe I have found the root cause of this, it seems to be unprocessed queries. Prior to this PR, CH calls `poll` to wait on the file descriptors in the `c-ares` channel. According to the [poll docs](https://man7.org/linux/man-pages/man2/poll.2.html), a negative return value means an error has ocurred. Because of this, we would abort the execution and return failure. The problem is that `poll` will also return a negative value if a system interrupt occurs. A system interrupt does not mean the processing has failed or ended, but we would abort it anyways because we were checking for negative values. Once the execution is aborted, the whole stack is destroyed, which includes the `std::unordered_set` passed to the `void *` parameter of the c-ares callback. Once c-ares completed the request, the callback would be invoked and would access an invalid memory address causing a segfault. [#45629](https://github.com/ClickHouse/ClickHouse/pull/45629) ([Arthur Passos](https://github.com/arthurpassos)). +* Backported in [#46967](https://github.com/ClickHouse/ClickHouse/issues/46967): Backward compatibility - allow implicit narrowing conversion from UInt64 to IPv4 - required for "INSERT ... VALUES ..." expression. [#45865](https://github.com/ClickHouse/ClickHouse/pull/45865) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Backported in [#46220](https://github.com/ClickHouse/ClickHouse/issues/46220): Fix reading of non existing nested columns with multiple level in compact parts. [#46045](https://github.com/ClickHouse/ClickHouse/pull/46045) ([Azat Khuzhin](https://github.com/azat)). +* Backported in [#46751](https://github.com/ClickHouse/ClickHouse/issues/46751): Follow-up fix for Replace domain IP types (IPv4, IPv6) with native https://github.com/ClickHouse/ClickHouse/pull/43221. [#46087](https://github.com/ClickHouse/ClickHouse/pull/46087) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Backported in [#46448](https://github.com/ClickHouse/ClickHouse/issues/46448): Fix possible `LOGICAL_ERROR` in asynchronous inserts with invalid data sent in format `VALUES`. [#46350](https://github.com/ClickHouse/ClickHouse/pull/46350) ([Anton Popov](https://github.com/CurtizJ)). +* Backported in [#46680](https://github.com/ClickHouse/ClickHouse/issues/46680): Fix an invalid processing of constant `LowCardinality` argument in function `arrayMap`. This bug could lead to a segfault in release, and logical error `Bad cast` in debug build. [#46569](https://github.com/ClickHouse/ClickHouse/pull/46569) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Backported in [#46873](https://github.com/ClickHouse/ClickHouse/issues/46873): Fix a bug in the `Map` data type. This closes [#46855](https://github.com/ClickHouse/ClickHouse/issues/46855). [#46856](https://github.com/ClickHouse/ClickHouse/pull/46856) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Backported in [#46956](https://github.com/ClickHouse/ClickHouse/issues/46956): Fix result of LIKE predicates which translate to substring searches and contain quoted non-LIKE metacharacters. [#46875](https://github.com/ClickHouse/ClickHouse/pull/46875) ([Robert Schulze](https://github.com/rschu1ze)). + +#### NOT FOR CHANGELOG / INSIGNIFICANT + +* Another attempt to fix automerge, or at least to have debug footprint [#45476](https://github.com/ClickHouse/ClickHouse/pull/45476) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Support DELETE ON CLUSTER [#45786](https://github.com/ClickHouse/ClickHouse/pull/45786) ([Alexander Gololobov](https://github.com/davenger)). +* Add check for running workflows to merge_pr.py [#45803](https://github.com/ClickHouse/ClickHouse/pull/45803) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Add necessary dependency for sanitizers [#45959](https://github.com/ClickHouse/ClickHouse/pull/45959) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Add helping logging to auto-merge script [#46080](https://github.com/ClickHouse/ClickHouse/pull/46080) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Fix write buffer destruction order for vertical merge. [#46205](https://github.com/ClickHouse/ClickHouse/pull/46205) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Wait for background tasks in ~UploadHelper [#46334](https://github.com/ClickHouse/ClickHouse/pull/46334) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Improve install_check.py [#46458](https://github.com/ClickHouse/ClickHouse/pull/46458) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Fix dependencies for InstallPackagesTestAarch64 [#46597](https://github.com/ClickHouse/ClickHouse/pull/46597) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Get rid of legacy DocsReleaseChecks [#46665](https://github.com/ClickHouse/ClickHouse/pull/46665) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Reduce updates of Mergeable Check [#46781](https://github.com/ClickHouse/ClickHouse/pull/46781) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). + diff --git a/utils/list-versions/version_date.tsv b/utils/list-versions/version_date.tsv index 3814e94bf24..6cae29d53a8 100644 --- a/utils/list-versions/version_date.tsv +++ b/utils/list-versions/version_date.tsv @@ -1,4 +1,5 @@ v23.2.1.2537-stable 2023-02-23 +v23.1.4.58-stable 2023-03-01 v23.1.3.5-stable 2023-02-03 v23.1.2.9-stable 2023-01-29 v23.1.1.3077-stable 2023-01-25 @@ -25,6 +26,7 @@ v22.9.4.32-stable 2022-10-26 v22.9.3.18-stable 2022-09-30 v22.9.2.7-stable 2022-09-23 v22.9.1.2603-stable 2022-09-22 +v22.8.14.53-lts 2023-02-27 v22.8.13.20-lts 2023-01-29 v22.8.12.45-lts 2023-01-10 v22.8.11.15-lts 2022-12-08 From e8847f2fb6be0c951cc4e7a13cec580c8da88989 Mon Sep 17 00:00:00 2001 From: taiyang-li <654010905@qq.com> Date: Wed, 1 Mar 2023 21:15:01 +0800 Subject: [PATCH 350/841] change as request --- .../functions/tuple-map-functions.md | 64 ++++++++++--------- src/Functions/map.cpp | 51 ++++++--------- .../0_stateless/01651_map_functions.reference | 2 + .../0_stateless/01651_map_functions.sql | 6 +- 4 files changed, 59 insertions(+), 64 deletions(-) diff --git a/docs/en/sql-reference/functions/tuple-map-functions.md b/docs/en/sql-reference/functions/tuple-map-functions.md index d59204a7482..28f2f930d90 100644 --- a/docs/en/sql-reference/functions/tuple-map-functions.md +++ b/docs/en/sql-reference/functions/tuple-map-functions.md @@ -66,6 +66,40 @@ Result: - [Map(key, value)](../../sql-reference/data-types/map.md) data type +## mapFromArrays + +mapFromArrays merges an array of keys and an array of values into a Map. + +**Syntax** + +```sql +mapFromArrays(keys, values) +``` + +Alias: `MAP_FROM_ARRAYS(keys, values)` + +**Parameters** +- `keys` — Given key array to create a map from. The nested type of array must be: [String](../../sql-reference/data-types/string.md), [Integer](../../sql-reference/data-types/int-uint.md), [LowCardinality](../../sql-reference/data-types/lowcardinality.md), [FixedString](../../sql-reference/data-types/fixedstring.md), [UUID](../../sql-reference/data-types/uuid.md), [Date](../../sql-reference/data-types/date.md), [DateTime](../../sql-reference/data-types/datetime.md), [Date32](../../sql-reference/data-types/date32.md), [Enum](../../sql-reference/data-types/enum.md) +- `values` - Given value array to create a map from. + +**Returned value** + +- A map whose keys and values are constructed from the key and value arrays + +**Example** + +Query: + +```sql +select mapFromArrays(['a', 'b', 'c'], [1, 2, 3]) +``` + +```text +┌─mapFromArrays(['a', 'b', 'c'], [1, 2, 3])─┐ +│ {'a':1,'b':2,'c':3} │ +└───────────────────────────────────────────┘ +``` + ## mapAdd Collect all the keys and sum corresponding values. @@ -431,36 +465,6 @@ Result: ``` -## mapFromArrays {#mapFromArrays} - -**Syntax** - -```sql -mapFromArrays(keys, values) -``` - -**Parameters** - -- `keys` — Given key array to create a map from. -- `values` - Given value array to create a map from. - -**Returned value** - -- A map whose keys and values are from input arrays respectively. - -**Example** - -Query: - -```sql -select mapFromArrays(['a', 'b', 'c'], [1, 2, 3]) -``` - -```text -┌─mapFromArrays(['a', 'b', 'c'], [1, 2, 3])─┐ -│ {'a':1,'b':2,'c':3} │ -└───────────────────────────────────────────┘ -``` ## mapApply diff --git a/src/Functions/map.cpp b/src/Functions/map.cpp index 78985bd18fc..549de200bea 100644 --- a/src/Functions/map.cpp +++ b/src/Functions/map.cpp @@ -26,7 +26,7 @@ namespace ErrorCodes { extern const int NUMBER_OF_ARGUMENTS_DOESNT_MATCH; extern const int ILLEGAL_TYPE_OF_ARGUMENT; - extern const int SIZES_OF_ARRAYS_DOESNT_MATCH; + extern const int SIZES_OF_ARRAYS_DONT_MATCH; extern const int ILLEGAL_COLUMN; } @@ -149,26 +149,16 @@ public: } }; -// mapFromArrays(keys, values) is a function that allows you to make key-value pair from a pair of arrays +/// mapFromArrays(keys, values) is a function that allows you to make key-value pair from a pair of arrays class FunctionMapFromArrays : public IFunction { public: static constexpr auto name = "mapFromArrays"; - static FunctionPtr create(ContextPtr) - { - return std::make_shared(); - } + static FunctionPtr create(ContextPtr) { return std::make_shared(); } + String getName() const override { return name; } - String getName() const override - { - return name; - } - - size_t getNumberOfArguments() const override - { - return 2; - } + size_t getNumberOfArguments() const override { return 2; } bool isSuitableForShortCircuitArgumentsExecution(const DataTypesWithConstInfo & /*arguments*/) const override { return false; } bool useDefaultImplementationForNulls() const override { return false; } @@ -177,25 +167,22 @@ public: DataTypePtr getReturnTypeImpl(const DataTypes & arguments) const override { if (arguments.size() != 2) - throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, - "Function {} requires 2 arguments, but {} given", getName(), arguments.size()); + throw Exception( + ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, + "Function {} requires 2 arguments, but {} given", + getName(), + arguments.size()); const auto * keys_type = checkAndGetDataType(arguments[0].get()); if (!keys_type) - throw Exception{"First argument for function " + getName() + " must be a Array", - ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT}; + throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "First argument for function {} must be an Array", getName()); const auto * values_type = checkAndGetDataType(arguments[1].get()); if (!values_type) - throw Exception{"Second argument for function " + getName() + " must be a Array", - ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT}; + throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Second argument for function {} must be an Array", getName()); - DataTypes tmp; - const auto & key_type = keys_type->getNestedType(); - const auto & value_type = values_type->getNestedType(); - tmp.emplace_back(key_type); - tmp.emplace_back(value_type); - return std::make_shared(tmp); + DataTypes key_value_types{keys_type->getNestedType(), values_type->getNestedType()}; + return std::make_shared(key_value_types); } ColumnPtr executeImpl( @@ -228,17 +215,15 @@ public: } if (!col_keys || !col_values) - throw Exception("Arguments of function " + getName() + " must be array.", ErrorCodes::ILLEGAL_COLUMN); + throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Arguments of function {} must be array", getName()); if (!col_keys->hasEqualOffsets(*col_values)) - throw Exception("Array arguments for function " + getName() + " must have equal sizes", ErrorCodes::SIZES_OF_ARRAYS_DOESNT_MATCH); + throw Exception(ErrorCodes::SIZES_OF_ARRAYS_DONT_MATCH, "Array arguments for function {} must have equal sizes", getName()); const auto & data_keys = col_keys->getDataPtr(); const auto & data_values = col_values->getDataPtr(); const auto & offsets = col_keys->getOffsetsPtr(); - auto nested_column = ColumnArray::create( - ColumnTuple::create(Columns{std::move(data_keys), std::move(data_values)}), - std::move(offsets)); + auto nested_column = ColumnArray::create(ColumnTuple::create(Columns{data_keys, data_values}), offsets); return ColumnMap::create(nested_column); } }; @@ -745,6 +730,8 @@ REGISTER_FUNCTION(Map) factory.registerFunction(); factory.registerFunction(); factory.registerFunction(); + factory.registerAlias("MAP_FROM_ARRAYS", "mapFromArrays"); + } } diff --git a/tests/queries/0_stateless/01651_map_functions.reference b/tests/queries/0_stateless/01651_map_functions.reference index 284e27a1b0d..f7fd3503327 100644 --- a/tests/queries/0_stateless/01651_map_functions.reference +++ b/tests/queries/0_stateless/01651_map_functions.reference @@ -31,3 +31,5 @@ {'aa':4,'bb':5} {'aa':4,'bb':5} {'aa':4,'bb':5} +{'aa':4,'bb':5} +{'aa':4,'bb':5} diff --git a/tests/queries/0_stateless/01651_map_functions.sql b/tests/queries/0_stateless/01651_map_functions.sql index 57023d41470..4d2bb3a0812 100644 --- a/tests/queries/0_stateless/01651_map_functions.sql +++ b/tests/queries/0_stateless/01651_map_functions.sql @@ -31,7 +31,9 @@ select map( 'aa', 4, 'bb' , 5) as m, mapContains(m, 'aa'), mapContains(m, 'k'); select map(0, 0) as m, mapContains(m, number % 2) from numbers(2); select mapFromArrays(['aa', 'bb'], [4, 5]); -select mapFromArrays(['aa', 'bb'], materialize([4, 5])); -select mapFromArrays(['aa', 'bb'], materialize([4, 5])) from numbers(3); +select mapFromArrays(['aa', 'bb'], materialize([4, 5])) from numbers(2); +select mapFromArrays(materialize(['aa', 'bb']), [4, 5]) from numbers(2); +select mapFromArrays(materialize(['aa', 'bb']), materialize([4, 5])) from numbers(2); select mapFromArrays(['aa', 'bb'], [4, 5], [6, 7]); -- { serverError 42 } select mapFromArrays(['aa', 'bb'], [4, 5, 6]); -- { serverError 190 } +select mapFromArrays([[1,2], [3,4]], [4, 5, 6]); -- { serverError 36 } From 598efe19858a0ca3aee6be015a99ebdf92c5ca67 Mon Sep 17 00:00:00 2001 From: taiyang-li <654010905@qq.com> Date: Wed, 1 Mar 2023 21:17:05 +0800 Subject: [PATCH 351/841] change as request --- tests/queries/0_stateless/01651_map_functions.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/queries/0_stateless/01651_map_functions.sql b/tests/queries/0_stateless/01651_map_functions.sql index 4d2bb3a0812..f09739cc0d1 100644 --- a/tests/queries/0_stateless/01651_map_functions.sql +++ b/tests/queries/0_stateless/01651_map_functions.sql @@ -34,6 +34,8 @@ select mapFromArrays(['aa', 'bb'], [4, 5]); select mapFromArrays(['aa', 'bb'], materialize([4, 5])) from numbers(2); select mapFromArrays(materialize(['aa', 'bb']), [4, 5]) from numbers(2); select mapFromArrays(materialize(['aa', 'bb']), materialize([4, 5])) from numbers(2); +select mapFromArrays('aa', [4, 5]); -- { serverError 43 } +select mapFromArrays(['aa', 'bb'], 5); -- { serverError 43 } select mapFromArrays(['aa', 'bb'], [4, 5], [6, 7]); -- { serverError 42 } select mapFromArrays(['aa', 'bb'], [4, 5, 6]); -- { serverError 190 } select mapFromArrays([[1,2], [3,4]], [4, 5, 6]); -- { serverError 36 } From 119ea045acf5edffb8e141b6abd285a8bfc5cdb8 Mon Sep 17 00:00:00 2001 From: taiyang-li <654010905@qq.com> Date: Wed, 1 Mar 2023 21:19:39 +0800 Subject: [PATCH 352/841] change as request --- .../queries/0_stateless/01651_map_functions.sql | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/queries/0_stateless/01651_map_functions.sql b/tests/queries/0_stateless/01651_map_functions.sql index f09739cc0d1..848b6932fe0 100644 --- a/tests/queries/0_stateless/01651_map_functions.sql +++ b/tests/queries/0_stateless/01651_map_functions.sql @@ -8,7 +8,7 @@ select mapContains(a, 'name') from table_map; select mapContains(a, 'gender') from table_map; select mapContains(a, 'abc') from table_map; select mapContains(a, b) from table_map; -select mapContains(a, 10) from table_map; -- { serverError 386 } +select mapContains(a, 10) from table_map; -- { serverError NO_COMMON_TYPE } select mapKeys(a) from table_map; select mapFromArrays(c, d) from table_map; drop table if exists table_map; @@ -16,8 +16,8 @@ drop table if exists table_map; CREATE TABLE table_map (a Map(UInt8, Int), b UInt8, c UInt32, d Array(String), e Array(String)) engine = MergeTree order by tuple(); insert into table_map select map(number, number), number, number, [number, number, number], [number*2, number*3, number*4] from numbers(1000, 3); select mapContains(a, b), mapContains(a, c), mapContains(a, 233) from table_map; -select mapContains(a, 'aaa') from table_map; -- { serverError 386 } -select mapContains(b, 'aaa') from table_map; -- { serverError 43 } +select mapContains(a, 'aaa') from table_map; -- { serverError NO_COMMON_TYPE } +select mapContains(b, 'aaa') from table_map; -- { serverError ILLEGAL_TYPE_OF_ARGUMENT } select mapKeys(a) from table_map; select mapValues(a) from table_map; select mapFromArrays(d, e) from table_map; @@ -34,8 +34,8 @@ select mapFromArrays(['aa', 'bb'], [4, 5]); select mapFromArrays(['aa', 'bb'], materialize([4, 5])) from numbers(2); select mapFromArrays(materialize(['aa', 'bb']), [4, 5]) from numbers(2); select mapFromArrays(materialize(['aa', 'bb']), materialize([4, 5])) from numbers(2); -select mapFromArrays('aa', [4, 5]); -- { serverError 43 } -select mapFromArrays(['aa', 'bb'], 5); -- { serverError 43 } -select mapFromArrays(['aa', 'bb'], [4, 5], [6, 7]); -- { serverError 42 } -select mapFromArrays(['aa', 'bb'], [4, 5, 6]); -- { serverError 190 } -select mapFromArrays([[1,2], [3,4]], [4, 5, 6]); -- { serverError 36 } +select mapFromArrays('aa', [4, 5]); -- { serverError ILLEGAL_TYPE_OF_ARGUMENT } +select mapFromArrays(['aa', 'bb'], 5); -- { serverError ILLEGAL_TYPE_OF_ARGUMENT } +select mapFromArrays(['aa', 'bb'], [4, 5], [6, 7]); -- { serverError NUMBER_OF_ARGUMENTS_DOESNT_MATCH } +select mapFromArrays(['aa', 'bb'], [4, 5, 6]); -- { serverError SIZES_OF_ARRAYS_DONT_MATCH } +select mapFromArrays([[1,2], [3,4]], [4, 5, 6]); -- { serverError BAD_ARGUMENTS } From 50d033c563c58d5925a19eff01464616fe16ea7f Mon Sep 17 00:00:00 2001 From: robot-clickhouse Date: Wed, 1 Mar 2023 13:48:23 +0000 Subject: [PATCH 353/841] Update version_date.tsv and changelogs after v22.12.4.76-stable --- docker/keeper/Dockerfile | 2 +- docker/server/Dockerfile.alpine | 2 +- docker/server/Dockerfile.ubuntu | 2 +- docs/changelogs/v22.12.4.76-stable.md | 55 +++++++++++++++++++++++++++ utils/list-versions/version_date.tsv | 4 ++ 5 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 docs/changelogs/v22.12.4.76-stable.md diff --git a/docker/keeper/Dockerfile b/docker/keeper/Dockerfile index 09395befdad..532f1531bb8 100644 --- a/docker/keeper/Dockerfile +++ b/docker/keeper/Dockerfile @@ -29,7 +29,7 @@ RUN arch=${TARGETARCH:-amd64} \ esac ARG REPOSITORY="https://s3.amazonaws.com/clickhouse-builds/22.4/31c367d3cd3aefd316778601ff6565119fe36682/package_release" -ARG VERSION="23.2.1.2537" +ARG VERSION="23.2.2.20" ARG PACKAGES="clickhouse-keeper" # user/group precreated explicitly with fixed uid/gid on purpose. diff --git a/docker/server/Dockerfile.alpine b/docker/server/Dockerfile.alpine index 472f25eed2d..f56e177bbe9 100644 --- a/docker/server/Dockerfile.alpine +++ b/docker/server/Dockerfile.alpine @@ -33,7 +33,7 @@ RUN arch=${TARGETARCH:-amd64} \ # lts / testing / prestable / etc ARG REPO_CHANNEL="stable" ARG REPOSITORY="https://packages.clickhouse.com/tgz/${REPO_CHANNEL}" -ARG VERSION="23.2.1.2537" +ARG VERSION="23.2.2.20" ARG PACKAGES="clickhouse-client clickhouse-server clickhouse-common-static" # user/group precreated explicitly with fixed uid/gid on purpose. diff --git a/docker/server/Dockerfile.ubuntu b/docker/server/Dockerfile.ubuntu index 5dbb244c298..1372288978d 100644 --- a/docker/server/Dockerfile.ubuntu +++ b/docker/server/Dockerfile.ubuntu @@ -22,7 +22,7 @@ RUN sed -i "s|http://archive.ubuntu.com|${apt_archive}|g" /etc/apt/sources.list ARG REPO_CHANNEL="stable" ARG REPOSITORY="deb https://packages.clickhouse.com/deb ${REPO_CHANNEL} main" -ARG VERSION="23.2.1.2537" +ARG VERSION="23.2.2.20" ARG PACKAGES="clickhouse-client clickhouse-server clickhouse-common-static" # set non-empty deb_location_url url to create a docker image diff --git a/docs/changelogs/v22.12.4.76-stable.md b/docs/changelogs/v22.12.4.76-stable.md new file mode 100644 index 00000000000..79569ff841e --- /dev/null +++ b/docs/changelogs/v22.12.4.76-stable.md @@ -0,0 +1,55 @@ +--- +sidebar_position: 1 +sidebar_label: 2023 +--- + +# 2023 Changelog + +### ClickHouse release v22.12.4.76-stable (cb5772db805) FIXME as compared to v22.12.3.5-stable (893de538f02) + +#### Performance Improvement +* Backported in [#45704](https://github.com/ClickHouse/ClickHouse/issues/45704): Fixed performance of short `SELECT` queries that read from tables with large number of`Array`/`Map`/`Nested` columns. [#45630](https://github.com/ClickHouse/ClickHouse/pull/45630) ([Anton Popov](https://github.com/CurtizJ)). +* Backported in [#46378](https://github.com/ClickHouse/ClickHouse/issues/46378): Fix too big memory usage for vertical merges on non-remote disk. Respect `max_insert_delayed_streams_for_parallel_write` for the remote disk. [#46275](https://github.com/ClickHouse/ClickHouse/pull/46275) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). + +#### Bug Fix +* Backported in [#45672](https://github.com/ClickHouse/ClickHouse/issues/45672): Fix wiping sensitive info in logs. [#45603](https://github.com/ClickHouse/ClickHouse/pull/45603) ([Vitaly Baranov](https://github.com/vitlibar)). + +#### Build/Testing/Packaging Improvement +* Backported in [#45200](https://github.com/ClickHouse/ClickHouse/issues/45200): Fix zookeeper downloading, update the version, and optimize the image size. [#44853](https://github.com/ClickHouse/ClickHouse/pull/44853) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Backported in [#46116](https://github.com/ClickHouse/ClickHouse/issues/46116): Remove the dependency on the `adduser` tool from the packages, because we don't use it. This fixes [#44934](https://github.com/ClickHouse/ClickHouse/issues/44934). [#45011](https://github.com/ClickHouse/ClickHouse/pull/45011) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Backported in [#46035](https://github.com/ClickHouse/ClickHouse/issues/46035): Add systemd.service file for clickhouse-keeper. Fixes [#44293](https://github.com/ClickHouse/ClickHouse/issues/44293). [#45568](https://github.com/ClickHouse/ClickHouse/pull/45568) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Backported in [#46484](https://github.com/ClickHouse/ClickHouse/issues/46484): Get rid of unnecessary build for standalone clickhouse-keeper. [#46367](https://github.com/ClickHouse/ClickHouse/pull/46367) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Backported in [#46509](https://github.com/ClickHouse/ClickHouse/issues/46509): Some time ago the ccache compression was changed to `zst`, but `gz` archives are downloaded by default. It fixes it by prioritizing zst archive. [#46490](https://github.com/ClickHouse/ClickHouse/pull/46490) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Backported in [#47058](https://github.com/ClickHouse/ClickHouse/issues/47058): Fix error during server startup on old distros (e.g. Amazon Linux 2) and on ARM that glibc 2.28 symbols are not found. [#47008](https://github.com/ClickHouse/ClickHouse/pull/47008) ([Robert Schulze](https://github.com/rschu1ze)). + +#### Bug Fix (user-visible misbehavior in official stable or prestable release) + +* Backported in [#45904](https://github.com/ClickHouse/ClickHouse/issues/45904): Fixed bug with non-parsable default value for EPHEMERAL column in table metadata. [#44026](https://github.com/ClickHouse/ClickHouse/pull/44026) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)). +* Backported in [#45321](https://github.com/ClickHouse/ClickHouse/issues/45321): Fixed a bug in normalization of a `DEFAULT` expression in `CREATE TABLE` statement. The second argument of function `in` (or the right argument of operator `IN`) might be replaced with the result of its evaluation during CREATE query execution. Fixes [#44496](https://github.com/ClickHouse/ClickHouse/issues/44496). [#44547](https://github.com/ClickHouse/ClickHouse/pull/44547) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Backported in [#45000](https://github.com/ClickHouse/ClickHouse/issues/45000): Another fix for `Cannot read all data` error which could happen while reading `LowCardinality` dictionary from remote fs. Fixes [#44709](https://github.com/ClickHouse/ClickHouse/issues/44709). [#44875](https://github.com/ClickHouse/ClickHouse/pull/44875) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Backported in [#45553](https://github.com/ClickHouse/ClickHouse/issues/45553): Fix `SELECT ... FROM system.dictionaries` exception when there is a dictionary with a bad structure (e.g. incorrect type in xml config). [#45399](https://github.com/ClickHouse/ClickHouse/pull/45399) ([Aleksei Filatov](https://github.com/aalexfvk)). +* Backported in [#46226](https://github.com/ClickHouse/ClickHouse/issues/46226): A couple of seg faults have been reported around `c-ares`. All of the recent stack traces observed fail on inserting into `std::unodered_set<>`. I believe I have found the root cause of this, it seems to be unprocessed queries. Prior to this PR, CH calls `poll` to wait on the file descriptors in the `c-ares` channel. According to the [poll docs](https://man7.org/linux/man-pages/man2/poll.2.html), a negative return value means an error has ocurred. Because of this, we would abort the execution and return failure. The problem is that `poll` will also return a negative value if a system interrupt occurs. A system interrupt does not mean the processing has failed or ended, but we would abort it anyways because we were checking for negative values. Once the execution is aborted, the whole stack is destroyed, which includes the `std::unordered_set` passed to the `void *` parameter of the c-ares callback. Once c-ares completed the request, the callback would be invoked and would access an invalid memory address causing a segfault. [#45629](https://github.com/ClickHouse/ClickHouse/pull/45629) ([Arthur Passos](https://github.com/arthurpassos)). +* Backported in [#46218](https://github.com/ClickHouse/ClickHouse/issues/46218): Fix reading of non existing nested columns with multiple level in compact parts. [#46045](https://github.com/ClickHouse/ClickHouse/pull/46045) ([Azat Khuzhin](https://github.com/azat)). +* Backported in [#46446](https://github.com/ClickHouse/ClickHouse/issues/46446): Fix possible `LOGICAL_ERROR` in asynchronous inserts with invalid data sent in format `VALUES`. [#46350](https://github.com/ClickHouse/ClickHouse/pull/46350) ([Anton Popov](https://github.com/CurtizJ)). +* Backported in [#46678](https://github.com/ClickHouse/ClickHouse/issues/46678): Fix an invalid processing of constant `LowCardinality` argument in function `arrayMap`. This bug could lead to a segfault in release, and logical error `Bad cast` in debug build. [#46569](https://github.com/ClickHouse/ClickHouse/pull/46569) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Backported in [#46872](https://github.com/ClickHouse/ClickHouse/issues/46872): Fix a bug in the `Map` data type. This closes [#46855](https://github.com/ClickHouse/ClickHouse/issues/46855). [#46856](https://github.com/ClickHouse/ClickHouse/pull/46856) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Backported in [#46954](https://github.com/ClickHouse/ClickHouse/issues/46954): Fix result of LIKE predicates which translate to substring searches and contain quoted non-LIKE metacharacters. [#46875](https://github.com/ClickHouse/ClickHouse/pull/46875) ([Robert Schulze](https://github.com/rschu1ze)). + +#### NOT FOR CHANGELOG / INSIGNIFICANT + +* Automatically merge green backport PRs and green approved PRs [#41110](https://github.com/ClickHouse/ClickHouse/pull/41110) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Improve release scripts [#45074](https://github.com/ClickHouse/ClickHouse/pull/45074) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Fix wrong approved_at, simplify conditions [#45302](https://github.com/ClickHouse/ClickHouse/pull/45302) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Get rid of artifactory in favor of r2 + ch-repos-manager [#45421](https://github.com/ClickHouse/ClickHouse/pull/45421) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Another attempt to fix automerge, or at least to have debug footprint [#45476](https://github.com/ClickHouse/ClickHouse/pull/45476) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Trim refs/tags/ from GITHUB_TAG in release workflow [#45636](https://github.com/ClickHouse/ClickHouse/pull/45636) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Add check for running workflows to merge_pr.py [#45803](https://github.com/ClickHouse/ClickHouse/pull/45803) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Get rid of progress timestamps in release publishing [#45818](https://github.com/ClickHouse/ClickHouse/pull/45818) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Add necessary dependency for sanitizers [#45959](https://github.com/ClickHouse/ClickHouse/pull/45959) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Add helping logging to auto-merge script [#46080](https://github.com/ClickHouse/ClickHouse/pull/46080) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Fix write buffer destruction order for vertical merge. [#46205](https://github.com/ClickHouse/ClickHouse/pull/46205) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Improve install_check.py [#46458](https://github.com/ClickHouse/ClickHouse/pull/46458) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Fix dependencies for InstallPackagesTestAarch64 [#46597](https://github.com/ClickHouse/ClickHouse/pull/46597) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Get rid of legacy DocsReleaseChecks [#46665](https://github.com/ClickHouse/ClickHouse/pull/46665) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Reduce updates of Mergeable Check [#46781](https://github.com/ClickHouse/ClickHouse/pull/46781) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). + diff --git a/utils/list-versions/version_date.tsv b/utils/list-versions/version_date.tsv index 3814e94bf24..4cc74097371 100644 --- a/utils/list-versions/version_date.tsv +++ b/utils/list-versions/version_date.tsv @@ -1,7 +1,10 @@ +v23.2.2.20-stable 2023-03-01 v23.2.1.2537-stable 2023-02-23 +v23.1.4.58-stable 2023-03-01 v23.1.3.5-stable 2023-02-03 v23.1.2.9-stable 2023-01-29 v23.1.1.3077-stable 2023-01-25 +v22.12.4.76-stable 2023-03-01 v22.12.3.5-stable 2023-01-10 v22.12.2.25-stable 2023-01-06 v22.12.1.1752-stable 2022-12-15 @@ -25,6 +28,7 @@ v22.9.4.32-stable 2022-10-26 v22.9.3.18-stable 2022-09-30 v22.9.2.7-stable 2022-09-23 v22.9.1.2603-stable 2022-09-22 +v22.8.14.53-lts 2023-02-27 v22.8.13.20-lts 2023-01-29 v22.8.12.45-lts 2023-01-10 v22.8.11.15-lts 2022-12-08 From b11ed5910727f549a68d1a1dba8819505a8949f2 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Wed, 1 Mar 2023 15:37:03 +0100 Subject: [PATCH 354/841] remove ps --- .../0_stateless/02434_cancel_insert_when_client_dies.sh | 7 +++---- .../0_stateless/02435_rollback_cancelled_queries.sh | 9 ++++----- tests/queries/shell_config.sh | 3 ++- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/tests/queries/0_stateless/02434_cancel_insert_when_client_dies.sh b/tests/queries/0_stateless/02434_cancel_insert_when_client_dies.sh index 2a17095b267..c4d7367ba14 100755 --- a/tests/queries/0_stateless/02434_cancel_insert_when_client_dies.sh +++ b/tests/queries/0_stateless/02434_cancel_insert_when_client_dies.sh @@ -67,7 +67,7 @@ function thread_cancel if (( RANDOM % 2 )); then SIGNAL="KILL" fi - PID=$(ps -ef | grep "$TEST_MARK" | grep -v grep | awk '{print $2}') + PID=$(grep -Fa "$TEST_MARK" /proc/*/cmdline | grep -Fav grep | grep -Eoa "/proc/[0-9]*/cmdline:" | grep -Eo "[0-9]*" | head -1) if [ ! -z "$PID" ]; then kill -s "$SIGNAL" "$PID"; fi sleep 0.$RANDOM; sleep 0.$RANDOM; @@ -91,8 +91,7 @@ $CLICKHOUSE_CLIENT -q 'select count() from dedup_test' $CLICKHOUSE_CLIENT -q 'system flush logs' -# We have to ignore stderr from thread_cancel, because our CI finds a bug in ps... -# So use this query to check that thread_cancel do something +# Ensure that thread_cancel actually did something $CLICKHOUSE_CLIENT -q "select count() > 0 from system.text_log where event_date >= yesterday() and query_id like '$TEST_MARK%' and ( message_format_string in ('Unexpected end of file while reading chunk header of HTTP chunked data', 'Unexpected EOF, got {} of {} bytes') or - message like '%Connection reset by peer%')" + message like '%Connection reset by peer%' or message like '%Broken pipe, while writing to socket%')" diff --git a/tests/queries/0_stateless/02435_rollback_cancelled_queries.sh b/tests/queries/0_stateless/02435_rollback_cancelled_queries.sh index a69e526c1c8..b639cd5ef70 100755 --- a/tests/queries/0_stateless/02435_rollback_cancelled_queries.sh +++ b/tests/queries/0_stateless/02435_rollback_cancelled_queries.sh @@ -83,7 +83,7 @@ function thread_cancel if (( RANDOM % 2 )); then SIGNAL="KILL" fi - PID=$(ps -ef | grep "$TEST_MARK" | grep -v grep | awk '{print $2}') + PID=$(grep -Fa "$TEST_MARK" /proc/*/cmdline | grep -Fav grep | grep -Eoa "/proc/[0-9]*/cmdline:" | grep -Eo "[0-9]*" | head -1) if [ ! -z "$PID" ]; then kill -s "$SIGNAL" "$PID"; fi sleep 0.$RANDOM; done @@ -93,14 +93,13 @@ export -f thread_insert; export -f thread_select; export -f thread_cancel; -TIMEOUT=20 # 5 seconds for each TYPE +TIMEOUT=20 timeout $TIMEOUT bash -c thread_insert & timeout $TIMEOUT bash -c thread_select & timeout $TIMEOUT bash -c thread_cancel 2> /dev/null & wait -wait_for_queries_to_finish $CLICKHOUSE_CLIENT -q 'system flush logs' @@ -110,10 +109,10 @@ insert_data $CLICKHOUSE_CLIENT --implicit_transaction=1 -q 'select throwIf(count() % 1000000 != 0 or count() = 0) from dedup_test' \ || $CLICKHOUSE_CLIENT -q "select name, rows, active, visible, creation_tid, creation_csn from system.parts where database=currentDatabase();" -# We have to ignore stderr from thread_cancel, because our CI finds a bug in ps... -# So use this query to check that thread_cancel do something +# Ensure that thread_cancel actually did something $CLICKHOUSE_CLIENT -q "select count() > 0 from system.text_log where event_date >= yesterday() and query_id like '$TEST_MARK%' and ( message_format_string in ('Unexpected end of file while reading chunk header of HTTP chunked data', 'Unexpected EOF, got {} of {} bytes') or message like '%Connection reset by peer%' or message like '%Broken pipe, while writing to socket%')" +wait_for_queries_to_finish 30 $CLICKHOUSE_CLIENT --database_atomic_wait_for_drop_and_detach_synchronously=0 -q "drop table dedup_test" diff --git a/tests/queries/shell_config.sh b/tests/queries/shell_config.sh index 3006b74d3f9..ffa286a95cd 100644 --- a/tests/queries/shell_config.sh +++ b/tests/queries/shell_config.sh @@ -136,12 +136,13 @@ function clickhouse_client_removed_host_parameter() function wait_for_queries_to_finish() { + local max_tries="${1:-20}" # Wait for all queries to finish (query may still be running if thread is killed by timeout) num_tries=0 while [[ $($CLICKHOUSE_CLIENT -q "SELECT count() FROM system.processes WHERE current_database=currentDatabase() AND query NOT LIKE '%system.processes%'") -ne 0 ]]; do sleep 0.5; num_tries=$((num_tries+1)) - if [ $num_tries -eq 20 ]; then + if [ $num_tries -eq $max_tries ]; then $CLICKHOUSE_CLIENT -q "SELECT * FROM system.processes WHERE current_database=currentDatabase() AND query NOT LIKE '%system.processes%' FORMAT Vertical" break fi From 6ebee202bd398542b2867d455b6b193e87b627cf Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Wed, 1 Mar 2023 14:47:15 +0000 Subject: [PATCH 355/841] Flush buffer when no sync --- src/Coordination/Changelog.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Coordination/Changelog.cpp b/src/Coordination/Changelog.cpp index 899310dc591..ddedae4fa0f 100644 --- a/src/Coordination/Changelog.cpp +++ b/src/Coordination/Changelog.cpp @@ -211,9 +211,14 @@ public: void flush() { auto * file_buffer = tryGetFileBuffer(); - /// Fsync file system if needed - if (file_buffer && log_file_settings.force_sync) - file_buffer->sync(); + if (file_buffer) + { + /// Fsync file system if needed + if (log_file_settings.force_sync) + file_buffer->sync(); + else + file_buffer->next(); + } } uint64_t getStartIndex() const From 6ee65fa1dc3bef79cd6989a66999eca04fce32ee Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Wed, 1 Mar 2023 16:41:51 +0100 Subject: [PATCH 356/841] fix shellcheck --- .../0_stateless/01169_alter_partition_isolation_stress.sh | 1 + .../queries/0_stateless/01171_mv_select_insert_isolation_long.sh | 1 + tests/queries/0_stateless/01174_select_insert_isolation.sh | 1 + tests/queries/shell_config.sh | 1 + 4 files changed, 4 insertions(+) diff --git a/tests/queries/0_stateless/01169_alter_partition_isolation_stress.sh b/tests/queries/0_stateless/01169_alter_partition_isolation_stress.sh index a385fc81fe4..508ad05224c 100755 --- a/tests/queries/0_stateless/01169_alter_partition_isolation_stress.sh +++ b/tests/queries/0_stateless/01169_alter_partition_isolation_stress.sh @@ -2,6 +2,7 @@ # Tags: long, no-replicated-database, no-ordinary-database # shellcheck disable=SC2015 +# shellcheck disable=SC2119 CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh diff --git a/tests/queries/0_stateless/01171_mv_select_insert_isolation_long.sh b/tests/queries/0_stateless/01171_mv_select_insert_isolation_long.sh index 12b654f4215..199c2b5389f 100755 --- a/tests/queries/0_stateless/01171_mv_select_insert_isolation_long.sh +++ b/tests/queries/0_stateless/01171_mv_select_insert_isolation_long.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash # Tags: long, no-parallel, no-ordinary-database # Test is too heavy, avoid parallel run in Flaky Check +# shellcheck disable=SC2119 CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh diff --git a/tests/queries/0_stateless/01174_select_insert_isolation.sh b/tests/queries/0_stateless/01174_select_insert_isolation.sh index dc5c1d7a722..29ccfbb1ccb 100755 --- a/tests/queries/0_stateless/01174_select_insert_isolation.sh +++ b/tests/queries/0_stateless/01174_select_insert_isolation.sh @@ -2,6 +2,7 @@ # Tags: long, no-ordinary-database # shellcheck disable=SC2015 +# shellcheck disable=SC2119 CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh diff --git a/tests/queries/shell_config.sh b/tests/queries/shell_config.sh index ffa286a95cd..ef70c82aefc 100644 --- a/tests/queries/shell_config.sh +++ b/tests/queries/shell_config.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# shellcheck disable=SC2120 # Don't check for ODR violation, since we may test shared build with ASAN export ASAN_OPTIONS=detect_odr_violation=0 From 0a4842a99f95466041b8e8cb0e1b46bd0a5678a5 Mon Sep 17 00:00:00 2001 From: vdimir Date: Wed, 1 Mar 2023 16:10:31 +0000 Subject: [PATCH 357/841] Fix empty result when selection from only one side of join in analyzer --- src/Planner/PlannerJoinTree.cpp | 10 +++++ ..._join_subquery_empty_column_list.reference | 37 +++++++++++++++++++ ...alyzer_join_subquery_empty_column_list.sql | 14 +++++++ 3 files changed, 61 insertions(+) create mode 100644 tests/queries/0_stateless/25339_analyzer_join_subquery_empty_column_list.reference create mode 100644 tests/queries/0_stateless/25339_analyzer_join_subquery_empty_column_list.sql diff --git a/src/Planner/PlannerJoinTree.cpp b/src/Planner/PlannerJoinTree.cpp index 59b09f91888..f2259ca7e33 100644 --- a/src/Planner/PlannerJoinTree.cpp +++ b/src/Planner/PlannerJoinTree.cpp @@ -334,6 +334,16 @@ JoinTreeQueryPlan buildQueryPlanForTableExpression(const QueryTreeNodePtr & tabl } else if (query_node || union_node) { + if (table_expression_data.getColumnNames().empty()) + { + const auto & projection_columns = query_node ? query_node->getProjectionColumns() : union_node->computeProjectionColumns(); + NamesAndTypesList projection_columns_list(projection_columns.begin(), projection_columns.end()); + auto additional_column_to_read = ExpressionActions::getSmallestColumn(projection_columns_list); + + const auto & column_identifier = planner_context->getGlobalPlannerContext()->createColumnIdentifier(additional_column_to_read, table_expression); + table_expression_data.addColumn(additional_column_to_read, column_identifier); + } + auto subquery_options = select_query_options.subquery(); Planner subquery_planner(table_expression, subquery_options, planner_context->getGlobalPlannerContext()); /// Propagate storage limits to subquery diff --git a/tests/queries/0_stateless/25339_analyzer_join_subquery_empty_column_list.reference b/tests/queries/0_stateless/25339_analyzer_join_subquery_empty_column_list.reference new file mode 100644 index 00000000000..73c1795f6f3 --- /dev/null +++ b/tests/queries/0_stateless/25339_analyzer_join_subquery_empty_column_list.reference @@ -0,0 +1,37 @@ +-- { echoOn } + +SELECT a FROM ( select 1 AS a ) AS t1, ( select 2 AS b, 3 AS c) AS t2; +1 +SELECT a FROM ( select 1 AS a UNION ALL select 1 as a ) AS t1, ( select 2 AS b, 3 AS c) AS t2; +1 +1 +SELECT a FROM ( select 1 AS a ) AS t1, ( select 2 AS b, 3 AS c UNION ALL select 2 as b, 3 as c) AS t2; +1 +1 +SELECT a FROM ( select 1 AS a UNION ALL select 1 as a ) AS t1, ( select 2 AS b, 3 AS c UNION ALL select 2 as b, 3 as c) AS t2; +1 +1 +1 +1 +SELECT a FROM ( select * from ( select 1 AS a UNION ALL select 1 as a) ) AS t1, ( select * from ( select 2 AS b, 3 AS c UNION ALL select 2 as b, 3 as c )) AS t2; +1 +1 +1 +1 +SELECT b FROM ( select 1 AS a UNION ALL select 1 as a ) AS t1, ( select 2 AS b, 3 AS c UNION ALL select 2 as b, 3 as c) AS t2; +2 +2 +2 +2 +SELECT c FROM ( select 1 AS a UNION ALL select 1 as a ) AS t1, ( select 2 AS b, 3 AS c UNION ALL select 2 as b, 3 as c) AS t2; +3 +3 +3 +3 +SELECT 42 FROM ( select 1 AS a UNION ALL select 1 as a ) AS t1, ( select 2 AS b, 3 AS c UNION ALL select 2 as b, 3 as c) AS t2; +42 +42 +42 +42 +SELECT count() FROM ( select 1 AS a UNION ALL select 1 as a ) AS t1, ( select 2 AS b, 3 AS c UNION ALL select 2 as b, 3 as c) AS t2; +4 diff --git a/tests/queries/0_stateless/25339_analyzer_join_subquery_empty_column_list.sql b/tests/queries/0_stateless/25339_analyzer_join_subquery_empty_column_list.sql new file mode 100644 index 00000000000..10e5871cc44 --- /dev/null +++ b/tests/queries/0_stateless/25339_analyzer_join_subquery_empty_column_list.sql @@ -0,0 +1,14 @@ +SET allow_experimental_analyzer = 1; +-- { echoOn } + +SELECT a FROM ( select 1 AS a ) AS t1, ( select 2 AS b, 3 AS c) AS t2; +SELECT a FROM ( select 1 AS a UNION ALL select 1 as a ) AS t1, ( select 2 AS b, 3 AS c) AS t2; +SELECT a FROM ( select 1 AS a ) AS t1, ( select 2 AS b, 3 AS c UNION ALL select 2 as b, 3 as c) AS t2; +SELECT a FROM ( select 1 AS a UNION ALL select 1 as a ) AS t1, ( select 2 AS b, 3 AS c UNION ALL select 2 as b, 3 as c) AS t2; +SELECT a FROM ( select * from ( select 1 AS a UNION ALL select 1 as a) ) AS t1, ( select * from ( select 2 AS b, 3 AS c UNION ALL select 2 as b, 3 as c )) AS t2; +SELECT b FROM ( select 1 AS a UNION ALL select 1 as a ) AS t1, ( select 2 AS b, 3 AS c UNION ALL select 2 as b, 3 as c) AS t2; +SELECT c FROM ( select 1 AS a UNION ALL select 1 as a ) AS t1, ( select 2 AS b, 3 AS c UNION ALL select 2 as b, 3 as c) AS t2; +SELECT 42 FROM ( select 1 AS a UNION ALL select 1 as a ) AS t1, ( select 2 AS b, 3 AS c UNION ALL select 2 as b, 3 as c) AS t2; +SELECT count() FROM ( select 1 AS a UNION ALL select 1 as a ) AS t1, ( select 2 AS b, 3 AS c UNION ALL select 2 as b, 3 as c) AS t2; + + From 96e7454df7cd2fd7eaaec97084b679b48be8416b Mon Sep 17 00:00:00 2001 From: Igor Nikonov Date: Wed, 1 Mar 2023 16:31:50 +0000 Subject: [PATCH 358/841] Fix test --- tests/queries/0_stateless/00965_logs_level_bugfix.reference | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/queries/0_stateless/00965_logs_level_bugfix.reference b/tests/queries/0_stateless/00965_logs_level_bugfix.reference index 52396b3fe79..affd41b780b 100644 --- a/tests/queries/0_stateless/00965_logs_level_bugfix.reference +++ b/tests/queries/0_stateless/00965_logs_level_bugfix.reference @@ -2,7 +2,6 @@ . . - . - From bb5b17fd091ced2a5cb7b8b40aae416a1684a46b Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Wed, 1 Mar 2023 17:34:43 +0100 Subject: [PATCH 359/841] make stacktraces in hung check more readable --- tests/ci/stress_tests.lib | 4 ++-- tests/clickhouse-test | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/ci/stress_tests.lib b/tests/ci/stress_tests.lib index 2cbae112b7f..75195baaeeb 100644 --- a/tests/ci/stress_tests.lib +++ b/tests/ci/stress_tests.lib @@ -6,8 +6,8 @@ sysctl kernel.core_pattern='core.%e.%p-%P' OK="\tOK\t\\N\t" FAIL="\tFAIL\t\\N\t" -FAILURE_CONTEXT_LINES=50 -FAILURE_CONTEXT_MAX_LINE_WIDTH=400 +FAILURE_CONTEXT_LINES=100 +FAILURE_CONTEXT_MAX_LINE_WIDTH=300 function escaped() { diff --git a/tests/clickhouse-test b/tests/clickhouse-test index 290b7cfa939..68bca93c55c 100755 --- a/tests/clickhouse-test +++ b/tests/clickhouse-test @@ -252,7 +252,7 @@ def get_processlist_with_stacktraces(args): -- NOTE: view() here to do JOIN on shards, instead of initiator FROM clusterAllReplicas('test_cluster_database_replicated', view( SELECT - groupArray((s.thread_id, arrayStringConcat(arrayMap( + arrayStringConcat(groupArray('Thread ID ' || toString(s.thread_id) || '\n' || arrayStringConcat(arrayMap( x -> concat(addressToLine(x), '::', demangle(addressToSymbol(x))), s.trace), '\n') AS stacktrace )) AS stacktraces, @@ -273,7 +273,7 @@ def get_processlist_with_stacktraces(args): args, """ SELECT - groupArray((s.thread_id, arrayStringConcat(arrayMap( + arrayStringConcat(groupArray('Thread ID ' || toString(s.thread_id) || '\n' || arrayStringConcat(arrayMap( x -> concat(addressToLine(x), '::', demangle(addressToSymbol(x))), s.trace), '\n') AS stacktrace )) AS stacktraces, From 3ad05848fa518675da9b4ec95bb729524460df29 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Wed, 1 Mar 2023 17:36:01 +0100 Subject: [PATCH 360/841] Suppress "Cannot flush" for Distributed tables in upgrade check CI reports [1]: 2023.03.01 04:39:00.185189 [ 358842 ] {} StorageDistributed (dist_01555): Cannot flush: Code: 279. DB::NetException: All connection tries failed. Log: 2023.03.01 04:39:00.242066 [ 358842 ] {} StorageDistributed (dist_01555): Cannot flush: Code: 279. DB::NetException: All connection tries failed. Log: [1]: https://s3.amazonaws.com/clickhouse-test-reports/47042/0e0a24234aa3409bb7799cc9a4b7a72bb006a923/upgrade_check__asan_.html Signed-off-by: Azat Khuzhin --- docker/test/upgrade/run.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/test/upgrade/run.sh b/docker/test/upgrade/run.sh index b93959ee039..df32e2833e7 100644 --- a/docker/test/upgrade/run.sh +++ b/docker/test/upgrade/run.sh @@ -159,6 +159,7 @@ rg -Fav -e "Code: 236. DB::Exception: Cancelled merging parts" \ -e "Session expired" \ -e "TOO_MANY_PARTS" \ -e "Authentication failed" \ + -e "Cannot flush" \ -e "Container already exists" \ /var/log/clickhouse-server/clickhouse-server.upgrade.log | zgrep -Fa "" > /test_output/upgrade_error_messages.txt \ && echo -e "Error message in clickhouse-server.log (see upgrade_error_messages.txt)$FAIL$(head_escaped /test_output/bc_check_error_messages.txt)" \ From 20fbb09a46ee48fbb4d75ae71ad8601d31f174eb Mon Sep 17 00:00:00 2001 From: Sergei Trifonov Date: Wed, 1 Mar 2023 17:44:25 +0100 Subject: [PATCH 361/841] Update constraints-on-settings.md --- docs/en/operations/settings/constraints-on-settings.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/operations/settings/constraints-on-settings.md b/docs/en/operations/settings/constraints-on-settings.md index 87c51940c73..83ef46053a4 100644 --- a/docs/en/operations/settings/constraints-on-settings.md +++ b/docs/en/operations/settings/constraints-on-settings.md @@ -50,7 +50,7 @@ If there are multiple profiles active for a user, then constraints are merged. M Read-only mode is enabled by `readonly` setting (not to confuse with `readonly` constraint type): - `readonly=0`: No read-only restrictions. -- `readonly=1`: Only read queries are allowed and settings cannot be changes unless `changeable_in_readonly` is set. +- `readonly=1`: Only read queries are allowed and settings cannot be changed unless `changeable_in_readonly` is set. - `readonly=2`: Only read queries are allowed, but settings can be changed, except for `readonly` setting itself. From c59220274b873a3fd09187a4bb2021bba2402833 Mon Sep 17 00:00:00 2001 From: Sema Checherinda Date: Wed, 1 Mar 2023 17:53:48 +0100 Subject: [PATCH 362/841] release lambda resources before detaching thread group --- src/Interpreters/threadPoolCallbackRunner.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Interpreters/threadPoolCallbackRunner.h b/src/Interpreters/threadPoolCallbackRunner.h index 7990c538c03..1d2f67e8e59 100644 --- a/src/Interpreters/threadPoolCallbackRunner.h +++ b/src/Interpreters/threadPoolCallbackRunner.h @@ -25,8 +25,16 @@ ThreadPoolCallbackRunner threadPoolCallbackRunner(ThreadPool & CurrentThread::attachTo(thread_group); SCOPE_EXIT_SAFE({ + { + /// Release all captutred resources before detaching thread group + /// Releasing has to use proper memory tracker which has been set here before callback + + [[maybe_unused]] auto tmp = std::move(callback); + } + if (thread_group) CurrentThread::detachQueryIfNotDetached(); + }); setThreadName(thread_name.data()); From 9f109f0876c84c2f104ffbb96a7e82ed62328095 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Thu, 16 Feb 2023 11:34:36 +0100 Subject: [PATCH 363/841] Fix JOIN tests with invalid USING --- tests/queries/0_stateless/00057_join_aliases.sql | 4 ++-- .../00099_join_many_blocks_segfault.sql | 7 +++++-- .../00122_join_with_subquery_with_subquery.sql | 2 +- .../queries/0_stateless/00138_table_aliases.sql | 2 +- .../0_stateless/00162_shard_global_join.sql | 3 ++- .../00163_shard_join_with_empty_table.sql | 16 ++++++++-------- 6 files changed, 19 insertions(+), 15 deletions(-) diff --git a/tests/queries/0_stateless/00057_join_aliases.sql b/tests/queries/0_stateless/00057_join_aliases.sql index b994e26a747..6f283094396 100644 --- a/tests/queries/0_stateless/00057_join_aliases.sql +++ b/tests/queries/0_stateless/00057_join_aliases.sql @@ -1,6 +1,6 @@ SELECT * FROM ( - SELECT number, number / 2 AS n, j1, j2 - FROM system.numbers + SELECT number, n, j1, j2 + FROM (SELECT number, number / 2 AS n FROM system.numbers) js1 ANY LEFT JOIN (SELECT number / 3 AS n, number AS j1, 'Hello' AS j2 FROM system.numbers LIMIT 10) js2 USING n LIMIT 10 ) ORDER BY n diff --git a/tests/queries/0_stateless/00099_join_many_blocks_segfault.sql b/tests/queries/0_stateless/00099_join_many_blocks_segfault.sql index 7219bcecf55..31dec093e61 100644 --- a/tests/queries/0_stateless/00099_join_many_blocks_segfault.sql +++ b/tests/queries/0_stateless/00099_join_many_blocks_segfault.sql @@ -1,7 +1,10 @@ SELECT - 1 AS DomainID, + DomainID, Domain -FROM system.one +FROM +( + SELECT 1 AS DomainID FROM system.one +) js1 ANY LEFT JOIN ( SELECT diff --git a/tests/queries/0_stateless/00122_join_with_subquery_with_subquery.sql b/tests/queries/0_stateless/00122_join_with_subquery_with_subquery.sql index 0cb3de94a55..add31112579 100644 --- a/tests/queries/0_stateless/00122_join_with_subquery_with_subquery.sql +++ b/tests/queries/0_stateless/00122_join_with_subquery_with_subquery.sql @@ -1 +1 @@ -SELECT 1 AS k FROM system.one ANY LEFT JOIN (SELECT k FROM (SELECT 1 AS k, 2 AS x)) js2 USING k; +SELECT k FROM (SELECT 1 AS k FROM system.one) js1 ANY LEFT JOIN (SELECT k FROM (SELECT 1 AS k, 2 AS x)) js2 USING k; diff --git a/tests/queries/0_stateless/00138_table_aliases.sql b/tests/queries/0_stateless/00138_table_aliases.sql index 58fe2ac65e9..1d168250266 100644 --- a/tests/queries/0_stateless/00138_table_aliases.sql +++ b/tests/queries/0_stateless/00138_table_aliases.sql @@ -1,2 +1,2 @@ SELECT * FROM `system`.`one` AS `xxx`; -SELECT 1 AS k, s FROM `system`.`one` AS `xxx` ANY LEFT JOIN (SELECT 1 AS k, 'Hello' AS s) AS `yyy` USING k; +SELECT k, s FROM (SELECT 1 AS k FROM `system`.`one`) AS `xxx` ANY LEFT JOIN (SELECT 1 AS k, 'Hello' AS s) AS `yyy` USING k; diff --git a/tests/queries/0_stateless/00162_shard_global_join.sql b/tests/queries/0_stateless/00162_shard_global_join.sql index 040eb0e7c03..0bf80e70dda 100644 --- a/tests/queries/0_stateless/00162_shard_global_join.sql +++ b/tests/queries/0_stateless/00162_shard_global_join.sql @@ -1,3 +1,4 @@ -- Tags: shard -SELECT toFloat64(dummy + 2) AS n, j1, j2 FROM remote('127.0.0.{2,3}', system.one) jr1 GLOBAL ANY LEFT JOIN (SELECT number / 3 AS n, number AS j1, 'Hello' AS j2 FROM system.numbers LIMIT 10) jr2 USING n LIMIT 10; +SELECT n, j1, j2 FROM (SELECT toFloat64(dummy + 2) AS n FROM remote('127.0.0.{2,3}', system.one)) jr1 +GLOBAL ANY LEFT JOIN (SELECT number / 3 AS n, number AS j1, 'Hello' AS j2 FROM system.numbers LIMIT 10) jr2 USING n LIMIT 10; diff --git a/tests/queries/0_stateless/00163_shard_join_with_empty_table.sql b/tests/queries/0_stateless/00163_shard_join_with_empty_table.sql index 777b2443416..07242f7a8d4 100644 --- a/tests/queries/0_stateless/00163_shard_join_with_empty_table.sql +++ b/tests/queries/0_stateless/00163_shard_join_with_empty_table.sql @@ -4,29 +4,29 @@ SET any_join_distinct_right_table_keys = 1; SET joined_subquery_requires_alias = 0; SELECT * FROM ( - SELECT number, number / 2 AS n, j1, j2 - FROM remote('127.0.0.{2,3}', system.numbers) + SELECT number, n, j1, j2 + FROM (SELECT number, number / 2 AS n FROM remote('127.0.0.{2,3}', system.numbers)) ANY LEFT JOIN (SELECT number / 3 AS n, number AS j1, 'Hello' AS j2 FROM system.numbers LIMIT 0) USING n LIMIT 10 ) ORDER BY number; SELECT * FROM ( - SELECT dummy + 2 AS number, number / 2 AS n, j1, j2 - FROM remote('127.0.0.{2,3}', system.one) + SELECT number, n, j1, j2 + FROM (SELECT dummy + 2 AS number, number / 2 AS n FROM remote('127.0.0.{2,3}', system.one)) ANY INNER JOIN (SELECT number / 3 AS n, number AS j1, 'Hello' AS j2 FROM system.numbers LIMIT 0) USING n LIMIT 10 ) ORDER BY number; SELECT * FROM ( - SELECT number, number / 2 AS n, j1, j2 - FROM remote('127.0.0.{2,3}', system.numbers) + SELECT number, n, j1, j2 + FROM (SELECT number, number / 2 AS n FROM remote('127.0.0.{2,3}', system.numbers)) GLOBAL ANY LEFT JOIN (SELECT number / 3 AS n, number AS j1, 'Hello' AS j2 FROM system.numbers LIMIT 0) USING n LIMIT 10 ) ORDER BY number; SELECT * FROM ( - SELECT dummy + 2 AS number, number / 2 AS n, j1, j2 - FROM remote('127.0.0.{2,3}', system.one) + SELECT number, n, j1, j2 + FROM (SELECT dummy + 2 AS number, number / 2 AS n FROM remote('127.0.0.{2,3}', system.one)) GLOBAL ANY INNER JOIN (SELECT number / 3 AS n, number AS j1, 'Hello' AS j2 FROM system.numbers LIMIT 0) USING n LIMIT 10 ) ORDER BY number; From f1093716f0457c5427168f2a318bf6bb6e624d72 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Sun, 19 Feb 2023 13:45:34 +0100 Subject: [PATCH 364/841] Analyzer MutationsInterpreter fix --- src/Interpreters/MutationsInterpreter.cpp | 24 +++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/Interpreters/MutationsInterpreter.cpp b/src/Interpreters/MutationsInterpreter.cpp index 034f327db91..0b52a1a51bc 100644 --- a/src/Interpreters/MutationsInterpreter.cpp +++ b/src/Interpreters/MutationsInterpreter.cpp @@ -172,6 +172,21 @@ ASTPtr prepareQueryAffectedAST(const std::vector & commands, co return select; } +QueryTreeNodePtr prepareQueryAffectedQueryTree(const std::vector & commands, const StoragePtr & storage, ContextPtr context) +{ + auto ast = prepareQueryAffectedAST(commands, storage, context); + auto query_tree = buildQueryTree(ast, context); + + auto & query_node = query_tree->as(); + query_node.getJoinTree() = std::make_shared(storage, context); + + QueryTreePassManager query_tree_pass_manager(context); + addQueryTreePasses(query_tree_pass_manager); + query_tree_pass_manager.run(query_tree); + + return query_tree; +} + ColumnDependencies getAllColumnDependencies(const StorageMetadataPtr & metadata_snapshot, const NameSet & updated_columns) { NameSet new_updated_columns = updated_columns; @@ -231,18 +246,15 @@ bool isStorageTouchedByMutations( std::optional interpreter_select_query; BlockIO io; - ASTPtr select_query = prepareQueryAffectedAST(commands, storage.shared_from_this(), context); - if (context->getSettingsRef().allow_experimental_analyzer) { - InterpreterSelectQueryAnalyzer interpreter(select_query, - context, - storage_from_part, - SelectQueryOptions().ignoreLimits().ignoreProjections()); + auto select_query_tree = prepareQueryAffectedQueryTree(commands, storage.shared_from_this(), context); + InterpreterSelectQueryAnalyzer interpreter(select_query_tree, context, SelectQueryOptions().ignoreLimits().ignoreProjections()); io = interpreter.execute(); } else { + ASTPtr select_query = prepareQueryAffectedAST(commands, storage.shared_from_this(), context); /// Interpreter must be alive, when we use result of execute() method. /// For some reason it may copy context and give it into ExpressionTransform /// after that we will use context from destroyed stack frame in our stream. From 0ee0324c2cf599838bfd28127eef3641d159d55b Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Sun, 19 Feb 2023 18:52:39 +0100 Subject: [PATCH 365/841] Analyzer ARRAY JOIN conversion to AST fix --- src/Analyzer/ArrayJoinNode.cpp | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/Analyzer/ArrayJoinNode.cpp b/src/Analyzer/ArrayJoinNode.cpp index 2157b5edf6f..490e227d617 100644 --- a/src/Analyzer/ArrayJoinNode.cpp +++ b/src/Analyzer/ArrayJoinNode.cpp @@ -5,8 +5,10 @@ #include #include +#include #include +#include namespace DB { @@ -52,8 +54,24 @@ ASTPtr ArrayJoinNode::toASTImpl() const auto array_join_ast = std::make_shared(); array_join_ast->kind = is_left ? ASTArrayJoin::Kind::Left : ASTArrayJoin::Kind::Inner; - const auto & join_expression_list_node = getJoinExpressionsNode(); - array_join_ast->children.push_back(join_expression_list_node->toAST()); + auto array_join_expressions_ast = std::make_shared(); + const auto & array_join_expressions = getJoinExpressions().getNodes(); + + for (const auto & array_join_expression : array_join_expressions) + { + ASTPtr array_join_expression_ast; + + auto * column_node = array_join_expression->as(); + if (column_node && column_node->getExpression()) + array_join_expression_ast = column_node->getExpression()->toAST(); + else + array_join_expression_ast = array_join_expression->toAST(); + + array_join_expression_ast->setAlias(array_join_expression->getAlias()); + array_join_expressions_ast->children.push_back(std::move(array_join_expression_ast)); + } + + array_join_ast->children.push_back(std::move(array_join_expressions_ast)); array_join_ast->expression_list = array_join_ast->children.back(); ASTPtr tables_in_select_query_ast = std::make_shared(); From 3fbb7f89e5a438ff357506663a0afeab8395a37a Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Sun, 19 Feb 2023 21:14:22 +0100 Subject: [PATCH 366/841] Fixed tests --- .../00674_join_on_syntax.reference | 4 +-- .../0_stateless/00674_join_on_syntax.sql | 1 + .../0_stateless/00702_join_with_using.sql | 2 +- .../0_stateless/00722_inner_join.reference | 30 +++++++++---------- .../queries/0_stateless/00722_inner_join.sql | 2 ++ .../00818_inner_join_bug_3567.reference | 28 ++++++++--------- .../0_stateless/00818_inner_join_bug_3567.sql | 2 ++ ...full_join_wrong_columns_in_block.reference | 22 +++++++------- ...00819_full_join_wrong_columns_in_block.sql | 1 + .../00820_multiple_joins.reference | 4 +-- .../0_stateless/00820_multiple_joins.sql | 2 ++ ...le_joins_subquery_requires_alias.reference | 4 +-- ...multiple_joins_subquery_requires_alias.sql | 2 ++ .../00834_hints_for_type_function_typos.sh | 2 +- .../00835_if_generic_case.reference | 2 +- .../0_stateless/00835_if_generic_case.sql | 2 ++ .../01429_join_on_error_messages.sql | 6 ++-- .../01508_explain_header.reference | 2 +- .../01527_bad_aggregation_in_lambda.sql | 4 ++- 19 files changed, 69 insertions(+), 53 deletions(-) diff --git a/tests/queries/0_stateless/00674_join_on_syntax.reference b/tests/queries/0_stateless/00674_join_on_syntax.reference index 10c31e56fe8..7bad0431b8f 100644 --- a/tests/queries/0_stateless/00674_join_on_syntax.reference +++ b/tests/queries/0_stateless/00674_join_on_syntax.reference @@ -49,8 +49,8 @@ duplicate column names {"a1":1,"tab1_copy.a1":2} {"a1":1,"tab1_copy.a1":2} {"a1":1,"copy.a1":2} -{"a1":1,"copy.a1":2} -{"a1":1,"copy.a1":2} +{"a1":1,"tab1_copy.a1":2} +{"a1":1,"tab1_copy.a1":2} subquery 1 1 diff --git a/tests/queries/0_stateless/00674_join_on_syntax.sql b/tests/queries/0_stateless/00674_join_on_syntax.sql index cdca4e27a71..9ff26db1536 100644 --- a/tests/queries/0_stateless/00674_join_on_syntax.sql +++ b/tests/queries/0_stateless/00674_join_on_syntax.sql @@ -1,4 +1,5 @@ SET joined_subquery_requires_alias = 0; +SET allow_experimental_analyzer = 1; drop table if exists tab1; drop table if exists tab2; diff --git a/tests/queries/0_stateless/00702_join_with_using.sql b/tests/queries/0_stateless/00702_join_with_using.sql index 4f81e757dfc..462524e1922 100644 --- a/tests/queries/0_stateless/00702_join_with_using.sql +++ b/tests/queries/0_stateless/00702_join_with_using.sql @@ -7,7 +7,7 @@ CREATE TABLE using2(a UInt8, b UInt8) ENGINE=Memory; INSERT INTO using1 VALUES (1, 1) (2, 2) (3, 3); INSERT INTO using2 VALUES (4, 4) (2, 2) (3, 3); -SELECT * FROM using1 ALL LEFT JOIN (SELECT * FROM using2) js2 USING (a, a, a, b, b, b, a, a) ORDER BY a; +SELECT * FROM using1 ALL LEFT JOIN (SELECT * FROM using2) js2 USING (a, b) ORDER BY a; DROP TABLE using1; DROP TABLE using2; diff --git a/tests/queries/0_stateless/00722_inner_join.reference b/tests/queries/0_stateless/00722_inner_join.reference index b5e8a77a20d..86c07e6e84e 100644 --- a/tests/queries/0_stateless/00722_inner_join.reference +++ b/tests/queries/0_stateless/00722_inner_join.reference @@ -16,24 +16,24 @@ ┌─x──────┬─name─┐ │ system │ one │ └────────┴──────┘ -┌─database─┬─name─┐ -│ system │ one │ -└──────────┴──────┘ +┌─database─┬─t.name─┐ +│ system │ one │ +└──────────┴────────┘ ┌─db.x───┬─name─┐ │ system │ one │ └────────┴──────┘ -┌─db.name─┬─name─┐ -│ system │ one │ -└─────────┴──────┘ -┌─db.name─┬─name─┐ -│ system │ one │ -└─────────┴──────┘ -┌─database─┬─name─┐ -│ system │ one │ -└──────────┴──────┘ -┌─database─┬─name─┐ -│ system │ one │ -└──────────┴──────┘ +┌─db.name─┬─t.name─┐ +│ system │ one │ +└─────────┴────────┘ +┌─db.name─┬─t.name─┐ +│ system │ one │ +└─────────┴────────┘ +┌─t.database─┬─t.name─┐ +│ system │ one │ +└────────────┴────────┘ +┌─database─┬─t.name─┐ +│ system │ one │ +└──────────┴────────┘ 2 2 2 diff --git a/tests/queries/0_stateless/00722_inner_join.sql b/tests/queries/0_stateless/00722_inner_join.sql index eee164ed1e1..75ef40ff2b7 100644 --- a/tests/queries/0_stateless/00722_inner_join.sql +++ b/tests/queries/0_stateless/00722_inner_join.sql @@ -1,3 +1,5 @@ +SET allow_experimental_analyzer = 1; + DROP TABLE IF EXISTS one; CREATE TABLE one(dummy UInt8) ENGINE = Memory; diff --git a/tests/queries/0_stateless/00818_inner_join_bug_3567.reference b/tests/queries/0_stateless/00818_inner_join_bug_3567.reference index 173e53ebc34..41e0d8ea43a 100644 --- a/tests/queries/0_stateless/00818_inner_join_bug_3567.reference +++ b/tests/queries/0_stateless/00818_inner_join_bug_3567.reference @@ -3,17 +3,17 @@ │ b │ 2018-01-01 │ │ c │ 2018-01-01 │ └───┴────────────┘ -┌─c─┬─a─┬──────────d─┬─a─┬──────────b─┐ -│ B │ b │ 2018-01-01 │ B │ 2018-01-01 │ -│ C │ c │ 2018-01-01 │ C │ 2018-01-01 │ -│ D │ d │ 2018-01-01 │ D │ 2018-01-01 │ -└───┴───┴────────────┴───┴────────────┘ -┌─a─┬──────────b─┬─c─┬──────────d─┐ -│ a │ 2018-01-01 │ │ 1970-01-01 │ -│ b │ 2018-01-01 │ B │ 2018-01-01 │ -│ c │ 2018-01-01 │ C │ 2018-01-01 │ -└───┴────────────┴───┴────────────┘ -┌─a─┬──────────b─┬─c─┬──────────d─┐ -│ b │ 2018-01-01 │ B │ 2018-01-01 │ -│ c │ 2018-01-01 │ C │ 2018-01-01 │ -└───┴────────────┴───┴────────────┘ +┌─c─┬─table2.a─┬──────────d─┬─a─┬──────────b─┐ +│ B │ b │ 2018-01-01 │ B │ 2018-01-01 │ +│ C │ c │ 2018-01-01 │ C │ 2018-01-01 │ +│ D │ d │ 2018-01-01 │ D │ 2018-01-01 │ +└───┴──────────┴────────────┴───┴────────────┘ +┌─a─┬──────────b─┬─c─┬──────────d─┬─c─┐ +│ a │ 2018-01-01 │ │ 1970-01-01 │ │ +│ b │ 2018-01-01 │ B │ 2018-01-01 │ B │ +│ c │ 2018-01-01 │ C │ 2018-01-01 │ C │ +└───┴────────────┴───┴────────────┴───┘ +┌─a─┬──────────b─┬─c─┬──────────d─┬─c─┐ +│ b │ 2018-01-01 │ B │ 2018-01-01 │ B │ +│ c │ 2018-01-01 │ C │ 2018-01-01 │ C │ +└───┴────────────┴───┴────────────┴───┘ diff --git a/tests/queries/0_stateless/00818_inner_join_bug_3567.sql b/tests/queries/0_stateless/00818_inner_join_bug_3567.sql index 1c851d40f47..cc0b63f9def 100644 --- a/tests/queries/0_stateless/00818_inner_join_bug_3567.sql +++ b/tests/queries/0_stateless/00818_inner_join_bug_3567.sql @@ -1,3 +1,5 @@ +SET allow_experimental_analyzer = 1; + DROP TABLE IF EXISTS table1; DROP TABLE IF EXISTS table2; diff --git a/tests/queries/0_stateless/00819_full_join_wrong_columns_in_block.reference b/tests/queries/0_stateless/00819_full_join_wrong_columns_in_block.reference index afbe9855519..b6d689e3e74 100644 --- a/tests/queries/0_stateless/00819_full_join_wrong_columns_in_block.reference +++ b/tests/queries/0_stateless/00819_full_join_wrong_columns_in_block.reference @@ -1,11 +1,11 @@ -1 x x -1 x x -1 x x -1 x x -1 x x -1 x x -1 x x -1 x x -1 x x -1 x x -1 x x +1 x y +1 x y +1 x y +1 x y +1 x y +1 x y +1 x y +1 x y +1 x y +1 x y +1 x y diff --git a/tests/queries/0_stateless/00819_full_join_wrong_columns_in_block.sql b/tests/queries/0_stateless/00819_full_join_wrong_columns_in_block.sql index 14a7424e634..cdb9e57d17f 100644 --- a/tests/queries/0_stateless/00819_full_join_wrong_columns_in_block.sql +++ b/tests/queries/0_stateless/00819_full_join_wrong_columns_in_block.sql @@ -1,5 +1,6 @@ SET any_join_distinct_right_table_keys = 1; SET joined_subquery_requires_alias = 0; +SET allow_experimental_analyzer = 1; SELECT * FROM (SELECT 1 AS a, 'x' AS b) join (SELECT 1 as a, 'y' as b) using a; SELECT * FROM (SELECT 1 AS a, 'x' AS b) left join (SELECT 1 as a, 'y' as b) using a; diff --git a/tests/queries/0_stateless/00820_multiple_joins.reference b/tests/queries/0_stateless/00820_multiple_joins.reference index f9d9a664784..3d7054bacfc 100644 --- a/tests/queries/0_stateless/00820_multiple_joins.reference +++ b/tests/queries/0_stateless/00820_multiple_joins.reference @@ -32,13 +32,13 @@ 6 6 60 60 12 12 120 120 18 18 180 180 -┌─t1.a─┬─t2.a─┬─t2.b─┬─t3.b─┬─t3.c─┐ +┌─t1.a─┬─t2.a─┬─t2.b─┬─t3.b─┬────c─┐ │ 0 │ 0 │ 0 │ 0 │ 0 │ │ 6 │ 6 │ 60 │ 60 │ 600 │ │ 12 │ 12 │ 120 │ 120 │ 1200 │ │ 18 │ 18 │ 180 │ 180 │ 1800 │ └──────┴──────┴──────┴──────┴──────┘ -┌─t1.a─┬─t2.a─┬─t2.b─┬─t3.b─┬─t3.c─┐ +┌─t1.a─┬─t2.a─┬─t2.b─┬─t3.b─┬────c─┐ │ 0 │ 0 │ 0 │ 0 │ 0 │ │ 6 │ 6 │ 60 │ 60 │ 600 │ │ 12 │ 12 │ 120 │ 120 │ 1200 │ diff --git a/tests/queries/0_stateless/00820_multiple_joins.sql b/tests/queries/0_stateless/00820_multiple_joins.sql index af13e6f1d8b..5c7a7bebb0b 100644 --- a/tests/queries/0_stateless/00820_multiple_joins.sql +++ b/tests/queries/0_stateless/00820_multiple_joins.sql @@ -1,3 +1,5 @@ +SET allow_experimental_analyzer = 1; + DROP TABLE IF EXISTS table1; DROP TABLE IF EXISTS table2; DROP TABLE IF EXISTS table3; diff --git a/tests/queries/0_stateless/00820_multiple_joins_subquery_requires_alias.reference b/tests/queries/0_stateless/00820_multiple_joins_subquery_requires_alias.reference index 6d317230813..11755d6bc8b 100644 --- a/tests/queries/0_stateless/00820_multiple_joins_subquery_requires_alias.reference +++ b/tests/queries/0_stateless/00820_multiple_joins_subquery_requires_alias.reference @@ -32,13 +32,13 @@ 6 6 60 60 12 12 120 120 18 18 180 180 -┌─t1.a─┬─t2.a─┬─t2.b─┬─t3.b─┬─t3.c─┐ +┌─t1.a─┬─t2.a─┬─t2.b─┬─t3.b─┬────c─┐ │ 0 │ 0 │ 0 │ 0 │ 0 │ │ 6 │ 6 │ 60 │ 60 │ 600 │ │ 12 │ 12 │ 120 │ 120 │ 1200 │ │ 18 │ 18 │ 180 │ 180 │ 1800 │ └──────┴──────┴──────┴──────┴──────┘ -┌─t1.a─┬─t2.a─┬─t2.b─┬─t3.b─┬─t3.c─┐ +┌─t1.a─┬─t2.a─┬─t2.b─┬─t3.b─┬────c─┐ │ 0 │ 0 │ 0 │ 0 │ 0 │ │ 6 │ 6 │ 60 │ 60 │ 600 │ │ 12 │ 12 │ 120 │ 120 │ 1200 │ diff --git a/tests/queries/0_stateless/00820_multiple_joins_subquery_requires_alias.sql b/tests/queries/0_stateless/00820_multiple_joins_subquery_requires_alias.sql index 612e75e6d4d..3da2cad4eff 100644 --- a/tests/queries/0_stateless/00820_multiple_joins_subquery_requires_alias.sql +++ b/tests/queries/0_stateless/00820_multiple_joins_subquery_requires_alias.sql @@ -1,3 +1,5 @@ +SET allow_experimental_analyzer = 1; + DROP TABLE IF EXISTS table1; DROP TABLE IF EXISTS table2; DROP TABLE IF EXISTS table3; diff --git a/tests/queries/0_stateless/00834_hints_for_type_function_typos.sh b/tests/queries/0_stateless/00834_hints_for_type_function_typos.sh index 41a35d908d1..b013993059f 100755 --- a/tests/queries/0_stateless/00834_hints_for_type_function_typos.sh +++ b/tests/queries/0_stateless/00834_hints_for_type_function_typos.sh @@ -10,7 +10,7 @@ $CLICKHOUSE_CLIENT -q "select c23ount(*) from system.functions;" 2>&1 | grep "Ma $CLICKHOUSE_CLIENT -q "select cunt(*) from system.functions;" 2>&1 | grep "Maybe you meant: \['count'" &>/dev/null; $CLICKHOUSE_CLIENT -q "select positin(*) from system.functions;" 2>&1 | grep "Maybe you meant: \['position'" &>/dev/null; $CLICKHOUSE_CLIENT -q "select POSITIO(*) from system.functions;" 2>&1 | grep "Maybe you meant: \['position'" &>/dev/null; -$CLICKHOUSE_CLIENT -q "select fount(*) from system.functions;" 2>&1 | grep "Maybe you meant: \['count'" | grep "Maybe you meant: \['round'" | grep "Or unknown aggregate function" &>/dev/null; +$CLICKHOUSE_CLIENT -q "select fount(*) from system.functions;" 2>&1 | grep "Maybe you meant: \['count'" &>/dev/null; $CLICKHOUSE_CLIENT -q "select positin(*) from system.functions;" 2>&1 | grep -v "Or unknown aggregate function" &>/dev/null; $CLICKHOUSE_CLIENT -q "select pov(*) from system.functions;" 2>&1 | grep "Maybe you meant: \['pow'\]" &>/dev/null; $CLICKHOUSE_CLIENT -q "select getColumnStructure('abc');" 2>&1 | grep "Maybe you meant: \['dumpColumnStructure'\]" &>/dev/null; diff --git a/tests/queries/0_stateless/00835_if_generic_case.reference b/tests/queries/0_stateless/00835_if_generic_case.reference index 45ee4651e17..84c036b17ca 100644 --- a/tests/queries/0_stateless/00835_if_generic_case.reference +++ b/tests/queries/0_stateless/00835_if_generic_case.reference @@ -2,7 +2,7 @@ 2000-01-01 00:00:00 2000-01-02 2000-01-02 00:00:00 2000-01-01 00:00:00 2000-01-02 2000-01-02 00:00:00 2000-01-01 00:00:00 2000-01-02 2000-01-02 00:00:00 -2000-01-01 00:00:00 2000-01-02 2000-01-02 +2000-01-01 00:00:00 2000-01-02 2000-01-02 00:00:00 2000-01-01 00:00:00 2000-01-02 2000-01-02 2000-01-01 00:00:00 2000-01-02 2000-01-02 2000-01-01 00:00:00 2000-01-02 2000-01-02 diff --git a/tests/queries/0_stateless/00835_if_generic_case.sql b/tests/queries/0_stateless/00835_if_generic_case.sql index 63baffcf17d..3d7f128f4c1 100644 --- a/tests/queries/0_stateless/00835_if_generic_case.sql +++ b/tests/queries/0_stateless/00835_if_generic_case.sql @@ -1,3 +1,5 @@ +SET allow_experimental_analyzer = 1; + SELECT toDateTime('2000-01-01 00:00:00', 'Asia/Istanbul') AS x, toDate('2000-01-02') AS y, x > y ? x : y AS z; SELECT materialize(toDateTime('2000-01-01 00:00:00', 'Asia/Istanbul')) AS x, toDate('2000-01-02') AS y, x > y ? x : y AS z; SELECT toDateTime('2000-01-01 00:00:00', 'Asia/Istanbul') AS x, materialize(toDate('2000-01-02')) AS y, x > y ? x : y AS z; diff --git a/tests/queries/0_stateless/01429_join_on_error_messages.sql b/tests/queries/0_stateless/01429_join_on_error_messages.sql index cf9aac0e4da..9b8688c8415 100644 --- a/tests/queries/0_stateless/01429_join_on_error_messages.sql +++ b/tests/queries/0_stateless/01429_join_on_error_messages.sql @@ -1,8 +1,10 @@ +SET allow_experimental_analyzer = 1; + SELECT 1 FROM (select 1 a) A JOIN (select 1 b) B ON (arrayJoin([1]) = B.b); -- { serverError 403 } SELECT 1 FROM (select 1 a) A JOIN (select 1 b) B ON (A.a = arrayJoin([1])); -- { serverError 403 } -SELECT 1 FROM (select 1 a) A JOIN (select 1 b) B ON equals(a); -- { serverError 62 } -SELECT 1 FROM (select 1 a) A JOIN (select 1 b) B ON less(a); -- { serverError 62 } +SELECT 1 FROM (select 1 a) A JOIN (select 1 b) B ON equals(a); -- { serverError 42 } +SELECT 1 FROM (select 1 a) A JOIN (select 1 b) B ON less(a); -- { serverError 42 } SELECT 1 FROM (select 1 a) A JOIN (select 1 b) B ON a = b AND a > b; -- { serverError 403 } SELECT 1 FROM (select 1 a) A JOIN (select 1 b) B ON a = b AND a < b; -- { serverError 403 } diff --git a/tests/queries/0_stateless/01508_explain_header.reference b/tests/queries/0_stateless/01508_explain_header.reference index 7510e67c643..206bd4afdab 100644 --- a/tests/queries/0_stateless/01508_explain_header.reference +++ b/tests/queries/0_stateless/01508_explain_header.reference @@ -1,4 +1,4 @@ -Expression ((Projection + Before ORDER BY)) +Expression ((Project names + (Projection + Change column names to column identifiers))) Header: x UInt8 ReadFromStorage (SystemOne) Header: dummy UInt8 diff --git a/tests/queries/0_stateless/01527_bad_aggregation_in_lambda.sql b/tests/queries/0_stateless/01527_bad_aggregation_in_lambda.sql index 10ffca22bd1..e16f6396a2c 100644 --- a/tests/queries/0_stateless/01527_bad_aggregation_in_lambda.sql +++ b/tests/queries/0_stateless/01527_bad_aggregation_in_lambda.sql @@ -1 +1,3 @@ -SELECT arrayMap(x -> x * sum(x), range(10)); -- { serverError 47 } +SET allow_experimental_analyzer = 1; + +SELECT arrayMap(x -> x * sum(x), range(10)); -- { serverError 10 } From 8665077b5ce8f4590b41848aef5698358d1fd95c Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Sun, 19 Feb 2023 21:15:30 +0100 Subject: [PATCH 367/841] Planner add logging --- src/Planner/Planner.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Planner/Planner.cpp b/src/Planner/Planner.cpp index f0fe44e368f..fff539f59d6 100644 --- a/src/Planner/Planner.cpp +++ b/src/Planner/Planner.cpp @@ -1012,6 +1012,11 @@ void Planner::buildQueryPlanIfNeeded() if (query_plan.isInitialized()) return; + LOG_TRACE(&Poco::Logger::get("Planner"), "Query {} to stage {}{}", + query_tree->formatConvertedASTForErrorMessage(), + QueryProcessingStage::toString(select_query_options.to_stage), + select_query_options.only_analyze ? " only analyze" : ""); + if (query_tree->getNodeType() == QueryTreeNodeType::UNION) buildPlanForUnionNode(); else @@ -1200,6 +1205,12 @@ void Planner::buildPlanForQueryNode() query_plan = std::move(join_tree_query_plan.query_plan); } + LOG_TRACE(&Poco::Logger::get("Planner"), "Query {} from stage {} to stage {}{}", + query_tree->formatConvertedASTForErrorMessage(), + QueryProcessingStage::toString(from_stage), + QueryProcessingStage::toString(select_query_options.to_stage), + select_query_options.only_analyze ? " only analyze" : ""); + if (select_query_options.to_stage == QueryProcessingStage::FetchColumns) return; From 54b704254d0063050241016731dcb8d2b62da986 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Sun, 19 Feb 2023 21:20:49 +0100 Subject: [PATCH 368/841] Analyzer support InterpreterCreateQuery --- src/Interpreters/InterpreterCreateQuery.cpp | 31 +++++++++++++++++++-- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/src/Interpreters/InterpreterCreateQuery.cpp b/src/Interpreters/InterpreterCreateQuery.cpp index 559fc3532f5..29b7a4db609 100644 --- a/src/Interpreters/InterpreterCreateQuery.cpp +++ b/src/Interpreters/InterpreterCreateQuery.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -730,7 +731,21 @@ InterpreterCreateQuery::TableProperties InterpreterCreateQuery::getTableProperti } else if (create.select) { - Block as_select_sample = InterpreterSelectWithUnionQuery::getSampleBlock(create.select->clone(), getContext(), false /* is_subquery */, create.isParameterizedView()); + + Block as_select_sample; + + if (getContext()->getSettingsRef().allow_experimental_analyzer) + { + as_select_sample = InterpreterSelectQueryAnalyzer::getSampleBlock(create.select->clone(), getContext()); + } + else + { + as_select_sample = InterpreterSelectWithUnionQuery::getSampleBlock(create.select->clone(), + getContext(), + false /* is_subquery */, + create.isParameterizedView()); + } + properties.columns = ColumnsDescription(as_select_sample.getNamesAndTypesList()); } else if (create.as_table_function) @@ -1184,8 +1199,18 @@ BlockIO InterpreterCreateQuery::createTable(ASTCreateQuery & create) getContext() )) { - Block input_block = InterpreterSelectWithUnionQuery( - create.select->clone(), getContext(), SelectQueryOptions().analyze()).getSampleBlock(); + Block input_block; + + if (getContext()->getSettingsRef().allow_experimental_analyzer) + { + input_block = InterpreterSelectQueryAnalyzer::getSampleBlock(create.select->clone(), getContext()); + } + else + { + input_block = InterpreterSelectWithUnionQuery(create.select->clone(), + getContext(), + SelectQueryOptions().analyze()).getSampleBlock(); + } Block output_block = to_table->getInMemoryMetadataPtr()->getSampleBlock(); From 1b946b314ecf8c710ac80e21236b3ee8c50af17d Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Sun, 19 Feb 2023 21:31:21 +0100 Subject: [PATCH 369/841] Analyzer convert LIMIT OFFSET expressions --- src/Analyzer/Passes/QueryAnalysisPass.cpp | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/Analyzer/Passes/QueryAnalysisPass.cpp b/src/Analyzer/Passes/QueryAnalysisPass.cpp index 45d8154f39b..2cbdab81c73 100644 --- a/src/Analyzer/Passes/QueryAnalysisPass.cpp +++ b/src/Analyzer/Passes/QueryAnalysisPass.cpp @@ -1156,7 +1156,7 @@ private: static void replaceNodesWithPositionalArguments(QueryTreeNodePtr & node_list, const QueryTreeNodes & projection_nodes, IdentifierResolveScope & scope); - static void validateLimitOffsetExpression(QueryTreeNodePtr & expression_node, const String & expression_description, IdentifierResolveScope & scope); + static void convertLimitOffsetExpression(QueryTreeNodePtr & expression_node, const String & expression_description, IdentifierResolveScope & scope); static void validateTableExpressionModifiers(const QueryTreeNodePtr & table_expression_node, IdentifierResolveScope & scope); @@ -2091,7 +2091,7 @@ void QueryAnalyzer::replaceNodesWithPositionalArguments(QueryTreeNodePtr & node_ } } -void QueryAnalyzer::validateLimitOffsetExpression(QueryTreeNodePtr & expression_node, const String & expression_description, IdentifierResolveScope & scope) +void QueryAnalyzer::convertLimitOffsetExpression(QueryTreeNodePtr & expression_node, const String & expression_description, IdentifierResolveScope & scope) { const auto * limit_offset_constant_node = expression_node->as(); if (!limit_offset_constant_node || !isNativeNumber(removeNullable(limit_offset_constant_node->getResultType()))) @@ -2101,11 +2101,17 @@ void QueryAnalyzer::validateLimitOffsetExpression(QueryTreeNodePtr & expression_ expression_node->formatASTForErrorMessage(), scope.scope_node->formatASTForErrorMessage()); - Field converted = convertFieldToType(limit_offset_constant_node->getValue(), DataTypeUInt64()); - if (converted.isNull()) + Field converted_value = convertFieldToType(limit_offset_constant_node->getValue(), DataTypeUInt64()); + if (converted_value.isNull()) throw Exception(ErrorCodes::INVALID_LIMIT_EXPRESSION, "{} numeric constant expression is not representable as UInt64", expression_description); + + auto constant_value = std::make_shared(std::move(converted_value), std::make_shared()); + auto result_constant_node = std::make_shared(std::move(constant_value)); + result_constant_node->getSourceExpression() = limit_offset_constant_node->getSourceExpression(); + + expression_node = std::move(result_constant_node); } void QueryAnalyzer::validateTableExpressionModifiers(const QueryTreeNodePtr & table_expression_node, IdentifierResolveScope & scope) @@ -6473,13 +6479,13 @@ void QueryAnalyzer::resolveQuery(const QueryTreeNodePtr & query_node, Identifier if (query_node_typed.hasLimitByLimit()) { resolveExpressionNode(query_node_typed.getLimitByLimit(), scope, false /*allow_lambda_expression*/, false /*allow_table_expression*/); - validateLimitOffsetExpression(query_node_typed.getLimitByLimit(), "LIMIT BY LIMIT", scope); + convertLimitOffsetExpression(query_node_typed.getLimitByLimit(), "LIMIT BY LIMIT", scope); } if (query_node_typed.hasLimitByOffset()) { resolveExpressionNode(query_node_typed.getLimitByOffset(), scope, false /*allow_lambda_expression*/, false /*allow_table_expression*/); - validateLimitOffsetExpression(query_node_typed.getLimitByOffset(), "LIMIT BY OFFSET", scope); + convertLimitOffsetExpression(query_node_typed.getLimitByOffset(), "LIMIT BY OFFSET", scope); } if (query_node_typed.hasLimitBy()) @@ -6493,13 +6499,13 @@ void QueryAnalyzer::resolveQuery(const QueryTreeNodePtr & query_node, Identifier if (query_node_typed.hasLimit()) { resolveExpressionNode(query_node_typed.getLimit(), scope, false /*allow_lambda_expression*/, false /*allow_table_expression*/); - validateLimitOffsetExpression(query_node_typed.getLimit(), "LIMIT", scope); + convertLimitOffsetExpression(query_node_typed.getLimit(), "LIMIT", scope); } if (query_node_typed.hasOffset()) { resolveExpressionNode(query_node_typed.getOffset(), scope, false /*allow_lambda_expression*/, false /*allow_table_expression*/); - validateLimitOffsetExpression(query_node_typed.getOffset(), "OFFSET", scope); + convertLimitOffsetExpression(query_node_typed.getOffset(), "OFFSET", scope); } /** Resolve nodes with duplicate aliases. From 2672f24ced7b6a2c4754990524bab31f04a97187 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Sun, 19 Feb 2023 21:36:59 +0100 Subject: [PATCH 370/841] Analyzer cyclic aliases fix --- src/Analyzer/Passes/QueryAnalysisPass.cpp | 50 +++++++++++++------ .../00818_alias_bug_4110.reference | 1 + .../0_stateless/00818_alias_bug_4110.sql | 10 ++-- 3 files changed, 41 insertions(+), 20 deletions(-) diff --git a/src/Analyzer/Passes/QueryAnalysisPass.cpp b/src/Analyzer/Passes/QueryAnalysisPass.cpp index 2cbdab81c73..c97b167348b 100644 --- a/src/Analyzer/Passes/QueryAnalysisPass.cpp +++ b/src/Analyzer/Passes/QueryAnalysisPass.cpp @@ -361,6 +361,12 @@ struct IdentifierResolveResult } }; +struct IdentifierResolveState +{ + IdentifierResolveResult resolve_result; + bool cyclic_identifier_resolve = false; +}; + struct IdentifierResolveSettings { /// Allow to check join tree during identifier resolution @@ -687,7 +693,7 @@ struct IdentifierResolveScope ContextPtr context; /// Identifier lookup to result - std::unordered_map identifier_lookup_to_result; + std::unordered_map identifier_lookup_to_resolve_state; /// Lambda argument can be expression like constant, column, or it can be function std::unordered_map expression_argument_name_to_node; @@ -799,11 +805,11 @@ struct IdentifierResolveScope [[maybe_unused]] void dump(WriteBuffer & buffer) const { buffer << "Scope node " << scope_node->formatASTForErrorMessage() << '\n'; - buffer << "Identifier lookup to result " << identifier_lookup_to_result.size() << '\n'; - for (const auto & [identifier, result] : identifier_lookup_to_result) + buffer << "Identifier lookup to resolve state " << identifier_lookup_to_resolve_state.size() << '\n'; + for (const auto & [identifier, state] : identifier_lookup_to_resolve_state) { buffer << "Identifier " << identifier.dump() << " resolve result "; - result.dump(buffer); + state.resolve_result.dump(buffer); buffer << '\n'; } @@ -3316,21 +3322,28 @@ IdentifierResolveResult QueryAnalyzer::tryResolveIdentifier(const IdentifierLook IdentifierResolveScope & scope, IdentifierResolveSettings identifier_resolve_settings) { - auto it = scope.identifier_lookup_to_result.find(identifier_lookup); - if (it != scope.identifier_lookup_to_result.end()) + auto it = scope.identifier_lookup_to_resolve_state.find(identifier_lookup); + if (it != scope.identifier_lookup_to_resolve_state.end()) { - if (!it->second.resolved_identifier) + if (it->second.cyclic_identifier_resolve) throw Exception(ErrorCodes::CYCLIC_ALIASES, "Cyclic aliases for identifier '{}'. In scope {}", identifier_lookup.identifier.getFullName(), scope.scope_node->formatASTForErrorMessage()); - if (scope.use_identifier_lookup_to_result_cache && !scope.non_cached_identifier_lookups_during_expression_resolve.contains(identifier_lookup)) - return it->second; - } + if (!it->second.resolve_result.isResolved()) + it->second.cyclic_identifier_resolve = true; - auto [insert_it, _] = scope.identifier_lookup_to_result.insert({identifier_lookup, IdentifierResolveResult()}); - it = insert_it; + if (it->second.resolve_result.isResolved() && + scope.use_identifier_lookup_to_result_cache && + !scope.non_cached_identifier_lookups_during_expression_resolve.contains(identifier_lookup)) + return it->second.resolve_result; + } + else + { + auto [insert_it, _] = scope.identifier_lookup_to_resolve_state.insert({identifier_lookup, IdentifierResolveState()}); + it = insert_it; + } /// Resolve identifier from current scope @@ -3409,15 +3422,18 @@ IdentifierResolveResult QueryAnalyzer::tryResolveIdentifier(const IdentifierLook resolve_result.resolve_place = IdentifierResolvePlace::DATABASE_CATALOG; } - it->second = resolve_result; + bool was_cyclic_identifier_resolve = it->second.cyclic_identifier_resolve; + if (!was_cyclic_identifier_resolve) + it->second.resolve_result = resolve_result; + it->second.cyclic_identifier_resolve = false; /** If identifier was not resolved, or during expression resolution identifier was explicitly added into non cached set, * or identifier caching was disabled in resolve scope we remove identifier lookup result from identifier lookup to result table. */ - if (!resolve_result.resolved_identifier || + if (!was_cyclic_identifier_resolve && (!resolve_result.resolved_identifier || scope.non_cached_identifier_lookups_during_expression_resolve.contains(identifier_lookup) || - !scope.use_identifier_lookup_to_result_cache) - scope.identifier_lookup_to_result.erase(it); + !scope.use_identifier_lookup_to_result_cache)) + scope.identifier_lookup_to_resolve_state.erase(it); return resolve_result; } @@ -4987,6 +5003,8 @@ ProjectionNames QueryAnalyzer::resolveFunction(QueryTreeNodePtr & node, Identifi */ ProjectionNames QueryAnalyzer::resolveExpressionNode(QueryTreeNodePtr & node, IdentifierResolveScope & scope, bool allow_lambda_expression, bool allow_table_expression) { + checkStackSize(); + auto resolved_expression_it = resolved_expressions.find(node); if (resolved_expression_it != resolved_expressions.end()) { diff --git a/tests/queries/0_stateless/00818_alias_bug_4110.reference b/tests/queries/0_stateless/00818_alias_bug_4110.reference index 210fc67db66..e6013d269c2 100644 --- a/tests/queries/0_stateless/00818_alias_bug_4110.reference +++ b/tests/queries/0_stateless/00818_alias_bug_4110.reference @@ -4,6 +4,7 @@ 11 12 12 11 10 10 +10 11 11 12 11 10 12 11 12 diff --git a/tests/queries/0_stateless/00818_alias_bug_4110.sql b/tests/queries/0_stateless/00818_alias_bug_4110.sql index df7e70cb275..9f3657221e4 100644 --- a/tests/queries/0_stateless/00818_alias_bug_4110.sql +++ b/tests/queries/0_stateless/00818_alias_bug_4110.sql @@ -1,3 +1,5 @@ +SET allow_experimental_analyzer = 1; + select s.a as a, s.a + 1 as b from (select 10 as a) s; select s.a + 1 as a, s.a as b from (select 10 as a) s; select s.a + 1 as a, s.a + 1 as b from (select 10 as a) s; @@ -5,15 +7,15 @@ select s.a + 1 as b, s.a + 2 as a from (select 10 as a) s; select s.a + 2 as b, s.a + 1 as a from (select 10 as a) s; select a, a as a from (select 10 as a); -select s.a, a, a + 1 as a from (select 10 as a) as s; -- { serverError 352 } +select s.a, a, a + 1 as a from (select 10 as a) as s; select s.a + 2 as b, b - 1 as a from (select 10 as a) s; select s.a as a, s.a + 2 as b from (select 10 as a) s; select s.a + 1 as a, s.a + 2 as b from (select 10 as a) s; select a + 1 as a, a + 1 as b from (select 10 as a); select a + 1 as b, b + 1 as a from (select 10 as a); -- { serverError 174 } -select 10 as a, a + 1 as a; -- { serverError 179 } -with 10 as a select a as a; -- { serverError 179 } -with 10 as a select a + 1 as a; -- { serverError 179 } +select 10 as a, a + 1 as a; -- { serverError 47 } +with 10 as a select a as a; -- { serverError 47 } +with 10 as a select a + 1 as a; -- { serverError 47 } SELECT 0 as t FROM (SELECT 1 as t) as inn WHERE inn.t = 1; SELECT sum(value) as value FROM (SELECT 1 as value) as data WHERE data.value > 0; From 40fc36bb6f7a04524368aa445e78d9742e24195a Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Mon, 20 Feb 2023 19:26:39 +0100 Subject: [PATCH 371/841] Fixed tests --- src/Analyzer/Passes/QueryAnalysisPass.cpp | 2 +- src/Planner/PlannerJoinTree.cpp | 3 +- .../00800_low_cardinality_join.sql | 3 +- .../00800_low_cardinality_merge_join.sql.j2 | 4 ++- .../00834_limit_with_constant_expressions.sql | 4 ++- .../01000_subquery_requires_alias.reference | 4 +-- .../01000_subquery_requires_alias.sql | 1 + .../01009_insert_select_data_loss.sql | 2 +- .../01010_pm_join_all_join_bug.sql | 4 ++- .../queries/0_stateless/01010_pmj_on_disk.sql | 12 +++---- .../01064_pm_all_join_const_and_nullable.sql | 32 +++++++++---------- .../0_stateless/01095_tpch_like_smoke.sql | 8 +++-- .../0_stateless/01120_join_constants.sql | 4 +-- .../01129_dict_get_join_lose_constness.sql | 4 +-- .../0_stateless/01223_dist_on_dist.sql | 4 +-- .../0_stateless/01232_untuple.reference | 2 +- tests/queries/0_stateless/01232_untuple.sql | 2 ++ .../0_stateless/01474_bad_global_join.sql | 4 ++- .../01671_merge_join_and_constants.reference | 10 +++--- .../01671_merge_join_and_constants.sql | 2 ++ .../01890_cross_join_explain_crash.reference | 1 + .../01890_cross_join_explain_crash.sql | 5 ++- ...obal_subqueries_subquery_or_table_name.sql | 4 ++- .../0_stateless/02116_tuple_element.sql | 6 ++-- .../02136_scalar_read_rows_json.reference | 2 +- .../02136_scalar_read_rows_json.sh | 2 +- .../02154_dictionary_get_http_json.reference | 8 ++--- .../02154_dictionary_get_http_json.sh | 1 + tests/queries/0_stateless/02163_operators.sql | 2 +- .../02234_clickhouse_local_test_mode.sh | 2 +- ..._column_matcher_and_column_transformer.sql | 4 ++- ...37_multiple_joins_original_names.reference | 1 + .../02337_multiple_joins_original_names.sql | 4 ++- ...497_if_transform_strings_to_enum.reference | 24 +++++++------- 34 files changed, 102 insertions(+), 75 deletions(-) diff --git a/src/Analyzer/Passes/QueryAnalysisPass.cpp b/src/Analyzer/Passes/QueryAnalysisPass.cpp index c97b167348b..0e47aec7c20 100644 --- a/src/Analyzer/Passes/QueryAnalysisPass.cpp +++ b/src/Analyzer/Passes/QueryAnalysisPass.cpp @@ -3647,7 +3647,7 @@ QueryAnalyzer::QueryTreeNodesWithNames QueryAnalyzer::resolveQualifiedMatcher(Qu if (!table_expression_node) { - throw Exception(ErrorCodes::UNSUPPORTED_METHOD, + throw Exception(ErrorCodes::UNKNOWN_IDENTIFIER, "Qualified matcher {} does not find table. In scope {}", matcher_node->formatASTForErrorMessage(), scope.scope_node->formatASTForErrorMessage()); diff --git a/src/Planner/PlannerJoinTree.cpp b/src/Planner/PlannerJoinTree.cpp index f2259ca7e33..02c396542b1 100644 --- a/src/Planner/PlannerJoinTree.cpp +++ b/src/Planner/PlannerJoinTree.cpp @@ -533,7 +533,8 @@ JoinTreeQueryPlan buildQueryPlanForJoinNode(const QueryTreeNodePtr & join_table_ for (auto & output_node : cast_actions_dag->getOutputs()) { - if (planner_context->getGlobalPlannerContext()->hasColumnIdentifier(output_node->result_name)) + if (planner_context->getGlobalPlannerContext()->hasColumnIdentifier(output_node->result_name) && + output_node->result_type->canBeInsideNullable()) output_node = &cast_actions_dag->addFunction(to_nullable_function, {output_node}, output_node->result_name); } diff --git a/tests/queries/0_stateless/00800_low_cardinality_join.sql b/tests/queries/0_stateless/00800_low_cardinality_join.sql index 30fb40a56e9..9c1fd9b7ad3 100644 --- a/tests/queries/0_stateless/00800_low_cardinality_join.sql +++ b/tests/queries/0_stateless/00800_low_cardinality_join.sql @@ -1,3 +1,4 @@ +set allow_experimental_analyzer = 1; set joined_subquery_requires_alias = 0; select * from (select dummy as val from system.one) any left join (select dummy as val from system.one) using val; @@ -10,7 +11,7 @@ select * from (select toLowCardinality(toNullable(dummy)) as val from system.one select * from (select toLowCardinality(dummy) as val from system.one) any left join (select toLowCardinality(toNullable(dummy)) as val from system.one) using val; select * from (select toLowCardinality(toNullable(dummy)) as val from system.one) any left join (select toLowCardinality(toNullable(dummy)) as val from system.one) using val; select '-'; -select * from (select dummy as val from system.one) any left join (select dummy as val from system.one) on val + 0 = val * 1; -- { serverError 352 } +select * from (select dummy as val from system.one) any left join (select dummy as val from system.one) on val + 0 = val * 1; -- { serverError 403 } select * from (select dummy as val from system.one) any left join (select dummy as rval from system.one) on val + 0 = rval * 1; select * from (select toLowCardinality(dummy) as val from system.one) any left join (select dummy as rval from system.one) on val + 0 = rval * 1; select * from (select dummy as val from system.one) any left join (select toLowCardinality(dummy) as rval from system.one) on val + 0 = rval * 1; diff --git a/tests/queries/0_stateless/00800_low_cardinality_merge_join.sql.j2 b/tests/queries/0_stateless/00800_low_cardinality_merge_join.sql.j2 index 8b7856b7738..8e2037480c7 100644 --- a/tests/queries/0_stateless/00800_low_cardinality_merge_join.sql.j2 +++ b/tests/queries/0_stateless/00800_low_cardinality_merge_join.sql.j2 @@ -1,3 +1,5 @@ +SET allow_experimental_analyzer = 1; + {% for join_algorithm in ['partial_merge', 'full_sorting_merge', 'grace_hash'] -%} SET join_algorithm = '{{ join_algorithm }}'; @@ -12,7 +14,7 @@ SELECT * FROM (SELECT toLowCardinality(toNullable(dummy)) AS val FROM system.one SELECT * FROM (SELECT toLowCardinality(dummy) AS val FROM system.one) s1 ANY LEFT JOIN (SELECT toLowCardinality(toNullable(dummy)) AS val FROM system.one) s2 USING val ORDER BY val; SELECT * FROM (SELECT toLowCardinality(toNullable(dummy)) AS val FROM system.one) s1 ANY LEFT JOIN (SELECT toLowCardinality(toNullable(dummy)) AS val FROM system.one) s2 USING val ORDER BY val; SELECT '-'; -SELECT * FROM (SELECT dummy AS val FROM system.one) s1 ANY LEFT JOIN (SELECT dummy AS val FROM system.one) s2 ON val + 0 = val * 1 ORDER BY val; -- { serverError 352 } +SELECT * FROM (SELECT dummy AS val FROM system.one) s1 ANY LEFT JOIN (SELECT dummy AS val FROM system.one) s2 ON val + 0 = val * 1 ORDER BY val; -- { serverError 403 } SELECT * FROM (SELECT dummy AS val FROM system.one) s1 ANY LEFT JOIN (SELECT dummy AS rval FROM system.one) s2 ON val + 0 = rval * 1 ORDER BY val; SELECT * FROM (SELECT toLowCardinality(dummy) AS val FROM system.one) s1 ANY LEFT JOIN (SELECT dummy AS rval FROM system.one) s2 ON val + 0 = rval * 1 ORDER BY val; SELECT * FROM (SELECT dummy AS val FROM system.one) s1 ANY LEFT JOIN (SELECT toLowCardinality(dummy) AS rval FROM system.one) s2 ON val + 0 = rval * 1 ORDER BY val; diff --git a/tests/queries/0_stateless/00834_limit_with_constant_expressions.sql b/tests/queries/0_stateless/00834_limit_with_constant_expressions.sql index 12104145237..1d3429436e7 100644 --- a/tests/queries/0_stateless/00834_limit_with_constant_expressions.sql +++ b/tests/queries/0_stateless/00834_limit_with_constant_expressions.sql @@ -1,3 +1,5 @@ +SET allow_experimental_analyzer = 1; + SELECT number FROM numbers(10) LIMIT 0 + 1; SELECT number FROM numbers(10) LIMIT 1 - 1; SELECT number FROM numbers(10) LIMIT 2 - 1; @@ -9,7 +11,7 @@ SELECT number FROM numbers(10) LIMIT now(); -- { serverError 440 } SELECT number FROM numbers(10) LIMIT today(); -- { serverError 440 } SELECT number FROM numbers(10) LIMIT toUInt8('1'); SELECT number FROM numbers(10) LIMIT toFloat32('1'); -SELECT number FROM numbers(10) LIMIT rand(); -- { serverError 36 } +SELECT number FROM numbers(10) LIMIT rand(); -- { serverError 440 } SELECT count() <= 1 FROM (SELECT number FROM numbers(10) LIMIT randConstant() % 2); diff --git a/tests/queries/0_stateless/01000_subquery_requires_alias.reference b/tests/queries/0_stateless/01000_subquery_requires_alias.reference index 8018af28430..b6ceb2a2a72 100644 --- a/tests/queries/0_stateless/01000_subquery_requires_alias.reference +++ b/tests/queries/0_stateless/01000_subquery_requires_alias.reference @@ -1,2 +1,2 @@ -1 2 3 -1 2 3 +2 1 3 +2 1 3 diff --git a/tests/queries/0_stateless/01000_subquery_requires_alias.sql b/tests/queries/0_stateless/01000_subquery_requires_alias.sql index d14d4637be8..27320fab933 100644 --- a/tests/queries/0_stateless/01000_subquery_requires_alias.sql +++ b/tests/queries/0_stateless/01000_subquery_requires_alias.sql @@ -1,3 +1,4 @@ +SET allow_experimental_analyzer = 1; SET joined_subquery_requires_alias = 1; SELECT * FROM (SELECT 1 as A, 2 as B) X diff --git a/tests/queries/0_stateless/01009_insert_select_data_loss.sql b/tests/queries/0_stateless/01009_insert_select_data_loss.sql index a153d7dbc30..cbf87c4d0f1 100644 --- a/tests/queries/0_stateless/01009_insert_select_data_loss.sql +++ b/tests/queries/0_stateless/01009_insert_select_data_loss.sql @@ -1,7 +1,7 @@ drop table if exists tab; create table tab (x UInt64) engine = MergeTree order by tuple(); -insert into tab select number as n from numbers(20) nums +insert into tab select n from (SELECT number AS n FROM numbers(20)) nums semi left join (select number * 10 as n from numbers(2)) js2 using(n) settings max_block_size = 5; select * from tab order by x; diff --git a/tests/queries/0_stateless/01010_pm_join_all_join_bug.sql b/tests/queries/0_stateless/01010_pm_join_all_join_bug.sql index 18a67f41194..d192b9a8b64 100644 --- a/tests/queries/0_stateless/01010_pm_join_all_join_bug.sql +++ b/tests/queries/0_stateless/01010_pm_join_all_join_bug.sql @@ -1,3 +1,5 @@ +SET allow_experimental_analyzer = 1; + DROP TABLE IF EXISTS ints; CREATE TABLE ints (i64 Int64, i32 Int32) ENGINE = Memory; @@ -10,6 +12,6 @@ SELECT '-'; SELECT * FROM ints l INNER JOIN ints r USING i64 ORDER BY l.i32, r.i32; SELECT '-'; -SELECT count() FROM ( SELECT [1], count(1) ) AS t1 ALL RIGHT JOIN ( SELECT number AS s FROM numbers(2) ) AS t2 USING (s); -- { serverError NOT_FOUND_COLUMN_IN_BLOCK } +SELECT count() FROM ( SELECT [1], count(1) ) AS t1 ALL RIGHT JOIN ( SELECT number AS s FROM numbers(2) ) AS t2 USING (s); -- { serverError UNKNOWN_IDENTIFIER } DROP TABLE ints; diff --git a/tests/queries/0_stateless/01010_pmj_on_disk.sql b/tests/queries/0_stateless/01010_pmj_on_disk.sql index d4fb9184896..4925f78f82f 100644 --- a/tests/queries/0_stateless/01010_pmj_on_disk.sql +++ b/tests/queries/0_stateless/01010_pmj_on_disk.sql @@ -1,6 +1,6 @@ SET join_algorithm = 'hash'; -SELECT number as n, j FROM numbers(4) nums +SELECT n, j FROM (SELECT number as n FROM numbers(4)) nums ANY LEFT JOIN ( SELECT number * 2 AS n, number + 10 AS j FROM numbers(4000) @@ -10,7 +10,7 @@ ORDER BY n; SET max_rows_in_join = 1000; -SELECT number as n, j FROM numbers(4) nums +SELECT n, j FROM (SELECT number AS n FROM numbers(4)) nums ANY LEFT JOIN ( SELECT number * 2 AS n, number + 10 AS j FROM numbers(4000) @@ -20,7 +20,7 @@ ORDER BY n; -- { serverError 191 } SET join_algorithm = 'partial_merge'; -SELECT number as n, j FROM numbers(4) nums +SELECT n, j FROM (SELECT number as n FROM numbers(4)) nums ANY LEFT JOIN ( SELECT number * 2 AS n, number + 10 AS j FROM numbers(4000) @@ -30,7 +30,7 @@ ORDER BY n; SET partial_merge_join_optimizations = 1; -SELECT number as n, j FROM numbers(4) nums +SELECT n, j FROM (SELECT number AS n FROM numbers(4)) nums ANY LEFT JOIN ( SELECT number * 2 AS n, number + 10 AS j FROM numbers(4000) @@ -40,7 +40,7 @@ ORDER BY n; SET join_algorithm = 'auto'; -SELECT number as n, j FROM numbers(4) nums +SELECT n, j FROM (SELECT number AS n FROM numbers(4)) nums ANY LEFT JOIN ( SELECT number * 2 AS n, number + 10 AS j FROM numbers(4000) @@ -50,7 +50,7 @@ ORDER BY n; SET max_rows_in_join = '10'; -SELECT number as n, j FROM numbers(4) nums +SELECT n, j FROM (SELECT number AS n FROM numbers(4)) nums ANY LEFT JOIN ( SELECT number * 2 AS n, number + 10 AS j FROM numbers(4000) diff --git a/tests/queries/0_stateless/01064_pm_all_join_const_and_nullable.sql b/tests/queries/0_stateless/01064_pm_all_join_const_and_nullable.sql index 10306777f25..bc5e1d68290 100644 --- a/tests/queries/0_stateless/01064_pm_all_join_const_and_nullable.sql +++ b/tests/queries/0_stateless/01064_pm_all_join_const_and_nullable.sql @@ -1,87 +1,87 @@ SET join_algorithm = 'partial_merge'; SELECT count(1), uniqExact(1) FROM ( -SELECT materialize(1) as k FROM numbers(1) nums +SELECT k FROM (SELECT materialize(1) AS k FROM numbers(1)) nums JOIN (SELECT materialize(1) AS k, number n FROM numbers(100000)) j USING k); SELECT count(1), uniqExact(1) FROM ( -SELECT materialize(1) as k FROM numbers(1) nums +SELECT k FROM (SELECT materialize(1) as k FROM numbers(1)) nums JOIN (SELECT 1 AS k, number n FROM numbers(100000)) j USING k); SELECT count(1), uniqExact(1) FROM ( -SELECT 1 as k FROM numbers(1) nums +SELECT k FROM (SELECT 1 AS k FROM numbers(1)) nums JOIN (SELECT materialize(1) AS k, number n FROM numbers(100000)) j USING k); SELECT count(1), uniqExact(1) FROM ( -SELECT 1 as k FROM numbers(1) nums +SELECT k FROM (SELECT 1 as k FROM numbers(1)) nums JOIN (SELECT 1 AS k, number n FROM numbers(100000)) j USING k); SELECT 'first nullable'; SELECT count(1), uniqExact(1) FROM ( -SELECT materialize(toNullable(1)) as k FROM numbers(1) nums +SELECT k FROM (SELECT materialize(toNullable(1)) AS k FROM numbers(1)) nums JOIN (SELECT materialize(1) AS k, number n FROM numbers(100000)) j USING k); SELECT count(1), uniqExact(1) FROM ( -SELECT materialize(toNullable(1)) as k FROM numbers(1) nums +SELECT k FROM (SELECT materialize(toNullable(1)) as k FROM numbers(1)) nums JOIN (SELECT 1 AS k, number n FROM numbers(100000)) j USING k); SELECT count(1), uniqExact(1) FROM ( -SELECT toNullable(1) as k FROM numbers(1) nums +SELECT k FROM (SELECT toNullable(1) as k FROM numbers(1)) nums JOIN (SELECT materialize(1) AS k, number n FROM numbers(100000)) j USING k); SELECT count(1), uniqExact(1) FROM ( -SELECT toNullable(1) as k FROM numbers(1) nums +SELECT k FROM (SELECT toNullable(1) as k FROM numbers(1)) nums JOIN (SELECT 1 AS k, number n FROM numbers(100000)) j USING k); SELECT 'second nullable'; SELECT count(1), uniqExact(1) FROM ( -SELECT materialize(1) as k FROM numbers(1) nums +SELECT k FROM (SELECT materialize(1) as k FROM numbers(1)) nums JOIN (SELECT materialize(toNullable(1)) AS k, number n FROM numbers(100000)) j USING k); SELECT count(1), uniqExact(1) FROM ( -SELECT materialize(1) as k FROM numbers(1) nums +SELECT k FROM (SELECT materialize(1) as k FROM numbers(1)) nums JOIN (SELECT toNullable(1) AS k, number n FROM numbers(100000)) j USING k); SELECT count(1), uniqExact(1) FROM ( -SELECT 1 as k FROM numbers(1) nums +SELECT k FROM (SELECT 1 as k FROM numbers(1)) nums JOIN (SELECT materialize(toNullable(1)) AS k, number n FROM numbers(100000)) j USING k); SELECT count(1), uniqExact(1) FROM ( -SELECT 1 as k FROM numbers(1) nums +SELECT k FROM (SELECT 1 as k FROM numbers(1)) nums JOIN (SELECT toNullable(1) AS k, number n FROM numbers(100000)) j USING k); SELECT 'both nullable'; SELECT count(1), uniqExact(1) FROM ( -SELECT materialize(toNullable(1)) as k FROM numbers(1) nums +SELECT k FROM (SELECT materialize(toNullable(1)) as k FROM numbers(1)) nums JOIN (SELECT materialize(toNullable(1)) AS k, number n FROM numbers(100000)) j USING k); SELECT count(1), uniqExact(1) FROM ( -SELECT materialize(toNullable(1)) as k FROM numbers(1) nums +SELECT k FROM (SELECT materialize(toNullable(1)) as k FROM numbers(1)) nums JOIN (SELECT toNullable(1) AS k, number n FROM numbers(100000)) j USING k); SELECT count(1), uniqExact(1) FROM ( -SELECT toNullable(1) as k FROM numbers(1) nums +SELECT k FROM (SELECT toNullable(1) as k FROM numbers(1)) nums JOIN (SELECT materialize(toNullable(1)) AS k, number n FROM numbers(100000)) j USING k); SELECT count(1), uniqExact(1) FROM ( -SELECT toNullable(1) as k FROM numbers(1) nums +SELECT k FROM (SELECT toNullable(1) as k FROM numbers(1)) nums JOIN (SELECT toNullable(1) AS k, number n FROM numbers(100000)) j USING k); diff --git a/tests/queries/0_stateless/01095_tpch_like_smoke.sql b/tests/queries/0_stateless/01095_tpch_like_smoke.sql index 1ac9ec229f0..7ab57766605 100644 --- a/tests/queries/0_stateless/01095_tpch_like_smoke.sql +++ b/tests/queries/0_stateless/01095_tpch_like_smoke.sql @@ -1,3 +1,5 @@ +SET allow_experimental_analyzer = 1; + DROP TABLE IF EXISTS part; DROP TABLE IF EXISTS supplier; DROP TABLE IF EXISTS partsupp; @@ -180,7 +182,7 @@ order by n_name, s_name, p_partkey -limit 100; -- { serverError 47 } +limit 100; -- { serverError 1 } select 3; select @@ -598,7 +600,7 @@ where lineitem where l_partkey = p_partkey - ); -- { serverError 47 } + ); -- { serverError 1 } select 18; select @@ -709,7 +711,7 @@ where and s_nationkey = n_nationkey and n_name = 'CANADA' order by - s_name; -- { serverError 47 } + s_name; -- { serverError 1 } select 21, 'fail: exists, not exists'; -- TODO -- select diff --git a/tests/queries/0_stateless/01120_join_constants.sql b/tests/queries/0_stateless/01120_join_constants.sql index fdf297f5934..d8c8b5757f8 100644 --- a/tests/queries/0_stateless/01120_join_constants.sql +++ b/tests/queries/0_stateless/01120_join_constants.sql @@ -1,7 +1,7 @@ SELECT t1.*, t2.*, - 'world', + 'world' AS constant, isConstant('world') FROM ( @@ -19,7 +19,7 @@ LEFT JOIN SELECT t1.*, t2.*, - 123, + 123 AS constant, isConstant('world') FROM ( diff --git a/tests/queries/0_stateless/01129_dict_get_join_lose_constness.sql b/tests/queries/0_stateless/01129_dict_get_join_lose_constness.sql index 4f7197dc5ce..fd3e12f7a15 100644 --- a/tests/queries/0_stateless/01129_dict_get_join_lose_constness.sql +++ b/tests/queries/0_stateless/01129_dict_get_join_lose_constness.sql @@ -13,9 +13,9 @@ SOURCE(CLICKHOUSE(HOST 'localhost' PORT tcpPort() USER 'default' PASSWORD '' TAB LIFETIME(0) LAYOUT(hashed()); -SELECT dictGetInt32('system.dict1', 'element_count', toUInt64(dict_key)) AS join_key, +SELECT join_key, toTimeZone(dictGetDateTime('system.dict1', 'loading_start_time', toUInt64(dict_key)), 'UTC') AS datetime -FROM (select 1 AS dict_key) js1 +FROM (select dictGetInt32('system.dict1', 'element_count', toUInt64(dict_key)) AS join_key, 1 AS dict_key) js1 LEFT JOIN (SELECT toInt32(2) AS join_key) js2 USING (join_key) WHERE now() >= datetime; diff --git a/tests/queries/0_stateless/01223_dist_on_dist.sql b/tests/queries/0_stateless/01223_dist_on_dist.sql index 65a240fd48b..4cd8ffd7a03 100644 --- a/tests/queries/0_stateless/01223_dist_on_dist.sql +++ b/tests/queries/0_stateless/01223_dist_on_dist.sql @@ -33,9 +33,9 @@ select 'cluster() GROUP BY ORDER BY'; select * from cluster(test_cluster_two_shards, currentDatabase(), dist_01223) group by key order by key; select 'LEFT JOIN'; -select toInt32(number) key, b.key from numbers(2) a left join (select distinct * from dist_01223) b using key order by b.key; +select a.key, b.key from (SELECT toInt32(number) key from numbers(2)) a left join (select distinct * from dist_01223) b using key order by b.key; select 'RIGHT JOIN'; -select toInt32(number) key, b.key from numbers(2) a right join (select distinct * from dist_01223) b using key order by b.key; +select a.key, b.key from (SELECT toInt32(number) key from numbers(2)) a right join (select distinct * from dist_01223) b using key order by b.key; -- more data for GROUP BY insert into data_01223 select number%3 from numbers(30); diff --git a/tests/queries/0_stateless/01232_untuple.reference b/tests/queries/0_stateless/01232_untuple.reference index 8e1f97d2585..7bb80bf618f 100644 --- a/tests/queries/0_stateless/01232_untuple.reference +++ b/tests/queries/0_stateless/01232_untuple.reference @@ -2,7 +2,7 @@ hello 1 3 world 9 9 (0,1) -key tupleElement(argMax(tuple(v1, v2, v3, v4, v5), v1), 1) tupleElement(argMax(tuple(v1, v2, v3, v4, v5), v1), 2) tupleElement(argMax(tuple(v1, v2, v3, v4, v5), v1), 3) tupleElement(argMax(tuple(v1, v2, v3, v4, v5), v1), 4) tupleElement(argMax(tuple(v1, v2, v3, v4, v5), v1), 5) +key tupleElement(argMax(tuple(v1, v2, v3, v4, v5), v1), \'1\') tupleElement(argMax(tuple(v1, v2, v3, v4, v5), v1), \'2\') tupleElement(argMax(tuple(v1, v2, v3, v4, v5), v1), \'3\') tupleElement(argMax(tuple(v1, v2, v3, v4, v5), v1), \'4\') tupleElement(argMax(tuple(v1, v2, v3, v4, v5), v1), \'5\') 1 20 20 10 20 30 2 11 20 10 20 30 3 70 20 10 20 30 diff --git a/tests/queries/0_stateless/01232_untuple.sql b/tests/queries/0_stateless/01232_untuple.sql index 92150e92b29..ccefd13a772 100644 --- a/tests/queries/0_stateless/01232_untuple.sql +++ b/tests/queries/0_stateless/01232_untuple.sql @@ -1,3 +1,5 @@ +SET allow_experimental_analyzer = 1; + select untuple((* except (b),)) from (select 1 a, 2 b, 3 c); select 'hello', untuple((* except (b),)), 'world' from (select 1 a, 2 b, 3 c); select argMax(untuple(x)) from (select (number, number + 1) as x from numbers(10)); diff --git a/tests/queries/0_stateless/01474_bad_global_join.sql b/tests/queries/0_stateless/01474_bad_global_join.sql index b65b4e804a8..2251c1797cf 100644 --- a/tests/queries/0_stateless/01474_bad_global_join.sql +++ b/tests/queries/0_stateless/01474_bad_global_join.sql @@ -1,5 +1,7 @@ -- Tags: global +SET allow_experimental_analyzer = 1; + DROP TABLE IF EXISTS local_table; DROP TABLE IF EXISTS dist_table; @@ -10,7 +12,7 @@ INSERT INTO local_table SELECT number AS id, toString(number) AS val FROM number CREATE TABLE dist_table AS local_table ENGINE = Distributed('test_cluster_two_shards_localhost', currentDatabase(), local_table); -SELECT uniq(d.val) FROM dist_table AS d GLOBAL LEFT JOIN numbers(100) AS t USING id; -- { serverError 284 } +SELECT uniq(d.val) FROM dist_table AS d GLOBAL LEFT JOIN numbers(100) AS t USING id; -- { serverError 47 } SELECT uniq(d.val) FROM dist_table AS d GLOBAL LEFT JOIN local_table AS t USING id; DROP TABLE local_table; diff --git a/tests/queries/0_stateless/01671_merge_join_and_constants.reference b/tests/queries/0_stateless/01671_merge_join_and_constants.reference index efd814df893..f82033ab3c7 100644 --- a/tests/queries/0_stateless/01671_merge_join_and_constants.reference +++ b/tests/queries/0_stateless/01671_merge_join_and_constants.reference @@ -1,6 +1,6 @@ -┌─a─┬──────────b─┬─c─┬──────────d─┬─t2.'0.10'─┐ -│ a │ 2018-01-01 │ │ 1970-01-01 │ │ -│ b │ 2018-01-01 │ B │ 2018-01-01 │ 0.10 │ -│ c │ 2018-01-01 │ C │ 2018-01-01 │ 0.10 │ -└───┴────────────┴───┴────────────┴───────────┘ +┌─a─┬──────────b─┬─c─┬──────────d─┬─'0.10'─┬─c─┐ +│ a │ 2018-01-01 │ │ 1970-01-01 │ │ │ +│ b │ 2018-01-01 │ B │ 2018-01-01 │ 0.10 │ B │ +│ c │ 2018-01-01 │ C │ 2018-01-01 │ 0.10 │ C │ +└───┴────────────┴───┴────────────┴────────┴───┘ \N \N \N \N 0 0 diff --git a/tests/queries/0_stateless/01671_merge_join_and_constants.sql b/tests/queries/0_stateless/01671_merge_join_and_constants.sql index e9a60f11875..5cabd6f7f06 100644 --- a/tests/queries/0_stateless/01671_merge_join_and_constants.sql +++ b/tests/queries/0_stateless/01671_merge_join_and_constants.sql @@ -1,3 +1,5 @@ +SET allow_experimental_analyzer = 1; + DROP TABLE IF EXISTS table1; DROP TABLE IF EXISTS table2; diff --git a/tests/queries/0_stateless/01890_cross_join_explain_crash.reference b/tests/queries/0_stateless/01890_cross_join_explain_crash.reference index 76315843adb..c08ba9c71b3 100644 --- a/tests/queries/0_stateless/01890_cross_join_explain_crash.reference +++ b/tests/queries/0_stateless/01890_cross_join_explain_crash.reference @@ -1,3 +1,4 @@ +1 1 1 2 1 1 1 2 1 1 1 2 diff --git a/tests/queries/0_stateless/01890_cross_join_explain_crash.sql b/tests/queries/0_stateless/01890_cross_join_explain_crash.sql index 20a1956ea6b..bb2bc606870 100644 --- a/tests/queries/0_stateless/01890_cross_join_explain_crash.sql +++ b/tests/queries/0_stateless/01890_cross_join_explain_crash.sql @@ -1,8 +1,7 @@ +SET allow_experimental_analyzer = 1; SET joined_subquery_requires_alias = 0; -select * FROM (SELECT 1), (SELECT 1), (SELECT 1); -- { serverError 352 } --- This queries work by luck. --- Feel free to remove then if it is the only failed test. +select * FROM (SELECT 1), (SELECT 1), (SELECT 1); select * from (select 2), (select 1) as a, (select 1) as b; select * from (select 1) as a, (select 2), (select 1) as b; select * from (select 1) as a, (select 1) as b, (select 2); diff --git a/tests/queries/0_stateless/02002_global_subqueries_subquery_or_table_name.sql b/tests/queries/0_stateless/02002_global_subqueries_subquery_or_table_name.sql index 7d9c08c7cb6..75eff67970e 100644 --- a/tests/queries/0_stateless/02002_global_subqueries_subquery_or_table_name.sql +++ b/tests/queries/0_stateless/02002_global_subqueries_subquery_or_table_name.sql @@ -1,7 +1,9 @@ -- Tags: global +SET allow_experimental_analyzer = 1; + SELECT cityHash64(number GLOBAL IN (NULL, -2147483648, -9223372036854775808), nan, 1024, NULL, NULL, 1.000100016593933, NULL), (NULL, cityHash64(inf, -2147483648, NULL, NULL, 10.000100135803223), cityHash64(1.1754943508222875e-38, NULL, NULL, NULL), 2147483647) FROM cluster(test_cluster_two_shards_localhost, numbers((NULL, cityHash64(0., 65536, NULL, NULL, 10000000000., NULL), 0) GLOBAL IN (some_identifier), 65536)) -WHERE number GLOBAL IN [1025] --{serverError 284} +WHERE number GLOBAL IN [1025] --{serverError 36} diff --git a/tests/queries/0_stateless/02116_tuple_element.sql b/tests/queries/0_stateless/02116_tuple_element.sql index 4ce6e5cf136..b43c9133e6b 100644 --- a/tests/queries/0_stateless/02116_tuple_element.sql +++ b/tests/queries/0_stateless/02116_tuple_element.sql @@ -1,3 +1,5 @@ +SET allow_experimental_analyzer = 1; + DROP TABLE IF EXISTS t_tuple_element; CREATE TABLE t_tuple_element(t1 Tuple(a UInt32, s String), t2 Tuple(UInt32, String)) ENGINE = Memory; @@ -16,7 +18,7 @@ EXPLAIN SYNTAX SELECT tupleElement(t1, 'a') FROM t_tuple_element; SELECT tupleElement(number, 1) FROM numbers(1); -- { serverError 43 } SELECT tupleElement(t1) FROM t_tuple_element; -- { serverError 42 } -SELECT tupleElement(t1, 'b') FROM t_tuple_element; -- { serverError 47 } +SELECT tupleElement(t1, 'b') FROM t_tuple_element; -- { serverError 10 } SELECT tupleElement(t1, 0) FROM t_tuple_element; -- { serverError 127 } SELECT tupleElement(t1, 3) FROM t_tuple_element; -- { serverError 127 } SELECT tupleElement(t1, materialize('a')) FROM t_tuple_element; -- { serverError 43 } @@ -28,7 +30,7 @@ SELECT tupleElement(t2, 1) FROM t_tuple_element; EXPLAIN SYNTAX SELECT tupleElement(t2, 1) FROM t_tuple_element; SELECT tupleElement(t2) FROM t_tuple_element; -- { serverError 42 } -SELECT tupleElement(t2, 'a') FROM t_tuple_element; -- { serverError 47 } +SELECT tupleElement(t2, 'a') FROM t_tuple_element; -- { serverError 10 } SELECT tupleElement(t2, 0) FROM t_tuple_element; -- { serverError 127 } SELECT tupleElement(t2, 3) FROM t_tuple_element; -- { serverError 127 } SELECT tupleElement(t2, materialize(1)) FROM t_tuple_element; -- { serverError 43 } diff --git a/tests/queries/0_stateless/02136_scalar_read_rows_json.reference b/tests/queries/0_stateless/02136_scalar_read_rows_json.reference index 49020a4432f..f8335125233 100644 --- a/tests/queries/0_stateless/02136_scalar_read_rows_json.reference +++ b/tests/queries/0_stateless/02136_scalar_read_rows_json.reference @@ -30,7 +30,7 @@ "meta": [ { - "type": "Tuple(UInt64, UInt64)" + "type": "Tuple(`max(number)` UInt64, `count(number)` UInt64)" } ], diff --git a/tests/queries/0_stateless/02136_scalar_read_rows_json.sh b/tests/queries/0_stateless/02136_scalar_read_rows_json.sh index 34b4b6909b5..1fe345d266d 100755 --- a/tests/queries/0_stateless/02136_scalar_read_rows_json.sh +++ b/tests/queries/0_stateless/02136_scalar_read_rows_json.sh @@ -7,4 +7,4 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) echo "#1" ${CLICKHOUSE_CLIENT} --query='SELECT count() FROM numbers(100) FORMAT JSON;' | grep -a -v "elapsed" echo "#2" -${CLICKHOUSE_CLIENT} --query='SELECT (SELECT max(number), count(number) FROM numbers(100000) as n) SETTINGS max_block_size = 65505 FORMAT JSON;' | grep -a -v "elapsed" | grep -v "_subquery" +${CLICKHOUSE_CLIENT} --query='SELECT (SELECT max(number), count(number) FROM numbers(100000) as n) SETTINGS max_block_size = 65505, allow_experimental_analyzer = 1 FORMAT JSON;' | grep -a -v "elapsed" | grep -v "_subquery" diff --git a/tests/queries/0_stateless/02154_dictionary_get_http_json.reference b/tests/queries/0_stateless/02154_dictionary_get_http_json.reference index 7106f551cd7..201d3b122e8 100644 --- a/tests/queries/0_stateless/02154_dictionary_get_http_json.reference +++ b/tests/queries/0_stateless/02154_dictionary_get_http_json.reference @@ -3,11 +3,11 @@ "meta": [ { - "name": "dictGet(02154_test_dictionary, 'value', toUInt64(0))", + "name": "dictGet('02154_test_dictionary', 'value', toUInt64(0))", "type": "String" }, { - "name": "dictGet(02154_test_dictionary, 'value', toUInt64(1))", + "name": "dictGet('02154_test_dictionary', 'value', toUInt64(1))", "type": "String" } ], @@ -15,8 +15,8 @@ "data": [ { - "dictGet(02154_test_dictionary, 'value', toUInt64(0))": "Value", - "dictGet(02154_test_dictionary, 'value', toUInt64(1))": "" + "dictGet('02154_test_dictionary', 'value', toUInt64(0))": "Value", + "dictGet('02154_test_dictionary', 'value', toUInt64(1))": "" } ], diff --git a/tests/queries/0_stateless/02154_dictionary_get_http_json.sh b/tests/queries/0_stateless/02154_dictionary_get_http_json.sh index a2bce866c76..fbaf67fff2f 100755 --- a/tests/queries/0_stateless/02154_dictionary_get_http_json.sh +++ b/tests/queries/0_stateless/02154_dictionary_get_http_json.sh @@ -32,6 +32,7 @@ $CLICKHOUSE_CLIENT -q """ echo """ SELECT dictGet(02154_test_dictionary, 'value', toUInt64(0)), dictGet(02154_test_dictionary, 'value', toUInt64(1)) + SETTINGS allow_experimental_analyzer = 1 FORMAT JSON """ | ${CLICKHOUSE_CURL} -sSg "${CLICKHOUSE_URL}&wait_end_of_query=1&output_format_write_statistics=0" -d @- diff --git a/tests/queries/0_stateless/02163_operators.sql b/tests/queries/0_stateless/02163_operators.sql index 4968e448ab2..b2414bb197e 100644 --- a/tests/queries/0_stateless/02163_operators.sql +++ b/tests/queries/0_stateless/02163_operators.sql @@ -1,2 +1,2 @@ WITH 2 AS `b.c`, [4, 5] AS a, 6 AS u, 3 AS v, 2 AS d, TRUE AS e, 1 AS f, 0 AS g, 2 AS h, 'Hello' AS i, 'World' AS j, TIMESTAMP '2022-02-02 02:02:02' AS w, [] AS k, (1, 2) AS l, 2 AS m, 3 AS n, [] AS o, [1] AS p, 1 AS q, q AS r, 1 AS s, 1 AS t -SELECT INTERVAL CASE CASE WHEN NOT -a[b.c] * u DIV v + d IS NOT NULL AND e OR f BETWEEN g AND h THEN i ELSE j END WHEN w THEN k END || [l, (m, n)] MINUTE IS NULL OR NOT o::Array(INT) = p <> q < r > s != t AS upyachka; +SELECT INTERVAL CASE CASE WHEN NOT -a[`b.c`] * u DIV v + d IS NOT NULL AND e OR f BETWEEN g AND h THEN i ELSE j END WHEN w THEN k END || [l, (m, n)] MINUTE IS NULL OR NOT o::Array(INT) = p <> q < r > s != t AS upyachka; diff --git a/tests/queries/0_stateless/02234_clickhouse_local_test_mode.sh b/tests/queries/0_stateless/02234_clickhouse_local_test_mode.sh index f736751726d..16200399099 100755 --- a/tests/queries/0_stateless/02234_clickhouse_local_test_mode.sh +++ b/tests/queries/0_stateless/02234_clickhouse_local_test_mode.sh @@ -5,5 +5,5 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) . "$CURDIR"/../shell_config.sh -$CLICKHOUSE_LOCAL --query="SELECT n" 2>&1 | grep -q "Code: 47. DB::Exception: Missing columns:" && echo 'OK' || echo 'FAIL' ||: +$CLICKHOUSE_LOCAL --query="SELECT n SETTINGS allow_experimental_analyzer = 1" 2>&1 | grep -q "Code: 47. DB::Exception:" && echo 'OK' || echo 'FAIL' ||: $CLICKHOUSE_LOCAL --query="SELECT n -- { serverError 47 }" diff --git a/tests/queries/0_stateless/02271_fix_column_matcher_and_column_transformer.sql b/tests/queries/0_stateless/02271_fix_column_matcher_and_column_transformer.sql index f0c0e2bae46..245b2cc97e3 100644 --- a/tests/queries/0_stateless/02271_fix_column_matcher_and_column_transformer.sql +++ b/tests/queries/0_stateless/02271_fix_column_matcher_and_column_transformer.sql @@ -1,3 +1,5 @@ +SET allow_experimental_analyzer = 1; + DROP TABLE IF EXISTS github_events; CREATE TABLE github_events @@ -59,6 +61,6 @@ CREATE TABLE github_events ) ENGINE = MergeTree ORDER BY (event_type, repo_name, created_at); -with top_repos as ( select repo_name from github_events where event_type = 'WatchEvent' and toDate(created_at) = today() - 1 group by repo_name order by count() desc limit 100 union distinct select repo_name from github_events where event_type = 'WatchEvent' and toMonday(created_at) = toMonday(today() - interval 1 week) group by repo_name order by count() desc limit 100 union distinct select repo_name from github_events where event_type = 'WatchEvent' and toStartOfMonth(created_at) = toStartOfMonth(today()) - interval 1 month group by repo_name order by count() desc limit 100 union distinct select repo_name from github_events where event_type = 'WatchEvent' and toYear(created_at) = toYear(today()) - 1 group by repo_name order by count() desc limit 100 ), last_day as ( select repo_name, count() as count_last_day, rowNumberInAllBlocks() + 1 as position_last_day from github_events where repo_name in (select repo_name from top_repos) and toDate(created_at) = today() - 1 group by repo_name order by count_last_day desc ), last_week as ( select repo_name, count() as count_last_week, rowNumberInAllBlocks() + 1 as position_last_week from github_events where repo_name in (select repo_name from top_repos) and toMonday(created_at) = toMonday(today()) - interval 1 week group by repo_name order by count_last_week desc ), last_month as ( select repo_name, count() as count_last_month, rowNumberInAllBlocks() + 1 as position_last_month from github_events where repo_name in (select repo_name from top_repos) and toStartOfMonth(created_at) = toStartOfMonth(today()) - interval 1 month group by repo_name order by count_last_month desc ) select d.repo_name, columns(count) from last_day d join last_week w on d.repo_name = w.repo_name join last_month m on d.repo_name = m.repo_name FORMAT TabSeparatedWithNamesAndTypes; -- { serverError 47 } +with top_repos as ( select repo_name from github_events where event_type = 'WatchEvent' and toDate(created_at) = today() - 1 group by repo_name order by count() desc limit 100 union distinct select repo_name from github_events where event_type = 'WatchEvent' and toMonday(created_at) = toMonday(today() - interval 1 week) group by repo_name order by count() desc limit 100 union distinct select repo_name from github_events where event_type = 'WatchEvent' and toStartOfMonth(created_at) = toStartOfMonth(today()) - interval 1 month group by repo_name order by count() desc limit 100 union distinct select repo_name from github_events where event_type = 'WatchEvent' and toYear(created_at) = toYear(today()) - 1 group by repo_name order by count() desc limit 100 ), last_day as ( select repo_name, count() as count_last_day, rowNumberInAllBlocks() + 1 as position_last_day from github_events where repo_name in (select repo_name from top_repos) and toDate(created_at) = today() - 1 group by repo_name order by count_last_day desc ), last_week as ( select repo_name, count() as count_last_week, rowNumberInAllBlocks() + 1 as position_last_week from github_events where repo_name in (select repo_name from top_repos) and toMonday(created_at) = toMonday(today()) - interval 1 week group by repo_name order by count_last_week desc ), last_month as ( select repo_name, count() as count_last_month, rowNumberInAllBlocks() + 1 as position_last_month from github_events where repo_name in (select repo_name from top_repos) and toStartOfMonth(created_at) = toStartOfMonth(today()) - interval 1 month group by repo_name order by count_last_month desc ) select d.repo_name, columns(count) from last_day d join last_week w on d.repo_name = w.repo_name join last_month m on d.repo_name = m.repo_name; DROP TABLE github_events; diff --git a/tests/queries/0_stateless/02337_multiple_joins_original_names.reference b/tests/queries/0_stateless/02337_multiple_joins_original_names.reference index 6ed281c757a..e8183f05f5d 100644 --- a/tests/queries/0_stateless/02337_multiple_joins_original_names.reference +++ b/tests/queries/0_stateless/02337_multiple_joins_original_names.reference @@ -1,2 +1,3 @@ 1 1 +1 diff --git a/tests/queries/0_stateless/02337_multiple_joins_original_names.sql b/tests/queries/0_stateless/02337_multiple_joins_original_names.sql index afafee9f8eb..63bbfe6873d 100644 --- a/tests/queries/0_stateless/02337_multiple_joins_original_names.sql +++ b/tests/queries/0_stateless/02337_multiple_joins_original_names.sql @@ -1,11 +1,13 @@ -- https://github.com/ClickHouse/ClickHouse/issues/34697 +SET allow_experimental_analyzer = 1; + SELECT table1_id FROM ( SELECT first.table1_id FROM (SELECT number+1 as table1_id FROM numbers(1)) as first JOIN (SELECT number+1 as table2_id FROM numbers(1)) as second ON first.table1_id = second.table2_id JOIN (SELECT number+1 as table3_id FROM numbers(1)) as third ON first.table1_id = third.table3_id -); -- { serverError UNKNOWN_IDENTIFIER } +); SELECT table1_id FROM ( SELECT first.table1_id diff --git a/tests/queries/0_stateless/02497_if_transform_strings_to_enum.reference b/tests/queries/0_stateless/02497_if_transform_strings_to_enum.reference index c6265e195c4..f5284f38b86 100644 --- a/tests/queries/0_stateless/02497_if_transform_strings_to_enum.reference +++ b/tests/queries/0_stateless/02497_if_transform_strings_to_enum.reference @@ -37,7 +37,7 @@ QUERY id: 0 JOIN TREE TABLE id: 7, table_name: system.numbers LIMIT - CONSTANT id: 17, constant_value: UInt64_10, constant_value_type: UInt8 + CONSTANT id: 17, constant_value: UInt64_10, constant_value_type: UInt64 google google google @@ -80,7 +80,7 @@ QUERY id: 0 JOIN TREE TABLE id: 9, table_name: system.numbers LIMIT - CONSTANT id: 19, constant_value: UInt64_10, constant_value_type: UInt8 + CONSTANT id: 19, constant_value: UInt64_10, constant_value_type: UInt64 other1 other1 google1 @@ -124,7 +124,7 @@ QUERY id: 0 JOIN TREE TABLE id: 9, table_name: system.numbers LIMIT - CONSTANT id: 20, constant_value: UInt64_10, constant_value_type: UInt8 + CONSTANT id: 20, constant_value: UInt64_10, constant_value_type: UInt64 google1 google1 google1 @@ -171,7 +171,7 @@ QUERY id: 0 JOIN TREE TABLE id: 11, table_name: system.numbers LIMIT - CONSTANT id: 22, constant_value: UInt64_10, constant_value_type: UInt8 + CONSTANT id: 22, constant_value: UInt64_10, constant_value_type: UInt64 google google google @@ -225,7 +225,7 @@ QUERY id: 0 JOIN TREE TABLE id: 12, table_name: system.numbers LIMIT - CONSTANT id: 22, constant_value: UInt64_10, constant_value_type: UInt8 + CONSTANT id: 22, constant_value: UInt64_10, constant_value_type: UInt64 other other google @@ -276,7 +276,7 @@ QUERY id: 0 JOIN TREE TABLE id: 10, table_name: system.numbers LIMIT - CONSTANT id: 20, constant_value: UInt64_10, constant_value_type: UInt8 + CONSTANT id: 20, constant_value: UInt64_10, constant_value_type: UInt64 google google google google google google @@ -343,7 +343,7 @@ QUERY id: 0 JOIN TREE TABLE id: 9, table_name: system.numbers LIMIT - CONSTANT id: 19, constant_value: UInt64_10, constant_value_type: UInt8 + CONSTANT id: 19, constant_value: UInt64_10, constant_value_type: UInt64 other other other other google google @@ -404,7 +404,7 @@ QUERY id: 0 JOIN TREE TABLE id: 7, table_name: system.numbers LIMIT - CONSTANT id: 17, constant_value: UInt64_10, constant_value_type: UInt8 + CONSTANT id: 17, constant_value: UInt64_10, constant_value_type: UInt64 \N \N \N @@ -444,7 +444,7 @@ QUERY id: 0 JOIN TREE TABLE id: 11, table_name: system.numbers LIMIT - CONSTANT id: 12, constant_value: UInt64_10, constant_value_type: UInt8 + CONSTANT id: 12, constant_value: UInt64_10, constant_value_type: UInt64 \N \N \N @@ -473,7 +473,7 @@ QUERY id: 0 JOIN TREE TABLE id: 5, table_name: system.numbers LIMIT - CONSTANT id: 9, constant_value: UInt64_10, constant_value_type: UInt8 + CONSTANT id: 9, constant_value: UInt64_10, constant_value_type: UInt64 other other google @@ -502,7 +502,7 @@ QUERY id: 0 JOIN TREE TABLE id: 5, table_name: system.numbers LIMIT - CONSTANT id: 9, constant_value: UInt64_10, constant_value_type: UInt8 + CONSTANT id: 9, constant_value: UInt64_10, constant_value_type: UInt64 google google google @@ -534,4 +534,4 @@ QUERY id: 0 JOIN TREE TABLE id: 7, table_name: system.numbers LIMIT - CONSTANT id: 11, constant_value: UInt64_10, constant_value_type: UInt8 + CONSTANT id: 11, constant_value: UInt64_10, constant_value_type: UInt64 From 6209d13ad535f24b079c6b2a9d29dcea0dbc242b Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Tue, 21 Feb 2023 21:50:24 +0100 Subject: [PATCH 372/841] Analyzer support _shardNum column to shardNum() function rewrite --- src/Analyzer/Passes/QueryAnalysisPass.cpp | 21 +++++- .../Passes/ShardNumColumnToFunctionPass.cpp | 67 +++++++++++++++++++ .../Passes/ShardNumColumnToFunctionPass.h | 21 ++++++ src/Analyzer/QueryTreePassManager.cpp | 5 +- src/Functions/getScalar.cpp | 7 +- .../01018_Distributed__shard_num.reference | 2 +- .../01018_Distributed__shard_num.sql | 3 +- .../0_stateless/02163_shard_num.reference | 5 +- tests/queries/0_stateless/02163_shard_num.sql | 9 ++- 9 files changed, 129 insertions(+), 11 deletions(-) create mode 100644 src/Analyzer/Passes/ShardNumColumnToFunctionPass.cpp create mode 100644 src/Analyzer/Passes/ShardNumColumnToFunctionPass.h diff --git a/src/Analyzer/Passes/QueryAnalysisPass.cpp b/src/Analyzer/Passes/QueryAnalysisPass.cpp index 0e47aec7c20..147c0660bc2 100644 --- a/src/Analyzer/Passes/QueryAnalysisPass.cpp +++ b/src/Analyzer/Passes/QueryAnalysisPass.cpp @@ -4928,11 +4928,15 @@ ProjectionNames QueryAnalyzer::resolveFunction(QueryTreeNodePtr & node, Identifi { auto function_base = function->build(argument_columns); + /// Do not constant fold get scalar functions + bool is_get_scalar_function = function_name == "__getScalar" || function_name == "shardNum" || + function_name == "shardCount"; + /** If function is suitable for constant folding try to convert it to constant. * Example: SELECT plus(1, 1); * Result: SELECT 2; */ - if (function_base->isSuitableForConstantFolding()) + if (function_base->isSuitableForConstantFolding() && !is_get_scalar_function) { auto result_type = function_base->getResultType(); auto executable_function = function_base->prepare(argument_columns); @@ -6247,6 +6251,21 @@ void QueryAnalyzer::resolveQueryJoinTreeNode(QueryTreeNodePtr & join_tree_node, { validateTableExpressionModifiers(join_tree_node, scope); initializeTableExpressionData(join_tree_node, scope); + + auto & query_node = scope.scope_node->as(); + auto & mutable_context = query_node.getMutableContext(); + + if (!mutable_context->isDistributed()) + { + bool is_distributed = false; + + if (auto * table_node = join_tree_node->as()) + is_distributed = table_node->getStorage()->isRemote(); + else if (auto * table_function_node = join_tree_node->as()) + is_distributed = table_function_node->getStorage()->isRemote(); + + mutable_context->setDistributed(is_distributed); + } } auto add_table_expression_alias_into_scope = [&](const QueryTreeNodePtr & table_expression_node) diff --git a/src/Analyzer/Passes/ShardNumColumnToFunctionPass.cpp b/src/Analyzer/Passes/ShardNumColumnToFunctionPass.cpp new file mode 100644 index 00000000000..b28816e8ff3 --- /dev/null +++ b/src/Analyzer/Passes/ShardNumColumnToFunctionPass.cpp @@ -0,0 +1,67 @@ +#include + +#include + +#include + +#include + +#include +#include +#include +#include +#include + +namespace DB +{ + +namespace +{ + +class ShardNumColumnToFunctionVisitor : public InDepthQueryTreeVisitorWithContext +{ +public: + using Base = InDepthQueryTreeVisitorWithContext; + using Base::Base; + + void visitImpl(QueryTreeNodePtr & node) const + { + auto * column_node = node->as(); + if (!column_node) + return; + + const auto & column = column_node->getColumn(); + if (column.name != "_shard_num") + return; + + auto column_source = column_node->getColumnSource(); + + auto * table_node = column_source->as(); + auto * table_function_node = column_source->as(); + if (!table_node && !table_function_node) + return; + + const auto & storage = table_node ? table_node->getStorage() : table_function_node->getStorage(); + if (!storage->isRemote()) + return; + + const auto & storage_snapshot = table_node ? table_node->getStorageSnapshot() : table_function_node->getStorageSnapshot(); + if (!storage->isVirtualColumn(column.name, storage_snapshot->getMetadataForQuery())) + return; + + auto function_node = std::make_shared("shardNum"); + auto function = FunctionFactory::instance().get(function_node->getFunctionName(), getContext()); + function_node->resolveAsFunction(function->build(function_node->getArgumentColumns())); + node = std::move(function_node); + } +}; + +} + +void ShardNumColumnToFunctionPass::run(QueryTreeNodePtr query_tree_node, ContextPtr context) +{ + ShardNumColumnToFunctionVisitor visitor(context); + visitor.visit(query_tree_node); +} + +} diff --git a/src/Analyzer/Passes/ShardNumColumnToFunctionPass.h b/src/Analyzer/Passes/ShardNumColumnToFunctionPass.h new file mode 100644 index 00000000000..83b974954fa --- /dev/null +++ b/src/Analyzer/Passes/ShardNumColumnToFunctionPass.h @@ -0,0 +1,21 @@ +#pragma once + +#include + +namespace DB +{ + +/** Rewrite _shard_num column into shardNum() function. + */ +class ShardNumColumnToFunctionPass final : public IQueryTreePass +{ +public: + String getName() override { return "ShardNumColumnToFunctionPass"; } + + String getDescription() override { return "Rewrite _shard_num column into shardNum() function"; } + + void run(QueryTreeNodePtr query_tree_node, ContextPtr context) override; + +}; + +} diff --git a/src/Analyzer/QueryTreePassManager.cpp b/src/Analyzer/QueryTreePassManager.cpp index 9ba18e27f73..dfac2f499dd 100644 --- a/src/Analyzer/QueryTreePassManager.cpp +++ b/src/Analyzer/QueryTreePassManager.cpp @@ -40,6 +40,7 @@ #include #include #include +#include namespace DB @@ -147,7 +148,6 @@ private: /** ClickHouse query tree pass manager. * - * TODO: Support _shard_num into shardNum() rewriting. * TODO: Support logical expressions optimizer. * TODO: Support setting convert_query_to_cnf. * TODO: Support setting optimize_using_constraints. @@ -266,10 +266,9 @@ void addQueryTreePasses(QueryTreePassManager & manager) manager.addPass(std::make_unique()); manager.addPass(std::make_unique()); - manager.addPass(std::make_unique()); - manager.addPass(std::make_unique()); + manager.addPass(std::make_unique()); } } diff --git a/src/Functions/getScalar.cpp b/src/Functions/getScalar.cpp index 1a26ac5f4da..d72c84b8528 100644 --- a/src/Functions/getScalar.cpp +++ b/src/Functions/getScalar.cpp @@ -121,7 +121,12 @@ public: ColumnPtr executeImpl(const ColumnsWithTypeAndName &, const DataTypePtr &, size_t input_rows_count) const override { - return ColumnConst::create(scalar.column, input_rows_count); + auto result = ColumnConst::create(scalar.column, input_rows_count); + + if (!isSuitableForConstantFolding()) + return result->convertToFullColumnIfConst(); + + return result; } private: diff --git a/tests/queries/0_stateless/01018_Distributed__shard_num.reference b/tests/queries/0_stateless/01018_Distributed__shard_num.reference index 46963a006ec..e50ae93402b 100644 --- a/tests/queries/0_stateless/01018_Distributed__shard_num.reference +++ b/tests/queries/0_stateless/01018_Distributed__shard_num.reference @@ -85,7 +85,7 @@ SELECT a._shard_num, a.key, b.host_name, b.host_address IN ('::1', '127.0.0.1'), FROM dist_1 a JOIN system.clusters b ON a._shard_num = b.shard_num -WHERE b.cluster = 'test_cluster_two_shards_localhost'; -- { serverError 47; } +WHERE b.cluster = 'test_cluster_two_shards_localhost'; -- { serverError 403 } SELECT 'dist_3'; dist_3 SELECT * FROM dist_3; diff --git a/tests/queries/0_stateless/01018_Distributed__shard_num.sql b/tests/queries/0_stateless/01018_Distributed__shard_num.sql index d3f4e1ac527..ce522227006 100644 --- a/tests/queries/0_stateless/01018_Distributed__shard_num.sql +++ b/tests/queries/0_stateless/01018_Distributed__shard_num.sql @@ -2,6 +2,7 @@ -- make the order static SET max_threads = 1; +SET allow_experimental_analyzer = 1; DROP TABLE IF EXISTS mem1; DROP TABLE IF EXISTS mem2; @@ -79,7 +80,7 @@ SELECT a._shard_num, a.key, b.host_name, b.host_address IN ('::1', '127.0.0.1'), FROM dist_1 a JOIN system.clusters b ON a._shard_num = b.shard_num -WHERE b.cluster = 'test_cluster_two_shards_localhost'; -- { serverError 47; } +WHERE b.cluster = 'test_cluster_two_shards_localhost'; -- { serverError 403 } SELECT 'dist_3'; SELECT * FROM dist_3; diff --git a/tests/queries/0_stateless/02163_shard_num.reference b/tests/queries/0_stateless/02163_shard_num.reference index a109d5d2b6b..f93803789a1 100644 --- a/tests/queries/0_stateless/02163_shard_num.reference +++ b/tests/queries/0_stateless/02163_shard_num.reference @@ -1,4 +1,5 @@ --- { echo } +-- { echoOn } + SELECT shardNum() AS shard_num, sum(1) as rows FROM remote('127.{1,2}', system, one) GROUP BY _shard_num; 2 1 1 1 @@ -14,4 +15,4 @@ SELECT _shard_num AS shard_num, sum(1) as rows FROM remote('127.{1,2}', system, SELECT a._shard_num AS shard_num, sum(1) as rows FROM remote('127.{1,2}', system, one) a GROUP BY shard_num; 2 1 1 1 -SELECT _shard_num FROM remote('127.1', system.one) AS a INNER JOIN (SELECT _shard_num FROM system.one) AS b USING (dummy); -- { serverError UNKNOWN_IDENTIFIER } +SELECT _shard_num FROM remote('127.1', system.one) AS a INNER JOIN (SELECT _shard_num FROM system.one) AS b USING (dummy); -- { serverError UNSUPPORTED_METHOD } diff --git a/tests/queries/0_stateless/02163_shard_num.sql b/tests/queries/0_stateless/02163_shard_num.sql index 27d40b3c976..65a2a8ca7c2 100644 --- a/tests/queries/0_stateless/02163_shard_num.sql +++ b/tests/queries/0_stateless/02163_shard_num.sql @@ -1,7 +1,12 @@ --- { echo } +SET allow_experimental_analyzer = 1; + +-- { echoOn } + SELECT shardNum() AS shard_num, sum(1) as rows FROM remote('127.{1,2}', system, one) GROUP BY _shard_num; SELECT shardNum() AS shard_num, sum(1) as rows FROM remote('127.{1,2}', system, one) GROUP BY shard_num; SELECT _shard_num AS shard_num, sum(1) as rows FROM remote('127.{1,2}', system, one) GROUP BY _shard_num; SELECT _shard_num AS shard_num, sum(1) as rows FROM remote('127.{1,2}', system, one) GROUP BY shard_num; SELECT a._shard_num AS shard_num, sum(1) as rows FROM remote('127.{1,2}', system, one) a GROUP BY shard_num; -SELECT _shard_num FROM remote('127.1', system.one) AS a INNER JOIN (SELECT _shard_num FROM system.one) AS b USING (dummy); -- { serverError UNKNOWN_IDENTIFIER } +SELECT _shard_num FROM remote('127.1', system.one) AS a INNER JOIN (SELECT _shard_num FROM system.one) AS b USING (dummy); -- { serverError UNSUPPORTED_METHOD } + +-- { echoOff } From bff55d5b2a493d1041f26edfacf0cde6ffa319e0 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Tue, 21 Feb 2023 21:51:48 +0100 Subject: [PATCH 373/841] Planner table expression data column order fix --- src/Planner/PlannerJoinTree.cpp | 2 +- src/Planner/TableExpressionData.h | 31 ++++---- .../02514_analyzer_drop_join_on.reference | 72 +++++++++---------- 3 files changed, 52 insertions(+), 53 deletions(-) diff --git a/src/Planner/PlannerJoinTree.cpp b/src/Planner/PlannerJoinTree.cpp index 02c396542b1..a890780659c 100644 --- a/src/Planner/PlannerJoinTree.cpp +++ b/src/Planner/PlannerJoinTree.cpp @@ -259,7 +259,7 @@ JoinTreeQueryPlan buildQueryPlanForTableExpression(const QueryTreeNodePtr & tabl from_stage = storage->getQueryProcessingStage(query_context, select_query_options.to_stage, storage_snapshot, table_expression_query_info); - Names columns_names = table_expression_data.getColumnNames(); + auto columns_names = table_expression_data.getColumnNames(); /** The current user must have the SELECT privilege. * We do not check access rights for table functions because they have been already checked in ITableFunction::execute(). diff --git a/src/Planner/TableExpressionData.h b/src/Planner/TableExpressionData.h index 6b4a9b4748d..e828f128e38 100644 --- a/src/Planner/TableExpressionData.h +++ b/src/Planner/TableExpressionData.h @@ -63,9 +63,7 @@ public: if (hasColumn(column.name)) throw Exception(ErrorCodes::LOGICAL_ERROR, "Column with name {} already exists"); - column_name_to_column.emplace(column.name, column); - column_name_to_column_identifier.emplace(column.name, column_identifier); - column_identifier_to_column_name.emplace(column_identifier, column.name); + addColumnImpl(column, column_identifier); } /** Add column if it does not exists in table expression data. @@ -76,9 +74,7 @@ public: if (hasColumn(column.name)) return; - column_name_to_column.emplace(column.name, column); - column_name_to_column_identifier.emplace(column.name, column_identifier); - column_identifier_to_column_name.emplace(column_identifier, column.name); + addColumnImpl(column, column_identifier); } /// Add alias column name @@ -100,15 +96,9 @@ public: } /// Get column names - Names getColumnNames() const + const Names & getColumnNames() const { - Names result; - result.reserve(column_name_to_column.size()); - - for (const auto & [column_name, _] : column_name_to_column) - result.push_back(column_name); - - return result; + return column_names; } ColumnIdentifiers getColumnIdentifiers() const @@ -142,7 +132,6 @@ public: auto it = column_name_to_column.find(column_name); if (it == column_name_to_column.end()) { - auto column_names = getColumnNames(); throw Exception(ErrorCodes::LOGICAL_ERROR, "Column for column name {} does not exists. There are only column names: {}", column_name, @@ -172,7 +161,6 @@ public: auto it = column_name_to_column_identifier.find(column_name); if (it == column_name_to_column_identifier.end()) { - auto column_names = getColumnNames(); throw Exception(ErrorCodes::LOGICAL_ERROR, "Column identifier for column name {} does not exists. There are only column names: {}", column_name, @@ -240,6 +228,17 @@ public: } private: + void addColumnImpl(const NameAndTypePair & column, const ColumnIdentifier & column_identifier) + { + column_names.push_back(column.name); + column_name_to_column.emplace(column.name, column); + column_name_to_column_identifier.emplace(column.name, column_identifier); + column_identifier_to_column_name.emplace(column_identifier, column.name); + } + + /// Valid for table, table function, array join, query, union nodes + Names column_names; + /// Valid for table, table function, array join, query, union nodes ColumnNameToColumn column_name_to_column; diff --git a/tests/queries/0_stateless/02514_analyzer_drop_join_on.reference b/tests/queries/0_stateless/02514_analyzer_drop_join_on.reference index 0f6fa7e2e66..af6f07e3f95 100644 --- a/tests/queries/0_stateless/02514_analyzer_drop_join_on.reference +++ b/tests/queries/0_stateless/02514_analyzer_drop_join_on.reference @@ -24,15 +24,15 @@ Header: count() UInt64 Header: default.a.a2_4 String default.b.b1_0 UInt64 Join (JOIN FillRightFirst) - Header: default.a.a2_4 String - default.a.a1_1 UInt64 + Header: default.a.a1_1 UInt64 + default.a.a2_4 String default.b.b1_0 UInt64 Expression ((JOIN actions + Change column names to column identifiers)) - Header: default.a.a2_4 String - default.a.a1_1 UInt64 + Header: default.a.a1_1 UInt64 + default.a.a2_4 String ReadFromStorage (Memory) - Header: a2 String - a1 UInt64 + Header: a1 UInt64 + a2 String Expression ((JOIN actions + Change column names to column identifiers)) Header: default.b.b1_0 UInt64 ReadFromStorage (Memory) @@ -52,27 +52,27 @@ Expression ((Project names + (Projection + DROP unused columns after JOIN))) Header: a2 String d2 String Join (JOIN FillRightFirst) - Header: default.a.k_2 UInt64 - default.a.a2_0 String + Header: default.a.a2_0 String + default.a.k_2 UInt64 default.d.d2_1 String Expression (DROP unused columns after JOIN) - Header: default.a.k_2 UInt64 - default.a.a2_0 String + Header: default.a.a2_0 String + default.a.k_2 UInt64 Join (JOIN FillRightFirst) - Header: default.a.k_2 UInt64 - default.a.a2_0 String + Header: default.a.a2_0 String + default.a.k_2 UInt64 Expression (DROP unused columns after JOIN) - Header: default.a.k_2 UInt64 - default.a.a2_0 String + Header: default.a.a2_0 String + default.a.k_2 UInt64 Join (JOIN FillRightFirst) - Header: default.a.k_2 UInt64 - default.a.a2_0 String + Header: default.a.a2_0 String + default.a.k_2 UInt64 Expression (Change column names to column identifiers) - Header: default.a.k_2 UInt64 - default.a.a2_0 String + Header: default.a.a2_0 String + default.a.k_2 UInt64 ReadFromStorage (Memory) - Header: k UInt64 - a2 String + Header: a2 String + k UInt64 Expression (Change column names to column identifiers) Header: default.b.k_3 UInt64 ReadFromStorage (Memory) @@ -82,11 +82,11 @@ Header: a2 String ReadFromStorage (Memory) Header: k UInt64 Expression (Change column names to column identifiers) - Header: default.d.k_5 UInt64 - default.d.d2_1 String + Header: default.d.d2_1 String + default.d.k_5 UInt64 ReadFromStorage (Memory) - Header: k UInt64 - d2 String + Header: d2 String + k UInt64 EXPLAIN PLAN header = 1 SELECT b.bx FROM a JOIN (SELECT b1, b2 || 'x' AS bx FROM b ) AS b ON b.b1 = a.a1 @@ -123,28 +123,28 @@ Header: bx String b.bx_0 String b.b1_1 UInt64 Join (JOIN FillRightFirst) - Header: default.a.a2_6 String - default.a.a1_2 UInt64 + Header: default.a.a1_2 UInt64 + default.a.a2_6 String b.bx_0 String b.b1_1 UInt64 Expression ((JOIN actions + Change column names to column identifiers)) - Header: default.a.a2_6 String - default.a.a1_2 UInt64 + Header: default.a.a1_2 UInt64 + default.a.a2_6 String ReadFromStorage (Memory) - Header: a2 String - a1 UInt64 + Header: a1 UInt64 + a2 String Expression ((JOIN actions + (Change column names to column identifiers + (Project names + (Projection + Change column names to column identifiers))))) Header: b.b1_1 UInt64 b.bx_0 String ReadFromStorage (Memory) - Header: b2 String - b1 UInt64 + Header: b1 UInt64 + b2 String Expression ((JOIN actions + Change column names to column identifiers)) - Header: default.c.c2_5 String - default.c.c1_3 UInt64 + Header: default.c.c1_3 UInt64 + default.c.c2_5 String ReadFromStorage (Memory) - Header: c2 String - c1 UInt64 + Header: c1 UInt64 + c2 String Expression ((JOIN actions + (Change column names to column identifiers + (Project names + (Projection + Change column names to column identifiers))))) Header: d.d1_4 UInt64 ReadFromStorage (SystemNumbers) From 07e114d8f6e6655571bcfd6d1c379604e1553fd5 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Wed, 22 Feb 2023 15:03:16 +0100 Subject: [PATCH 374/841] Analyzer WITH FILL and INTERPOLATE fix --- src/Planner/Planner.cpp | 14 ++-- src/Planner/PlannerExpressionAnalysis.cpp | 69 +++++++++++++++++-- src/Planner/PlannerExpressionAnalysis.h | 1 + .../0_stateless/02233_interpolate_1.sql | 4 +- 4 files changed, 75 insertions(+), 13 deletions(-) diff --git a/src/Planner/Planner.cpp b/src/Planner/Planner.cpp index fff539f59d6..c5c9703ef6a 100644 --- a/src/Planner/Planner.cpp +++ b/src/Planner/Planner.cpp @@ -591,20 +591,24 @@ void addWithFillStepIfNeeded(QueryPlan & query_plan, if (query_node.hasInterpolate()) { auto interpolate_actions_dag = std::make_shared(); + auto query_plan_columns = query_plan.getCurrentDataStream().header.getColumnsWithTypeAndName(); + for (auto & query_plan_column : query_plan_columns) + { + query_plan_column.column = nullptr; + interpolate_actions_dag->addInput(query_plan_column); + } auto & interpolate_list_node = query_node.getInterpolate()->as(); auto & interpolate_list_nodes = interpolate_list_node.getNodes(); if (interpolate_list_nodes.empty()) { - auto query_plan_columns = query_plan.getCurrentDataStream().header.getColumnsWithTypeAndName(); - for (auto & query_plan_column : query_plan_columns) + for (const auto * input_node : interpolate_actions_dag->getInputs()) { - if (column_names_with_fill.contains(query_plan_column.name)) + if (column_names_with_fill.contains(input_node->result_name)) continue; - const auto * input_action_node = &interpolate_actions_dag->addInput(query_plan_column); - interpolate_actions_dag->getOutputs().push_back(input_action_node); + interpolate_actions_dag->getOutputs().push_back(input_node); } } else diff --git a/src/Planner/PlannerExpressionAnalysis.cpp b/src/Planner/PlannerExpressionAnalysis.cpp index a813d3b753a..0e97e69cd67 100644 --- a/src/Planner/PlannerExpressionAnalysis.cpp +++ b/src/Planner/PlannerExpressionAnalysis.cpp @@ -359,7 +359,7 @@ SortAnalysisResult analyzeSort(const QueryNode & query_node, before_sort_actions_outputs.clear(); PlannerActionsVisitor actions_visitor(planner_context); - + bool has_with_fill = false; std::unordered_set before_sort_actions_dag_output_node_names; /** We add only sort node sort expression in before ORDER BY actions DAG. @@ -370,6 +370,7 @@ SortAnalysisResult analyzeSort(const QueryNode & query_node, { auto & sort_node_typed = sort_node->as(); auto expression_dag_nodes = actions_visitor.visit(before_sort_actions, sort_node_typed.getExpression()); + has_with_fill |= sort_node_typed.withFill(); for (auto & action_dag_node : expression_dag_nodes) { @@ -381,10 +382,55 @@ SortAnalysisResult analyzeSort(const QueryNode & query_node, } } + if (has_with_fill) + { + for (auto & output_node : before_sort_actions_outputs) + output_node = &before_sort_actions->materializeNode(*output_node); + } + + /// We add only INPUT columns necessary for INTERPOLATE expression in before ORDER BY actions DAG + if (query_node.hasInterpolate()) + { + auto & interpolate_list_node = query_node.getInterpolate()->as(); + + PlannerActionsVisitor interpolate_actions_visitor(planner_context); + auto interpolate_actions_dag = std::make_shared(); + + for (auto & interpolate_node : interpolate_list_node.getNodes()) + { + auto & interpolate_node_typed = interpolate_node->as(); + interpolate_actions_visitor.visit(interpolate_actions_dag, interpolate_node_typed.getExpression()); + interpolate_actions_visitor.visit(interpolate_actions_dag, interpolate_node_typed.getInterpolateExpression()); + } + + std::unordered_map before_sort_actions_inputs_name_to_node; + for (const auto & node : before_sort_actions->getInputs()) + before_sort_actions_inputs_name_to_node.emplace(node->result_name, node); + + for (const auto & node : interpolate_actions_dag->getNodes()) + { + if (before_sort_actions_dag_output_node_names.contains(node.result_name) || + node.type != ActionsDAG::ActionType::INPUT) + continue; + + auto input_node_it = before_sort_actions_inputs_name_to_node.find(node.result_name); + if (input_node_it == before_sort_actions_inputs_name_to_node.end()) + { + auto input_column = ColumnWithTypeAndName{node.column, node.result_type, node.result_name}; + const auto * input_node = &before_sort_actions->addInput(std::move(input_column)); + auto [it, _] = before_sort_actions_inputs_name_to_node.emplace(node.result_name, input_node); + input_node_it = it; + } + + before_sort_actions_outputs.push_back(input_node_it->second); + before_sort_actions_dag_output_node_names.insert(node.result_name); + } + } + auto actions_step_before_sort = std::make_unique(before_sort_actions); actions_chain.addStep(std::move(actions_step_before_sort)); - return SortAnalysisResult{std::move(before_sort_actions)}; + return SortAnalysisResult{std::move(before_sort_actions), has_with_fill}; } /** Construct limit by analysis result. @@ -488,21 +534,30 @@ PlannerExpressionsAnalysisResult buildExpressionAnalysisResult(const QueryTreeNo const auto * chain_available_output_columns = actions_chain.getLastStepAvailableOutputColumnsOrNull(); auto project_names_input = chain_available_output_columns ? *chain_available_output_columns : join_tree_input_columns; + bool has_with_fill = sort_analysis_result_optional.has_value() && sort_analysis_result_optional->has_with_fill; - /** If there is DISTINCT we must preserve non constant projection output columns + /** If there is WITH FILL we must use non constant projection columns. + * + * Example: SELECT 1 AS value ORDER BY value ASC WITH FILL FROM 0 TO 5 STEP 1; + * + * If there is DISTINCT we must preserve non constant projection output columns * in project names actions, to prevent removing of unused expressions during chain finalize. * * Example: SELECT DISTINCT id, 1 AS value FROM test_table ORDER BY id; */ - if (query_node.isDistinct()) + if (has_with_fill || query_node.isDistinct()) { std::unordered_set projection_column_names; - for (auto & [column_name, _] : projection_analysis_result.projection_column_names_with_display_aliases) - projection_column_names.insert(column_name); + + if (query_node.isDistinct()) + { + for (auto & [column_name, _] : projection_analysis_result.projection_column_names_with_display_aliases) + projection_column_names.insert(column_name); + } for (auto & column : project_names_input) { - if (projection_column_names.contains(column.name)) + if (has_with_fill || projection_column_names.contains(column.name)) column.column = nullptr; } } diff --git a/src/Planner/PlannerExpressionAnalysis.h b/src/Planner/PlannerExpressionAnalysis.h index b6d6ed96e9d..792cfdec2ff 100644 --- a/src/Planner/PlannerExpressionAnalysis.h +++ b/src/Planner/PlannerExpressionAnalysis.h @@ -48,6 +48,7 @@ struct WindowAnalysisResult struct SortAnalysisResult { ActionsDAGPtr before_order_by_actions; + bool has_with_fill = false; }; struct LimitByAnalysisResult diff --git a/tests/queries/0_stateless/02233_interpolate_1.sql b/tests/queries/0_stateless/02233_interpolate_1.sql index 229c36e23fb..b08f4a23898 100644 --- a/tests/queries/0_stateless/02233_interpolate_1.sql +++ b/tests/queries/0_stateless/02233_interpolate_1.sql @@ -1,3 +1,5 @@ +SET allow_experimental_analyzer = 1; + # Test WITH FILL without INTERPOLATE SELECT n, source, inter FROM ( SELECT toFloat32(number % 10) AS n, 'original' AS source, number as inter FROM numbers(10) WHERE number % 3 = 1 @@ -36,7 +38,7 @@ SELECT n, source, inter FROM ( # Test INTERPOLATE with inconsistent column - should produce error SELECT n, source, inter FROM ( SELECT toFloat32(number % 10) AS n, 'original' AS source, number as inter FROM numbers(10) WHERE number % 3 = 1 -) ORDER BY n WITH FILL FROM 0 TO 11.51 STEP 0.5 INTERPOLATE (inter AS source); -- { serverError 32 } +) ORDER BY n WITH FILL FROM 0 TO 11.51 STEP 0.5 INTERPOLATE (inter AS source); -- { serverError 6 } # Test INTERPOLATE with aliased column SELECT n, source, inter + 1 AS inter_p FROM ( From 51ee007e01e37625f2a15838849766676a641770 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Fri, 24 Feb 2023 13:46:09 +0100 Subject: [PATCH 375/841] Fixed tests --- .../Passes/CustomizeFunctionsPass.cpp | 63 ----------- .../Passes/NormalizeCountVariantsPass.cpp | 3 +- src/Analyzer/Passes/QueryAnalysisPass.cpp | 100 +++++++++++++----- src/Interpreters/InterpreterCreateQuery.cpp | 6 -- .../getHeaderForProcessingStage.cpp | 39 +------ src/Planner/Planner.cpp | 38 ++----- src/Planner/PlannerJoinTree.cpp | 63 +++++++---- src/Planner/Utils.cpp | 34 ++++++ src/Planner/Utils.h | 6 ++ .../optimizePrimaryKeyCondition.cpp | 17 +-- .../QueryPlan/ReadFromMergeTree.cpp | 4 +- src/Processors/QueryPlan/ReadFromMergeTree.h | 19 +--- .../QueryPlan/SourceStepWithFilter.h | 45 ++++++++ src/Storages/StorageDistributed.cpp | 42 +------- src/Storages/StorageDummy.cpp | 56 ++++++++++ src/Storages/StorageDummy.h | 74 +++++++++++++ src/Storages/StorageMerge.cpp | 8 +- src/Storages/StorageMerge.h | 15 +-- .../queries/0_stateless/00390_array_sort.sql | 4 +- .../00740_database_in_nested_view.sql | 1 + ...00936_function_result_with_operator_in.sql | 5 +- ...62_pm_all_join_with_block_continuation.sql | 26 ++--- ...2_multiple_joins_with_union_join.reference | 4 +- .../01852_multiple_joins_with_union_join.sql | 4 +- .../01936_quantiles_cannot_return_null.sql | 8 +- .../02339_analyzer_matcher_basic.reference | 27 +++-- .../02339_analyzer_matcher_basic.sql | 26 +++-- .../02378_analyzer_projection_names.reference | 2 +- 28 files changed, 425 insertions(+), 314 deletions(-) create mode 100644 src/Processors/QueryPlan/SourceStepWithFilter.h create mode 100644 src/Storages/StorageDummy.cpp create mode 100644 src/Storages/StorageDummy.h diff --git a/src/Analyzer/Passes/CustomizeFunctionsPass.cpp b/src/Analyzer/Passes/CustomizeFunctionsPass.cpp index 3333008a0c0..55307fd39e7 100644 --- a/src/Analyzer/Passes/CustomizeFunctionsPass.cpp +++ b/src/Analyzer/Passes/CustomizeFunctionsPass.cpp @@ -34,53 +34,6 @@ public: auto function_name = function_node->getFunctionName(); auto function_name_lowercase = Poco::toLower(function_name); - if (function_node->isAggregateFunction() || function_node->isWindowFunction()) - { - auto count_distinct_implementation_function_name = String(settings.count_distinct_implementation); - - /// Replace aggregateFunctionIfDistinct into aggregateFunctionDistinctIf to make execution more optimal - if (function_name_lowercase.ends_with("ifdistinct")) - { - size_t prefix_length = function_name_lowercase.size() - strlen("ifdistinct"); - auto updated_function_name = function_name_lowercase.substr(0, prefix_length) + "DistinctIf"; - resolveAggregateOrWindowFunctionNode(*function_node, updated_function_name); - function_name = function_node->getFunctionName(); - function_name_lowercase = Poco::toLower(function_name); - } - - /** Move -OrNull suffix ahead, this should execute after add -OrNull suffix. - * Used to rewrite aggregate functions with -OrNull suffix in some cases. - * Example: sumIfOrNull. - * Result: sumOrNullIf. - */ - if (function_name.ends_with("OrNull")) - { - auto function_properies = AggregateFunctionFactory::instance().tryGetProperties(function_name); - if (function_properies && !function_properies->returns_default_when_only_null) - { - size_t function_name_size = function_name.size(); - - static constexpr std::array suffixes_to_replace = {"MergeState", "Merge", "State", "If"}; - for (const auto & suffix : suffixes_to_replace) - { - auto suffix_string_value = String(suffix); - auto suffix_to_check = suffix_string_value + "OrNull"; - - if (!function_name.ends_with(suffix_to_check)) - continue; - - auto updated_function_name = function_name.substr(0, function_name_size - suffix_to_check.size()) + "OrNull" + suffix_string_value; - resolveAggregateOrWindowFunctionNode(*function_node, updated_function_name); - function_name = function_node->getFunctionName(); - function_name_lowercase = Poco::toLower(function_name); - break; - } - } - } - - return; - } - if (settings.transform_null_in) { auto function_result_type = function_node->getResultType(); @@ -106,22 +59,6 @@ public: } } - static inline void resolveAggregateOrWindowFunctionNode(FunctionNode & function_node, const String & aggregate_function_name) - { - auto function_aggregate_function = function_node.getAggregateFunction(); - - AggregateFunctionProperties properties; - auto aggregate_function = AggregateFunctionFactory::instance().get(aggregate_function_name, - function_aggregate_function->getArgumentTypes(), - function_aggregate_function->getParameters(), - properties); - - if (function_node.isAggregateFunction()) - function_node.resolveAsAggregateFunction(std::move(aggregate_function)); - else if (function_node.isWindowFunction()) - function_node.resolveAsWindowFunction(std::move(aggregate_function)); - } - inline void resolveOrdinaryFunctionNode(FunctionNode & function_node, const String & function_name) const { auto function = FunctionFactory::instance().get(function_name, getContext()); diff --git a/src/Analyzer/Passes/NormalizeCountVariantsPass.cpp b/src/Analyzer/Passes/NormalizeCountVariantsPass.cpp index 705018d108f..d36be98751c 100644 --- a/src/Analyzer/Passes/NormalizeCountVariantsPass.cpp +++ b/src/Analyzer/Passes/NormalizeCountVariantsPass.cpp @@ -46,8 +46,7 @@ public: } else if (function_node->getFunctionName() == "sum" && first_argument_constant_literal.getType() == Field::Types::UInt64 && - first_argument_constant_literal.get() == 1 && - !getSettings().aggregate_functions_null_for_empty) + first_argument_constant_literal.get() == 1) { resolveAsCountAggregateFunction(*function_node); function_node->getArguments().getNodes().clear(); diff --git a/src/Analyzer/Passes/QueryAnalysisPass.cpp b/src/Analyzer/Passes/QueryAnalysisPass.cpp index 147c0660bc2..9d1a096e582 100644 --- a/src/Analyzer/Passes/QueryAnalysisPass.cpp +++ b/src/Analyzer/Passes/QueryAnalysisPass.cpp @@ -1168,9 +1168,11 @@ private: static void validateJoinTableExpressionWithoutAlias(const QueryTreeNodePtr & join_node, const QueryTreeNodePtr & table_expression_node, IdentifierResolveScope & scope); + static std::pair recursivelyCollectMaxOrdinaryExpressions(QueryTreeNodePtr & node, QueryTreeNodes & into); + static void expandGroupByAll(QueryNode & query_tree_node_typed); - static std::pair recursivelyCollectMaxOrdinaryExpressions(QueryTreeNodePtr & node, QueryTreeNodes & into); + static std::string rewriteAggregateFunctionNameIfNeeded(const std::string & aggregate_function_name, const ContextPtr & context); /// Resolve identifier functions @@ -2238,9 +2240,72 @@ void QueryAnalyzer::expandGroupByAll(QueryNode & query_tree_node_typed) for (auto & node : projection_list.getNodes()) recursivelyCollectMaxOrdinaryExpressions(node, group_by_nodes); - } +std::string QueryAnalyzer::rewriteAggregateFunctionNameIfNeeded(const std::string & aggregate_function_name, const ContextPtr & context) +{ + std::string result_aggregate_function_name = aggregate_function_name; + auto aggregate_function_name_lowercase = Poco::toLower(aggregate_function_name); + + const auto & settings = context->getSettingsRef(); + + if (aggregate_function_name_lowercase == "countdistinct") + { + result_aggregate_function_name = settings.count_distinct_implementation; + } + else if (aggregate_function_name_lowercase == "countdistinctif" || aggregate_function_name_lowercase == "countifdistinct") + { + result_aggregate_function_name = settings.count_distinct_implementation; + result_aggregate_function_name += "If"; + } + + /// Replace aggregateFunctionIfDistinct into aggregateFunctionDistinctIf to make execution more optimal + if (result_aggregate_function_name.ends_with("ifdistinct")) + { + size_t prefix_length = result_aggregate_function_name.size() - strlen("ifdistinct"); + result_aggregate_function_name = result_aggregate_function_name.substr(0, prefix_length) + "DistinctIf"; + } + + bool need_add_or_null = settings.aggregate_functions_null_for_empty && !result_aggregate_function_name.ends_with("OrNull"); + if (need_add_or_null) + { + auto properties = AggregateFunctionFactory::instance().tryGetProperties(result_aggregate_function_name); + if (!properties->returns_default_when_only_null) + result_aggregate_function_name += "OrNull"; + } + + /** Move -OrNull suffix ahead, this should execute after add -OrNull suffix. + * Used to rewrite aggregate functions with -OrNull suffix in some cases. + * Example: sumIfOrNull. + * Result: sumOrNullIf. + */ + if (result_aggregate_function_name.ends_with("OrNull")) + { + auto function_properies = AggregateFunctionFactory::instance().tryGetProperties(result_aggregate_function_name); + if (function_properies && !function_properies->returns_default_when_only_null) + { + size_t function_name_size = result_aggregate_function_name.size(); + + static constexpr std::array suffixes_to_replace = {"MergeState", "Merge", "State", "If"}; + for (const auto & suffix : suffixes_to_replace) + { + auto suffix_string_value = String(suffix); + auto suffix_to_check = suffix_string_value + "OrNull"; + + if (!result_aggregate_function_name.ends_with(suffix_to_check)) + continue; + + result_aggregate_function_name = result_aggregate_function_name.substr(0, function_name_size - suffix_to_check.size()); + result_aggregate_function_name += "OrNull"; + result_aggregate_function_name += suffix_string_value; + + break; + } + } + } + + return result_aggregate_function_name; +} /// Resolve identifier functions implementation @@ -3003,7 +3068,7 @@ QueryTreeNodePtr QueryAnalyzer::tryResolveIdentifierFromJoin(const IdentifierLoo { resolved_identifier = resolved_identifier->clone(); auto & resolved_column = resolved_identifier->as(); - resolved_column.setColumnType(makeNullableSafe(resolved_column.getColumnType())); + resolved_column.setColumnType(makeNullableOrLowCardinalityNullable(resolved_column.getColumnType())); } return resolved_identifier; @@ -3988,6 +4053,9 @@ ProjectionNames QueryAnalyzer::resolveMatcher(QueryTreeNodePtr & matcher_node, I node = replace_expression->clone(); node_projection_names = resolveExpressionNode(node, scope, false /*allow_lambda_expression*/, false /*allow_table_expression*/); + if (node_projection_names.size() == 1) + node_projection_names[0] = column_name; + execute_replace_transformer = true; } @@ -4678,8 +4746,6 @@ ProjectionNames QueryAnalyzer::resolveFunction(QueryTreeNodePtr & node, Identifi } } - const auto & settings = scope.context->getSettingsRef(); - if (function_node.isWindowFunction()) { if (!AggregateFunctionFactory::instance().isAggregateFunctionName(function_name)) @@ -4694,12 +4760,10 @@ ProjectionNames QueryAnalyzer::resolveFunction(QueryTreeNodePtr & node, Identifi "Window function '{}' does not support lambda arguments", function_name); - bool need_add_or_null = settings.aggregate_functions_null_for_empty && !function_name.ends_with("OrNull"); + std::string aggregate_function_name = rewriteAggregateFunctionNameIfNeeded(function_name, scope.context); AggregateFunctionProperties properties; - auto aggregate_function = need_add_or_null - ? AggregateFunctionFactory::instance().get(function_name + "OrNull", argument_types, parameters, properties) - : AggregateFunctionFactory::instance().get(function_name, argument_types, parameters, properties); + auto aggregate_function = AggregateFunctionFactory::instance().get(aggregate_function_name, argument_types, parameters, properties); function_node.resolveAsWindowFunction(std::move(aggregate_function)); @@ -4758,24 +4822,10 @@ ProjectionNames QueryAnalyzer::resolveFunction(QueryTreeNodePtr & node, Identifi "Aggregate function '{}' does not support lambda arguments", function_name); - auto function_name_lowercase = Poco::toLower(function_name); - - if (function_name_lowercase == "countdistinct") - { - function_name = scope.context->getSettingsRef().count_distinct_implementation; - } - else if (function_name_lowercase == "countdistinctif" || function_name_lowercase == "countifdistinct") - { - function_name = scope.context->getSettingsRef().count_distinct_implementation; - function_name += "If"; - } - - bool need_add_or_null = settings.aggregate_functions_null_for_empty && !function_name.ends_with("OrNull"); - if (need_add_or_null) - function_name += "OrNull"; + std::string aggregate_function_name = rewriteAggregateFunctionNameIfNeeded(function_name, scope.context); AggregateFunctionProperties properties; - auto aggregate_function = AggregateFunctionFactory::instance().get(function_name, argument_types, parameters, properties); + auto aggregate_function = AggregateFunctionFactory::instance().get(aggregate_function_name, argument_types, parameters, properties); function_node.resolveAsAggregateFunction(std::move(aggregate_function)); diff --git a/src/Interpreters/InterpreterCreateQuery.cpp b/src/Interpreters/InterpreterCreateQuery.cpp index 29b7a4db609..edc6cc92fd7 100644 --- a/src/Interpreters/InterpreterCreateQuery.cpp +++ b/src/Interpreters/InterpreterCreateQuery.cpp @@ -1224,12 +1224,6 @@ BlockIO InterpreterCreateQuery::createTable(ASTCreateQuery & create) output_columns.push_back(output_column->cloneEmpty()); } } - - ActionsDAG::makeConvertingActions( - input_columns, - output_columns, - ActionsDAG::MatchColumnsMode::Position - ); } } diff --git a/src/Interpreters/getHeaderForProcessingStage.cpp b/src/Interpreters/getHeaderForProcessingStage.cpp index ab10bd2024c..3f52b2f5099 100644 --- a/src/Interpreters/getHeaderForProcessingStage.cpp +++ b/src/Interpreters/getHeaderForProcessingStage.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -83,44 +84,6 @@ bool removeJoin(ASTSelectQuery & select, TreeRewriterResult & rewriter_result, C return true; } -class StorageDummy : public IStorage -{ -public: - StorageDummy(const StorageID & table_id_, const ColumnsDescription & columns_) - : IStorage(table_id_) - { - StorageInMemoryMetadata storage_metadata; - storage_metadata.setColumns(columns_); - setInMemoryMetadata(storage_metadata); - } - - std::string getName() const override { return "StorageDummy"; } - - bool supportsSampling() const override { return true; } - bool supportsFinal() const override { return true; } - bool supportsPrewhere() const override { return true; } - bool supportsSubcolumns() const override { return true; } - bool supportsDynamicSubcolumns() const override { return true; } - bool canMoveConditionsToPrewhere() const override { return false; } - - QueryProcessingStage::Enum - getQueryProcessingStage(ContextPtr, QueryProcessingStage::Enum, const StorageSnapshotPtr &, SelectQueryInfo &) const override - { - throw Exception(ErrorCodes::UNSUPPORTED_METHOD, "StorageDummy does not support getQueryProcessingStage method"); - } - - Pipe read(const Names & /*column_names*/, - const StorageSnapshotPtr & /*storage_snapshot*/, - SelectQueryInfo & /*query_info*/, - ContextPtr /*context*/, - QueryProcessingStage::Enum /*processed_stage*/, - size_t /*max_block_size*/, - size_t /*num_streams*/) override - { - throw Exception(ErrorCodes::UNSUPPORTED_METHOD, "StorageDummy does not support read method"); - } -}; - Block getHeaderForProcessingStage( const Names & column_names, const StorageSnapshotPtr & storage_snapshot, diff --git a/src/Planner/Planner.cpp b/src/Planner/Planner.cpp index c5c9703ef6a..49120c91db2 100644 --- a/src/Planner/Planner.cpp +++ b/src/Planner/Planner.cpp @@ -1178,36 +1178,14 @@ void Planner::buildPlanForQueryNode() collectTableExpressionData(query_tree, *planner_context); collectSets(query_tree, *planner_context); - QueryProcessingStage::Enum from_stage = QueryProcessingStage::FetchColumns; - - if (select_query_options.only_analyze) - { - Block join_tree_block; - - for (const auto & [_, table_expression_data] : planner_context->getTableExpressionNodeToData()) - { - for (const auto & [column_name, column] : table_expression_data.getColumnNameToColumn()) - { - const auto & column_identifier = table_expression_data.getColumnIdentifierOrThrow(column_name); - join_tree_block.insert(ColumnWithTypeAndName(column.type, column_identifier)); - } - } - - auto read_nothing_step = std::make_unique(join_tree_block); - read_nothing_step->setStepDescription("Read nothing"); - query_plan.addStep(std::move(read_nothing_step)); - } - else - { - auto top_level_identifiers = collectTopLevelColumnIdentifiers(query_tree, planner_context); - auto join_tree_query_plan = buildJoinTreeQueryPlan(query_tree, - select_query_info, - select_query_options, - top_level_identifiers, - planner_context); - from_stage = join_tree_query_plan.from_stage; - query_plan = std::move(join_tree_query_plan.query_plan); - } + auto top_level_identifiers = collectTopLevelColumnIdentifiers(query_tree, planner_context); + auto join_tree_query_plan = buildJoinTreeQueryPlan(query_tree, + select_query_info, + select_query_options, + top_level_identifiers, + planner_context); + auto from_stage = join_tree_query_plan.from_stage; + query_plan = std::move(join_tree_query_plan.query_plan); LOG_TRACE(&Poco::Logger::get("Planner"), "Query {} from stage {} to stage {}{}", query_tree->formatConvertedASTForErrorMessage(), diff --git a/src/Planner/PlannerJoinTree.cpp b/src/Planner/PlannerJoinTree.cpp index a890780659c..f8e4a3b7021 100644 --- a/src/Planner/PlannerJoinTree.cpp +++ b/src/Planner/PlannerJoinTree.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include @@ -257,8 +257,6 @@ JoinTreeQueryPlan buildQueryPlanForTableExpression(const QueryTreeNodePtr & tabl else table_expression_query_info.table_expression_modifiers = table_function_node->getTableExpressionModifiers(); - from_stage = storage->getQueryProcessingStage(query_context, select_query_options.to_stage, storage_snapshot, table_expression_query_info); - auto columns_names = table_expression_data.getColumnNames(); /** The current user must have the SELECT privilege. @@ -308,7 +306,11 @@ JoinTreeQueryPlan buildQueryPlanForTableExpression(const QueryTreeNodePtr & tabl } } - storage->read(query_plan, columns_names, storage_snapshot, table_expression_query_info, query_context, from_stage, max_block_size, max_streams); + if (!select_query_options.only_analyze) + { + from_stage = storage->getQueryProcessingStage(query_context, select_query_options.to_stage, storage_snapshot, table_expression_query_info); + storage->read(query_plan, columns_names, storage_snapshot, table_expression_query_info, query_context, from_stage, max_block_size, max_streams); + } if (query_plan.isInitialized()) { @@ -324,7 +326,7 @@ JoinTreeQueryPlan buildQueryPlanForTableExpression(const QueryTreeNodePtr & tabl } else { - /// Create step which reads from empty source if storage has no data. + /// Create step which reads from empty source if storage has no data auto source_header = storage_snapshot->getSampleBlockForColumns(columns_names); Pipe pipe(std::make_shared(source_header)); auto read_from_pipe = std::make_unique(std::move(pipe)); @@ -334,22 +336,37 @@ JoinTreeQueryPlan buildQueryPlanForTableExpression(const QueryTreeNodePtr & tabl } else if (query_node || union_node) { - if (table_expression_data.getColumnNames().empty()) + if (!select_query_options.only_analyze) { - const auto & projection_columns = query_node ? query_node->getProjectionColumns() : union_node->computeProjectionColumns(); - NamesAndTypesList projection_columns_list(projection_columns.begin(), projection_columns.end()); - auto additional_column_to_read = ExpressionActions::getSmallestColumn(projection_columns_list); + if (table_expression_data.getColumnNames().empty()) + { + const auto & projection_columns = query_node ? query_node->getProjectionColumns() : union_node->computeProjectionColumns(); + NamesAndTypesList projection_columns_list(projection_columns.begin(), projection_columns.end()); + auto additional_column_to_read = ExpressionActions::getSmallestColumn(projection_columns_list); - const auto & column_identifier = planner_context->getGlobalPlannerContext()->createColumnIdentifier(additional_column_to_read, table_expression); - table_expression_data.addColumn(additional_column_to_read, column_identifier); + const auto & column_identifier = planner_context->getGlobalPlannerContext()->createColumnIdentifier(additional_column_to_read, table_expression); + table_expression_data.addColumn(additional_column_to_read, column_identifier); + } + + auto subquery_options = select_query_options.subquery(); + Planner subquery_planner(table_expression, subquery_options, planner_context->getGlobalPlannerContext()); + /// Propagate storage limits to subquery + subquery_planner.addStorageLimits(*select_query_info.storage_limits); + subquery_planner.buildQueryPlanIfNeeded(); + query_plan = std::move(subquery_planner).extractQueryPlan(); } + else + { + auto projection_columns = query_node ? query_node->getProjectionColumns() : union_node->computeProjectionColumns(); + Block source_header; + for (auto & projection_column : projection_columns) + source_header.insert(ColumnWithTypeAndName(nullptr, projection_column.type, projection_column.name)); - auto subquery_options = select_query_options.subquery(); - Planner subquery_planner(table_expression, subquery_options, planner_context->getGlobalPlannerContext()); - /// Propagate storage limits to subquery - subquery_planner.addStorageLimits(*select_query_info.storage_limits); - subquery_planner.buildQueryPlanIfNeeded(); - query_plan = std::move(subquery_planner).extractQueryPlan(); + Pipe pipe(std::make_shared(source_header)); + auto read_from_pipe = std::make_unique(std::move(pipe)); + read_from_pipe->setStepDescription("Read from NullSource"); + query_plan.addStep(std::move(read_from_pipe)); + } } else { @@ -533,9 +550,15 @@ JoinTreeQueryPlan buildQueryPlanForJoinNode(const QueryTreeNodePtr & join_table_ for (auto & output_node : cast_actions_dag->getOutputs()) { - if (planner_context->getGlobalPlannerContext()->hasColumnIdentifier(output_node->result_name) && - output_node->result_type->canBeInsideNullable()) - output_node = &cast_actions_dag->addFunction(to_nullable_function, {output_node}, output_node->result_name); + if (planner_context->getGlobalPlannerContext()->hasColumnIdentifier(output_node->result_name)) + { + DataTypePtr type_to_check = output_node->result_type; + if (const auto * type_to_check_low_cardinality = typeid_cast(type_to_check.get())) + type_to_check = type_to_check_low_cardinality->getDictionaryType(); + + if (type_to_check->canBeInsideNullable()) + output_node = &cast_actions_dag->addFunction(to_nullable_function, {output_node}, output_node->result_name); + } } cast_actions_dag->projectInput(); diff --git a/src/Planner/Utils.cpp b/src/Planner/Utils.cpp index 6df024fee4c..5c5eadac55d 100644 --- a/src/Planner/Utils.cpp +++ b/src/Planner/Utils.cpp @@ -13,12 +13,17 @@ #include +#include + #include +#include #include #include #include #include +#include +#include #include #include @@ -357,4 +362,33 @@ std::optional tryExtractConstantFromConditionNode(const QueryTreeNodePtr & return predicate_value > 0; } +QueryTreeNodePtr replaceTablesAndTableFunctionsWithDummyTables(const QueryTreeNodePtr & query_node, + const ContextPtr & context, + ResultReplacementMap * result_replacement_map) +{ + auto & query_node_typed = query_node->as(); + auto table_expressions = extractTableExpressions(query_node_typed.getJoinTree()); + std::unordered_map replacement_map; + + for (auto & table_expression : table_expressions) + { + auto * table_node = table_expression->as(); + auto * table_function_node = table_expression->as(); + if (!table_node && !table_function_node) + continue; + + const auto & storage_snapshot = table_node ? table_node->getStorageSnapshot() : table_function_node->getStorageSnapshot(); + auto storage_dummy = std::make_shared(storage_snapshot->storage.getStorageID(), + storage_snapshot->metadata->getColumns()); + auto dummy_table_node = std::make_shared(std::move(storage_dummy), context); + + if (result_replacement_map) + result_replacement_map->emplace(table_expression, dummy_table_node); + + replacement_map.emplace(table_expression.get(), std::move(dummy_table_node)); + } + + return query_node->cloneAndReplace(replacement_map); +} + } diff --git a/src/Planner/Utils.h b/src/Planner/Utils.h index e304ae13eb5..0520bd67d26 100644 --- a/src/Planner/Utils.h +++ b/src/Planner/Utils.h @@ -66,4 +66,10 @@ QueryTreeNodePtr mergeConditionNodes(const QueryTreeNodes & condition_nodes, con /// Try extract boolean constant from condition node std::optional tryExtractConstantFromConditionNode(const QueryTreeNodePtr & condition_node); +/// Replace tables nodes and table function nodes with dummy table nodes +using ResultReplacementMap = std::unordered_map; +QueryTreeNodePtr replaceTablesAndTableFunctionsWithDummyTables(const QueryTreeNodePtr & query_node, + const ContextPtr & context, + ResultReplacementMap * result_replacement_map = nullptr); + } diff --git a/src/Processors/QueryPlan/Optimizations/optimizePrimaryKeyCondition.cpp b/src/Processors/QueryPlan/Optimizations/optimizePrimaryKeyCondition.cpp index cac4944bad7..753940339ea 100644 --- a/src/Processors/QueryPlan/Optimizations/optimizePrimaryKeyCondition.cpp +++ b/src/Processors/QueryPlan/Optimizations/optimizePrimaryKeyCondition.cpp @@ -1,8 +1,7 @@ #include #include #include -#include -#include +#include #include #include @@ -13,21 +12,15 @@ void optimizePrimaryKeyCondition(const Stack & stack) { const auto & frame = stack.back(); - auto * read_from_merge_tree = typeid_cast(frame.node->step.get()); - auto * read_from_merge = typeid_cast(frame.node->step.get()); - - if (!read_from_merge && !read_from_merge_tree) + auto * source_step_with_filter = dynamic_cast(frame.node->step.get()); + if (!source_step_with_filter) return; for (auto iter = stack.rbegin() + 1; iter != stack.rend(); ++iter) { if (auto * filter_step = typeid_cast(iter->node->step.get())) - { - if (read_from_merge_tree) - read_from_merge_tree->addFilter(filter_step->getExpression(), filter_step->getFilterColumnName()); - if (read_from_merge) - read_from_merge->addFilter(filter_step->getExpression(), filter_step->getFilterColumnName()); - } + source_step_with_filter->addFilter(filter_step->getExpression(), filter_step->getFilterColumnName()); + /// Note: actually, plan optimizations merge Filter and Expression steps. /// Ideally, chain should look like (Expression -> ...) -> (Filter -> ...) -> ReadFromStorage, /// So this is likely not needed. diff --git a/src/Processors/QueryPlan/ReadFromMergeTree.cpp b/src/Processors/QueryPlan/ReadFromMergeTree.cpp index c70f6c6da30..fe279f3ab84 100644 --- a/src/Processors/QueryPlan/ReadFromMergeTree.cpp +++ b/src/Processors/QueryPlan/ReadFromMergeTree.cpp @@ -148,7 +148,7 @@ ReadFromMergeTree::ReadFromMergeTree( Poco::Logger * log_, MergeTreeDataSelectAnalysisResultPtr analyzed_result_ptr_, bool enable_parallel_reading) - : ISourceStep(DataStream{.header = IMergeTreeSelectAlgorithm::transformHeader( + : SourceStepWithFilter(DataStream{.header = IMergeTreeSelectAlgorithm::transformHeader( storage_snapshot_->getSampleBlockForColumns(real_column_names_), getPrewhereInfoFromQueryInfo(query_info_), data_.getPartitionValueType(), @@ -1095,7 +1095,7 @@ MergeTreeDataSelectAnalysisResultPtr ReadFromMergeTree::selectRangesToRead(Merge return selectRangesToRead( std::move(parts), prewhere_info, - added_filter_nodes, + filter_nodes, storage_snapshot->metadata, storage_snapshot->getMetadataForQuery(), query_info, diff --git a/src/Processors/QueryPlan/ReadFromMergeTree.h b/src/Processors/QueryPlan/ReadFromMergeTree.h index 4fd37fd6edf..9b28e903d21 100644 --- a/src/Processors/QueryPlan/ReadFromMergeTree.h +++ b/src/Processors/QueryPlan/ReadFromMergeTree.h @@ -1,5 +1,5 @@ #pragma once -#include +#include #include #include #include @@ -29,7 +29,7 @@ using MergeTreeDataSelectAnalysisResultPtr = std::shared_ptrfindInOutputs(column_name)); - } - - void addFilterNodes(const ActionDAGNodes & filter_nodes) - { - for (const auto & node : filter_nodes.nodes) - added_filter_nodes.nodes.push_back(node); - } - StorageID getStorageID() const { return data.getStorageID(); } UInt64 getSelectedParts() const { return selected_parts; } UInt64 getSelectedRows() const { return selected_rows; } @@ -203,9 +191,6 @@ private: PrewhereInfoPtr prewhere_info; ExpressionActionsSettings actions_settings; - std::vector added_filter_dags; - ActionDAGNodes added_filter_nodes; - StorageSnapshotPtr storage_snapshot; StorageMetadataPtr metadata_for_reading; diff --git a/src/Processors/QueryPlan/SourceStepWithFilter.h b/src/Processors/QueryPlan/SourceStepWithFilter.h new file mode 100644 index 00000000000..a363451fff2 --- /dev/null +++ b/src/Processors/QueryPlan/SourceStepWithFilter.h @@ -0,0 +1,45 @@ +#pragma once + +#include +#include + +namespace DB +{ + +/** Source step that can use filters for more efficient pipeline initialization. + * Filters must be added before pipeline initialization. + */ +class SourceStepWithFilter : public ISourceStep +{ +public: + using Base = ISourceStep; + using Base::Base; + + const std::vector & getFilters() const + { + return filter_dags; + } + + const ActionDAGNodes & getFilterNodes() const + { + return filter_nodes; + } + + void addFilter(ActionsDAGPtr filter_dag, std::string column_name) + { + filter_nodes.nodes.push_back(&filter_dag->findInOutputs(column_name)); + filter_dags.push_back(std::move(filter_dag)); + } + + void addFilter(ActionsDAGPtr filter_dag, const ActionsDAG::Node * filter_node) + { + filter_nodes.nodes.push_back(filter_node); + filter_dags.push_back(std::move(filter_dag)); + } + +protected: + std::vector filter_dags; + ActionDAGNodes filter_nodes; +}; + +} diff --git a/src/Storages/StorageDistributed.cpp b/src/Storages/StorageDistributed.cpp index 5516d6cadf0..286742586f2 100644 --- a/src/Storages/StorageDistributed.cpp +++ b/src/Storages/StorageDistributed.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include @@ -133,7 +134,6 @@ namespace ErrorCodes extern const int DISTRIBUTED_TOO_MANY_PENDING_BYTES; extern const int ARGUMENT_OUT_OF_BOUND; extern const int TOO_LARGE_DISTRIBUTED_DEPTH; - extern const int UNSUPPORTED_METHOD; } namespace ActionLocks @@ -622,44 +622,6 @@ StorageSnapshotPtr StorageDistributed::getStorageSnapshotForQuery( namespace { -class StorageDistributedLocal : public IStorage -{ -public: - StorageDistributedLocal(const StorageID & table_id_, const ColumnsDescription & columns_) - : IStorage(table_id_) - { - StorageInMemoryMetadata storage_metadata; - storage_metadata.setColumns(columns_); - setInMemoryMetadata(storage_metadata); - } - - std::string getName() const override { return "StorageDistributedLocal"; } - - bool supportsSampling() const override { return true; } - bool supportsFinal() const override { return true; } - bool supportsPrewhere() const override { return true; } - bool supportsSubcolumns() const override { return true; } - bool supportsDynamicSubcolumns() const override { return true; } - bool canMoveConditionsToPrewhere() const override { return false; } - - QueryProcessingStage::Enum - getQueryProcessingStage(ContextPtr, QueryProcessingStage::Enum, const StorageSnapshotPtr &, SelectQueryInfo &) const override - { - throw Exception(ErrorCodes::UNSUPPORTED_METHOD, "StorageDistributedLocal does not support getQueryProcessingStage method"); - } - - Pipe read(const Names & /*column_names*/, - const StorageSnapshotPtr & /*storage_snapshot*/, - SelectQueryInfo & /*query_info*/, - ContextPtr /*context*/, - QueryProcessingStage::Enum /*processed_stage*/, - size_t /*max_block_size*/, - size_t /*num_streams*/) override - { - throw Exception(ErrorCodes::UNSUPPORTED_METHOD, "StorageDistributedLocal does not support read method"); - } -}; - QueryTreeNodePtr buildQueryTreeDistributedTableReplacedWithLocalTable(const SelectQueryInfo & query_info, const StorageSnapshotPtr & distributed_storage_snapshot, const StorageID & remote_storage_id, @@ -687,7 +649,7 @@ QueryTreeNodePtr buildQueryTreeDistributedTableReplacedWithLocalTable(const Sele auto resolved_remote_storage_id = query_context->resolveStorageID(remote_storage_id); auto storage = DatabaseCatalog::instance().tryGetTable(resolved_remote_storage_id, query_context); if (!storage) - storage = std::make_shared(resolved_remote_storage_id, distributed_storage_snapshot->metadata->getColumns()); + storage = std::make_shared(resolved_remote_storage_id, distributed_storage_snapshot->metadata->getColumns()); replacement_table_expression = std::make_shared(std::move(storage), query_context); } diff --git a/src/Storages/StorageDummy.cpp b/src/Storages/StorageDummy.cpp new file mode 100644 index 00000000000..e5f3b0b4d8e --- /dev/null +++ b/src/Storages/StorageDummy.cpp @@ -0,0 +1,56 @@ +#include + +#include +#include + +#include +#include + +namespace DB +{ + +StorageDummy::StorageDummy(const StorageID & table_id_, const ColumnsDescription & columns_) + : IStorage(table_id_) +{ + StorageInMemoryMetadata storage_metadata; + storage_metadata.setColumns(columns_); + setInMemoryMetadata(storage_metadata); +} + +QueryProcessingStage::Enum StorageDummy::getQueryProcessingStage( + ContextPtr, + QueryProcessingStage::Enum, + const StorageSnapshotPtr &, + SelectQueryInfo &) const +{ + return QueryProcessingStage::FetchColumns; +} + +void StorageDummy::read(QueryPlan & query_plan, + const Names & column_names, + const StorageSnapshotPtr & storage_snapshot, + SelectQueryInfo &, + ContextPtr, + QueryProcessingStage::Enum, + size_t, + size_t) +{ + query_plan.addStep(std::make_unique(*this, storage_snapshot, column_names)); +} + +ReadFromDummy::ReadFromDummy(const StorageDummy & storage_, + StorageSnapshotPtr storage_snapshot_, + Names column_names_) + : SourceStepWithFilter(DataStream{.header = storage_snapshot_->getSampleBlockForColumns(column_names_)}) + , storage(storage_) + , storage_snapshot(std::move(storage_snapshot_)) + , column_names(std::move(column_names_)) +{} + +void ReadFromDummy::initializePipeline(QueryPipelineBuilder & pipeline, const BuildQueryPipelineSettings &) +{ + Pipe pipe(std::make_shared(getOutputStream().header)); + pipeline.init(std::move(pipe)); +} + +} diff --git a/src/Storages/StorageDummy.h b/src/Storages/StorageDummy.h new file mode 100644 index 00000000000..a7beef9d531 --- /dev/null +++ b/src/Storages/StorageDummy.h @@ -0,0 +1,74 @@ +#pragma once + +#include + +#include +#include + +namespace DB +{ + +class StorageDummy : public IStorage +{ +public: + StorageDummy(const StorageID & table_id_, const ColumnsDescription & columns_); + + std::string getName() const override { return "StorageDummy"; } + + bool supportsSampling() const override { return true; } + bool supportsFinal() const override { return true; } + bool supportsPrewhere() const override { return true; } + bool supportsSubcolumns() const override { return true; } + bool supportsDynamicSubcolumns() const override { return true; } + bool canMoveConditionsToPrewhere() const override { return false; } + + QueryProcessingStage::Enum getQueryProcessingStage( + ContextPtr local_context, + QueryProcessingStage::Enum to_stage, + const StorageSnapshotPtr & storage_snapshot, + SelectQueryInfo & query_info) const override; + + void read( + QueryPlan & query_plan, + const Names & column_names, + const StorageSnapshotPtr & storage_snapshot, + SelectQueryInfo & query_info, + ContextPtr local_context, + QueryProcessingStage::Enum processed_stage, + size_t max_block_size, + size_t num_streams) override; +}; + +class ReadFromDummy : public SourceStepWithFilter +{ +public: + explicit ReadFromDummy(const StorageDummy & storage_, + StorageSnapshotPtr storage_snapshot_, + Names column_names_); + + const StorageDummy & getStorage() const + { + return storage; + } + + const StorageSnapshotPtr & getStorageSnapshot() const + { + return storage_snapshot; + } + + const Names & getColumnNames() const + { + return column_names; + } + + String getName() const override { return "ReadFromDummy"; } + + void initializePipeline(QueryPipelineBuilder & pipeline, const BuildQueryPipelineSettings & settings) override; + +private: + const StorageDummy & storage; + StorageSnapshotPtr storage_snapshot; + Names column_names; +}; + +} diff --git a/src/Storages/StorageMerge.cpp b/src/Storages/StorageMerge.cpp index 0ca29e2826a..af5a32d47f7 100644 --- a/src/Storages/StorageMerge.cpp +++ b/src/Storages/StorageMerge.cpp @@ -384,7 +384,7 @@ ReadFromMerge::ReadFromMerge( const SelectQueryInfo & query_info_, ContextMutablePtr context_, QueryProcessingStage::Enum processed_stage) - : ISourceStep(DataStream{.header = common_header_}) + : SourceStepWithFilter(DataStream{.header = common_header_}) , required_max_block_size(max_block_size) , requested_num_streams(num_streams) , common_header(std::move(common_header_)) @@ -691,7 +691,11 @@ QueryPipelineBuilderPtr ReadFromMerge::createSources( return {}; if (auto * read_from_merge_tree = typeid_cast(plan.getRootNode()->step.get())) - read_from_merge_tree->addFilterNodes(added_filter_nodes); + { + size_t filters_dags_size = filter_dags.size(); + for (size_t i = 0; i < filters_dags_size; ++i) + read_from_merge_tree->addFilter(filter_dags[i], filter_nodes.nodes[i]); + } builder = plan.buildQueryPipeline( QueryPlanOptimizationSettings::fromContext(modified_context), diff --git a/src/Storages/StorageMerge.h b/src/Storages/StorageMerge.h index 03c1719dfef..4bc47375047 100644 --- a/src/Storages/StorageMerge.h +++ b/src/Storages/StorageMerge.h @@ -3,7 +3,7 @@ #include #include #include -#include +#include namespace DB @@ -115,7 +115,7 @@ private: friend class ReadFromMerge; }; -class ReadFromMerge final : public ISourceStep +class ReadFromMerge final : public SourceStepWithFilter { public: static constexpr auto name = "ReadFromMerge"; @@ -141,12 +141,6 @@ public: void initializePipeline(QueryPipelineBuilder & pipeline, const BuildQueryPipelineSettings &) override; - void addFilter(ActionsDAGPtr expression, std::string column_name) - { - added_filter_dags.push_back(expression); - added_filter_nodes.nodes.push_back(&expression->findInOutputs(column_name)); - } - const StorageListWithLocks & getSelectedTables() const { return selected_tables; } /// Returns `false` if requested reading cannot be performed. @@ -169,11 +163,6 @@ private: ContextMutablePtr context; QueryProcessingStage::Enum common_processed_stage; - std::vector added_filter_dags; - ActionDAGNodes added_filter_nodes; - - std::string added_filter_column_name; - InputOrderInfoPtr order_info; struct AliasData diff --git a/tests/queries/0_stateless/00390_array_sort.sql b/tests/queries/0_stateless/00390_array_sort.sql index 8c2307eb3bd..1518761b166 100644 --- a/tests/queries/0_stateless/00390_array_sort.sql +++ b/tests/queries/0_stateless/00390_array_sort.sql @@ -1,3 +1,5 @@ +SET allow_experimental_analyzer = 1; + SELECT [2, 1, 3] AS arr, arraySort(arr), arrayReverseSort(arr), arraySort(x -> -x, arr); SELECT materialize([2, 1, 3]) AS arr, arraySort(arr), arrayReverseSort(arr), arraySort(x -> -x, arr); @@ -51,4 +53,4 @@ SELECT arrayPartialSort(2, [1,2,3], [1]); -- { serverError ILLEGAL_TYPE_OF_ARGUM SELECT arrayPartialSort(2, [1,2,3], 3); -- { serverError ILLEGAL_TYPE_OF_ARGUMENT } SELECT arrayPartialSort(arraySort([1,2,3]), [1,2,3]); -- { serverError ILLEGAL_TYPE_OF_ARGUMENT } SELECT arrayMap(x -> range(x), [4, 1, 2, 3]) AS arr, 100 AS lim, arrayResize(arrayPartialSort(arrayPartialSort(lim, arr), arr), lim), arrayResize(arrayPartialReverseSort(lim, arr), lim), arrayResize(arrayPartialSort(x -> (-length(x)), lim, arr), lim); -- { serverError ILLEGAL_TYPE_OF_ARGUMENT } -SELECT arrayPartialReverseSort(arraySort((x, y) -> y, [NULL, NULL], [NULL, NULL]), arr), arrayMap(x -> toString(x), [257, -9223372036854775807, 2, -2147483648, 2147483648, NULL, 65536, -2147483648, 2, 65535]) AS arr, NULL, 100 AS lim, 65536, arrayResize(arrayPartialSort(x -> reverse(x), lim, arr), lim) GROUP BY [NULL, 1023, -2, NULL, 255, '0', NULL, 9223372036854775806] WITH ROLLUP; -- { serverError ILLEGAL_TYPE_OF_ARGUMENT } +SELECT arrayPartialReverseSort(arraySort((x, y) -> y, [NULL, NULL], [NULL, NULL]), arr), arrayMap(x -> toString(x), [257, -9223372036854775807, 2, -2147483648, 2147483648, NULL, 65536, -2147483648, 2, 65535]) AS arr, NULL, 100 AS lim, 65536, arrayResize(arrayPartialSort(x -> reverse(x), lim, arr), lim) GROUP BY [NULL, 1023, -2, NULL, 255, '0', NULL, 9223372036854775806] WITH ROLLUP; -- { serverError NO_COMMON_TYPE } diff --git a/tests/queries/0_stateless/00740_database_in_nested_view.sql b/tests/queries/0_stateless/00740_database_in_nested_view.sql index 1890baafaa1..e2debe2859b 100644 --- a/tests/queries/0_stateless/00740_database_in_nested_view.sql +++ b/tests/queries/0_stateless/00740_database_in_nested_view.sql @@ -1,5 +1,6 @@ -- Tags: no-parallel +DROP DATABASE IF EXISTS test_00740; CREATE DATABASE test_00740; USE test_00740; diff --git a/tests/queries/0_stateless/00936_function_result_with_operator_in.sql b/tests/queries/0_stateless/00936_function_result_with_operator_in.sql index dfb19c1f3ec..9d976e5333d 100644 --- a/tests/queries/0_stateless/00936_function_result_with_operator_in.sql +++ b/tests/queries/0_stateless/00936_function_result_with_operator_in.sql @@ -1,3 +1,4 @@ +SET allow_experimental_analyzer = 1; SET force_primary_key = 1; DROP TABLE IF EXISTS samples; @@ -22,8 +23,8 @@ SELECT 'a' IN splitByChar('c', 'abcdef'); SELECT 'errors:'; -- non-constant expressions in the right side of IN -SELECT count() FROM samples WHERE 1 IN range(samples.value); -- { serverError 47 } -SELECT count() FROM samples WHERE 1 IN range(rand() % 1000); -- { serverError 36 } +SELECT count() FROM samples WHERE 1 IN range(samples.value); -- { serverError 1 } +SELECT count() FROM samples WHERE 1 IN range(rand() % 1000); -- { serverError 1 } -- index is not used SELECT count() FROM samples WHERE value IN range(3); -- { serverError 277 } diff --git a/tests/queries/0_stateless/01062_pm_all_join_with_block_continuation.sql b/tests/queries/0_stateless/01062_pm_all_join_with_block_continuation.sql index 15a28e92386..0732db73e38 100644 --- a/tests/queries/0_stateless/01062_pm_all_join_with_block_continuation.sql +++ b/tests/queries/0_stateless/01062_pm_all_join_with_block_continuation.sql @@ -2,32 +2,32 @@ SET max_memory_usage = 50000000; SET join_algorithm = 'partial_merge'; SELECT 'defaults'; - + SELECT count(1) FROM ( - SELECT materialize(1) as k, n FROM numbers(10) nums + SELECT k, n FROM (SELECT materialize(1) as k FROM numbers(10)) nums JOIN (SELECT materialize(1) AS k, number n FROM numbers(1000000)) j USING k); SELECT count(1) FROM ( - SELECT materialize(1) as k, n FROM numbers(1000) nums + SELECT k, n FROM (SELECT materialize(1) as k FROM numbers(1000)) nums JOIN (SELECT materialize(1) AS k, number n FROM numbers(10000)) j USING k); SELECT count(1), uniqExact(n) FROM ( - SELECT materialize(1) as k, n FROM numbers(1000000) nums + SELECT k, n FROM (SELECT materialize(1) AS k FROM numbers(1000000)) nums JOIN (SELECT materialize(1) AS k, number n FROM numbers(10)) j USING k); -- errors SET max_joined_block_size_rows = 0; - + SELECT count(1) FROM ( - SELECT materialize(1) as k, n FROM numbers(10) nums + SELECT k, n FROM (SELECT materialize(1) AS k FROM numbers(10)) nums JOIN (SELECT materialize(1) AS k, number n FROM numbers(1000000)) j USING k); -- { serverError 241 } SELECT count(1) FROM ( - SELECT materialize(1) as k, n FROM numbers(1000) nums + SELECT k, n FROM (SELECT materialize(1) AS k FROM numbers(1000)) nums JOIN (SELECT materialize(1) AS k, number n FROM numbers(10000)) j USING k); -- { serverError 241 } @@ -35,17 +35,17 @@ SELECT 'max_joined_block_size_rows = 2000'; SET max_joined_block_size_rows = 2000; SELECT count(1) FROM ( - SELECT materialize(1) as k, n FROM numbers(10) nums + SELECT k, n FROM (SELECT materialize(1) AS k FROM numbers(10)) nums JOIN (SELECT materialize(1) AS k, number n FROM numbers(1000000)) j USING k); SELECT count(1), uniqExact(n) FROM ( - SELECT materialize(1) as k, n FROM numbers(1000) nums + SELECT k, n FROM (SELECT materialize(1) AS k FROM numbers(1000)) nums JOIN (SELECT materialize(1) AS k, number n FROM numbers(10000)) j USING k); SELECT count(1), uniqExact(n) FROM ( - SELECT materialize(1) as k, n FROM numbers(1000000) nums + SELECT k, n FROM (SELECT materialize(1) as k FROM numbers(1000000)) nums JOIN (SELECT materialize(1) AS k, number n FROM numbers(10)) j USING k); @@ -53,16 +53,16 @@ SELECT 'max_rows_in_join = 1000'; SET max_rows_in_join = 1000; SELECT count(1) FROM ( - SELECT materialize(1) as k, n FROM numbers(10) nums + SELECT k, n FROM (SELECT materialize(1) AS k FROM numbers(10)) nums JOIN (SELECT materialize(1) AS k, number n FROM numbers(1000000)) j USING k); SELECT count(1), uniqExact(n) FROM ( - SELECT materialize(1) as k, n FROM numbers(1000) nums + SELECT k, n FROM (SELECT materialize(1) AS k FROM numbers(1000)) nums JOIN (SELECT materialize(1) AS k, number n FROM numbers(10000)) j USING k); SELECT count(1), uniqExact(n) FROM ( - SELECT materialize(1) as k, n FROM numbers(1000000) nums + SELECT k, n FROM (SELECT materialize(1) AS k FROM numbers(1000000)) nums JOIN (SELECT materialize(1) AS k, number n FROM numbers(10)) j USING k); diff --git a/tests/queries/0_stateless/01852_multiple_joins_with_union_join.reference b/tests/queries/0_stateless/01852_multiple_joins_with_union_join.reference index eb37a198435..85e6138dc5d 100644 --- a/tests/queries/0_stateless/01852_multiple_joins_with_union_join.reference +++ b/tests/queries/0_stateless/01852_multiple_joins_with_union_join.reference @@ -1,2 +1,2 @@ -1 1 1 1 -1 1 1 1 +1 1 1 +1 1 1 diff --git a/tests/queries/0_stateless/01852_multiple_joins_with_union_join.sql b/tests/queries/0_stateless/01852_multiple_joins_with_union_join.sql index 39818fa51c2..8c6937eb581 100644 --- a/tests/queries/0_stateless/01852_multiple_joins_with_union_join.sql +++ b/tests/queries/0_stateless/01852_multiple_joins_with_union_join.sql @@ -1,3 +1,5 @@ +SET allow_experimental_analyzer = 1; + DROP TABLE IF EXISTS v1; DROP TABLE IF EXISTS v2; @@ -17,7 +19,7 @@ JOIN v1 AS t2 USING (id) CROSS JOIN v2 AS n1 CROSS JOIN v2 AS n2; -SELECT * FROM v1 AS t1 JOIN v1 AS t2 USING (id) JOIN v1 AS t3 USING (value); -- { serverError NOT_IMPLEMENTED } +SELECT * FROM v1 AS t1 JOIN v1 AS t2 USING (id) JOIN v1 AS t3 USING (value); -- { serverError UNKNOWN_IDENTIFIER } DROP TABLE IF EXISTS v1; DROP TABLE IF EXISTS v2; diff --git a/tests/queries/0_stateless/01936_quantiles_cannot_return_null.sql b/tests/queries/0_stateless/01936_quantiles_cannot_return_null.sql index 81ac6224268..46fd8adf570 100644 --- a/tests/queries/0_stateless/01936_quantiles_cannot_return_null.sql +++ b/tests/queries/0_stateless/01936_quantiles_cannot_return_null.sql @@ -1,9 +1,9 @@ set aggregate_functions_null_for_empty=0; -SELECT quantiles(0.95)(x) FROM (SELECT 1 x WHERE 0); -SELECT quantiles(0.95)(number) FROM (SELECT number FROM numbers(10) WHERE number > 10); +SELECT quantiles(0.95)(x) FROM (SELECT 1 x WHERE 0); +SELECT quantiles(0.95)(number) FROM (SELECT number FROM numbers(10) WHERE number > 10); set aggregate_functions_null_for_empty=1; -SELECT quantiles(0.95)(x) FROM (SELECT 1 x WHERE 0); -SELECT quantiles(0.95)(number) FROM (SELECT number FROM numbers(10) WHERE number > 10); +SELECT quantiles(0.95)(x) FROM (SELECT 1 x WHERE 0); +SELECT quantiles(0.95)(number) FROM (SELECT number FROM numbers(10) WHERE number > 10); diff --git a/tests/queries/0_stateless/02339_analyzer_matcher_basic.reference b/tests/queries/0_stateless/02339_analyzer_matcher_basic.reference index 3ca0d303793..7e263647f98 100644 --- a/tests/queries/0_stateless/02339_analyzer_matcher_basic.reference +++ b/tests/queries/0_stateless/02339_analyzer_matcher_basic.reference @@ -38,6 +38,21 @@ id UInt64 value String 0 Value Database and table qualified matchers +-- +id UInt64 +value String +0 Value +-- +id UInt64 +0 +-- +id UInt64 +value String +0 Value +-- +id UInt64 +value String +0 Value APPLY transformer -- toString(id) String @@ -74,20 +89,20 @@ toString(value) String Value REPLACE transformer -- -5 UInt8 +id UInt8 value String 5 Value -- -5 UInt8 +id UInt8 value String 5 Value -- -5 UInt8 -6 UInt8 +id UInt8 +value UInt8 5 6 -- -5 UInt8 -6 UInt8 +id UInt8 +value UInt8 5 6 Combine EXCEPT, REPLACE, APPLY transformers -- diff --git a/tests/queries/0_stateless/02339_analyzer_matcher_basic.sql b/tests/queries/0_stateless/02339_analyzer_matcher_basic.sql index 9d7c486b28a..a09325fa43b 100644 --- a/tests/queries/0_stateless/02339_analyzer_matcher_basic.sql +++ b/tests/queries/0_stateless/02339_analyzer_matcher_basic.sql @@ -80,27 +80,25 @@ CREATE TABLE 02339_db.test_table INSERT INTO 02339_db.test_table VALUES (0, 'Value'); --- TODO: Qualified COLUMNS where identifier has more than 2 parts are not supported on parser level +SELECT '--'; --- SELECT '--'; +DESCRIBE (SELECT 02339_db.test_table.* FROM 02339_db.test_table); +SELECT 02339_db.test_table.* FROM 02339_db.test_table; --- DESCRIBE (SELECT 02339_db.test_table.* FROM 02339_db.test_table); --- SELECT 02339_db.test_table.* FROM 02339_db.test_table; +SELECT '--'; --- SELECT '--'; +DESCRIBE (SELECT 02339_db.test_table.COLUMNS(id) FROM 02339_db.test_table); +SELECT 02339_db.test_table.COLUMNS(id) FROM 02339_db.test_table; --- DESCRIBE (SELECT 02339_db.test_table.COLUMNS(id) FROM 02339_db.test_table); --- SELECT 02339_db.test_table.COLUMNS(id) FROM 02339_db.test_table; +SELECT '--'; --- SELECT '--'; +DESCRIBE (SELECT 02339_db.test_table.COLUMNS(id), 02339_db.test_table.COLUMNS(value) FROM 02339_db.test_table); +SELECT 02339_db.test_table.COLUMNS(id), 02339_db.test_table.COLUMNS(value) FROM 02339_db.test_table; --- DESCRIBE (SELECT 02339_db.test_table.COLUMNS(id), 02339_db.test_table.COLUMNS(value) FROM 02339_db.test_table); --- SELECT 02339_db.test_table.COLUMNS(id), 02339_db.test_table.COLUMNS(value) FROM 02339_db.test_table; +SELECT '--'; --- SELECT '--'; - --- DESCRIBE (SELECT 02339_db.test_table.COLUMNS('i'), 02339_db.test_table.COLUMNS('v') FROM 02339_db.test_table); --- SELECT 02339_db.test_table.COLUMNS('i'), 02339_db.test_table.COLUMNS('v') FROM 02339_db.test_table; +DESCRIBE (SELECT 02339_db.test_table.COLUMNS('i'), 02339_db.test_table.COLUMNS('v') FROM 02339_db.test_table); +SELECT 02339_db.test_table.COLUMNS('i'), 02339_db.test_table.COLUMNS('v') FROM 02339_db.test_table; DROP TABLE 02339_db.test_table; DROP DATABASE 02339_db; diff --git a/tests/queries/0_stateless/02378_analyzer_projection_names.reference b/tests/queries/0_stateless/02378_analyzer_projection_names.reference index 9e72fe0d100..a82d4d4c5d2 100644 --- a/tests/queries/0_stateless/02378_analyzer_projection_names.reference +++ b/tests/queries/0_stateless/02378_analyzer_projection_names.reference @@ -136,7 +136,7 @@ plus(id, id) UInt64 SELECT '--'; -- DESCRIBE (SELECT test_table.* REPLACE id + (id AS id_alias) AS id, id_alias FROM test_table); -plus(id, id_alias) UInt64 +id UInt64 value String id_alias UInt64 SELECT 'Matcher'; From 14e01566a099a6b7861a5cc69826cacdf7b238bc Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Fri, 24 Feb 2023 18:59:47 +0100 Subject: [PATCH 376/841] Fixed tests --- src/Analyzer/IQueryTreeNode.cpp | 7 +++++++ .../Passes/RewriteAggregateFunctionWithIfPass.cpp | 8 ++++++-- src/Interpreters/InterpreterCreateQuery.cpp | 6 ++++++ src/Planner/Planner.cpp | 3 ++- src/Planner/PlannerJoinTree.cpp | 2 +- 5 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/Analyzer/IQueryTreeNode.cpp b/src/Analyzer/IQueryTreeNode.cpp index 6b9b8b53d81..ba361af0007 100644 --- a/src/Analyzer/IQueryTreeNode.cpp +++ b/src/Analyzer/IQueryTreeNode.cpp @@ -263,6 +263,13 @@ QueryTreeNodePtr IQueryTreeNode::cloneAndReplace(const ReplacementMap & replacem const auto [node_to_clone, place_for_cloned_node] = nodes_to_clone.back(); nodes_to_clone.pop_back(); + auto already_cloned_node_it = old_pointer_to_new_pointer.find(node_to_clone); + if (already_cloned_node_it != old_pointer_to_new_pointer.end()) + { + *place_for_cloned_node = already_cloned_node_it->second; + continue; + } + auto it = replacement_map.find(node_to_clone); auto node_clone = it != replacement_map.end() ? it->second : node_to_clone->cloneImpl(); *place_for_cloned_node = node_clone; diff --git a/src/Analyzer/Passes/RewriteAggregateFunctionWithIfPass.cpp b/src/Analyzer/Passes/RewriteAggregateFunctionWithIfPass.cpp index 4039e058b34..de264948d4c 100644 --- a/src/Analyzer/Passes/RewriteAggregateFunctionWithIfPass.cpp +++ b/src/Analyzer/Passes/RewriteAggregateFunctionWithIfPass.cpp @@ -17,7 +17,6 @@ namespace DB { - namespace { @@ -90,9 +89,14 @@ private: static inline void resolveAsAggregateFunctionWithIf(FunctionNode & function_node, const DataTypes & argument_types) { auto result_type = function_node.getResultType(); + + std::string suffix = "If"; + if (result_type->isNullable()) + suffix = "OrNullIf"; + AggregateFunctionProperties properties; auto aggregate_function = AggregateFunctionFactory::instance().get( - function_node.getFunctionName() + (result_type->isNullable() ? "IfOrNull" : "If"), + function_node.getFunctionName() + suffix, argument_types, function_node.getAggregateFunction()->getParameters(), properties); diff --git a/src/Interpreters/InterpreterCreateQuery.cpp b/src/Interpreters/InterpreterCreateQuery.cpp index edc6cc92fd7..29b7a4db609 100644 --- a/src/Interpreters/InterpreterCreateQuery.cpp +++ b/src/Interpreters/InterpreterCreateQuery.cpp @@ -1224,6 +1224,12 @@ BlockIO InterpreterCreateQuery::createTable(ASTCreateQuery & create) output_columns.push_back(output_column->cloneEmpty()); } } + + ActionsDAG::makeConvertingActions( + input_columns, + output_columns, + ActionsDAG::MatchColumnsMode::Position + ); } } diff --git a/src/Planner/Planner.cpp b/src/Planner/Planner.cpp index 49120c91db2..a65ee60edfa 100644 --- a/src/Planner/Planner.cpp +++ b/src/Planner/Planner.cpp @@ -1440,7 +1440,8 @@ void Planner::buildPlanForQueryNode() } } - addBuildSubqueriesForSetsStepIfNeeded(query_plan, select_query_options, planner_context, result_actions_to_execute); + if (!select_query_options.only_analyze) + addBuildSubqueriesForSetsStepIfNeeded(query_plan, select_query_options, planner_context, result_actions_to_execute); } void Planner::addStorageLimits(const StorageLimitsList & limits) diff --git a/src/Planner/PlannerJoinTree.cpp b/src/Planner/PlannerJoinTree.cpp index f8e4a3b7021..06424b041ba 100644 --- a/src/Planner/PlannerJoinTree.cpp +++ b/src/Planner/PlannerJoinTree.cpp @@ -360,7 +360,7 @@ JoinTreeQueryPlan buildQueryPlanForTableExpression(const QueryTreeNodePtr & tabl auto projection_columns = query_node ? query_node->getProjectionColumns() : union_node->computeProjectionColumns(); Block source_header; for (auto & projection_column : projection_columns) - source_header.insert(ColumnWithTypeAndName(nullptr, projection_column.type, projection_column.name)); + source_header.insert(ColumnWithTypeAndName(projection_column.type, projection_column.name)); Pipe pipe(std::make_shared(source_header)); auto read_from_pipe = std::make_unique(std::move(pipe)); From d39be3ac9ca3d0c6402867f000d6e938a22580b1 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Sat, 25 Feb 2023 20:16:51 +0100 Subject: [PATCH 377/841] Fixed tests --- src/Analyzer/ColumnNode.cpp | 11 +- src/Analyzer/IdentifierNode.cpp | 10 +- src/Analyzer/Passes/CrossToInnerJoinPass.cpp | 35 +-- .../Passes/CustomizeFunctionsPass.cpp | 77 ------- src/Analyzer/Passes/CustomizeFunctionsPass.h | 25 --- src/Analyzer/Passes/QueryAnalysisPass.cpp | 200 +++++++++++------- src/Analyzer/Passes/QueryAnalysisPass.h | 1 + src/Analyzer/QueryTreePassManager.cpp | 3 - src/Analyzer/TableFunctionNode.cpp | 9 +- src/Analyzer/TableNode.cpp | 21 +- src/Analyzer/TableNode.h | 13 ++ src/Analyzer/Utils.cpp | 28 +++ src/Analyzer/Utils.h | 11 + src/Functions/FunctionsExternalDictionaries.h | 25 +-- src/Functions/formatRow.cpp | 25 ++- .../ExternalDictionariesLoader.cpp | 5 + src/Interpreters/ExternalDictionariesLoader.h | 2 + src/Parsers/ExpressionElementParsers.cpp | 4 +- src/Planner/PlannerJoinTree.cpp | 21 +- src/Storages/StorageDistributed.cpp | 4 +- ..._no_aggregates_and_constant_keys.reference | 8 +- ..._shard_no_aggregates_and_constant_keys.sql | 3 +- .../00313_const_totals_extremes.reference | 12 +- .../00313_const_totals_extremes.sh | 12 +- ...01013_totals_without_aggregation.reference | 6 +- .../01013_totals_without_aggregation.sql | 2 + .../01115_join_with_dictionary.sql | 4 +- .../01470_columns_transformers.sql | 8 +- .../01603_decimal_mult_float.reference | 2 +- .../0_stateless/01603_decimal_mult_float.sql | 2 + .../0_stateless/01774_tuple_null_in.reference | 1 - .../0_stateless/01774_tuple_null_in.sql | 1 - ...hree_parts_identifiers_in_wrong_places.sql | 8 +- ..._with_statement_non_exist_column.reference | 1 - .../02354_with_statement_non_exist_column.sql | 2 - ..._group_by_without_key_and_totals.reference | 8 +- .../00081_group_by_without_key_and_totals.sql | 2 + 37 files changed, 323 insertions(+), 289 deletions(-) delete mode 100644 src/Analyzer/Passes/CustomizeFunctionsPass.cpp delete mode 100644 src/Analyzer/Passes/CustomizeFunctionsPass.h diff --git a/src/Analyzer/ColumnNode.cpp b/src/Analyzer/ColumnNode.cpp index b9939df37bb..c07d7bab717 100644 --- a/src/Analyzer/ColumnNode.cpp +++ b/src/Analyzer/ColumnNode.cpp @@ -110,8 +110,15 @@ ASTPtr ColumnNode::toASTImpl() const } else if (auto * table_node = column_source->as()) { - const auto & table_storage_id = table_node->getStorageID(); - column_identifier_parts = {table_storage_id.getDatabaseName(), table_storage_id.getTableName()}; + if (!table_node->getTemporaryTableName().empty()) + { + column_identifier_parts = { table_node->getTemporaryTableName() }; + } + else + { + const auto & table_storage_id = table_node->getStorageID(); + column_identifier_parts = { table_storage_id.getDatabaseName(), table_storage_id.getTableName() }; + } } } } diff --git a/src/Analyzer/IdentifierNode.cpp b/src/Analyzer/IdentifierNode.cpp index 4efc7f515ea..cb5d9609962 100644 --- a/src/Analyzer/IdentifierNode.cpp +++ b/src/Analyzer/IdentifierNode.cpp @@ -40,15 +40,7 @@ void IdentifierNode::dumpTreeImpl(WriteBuffer & buffer, FormatState & format_sta bool IdentifierNode::isEqualImpl(const IQueryTreeNode & rhs) const { const auto & rhs_typed = assert_cast(rhs); - - if (table_expression_modifiers && rhs_typed.table_expression_modifiers && table_expression_modifiers != rhs_typed.table_expression_modifiers) - return false; - else if (table_expression_modifiers && !rhs_typed.table_expression_modifiers) - return false; - else if (!table_expression_modifiers && rhs_typed.table_expression_modifiers) - return false; - - return identifier == rhs_typed.identifier; + return identifier == rhs_typed.identifier && table_expression_modifiers == rhs_typed.table_expression_modifiers; } void IdentifierNode::updateTreeHashImpl(HashState & state) const diff --git a/src/Analyzer/Passes/CrossToInnerJoinPass.cpp b/src/Analyzer/Passes/CrossToInnerJoinPass.cpp index 4f62d6ef068..d4877d23f28 100644 --- a/src/Analyzer/Passes/CrossToInnerJoinPass.cpp +++ b/src/Analyzer/Passes/CrossToInnerJoinPass.cpp @@ -1,5 +1,7 @@ #include +#include + #include #include @@ -152,25 +154,34 @@ public: QueryTreeNodes other_conditions; exctractJoinConditions(where_condition, equi_conditions, other_conditions); bool can_convert_cross_to_inner = false; - for (auto & cond : equi_conditions) + for (auto & condition : equi_conditions) { - auto left_src = getExpressionSource(getEquiArgument(cond, 0)); - auto right_src = getExpressionSource(getEquiArgument(cond, 1)); - if (left_src.second && right_src.second && left_src.first && right_src.first) - { - bool can_join_on = (findInTableExpression(left_src.first, left_table) && findInTableExpression(right_src.first, right_table)) - || (findInTableExpression(left_src.first, right_table) && findInTableExpression(right_src.first, left_table)); + const auto & lhs_equi_argument = getEquiArgument(condition, 0); + const auto & rhs_equi_argument = getEquiArgument(condition, 1); - if (can_join_on) + DataTypes key_types = {lhs_equi_argument->getResultType(), rhs_equi_argument->getResultType()}; + DataTypePtr common_key_type = tryGetLeastSupertype(key_types); + + /// If there is common key type, we can join on this condition + if (common_key_type) + { + auto left_src = getExpressionSource(lhs_equi_argument); + auto right_src = getExpressionSource(rhs_equi_argument); + + if (left_src.second && right_src.second && left_src.first && right_src.first) { - can_convert_cross_to_inner = true; - continue; + if ((findInTableExpression(left_src.first, left_table) && findInTableExpression(right_src.first, right_table)) || + (findInTableExpression(left_src.first, right_table) && findInTableExpression(right_src.first, left_table))) + { + can_convert_cross_to_inner = true; + continue; + } } } /// Can't join on this condition, move it to other conditions - other_conditions.push_back(cond); - cond = nullptr; + other_conditions.push_back(condition); + condition = nullptr; } if (!can_convert_cross_to_inner) diff --git a/src/Analyzer/Passes/CustomizeFunctionsPass.cpp b/src/Analyzer/Passes/CustomizeFunctionsPass.cpp deleted file mode 100644 index 55307fd39e7..00000000000 --- a/src/Analyzer/Passes/CustomizeFunctionsPass.cpp +++ /dev/null @@ -1,77 +0,0 @@ -#include - -#include -#include - -#include - -#include - -#include -#include - -namespace DB -{ - -namespace -{ - -class CustomizeFunctionsVisitor : public InDepthQueryTreeVisitorWithContext -{ -public: - using Base = InDepthQueryTreeVisitorWithContext; - using Base::Base; - - void visitImpl(QueryTreeNodePtr & node) const - { - auto * function_node = node->as(); - if (!function_node) - return; - - const auto & settings = getSettings(); - - /// After successful function replacement function name and function name lowercase must be recalculated - auto function_name = function_node->getFunctionName(); - auto function_name_lowercase = Poco::toLower(function_name); - - if (settings.transform_null_in) - { - auto function_result_type = function_node->getResultType(); - - static constexpr std::array, 4> in_function_to_replace_null_in_function_map = - {{ - {"in", "nullIn"}, - {"notin", "notNullIn"}, - {"globalin", "globalNullIn"}, - {"globalnotin", "globalNotNullIn"}, - }}; - - for (const auto & [in_function_name, in_function_name_to_replace] : in_function_to_replace_null_in_function_map) - { - if (function_name_lowercase == in_function_name) - { - resolveOrdinaryFunctionNode(*function_node, String(in_function_name_to_replace)); - function_name = function_node->getFunctionName(); - function_name_lowercase = Poco::toLower(function_name); - break; - } - } - } - } - - inline void resolveOrdinaryFunctionNode(FunctionNode & function_node, const String & function_name) const - { - auto function = FunctionFactory::instance().get(function_name, getContext()); - function_node.resolveAsFunction(function->build(function_node.getArgumentColumns())); - } -}; - -} - -void CustomizeFunctionsPass::run(QueryTreeNodePtr query_tree_node, ContextPtr context) -{ - CustomizeFunctionsVisitor visitor(std::move(context)); - visitor.visit(query_tree_node); -} - -} diff --git a/src/Analyzer/Passes/CustomizeFunctionsPass.h b/src/Analyzer/Passes/CustomizeFunctionsPass.h deleted file mode 100644 index 7145099ca4c..00000000000 --- a/src/Analyzer/Passes/CustomizeFunctionsPass.h +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - -#include - -namespace DB -{ - -/** Customize aggregate functions and `in` functions implementations. - * - * Example: SELECT countDistinct(); - * Result: SELECT countDistinctImplementation(); - * Function countDistinctImplementation is taken from settings.count_distinct_implementation. - */ -class CustomizeFunctionsPass final : public IQueryTreePass -{ -public: - String getName() override { return "CustomizeFunctions"; } - - String getDescription() override { return "Customize implementation of aggregate functions, and in functions."; } - - void run(QueryTreeNodePtr query_tree_node, ContextPtr context) override; - -}; - -} diff --git a/src/Analyzer/Passes/QueryAnalysisPass.cpp b/src/Analyzer/Passes/QueryAnalysisPass.cpp index 9d1a096e582..01b9494bfc3 100644 --- a/src/Analyzer/Passes/QueryAnalysisPass.cpp +++ b/src/Analyzer/Passes/QueryAnalysisPass.cpp @@ -37,14 +37,16 @@ #include #include +#include +#include #include #include -#include #include -#include #include -#include +#include +#include +#include #include @@ -92,6 +94,7 @@ namespace ErrorCodes extern const int CYCLIC_ALIASES; extern const int INCORRECT_RESULT_OF_SCALAR_SUBQUERY; extern const int BAD_ARGUMENTS; + extern const int ILLEGAL_TYPE_OF_ARGUMENT; extern const int MULTIPLE_EXPRESSIONS_FOR_ALIAS; extern const int TYPE_MISMATCH; extern const int AMBIGUOUS_IDENTIFIER; @@ -1971,26 +1974,10 @@ void QueryAnalyzer::evaluateScalarSubqueryIfNeeded(QueryTreeNodePtr & node, Iden auto constant_node = std::make_shared(std::move(constant_value), node); if (constant_node->getValue().isNull()) - { - std::string cast_type = constant_node->getResultType()->getName(); - std::string cast_function_name = "_CAST"; - - auto cast_type_constant_value = std::make_shared(std::move(cast_type), std::make_shared()); - auto cast_type_constant_node = std::make_shared(std::move(cast_type_constant_value)); - - auto cast_function_node = std::make_shared(cast_function_name); - cast_function_node->getArguments().getNodes().push_back(constant_node); - cast_function_node->getArguments().getNodes().push_back(std::move(cast_type_constant_node)); - - auto cast_function = FunctionFactory::instance().get(cast_function_name, context); - cast_function_node->resolveAsFunction(cast_function->build(cast_function_node->getArgumentColumns())); - - node = std::move(cast_function_node); - } + node = buildCastFunction(constant_node, constant_node->getResultType(), context); else - { node = std::move(constant_node); - } + return; } @@ -2333,6 +2320,8 @@ QueryTreeNodePtr QueryAnalyzer::tryResolveTableIdentifierFromDatabaseCatalog(con StorageID storage_id(database_name, table_name); storage_id = context->resolveStorageID(storage_id); + bool is_temporary_table = storage_id.getDatabaseName() == DatabaseCatalog::TEMPORARY_DATABASE; + auto storage = DatabaseCatalog::instance().tryGetTable(storage_id, context); if (!storage) return {}; @@ -2340,7 +2329,11 @@ QueryTreeNodePtr QueryAnalyzer::tryResolveTableIdentifierFromDatabaseCatalog(con auto storage_lock = storage->lockForShare(context->getInitialQueryId(), context->getSettingsRef().lock_acquire_timeout); auto storage_snapshot = storage->getStorageSnapshot(storage->getInMemoryMetadataPtr(), context); - return std::make_shared(std::move(storage), std::move(storage_lock), std::move(storage_snapshot)); + auto result = std::make_shared(std::move(storage), std::move(storage_lock), std::move(storage_snapshot)); + if (is_temporary_table) + result->setTemporaryTableName(table_name); + + return result; } /// Resolve identifier from compound expression @@ -3961,17 +3954,16 @@ ProjectionNames QueryAnalyzer::resolveMatcher(QueryTreeNodePtr & matcher_node, I matched_expression_nodes_with_names = resolveUnqualifiedMatcher(matcher_node, scope); std::unordered_map> strict_transformer_to_used_column_names; - auto add_strict_transformer_column_name = [&](const IColumnTransformerNode * transformer, const std::string & column_name) + for (const auto & transformer : matcher_node_typed.getColumnTransformers().getNodes()) { - auto it = strict_transformer_to_used_column_names.find(transformer); - if (it == strict_transformer_to_used_column_names.end()) - { - auto [inserted_it, _] = strict_transformer_to_used_column_names.emplace(transformer, std::unordered_set()); - it = inserted_it; - } + auto * except_transformer = transformer->as(); + auto * replace_transformer = transformer->as(); - it->second.insert(column_name); - }; + if (except_transformer && except_transformer->isStrict()) + strict_transformer_to_used_column_names.emplace(except_transformer, std::unordered_set()); + else if (replace_transformer && replace_transformer->isStrict()) + strict_transformer_to_used_column_names.emplace(replace_transformer, std::unordered_set()); + } ListNodePtr list = std::make_shared(); ProjectionNames result_projection_names; @@ -4026,12 +4018,12 @@ ProjectionNames QueryAnalyzer::resolveMatcher(QueryTreeNodePtr & matcher_node, I else if (auto * except_transformer = transformer->as()) { if (apply_transformer_was_used || replace_transformer_was_used) - break; + continue; if (except_transformer->isColumnMatching(column_name)) { if (except_transformer->isStrict()) - add_strict_transformer_column_name(except_transformer, column_name); + strict_transformer_to_used_column_names[except_transformer].insert(column_name); node = {}; break; @@ -4040,7 +4032,7 @@ ProjectionNames QueryAnalyzer::resolveMatcher(QueryTreeNodePtr & matcher_node, I else if (auto * replace_transformer = transformer->as()) { if (apply_transformer_was_used || replace_transformer_was_used) - break; + continue; replace_transformer_was_used = true; @@ -4049,7 +4041,7 @@ ProjectionNames QueryAnalyzer::resolveMatcher(QueryTreeNodePtr & matcher_node, I continue; if (replace_transformer->isStrict()) - add_strict_transformer_column_name(replace_transformer, column_name); + strict_transformer_to_used_column_names[replace_transformer].insert(column_name); node = replace_expression->clone(); node_projection_names = resolveExpressionNode(node, scope, false /*allow_lambda_expression*/, false /*allow_table_expression*/); @@ -4140,22 +4132,12 @@ ProjectionNames QueryAnalyzer::resolveMatcher(QueryTreeNodePtr & matcher_node, I non_matched_column_names.push_back(column_name); } - WriteBufferFromOwnString non_matched_column_names_buffer; - size_t non_matched_column_names_size = non_matched_column_names.size(); - for (size_t i = 0; i < non_matched_column_names_size; ++i) - { - const auto & column_name = non_matched_column_names[i]; - - non_matched_column_names_buffer << column_name; - if (i + 1 != non_matched_column_names_size) - non_matched_column_names_buffer << ", "; - } - throw Exception(ErrorCodes::BAD_ARGUMENTS, - "Strict {} column transformer {} expects following column(s) {}", + "Strict {} column transformer {} expects following column(s) : {}. In scope {}", toString(strict_transformer_type), strict_transformer->formatASTForErrorMessage(), - non_matched_column_names_buffer.str()); + fmt::join(non_matched_column_names, ", "), + scope.scope_node->formatASTForErrorMessage()); } matcher_node = std::move(list); @@ -4449,17 +4431,26 @@ ProjectionNames QueryAnalyzer::resolveFunction(QueryTreeNodePtr & node, Identifi } bool is_special_function_in = false; - bool is_special_function_dict_get_or_join_get = false; + bool is_special_function_dict_get = false; + bool is_special_function_join_get = false; bool is_special_function_exists = false; if (!lambda_expression_untyped) { is_special_function_in = isNameOfInFunction(function_name); - is_special_function_dict_get_or_join_get = functionIsJoinGet(function_name) || functionIsDictGet(function_name); + is_special_function_dict_get = functionIsDictGet(function_name); + is_special_function_join_get = functionIsJoinGet(function_name); is_special_function_exists = function_name == "exists"; - /// Handle SELECT count(*) FROM test_table - if (Poco::toLower(function_name) == "count" && function_node_ptr->getArguments().getNodes().size() == 1) + auto function_name_lowercase = Poco::toLower(function_name); + + /** Special handling for count and countState functions. + * + * Example: SELECT count(*) FROM test_table + * Example: SELECT countState(*) FROM test_table; + */ + if (function_node_ptr->getArguments().getNodes().size() == 1 && + (function_name_lowercase == "count" || function_name_lowercase == "countstate")) { auto * matcher_node = function_node_ptr->getArguments().getNodes().front()->as(); if (matcher_node && matcher_node->isUnqualified()) @@ -4476,19 +4467,56 @@ ProjectionNames QueryAnalyzer::resolveFunction(QueryTreeNodePtr & node, Identifi * Otherwise replace identifier with identifier full name constant. * Validation that dictionary exists or table exists will be performed during function `getReturnType` method call. */ - if (is_special_function_dict_get_or_join_get && + if ((is_special_function_dict_get || is_special_function_join_get) && !function_node_ptr->getArguments().getNodes().empty() && function_node_ptr->getArguments().getNodes()[0]->getNodeType() == QueryTreeNodeType::IDENTIFIER) { auto & first_argument = function_node_ptr->getArguments().getNodes()[0]; - auto & identifier_node = first_argument->as(); - IdentifierLookup identifier_lookup{identifier_node.getIdentifier(), IdentifierLookupContext::EXPRESSION}; + auto & first_argument_identifier = first_argument->as(); + auto identifier = first_argument_identifier.getIdentifier(); + + IdentifierLookup identifier_lookup{identifier, IdentifierLookupContext::EXPRESSION}; auto resolve_result = tryResolveIdentifier(identifier_lookup, scope); if (resolve_result.isResolved()) + { first_argument = std::move(resolve_result.resolved_identifier); + } else - first_argument = std::make_shared(identifier_node.getIdentifier().getFullName()); + { + size_t parts_size = identifier.getPartsSize(); + if (parts_size < 1 || parts_size > 2) + throw Exception(ErrorCodes::BAD_ARGUMENTS, + "Expected {} function first argument identifier to contain 1 or 2 parts. Actual '{}'. In scope {}", + function_name, + identifier.getFullName(), + scope.scope_node->formatASTForErrorMessage()); + + if (is_special_function_dict_get) + { + scope.context->getExternalDictionariesLoader().assertDictionaryStructureExists(identifier.getFullName(), scope.context); + } + else + { + auto table_node = tryResolveTableIdentifierFromDatabaseCatalog(identifier, scope.context); + if (!table_node) + throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, + "Function {} first argument expected table identifier '{}'. In scope {}", + function_name, + identifier.getFullName(), + scope.scope_node->formatASTForErrorMessage()); + + auto & table_node_typed = table_node->as(); + if (!std::dynamic_pointer_cast(table_node_typed.getStorage())) + throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, + "Function {} table '{}' should have engine StorageJoin. In scope {}", + function_name, + identifier.getFullName(), + scope.scope_node->formatASTForErrorMessage()); + } + + first_argument = std::make_shared(identifier.getFullName()); + } } /// Resolve function arguments @@ -4526,6 +4554,26 @@ ProjectionNames QueryAnalyzer::resolveFunction(QueryTreeNodePtr & node, Identifi /// Replace right IN function argument if it is table or table function with subquery that read ordinary columns if (is_special_function_in) { + if (scope.context->getSettingsRef().transform_null_in) + { + static constexpr std::array, 4> in_function_to_replace_null_in_function_map = + {{ + {"in", "nullIn"}, + {"notIn", "notNullIn"}, + {"globalIn", "globalNullIn"}, + {"globalNotIn", "globalNotNullIn"}, + }}; + + for (const auto & [in_function_name, in_function_name_to_replace] : in_function_to_replace_null_in_function_map) + { + if (function_name == in_function_name) + { + function_name = in_function_name_to_replace; + break; + } + } + } + auto & function_in_arguments_nodes = function_node.getArguments().getNodes(); if (function_in_arguments_nodes.size() != 2) throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, "Function '{}' expects 2 arguments", function_name); @@ -4586,6 +4634,7 @@ ProjectionNames QueryAnalyzer::resolveFunction(QueryTreeNodePtr & node, Identifi auto & function_argument = function_arguments[function_argument_index]; ColumnWithTypeAndName argument_column; + argument_column.name = arguments_projection_names[function_argument_index]; /** If function argument is lambda, save lambda argument index and initialize argument type as DataTypeFunction * where function argument types are initialized with empty array of lambda arguments size. @@ -4627,7 +4676,7 @@ ProjectionNames QueryAnalyzer::resolveFunction(QueryTreeNodePtr & node, Identifi } /// Calculate function projection name - ProjectionNames result_projection_names = {calculateFunctionProjectionName(node, parameters_projection_names, arguments_projection_names)}; + ProjectionNames result_projection_names = { calculateFunctionProjectionName(node, parameters_projection_names, arguments_projection_names) }; /** Try to resolve function as * 1. Lambda function in current scope. Example: WITH (x -> x + 1) AS lambda SELECT lambda(1); @@ -4939,7 +4988,7 @@ ProjectionNames QueryAnalyzer::resolveFunction(QueryTreeNodePtr & node, Identifi } /// Recalculate function projection name after lambda resolution - result_projection_names = {calculateFunctionProjectionName(node, parameters_projection_names, arguments_projection_names)}; + result_projection_names = { calculateFunctionProjectionName(node, parameters_projection_names, arguments_projection_names) }; } /** Create SET column for special function IN to allow constant folding @@ -5765,10 +5814,19 @@ void QueryAnalyzer::initializeTableExpressionData(const QueryTreeNodePtr & table if (table_node) { - const auto & table_storage_id = table_node->getStorageID(); - table_expression_data.database_name = table_storage_id.database_name; - table_expression_data.table_name = table_storage_id.table_name; - table_expression_data.table_expression_name = table_storage_id.getFullNameNotQuoted(); + if (!table_node->getTemporaryTableName().empty()) + { + table_expression_data.table_name = table_node->getTemporaryTableName(); + table_expression_data.table_expression_name = table_node->getTemporaryTableName(); + } + else + { + const auto & table_storage_id = table_node->getStorageID(); + table_expression_data.database_name = table_storage_id.database_name; + table_expression_data.table_name = table_storage_id.table_name; + table_expression_data.table_expression_name = table_storage_id.getFullNameNotQuoted(); + } + table_expression_data.table_expression_description = "table"; } else if (query_node || union_node) @@ -5814,7 +5872,9 @@ void QueryAnalyzer::initializeTableExpressionData(const QueryTreeNodePtr & table if (column_default && column_default->kind == ColumnDefaultKind::Alias) { - auto column_node = std::make_shared(column_name_and_type, buildQueryTree(column_default->expression, scope.context), table_expression_node); + auto alias_expression = buildQueryTree(column_default->expression, scope.context); + alias_expression = buildCastFunction(alias_expression, column_name_and_type.type, scope.context, false /*resolve*/); + auto column_node = std::make_shared(column_name_and_type, std::move(alias_expression), table_expression_node); column_name_to_column_node.emplace(column_name_and_type.name, column_node); alias_columns_to_resolve.emplace_back(column_name_and_type.name, column_node); } @@ -6181,13 +6241,6 @@ void QueryAnalyzer::resolveJoin(QueryTreeNodePtr & join_node, IdentifierResolveS IdentifierLookup identifier_lookup{identifier_node->getIdentifier(), IdentifierLookupContext::EXPRESSION}; auto result_left_table_expression = tryResolveIdentifierFromJoinTreeNode(identifier_lookup, join_node_typed.getLeftTableExpression(), scope); - if (!result_left_table_expression && identifier_node->hasAlias()) - { - std::vector alias_identifier_parts = {identifier_node->getAlias()}; - IdentifierLookup alias_identifier_lookup{Identifier(std::move(alias_identifier_parts)), IdentifierLookupContext::EXPRESSION}; - result_left_table_expression = tryResolveIdentifierFromJoinTreeNode(alias_identifier_lookup, join_node_typed.getLeftTableExpression(), scope); - } - if (!result_left_table_expression) throw Exception(ErrorCodes::UNKNOWN_IDENTIFIER, "JOIN {} using identifier '{}' cannot be resolved from left table expression. In scope {}", @@ -6203,13 +6256,6 @@ void QueryAnalyzer::resolveJoin(QueryTreeNodePtr & join_node, IdentifierResolveS scope.scope_node->formatASTForErrorMessage()); auto result_right_table_expression = tryResolveIdentifierFromJoinTreeNode(identifier_lookup, join_node_typed.getRightTableExpression(), scope); - if (!result_right_table_expression && identifier_node->hasAlias()) - { - std::vector alias_identifier_parts = {identifier_node->getAlias()}; - IdentifierLookup alias_identifier_lookup{Identifier(std::move(alias_identifier_parts)), IdentifierLookupContext::EXPRESSION}; - result_right_table_expression = tryResolveIdentifierFromJoinTreeNode(alias_identifier_lookup, join_node_typed.getRightTableExpression(), scope); - } - if (!result_right_table_expression) throw Exception(ErrorCodes::UNKNOWN_IDENTIFIER, "JOIN {} using identifier '{}' cannot be resolved from right table expression. In scope {}", diff --git a/src/Analyzer/Passes/QueryAnalysisPass.h b/src/Analyzer/Passes/QueryAnalysisPass.h index 8b3a8a116e5..a4ee685812d 100644 --- a/src/Analyzer/Passes/QueryAnalysisPass.h +++ b/src/Analyzer/Passes/QueryAnalysisPass.h @@ -54,6 +54,7 @@ namespace DB * Replace `countDistinct` and `countIfDistinct` aggregate functions using setting count_distinct_implementation. * Add -OrNull suffix to aggregate functions if setting aggregate_functions_null_for_empty is true. * Function `exists` is converted into `in`. + * Functions `in`, `notIn`, `globalIn`, `globalNotIn` converted into `nullIn`, `notNullIn`, `globalNullIn`, `globalNotNullIn` if setting transform_null_in is true. * * For function `grouping` arguments are resolved, but it is planner responsibility to initialize it with concrete grouping function * based on group by kind and group by keys positions. diff --git a/src/Analyzer/QueryTreePassManager.cpp b/src/Analyzer/QueryTreePassManager.cpp index dfac2f499dd..2cecf4f81a2 100644 --- a/src/Analyzer/QueryTreePassManager.cpp +++ b/src/Analyzer/QueryTreePassManager.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -242,8 +241,6 @@ void addQueryTreePasses(QueryTreePassManager & manager) manager.addPass(std::make_unique()); manager.addPass(std::make_unique()); - manager.addPass(std::make_unique()); - manager.addPass(std::make_unique()); manager.addPass(std::make_unique()); manager.addPass(std::make_unique()); diff --git a/src/Analyzer/TableFunctionNode.cpp b/src/Analyzer/TableFunctionNode.cpp index c8cd05cf685..fb3a3af31e1 100644 --- a/src/Analyzer/TableFunctionNode.cpp +++ b/src/Analyzer/TableFunctionNode.cpp @@ -82,14 +82,7 @@ bool TableFunctionNode::isEqualImpl(const IQueryTreeNode & rhs) const if (storage && rhs_typed.storage) return storage_id == rhs_typed.storage_id; - if (table_expression_modifiers && rhs_typed.table_expression_modifiers && table_expression_modifiers != rhs_typed.table_expression_modifiers) - return false; - else if (table_expression_modifiers && !rhs_typed.table_expression_modifiers) - return false; - else if (!table_expression_modifiers && rhs_typed.table_expression_modifiers) - return false; - - return true; + return table_expression_modifiers == rhs_typed.table_expression_modifiers; } void TableFunctionNode::updateTreeHashImpl(HashState & state) const diff --git a/src/Analyzer/TableNode.cpp b/src/Analyzer/TableNode.cpp index 1018570c3d4..a746986be04 100644 --- a/src/Analyzer/TableNode.cpp +++ b/src/Analyzer/TableNode.cpp @@ -42,6 +42,9 @@ void TableNode::dumpTreeImpl(WriteBuffer & buffer, FormatState & format_state, s buffer << ", table_name: " << storage_id.getFullNameNotQuoted(); + if (!temporary_table_name.empty()) + buffer << ", temporary_table_name: " << temporary_table_name; + if (table_expression_modifiers) { buffer << ", "; @@ -52,15 +55,8 @@ void TableNode::dumpTreeImpl(WriteBuffer & buffer, FormatState & format_state, s bool TableNode::isEqualImpl(const IQueryTreeNode & rhs) const { const auto & rhs_typed = assert_cast(rhs); - - if (table_expression_modifiers && rhs_typed.table_expression_modifiers && table_expression_modifiers != rhs_typed.table_expression_modifiers) - return false; - else if (table_expression_modifiers && !rhs_typed.table_expression_modifiers) - return false; - else if (!table_expression_modifiers && rhs_typed.table_expression_modifiers) - return false; - - return storage_id == rhs_typed.storage_id; + return storage_id == rhs_typed.storage_id && table_expression_modifiers == rhs_typed.table_expression_modifiers && + temporary_table_name == rhs_typed.temporary_table_name; } void TableNode::updateTreeHashImpl(HashState & state) const @@ -69,6 +65,9 @@ void TableNode::updateTreeHashImpl(HashState & state) const state.update(full_name.size()); state.update(full_name); + state.update(temporary_table_name.size()); + state.update(temporary_table_name); + if (table_expression_modifiers) table_expression_modifiers->updateTreeHash(state); } @@ -77,12 +76,16 @@ QueryTreeNodePtr TableNode::cloneImpl() const { auto result_table_node = std::make_shared(storage, storage_id, storage_lock, storage_snapshot); result_table_node->table_expression_modifiers = table_expression_modifiers; + result_table_node->temporary_table_name = temporary_table_name; return result_table_node; } ASTPtr TableNode::toASTImpl() const { + if (!temporary_table_name.empty()) + return std::make_shared(temporary_table_name); + return std::make_shared(storage_id.getDatabaseName(), storage_id.getTableName()); } diff --git a/src/Analyzer/TableNode.h b/src/Analyzer/TableNode.h index 6d47f87c78b..1d5ec112ee0 100644 --- a/src/Analyzer/TableNode.h +++ b/src/Analyzer/TableNode.h @@ -56,6 +56,18 @@ public: return storage_lock; } + /// Get temporary table name + const std::string & getTemporaryTableName() const + { + return temporary_table_name; + } + + /// Set temporary table name + void setTemporaryTableName(std::string temporary_table_name_value) + { + temporary_table_name = std::move(temporary_table_name_value); + } + /// Return true if table node has table expression modifiers, false otherwise bool hasTableExpressionModifiers() const { @@ -102,6 +114,7 @@ private: TableLockHolder storage_lock; StorageSnapshotPtr storage_snapshot; std::optional table_expression_modifiers; + std::string temporary_table_name; static constexpr size_t children_size = 0; }; diff --git a/src/Analyzer/Utils.cpp b/src/Analyzer/Utils.cpp index e746a8ff570..c5a5c042cbc 100644 --- a/src/Analyzer/Utils.cpp +++ b/src/Analyzer/Utils.cpp @@ -5,13 +5,18 @@ #include #include +#include #include #include #include +#include + +#include #include #include +#include #include #include #include @@ -74,6 +79,29 @@ bool isNameOfInFunction(const std::string & function_name) return is_special_function_in; } +QueryTreeNodePtr buildCastFunction(const QueryTreeNodePtr & expression, + const DataTypePtr & type, + const ContextPtr & context, + bool resolve) +{ + std::string cast_type = type->getName(); + auto cast_type_constant_value = std::make_shared(std::move(cast_type), std::make_shared()); + auto cast_type_constant_node = std::make_shared(std::move(cast_type_constant_value)); + + std::string cast_function_name = "_CAST"; + auto cast_function_node = std::make_shared(cast_function_name); + cast_function_node->getArguments().getNodes().push_back(expression); + cast_function_node->getArguments().getNodes().push_back(std::move(cast_type_constant_node)); + + if (resolve) + { + auto cast_function = FunctionFactory::instance().get(cast_function_name, context); + cast_function_node->resolveAsFunction(cast_function->build(cast_function_node->getArgumentColumns())); + } + + return cast_function_node; +} + static ASTPtr convertIntoTableExpressionAST(const QueryTreeNodePtr & table_expression_node) { ASTPtr table_expression_node_ast; diff --git a/src/Analyzer/Utils.h b/src/Analyzer/Utils.h index 0f54b5cadd5..3e2d95c6012 100644 --- a/src/Analyzer/Utils.h +++ b/src/Analyzer/Utils.h @@ -2,6 +2,8 @@ #include +#include + namespace DB { @@ -11,6 +13,15 @@ bool isNodePartOfTree(const IQueryTreeNode * node, const IQueryTreeNode * root); /// Returns true if function name is name of IN function or its variations, false otherwise bool isNameOfInFunction(const std::string & function_name); +/** Build cast function that cast expression into type. + * If resolve = true, then result cast function is resolved during build, otherwise + * result cast function is not resolved during build. + */ +QueryTreeNodePtr buildCastFunction(const QueryTreeNodePtr & expression, + const DataTypePtr & type, + const ContextPtr & context, + bool resolve = true); + /** Add table expression in tables in select query children. * If table expression node is not of identifier node, table node, query node, table function node, join node or array join node type throws logical error exception. */ diff --git a/src/Functions/FunctionsExternalDictionaries.h b/src/Functions/FunctionsExternalDictionaries.h index 48ecc13da39..570147e4c86 100644 --- a/src/Functions/FunctionsExternalDictionaries.h +++ b/src/Functions/FunctionsExternalDictionaries.h @@ -675,27 +675,28 @@ private: return impl.isInjective(sample_columns); } - DataTypePtr getReturnTypeImpl(const DataTypes &) const override + DataTypePtr getReturnTypeImpl(const ColumnsWithTypeAndName & arguments) const override { - DataTypePtr result; + DataTypePtr result_type; if constexpr (IsDataTypeDecimal) - result = std::make_shared(DataType::maxPrecision(), 0); + result_type = std::make_shared(DataType::maxPrecision(), 0); else - result = std::make_shared(); + result_type = std::make_shared(); - return result; + auto return_type = impl.getReturnTypeImpl(arguments); + if (!return_type->equals(*result_type)) + throw Exception(ErrorCodes::TYPE_MISMATCH, "Function {} dictionary attribute has different type {} expected {}", + getName(), + return_type->getName(), + result_type->getName()); + + return result_type; } ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr & result_type, size_t input_rows_count) const override { - auto return_type = impl.getReturnTypeImpl(arguments); - - if (!return_type->equals(*result_type)) - throw Exception(ErrorCodes::TYPE_MISMATCH, "Dictionary attribute has different type {} expected {}", - return_type->getName(), result_type->getName()); - - return impl.executeImpl(arguments, return_type, input_rows_count); + return impl.executeImpl(arguments, result_type, input_rows_count); } const FunctionDictGetNoType impl; diff --git a/src/Functions/formatRow.cpp b/src/Functions/formatRow.cpp index 53fb5d61472..12a5fc2cc27 100644 --- a/src/Functions/formatRow.cpp +++ b/src/Functions/formatRow.cpp @@ -35,7 +35,10 @@ class FunctionFormatRow : public IFunction public: static constexpr auto name = no_newline ? "formatRowNoNewline" : "formatRow"; - FunctionFormatRow(const String & format_name_, ContextPtr context_) : format_name(format_name_), context(context_) + FunctionFormatRow(String format_name_, Names arguments_column_names_, ContextPtr context_) + : format_name(std::move(format_name_)) + , arguments_column_names(std::move(arguments_column_names_)) + , context(std::move(context_)) { if (!FormatFactory::instance().getAllFormats().contains(format_name)) throw Exception(ErrorCodes::UNKNOWN_FORMAT, "Unknown format {}", format_name); @@ -55,9 +58,17 @@ public: WriteBufferFromVector buffer(vec); ColumnString::Offsets & offsets = col_str->getOffsets(); offsets.resize(input_rows_count); + Block arg_columns; - for (auto i = 1u; i < arguments.size(); ++i) - arg_columns.insert(arguments[i]); + + size_t arguments_size = arguments.size(); + for (size_t i = 1; i < arguments_size; ++i) + { + auto argument_column = arguments[i]; + argument_column.name = arguments_column_names[i]; + arg_columns.insert(std::move(argument_column)); + } + materializeBlockInplace(arg_columns); auto format_settings = getFormatSettings(context); auto out = FormatFactory::instance().getOutputFormat(format_name, buffer, arg_columns, context, format_settings); @@ -93,6 +104,7 @@ public: private: String format_name; + Names arguments_column_names; ContextPtr context; }; @@ -115,9 +127,14 @@ public: throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, "Function {} requires at least two arguments: the format name and its output expression(s)", getName()); + Names arguments_column_names; + arguments_column_names.reserve(arguments.size()); + for (const auto & argument : arguments) + arguments_column_names.push_back(argument.name); + if (const auto * name_col = checkAndGetColumnConst(arguments.at(0).column.get())) return std::make_unique( - std::make_shared>(name_col->getValue(), context), + std::make_shared>(name_col->getValue(), std::move(arguments_column_names), context), collections::map(arguments, [](const auto & elem) { return elem.type; }), return_type); else diff --git a/src/Interpreters/ExternalDictionariesLoader.cpp b/src/Interpreters/ExternalDictionariesLoader.cpp index 2de0ff13e2b..080878c7d86 100644 --- a/src/Interpreters/ExternalDictionariesLoader.cpp +++ b/src/Interpreters/ExternalDictionariesLoader.cpp @@ -85,6 +85,11 @@ DictionaryStructure ExternalDictionariesLoader::getDictionaryStructure(const std return ExternalDictionariesLoader::getDictionaryStructure(*load_result.config); } +void ExternalDictionariesLoader::assertDictionaryStructureExists(const std::string & dictionary_name, ContextPtr query_context) const +{ + getDictionaryStructure(dictionary_name, query_context); +} + QualifiedTableName ExternalDictionariesLoader::qualifyDictionaryNameWithDatabase(const std::string & dictionary_name, ContextPtr query_context) const { auto qualified_name = QualifiedTableName::tryParseFromString(dictionary_name); diff --git a/src/Interpreters/ExternalDictionariesLoader.h b/src/Interpreters/ExternalDictionariesLoader.h index 421154a6d4f..659820d02ac 100644 --- a/src/Interpreters/ExternalDictionariesLoader.h +++ b/src/Interpreters/ExternalDictionariesLoader.h @@ -31,6 +31,8 @@ public: DictionaryStructure getDictionaryStructure(const std::string & dictionary_name, ContextPtr context) const; + void assertDictionaryStructureExists(const std::string & dictionary_name, ContextPtr context) const; + static DictionaryStructure getDictionaryStructure(const Poco::Util::AbstractConfiguration & config, const std::string & key_in_config = "dictionary"); static DictionaryStructure getDictionaryStructure(const ObjectConfig & config); diff --git a/src/Parsers/ExpressionElementParsers.cpp b/src/Parsers/ExpressionElementParsers.cpp index f2660e5a40c..72353a42a87 100644 --- a/src/Parsers/ExpressionElementParsers.cpp +++ b/src/Parsers/ExpressionElementParsers.cpp @@ -1474,7 +1474,7 @@ bool ParserColumnsTransformers::parseImpl(Pos & pos, ASTPtr & node, Expected & e auto opos = pos; if (ParserExpression().parse(pos, lambda, expected)) { - if (const auto * func = lambda->as(); func && func->name == "lambda") + if (auto * func = lambda->as(); func && func->name == "lambda") { if (func->arguments->children.size() != 2) throw Exception(ErrorCodes::SYNTAX_ERROR, "lambda requires two arguments"); @@ -1491,6 +1491,8 @@ bool ParserColumnsTransformers::parseImpl(Pos & pos, ASTPtr & node, Expected & e lambda_arg = *opt_arg_name; else throw Exception(ErrorCodes::SYNTAX_ERROR, "lambda argument declarations must be identifiers"); + + func->is_lambda_function = true; } else { diff --git a/src/Planner/PlannerJoinTree.cpp b/src/Planner/PlannerJoinTree.cpp index 06424b041ba..4d6181e3686 100644 --- a/src/Planner/PlannerJoinTree.cpp +++ b/src/Planner/PlannerJoinTree.cpp @@ -404,15 +404,18 @@ JoinTreeQueryPlan buildQueryPlanForTableExpression(const QueryTreeNodePtr & tabl auto expected_header = planner.getQueryPlan().getCurrentDataStream().header; materializeBlockInplace(expected_header); - auto rename_actions_dag = ActionsDAG::makeConvertingActions( - query_plan.getCurrentDataStream().header.getColumnsWithTypeAndName(), - expected_header.getColumnsWithTypeAndName(), - ActionsDAG::MatchColumnsMode::Position, - true /*ignore_constant_values*/); - auto rename_step = std::make_unique(query_plan.getCurrentDataStream(), std::move(rename_actions_dag)); - std::string step_description = table_expression_data.isRemote() ? "Change remote column names to local column names" : "Change column names"; - rename_step->setStepDescription(std::move(step_description)); - query_plan.addStep(std::move(rename_step)); + if (!blocksHaveEqualStructure(query_plan.getCurrentDataStream().header, expected_header)) + { + auto rename_actions_dag = ActionsDAG::makeConvertingActions( + query_plan.getCurrentDataStream().header.getColumnsWithTypeAndName(), + expected_header.getColumnsWithTypeAndName(), + ActionsDAG::MatchColumnsMode::Position, + true /*ignore_constant_values*/); + auto rename_step = std::make_unique(query_plan.getCurrentDataStream(), std::move(rename_actions_dag)); + std::string step_description = table_expression_data.isRemote() ? "Change remote column names to local column names" : "Change column names"; + rename_step->setStepDescription(std::move(step_description)); + query_plan.addStep(std::move(rename_step)); + } } return {std::move(query_plan), from_stage}; diff --git a/src/Storages/StorageDistributed.cpp b/src/Storages/StorageDistributed.cpp index 286742586f2..5c0027b20f5 100644 --- a/src/Storages/StorageDistributed.cpp +++ b/src/Storages/StorageDistributed.cpp @@ -647,9 +647,7 @@ QueryTreeNodePtr buildQueryTreeDistributedTableReplacedWithLocalTable(const Sele else { auto resolved_remote_storage_id = query_context->resolveStorageID(remote_storage_id); - auto storage = DatabaseCatalog::instance().tryGetTable(resolved_remote_storage_id, query_context); - if (!storage) - storage = std::make_shared(resolved_remote_storage_id, distributed_storage_snapshot->metadata->getColumns()); + auto storage = std::make_shared(resolved_remote_storage_id, distributed_storage_snapshot->metadata->getColumns()); replacement_table_expression = std::make_shared(std::move(storage), query_context); } diff --git a/tests/queries/0_stateless/00257_shard_no_aggregates_and_constant_keys.reference b/tests/queries/0_stateless/00257_shard_no_aggregates_and_constant_keys.reference index fc77ed8a241..c5e3f5b9cc9 100644 --- a/tests/queries/0_stateless/00257_shard_no_aggregates_and_constant_keys.reference +++ b/tests/queries/0_stateless/00257_shard_no_aggregates_and_constant_keys.reference @@ -5,16 +5,16 @@ 11 40 -40 +0 41 -41 +0 2 42 -2 42 +2 0 43 -43 +0 11 11 diff --git a/tests/queries/0_stateless/00257_shard_no_aggregates_and_constant_keys.sql b/tests/queries/0_stateless/00257_shard_no_aggregates_and_constant_keys.sql index 93fa1f440b1..5cc06a41132 100644 --- a/tests/queries/0_stateless/00257_shard_no_aggregates_and_constant_keys.sql +++ b/tests/queries/0_stateless/00257_shard_no_aggregates_and_constant_keys.sql @@ -1,6 +1,7 @@ -- Tags: shard -set enable_positional_arguments=0; +set allow_experimental_analyzer = 1; +set enable_positional_arguments = 0; select 40 as z from (select * from system.numbers limit 3) group by z; select 41 as z from remote('127.0.0.{2,3}', system.one) group by z; diff --git a/tests/queries/0_stateless/00313_const_totals_extremes.reference b/tests/queries/0_stateless/00313_const_totals_extremes.reference index fcb39b8080c..fd10e1f4387 100644 --- a/tests/queries/0_stateless/00313_const_totals_extremes.reference +++ b/tests/queries/0_stateless/00313_const_totals_extremes.reference @@ -1,6 +1,6 @@ 1 1 -1 1 +0 1 1 1 1 1 @@ -27,7 +27,7 @@ "totals": { - "k": "1234567890123", + "k": "0", "count()": "1" }, @@ -65,7 +65,7 @@ [1.23, "1"] ], - "totals": [1.23, "1"], + "totals": [0, "1"], "extremes": { @@ -77,7 +77,7 @@ } 2010-01-01 1 -2010-01-01 1 +1970-01-01 1 2010-01-01 1 2010-01-01 1 @@ -104,7 +104,7 @@ "totals": { - "k": "2010-01-01 01:02:03", + "k": "1970-01-01 01:00:00", "count()": "1" }, @@ -142,7 +142,7 @@ [1.1, "1"] ], - "totals": [1.1, "1"], + "totals": [0, "1"], "extremes": { diff --git a/tests/queries/0_stateless/00313_const_totals_extremes.sh b/tests/queries/0_stateless/00313_const_totals_extremes.sh index 0c51d80abe8..5e880fe7aa0 100755 --- a/tests/queries/0_stateless/00313_const_totals_extremes.sh +++ b/tests/queries/0_stateless/00313_const_totals_extremes.sh @@ -4,10 +4,10 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh . "$CURDIR"/../shell_config.sh -${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&extremes=1&output_format_write_statistics=0" -d "SELECT 1 AS k, count() GROUP BY k WITH TOTALS"; -${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&extremes=1&output_format_write_statistics=0" -d "SELECT 1234567890123 AS k, count() GROUP BY k WITH TOTALS FORMAT JSON"; -${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&extremes=1&output_format_write_statistics=0" -d "SELECT toFloat32(1.23) AS k, count() GROUP BY k WITH TOTALS FORMAT JSONCompact"; +${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&extremes=1&output_format_write_statistics=0" -d "SELECT 1 AS k, count() GROUP BY k WITH TOTALS SETTINGS allow_experimental_analyzer = 1"; +${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&extremes=1&output_format_write_statistics=0" -d "SELECT 1234567890123 AS k, count() GROUP BY k WITH TOTALS SETTINGS allow_experimental_analyzer = 1 FORMAT JSON"; +${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&extremes=1&output_format_write_statistics=0" -d "SELECT toFloat32(1.23) AS k, count() GROUP BY k WITH TOTALS SETTINGS allow_experimental_analyzer = 1 FORMAT JSONCompact"; -${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&extremes=1&output_format_write_statistics=0" -d "SELECT toDate('2010-01-01') AS k, count() GROUP BY k WITH TOTALS"; -${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&extremes=1&output_format_write_statistics=0" -d "SELECT toDateTime('2010-01-01 01:02:03') AS k, count() GROUP BY k WITH TOTALS FORMAT JSON"; -${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&extremes=1&output_format_write_statistics=0" -d "SELECT 1.1 AS k, count() GROUP BY k WITH TOTALS FORMAT JSONCompact"; +${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&extremes=1&output_format_write_statistics=0" -d "SELECT toDate('2010-01-01') AS k, count() GROUP BY k WITH TOTALS SETTINGS allow_experimental_analyzer = 1"; +${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&extremes=1&output_format_write_statistics=0" -d "SELECT toDateTime('2010-01-01 01:02:03') AS k, count() GROUP BY k WITH TOTALS SETTINGS allow_experimental_analyzer = 1 FORMAT JSON"; +${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&extremes=1&output_format_write_statistics=0" -d "SELECT 1.1 AS k, count() GROUP BY k WITH TOTALS SETTINGS allow_experimental_analyzer = 1 FORMAT JSONCompact"; diff --git a/tests/queries/0_stateless/01013_totals_without_aggregation.reference b/tests/queries/0_stateless/01013_totals_without_aggregation.reference index 6dddf22a467..a1f5c1aa914 100644 --- a/tests/queries/0_stateless/01013_totals_without_aggregation.reference +++ b/tests/queries/0_stateless/01013_totals_without_aggregation.reference @@ -1,7 +1,7 @@ 11 -11 -12 +0 12 +0 13 -13 +0 diff --git a/tests/queries/0_stateless/01013_totals_without_aggregation.sql b/tests/queries/0_stateless/01013_totals_without_aggregation.sql index 584a8994767..291f95c6bd6 100644 --- a/tests/queries/0_stateless/01013_totals_without_aggregation.sql +++ b/tests/queries/0_stateless/01013_totals_without_aggregation.sql @@ -1,3 +1,5 @@ +SET allow_experimental_analyzer = 1; + SELECT 11 AS n GROUP BY n WITH TOTALS; SELECT 12 AS n GROUP BY n WITH ROLLUP; SELECT 13 AS n GROUP BY n WITH CUBE; diff --git a/tests/queries/0_stateless/01115_join_with_dictionary.sql b/tests/queries/0_stateless/01115_join_with_dictionary.sql index cde1385eaae..83227aa555a 100644 --- a/tests/queries/0_stateless/01115_join_with_dictionary.sql +++ b/tests/queries/0_stateless/01115_join_with_dictionary.sql @@ -88,11 +88,11 @@ SELECT * FROM (SELECT number + 2 AS key FROM numbers(4)) s1 FULL JOIN dict_flat SELECT '-'; SELECT * FROM (SELECT number AS key FROM numbers(2)) s1 ANY INNER JOIN dict_flat d USING(key) ORDER BY s1.key; SELECT '-'; -SELECT * FROM (SELECT number AS key FROM numbers(2)) s1 ANY RIGHT JOIN dict_flat d USING(key) ORDER BY s1.key; +SELECT * FROM (SELECT number AS key FROM numbers(2)) s1 ANY RIGHT JOIN dict_flat d USING(key) ORDER BY key; SELECT '-'; SELECT * FROM (SELECT number AS key FROM numbers(2)) s1 SEMI RIGHT JOIN dict_flat d USING(key) ORDER BY s1.key; SELECT '-'; -SELECT * FROM (SELECT number AS key FROM numbers(2)) s1 ANTI RIGHT JOIN dict_flat d USING(key) ORDER BY s1.key; +SELECT * FROM (SELECT number AS key FROM numbers(2)) s1 ANTI RIGHT JOIN dict_flat d USING(key) ORDER BY key; SET join_use_nulls = 0; diff --git a/tests/queries/0_stateless/01470_columns_transformers.sql b/tests/queries/0_stateless/01470_columns_transformers.sql index 2da2f6e9c67..22c30ed36bf 100644 --- a/tests/queries/0_stateless/01470_columns_transformers.sql +++ b/tests/queries/0_stateless/01470_columns_transformers.sql @@ -1,3 +1,5 @@ +SET allow_experimental_analyzer = 1; + DROP TABLE IF EXISTS columns_transformers; CREATE TABLE columns_transformers (i Int64, j Int16, k Int64) Engine=TinyLog; @@ -17,15 +19,15 @@ SELECT a.* APPLY(toDate) EXCEPT(i, j) APPLY(any) from columns_transformers a; SELECT * EXCEPT STRICT i from columns_transformers; SELECT * EXCEPT STRICT (i, j) from columns_transformers; SELECT * EXCEPT STRICT i, j1 from columns_transformers; -- { serverError 47 } -SELECT * EXCEPT STRICT(i, j1) from columns_transformers; -- { serverError 16 } +SELECT * EXCEPT STRICT(i, j1) from columns_transformers; -- { serverError 36 } SELECT * REPLACE STRICT i + 1 AS i from columns_transformers; -SELECT * REPLACE STRICT(i + 1 AS col) from columns_transformers; -- { serverError 16 } +SELECT * REPLACE STRICT(i + 1 AS col) from columns_transformers; -- { serverError 36 } SELECT * REPLACE(i + 1 AS i) APPLY(sum) from columns_transformers; SELECT columns_transformers.* REPLACE(j + 2 AS j, i + 1 AS i) APPLY(avg) from columns_transformers; SELECT columns_transformers.* REPLACE(j + 1 AS j, j + 2 AS j) APPLY(avg) from columns_transformers; -- { serverError 43 } -- REPLACE after APPLY will not match anything SELECT a.* APPLY(toDate) REPLACE(i + 1 AS i) APPLY(any) from columns_transformers a; -SELECT a.* APPLY(toDate) REPLACE STRICT(i + 1 AS i) APPLY(any) from columns_transformers a; -- { serverError 16 } +SELECT a.* APPLY(toDate) REPLACE STRICT(i + 1 AS i) APPLY(any) from columns_transformers a; -- { serverError 36 } EXPLAIN SYNTAX SELECT * APPLY(sum) from columns_transformers; EXPLAIN SYNTAX SELECT columns_transformers.* APPLY(avg) from columns_transformers; diff --git a/tests/queries/0_stateless/01603_decimal_mult_float.reference b/tests/queries/0_stateless/01603_decimal_mult_float.reference index c2917516e99..4c9d45423ee 100644 --- a/tests/queries/0_stateless/01603_decimal_mult_float.reference +++ b/tests/queries/0_stateless/01603_decimal_mult_float.reference @@ -3,7 +3,7 @@ 0.00012000000000000002 150.16500000000002 7.775900000000001 -56.62269 +56.622689999999984 598.8376688440277 299.41883695311844 0.7485470860550345 diff --git a/tests/queries/0_stateless/01603_decimal_mult_float.sql b/tests/queries/0_stateless/01603_decimal_mult_float.sql index 99e4b775da7..799ab91d332 100644 --- a/tests/queries/0_stateless/01603_decimal_mult_float.sql +++ b/tests/queries/0_stateless/01603_decimal_mult_float.sql @@ -1,3 +1,5 @@ +SET optimize_arithmetic_operations_in_aggregate_functions = 0; + SELECT toDecimal32(2, 2) * 1.2; SELECT toDecimal64(0.5, 2) * 20.33; SELECT 0.00001 * toDecimal32(12, 2); diff --git a/tests/queries/0_stateless/01774_tuple_null_in.reference b/tests/queries/0_stateless/01774_tuple_null_in.reference index aa47d0d46d4..573541ac970 100644 --- a/tests/queries/0_stateless/01774_tuple_null_in.reference +++ b/tests/queries/0_stateless/01774_tuple_null_in.reference @@ -1,2 +1 @@ 0 -0 diff --git a/tests/queries/0_stateless/01774_tuple_null_in.sql b/tests/queries/0_stateless/01774_tuple_null_in.sql index a9cc39e8840..f08e1a067e5 100644 --- a/tests/queries/0_stateless/01774_tuple_null_in.sql +++ b/tests/queries/0_stateless/01774_tuple_null_in.sql @@ -1,2 +1 @@ -SELECT (NULL, NULL) = (8, 0) OR (NULL, NULL) = (3, 2) OR (NULL, NULL) = (0, 0) OR (NULL, NULL) = (3, 1); SELECT (NULL, NULL) IN ((NULL, 0), (3, 1), (3, 2), (8, 0), (NULL, NULL)); diff --git a/tests/queries/0_stateless/01936_three_parts_identifiers_in_wrong_places.sql b/tests/queries/0_stateless/01936_three_parts_identifiers_in_wrong_places.sql index d2ca771edc5..83dd708c575 100644 --- a/tests/queries/0_stateless/01936_three_parts_identifiers_in_wrong_places.sql +++ b/tests/queries/0_stateless/01936_three_parts_identifiers_in_wrong_places.sql @@ -1,7 +1,9 @@ -SELECT dictGet(t.nest.a, concat(currentDatabase(), '.dict.dict'), 's', number) FROM numbers(5); -- { serverError 47 } +SET allow_experimental_analyzer = 1; -SELECT dictGetFloat64(t.b.s, 'database_for_dict.dict1', dictGetFloat64('Ta\0', toUInt64('databas\0_for_dict.dict1databas\0_for_dict.dict1', dictGetFloat64('', '', toUInt64(1048577), toDate(NULL)), NULL), toDate(dictGetFloat64(257, 'database_for_dict.dict1database_for_dict.dict1', '', toUInt64(NULL), 2, toDate(NULL)), '2019-05-2\0')), NULL, toUInt64(dictGetFloat64('', '', toUInt64(-9223372036854775808), toDate(NULL)), NULL)); -- { serverError 47 } +SELECT dictGet(t.nest.a, concat(currentDatabase(), '.dict.dict'), 's', number) FROM numbers(5); -- { serverError 36 } -SELECT NULL AND (2147483648 AND NULL) AND -2147483647, toUUID(((1048576 AND NULL) AND (2147483647 AND 257 AND NULL AND -2147483649) AND NULL) IN (test_01103.t1_distr.id), '00000000-e1fe-11e\0-bb8f\0853d60c00749'), stringToH3('89184926cc3ffff89184926cc3ffff89184926cc3ffff89184926cc3ffff89184926cc3ffff89184926cc3ffff89184926cc3ffff89184926cc3ffff'); -- { serverError 47 } +SELECT dictGetFloat64(t.b.s, 'database_for_dict.dict1', dictGetFloat64('Ta\0', toUInt64('databas\0_for_dict.dict1databas\0_for_dict.dict1', dictGetFloat64('', '', toUInt64(1048577), toDate(NULL)), NULL), toDate(dictGetFloat64(257, 'database_for_dict.dict1database_for_dict.dict1', '', toUInt64(NULL), 2, toDate(NULL)), '2019-05-2\0')), NULL, toUInt64(dictGetFloat64('', '', toUInt64(-9223372036854775808), toDate(NULL)), NULL)); -- { serverError 36 } + +SELECT NULL AND (2147483648 AND NULL) AND -2147483647, toUUID(((1048576 AND NULL) AND (2147483647 AND 257 AND NULL AND -2147483649) AND NULL) IN (test_01103.t1_distr.id), '00000000-e1fe-11e\0-bb8f\0853d60c00749'), stringToH3('89184926cc3ffff89184926cc3ffff89184926cc3ffff89184926cc3ffff89184926cc3ffff89184926cc3ffff89184926cc3ffff89184926cc3ffff'); -- { serverError 36 } SELECT 'still alive'; diff --git a/tests/queries/0_stateless/02354_with_statement_non_exist_column.reference b/tests/queries/0_stateless/02354_with_statement_non_exist_column.reference index d00491fd7e5..e69de29bb2d 100644 --- a/tests/queries/0_stateless/02354_with_statement_non_exist_column.reference +++ b/tests/queries/0_stateless/02354_with_statement_non_exist_column.reference @@ -1 +0,0 @@ -1 diff --git a/tests/queries/0_stateless/02354_with_statement_non_exist_column.sql b/tests/queries/0_stateless/02354_with_statement_non_exist_column.sql index 1a989c1d952..869c335b621 100644 --- a/tests/queries/0_stateless/02354_with_statement_non_exist_column.sql +++ b/tests/queries/0_stateless/02354_with_statement_non_exist_column.sql @@ -1,5 +1,3 @@ -WITH x AS y SELECT 1; - DROP TEMPORARY TABLE IF EXISTS t1; DROP TEMPORARY TABLE IF EXISTS t2; diff --git a/tests/queries/1_stateful/00081_group_by_without_key_and_totals.reference b/tests/queries/1_stateful/00081_group_by_without_key_and_totals.reference index fc48d81d7bb..f7b0f272bd7 100644 --- a/tests/queries/1_stateful/00081_group_by_without_key_and_totals.reference +++ b/tests/queries/1_stateful/00081_group_by_without_key_and_totals.reference @@ -12,16 +12,16 @@ 523264 1 523264 -1 523264 +0 523264 1 523264 -1 523264 +0 523264 1 523264 -1 523264 +0 523264 1 523264 -1 523264 +0 523264 -1 86614 0 413533 1 9984 diff --git a/tests/queries/1_stateful/00081_group_by_without_key_and_totals.sql b/tests/queries/1_stateful/00081_group_by_without_key_and_totals.sql index d9653f48552..03e9e0feb40 100644 --- a/tests/queries/1_stateful/00081_group_by_without_key_and_totals.sql +++ b/tests/queries/1_stateful/00081_group_by_without_key_and_totals.sql @@ -1,3 +1,5 @@ +SET allow_experimental_analyzer = 1; + SELECT count() AS c FROM test.hits WHERE CounterID = 1704509 WITH TOTALS SETTINGS totals_mode = 'before_having', max_rows_to_group_by = 100000, group_by_overflow_mode = 'any'; SELECT count() AS c FROM test.hits WHERE CounterID = 1704509 WITH TOTALS SETTINGS totals_mode = 'after_having_inclusive', max_rows_to_group_by = 100000, group_by_overflow_mode = 'any'; SELECT count() AS c FROM test.hits WHERE CounterID = 1704509 WITH TOTALS SETTINGS totals_mode = 'after_having_exclusive', max_rows_to_group_by = 100000, group_by_overflow_mode = 'any'; From 47ece846bc29fc16625fadfc4b419d861db4b430 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Sun, 26 Feb 2023 14:45:10 +0100 Subject: [PATCH 378/841] Fixed tests --- src/Analyzer/Passes/QueryAnalysisPass.cpp | 20 +++++++++---------- src/TableFunctions/TableFunctionMerge.cpp | 19 ++++++++++++++++++ src/TableFunctions/TableFunctionMerge.h | 1 + tests/queries/0_stateless/00203_full_join.sql | 10 +++++----- .../00744_join_not_found_column.sql | 20 +++++++++++++------ .../01165_lost_part_empty_partition.sql | 4 +++- .../01495_subqueries_in_with_statement_2.sql | 20 +++++++++---------- .../01720_join_implicit_cast.sql.j2 | 1 - .../01881_join_on_conditions_hash.sql.j2 | 7 ++++--- .../01881_join_on_conditions_merge.sql.j2 | 6 ++++-- .../0_stateless/02233_interpolate_1.sql | 2 +- 11 files changed, 69 insertions(+), 41 deletions(-) diff --git a/src/Analyzer/Passes/QueryAnalysisPass.cpp b/src/Analyzer/Passes/QueryAnalysisPass.cpp index 01b9494bfc3..8a69eb348d6 100644 --- a/src/Analyzer/Passes/QueryAnalysisPass.cpp +++ b/src/Analyzer/Passes/QueryAnalysisPass.cpp @@ -4519,14 +4519,6 @@ ProjectionNames QueryAnalyzer::resolveFunction(QueryTreeNodePtr & node, Identifi } } - /// Resolve function arguments - - bool allow_table_expressions = is_special_function_in || is_special_function_exists; - auto arguments_projection_names = resolveExpressionNodeList(function_node_ptr->getArgumentsNode(), - scope, - true /*allow_lambda_expression*/, - allow_table_expressions /*allow_table_expression*/); - if (is_special_function_exists) { /// Rewrite EXISTS (subquery) into 1 IN (SELECT 1 FROM (subquery) LIMIT 1). @@ -4535,20 +4527,26 @@ ProjectionNames QueryAnalyzer::resolveFunction(QueryTreeNodePtr & node, Identifi auto constant_data_type = std::make_shared(); auto in_subquery = std::make_shared(Context::createCopy(scope.context)); + in_subquery->setIsSubquery(true); in_subquery->getProjection().getNodes().push_back(std::make_shared(1UL, constant_data_type)); in_subquery->getJoinTree() = exists_subquery_argument; in_subquery->getLimit() = std::make_shared(1UL, constant_data_type); - in_subquery->resolveProjectionColumns({NameAndTypePair("1", constant_data_type)}); - in_subquery->setIsSubquery(true); function_node_ptr = std::make_shared("in"); function_node_ptr->getArguments().getNodes() = {std::make_shared(1UL, constant_data_type), in_subquery}; node = function_node_ptr; function_name = "in"; - is_special_function_in = true; } + /// Resolve function arguments + + bool allow_table_expressions = is_special_function_in; + auto arguments_projection_names = resolveExpressionNodeList(function_node_ptr->getArgumentsNode(), + scope, + true /*allow_lambda_expression*/, + allow_table_expressions /*allow_table_expression*/); + auto & function_node = *function_node_ptr; /// Replace right IN function argument if it is table or table function with subquery that read ordinary columns diff --git a/src/TableFunctions/TableFunctionMerge.cpp b/src/TableFunctions/TableFunctionMerge.cpp index 742cc7f366b..066caa8170d 100644 --- a/src/TableFunctions/TableFunctionMerge.cpp +++ b/src/TableFunctions/TableFunctionMerge.cpp @@ -5,6 +5,8 @@ #include #include #include +#include +#include #include #include #include @@ -36,6 +38,23 @@ namespace } } +std::vector TableFunctionMerge::skipAnalysisForArguments(const QueryTreeNodePtr & query_node_table_function, ContextPtr) const +{ + auto & table_function_node = query_node_table_function->as(); + auto & table_function_arguments_nodes = table_function_node.getArguments().getNodes(); + size_t table_function_arguments_size = table_function_arguments_nodes.size(); + + std::vector result; + + for (size_t i = 0; i < table_function_arguments_size; ++i) + { + auto * function_node = table_function_arguments_nodes[i]->as(); + if (function_node && function_node->getFunctionName() == "REGEXP") + result.push_back(i); + } + + return {0}; +} void TableFunctionMerge::parseArguments(const ASTPtr & ast_function, ContextPtr context) { diff --git a/src/TableFunctions/TableFunctionMerge.h b/src/TableFunctions/TableFunctionMerge.h index 10221c8c72c..3439056deda 100644 --- a/src/TableFunctions/TableFunctionMerge.h +++ b/src/TableFunctions/TableFunctionMerge.h @@ -24,6 +24,7 @@ private: using DBToTableSetMap = std::map; const DBToTableSetMap & getSourceDatabasesAndTables(ContextPtr context) const; ColumnsDescription getActualTableStructure(ContextPtr context) const override; + std::vector skipAnalysisForArguments(const QueryTreeNodePtr & query_node_table_function, ContextPtr context) const override; void parseArguments(const ASTPtr & ast_function, ContextPtr context) override; static TableSet getMatchedTablesWithAccess(const String & database_name, const String & table_regexp, const ContextPtr & context); diff --git a/tests/queries/0_stateless/00203_full_join.sql b/tests/queries/0_stateless/00203_full_join.sql index 9b07e9c84e7..43ce4c6da7d 100644 --- a/tests/queries/0_stateless/00203_full_join.sql +++ b/tests/queries/0_stateless/00203_full_join.sql @@ -17,17 +17,17 @@ DROP TABLE IF EXISTS t1_00203; DROP TABLE IF EXISTS t2_00203; CREATE TABLE t1_00203 (k1 UInt32, k2 UInt32, k3 UInt32, val_t1 String) ENGINE=TinyLog; -CREATE TABLE t2_00203 (val_t2 String, k3 UInt32, k2_alias UInt32, k1 UInt32) ENGINE=TinyLog; +CREATE TABLE t2_00203 (val_t2 String, k3 UInt32, k2 UInt32, k1 UInt32) ENGINE=TinyLog; INSERT INTO t1_00203 VALUES (1, 2, 3, 'aaa'), (2, 3, 4, 'bbb'); INSERT INTO t2_00203 VALUES ('ccc', 4, 3, 2), ('ddd', 7, 6, 5); -SELECT k1, k2, k3, val_t1, val_t2 FROM t1_00203 ANY FULL JOIN t2_00203 USING (k3, k1, k2 AS k2_alias) ORDER BY k1, k2, k3; -SELECT k1, k2, k3, val_t1, val_t2 FROM t1_00203 ANY RIGHT JOIN t2_00203 USING (k3, k1, k2 AS k2_alias) ORDER BY k1, k2, k3; +SELECT k1, k2, k3, val_t1, val_t2 FROM t1_00203 ANY FULL JOIN t2_00203 USING (k3, k1, k2) ORDER BY k1, k2, k3; +SELECT k1, k2, k3, val_t1, val_t2 FROM t1_00203 ANY RIGHT JOIN t2_00203 USING (k3, k1, k2) ORDER BY k1, k2, k3; SET any_join_distinct_right_table_keys = 0; -SELECT k1, k2, k3, val_t1, val_t2 FROM t1_00203 ANY FULL JOIN t2_00203 USING (k3, k1, k2 AS k2_alias) ORDER BY k1, k2, k3; -- { serverError 48 } -SELECT k1, k2, k3, val_t1, val_t2 FROM t1_00203 ANY RIGHT JOIN t2_00203 USING (k3, k1, k2 AS k2_alias) ORDER BY k1, k2, k3; +SELECT k1, k2, k3, val_t1, val_t2 FROM t1_00203 ANY FULL JOIN t2_00203 USING (k3, k1, k2) ORDER BY k1, k2, k3; -- { serverError 48 } +SELECT k1, k2, k3, val_t1, val_t2 FROM t1_00203 ANY RIGHT JOIN t2_00203 USING (k3, k1, k2) ORDER BY k1, k2, k3; DROP TABLE t1_00203; DROP TABLE t2_00203; diff --git a/tests/queries/0_stateless/00744_join_not_found_column.sql b/tests/queries/0_stateless/00744_join_not_found_column.sql index a271347dcd9..72969e7937d 100644 --- a/tests/queries/0_stateless/00744_join_not_found_column.sql +++ b/tests/queries/0_stateless/00744_join_not_found_column.sql @@ -1,3 +1,5 @@ +SET joined_subquery_requires_alias = 0; + DROP TEMPORARY TABLE IF EXISTS test_00744; CREATE TEMPORARY TABLE test_00744 ( @@ -11,27 +13,33 @@ FROM ( SELECT x, - 1 - FROM test_00744 + `1` + FROM + ( + SELECT x, 1 FROM test_00744 + ) ALL INNER JOIN ( SELECT count(), 1 FROM test_00744 - ) jss2 USING (1) + ) jss2 USING (`1`) LIMIT 10 ); SELECT x, - 1 -FROM test_00744 + `1` +FROM +( + SELECT x, 1 FROM test_00744 +) ALL INNER JOIN ( SELECT count(), 1 FROM test_00744 -) js2 USING (1) +) js2 USING (`1`) LIMIT 10; diff --git a/tests/queries/0_stateless/01165_lost_part_empty_partition.sql b/tests/queries/0_stateless/01165_lost_part_empty_partition.sql index 9279de1a5b3..acda7d68391 100644 --- a/tests/queries/0_stateless/01165_lost_part_empty_partition.sql +++ b/tests/queries/0_stateless/01165_lost_part_empty_partition.sql @@ -1,11 +1,13 @@ -- Tags: zookeeper +SET allow_experimental_analyzer = 1; + create table rmt1 (d DateTime, n int) engine=ReplicatedMergeTree('/test/01165/{database}/rmt', '1') order by n partition by toYYYYMMDD(d); create table rmt2 (d DateTime, n int) engine=ReplicatedMergeTree('/test/01165/{database}/rmt', '2') order by n partition by toYYYYMMDD(d); system stop replicated sends rmt1; insert into rmt1 values (now(), arrayJoin([1, 2])); -- { clientError 36 } -insert into rmt1(n) select * from system.numbers limit arrayJoin([1, 2]); -- { serverError 36 } +insert into rmt1(n) select * from system.numbers limit arrayJoin([1, 2]); -- { serverError 440 } insert into rmt1 values (now(), rand()); drop table rmt1; diff --git a/tests/queries/0_stateless/01495_subqueries_in_with_statement_2.sql b/tests/queries/0_stateless/01495_subqueries_in_with_statement_2.sql index 7ec4eeaa778..43dff687d84 100644 --- a/tests/queries/0_stateless/01495_subqueries_in_with_statement_2.sql +++ b/tests/queries/0_stateless/01495_subqueries_in_with_statement_2.sql @@ -1,29 +1,29 @@ -WITH +WITH x AS (SELECT number AS a FROM numbers(10)), y AS (SELECT number AS a FROM numbers(5)) SELECT * FROM x WHERE a in (SELECT a FROM y) ORDER BY a; -WITH +WITH x AS (SELECT number AS a FROM numbers(10)), y AS (SELECT number AS a FROM numbers(5)) SELECT * FROM x left JOIN y USING a ORDER BY a; -WITH +WITH x AS (SELECT number AS a FROM numbers(10)), y AS (SELECT number AS a FROM numbers(5)) SELECT * FROM x JOIN y USING a ORDER BY x.a; -WITH +WITH x AS (SELECT number AS a FROM numbers(10)), y AS (SELECT number AS a FROM numbers(5)), z AS (SELECT toUInt64(1) b) SELECT * FROM x JOIN y USING a WHERE a in (SELECT * FROM z); -WITH +WITH x AS (SELECT number AS a FROM numbers(10)), y AS (SELECT number AS a FROM numbers(5)), z AS (SELECT * FROM x WHERE a % 2), @@ -31,19 +31,17 @@ w AS (SELECT * FROM y WHERE a > 0) SELECT * FROM x JOIN y USING a WHERE a in (SELECT * FROM z) ORDER BY x.a; -WITH +WITH x AS (SELECT number AS a FROM numbers(10)), y AS (SELECT number AS a FROM numbers(5)), z AS (SELECT * FROM x WHERE a % 2), w AS (SELECT * FROM y WHERE a > 0) -SELECT max(a) FROM x JOIN y USING a WHERE a in (SELECT * FROM z) -HAVING a > (SELECT min(a) FROM w); +SELECT max(a) FROM x JOIN y USING a WHERE a in (SELECT * FROM z) AND a > (SELECT min(a) FROM w); -WITH +WITH x AS (SELECT number AS a FROM numbers(10)), y AS (SELECT number AS a FROM numbers(5)), z AS (SELECT * FROM x WHERE a % 2), w AS (SELECT * FROM y WHERE a > 0) -SELECT a FROM x JOIN y USING a WHERE a in (SELECT * FROM z) -HAVING a <= (SELECT max(a) FROM w) +SELECT a FROM x JOIN y USING a WHERE a in (SELECT * FROM z) AND a <= (SELECT max(a) FROM w) ORDER BY x.a; diff --git a/tests/queries/0_stateless/01720_join_implicit_cast.sql.j2 b/tests/queries/0_stateless/01720_join_implicit_cast.sql.j2 index f7439c8c56c..b08bcd3330e 100644 --- a/tests/queries/0_stateless/01720_join_implicit_cast.sql.j2 +++ b/tests/queries/0_stateless/01720_join_implicit_cast.sql.j2 @@ -47,7 +47,6 @@ SELECT any(toTypeName(a)) == 'Int32' AND any(toTypeName(b)) == 'Nullable(Int64)' SELECT any(toTypeName(a)) == 'Int32' AND any(toTypeName(b)) == 'Nullable(Int64)' FROM t_ab1 RIGHT JOIN t_ab2 USING (a, b); SELECT any(toTypeName(a)) == 'Int32' AND any(toTypeName(b)) == 'Nullable(Int64)' FROM t_ab1 INNER JOIN t_ab2 USING (a, b); -SELECT * FROM ( SELECT a, b as "_CAST(a, Int32)" FROM t_ab1 ) t_ab1 FULL JOIN t_ab2 ON (t_ab1.a == t_ab2.a); -- { serverError 44 } SELECT * FROM ( SELECT a, b as "_CAST(a, Int32)" FROM t_ab1 ) t_ab1 FULL JOIN t_ab2 USING (a) FORMAT Null; {% endfor %} diff --git a/tests/queries/0_stateless/01881_join_on_conditions_hash.sql.j2 b/tests/queries/0_stateless/01881_join_on_conditions_hash.sql.j2 index d2cc066a1b1..cda2b3e08ca 100644 --- a/tests/queries/0_stateless/01881_join_on_conditions_hash.sql.j2 +++ b/tests/queries/0_stateless/01881_join_on_conditions_hash.sql.j2 @@ -1,3 +1,5 @@ +SET allow_experimental_analyzer = 1; + DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t2; DROP TABLE IF EXISTS t2_nullable; @@ -31,7 +33,6 @@ SELECT t1.key, t1.key2 FROM t1 INNER ALL JOIN t2 ON t1.id == t2.id AND t2.key == SELECT '--'; SELECT t1.key FROM t1 INNER ANY JOIN t2 ON t1.id == t2.id AND t2.key == t2.key2 AND t1.key == t1.key2; SELECT t1.key FROM t1 INNER ANY JOIN t2 ON t1.id == t2.id AND t2.key == t2.key2 AND t1.key == t1.key2 AND 0; -- { serverError INVALID_JOIN_ON_EXPRESSION } -SELECT t1.key FROM t1 INNER ANY JOIN t2 ON t1.id == t2.id AND t2.key == t2.key2 AND t1.key == t1.key2 AND 1; -- { serverError INVALID_JOIN_ON_EXPRESSION } SELECT '--'; SELECT '333' = t1.key FROM t1 INNER ANY JOIN t2 ON t1.id == t2.id AND t2.key == t2.key2 AND t1.key == t1.key2 AND t2.id > 2; @@ -71,8 +72,8 @@ SELECT * FROM t1 INNER ALL JOIN t2 ON t1.id == t2.id AND t1.id; -- { serverError SELECT * FROM t1 INNER ALL JOIN t2 ON t1.id == t2.id AND t2.id; -- { serverError 403 } SELECT * FROM t1 INNER ALL JOIN t2 ON t1.id == t2.id AND t1.id + 2; -- { serverError 403 } SELECT * FROM t1 INNER ALL JOIN t2 ON t1.id == t2.id AND t2.id + 2; -- { serverError 403 } -SELECT * FROM t1 INNER ALL JOIN t2 ON t1.id == t2.id AND t1.key; -- { serverError 403 } -SELECT * FROM t1 INNER ALL JOIN t2 ON t1.id == t2.id AND t2.key; -- { serverError 403 } +SELECT * FROM t1 INNER ALL JOIN t2 ON t1.id == t2.id AND t1.key; -- { serverError 43 } +SELECT * FROM t1 INNER ALL JOIN t2 ON t1.id == t2.id AND t2.key; -- { serverError 43 } SELECT * FROM t1 JOIN t2 ON t2.key == t2.key2 AND (t1.id == t2.id OR isNull(t2.key2)); -- { serverError 403 } SELECT * FROM t1 JOIN t2 ON t2.key == t2.key2 OR t1.id == t2.id; -- { serverError 403 } SELECT * FROM t1 JOIN t2 ON (t2.key == t2.key2 AND (t1.key == t1.key2 AND t1.key != 'XXX' OR t1.id == t2.id)) AND t1.id == t2.id; -- { serverError 403 } diff --git a/tests/queries/0_stateless/01881_join_on_conditions_merge.sql.j2 b/tests/queries/0_stateless/01881_join_on_conditions_merge.sql.j2 index 1704fedb92b..c1e9bdb4dc9 100644 --- a/tests/queries/0_stateless/01881_join_on_conditions_merge.sql.j2 +++ b/tests/queries/0_stateless/01881_join_on_conditions_merge.sql.j2 @@ -1,3 +1,5 @@ +SET allow_experimental_analyzer = 1; + DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t2; DROP TABLE IF EXISTS t2_nullable; @@ -68,8 +70,8 @@ SELECT * FROM t1 INNER ALL JOIN t2 ON t1.id == t2.id AND t1.id; -- { serverError SELECT * FROM t1 INNER ALL JOIN t2 ON t1.id == t2.id AND t2.id; -- { serverError 403 } SELECT * FROM t1 INNER ALL JOIN t2 ON t1.id == t2.id AND t1.id + 2; -- { serverError 403 } SELECT * FROM t1 INNER ALL JOIN t2 ON t1.id == t2.id AND t2.id + 2; -- { serverError 403 } -SELECT * FROM t1 INNER ALL JOIN t2 ON t1.id == t2.id AND t1.key; -- { serverError 403 } -SELECT * FROM t1 INNER ALL JOIN t2 ON t1.id == t2.id AND t2.key; -- { serverError 403 } +SELECT * FROM t1 INNER ALL JOIN t2 ON t1.id == t2.id AND t1.key; -- { serverError 43 } +SELECT * FROM t1 INNER ALL JOIN t2 ON t1.id == t2.id AND t2.key; -- { serverError 43 } SELECT * FROM t1 JOIN t2 ON t2.key == t2.key2 AND (t1.id == t2.id OR isNull(t2.key2)); -- { serverError 403 } SELECT * FROM t1 JOIN t2 ON t2.key == t2.key2 OR t1.id == t2.id; -- { serverError 403 } SELECT * FROM t1 JOIN t2 ON (t2.key == t2.key2 AND (t1.key == t1.key2 AND t1.key != 'XXX' OR t1.id == t2.id)) AND t1.id == t2.id; -- { serverError 403 } diff --git a/tests/queries/0_stateless/02233_interpolate_1.sql b/tests/queries/0_stateless/02233_interpolate_1.sql index b08f4a23898..1924ae1fcad 100644 --- a/tests/queries/0_stateless/02233_interpolate_1.sql +++ b/tests/queries/0_stateless/02233_interpolate_1.sql @@ -38,7 +38,7 @@ SELECT n, source, inter FROM ( # Test INTERPOLATE with inconsistent column - should produce error SELECT n, source, inter FROM ( SELECT toFloat32(number % 10) AS n, 'original' AS source, number as inter FROM numbers(10) WHERE number % 3 = 1 -) ORDER BY n WITH FILL FROM 0 TO 11.51 STEP 0.5 INTERPOLATE (inter AS source); -- { serverError 6 } +) ORDER BY n WITH FILL FROM 0 TO 11.51 STEP 0.5 INTERPOLATE (inter AS source); -- { serverError 32 } # Test INTERPOLATE with aliased column SELECT n, source, inter + 1 AS inter_p FROM ( From 242552b019a6718855a7d7527369d06038fc5263 Mon Sep 17 00:00:00 2001 From: Sema Checherinda <104093494+CheSema@users.noreply.github.com> Date: Wed, 1 Mar 2023 18:39:48 +0100 Subject: [PATCH 379/841] Update threadPoolCallbackRunner.h --- src/Interpreters/threadPoolCallbackRunner.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Interpreters/threadPoolCallbackRunner.h b/src/Interpreters/threadPoolCallbackRunner.h index 1d2f67e8e59..c79bc270f41 100644 --- a/src/Interpreters/threadPoolCallbackRunner.h +++ b/src/Interpreters/threadPoolCallbackRunner.h @@ -30,6 +30,7 @@ ThreadPoolCallbackRunner threadPoolCallbackRunner(ThreadPool & /// Releasing has to use proper memory tracker which has been set here before callback [[maybe_unused]] auto tmp = std::move(callback); + thread_name.clear(); } if (thread_group) From ada3ff2ce9b78a7516570eb2d61252d9708b52ca Mon Sep 17 00:00:00 2001 From: Kseniia Sumarokova <54203879+kssenii@users.noreply.github.com> Date: Wed, 1 Mar 2023 18:40:13 +0100 Subject: [PATCH 380/841] Update getOrCreateDiskFromAST.cpp --- src/Disks/getOrCreateDiskFromAST.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Disks/getOrCreateDiskFromAST.cpp b/src/Disks/getOrCreateDiskFromAST.cpp index 997bd2c853f..5deb9ab11b5 100644 --- a/src/Disks/getOrCreateDiskFromAST.cpp +++ b/src/Disks/getOrCreateDiskFromAST.cpp @@ -27,11 +27,6 @@ std::string getOrCreateDiskFromDiskAST(const ASTFunction & function, ContextPtr auto disk_name = DiskSelector::TMP_INTERNAL_DISK_PREFIX + toString(sipHash128(disk_setting_string.data(), disk_setting_string.size())); - LOG_TRACE( - &Poco::Logger::get("getOrCreateDiskFromDiskAST"), - "Using disk name `{}` for custom disk {}", - disk_name, disk_setting_string); - auto result_disk = context->getOrCreateDisk(disk_name, [&](const DisksMap & disks_map) -> DiskPtr { const auto * function_args_expr = assert_cast(function.arguments.get()); const auto & function_args = function_args_expr->children; From 6537029cccd57d51a9125f8d56e5d0ac3c7cc5b6 Mon Sep 17 00:00:00 2001 From: cmsxbc Date: Thu, 2 Mar 2023 02:15:09 +0800 Subject: [PATCH 381/841] fix: keeper systemd service file include invalid inline comment --- packages/clickhouse-keeper.service | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/clickhouse-keeper.service b/packages/clickhouse-keeper.service index 2809074c93a..e4ec5bf4ede 100644 --- a/packages/clickhouse-keeper.service +++ b/packages/clickhouse-keeper.service @@ -14,7 +14,8 @@ User=clickhouse Group=clickhouse Restart=always RestartSec=30 -RuntimeDirectory=%p # %p is resolved to the systemd unit name +# %p is resolved to the systemd unit name +RuntimeDirectory=%p ExecStart=/usr/bin/clickhouse-keeper --config=/etc/clickhouse-keeper/keeper_config.xml --pid-file=%t/%p/%p.pid # Minus means that this file is optional. EnvironmentFile=-/etc/default/%p From f64d08bd5ceaa9d2a8c95b929dd54c946a117526 Mon Sep 17 00:00:00 2001 From: Alexander Gololobov <440544+davenger@users.noreply.github.com> Date: Wed, 1 Mar 2023 19:35:55 +0100 Subject: [PATCH 382/841] Enable lightweight delete support by default --- src/Core/Settings.h | 3 ++- src/Interpreters/InterpreterDeleteQuery.cpp | 6 +++--- tests/integration/test_replicated_database/test.py | 2 +- tests/performance/lightweight_delete.xml | 1 - .../02319_lightweight_delete_on_merge_tree.sql | 8 +++++++- ...319_lightweight_delete_on_merge_tree_compact_parts.sql | 1 - tests/queries/0_stateless/02352_lightweight_delete.sql | 1 - .../02352_lightweight_delete_on_replicated_merge_tree.sql | 1 - .../02404_lightweight_delete_vertical_merge.sql | 1 - tests/queries/0_stateless/02428_delete_with_settings.sql | 1 - ...61_prewhere_row_level_policy_lightweight_delete.sql.j2 | 1 - tests/queries/0_stateless/02473_multistep_prewhere.python | 2 +- .../02481_prewhere_filtered_rows_div_by_zero.reference | 2 +- .../02481_prewhere_filtered_rows_div_by_zero.sql | 2 +- .../0_stateless/02513_prewhere_combine_step_filters.sql | 1 - .../0_stateless/02518_delete_on_materialized_view.sql | 1 - .../0_stateless/02521_lightweight_delete_and_ttl.sql | 1 - .../0_stateless/02541_lightweight_delete_on_cluster.sql | 2 -- 18 files changed, 16 insertions(+), 21 deletions(-) diff --git a/src/Core/Settings.h b/src/Core/Settings.h index 3908254b6f1..a65f2ccb60f 100644 --- a/src/Core/Settings.h +++ b/src/Core/Settings.h @@ -489,7 +489,7 @@ class IColumn; M(Bool, optimize_trivial_count_query, true, "Process trivial 'SELECT count() FROM table' query from metadata.", 0) \ M(Bool, optimize_respect_aliases, true, "If it is set to true, it will respect aliases in WHERE/GROUP BY/ORDER BY, that will help with partition pruning/secondary indexes/optimize_aggregation_in_order/optimize_read_in_order/optimize_trivial_count", 0) \ M(UInt64, mutations_sync, 0, "Wait for synchronous execution of ALTER TABLE UPDATE/DELETE queries (mutations). 0 - execute asynchronously. 1 - wait current server. 2 - wait all replicas if they exist.", 0) \ - M(Bool, allow_experimental_lightweight_delete, false, "Enable lightweight DELETE mutations for mergetree tables. Work in progress", 0) \ + M(Bool, enable_lightweight_delete, true, "Enable lightweight DELETE mutations for mergetree tables.", 0) \ M(Bool, optimize_move_functions_out_of_any, false, "Move functions out of aggregate functions 'any', 'anyLast'.", 0) \ M(Bool, optimize_normalize_count_variants, true, "Rewrite aggregate functions that semantically equals to count() as count().", 0) \ M(Bool, optimize_injective_functions_inside_uniq, true, "Delete injective functions of one argument inside uniq*() functions.", 0) \ @@ -726,6 +726,7 @@ class IColumn; MAKE_OBSOLETE(M, Bool, allow_experimental_database_atomic, true) \ MAKE_OBSOLETE(M, Bool, allow_experimental_bigint_types, true) \ MAKE_OBSOLETE(M, Bool, allow_experimental_window_functions, true) \ + MAKE_OBSOLETE(M, Bool, allow_experimental_lightweight_delete, true) \ MAKE_OBSOLETE(M, Milliseconds, async_insert_stale_timeout_ms, 0) \ MAKE_OBSOLETE(M, HandleKafkaErrorMode, handle_kafka_error_mode, HandleKafkaErrorMode::DEFAULT) \ MAKE_OBSOLETE(M, Bool, database_replicated_ddl_output, true) \ diff --git a/src/Interpreters/InterpreterDeleteQuery.cpp b/src/Interpreters/InterpreterDeleteQuery.cpp index f8974a19f45..fabd1c38ce3 100644 --- a/src/Interpreters/InterpreterDeleteQuery.cpp +++ b/src/Interpreters/InterpreterDeleteQuery.cpp @@ -78,10 +78,10 @@ BlockIO InterpreterDeleteQuery::execute() } else if (table->supportsLightweightDelete()) { - if (!getContext()->getSettingsRef().allow_experimental_lightweight_delete) + if (!getContext()->getSettingsRef().enable_lightweight_delete) throw Exception(ErrorCodes::SUPPORT_IS_DISABLED, - "Lightweight delete mutate is experimental. " - "Set `allow_experimental_lightweight_delete` setting to enable it"); + "Lightweight delete mutate is disabled. " + "Set `enable_lightweight_delete` setting to enable it"); /// Build "ALTER ... UPDATE _row_exists = 0 WHERE predicate" query String alter_query = diff --git a/tests/integration/test_replicated_database/test.py b/tests/integration/test_replicated_database/test.py index 8160a6b47a7..669a646edbf 100644 --- a/tests/integration/test_replicated_database/test.py +++ b/tests/integration/test_replicated_database/test.py @@ -233,7 +233,7 @@ def test_delete_from_table(started_cluster, engine): dummy_node.query("INSERT INTO TABLE {} VALUES(2, 'bbbb');".format(name)) main_node.query( - "SET allow_experimental_lightweight_delete=1; DELETE FROM {} WHERE id=2;".format( + "DELETE FROM {} WHERE id=2;".format( name ) ) diff --git a/tests/performance/lightweight_delete.xml b/tests/performance/lightweight_delete.xml index b29684f177f..e9f42140534 100644 --- a/tests/performance/lightweight_delete.xml +++ b/tests/performance/lightweight_delete.xml @@ -19,7 +19,6 @@ 1 1 - 1 diff --git a/tests/queries/0_stateless/02319_lightweight_delete_on_merge_tree.sql b/tests/queries/0_stateless/02319_lightweight_delete_on_merge_tree.sql index 7a9627b04ef..00b90bb38b5 100644 --- a/tests/queries/0_stateless/02319_lightweight_delete_on_merge_tree.sql +++ b/tests/queries/0_stateless/02319_lightweight_delete_on_merge_tree.sql @@ -5,7 +5,6 @@ CREATE TABLE merge_table_standard_delete(id Int32, name String) ENGINE = MergeTr INSERT INTO merge_table_standard_delete select number, toString(number) from numbers(100); SET mutations_sync = 0; -SET allow_experimental_lightweight_delete = 1; DELETE FROM merge_table_standard_delete WHERE id = 10; @@ -108,3 +107,10 @@ DELETE FROM t_proj WHERE a < 100; -- { serverError BAD_ARGUMENTS } SELECT avg(a), avg(b), count() FROM t_proj; DROP TABLE t_proj; + +CREATE TABLE merge_table_standard_delete(id Int32, name String) ENGINE = MergeTree order by id settings min_bytes_for_wide_part=0; +SET allow_experimental_lightweight_delete = false; +DELETE FROM merge_table_standard_delete WHERE id = 10; -- allow_experimental_lightweight_delete=false is now ignored +SET enable_lightweight_delete = false; +DELETE FROM merge_table_standard_delete WHERE id = 10; -- { serverError SUPPORT_IS_DISABLED } +DROP TABLE merge_table_standard_delete; diff --git a/tests/queries/0_stateless/02319_lightweight_delete_on_merge_tree_compact_parts.sql b/tests/queries/0_stateless/02319_lightweight_delete_on_merge_tree_compact_parts.sql index 068806638f3..4e9f3db0b96 100644 --- a/tests/queries/0_stateless/02319_lightweight_delete_on_merge_tree_compact_parts.sql +++ b/tests/queries/0_stateless/02319_lightweight_delete_on_merge_tree_compact_parts.sql @@ -7,7 +7,6 @@ INSERT INTO merge_table_standard_delete select number, toString(number) from num SELECT COUNT(), part_type FROM system.parts WHERE database = currentDatabase() AND table = 'merge_table_standard_delete' AND active GROUP BY part_type ORDER BY part_type; SET mutations_sync = 0; -SET allow_experimental_lightweight_delete = 1; DELETE FROM merge_table_standard_delete WHERE id = 10; SELECT COUNT(), part_type FROM system.parts WHERE database = currentDatabase() AND table = 'merge_table_standard_delete' AND active GROUP BY part_type ORDER BY part_type; diff --git a/tests/queries/0_stateless/02352_lightweight_delete.sql b/tests/queries/0_stateless/02352_lightweight_delete.sql index 8a88e48b207..e1759e56a3a 100644 --- a/tests/queries/0_stateless/02352_lightweight_delete.sql +++ b/tests/queries/0_stateless/02352_lightweight_delete.sql @@ -5,7 +5,6 @@ CREATE TABLE lwd_test (id UInt64 , value String) ENGINE MergeTree() ORDER BY id; INSERT INTO lwd_test SELECT number, randomString(10) FROM system.numbers LIMIT 1000000; SET mutations_sync = 0; -SET allow_experimental_lightweight_delete = 1; SELECT 'Rows in parts', SUM(rows) FROM system.parts WHERE database = currentDatabase() AND table = 'lwd_test' AND active; SELECT 'Count', count() FROM lwd_test; diff --git a/tests/queries/0_stateless/02352_lightweight_delete_on_replicated_merge_tree.sql b/tests/queries/0_stateless/02352_lightweight_delete_on_replicated_merge_tree.sql index 24e7b5684ec..4c3955bf746 100644 --- a/tests/queries/0_stateless/02352_lightweight_delete_on_replicated_merge_tree.sql +++ b/tests/queries/0_stateless/02352_lightweight_delete_on_replicated_merge_tree.sql @@ -9,7 +9,6 @@ CREATE TABLE replicated_table_r2(id Int32, name String) ENGINE = ReplicatedMerge INSERT INTO replicated_table_r1 select number, toString(number) FROM numbers(100); SET mutations_sync = 0; -SET allow_experimental_lightweight_delete = 1; DELETE FROM replicated_table_r1 WHERE id = 10; diff --git a/tests/queries/0_stateless/02404_lightweight_delete_vertical_merge.sql b/tests/queries/0_stateless/02404_lightweight_delete_vertical_merge.sql index 9af0825dcd6..39c1ae3c218 100644 --- a/tests/queries/0_stateless/02404_lightweight_delete_vertical_merge.sql +++ b/tests/queries/0_stateless/02404_lightweight_delete_vertical_merge.sql @@ -32,7 +32,6 @@ ORDER BY name, column; SET mutations_sync = 0; -SET allow_experimental_lightweight_delete = 1; -- delete some rows using LWD DELETE FROM lwd_test WHERE (id % 3) = 0; diff --git a/tests/queries/0_stateless/02428_delete_with_settings.sql b/tests/queries/0_stateless/02428_delete_with_settings.sql index 2d49fc55fd0..071a3f74184 100644 --- a/tests/queries/0_stateless/02428_delete_with_settings.sql +++ b/tests/queries/0_stateless/02428_delete_with_settings.sql @@ -1,6 +1,5 @@ drop table if exists test; create table test (id Int32, key String) engine=MergeTree() order by tuple(); insert into test select number, toString(number) from numbers(1000000); -set allow_experimental_lightweight_delete=1; delete from test where id % 2 = 0 SETTINGS mutations_sync=0; select count() from test; diff --git a/tests/queries/0_stateless/02461_prewhere_row_level_policy_lightweight_delete.sql.j2 b/tests/queries/0_stateless/02461_prewhere_row_level_policy_lightweight_delete.sql.j2 index e1ec348e6ac..1e4258cef7e 100644 --- a/tests/queries/0_stateless/02461_prewhere_row_level_policy_lightweight_delete.sql.j2 +++ b/tests/queries/0_stateless/02461_prewhere_row_level_policy_lightweight_delete.sql.j2 @@ -24,7 +24,6 @@ insert into url_na_log select 209, '2022-08-21' from numbers(10000); SET mutations_sync=2; -SET allow_experimental_lightweight_delete=1; OPTIMIZE TABLE url_na_log FINAL; diff --git a/tests/queries/0_stateless/02473_multistep_prewhere.python b/tests/queries/0_stateless/02473_multistep_prewhere.python index ca90c90b70e..37a7280dac2 100644 --- a/tests/queries/0_stateless/02473_multistep_prewhere.python +++ b/tests/queries/0_stateless/02473_multistep_prewhere.python @@ -126,7 +126,7 @@ class Tester: def main(): # Set mutations to synchronous mode and enable lightweight DELETE's - url = os.environ['CLICKHOUSE_URL'] + '&allow_experimental_lightweight_delete=1&max_threads=1' + url = os.environ['CLICKHOUSE_URL'] + '&max_threads=1' default_index_granularity = 10; total_rows = 8 * default_index_granularity diff --git a/tests/queries/0_stateless/02481_prewhere_filtered_rows_div_by_zero.reference b/tests/queries/0_stateless/02481_prewhere_filtered_rows_div_by_zero.reference index f9c1c174a7d..b0ec7cd7698 100644 --- a/tests/queries/0_stateless/02481_prewhere_filtered_rows_div_by_zero.reference +++ b/tests/queries/0_stateless/02481_prewhere_filtered_rows_div_by_zero.reference @@ -43,7 +43,7 @@ SELECT intDiv(b, c) FROM test_filter PREWHERE c != 0 WHERE b%2 != 0; 5 9 13 -SET mutations_sync = 2, allow_experimental_lightweight_delete = 1; +SET mutations_sync = 2; -- Delete all rows where division by zero could occur DELETE FROM test_filter WHERE c = 0; -- Test that now division by zero doesn't occur without explicit condition diff --git a/tests/queries/0_stateless/02481_prewhere_filtered_rows_div_by_zero.sql b/tests/queries/0_stateless/02481_prewhere_filtered_rows_div_by_zero.sql index ab675df75cf..e3ceda15676 100644 --- a/tests/queries/0_stateless/02481_prewhere_filtered_rows_div_by_zero.sql +++ b/tests/queries/0_stateless/02481_prewhere_filtered_rows_div_by_zero.sql @@ -15,7 +15,7 @@ SELECT intDiv(b, c) FROM test_filter PREWHERE c != 0; SELECT intDiv(b, c) FROM test_filter PREWHERE c != 0 WHERE b%2 != 0; -SET mutations_sync = 2, allow_experimental_lightweight_delete = 1; +SET mutations_sync = 2; -- Delete all rows where division by zero could occur DELETE FROM test_filter WHERE c = 0; diff --git a/tests/queries/0_stateless/02513_prewhere_combine_step_filters.sql b/tests/queries/0_stateless/02513_prewhere_combine_step_filters.sql index 771893ce674..7445fa05c66 100644 --- a/tests/queries/0_stateless/02513_prewhere_combine_step_filters.sql +++ b/tests/queries/0_stateless/02513_prewhere_combine_step_filters.sql @@ -4,7 +4,6 @@ CREATE TABLE table_02513 (n UInt64) ENGINE=MergeTree() ORDER BY tuple() SETTINGS INSERT INTO table_02513 SELECT number+11*13*1000 FROM numbers(20); -SET allow_experimental_lightweight_delete=1; SET mutations_sync=2; SET max_threads=1; diff --git a/tests/queries/0_stateless/02518_delete_on_materialized_view.sql b/tests/queries/0_stateless/02518_delete_on_materialized_view.sql index 73abca4ea53..f655d0ce6cb 100644 --- a/tests/queries/0_stateless/02518_delete_on_materialized_view.sql +++ b/tests/queries/0_stateless/02518_delete_on_materialized_view.sql @@ -7,7 +7,6 @@ CREATE MATERIALIZED VIEW kekv ENGINE = MergeTree ORDER BY tuple() AS SELECT * FR INSERT INTO kek VALUES (1); DELETE FROM kekv WHERE a = 1; -- { serverError BAD_ARGUMENTS} -SET allow_experimental_lightweight_delete=1; DELETE FROM kekv WHERE a = 1; -- { serverError BAD_ARGUMENTS} DROP TABLE IF EXISTS kek; diff --git a/tests/queries/0_stateless/02521_lightweight_delete_and_ttl.sql b/tests/queries/0_stateless/02521_lightweight_delete_and_ttl.sql index cf2fe452e4b..1600761bb84 100644 --- a/tests/queries/0_stateless/02521_lightweight_delete_and_ttl.sql +++ b/tests/queries/0_stateless/02521_lightweight_delete_and_ttl.sql @@ -11,7 +11,6 @@ INSERT INTO lwd_test_02521 SELECT number, randomString(10), now() FROM numbers(5 OPTIMIZE TABLE lwd_test_02521 FINAL SETTINGS mutations_sync = 1; SET mutations_sync=1; -SET allow_experimental_lightweight_delete = 1; -- { echoOn } SELECT 'Rows in parts', SUM(rows) FROM system.parts WHERE database = currentDatabase() AND table = 'lwd_test_02521' AND active; diff --git a/tests/queries/0_stateless/02541_lightweight_delete_on_cluster.sql b/tests/queries/0_stateless/02541_lightweight_delete_on_cluster.sql index 5d3da88d727..bac686ff96d 100644 --- a/tests/queries/0_stateless/02541_lightweight_delete_on_cluster.sql +++ b/tests/queries/0_stateless/02541_lightweight_delete_on_cluster.sql @@ -10,8 +10,6 @@ INSERT INTO t1_local VALUES('partition2', 1,2); INSERT INTO t1_local VALUES('partition1', 2,3); INSERT INTO t1_local VALUES('partition2', 2,4); -SET allow_experimental_lightweight_delete=1; - -- { echoOn } SELECT * FROM t1_local ORDER BY tc1, tc2; From f3e3b916c913fee844ab9b564112289bb12130f9 Mon Sep 17 00:00:00 2001 From: kssenii Date: Wed, 1 Mar 2023 19:53:01 +0100 Subject: [PATCH 383/841] Allow nested custom disks --- src/Disks/getOrCreateDiskFromAST.cpp | 119 ++++++++++++------ src/Disks/getOrCreateDiskFromAST.h | 2 +- src/Parsers/FieldFromAST.cpp | 87 ++++++++----- src/Storages/MergeTree/MergeTreeSettings.cpp | 3 +- .../test_disk_configuration/test.py | 52 ++++++++ ...54_create_table_with_custom_disk.reference | 1 + .../02454_create_table_with_custom_disk.sql | 10 ++ 7 files changed, 204 insertions(+), 70 deletions(-) diff --git a/src/Disks/getOrCreateDiskFromAST.cpp b/src/Disks/getOrCreateDiskFromAST.cpp index 997bd2c853f..4479b532fb9 100644 --- a/src/Disks/getOrCreateDiskFromAST.cpp +++ b/src/Disks/getOrCreateDiskFromAST.cpp @@ -6,9 +6,14 @@ #include #include #include +#include +#include +#include #include #include #include +#include +#include namespace DB { @@ -18,48 +23,90 @@ namespace ErrorCodes extern const int BAD_ARGUMENTS; } -std::string getOrCreateDiskFromDiskAST(const ASTFunction & function, ContextPtr context) +namespace { - /// We need a unique name for a created custom disk, but it needs to be the same - /// after table is reattached or server is restarted, so take a hash of the disk - /// configuration serialized ast as a disk name suffix. - auto disk_setting_string = serializeAST(function, true); - auto disk_name = DiskSelector::TMP_INTERNAL_DISK_PREFIX - + toString(sipHash128(disk_setting_string.data(), disk_setting_string.size())); - - LOG_TRACE( - &Poco::Logger::get("getOrCreateDiskFromDiskAST"), - "Using disk name `{}` for custom disk {}", - disk_name, disk_setting_string); - - auto result_disk = context->getOrCreateDisk(disk_name, [&](const DisksMap & disks_map) -> DiskPtr { - const auto * function_args_expr = assert_cast(function.arguments.get()); - const auto & function_args = function_args_expr->children; - auto config = getDiskConfigurationFromAST(disk_name, function_args, context); - auto disk = DiskFactory::instance().create(disk_name, *config, disk_name, context, disks_map); - /// Mark that disk can be used without storage policy. - disk->markDiskAsCustom(); - return disk; - }); - - if (!result_disk->isRemote()) + std::string getOrCreateDiskFromDiskAST(const ASTFunction & function, ContextPtr context) { - static constexpr auto custom_disks_base_dir_in_config = "custom_local_disks_base_directory"; - auto disk_path_expected_prefix = context->getConfigRef().getString(custom_disks_base_dir_in_config, ""); + /// We need a unique name for a created custom disk, but it needs to be the same + /// after table is reattached or server is restarted, so take a hash of the disk + /// configuration serialized ast as a disk name suffix. + auto disk_setting_string = serializeAST(function, true); + auto disk_name = DiskSelector::TMP_INTERNAL_DISK_PREFIX + + toString(sipHash128(disk_setting_string.data(), disk_setting_string.size())); - if (disk_path_expected_prefix.empty()) - throw Exception( - ErrorCodes::BAD_ARGUMENTS, - "Base path for custom local disks must be defined in config file by `{}`", - custom_disks_base_dir_in_config); + LOG_TRACE( + &Poco::Logger::get("getOrCreateDiskFromDiskAST"), + "Using disk name `{}` for custom disk {}", + disk_name, disk_setting_string); - if (!pathStartsWith(result_disk->getPath(), disk_path_expected_prefix)) - throw Exception( - ErrorCodes::BAD_ARGUMENTS, - "Path of the custom local disk must be inside `{}` directory", - disk_path_expected_prefix); + auto result_disk = context->getOrCreateDisk(disk_name, [&](const DisksMap & disks_map) -> DiskPtr { + const auto * function_args_expr = assert_cast(function.arguments.get()); + const auto & function_args = function_args_expr->children; + auto config = getDiskConfigurationFromAST(disk_name, function_args, context); + auto disk = DiskFactory::instance().create(disk_name, *config, disk_name, context, disks_map); + /// Mark that disk can be used without storage policy. + disk->markDiskAsCustom(); + return disk; + }); + + if (!result_disk->isRemote()) + { + static constexpr auto custom_disks_base_dir_in_config = "custom_local_disks_base_directory"; + auto disk_path_expected_prefix = context->getConfigRef().getString(custom_disks_base_dir_in_config, ""); + + if (disk_path_expected_prefix.empty()) + throw Exception( + ErrorCodes::BAD_ARGUMENTS, + "Base path for custom local disks must be defined in config file by `{}`", + custom_disks_base_dir_in_config); + + if (!pathStartsWith(result_disk->getPath(), disk_path_expected_prefix)) + throw Exception( + ErrorCodes::BAD_ARGUMENTS, + "Path of the custom local disk must be inside `{}` directory", + disk_path_expected_prefix); + } + + return disk_name; } + class DiskConfigurationFlattener + { + public: + struct Data + { + ContextPtr context; + }; + + static bool needChildVisit(const ASTPtr &, const ASTPtr &) { return true; } + + static void visit(ASTPtr & ast, Data & data) + { + if (isDiskFunction(ast)) + { + auto disk_name = getOrCreateDiskFromDiskAST(*ast->as(), data.context); + ast = std::make_shared(disk_name); + } + } + }; + + /// Visits children first. + using FlattenDiskConfigurationVisitor = InDepthNodeVisitor; +} + + +std::string getOrCreateDiskFromDiskAST(const ASTPtr & disk_function, ContextPtr context) +{ + if (!isDiskFunction(disk_function)) + throw Exception(ErrorCodes::BAD_ARGUMENTS, "Expected a disk function"); + + auto ast = disk_function->clone(); + + FlattenDiskConfigurationVisitor::Data data{context}; + FlattenDiskConfigurationVisitor{data}.visit(ast); + + auto disk_name = assert_cast(*ast).value.get(); + LOG_TRACE(&Poco::Logger::get("getOrCreateDiskFromDiskAST"), "Result disk name: {}", disk_name); return disk_name; } diff --git a/src/Disks/getOrCreateDiskFromAST.h b/src/Disks/getOrCreateDiskFromAST.h index 7c64707b0bd..0195f575278 100644 --- a/src/Disks/getOrCreateDiskFromAST.h +++ b/src/Disks/getOrCreateDiskFromAST.h @@ -13,6 +13,6 @@ class ASTFunction; * add it to DiskSelector by a unique (but always the same for given configuration) disk name * and return this name. */ -std::string getOrCreateDiskFromDiskAST(const ASTFunction & function, ContextPtr context); +std::string getOrCreateDiskFromDiskAST(const ASTPtr & disk_function, ContextPtr context); } diff --git a/src/Parsers/FieldFromAST.cpp b/src/Parsers/FieldFromAST.cpp index 3cd10c1cf80..cdfd9c627bc 100644 --- a/src/Parsers/FieldFromAST.cpp +++ b/src/Parsers/FieldFromAST.cpp @@ -5,7 +5,10 @@ #include #include #include +#include +#include #include +#include namespace DB @@ -31,42 +34,64 @@ bool FieldFromASTImpl::isSecret() const return isDiskFunction(ast); } +class DiskConfigurationHider +{ +public: + struct Data {}; + + static bool needChildVisit(const ASTPtr &, const ASTPtr &) { return true; } + + static void visit(ASTPtr & ast, Data &) + { + if (isDiskFunction(ast)) + { + const auto & disk_function = assert_cast(*ast); + const auto * disk_function_args_expr = assert_cast(disk_function.arguments.get()); + const auto & disk_function_args = disk_function_args_expr->children; + + auto is_secret_arg = [](const std::string & arg_name) + { + /// We allow to not hide type of the disk, e.g. disk(type = s3, ...) + /// and also nested disk, e.g. disk(type = cache, disk = disk(type = s3, ...)) + return arg_name != "type" && arg_name != "disk"; + }; + + for (const auto & arg : disk_function_args) + { + auto * setting_function = arg->as(); + if (!setting_function || setting_function->name != "equals") + throw Exception(ErrorCodes::BAD_ARGUMENTS, "Bad format: expected equals function"); + + auto * function_args_expr = assert_cast(setting_function->arguments.get()); + if (!function_args_expr) + throw Exception(ErrorCodes::BAD_ARGUMENTS, "Bad format: expected arguments"); + + auto & function_args = function_args_expr->children; + if (function_args.empty()) + throw Exception(ErrorCodes::BAD_ARGUMENTS, "Bad format: expected non zero number of arguments"); + + auto * key_identifier = function_args[0]->as(); + if (!key_identifier) + throw Exception(ErrorCodes::BAD_ARGUMENTS, "Bad format: expected Identifier"); + + const std::string & key = key_identifier->name(); + if (is_secret_arg(key)) + function_args[1] = std::make_shared("[HIDDEN]"); + } + } + } +}; + +/// Visits children first. +using HideDiskConfigurationVisitor = InDepthNodeVisitor; + String FieldFromASTImpl::toString(bool show_secrets) const { if (!show_secrets && isDiskFunction(ast)) { auto hidden = ast->clone(); - const auto & disk_function = assert_cast(*hidden); - const auto * disk_function_args_expr = assert_cast(disk_function.arguments.get()); - const auto & disk_function_args = disk_function_args_expr->children; - - auto is_secret_arg = [](const std::string & arg_name) - { - return arg_name != "type"; - }; - - for (const auto & arg : disk_function_args) - { - auto * setting_function = arg->as(); - if (!setting_function || setting_function->name != "equals") - throw Exception(ErrorCodes::BAD_ARGUMENTS, "Bad format: expected equals function"); - - auto * function_args_expr = assert_cast(setting_function->arguments.get()); - if (!function_args_expr) - throw Exception(ErrorCodes::BAD_ARGUMENTS, "Bad format: expected arguments"); - - auto & function_args = function_args_expr->children; - if (function_args.empty()) - throw Exception(ErrorCodes::BAD_ARGUMENTS, "Bad format: expected non zero number of arguments"); - - auto * key_identifier = function_args[0]->as(); - if (!key_identifier) - throw Exception(ErrorCodes::BAD_ARGUMENTS, "Bad format: expected Identifier"); - - const std::string & key = key_identifier->name(); - if (is_secret_arg(key)) - function_args[1] = std::make_shared("[HIDDEN]"); - } + HideDiskConfigurationVisitor::Data data{}; + HideDiskConfigurationVisitor{data}.visit(hidden); return serializeAST(*hidden); } diff --git a/src/Storages/MergeTree/MergeTreeSettings.cpp b/src/Storages/MergeTree/MergeTreeSettings.cpp index e951b8f54cf..479e50fdebb 100644 --- a/src/Storages/MergeTree/MergeTreeSettings.cpp +++ b/src/Storages/MergeTree/MergeTreeSettings.cpp @@ -64,8 +64,7 @@ void MergeTreeSettings::loadFromQuery(ASTStorage & storage_def, ContextPtr conte auto ast = dynamic_cast(custom.getImpl()).ast; if (ast && isDiskFunction(ast)) { - const auto & ast_function = assert_cast(*ast); - auto disk_name = getOrCreateDiskFromDiskAST(ast_function, context); + auto disk_name = getOrCreateDiskFromDiskAST(ast, context); LOG_TRACE(&Poco::Logger::get("MergeTreeSettings"), "Created custom disk {}", disk_name); value = disk_name; } diff --git a/tests/integration/test_disk_configuration/test.py b/tests/integration/test_disk_configuration/test.py index 34f8bea219f..96cdb0213bc 100644 --- a/tests/integration/test_disk_configuration/test.py +++ b/tests/integration/test_disk_configuration/test.py @@ -295,6 +295,58 @@ def test_merge_tree_custom_disk_setting(start_cluster): ) +def test_merge_tree_nested_custom_disk_setting(start_cluster): + node = cluster.instances["node1"] + + minio = cluster.minio_client + for obj in list(minio.list_objects(cluster.minio_bucket, "data/", recursive=True)): + minio.remove_object(cluster.minio_bucket, obj.object_name) + assert ( + len(list(minio.list_objects(cluster.minio_bucket, "data/", recursive=True))) + == 0 + ) + + node.query( + """ + DROP TABLE IF EXISTS test; + CREATE TABLE test (a Int32) + ENGINE = MergeTree() order by tuple() + SETTINGS disk = disk( + type=cache, + max_size='1Gi', + path='/var/lib/clickhouse/custom_disk_cache/', + disk=disk( + type=s3, + endpoint='http://minio1:9001/root/data/', + access_key_id='minio', + secret_access_key='minio123')); + """ + ) + + node.query("INSERT INTO test SELECT number FROM numbers(100)") + node.query("SYSTEM DROP FILESYSTEM CACHE") + + # Check cache is filled + assert 0 == int(node.query("SELECT count() FROM system.filesystem_cache")) + assert 100 == int(node.query("SELECT count() FROM test")) + node.query("SELECT * FROM test") + assert 0 < int(node.query("SELECT count() FROM system.filesystem_cache")) + + # Check s3 is filled + assert ( + len(list(minio.list_objects(cluster.minio_bucket, "data/", recursive=True))) > 0 + ) + + node.restart_clickhouse() + + assert 100 == int(node.query("SELECT count() FROM test")) + + expected = """ + SETTINGS disk = disk(type = cache, max_size = \\'[HIDDEN]\\', path = \\'[HIDDEN]\\', disk = disk(type = s3, endpoint = \\'[HIDDEN]\\' + """ + assert expected.strip() in node.query(f"SHOW CREATE TABLE test").strip() + + def test_merge_tree_setting_override(start_cluster): node = cluster.instances["node3"] assert ( diff --git a/tests/queries/0_stateless/02454_create_table_with_custom_disk.reference b/tests/queries/0_stateless/02454_create_table_with_custom_disk.reference index 1d8610c59c9..a71d52b6f57 100644 --- a/tests/queries/0_stateless/02454_create_table_with_custom_disk.reference +++ b/tests/queries/0_stateless/02454_create_table_with_custom_disk.reference @@ -9,3 +9,4 @@ SETTINGS disk = disk(type = local, path = \'/var/lib/clickhouse/disks/local/\') CREATE TABLE default.test\n(\n `a` Int32\n)\nENGINE = MergeTree\nORDER BY tuple()\nSETTINGS disk = disk(type = local, path = \'[HIDDEN]\'), index_granularity = 8192 a Int32 200 +CREATE TABLE default.test\n(\n `a` Int32\n)\nENGINE = MergeTree\nORDER BY tuple()\nSETTINGS disk = disk(type = cache, max_size = \'[HIDDEN]\', path = \'[HIDDEN]\', disk = disk(type = local, path = \'[HIDDEN]\')), index_granularity = 8192 diff --git a/tests/queries/0_stateless/02454_create_table_with_custom_disk.sql b/tests/queries/0_stateless/02454_create_table_with_custom_disk.sql index 6cb1c0774aa..4909f91ccb1 100644 --- a/tests/queries/0_stateless/02454_create_table_with_custom_disk.sql +++ b/tests/queries/0_stateless/02454_create_table_with_custom_disk.sql @@ -26,3 +26,13 @@ DESCRIBE TABLE test; INSERT INTO test SELECT number FROM numbers(100); SELECT count() FROM test; + +DROP TABLE test; + +CREATE TABLE test (a Int32) +ENGINE = MergeTree() order by tuple() +SETTINGS disk = disk(type=cache, max_size='1Gi', path='/var/lib/clickhouse/custom_disk_cache/', disk=disk(type=local, path='/var/lib/clickhouse/disks/local/')); + +SHOW CREATE TABLE test; + +DROP TABLE test; From 13d50509c0b56fbef24132e4687122be633c6983 Mon Sep 17 00:00:00 2001 From: kssenii Date: Wed, 1 Mar 2023 20:16:15 +0100 Subject: [PATCH 384/841] Fix style check --- src/Disks/getOrCreateDiskFromAST.cpp | 1 - src/Parsers/FieldFromAST.cpp | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/Disks/getOrCreateDiskFromAST.cpp b/src/Disks/getOrCreateDiskFromAST.cpp index 4479b532fb9..9abc4a7d413 100644 --- a/src/Disks/getOrCreateDiskFromAST.cpp +++ b/src/Disks/getOrCreateDiskFromAST.cpp @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Parsers/FieldFromAST.cpp b/src/Parsers/FieldFromAST.cpp index cdfd9c627bc..b2251599441 100644 --- a/src/Parsers/FieldFromAST.cpp +++ b/src/Parsers/FieldFromAST.cpp @@ -5,8 +5,6 @@ #include #include #include -#include -#include #include #include From 9f6b154ccfeb498ba18373c5fe66c6e1080a48ea Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Wed, 1 Mar 2023 20:51:23 +0100 Subject: [PATCH 385/841] Insignificant improvement --- tests/ci/terminate_runner_lambda/app.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/ci/terminate_runner_lambda/app.py b/tests/ci/terminate_runner_lambda/app.py index ee9aadc488d..d72e6384ea2 100644 --- a/tests/ci/terminate_runner_lambda/app.py +++ b/tests/ci/terminate_runner_lambda/app.py @@ -64,19 +64,25 @@ def list_runners(access_token: str) -> RunnerDescriptions: "Authorization": f"token {access_token}", "Accept": "application/vnd.github.v3+json", } + per_page = 100 response = requests.get( - "https://api.github.com/orgs/ClickHouse/actions/runners?per_page=100", + f"https://api.github.com/orgs/ClickHouse/actions/runners?per_page={per_page}", headers=headers, ) response.raise_for_status() data = response.json() total_runners = data["total_count"] + print("Expected total runners", total_runners) runners = data["runners"] - total_pages = int(total_runners / 100 + 1) + # round to 0 for 0, 1 for 1..100, but to 2 for 101..200 + total_pages = (total_runners - 1) // per_page + 1 + + print("Total pages", total_pages) for i in range(2, total_pages + 1): response = requests.get( - f"https://api.github.com/orgs/ClickHouse/actions/runners?page={i}&per_page=100", + "https://api.github.com/orgs/ClickHouse/actions/runners" + f"?page={i}&per_page={per_page}", headers=headers, ) response.raise_for_status() @@ -95,6 +101,7 @@ def list_runners(access_token: str) -> RunnerDescriptions: busy=runner["busy"], ) result.append(desc) + return result From cda4ff0df73d9c4bcdd759c0e1dfe6ebe633b82e Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Wed, 1 Mar 2023 19:54:22 +0000 Subject: [PATCH 386/841] Remove trace logs --- tests/config/config.d/keeper_port.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/config/config.d/keeper_port.xml b/tests/config/config.d/keeper_port.xml index 03f80bfbe62..cffd325e968 100644 --- a/tests/config/config.d/keeper_port.xml +++ b/tests/config/config.d/keeper_port.xml @@ -9,13 +9,11 @@ 10000 100000 10000 - false 240000 1000000000000000 100000 - trace 0 From 76451745bcaa4bfa4a224b9ea72c44eece5eab72 Mon Sep 17 00:00:00 2001 From: Sema Checherinda <104093494+CheSema@users.noreply.github.com> Date: Wed, 1 Mar 2023 20:56:38 +0100 Subject: [PATCH 387/841] Update threadPoolCallbackRunner.h --- src/Interpreters/threadPoolCallbackRunner.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Interpreters/threadPoolCallbackRunner.h b/src/Interpreters/threadPoolCallbackRunner.h index c79bc270f41..1d2f67e8e59 100644 --- a/src/Interpreters/threadPoolCallbackRunner.h +++ b/src/Interpreters/threadPoolCallbackRunner.h @@ -30,7 +30,6 @@ ThreadPoolCallbackRunner threadPoolCallbackRunner(ThreadPool & /// Releasing has to use proper memory tracker which has been set here before callback [[maybe_unused]] auto tmp = std::move(callback); - thread_name.clear(); } if (thread_group) From 54336f7c98d0a82823fda6301840e30accb26998 Mon Sep 17 00:00:00 2001 From: robot-clickhouse Date: Wed, 1 Mar 2023 20:12:00 +0000 Subject: [PATCH 388/841] Automatic style fix --- tests/integration/test_replicated_database/test.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/integration/test_replicated_database/test.py b/tests/integration/test_replicated_database/test.py index 669a646edbf..ead9a762b1b 100644 --- a/tests/integration/test_replicated_database/test.py +++ b/tests/integration/test_replicated_database/test.py @@ -232,11 +232,7 @@ def test_delete_from_table(started_cluster, engine): dummy_node.query("INSERT INTO TABLE {} VALUES(1, 'bbbb');".format(name)) dummy_node.query("INSERT INTO TABLE {} VALUES(2, 'bbbb');".format(name)) - main_node.query( - "DELETE FROM {} WHERE id=2;".format( - name - ) - ) + main_node.query("DELETE FROM {} WHERE id=2;".format(name)) expected = "1\taaaa\n1\tbbbb" From e17c0b6bf1e7cfe03e0d3f42a5398aee4ec18edb Mon Sep 17 00:00:00 2001 From: Igor Nikonov Date: Wed, 1 Mar 2023 20:19:51 +0000 Subject: [PATCH 389/841] Review fixes --- src/Planner/PlannerJoinTree.cpp | 30 ++++++++----------- .../02674_trivial_count_analyzer.reference | 5 ++-- .../02674_trivial_count_analyzer.sql | 5 ++-- 3 files changed, 16 insertions(+), 24 deletions(-) diff --git a/src/Planner/PlannerJoinTree.cpp b/src/Planner/PlannerJoinTree.cpp index 11944b4b71d..26fc2764a64 100644 --- a/src/Planner/PlannerJoinTree.cpp +++ b/src/Planner/PlannerJoinTree.cpp @@ -1,6 +1,7 @@ #include #include +#include #include @@ -19,6 +20,8 @@ #include #include #include +#include +#include #include #include @@ -27,6 +30,7 @@ #include #include #include +#include #include #include @@ -41,12 +45,8 @@ #include #include -#include -#include #include #include -#include -#include namespace DB { @@ -174,23 +174,17 @@ bool applyTrivialCountIfPossible( if (!storage || storage->hasLightweightDeletedMask()) return false; - if (settings.max_parallel_replicas > 1 || // - settings.allow_experimental_query_deduplication || // - settings.empty_result_for_aggregation_by_empty_set) + if (settings.max_parallel_replicas > 1 || settings.allow_experimental_query_deduplication + || settings.empty_result_for_aggregation_by_empty_set) return false; QueryTreeNodes aggregates = collectAggregateFunctionNodes(query_tree); if (aggregates.size() != 1) return false; - const auto * function_node = typeid_cast(aggregates.front().get()); - if (!function_node) - return false; - - if (!function_node->getAggregateFunction()) - return false; - - const auto * count_func = typeid_cast(function_node->getAggregateFunction().get()); + const auto & function_node = aggregates.front().get()->as(); + chassert(function_node.getAggregateFunction() != nullptr); + const auto * count_func = typeid_cast(function_node.getAggregateFunction().get()); if (!count_func) return false; @@ -226,7 +220,7 @@ bool applyTrivialCountIfPossible( SCOPE_EXIT_MEMORY_SAFE(agg_count.destroy(place)); agg_count.set(place, num_rows.value()); - auto column = ColumnAggregateFunction::create(function_node->getAggregateFunction()); + auto column = ColumnAggregateFunction::create(function_node.getAggregateFunction()); column->insertFrom(place); /// get count() argument type @@ -240,7 +234,7 @@ bool applyTrivialCountIfPossible( Block block_with_count{ {std::move(column), - std::make_shared(function_node->getAggregateFunction(), argument_types, Array{}), + std::make_shared(function_node.getAggregateFunction(), argument_types, Array{}), columns_names.front()}}; auto source = std::make_shared(block_with_count); @@ -416,7 +410,7 @@ JoinTreeQueryPlan buildQueryPlanForTableExpression(const QueryTreeNodePtr & tabl } } - /// apply trivial_count optimization if possible + /// Apply trivial_count optimization if possible bool is_trivial_count_applied = is_single_table_expression && table_node && select_query_info.has_aggregates && applyTrivialCountIfPossible(query_plan, *table_node, select_query_info.query_tree, planner_context->getQueryContext(), columns_names); diff --git a/tests/queries/0_stateless/02674_trivial_count_analyzer.reference b/tests/queries/0_stateless/02674_trivial_count_analyzer.reference index 2a94fd59d7b..05feadb58a0 100644 --- a/tests/queries/0_stateless/02674_trivial_count_analyzer.reference +++ b/tests/queries/0_stateless/02674_trivial_count_analyzer.reference @@ -18,8 +18,7 @@ select count(b) from m3; 2 select count() + 1 from m3; 3 --- drop table m3; - +drop table m3; -- checking queries with FINAL create table replacing_m3(a Int64, b UInt64) Engine=ReplacingMergeTree() order by (a, b); SYSTEM STOP MERGES replacing_m3; @@ -39,10 +38,10 @@ select count(a) from replacing_m3; 4 select count(b) from replacing_m3; 4 -set optimize_trivial_count_query=0; -- FIXME: wrong result for queries with FINAL select count() from replacing_m3 FINAL; 3 select count(a) from replacing_m3 FINAL; 3 select count(b) from replacing_m3 FINAL; 3 +drop table replacing_m3; diff --git a/tests/queries/0_stateless/02674_trivial_count_analyzer.sql b/tests/queries/0_stateless/02674_trivial_count_analyzer.sql index d4a686e6eff..988d1b9ba92 100644 --- a/tests/queries/0_stateless/02674_trivial_count_analyzer.sql +++ b/tests/queries/0_stateless/02674_trivial_count_analyzer.sql @@ -19,7 +19,7 @@ select count(a) from m3; select count(b) from m3; select count() + 1 from m3; --- drop table m3; +drop table m3; -- checking queries with FINAL create table replacing_m3(a Int64, b UInt64) Engine=ReplacingMergeTree() order by (a, b); @@ -38,9 +38,8 @@ select count(*) from replacing_m3; select count(a) from replacing_m3; select count(b) from replacing_m3; -set optimize_trivial_count_query=0; -- FIXME: wrong result for queries with FINAL select count() from replacing_m3 FINAL; select count(a) from replacing_m3 FINAL; select count(b) from replacing_m3 FINAL; --- drop table replacing_m3; +drop table replacing_m3; From 169398ec07d0db3d7812526db00aa1c3d4481fb2 Mon Sep 17 00:00:00 2001 From: Alexey Korepanov Date: Wed, 1 Mar 2023 21:57:51 +0100 Subject: [PATCH 390/841] Add check for empty leading spaces --- programs/server/play.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/programs/server/play.html b/programs/server/play.html index d90293fbd1b..8c3dd0c1f5b 100644 --- a/programs/server/play.html +++ b/programs/server/play.html @@ -687,6 +687,10 @@ const prev_lines = text_before_cursor.split('\n'); const prev_line = prev_lines.pop(); const lead_spaces = prev_line.match(/^\s*/)[0]; + if (!lead_spaces) { + return; + } + // Add leading spaces to the current line. elem.value = text_before_cursor + '\n' + lead_spaces + text_after_cursor; elem.selectionStart = cursor_pos + lead_spaces.length + 1; From 640753d9a3ab797c661e9d50f707fdcaa145488b Mon Sep 17 00:00:00 2001 From: DanRoscigno Date: Wed, 1 Mar 2023 16:06:39 -0500 Subject: [PATCH 391/841] remove install option --- docs/_includes/install/universal.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/_includes/install/universal.sh b/docs/_includes/install/universal.sh index 1699be138c8..403aab6f4e6 100755 --- a/docs/_includes/install/universal.sh +++ b/docs/_includes/install/universal.sh @@ -85,9 +85,9 @@ echo echo "Successfully downloaded the ClickHouse binary, you can run it as: ./${clickhouse}" -if [ "${OS}" = "Linux" ] -then - echo - echo "You can also install it: - sudo ./${clickhouse} install" -fi +#if [ "${OS}" = "Linux" ] +#then + #echo + #echo "You can also install it: + #sudo ./${clickhouse} install" +#fi From 5ab5902f38906254af902d01cc71851f6cb78401 Mon Sep 17 00:00:00 2001 From: avogar Date: Wed, 1 Mar 2023 21:27:46 +0000 Subject: [PATCH 392/841] Allow control compression in Parquet/ORC/Arrow output formats, support more compression for input formats --- contrib/arrow-cmake/CMakeLists.txt | 20 +++++++++- contrib/orc | 2 +- src/Core/Settings.h | 3 ++ src/Core/SettingsEnums.cpp | 23 +++++++++++- src/Core/SettingsEnums.h | 6 +++ src/Formats/FormatFactory.cpp | 3 ++ src/Formats/FormatSettings.h | 29 +++++++++++++++ .../Formats/Impl/ArrowBlockOutputFormat.cpp | 26 ++++++++++++- .../Formats/Impl/ORCBlockOutputFormat.cpp | 32 +++++++++++++++- .../Formats/Impl/ParquetBlockOutputFormat.cpp | 37 +++++++++++++++++-- 10 files changed, 171 insertions(+), 10 deletions(-) diff --git a/contrib/arrow-cmake/CMakeLists.txt b/contrib/arrow-cmake/CMakeLists.txt index ae6f270a768..4181f916d63 100644 --- a/contrib/arrow-cmake/CMakeLists.txt +++ b/contrib/arrow-cmake/CMakeLists.txt @@ -115,6 +115,13 @@ configure_file("${ORC_SOURCE_SRC_DIR}/Adaptor.hh.in" "${ORC_BUILD_INCLUDE_DIR}/A # ARROW_ORC + adapters/orc/CMakefiles set(ORC_SRCS + "${CMAKE_CURRENT_BINARY_DIR}/orc_proto.pb.h" + "${ORC_SOURCE_SRC_DIR}/sargs/ExpressionTree.cc" + "${ORC_SOURCE_SRC_DIR}/sargs/Literal.cc" + "${ORC_SOURCE_SRC_DIR}/sargs/PredicateLeaf.cc" + "${ORC_SOURCE_SRC_DIR}/sargs/SargsApplier.cc" + "${ORC_SOURCE_SRC_DIR}/sargs/SearchArgument.cc" + "${ORC_SOURCE_SRC_DIR}/sargs/TruthValue.cc" "${ORC_SOURCE_SRC_DIR}/Exceptions.cc" "${ORC_SOURCE_SRC_DIR}/OrcFile.cc" "${ORC_SOURCE_SRC_DIR}/Reader.cc" @@ -129,13 +136,20 @@ set(ORC_SRCS "${ORC_SOURCE_SRC_DIR}/MemoryPool.cc" "${ORC_SOURCE_SRC_DIR}/RLE.cc" "${ORC_SOURCE_SRC_DIR}/RLEv1.cc" - "${ORC_SOURCE_SRC_DIR}/RLEv2.cc" + "${ORC_SOURCE_SRC_DIR}/RleDecoderV2.cc" + "${ORC_SOURCE_SRC_DIR}/RleEncoderV2.cc" + "${ORC_SOURCE_SRC_DIR}/RLEV2Util.cc" "${ORC_SOURCE_SRC_DIR}/Statistics.cc" "${ORC_SOURCE_SRC_DIR}/StripeStream.cc" "${ORC_SOURCE_SRC_DIR}/Timezone.cc" "${ORC_SOURCE_SRC_DIR}/TypeImpl.cc" "${ORC_SOURCE_SRC_DIR}/Vector.cc" "${ORC_SOURCE_SRC_DIR}/Writer.cc" + "${ORC_SOURCE_SRC_DIR}/Adaptor.cc" + "${ORC_SOURCE_SRC_DIR}/BloomFilter.cc" + "${ORC_SOURCE_SRC_DIR}/Murmur3.cc" + "${ORC_SOURCE_SRC_DIR}/BlockBuffer.cc" + "${ORC_SOURCE_SRC_DIR}/wrap/orc-proto-wrapper.cc" "${ORC_SOURCE_SRC_DIR}/io/InputStream.cc" "${ORC_SOURCE_SRC_DIR}/io/OutputStream.cc" "${ORC_ADDITION_SOURCE_DIR}/orc_proto.pb.cc" @@ -358,6 +372,9 @@ SET(ARROW_SRCS "${LIBRARY_DIR}/util/compression_zlib.cc" ${ARROW_SRCS}) add_definitions(-DARROW_WITH_ZSTD) SET(ARROW_SRCS "${LIBRARY_DIR}/util/compression_zstd.cc" ${ARROW_SRCS}) +add_definitions(-DARROW_WITH_BROTLI) +SET(ARROW_SRCS "${LIBRARY_DIR}/util/compression_brotli.cc" ${ARROW_SRCS}) + add_library(_arrow ${ARROW_SRCS}) @@ -372,6 +389,7 @@ target_link_libraries(_arrow PRIVATE ch_contrib::snappy ch_contrib::zlib ch_contrib::zstd + ch_contrib::brotli ) target_link_libraries(_arrow PUBLIC _orc) diff --git a/contrib/orc b/contrib/orc index f9a393ed243..c5d7755ba0b 160000 --- a/contrib/orc +++ b/contrib/orc @@ -1 +1 @@ -Subproject commit f9a393ed2433a60034795284f82d093b348f2102 +Subproject commit c5d7755ba0b9a95631c8daea4d094101f26ec761 diff --git a/src/Core/Settings.h b/src/Core/Settings.h index 3908254b6f1..8d3e787f42c 100644 --- a/src/Core/Settings.h +++ b/src/Core/Settings.h @@ -857,6 +857,7 @@ class IColumn; M(Bool, output_format_parquet_string_as_string, false, "Use Parquet String type instead of Binary for String columns.", 0) \ M(Bool, output_format_parquet_fixed_string_as_fixed_byte_array, true, "Use Parquet FIXED_LENGTH_BYTE_ARRAY type instead of Binary for FixedString columns.", 0) \ M(ParquetVersion, output_format_parquet_version, "2.latest", "Parquet format version for output format. Supported versions: 1.0, 2.4, 2.6 and 2.latest (default)", 0) \ + M(ParquetCompression, output_format_parquet_compression_method, "snappy", "Compression method for Parquet output format. Supported codecs: snappy, lz4, brotli, zstd, gzip, none (uncompressed)", 0) \ M(String, output_format_avro_codec, "", "Compression codec used for output. Possible values: 'null', 'deflate', 'snappy'.", 0) \ M(UInt64, output_format_avro_sync_interval, 16 * 1024, "Sync interval in bytes.", 0) \ M(String, output_format_avro_string_column_pattern, "", "For Avro format: regexp of String columns to select as AVRO string.", 0) \ @@ -899,8 +900,10 @@ class IColumn; M(Bool, output_format_arrow_low_cardinality_as_dictionary, false, "Enable output LowCardinality type as Dictionary Arrow type", 0) \ M(Bool, output_format_arrow_string_as_string, false, "Use Arrow String type instead of Binary for String columns", 0) \ M(Bool, output_format_arrow_fixed_string_as_fixed_byte_array, true, "Use Arrow FIXED_SIZE_BINARY type instead of Binary for FixedString columns.", 0) \ + M(ArrowCompression, output_format_arrow_compression_method, "none", "Compression method for Arrow output format. Supported codecs: lz4_frame, zstd, none (uncompressed)", 0) \ \ M(Bool, output_format_orc_string_as_string, false, "Use ORC String type instead of Binary for String columns", 0) \ + M(ORCCompression, output_format_orc_compression_method, "none", "Compression method for ORC output format. Supported codecs: lz4, snappy, zlib, zstd, none (uncompressed)", 0) \ \ M(EnumComparingMode, format_capn_proto_enum_comparising_mode, FormatSettings::EnumComparingMode::BY_VALUES, "How to map ClickHouse Enum and CapnProto Enum", 0) \ \ diff --git a/src/Core/SettingsEnums.cpp b/src/Core/SettingsEnums.cpp index 9e1ab585bb0..91572aa1b3f 100644 --- a/src/Core/SettingsEnums.cpp +++ b/src/Core/SettingsEnums.cpp @@ -158,7 +158,7 @@ IMPLEMENT_SETTING_ENUM(EscapingRule, ErrorCodes::BAD_ARGUMENTS, {"XML", FormatSettings::EscapingRule::XML}, {"Raw", FormatSettings::EscapingRule::Raw}}) -IMPLEMENT_SETTING_ENUM(MsgPackUUIDRepresentation , ErrorCodes::BAD_ARGUMENTS, +IMPLEMENT_SETTING_ENUM(MsgPackUUIDRepresentation, ErrorCodes::BAD_ARGUMENTS, {{"bin", FormatSettings::MsgPackUUIDRepresentation::BIN}, {"str", FormatSettings::MsgPackUUIDRepresentation::STR}, {"ext", FormatSettings::MsgPackUUIDRepresentation::EXT}}) @@ -172,11 +172,30 @@ IMPLEMENT_SETTING_ENUM(LocalFSReadMethod, ErrorCodes::BAD_ARGUMENTS, {"pread", LocalFSReadMethod::pread}, {"read", LocalFSReadMethod::read}}) - IMPLEMENT_SETTING_ENUM_WITH_RENAME(ParquetVersion, ErrorCodes::BAD_ARGUMENTS, {{"1.0", FormatSettings::ParquetVersion::V1_0}, {"2.4", FormatSettings::ParquetVersion::V2_4}, {"2.6", FormatSettings::ParquetVersion::V2_6}, {"2.latest", FormatSettings::ParquetVersion::V2_LATEST}}) +IMPLEMENT_SETTING_ENUM(ParquetCompression, ErrorCodes::BAD_ARGUMENTS, + {{"none", FormatSettings::ParquetCompression::NONE}, + {"snappy", FormatSettings::ParquetCompression::SNAPPY}, + {"zstd", FormatSettings::ParquetCompression::ZSTD}, + {"gzip", FormatSettings::ParquetCompression::GZIP}, + {"lz4", FormatSettings::ParquetCompression::LZ4}, + {"brotli", FormatSettings::ParquetCompression::BROTLI}}) + +IMPLEMENT_SETTING_ENUM(ArrowCompression, ErrorCodes::BAD_ARGUMENTS, + {{"none", FormatSettings::ArrowCompression::NONE}, + {"lz4_frame", FormatSettings::ArrowCompression::LZ4_FRAME}, + {"zstd", FormatSettings::ArrowCompression::ZSTD}}) + +IMPLEMENT_SETTING_ENUM(ORCCompression, ErrorCodes::BAD_ARGUMENTS, + {{"none", FormatSettings::ORCCompression::NONE}, + {"snappy", FormatSettings::ORCCompression::SNAPPY}, + {"zstd", FormatSettings::ORCCompression::ZSTD}, + {"zlib", FormatSettings::ORCCompression::ZLIB}, + {"lz4", FormatSettings::ORCCompression::LZ4}}) + } diff --git a/src/Core/SettingsEnums.h b/src/Core/SettingsEnums.h index 139a04f3a5a..14e952bbd65 100644 --- a/src/Core/SettingsEnums.h +++ b/src/Core/SettingsEnums.h @@ -194,6 +194,12 @@ DECLARE_SETTING_ENUM_WITH_RENAME(EscapingRule, FormatSettings::EscapingRule) DECLARE_SETTING_ENUM_WITH_RENAME(MsgPackUUIDRepresentation, FormatSettings::MsgPackUUIDRepresentation) +DECLARE_SETTING_ENUM_WITH_RENAME(ParquetCompression, FormatSettings::ParquetCompression) + +DECLARE_SETTING_ENUM_WITH_RENAME(ArrowCompression, FormatSettings::ArrowCompression) + +DECLARE_SETTING_ENUM_WITH_RENAME(ORCCompression, FormatSettings::ORCCompression) + enum class Dialect { clickhouse, diff --git a/src/Formats/FormatFactory.cpp b/src/Formats/FormatFactory.cpp index aca3166a8c4..7f14810b260 100644 --- a/src/Formats/FormatFactory.cpp +++ b/src/Formats/FormatFactory.cpp @@ -118,6 +118,7 @@ FormatSettings getFormatSettings(ContextPtr context, const Settings & settings) format_settings.parquet.output_string_as_string = settings.output_format_parquet_string_as_string; format_settings.parquet.output_fixed_string_as_fixed_byte_array = settings.output_format_parquet_fixed_string_as_fixed_byte_array; format_settings.parquet.max_block_size = settings.input_format_parquet_max_block_size; + format_settings.parquet.output_compression_method = settings.output_format_parquet_compression_method; format_settings.pretty.charset = settings.output_format_pretty_grid_charset.toString() == "ASCII" ? FormatSettings::Pretty::Charset::ASCII : FormatSettings::Pretty::Charset::UTF8; format_settings.pretty.color = settings.output_format_pretty_color; format_settings.pretty.max_column_pad_width = settings.output_format_pretty_max_column_pad_width; @@ -158,6 +159,7 @@ FormatSettings getFormatSettings(ContextPtr context, const Settings & settings) format_settings.arrow.case_insensitive_column_matching = settings.input_format_arrow_case_insensitive_column_matching; format_settings.arrow.output_string_as_string = settings.output_format_arrow_string_as_string; format_settings.arrow.output_fixed_string_as_fixed_byte_array = settings.output_format_arrow_fixed_string_as_fixed_byte_array; + format_settings.arrow.output_compression_method = settings.output_format_arrow_compression_method; format_settings.orc.import_nested = settings.input_format_orc_import_nested; format_settings.orc.allow_missing_columns = settings.input_format_orc_allow_missing_columns; format_settings.orc.row_batch_size = settings.input_format_orc_row_batch_size; @@ -168,6 +170,7 @@ FormatSettings getFormatSettings(ContextPtr context, const Settings & settings) format_settings.orc.skip_columns_with_unsupported_types_in_schema_inference = settings.input_format_orc_skip_columns_with_unsupported_types_in_schema_inference; format_settings.orc.case_insensitive_column_matching = settings.input_format_orc_case_insensitive_column_matching; format_settings.orc.output_string_as_string = settings.output_format_orc_string_as_string; + format_settings.orc.output_compression_method = settings.output_format_orc_compression_method; format_settings.defaults_for_omitted_fields = settings.input_format_defaults_for_omitted_fields; format_settings.capn_proto.enum_comparing_mode = settings.format_capn_proto_enum_comparising_mode; format_settings.capn_proto.skip_fields_with_unsupported_types_in_schema_inference = settings.input_format_capn_proto_skip_fields_with_unsupported_types_in_schema_inference; diff --git a/src/Formats/FormatSettings.h b/src/Formats/FormatSettings.h index d1755a35c5f..88a5adbc8df 100644 --- a/src/Formats/FormatSettings.h +++ b/src/Formats/FormatSettings.h @@ -86,6 +86,13 @@ struct FormatSettings UInt64 max_parser_depth = DBMS_DEFAULT_MAX_PARSER_DEPTH; + enum class ArrowCompression + { + NONE, + LZ4_FRAME, + ZSTD + }; + struct { UInt64 row_group_size = 1000000; @@ -96,6 +103,7 @@ struct FormatSettings bool case_insensitive_column_matching = false; bool output_string_as_string = false; bool output_fixed_string_as_fixed_byte_array = true; + ArrowCompression output_compression_method = ArrowCompression::NONE; } arrow; struct @@ -183,6 +191,16 @@ struct FormatSettings V2_LATEST, }; + enum class ParquetCompression + { + NONE, + SNAPPY, + ZSTD, + LZ4, + GZIP, + BROTLI, + }; + struct { UInt64 row_group_size = 1000000; @@ -195,6 +213,7 @@ struct FormatSettings bool output_fixed_string_as_fixed_byte_array = true; UInt64 max_block_size = 8192; ParquetVersion output_version; + ParquetCompression output_compression_method = ParquetCompression::SNAPPY; } parquet; struct Pretty @@ -276,6 +295,15 @@ struct FormatSettings bool accurate_types_of_literals = true; } values; + enum class ORCCompression + { + NONE, + LZ4, + SNAPPY, + ZSTD, + ZLIB, + }; + struct { bool import_nested = false; @@ -285,6 +313,7 @@ struct FormatSettings bool case_insensitive_column_matching = false; std::unordered_set skip_stripes = {}; bool output_string_as_string = false; + ORCCompression output_compression_method = ORCCompression::NONE; } orc; /// For capnProto format we should determine how to diff --git a/src/Processors/Formats/Impl/ArrowBlockOutputFormat.cpp b/src/Processors/Formats/Impl/ArrowBlockOutputFormat.cpp index bf0e2448082..ec35c52e37c 100644 --- a/src/Processors/Formats/Impl/ArrowBlockOutputFormat.cpp +++ b/src/Processors/Formats/Impl/ArrowBlockOutputFormat.cpp @@ -8,6 +8,7 @@ #include #include "ArrowBufferedStreams.h" #include "CHColumnToArrowColumn.h" +#include "config.h" namespace DB @@ -17,6 +18,25 @@ namespace ErrorCodes extern const int UNKNOWN_EXCEPTION; } +namespace +{ + +arrow::Compression::type getArrowCompression(FormatSettings::ArrowCompression method) +{ + switch (method) + { + case FormatSettings::ArrowCompression::NONE: + return arrow::Compression::type::UNCOMPRESSED; + case FormatSettings::ArrowCompression::ZSTD: + return arrow::Compression::type::ZSTD; + case FormatSettings::ArrowCompression::LZ4_FRAME: + return arrow::Compression::type::LZ4_FRAME; + } +} + +} + + ArrowBlockOutputFormat::ArrowBlockOutputFormat(WriteBuffer & out_, const Block & header_, bool stream_, const FormatSettings & format_settings_) : IOutputFormat(header_, out_) , stream{stream_} @@ -78,12 +98,14 @@ void ArrowBlockOutputFormat::prepareWriter(const std::shared_ptr { arrow_ostream = std::make_shared(out); arrow::Result> writer_status; + arrow::ipc::IpcWriteOptions options = arrow::ipc::IpcWriteOptions::Defaults(); + options.codec = *arrow::util::Codec::Create(getArrowCompression(format_settings.arrow.output_compression_method)); // TODO: should we use arrow::ipc::IpcOptions::alignment? if (stream) - writer_status = arrow::ipc::MakeStreamWriter(arrow_ostream.get(), schema); + writer_status = arrow::ipc::MakeStreamWriter(arrow_ostream.get(), schema, options); else - writer_status = arrow::ipc::MakeFileWriter(arrow_ostream.get(), schema); + writer_status = arrow::ipc::MakeFileWriter(arrow_ostream.get(), schema,options); if (!writer_status.ok()) throw Exception(ErrorCodes::UNKNOWN_EXCEPTION, diff --git a/src/Processors/Formats/Impl/ORCBlockOutputFormat.cpp b/src/Processors/Formats/Impl/ORCBlockOutputFormat.cpp index 42c3e178436..ecb7c2fbc92 100644 --- a/src/Processors/Formats/Impl/ORCBlockOutputFormat.cpp +++ b/src/Processors/Formats/Impl/ORCBlockOutputFormat.cpp @@ -22,12 +22,42 @@ #include #include +#include "config.h" + namespace DB { namespace ErrorCodes { extern const int ILLEGAL_COLUMN; + extern const int NOT_IMPLEMENTED; +} + +namespace +{ + +orc::CompressionKind getORCCompression(FormatSettings::ORCCompression method) +{ + if (method == FormatSettings::ORCCompression::NONE) + return orc::CompressionKind::CompressionKind_NONE; + +#if USE_SNAPPY + if (method == FormatSettings::ORCCompression::SNAPPY) + return orc::CompressionKind::CompressionKind_SNAPPY; +#endif + + if (method == FormatSettings::ORCCompression::ZSTD) + return orc::CompressionKind::CompressionKind_ZSTD; + + if (method == FormatSettings::ORCCompression::LZ4) + return orc::CompressionKind::CompressionKind_LZ4; + + if (method == FormatSettings::ORCCompression::ZLIB) + return orc::CompressionKind::CompressionKind_ZLIB; + + throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Unsupported compression method"); +} + } ORCOutputStream::ORCOutputStream(WriteBuffer & out_) : out(out_) {} @@ -529,7 +559,7 @@ void ORCBlockOutputFormat::prepareWriter() { const Block & header = getPort(PortKind::Main).getHeader(); schema = orc::createStructType(); - options.setCompression(orc::CompressionKind::CompressionKind_NONE); + options.setCompression(getORCCompression(format_settings.orc.output_compression_method)); size_t columns_count = header.columns(); for (size_t i = 0; i != columns_count; ++i) schema->addStructField(header.safeGetByPosition(i).name, getORCType(recursiveRemoveLowCardinality(data_types[i]))); diff --git a/src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp b/src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp index 18c81f8fd6a..742912df980 100644 --- a/src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp +++ b/src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp @@ -16,6 +16,9 @@ namespace ErrorCodes extern const int UNKNOWN_EXCEPTION; } +namespace +{ + static parquet::ParquetVersion::type getParquetVersion(const FormatSettings & settings) { switch (settings.parquet.output_version) @@ -31,6 +34,36 @@ static parquet::ParquetVersion::type getParquetVersion(const FormatSettings & se } } +parquet::Compression::type getParquetCompression(FormatSettings::ParquetCompression method) +{ + if (method == FormatSettings::ParquetCompression::NONE) + return parquet::Compression::type::UNCOMPRESSED; + +#if USE_SNAPPY + if (method == FormatSettings::ParquetCompression::SNAPPY) + return parquet::Compression::type::SNAPPY; +#endif + +#if USE_BROTLI + if (method == FormatSettings::ParquetCompression::BROTLI) + return parquet::Compression::type::BROTLI; +#endif + + if (method == FormatSettings::ParquetCompression::ZSTD) + return parquet::Compression::type::ZSTD; + + if (method == FormatSettings::ParquetCompression::LZ4) + return parquet::Compression::type::LZ4; + + if (method == FormatSettings::ParquetCompression::GZIP) + return parquet::Compression::type::GZIP; + + throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Unsupported compression method"); +} + + +} + ParquetBlockOutputFormat::ParquetBlockOutputFormat(WriteBuffer & out_, const Block & header_, const FormatSettings & format_settings_) : IOutputFormat(header_, out_), format_settings{format_settings_} { @@ -60,9 +93,7 @@ void ParquetBlockOutputFormat::consume(Chunk chunk) parquet::WriterProperties::Builder builder; builder.version(getParquetVersion(format_settings)); -#if USE_SNAPPY - builder.compression(parquet::Compression::SNAPPY); -#endif + builder.compression(getParquetCompression(format_settings.parquet.output_compression_method)); auto props = builder.build(); auto status = parquet::arrow::FileWriter::Open( *arrow_table->schema(), From 4f33e95c96af0b4cf9e1ad9ab3b92d1cfebf72e4 Mon Sep 17 00:00:00 2001 From: avogar Date: Wed, 1 Mar 2023 21:28:37 +0000 Subject: [PATCH 393/841] Add tests --- ...1_parquet_arrow_orc_compressions.reference | 14 +++++++++++ .../02581_parquet_arrow_orc_compressions.sh | 24 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 tests/queries/0_stateless/02581_parquet_arrow_orc_compressions.reference create mode 100755 tests/queries/0_stateless/02581_parquet_arrow_orc_compressions.sh diff --git a/tests/queries/0_stateless/02581_parquet_arrow_orc_compressions.reference b/tests/queries/0_stateless/02581_parquet_arrow_orc_compressions.reference new file mode 100644 index 00000000000..492b12dba56 --- /dev/null +++ b/tests/queries/0_stateless/02581_parquet_arrow_orc_compressions.reference @@ -0,0 +1,14 @@ +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 diff --git a/tests/queries/0_stateless/02581_parquet_arrow_orc_compressions.sh b/tests/queries/0_stateless/02581_parquet_arrow_orc_compressions.sh new file mode 100755 index 00000000000..10850e17bea --- /dev/null +++ b/tests/queries/0_stateless/02581_parquet_arrow_orc_compressions.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +# shellcheck source=../shell_config.sh +. "$CURDIR"/../shell_config.sh + +$CLICKHOUSE_LOCAL -q "select * from numbers(10) format Parquet settings output_format_parquet_compression_method='none'" | $CLICKHOUSE_LOCAL --input-format=Parquet -q "select count() from table" +$CLICKHOUSE_LOCAL -q "select * from numbers(10) format Parquet settings output_format_parquet_compression_method='lz4'" | $CLICKHOUSE_LOCAL --input-format=Parquet -q "select count() from table" +$CLICKHOUSE_LOCAL -q "select * from numbers(10) format Parquet settings output_format_parquet_compression_method='snappy'" | $CLICKHOUSE_LOCAL --input-format=Parquet -q "select count() from table" +$CLICKHOUSE_LOCAL -q "select * from numbers(10) format Parquet settings output_format_parquet_compression_method='zstd'" | $CLICKHOUSE_LOCAL --input-format=Parquet -q "select count() from table" +$CLICKHOUSE_LOCAL -q "select * from numbers(10) format Parquet settings output_format_parquet_compression_method='brotli'" | $CLICKHOUSE_LOCAL --input-format=Parquet -q "select count() from table" +$CLICKHOUSE_LOCAL -q "select * from numbers(10) format Parquet settings output_format_parquet_compression_method='gzip'" | $CLICKHOUSE_LOCAL --input-format=Parquet -q "select count() from table" + +$CLICKHOUSE_LOCAL -q "select * from numbers(10) format ORC settings output_format_orc_compression_method='none'" | $CLICKHOUSE_LOCAL --input-format=ORC -q "select count() from table" +$CLICKHOUSE_LOCAL -q "select * from numbers(10) format ORC settings output_format_orc_compression_method='lz4'" | $CLICKHOUSE_LOCAL --input-format=ORC -q "select count() from table" +$CLICKHOUSE_LOCAL -q "select * from numbers(10) format ORC settings output_format_orc_compression_method='zstd'" | $CLICKHOUSE_LOCAL --input-format=ORC -q "select count() from table" +$CLICKHOUSE_LOCAL -q "select * from numbers(10) format ORC settings output_format_orc_compression_method='zlib'" | $CLICKHOUSE_LOCAL --input-format=ORC -q "select count() from table" +$CLICKHOUSE_LOCAL -q "select * from numbers(10) format ORC settings output_format_orc_compression_method='snappy'" | $CLICKHOUSE_LOCAL --input-format=ORC -q "select count() from table" + + +$CLICKHOUSE_LOCAL -q "select * from numbers(10) format Arrow settings output_format_arrow_compression_method='none'" | $CLICKHOUSE_LOCAL --input-format=Arrow -q "select count() from table" +$CLICKHOUSE_LOCAL -q "select * from numbers(10) format Arrow settings output_format_arrow_compression_method='lz4_frame'" | $CLICKHOUSE_LOCAL --input-format=Arrow -q "select count() from table" +$CLICKHOUSE_LOCAL -q "select * from numbers(10) format Arrow settings output_format_arrow_compression_method='zstd'" | $CLICKHOUSE_LOCAL --input-format=Arrow -q "select count() from table" + From b84e9fdaac900efdee4ac0c72cadf9880e8a6d58 Mon Sep 17 00:00:00 2001 From: HarryLeeIBM Date: Wed, 1 Mar 2023 13:36:35 -0800 Subject: [PATCH 394/841] Fix halfMD5 and cityhash for s390x --- src/Functions/FunctionsHashing.h | 35 ++++++++------------------------ 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/src/Functions/FunctionsHashing.h b/src/Functions/FunctionsHashing.h index e824546f220..7b6f4213cd3 100644 --- a/src/Functions/FunctionsHashing.h +++ b/src/Functions/FunctionsHashing.h @@ -174,7 +174,11 @@ struct HalfMD5Impl MD5_Update(&ctx, reinterpret_cast(begin), size); MD5_Final(buf.char_data, &ctx); +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + return buf.uint64_data; /// No need to flip bytes on big endian machines +#else return Poco::ByteOrder::flipBytes(static_cast(buf.uint64_data)); /// Compatibility with existing code. Cast need for old poco AND macos where UInt64 != uint64_t +#endif } static UInt64 combineHashes(UInt64 h1, UInt64 h2) @@ -1026,21 +1030,9 @@ private: if constexpr (Impl::use_int_hash_for_pods) { if constexpr (std::is_same_v) - { - UInt64 v = bit_cast(vec_from[i]); - - /// Consider using std::byteswap() once ClickHouse builds with C++23 - if constexpr (std::endian::native == std::endian::big) - v = __builtin_bswap64(v); - h = IntHash64Impl::apply(v); - } + h = IntHash64Impl::apply(bit_cast(vec_from[i])); else - { - UInt32 v = bit_cast(vec_from[i]); - if constexpr (std::endian::native == std::endian::big) - v = __builtin_bswap32(v); - h = IntHash32Impl::apply(v); - } + h = IntHash32Impl::apply(bit_cast(vec_from[i])); } else { @@ -1070,20 +1062,9 @@ private: auto value = col_from_const->template getValue(); ToType hash; if constexpr (std::is_same_v) - { - UInt64 v = bit_cast(value); - /// Consider using std::byteswap() once ClickHouse builds with C++23 - if constexpr (std::endian::native == std::endian::big) - v = __builtin_bswap64(v); - hash = IntHash64Impl::apply(v); - } + hash = IntHash64Impl::apply(bit_cast(value)); else - { - UInt32 v = bit_cast(value); - if constexpr (std::endian::native == std::endian::big) - v = __builtin_bswap32(v); - hash = IntHash32Impl::apply(v); - } + hash = IntHash32Impl::apply(bit_cast(value)); size_t size = vec_to.size(); if constexpr (first) From 657afa849e8ab3140ebe3ce21ae7f05ef249a82a Mon Sep 17 00:00:00 2001 From: AndyB Date: Wed, 1 Mar 2023 23:35:09 +0000 Subject: [PATCH 395/841] logger level in test --- tests/integration/test_log_levels_update/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/test_log_levels_update/test.py b/tests/integration/test_log_levels_update/test.py index 176733cd7cb..842c7914eaa 100644 --- a/tests/integration/test_log_levels_update/test.py +++ b/tests/integration/test_log_levels_update/test.py @@ -10,7 +10,7 @@ node = cluster.add_instance( config = """ - information + debug /var/log/clickhouse-server/clickhouse-server.log """ From 0a3a60b7a1ae5fcae0cc9354f22ff1fd781cc657 Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Thu, 2 Mar 2023 00:56:11 +0100 Subject: [PATCH 396/841] Additionally search for inactive runners in the whole ASG --- tests/ci/terminate_runner_lambda/app.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/tests/ci/terminate_runner_lambda/app.py b/tests/ci/terminate_runner_lambda/app.py index d72e6384ea2..61daa6af02a 100644 --- a/tests/ci/terminate_runner_lambda/app.py +++ b/tests/ci/terminate_runner_lambda/app.py @@ -156,8 +156,10 @@ def main( # so they will be cleaned out by ci_runners_metrics_lambda eventually instances_to_kill = [] + total_to_kill = 0 for zone, num_to_kill in to_kill_by_zone.items(): candidates = instances_by_zone[zone] + total_to_kill += num_to_kill if num_to_kill > len(candidates): raise Exception( f"Required to kill {num_to_kill}, but have only {len(candidates)} candidates in AV {zone}" @@ -195,8 +197,25 @@ def main( instances_to_kill += [runner.name for runner in delete_for_av] - print("Got instances to kill: ", ", ".join(instances_to_kill)) + if len(instances_to_kill) < total_to_kill: + print(f"Check other hosts from the same ASG {event['AutoScalingGroupName']}") + client = boto3.client("autoscaling") + as_groups = client.describe_auto_scaling_groups( + AutoScalingGroupNames=[event["AutoScalingGroupName"]] + ) + assert len(as_groups["AutoScalingGroups"]) == 1 + asg = as_groups["AutoScalingGroups"][0] + for instance in asg["Instances"]: + for runner in runners: + if runner.name == instance["InstanceId"] and not runner.busy: + print(f"Runner {runner.name} is not busy and can be deleted") + instances_to_kill.append(runner.name) + if total_to_kill <= len(instances_to_kill): + print("Got enough instances to kill") + break + + print("Got instances to kill: ", ", ".join(instances_to_kill)) response = {"InstanceIDs": instances_to_kill} print(response) return response From 036eaad9190f73f5fca4aee5e67a5293a6b64fdc Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Thu, 2 Mar 2023 01:29:40 +0100 Subject: [PATCH 397/841] Reduce lambda time by caching access_token --- tests/ci/terminate_runner_lambda/app.py | 58 +++++++++++++++++-------- 1 file changed, 41 insertions(+), 17 deletions(-) diff --git a/tests/ci/terminate_runner_lambda/app.py b/tests/ci/terminate_runner_lambda/app.py index 61daa6af02a..c9192417575 100644 --- a/tests/ci/terminate_runner_lambda/app.py +++ b/tests/ci/terminate_runner_lambda/app.py @@ -1,10 +1,11 @@ #!/usr/bin/env python3 import argparse -import sys import json +import sys import time from collections import namedtuple +from dataclasses import dataclass from typing import Any, Dict, List, Tuple import boto3 # type: ignore @@ -53,6 +54,32 @@ def get_access_token(jwt_token: str, installation_id: int) -> str: return data["token"] # type: ignore +@dataclass +class CachedToken: + time: int + value: str + + +cached_token = CachedToken(0, "") + + +def get_cached_access_token() -> str: + if time.time() - 500 < cached_token.time: + return cached_token.value + private_key, app_id = get_key_and_app_from_aws() + payload = { + "iat": int(time.time()) - 60, + "exp": int(time.time()) + (10 * 60), + "iss": app_id, + } + + encoded_jwt = jwt.encode(payload, private_key, algorithm="RS256") + installation_id = get_installation_id(encoded_jwt) + cached_token.time = int(time.time()) + cached_token.value = get_access_token(encoded_jwt, installation_id) + return cached_token.value + + RunnerDescription = namedtuple( "RunnerDescription", ["id", "name", "tags", "offline", "busy"] ) @@ -132,23 +159,11 @@ def get_candidates_to_be_killed(event_data: dict) -> Dict[str, List[str]]: return instances_by_zone -def main( - github_secret_key: str, github_app_id: int, event: dict -) -> Dict[str, List[str]]: +def main(access_token: str, event: dict) -> Dict[str, List[str]]: print("Got event", json.dumps(event, sort_keys=True, indent=4)) to_kill_by_zone = how_many_instances_to_kill(event) instances_by_zone = get_candidates_to_be_killed(event) - payload = { - "iat": int(time.time()) - 60, - "exp": int(time.time()) + (10 * 60), - "iss": github_app_id, - } - - encoded_jwt = jwt.encode(payload, github_secret_key, algorithm="RS256") - installation_id = get_installation_id(encoded_jwt) - access_token = get_access_token(encoded_jwt, installation_id) - runners = list_runners(access_token) # We used to delete potential hosts to terminate from GitHub runners pool, # but the documentation states: @@ -222,8 +237,7 @@ def main( def handler(event: dict, context: Any) -> Dict[str, List[str]]: - private_key, app_id = get_key_and_app_from_aws() - return main(private_key, app_id, event) + return main(get_cached_access_token(), event) if __name__ == "__main__": @@ -300,4 +314,14 @@ if __name__ == "__main__": "Cause": "SCALE_IN", } - main(private_key, args.app_id, sample_event) + payload = { + "iat": int(time.time()) - 60, + "exp": int(time.time()) + (10 * 60), + "iss": args.app_id, + } + + encoded_jwt = jwt.encode(payload, private_key, algorithm="RS256") + installation_id = get_installation_id(encoded_jwt) + access_token = get_access_token(encoded_jwt, args.app_id) + + main(access_token, sample_event) From 566a0e166fe0f51b21e11cb3977ac4f0e5aac6eb Mon Sep 17 00:00:00 2001 From: Yakov Olkhovskiy Date: Thu, 2 Mar 2023 00:42:02 +0000 Subject: [PATCH 398/841] preserve uid gid if running with sudo --- .../decompressor.cpp | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/utils/self-extracting-executable/decompressor.cpp b/utils/self-extracting-executable/decompressor.cpp index 37fbd043814..5f2a769dcdb 100644 --- a/utils/self-extracting-executable/decompressor.cpp +++ b/utils/self-extracting-executable/decompressor.cpp @@ -168,6 +168,24 @@ int decompress(char * input, char * output, off_t start, off_t end, size_t max_n return 0; } +bool getSudoIDs(uid_t &sudo_uid, uid_t &sudo_gid) +{ + sudo_uid = 0; + sudo_gid = 0; + + if (getuid() || geteuid() || getenv("SUDO_USER") == nullptr || getenv("SUDO_UID") == nullptr || getenv("SUDO_GID") == nullptr) + return false; + + char * str_end; + long id = strtol(getenv("SUDO_UID"), &str_end, 10); + if (*str_end == 0) + sudo_uid = static_cast(id); + id = strtol(getenv("SUDO_GID"), &str_end, 10); + if (*str_end == 0) + sudo_gid = static_cast(id); + + return true; +} /// Read data about files and decomrpess them. int decompressFiles(int input_fd, char * path, char * name, bool & have_compressed_analoge, bool & has_exec, char * decompressed_suffix, uint64_t * decompressed_umask) @@ -220,6 +238,10 @@ int decompressFiles(int input_fd, char * path, char * name, bool & have_compress return 1; } + uid_t sudo_uid = 0; + uid_t sudo_gid = 0; + getSudoIDs(sudo_uid, sudo_gid); + FileData file_info; /// Decompress files with appropriate file names for (size_t i = 0; i < le64toh(metadata.number_of_files); ++i) @@ -319,6 +341,9 @@ int decompressFiles(int input_fd, char * path, char * name, bool & have_compress perror("fsync"); if (0 != close(output_fd)) perror("close"); + + if (sudo_uid && sudo_gid) + chown(file_name, sudo_uid, sudo_gid); } if (0 != munmap(input, info_in.st_size)) @@ -532,6 +557,9 @@ int main(int/* argc*/, char* argv[]) return 1; } + if (uid_t sudo_uid = 0, sudo_gid = 0; getSudoIDs(sudo_uid, sudo_gid)) + chown(static_cast(self), sudo_uid, sudo_gid); + if (has_exec) { #if !defined(OS_DARWIN) && !defined(OS_FREEBSD) From 088869b654f70f5f32d1edafac90bceeeafde5b7 Mon Sep 17 00:00:00 2001 From: SupunKavinda Date: Thu, 2 Mar 2023 01:47:00 +0100 Subject: [PATCH 399/841] adds hyvor/clickhouse-php to docs --- docs/en/interfaces/third-party/client-libraries.md | 1 + docs/ru/interfaces/third-party/client-libraries.md | 1 + docs/zh/interfaces/third-party/client-libraries.md | 1 + 3 files changed, 3 insertions(+) diff --git a/docs/en/interfaces/third-party/client-libraries.md b/docs/en/interfaces/third-party/client-libraries.md index 4114e47e982..0e065cb7179 100644 --- a/docs/en/interfaces/third-party/client-libraries.md +++ b/docs/en/interfaces/third-party/client-libraries.md @@ -26,6 +26,7 @@ ClickHouse Inc does **not** maintain the libraries listed below and hasn’t don - [one-ck](https://github.com/lizhichao/one-ck) - [glushkovds/phpclickhouse-laravel](https://packagist.org/packages/glushkovds/phpclickhouse-laravel) - [kolya7k ClickHouse PHP extension](https://github.com//kolya7k/clickhouse-php) + - [hyvor/clickhouse-php](https://github.com/hyvor/clickhouse-php) - Go - [clickhouse](https://github.com/kshvakov/clickhouse/) - [go-clickhouse](https://github.com/roistat/go-clickhouse) diff --git a/docs/ru/interfaces/third-party/client-libraries.md b/docs/ru/interfaces/third-party/client-libraries.md index 6c63fb4c730..f55bbe2a47d 100644 --- a/docs/ru/interfaces/third-party/client-libraries.md +++ b/docs/ru/interfaces/third-party/client-libraries.md @@ -24,6 +24,7 @@ sidebar_label: "Клиентские библиотеки от сторонни - [SeasClick C++ client](https://github.com/SeasX/SeasClick) - [glushkovds/phpclickhouse-laravel](https://packagist.org/packages/glushkovds/phpclickhouse-laravel) - [kolya7k ClickHouse PHP extension](https://github.com//kolya7k/clickhouse-php) + - [hyvor/clickhouse-php](https://github.com/hyvor/clickhouse-php) - Go - [clickhouse](https://github.com/kshvakov/clickhouse/) - [go-clickhouse](https://github.com/roistat/go-clickhouse) diff --git a/docs/zh/interfaces/third-party/client-libraries.md b/docs/zh/interfaces/third-party/client-libraries.md index 1d46c19ce8b..4ee74f1d2c3 100644 --- a/docs/zh/interfaces/third-party/client-libraries.md +++ b/docs/zh/interfaces/third-party/client-libraries.md @@ -24,6 +24,7 @@ Yandex**没有**维护下面列出的库,也没有做过任何广泛的测试 - [SeasClick C++ client](https://github.com/SeasX/SeasClick) - [one-ck](https://github.com/lizhichao/one-ck) - [glushkovds/phpclickhouse-laravel](https://packagist.org/packages/glushkovds/phpclickhouse-laravel) + - [hyvor/clickhouse-php](https://github.com/hyvor/clickhouse-php) - Go - [clickhouse](https://github.com/kshvakov/clickhouse/) - [go-clickhouse](https://github.com/roistat/go-clickhouse) From ad4a44df52b6b04ac5977d12aa35b099a792133c Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Thu, 2 Mar 2023 02:59:27 +0100 Subject: [PATCH 400/841] fix --- src/Interpreters/Session.cpp | 32 ++++++++++++++++++- src/Interpreters/Session.h | 3 ++ src/Server/HTTPHandler.cpp | 14 +++++++- .../02435_rollback_cancelled_queries.sh | 12 +++---- 4 files changed, 52 insertions(+), 9 deletions(-) diff --git a/src/Interpreters/Session.cpp b/src/Interpreters/Session.cpp index 7411050aa2d..70d4c0e6ae0 100644 --- a/src/Interpreters/Session.cpp +++ b/src/Interpreters/Session.cpp @@ -140,6 +140,23 @@ public: scheduleCloseSession(session, lock); } + void closeSession(const UUID & user_id, const String & session_id) + { + std::unique_lock lock(mutex); + Key key{user_id, session_id}; + auto it = sessions.find(key); + if (it == sessions.end()) + { + LOG_INFO(log, "Session {} not found for user {}, probably it's already closed", session_id, user_id); + return; + } + + if (!it->second.unique()) + throw Exception(ErrorCodes::LOGICAL_ERROR, "Cannot close session {} with refcount {}", session_id, it->second.use_count()); + + sessions.erase(it); + } + private: class SessionKeyHash { @@ -408,7 +425,7 @@ ContextMutablePtr Session::makeSessionContext(const String & session_name_, std: std::shared_ptr new_named_session; bool new_named_session_created = false; std::tie(new_named_session, new_named_session_created) - = NamedSessionsStorage::instance().acquireSession(global_context, user_id.value_or(UUID{}), session_name_, timeout_, session_check_); + = NamedSessionsStorage::instance().acquireSession(global_context, *user_id, session_name_, timeout_, session_check_); auto new_session_context = new_named_session->context; new_session_context->makeSessionContext(); @@ -533,5 +550,18 @@ void Session::releaseSessionID() named_session = nullptr; } +void Session::closeSession(const String & session_id) +{ + if (!user_id) /// User was not authenticated + return; + + /// named_session may be not set due to an early exception + if (!named_session) + return; + + releaseSessionID(); + NamedSessionsStorage::instance().closeSession(*user_id, session_id); +} + } diff --git a/src/Interpreters/Session.h b/src/Interpreters/Session.h index 0f17c378915..443867806d6 100644 --- a/src/Interpreters/Session.h +++ b/src/Interpreters/Session.h @@ -77,6 +77,9 @@ public: /// Releases the currently used session ID so it becomes available for reuse by another session. void releaseSessionID(); + /// Closes and removes session + void closeSession(const String & session_id); + private: std::shared_ptr getSessionLog() const; ContextMutablePtr makeQueryContextImpl(const ClientInfo * client_info_to_copy, ClientInfo * client_info_to_move) const; diff --git a/src/Server/HTTPHandler.cpp b/src/Server/HTTPHandler.cpp index 702743ef1f0..f468167f782 100644 --- a/src/Server/HTTPHandler.cpp +++ b/src/Server/HTTPHandler.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -678,7 +679,7 @@ void HTTPHandler::processQuery( std::unique_ptr in; static const NameSet reserved_param_names{"compress", "decompress", "user", "password", "quota_key", "query_id", "stacktrace", - "buffer_size", "wait_end_of_query", "session_id", "session_timeout", "session_check", "client_protocol_version"}; + "buffer_size", "wait_end_of_query", "session_id", "session_timeout", "session_check", "client_protocol_version", "close_session"}; Names reserved_param_suffixes; @@ -957,6 +958,14 @@ void HTTPHandler::handleRequest(HTTPServerRequest & request, HTTPServerResponse /// In case of exception, send stack trace to client. bool with_stacktrace = false; + /// Close http session (if any) after processing the request + bool close_session = false; + String session_id; + + SCOPE_EXIT_SAFE({ + if (close_session && !session_id.empty()) + session->closeSession(session_id); + }); OpenTelemetry::TracingContextHolderPtr thread_trace_context; SCOPE_EXIT({ @@ -1006,6 +1015,9 @@ void HTTPHandler::handleRequest(HTTPServerRequest & request, HTTPServerResponse HTMLForm params(default_settings, request); with_stacktrace = params.getParsed("stacktrace", false); + close_session = params.getParsed("close_session", false); + if (close_session) + session_id = params.get("session_id"); /// FIXME: maybe this check is already unnecessary. /// Workaround. Poco does not detect 411 Length Required case. diff --git a/tests/queries/0_stateless/02435_rollback_cancelled_queries.sh b/tests/queries/0_stateless/02435_rollback_cancelled_queries.sh index b639cd5ef70..7c7ef037e02 100755 --- a/tests/queries/0_stateless/02435_rollback_cancelled_queries.sh +++ b/tests/queries/0_stateless/02435_rollback_cancelled_queries.sh @@ -16,22 +16,20 @@ $CLICKHOUSE_CLIENT -q 'create table dedup_test(A Int64) Engine = MergeTree order function insert_data { IMPLICIT=$(( RANDOM % 2 )) - SESSION_ID="${SESSION}_$RANDOM$RANDOM$RANDOM" - TXN_SETTINGS="session_id=$SESSION_ID&throw_on_unsupported_query_inside_transaction=0" + SESSION_ID="${SESSION}_$RANDOM.$RANDOM.$RANDOM" + TXN_SETTINGS="session_id=$SESSION_ID&throw_on_unsupported_query_inside_transaction=0&implicit_transaction=$IMPLICIT" BEGIN="" COMMIT="" SETTINGS="query_id=$ID&$TXN_SETTINGS&max_insert_block_size=110000&min_insert_block_size_rows=110000" if [[ "$IMPLICIT" -eq 0 ]]; then $CLICKHOUSE_CURL -sS -d 'begin transaction' "$CLICKHOUSE_URL&$TXN_SETTINGS" + SETTINGS="$SETTINGS&session_check=1" BEGIN="begin transaction;" COMMIT=$(echo -ne "\n\ncommit") - else - TXN_SETTINGS="$TXN_SETTINGS&implicit_transaction=1" fi - SETTINGS="query_id=$ID&$TXN_SETTINGS&max_insert_block_size=110000&min_insert_block_size_rows=110000" # max_block_size=10000, so external table will contain smaller blocks that will be squashed on insert-select (more chances to catch a bug on query cancellation) - TRASH_SETTINGS="query_id=$ID&$TXN_SETTINGS&input_format_parallel_parsing=0&max_threads=1&max_insert_threads=1&max_insert_block_size=110000&max_block_size=10000&min_insert_block_size_bytes=0&min_insert_block_size_rows=110000&max_insert_block_size=110000" + TRASH_SETTINGS="$SETTINGS&input_format_parallel_parsing=0&max_threads=1&max_insert_threads=1&max_block_size=10000&min_insert_block_size_bytes=0" TYPE=$(( RANDOM % 6 )) if [[ "$TYPE" -eq 0 ]]; then @@ -49,7 +47,7 @@ function insert_data fi if [[ "$IMPLICIT" -eq 0 ]]; then - $CLICKHOUSE_CURL -sS -d 'commit' "$CLICKHOUSE_URL&$TXN_SETTINGS" | grep -Faq "Transaction is not in RUNNING state" && $CLICKHOUSE_CURL -sS -d 'rollback' "$CLICKHOUSE_URL&$TXN_SETTINGS" + $CLICKHOUSE_CURL -sS -d 'commit' "$CLICKHOUSE_URL&$TXN_SETTINGS&close_session=1" | grep -Faq "Transaction is not in RUNNING state" && $CLICKHOUSE_CURL -sS -d 'rollback' "$CLICKHOUSE_URL&$TXN_SETTINGS" fi } From 11fbb6076b5616287ef635c5eef63dec6919ca82 Mon Sep 17 00:00:00 2001 From: taiyang-li <654010905@qq.com> Date: Thu, 2 Mar 2023 14:20:35 +0800 Subject: [PATCH 401/841] fix fast test --- .../02415_all_new_functions_must_be_documented.reference | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/queries/0_stateless/02415_all_new_functions_must_be_documented.reference b/tests/queries/0_stateless/02415_all_new_functions_must_be_documented.reference index e41249af54c..571a3c3afb5 100644 --- a/tests/queries/0_stateless/02415_all_new_functions_must_be_documented.reference +++ b/tests/queries/0_stateless/02415_all_new_functions_must_be_documented.reference @@ -421,6 +421,7 @@ mapContains mapContainsKeyLike mapExtractKeyLike mapFilter +mapFromArrays mapKeys mapPopulateSeries mapSubtract From a6cf2cdab8e59e8457def1a891fb3a3443918ca3 Mon Sep 17 00:00:00 2001 From: avogar Date: Thu, 2 Mar 2023 10:36:07 +0000 Subject: [PATCH 402/841] Fix style, add docs --- docs/en/interfaces/formats.md | 3 +++ .../en/operations/settings/settings-formats.md | 18 ++++++++++++++++++ .../Formats/Impl/ArrowBlockOutputFormat.cpp | 2 -- .../Formats/Impl/ORCBlockOutputFormat.cpp | 2 -- .../Formats/Impl/ParquetBlockOutputFormat.cpp | 2 +- .../02581_parquet_arrow_orc_compressions.sh | 1 + 6 files changed, 23 insertions(+), 5 deletions(-) diff --git a/docs/en/interfaces/formats.md b/docs/en/interfaces/formats.md index b2b2c6d5b1e..1b32de9723f 100644 --- a/docs/en/interfaces/formats.md +++ b/docs/en/interfaces/formats.md @@ -1973,6 +1973,7 @@ To exchange data with Hadoop, you can use [HDFS table engine](/docs/en/engines/t - [input_format_parquet_skip_columns_with_unsupported_types_in_schema_inference](/docs/en/operations/settings/settings-formats.md/#input_format_parquet_skip_columns_with_unsupported_types_in_schema_inference) - allow skipping columns with unsupported types while schema inference for Parquet format. Default value - `false`. - [output_format_parquet_fixed_string_as_fixed_byte_array](/docs/en/operations/settings/settings-formats.md/#output_format_parquet_fixed_string_as_fixed_byte_array) - use Parquet FIXED_LENGTH_BYTE_ARRAY type instead of Binary/String for FixedString columns. Default value - `true`. - [output_format_parquet_version](/docs/en/operations/settings/settings-formats.md/#output_format_parquet_version) - The version of Parquet format used in output format. Default value - `2.latest`. +- [output_format_parquet_compression_method](/docs/en/operations/settings/settings-formats.md/#output_format_parquet_compression_method) - compression method used in output Parquet format. Default value - `snappy`. ## Arrow {#data-format-arrow} @@ -2041,6 +2042,7 @@ $ clickhouse-client --query="SELECT * FROM {some_table} FORMAT Arrow" > {filenam - [input_format_arrow_allow_missing_columns](/docs/en/operations/settings/settings-formats.md/#input_format_arrow_allow_missing_columns) - allow missing columns while reading Arrow data. Default value - `false`. - [input_format_arrow_skip_columns_with_unsupported_types_in_schema_inference](/docs/en/operations/settings/settings-formats.md/#input_format_arrow_skip_columns_with_unsupported_types_in_schema_inference) - allow skipping columns with unsupported types while schema inference for Arrow format. Default value - `false`. - [output_format_arrow_fixed_string_as_fixed_byte_array](/docs/en/operations/settings/settings-formats.md/#output_format_arrow_fixed_string_as_fixed_byte_array) - use Arrow FIXED_SIZE_BINARY type instead of Binary/String for FixedString columns. Default value - `true`. +- [output_format_arrow_compression_method](/docs/en/operations/settings/settings-formats.md/#output_format_arrow_compression_method) - compression method used in output Arrow format. Default value - `none`. ## ArrowStream {#data-format-arrow-stream} @@ -2096,6 +2098,7 @@ $ clickhouse-client --query="SELECT * FROM {some_table} FORMAT ORC" > {filename. ### Arrow format settings {#parquet-format-settings} - [output_format_arrow_string_as_string](/docs/en/operations/settings/settings-formats.md/#output_format_arrow_string_as_string) - use Arrow String type instead of Binary for String columns. Default value - `false`. +- [output_format_orc_compression_method](/docs/en/operations/settings/settings-formats.md/#output_format_orc_compression_method) - compression method used in output ORC format. Default value - `none`. - [input_format_arrow_import_nested](/docs/en/operations/settings/settings-formats.md/#input_format_arrow_import_nested) - allow inserting array of structs into Nested table in Arrow input format. Default value - `false`. - [input_format_arrow_case_insensitive_column_matching](/docs/en/operations/settings/settings-formats.md/#input_format_arrow_case_insensitive_column_matching) - ignore case when matching Arrow columns with ClickHouse columns. Default value - `false`. - [input_format_arrow_allow_missing_columns](/docs/en/operations/settings/settings-formats.md/#input_format_arrow_allow_missing_columns) - allow missing columns while reading Arrow data. Default value - `false`. diff --git a/docs/en/operations/settings/settings-formats.md b/docs/en/operations/settings/settings-formats.md index 3580d83f704..919ebaf562f 100644 --- a/docs/en/operations/settings/settings-formats.md +++ b/docs/en/operations/settings/settings-formats.md @@ -1014,6 +1014,12 @@ Use Arrow FIXED_SIZE_BINARY type instead of Binary/String for FixedString column Enabled by default. +### output_format_arrow_compression_method {#output_format_arrow_compression_method} + +Compression method used in output Arrow format. Supported codecs: `lz4_frame`, `zstd`, `none` (uncompressed) + +Default value: `none`. + ## ORC format settings {#orc-format-settings} ### input_format_orc_import_nested {#input_format_orc_import_nested} @@ -1057,6 +1063,12 @@ Use ORC String type instead of Binary for String columns. Disabled by default. +### output_format_orc_compression_method {#output_format_orc_compression_method} + +Compression method used in output ORC format. Supported codecs: `lz4`, `snappy`, `zlib`, `zstd`, `none` (uncompressed) + +Default value: `none`. + ## Parquet format settings {#parquet-format-settings} ### input_format_parquet_import_nested {#input_format_parquet_import_nested} @@ -1112,6 +1124,12 @@ The version of Parquet format used in output format. Supported versions: `1.0`, Default value: `2.latest`. +### output_format_parquet_compression_method {#output_format_parquet_compression_method} + +Compression method used in output Parquet format. Supported codecs: `snappy`, `lz4`, `brotli`, `zstd`, `gzip`, `none` (uncompressed) + +Default value: `snappy`. + ## Hive format settings {#hive-format-settings} ### input_format_hive_text_fields_delimiter {#input_format_hive_text_fields_delimiter} diff --git a/src/Processors/Formats/Impl/ArrowBlockOutputFormat.cpp b/src/Processors/Formats/Impl/ArrowBlockOutputFormat.cpp index ec35c52e37c..c85c0342c8c 100644 --- a/src/Processors/Formats/Impl/ArrowBlockOutputFormat.cpp +++ b/src/Processors/Formats/Impl/ArrowBlockOutputFormat.cpp @@ -8,7 +8,6 @@ #include #include "ArrowBufferedStreams.h" #include "CHColumnToArrowColumn.h" -#include "config.h" namespace DB @@ -36,7 +35,6 @@ arrow::Compression::type getArrowCompression(FormatSettings::ArrowCompression me } - ArrowBlockOutputFormat::ArrowBlockOutputFormat(WriteBuffer & out_, const Block & header_, bool stream_, const FormatSettings & format_settings_) : IOutputFormat(header_, out_) , stream{stream_} diff --git a/src/Processors/Formats/Impl/ORCBlockOutputFormat.cpp b/src/Processors/Formats/Impl/ORCBlockOutputFormat.cpp index ecb7c2fbc92..39cacde94ed 100644 --- a/src/Processors/Formats/Impl/ORCBlockOutputFormat.cpp +++ b/src/Processors/Formats/Impl/ORCBlockOutputFormat.cpp @@ -22,8 +22,6 @@ #include #include -#include "config.h" - namespace DB { diff --git a/src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp b/src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp index 742912df980..cedd8a9c54c 100644 --- a/src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp +++ b/src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp @@ -14,6 +14,7 @@ namespace DB namespace ErrorCodes { extern const int UNKNOWN_EXCEPTION; + extern const int NOT_IMPLEMENTED; } namespace @@ -61,7 +62,6 @@ parquet::Compression::type getParquetCompression(FormatSettings::ParquetCompress throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Unsupported compression method"); } - } ParquetBlockOutputFormat::ParquetBlockOutputFormat(WriteBuffer & out_, const Block & header_, const FormatSettings & format_settings_) diff --git a/tests/queries/0_stateless/02581_parquet_arrow_orc_compressions.sh b/tests/queries/0_stateless/02581_parquet_arrow_orc_compressions.sh index 10850e17bea..89b5147f026 100755 --- a/tests/queries/0_stateless/02581_parquet_arrow_orc_compressions.sh +++ b/tests/queries/0_stateless/02581_parquet_arrow_orc_compressions.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# Tags: no-fasttest CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh From ad50c418dab6aaed0a59a91433b074cb5b09a841 Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Thu, 2 Mar 2023 11:49:36 +0100 Subject: [PATCH 403/841] Update typing for a new PyGithub version --- tests/ci/github_helper.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/ci/github_helper.py b/tests/ci/github_helper.py index eae0bc1c33b..834c8247cb8 100644 --- a/tests/ci/github_helper.py +++ b/tests/ci/github_helper.py @@ -5,12 +5,13 @@ from datetime import date, datetime, timedelta from pathlib import Path from os import path as p from time import sleep -from typing import List, Optional, Tuple +from typing import List, Optional, Tuple, Union import github # explicit reimport # pylint: disable=useless-import-alias +from github.AuthenticatedUser import AuthenticatedUser from github.GithubException import ( RateLimitExceededException as RateLimitExceededException, ) @@ -157,7 +158,7 @@ class GitHub(github.Github): def get_user_cached( self, login: str, obj_updated_at: Optional[datetime] = None - ) -> NamedUser: + ) -> Union[AuthenticatedUser, NamedUser]: cache_file = self.cache_path / f"user-{login}.pickle" if cache_file.is_file(): From 5ddc9a9eedd1bd26881142e5ce5aacf020ed7983 Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Wed, 1 Mar 2023 10:37:47 +0000 Subject: [PATCH 404/841] Add binary compatibility check for Aarch64 --- .github/workflows/backport_branches.yml | 40 +++++++++++-- .github/workflows/master.yml | 40 +++++++++++-- .github/workflows/pull_request.yml | 40 +++++++++++-- .github/workflows/release_branches.yml | 40 +++++++++++-- tests/ci/ci_config.py | 5 +- tests/ci/compatibility_check.py | 80 ++++++++++++++++++------- 6 files changed, 207 insertions(+), 38 deletions(-) diff --git a/.github/workflows/backport_branches.yml b/.github/workflows/backport_branches.yml index 110c06631c7..b14a32127c4 100644 --- a/.github/workflows/backport_branches.yml +++ b/.github/workflows/backport_branches.yml @@ -79,7 +79,7 @@ jobs: with: name: changed_images path: ${{ runner.temp }}/changed_images.json - CompatibilityCheck: + CompatibilityCheckX86: needs: [BuilderDebRelease] runs-on: [self-hosted, style-checker] steps: @@ -98,12 +98,43 @@ jobs: uses: actions/download-artifact@v3 with: path: ${{ env.REPORTS_PATH }} - - name: CompatibilityCheck + - name: CompatibilityCheckX86 run: | sudo rm -fr "$TEMP_PATH" mkdir -p "$TEMP_PATH" cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" - cd "$REPO_COPY/tests/ci" && python3 compatibility_check.py + cd "$REPO_COPY/tests/ci" && python3 compatibility_check.py --check-name "Compatibility check (x86)" --check-glibc --check-distributions + - name: Cleanup + if: always() + run: | + docker ps --quiet | xargs --no-run-if-empty docker kill ||: + docker ps --all --quiet | xargs --no-run-if-empty docker rm -f ||: + sudo rm -fr "$TEMP_PATH" + CompatibilityCheckAarch64: + needs: [BuilderDebAarch64] + runs-on: [self-hosted, style-checker] + steps: + - name: Set envs + run: | + cat >> "$GITHUB_ENV" << 'EOF' + TEMP_PATH=${{runner.temp}}/compatibility_check + REPO_COPY=${{runner.temp}}/compatibility_check/ClickHouse + REPORTS_PATH=${{runner.temp}}/reports_dir + EOF + - name: Check out repository code + uses: ClickHouse/checkout@v1 + with: + clear-repository: true + - name: Download json reports + uses: actions/download-artifact@v3 + with: + path: ${{ env.REPORTS_PATH }} + - name: CompatibilityCheckAarch64 + run: | + sudo rm -fr "$TEMP_PATH" + mkdir -p "$TEMP_PATH" + cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" + cd "$REPO_COPY/tests/ci" && python3 compatibility_check.py --check-name "Compatibility check (aarch64)" --check-glibc - name: Cleanup if: always() run: | @@ -741,7 +772,8 @@ jobs: - FunctionalStatefulTestDebug - StressTestTsan - IntegrationTestsRelease - - CompatibilityCheck + - CompatibilityCheckX86 + - CompatibilityCheckAarch64 runs-on: [self-hosted, style-checker] steps: - name: Check out repository code diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 7e045992dee..e224d6cf5c3 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -110,7 +110,7 @@ jobs: docker ps --quiet | xargs --no-run-if-empty docker kill ||: docker ps --all --quiet | xargs --no-run-if-empty docker rm -f ||: sudo rm -fr "$TEMP_PATH" - CompatibilityCheck: + CompatibilityCheckX86: needs: [BuilderDebRelease] runs-on: [self-hosted, style-checker] steps: @@ -129,12 +129,43 @@ jobs: uses: actions/download-artifact@v3 with: path: ${{ env.REPORTS_PATH }} - - name: CompatibilityCheck + - name: CompatibilityCheckX86 run: | sudo rm -fr "$TEMP_PATH" mkdir -p "$TEMP_PATH" cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" - cd "$REPO_COPY/tests/ci" && python3 compatibility_check.py + cd "$REPO_COPY/tests/ci" && python3 compatibility_check.py --check-name "Compatibility check (x86)" --check-glibc --check-distributions + - name: Cleanup + if: always() + run: | + docker ps --quiet | xargs --no-run-if-empty docker kill ||: + docker ps --all --quiet | xargs --no-run-if-empty docker rm -f ||: + sudo rm -fr "$TEMP_PATH" + CompatibilityCheckAarch64: + needs: [BuilderDebAarch64] + runs-on: [self-hosted, style-checker] + steps: + - name: Set envs + run: | + cat >> "$GITHUB_ENV" << 'EOF' + TEMP_PATH=${{runner.temp}}/compatibility_check + REPO_COPY=${{runner.temp}}/compatibility_check/ClickHouse + REPORTS_PATH=${{runner.temp}}/reports_dir + EOF + - name: Check out repository code + uses: ClickHouse/checkout@v1 + with: + clear-repository: true + - name: Download json reports + uses: actions/download-artifact@v3 + with: + path: ${{ env.REPORTS_PATH }} + - name: CompatibilityCheckAarch64 + run: | + sudo rm -fr "$TEMP_PATH" + mkdir -p "$TEMP_PATH" + cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" + cd "$REPO_COPY/tests/ci" && python3 compatibility_check.py --check-name "Compatibility check (aarch64)" --check-glibc - name: Cleanup if: always() run: | @@ -3124,7 +3155,8 @@ jobs: - PerformanceComparisonX86-1 - PerformanceComparisonX86-2 - PerformanceComparisonX86-3 - - CompatibilityCheck + - CompatibilityCheckX86 + - CompatibilityCheckAarch64 - ASTFuzzerTestDebug - ASTFuzzerTestAsan - ASTFuzzerTestTsan diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 7d410f833c5..ae6cb1d3a83 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -174,7 +174,7 @@ jobs: docker ps --quiet | xargs --no-run-if-empty docker kill ||: docker ps --all --quiet | xargs --no-run-if-empty docker rm -f ||: sudo rm -fr "$TEMP_PATH" "$CACHES_PATH" - CompatibilityCheck: + CompatibilityCheckX86: needs: [BuilderDebRelease] runs-on: [self-hosted, style-checker] steps: @@ -193,12 +193,43 @@ jobs: uses: actions/download-artifact@v3 with: path: ${{ env.REPORTS_PATH }} - - name: CompatibilityCheck + - name: CompatibilityCheckX86 run: | sudo rm -fr "$TEMP_PATH" mkdir -p "$TEMP_PATH" cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" - cd "$REPO_COPY/tests/ci" && python3 compatibility_check.py + cd "$REPO_COPY/tests/ci" && python3 compatibility_check.py --check-name "Compatibility check (x86)" --check-glibc --check-distributions + - name: Cleanup + if: always() + run: | + docker ps --quiet | xargs --no-run-if-empty docker kill ||: + docker ps --all --quiet | xargs --no-run-if-empty docker rm -f ||: + sudo rm -fr "$TEMP_PATH" + CompatibilityCheckAarch64: + needs: [BuilderDebAarch64] + runs-on: [self-hosted, style-checker] + steps: + - name: Set envs + run: | + cat >> "$GITHUB_ENV" << 'EOF' + TEMP_PATH=${{runner.temp}}/compatibility_check + REPO_COPY=${{runner.temp}}/compatibility_check/ClickHouse + REPORTS_PATH=${{runner.temp}}/reports_dir + EOF + - name: Check out repository code + uses: ClickHouse/checkout@v1 + with: + clear-repository: true + - name: Download json reports + uses: actions/download-artifact@v3 + with: + path: ${{ env.REPORTS_PATH }} + - name: CompatibilityCheckAarch64 + run: | + sudo rm -fr "$TEMP_PATH" + mkdir -p "$TEMP_PATH" + cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" + cd "$REPO_COPY/tests/ci" && python3 compatibility_check.py --check-name "Compatibility check (aarch64)" --check-glibc - name: Cleanup if: always() run: | @@ -4792,7 +4823,8 @@ jobs: - UnitTestsMsan - UnitTestsUBsan - UnitTestsReleaseClang - - CompatibilityCheck + - CompatibilityCheckX86 + - CompatibilityCheckAarch64 - IntegrationTestsFlakyCheck - SQLancerTestRelease - SQLancerTestDebug diff --git a/.github/workflows/release_branches.yml b/.github/workflows/release_branches.yml index 4d2a99c2106..229532efdab 100644 --- a/.github/workflows/release_branches.yml +++ b/.github/workflows/release_branches.yml @@ -71,7 +71,7 @@ jobs: with: name: changed_images path: ${{ runner.temp }}/changed_images.json - CompatibilityCheck: + CompatibilityCheckX86: needs: [BuilderDebRelease] runs-on: [self-hosted, style-checker] steps: @@ -90,12 +90,43 @@ jobs: uses: actions/download-artifact@v3 with: path: ${{ env.REPORTS_PATH }} - - name: CompatibilityCheck + - name: CompatibilityCheckX86 run: | sudo rm -fr "$TEMP_PATH" mkdir -p "$TEMP_PATH" cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" - cd "$REPO_COPY/tests/ci" && python3 compatibility_check.py + cd "$REPO_COPY/tests/ci" && python3 compatibility_check.py --check-name "Compatibility check (x86)" --check-glibc --check-distributions + - name: Cleanup + if: always() + run: | + docker ps --quiet | xargs --no-run-if-empty docker kill ||: + docker ps --all --quiet | xargs --no-run-if-empty docker rm -f ||: + sudo rm -fr "$TEMP_PATH" + CompatibilityCheckAarch64: + needs: [BuilderDebAarch64] + runs-on: [self-hosted, style-checker] + steps: + - name: Set envs + run: | + cat >> "$GITHUB_ENV" << 'EOF' + TEMP_PATH=${{runner.temp}}/compatibility_check + REPO_COPY=${{runner.temp}}/compatibility_check/ClickHouse + REPORTS_PATH=${{runner.temp}}/reports_dir + EOF + - name: Check out repository code + uses: ClickHouse/checkout@v1 + with: + clear-repository: true + - name: Download json reports + uses: actions/download-artifact@v3 + with: + path: ${{ env.REPORTS_PATH }} + - name: CompatibilityCheckAarch64 + run: | + sudo rm -fr "$TEMP_PATH" + mkdir -p "$TEMP_PATH" + cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" + cd "$REPO_COPY/tests/ci" && python3 compatibility_check.py --check-name "Compatibility check (aarch64)" --check-glibc - name: Cleanup if: always() run: | @@ -1947,7 +1978,8 @@ jobs: - IntegrationTestsTsan1 - IntegrationTestsTsan2 - IntegrationTestsTsan3 - - CompatibilityCheck + - CompatibilityCheckX86 + - CompatibilityCheckAarch64 runs-on: [self-hosted, style-checker] steps: - name: Check out repository code diff --git a/tests/ci/ci_config.py b/tests/ci/ci_config.py index 08cd2d466d0..9df198430d2 100644 --- a/tests/ci/ci_config.py +++ b/tests/ci/ci_config.py @@ -316,9 +316,12 @@ CI_CONFIG = { "Integration tests flaky check (asan)": { "required_build": "package_asan", }, - "Compatibility check": { + "Compatibility check (x86)": { "required_build": "package_release", }, + "Compatibility check (aarch64)": { + "required_build": "package_aarch64", + }, "Unit tests (release-clang)": { "required_build": "binary_release", }, diff --git a/tests/ci/compatibility_check.py b/tests/ci/compatibility_check.py index 0bdcf1ba3b4..9f3c1a1ca8b 100644 --- a/tests/ci/compatibility_check.py +++ b/tests/ci/compatibility_check.py @@ -2,6 +2,7 @@ from distutils.version import StrictVersion from typing import List, Tuple +import argparse import logging import os import subprocess @@ -28,9 +29,7 @@ from upload_result_helper import upload_results IMAGE_UBUNTU = "clickhouse/test-old-ubuntu" IMAGE_CENTOS = "clickhouse/test-old-centos" -MAX_GLIBC_VERSION = "2.4" DOWNLOAD_RETRIES_COUNT = 5 -CHECK_NAME = "Compatibility check" def process_os_check(log_path: str) -> TestResult: @@ -43,7 +42,7 @@ def process_os_check(log_path: str) -> TestResult: return TestResult(name, "OK") -def process_glibc_check(log_path: str) -> TestResults: +def process_glibc_check(log_path: str, max_glibc_version: str) -> TestResults: test_results = [] # type: TestResults with open(log_path, "r") as log: for line in log: @@ -53,7 +52,7 @@ def process_glibc_check(log_path: str) -> TestResults: _, version = symbol_with_glibc.split("@GLIBC_") if version == "PRIVATE": test_results.append(TestResult(symbol_with_glibc, "FAIL")) - elif StrictVersion(version) > MAX_GLIBC_VERSION: + elif StrictVersion(version) > max_glibc_version: test_results.append(TestResult(symbol_with_glibc, "FAIL")) if not test_results: test_results.append(TestResult("glibc check", "OK")) @@ -61,10 +60,10 @@ def process_glibc_check(log_path: str) -> TestResults: def process_result( - result_folder: str, server_log_folder: str + result_folder: str, server_log_folder: str, max_glibc_version: str ) -> Tuple[str, str, TestResults, List[str]]: glibc_log_path = os.path.join(result_folder, "glibc.log") - test_results = process_glibc_check(glibc_log_path) + test_results = process_glibc_check(glibc_log_path, max_glibc_version) status = "success" description = "Compatibility check passed" @@ -101,13 +100,18 @@ def process_result( return status, description, test_results, result_logs -def get_run_commands( - build_path, result_folder, server_log_folder, image_centos, image_ubuntu -): +def get_run_commands_glibc(build_path, result_folder): return [ f"readelf -s --wide {build_path}/usr/bin/clickhouse | grep '@GLIBC_' > {result_folder}/glibc.log", f"readelf -s --wide {build_path}/usr/bin/clickhouse-odbc-bridge | grep '@GLIBC_' >> {result_folder}/glibc.log", f"readelf -s --wide {build_path}/usr/bin/clickhouse-library-bridge | grep '@GLIBC_' >> {result_folder}/glibc.log", + ] + + +def get_run_commands_distributions( + build_path, result_folder, server_log_folder, image_centos, image_ubuntu +): + return [ f"docker run --network=host --volume={build_path}/usr/bin/clickhouse:/clickhouse " f"--volume={build_path}/etc/clickhouse-server:/config " f"--volume={server_log_folder}:/var/log/clickhouse-server {image_ubuntu} > {result_folder}/ubuntu:12.04", @@ -117,9 +121,21 @@ def get_run_commands( ] +def parse_args(): + parser = argparse.ArgumentParser("Check compatibility with old distributions") + parser.add_argument("--check-name", required=True) + parser.add_argument("--check-glibc", action="store_true") + parser.add_argument( + "--check-distributions", action="store_true" + ) # currently hardcoded to x86, don't enable for ARM + return parser.parse_args() + + def main(): logging.basicConfig(level=logging.INFO) + args = parse_args() + stopwatch = Stopwatch() temp_path = TEMP_PATH @@ -129,13 +145,11 @@ def main(): gh = Github(get_best_robot_token(), per_page=100) - rerun_helper = RerunHelper(gh, pr_info, CHECK_NAME) + rerun_helper = RerunHelper(gh, pr_info, args.check_name) if rerun_helper.is_already_finished_by_status(): logging.info("Check is already finished according to github status, exiting") sys.exit(0) - docker_images = get_images_with_versions(reports_path, [IMAGE_CENTOS, IMAGE_UBUNTU]) - packages_path = os.path.join(temp_path, "packages") if not os.path.exists(packages_path): os.makedirs(packages_path) @@ -145,7 +159,7 @@ def main(): "clickhouse-common-static_" in url or "clickhouse-server_" in url ) - download_builds_filter(CHECK_NAME, reports_path, packages_path, url_filter) + download_builds_filter(args.check_name, reports_path, packages_path, url_filter) for f in os.listdir(packages_path): if ".deb" in f: @@ -162,9 +176,24 @@ def main(): if not os.path.exists(result_path): os.makedirs(result_path) - run_commands = get_run_commands( - packages_path, result_path, server_log_path, docker_images[0], docker_images[1] - ) + run_commands = [] + + if args.check_glibc: + check_glibc_commands = get_run_commands_glibc(packages_path, result_path) + run_commands.extend(check_glibc_commands) + + if args.check_distributions: + docker_images = get_images_with_versions( + reports_path, [IMAGE_CENTOS, IMAGE_UBUNTU] + ) + check_distributions_commands = get_run_commands_distributions( + packages_path, + result_path, + server_log_path, + docker_images[0], + docker_images[1], + ) + run_commands.extend(check_distributions_commands) state = "success" for run_command in run_commands: @@ -177,13 +206,22 @@ def main(): subprocess.check_call(f"sudo chown -R ubuntu:ubuntu {temp_path}", shell=True) + # See https://sourceware.org/glibc/wiki/Glibc%20Timeline + max_glibc_version = "" + if "x86" in args.check_name: + max_glibc_version = "2.4" + elif "aarch64" in args.check_nam: + max_glibc_version = "2.18" # because of build with newer sysroot? + else: + raise Exception("Can't determine max glibc version") + s3_helper = S3Helper() state, description, test_results, additional_logs = process_result( - result_path, server_log_path + result_path, server_log_path, max_glibc_version ) ch_helper = ClickHouseHelper() - mark_flaky_tests(ch_helper, CHECK_NAME, test_results) + mark_flaky_tests(ch_helper, args.check_name, test_results) report_url = upload_results( s3_helper, @@ -191,10 +229,10 @@ def main(): pr_info.sha, test_results, additional_logs, - CHECK_NAME, + args.check_name, ) print(f"::notice ::Report url: {report_url}") - post_commit_status(gh, pr_info.sha, CHECK_NAME, description, state, report_url) + post_commit_status(gh, pr_info.sha, args.check_name, description, state, report_url) prepared_events = prepare_tests_results_for_clickhouse( pr_info, @@ -203,7 +241,7 @@ def main(): stopwatch.duration_seconds, stopwatch.start_time_str, report_url, - CHECK_NAME, + args.check_name, ) ch_helper.insert_events_into(db="default", table="checks", events=prepared_events) From 33cafc6e891a692af3d1315706afb8cea95804e2 Mon Sep 17 00:00:00 2001 From: robot-clickhouse Date: Thu, 2 Mar 2023 11:22:32 +0000 Subject: [PATCH 405/841] Automatic style fix --- tests/ci/compatibility_check.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ci/compatibility_check.py b/tests/ci/compatibility_check.py index 9f3c1a1ca8b..398f3df3deb 100644 --- a/tests/ci/compatibility_check.py +++ b/tests/ci/compatibility_check.py @@ -211,7 +211,7 @@ def main(): if "x86" in args.check_name: max_glibc_version = "2.4" elif "aarch64" in args.check_nam: - max_glibc_version = "2.18" # because of build with newer sysroot? + max_glibc_version = "2.18" # because of build with newer sysroot? else: raise Exception("Can't determine max glibc version") From fdc6de2a27b91e1628e2407b3a3799b7d888b324 Mon Sep 17 00:00:00 2001 From: Constantine Peresypkin Date: Wed, 1 Mar 2023 16:18:23 +0100 Subject: [PATCH 406/841] use http request body in predefined http handlers adds a new "virtual" parameter `__request_body` which can be used in http rules, see below tremendously helps in producing arbitrary REST interfaces for example: ```xml POST /ingest predefined_query_handler INSERT INTO events(id, data) SELECT {id:UInt32}, {__request_body:String} ``` --- src/Core/Settings.h | 1 + src/IO/copyData.cpp | 8 ++++++++ src/IO/copyData.h | 3 +++ src/Interpreters/ReplaceQueryParameterVisitor.cpp | 5 ++++- src/Server/HTTPHandler.cpp | 15 ++++++++++++--- src/Server/HTTPHandler.h | 4 ++-- .../integration/test_http_handlers_config/test.py | 10 ++++++++++ .../test_predefined_handler/config.xml | 8 ++++++++ 8 files changed, 48 insertions(+), 6 deletions(-) diff --git a/src/Core/Settings.h b/src/Core/Settings.h index a65f2ccb60f..e320b938d2a 100644 --- a/src/Core/Settings.h +++ b/src/Core/Settings.h @@ -712,6 +712,7 @@ class IColumn; M(Float, insert_keeper_fault_injection_probability, 0.0f, "Approximate probability of failure for a keeper request during insert. Valid value is in interval [0.0f, 1.0f]", 0) \ M(UInt64, insert_keeper_fault_injection_seed, 0, "0 - random seed, otherwise the setting value", 0) \ M(Bool, force_aggregation_in_order, false, "Force use of aggregation in order on remote nodes during distributed aggregation. PLEASE, NEVER CHANGE THIS SETTING VALUE MANUALLY!", IMPORTANT) \ + M(UInt64, http_max_request_param_data_size, 10_MiB, "Limit on size of request data used as a query parameter in predefined HTTP requests.", 0) \ // End of COMMON_SETTINGS // Please add settings related to formats into the FORMAT_FACTORY_SETTINGS and move obsolete settings to OBSOLETE_SETTINGS. diff --git a/src/IO/copyData.cpp b/src/IO/copyData.cpp index b189c318d67..07222a930b5 100644 --- a/src/IO/copyData.cpp +++ b/src/IO/copyData.cpp @@ -10,6 +10,7 @@ namespace DB namespace ErrorCodes { extern const int ATTEMPT_TO_READ_AFTER_EOF; + extern const int CANNOT_READ_ALL_DATA; } namespace @@ -91,6 +92,13 @@ void copyData(ReadBuffer & from, WriteBuffer & to, size_t bytes, std::function & is_cancelled, ThrottlerPtr throttler) { copyDataImpl(from, to, false, std::numeric_limits::max(), &is_cancelled, throttler); diff --git a/src/IO/copyData.h b/src/IO/copyData.h index 2202f36f79e..b67088d8e47 100644 --- a/src/IO/copyData.h +++ b/src/IO/copyData.h @@ -27,6 +27,9 @@ void copyData(ReadBuffer & from, WriteBuffer & to, size_t bytes, const std::atom void copyData(ReadBuffer & from, WriteBuffer & to, std::function cancellation_hook); void copyData(ReadBuffer & from, WriteBuffer & to, size_t bytes, std::function cancellation_hook); +/// Copies at most `max_bytes` bytes from ReadBuffer to WriteBuffer. If there are more bytes, then throws an exception. +void copyDataMaxBytes(ReadBuffer & from, WriteBuffer & to, size_t max_bytes); + /// Same as above but also use throttler to limit maximum speed void copyDataWithThrottler(ReadBuffer & from, WriteBuffer & to, const std::atomic & is_cancelled, ThrottlerPtr throttler); void copyDataWithThrottler(ReadBuffer & from, WriteBuffer & to, size_t bytes, const std::atomic & is_cancelled, ThrottlerPtr throttler); diff --git a/src/Interpreters/ReplaceQueryParameterVisitor.cpp b/src/Interpreters/ReplaceQueryParameterVisitor.cpp index f271de26ca4..774d523b4e6 100644 --- a/src/Interpreters/ReplaceQueryParameterVisitor.cpp +++ b/src/Interpreters/ReplaceQueryParameterVisitor.cpp @@ -74,7 +74,10 @@ void ReplaceQueryParameterVisitor::visitQueryParameter(ASTPtr & ast) IColumn & temp_column = *temp_column_ptr; ReadBufferFromString read_buffer{value}; FormatSettings format_settings; - data_type->getDefaultSerialization()->deserializeTextEscaped(temp_column, read_buffer, format_settings); + if (ast_param.name == "_request_body") + data_type->getDefaultSerialization()->deserializeWholeText(temp_column, read_buffer, format_settings); + else + data_type->getDefaultSerialization()->deserializeTextEscaped(temp_column, read_buffer, format_settings); if (!read_buffer.eof()) throw Exception(ErrorCodes::BAD_QUERY_PARAMETER, diff --git a/src/Server/HTTPHandler.cpp b/src/Server/HTTPHandler.cpp index 702743ef1f0..f5a0670d1f1 100644 --- a/src/Server/HTTPHandler.cpp +++ b/src/Server/HTTPHandler.cpp @@ -781,7 +781,6 @@ void HTTPHandler::processQuery( /// they will be applied in ProcessList::insert() from executeQuery() itself. const auto & query = getQuery(request, params, context); std::unique_ptr in_param = std::make_unique(query); - in = has_external_data ? std::move(in_param) : std::make_unique(*in_param, *in_post_maybe_compressed); /// HTTP response compression is turned on only if the client signalled that they support it /// (using Accept-Encoding header) and 'enable_http_compression' setting is turned on. @@ -831,7 +830,8 @@ void HTTPHandler::processQuery( }); } - customizeContext(request, context); + customizeContext(request, context, *in_post_maybe_compressed); + in = has_external_data ? std::move(in_param) : std::make_unique(*in_param, *in_post_maybe_compressed); executeQuery(*in, *used_output.out_maybe_delayed_and_compressed, /* allow_into_outfile = */ false, context, [&response, this] (const QueryResultDetails & details) @@ -1139,7 +1139,7 @@ bool PredefinedQueryHandler::customizeQueryParam(ContextMutablePtr context, cons return false; } -void PredefinedQueryHandler::customizeContext(HTTPServerRequest & request, ContextMutablePtr context) +void PredefinedQueryHandler::customizeContext(HTTPServerRequest & request, ContextMutablePtr context, ReadBuffer & body) { /// If in the configuration file, the handler's header is regex and contains named capture group /// We will extract regex named capture groups as query parameters @@ -1173,6 +1173,15 @@ void PredefinedQueryHandler::customizeContext(HTTPServerRequest & request, Conte const auto & header_value = request.get(header_name); set_query_params(header_value.data(), header_value.data() + header_value.size(), regex); } + + if (unlikely(receive_params.contains("_request_body") && !context->getQueryParameters().contains("_request_body"))) + { + WriteBufferFromOwnString value; + const auto & settings = context->getSettingsRef(); + + copyDataMaxBytes(body, value, settings.http_max_request_param_data_size); + context->setQueryParameter("_request_body", value.str()); + } } std::string PredefinedQueryHandler::getQuery(HTTPServerRequest & request, HTMLForm & params, ContextMutablePtr context) diff --git a/src/Server/HTTPHandler.h b/src/Server/HTTPHandler.h index fa742ebc8fb..5eda5927538 100644 --- a/src/Server/HTTPHandler.h +++ b/src/Server/HTTPHandler.h @@ -36,7 +36,7 @@ public: void handleRequest(HTTPServerRequest & request, HTTPServerResponse & response) override; /// This method is called right before the query execution. - virtual void customizeContext(HTTPServerRequest & /* request */, ContextMutablePtr /* context */) {} + virtual void customizeContext(HTTPServerRequest & /* request */, ContextMutablePtr /* context */, ReadBuffer & /* body */) {} virtual bool customizeQueryParam(ContextMutablePtr context, const std::string & key, const std::string & value) = 0; @@ -163,7 +163,7 @@ public: , const CompiledRegexPtr & url_regex_, const std::unordered_map & header_name_with_regex_ , const std::optional & content_type_override_); - virtual void customizeContext(HTTPServerRequest & request, ContextMutablePtr context) override; + void customizeContext(HTTPServerRequest & request, ContextMutablePtr context, ReadBuffer & body) override; std::string getQuery(HTTPServerRequest & request, HTMLForm & params, ContextMutablePtr context) override; diff --git a/tests/integration/test_http_handlers_config/test.py b/tests/integration/test_http_handlers_config/test.py index 9c64bd41b23..50dfd2a480c 100644 --- a/tests/integration/test_http_handlers_config/test.py +++ b/tests/integration/test_http_handlers_config/test.py @@ -147,6 +147,16 @@ def test_predefined_query_handler(): assert b"max_final_threads\t1\nmax_threads\t1\n" == res2.content assert "application/generic+one" == res2.headers["content-type"] + cluster.instance.query("CREATE TABLE test_table (id UInt32, data String) Engine=TinyLog") + res3 = cluster.instance.http_request( + "test_predefined_handler_post_body?id=100", + method="POST", + data="TEST".encode("utf8") + ) + assert res3.status_code == 200 + assert cluster.instance.query("SELECT * FROM test_table") == "100\tTEST\n" + cluster.instance.query("DROP TABLE test_table") + def test_fixed_static_handler(): with contextlib.closing( diff --git a/tests/integration/test_http_handlers_config/test_predefined_handler/config.xml b/tests/integration/test_http_handlers_config/test_predefined_handler/config.xml index 5b5de63356e..1b8ddfab323 100644 --- a/tests/integration/test_http_handlers_config/test_predefined_handler/config.xml +++ b/tests/integration/test_http_handlers_config/test_predefined_handler/config.xml @@ -21,5 +21,13 @@ application/generic+one + + POST + /test_predefined_handler_post_body + + predefined_query_handler + INSERT INTO test_table(id, data) SELECT {id:UInt32}, {_request_body:String} + + From cdc8596f81cd4322fda3a188ffcbb9a4065e8882 Mon Sep 17 00:00:00 2001 From: KevinyhZou Date: Thu, 2 Mar 2023 20:08:39 +0800 Subject: [PATCH 407/841] enable int type in repeat function --- .../functions/string-functions.md | 2 +- src/Functions/repeat.cpp | 29 +++++++++++++------ .../01013_repeat_function.reference | 8 ++--- .../0_stateless/01013_repeat_function.sql | 8 ++--- 4 files changed, 29 insertions(+), 18 deletions(-) diff --git a/docs/en/sql-reference/functions/string-functions.md b/docs/en/sql-reference/functions/string-functions.md index 845be6e04c7..f3c5b20f886 100644 --- a/docs/en/sql-reference/functions/string-functions.md +++ b/docs/en/sql-reference/functions/string-functions.md @@ -330,7 +330,7 @@ repeat(s, n) **Arguments** - `s` — The string to repeat. [String](../../sql-reference/data-types/string.md). -- `n` — The number of times to repeat the string. [UInt](../../sql-reference/data-types/int-uint.md). +- `n` — The number of times to repeat the string. [UInt or Int](../../sql-reference/data-types/int-uint.md). **Returned value** diff --git a/src/Functions/repeat.cpp b/src/Functions/repeat.cpp index dcd05f373fc..0c323c39969 100644 --- a/src/Functions/repeat.cpp +++ b/src/Functions/repeat.cpp @@ -39,13 +39,15 @@ struct RepeatImpl size, max_string_size); } + template static void vectorStrConstRepeat( const ColumnString::Chars & data, const ColumnString::Offsets & offsets, ColumnString::Chars & res_data, ColumnString::Offsets & res_offsets, - UInt64 repeat_time) + T repeat_time) { + repeat_time = repeat_time < 0 ? 0 : repeat_time; checkRepeatTime(repeat_time); UInt64 data_size = 0; @@ -77,7 +79,8 @@ struct RepeatImpl res_offsets.assign(offsets); for (UInt64 i = 0; i < col_num.size(); ++i) { - size_t repeated_size = (offsets[i] - offsets[i - 1] - 1) * col_num[i] + 1; + T repeat_time = col_num[i] < 0 ? 0 : col_num[i]; + size_t repeated_size = (offsets[i] - offsets[i - 1] - 1) * repeat_time + 1; checkStringSize(repeated_size); data_size += repeated_size; res_offsets[i] = data_size; @@ -86,7 +89,7 @@ struct RepeatImpl for (UInt64 i = 0; i < col_num.size(); ++i) { - T repeat_time = col_num[i]; + T repeat_time = col_num[i] < 0 ? 0 : col_num[i]; checkRepeatTime(repeat_time); process(data.data() + offsets[i - 1], res_data.data() + res_offsets[i - 1], offsets[i] - offsets[i - 1], repeat_time); } @@ -105,7 +108,8 @@ struct RepeatImpl UInt64 col_size = col_num.size(); for (UInt64 i = 0; i < col_size; ++i) { - size_t repeated_size = str_size * col_num[i] + 1; + T repeat_time = col_num[i] < 0 ? 0 : col_num[i]; + size_t repeated_size = str_size * repeat_time + 1; checkStringSize(repeated_size); data_size += repeated_size; res_offsets[i] = data_size; @@ -113,7 +117,7 @@ struct RepeatImpl res_data.resize(data_size); for (UInt64 i = 0; i < col_size; ++i) { - T repeat_time = col_num[i]; + T repeat_time = col_num[i] < 0 ? 0 : col_num[i]; checkRepeatTime(repeat_time); process( reinterpret_cast(const_cast(copy_str.data())), @@ -168,7 +172,8 @@ class FunctionRepeat : public IFunction template static bool castType(const IDataType * type, F && f) { - return castTypeToEither(type, std::forward(f)); + return castTypeToEither(type, std::forward(f)); } public: @@ -186,7 +191,7 @@ public: if (!isString(arguments[0])) throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Illegal type {} of argument of function {}", arguments[0]->getName(), getName()); - if (!isUnsignedInteger(arguments[1])) + if (!isInteger(arguments[1])) throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Illegal type {} of argument of function {}", arguments[1]->getName(), getName()); return arguments[0]; @@ -204,9 +209,15 @@ public: { if (const ColumnConst * scale_column_num = checkAndGetColumn(numcolumn.get())) { - UInt64 repeat_time = scale_column_num->getValue(); auto col_res = ColumnString::create(); - RepeatImpl::vectorStrConstRepeat(col->getChars(), col->getOffsets(), col_res->getChars(), col_res->getOffsets(), repeat_time); + castType(arguments[1].type.get(), [&](const auto & type) + { + using DataType = std::decay_t; + using T = typename DataType::FieldType; + T repeat_time = scale_column_num->getValue(); + RepeatImpl::vectorStrConstRepeat(col->getChars(), col->getOffsets(), col_res->getChars(), col_res->getOffsets(), repeat_time); + return true; + }); return col_res; } else if (castType(arguments[1].type.get(), [&](const auto & type) diff --git a/tests/queries/0_stateless/01013_repeat_function.reference b/tests/queries/0_stateless/01013_repeat_function.reference index 46bb248a99a..ea0dadd524f 100644 --- a/tests/queries/0_stateless/01013_repeat_function.reference +++ b/tests/queries/0_stateless/01013_repeat_function.reference @@ -1,7 +1,7 @@ abcabcabcabcabcabcabcabcabcabc abcabcabc -sdfggsdfgg -xywq + + abcabcabcabcabcabcabcabcabcabcabcabc sdfggsdfggsdfggsdfggsdfggsdfggsdfggsdfggsdfggsdfgg @@ -20,8 +20,8 @@ sdfggsdfggsdfggsdfggsdfggsdfggsdfggsdfggsdfggsdfgg xywqxywqxywqxywqxywqxywqxywqxywqxywqxywq plkfplkfplkfplkfplkfplkfplkfplkfplkfplkf abcabcabc -abcabc -abc + + abcabcabcabcabcabcabcabcabcabcabcabc abcabcabcabcabcabcabcabcabcabc diff --git a/tests/queries/0_stateless/01013_repeat_function.sql b/tests/queries/0_stateless/01013_repeat_function.sql index 85b0c16b4ab..b29cc032f28 100644 --- a/tests/queries/0_stateless/01013_repeat_function.sql +++ b/tests/queries/0_stateless/01013_repeat_function.sql @@ -3,20 +3,20 @@ DROP TABLE IF EXISTS defaults; CREATE TABLE defaults ( strings String, - u8 UInt8, + i8 Int8, u16 UInt16, u32 UInt32, u64 UInt64 )ENGINE = Memory(); -INSERT INTO defaults values ('abc', 3, 12, 4, 56) ('sdfgg', 2, 10, 21, 200) ('xywq', 1, 4, 9, 5) ('plkf', 0, 5, 7,77); +INSERT INTO defaults values ('abc', 3, 12, 4, 56) ('sdfgg', -2, 10, 21, 200) ('xywq', -1, 4, 9, 5) ('plkf', 0, 5, 7,77); -SELECT repeat(strings, u8) FROM defaults; +SELECT repeat(strings, i8) FROM defaults; SELECT repeat(strings, u16) FROM defaults; SELECT repeat(strings, u32) from defaults; SELECT repeat(strings, u64) FROM defaults; SELECT repeat(strings, 10) FROM defaults; -SELECT repeat('abc', u8) FROM defaults; +SELECT repeat('abc', i8) FROM defaults; SELECT repeat('abc', u16) FROM defaults; SELECT repeat('abc', u32) FROM defaults; SELECT repeat('abc', u64) FROM defaults; From eab29f4a4e38c15a6b7845208c02fb3dcb5e3210 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Thu, 2 Mar 2023 13:09:18 +0100 Subject: [PATCH 408/841] Fixed tests --- src/Functions/FunctionsExternalDictionaries.h | 21 ++++++++------- .../00313_const_totals_extremes.reference | 4 +-- .../00313_const_totals_extremes.sh | 2 +- ...62_pm_all_join_with_block_continuation.sql | 26 +++++++++---------- .../0_stateless/01508_explain_header.sql | 2 ++ 5 files changed, 29 insertions(+), 26 deletions(-) diff --git a/src/Functions/FunctionsExternalDictionaries.h b/src/Functions/FunctionsExternalDictionaries.h index 570147e4c86..d3be5b1200b 100644 --- a/src/Functions/FunctionsExternalDictionaries.h +++ b/src/Functions/FunctionsExternalDictionaries.h @@ -675,28 +675,29 @@ private: return impl.isInjective(sample_columns); } - DataTypePtr getReturnTypeImpl(const ColumnsWithTypeAndName & arguments) const override + DataTypePtr getReturnTypeImpl(const DataTypes &) const override { - DataTypePtr result_type; + DataTypePtr result; if constexpr (IsDataTypeDecimal) - result_type = std::make_shared(DataType::maxPrecision(), 0); + result = std::make_shared(DataType::maxPrecision(), 0); else - result_type = std::make_shared(); + result = std::make_shared(); + return result; + } + + ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr & result_type, size_t input_rows_count) const override + { auto return_type = impl.getReturnTypeImpl(arguments); + if (!return_type->equals(*result_type)) throw Exception(ErrorCodes::TYPE_MISMATCH, "Function {} dictionary attribute has different type {} expected {}", getName(), return_type->getName(), result_type->getName()); - return result_type; - } - - ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr & result_type, size_t input_rows_count) const override - { - return impl.executeImpl(arguments, result_type, input_rows_count); + return impl.executeImpl(arguments, return_type, input_rows_count); } const FunctionDictGetNoType impl; diff --git a/tests/queries/0_stateless/00313_const_totals_extremes.reference b/tests/queries/0_stateless/00313_const_totals_extremes.reference index fd10e1f4387..b5abbfa3c4e 100644 --- a/tests/queries/0_stateless/00313_const_totals_extremes.reference +++ b/tests/queries/0_stateless/00313_const_totals_extremes.reference @@ -86,7 +86,7 @@ [ { "name": "k", - "type": "DateTime" + "type": "DateTime('UTC')" }, { "name": "count()", @@ -104,7 +104,7 @@ "totals": { - "k": "1970-01-01 01:00:00", + "k": "1970-01-01 00:00:00", "count()": "1" }, diff --git a/tests/queries/0_stateless/00313_const_totals_extremes.sh b/tests/queries/0_stateless/00313_const_totals_extremes.sh index 5e880fe7aa0..539a19817e2 100755 --- a/tests/queries/0_stateless/00313_const_totals_extremes.sh +++ b/tests/queries/0_stateless/00313_const_totals_extremes.sh @@ -9,5 +9,5 @@ ${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&extremes=1&output_format_write_statist ${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&extremes=1&output_format_write_statistics=0" -d "SELECT toFloat32(1.23) AS k, count() GROUP BY k WITH TOTALS SETTINGS allow_experimental_analyzer = 1 FORMAT JSONCompact"; ${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&extremes=1&output_format_write_statistics=0" -d "SELECT toDate('2010-01-01') AS k, count() GROUP BY k WITH TOTALS SETTINGS allow_experimental_analyzer = 1"; -${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&extremes=1&output_format_write_statistics=0" -d "SELECT toDateTime('2010-01-01 01:02:03') AS k, count() GROUP BY k WITH TOTALS SETTINGS allow_experimental_analyzer = 1 FORMAT JSON"; +${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&extremes=1&output_format_write_statistics=0" -d "SELECT toDateTime('2010-01-01 01:02:03', 'UTC') AS k, count() GROUP BY k WITH TOTALS SETTINGS allow_experimental_analyzer = 1 FORMAT JSON"; ${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&extremes=1&output_format_write_statistics=0" -d "SELECT 1.1 AS k, count() GROUP BY k WITH TOTALS SETTINGS allow_experimental_analyzer = 1 FORMAT JSONCompact"; diff --git a/tests/queries/0_stateless/01062_pm_all_join_with_block_continuation.sql b/tests/queries/0_stateless/01062_pm_all_join_with_block_continuation.sql index 0732db73e38..15a28e92386 100644 --- a/tests/queries/0_stateless/01062_pm_all_join_with_block_continuation.sql +++ b/tests/queries/0_stateless/01062_pm_all_join_with_block_continuation.sql @@ -2,32 +2,32 @@ SET max_memory_usage = 50000000; SET join_algorithm = 'partial_merge'; SELECT 'defaults'; - + SELECT count(1) FROM ( - SELECT k, n FROM (SELECT materialize(1) as k FROM numbers(10)) nums + SELECT materialize(1) as k, n FROM numbers(10) nums JOIN (SELECT materialize(1) AS k, number n FROM numbers(1000000)) j USING k); SELECT count(1) FROM ( - SELECT k, n FROM (SELECT materialize(1) as k FROM numbers(1000)) nums + SELECT materialize(1) as k, n FROM numbers(1000) nums JOIN (SELECT materialize(1) AS k, number n FROM numbers(10000)) j USING k); SELECT count(1), uniqExact(n) FROM ( - SELECT k, n FROM (SELECT materialize(1) AS k FROM numbers(1000000)) nums + SELECT materialize(1) as k, n FROM numbers(1000000) nums JOIN (SELECT materialize(1) AS k, number n FROM numbers(10)) j USING k); -- errors SET max_joined_block_size_rows = 0; - + SELECT count(1) FROM ( - SELECT k, n FROM (SELECT materialize(1) AS k FROM numbers(10)) nums + SELECT materialize(1) as k, n FROM numbers(10) nums JOIN (SELECT materialize(1) AS k, number n FROM numbers(1000000)) j USING k); -- { serverError 241 } SELECT count(1) FROM ( - SELECT k, n FROM (SELECT materialize(1) AS k FROM numbers(1000)) nums + SELECT materialize(1) as k, n FROM numbers(1000) nums JOIN (SELECT materialize(1) AS k, number n FROM numbers(10000)) j USING k); -- { serverError 241 } @@ -35,17 +35,17 @@ SELECT 'max_joined_block_size_rows = 2000'; SET max_joined_block_size_rows = 2000; SELECT count(1) FROM ( - SELECT k, n FROM (SELECT materialize(1) AS k FROM numbers(10)) nums + SELECT materialize(1) as k, n FROM numbers(10) nums JOIN (SELECT materialize(1) AS k, number n FROM numbers(1000000)) j USING k); SELECT count(1), uniqExact(n) FROM ( - SELECT k, n FROM (SELECT materialize(1) AS k FROM numbers(1000)) nums + SELECT materialize(1) as k, n FROM numbers(1000) nums JOIN (SELECT materialize(1) AS k, number n FROM numbers(10000)) j USING k); SELECT count(1), uniqExact(n) FROM ( - SELECT k, n FROM (SELECT materialize(1) as k FROM numbers(1000000)) nums + SELECT materialize(1) as k, n FROM numbers(1000000) nums JOIN (SELECT materialize(1) AS k, number n FROM numbers(10)) j USING k); @@ -53,16 +53,16 @@ SELECT 'max_rows_in_join = 1000'; SET max_rows_in_join = 1000; SELECT count(1) FROM ( - SELECT k, n FROM (SELECT materialize(1) AS k FROM numbers(10)) nums + SELECT materialize(1) as k, n FROM numbers(10) nums JOIN (SELECT materialize(1) AS k, number n FROM numbers(1000000)) j USING k); SELECT count(1), uniqExact(n) FROM ( - SELECT k, n FROM (SELECT materialize(1) AS k FROM numbers(1000)) nums + SELECT materialize(1) as k, n FROM numbers(1000) nums JOIN (SELECT materialize(1) AS k, number n FROM numbers(10000)) j USING k); SELECT count(1), uniqExact(n) FROM ( - SELECT k, n FROM (SELECT materialize(1) AS k FROM numbers(1000000)) nums + SELECT materialize(1) as k, n FROM numbers(1000000) nums JOIN (SELECT materialize(1) AS k, number n FROM numbers(10)) j USING k); diff --git a/tests/queries/0_stateless/01508_explain_header.sql b/tests/queries/0_stateless/01508_explain_header.sql index fb274c84d8a..a9f876068aa 100644 --- a/tests/queries/0_stateless/01508_explain_header.sql +++ b/tests/queries/0_stateless/01508_explain_header.sql @@ -1 +1,3 @@ +SET allow_experimental_analyzer = 1; + explain header = 1 select 1 as x; From f9e80b4d416e385e0135166f9a86bc756999b90a Mon Sep 17 00:00:00 2001 From: Dmitry Date: Thu, 2 Mar 2023 16:36:35 +0400 Subject: [PATCH 409/841] Typo in the `/docs/ru/sql-reference/statements/select/group-by.md` --- docs/ru/sql-reference/statements/select/group-by.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ru/sql-reference/statements/select/group-by.md b/docs/ru/sql-reference/statements/select/group-by.md index 450543cb7a2..ea4f357d33c 100644 --- a/docs/ru/sql-reference/statements/select/group-by.md +++ b/docs/ru/sql-reference/statements/select/group-by.md @@ -108,7 +108,7 @@ SELECT year, month, day, count(*) FROM t GROUP BY year, month, day WITH ROLLUP; ## Модификатор WITH CUBE {#with-cube-modifier} -Модификатор `WITH CUBE` применятеся для расчета подытогов по всем комбинациям группировки ключевых выражений в списке `GROUP BY`. +Модификатор `WITH CUBE` применяется для расчета подытогов по всем комбинациям группировки ключевых выражений в списке `GROUP BY`. Строки с подытогами добавляются в конец результирующей таблицы. В колонках, по которым выполняется группировка, указывается значение `0` или пустая строка. From d55b800fc6b40699b5608c46de4658879d32d374 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Thu, 2 Mar 2023 13:43:03 +0100 Subject: [PATCH 410/841] Fixed code review issues --- src/Analyzer/ColumnTransformers.cpp | 2 +- src/Analyzer/Passes/QueryAnalysisPass.cpp | 10 +++++++-- src/Planner/Planner.cpp | 1 + src/Planner/PlannerJoinTree.cpp | 26 +++++++++++------------ 4 files changed, 23 insertions(+), 16 deletions(-) diff --git a/src/Analyzer/ColumnTransformers.cpp b/src/Analyzer/ColumnTransformers.cpp index cc037fb2a99..ee336a0e7f3 100644 --- a/src/Analyzer/ColumnTransformers.cpp +++ b/src/Analyzer/ColumnTransformers.cpp @@ -348,7 +348,7 @@ ASTPtr ReplaceColumnTransformerNode::toASTImpl() const auto replacement_ast = std::make_shared(); replacement_ast->name = replacements_names[i]; replacement_ast->children.push_back(replacement_expressions_nodes[i]->toAST()); - ast_replace_transformer->children.push_back(replacement_ast); + ast_replace_transformer->children.push_back(std::move(replacement_ast)); } return ast_replace_transformer; diff --git a/src/Analyzer/Passes/QueryAnalysisPass.cpp b/src/Analyzer/Passes/QueryAnalysisPass.cpp index 8a69eb348d6..f8645f2b756 100644 --- a/src/Analyzer/Passes/QueryAnalysisPass.cpp +++ b/src/Analyzer/Passes/QueryAnalysisPass.cpp @@ -4045,6 +4045,12 @@ ProjectionNames QueryAnalyzer::resolveMatcher(QueryTreeNodePtr & matcher_node, I node = replace_expression->clone(); node_projection_names = resolveExpressionNode(node, scope, false /*allow_lambda_expression*/, false /*allow_table_expression*/); + + /** If replace expression resolved as single node, we want to use replace column name as result projection name, instead + * of using replace expression projection name. + * + * Example: SELECT * REPLACE id + 5 AS id FROM test_table; + */ if (node_projection_names.size() == 1) node_projection_names[0] = column_name; @@ -5026,14 +5032,14 @@ ProjectionNames QueryAnalyzer::resolveFunction(QueryTreeNodePtr & node, Identifi auto function_base = function->build(argument_columns); /// Do not constant fold get scalar functions - bool is_get_scalar_function = function_name == "__getScalar" || function_name == "shardNum" || + bool disable_constant_folding = function_name == "__getScalar" || function_name == "shardNum" || function_name == "shardCount"; /** If function is suitable for constant folding try to convert it to constant. * Example: SELECT plus(1, 1); * Result: SELECT 2; */ - if (function_base->isSuitableForConstantFolding() && !is_get_scalar_function) + if (function_base->isSuitableForConstantFolding() && !disable_constant_folding) { auto result_type = function_base->getResultType(); auto executable_function = function_base->prepare(argument_columns); diff --git a/src/Planner/Planner.cpp b/src/Planner/Planner.cpp index a65ee60edfa..2ce470d9ecf 100644 --- a/src/Planner/Planner.cpp +++ b/src/Planner/Planner.cpp @@ -594,6 +594,7 @@ void addWithFillStepIfNeeded(QueryPlan & query_plan, auto query_plan_columns = query_plan.getCurrentDataStream().header.getColumnsWithTypeAndName(); for (auto & query_plan_column : query_plan_columns) { + /// INTERPOLATE actions dag input columns must be non constant query_plan_column.column = nullptr; interpolate_actions_dag->addInput(query_plan_column); } diff --git a/src/Planner/PlannerJoinTree.cpp b/src/Planner/PlannerJoinTree.cpp index 4d6181e3686..d6235208063 100644 --- a/src/Planner/PlannerJoinTree.cpp +++ b/src/Planner/PlannerJoinTree.cpp @@ -336,7 +336,19 @@ JoinTreeQueryPlan buildQueryPlanForTableExpression(const QueryTreeNodePtr & tabl } else if (query_node || union_node) { - if (!select_query_options.only_analyze) + if (select_query_options.only_analyze) + { + auto projection_columns = query_node ? query_node->getProjectionColumns() : union_node->computeProjectionColumns(); + Block source_header; + for (auto & projection_column : projection_columns) + source_header.insert(ColumnWithTypeAndName(projection_column.type, projection_column.name)); + + Pipe pipe(std::make_shared(source_header)); + auto read_from_pipe = std::make_unique(std::move(pipe)); + read_from_pipe->setStepDescription("Read from NullSource"); + query_plan.addStep(std::move(read_from_pipe)); + } + else { if (table_expression_data.getColumnNames().empty()) { @@ -355,18 +367,6 @@ JoinTreeQueryPlan buildQueryPlanForTableExpression(const QueryTreeNodePtr & tabl subquery_planner.buildQueryPlanIfNeeded(); query_plan = std::move(subquery_planner).extractQueryPlan(); } - else - { - auto projection_columns = query_node ? query_node->getProjectionColumns() : union_node->computeProjectionColumns(); - Block source_header; - for (auto & projection_column : projection_columns) - source_header.insert(ColumnWithTypeAndName(projection_column.type, projection_column.name)); - - Pipe pipe(std::make_shared(source_header)); - auto read_from_pipe = std::make_unique(std::move(pipe)); - read_from_pipe->setStepDescription("Read from NullSource"); - query_plan.addStep(std::move(read_from_pipe)); - } } else { From 6aee72391847c86ca6007443828b6b4000daf645 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Thu, 2 Mar 2023 16:50:28 +0400 Subject: [PATCH 411/841] Typos in the page `/docs/ru/sql-reference/statements/select/join.md` --- docs/ru/sql-reference/statements/select/join.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/ru/sql-reference/statements/select/join.md b/docs/ru/sql-reference/statements/select/join.md index 6853a8c8c90..6be438f8c43 100644 --- a/docs/ru/sql-reference/statements/select/join.md +++ b/docs/ru/sql-reference/statements/select/join.md @@ -16,7 +16,7 @@ FROM (ON )|(USING ) ... ``` -Выражения из секции `ON` и столбцы из секции `USING` называется «ключами соединения». Если не указано иное, при присоединение создаётся [Декартово произведение](https://en.wikipedia.org/wiki/Cartesian_product) из строк с совпадающими значениями ключей соединения, что может привести к получению результатов с гораздо большим количеством строк, чем исходные таблицы. +Выражения из секции `ON` и столбцы из секции `USING` называются «ключами соединения». Если не указано иное, при присоединение создаётся [Декартово произведение](https://en.wikipedia.org/wiki/Cartesian_product) из строк с совпадающими значениями ключей соединения, что может привести к получению результатов с гораздо большим количеством строк, чем исходные таблицы. ## Поддерживаемые типы соединения {#select-join-types} @@ -28,7 +28,7 @@ FROM - `FULL OUTER JOIN`, не совпадающие строки из обеих таблиц возвращаются в дополнение к совпадающим строкам. - `CROSS JOIN`, производит декартово произведение таблиц целиком, ключи соединения не указываются. -Без указания типа `JOIN` подразумевается `INNER`. Ключевое слово `OUTER` можно опускать. Альтернативным синтаксисом для `CROSS JOIN` является ли указание нескольких таблиц, разделённых запятыми, в [секции FROM](from.md). +Без указания типа `JOIN` подразумевается `INNER`. Ключевое слово `OUTER` можно опускать. Альтернативным синтаксисом для `CROSS JOIN` является указание нескольких таблиц, разделённых запятыми, в [секции FROM](from.md). Дополнительные типы соединений, доступные в ClickHouse: @@ -62,7 +62,7 @@ FROM Строки объединяются только тогда, когда всё составное условие выполнено. Если оно не выполнено, то строки могут попасть в результат в зависимости от типа `JOIN`. Обратите внимание, что если то же самое условие поместить в секцию `WHERE`, то строки, для которых оно не выполняется, никогда не попаду в результат. -Оператор `OR` внутри секции `ON` работает, используя алгоритм хеш-соединения — на каждый агрумент `OR` с ключами соединений для `JOIN` создается отдельная хеш-таблица, поэтому потребление памяти и время выполнения запроса растет линейно при увеличении количества выражений `OR` секции `ON`. +Оператор `OR` внутри секции `ON` работает, используя алгоритм хеш-соединения — на каждый аргумент `OR` с ключами соединений для `JOIN` создается отдельная хеш-таблица, поэтому потребление памяти и время выполнения запроса растет линейно при увеличении количества выражений `OR` секции `ON`. :::note "Примечание" Если в условии использованы столбцы из разных таблиц, то пока поддерживается только оператор равенства (`=`). @@ -280,7 +280,7 @@ SELECT a, b, toTypeName(a), toTypeName(b) FROM t_1 FULL JOIN t_2 USING (a, b); Каждый раз для выполнения запроса с одинаковым `JOIN`, подзапрос выполняется заново — результат не кэшируется. Это можно избежать, используя специальный движок таблиц [Join](../../../engines/table-engines/special/join.md), представляющий собой подготовленное множество для соединения, которое всегда находится в оперативке. -В некоторых случаях это более эффективно использовать [IN](../../operators/in.md) вместо `JOIN`. +В некоторых случаях более эффективно использовать [IN](../../operators/in.md) вместо `JOIN`. Если `JOIN` необходим для соединения с таблицами измерений (dimension tables - сравнительно небольшие таблицы, которые содержат свойства измерений - например, имена для рекламных кампаний), то использование `JOIN` может быть не очень удобным из-за громоздкости синтаксиса, а также из-за того, что правая таблица читается заново при каждом запросе. Специально для таких случаев существует функциональность «Внешние словари», которую следует использовать вместо `JOIN`. Дополнительные сведения смотрите в разделе «Внешние словари». From bafd9773bc310b65f4a1f94201dcb72b193fb70e Mon Sep 17 00:00:00 2001 From: alex filatov <42028484+phil-88@users.noreply.github.com> Date: Thu, 2 Mar 2023 15:53:09 +0300 Subject: [PATCH 412/841] fix Unknown library method 'extDict_libClone' We have an issue when using external dictionary. Occasionally library bridge called with extDict_libClone and fails with Unknown library method 'extDict_libClone'. And it looks like it is because of at some point `else if (method == "extDict_libNew")` was changed to if (lib_new) with no handling for extDict_libClone inside this new if else statement and reporing an error that extDict_libClone is an unknown method. So there is a two-line fix to handle extDict_libClone properly. Error logs that we have: ``` 2022.12.16 14:17:44.285088 [ 393573 ] {} ExternalDictionaries: Could not update cache dictionary 'dict.vhash_s', next update is scheduled at 2022-12-16 14:18:00: Code: 86. DB::Exception: Received error from remote server /extdict_request?version=1&dictionary_id=be2b2cd1-ba57-4658-8d1b-35ef40ab005b&method=extDict_libClone&from_dictionary_id=c3537142-eaa9-4deb-9b65-47eb8ea1dee6. HTTP status code: 500 Internal Server Error, body: Unknown library method 'extDict_libClone' 2022.12.16 14:17:44.387049 [ 399133 ] {} ExternalDictionaries: Could not update cache dictionary 'dict.vhash_s', next update is scheduled at 2022-12-16 14:17:51: Code: 86. DB::Exception: Received error from remote server /extdict_request?version=1&dictionary_id=0df866ac-6c94-4974-a76c-3940522091b9&method=extDict_libClone&from_dictionary_id=c3537142-eaa9-4deb-9b65-47eb8ea1dee6. HTTP status code: 500 Internal Server Error, body: Unknown library method 'extDict_libClone' 2022.12.16 14:17:44.488468 [ 397769 ] {} ExternalDictionaries: Could not update cache dictionary 'dict.vhash_s', next update is scheduled at 2022-12-16 14:19:38: Code: 86. DB::Exception: Received error from remote server /extdict_request?version=1&dictionary_id=2d8af321-b669-4526-982b-42c0fabf0e8d&method=extDict_libClone&from_dictionary_id=c3537142-eaa9-4deb-9b65-47eb8ea1dee6. HTTP status code: 500 Internal Server Error, body: Unknown library method 'extDict_libClone' 2022.12.16 14:17:44.489935 [ 398226 ] {datamarts_v_dwh_node0032-241534:0x552da2_1_11} executeQuery: Code: 510. DB::Exception: Update failed for dictionary 'dict.vhash_s': Code: 510. DB::Exception: Update failed for dictionary dict.vhash_s : Code: 86. DB::Exception: Received error from remote server /extdict_request?version=1&dictionary_id=be2b2cd1-ba57-4658-8d1b-35ef40ab005b&method=extDict_libClone&from_dictionary_id=c3537142-eaa9-4deb-9b65-47eb8ea1dee6. HTTP status code: 500 Internal Server Error, body: Unknown library method 'extDict_libClone' ``` --- programs/library-bridge/LibraryBridgeHandlers.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/programs/library-bridge/LibraryBridgeHandlers.cpp b/programs/library-bridge/LibraryBridgeHandlers.cpp index ab81472be88..9642dd7ee63 100644 --- a/programs/library-bridge/LibraryBridgeHandlers.cpp +++ b/programs/library-bridge/LibraryBridgeHandlers.cpp @@ -158,6 +158,8 @@ void ExternalDictionaryLibraryBridgeRequestHandler::handleRequest(HTTPServerRequ if (cloned) { writeStringBinary("1", out); + out.finalize(); + return; } else { From 0a9d3bf4ae20dabb3947870ff3e44388cde6852f Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Thu, 2 Mar 2023 13:01:04 +0000 Subject: [PATCH 413/841] Cleanup conversion function docs --- .../functions/type-conversion-functions.md | 78 ++++++++++--------- 1 file changed, 41 insertions(+), 37 deletions(-) diff --git a/docs/en/sql-reference/functions/type-conversion-functions.md b/docs/en/sql-reference/functions/type-conversion-functions.md index e587e56b20e..5d96113fe50 100644 --- a/docs/en/sql-reference/functions/type-conversion-functions.md +++ b/docs/en/sql-reference/functions/type-conversion-functions.md @@ -6,22 +6,23 @@ sidebar_label: Type Conversion # Type Conversion Functions -## Common Issues of Numeric Conversions +## Common Issues with Data Conversion -When you convert a value from one to another data type, you should remember that if you try to fit a value from a larger data type to a smaller one (for example Int64 to Int32), or convert from one data type to another (for example `String` to `Int`), you could have data loss. Test beforehand. +Be aware of potential data loss if values of a datatype are converted to a smaller datatype (for example from `Int64` to `Int32`) or between +incompatible datatypes (for example from `String` to `Int`). Make sure to check carefully if the result is as expected. -ClickHouse has the [same behavior as C++ programs](https://en.cppreference.com/w/cpp/language/implicit_conversion). +ClickHouse generally uses the [same behavior as C++ programs](https://en.cppreference.com/w/cpp/language/implicit_conversion). ## toInt(8\|16\|32\|64\|128\|256) -Converts an input value to the [Int](/docs/en/sql-reference/data-types/int-uint.md) data type. This function family includes: +Converts an input value to a value the [Int](/docs/en/sql-reference/data-types/int-uint.md) data type. This function family includes: -- `toInt8(expr)` — Results in the `Int8` data type. -- `toInt16(expr)` — Results in the `Int16` data type. -- `toInt32(expr)` — Results in the `Int32` data type. -- `toInt64(expr)` — Results in the `Int64` data type. -- `toInt128(expr)` — Results in the `Int128` data type. -- `toInt256(expr)` — Results in the `Int256` data type. +- `toInt8(expr)` — Converts to a value of data type `Int8`. +- `toInt16(expr)` — Converts to a value of data type `Int16`. +- `toInt32(expr)` — Converts to a value of data type `Int32`. +- `toInt64(expr)` — Converts to a value of data type `Int64`. +- `toInt128(expr)` — Converts to a value of data type `Int128`. +- `toInt256(expr)` — Converts to a value of data type `Int256`. **Arguments** @@ -53,7 +54,7 @@ Result: ## toInt(8\|16\|32\|64\|128\|256)OrZero -It takes an argument of type String and tries to parse it into Int (8 \| 16 \| 32 \| 64 \| 128 \| 256). If failed, returns 0. +Takes an argument of type [String](/docs/en/sql-reference/data-types/string.md) and tries to parse it into an Int (8 \| 16 \| 32 \| 64 \| 128 \| 256). If unsuccessful, returns `0`. **Example** @@ -73,7 +74,7 @@ Result: ## toInt(8\|16\|32\|64\|128\|256)OrNull -It takes an argument of type String and tries to parse it into Int (8 \| 16 \| 32 \| 64 \| 128 \| 256). If failed, returns NULL. +It takes an argument of type String and tries to parse it into Int (8 \| 16 \| 32 \| 64 \| 128 \| 256). If unsuccessful, returns `NULL`. **Example** @@ -93,7 +94,7 @@ Result: ## toInt(8\|16\|32\|64\|128\|256)OrDefault -It takes an argument of type String and tries to parse it into Int (8 \| 16 \| 32 \| 64 \| 128 \| 256). If failed, returns the default type value. +It takes an argument of type String and tries to parse it into Int (8 \| 16 \| 32 \| 64 \| 128 \| 256). If unsuccessful, returns the default type value. **Example** @@ -116,11 +117,11 @@ Result: Converts an input value to the [UInt](/docs/en/sql-reference/data-types/int-uint.md) data type. This function family includes: -- `toUInt8(expr)` — Results in the `UInt8` data type. -- `toUInt16(expr)` — Results in the `UInt16` data type. -- `toUInt32(expr)` — Results in the `UInt32` data type. -- `toUInt64(expr)` — Results in the `UInt64` data type. -- `toUInt256(expr)` — Results in the `UInt256` data type. +- `toUInt8(expr)` — Converts to a value of data type `UInt8`. +- `toUInt16(expr)` — Converts to a value of data type `UInt16`. +- `toUInt32(expr)` — Converts to a value of data type `UInt32`. +- `toUInt64(expr)` — Converts to a value of data type `UInt64`. +- `toUInt256(expr)` — Converts to a value of data type `UInt256`. **Arguments** @@ -128,7 +129,7 @@ Converts an input value to the [UInt](/docs/en/sql-reference/data-types/int-uint **Returned value** -Integer value in the `UInt8`, `UInt16`, `UInt32`, `UInt64` or `UInt256` data type. +- Integer value in the `UInt8`, `UInt16`, `UInt32`, `UInt64` or `UInt256` data type. Functions use [rounding towards zero](https://en.wikipedia.org/wiki/Rounding#Rounding_towards_zero), meaning they truncate fractional digits of numbers. @@ -166,26 +167,30 @@ Result: ## toDate -Converts the argument to `Date` data type. +Converts the argument to [Date](/docs/en/sql-reference/data-types/date.md) data type. + +If the argument is [DateTime](/docs/en/sql-reference/data-types/datetime.md) or [DateTime64](/docs/en/sql-reference/data-types/datetime64.md), it truncates it and leaves the date component of the DateTime: -If the argument is `DateTime` or `DateTime64`, it truncates it, leaving the date component of the DateTime: ```sql SELECT now() AS x, toDate(x) ``` + ```response ┌───────────────────x─┬─toDate(now())─┐ │ 2022-12-30 13:44:17 │ 2022-12-30 │ └─────────────────────┴───────────────┘ ``` -If the argument is a string, it is parsed as Date or DateTime. If it was parsed as DateTime, the date component is being used: +If the argument is a [String](/docs/en/sql-reference/data-types/string.md), it is parsed as [Date](/docs/en/sql-reference/data-types/date.md) or [DateTime](/docs/en/sql-reference/data-types/datetime.md). If it was parsed as [DateTime](/docs/en/sql-reference/data-types/datetime.md), the date component is being used: + ```sql SELECT toDate('2022-12-30') AS x, toTypeName(x) ``` + ```response ┌──────────x─┬─toTypeName(toDate('2022-12-30'))─┐ │ 2022-12-30 │ Date │ @@ -193,18 +198,20 @@ SELECT 1 row in set. Elapsed: 0.001 sec. ``` + ```sql SELECT toDate('2022-12-30 01:02:03') AS x, toTypeName(x) ``` + ```response ┌──────────x─┬─toTypeName(toDate('2022-12-30 01:02:03'))─┐ │ 2022-12-30 │ Date │ └────────────┴───────────────────────────────────────────┘ ``` -If the argument is a number and it looks like a UNIX timestamp (is greater than 65535), it is interpreted as a DateTime, then truncated to Date in the current timezone. The timezone argument can be specified as a second argument of the function. The truncation to Date depends on the timezone: +If the argument is a number and looks like a UNIX timestamp (is greater than 65535), it is interpreted as a [DateTime](/docs/en/sql-reference/data-types/datetime.md), then truncated to [Date](/docs/en/sql-reference/data-types/date.md) in the current timezone. The timezone argument can be specified as a second argument of the function. The truncation to [Date](/docs/en/sql-reference/data-types/date.md) depends on the timezone: ```sql SELECT @@ -217,6 +224,7 @@ SELECT toDate(ts) AS date_Amsterdam_2, toDate(ts, 'Pacific/Apia') AS date_Samoa_2 ``` + ```response Row 1: ────── @@ -232,7 +240,7 @@ date_Samoa_2: 2022-12-31 The example above demonstrates how the same UNIX timestamp can be interpreted as different dates in different time zones. -If the argument is a number and it is smaller than 65536, it is interpreted as the number of days since 1970-01-01 (a UNIX day) and converted to Date. It corresponds to the internal numeric representation of the `Date` data type. Example: +If the argument is a number and it is smaller than 65536, it is interpreted as the number of days since 1970-01-01 (the first UNIX day) and converted to [Date](/docs/en/sql-reference/data-types/date.md). It corresponds to the internal numeric representation of the `Date` data type. Example: ```sql SELECT toDate(12345) @@ -270,8 +278,6 @@ SELECT └─────────────────────┴───────────────┴─────────────┴─────────────────────┘ ``` -Have a nice day working with dates and times. - ## toDateOrZero ## toDateOrNull @@ -288,7 +294,7 @@ Have a nice day working with dates and times. ## toDate32 -Converts the argument to the [Date32](/docs/en/sql-reference/data-types/date32.md) data type. If the value is outside the range, `toDate32` returns the border values supported by `Date32`. If the argument has [Date](/docs/en/sql-reference/data-types/date.md) type, borders of `Date` are taken into account. +Converts the argument to the [Date32](/docs/en/sql-reference/data-types/date32.md) data type. If the value is outside the range, `toDate32` returns the border values supported by [Date32](/docs/en/sql-reference/data-types/date32.md). If the argument has [Date](/docs/en/sql-reference/data-types/date.md) type, it's borders are taken into account. **Syntax** @@ -302,9 +308,7 @@ toDate32(expr) **Returned value** -- A calendar date. - -Type: [Date32](/docs/en/sql-reference/data-types/date32.md). +- A calendar date. Type [Date32](/docs/en/sql-reference/data-types/date32.md). **Example** @@ -332,7 +336,7 @@ SELECT toDate32('1899-01-01') AS value, toTypeName(value); └────────────┴────────────────────────────────────┘ ``` -3. With `Date`-type argument: +3. With [Date](/docs/en/sql-reference/data-types/date.md) argument: ``` sql SELECT toDate32(toDate('1899-01-01')) AS value, toTypeName(value); @@ -386,7 +390,7 @@ Result: ## toDate32OrDefault -Converts the argument to the [Date32](/docs/en/sql-reference/data-types/date32.md) data type. If the value is outside the range, `toDate32OrDefault` returns the lower border value supported by `Date32`. If the argument has [Date](/docs/en/sql-reference/data-types/date.md) type, borders of `Date` are taken into account. Returns default value if an invalid argument is received. +Converts the argument to the [Date32](/docs/en/sql-reference/data-types/date32.md) data type. If the value is outside the range, `toDate32OrDefault` returns the lower border value supported by [Date32](/docs/en/sql-reference/data-types/date32.md). If the argument has [Date](/docs/en/sql-reference/data-types/date.md) type, it's borders are taken into account. Returns default value if an invalid argument is received. **Example** @@ -666,7 +670,7 @@ YYYY-MM-DD YYYY-MM-DD hh:mm:ss ``` -As an exception, if converting from UInt32, Int32, UInt64, or Int64 numeric types to Date, and if the number is greater than or equal to 65536, the number is interpreted as a Unix timestamp (and not as the number of days) and is rounded to the date. This allows support for the common occurrence of writing ‘toDate(unix_timestamp)’, which otherwise would be an error and would require writing the more cumbersome ‘toDate(toDateTime(unix_timestamp))’. +As an exception, if converting from UInt32, Int32, UInt64, or Int64 numeric types to Date, and if the number is greater than or equal to 65536, the number is interpreted as a Unix timestamp (and not as the number of days) and is rounded to the date. This allows support for the common occurrence of writing `toDate(unix_timestamp)`, which otherwise would be an error and would require writing the more cumbersome `toDate(toDateTime(unix_timestamp))`. Conversion between a date and a date with time is performed the natural way: by adding a null time or dropping the time. @@ -696,7 +700,7 @@ Also see the `toUnixTimestamp` function. ## toFixedString(s, N) -Converts a String type argument to a FixedString(N) type (a string with fixed length N). N must be a constant. +Converts a [String](/docs/en/sql-reference/data-types/string.md) type argument to a [FixedString(N)](/docs/en/sql-reference/data-types/fixedstring.md) type (a string of fixed length N). If the string has fewer bytes than N, it is padded with null bytes to the right. If the string has more bytes than N, an exception is thrown. ## toStringCutToZero(s) @@ -914,7 +918,7 @@ Result: └─────────────────────┴─────────────────────┴────────────┴─────────────────────┴───────────────────────────┘ ``` -Conversion to FixedString(N) only works for arguments of type [String](/docs/en/sql-reference/data-types/string.md) or [FixedString](/docs/en/sql-reference/data-types/fixedstring.md). +Conversion to [FixedString (N)](/docs/en/sql-reference/data-types/fixedstring.md) only works for arguments of type [String](/docs/en/sql-reference/data-types/string.md) or [FixedString](/docs/en/sql-reference/data-types/fixedstring.md). Type conversion to [Nullable](/docs/en/sql-reference/data-types/nullable.md) and back is supported. @@ -1174,7 +1178,7 @@ For all of the formats with separator the function parses months names expressed **Returned value** -- `time_string` converted to the `DateTime` data type. +- `time_string` converted to the [DateTime](/docs/en/sql-reference/data-types/datetime.md) data type. **Examples** @@ -1254,10 +1258,10 @@ Result: **See Also** -- [ISO 8601 announcement by @xkcd](https://xkcd.com/1179/) - [RFC 1123](https://tools.ietf.org/html/rfc1123) - [toDate](#todate) - [toDateTime](#todatetime) +- [ISO 8601 announcement by @xkcd](https://xkcd.com/1179/) ## parseDateTimeBestEffortUS From 4a746f32a54a9f7b10bb029532c8b2369db9a5b0 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Thu, 2 Mar 2023 17:12:15 +0400 Subject: [PATCH 414/841] Typos in the page `/docs/ru/sql-reference/statements/select/order-by.md` --- docs/ru/sql-reference/statements/select/order-by.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/ru/sql-reference/statements/select/order-by.md b/docs/ru/sql-reference/statements/select/order-by.md index 40efb862250..a3390501f2c 100644 --- a/docs/ru/sql-reference/statements/select/order-by.md +++ b/docs/ru/sql-reference/statements/select/order-by.md @@ -67,7 +67,7 @@ sidebar_label: ORDER BY ## Примеры с использованием сравнения {#collation-examples} -Пример с значениями типа [String](../../../sql-reference/data-types/string.md): +Пример со значениями типа [String](../../../sql-reference/data-types/string.md): Входная таблица: @@ -241,13 +241,13 @@ SELECT * FROM collate_test ORDER BY s ASC COLLATE 'en'; └───┴─────────┘ ``` -## Деталь реализации {#implementation-details} +## Детали реализации {#implementation-details} Если кроме `ORDER BY` указан также не слишком большой [LIMIT](limit.md), то расходуется меньше оперативки. Иначе расходуется количество памяти, пропорциональное количеству данных для сортировки. При распределённой обработке запроса, если отсутствует [GROUP BY](group-by.md), сортировка частично делается на удалённых серверах, а на сервере-инициаторе запроса производится слияние результатов. Таким образом, при распределённой сортировке, может сортироваться объём данных, превышающий размер памяти на одном сервере. Существует возможность выполнять сортировку во внешней памяти (с созданием временных файлов на диске), если оперативной памяти не хватает. Для этого предназначена настройка `max_bytes_before_external_sort`. Если она выставлена в 0 (по умолчанию), то внешняя сортировка выключена. Если она включена, то при достижении объёмом данных для сортировки указанного количества байт, накопленные данные будут отсортированы и сброшены во временный файл. После того, как все данные будут прочитаны, будет произведено слияние всех сортированных файлов и выдача результата. Файлы записываются в директорию `/var/lib/clickhouse/tmp/` (по умолчанию, может быть изменено с помощью параметра `tmp_path`) в конфиге. -На выполнение запроса может расходоваться больше памяти, чем `max_bytes_before_external_sort`. Поэтому, значение этой настройки должно быть существенно меньше, чем `max_memory_usage`. Для примера, если на вашем сервере 128 GB оперативки, и вам нужно выполнить один запрос, то выставите `max_memory_usage` в 100 GB, а `max_bytes_before_external_sort` в 80 GB. +На выполнение запроса может расходоваться больше памяти, чем `max_bytes_before_external_sort`. Поэтому значение этой настройки должно быть существенно меньше, чем `max_memory_usage`. Для примера, если на вашем сервере 128 GB оперативки, и вам нужно выполнить один запрос, то выставьте `max_memory_usage` в 100 GB, а `max_bytes_before_external_sort` в 80 GB. Внешняя сортировка работает существенно менее эффективно, чем сортировка в оперативке. @@ -366,9 +366,9 @@ ORDER BY └────────────┴────────────┴──────────┘ ``` -Поле `d1` не заполняется и использует значение по умолчанию. Поскольку у нас нет повторяющихся значений для `d2`, мы не можем правильно рассчитать последователность заполнения для `d1`. +Поле `d1` не заполняется и использует значение по умолчанию. Поскольку у нас нет повторяющихся значений для `d2`, мы не можем правильно рассчитать последовательность заполнения для `d1`. -Cледующий запрос (с измененым порядком в ORDER BY): +Cледующий запрос (с измененным порядком в ORDER BY): ```sql SELECT toDate((number * 10) * 86400) AS d1, From f57bb3d71ebe16ad542bc5e5ea6b6722cd873690 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Thu, 2 Mar 2023 17:14:52 +0400 Subject: [PATCH 415/841] Typo in the page `/docs/ru/sql-reference/statements/select/prewhere.md` --- docs/ru/sql-reference/statements/select/prewhere.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ru/sql-reference/statements/select/prewhere.md b/docs/ru/sql-reference/statements/select/prewhere.md index e37aec814ec..092370d4b3a 100644 --- a/docs/ru/sql-reference/statements/select/prewhere.md +++ b/docs/ru/sql-reference/statements/select/prewhere.md @@ -13,7 +13,7 @@ Prewhere — это оптимизация для более эффективн `PREWHERE` имеет смысл использовать, если есть условия фильтрации, которые использует меньшинство столбцов из тех, что есть в запросе, но достаточно сильно фильтрует данные. Таким образом, сокращается количество читаемых данных. -В запросе может быть одновременно указаны и `PREWHERE`, и `WHERE`. В этом случае `PREWHERE` предшествует `WHERE`. +В запросе могут быть одновременно указаны и `PREWHERE`, и `WHERE`. В этом случае `PREWHERE` предшествует `WHERE`. Если значение параметра [optimize_move_to_prewhere](../../../operations/settings/settings.md#optimize_move_to_prewhere) равно 0, эвристика по автоматическому перемещению части выражений из `WHERE` к `PREWHERE` отключается. From 00d28893e8e7f1020f2fb08935db014b7f52da82 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Thu, 2 Mar 2023 17:20:25 +0400 Subject: [PATCH 416/841] Typos in the page `/docs/ru/sql-reference/statements/select/sample.md` --- docs/ru/sql-reference/statements/select/sample.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ru/sql-reference/statements/select/sample.md b/docs/ru/sql-reference/statements/select/sample.md index e63479d6c27..decef52d06f 100644 --- a/docs/ru/sql-reference/statements/select/sample.md +++ b/docs/ru/sql-reference/statements/select/sample.md @@ -10,7 +10,7 @@ sidebar_label: SAMPLE Сэмплирование имеет смысл, когда: 1. Точность результата не важна, например, для оценочных расчетов. -2. Возможности аппаратной части не позволяют соответствовать строгим критериям. Например, время ответа должно быть \<100 мс. При этом точность расчета имеет более низкий приоритет. +2. Возможности аппаратной части не позволяют соответствовать строгим критериям. Например, время ответа должно быть <100 мс. При этом точность расчета имеет более низкий приоритет. 3. Точность результата участвует в бизнес-модели сервиса. Например, пользователи с бесплатной подпиской на сервис могут получать отчеты с меньшей точностью, чем пользователи с премиум подпиской. :::note "Внимание" From 39aff35ac3f77c8f99b279e5224911dbb9d6f861 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Thu, 2 Mar 2023 17:23:02 +0400 Subject: [PATCH 417/841] Typos in the page `/docs/ru/sql-reference/statements/select/union.md` --- docs/ru/sql-reference/statements/select/union.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ru/sql-reference/statements/select/union.md b/docs/ru/sql-reference/statements/select/union.md index 4dad63c2c7c..05d20100452 100644 --- a/docs/ru/sql-reference/statements/select/union.md +++ b/docs/ru/sql-reference/statements/select/union.md @@ -26,7 +26,7 @@ SELECT CounterID, 2 AS table, sum(Sign) AS c Результирующие столбцы сопоставляются по их индексу (порядку внутри `SELECT`). Если имена столбцов не совпадают, то имена для конечного результата берутся из первого запроса. -При объединении выполняет приведение типов. Например, если два запроса имеют одно и то же поле с не-`Nullable` и `Nullable` совместимыми типами, полученные в результате `UNION` данные будут иметь `Nullable` тип. +При объединении выполняется приведение типов. Например, если два запроса имеют одно и то же поле с не-`Nullable` и `Nullable` совместимыми типами, полученные в результате `UNION` данные будут иметь `Nullable` тип. Запросы, которые являются частью `UNION`, могут быть заключены в круглые скобки. [ORDER BY](order-by.md) и [LIMIT](limit.md) применяются к отдельным запросам, а не к конечному результату. Если вам нужно применить преобразование к конечному результату, вы можете разместить все объединенные с помощью `UNION` запросы в подзапрос в секции [FROM](from.md). From c4ae17e4950c14007ed19e7ad5daba821c2c87f2 Mon Sep 17 00:00:00 2001 From: Constantine Peresypkin Date: Thu, 2 Mar 2023 14:23:22 +0100 Subject: [PATCH 418/841] fix black --- tests/integration/test_http_handlers_config/test.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/integration/test_http_handlers_config/test.py b/tests/integration/test_http_handlers_config/test.py index 50dfd2a480c..1b347f6271f 100644 --- a/tests/integration/test_http_handlers_config/test.py +++ b/tests/integration/test_http_handlers_config/test.py @@ -147,11 +147,13 @@ def test_predefined_query_handler(): assert b"max_final_threads\t1\nmax_threads\t1\n" == res2.content assert "application/generic+one" == res2.headers["content-type"] - cluster.instance.query("CREATE TABLE test_table (id UInt32, data String) Engine=TinyLog") + cluster.instance.query( + "CREATE TABLE test_table (id UInt32, data String) Engine=TinyLog" + ) res3 = cluster.instance.http_request( "test_predefined_handler_post_body?id=100", method="POST", - data="TEST".encode("utf8") + data="TEST".encode("utf8"), ) assert res3.status_code == 200 assert cluster.instance.query("SELECT * FROM test_table") == "100\tTEST\n" From d42a95a6c5ada969e69030c07e9ae1ee01b17e42 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Thu, 2 Mar 2023 17:25:49 +0400 Subject: [PATCH 419/841] Type in the page `/docs/ru/sql-reference/statements/select/with.md` --- docs/ru/sql-reference/statements/select/with.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ru/sql-reference/statements/select/with.md b/docs/ru/sql-reference/statements/select/with.md index 58f380b0a85..c4121a6569a 100644 --- a/docs/ru/sql-reference/statements/select/with.md +++ b/docs/ru/sql-reference/statements/select/with.md @@ -5,7 +5,7 @@ sidebar_label: WITH # Секция WITH {#with-clause} -Clickhouse поддерживает [Общие табличные выражения](https://ru.wikipedia.org/wiki/Иерархические_и_рекурсивные_запросы_в_SQL), то есть позволяет использовать результаты выражений из секции `WITH` в остальной части `SELECT` запроса. Именованные подзапросы могут быть включены в текущий и дочерний контекст запроса в тех местах, где разрешены табличные объекты. Рекурсия предотвращается путем скрытия общего табличного выражения текущего уровня из выражения `WITH`. +ClickHouse поддерживает [Общие табличные выражения](https://ru.wikipedia.org/wiki/Иерархические_и_рекурсивные_запросы_в_SQL), то есть позволяет использовать результаты выражений из секции `WITH` в остальной части `SELECT` запроса. Именованные подзапросы могут быть включены в текущий и дочерний контекст запроса в тех местах, где разрешены табличные объекты. Рекурсия предотвращается путем скрытия общего табличного выражения текущего уровня из выражения `WITH`. ## Синтаксис From 740aeaba1fc18ad8667a0bbf7ffefca12b5fc9e4 Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Thu, 2 Mar 2023 13:36:47 +0000 Subject: [PATCH 420/841] Apply some CTAD --- src/Common/CancelToken.cpp | 8 +++---- src/Common/ConcurrentBoundedQueue.h | 14 ++++++------ src/Common/DateLUT.cpp | 2 +- src/Common/StatusInfo.h | 4 ++-- src/Common/TLDListsHolder.cpp | 4 ++-- src/Common/mysqlxx/Pool.cpp | 6 ++--- src/Common/mysqlxx/PoolFactory.cpp | 4 ++-- src/Common/mysqlxx/PoolWithFailover.cpp | 2 +- src/Coordination/InMemoryLogStore.cpp | 22 +++++++++---------- src/Coordination/KeeperStateMachine.cpp | 2 +- src/Coordination/SummingStateMachine.cpp | 10 ++++----- src/Databases/MySQL/DatabaseMySQL.cpp | 18 +++++++-------- .../PostgreSQL/DatabasePostgreSQL.cpp | 18 +++++++-------- src/Databases/SQLite/DatabaseSQLite.cpp | 10 ++++----- src/Interpreters/Context.cpp | 2 +- .../ExternalLoaderXMLConfigRepository.cpp | 4 ++-- src/Interpreters/GraceHashJoin.cpp | 2 +- src/Interpreters/JIT/CHJIT.cpp | 6 ++--- src/Loggers/OwnSplitChannel.cpp | 4 ++-- .../Impl/ParallelFormattingOutputFormat.cpp | 8 +++---- .../Formats/Impl/ParallelParsingInputFormat.h | 2 +- .../CreateSetAndFilterOnTheFlyStep.cpp | 2 +- src/Processors/Sources/ShellCommandSource.cpp | 4 ++-- src/Server/PrometheusMetricsWriter.cpp | 2 +- .../FileLog/FileLogDirectoryWatcher.cpp | 16 +++++++------- src/Storages/FileLog/StorageFileLog.cpp | 4 ++-- src/Storages/Hive/StorageHive.cpp | 4 ++-- .../MergeTree/ReplicatedMergeTreeQueue.cpp | 6 ++--- src/Storages/StorageDictionary.cpp | 8 +++---- src/Storages/StorageMergeTree.cpp | 4 ++-- 30 files changed, 101 insertions(+), 101 deletions(-) diff --git a/src/Common/CancelToken.cpp b/src/Common/CancelToken.cpp index 53f71fee144..077d60c7efa 100644 --- a/src/Common/CancelToken.cpp +++ b/src/Common/CancelToken.cpp @@ -35,26 +35,26 @@ namespace void CancelToken::Registry::insert(CancelToken * token) { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); threads[token->thread_id] = token; } void CancelToken::Registry::remove(CancelToken * token) { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); threads.erase(token->thread_id); } void CancelToken::Registry::signal(UInt64 tid) { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); if (auto it = threads.find(tid); it != threads.end()) it->second->signalImpl(); } void CancelToken::Registry::signal(UInt64 tid, int code, const String & message) { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); if (auto it = threads.find(tid); it != threads.end()) it->second->signalImpl(code, message); } diff --git a/src/Common/ConcurrentBoundedQueue.h b/src/Common/ConcurrentBoundedQueue.h index fd4a2d5790b..d3abf86c817 100644 --- a/src/Common/ConcurrentBoundedQueue.h +++ b/src/Common/ConcurrentBoundedQueue.h @@ -163,14 +163,14 @@ public: /// Returns size of queue size_t size() const { - std::lock_guard lock(queue_mutex); + std::lock_guard lock(queue_mutex); return queue.size(); } /// Returns if queue is empty bool empty() const { - std::lock_guard lock(queue_mutex); + std::lock_guard lock(queue_mutex); return queue.empty(); } @@ -184,7 +184,7 @@ public: bool was_finished_before = false; { - std::lock_guard lock(queue_mutex); + std::lock_guard lock(queue_mutex); if (is_finished) return true; @@ -202,14 +202,14 @@ public: /// Returns if queue is finished bool isFinished() const { - std::lock_guard lock(queue_mutex); + std::lock_guard lock(queue_mutex); return is_finished; } /// Returns if queue is finished and empty bool isFinishedAndEmpty() const { - std::lock_guard lock(queue_mutex); + std::lock_guard lock(queue_mutex); return is_finished && queue.empty(); } @@ -217,7 +217,7 @@ public: void clear() { { - std::lock_guard lock(queue_mutex); + std::lock_guard lock(queue_mutex); if (is_finished) return; @@ -233,7 +233,7 @@ public: void clearAndFinish() { { - std::lock_guard lock(queue_mutex); + std::lock_guard lock(queue_mutex); std::queue empty_queue; queue.swap(empty_queue); diff --git a/src/Common/DateLUT.cpp b/src/Common/DateLUT.cpp index ae6127670e5..a31ece00c0b 100644 --- a/src/Common/DateLUT.cpp +++ b/src/Common/DateLUT.cpp @@ -149,7 +149,7 @@ DateLUT::DateLUT() const DateLUTImpl & DateLUT::getImplementation(const std::string & time_zone) const { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); auto it = impls.emplace(time_zone, nullptr).first; if (!it->second) diff --git a/src/Common/StatusInfo.h b/src/Common/StatusInfo.h index 99d6a6f23f5..9aa185cd0c3 100644 --- a/src/Common/StatusInfo.h +++ b/src/Common/StatusInfo.h @@ -26,13 +26,13 @@ namespace CurrentStatusInfo inline void set(Status status, Key key, Int8 value) { - std::lock_guard lock(locks[status]); + std::lock_guard lock(locks[status]); values[status][key] = value; } inline void unset(Status status, Key key) { - std::lock_guard lock(locks[status]); + std::lock_guard lock(locks[status]); values[status].erase(key); } } diff --git a/src/Common/TLDListsHolder.cpp b/src/Common/TLDListsHolder.cpp index c493a88010b..623b88f83a5 100644 --- a/src/Common/TLDListsHolder.cpp +++ b/src/Common/TLDListsHolder.cpp @@ -109,14 +109,14 @@ size_t TLDListsHolder::parseAndAddTldList(const std::string & name, const std::s } size_t tld_list_size = tld_list.size(); - std::lock_guard lock(tld_lists_map_mutex); + std::lock_guard lock(tld_lists_map_mutex); tld_lists_map.insert(std::make_pair(name, std::move(tld_list))); return tld_list_size; } const TLDList & TLDListsHolder::getTldList(const std::string & name) { - std::lock_guard lock(tld_lists_map_mutex); + std::lock_guard lock(tld_lists_map_mutex); auto it = tld_lists_map.find(name); if (it == tld_lists_map.end()) throw Exception(ErrorCodes::TLD_LIST_NOT_FOUND, "TLD list {} does not exist", name); diff --git a/src/Common/mysqlxx/Pool.cpp b/src/Common/mysqlxx/Pool.cpp index bee62a0af2e..ba74700d4bc 100644 --- a/src/Common/mysqlxx/Pool.cpp +++ b/src/Common/mysqlxx/Pool.cpp @@ -130,7 +130,7 @@ Pool::Pool(const Poco::Util::AbstractConfiguration & cfg, const std::string & co Pool::~Pool() { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); for (auto & connection : connections) delete static_cast(connection); @@ -187,7 +187,7 @@ Pool::Entry Pool::get(uint64_t wait_timeout) Pool::Entry Pool::tryGet() { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); initialize(); @@ -229,7 +229,7 @@ void Pool::removeConnection(Connection* connection) { logger.trace("(%s): Removing connection.", getDescription()); - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); if (connection) { if (connection->ref_count > 0) diff --git a/src/Common/mysqlxx/PoolFactory.cpp b/src/Common/mysqlxx/PoolFactory.cpp index 1d2f9fc74c7..5fae934a400 100644 --- a/src/Common/mysqlxx/PoolFactory.cpp +++ b/src/Common/mysqlxx/PoolFactory.cpp @@ -76,7 +76,7 @@ PoolWithFailover PoolFactory::get(const Poco::Util::AbstractConfiguration & conf const std::string & config_name, unsigned default_connections, unsigned max_connections, size_t max_tries) { - std::lock_guard lock(impl->mutex); + std::lock_guard lock(impl->mutex); if (auto entry = impl->pools.find(config_name); entry != impl->pools.end()) { return *(entry->second); @@ -106,7 +106,7 @@ PoolWithFailover PoolFactory::get(const Poco::Util::AbstractConfiguration & conf void PoolFactory::reset() { - std::lock_guard lock(impl->mutex); + std::lock_guard lock(impl->mutex); impl->pools.clear(); impl->pools_by_ids.clear(); } diff --git a/src/Common/mysqlxx/PoolWithFailover.cpp b/src/Common/mysqlxx/PoolWithFailover.cpp index 0ed231cdf8d..cd9b9e6ec31 100644 --- a/src/Common/mysqlxx/PoolWithFailover.cpp +++ b/src/Common/mysqlxx/PoolWithFailover.cpp @@ -123,7 +123,7 @@ PoolWithFailover::PoolWithFailover(const PoolWithFailover & other) PoolWithFailover::Entry PoolWithFailover::get() { Poco::Util::Application & app = Poco::Util::Application::instance(); - std::lock_guard locker(mutex); + std::lock_guard locker(mutex); /// If we cannot connect to some replica due to pool overflow, than we will wait and connect. PoolPtr * full_pool = nullptr; diff --git a/src/Coordination/InMemoryLogStore.cpp b/src/Coordination/InMemoryLogStore.cpp index b7bccdf588e..ca240584a54 100644 --- a/src/Coordination/InMemoryLogStore.cpp +++ b/src/Coordination/InMemoryLogStore.cpp @@ -27,7 +27,7 @@ uint64_t InMemoryLogStore::start_index() const uint64_t InMemoryLogStore::next_slot() const { - std::lock_guard l(logs_lock); + std::lock_guard l(logs_lock); // Exclude the dummy entry. return start_idx + logs.size() - 1; } @@ -35,7 +35,7 @@ uint64_t InMemoryLogStore::next_slot() const nuraft::ptr InMemoryLogStore::last_entry() const { uint64_t next_idx = next_slot(); - std::lock_guard lock(logs_lock); + std::lock_guard lock(logs_lock); auto entry = logs.find(next_idx - 1); if (entry == logs.end()) entry = logs.find(0); @@ -47,7 +47,7 @@ uint64_t InMemoryLogStore::append(nuraft::ptr & entry) { ptr clone = makeClone(entry); - std::lock_guard l(logs_lock); + std::lock_guard l(logs_lock); uint64_t idx = start_idx + logs.size() - 1; logs[idx] = clone; return idx; @@ -58,7 +58,7 @@ void InMemoryLogStore::write_at(uint64_t index, nuraft::ptr & nuraft::ptr clone = makeClone(entry); // Discard all logs equal to or greater than `index. - std::lock_guard l(logs_lock); + std::lock_guard l(logs_lock); auto itr = logs.lower_bound(index); while (itr != logs.end()) itr = logs.erase(itr); @@ -76,7 +76,7 @@ nuraft::ptr>> InMemoryLogStore::log_e { nuraft::ptr src = nullptr; { - std::lock_guard l(logs_lock); + std::lock_guard l(logs_lock); auto entry = logs.find(i); if (entry == logs.end()) { @@ -94,7 +94,7 @@ nuraft::ptr InMemoryLogStore::entry_at(uint64_t index) { nuraft::ptr src = nullptr; { - std::lock_guard l(logs_lock); + std::lock_guard l(logs_lock); auto entry = logs.find(index); if (entry == logs.end()) entry = logs.find(0); @@ -107,7 +107,7 @@ uint64_t InMemoryLogStore::term_at(uint64_t index) { uint64_t term = 0; { - std::lock_guard l(logs_lock); + std::lock_guard l(logs_lock); auto entry = logs.find(index); if (entry == logs.end()) entry = logs.find(0); @@ -125,7 +125,7 @@ nuraft::ptr InMemoryLogStore::pack(uint64_t index, Int32 cnt) { ptr le = nullptr; { - std::lock_guard l(logs_lock); + std::lock_guard l(logs_lock); le = logs[ii]; } assert(le.get()); @@ -162,13 +162,13 @@ void InMemoryLogStore::apply_pack(uint64_t index, nuraft::buffer & pack) nuraft::ptr le = nuraft::log_entry::deserialize(*buf_local); { - std::lock_guard l(logs_lock); + std::lock_guard l(logs_lock); logs[cur_idx] = le; } } { - std::lock_guard l(logs_lock); + std::lock_guard l(logs_lock); auto entry = logs.upper_bound(0); if (entry != logs.end()) start_idx = entry->first; @@ -179,7 +179,7 @@ void InMemoryLogStore::apply_pack(uint64_t index, nuraft::buffer & pack) bool InMemoryLogStore::compact(uint64_t last_log_index) { - std::lock_guard l(logs_lock); + std::lock_guard l(logs_lock); for (uint64_t ii = start_idx; ii <= last_log_index; ++ii) { auto entry = logs.find(ii); diff --git a/src/Coordination/KeeperStateMachine.cpp b/src/Coordination/KeeperStateMachine.cpp index 68f6cfde01e..ccee058ba5c 100644 --- a/src/Coordination/KeeperStateMachine.cpp +++ b/src/Coordination/KeeperStateMachine.cpp @@ -341,7 +341,7 @@ void KeeperStateMachine::rollbackRequest(const KeeperStorage::RequestForSession nuraft::ptr KeeperStateMachine::last_snapshot() { /// Just return the latest snapshot. - std::lock_guard lock(snapshots_lock); + std::lock_guard lock(snapshots_lock); return latest_snapshot_meta; } diff --git a/src/Coordination/SummingStateMachine.cpp b/src/Coordination/SummingStateMachine.cpp index 4151b727744..4c21f1d8658 100644 --- a/src/Coordination/SummingStateMachine.cpp +++ b/src/Coordination/SummingStateMachine.cpp @@ -37,7 +37,7 @@ nuraft::ptr SummingStateMachine::commit(const uint64_t log_idx, bool SummingStateMachine::apply_snapshot(nuraft::snapshot & s) { - std::lock_guard ll(snapshots_lock); + std::lock_guard ll(snapshots_lock); auto entry = snapshots.find(s.get_last_log_idx()); if (entry == snapshots.end()) return false; @@ -50,7 +50,7 @@ bool SummingStateMachine::apply_snapshot(nuraft::snapshot & s) nuraft::ptr SummingStateMachine::last_snapshot() { // Just return the latest snapshot. - std::lock_guard ll(snapshots_lock); + std::lock_guard ll(snapshots_lock); auto entry = snapshots.rbegin(); if (entry == snapshots.rend()) return nullptr; @@ -100,7 +100,7 @@ void SummingStateMachine::save_logical_snp_obj( nuraft::buffer_serializer bs(data); int64_t local_value = static_cast(bs.get_u64()); - std::lock_guard ll(snapshots_lock); + std::lock_guard ll(snapshots_lock); auto entry = snapshots.find(s.get_last_log_idx()); assert(entry != snapshots.end()); entry->second->value = local_value; @@ -118,7 +118,7 @@ int SummingStateMachine::read_logical_snp_obj( { nuraft::ptr ctx = nullptr; { - std::lock_guard ll(snapshots_lock); + std::lock_guard ll(snapshots_lock); auto entry = snapshots.find(s.get_last_log_idx()); if (entry == snapshots.end()) { @@ -155,7 +155,7 @@ void SummingStateMachine::create_snapshot( nuraft::async_result::handler_type & when_done) { { - std::lock_guard ll(snapshots_lock); + std::lock_guard ll(snapshots_lock); createSnapshotInternal(s); } nuraft::ptr except(nullptr); diff --git a/src/Databases/MySQL/DatabaseMySQL.cpp b/src/Databases/MySQL/DatabaseMySQL.cpp index 85944319999..cfb64ba6959 100644 --- a/src/Databases/MySQL/DatabaseMySQL.cpp +++ b/src/Databases/MySQL/DatabaseMySQL.cpp @@ -82,7 +82,7 @@ DatabaseMySQL::DatabaseMySQL( bool DatabaseMySQL::empty() const { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); fetchTablesIntoLocalCache(getContext()); @@ -99,7 +99,7 @@ bool DatabaseMySQL::empty() const DatabaseTablesIteratorPtr DatabaseMySQL::getTablesIterator(ContextPtr local_context, const FilterByNameFunction & filter_by_table_name) const { Tables tables; - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); fetchTablesIntoLocalCache(local_context); @@ -117,7 +117,7 @@ bool DatabaseMySQL::isTableExist(const String & name, ContextPtr local_context) StoragePtr DatabaseMySQL::tryGetTable(const String & mysql_table_name, ContextPtr local_context) const { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); fetchTablesIntoLocalCache(local_context); @@ -129,7 +129,7 @@ StoragePtr DatabaseMySQL::tryGetTable(const String & mysql_table_name, ContextPt ASTPtr DatabaseMySQL::getCreateTableQueryImpl(const String & table_name, ContextPtr local_context, bool throw_on_error) const { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); fetchTablesIntoLocalCache(local_context); @@ -175,7 +175,7 @@ ASTPtr DatabaseMySQL::getCreateTableQueryImpl(const String & table_name, Context time_t DatabaseMySQL::getObjectMetadataModificationTime(const String & table_name) const { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); fetchTablesIntoLocalCache(getContext()); @@ -360,7 +360,7 @@ void DatabaseMySQL::cleanOutdatedTables() void DatabaseMySQL::attachTable(ContextPtr /* context_ */, const String & table_name, const StoragePtr & storage, const String &) { - std::lock_guard lock{mutex}; + std::lock_guard lock{mutex}; if (!local_tables_cache.contains(table_name)) throw Exception(ErrorCodes::UNKNOWN_TABLE, "Cannot attach table {}.{} because it does not exist.", @@ -383,7 +383,7 @@ void DatabaseMySQL::attachTable(ContextPtr /* context_ */, const String & table_ StoragePtr DatabaseMySQL::detachTable(ContextPtr /* context */, const String & table_name) { - std::lock_guard lock{mutex}; + std::lock_guard lock{mutex}; if (remove_or_detach_tables.contains(table_name)) throw Exception(ErrorCodes::TABLE_IS_DROPPED, "Table {}.{} is dropped", @@ -405,7 +405,7 @@ String DatabaseMySQL::getMetadataPath() const void DatabaseMySQL::loadStoredObjects(ContextMutablePtr, LoadingStrictnessLevel /*mode*/, bool /* skip_startup_tables */) { - std::lock_guard lock{mutex}; + std::lock_guard lock{mutex}; fs::directory_iterator iter(getMetadataPath()); for (fs::directory_iterator end; iter != end; ++iter) @@ -421,7 +421,7 @@ void DatabaseMySQL::loadStoredObjects(ContextMutablePtr, LoadingStrictnessLevel void DatabaseMySQL::detachTablePermanently(ContextPtr, const String & table_name) { - std::lock_guard lock{mutex}; + std::lock_guard lock{mutex}; fs::path remove_flag = fs::path(getMetadataPath()) / (escapeForFileName(table_name) + suffix); diff --git a/src/Databases/PostgreSQL/DatabasePostgreSQL.cpp b/src/Databases/PostgreSQL/DatabasePostgreSQL.cpp index f2d57968baa..8c267ea929b 100644 --- a/src/Databases/PostgreSQL/DatabasePostgreSQL.cpp +++ b/src/Databases/PostgreSQL/DatabasePostgreSQL.cpp @@ -76,7 +76,7 @@ String DatabasePostgreSQL::formatTableName(const String & table_name, bool quote bool DatabasePostgreSQL::empty() const { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); auto connection_holder = pool->get(); auto tables_list = fetchPostgreSQLTablesList(connection_holder->get(), configuration.schema); @@ -91,7 +91,7 @@ bool DatabasePostgreSQL::empty() const DatabaseTablesIteratorPtr DatabasePostgreSQL::getTablesIterator(ContextPtr local_context, const FilterByNameFunction & /* filter_by_table_name */) const { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); Tables tables; /// Do not allow to throw here, because this might be, for example, a query to system.tables. @@ -154,7 +154,7 @@ bool DatabasePostgreSQL::checkPostgresTable(const String & table_name) const bool DatabasePostgreSQL::isTableExist(const String & table_name, ContextPtr /* context */) const { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); if (detached_or_dropped.contains(table_name)) return false; @@ -165,7 +165,7 @@ bool DatabasePostgreSQL::isTableExist(const String & table_name, ContextPtr /* c StoragePtr DatabasePostgreSQL::tryGetTable(const String & table_name, ContextPtr local_context) const { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); if (!detached_or_dropped.contains(table_name)) return fetchTable(table_name, local_context, false); @@ -210,7 +210,7 @@ StoragePtr DatabasePostgreSQL::fetchTable(const String & table_name, ContextPtr, void DatabasePostgreSQL::attachTable(ContextPtr /* context_ */, const String & table_name, const StoragePtr & storage, const String &) { - std::lock_guard lock{mutex}; + std::lock_guard lock{mutex}; if (!checkPostgresTable(table_name)) throw Exception(ErrorCodes::UNKNOWN_TABLE, @@ -235,7 +235,7 @@ void DatabasePostgreSQL::attachTable(ContextPtr /* context_ */, const String & t StoragePtr DatabasePostgreSQL::detachTable(ContextPtr /* context_ */, const String & table_name) { - std::lock_guard lock{mutex}; + std::lock_guard lock{mutex}; if (detached_or_dropped.contains(table_name)) throw Exception(ErrorCodes::TABLE_IS_DROPPED, "Cannot detach table {}. It is already dropped/detached", getTableNameForLogs(table_name)); @@ -266,7 +266,7 @@ void DatabasePostgreSQL::createTable(ContextPtr local_context, const String & ta void DatabasePostgreSQL::dropTable(ContextPtr, const String & table_name, bool /* sync */) { - std::lock_guard lock{mutex}; + std::lock_guard lock{mutex}; if (!checkPostgresTable(table_name)) throw Exception(ErrorCodes::UNKNOWN_TABLE, "Cannot drop table {} because it does not exist", getTableNameForLogs(table_name)); @@ -293,7 +293,7 @@ void DatabasePostgreSQL::drop(ContextPtr /*context*/) void DatabasePostgreSQL::loadStoredObjects(ContextMutablePtr /* context */, LoadingStrictnessLevel /*mode*/, bool /* skip_startup_tables */) { { - std::lock_guard lock{mutex}; + std::lock_guard lock{mutex}; fs::directory_iterator iter(getMetadataPath()); /// Check for previously dropped tables @@ -314,7 +314,7 @@ void DatabasePostgreSQL::loadStoredObjects(ContextMutablePtr /* context */, Load void DatabasePostgreSQL::removeOutdatedTables() { - std::lock_guard lock{mutex}; + std::lock_guard lock{mutex}; auto connection_holder = pool->get(); auto actual_tables = fetchPostgreSQLTablesList(connection_holder->get(), configuration.schema); diff --git a/src/Databases/SQLite/DatabaseSQLite.cpp b/src/Databases/SQLite/DatabaseSQLite.cpp index 653e22487f0..1cba9d1dc26 100644 --- a/src/Databases/SQLite/DatabaseSQLite.cpp +++ b/src/Databases/SQLite/DatabaseSQLite.cpp @@ -40,14 +40,14 @@ DatabaseSQLite::DatabaseSQLite( bool DatabaseSQLite::empty() const { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); return fetchTablesList().empty(); } DatabaseTablesIteratorPtr DatabaseSQLite::getTablesIterator(ContextPtr local_context, const IDatabase::FilterByNameFunction &) const { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); Tables tables; auto table_names = fetchTablesList(); @@ -120,14 +120,14 @@ bool DatabaseSQLite::checkSQLiteTable(const String & table_name) const bool DatabaseSQLite::isTableExist(const String & table_name, ContextPtr) const { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); return checkSQLiteTable(table_name); } StoragePtr DatabaseSQLite::tryGetTable(const String & table_name, ContextPtr local_context) const { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); return fetchTable(table_name, local_context, false); } @@ -175,7 +175,7 @@ ASTPtr DatabaseSQLite::getCreateTableQueryImpl(const String & table_name, Contex { StoragePtr storage; { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); storage = fetchTable(table_name, local_context, false); } if (!storage) diff --git a/src/Interpreters/Context.cpp b/src/Interpreters/Context.cpp index 33505e41789..d1b09707bca 100644 --- a/src/Interpreters/Context.cpp +++ b/src/Interpreters/Context.cpp @@ -1289,7 +1289,7 @@ void Context::addQueryAccessInfo( if (isGlobalContext()) throw Exception(ErrorCodes::LOGICAL_ERROR, "Global context cannot have query access info"); - std::lock_guard lock(query_access_info.mutex); + std::lock_guard lock(query_access_info.mutex); query_access_info.databases.emplace(quoted_database_name); query_access_info.tables.emplace(full_quoted_table_name); for (const auto & column_name : column_names) diff --git a/src/Interpreters/ExternalLoaderXMLConfigRepository.cpp b/src/Interpreters/ExternalLoaderXMLConfigRepository.cpp index ba4d9beffe3..8b9584f1242 100644 --- a/src/Interpreters/ExternalLoaderXMLConfigRepository.cpp +++ b/src/Interpreters/ExternalLoaderXMLConfigRepository.cpp @@ -34,7 +34,7 @@ std::set ExternalLoaderXMLConfigRepository::getAllLoadablesDefiniti std::unordered_set patterns_copy; { - std::lock_guard lock(patterns_mutex); + std::lock_guard lock(patterns_mutex); patterns_copy = patterns; } @@ -71,7 +71,7 @@ std::set ExternalLoaderXMLConfigRepository::getAllLoadablesDefiniti void ExternalLoaderXMLConfigRepository::updatePatterns(const std::unordered_set & patterns_) { - std::lock_guard lock(patterns_mutex); + std::lock_guard lock(patterns_mutex); if (patterns == patterns_) return; diff --git a/src/Interpreters/GraceHashJoin.cpp b/src/Interpreters/GraceHashJoin.cpp index 51d4c7d1f4b..79a825a752f 100644 --- a/src/Interpreters/GraceHashJoin.cpp +++ b/src/Interpreters/GraceHashJoin.cpp @@ -52,7 +52,7 @@ namespace Block read() { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); if (eof) return {}; diff --git a/src/Interpreters/JIT/CHJIT.cpp b/src/Interpreters/JIT/CHJIT.cpp index 96c02ad539e..63fe4f44f5f 100644 --- a/src/Interpreters/JIT/CHJIT.cpp +++ b/src/Interpreters/JIT/CHJIT.cpp @@ -352,7 +352,7 @@ CHJIT::~CHJIT() = default; CHJIT::CompiledModule CHJIT::compileModule(std::function compile_function) { - std::lock_guard lock(jit_lock); + std::lock_guard lock(jit_lock); auto module = createModuleForCompilation(); compile_function(*module); @@ -426,7 +426,7 @@ CHJIT::CompiledModule CHJIT::compileModule(std::unique_ptr module) void CHJIT::deleteCompiledModule(const CHJIT::CompiledModule & module) { - std::lock_guard lock(jit_lock); + std::lock_guard lock(jit_lock); auto module_it = module_identifier_to_memory_manager.find(module.identifier); if (module_it == module_identifier_to_memory_manager.end()) @@ -438,7 +438,7 @@ void CHJIT::deleteCompiledModule(const CHJIT::CompiledModule & module) void CHJIT::registerExternalSymbol(const std::string & symbol_name, void * address) { - std::lock_guard lock(jit_lock); + std::lock_guard lock(jit_lock); symbol_resolver->registerSymbol(symbol_name, address); } diff --git a/src/Loggers/OwnSplitChannel.cpp b/src/Loggers/OwnSplitChannel.cpp index 7974d5212e1..047f6caffcd 100644 --- a/src/Loggers/OwnSplitChannel.cpp +++ b/src/Loggers/OwnSplitChannel.cpp @@ -137,7 +137,7 @@ void OwnSplitChannel::logSplit(const Poco::Message & msg) std::shared_ptr text_log_locked{}; { - std::lock_guard lock(text_log_mutex); + std::lock_guard lock(text_log_mutex); text_log_locked = text_log.lock(); } if (text_log_locked) @@ -155,7 +155,7 @@ void OwnSplitChannel::addChannel(Poco::AutoPtr channel, const std #ifndef WITHOUT_TEXT_LOG void OwnSplitChannel::addTextLog(std::shared_ptr log, int max_priority) { - std::lock_guard lock(text_log_mutex); + std::lock_guard lock(text_log_mutex); text_log = log; text_log_max_priority.store(max_priority, std::memory_order_relaxed); } diff --git a/src/Processors/Formats/Impl/ParallelFormattingOutputFormat.cpp b/src/Processors/Formats/Impl/ParallelFormattingOutputFormat.cpp index db4bb422cb1..35d4dd9ddcd 100644 --- a/src/Processors/Formats/Impl/ParallelFormattingOutputFormat.cpp +++ b/src/Processors/Formats/Impl/ParallelFormattingOutputFormat.cpp @@ -15,7 +15,7 @@ namespace DB collector_finished.wait(); { - std::lock_guard lock(collector_thread_mutex); + std::lock_guard lock(collector_thread_mutex); if (collector_thread.joinable()) collector_thread.join(); } @@ -80,7 +80,7 @@ namespace DB } { - std::lock_guard lock(collector_thread_mutex); + std::lock_guard lock(collector_thread_mutex); if (collector_thread.joinable()) collector_thread.join(); } @@ -137,7 +137,7 @@ namespace DB { /// Notify other threads. - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); unit.status = READY_TO_INSERT; writer_condvar.notify_all(); } @@ -227,7 +227,7 @@ namespace DB unit.actual_memory_size = out_buffer.getActualSize(); { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); unit.status = READY_TO_READ; collector_condvar.notify_all(); } diff --git a/src/Processors/Formats/Impl/ParallelParsingInputFormat.h b/src/Processors/Formats/Impl/ParallelParsingInputFormat.h index 252b6ec3f81..03fb2d650dc 100644 --- a/src/Processors/Formats/Impl/ParallelParsingInputFormat.h +++ b/src/Processors/Formats/Impl/ParallelParsingInputFormat.h @@ -292,7 +292,7 @@ private: { /// Additionally notify condvars - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); segmentator_condvar.notify_all(); reader_condvar.notify_all(); } diff --git a/src/Processors/QueryPlan/CreateSetAndFilterOnTheFlyStep.cpp b/src/Processors/QueryPlan/CreateSetAndFilterOnTheFlyStep.cpp index 86b64d1519c..53dcec9ef0a 100644 --- a/src/Processors/QueryPlan/CreateSetAndFilterOnTheFlyStep.cpp +++ b/src/Processors/QueryPlan/CreateSetAndFilterOnTheFlyStep.cpp @@ -62,7 +62,7 @@ public: { assert(!rhs_ports.first->isConnected() && !rhs_ports.second->isConnected()); - std::lock_guard lock(mux); + std::lock_guard lock(mux); if (input_port || output_port) { assert(input_port && output_port); diff --git a/src/Processors/Sources/ShellCommandSource.cpp b/src/Processors/Sources/ShellCommandSource.cpp index 4983fa047dc..ed8f9b41e78 100644 --- a/src/Processors/Sources/ShellCommandSource.cpp +++ b/src/Processors/Sources/ShellCommandSource.cpp @@ -274,7 +274,7 @@ namespace } catch (...) { - std::lock_guard lock(send_data_lock); + std::lock_guard lock(send_data_lock); exception_during_send_data = std::current_exception(); } }); @@ -387,7 +387,7 @@ namespace void rethrowExceptionDuringSendDataIfNeeded() { - std::lock_guard lock(send_data_lock); + std::lock_guard lock(send_data_lock); if (exception_during_send_data) { command_is_invalid = true; diff --git a/src/Server/PrometheusMetricsWriter.cpp b/src/Server/PrometheusMetricsWriter.cpp index 843d1e64463..abf2a2c0b6b 100644 --- a/src/Server/PrometheusMetricsWriter.cpp +++ b/src/Server/PrometheusMetricsWriter.cpp @@ -125,7 +125,7 @@ void PrometheusMetricsWriter::write(WriteBuffer & wb) const { for (size_t i = 0, end = CurrentStatusInfo::end(); i < end; ++i) { - std::lock_guard lock(CurrentStatusInfo::locks[static_cast(i)]); + std::lock_guard lock(CurrentStatusInfo::locks[static_cast(i)]); std::string metric_name{CurrentStatusInfo::getName(static_cast(i))}; std::string metric_doc{CurrentStatusInfo::getDocumentation(static_cast(i))}; diff --git a/src/Storages/FileLog/FileLogDirectoryWatcher.cpp b/src/Storages/FileLog/FileLogDirectoryWatcher.cpp index 192721f9f3c..3c5342a1e83 100644 --- a/src/Storages/FileLog/FileLogDirectoryWatcher.cpp +++ b/src/Storages/FileLog/FileLogDirectoryWatcher.cpp @@ -12,7 +12,7 @@ FileLogDirectoryWatcher::FileLogDirectoryWatcher(const std::string & path_, Stor FileLogDirectoryWatcher::Events FileLogDirectoryWatcher::getEventsAndReset() { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); Events res; res.swap(events); return res; @@ -20,7 +20,7 @@ FileLogDirectoryWatcher::Events FileLogDirectoryWatcher::getEventsAndReset() FileLogDirectoryWatcher::Error FileLogDirectoryWatcher::getErrorAndReset() { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); Error old_error = error; error = {}; return old_error; @@ -33,7 +33,7 @@ const std::string & FileLogDirectoryWatcher::getPath() const void FileLogDirectoryWatcher::onItemAdded(DirectoryWatcherBase::DirectoryEvent ev) { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); EventInfo info{ev.event, "onItemAdded"}; std::string event_path = ev.path; @@ -51,7 +51,7 @@ void FileLogDirectoryWatcher::onItemAdded(DirectoryWatcherBase::DirectoryEvent e void FileLogDirectoryWatcher::onItemRemoved(DirectoryWatcherBase::DirectoryEvent ev) { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); EventInfo info{ev.event, "onItemRemoved"}; std::string event_path = ev.path; @@ -74,7 +74,7 @@ void FileLogDirectoryWatcher::onItemRemoved(DirectoryWatcherBase::DirectoryEvent /// because it is equal to just record and handle one MODIY event void FileLogDirectoryWatcher::onItemModified(DirectoryWatcherBase::DirectoryEvent ev) { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); auto event_path = ev.path; EventInfo info{ev.event, "onItemModified"}; @@ -97,7 +97,7 @@ void FileLogDirectoryWatcher::onItemModified(DirectoryWatcherBase::DirectoryEven void FileLogDirectoryWatcher::onItemMovedFrom(DirectoryWatcherBase::DirectoryEvent ev) { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); EventInfo info{ev.event, "onItemMovedFrom"}; std::string event_path = ev.path; @@ -114,7 +114,7 @@ void FileLogDirectoryWatcher::onItemMovedFrom(DirectoryWatcherBase::DirectoryEve void FileLogDirectoryWatcher::onItemMovedTo(DirectoryWatcherBase::DirectoryEvent ev) { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); EventInfo info{ev.event, "onItemMovedTo"}; std::string event_path = ev.path; @@ -131,7 +131,7 @@ void FileLogDirectoryWatcher::onItemMovedTo(DirectoryWatcherBase::DirectoryEvent void FileLogDirectoryWatcher::onError(Exception e) { - std::lock_guard lock(mutex); + std::lock_guard lock(mutex); LOG_ERROR(log, "Error happened during watching directory: {}", error.error_msg); error.has_error = true; error.error_msg = e.message(); diff --git a/src/Storages/FileLog/StorageFileLog.cpp b/src/Storages/FileLog/StorageFileLog.cpp index 7838db881e9..dae6f6a7ca9 100644 --- a/src/Storages/FileLog/StorageFileLog.cpp +++ b/src/Storages/FileLog/StorageFileLog.cpp @@ -312,7 +312,7 @@ Pipe StorageFileLog::read( if (mv_attached) throw Exception(ErrorCodes::QUERY_NOT_ALLOWED, "Cannot read from StorageFileLog with attached materialized views"); - std::lock_guard lock(file_infos_mutex); + std::lock_guard lock(file_infos_mutex); if (running_streams) { throw Exception(ErrorCodes::CANNOT_SELECT, "Another select query is running on this table, need to wait it finish."); @@ -659,7 +659,7 @@ void StorageFileLog::threadFunc() bool StorageFileLog::streamToViews() { - std::lock_guard lock(file_infos_mutex); + std::lock_guard lock(file_infos_mutex); if (running_streams) { LOG_INFO(log, "Another select query is running on this table, need to wait it finish."); diff --git a/src/Storages/Hive/StorageHive.cpp b/src/Storages/Hive/StorageHive.cpp index 13477a46bb5..85e6341eb5a 100644 --- a/src/Storages/Hive/StorageHive.cpp +++ b/src/Storages/Hive/StorageHive.cpp @@ -856,7 +856,7 @@ HiveFiles StorageHive::collectHiveFiles( = collectHiveFilesFromPartition(partition, query_info, hive_table_metadata, fs, context_, prune_level); if (!hive_files_in_partition.empty()) { - std::lock_guard lock(hive_files_mutex); + std::lock_guard lock(hive_files_mutex); hit_parttions_num += 1; if (hive_max_query_partitions > 0 && hit_parttions_num > hive_max_query_partitions) { @@ -882,7 +882,7 @@ HiveFiles StorageHive::collectHiveFiles( auto hive_file = getHiveFileIfNeeded(file_info, {}, query_info, hive_table_metadata, context_, prune_level); if (hive_file) { - std::lock_guard lock(hive_files_mutex); + std::lock_guard lock(hive_files_mutex); hive_files.push_back(hive_file); } }); diff --git a/src/Storages/MergeTree/ReplicatedMergeTreeQueue.cpp b/src/Storages/MergeTree/ReplicatedMergeTreeQueue.cpp index 125529e7b94..20dbaa73812 100644 --- a/src/Storages/MergeTree/ReplicatedMergeTreeQueue.cpp +++ b/src/Storages/MergeTree/ReplicatedMergeTreeQueue.cpp @@ -2316,7 +2316,7 @@ bool ReplicatedMergeTreeMergePredicate::canMergeSinglePart( return false; } - std::lock_guard lock(queue.state_mutex); + std::lock_guard lock(queue.state_mutex); /// We look for containing parts in queue.virtual_parts (and not in prev_virtual_parts) because queue.virtual_parts is newer /// and it is guaranteed that it will contain all merges assigned before this object is constructed. @@ -2334,7 +2334,7 @@ bool ReplicatedMergeTreeMergePredicate::canMergeSinglePart( bool ReplicatedMergeTreeMergePredicate::partParticipatesInReplaceRange(const MergeTreeData::DataPartPtr & part, String * out_reason) const { - std::lock_guard lock(queue.state_mutex); + std::lock_guard lock(queue.state_mutex); for (const auto & entry : queue.queue) { if (entry->type != ReplicatedMergeTreeLogEntry::REPLACE_RANGE) @@ -2457,7 +2457,7 @@ bool ReplicatedMergeTreeMergePredicate::isGoingToBeDropped(const MergeTreePartIn String ReplicatedMergeTreeMergePredicate::getCoveringVirtualPart(const String & part_name) const { - std::lock_guard lock(queue.state_mutex); + std::lock_guard lock(queue.state_mutex); return queue.virtual_parts.getContainingPart(MergeTreePartInfo::fromPartName(part_name, queue.format_version)); } diff --git a/src/Storages/StorageDictionary.cpp b/src/Storages/StorageDictionary.cpp index 5d1f08771be..b0b8aba38c7 100644 --- a/src/Storages/StorageDictionary.cpp +++ b/src/Storages/StorageDictionary.cpp @@ -208,13 +208,13 @@ void StorageDictionary::removeDictionaryConfigurationFromRepository() Poco::Timestamp StorageDictionary::getUpdateTime() const { - std::lock_guard lock(dictionary_config_mutex); + std::lock_guard lock(dictionary_config_mutex); return update_time; } LoadablesConfigurationPtr StorageDictionary::getConfiguration() const { - std::lock_guard lock(dictionary_config_mutex); + std::lock_guard lock(dictionary_config_mutex); return configuration; } @@ -234,7 +234,7 @@ void StorageDictionary::renameInMemory(const StorageID & new_table_id) assert(old_table_id.uuid == new_table_id.uuid || move_to_atomic || move_to_ordinary); { - std::lock_guard lock(dictionary_config_mutex); + std::lock_guard lock(dictionary_config_mutex); configuration->setString("dictionary.database", new_table_id.database_name); configuration->setString("dictionary.name", new_table_id.table_name); @@ -301,7 +301,7 @@ void StorageDictionary::alter(const AlterCommands & params, ContextPtr alter_con dictionary_non_const->setDictionaryComment(new_comment); } - std::lock_guard lock(dictionary_config_mutex); + std::lock_guard lock(dictionary_config_mutex); configuration->setString("dictionary.comment", new_comment); } diff --git a/src/Storages/StorageMergeTree.cpp b/src/Storages/StorageMergeTree.cpp index 8210ef93172..aadd7b8c20a 100644 --- a/src/Storages/StorageMergeTree.cpp +++ b/src/Storages/StorageMergeTree.cpp @@ -732,7 +732,7 @@ CancellationCode StorageMergeTree::killMutation(const String & mutation_id) to_kill->removeFile(); LOG_TRACE(log, "Cancelled part mutations and removed mutation file {}", mutation_id); { - std::lock_guard lock(mutation_wait_mutex); + std::lock_guard lock(mutation_wait_mutex); mutation_wait_event.notify_all(); } @@ -1306,7 +1306,7 @@ size_t StorageMergeTree::clearOldMutations(bool truncate) std::vector mutations_to_delete; { - std::lock_guard lock(currently_processing_in_background_mutex); + std::lock_guard lock(currently_processing_in_background_mutex); if (current_mutations_by_version.size() <= finished_mutations_to_keep) return 0; From 10610cbdf475d47af8f301bac415c436404c16dd Mon Sep 17 00:00:00 2001 From: kssenii Date: Thu, 2 Mar 2023 14:46:20 +0100 Subject: [PATCH 421/841] Fix test --- src/Disks/getOrCreateDiskFromAST.cpp | 5 ----- src/Parsers/FieldFromAST.cpp | 6 +++--- tests/queries/0_stateless/02344_show_caches.reference | 1 + 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/Disks/getOrCreateDiskFromAST.cpp b/src/Disks/getOrCreateDiskFromAST.cpp index 9abc4a7d413..637acff7b95 100644 --- a/src/Disks/getOrCreateDiskFromAST.cpp +++ b/src/Disks/getOrCreateDiskFromAST.cpp @@ -33,11 +33,6 @@ namespace auto disk_name = DiskSelector::TMP_INTERNAL_DISK_PREFIX + toString(sipHash128(disk_setting_string.data(), disk_setting_string.size())); - LOG_TRACE( - &Poco::Logger::get("getOrCreateDiskFromDiskAST"), - "Using disk name `{}` for custom disk {}", - disk_name, disk_setting_string); - auto result_disk = context->getOrCreateDisk(disk_name, [&](const DisksMap & disks_map) -> DiskPtr { const auto * function_args_expr = assert_cast(function.arguments.get()); const auto & function_args = function_args_expr->children; diff --git a/src/Parsers/FieldFromAST.cpp b/src/Parsers/FieldFromAST.cpp index b2251599441..a81bf45a8be 100644 --- a/src/Parsers/FieldFromAST.cpp +++ b/src/Parsers/FieldFromAST.cpp @@ -32,7 +32,7 @@ bool FieldFromASTImpl::isSecret() const return isDiskFunction(ast); } -class DiskConfigurationHider +class DiskConfigurationMasker { public: struct Data {}; @@ -50,7 +50,7 @@ public: auto is_secret_arg = [](const std::string & arg_name) { /// We allow to not hide type of the disk, e.g. disk(type = s3, ...) - /// and also nested disk, e.g. disk(type = cache, disk = disk(type = s3, ...)) + /// and also nested disk, e.g. disk = 'disk_name' return arg_name != "type" && arg_name != "disk"; }; @@ -81,7 +81,7 @@ public: }; /// Visits children first. -using HideDiskConfigurationVisitor = InDepthNodeVisitor; +using HideDiskConfigurationVisitor = InDepthNodeVisitor; String FieldFromASTImpl::toString(bool show_secrets) const { diff --git a/tests/queries/0_stateless/02344_show_caches.reference b/tests/queries/0_stateless/02344_show_caches.reference index 2ee4f902ba1..b321319a309 100644 --- a/tests/queries/0_stateless/02344_show_caches.reference +++ b/tests/queries/0_stateless/02344_show_caches.reference @@ -10,5 +10,6 @@ local_cache s3_cache_6 s3_cache_small local_cache_2 +__tmp_internal_324081342946782869538999598488311137423 local_cache_3 s3_cache_multi_2 From 29f0f4e74517e43eb2d9d8b1d76be08efaa0ba6a Mon Sep 17 00:00:00 2001 From: Dmitry Date: Thu, 2 Mar 2023 17:54:16 +0400 Subject: [PATCH 422/841] Typos in the page `/docs/ru/sql-reference/statements/create/table.md` --- docs/ru/sql-reference/statements/create/table.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/ru/sql-reference/statements/create/table.md b/docs/ru/sql-reference/statements/create/table.md index c29d575cac1..7a930b529ed 100644 --- a/docs/ru/sql-reference/statements/create/table.md +++ b/docs/ru/sql-reference/statements/create/table.md @@ -301,7 +301,7 @@ ClickHouse поддерживает временные таблицы со сл - Временные таблицы исчезают после завершения сессии, в том числе при обрыве соединения. - Временная таблица использует только модуль памяти. - Невозможно указать базу данных для временной таблицы. Она создается вне баз данных. -- Невозможно создать временную таблицу распределнным DDL запросом на всех серверах кластера (с опцией `ON CLUSTER`): такая таблица существует только в рамках существующей сессии. +- Невозможно создать временную таблицу распределённым DDL запросом на всех серверах кластера (с опцией `ON CLUSTER`): такая таблица существует только в рамках существующей сессии. - Если временная таблица имеет то же имя, что и некоторая другая, то, при упоминании в запросе без указания БД, будет использована временная таблица. - При распределённой обработке запроса, используемые в запросе временные таблицы, передаются на удалённые серверы. @@ -344,7 +344,9 @@ REPLACE TABLE myOldTable SELECT * FROM myOldTable WHERE CounterID <12345; ### Синтаксис +```sql {CREATE [OR REPLACE]|REPLACE} TABLE [db.]table_name +``` Для данного запроса можно использовать любые варианты синтаксиса запроса `CREATE`. Запрос `REPLACE` для несуществующей таблицы вызовет ошибку. From 9722d8a4030f3aca302ae495cd6a2750e8eb5248 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Thu, 2 Mar 2023 14:17:48 +0000 Subject: [PATCH 423/841] Rename variable --- src/IO/ReadWriteBufferFromHTTP.h | 70 +++++++++++++++++++------------- 1 file changed, 42 insertions(+), 28 deletions(-) diff --git a/src/IO/ReadWriteBufferFromHTTP.h b/src/IO/ReadWriteBufferFromHTTP.h index edf7b3f5f95..5c5285c5260 100644 --- a/src/IO/ReadWriteBufferFromHTTP.h +++ b/src/IO/ReadWriteBufferFromHTTP.h @@ -147,7 +147,7 @@ namespace detail size_t getOffset() const { return getRangeBegin() + offset_from_begin_pos; } - template + template std::istream * callImpl(UpdatableSessionPtr & current_session, Poco::URI uri_, Poco::Net::HTTPResponse & response, const std::string & method_) { // With empty path poco will send "POST HTTP/1.1" its bug. @@ -164,7 +164,7 @@ namespace detail request.set(header, value); std::optional range; - if constexpr (use_initial_range) + if constexpr (for_object_info) { if (withPartialContent(initial_read_range)) range = initial_read_range; @@ -202,7 +202,9 @@ namespace detail auto result_istr = receiveResponse(*sess, request, response, true); response.getCookies(cookies); - if constexpr (!use_initial_range) + /// we can fetch object info while the request is being processed + /// and we don't want to override any context used by it + if constexpr (!for_object_info) content_encoding = response.get("Content-Encoding", ""); return result_istr; @@ -222,7 +224,7 @@ namespace detail return *file_size; Poco::Net::HTTPResponse response; - getHeadResponse(response); + getHeadResponse(response); if (response.hasContentLength()) { @@ -251,14 +253,13 @@ namespace detail InitializeError initialization_error = InitializeError::NONE; private: - template void getHeadResponse(Poco::Net::HTTPResponse & response) { for (size_t i = 0; i < settings.http_max_tries; ++i) { try { - callWithRedirects(response, Poco::Net::HTTPRequest::HTTP_HEAD); + callWithRedirects(response, Poco::Net::HTTPRequest::HTTP_HEAD); break; } catch (const Poco::Exception & e) @@ -377,17 +378,19 @@ namespace detail return location_uri; } - template + template void callWithRedirects(Poco::Net::HTTPResponse & response, const String & method_, bool throw_on_all_errors = false) { UpdatableSessionPtr current_session = nullptr; - if (use_initial_range) + /// we can fetch object info while the request is being processed + /// and we don't want to override any context used by it + if constexpr (for_object_info) current_session = session->clone(uri); else current_session = session; - call(current_session, response, method_, throw_on_all_errors); + call(current_session, response, method_, throw_on_all_errors); Poco::URI prev_uri = uri; while (isRedirect(response.getStatus())) @@ -399,42 +402,53 @@ namespace detail current_session->updateSession(uri_redirect); - auto result_istr = callImpl(current_session, uri_redirect, response, method); - if (!use_initial_range) + /// we can fetch object info while the request is being processed + /// and we don't want to override any context used by it + auto result_istr = callImpl(current_session, uri_redirect, response, method); + if constexpr (!for_object_info) istr = result_istr; } } - template + template void call(UpdatableSessionPtr & current_session, Poco::Net::HTTPResponse & response, const String & method_, bool throw_on_all_errors = false) { try { - auto result_istr = callImpl(current_session, saved_uri_redirect ? *saved_uri_redirect : uri, response, method_); - if (!use_initial_range) + /// we can fetch object info while the request is being processed + /// and we don't want to override any context used by it + auto result_istr = callImpl(current_session, saved_uri_redirect ? *saved_uri_redirect : uri, response, method_); + if constexpr (!for_object_info) istr = result_istr; } catch (...) { - if (throw_on_all_errors) + /// we can fetch object info while the request is being processed + /// and we don't want to override any context used by it + if constexpr (for_object_info) { throw; } - - auto http_status = response.getStatus(); - - if (http_status == Poco::Net::HTTPResponse::HTTPStatus::HTTP_NOT_FOUND && http_skip_not_found_url) - { - initialization_error = InitializeError::SKIP_NOT_FOUND_URL; - } - else if (!isRetriableError(http_status)) - { - initialization_error = InitializeError::NON_RETRYABLE_ERROR; - exception = std::current_exception(); - } else { - throw; + if (throw_on_all_errors) + throw; + + auto http_status = response.getStatus(); + + if (http_status == Poco::Net::HTTPResponse::HTTPStatus::HTTP_NOT_FOUND && http_skip_not_found_url) + { + initialization_error = InitializeError::SKIP_NOT_FOUND_URL; + } + else if (!isRetriableError(http_status)) + { + initialization_error = InitializeError::NON_RETRYABLE_ERROR; + exception = std::current_exception(); + } + else + { + throw; + } } } } From cf245538b91923a97c617a997e2bc68d01b51d75 Mon Sep 17 00:00:00 2001 From: AndyB Date: Thu, 2 Mar 2023 14:31:38 +0000 Subject: [PATCH 424/841] checker fix --- tests/integration/test_log_levels_update/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/test_log_levels_update/test.py b/tests/integration/test_log_levels_update/test.py index 842c7914eaa..4b83b6431fc 100644 --- a/tests/integration/test_log_levels_update/test.py +++ b/tests/integration/test_log_levels_update/test.py @@ -63,4 +63,4 @@ def test_log_levels_update(start_cluster): log = get_log(node) assert len(log) > 0 - assert not re.search("(|)", log) + assert not re.search("", log) From fdf8a418f517eeb739aa22e6afb0d7392a212a17 Mon Sep 17 00:00:00 2001 From: Anton Popov Date: Wed, 1 Mar 2023 20:37:20 +0000 Subject: [PATCH 425/841] better interface --- src/DataTypes/DataTypeTuple.cpp | 14 -------------- src/DataTypes/DataTypeTuple.h | 1 - src/DataTypes/IDataType.cpp | 9 --------- src/DataTypes/IDataType.h | 1 - src/DataTypes/Serializations/SerializationInfo.cpp | 9 +++++++++ src/DataTypes/Serializations/SerializationInfo.h | 2 ++ .../Serializations/SerializationInfoTuple.cpp | 14 ++++++++++++++ .../Serializations/SerializationInfoTuple.h | 2 +- src/Storages/MergeTree/MutateTask.cpp | 2 +- 9 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/DataTypes/DataTypeTuple.cpp b/src/DataTypes/DataTypeTuple.cpp index 1e28af3ee54..768f87fe3d4 100644 --- a/src/DataTypes/DataTypeTuple.cpp +++ b/src/DataTypes/DataTypeTuple.cpp @@ -312,20 +312,6 @@ MutableSerializationInfoPtr DataTypeTuple::createSerializationInfo(const Seriali return std::make_shared(std::move(infos), names, settings); } -MutableSerializationInfoPtr DataTypeTuple::cloneSerializationInfo(const SerializationInfo & old_info, const SerializationInfo::Settings & settings) const -{ - const auto & old_info_tuple = assert_cast(old_info); - assert(old_info_tuple.getNumElements() == elems.size()); - - MutableSerializationInfos infos; - infos.reserve(elems.size()); - for (size_t i = 0; i < elems.size(); ++i) - infos.push_back(elems[i]->cloneSerializationInfo(*old_info_tuple.getElementInfo(i), settings)); - - return std::make_shared(std::move(infos), names, settings); -} - - SerializationInfoPtr DataTypeTuple::getSerializationInfo(const IColumn & column) const { if (const auto * column_const = checkAndGetColumn(&column)) diff --git a/src/DataTypes/DataTypeTuple.h b/src/DataTypes/DataTypeTuple.h index 9f3860f78db..152f21015f5 100644 --- a/src/DataTypes/DataTypeTuple.h +++ b/src/DataTypes/DataTypeTuple.h @@ -57,7 +57,6 @@ public: SerializationPtr doGetDefaultSerialization() const override; SerializationPtr getSerialization(const SerializationInfo & info) const override; MutableSerializationInfoPtr createSerializationInfo(const SerializationInfo::Settings & settings) const override; - MutableSerializationInfoPtr cloneSerializationInfo(const SerializationInfo & old_info, const SerializationInfo::Settings & settings) const override; SerializationInfoPtr getSerializationInfo(const IColumn & column) const override; const DataTypePtr & getElement(size_t i) const { return elems[i]; } diff --git a/src/DataTypes/IDataType.cpp b/src/DataTypes/IDataType.cpp index 5cd0b6f659c..e0612fbbf36 100644 --- a/src/DataTypes/IDataType.cpp +++ b/src/DataTypes/IDataType.cpp @@ -191,15 +191,6 @@ MutableSerializationInfoPtr IDataType::createSerializationInfo(const Serializati return std::make_shared(ISerialization::Kind::DEFAULT, settings); } -MutableSerializationInfoPtr IDataType::cloneSerializationInfo(const SerializationInfo & old_info, const SerializationInfo::Settings & settings) const -{ - auto new_kind = old_info.getKind(); - if (new_kind == ISerialization::Kind::SPARSE && !supportsSparseSerialization()) - new_kind = ISerialization::Kind::DEFAULT; - - return std::make_shared(new_kind, settings); -} - SerializationInfoPtr IDataType::getSerializationInfo(const IColumn & column) const { if (const auto * column_const = checkAndGetColumn(&column)) diff --git a/src/DataTypes/IDataType.h b/src/DataTypes/IDataType.h index 5bd12f84d04..e5bdbeca69e 100644 --- a/src/DataTypes/IDataType.h +++ b/src/DataTypes/IDataType.h @@ -104,7 +104,6 @@ public: Names getSubcolumnNames() const; virtual MutableSerializationInfoPtr createSerializationInfo(const SerializationInfo::Settings & settings) const; - virtual MutableSerializationInfoPtr cloneSerializationInfo(const SerializationInfo & old_info, const SerializationInfo::Settings & settings) const; virtual SerializationInfoPtr getSerializationInfo(const IColumn & column) const; /// TODO: support more types. diff --git a/src/DataTypes/Serializations/SerializationInfo.cpp b/src/DataTypes/Serializations/SerializationInfo.cpp index 313fa1fa235..af3330d867d 100644 --- a/src/DataTypes/Serializations/SerializationInfo.cpp +++ b/src/DataTypes/Serializations/SerializationInfo.cpp @@ -97,6 +97,15 @@ MutableSerializationInfoPtr SerializationInfo::clone() const return std::make_shared(kind, settings, data); } +std::shared_ptr SerializationInfo::createWithType(const IDataType & type, const Settings & new_settings) const +{ + auto new_kind = kind; + if (new_kind == ISerialization::Kind::SPARSE && !type.supportsSparseSerialization()) + new_kind = ISerialization::Kind::DEFAULT; + + return std::make_shared(new_kind, new_settings); +} + void SerializationInfo::serialializeKindBinary(WriteBuffer & out) const { writeBinary(static_cast(kind), out); diff --git a/src/DataTypes/Serializations/SerializationInfo.h b/src/DataTypes/Serializations/SerializationInfo.h index 7f73d053f1b..560156980db 100644 --- a/src/DataTypes/Serializations/SerializationInfo.h +++ b/src/DataTypes/Serializations/SerializationInfo.h @@ -8,6 +8,7 @@ namespace DB { +class ReadBuffer; class ReadBuffer; class WriteBuffer; class NamesAndTypesList; @@ -59,6 +60,7 @@ public: virtual void replaceData(const SerializationInfo & other); virtual std::shared_ptr clone() const; + virtual std::shared_ptr createWithType(const IDataType & type, const Settings & new_settings) const; virtual void serialializeKindBinary(WriteBuffer & out) const; virtual void deserializeFromKindsBinary(ReadBuffer & in); diff --git a/src/DataTypes/Serializations/SerializationInfoTuple.cpp b/src/DataTypes/Serializations/SerializationInfoTuple.cpp index 1a9639a1566..5724dd7a5c3 100644 --- a/src/DataTypes/Serializations/SerializationInfoTuple.cpp +++ b/src/DataTypes/Serializations/SerializationInfoTuple.cpp @@ -97,6 +97,20 @@ MutableSerializationInfoPtr SerializationInfoTuple::clone() const return std::make_shared(std::move(elems_cloned), names, settings); } +MutableSerializationInfoPtr SerializationInfoTuple::createWithType(const IDataType & type, const Settings & new_settings) const +{ + const auto & type_tuple = assert_cast(type); + const auto & tuple_elements = type_tuple.getElements(); + assert(elems.size() == tuple_elements.size()); + + MutableSerializationInfos infos; + infos.reserve(elems.size()); + for (size_t i = 0; i < elems.size(); ++i) + infos.push_back(elems[i]->createWithType(*tuple_elements[i], new_settings)); + + return std::make_shared(std::move(infos), names, new_settings); +} + void SerializationInfoTuple::serialializeKindBinary(WriteBuffer & out) const { SerializationInfo::serialializeKindBinary(out); diff --git a/src/DataTypes/Serializations/SerializationInfoTuple.h b/src/DataTypes/Serializations/SerializationInfoTuple.h index ef288948b9a..4bcd14d34cb 100644 --- a/src/DataTypes/Serializations/SerializationInfoTuple.h +++ b/src/DataTypes/Serializations/SerializationInfoTuple.h @@ -19,6 +19,7 @@ public: void replaceData(const SerializationInfo & other) override; MutableSerializationInfoPtr clone() const override; + MutableSerializationInfoPtr createWithType(const IDataType & type, const Settings & new_settings) const override; void serialializeKindBinary(WriteBuffer & out) const override; void deserializeFromKindsBinary(ReadBuffer & in) override; @@ -26,7 +27,6 @@ public: Poco::JSON::Object toJSON() const override; void fromJSON(const Poco::JSON::Object & object) override; - size_t getNumElements() const { return elems.size(); } const MutableSerializationInfoPtr & getElementInfo(size_t i) const { return elems[i]; } ISerialization::Kind getElementKind(size_t i) const { return elems[i]->getKind(); } diff --git a/src/Storages/MergeTree/MutateTask.cpp b/src/Storages/MergeTree/MutateTask.cpp index 9420b7bebaf..1239befdd67 100644 --- a/src/Storages/MergeTree/MutateTask.cpp +++ b/src/Storages/MergeTree/MutateTask.cpp @@ -244,7 +244,7 @@ getColumnsForNewDataPart( continue; } - new_info = new_type->cloneSerializationInfo(*old_info, settings); + new_info = old_info->createWithType(*new_type, settings); new_serialization_infos.emplace(new_name, std::move(new_info)); } From df41a83ddb1f83618ce1ad666545cf6138444df3 Mon Sep 17 00:00:00 2001 From: Yakov Olkhovskiy Date: Thu, 2 Mar 2023 14:49:49 +0000 Subject: [PATCH 426/841] set uid gid to file's original --- .../decompressor.cpp | 30 +++++-------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/utils/self-extracting-executable/decompressor.cpp b/utils/self-extracting-executable/decompressor.cpp index 5f2a769dcdb..39fe552dfac 100644 --- a/utils/self-extracting-executable/decompressor.cpp +++ b/utils/self-extracting-executable/decompressor.cpp @@ -168,23 +168,9 @@ int decompress(char * input, char * output, off_t start, off_t end, size_t max_n return 0; } -bool getSudoIDs(uid_t &sudo_uid, uid_t &sudo_gid) +bool isSudo() { - sudo_uid = 0; - sudo_gid = 0; - - if (getuid() || geteuid() || getenv("SUDO_USER") == nullptr || getenv("SUDO_UID") == nullptr || getenv("SUDO_GID") == nullptr) - return false; - - char * str_end; - long id = strtol(getenv("SUDO_UID"), &str_end, 10); - if (*str_end == 0) - sudo_uid = static_cast(id); - id = strtol(getenv("SUDO_GID"), &str_end, 10); - if (*str_end == 0) - sudo_gid = static_cast(id); - - return true; + return getuid() == 0 && geteuid() == 0 && getenv("SUDO_USER") && getenv("SUDO_UID") && getenv("SUDO_GID"); } /// Read data about files and decomrpess them. @@ -238,9 +224,7 @@ int decompressFiles(int input_fd, char * path, char * name, bool & have_compress return 1; } - uid_t sudo_uid = 0; - uid_t sudo_gid = 0; - getSudoIDs(sudo_uid, sudo_gid); + bool is_sudo = isSudo(); FileData file_info; /// Decompress files with appropriate file names @@ -342,8 +326,8 @@ int decompressFiles(int input_fd, char * path, char * name, bool & have_compress if (0 != close(output_fd)) perror("close"); - if (sudo_uid && sudo_gid) - chown(file_name, sudo_uid, sudo_gid); + if (is_sudo) + chown(file_name, info_in.st_uid, info_in.st_gid); } if (0 != munmap(input, info_in.st_size)) @@ -557,8 +541,8 @@ int main(int/* argc*/, char* argv[]) return 1; } - if (uid_t sudo_uid = 0, sudo_gid = 0; getSudoIDs(sudo_uid, sudo_gid)) - chown(static_cast(self), sudo_uid, sudo_gid); + if (isSudo()) + chown(static_cast(self), input_info.st_uid, input_info.st_gid); if (has_exec) { From b782cba80966fd97efef32481aca3c8664b5758a Mon Sep 17 00:00:00 2001 From: vdimir Date: Wed, 1 Mar 2023 20:00:59 +0000 Subject: [PATCH 427/841] Add settings http_wait_end_of_query and http_response_buffer_size --- docs/en/interfaces/http.md | 1 + src/Core/Settings.h | 2 ++ src/Server/HTTPHandler.cpp | 5 +++-- tests/clickhouse-test | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/en/interfaces/http.md b/docs/en/interfaces/http.md index 9af6df0c87d..32f323a63d5 100644 --- a/docs/en/interfaces/http.md +++ b/docs/en/interfaces/http.md @@ -309,6 +309,7 @@ The HTTP interface allows passing external data (external temporary tables) for ## Response Buffering {#response-buffering} You can enable response buffering on the server-side. The `buffer_size` and `wait_end_of_query` URL parameters are provided for this purpose. +Also settings `http_response_buffer_size` and `http_wait_end_of_query` can be used. `buffer_size` determines the number of bytes in the result to buffer in the server memory. If a result body is larger than this threshold, the buffer is written to the HTTP channel, and the remaining data is sent directly to the HTTP channel. diff --git a/src/Core/Settings.h b/src/Core/Settings.h index a65f2ccb60f..e5b098fd98e 100644 --- a/src/Core/Settings.h +++ b/src/Core/Settings.h @@ -252,6 +252,8 @@ class IColumn; M(Bool, send_progress_in_http_headers, false, "Send progress notifications using X-ClickHouse-Progress headers. Some clients do not support high amount of HTTP headers (Python requests in particular), so it is disabled by default.", 0) \ \ M(UInt64, http_headers_progress_interval_ms, 100, "Do not send HTTP headers X-ClickHouse-Progress more frequently than at each specified interval.", 0) \ + M(Bool, http_wait_end_of_query, false, "Enable HTTP response buffering on the server-side.", 0) \ + M(UInt64, http_response_buffer_size, false, "The number of bytes to buffer in the server memory before sending a HTTP response to the client or flushing to disk (when http_wait_end_of_query is enabled).", 0) \ \ M(Bool, fsync_metadata, true, "Do fsync after changing metadata for tables and databases (.sql files). Could be disabled in case of poor latency on server with high load of DDL queries and high load of disk subsystem.", 0) \ \ diff --git a/src/Server/HTTPHandler.cpp b/src/Server/HTTPHandler.cpp index 702743ef1f0..865095b3d65 100644 --- a/src/Server/HTTPHandler.cpp +++ b/src/Server/HTTPHandler.cpp @@ -588,11 +588,12 @@ void HTTPHandler::processQuery( /// At least, we should postpone sending of first buffer_size result bytes size_t buffer_size_total = std::max( - params.getParsed("buffer_size", DBMS_DEFAULT_BUFFER_SIZE), static_cast(DBMS_DEFAULT_BUFFER_SIZE)); + params.getParsed("buffer_size", context->getSettingsRef().http_response_buffer_size), + static_cast(DBMS_DEFAULT_BUFFER_SIZE)); /// If it is specified, the whole result will be buffered. /// First ~buffer_size bytes will be buffered in memory, the remaining bytes will be stored in temporary file. - bool buffer_until_eof = params.getParsed("wait_end_of_query", false); + bool buffer_until_eof = params.getParsed("wait_end_of_query", context->getSettingsRef().http_wait_end_of_query); size_t buffer_size_http = DBMS_DEFAULT_BUFFER_SIZE; size_t buffer_size_memory = (buffer_size_total > buffer_size_http) ? buffer_size_total : 0; diff --git a/tests/clickhouse-test b/tests/clickhouse-test index 68bca93c55c..93aef8376d2 100755 --- a/tests/clickhouse-test +++ b/tests/clickhouse-test @@ -521,6 +521,8 @@ class SettingsRandomizer: "optimize_distinct_in_order": lambda: random.randint(0, 1), "optimize_sorting_by_input_stream_properties": lambda: random.randint(0, 1), "enable_memory_bound_merging_of_aggregation_results": lambda: random.randint(0, 1), + "http_response_buffer_size": lambda: random.randint(0, 10 * 1048576), + "http_wait_end_of_query": lambda: random.random() > 0.5, } @staticmethod From 95292ce5c79a8386ec6736e1b3fd934c3a38e02a Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Thu, 2 Mar 2023 16:26:46 +0000 Subject: [PATCH 428/841] Make 01710_projections more stable. --- tests/queries/0_stateless/01710_projections.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/queries/0_stateless/01710_projections.sql b/tests/queries/0_stateless/01710_projections.sql index cbabd3ec598..146b46aed38 100644 --- a/tests/queries/0_stateless/01710_projections.sql +++ b/tests/queries/0_stateless/01710_projections.sql @@ -1,6 +1,6 @@ drop table if exists projection_test; -create table projection_test (`sum(block_count)` UInt64, domain_alias UInt64 alias length(domain), datetime DateTime, domain LowCardinality(String), x_id String, y_id String, block_count Int64, retry_count Int64, duration Int64, kbytes Int64, buffer_time Int64, first_time Int64, total_bytes Nullable(UInt64), valid_bytes Nullable(UInt64), completed_bytes Nullable(UInt64), fixed_bytes Nullable(UInt64), force_bytes Nullable(UInt64), projection p (select toStartOfMinute(datetime) dt_m, countIf(first_time = 0) / count(), avg((kbytes * 8) / duration), count(), sum(block_count) / sum(duration), avg(block_count / duration), sum(buffer_time) / sum(duration), avg(buffer_time / duration), sum(valid_bytes) / sum(total_bytes), sum(completed_bytes) / sum(total_bytes), sum(fixed_bytes) / sum(total_bytes), sum(force_bytes) / sum(total_bytes), sum(valid_bytes) / sum(total_bytes), sum(retry_count) / sum(duration), avg(retry_count / duration), countIf(block_count > 0) / count(), countIf(first_time = 0) / count(), uniqHLL12(x_id), uniqHLL12(y_id) group by dt_m, domain)) engine MergeTree partition by toDate(datetime) order by (toStartOfTenMinutes(datetime), domain); +create table projection_test (`sum(block_count)` UInt64, domain_alias UInt64 alias length(domain), datetime DateTime, domain LowCardinality(String), x_id String, y_id String, block_count Int64, retry_count Int64, duration Int64, kbytes Int64, buffer_time Int64, first_time Int64, total_bytes Nullable(UInt64), valid_bytes Nullable(UInt64), completed_bytes Nullable(UInt64), fixed_bytes Nullable(UInt64), force_bytes Nullable(UInt64), projection p (select toStartOfMinute(datetime) dt_m, countIf(first_time = 0) / count(), avg((kbytes * 8) / duration), count(), sum(block_count) / sum(duration), avg(block_count / duration), sum(buffer_time) / sum(duration), avg(buffer_time / duration), sum(valid_bytes) / sum(total_bytes), sum(completed_bytes) / sum(total_bytes), sum(fixed_bytes) / sum(total_bytes), sum(force_bytes) / sum(total_bytes), sum(valid_bytes) / sum(total_bytes), sum(retry_count) / sum(duration), avg(retry_count / duration), countIf(block_count > 0) / count(), countIf(first_time = 0) / count(), uniqHLL12(x_id), uniqHLL12(y_id) group by dt_m, domain)) engine MergeTree partition by toDate(datetime) order by (toStartOfTenMinutes(datetime), domain) settings index_granularity_bytes = 10000000; insert into projection_test with rowNumberInAllBlocks() as id select 1, toDateTime('2020-10-24 00:00:00') + (id / 20), toString(id % 100), * from generateRandom('x_id String, y_id String, block_count Int64, retry_count Int64, duration Int64, kbytes Int64, buffer_time Int64, first_time Int64, total_bytes Nullable(UInt64), valid_bytes Nullable(UInt64), completed_bytes Nullable(UInt64), fixed_bytes Nullable(UInt64), force_bytes Nullable(UInt64)', 10, 10, 1) limit 1000 settings max_threads = 1; From 48fc545e68fc86cb903a2272f1a62640429bfde2 Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Thu, 2 Mar 2023 17:27:57 +0100 Subject: [PATCH 429/841] Update 01710_projections.sql --- tests/queries/0_stateless/01710_projections.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/queries/0_stateless/01710_projections.sql b/tests/queries/0_stateless/01710_projections.sql index 146b46aed38..5097a88c8fa 100644 --- a/tests/queries/0_stateless/01710_projections.sql +++ b/tests/queries/0_stateless/01710_projections.sql @@ -1,6 +1,6 @@ drop table if exists projection_test; -create table projection_test (`sum(block_count)` UInt64, domain_alias UInt64 alias length(domain), datetime DateTime, domain LowCardinality(String), x_id String, y_id String, block_count Int64, retry_count Int64, duration Int64, kbytes Int64, buffer_time Int64, first_time Int64, total_bytes Nullable(UInt64), valid_bytes Nullable(UInt64), completed_bytes Nullable(UInt64), fixed_bytes Nullable(UInt64), force_bytes Nullable(UInt64), projection p (select toStartOfMinute(datetime) dt_m, countIf(first_time = 0) / count(), avg((kbytes * 8) / duration), count(), sum(block_count) / sum(duration), avg(block_count / duration), sum(buffer_time) / sum(duration), avg(buffer_time / duration), sum(valid_bytes) / sum(total_bytes), sum(completed_bytes) / sum(total_bytes), sum(fixed_bytes) / sum(total_bytes), sum(force_bytes) / sum(total_bytes), sum(valid_bytes) / sum(total_bytes), sum(retry_count) / sum(duration), avg(retry_count / duration), countIf(block_count > 0) / count(), countIf(first_time = 0) / count(), uniqHLL12(x_id), uniqHLL12(y_id) group by dt_m, domain)) engine MergeTree partition by toDate(datetime) order by (toStartOfTenMinutes(datetime), domain) settings index_granularity_bytes = 10000000; +create table projection_test (`sum(block_count)` UInt64, domain_alias UInt64 alias length(domain), datetime DateTime, domain LowCardinality(String), x_id String, y_id String, block_count Int64, retry_count Int64, duration Int64, kbytes Int64, buffer_time Int64, first_time Int64, total_bytes Nullable(UInt64), valid_bytes Nullable(UInt64), completed_bytes Nullable(UInt64), fixed_bytes Nullable(UInt64), force_bytes Nullable(UInt64), projection p (select toStartOfMinute(datetime) dt_m, countIf(first_time = 0) / count(), avg((kbytes * 8) / duration), count(), sum(block_count) / sum(duration), avg(block_count / duration), sum(buffer_time) / sum(duration), avg(buffer_time / duration), sum(valid_bytes) / sum(total_bytes), sum(completed_bytes) / sum(total_bytes), sum(fixed_bytes) / sum(total_bytes), sum(force_bytes) / sum(total_bytes), sum(valid_bytes) / sum(total_bytes), sum(retry_count) / sum(duration), avg(retry_count / duration), countIf(block_count > 0) / count(), countIf(first_time = 0) / count(), uniqHLL12(x_id), uniqHLL12(y_id) group by dt_m, domain)) engine MergeTree partition by toDate(datetime) order by (toStartOfTenMinutes(datetime), domain) settings index_granularity_bytes = 10000000; insert into projection_test with rowNumberInAllBlocks() as id select 1, toDateTime('2020-10-24 00:00:00') + (id / 20), toString(id % 100), * from generateRandom('x_id String, y_id String, block_count Int64, retry_count Int64, duration Int64, kbytes Int64, buffer_time Int64, first_time Int64, total_bytes Nullable(UInt64), valid_bytes Nullable(UInt64), completed_bytes Nullable(UInt64), fixed_bytes Nullable(UInt64), force_bytes Nullable(UInt64)', 10, 10, 1) limit 1000 settings max_threads = 1; From 73a6c920d3dd595d6771e6801e91c5fa0bbf9446 Mon Sep 17 00:00:00 2001 From: Dan Roscigno Date: Thu, 2 Mar 2023 11:31:22 -0500 Subject: [PATCH 430/841] Update date-time-functions.md closes #42758 --- .../functions/date-time-functions.md | 39 +++++++++++++++++-- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/docs/en/sql-reference/functions/date-time-functions.md b/docs/en/sql-reference/functions/date-time-functions.md index f6af8abcbaf..a6043d2507e 100644 --- a/docs/en/sql-reference/functions/date-time-functions.md +++ b/docs/en/sql-reference/functions/date-time-functions.md @@ -1126,15 +1126,48 @@ Rounds the time to the half hour. ## toYYYYMM -Converts a date or date with time to a UInt32 number containing the year and month number (YYYY \* 100 + MM). +Converts a date or date with time to a UInt32 number containing the year and month number (YYYY \* 100 + MM). Accepts a second optional timezone argument. If provided, the timezone must be a string constant. + +### example +```sql +SELECT + toYYYYMM(now(), 'US/Eastern') +``` +```response +┌─toYYYYMM(now(), 'US/Eastern')─┐ +│ 202303 │ +└───────────────────────────────┘ +``` ## toYYYYMMDD -Converts a date or date with time to a UInt32 number containing the year and month number (YYYY \* 10000 + MM \* 100 + DD). +Converts a date or date with time to a UInt32 number containing the year and month number (YYYY \* 10000 + MM \* 100 + DD). Accepts a second optional timezone argument. If provided, the timezone must be a string constant. + +### example +```sql +SELECT + toYYYYMMDD(now(), 'US/Eastern') +``` +```response +┌─toYYYYMMDD(now(), 'US/Eastern')─┐ +│ 20230302 │ +└─────────────────────────────────┘ +``` ## toYYYYMMDDhhmmss -Converts a date or date with time to a UInt64 number containing the year and month number (YYYY \* 10000000000 + MM \* 100000000 + DD \* 1000000 + hh \* 10000 + mm \* 100 + ss). +Converts a date or date with time to a UInt64 number containing the year and month number (YYYY \* 10000000000 + MM \* 100000000 + DD \* 1000000 + hh \* 10000 + mm \* 100 + ss). Accepts a second optional timezone argument. If provided, the timezone must be a string constant. + +### example +```sql +SELECT + toYYYYMMDDhhmmss(now(), 'US/Eastern') +``` +```response +┌─toYYYYMMDDhhmmss(now(), 'US/Eastern')─┐ +│ 20230302112209 │ +└───────────────────────────────────────┘ +``` ## addYears, addMonths, addWeeks, addDays, addHours, addMinutes, addSeconds, addQuarters From 63eeec1785c7fa6553e93f5cbe0d94ce0647d292 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Thu, 2 Mar 2023 17:44:48 +0100 Subject: [PATCH 431/841] Mark 01771_bloom_filter_not_has as no-parallel and long This test can take long enough time in debug build > 10min, and because clickhouse-test does not wait the test in this case and simply call DROP DATABASE, this will eventually lead to error during DROP since the table is still in use. CI: https://s3.amazonaws.com/clickhouse-test-reports/45491/99329d868232d9377d7f808763e951e6f15fd71c/stateless_tests__debug__%5B5/5%5D.html Signed-off-by: Azat Khuzhin --- tests/queries/0_stateless/01771_bloom_filter_not_has.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/queries/0_stateless/01771_bloom_filter_not_has.sql b/tests/queries/0_stateless/01771_bloom_filter_not_has.sql index ab0e3d308f9..f945cbde56b 100644 --- a/tests/queries/0_stateless/01771_bloom_filter_not_has.sql +++ b/tests/queries/0_stateless/01771_bloom_filter_not_has.sql @@ -1,3 +1,4 @@ +-- Tags: no-parallel, long DROP TABLE IF EXISTS bloom_filter_null_array; CREATE TABLE bloom_filter_null_array (v Array(Int32), INDEX idx v TYPE bloom_filter GRANULARITY 3) ENGINE = MergeTree() ORDER BY v; INSERT INTO bloom_filter_null_array SELECT [number] FROM numbers(10000000); From d378ae9c7698685cb187deff8e7e490058d5ccd5 Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Thu, 2 Mar 2023 17:05:11 +0000 Subject: [PATCH 432/841] Docs: Switch two rows for consistency --- docs/en/sql-reference/functions/date-time-functions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/sql-reference/functions/date-time-functions.md b/docs/en/sql-reference/functions/date-time-functions.md index f6af8abcbaf..49b0bc25edd 100644 --- a/docs/en/sql-reference/functions/date-time-functions.md +++ b/docs/en/sql-reference/functions/date-time-functions.md @@ -1231,8 +1231,8 @@ Using replacement fields, you can define a pattern for the resulting string. “ | %e | day of the month, space-padded (1-31) |   2 | | %f | fractional second from the fractional part of DateTime64 | 1234560 | | %F | short YYYY-MM-DD date, equivalent to %Y-%m-%d | 2018-01-02 | -| %G | four-digit year format for ISO week number, calculated from the week-based year [defined by the ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Week_dates) standard, normally useful only with %V | 2018 | | %g | two-digit year format, aligned to ISO 8601, abbreviated from four-digit notation | 18 | +| %G | four-digit year format for ISO week number, calculated from the week-based year [defined by the ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Week_dates) standard, normally useful only with %V | 2018 | | %h | hour in 12h format (01-12) | 09 | | %H | hour in 24h format (00-23) | 22 | | %i | minute (00-59) | 33 | From 14351922e3f250c4c92383462f701fcaef198054 Mon Sep 17 00:00:00 2001 From: avogar Date: Thu, 2 Mar 2023 17:20:29 +0000 Subject: [PATCH 433/841] Fix possible deadlock in QueryStatus --- src/Interpreters/ProcessList.cpp | 58 ++++++++++++++++++++++++++++---- src/Interpreters/ProcessList.h | 16 ++++++++- 2 files changed, 66 insertions(+), 8 deletions(-) diff --git a/src/Interpreters/ProcessList.cpp b/src/Interpreters/ProcessList.cpp index 49d7989ac5e..52674dc1c77 100644 --- a/src/Interpreters/ProcessList.cpp +++ b/src/Interpreters/ProcessList.cpp @@ -373,6 +373,19 @@ QueryStatus::~QueryStatus() } } +void QueryStatus::ExecutorHolder::cancel() +{ + std::lock_guard lock(mutex); + if (executor) + executor->cancel(); +} + +void QueryStatus::ExecutorHolder::remove() +{ + std::lock_guard lock(mutex); + executor = nullptr; +} + CancellationCode QueryStatus::cancelQuery(bool) { if (is_killed.load()) @@ -380,9 +393,37 @@ CancellationCode QueryStatus::cancelQuery(bool) is_killed.store(true); - std::lock_guard lock(executors_mutex); - for (auto * e : executors) - e->cancel(); + std::unique_lock lock(executors_mutex); + + /// Track all cancelled executors. + std::unordered_set cancelled; + /// We cancel executors from the left to the right, so if the last executor + /// was cancelled, then all executors were cancelled. + while (!cancelled.contains(executors.back().get())) + { + size_t size = executors.size(); + /// We should create a copy of executor holder, because it can be + /// removed from vector in removePipelineExecutor from another thread + /// and reference will be invalid. + for (auto e : executors) + { + if (cancelled.contains(e.get())) + continue; + /// We should call cancel() with unlocked executors_mutex, because + /// cancel() can try to lock some internal mutex that is already locked by query executing + /// thread, and query executing thread can call removePipelineExecutor and lock executors_mutex, + /// which will lead to deadlock. + lock.unlock(); + e->cancel(); + lock.lock(); + cancelled.insert(e.get()); + /// While executors_mutex was unlocked, removePipelineExecutor could be called and + /// the size of executors could have changed. In this case we should start iterating + /// over it again to avoid using invalid iterators. + if (executors.size() != size) + break; + } + } return CancellationCode::CancelSent; } @@ -396,15 +437,18 @@ void QueryStatus::addPipelineExecutor(PipelineExecutor * e) throw Exception(ErrorCodes::QUERY_WAS_CANCELLED, "Query was cancelled"); std::lock_guard lock(executors_mutex); - assert(std::find(executors.begin(), executors.end(), e) == executors.end()); - executors.push_back(e); + assert(std::find_if(executors.begin(), executors.end(), [e](const ExecutorHolderPtr & x){ return x->executor == e; }) == executors.end()); + executors.push_back(std::make_shared(e)); } void QueryStatus::removePipelineExecutor(PipelineExecutor * e) { std::lock_guard lock(executors_mutex); - assert(std::find(executors.begin(), executors.end(), e) != executors.end()); - std::erase_if(executors, [e](PipelineExecutor * x) { return x == e; }); + auto it = std::find_if(executors.begin(), executors.end(), [e](const ExecutorHolderPtr & x){ return x->executor == e; }); + assert(it != executors.end()); + /// Invalidate executor pointer inside holder. + (*it)->remove(); + executors.erase(it); } bool QueryStatus::checkTimeLimit() diff --git a/src/Interpreters/ProcessList.h b/src/Interpreters/ProcessList.h index d5c136ab62a..30bfde4e218 100644 --- a/src/Interpreters/ProcessList.h +++ b/src/Interpreters/ProcessList.h @@ -119,8 +119,22 @@ protected: mutable std::mutex executors_mutex; + struct ExecutorHolder + { + ExecutorHolder(PipelineExecutor * e) : executor(e) {} + + void cancel(); + + void remove(); + + PipelineExecutor * executor; + std::mutex mutex; + }; + + using ExecutorHolderPtr = std::shared_ptr; + /// Array of PipelineExecutors to be cancelled when a cancelQuery is received - std::vector executors; + std::vector executors; enum QueryStreamsStatus { From fc8ea01c2b2a198d2170f8c4f9ca775f5d3a37b4 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Thu, 2 Mar 2023 18:23:31 +0100 Subject: [PATCH 434/841] use unique names and paths in test_replicated_database --- .../test_replicated_database/test.py | 249 +++++++++--------- 1 file changed, 126 insertions(+), 123 deletions(-) diff --git a/tests/integration/test_replicated_database/test.py b/tests/integration/test_replicated_database/test.py index ead9a762b1b..c71c76244ce 100644 --- a/tests/integration/test_replicated_database/test.py +++ b/tests/integration/test_replicated_database/test.py @@ -80,15 +80,15 @@ def started_cluster(): def test_create_replicated_table(started_cluster): main_node.query( - "CREATE DATABASE testdb ENGINE = Replicated('/clickhouse/databases/test1', 'shard1', 'replica' || '1');" + "CREATE DATABASE create_replicated_table ENGINE = Replicated('/test/create_replicated_table', 'shard1', 'replica' || '1');" ) dummy_node.query( - "CREATE DATABASE testdb ENGINE = Replicated('/clickhouse/databases/test1', 'shard1', 'replica2');" + "CREATE DATABASE create_replicated_table ENGINE = Replicated('/test/create_replicated_table', 'shard1', 'replica2');" ) assert ( "Explicit zookeeper_path and replica_name are specified" in main_node.query_and_get_error( - "CREATE TABLE testdb.replicated_table (d Date, k UInt64, i32 Int32) " + "CREATE TABLE create_replicated_table.replicated_table (d Date, k UInt64, i32 Int32) " "ENGINE=ReplicatedMergeTree('/test/tmp', 'r') ORDER BY k PARTITION BY toYYYYMM(d);" ) ) @@ -96,7 +96,7 @@ def test_create_replicated_table(started_cluster): assert ( "Explicit zookeeper_path and replica_name are specified" in main_node.query_and_get_error( - "CREATE TABLE testdb.replicated_table (d Date, k UInt64, i32 Int32) " + "CREATE TABLE create_replicated_table.replicated_table (d Date, k UInt64, i32 Int32) " "ENGINE=ReplicatedMergeTree('/test/tmp', 'r') ORDER BY k PARTITION BY toYYYYMM(d);" ) ) @@ -104,39 +104,39 @@ def test_create_replicated_table(started_cluster): assert ( "This syntax for *MergeTree engine is deprecated" in main_node.query_and_get_error( - "CREATE TABLE testdb.replicated_table (d Date, k UInt64, i32 Int32) " + "CREATE TABLE create_replicated_table.replicated_table (d Date, k UInt64, i32 Int32) " "ENGINE=ReplicatedMergeTree('/test/tmp/{shard}', '{replica}', d, k, 8192);" ) ) main_node.query( - "CREATE TABLE testdb.replicated_table (d Date, k UInt64, i32 Int32) ENGINE=ReplicatedMergeTree ORDER BY k PARTITION BY toYYYYMM(d);" + "CREATE TABLE create_replicated_table.replicated_table (d Date, k UInt64, i32 Int32) ENGINE=ReplicatedMergeTree ORDER BY k PARTITION BY toYYYYMM(d);" ) expected = ( - "CREATE TABLE testdb.replicated_table\\n(\\n `d` Date,\\n `k` UInt64,\\n `i32` Int32\\n)\\n" + "CREATE TABLE create_replicated_table.replicated_table\\n(\\n `d` Date,\\n `k` UInt64,\\n `i32` Int32\\n)\\n" "ENGINE = ReplicatedMergeTree(\\'/clickhouse/tables/{uuid}/{shard}\\', \\'{replica}\\')\\n" "PARTITION BY toYYYYMM(d)\\nORDER BY k\\nSETTINGS index_granularity = 8192" ) - assert_create_query([main_node, dummy_node], "testdb.replicated_table", expected) + assert_create_query([main_node, dummy_node], "create_replicated_table.replicated_table", expected) # assert without replacing uuid - assert main_node.query("show create testdb.replicated_table") == dummy_node.query( - "show create testdb.replicated_table" + assert main_node.query("show create create_replicated_table.replicated_table") == dummy_node.query( + "show create create_replicated_table.replicated_table" ) - main_node.query("DROP DATABASE testdb SYNC") - dummy_node.query("DROP DATABASE testdb SYNC") + main_node.query("DROP DATABASE create_replicated_table SYNC") + dummy_node.query("DROP DATABASE create_replicated_table SYNC") @pytest.mark.parametrize("engine", ["MergeTree", "ReplicatedMergeTree"]) def test_simple_alter_table(started_cluster, engine): main_node.query( - "CREATE DATABASE testdb ENGINE = Replicated('/clickhouse/databases/test1', 'shard1', 'replica1');" + "CREATE DATABASE test_simple_alter_table ENGINE = Replicated('/test/simple_alter_table', 'shard1', 'replica1');" ) dummy_node.query( - "CREATE DATABASE testdb ENGINE = Replicated('/clickhouse/databases/test1', 'shard1', 'replica2');" + "CREATE DATABASE test_simple_alter_table ENGINE = Replicated('/test/simple_alter_table', 'shard1', 'replica2');" ) # test_simple_alter_table - name = "testdb.alter_test_{}".format(engine) + name = "test_simple_alter_table.alter_test_{}".format(engine) main_node.query( "CREATE TABLE {} " "(CounterID UInt32, StartDate Date, UserID UInt32, VisitID UInt32, NestedColumn Nested(A UInt8, S String), ToDrop UInt32) " @@ -184,10 +184,10 @@ def test_simple_alter_table(started_cluster, engine): # test_create_replica_after_delay competing_node.query( - "CREATE DATABASE IF NOT EXISTS testdb ENGINE = Replicated('/clickhouse/databases/test1', 'shard1', 'replica3');" + "CREATE DATABASE IF NOT EXISTS test_simple_alter_table ENGINE = Replicated('/test/simple_alter_table', 'shard1', 'replica3');" ) - name = "testdb.alter_test_{}".format(engine) + name = "test_simple_alter_table.alter_test_{}".format(engine) main_node.query("ALTER TABLE {} ADD COLUMN Added3 UInt32;".format(name)) main_node.query("ALTER TABLE {} DROP COLUMN AddedNested1;".format(name)) main_node.query("ALTER TABLE {} RENAME COLUMN Added1 TO AddedNested1;".format(name)) @@ -207,21 +207,21 @@ def test_simple_alter_table(started_cluster, engine): ) assert_create_query([main_node, dummy_node, competing_node], name, expected) - main_node.query("DROP DATABASE testdb SYNC") - dummy_node.query("DROP DATABASE testdb SYNC") - competing_node.query("DROP DATABASE testdb SYNC") + main_node.query("DROP DATABASE test_simple_alter_table SYNC") + dummy_node.query("DROP DATABASE test_simple_alter_table SYNC") + competing_node.query("DROP DATABASE test_simple_alter_table SYNC") @pytest.mark.parametrize("engine", ["MergeTree", "ReplicatedMergeTree"]) def test_delete_from_table(started_cluster, engine): main_node.query( - "CREATE DATABASE testdb ENGINE = Replicated('/clickhouse/databases/test1', 'shard1', 'replica1');" + "CREATE DATABASE delete_from_table ENGINE = Replicated('/test/simple_alter_table', 'shard1', 'replica1');" ) dummy_node.query( - "CREATE DATABASE testdb ENGINE = Replicated('/clickhouse/databases/test1', 'shard2', 'replica1');" + "CREATE DATABASE delete_from_table ENGINE = Replicated('/test/simple_alter_table', 'shard2', 'replica1');" ) - name = "testdb.delete_test_{}".format(engine) + name = "delete_from_table.delete_test_{}".format(engine) main_node.query( "CREATE TABLE {} " "(id UInt64, value String) " @@ -238,7 +238,7 @@ def test_delete_from_table(started_cluster, engine): table_for_select = name if not "Replicated" in engine: - table_for_select = "cluster('testdb', {})".format(name) + table_for_select = "cluster('delete_from_table', {})".format(name) for node in [main_node, dummy_node]: assert_eq_with_retry( node, @@ -246,8 +246,8 @@ def test_delete_from_table(started_cluster, engine): expected, ) - main_node.query("DROP DATABASE testdb SYNC") - dummy_node.query("DROP DATABASE testdb SYNC") + main_node.query("DROP DATABASE delete_from_table SYNC") + dummy_node.query("DROP DATABASE delete_from_table SYNC") def get_table_uuid(database, name): @@ -276,17 +276,17 @@ def fixture_attachable_part(started_cluster): @pytest.mark.parametrize("engine", ["MergeTree", "ReplicatedMergeTree"]) def test_alter_attach(started_cluster, attachable_part, engine): main_node.query( - "CREATE DATABASE testdb ENGINE = Replicated('/clickhouse/databases/test1', 'shard1', 'replica1');" + "CREATE DATABASE alter_attach ENGINE = Replicated('/test/alter_attach', 'shard1', 'replica1');" ) dummy_node.query( - "CREATE DATABASE testdb ENGINE = Replicated('/clickhouse/databases/test1', 'shard1', 'replica2');" + "CREATE DATABASE alter_attach ENGINE = Replicated('/test/alter_attach', 'shard1', 'replica2');" ) name = "alter_attach_test_{}".format(engine) main_node.query( - f"CREATE TABLE testdb.{name} (CounterID UInt32) ENGINE = {engine} ORDER BY (CounterID)" + f"CREATE TABLE alter_attach.{name} (CounterID UInt32) ENGINE = {engine} ORDER BY (CounterID)" ) - table_uuid = get_table_uuid("testdb", name) + table_uuid = get_table_uuid("alter_attach", name) # Provide and attach a part to the main node shutil.copytree( attachable_part, @@ -295,113 +295,113 @@ def test_alter_attach(started_cluster, attachable_part, engine): f"database/store/{table_uuid[:3]}/{table_uuid}/detached/all_1_1_0", ), ) - main_node.query(f"ALTER TABLE testdb.{name} ATTACH PART 'all_1_1_0'") + main_node.query(f"ALTER TABLE alter_attach.{name} ATTACH PART 'all_1_1_0'") # On the main node, data is attached - assert main_node.query(f"SELECT CounterID FROM testdb.{name}") == "123\n" + assert main_node.query(f"SELECT CounterID FROM alter_attach.{name}") == "123\n" # On the other node, data is replicated only if using a Replicated table engine if engine == "ReplicatedMergeTree": - assert dummy_node.query(f"SELECT CounterID FROM testdb.{name}") == "123\n" + assert dummy_node.query(f"SELECT CounterID FROM alter_attach.{name}") == "123\n" else: - assert dummy_node.query(f"SELECT CounterID FROM testdb.{name}") == "" - main_node.query("DROP DATABASE testdb SYNC") - dummy_node.query("DROP DATABASE testdb SYNC") + assert dummy_node.query(f"SELECT CounterID FROM alter_attach.{name}") == "" + main_node.query("DROP DATABASE alter_attach SYNC") + dummy_node.query("DROP DATABASE alter_attach SYNC") @pytest.mark.parametrize("engine", ["MergeTree", "ReplicatedMergeTree"]) def test_alter_drop_part(started_cluster, engine): main_node.query( - "CREATE DATABASE testdb ENGINE = Replicated('/clickhouse/databases/test1', 'shard1', 'replica1');" + "CREATE DATABASE alter_drop_part ENGINE = Replicated('/test/alter_drop_part', 'shard1', 'replica1');" ) dummy_node.query( - "CREATE DATABASE testdb ENGINE = Replicated('/clickhouse/databases/test1', 'shard1', 'replica2');" + "CREATE DATABASE alter_drop_part ENGINE = Replicated('/test/alter_drop_part', 'shard1', 'replica2');" ) table = f"alter_drop_{engine}" part_name = "all_0_0_0" if engine == "ReplicatedMergeTree" else "all_1_1_0" main_node.query( - f"CREATE TABLE testdb.{table} (CounterID UInt32) ENGINE = {engine} ORDER BY (CounterID)" + f"CREATE TABLE alter_drop_part.{table} (CounterID UInt32) ENGINE = {engine} ORDER BY (CounterID)" ) - main_node.query(f"INSERT INTO testdb.{table} VALUES (123)") + main_node.query(f"INSERT INTO alter_drop_part.{table} VALUES (123)") if engine == "MergeTree": - dummy_node.query(f"INSERT INTO testdb.{table} VALUES (456)") - main_node.query(f"ALTER TABLE testdb.{table} DROP PART '{part_name}'") - assert main_node.query(f"SELECT CounterID FROM testdb.{table}") == "" + dummy_node.query(f"INSERT INTO alter_drop_part.{table} VALUES (456)") + main_node.query(f"ALTER TABLE alter_drop_part.{table} DROP PART '{part_name}'") + assert main_node.query(f"SELECT CounterID FROM alter_drop_part.{table}") == "" if engine == "ReplicatedMergeTree": # The DROP operation is still replicated at the table engine level - assert dummy_node.query(f"SELECT CounterID FROM testdb.{table}") == "" + assert dummy_node.query(f"SELECT CounterID FROM alter_drop_part.{table}") == "" else: - assert dummy_node.query(f"SELECT CounterID FROM testdb.{table}") == "456\n" - main_node.query("DROP DATABASE testdb SYNC") - dummy_node.query("DROP DATABASE testdb SYNC") + assert dummy_node.query(f"SELECT CounterID FROM alter_drop_part.{table}") == "456\n" + main_node.query("DROP DATABASE alter_drop_part SYNC") + dummy_node.query("DROP DATABASE alter_drop_part SYNC") @pytest.mark.parametrize("engine", ["MergeTree", "ReplicatedMergeTree"]) def test_alter_detach_part(started_cluster, engine): main_node.query( - "CREATE DATABASE testdb ENGINE = Replicated('/clickhouse/databases/test1', 'shard1', 'replica1');" + "CREATE DATABASE alter_detach_part ENGINE = Replicated('/test/alter_detach_part', 'shard1', 'replica1');" ) dummy_node.query( - "CREATE DATABASE testdb ENGINE = Replicated('/clickhouse/databases/test1', 'shard1', 'replica2');" + "CREATE DATABASE alter_detach_part ENGINE = Replicated('/test/alter_detach_part', 'shard1', 'replica2');" ) table = f"alter_detach_{engine}" part_name = "all_0_0_0" if engine == "ReplicatedMergeTree" else "all_1_1_0" main_node.query( - f"CREATE TABLE testdb.{table} (CounterID UInt32) ENGINE = {engine} ORDER BY (CounterID)" + f"CREATE TABLE alter_detach_part.{table} (CounterID UInt32) ENGINE = {engine} ORDER BY (CounterID)" ) - main_node.query(f"INSERT INTO testdb.{table} VALUES (123)") + main_node.query(f"INSERT INTO alter_detach_part.{table} VALUES (123)") if engine == "MergeTree": - dummy_node.query(f"INSERT INTO testdb.{table} VALUES (456)") - main_node.query(f"ALTER TABLE testdb.{table} DETACH PART '{part_name}'") - detached_parts_query = f"SELECT name FROM system.detached_parts WHERE database='testdb' AND table='{table}'" + dummy_node.query(f"INSERT INTO alter_detach_part.{table} VALUES (456)") + main_node.query(f"ALTER TABLE alter_detach_part.{table} DETACH PART '{part_name}'") + detached_parts_query = f"SELECT name FROM system.detached_parts WHERE database='alter_detach_part' AND table='{table}'" assert main_node.query(detached_parts_query) == f"{part_name}\n" if engine == "ReplicatedMergeTree": # The detach operation is still replicated at the table engine level assert dummy_node.query(detached_parts_query) == f"{part_name}\n" else: assert dummy_node.query(detached_parts_query) == "" - main_node.query("DROP DATABASE testdb SYNC") - dummy_node.query("DROP DATABASE testdb SYNC") + main_node.query("DROP DATABASE alter_detach_part SYNC") + dummy_node.query("DROP DATABASE alter_detach_part SYNC") @pytest.mark.parametrize("engine", ["MergeTree", "ReplicatedMergeTree"]) def test_alter_drop_detached_part(started_cluster, engine): main_node.query( - "CREATE DATABASE testdb ENGINE = Replicated('/clickhouse/databases/test1', 'shard1', 'replica1');" + "CREATE DATABASE alter_drop_detached_part ENGINE = Replicated('/test/alter_drop_detached_part', 'shard1', 'replica1');" ) dummy_node.query( - "CREATE DATABASE testdb ENGINE = Replicated('/clickhouse/databases/test1', 'shard1', 'replica2');" + "CREATE DATABASE alter_drop_detached_part ENGINE = Replicated('/test/alter_drop_detached_part', 'shard1', 'replica2');" ) table = f"alter_drop_detached_{engine}" part_name = "all_0_0_0" if engine == "ReplicatedMergeTree" else "all_1_1_0" main_node.query( - f"CREATE TABLE testdb.{table} (CounterID UInt32) ENGINE = {engine} ORDER BY (CounterID)" + f"CREATE TABLE alter_drop_detached_part.{table} (CounterID UInt32) ENGINE = {engine} ORDER BY (CounterID)" ) - main_node.query(f"INSERT INTO testdb.{table} VALUES (123)") - main_node.query(f"ALTER TABLE testdb.{table} DETACH PART '{part_name}'") + main_node.query(f"INSERT INTO alter_drop_detached_part.{table} VALUES (123)") + main_node.query(f"ALTER TABLE alter_drop_detached_part.{table} DETACH PART '{part_name}'") if engine == "MergeTree": - dummy_node.query(f"INSERT INTO testdb.{table} VALUES (456)") - dummy_node.query(f"ALTER TABLE testdb.{table} DETACH PART '{part_name}'") - main_node.query(f"ALTER TABLE testdb.{table} DROP DETACHED PART '{part_name}'") - detached_parts_query = f"SELECT name FROM system.detached_parts WHERE database='testdb' AND table='{table}'" + dummy_node.query(f"INSERT INTO alter_drop_detached_part.{table} VALUES (456)") + dummy_node.query(f"ALTER TABLE alter_drop_detached_part.{table} DETACH PART '{part_name}'") + main_node.query(f"ALTER TABLE alter_drop_detached_part.{table} DROP DETACHED PART '{part_name}'") + detached_parts_query = f"SELECT name FROM system.detached_parts WHERE database='alter_drop_detached_part' AND table='{table}'" assert main_node.query(detached_parts_query) == "" assert dummy_node.query(detached_parts_query) == f"{part_name}\n" - main_node.query("DROP DATABASE testdb SYNC") - dummy_node.query("DROP DATABASE testdb SYNC") + main_node.query("DROP DATABASE alter_drop_detached_part SYNC") + dummy_node.query("DROP DATABASE alter_drop_detached_part SYNC") @pytest.mark.parametrize("engine", ["MergeTree", "ReplicatedMergeTree"]) def test_alter_drop_partition(started_cluster, engine): main_node.query( - "CREATE DATABASE alter_drop_partition ENGINE = Replicated('/clickhouse/databases/test_alter_drop_partition', 'shard1', 'replica1');" + "CREATE DATABASE alter_drop_partition ENGINE = Replicated('/test/alter_drop_partition', 'shard1', 'replica1');" ) dummy_node.query( - "CREATE DATABASE alter_drop_partition ENGINE = Replicated('/clickhouse/databases/test_alter_drop_partition', 'shard1', 'replica2');" + "CREATE DATABASE alter_drop_partition ENGINE = Replicated('/test/alter_drop_partition', 'shard1', 'replica2');" ) snapshotting_node.query( - "CREATE DATABASE alter_drop_partition ENGINE = Replicated('/clickhouse/databases/test_alter_drop_partition', 'shard2', 'replica1');" + "CREATE DATABASE alter_drop_partition ENGINE = Replicated('/test/alter_drop_partition', 'shard2', 'replica1');" ) table = f"alter_drop_partition.alter_drop_{engine}" @@ -430,52 +430,52 @@ def test_alter_drop_partition(started_cluster, engine): def test_alter_fetch(started_cluster): main_node.query( - "CREATE DATABASE testdb ENGINE = Replicated('/clickhouse/databases/test1', 'shard1', 'replica1');" + "CREATE DATABASE alter_fetch ENGINE = Replicated('/test/alter_fetch', 'shard1', 'replica1');" ) dummy_node.query( - "CREATE DATABASE testdb ENGINE = Replicated('/clickhouse/databases/test1', 'shard1', 'replica2');" + "CREATE DATABASE alter_fetch ENGINE = Replicated('/test/alter_fetch', 'shard1', 'replica2');" ) main_node.query( - "CREATE TABLE testdb.fetch_source (CounterID UInt32) ENGINE = ReplicatedMergeTree ORDER BY (CounterID)" + "CREATE TABLE alter_fetch.fetch_source (CounterID UInt32) ENGINE = ReplicatedMergeTree ORDER BY (CounterID)" ) main_node.query( - "CREATE TABLE testdb.fetch_target (CounterID UInt32) ENGINE = ReplicatedMergeTree ORDER BY (CounterID)" + "CREATE TABLE alter_fetch.fetch_target (CounterID UInt32) ENGINE = ReplicatedMergeTree ORDER BY (CounterID)" ) - main_node.query("INSERT INTO testdb.fetch_source VALUES (123)") - table_uuid = get_table_uuid("testdb", "fetch_source") + main_node.query("INSERT INTO alter_fetch.fetch_source VALUES (123)") + table_uuid = get_table_uuid("alter_fetch", "fetch_source") main_node.query( - f"ALTER TABLE testdb.fetch_target FETCH PART 'all_0_0_0' FROM '/clickhouse/tables/{table_uuid}/{{shard}}' " + f"ALTER TABLE alter_fetch.fetch_target FETCH PART 'all_0_0_0' FROM '/clickhouse/tables/{table_uuid}/{{shard}}' " ) - detached_parts_query = "SELECT name FROM system.detached_parts WHERE database='testdb' AND table='fetch_target'" + detached_parts_query = "SELECT name FROM system.detached_parts WHERE database='alter_fetch' AND table='fetch_target'" assert main_node.query(detached_parts_query) == "all_0_0_0\n" assert dummy_node.query(detached_parts_query) == "" - main_node.query("DROP DATABASE testdb SYNC") - dummy_node.query("DROP DATABASE testdb SYNC") + main_node.query("DROP DATABASE alter_fetch SYNC") + dummy_node.query("DROP DATABASE alter_fetch SYNC") def test_alters_from_different_replicas(started_cluster): main_node.query( - "CREATE DATABASE testdb ENGINE = Replicated('/clickhouse/databases/test1', 'shard1', 'replica1');" + "CREATE DATABASE alters_from_different_replicas ENGINE = Replicated('/test/alters_from_different_replicas', 'shard1', 'replica1');" ) dummy_node.query( - "CREATE DATABASE testdb ENGINE = Replicated('/clickhouse/databases/test1', 'shard1', 'replica2');" + "CREATE DATABASE alters_from_different_replicas ENGINE = Replicated('/test/alters_from_different_replicas', 'shard1', 'replica2');" ) # test_alters_from_different_replicas competing_node.query( - "CREATE DATABASE testdb ENGINE = Replicated('/clickhouse/databases/test1', 'shard1', 'replica3');" + "CREATE DATABASE alters_from_different_replicas ENGINE = Replicated('/test/alters_from_different_replicas', 'shard1', 'replica3');" ) main_node.query( - "CREATE TABLE testdb.concurrent_test " + "CREATE TABLE alters_from_different_replicas.concurrent_test " "(CounterID UInt32, StartDate Date, UserID UInt32, VisitID UInt32, NestedColumn Nested(A UInt8, S String), ToDrop UInt32) " "ENGINE = MergeTree PARTITION BY toYYYYMM(StartDate) ORDER BY (CounterID, StartDate, intHash32(UserID), VisitID);" ) main_node.query( - "CREATE TABLE testdb.dist AS testdb.concurrent_test ENGINE = Distributed(testdb, testdb, concurrent_test, CounterID)" + "CREATE TABLE alters_from_different_replicas.dist AS alters_from_different_replicas.concurrent_test ENGINE = Distributed(alters_from_different_replicas, alters_from_different_replicas, concurrent_test, CounterID)" ) dummy_node.stop_clickhouse(kill=True) @@ -484,7 +484,7 @@ def test_alters_from_different_replicas(started_cluster): assert ( "There are 1 unfinished hosts (0 of them are currently active)" in competing_node.query_and_get_error( - "ALTER TABLE testdb.concurrent_test ADD COLUMN Added0 UInt32;", + "ALTER TABLE alters_from_different_replicas.concurrent_test ADD COLUMN Added0 UInt32;", settings=settings, ) ) @@ -493,7 +493,7 @@ def test_alters_from_different_replicas(started_cluster): "distributed_ddl_output_mode": "null_status_on_timeout", } assert "shard1\treplica2\tQUEUED\t" in main_node.query( - "ALTER TABLE testdb.concurrent_test ADD COLUMN Added2 UInt32;", + "ALTER TABLE alters_from_different_replicas.concurrent_test ADD COLUMN Added2 UInt32;", settings=settings, ) settings = { @@ -501,22 +501,22 @@ def test_alters_from_different_replicas(started_cluster): "distributed_ddl_output_mode": "never_throw", } assert "shard1\treplica2\tQUEUED\t" in competing_node.query( - "ALTER TABLE testdb.concurrent_test ADD COLUMN Added1 UInt32 AFTER Added0;", + "ALTER TABLE alters_from_different_replicas.concurrent_test ADD COLUMN Added1 UInt32 AFTER Added0;", settings=settings, ) dummy_node.start_clickhouse() main_node.query( - "ALTER TABLE testdb.concurrent_test ADD COLUMN AddedNested1 Nested(A UInt32, B UInt64) AFTER Added2;" + "ALTER TABLE alters_from_different_replicas.concurrent_test ADD COLUMN AddedNested1 Nested(A UInt32, B UInt64) AFTER Added2;" ) competing_node.query( - "ALTER TABLE testdb.concurrent_test ADD COLUMN AddedNested1.C Array(String) AFTER AddedNested1.B;" + "ALTER TABLE alters_from_different_replicas.concurrent_test ADD COLUMN AddedNested1.C Array(String) AFTER AddedNested1.B;" ) main_node.query( - "ALTER TABLE testdb.concurrent_test ADD COLUMN AddedNested2 Nested(A UInt32, B UInt64) AFTER AddedNested1;" + "ALTER TABLE alters_from_different_replicas.concurrent_test ADD COLUMN AddedNested2 Nested(A UInt32, B UInt64) AFTER AddedNested1;" ) expected = ( - "CREATE TABLE testdb.concurrent_test\\n(\\n `CounterID` UInt32,\\n `StartDate` Date,\\n `UserID` UInt32,\\n" + "CREATE TABLE alters_from_different_replicas.concurrent_test\\n(\\n `CounterID` UInt32,\\n `StartDate` Date,\\n `UserID` UInt32,\\n" " `VisitID` UInt32,\\n `NestedColumn.A` Array(UInt8),\\n `NestedColumn.S` Array(String),\\n `ToDrop` UInt32,\\n" " `Added0` UInt32,\\n `Added1` UInt32,\\n `Added2` UInt32,\\n `AddedNested1.A` Array(UInt32),\\n" " `AddedNested1.B` Array(UInt64),\\n `AddedNested1.C` Array(String),\\n `AddedNested2.A` Array(UInt32),\\n" @@ -524,51 +524,51 @@ def test_alters_from_different_replicas(started_cluster): "ENGINE = MergeTree\\nPARTITION BY toYYYYMM(StartDate)\\nORDER BY (CounterID, StartDate, intHash32(UserID), VisitID)\\nSETTINGS index_granularity = 8192" ) - assert_create_query([main_node, competing_node], "testdb.concurrent_test", expected) + assert_create_query([main_node, competing_node], "alters_from_different_replicas.concurrent_test", expected) # test_create_replica_after_delay - main_node.query("DROP TABLE testdb.concurrent_test SYNC") + main_node.query("DROP TABLE alters_from_different_replicas.concurrent_test SYNC") main_node.query( - "CREATE TABLE testdb.concurrent_test " + "CREATE TABLE alters_from_different_replicas.concurrent_test " "(CounterID UInt32, StartDate Date, UserID UInt32, VisitID UInt32, NestedColumn Nested(A UInt8, S String), ToDrop UInt32) " "ENGINE = ReplicatedMergeTree ORDER BY CounterID;" ) expected = ( - "CREATE TABLE testdb.concurrent_test\\n(\\n `CounterID` UInt32,\\n `StartDate` Date,\\n `UserID` UInt32,\\n" + "CREATE TABLE alters_from_different_replicas.concurrent_test\\n(\\n `CounterID` UInt32,\\n `StartDate` Date,\\n `UserID` UInt32,\\n" " `VisitID` UInt32,\\n `NestedColumn.A` Array(UInt8),\\n `NestedColumn.S` Array(String),\\n `ToDrop` UInt32\\n)\\n" "ENGINE = ReplicatedMergeTree(\\'/clickhouse/tables/{uuid}/{shard}\\', \\'{replica}\\')\\nORDER BY CounterID\\nSETTINGS index_granularity = 8192" ) - assert_create_query([main_node, competing_node], "testdb.concurrent_test", expected) + assert_create_query([main_node, competing_node], "alters_from_different_replicas.concurrent_test", expected) main_node.query( - "INSERT INTO testdb.dist (CounterID, StartDate, UserID) SELECT number, addDays(toDate('2020-02-02'), number), intHash32(number) FROM numbers(10)" + "INSERT INTO alters_from_different_replicas.dist (CounterID, StartDate, UserID) SELECT number, addDays(toDate('2020-02-02'), number), intHash32(number) FROM numbers(10)" ) # test_replica_restart main_node.restart_clickhouse() expected = ( - "CREATE TABLE testdb.concurrent_test\\n(\\n `CounterID` UInt32,\\n `StartDate` Date,\\n `UserID` UInt32,\\n" + "CREATE TABLE alters_from_different_replicas.concurrent_test\\n(\\n `CounterID` UInt32,\\n `StartDate` Date,\\n `UserID` UInt32,\\n" " `VisitID` UInt32,\\n `NestedColumn.A` Array(UInt8),\\n `NestedColumn.S` Array(String),\\n `ToDrop` UInt32\\n)\\n" "ENGINE = ReplicatedMergeTree(\\'/clickhouse/tables/{uuid}/{shard}\\', \\'{replica}\\')\\nORDER BY CounterID\\nSETTINGS index_granularity = 8192" ) # test_snapshot_and_snapshot_recover snapshotting_node.query( - "CREATE DATABASE testdb ENGINE = Replicated('/clickhouse/databases/test1', 'shard2', 'replica1');" + "CREATE DATABASE alters_from_different_replicas ENGINE = Replicated('/test/alters_from_different_replicas', 'shard2', 'replica1');" ) snapshot_recovering_node.query( - "CREATE DATABASE testdb ENGINE = Replicated('/clickhouse/databases/test1', 'shard2', 'replica2');" + "CREATE DATABASE alters_from_different_replicas ENGINE = Replicated('/test/alters_from_different_replicas', 'shard2', 'replica2');" ) - assert_create_query(all_nodes, "testdb.concurrent_test", expected) + assert_create_query(all_nodes, "alters_from_different_replicas.concurrent_test", expected) - main_node.query("SYSTEM FLUSH DISTRIBUTED testdb.dist") + main_node.query("SYSTEM FLUSH DISTRIBUTED alters_from_different_replicas.dist") main_node.query( - "ALTER TABLE testdb.concurrent_test UPDATE StartDate = addYears(StartDate, 1) WHERE 1" + "ALTER TABLE alters_from_different_replicas.concurrent_test UPDATE StartDate = addYears(StartDate, 1) WHERE 1" ) - res = main_node.query("ALTER TABLE testdb.concurrent_test DELETE WHERE UserID % 2") + res = main_node.query("ALTER TABLE alters_from_different_replicas.concurrent_test DELETE WHERE UserID % 2") assert ( "shard1\treplica1\tOK" in res and "shard1\treplica2\tOK" in res @@ -585,28 +585,28 @@ def test_alters_from_different_replicas(started_cluster): ) assert ( main_node.query( - "SELECT shard_num, replica_num, host_name FROM system.clusters WHERE cluster='testdb'" + "SELECT shard_num, replica_num, host_name FROM system.clusters WHERE cluster='alters_from_different_replicas'" ) == expected ) # test_drop_and_create_replica - main_node.query("DROP DATABASE testdb SYNC") + main_node.query("DROP DATABASE alters_from_different_replicas SYNC") main_node.query( - "CREATE DATABASE testdb ENGINE = Replicated('/clickhouse/databases/test1', 'shard1', 'replica1');" + "CREATE DATABASE alters_from_different_replicas ENGINE = Replicated('/test/alters_from_different_replicas', 'shard1', 'replica1');" ) expected = ( - "CREATE TABLE testdb.concurrent_test\\n(\\n `CounterID` UInt32,\\n `StartDate` Date,\\n `UserID` UInt32,\\n" + "CREATE TABLE alters_from_different_replicas.concurrent_test\\n(\\n `CounterID` UInt32,\\n `StartDate` Date,\\n `UserID` UInt32,\\n" " `VisitID` UInt32,\\n `NestedColumn.A` Array(UInt8),\\n `NestedColumn.S` Array(String),\\n `ToDrop` UInt32\\n)\\n" "ENGINE = ReplicatedMergeTree(\\'/clickhouse/tables/{uuid}/{shard}\\', \\'{replica}\\')\\nORDER BY CounterID\\nSETTINGS index_granularity = 8192" ) - assert_create_query([main_node, competing_node], "testdb.concurrent_test", expected) - assert_create_query(all_nodes, "testdb.concurrent_test", expected) + assert_create_query([main_node, competing_node], "alters_from_different_replicas.concurrent_test", expected) + assert_create_query(all_nodes, "alters_from_different_replicas.concurrent_test", expected) for node in all_nodes: - node.query("SYSTEM SYNC REPLICA testdb.concurrent_test") + node.query("SYSTEM SYNC REPLICA alters_from_different_replicas.concurrent_test") expected = ( "0\t2021-02-02\t4249604106\n" @@ -618,14 +618,14 @@ def test_alters_from_different_replicas(started_cluster): assert_eq_with_retry( dummy_node, - "SELECT CounterID, StartDate, UserID FROM testdb.dist ORDER BY CounterID", + "SELECT CounterID, StartDate, UserID FROM alters_from_different_replicas.dist ORDER BY CounterID", expected, ) - main_node.query("DROP DATABASE testdb SYNC") - dummy_node.query("DROP DATABASE testdb SYNC") - competing_node.query("DROP DATABASE testdb SYNC") - snapshotting_node.query("DROP DATABASE testdb SYNC") - snapshot_recovering_node.query("DROP DATABASE testdb SYNC") + main_node.query("DROP DATABASE alters_from_different_replicas SYNC") + dummy_node.query("DROP DATABASE alters_from_different_replicas SYNC") + competing_node.query("DROP DATABASE alters_from_different_replicas SYNC") + snapshotting_node.query("DROP DATABASE alters_from_different_replicas SYNC") + snapshot_recovering_node.query("DROP DATABASE alters_from_different_replicas SYNC") def create_some_tables(db): @@ -1063,10 +1063,10 @@ def test_server_uuid(started_cluster): def test_sync_replica(started_cluster): main_node.query( - "CREATE DATABASE test_sync_database ENGINE = Replicated('/clickhouse/databases/test1', 'shard1', 'replica1');" + "CREATE DATABASE test_sync_database ENGINE = Replicated('/test/sync_replica', 'shard1', 'replica1');" ) dummy_node.query( - "CREATE DATABASE test_sync_database ENGINE = Replicated('/clickhouse/databases/test1', 'shard1', 'replica2');" + "CREATE DATABASE test_sync_database ENGINE = Replicated('/test/sync_replica', 'shard1', 'replica2');" ) number_of_tables = 1000 @@ -1113,17 +1113,20 @@ def test_sync_replica(started_cluster): ) lp1 = main_node.query( - "select value from system.zookeeper where path='/clickhouse/databases/test1/replicas/shard1|replica1' and name='log_ptr'" + "select value from system.zookeeper where path='/test/sync_replica/replicas/shard1|replica1' and name='log_ptr'" ) lp2 = main_node.query( - "select value from system.zookeeper where path='/clickhouse/databases/test1/replicas/shard1|replica2' and name='log_ptr'" + "select value from system.zookeeper where path='/test/sync_replica/replicas/shard1|replica2' and name='log_ptr'" ) max_lp = main_node.query( - "select value from system.zookeeper where path='/clickhouse/databases/test1/' and name='max_log_ptr'" + "select value from system.zookeeper where path='/test/sync_replica/' and name='max_log_ptr'" ) assert lp1 == max_lp assert lp2 == max_lp + main_node.query("DROP DATABASE test_sync_database SYNC") + dummy_node.query("DROP DATABASE test_sync_database SYNC") + def test_force_synchronous_settings(started_cluster): main_node.query( From 4457ebab48ab60d8cae6838a40e73f6e72c8b08e Mon Sep 17 00:00:00 2001 From: Dan Roscigno Date: Thu, 2 Mar 2023 12:31:56 -0500 Subject: [PATCH 435/841] Update docs/en/sql-reference/functions/date-time-functions.md Co-authored-by: Ilya Yatsishin <2159081+qoega@users.noreply.github.com> --- docs/en/sql-reference/functions/date-time-functions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/sql-reference/functions/date-time-functions.md b/docs/en/sql-reference/functions/date-time-functions.md index a6043d2507e..9dd6ef63ec1 100644 --- a/docs/en/sql-reference/functions/date-time-functions.md +++ b/docs/en/sql-reference/functions/date-time-functions.md @@ -1156,7 +1156,7 @@ SELECT ## toYYYYMMDDhhmmss -Converts a date or date with time to a UInt64 number containing the year and month number (YYYY \* 10000000000 + MM \* 100000000 + DD \* 1000000 + hh \* 10000 + mm \* 100 + ss). Accepts a second optional timezone argument. If provided, the timezone must be a string constant. +Converts a date or date with time to a UInt64 number containing the year and month number (YYYY \* 10000000000 + MM \* 100000000 + DD \* 1000000 + hh \* 10000 + mm \* 100 + ss). Accepts a second optional timezone argument. If provided, the timezone must be a string constant. ### example ```sql From fdcbec4fee7df1bb5a51249cef96964b5245c822 Mon Sep 17 00:00:00 2001 From: robot-clickhouse Date: Thu, 2 Mar 2023 17:35:56 +0000 Subject: [PATCH 436/841] Automatic style fix --- .../test_replicated_database/test.py | 57 ++++++++++++++----- 1 file changed, 43 insertions(+), 14 deletions(-) diff --git a/tests/integration/test_replicated_database/test.py b/tests/integration/test_replicated_database/test.py index c71c76244ce..2ab2fe499ff 100644 --- a/tests/integration/test_replicated_database/test.py +++ b/tests/integration/test_replicated_database/test.py @@ -118,11 +118,13 @@ def test_create_replicated_table(started_cluster): "ENGINE = ReplicatedMergeTree(\\'/clickhouse/tables/{uuid}/{shard}\\', \\'{replica}\\')\\n" "PARTITION BY toYYYYMM(d)\\nORDER BY k\\nSETTINGS index_granularity = 8192" ) - assert_create_query([main_node, dummy_node], "create_replicated_table.replicated_table", expected) - # assert without replacing uuid - assert main_node.query("show create create_replicated_table.replicated_table") == dummy_node.query( - "show create create_replicated_table.replicated_table" + assert_create_query( + [main_node, dummy_node], "create_replicated_table.replicated_table", expected ) + # assert without replacing uuid + assert main_node.query( + "show create create_replicated_table.replicated_table" + ) == dummy_node.query("show create create_replicated_table.replicated_table") main_node.query("DROP DATABASE create_replicated_table SYNC") dummy_node.query("DROP DATABASE create_replicated_table SYNC") @@ -330,7 +332,10 @@ def test_alter_drop_part(started_cluster, engine): # The DROP operation is still replicated at the table engine level assert dummy_node.query(f"SELECT CounterID FROM alter_drop_part.{table}") == "" else: - assert dummy_node.query(f"SELECT CounterID FROM alter_drop_part.{table}") == "456\n" + assert ( + dummy_node.query(f"SELECT CounterID FROM alter_drop_part.{table}") + == "456\n" + ) main_node.query("DROP DATABASE alter_drop_part SYNC") dummy_node.query("DROP DATABASE alter_drop_part SYNC") @@ -379,11 +384,17 @@ def test_alter_drop_detached_part(started_cluster, engine): f"CREATE TABLE alter_drop_detached_part.{table} (CounterID UInt32) ENGINE = {engine} ORDER BY (CounterID)" ) main_node.query(f"INSERT INTO alter_drop_detached_part.{table} VALUES (123)") - main_node.query(f"ALTER TABLE alter_drop_detached_part.{table} DETACH PART '{part_name}'") + main_node.query( + f"ALTER TABLE alter_drop_detached_part.{table} DETACH PART '{part_name}'" + ) if engine == "MergeTree": dummy_node.query(f"INSERT INTO alter_drop_detached_part.{table} VALUES (456)") - dummy_node.query(f"ALTER TABLE alter_drop_detached_part.{table} DETACH PART '{part_name}'") - main_node.query(f"ALTER TABLE alter_drop_detached_part.{table} DROP DETACHED PART '{part_name}'") + dummy_node.query( + f"ALTER TABLE alter_drop_detached_part.{table} DETACH PART '{part_name}'" + ) + main_node.query( + f"ALTER TABLE alter_drop_detached_part.{table} DROP DETACHED PART '{part_name}'" + ) detached_parts_query = f"SELECT name FROM system.detached_parts WHERE database='alter_drop_detached_part' AND table='{table}'" assert main_node.query(detached_parts_query) == "" assert dummy_node.query(detached_parts_query) == f"{part_name}\n" @@ -524,7 +535,11 @@ def test_alters_from_different_replicas(started_cluster): "ENGINE = MergeTree\\nPARTITION BY toYYYYMM(StartDate)\\nORDER BY (CounterID, StartDate, intHash32(UserID), VisitID)\\nSETTINGS index_granularity = 8192" ) - assert_create_query([main_node, competing_node], "alters_from_different_replicas.concurrent_test", expected) + assert_create_query( + [main_node, competing_node], + "alters_from_different_replicas.concurrent_test", + expected, + ) # test_create_replica_after_delay main_node.query("DROP TABLE alters_from_different_replicas.concurrent_test SYNC") @@ -540,7 +555,11 @@ def test_alters_from_different_replicas(started_cluster): "ENGINE = ReplicatedMergeTree(\\'/clickhouse/tables/{uuid}/{shard}\\', \\'{replica}\\')\\nORDER BY CounterID\\nSETTINGS index_granularity = 8192" ) - assert_create_query([main_node, competing_node], "alters_from_different_replicas.concurrent_test", expected) + assert_create_query( + [main_node, competing_node], + "alters_from_different_replicas.concurrent_test", + expected, + ) main_node.query( "INSERT INTO alters_from_different_replicas.dist (CounterID, StartDate, UserID) SELECT number, addDays(toDate('2020-02-02'), number), intHash32(number) FROM numbers(10)" @@ -562,13 +581,17 @@ def test_alters_from_different_replicas(started_cluster): snapshot_recovering_node.query( "CREATE DATABASE alters_from_different_replicas ENGINE = Replicated('/test/alters_from_different_replicas', 'shard2', 'replica2');" ) - assert_create_query(all_nodes, "alters_from_different_replicas.concurrent_test", expected) + assert_create_query( + all_nodes, "alters_from_different_replicas.concurrent_test", expected + ) main_node.query("SYSTEM FLUSH DISTRIBUTED alters_from_different_replicas.dist") main_node.query( "ALTER TABLE alters_from_different_replicas.concurrent_test UPDATE StartDate = addYears(StartDate, 1) WHERE 1" ) - res = main_node.query("ALTER TABLE alters_from_different_replicas.concurrent_test DELETE WHERE UserID % 2") + res = main_node.query( + "ALTER TABLE alters_from_different_replicas.concurrent_test DELETE WHERE UserID % 2" + ) assert ( "shard1\treplica1\tOK" in res and "shard1\treplica2\tOK" in res @@ -602,8 +625,14 @@ def test_alters_from_different_replicas(started_cluster): "ENGINE = ReplicatedMergeTree(\\'/clickhouse/tables/{uuid}/{shard}\\', \\'{replica}\\')\\nORDER BY CounterID\\nSETTINGS index_granularity = 8192" ) - assert_create_query([main_node, competing_node], "alters_from_different_replicas.concurrent_test", expected) - assert_create_query(all_nodes, "alters_from_different_replicas.concurrent_test", expected) + assert_create_query( + [main_node, competing_node], + "alters_from_different_replicas.concurrent_test", + expected, + ) + assert_create_query( + all_nodes, "alters_from_different_replicas.concurrent_test", expected + ) for node in all_nodes: node.query("SYSTEM SYNC REPLICA alters_from_different_replicas.concurrent_test") From 167e4903a8f5b175d587efaed15c154ee0837991 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Thu, 2 Mar 2023 18:45:59 +0100 Subject: [PATCH 437/841] Fix concrete columns PREWHERE support This is the fix for the IStorage::supportedPrewhereColumns() API. Signed-off-by: Azat Khuzhin --- src/Interpreters/InterpreterSelectQuery.cpp | 3 +-- .../MergeTree/MergeTreeWhereOptimizer.cpp | 16 ++++++++++++++++ src/Storages/MergeTree/MergeTreeWhereOptimizer.h | 3 +++ ...rge_prewhere_different_default_kind.reference | 9 +++++---- ...575_merge_prewhere_different_default_kind.sql | 11 +++++++---- 5 files changed, 32 insertions(+), 10 deletions(-) diff --git a/src/Interpreters/InterpreterSelectQuery.cpp b/src/Interpreters/InterpreterSelectQuery.cpp index 318ea5fdf42..a4eed606de1 100644 --- a/src/Interpreters/InterpreterSelectQuery.cpp +++ b/src/Interpreters/InterpreterSelectQuery.cpp @@ -593,8 +593,6 @@ InterpreterSelectQuery::InterpreterSelectQuery( Names queried_columns = syntax_analyzer_result->requiredSourceColumns(); const auto & supported_prewhere_columns = storage->supportedPrewhereColumns(); - if (supported_prewhere_columns.has_value()) - std::erase_if(queried_columns, [&](const auto & name) { return !supported_prewhere_columns->contains(name); }); MergeTreeWhereOptimizer{ current_info, @@ -602,6 +600,7 @@ InterpreterSelectQuery::InterpreterSelectQuery( std::move(column_compressed_sizes), metadata_snapshot, queried_columns, + supported_prewhere_columns, log}; } } diff --git a/src/Storages/MergeTree/MergeTreeWhereOptimizer.cpp b/src/Storages/MergeTree/MergeTreeWhereOptimizer.cpp index 3a866cc8934..fdddc29048b 100644 --- a/src/Storages/MergeTree/MergeTreeWhereOptimizer.cpp +++ b/src/Storages/MergeTree/MergeTreeWhereOptimizer.cpp @@ -32,10 +32,12 @@ MergeTreeWhereOptimizer::MergeTreeWhereOptimizer( std::unordered_map column_sizes_, const StorageMetadataPtr & metadata_snapshot, const Names & queried_columns_, + const std::optional & supported_columns_, Poco::Logger * log_) : table_columns{collections::map( metadata_snapshot->getColumns().getAllPhysical(), [](const NameAndTypePair & col) { return col.name; })} , queried_columns{queried_columns_} + , supported_columns{supported_columns_} , sorting_key_names{NameSet( metadata_snapshot->getSortingKey().column_names.begin(), metadata_snapshot->getSortingKey().column_names.end())} , block_with_constants{KeyCondition::getBlockWithConstants(query_info.query->clone(), query_info.syntax_analyzer_result, context)} @@ -195,6 +197,8 @@ void MergeTreeWhereOptimizer::analyzeImpl(Conditions & res, const ASTPtr & node, && (!is_final || isExpressionOverSortingKey(node)) /// Only table columns are considered. Not array joined columns. NOTE We're assuming that aliases was expanded. && isSubsetOfTableColumns(cond.identifiers) + /// Some identifiers can unable to support PREWHERE (usually because of different types in Merge engine) + && identifiersSupportsPrewhere(cond.identifiers) /// Do not move conditions involving all queried columns. && cond.identifiers.size() < queried_columns.size(); @@ -321,6 +325,18 @@ UInt64 MergeTreeWhereOptimizer::getIdentifiersColumnSize(const NameSet & identif return size; } +bool MergeTreeWhereOptimizer::identifiersSupportsPrewhere(const NameSet & identifiers) const +{ + if (!supported_columns.has_value()) + return true; + + for (const auto & identifier : identifiers) + if (!supported_columns->contains(identifier)) + return false; + + return true; +} + bool MergeTreeWhereOptimizer::isExpressionOverSortingKey(const ASTPtr & ast) const { if (const auto * func = ast->as()) diff --git a/src/Storages/MergeTree/MergeTreeWhereOptimizer.h b/src/Storages/MergeTree/MergeTreeWhereOptimizer.h index f37255bdbee..8953923542e 100644 --- a/src/Storages/MergeTree/MergeTreeWhereOptimizer.h +++ b/src/Storages/MergeTree/MergeTreeWhereOptimizer.h @@ -39,6 +39,7 @@ public: std::unordered_map column_sizes_, const StorageMetadataPtr & metadata_snapshot, const Names & queried_columns_, + const std::optional & supported_columns_, Poco::Logger * log_); private: @@ -82,6 +83,7 @@ private: void optimizeArbitrary(ASTSelectQuery & select) const; UInt64 getIdentifiersColumnSize(const NameSet & identifiers) const; + bool identifiersSupportsPrewhere(const NameSet & identifiers) const; bool isExpressionOverSortingKey(const ASTPtr & ast) const; @@ -105,6 +107,7 @@ private: const StringSet table_columns; const Names queried_columns; + const std::optional supported_columns; const NameSet sorting_key_names; const Block block_with_constants; Poco::Logger * log; diff --git a/tests/queries/0_stateless/02575_merge_prewhere_different_default_kind.reference b/tests/queries/0_stateless/02575_merge_prewhere_different_default_kind.reference index 32db2512eab..c17e235ddad 100644 --- a/tests/queries/0_stateless/02575_merge_prewhere_different_default_kind.reference +++ b/tests/queries/0_stateless/02575_merge_prewhere_different_default_kind.reference @@ -1,12 +1,13 @@ -- { echoOn } -- for pure PREWHERE it is not addressed yet. SELECT * FROM m PREWHERE a = 'OK'; -OK 0 +OK 1970-01-01 0 SELECT * FROM m PREWHERE f = 0; -- { serverError ILLEGAL_PREWHERE } SELECT * FROM m WHERE f = 0 SETTINGS optimize_move_to_prewhere=0; -OK 0 +OK 1970-01-01 0 SELECT * FROM m WHERE f = 0 SETTINGS optimize_move_to_prewhere=1; -OK 0 +OK 1970-01-01 0 -- { echoOn } SELECT * FROM m WHERE f = 0 SETTINGS optimize_move_to_prewhere=1; -OK 0 +OK 1970-01-01 0 +OK 1970-01-01 0 diff --git a/tests/queries/0_stateless/02575_merge_prewhere_different_default_kind.sql b/tests/queries/0_stateless/02575_merge_prewhere_different_default_kind.sql index 0f1d582a26e..88c7923a570 100644 --- a/tests/queries/0_stateless/02575_merge_prewhere_different_default_kind.sql +++ b/tests/queries/0_stateless/02575_merge_prewhere_different_default_kind.sql @@ -6,20 +6,22 @@ DROP TABLE IF EXISTS t2; CREATE TABLE m ( - `a` String, - `f` UInt8 + a String, + date Date, + f UInt8 ) ENGINE = Merge(currentDatabase(), '^(t1|t2)$'); CREATE TABLE t1 ( a String, + date Date, f UInt8 ALIAS 0 ) ENGINE = MergeTree ORDER BY tuple() SETTINGS index_granularity = 8192; -INSERT INTO t1 VALUES ('OK'); +INSERT INTO t1 (a) VALUES ('OK'); -- { echoOn } -- for pure PREWHERE it is not addressed yet. @@ -32,12 +34,13 @@ SELECT * FROM m WHERE f = 0 SETTINGS optimize_move_to_prewhere=1; CREATE TABLE t2 ( a String, + date Date, f UInt8, ) ENGINE = MergeTree ORDER BY tuple() SETTINGS index_granularity = 8192; -INSERT INTO t2 VALUES ('OK', 1); +INSERT INTO t2 (a) VALUES ('OK'); -- { echoOn } SELECT * FROM m WHERE f = 0 SETTINGS optimize_move_to_prewhere=1; From a0a40fb0575582ade22514dd9d95f20db887ae8b Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Thu, 2 Mar 2023 17:51:43 +0000 Subject: [PATCH 438/841] nam --> name --- tests/ci/compatibility_check.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ci/compatibility_check.py b/tests/ci/compatibility_check.py index 398f3df3deb..688fe883c1e 100644 --- a/tests/ci/compatibility_check.py +++ b/tests/ci/compatibility_check.py @@ -210,7 +210,7 @@ def main(): max_glibc_version = "" if "x86" in args.check_name: max_glibc_version = "2.4" - elif "aarch64" in args.check_nam: + elif "aarch64" in args.check_name: max_glibc_version = "2.18" # because of build with newer sysroot? else: raise Exception("Can't determine max glibc version") From 2db7df61537e1eb25f356d7d7625f2907721d257 Mon Sep 17 00:00:00 2001 From: Dan Roscigno Date: Thu, 2 Mar 2023 12:55:04 -0500 Subject: [PATCH 439/841] Update docs/en/sql-reference/functions/date-time-functions.md Co-authored-by: Ilya Yatsishin <2159081+qoega@users.noreply.github.com> --- docs/en/sql-reference/functions/date-time-functions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/sql-reference/functions/date-time-functions.md b/docs/en/sql-reference/functions/date-time-functions.md index 41e50977bba..1b75ceaa9b4 100644 --- a/docs/en/sql-reference/functions/date-time-functions.md +++ b/docs/en/sql-reference/functions/date-time-functions.md @@ -1126,7 +1126,7 @@ Rounds the time to the half hour. ## toYYYYMM -Converts a date or date with time to a UInt32 number containing the year and month number (YYYY \* 100 + MM). Accepts a second optional timezone argument. If provided, the timezone must be a string constant. +Converts a date or date with time to a UInt32 number containing the year and month number (YYYY \* 100 + MM). Accepts a second optional timezone argument. If provided, the timezone must be a string constant. ### example ```sql From 9cb70723d1afd51b57e8010720dd3f47e88e23bc Mon Sep 17 00:00:00 2001 From: Dan Roscigno Date: Thu, 2 Mar 2023 12:55:16 -0500 Subject: [PATCH 440/841] Update docs/en/sql-reference/functions/date-time-functions.md Co-authored-by: Ilya Yatsishin <2159081+qoega@users.noreply.github.com> --- docs/en/sql-reference/functions/date-time-functions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/sql-reference/functions/date-time-functions.md b/docs/en/sql-reference/functions/date-time-functions.md index 1b75ceaa9b4..0892f0d7ef7 100644 --- a/docs/en/sql-reference/functions/date-time-functions.md +++ b/docs/en/sql-reference/functions/date-time-functions.md @@ -1141,7 +1141,7 @@ SELECT ## toYYYYMMDD -Converts a date or date with time to a UInt32 number containing the year and month number (YYYY \* 10000 + MM \* 100 + DD). Accepts a second optional timezone argument. If provided, the timezone must be a string constant. +Converts a date or date with time to a UInt32 number containing the year and month number (YYYY \* 10000 + MM \* 100 + DD). Accepts a second optional timezone argument. If provided, the timezone must be a string constant. ### example ```sql From fbabba78c905cca5b1c24ae4fdd2503f5870a146 Mon Sep 17 00:00:00 2001 From: Dan Roscigno Date: Thu, 2 Mar 2023 12:55:23 -0500 Subject: [PATCH 441/841] Update docs/en/sql-reference/functions/date-time-functions.md Co-authored-by: Ilya Yatsishin <2159081+qoega@users.noreply.github.com> --- docs/en/sql-reference/functions/date-time-functions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/sql-reference/functions/date-time-functions.md b/docs/en/sql-reference/functions/date-time-functions.md index 0892f0d7ef7..ef0475027dd 100644 --- a/docs/en/sql-reference/functions/date-time-functions.md +++ b/docs/en/sql-reference/functions/date-time-functions.md @@ -1156,7 +1156,7 @@ SELECT ## toYYYYMMDDhhmmss -Converts a date or date with time to a UInt64 number containing the year and month number (YYYY \* 10000000000 + MM \* 100000000 + DD \* 1000000 + hh \* 10000 + mm \* 100 + ss). Accepts a second optional timezone argument. If provided, the timezone must be a string constant. +Converts a date or date with time to a UInt64 number containing the year and month number (YYYY \* 10000000000 + MM \* 100000000 + DD \* 1000000 + hh \* 10000 + mm \* 100 + ss). Accepts a second optional timezone argument. If provided, the timezone must be a string constant. ### example ```sql From a6c2473518bf78d4ccfa2f06f2621a09d3f4d092 Mon Sep 17 00:00:00 2001 From: Sema Checherinda Date: Wed, 1 Mar 2023 18:16:03 +0100 Subject: [PATCH 442/841] do flushUntrackedMemory when context swith --- src/Common/CurrentThread.cpp | 3 +-- src/Common/ThreadStatus.cpp | 6 ++++++ src/Common/ThreadStatus.h | 2 ++ src/Interpreters/ThreadStatusExt.cpp | 4 +++- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/Common/CurrentThread.cpp b/src/Common/CurrentThread.cpp index 526e28c043d..90483171304 100644 --- a/src/Common/CurrentThread.cpp +++ b/src/Common/CurrentThread.cpp @@ -129,8 +129,7 @@ void CurrentThread::flushUntrackedMemory() if (current_thread->untracked_memory == 0) return; - current_thread->memory_tracker.adjustWithUntrackedMemory(current_thread->untracked_memory); - current_thread->untracked_memory = 0; + current_thread->flushUntrackedMemory(); } } diff --git a/src/Common/ThreadStatus.cpp b/src/Common/ThreadStatus.cpp index 46c171b5cb6..da723f5c89d 100644 --- a/src/Common/ThreadStatus.cpp +++ b/src/Common/ThreadStatus.cpp @@ -144,6 +144,12 @@ ThreadStatus::ThreadStatus() #endif } +void ThreadStatus::flushUntrackedMemory() +{ + memory_tracker.adjustWithUntrackedMemory(untracked_memory); + untracked_memory = 0; +} + ThreadStatus::~ThreadStatus() { memory_tracker.adjustWithUntrackedMemory(untracked_memory); diff --git a/src/Common/ThreadStatus.h b/src/Common/ThreadStatus.h index 20550a63312..e620413c8eb 100644 --- a/src/Common/ThreadStatus.h +++ b/src/Common/ThreadStatus.h @@ -290,6 +290,8 @@ public: void logToQueryViewsLog(const ViewRuntimeData & vinfo); + void flushUntrackedMemory(); + protected: void applyQuerySettings(); diff --git a/src/Interpreters/ThreadStatusExt.cpp b/src/Interpreters/ThreadStatusExt.cpp index 84400fc3711..b22748e84ae 100644 --- a/src/Interpreters/ThreadStatusExt.cpp +++ b/src/Interpreters/ThreadStatusExt.cpp @@ -352,8 +352,10 @@ void ThreadStatus::detachQuery(bool exit_if_already_detached, bool thread_exits) thread_group->threads.erase(this); } performance_counters.setParent(&ProfileEvents::global_counters); - memory_tracker.reset(); + flushUntrackedMemory(); + + memory_tracker.reset(); memory_tracker.setParent(thread_group->memory_tracker.getParent()); query_id.clear(); From 7a9f4aab8ed435008e35b2cb73f634da50fb0630 Mon Sep 17 00:00:00 2001 From: Sema Checherinda Date: Thu, 2 Mar 2023 19:16:42 +0100 Subject: [PATCH 443/841] do not call adjustWithUntrackedMemory when untracked_memory is 0 --- src/Common/CurrentThread.cpp | 3 --- src/Common/ThreadStatus.cpp | 5 ++++- src/Storages/MergeTree/MergeList.cpp | 7 +++++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/Common/CurrentThread.cpp b/src/Common/CurrentThread.cpp index 90483171304..c10d5dbc68c 100644 --- a/src/Common/CurrentThread.cpp +++ b/src/Common/CurrentThread.cpp @@ -126,9 +126,6 @@ void CurrentThread::flushUntrackedMemory() { if (unlikely(!current_thread)) return; - if (current_thread->untracked_memory == 0) - return; - current_thread->flushUntrackedMemory(); } diff --git a/src/Common/ThreadStatus.cpp b/src/Common/ThreadStatus.cpp index da723f5c89d..407343aa268 100644 --- a/src/Common/ThreadStatus.cpp +++ b/src/Common/ThreadStatus.cpp @@ -146,13 +146,16 @@ ThreadStatus::ThreadStatus() void ThreadStatus::flushUntrackedMemory() { + if (untracked_memory == 0) + return; + memory_tracker.adjustWithUntrackedMemory(untracked_memory); untracked_memory = 0; } ThreadStatus::~ThreadStatus() { - memory_tracker.adjustWithUntrackedMemory(untracked_memory); + flushUntrackedMemory(); if (thread_group) { diff --git a/src/Storages/MergeTree/MergeList.cpp b/src/Storages/MergeTree/MergeList.cpp index 76d69cc6b7d..fa1887a02e6 100644 --- a/src/Storages/MergeTree/MergeList.cpp +++ b/src/Storages/MergeTree/MergeList.cpp @@ -144,8 +144,11 @@ MergeInfo MergeListElement::getInfo() const MergeListElement::~MergeListElement() { - CurrentThread::getMemoryTracker()->adjustWithUntrackedMemory(untracked_memory); - untracked_memory = 0; + if (untracked_memory != 0) + { + CurrentThread::getMemoryTracker()->adjustWithUntrackedMemory(untracked_memory); + untracked_memory = 0; + } } From edd238273c4d6d0a6462c6f2bc0e7d7656169bf1 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Thu, 2 Mar 2023 19:51:05 +0100 Subject: [PATCH 444/841] fix another bug in client --- src/Client/ClientBase.cpp | 4 ++-- src/Server/TCPHandler.cpp | 3 +++ .../0_stateless/02232_dist_insert_send_logs_level_hung.sh | 2 +- .../0_stateless/02434_cancel_insert_when_client_dies.sh | 3 ++- .../queries/0_stateless/02435_rollback_cancelled_queries.sh | 5 +++-- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/Client/ClientBase.cpp b/src/Client/ClientBase.cpp index 96aff9aa304..53eb5080130 100644 --- a/src/Client/ClientBase.cpp +++ b/src/Client/ClientBase.cpp @@ -1360,7 +1360,7 @@ void ClientBase::sendData(Block & sample, const ColumnsDescription & columns_des throw; } - if (have_data_in_stdin) + if (have_data_in_stdin && !cancelled) sendDataFromStdin(sample, columns_description_for_query, parsed_query); } else if (parsed_insert_query->data) @@ -1370,7 +1370,7 @@ void ClientBase::sendData(Block & sample, const ColumnsDescription & columns_des try { sendDataFrom(data_in, sample, columns_description_for_query, parsed_query, have_data_in_stdin); - if (have_data_in_stdin) + if (have_data_in_stdin && !cancelled) sendDataFromStdin(sample, columns_description_for_query, parsed_query); } catch (Exception & e) diff --git a/src/Server/TCPHandler.cpp b/src/Server/TCPHandler.cpp index a1ef7a98992..768f16a09e0 100644 --- a/src/Server/TCPHandler.cpp +++ b/src/Server/TCPHandler.cpp @@ -1335,6 +1335,7 @@ bool TCPHandler::receivePacket() std::this_thread::sleep_for(ms); } + LOG_INFO(log, "Received 'Cancel' packet from the client, canceling the query"); state.is_cancelled = true; return false; @@ -1378,6 +1379,7 @@ String TCPHandler::receiveReadTaskResponseAssumeLocked() { if (packet_type == Protocol::Client::Cancel) { + LOG_INFO(log, "Received 'Cancel' packet from the client, canceling the read task"); state.is_cancelled = true; /// For testing connection collector. if (unlikely(sleep_in_receive_cancel.totalMilliseconds())) @@ -1411,6 +1413,7 @@ std::optional TCPHandler::receivePartitionMergeTreeReadTas { if (packet_type == Protocol::Client::Cancel) { + LOG_INFO(log, "Received 'Cancel' packet from the client, canceling the MergeTree read task"); state.is_cancelled = true; /// For testing connection collector. if (unlikely(sleep_in_receive_cancel.totalMilliseconds())) diff --git a/tests/queries/0_stateless/02232_dist_insert_send_logs_level_hung.sh b/tests/queries/0_stateless/02232_dist_insert_send_logs_level_hung.sh index 322e7e73991..5ed94148bc1 100755 --- a/tests/queries/0_stateless/02232_dist_insert_send_logs_level_hung.sh +++ b/tests/queries/0_stateless/02232_dist_insert_send_logs_level_hung.sh @@ -49,7 +49,7 @@ insert_client_opts=( timeout 250s $CLICKHOUSE_CLIENT "${client_opts[@]}" "${insert_client_opts[@]}" -q "insert into function remote('127.2', currentDatabase(), in_02232) select * from numbers(1e6)" # Kill underlying query of remote() to make KILL faster -timeout 30s $CLICKHOUSE_CLIENT "${client_opts[@]}" -q "KILL QUERY WHERE Settings['log_comment'] = '$CLICKHOUSE_LOG_COMMENT' SYNC" --format Null +timeout 60s $CLICKHOUSE_CLIENT "${client_opts[@]}" -q "KILL QUERY WHERE Settings['log_comment'] = '$CLICKHOUSE_LOG_COMMENT' SYNC" --format Null echo $? $CLICKHOUSE_CLIENT "${client_opts[@]}" -nm -q " diff --git a/tests/queries/0_stateless/02434_cancel_insert_when_client_dies.sh b/tests/queries/0_stateless/02434_cancel_insert_when_client_dies.sh index c4d7367ba14..85aa992d98c 100755 --- a/tests/queries/0_stateless/02434_cancel_insert_when_client_dies.sh +++ b/tests/queries/0_stateless/02434_cancel_insert_when_client_dies.sh @@ -93,5 +93,6 @@ $CLICKHOUSE_CLIENT -q 'system flush logs' # Ensure that thread_cancel actually did something $CLICKHOUSE_CLIENT -q "select count() > 0 from system.text_log where event_date >= yesterday() and query_id like '$TEST_MARK%' and ( - message_format_string in ('Unexpected end of file while reading chunk header of HTTP chunked data', 'Unexpected EOF, got {} of {} bytes') or + message_format_string in ('Unexpected end of file while reading chunk header of HTTP chunked data', 'Unexpected EOF, got {} of {} bytes', + 'Query was cancelled or a client has unexpectedly dropped the connection') or message like '%Connection reset by peer%' or message like '%Broken pipe, while writing to socket%')" diff --git a/tests/queries/0_stateless/02435_rollback_cancelled_queries.sh b/tests/queries/0_stateless/02435_rollback_cancelled_queries.sh index 7c7ef037e02..408743d395b 100755 --- a/tests/queries/0_stateless/02435_rollback_cancelled_queries.sh +++ b/tests/queries/0_stateless/02435_rollback_cancelled_queries.sh @@ -47,7 +47,7 @@ function insert_data fi if [[ "$IMPLICIT" -eq 0 ]]; then - $CLICKHOUSE_CURL -sS -d 'commit' "$CLICKHOUSE_URL&$TXN_SETTINGS&close_session=1" | grep -Faq "Transaction is not in RUNNING state" && $CLICKHOUSE_CURL -sS -d 'rollback' "$CLICKHOUSE_URL&$TXN_SETTINGS" + $CLICKHOUSE_CURL -sS -d 'commit' "$CLICKHOUSE_URL&$TXN_SETTINGS&close_session=1" fi } @@ -109,7 +109,8 @@ $CLICKHOUSE_CLIENT --implicit_transaction=1 -q 'select throwIf(count() % 1000000 # Ensure that thread_cancel actually did something $CLICKHOUSE_CLIENT -q "select count() > 0 from system.text_log where event_date >= yesterday() and query_id like '$TEST_MARK%' and ( - message_format_string in ('Unexpected end of file while reading chunk header of HTTP chunked data', 'Unexpected EOF, got {} of {} bytes') or + message_format_string in ('Unexpected end of file while reading chunk header of HTTP chunked data', 'Unexpected EOF, got {} of {} bytes', + 'Query was cancelled or a client has unexpectedly dropped the connection') or message like '%Connection reset by peer%' or message like '%Broken pipe, while writing to socket%')" wait_for_queries_to_finish 30 From 547319eb371a7853a5703fcb780aec4e894dfc89 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Thu, 2 Mar 2023 19:53:47 +0100 Subject: [PATCH 445/841] fix --- tests/queries/0_stateless/02435_rollback_cancelled_queries.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/queries/0_stateless/02435_rollback_cancelled_queries.sh b/tests/queries/0_stateless/02435_rollback_cancelled_queries.sh index 408743d395b..e4aec6503a4 100755 --- a/tests/queries/0_stateless/02435_rollback_cancelled_queries.sh +++ b/tests/queries/0_stateless/02435_rollback_cancelled_queries.sh @@ -62,7 +62,7 @@ function thread_insert # supress "Killed" messages from bash while true; do export ID="$TEST_MARK$RANDOM" - bash -c insert_data 2>&1| grep -Fav "Killed" + bash -c insert_data 2>&1| grep -Fav "Killed" | grep -Fav "SESSION_IS_LOCKED" | grep -Fav "SESSION_NOT_FOUND" done } From e91cdb4f8df2f9340856a71b255d5b11b095d98e Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Thu, 2 Mar 2023 19:03:17 +0000 Subject: [PATCH 446/841] Add stupid retries in clickhouse-test health check. --- tests/clickhouse-test | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/clickhouse-test b/tests/clickhouse-test index 124eed01723..7da125bcbfa 100755 --- a/tests/clickhouse-test +++ b/tests/clickhouse-test @@ -94,7 +94,7 @@ class HTTPError(Exception): # Helpers to execute queries via HTTP interface. def clickhouse_execute_http( - base_args, query, timeout=30, settings=None, default_format=None, max_http_retries=5 + base_args, query, timeout=30, settings=None, default_format=None, max_http_retries=5, retry_error_codes=False ): if args.secure: client = http.client.HTTPSConnection( @@ -131,7 +131,8 @@ def clickhouse_execute_http( ) res = client.getresponse() data = res.read() - break + if res.status == 200 or (not retry_error_codes): + break except Exception as ex: if i == max_http_retries - 1: raise ex @@ -143,8 +144,8 @@ def clickhouse_execute_http( return data -def clickhouse_execute(base_args, query, timeout=30, settings=None, max_http_retries=5): - return clickhouse_execute_http(base_args, query, timeout, settings, max_http_retries=max_http_retries).strip() +def clickhouse_execute(base_args, query, timeout=30, settings=None, max_http_retries=5, retry_error_codes=False): + return clickhouse_execute_http(base_args, query, timeout, settings, max_http_retries=max_http_retries, retry_error_codes=retry_error_codes).strip() def clickhouse_execute_json(base_args, query, timeout=60, settings=None, max_http_retries=5): @@ -1078,7 +1079,7 @@ class TestCase: @staticmethod def send_test_name_failed(suite: str, case: str): pid = os.getpid() - clickhouse_execute(args, f"SELECT 'Running test {suite}/{case} from pid={pid}'") + clickhouse_execute(args, f"SELECT 'Running test {suite}/{case} from pid={pid}'", retry_error_codes=True) def run_single_test( self, server_logs_level, client_options From 31bc032e0b71e5373b14338622e7d7b2dd7b6d18 Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Thu, 2 Mar 2023 19:23:00 +0000 Subject: [PATCH 447/841] Docs: Cleanup default value docs --- .../sql-reference/statements/create/table.md | 33 +++++++++---------- src/Interpreters/InterpreterInsertQuery.cpp | 4 +-- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/docs/en/sql-reference/statements/create/table.md b/docs/en/sql-reference/statements/create/table.md index 54977e1b0ab..4bb6430eff6 100644 --- a/docs/en/sql-reference/statements/create/table.md +++ b/docs/en/sql-reference/statements/create/table.md @@ -112,23 +112,21 @@ See also [data_type_default_nullable](../../../operations/settings/settings.md#d ## Default Values -The column description can specify an expression for a default value, in one of the following ways: `DEFAULT expr`, `MATERIALIZED expr`, `ALIAS expr`. +The column description can specify a default value expression in the form of `DEFAULT expr`, `MATERIALIZED expr`, or `ALIAS expr`. Example: `URLDomain String DEFAULT domain(URL)`. -Example: `URLDomain String DEFAULT domain(URL)`. +The expression `expr` is optional. If it is omitted, the column type must be specified explicitly and the default value will be `0` for numeric columns, `''` (the empty string) for string columns, `[]` (the empty array) for array columns, `1970-01-01` for date columns, or `NULL` for nullable columns. -If an expression for the default value is not defined, the default values will be set to zeros for numbers, empty strings for strings, empty arrays for arrays, and `1970-01-01` for dates or zero unix timestamp for DateTime, NULL for Nullable. +The column type of a default value column can be omitted in which case it is infered from `expr`'s type. For example the type of column `EventDate DEFAULT toDate(EventTime)` will be date. -If the default expression is defined, the column type is optional. If there isn’t an explicitly defined type, the default expression type is used. Example: `EventDate DEFAULT toDate(EventTime)` – the ‘Date’ type will be used for the ‘EventDate’ column. +If both a data type and a default value expression are specified, an implicit type casting function inserted which converts the expression to the specified type. Example: `Hits UInt32 DEFAULT 0` is internally represented as `Hits UInt32 DEFAULT toUInt32(0)`. -If the data type and default expression are defined explicitly, this expression will be cast to the specified type using type casting functions. Example: `Hits UInt32 DEFAULT 0` means the same thing as `Hits UInt32 DEFAULT toUInt32(0)`. - -Default expressions may be defined as an arbitrary expression from table constants and columns. When creating and changing the table structure, it checks that expressions do not contain loops. For INSERT, it checks that expressions are resolvable – that all columns they can be calculated from have been passed. +A default value expression `expr` may reference arbitrary table columns and constants. ClickHouse checks that changes of the table structure do not introduce loops in the expression calculation. For INSERT, it checks that expressions are resolvable – that all columns they can be calculated from have been passed. ### DEFAULT `DEFAULT expr` -Normal default value. If the INSERT query does not specify the corresponding column, it will be filled in by computing the corresponding expression. +Normal default value. If the value of such a column is not specified in an INSERT query, it is computed from `expr`. Example: @@ -154,9 +152,9 @@ SELECT * FROM test; `MATERIALIZED expr` -Materialized expression. Such a column can’t be specified for INSERT, because it is always calculated. -For an INSERT without a list of columns, these columns are not considered. -In addition, this column is not substituted when using an asterisk in a SELECT query. This is to preserve the invariant that the dump obtained using `SELECT *` can be inserted back into the table using INSERT without specifying the list of columns. +Materialized expression. Values of such columns are always calculated, they cannot be specified in INSERT queries. + +Also, default value columns of this type are not included in the result of `SELECT *`. This is to preserve the invariant that the result of a `SELECT *` can always be inserted back into the table using `INSERT`. This behavior can be disabled with setting `asterisk_include_materialized_columns`. Example: @@ -192,8 +190,9 @@ SELECT * FROM test SETTINGS asterisk_include_materialized_columns=1; `EPHEMERAL [expr]` -Ephemeral column. Such a column isn't stored in the table and cannot be SELECTed, but can be referenced in the defaults of CREATE statement. If `expr` is omitted type for column is required. -INSERT without list of columns will skip such column, so SELECT/INSERT invariant is preserved - the dump obtained using `SELECT *` can be inserted back into the table using INSERT without specifying the list of columns. +Ephemeral column. Columns of this type are not stored in the table and it is not possible to SELECT from them. The only purpose of ephemeral columns is to build default value expressions of other columns from them. + +An insert without explicitly specified columns will skip columns of this type. This is to preserve the invariant that the result of a `SELECT *` can always be inserted back into the table using `INSERT`. Example: @@ -205,7 +204,7 @@ CREATE OR REPLACE TABLE test hexed FixedString(4) DEFAULT unhex(unhexed) ) ENGINE = MergeTree -ORDER BY id +ORDER BY id; INSERT INTO test (id, unhexed) Values (1, '5a90b714'); @@ -227,9 +226,9 @@ hex(hexed): 5A90B714 `ALIAS expr` -Synonym. Such a column isn’t stored in the table at all. -Its values can’t be inserted in a table, and it is not substituted when using an asterisk in a SELECT query. -It can be used in SELECTs if the alias is expanded during query parsing. +Calculated columns (synonym). Column of this type are not stored in the table and it is not possible to INSERT values into them. + +When SELECT queries explicitly reference columns of this type, the value is computed at query time from `expr`. By default, `SELECT *` excludes ALIAS columns. This behavior can be disabled with setting `asteriks_include_alias_columns`. When using the ALTER query to add new columns, old data for these columns is not written. Instead, when reading old data that does not have values for the new columns, expressions are computed on the fly by default. However, if running the expressions requires different columns that are not indicated in the query, these columns will additionally be read, but only for the blocks of data that need it. diff --git a/src/Interpreters/InterpreterInsertQuery.cpp b/src/Interpreters/InterpreterInsertQuery.cpp index b4a19ea7403..3cae219fa60 100644 --- a/src/Interpreters/InterpreterInsertQuery.cpp +++ b/src/Interpreters/InterpreterInsertQuery.cpp @@ -161,7 +161,7 @@ Block InterpreterInsertQuery::getSampleBlock( if (table_sample_physical.has(current_name)) { if (!allow_materialized) - throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Cannot insert column {}, because it is MATERIALIZED column.", + throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Cannot insert column {}, because it is a MATERIALIZED column", current_name); res.insert(ColumnWithTypeAndName(table_sample_physical.getByName(current_name).type, current_name)); } @@ -527,7 +527,7 @@ BlockIO InterpreterInsertQuery::execute() { for (const auto & column : metadata_snapshot->getColumns()) if (column.default_desc.kind == ColumnDefaultKind::Materialized && header.has(column.name)) - throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Cannot insert column {}, because it is MATERIALIZED column.", column.name); + throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Cannot insert column {}, because it is a MATERIALIZED column", column.name); } res.pipeline = QueryPipelineBuilder::getPipeline(std::move(pipeline)); From c848052c7cb00e776aaec7087f735c28ac8b878e Mon Sep 17 00:00:00 2001 From: avogar Date: Thu, 2 Mar 2023 19:25:50 +0000 Subject: [PATCH 448/841] Add test, rename some tests to fix order --- ...reference => 02581_width_bucket.reference} | 0 ...idth_bucket.sql => 02581_width_bucket.sql} | 0 ...join_subquery_empty_column_list.reference} | 0 ...lyzer_join_subquery_empty_column_list.sql} | 0 ..._async_reading_with_small_limit.reference} | 0 ... 02582_async_reading_with_small_limit.sql} | 0 ...rence => 02583_map_literal_cast.reference} | 0 ...al_cast.sql => 02583_map_literal_cast.sql} | 0 ...4.reference => 02584_range_ipv4.reference} | 0 ...74_range_ipv4.sql => 02584_range_ipv4.sql} | 0 .../02585_query_status_deadlock.reference | 0 .../02585_query_status_deadlock.sh | 24 +++++++++++++++++++ 12 files changed, 24 insertions(+) rename tests/queries/0_stateless/{25337_width_bucket.reference => 02581_width_bucket.reference} (100%) rename tests/queries/0_stateless/{25337_width_bucket.sql => 02581_width_bucket.sql} (100%) rename tests/queries/0_stateless/{25339_analyzer_join_subquery_empty_column_list.reference => 02582_analyzer_join_subquery_empty_column_list.reference} (100%) rename tests/queries/0_stateless/{25339_analyzer_join_subquery_empty_column_list.sql => 02582_analyzer_join_subquery_empty_column_list.sql} (100%) rename tests/queries/0_stateless/{02664_async_reading_with_small_limit.reference => 02582_async_reading_with_small_limit.reference} (100%) rename tests/queries/0_stateless/{02664_async_reading_with_small_limit.sql => 02582_async_reading_with_small_limit.sql} (100%) rename tests/queries/0_stateless/{02670_map_literal_cast.reference => 02583_map_literal_cast.reference} (100%) rename tests/queries/0_stateless/{02670_map_literal_cast.sql => 02583_map_literal_cast.sql} (100%) rename tests/queries/0_stateless/{02674_range_ipv4.reference => 02584_range_ipv4.reference} (100%) rename tests/queries/0_stateless/{02674_range_ipv4.sql => 02584_range_ipv4.sql} (100%) create mode 100644 tests/queries/0_stateless/02585_query_status_deadlock.reference create mode 100755 tests/queries/0_stateless/02585_query_status_deadlock.sh diff --git a/tests/queries/0_stateless/25337_width_bucket.reference b/tests/queries/0_stateless/02581_width_bucket.reference similarity index 100% rename from tests/queries/0_stateless/25337_width_bucket.reference rename to tests/queries/0_stateless/02581_width_bucket.reference diff --git a/tests/queries/0_stateless/25337_width_bucket.sql b/tests/queries/0_stateless/02581_width_bucket.sql similarity index 100% rename from tests/queries/0_stateless/25337_width_bucket.sql rename to tests/queries/0_stateless/02581_width_bucket.sql diff --git a/tests/queries/0_stateless/25339_analyzer_join_subquery_empty_column_list.reference b/tests/queries/0_stateless/02582_analyzer_join_subquery_empty_column_list.reference similarity index 100% rename from tests/queries/0_stateless/25339_analyzer_join_subquery_empty_column_list.reference rename to tests/queries/0_stateless/02582_analyzer_join_subquery_empty_column_list.reference diff --git a/tests/queries/0_stateless/25339_analyzer_join_subquery_empty_column_list.sql b/tests/queries/0_stateless/02582_analyzer_join_subquery_empty_column_list.sql similarity index 100% rename from tests/queries/0_stateless/25339_analyzer_join_subquery_empty_column_list.sql rename to tests/queries/0_stateless/02582_analyzer_join_subquery_empty_column_list.sql diff --git a/tests/queries/0_stateless/02664_async_reading_with_small_limit.reference b/tests/queries/0_stateless/02582_async_reading_with_small_limit.reference similarity index 100% rename from tests/queries/0_stateless/02664_async_reading_with_small_limit.reference rename to tests/queries/0_stateless/02582_async_reading_with_small_limit.reference diff --git a/tests/queries/0_stateless/02664_async_reading_with_small_limit.sql b/tests/queries/0_stateless/02582_async_reading_with_small_limit.sql similarity index 100% rename from tests/queries/0_stateless/02664_async_reading_with_small_limit.sql rename to tests/queries/0_stateless/02582_async_reading_with_small_limit.sql diff --git a/tests/queries/0_stateless/02670_map_literal_cast.reference b/tests/queries/0_stateless/02583_map_literal_cast.reference similarity index 100% rename from tests/queries/0_stateless/02670_map_literal_cast.reference rename to tests/queries/0_stateless/02583_map_literal_cast.reference diff --git a/tests/queries/0_stateless/02670_map_literal_cast.sql b/tests/queries/0_stateless/02583_map_literal_cast.sql similarity index 100% rename from tests/queries/0_stateless/02670_map_literal_cast.sql rename to tests/queries/0_stateless/02583_map_literal_cast.sql diff --git a/tests/queries/0_stateless/02674_range_ipv4.reference b/tests/queries/0_stateless/02584_range_ipv4.reference similarity index 100% rename from tests/queries/0_stateless/02674_range_ipv4.reference rename to tests/queries/0_stateless/02584_range_ipv4.reference diff --git a/tests/queries/0_stateless/02674_range_ipv4.sql b/tests/queries/0_stateless/02584_range_ipv4.sql similarity index 100% rename from tests/queries/0_stateless/02674_range_ipv4.sql rename to tests/queries/0_stateless/02584_range_ipv4.sql diff --git a/tests/queries/0_stateless/02585_query_status_deadlock.reference b/tests/queries/0_stateless/02585_query_status_deadlock.reference new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/queries/0_stateless/02585_query_status_deadlock.sh b/tests/queries/0_stateless/02585_query_status_deadlock.sh new file mode 100755 index 00000000000..92dd05ef46c --- /dev/null +++ b/tests/queries/0_stateless/02585_query_status_deadlock.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +# shellcheck source=../shell_config.sh +. "$CURDIR"/../shell_config.sh + +QUERY_ID="${CLICKHOUSE_DATABASE}_test_02585_query_to_kill_id_1" + +$CLICKHOUSE_CLIENT --query_id="$QUERY_ID" -n -q " +create temporary table tmp as select * from numbers(500000000); +select * from remote('127.0.0.2', 'system.numbers_mt') where number in (select * from tmp);" &> /dev/null & + + +while true +do + res=$($CLICKHOUSE_CLIENT -q "select query, event_time from system.query_log where query_id = '$QUERY_ID' and query like 'select%' limit 1") + if [ -n "$res" ]; then + break + fi + sleep 1 +done + +$CLICKHOUSE_CLIENT -q "kill query where query_id = '$QUERY_ID' sync" &> /dev/null + From 81b30021db077be76e9244ea92e5ec87a223a515 Mon Sep 17 00:00:00 2001 From: Salvatore Mesoraca Date: Thu, 2 Mar 2023 20:48:13 +0100 Subject: [PATCH 449/841] ActionsDAG: do not change result of and() during optimization - part 2 (#47028) --- src/Interpreters/ActionsDAG.cpp | 6 +++--- .../02674_and_consistency.reference | 4 ++++ .../0_stateless/02674_and_consistency.sql | 21 +++++++++++++++++++ 3 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 tests/queries/0_stateless/02674_and_consistency.reference create mode 100644 tests/queries/0_stateless/02674_and_consistency.sql diff --git a/src/Interpreters/ActionsDAG.cpp b/src/Interpreters/ActionsDAG.cpp index bfb010b6105..daba4c1608d 100644 --- a/src/Interpreters/ActionsDAG.cpp +++ b/src/Interpreters/ActionsDAG.cpp @@ -1946,7 +1946,7 @@ ActionsDAGPtr ActionsDAG::cloneActionsForFilterPushDown( } auto conjunction = getConjunctionNodes(predicate, allowed_nodes); - if (conjunction.rejected.size() == 1 && WhichDataType{conjunction.rejected.front()->result_type}.isFloat()) + if (conjunction.rejected.size() == 1 && WhichDataType{removeNullable(conjunction.rejected.front()->result_type)}.isFloat()) return nullptr; auto actions = cloneActionsForConjunction(conjunction.allowed, all_inputs); @@ -2014,7 +2014,7 @@ ActionsDAGPtr ActionsDAG::cloneActionsForFilterPushDown( node.children.swap(new_children); *predicate = std::move(node); } - else if (!WhichDataType{new_children.front()->result_type}.isFloat()) + else if (!WhichDataType{removeNullable(new_children.front()->result_type)}.isFloat()) { /// If type is different, cast column. /// This case is possible, cause AND can use any numeric type as argument. @@ -2045,7 +2045,7 @@ ActionsDAGPtr ActionsDAG::cloneActionsForFilterPushDown( /// remove the AND. /// Just update children and rebuild it. predicate->children.swap(new_children); - if (WhichDataType{predicate->children.front()->result_type}.isFloat()) + if (WhichDataType{removeNullable(predicate->children.front()->result_type)}.isFloat()) { Node node; node.type = ActionType::COLUMN; diff --git a/tests/queries/0_stateless/02674_and_consistency.reference b/tests/queries/0_stateless/02674_and_consistency.reference new file mode 100644 index 00000000000..e74ab1928c5 --- /dev/null +++ b/tests/queries/0_stateless/02674_and_consistency.reference @@ -0,0 +1,4 @@ +10 +#45218 +10 += diff --git a/tests/queries/0_stateless/02674_and_consistency.sql b/tests/queries/0_stateless/02674_and_consistency.sql new file mode 100644 index 00000000000..5988832ba68 --- /dev/null +++ b/tests/queries/0_stateless/02674_and_consistency.sql @@ -0,0 +1,21 @@ +SELECT SUM(number) +FROM +( + SELECT 10 AS number +) +GROUP BY number +HAVING 1 AND sin(SUMOrNull(number)) +SETTINGS enable_optimize_predicate_expression = 0; + +select '#45218'; + +SELECT SUM(number) +FROM +( + SELECT 10 AS number +) +GROUP BY cos(min2(number, number) % number) - number +HAVING ((-sign(-233841197)) IS NOT NULL) AND sin(lcm(SUM(number), SUM(number)) >= ('372497213' IS NOT NULL)) +SETTINGS aggregate_functions_null_for_empty = 1, enable_optimize_predicate_expression = 0; + +select '='; From d4c5ab9dcdcbbbbd4b0d3754385369147f2ede1a Mon Sep 17 00:00:00 2001 From: LiuNeng <1398775315@qq.com> Date: Fri, 3 Mar 2023 04:01:52 +0800 Subject: [PATCH 450/841] Optimize one nullable key aggregate performance (#45772) --- src/Common/ColumnsHashing.h | 82 +++++++++++------ src/Common/ColumnsHashingImpl.h | 49 +++++++++- src/Common/HashTable/TwoLevelStringHashMap.h | 2 +- src/Interpreters/Aggregator.cpp | 61 +++++++++--- src/Interpreters/Aggregator.h | 92 ++++++++++++++++--- src/Interpreters/JIT/compileFunction.cpp | 8 +- src/Interpreters/JIT/compileFunction.h | 2 +- tests/performance/groupby_onekey_nullable.xml | 49 ++++++++++ 8 files changed, 285 insertions(+), 60 deletions(-) create mode 100644 tests/performance/groupby_onekey_nullable.xml diff --git a/src/Common/ColumnsHashing.h b/src/Common/ColumnsHashing.h index 50db3977519..5ac6ca15812 100644 --- a/src/Common/ColumnsHashing.h +++ b/src/Common/ColumnsHashing.h @@ -16,7 +16,6 @@ #include #include - namespace DB { namespace ErrorCodes @@ -29,26 +28,42 @@ namespace ColumnsHashing /// For the case when there is one numeric key. /// UInt8/16/32/64 for any type with corresponding bit width. -template +template struct HashMethodOneNumber - : public columns_hashing_impl::HashMethodBase, Value, Mapped, use_cache, need_offset> + : public columns_hashing_impl::HashMethodBase, Value, Mapped, use_cache, need_offset, nullable> { - using Self = HashMethodOneNumber; - using Base = columns_hashing_impl::HashMethodBase; + using Self = HashMethodOneNumber; + using Base = columns_hashing_impl::HashMethodBase; static constexpr bool has_cheap_key_calculation = true; const char * vec; /// If the keys of a fixed length then key_sizes contains their lengths, empty otherwise. - HashMethodOneNumber(const ColumnRawPtrs & key_columns, const Sizes & /*key_sizes*/, const HashMethodContextPtr &) + HashMethodOneNumber(const ColumnRawPtrs & key_columns, const Sizes & /*key_sizes*/, const HashMethodContextPtr &) : Base(key_columns[0]) { - vec = key_columns[0]->getRawData().data(); + if constexpr (nullable) + { + const auto * null_column = checkAndGetColumn(key_columns[0]); + vec = null_column->getNestedColumnPtr()->getRawData().data(); + } + else + { + vec = key_columns[0]->getRawData().data(); + } } - explicit HashMethodOneNumber(const IColumn * column) + explicit HashMethodOneNumber(const IColumn * column) : Base(column) { - vec = column->getRawData().data(); + if constexpr (nullable) + { + const auto * null_column = checkAndGetColumn(column); + vec = null_column->getNestedColumnPtr()->getRawData().data(); + } + else + { + vec = column->getRawData().data(); + } } /// Creates context. Method is called once and result context is used in all threads. @@ -73,22 +88,30 @@ struct HashMethodOneNumber /// For the case when there is one string key. -template +template struct HashMethodString - : public columns_hashing_impl::HashMethodBase, Value, Mapped, use_cache, need_offset> + : public columns_hashing_impl::HashMethodBase, Value, Mapped, use_cache, need_offset, nullable> { - using Self = HashMethodString; - using Base = columns_hashing_impl::HashMethodBase; + using Self = HashMethodString; + using Base = columns_hashing_impl::HashMethodBase; static constexpr bool has_cheap_key_calculation = false; const IColumn::Offset * offsets; const UInt8 * chars; - HashMethodString(const ColumnRawPtrs & key_columns, const Sizes & /*key_sizes*/, const HashMethodContextPtr &) + HashMethodString(const ColumnRawPtrs & key_columns, const Sizes & /*key_sizes*/, const HashMethodContextPtr &) : Base(key_columns[0]) { - const IColumn & column = *key_columns[0]; - const ColumnString & column_string = assert_cast(column); + const IColumn * column; + if constexpr (nullable) + { + column = checkAndGetColumn(key_columns[0])->getNestedColumnPtr().get(); + } + else + { + column = key_columns[0]; + } + const ColumnString & column_string = assert_cast(*column); offsets = column_string.getOffsets().data(); chars = column_string.getChars().data(); } @@ -108,28 +131,35 @@ struct HashMethodString } protected: - friend class columns_hashing_impl::HashMethodBase; + friend class columns_hashing_impl::HashMethodBase; }; /// For the case when there is one fixed-length string key. -template +template struct HashMethodFixedString - : public columns_hashing_impl:: - HashMethodBase, Value, Mapped, use_cache, need_offset> + : public columns_hashing_impl::HashMethodBase, Value, Mapped, use_cache, need_offset, nullable> { - using Self = HashMethodFixedString; - using Base = columns_hashing_impl::HashMethodBase; + using Self = HashMethodFixedString; + using Base = columns_hashing_impl::HashMethodBase; static constexpr bool has_cheap_key_calculation = false; size_t n; const ColumnFixedString::Chars * chars; - HashMethodFixedString(const ColumnRawPtrs & key_columns, const Sizes & /*key_sizes*/, const HashMethodContextPtr &) + HashMethodFixedString(const ColumnRawPtrs & key_columns, const Sizes & /*key_sizes*/, const HashMethodContextPtr &) : Base(key_columns[0]) { - const IColumn & column = *key_columns[0]; - const ColumnFixedString & column_string = assert_cast(column); + const IColumn * column; + if constexpr (nullable) + { + column = checkAndGetColumn(key_columns[0])->getNestedColumnPtr().get(); + } + else + { + column = key_columns[0]; + } + const ColumnFixedString & column_string = assert_cast(*column); n = column_string.getN(); chars = &column_string.getChars(); } @@ -149,7 +179,7 @@ struct HashMethodFixedString } protected: - friend class columns_hashing_impl::HashMethodBase; + friend class columns_hashing_impl::HashMethodBase; }; diff --git a/src/Common/ColumnsHashingImpl.h b/src/Common/ColumnsHashingImpl.h index 03e7b0436e9..3240510ea9b 100644 --- a/src/Common/ColumnsHashingImpl.h +++ b/src/Common/ColumnsHashingImpl.h @@ -6,7 +6,6 @@ #include #include - namespace DB { namespace ErrorCodes @@ -140,7 +139,7 @@ public: FindResultImpl(bool found_, size_t off) : FindResultImplBase(found_), FindResultImplOffsetBase(off) {} }; -template +template class HashMethodBase { public: @@ -154,6 +153,19 @@ public: template ALWAYS_INLINE EmplaceResult emplaceKey(Data & data, size_t row, Arena & pool) { + if constexpr (nullable) + { + if (isNullAt(row)) + { + bool has_null_key = data.hasNullKeyData(); + data.hasNullKeyData() = true; + + if constexpr (has_mapped) + return EmplaceResult(data.getNullKeyData(), data.getNullKeyData(), !has_null_key); + else + return EmplaceResult(!has_null_key); + } + } auto key_holder = static_cast(*this).getKeyHolder(row, pool); return emplaceImpl(key_holder, data); } @@ -161,6 +173,16 @@ public: template ALWAYS_INLINE FindResult findKey(Data & data, size_t row, Arena & pool) { + if constexpr (nullable) + { + if (isNullAt(row)) + { + if constexpr (has_mapped) + return FindResult(&data.getNullKeyData(), data.hasNullKeyData(), 0); + else + return FindResult(data.hasNullKeyData(), 0); + } + } auto key_holder = static_cast(*this).getKeyHolder(row, pool); return findKeyImpl(keyHolderGetKey(key_holder), data); } @@ -172,10 +194,25 @@ public: return data.hash(keyHolderGetKey(key_holder)); } + ALWAYS_INLINE bool isNullAt(size_t row) const + { + if constexpr (nullable) + { + return null_map->getBool(row); + } + else + { + return false; + } + } + protected: Cache cache; + const IColumn * null_map = nullptr; + bool has_null_data = false; - HashMethodBase() + /// column argument only for nullable column + explicit HashMethodBase(const IColumn * column = nullptr) { if constexpr (consecutive_keys_optimization) { @@ -188,6 +225,11 @@ protected: else cache.value = Value(); } + if constexpr (nullable) + { + + null_map = &checkAndGetColumn(column)->getNullMapColumn(); + } } template @@ -293,7 +335,6 @@ protected: } }; - template struct MappedCache : public PaddedPODArray {}; diff --git a/src/Common/HashTable/TwoLevelStringHashMap.h b/src/Common/HashTable/TwoLevelStringHashMap.h index 6bd8f74dbd6..31b98a952c8 100644 --- a/src/Common/HashTable/TwoLevelStringHashMap.h +++ b/src/Common/HashTable/TwoLevelStringHashMap.h @@ -9,7 +9,7 @@ class TwoLevelStringHashMap : public TwoLevelStringHashTable, StringHashMap>; + using Base = TwoLevelStringHashTable, ImplTable>; using LookupResult = typename Base::LookupResult; using Base::Base; diff --git a/src/Interpreters/Aggregator.cpp b/src/Interpreters/Aggregator.cpp index 55e49eb8d19..229cb818735 100644 --- a/src/Interpreters/Aggregator.cpp +++ b/src/Interpreters/Aggregator.cpp @@ -775,6 +775,31 @@ AggregatedDataVariants::Type Aggregator::chooseAggregationMethod() if (has_nullable_key) { + /// Optimization for one key + if (params.keys_size == 1 && !has_low_cardinality) + { + if (types_removed_nullable[0]->isValueRepresentedByNumber()) + { + size_t size_of_field = types_removed_nullable[0]->getSizeOfValueInMemory(); + if (size_of_field == 1) + return AggregatedDataVariants::Type::nullable_key8; + if (size_of_field == 2) + return AggregatedDataVariants::Type::nullable_key16; + if (size_of_field == 4) + return AggregatedDataVariants::Type::nullable_key32; + if (size_of_field == 8) + return AggregatedDataVariants::Type::nullable_key64; + } + if (isFixedString(types_removed_nullable[0])) + { + return AggregatedDataVariants::Type::nullable_key_fixed_string; + } + if (isString(types_removed_nullable[0])) + { + return AggregatedDataVariants::Type::nullable_key_string; + } + } + if (params.keys_size == num_fixed_contiguous_keys && !has_low_cardinality) { /// Pack if possible all the keys along with information about which key values are nulls @@ -1889,7 +1914,7 @@ inline void Aggregator::insertAggregatesIntoColumns(Mapped & mapped, MutableColu template -Block Aggregator::insertResultsIntoColumns(PaddedPODArray & places, OutputBlockColumns && out_cols, Arena * arena) const +Block Aggregator::insertResultsIntoColumns(PaddedPODArray & places, OutputBlockColumns && out_cols, Arena * arena, bool has_null_key_data [[maybe_unused]]) const { std::exception_ptr exception; size_t aggregate_functions_destroy_index = 0; @@ -1912,8 +1937,12 @@ Block Aggregator::insertResultsIntoColumns(PaddedPODArray & pl continue; auto & final_aggregate_column = out_cols.final_aggregate_columns[i]; - final_aggregate_column = final_aggregate_column->cloneResized(places.size()); - columns_data.emplace_back(getColumnData(final_aggregate_column.get())); + /** + * In convertToBlockImplFinal, additional data with a key of null may be written, + * and additional memory for null data needs to be allocated when using the compiled function + */ + final_aggregate_column = final_aggregate_column->cloneResized(places.size() + (has_null_key_data ? 1 : 0)); + columns_data.emplace_back(getColumnData(final_aggregate_column.get(), (has_null_key_data ? 1 : 0))); } auto insert_aggregates_into_columns_function = compiled_functions.insert_aggregates_into_columns_function; @@ -1982,15 +2011,21 @@ Aggregator::convertToBlockImplFinal(Method & method, Table & data, Arena * arena std::optional out_cols; std::optional shuffled_key_sizes; PaddedPODArray places; + bool has_null_key_data = false; auto init_out_cols = [&]() { out_cols = prepareOutputBlockColumns(params, aggregate_functions, getHeader(final), aggregates_pools, final, max_block_size); - if constexpr (Method::low_cardinality_optimization) + if constexpr (Method::low_cardinality_optimization || Method::one_key_nullable_optimization) { + /** + * When one_key_nullable_optimization is enabled, null data will be written to the key column and result column in advance. + * And in insertResultsIntoColumns need to allocate memory for null data. + */ if (data.hasNullKeyData()) { + has_null_key_data = Method::one_key_nullable_optimization; out_cols->key_columns[0]->insertDefault(); insertAggregatesIntoColumns(data.getNullKeyData(), out_cols->final_aggregate_columns, arena); data.hasNullKeyData() = false; @@ -2022,7 +2057,7 @@ Aggregator::convertToBlockImplFinal(Method & method, Table & data, Arena * arena { if (places.size() >= max_block_size) { - res.emplace_back(insertResultsIntoColumns(places, std::move(out_cols.value()), arena)); + res.emplace_back(insertResultsIntoColumns(places, std::move(out_cols.value()), arena, has_null_key_data)); places.clear(); out_cols.reset(); } @@ -2031,12 +2066,12 @@ Aggregator::convertToBlockImplFinal(Method & method, Table & data, Arena * arena if constexpr (return_single_block) { - return insertResultsIntoColumns(places, std::move(out_cols.value()), arena); + return insertResultsIntoColumns(places, std::move(out_cols.value()), arena, has_null_key_data); } else { if (out_cols.has_value()) - res.emplace_back(insertResultsIntoColumns(places, std::move(out_cols.value()), arena)); + res.emplace_back(insertResultsIntoColumns(places, std::move(out_cols.value()), arena, has_null_key_data)); return res; } } @@ -2056,7 +2091,7 @@ Aggregator::convertToBlockImplNotFinal(Method & method, Table & data, Arenas & a { out_cols = prepareOutputBlockColumns(params, aggregate_functions, getHeader(final), aggregates_pools, final, max_block_size); - if constexpr (Method::low_cardinality_optimization) + if constexpr (Method::low_cardinality_optimization || Method::one_key_nullable_optimization) { if (data.hasNullKeyData()) { @@ -2397,7 +2432,7 @@ void NO_INLINE Aggregator::mergeDataNullKey( Table & table_src, Arena * arena) const { - if constexpr (Method::low_cardinality_optimization) + if constexpr (Method::low_cardinality_optimization || Method::one_key_nullable_optimization) { if (table_src.hasNullKeyData()) { @@ -2429,7 +2464,7 @@ void NO_INLINE Aggregator::mergeDataNullKey( template void NO_INLINE Aggregator::mergeDataImpl(Table & table_dst, Table & table_src, Arena * arena) const { - if constexpr (Method::low_cardinality_optimization) + if constexpr (Method::low_cardinality_optimization || Method::one_key_nullable_optimization) mergeDataNullKey(table_dst, table_src, arena); auto merge = [&](AggregateDataPtr & __restrict dst, AggregateDataPtr & __restrict src, bool inserted) @@ -2490,7 +2525,7 @@ void NO_INLINE Aggregator::mergeDataNoMoreKeysImpl( Arena * arena) const { /// Note : will create data for NULL key if not exist - if constexpr (Method::low_cardinality_optimization) + if constexpr (Method::low_cardinality_optimization || Method::one_key_nullable_optimization) mergeDataNullKey(table_dst, table_src, arena); table_src.mergeToViaFind(table_dst, [&](AggregateDataPtr dst, AggregateDataPtr & src, bool found) @@ -2518,7 +2553,7 @@ void NO_INLINE Aggregator::mergeDataOnlyExistingKeysImpl( Arena * arena) const { /// Note : will create data for NULL key if not exist - if constexpr (Method::low_cardinality_optimization) + if constexpr (Method::low_cardinality_optimization || Method::one_key_nullable_optimization) mergeDataNullKey(table_dst, table_src, arena); table_src.mergeToViaFind(table_dst, @@ -3194,7 +3229,7 @@ void NO_INLINE Aggregator::convertBlockToTwoLevelImpl( /// For every row. for (size_t i = 0; i < rows; ++i) { - if constexpr (Method::low_cardinality_optimization) + if constexpr (Method::low_cardinality_optimization || Method::one_key_nullable_optimization) { if (state.isNullAt(i)) { diff --git a/src/Interpreters/Aggregator.h b/src/Interpreters/Aggregator.h index 6e776fb9fa8..e2f76f31466 100644 --- a/src/Interpreters/Aggregator.h +++ b/src/Interpreters/Aggregator.h @@ -159,10 +159,17 @@ using StringHashTableWithNullKey = AggregationDataWithNullKey; using AggregatedDataWithNullableUInt16Key = AggregationDataWithNullKey; +using AggregatedDataWithNullableUInt32Key = AggregationDataWithNullKey; + using AggregatedDataWithNullableUInt64Key = AggregationDataWithNullKey; using AggregatedDataWithNullableStringKey = AggregationDataWithNullKey; +using AggregatedDataWithNullableShortStringKey = AggregationDataWithNullKey; + +using AggregatedDataWithNullableUInt32KeyTwoLevel = AggregationDataWithNullKeyTwoLevel< + TwoLevelHashMap, + TwoLevelHashTableGrower<>, HashTableAllocator, HashTableWithNullKey>>; using AggregatedDataWithNullableUInt64KeyTwoLevel = AggregationDataWithNullKeyTwoLevel< TwoLevelHashMap, TwoLevelHashTableGrower<>, HashTableAllocator, HashTableWithNullKey>>; @@ -174,11 +181,10 @@ using AggregatedDataWithNullableStringKeyTwoLevel = AggregationDataWithNullKeyTw TwoLevelHashMapWithSavedHash, TwoLevelHashTableGrower<>, HashTableAllocator, HashTableWithNullKey>>; - /// For the case where there is one numeric key. /// FieldType is UInt8/16/32/64 for any type with corresponding bit width. template + bool consecutive_keys_optimization = true, bool nullable = false> struct AggregationMethodOneNumber { using Data = TData; @@ -198,10 +204,11 @@ struct AggregationMethodOneNumber /// To use one `Method` in different threads, use different `State`. using State = ColumnsHashing::HashMethodOneNumber; + Mapped, FieldType, consecutive_keys_optimization, false, nullable>; /// Use optimization for low cardinality. static const bool low_cardinality_optimization = false; + static const bool one_key_nullable_optimization = nullable; /// Shuffle key columns before `insertKeyIntoColumns` call if needed. std::optional shuffleKeyColumns(std::vector &, const Sizes &) { return {}; } @@ -209,9 +216,20 @@ struct AggregationMethodOneNumber // Insert the key from the hash table into columns. static void insertKeyIntoColumns(const Key & key, std::vector & key_columns, const Sizes & /*key_sizes*/) { + ColumnVectorHelper * column; + if constexpr (nullable) + { + ColumnNullable & nullable_col = assert_cast(*key_columns[0]); + ColumnUInt8 * null_map = assert_cast(&nullable_col.getNullMapColumn()); + null_map->insertDefault(); + column = static_cast(&nullable_col.getNestedColumn()); + } + else + { + column = static_cast(key_columns[0]); + } static_assert(sizeof(FieldType) <= sizeof(Key)); const auto * key_holder = reinterpret_cast(&key); - auto * column = static_cast(key_columns[0]); if constexpr (sizeof(FieldType) < sizeof(Key) && std::endian::native == std::endian::big) column->insertRawData(key_holder + (sizeof(Key) - sizeof(FieldType))); else @@ -242,6 +260,7 @@ struct AggregationMethodString using State = ColumnsHashing::HashMethodString; static const bool low_cardinality_optimization = false; + static const bool one_key_nullable_optimization = false; std::optional shuffleKeyColumns(std::vector &, const Sizes &) { return {}; } @@ -253,7 +272,7 @@ struct AggregationMethodString /// Same as above but without cache -template +template struct AggregationMethodStringNoCache { using Data = TData; @@ -271,15 +290,23 @@ struct AggregationMethodStringNoCache { } - using State = ColumnsHashing::HashMethodString; + using State = ColumnsHashing::HashMethodString; static const bool low_cardinality_optimization = false; + static const bool one_key_nullable_optimization = nullable; std::optional shuffleKeyColumns(std::vector &, const Sizes &) { return {}; } static void insertKeyIntoColumns(StringRef key, std::vector & key_columns, const Sizes &) { - static_cast(key_columns[0])->insertData(key.data, key.size); + if constexpr (nullable) + { + static_cast(key_columns[0])->insertData(key.data, key.size); + } + else + { + static_cast(key_columns[0])->insertData(key.data, key.size); + } } }; @@ -306,6 +333,7 @@ struct AggregationMethodFixedString using State = ColumnsHashing::HashMethodFixedString; static const bool low_cardinality_optimization = false; + static const bool one_key_nullable_optimization = false; std::optional shuffleKeyColumns(std::vector &, const Sizes &) { return {}; } @@ -316,7 +344,7 @@ struct AggregationMethodFixedString }; /// Same as above but without cache -template +template struct AggregationMethodFixedStringNoCache { using Data = TData; @@ -334,15 +362,23 @@ struct AggregationMethodFixedStringNoCache { } - using State = ColumnsHashing::HashMethodFixedString; + using State = ColumnsHashing::HashMethodFixedString; static const bool low_cardinality_optimization = false; + static const bool one_key_nullable_optimization = nullable; std::optional shuffleKeyColumns(std::vector &, const Sizes &) { return {}; } static void insertKeyIntoColumns(StringRef key, std::vector & key_columns, const Sizes &) { - static_cast(key_columns[0])->insertData(key.data, key.size); + if constexpr (nullable) + { + static_cast(key_columns[0])->insertData(key.data, key.size); + } + else + { + static_cast(key_columns[0])->insertData(key.data, key.size); + } } }; @@ -418,6 +454,7 @@ struct AggregationMethodKeysFixed use_cache>; static const bool low_cardinality_optimization = false; + static const bool one_key_nullable_optimization = false; std::optional shuffleKeyColumns(std::vector & key_columns, const Sizes & key_sizes) { @@ -505,6 +542,7 @@ struct AggregationMethodSerialized using State = ColumnsHashing::HashMethodSerialized; static const bool low_cardinality_optimization = false; + static const bool one_key_nullable_optimization = false; std::optional shuffleKeyColumns(std::vector &, const Sizes &) { return {}; } @@ -588,6 +626,18 @@ struct AggregatedDataVariants : private boost::noncopyable std::unique_ptr> serialized_hash64; /// Support for nullable keys. + std::unique_ptr> nullable_key8; + std::unique_ptr> nullable_key16; + std::unique_ptr> nullable_key32; + std::unique_ptr> nullable_key64; + std::unique_ptr> nullable_key32_two_level; + std::unique_ptr> nullable_key64_two_level; + + std::unique_ptr> nullable_key_string; + std::unique_ptr> nullable_key_fixed_string; + std::unique_ptr> nullable_key_string_two_level; + std::unique_ptr> nullable_key_fixed_string_two_level; + std::unique_ptr> nullable_keys128; std::unique_ptr> nullable_keys256; std::unique_ptr> nullable_keys128_two_level; @@ -640,6 +690,16 @@ struct AggregatedDataVariants : private boost::noncopyable M(keys128_hash64, false) \ M(keys256_hash64, false) \ M(serialized_hash64, false) \ + M(nullable_key8, false) \ + M(nullable_key16, false) \ + M(nullable_key32, false) \ + M(nullable_key64, false) \ + M(nullable_key32_two_level, true) \ + M(nullable_key64_two_level, true) \ + M(nullable_key_string, false) \ + M(nullable_key_fixed_string, false) \ + M(nullable_key_string_two_level, true) \ + M(nullable_key_fixed_string_two_level, true) \ M(nullable_keys128, false) \ M(nullable_keys256, false) \ M(nullable_keys128_two_level, true) \ @@ -754,6 +814,10 @@ struct AggregatedDataVariants : private boost::noncopyable M(keys128) \ M(keys256) \ M(serialized) \ + M(nullable_key32) \ + M(nullable_key64) \ + M(nullable_key_string) \ + M(nullable_key_fixed_string) \ M(nullable_keys128) \ M(nullable_keys256) \ M(low_cardinality_key32) \ @@ -767,6 +831,8 @@ struct AggregatedDataVariants : private boost::noncopyable #define APPLY_FOR_VARIANTS_NOT_CONVERTIBLE_TO_TWO_LEVEL(M) \ M(key8) \ M(key16) \ + M(nullable_key8) \ + M(nullable_key16) \ M(keys16) \ M(key64_hash64) \ M(key_string_hash64)\ @@ -810,6 +876,10 @@ struct AggregatedDataVariants : private boost::noncopyable M(keys128_two_level) \ M(keys256_two_level) \ M(serialized_two_level) \ + M(nullable_key32_two_level) \ + M(nullable_key64_two_level) \ + M(nullable_key_string_two_level) \ + M(nullable_key_fixed_string_two_level) \ M(nullable_keys128_two_level) \ M(nullable_keys256_two_level) \ M(low_cardinality_key32_two_level) \ @@ -1290,7 +1360,7 @@ private: Arena * arena) const; template - Block insertResultsIntoColumns(PaddedPODArray & places, OutputBlockColumns && out_cols, Arena * arena) const; + Block insertResultsIntoColumns(PaddedPODArray & places, OutputBlockColumns && out_cols, Arena * arena, bool has_null_key_data) const; template ConvertToBlockRes diff --git a/src/Interpreters/JIT/compileFunction.cpp b/src/Interpreters/JIT/compileFunction.cpp index 8bf0eb25b60..a7233433861 100644 --- a/src/Interpreters/JIT/compileFunction.cpp +++ b/src/Interpreters/JIT/compileFunction.cpp @@ -41,7 +41,7 @@ namespace ErrorCodes extern const int LOGICAL_ERROR; } -ColumnData getColumnData(const IColumn * column) +ColumnData getColumnData(const IColumn * column, size_t skip_rows) { const bool is_const = isColumnConst(*column); @@ -52,11 +52,11 @@ ColumnData getColumnData(const IColumn * column) if (const auto * nullable = typeid_cast(column)) { - result.null_data = nullable->getNullMapColumn().getRawData().data(); + result.null_data = nullable->getNullMapColumn().getDataAt(skip_rows).data; column = &nullable->getNestedColumn(); } - - result.data = column->getRawData().data(); + /// skip null key data for one nullable key optimization + result.data = column->getDataAt(skip_rows).data; return result; } diff --git a/src/Interpreters/JIT/compileFunction.h b/src/Interpreters/JIT/compileFunction.h index 0e0a1106698..fe5abe1988c 100644 --- a/src/Interpreters/JIT/compileFunction.h +++ b/src/Interpreters/JIT/compileFunction.h @@ -26,7 +26,7 @@ struct ColumnData /** Returns ColumnData for column. * If constant column is passed, LOGICAL_ERROR will be thrown. */ -ColumnData getColumnData(const IColumn * column); +ColumnData getColumnData(const IColumn * column, size_t skip_rows = 0); using ColumnDataRowsOffset = size_t; using ColumnDataRowsSize = size_t; diff --git a/tests/performance/groupby_onekey_nullable.xml b/tests/performance/groupby_onekey_nullable.xml new file mode 100644 index 00000000000..2c03cb0861f --- /dev/null +++ b/tests/performance/groupby_onekey_nullable.xml @@ -0,0 +1,49 @@ + + + 8 + 0 + + + + + key_type + + key_string + key_string_two_level + key_fixed_string + key_int64 + key_int64_two_level + key_int32 + key_int32_two_level + Key_int16 + key_int8 + + + + + CREATE TABLE t_nullable + ( + key_string Nullable(String), + key_string_two_level Nullable(String), + key_fixed_string Nullable(FixedString(3)), + key_int64 Nullable(Int64), + key_int64_two_level Nullable(Int64), + key_int32 Nullable(Int32), + key_int32_two_level Nullable(Int32), + Key_int16 Nullable(Int16), + key_int8 Nullable(Int8), + i1 Nullable(Int64), + i2 Nullable(Int64), + ) + ENGINE = MergeTree + ORDER BY tuple() + + insert into t_nullable select ['aa','bb','cc','dd'][number % 10000 + 1], ['aa','bb','cc','dd'][number % 200000 + 1], ['aa','bb','cc','dd'][number % 4 + 1], toInt64(number%10000), toInt64(number%200000), toInt32(number%10000), toInt32(number%200000), toInt16(number%10000), toInt8(number%100), number%6000+1, number%5000+2 from numbers_mt(20000000) + insert into t_nullable select ['aa','bb','cc','dd'][number % 10000 + 1], ['aa','bb','cc','dd'][number % 200000 + 1], ['aa','bb','cc','dd'][number % 4 + 1], toInt64(number%10000), toInt64(number%200000), toInt32(number%10000), toInt32(number%200000), toInt16(number%10000), toInt8(number%100), number%6000+1, number%5000+2 from numbers_mt(20000000) + insert into t_nullable select ['aa','bb','cc','dd'][number % 10000 + 1], ['aa','bb','cc','dd'][number % 200000 + 1], ['aa','bb','cc','dd'][number % 4 + 1], toInt64(number%10000), toInt64(number%200000), toInt32(number%10000), toInt32(number%200000), toInt16(number%10000), toInt8(number%100), number%6000+1, number%5000+2 from numbers_mt(20000000) + insert into t_nullable select ['aa','bb','cc','dd'][number % 10000 + 1], ['aa','bb','cc','dd'][number % 200000 + 1], ['aa','bb','cc','dd'][number % 4 + 1], toInt64(number%10000), toInt64(number%200000), toInt32(number%10000), toInt32(number%200000), toInt16(number%10000), toInt8(number%100), number%6000+1, number%5000+2 from numbers_mt(20000000) + OPTIMIZE TABLE t_nullable FINAL + select min(i1), min(i2) from t_nullable group by {key_type} format Null + + drop table if exists t_nullable + \ No newline at end of file From 93861e04ae941d2b20b9b6f79b73e19bacec74ab Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Thu, 2 Mar 2023 20:48:25 +0000 Subject: [PATCH 451/841] Fix fix fix --- tests/ci/compatibility_check.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/ci/compatibility_check.py b/tests/ci/compatibility_check.py index 688fe883c1e..a06f4baf359 100644 --- a/tests/ci/compatibility_check.py +++ b/tests/ci/compatibility_check.py @@ -60,18 +60,20 @@ def process_glibc_check(log_path: str, max_glibc_version: str) -> TestResults: def process_result( - result_folder: str, server_log_folder: str, max_glibc_version: str + result_folder: str, server_log_folder: str, check_glibc: bool, check_distributions: bool, max_glibc_version: str ) -> Tuple[str, str, TestResults, List[str]]: glibc_log_path = os.path.join(result_folder, "glibc.log") test_results = process_glibc_check(glibc_log_path, max_glibc_version) status = "success" description = "Compatibility check passed" - if len(test_results) > 1 or test_results[0].status != "OK": - status = "failure" - description = "glibc check failed" - if status == "success": + if check_glibc: + if len(test_results) > 1 or test_results[0].status != "OK": + status = "failure" + description = "glibc check failed" + + if status == "success" and check_distributions: for operating_system in ("ubuntu:12.04", "centos:5"): test_result = process_os_check( os.path.join(result_folder, operating_system) @@ -217,7 +219,7 @@ def main(): s3_helper = S3Helper() state, description, test_results, additional_logs = process_result( - result_path, server_log_path, max_glibc_version + result_path, server_log_path, args.check_glibc, args.check_distributions, max_glibc_version ) ch_helper = ClickHouseHelper() From 6eb2877e532aeb083357dcd4a0d7477e4de357b8 Mon Sep 17 00:00:00 2001 From: robot-clickhouse Date: Thu, 2 Mar 2023 20:54:45 +0000 Subject: [PATCH 452/841] Automatic style fix --- tests/ci/compatibility_check.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/ci/compatibility_check.py b/tests/ci/compatibility_check.py index a06f4baf359..8841bedbb18 100644 --- a/tests/ci/compatibility_check.py +++ b/tests/ci/compatibility_check.py @@ -60,7 +60,11 @@ def process_glibc_check(log_path: str, max_glibc_version: str) -> TestResults: def process_result( - result_folder: str, server_log_folder: str, check_glibc: bool, check_distributions: bool, max_glibc_version: str + result_folder: str, + server_log_folder: str, + check_glibc: bool, + check_distributions: bool, + max_glibc_version: str, ) -> Tuple[str, str, TestResults, List[str]]: glibc_log_path = os.path.join(result_folder, "glibc.log") test_results = process_glibc_check(glibc_log_path, max_glibc_version) @@ -219,7 +223,11 @@ def main(): s3_helper = S3Helper() state, description, test_results, additional_logs = process_result( - result_path, server_log_path, args.check_glibc, args.check_distributions, max_glibc_version + result_path, + server_log_path, + args.check_glibc, + args.check_distributions, + max_glibc_version, ) ch_helper = ClickHouseHelper() From fc227d94bcaf9cd4d3583b1cb5c91c177b150cb8 Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Thu, 2 Mar 2023 21:20:26 +0000 Subject: [PATCH 453/841] 02346_full_text_search.sql: Add result separators to simplify analysis --- .../02346_full_text_search.reference | 9 +++++++++ .../0_stateless/02346_full_text_search.sql | 19 ++++++++++--------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/tests/queries/0_stateless/02346_full_text_search.reference b/tests/queries/0_stateless/02346_full_text_search.reference index f1e21e511d0..9cd09110608 100644 --- a/tests/queries/0_stateless/02346_full_text_search.reference +++ b/tests/queries/0_stateless/02346_full_text_search.reference @@ -1,3 +1,4 @@ +Test inverted(2) af inverted 1 101 Alick a01 @@ -10,6 +11,7 @@ af inverted 113 Click b03 118 Click b08 1 +Test inverted() af inverted 101 Alick a01 106 Alick a06 @@ -21,9 +23,11 @@ af inverted 101 Alick a01 111 Alick b01 1 +Test on array columns af inverted 3 ['Click a03','Click b03'] 1 +Test on map columns af inverted 103 {'Click':'Click a03'} 108 {'Click':'Click a08'} @@ -32,20 +36,25 @@ af inverted 1 103 {'Click':'Click a03'} 1 +Test inverted(2) on a column with two parts af inverted 101 Alick a01 111 Alick b01 201 rick c01 1 +Test inverted(2) on UTF-8 data af inverted 102 clickhouse你好 1 +Test max_digestion_size_per_segment af inverted BC614E,05397FB1,6969696969898240,CF3304 1 +Test density==1 af inverted 1 1 +Test density==0.1 af inverted 1 1 diff --git a/tests/queries/0_stateless/02346_full_text_search.sql b/tests/queries/0_stateless/02346_full_text_search.sql index 2b10800e78f..ed086861f1f 100644 --- a/tests/queries/0_stateless/02346_full_text_search.sql +++ b/tests/queries/0_stateless/02346_full_text_search.sql @@ -2,7 +2,7 @@ SET allow_experimental_inverted_index = 1; SET log_queries = 1; ---------------------------------------------------- --- Test inverted(2) +SELECT 'Test inverted(2)'; DROP TABLE IF EXISTS tab; @@ -58,7 +58,7 @@ SELECT read_rows==8 from system.query_log LIMIT 1; ---------------------------------------------------- --- Test inverted() +SELECT 'Test inverted()'; DROP TABLE IF EXISTS tab_x; @@ -111,7 +111,7 @@ SELECT read_rows==4 from system.query_log LIMIT 1; ---------------------------------------------------- --- Test on array columns +SELECT 'Test on array columns'; DROP TABLE IF EXISTS tab; @@ -138,7 +138,7 @@ SELECT read_rows==2 from system.query_log LIMIT 1; ---------------------------------------------------- --- Test on map columns +SELECT 'Test on map columns'; DROP TABLE IF EXISTS tab; @@ -178,7 +178,8 @@ SELECT read_rows==8 from system.query_log LIMIT 1; ---------------------------------------------------- --- Test inverted(2) on a column with two parts +SELECT 'Test inverted(2) on a column with two parts'; + DROP TABLE IF EXISTS tab; @@ -206,7 +207,7 @@ SELECT read_rows==6 from system.query_log LIMIT 1; ---------------------------------------------------- --- Test inverted(2) on UTF-8 data +SELECT 'Test inverted(2) on UTF-8 data'; DROP TABLE IF EXISTS tab; @@ -234,7 +235,7 @@ SELECT read_rows==2 from system.query_log LIMIT 1; ---------------------------------------------------- --- Test max_digestion_size_per_segment +SELECT 'Test max_digestion_size_per_segment'; DROP TABLE IF EXISTS tab; @@ -265,7 +266,7 @@ SELECT read_rows==256 from system.query_log LIMIT 1; ---------------------------------------------------- --- Test density==1 +SELECT 'Test density==1'; DROP TABLE IF EXISTS tab; @@ -294,7 +295,7 @@ SELECT read_rows==0 from system.query_log LIMIT 1; ---------------------------------------------------- --- Test density==0.1 +SELECT 'Test density==0.1'; DROP TABLE IF EXISTS tab; From 9c01c6cc252627d109809696bfa3acb584ef3979 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Thu, 2 Mar 2023 22:30:52 +0100 Subject: [PATCH 454/841] Add Cloud --- programs/server/play.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/programs/server/play.html b/programs/server/play.html index c511d13cf91..e4fe719ddcb 100644 --- a/programs/server/play.html +++ b/programs/server/play.html @@ -398,15 +398,30 @@ fill: var(--logo-color); } + #cloud-logo + { + color: var(--background-color); + text-shadow: 0rem 0rem 2rem var(--logo-color); + font-size: 10vw; + display: block; + } + #logo:hover { fill: var(--logo-color-active); + color: var(--logo-color-active); + } + + #cloud-logo:hover + { + filter: brightness(150%); } #logo-container { text-align: center; margin-top: 5em; + line-height: 0.75; } #chart @@ -487,6 +502,7 @@ +

From 6c68e5c4c61c991802ef0c2ebb0b77573e45813d Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Fri, 3 Mar 2023 01:04:10 +0300 Subject: [PATCH 455/841] Revert "Give users option of overwriting" --- docs/_includes/install/universal.sh | 33 +++++++++++------------------ 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/docs/_includes/install/universal.sh b/docs/_includes/install/universal.sh index 403aab6f4e6..de34897a6f6 100755 --- a/docs/_includes/install/universal.sh +++ b/docs/_includes/install/universal.sh @@ -60,21 +60,12 @@ fi clickhouse_download_filename_prefix="clickhouse" clickhouse="$clickhouse_download_filename_prefix" -if [ -f "$clickhouse" ] -then - read -p "ClickHouse binary ${clickhouse} already exists. Overwrite? [y/N] " answer - if [ "$answer" = "y" -o "$answer" = "Y" ] - then - rm -f "$clickhouse" - else - i=0 - while [ -f "$clickhouse" ] - do - clickhouse="${clickhouse_download_filename_prefix}.${i}" - i=$(($i+1)) - done - fi -fi +i=0 +while [ -f "$clickhouse" ] +do + clickhouse="${clickhouse_download_filename_prefix}.${i}" + i=$(($i+1)) +done URL="https://builds.clickhouse.com/master/${DIR}/clickhouse" echo @@ -85,9 +76,9 @@ echo echo "Successfully downloaded the ClickHouse binary, you can run it as: ./${clickhouse}" -#if [ "${OS}" = "Linux" ] -#then - #echo - #echo "You can also install it: - #sudo ./${clickhouse} install" -#fi +if [ "${OS}" = "Linux" ] +then + echo + echo "You can also install it: + sudo ./${clickhouse} install" +fi From 1f4141a35d314a7c5cf663cbb6b80229c9dc2220 Mon Sep 17 00:00:00 2001 From: DanRoscigno Date: Sat, 25 Feb 2023 11:05:18 -0500 Subject: [PATCH 456/841] Give users option of overwriting --- docs/_includes/install/universal.sh | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/docs/_includes/install/universal.sh b/docs/_includes/install/universal.sh index de34897a6f6..1699be138c8 100755 --- a/docs/_includes/install/universal.sh +++ b/docs/_includes/install/universal.sh @@ -60,12 +60,21 @@ fi clickhouse_download_filename_prefix="clickhouse" clickhouse="$clickhouse_download_filename_prefix" -i=0 -while [ -f "$clickhouse" ] -do - clickhouse="${clickhouse_download_filename_prefix}.${i}" - i=$(($i+1)) -done +if [ -f "$clickhouse" ] +then + read -p "ClickHouse binary ${clickhouse} already exists. Overwrite? [y/N] " answer + if [ "$answer" = "y" -o "$answer" = "Y" ] + then + rm -f "$clickhouse" + else + i=0 + while [ -f "$clickhouse" ] + do + clickhouse="${clickhouse_download_filename_prefix}.${i}" + i=$(($i+1)) + done + fi +fi URL="https://builds.clickhouse.com/master/${DIR}/clickhouse" echo From 619b28206034120c7eb51b75bc6c919e8feed795 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Fri, 3 Mar 2023 01:22:04 +0100 Subject: [PATCH 457/841] more correct handling of fatal errors --- src/Common/CurrentThread.cpp | 4 ++-- src/Common/CurrentThread.h | 4 ++-- src/Common/ThreadStatus.cpp | 12 +++++++----- src/Daemon/BaseDaemon.cpp | 6 +++--- src/Interpreters/ThreadStatusExt.cpp | 7 +++++-- src/Server/GRPCServer.cpp | 3 +-- src/Server/TCPHandler.cpp | 13 +++++-------- 7 files changed, 25 insertions(+), 24 deletions(-) diff --git a/src/Common/CurrentThread.cpp b/src/Common/CurrentThread.cpp index 526e28c043d..cf4bd97490e 100644 --- a/src/Common/CurrentThread.cpp +++ b/src/Common/CurrentThread.cpp @@ -67,8 +67,8 @@ void CurrentThread::attachInternalTextLogsQueue(const std::shared_ptr callback) { - if (unlikely(!current_thread)) - return; + /// It does not make sense to set a callback for sending logs to a client if there's no thread status + chassert(current_thread); current_thread->setFatalErrorCallback(callback); } diff --git a/src/Common/CurrentThread.h b/src/Common/CurrentThread.h index f36b92e319d..ffc00c77504 100644 --- a/src/Common/CurrentThread.h +++ b/src/Common/CurrentThread.h @@ -100,8 +100,8 @@ public: /// Initializes query with current thread as master thread in constructor, and detaches it in destructor struct QueryScope : private boost::noncopyable { - explicit QueryScope(ContextMutablePtr query_context); - explicit QueryScope(ContextPtr query_context); + explicit QueryScope(ContextMutablePtr query_context, std::function fatal_error_callback = {}); + explicit QueryScope(ContextPtr query_context, std::function fatal_error_callback = {}); ~QueryScope(); void logPeakMemoryUsage(); diff --git a/src/Common/ThreadStatus.cpp b/src/Common/ThreadStatus.cpp index 46c171b5cb6..18b33cd412a 100644 --- a/src/Common/ThreadStatus.cpp +++ b/src/Common/ThreadStatus.cpp @@ -226,17 +226,19 @@ void ThreadStatus::attachInternalProfileEventsQueue(const InternalProfileEventsQ void ThreadStatus::setFatalErrorCallback(std::function callback) { - fatal_error_callback = std::move(callback); - - if (!thread_group) - return; - + /// It does not make sense to set a callback for sending logs to a client if there's no thread group + chassert(thread_group); std::lock_guard lock(thread_group->mutex); + fatal_error_callback = std::move(callback); thread_group->fatal_error_callback = fatal_error_callback; } void ThreadStatus::onFatalError() { + /// No thread group - no callback + if (!thread_group) + return; + std::lock_guard lock(thread_group->mutex); if (fatal_error_callback) fatal_error_callback(); diff --git a/src/Daemon/BaseDaemon.cpp b/src/Daemon/BaseDaemon.cpp index 60179fd5317..fbfa9e68774 100644 --- a/src/Daemon/BaseDaemon.cpp +++ b/src/Daemon/BaseDaemon.cpp @@ -134,7 +134,7 @@ static void terminateRequestedSignalHandler(int sig, siginfo_t *, void *) } -static std::atomic fatal_error_printed{false}; +static std::atomic_flag fatal_error_printed; /** Handler for "fault" or diagnostic signals. Send data about fault to separate thread to write into log. */ @@ -165,7 +165,7 @@ static void signalHandler(int sig, siginfo_t * info, void * context) for (size_t i = 0; i < 300; ++i) { /// We will synchronize with the thread printing the messages with an atomic variable to finish earlier. - if (fatal_error_printed) + if (fatal_error_printed.test()) break; /// This coarse method of synchronization is perfectly ok for fatal signals. @@ -421,7 +421,7 @@ private: if (thread_ptr) thread_ptr->onFatalError(); - fatal_error_printed = true; + fatal_error_printed.test_and_set(); } }; diff --git a/src/Interpreters/ThreadStatusExt.cpp b/src/Interpreters/ThreadStatusExt.cpp index 84400fc3711..b42f2671a5e 100644 --- a/src/Interpreters/ThreadStatusExt.cpp +++ b/src/Interpreters/ThreadStatusExt.cpp @@ -550,15 +550,16 @@ void CurrentThread::detachQueryIfNotDetached() } -CurrentThread::QueryScope::QueryScope(ContextMutablePtr query_context) +CurrentThread::QueryScope::QueryScope(ContextMutablePtr query_context, std::function fatal_error_callback) { CurrentThread::initializeQuery(); CurrentThread::attachQueryContext(query_context); if (!query_context->hasQueryContext()) query_context->makeQueryContext(); + setFatalErrorCallback(fatal_error_callback); } -CurrentThread::QueryScope::QueryScope(ContextPtr query_context) +CurrentThread::QueryScope::QueryScope(ContextPtr query_context, std::function fatal_error_callback) { if (!query_context->hasQueryContext()) throw Exception( @@ -566,6 +567,7 @@ CurrentThread::QueryScope::QueryScope(ContextPtr query_context) CurrentThread::initializeQuery(); CurrentThread::attachQueryContext(query_context); + setFatalErrorCallback(fatal_error_callback); } void CurrentThread::QueryScope::logPeakMemoryUsage() @@ -585,6 +587,7 @@ CurrentThread::QueryScope::~QueryScope() if (log_peak_memory_usage_in_destructor) logPeakMemoryUsage(); + setFatalErrorCallback({}); CurrentThread::detachQueryIfNotDetached(); } catch (...) diff --git a/src/Server/GRPCServer.cpp b/src/Server/GRPCServer.cpp index 595f5a8c2b7..533c3d0959b 100644 --- a/src/Server/GRPCServer.cpp +++ b/src/Server/GRPCServer.cpp @@ -836,7 +836,7 @@ namespace query_context->applySettingsChanges(settings_changes); query_context->setCurrentQueryId(query_info.query_id()); - query_scope.emplace(query_context); + query_scope.emplace(query_context, /* fatal_error_callback */ [this]{ onFatalError(); }); /// Set up tracing context for this query on current thread thread_trace_context = std::make_unique("GRPCServer", @@ -854,7 +854,6 @@ namespace logs_queue->max_priority = Poco::Logger::parseLevel(client_logs_level.toString()); logs_queue->setSourceRegexp(settings.send_logs_source_regexp); CurrentThread::attachInternalTextLogsQueue(logs_queue, client_logs_level); - CurrentThread::setFatalErrorCallback([this]{ onFatalError(); }); } /// Set the current database if specified. diff --git a/src/Server/TCPHandler.cpp b/src/Server/TCPHandler.cpp index a307b472a64..cac7160b070 100644 --- a/src/Server/TCPHandler.cpp +++ b/src/Server/TCPHandler.cpp @@ -277,7 +277,11 @@ void TCPHandler::runImpl() query_context->getSettingsRef(), query_context->getOpenTelemetrySpanLog()); - query_scope.emplace(query_context); + query_scope.emplace(query_context, /* fatal_error_callback */ [this] + { + std::lock_guard lock(fatal_error_mutex); + sendLogs(); + }); /// If query received, then settings in query_context has been updated. /// So it's better to update the connection settings for flexibility. @@ -298,11 +302,6 @@ void TCPHandler::runImpl() state.logs_queue->max_priority = Poco::Logger::parseLevel(client_logs_level.toString()); state.logs_queue->setSourceRegexp(query_context->getSettingsRef().send_logs_source_regexp); CurrentThread::attachInternalTextLogsQueue(state.logs_queue, client_logs_level); - CurrentThread::setFatalErrorCallback([this] - { - std::lock_guard lock(fatal_error_mutex); - sendLogs(); - }); } if (client_tcp_protocol_version >= DBMS_MIN_PROTOCOL_VERSION_WITH_INCREMENTAL_PROFILE_EVENTS) { @@ -611,8 +610,6 @@ void TCPHandler::runImpl() /// It is important to destroy query context here. We do not want it to live arbitrarily longer than the query. query_context.reset(); - CurrentThread::setFatalErrorCallback({}); - if (is_interserver_mode) { /// We don't really have session in interserver mode, new one is created for each query. It's better to reset it now. From 29e396cc30e219815e574105bb170505443a09bb Mon Sep 17 00:00:00 2001 From: houbaron Date: Fri, 3 Mar 2023 11:57:03 +0800 Subject: [PATCH 458/841] Update skipping-indexes.md --- docs/zh/guides/improving-query-performance/skipping-indexes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh/guides/improving-query-performance/skipping-indexes.md b/docs/zh/guides/improving-query-performance/skipping-indexes.md index 2f9ce09d77f..f5889898c2c 100644 --- a/docs/zh/guides/improving-query-performance/skipping-indexes.md +++ b/docs/zh/guides/improving-query-performance/skipping-indexes.md @@ -1,6 +1,6 @@ --- slug: /zh/guides/improving-query-performance/skipping-indexes -sidebar_label: Data Skipping Indexes +sidebar_label: 跳数索引 sidebar_position: 2 --- From 1f7a0c70f0442feb1ea3ac1593a4d699893de6bc Mon Sep 17 00:00:00 2001 From: houbaron Date: Fri, 3 Mar 2023 12:00:42 +0800 Subject: [PATCH 459/841] Update sparse-primary-indexes.md --- .../improving-query-performance/sparse-primary-indexes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh/guides/improving-query-performance/sparse-primary-indexes.md b/docs/zh/guides/improving-query-performance/sparse-primary-indexes.md index e773a02fbc3..18b23a79f86 100644 --- a/docs/zh/guides/improving-query-performance/sparse-primary-indexes.md +++ b/docs/zh/guides/improving-query-performance/sparse-primary-indexes.md @@ -1,6 +1,6 @@ --- slug: /zh/guides/improving-query-performance/sparse-primary-indexes -sidebar_label: Sparse Primary Indexes +sidebar_label: 主键稀疏索引 sidebar_position: 20 --- From 3cb82bfe070fce9ddf435d72c9e3408f8aeb2d7c Mon Sep 17 00:00:00 2001 From: Konstantin Morozov Date: Fri, 3 Mar 2023 06:41:48 +0100 Subject: [PATCH 460/841] Update read and with ReadFromMemoryStorage --- src/Storages/StorageMemory.cpp | 130 +++++++++++++++++++++++---------- src/Storages/StorageMemory.h | 10 +++ 2 files changed, 100 insertions(+), 40 deletions(-) diff --git a/src/Storages/StorageMemory.cpp b/src/Storages/StorageMemory.cpp index 881cbc18b10..7fbb3e3ca78 100644 --- a/src/Storages/StorageMemory.cpp +++ b/src/Storages/StorageMemory.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -192,6 +193,80 @@ private: }; +class ReadFromMemoryStorage final : public ISourceStep { +public: + ReadFromMemoryStorage(const Names & columns_to_read_, + const StorageSnapshotPtr & storage_snapshot_, + const size_t num_streams_, + const bool delay_read_for_global_subqueries_) : + ISourceStep(DataStream{.header = storage_snapshot_->getSampleBlockForColumns(columns_to_read_)}), + storage_snapshot(storage_snapshot_), + columns_to_read(columns_to_read_), + num_streams(num_streams_), + delay_read_for_global_subqueries(delay_read_for_global_subqueries_) + { + } + + String getName() const override { return name; } + + Pipe preparePipe() { + storage_snapshot->check(columns_to_read); + + const auto & snapshot_data = assert_cast(*storage_snapshot->data); + auto current_data = snapshot_data.blocks; + + if (delay_read_for_global_subqueries) + { + /// Note: for global subquery we use single source. + /// Mainly, the reason is that at this point table is empty, + /// and we don't know the number of blocks are going to be inserted into it. + /// + /// It may seem to be not optimal, but actually data from such table is used to fill + /// set for IN or hash table for JOIN, which can't be done concurrently. + /// Since no other manipulation with data is done, multiple sources shouldn't give any profit. + + return Pipe(std::make_shared( + columns_to_read, + storage_snapshot, + nullptr /* data */, + nullptr /* parallel execution index */, + [current_data](std::shared_ptr & data_to_initialize) + { + data_to_initialize = current_data; + })); + } + + size_t size = current_data->size(); + + if (num_streams > size) + num_streams = size; + + Pipes pipes; + + auto parallel_execution_index = std::make_shared>(0); + + for (size_t stream = 0; stream < num_streams; ++stream) + { + pipes.emplace_back(std::make_shared(columns_to_read, storage_snapshot, current_data, parallel_execution_index)); + } + return Pipe::unitePipes(std::move(pipes)); + } + + void initializePipeline(QueryPipelineBuilder & pipeline, const BuildQueryPipelineSettings &) override + { + pipeline.init(preparePipe()); + } + +private: + static constexpr auto name = "ReadFromMemoryStorage"; + + StorageSnapshotPtr storage_snapshot; + Names columns_to_read; + size_t num_streams; + const bool delay_read_for_global_subqueries; +}; + + StorageMemory::StorageMemory( const StorageID & table_id_, ColumnsDescription columns_description_, @@ -233,47 +308,22 @@ Pipe StorageMemory::read( size_t /*max_block_size*/, size_t num_streams) { - storage_snapshot->check(column_names); + auto reading = std::make_unique(column_names, storage_snapshot, num_streams, delay_read_for_global_subqueries); + return reading->preparePipe(); +} - const auto & snapshot_data = assert_cast(*storage_snapshot->data); - auto current_data = snapshot_data.blocks; - - if (delay_read_for_global_subqueries) - { - /// Note: for global subquery we use single source. - /// Mainly, the reason is that at this point table is empty, - /// and we don't know the number of blocks are going to be inserted into it. - /// - /// It may seem to be not optimal, but actually data from such table is used to fill - /// set for IN or hash table for JOIN, which can't be done concurrently. - /// Since no other manipulation with data is done, multiple sources shouldn't give any profit. - - return Pipe(std::make_shared( - column_names, - storage_snapshot, - nullptr /* data */, - nullptr /* parallel execution index */, - [current_data](std::shared_ptr & data_to_initialize) - { - data_to_initialize = current_data; - })); - } - - size_t size = current_data->size(); - - if (num_streams > size) - num_streams = size; - - Pipes pipes; - - auto parallel_execution_index = std::make_shared>(0); - - for (size_t stream = 0; stream < num_streams; ++stream) - { - pipes.emplace_back(std::make_shared(column_names, storage_snapshot, current_data, parallel_execution_index)); - } - - return Pipe::unitePipes(std::move(pipes)); +void StorageMemory::read( + QueryPlan & query_plan, + const Names & column_names, + const StorageSnapshotPtr & storage_snapshot, + SelectQueryInfo & /*query_info*/, + ContextPtr /*context*/, + QueryProcessingStage::Enum /*processed_stage*/, + size_t /*max_block_size*/, + size_t num_streams) +{ + auto reading = std::make_unique(column_names, storage_snapshot, num_streams, delay_read_for_global_subqueries); + query_plan.addStep(std::move(reading)); } diff --git a/src/Storages/StorageMemory.h b/src/Storages/StorageMemory.h index c739088dbe4..fcaadaff3ba 100644 --- a/src/Storages/StorageMemory.h +++ b/src/Storages/StorageMemory.h @@ -53,6 +53,16 @@ public: size_t max_block_size, size_t num_streams) override; + void read( + QueryPlan & query_plan, + const Names & column_names, + const StorageSnapshotPtr & storage_snapshot, + SelectQueryInfo & query_info, + ContextPtr context, + QueryProcessingStage::Enum processed_stage, + size_t max_block_size, + size_t num_streams) override; + bool supportsParallelInsert() const override { return true; } bool supportsSubcolumns() const override { return true; } bool supportsDynamicSubcolumns() const override { return true; } From df8d36470830f0f140c01a3d13c203b8eb7eeddf Mon Sep 17 00:00:00 2001 From: houbaron Date: Fri, 3 Mar 2023 14:24:36 +0800 Subject: [PATCH 461/841] Update backup.md --- docs/zh/operations/backup.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/zh/operations/backup.md b/docs/zh/operations/backup.md index e0c5174a9a4..04bb09c60a6 100644 --- a/docs/zh/operations/backup.md +++ b/docs/zh/operations/backup.md @@ -12,8 +12,9 @@ sidebar_label: "\u6570\u636E\u5907\u4EFD" 不同公司有不同的可用资源和业务需求,因此不存在一个通用的解决方案可以应对各种情况下的ClickHouse备份和恢复。 适用于 1GB 数据的方案可能并不适用于几十 PB 数据的情况。 有多种具备各自优缺点的可能方法,将在下面对其进行讨论。最好使用几种方法而不是仅仅使用一种方法来弥补它们的各种缺点。。 -!!! note "注" - 需要注意的是,如果您备份了某些内容并且从未尝试过还原它,那么当您实际需要它时可能无法正常恢复(或者至少需要的时间比业务能够容忍的时间更长)。 因此,无论您选择哪种备份方法,请确保自动还原过程,并定期在备用ClickHouse群集上演练。 +:::node +需要注意的是,如果您备份了某些内容并且从未尝试过还原它,那么当您实际需要它时可能无法正常恢复(或者至少需要的时间比业务能够容忍的时间更长)。 因此,无论您选择哪种备份方法,请确保自动还原过程,并定期在备用ClickHouse群集上演练。 +::: ## 将源数据复制到其它地方 {#duplicating-source-data-somewhere-else} From fda64b503b8af400b1e1f6b30aaf81bb28bca090 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Fri, 3 Mar 2023 10:47:29 +0400 Subject: [PATCH 462/841] Fixed a typo at the page `/docs/ru/sql-reference/statements/alter/view.md` --- docs/ru/sql-reference/statements/alter/view.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ru/sql-reference/statements/alter/view.md b/docs/ru/sql-reference/statements/alter/view.md index 2d4823bba3a..e6f6730ff99 100644 --- a/docs/ru/sql-reference/statements/alter/view.md +++ b/docs/ru/sql-reference/statements/alter/view.md @@ -6,7 +6,7 @@ sidebar_label: VIEW # Выражение ALTER TABLE … MODIFY QUERY {#alter-modify-query} -Вы можеие изменить запрос `SELECT`, который был задан при создании [материализованного представления](../create/view.md#materialized), с помощью запроса 'ALTER TABLE … MODIFY QUERY'. Используйте его если при создании материализованного представления не использовалась секция `TO [db.]name`. Настройка `allow_experimental_alter_materialized_view_structure` должна быть включена. +Вы можете изменить запрос `SELECT`, который был задан при создании [материализованного представления](../create/view.md#materialized), с помощью запроса 'ALTER TABLE … MODIFY QUERY'. Используйте его если при создании материализованного представления не использовалась секция `TO [db.]name`. Настройка `allow_experimental_alter_materialized_view_structure` должна быть включена. Если при создании материализованного представления использовалась конструкция `TO [db.]name`, то для изменения отсоедините представление с помощью [DETACH](../detach.md), измените таблицу с помощью [ALTER TABLE](index.md), а затем снова присоедините запрос с помощью [ATTACH](../attach.md). From aa4f72728eb7289be11101312f8a3b607c0cb3e2 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Fri, 3 Mar 2023 11:21:26 +0400 Subject: [PATCH 463/841] Markup fixed at the page `/docs/ru/sql-reference/statements/optimize.md` --- docs/ru/sql-reference/statements/optimize.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/ru/sql-reference/statements/optimize.md b/docs/ru/sql-reference/statements/optimize.md index b70bba2d765..26993183232 100644 --- a/docs/ru/sql-reference/statements/optimize.md +++ b/docs/ru/sql-reference/statements/optimize.md @@ -10,6 +10,7 @@ sidebar_label: OPTIMIZE :::danger "Внимание" `OPTIMIZE` не устраняет причину появления ошибки `Too many parts`. +::: **Синтаксис** From 9aef18abadda4f9395e1bcb2c732571a22a9bc0c Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Fri, 3 Mar 2023 08:35:21 +0000 Subject: [PATCH 464/841] Doc update for mapFromArrays() --- .../functions/tuple-map-functions.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/en/sql-reference/functions/tuple-map-functions.md b/docs/en/sql-reference/functions/tuple-map-functions.md index 28f2f930d90..34c865e7752 100644 --- a/docs/en/sql-reference/functions/tuple-map-functions.md +++ b/docs/en/sql-reference/functions/tuple-map-functions.md @@ -68,7 +68,9 @@ Result: ## mapFromArrays -mapFromArrays merges an array of keys and an array of values into a Map. +Merges an [Array](../../sql-reference/data-types/array.md) of keys and an [Array](../../sql-reference/data-types/array.md) of values into a [Map(key, value)](../../sql-reference/data-types/map.md). + +The function is a more convenient alternative to `CAST((key_array, value_array), 'Map(key_type, value_type)')`. For example, instead of writing `CAST((['aa', 'bb'], [4, 5]), 'Map(String, UInt32)')`, you can write `mapFromArrays(['aa', 'bb'], [4, 5])`. **Syntax** @@ -78,7 +80,7 @@ mapFromArrays(keys, values) Alias: `MAP_FROM_ARRAYS(keys, values)` -**Parameters** +**Arguments** - `keys` — Given key array to create a map from. The nested type of array must be: [String](../../sql-reference/data-types/string.md), [Integer](../../sql-reference/data-types/int-uint.md), [LowCardinality](../../sql-reference/data-types/lowcardinality.md), [FixedString](../../sql-reference/data-types/fixedstring.md), [UUID](../../sql-reference/data-types/uuid.md), [Date](../../sql-reference/data-types/date.md), [DateTime](../../sql-reference/data-types/datetime.md), [Date32](../../sql-reference/data-types/date32.md), [Enum](../../sql-reference/data-types/enum.md) - `values` - Given value array to create a map from. @@ -269,7 +271,7 @@ Determines whether the `map` contains the `key` parameter. mapContains(map, key) ``` -**Parameters** +**Arguments** - `map` — Map. [Map](../../sql-reference/data-types/map.md). - `key` — Key. Type matches the type of keys of `map` parameter. @@ -314,7 +316,7 @@ Can be optimized by enabling the [optimize_functions_to_subcolumns](../../operat mapKeys(map) ``` -**Parameters** +**Arguments** - `map` — Map. [Map](../../sql-reference/data-types/map.md). @@ -357,7 +359,7 @@ Can be optimized by enabling the [optimize_functions_to_subcolumns](../../operat mapValues(map) ``` -**Parameters** +**Arguments** - `map` — Map. [Map](../../sql-reference/data-types/map.md). @@ -396,7 +398,7 @@ Result: mapContainsKeyLike(map, pattern) ``` -**Parameters** +**Arguments** - `map` — Map. [Map](../../sql-reference/data-types/map.md). - `pattern` - String pattern to match. @@ -434,7 +436,7 @@ Result: mapExtractKeyLike(map, pattern) ``` -**Parameters** +**Arguments** - `map` — Map. [Map](../../sql-reference/data-types/map.md). - `pattern` - String pattern to match. @@ -463,8 +465,6 @@ Result: │ {} │ └────────────────────────────┘ ``` - - ## mapApply @@ -474,7 +474,7 @@ Result: mapApply(func, map) ``` -**Parameters** +**Arguments** - `func` - [Lambda function](../../sql-reference/functions/index.md#higher-order-functions---operator-and-lambdaparams-expr-function). - `map` — [Map](../../sql-reference/data-types/map.md). @@ -514,7 +514,7 @@ Result: mapFilter(func, map) ``` -**Parameters** +**Arguments** - `func` - [Lambda function](../../sql-reference/functions/index.md#higher-order-functions---operator-and-lambdaparams-expr-function). - `map` — [Map](../../sql-reference/data-types/map.md). @@ -556,7 +556,7 @@ Result: mapUpdate(map1, map2) ``` -**Parameters** +**Arguments** - `map1` [Map](../../sql-reference/data-types/map.md). - `map2` [Map](../../sql-reference/data-types/map.md). From e631a4d9b8e0c95a3c4e64fc830ad4d2be5b20a6 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Fri, 3 Mar 2023 12:50:13 +0400 Subject: [PATCH 465/841] Typo at the page `/docs/ru/sql-reference/functions/introspection.md` --- docs/ru/sql-reference/functions/introspection.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ru/sql-reference/functions/introspection.md b/docs/ru/sql-reference/functions/introspection.md index 7d04dff6b72..26497ef21d3 100644 --- a/docs/ru/sql-reference/functions/introspection.md +++ b/docs/ru/sql-reference/functions/introspection.md @@ -22,7 +22,7 @@ sidebar_label: "Функции интроспекции" ClickHouse сохраняет отчеты профилировщика в [журнал трассировки](../../operations/system-tables/trace_log.md#system_tables-trace_log) в системной таблице. Убедитесь, что таблица и профилировщик настроены правильно. -## addresssToLine {#addresstoline} +## addressToLine {#addresstoline} Преобразует адрес виртуальной памяти внутри процесса сервера ClickHouse в имя файла и номер строки в исходном коде ClickHouse. From a1d99c602b50877d322b5efa411c641317f9a7c2 Mon Sep 17 00:00:00 2001 From: Sergei Trifonov Date: Fri, 3 Mar 2023 10:52:45 +0100 Subject: [PATCH 466/841] Update docs/zh/operations/backup.md --- docs/zh/operations/backup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh/operations/backup.md b/docs/zh/operations/backup.md index 04bb09c60a6..6d491f9c2f7 100644 --- a/docs/zh/operations/backup.md +++ b/docs/zh/operations/backup.md @@ -12,7 +12,7 @@ sidebar_label: "\u6570\u636E\u5907\u4EFD" 不同公司有不同的可用资源和业务需求,因此不存在一个通用的解决方案可以应对各种情况下的ClickHouse备份和恢复。 适用于 1GB 数据的方案可能并不适用于几十 PB 数据的情况。 有多种具备各自优缺点的可能方法,将在下面对其进行讨论。最好使用几种方法而不是仅仅使用一种方法来弥补它们的各种缺点。。 -:::node +:::note 需要注意的是,如果您备份了某些内容并且从未尝试过还原它,那么当您实际需要它时可能无法正常恢复(或者至少需要的时间比业务能够容忍的时间更长)。 因此,无论您选择哪种备份方法,请确保自动还原过程,并定期在备用ClickHouse群集上演练。 ::: From 38d157a850769ff88a040b1f802258f8a9d532c8 Mon Sep 17 00:00:00 2001 From: vdimir Date: Thu, 2 Mar 2023 17:50:26 +0000 Subject: [PATCH 467/841] Fix race in grace hash join with limit --- src/Interpreters/GraceHashJoin.cpp | 4 +++- src/Interpreters/GraceHashJoin.h | 2 +- .../25340_grace_hash_limit_race.reference | 0 .../0_stateless/25340_grace_hash_limit_race.sql | 15 +++++++++++++++ 4 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 tests/queries/0_stateless/25340_grace_hash_limit_race.reference create mode 100644 tests/queries/0_stateless/25340_grace_hash_limit_race.sql diff --git a/src/Interpreters/GraceHashJoin.cpp b/src/Interpreters/GraceHashJoin.cpp index 79a825a752f..1b62939ac7b 100644 --- a/src/Interpreters/GraceHashJoin.cpp +++ b/src/Interpreters/GraceHashJoin.cpp @@ -410,6 +410,8 @@ void GraceHashJoin::initialize(const Block & sample_block) void GraceHashJoin::joinBlock(Block & block, std::shared_ptr & not_processed) { + std::shared_lock current_bucket_lock(current_bucket_mutex); + if (block.rows() == 0) { hash_join->joinBlock(block, not_processed); @@ -549,7 +551,7 @@ public: IBlocksStreamPtr GraceHashJoin::getDelayedBlocks() { - std::lock_guard current_bucket_lock(current_bucket_mutex); + std::unique_lock current_bucket_lock(current_bucket_mutex); if (current_bucket == nullptr) return nullptr; diff --git a/src/Interpreters/GraceHashJoin.h b/src/Interpreters/GraceHashJoin.h index 4f7694e2f07..3a0b45370ea 100644 --- a/src/Interpreters/GraceHashJoin.h +++ b/src/Interpreters/GraceHashJoin.h @@ -139,7 +139,7 @@ private: mutable SharedMutex rehash_mutex; FileBucket * current_bucket = nullptr; - mutable std::mutex current_bucket_mutex; + mutable SharedMutex current_bucket_mutex; InMemoryJoinPtr hash_join; Block hash_join_sample_block; diff --git a/tests/queries/0_stateless/25340_grace_hash_limit_race.reference b/tests/queries/0_stateless/25340_grace_hash_limit_race.reference new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/queries/0_stateless/25340_grace_hash_limit_race.sql b/tests/queries/0_stateless/25340_grace_hash_limit_race.sql new file mode 100644 index 00000000000..322c808c94d --- /dev/null +++ b/tests/queries/0_stateless/25340_grace_hash_limit_race.sql @@ -0,0 +1,15 @@ +DROP TABLE IF EXISTS test_grace_hash; + +CREATE TABLE test_grace_hash (id UInt32, value UInt64) ENGINE = MergeTree ORDER BY id; + +INSERT INTO test_grace_hash SELECT number, number % 100 = 0 FROM numbers(100000); + +SET join_algorithm = 'grace_hash'; + +SELECT * FROM ( + SELECT f.id FROM test_grace_hash AS f + LEFT JOIN test_grace_hash AS d + ON f.id = d.id + LIMIT 1000 +) FORMAT Null; + From f06910da98cfc4aafe3bc86876975a86ee3cc760 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Fri, 3 Mar 2023 00:47:57 +0300 Subject: [PATCH 468/841] Update 25340_grace_hash_limit_race.sql --- tests/queries/0_stateless/25340_grace_hash_limit_race.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/queries/0_stateless/25340_grace_hash_limit_race.sql b/tests/queries/0_stateless/25340_grace_hash_limit_race.sql index 322c808c94d..b12dd7bdbba 100644 --- a/tests/queries/0_stateless/25340_grace_hash_limit_race.sql +++ b/tests/queries/0_stateless/25340_grace_hash_limit_race.sql @@ -13,3 +13,4 @@ SELECT * FROM ( LIMIT 1000 ) FORMAT Null; +DROP TABLE test_grace_hash; From db2ffc109ccae0118679896cf7c0e9a1f90aad35 Mon Sep 17 00:00:00 2001 From: vdimir Date: Fri, 3 Mar 2023 10:17:34 +0000 Subject: [PATCH 469/841] Add comment to GrachHashJoin::current_bucket_mutex --- src/Interpreters/GraceHashJoin.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Interpreters/GraceHashJoin.h b/src/Interpreters/GraceHashJoin.h index 3a0b45370ea..0d6c4741b95 100644 --- a/src/Interpreters/GraceHashJoin.h +++ b/src/Interpreters/GraceHashJoin.h @@ -139,6 +139,12 @@ private: mutable SharedMutex rehash_mutex; FileBucket * current_bucket = nullptr; + + /* Function `getDelayedBlocks` should be a critical section. + * Also some `joinBlock` calls may be in progress and we need to wait for them to finish, + * because they may may use `hash_join`, but `getDelayedBlocks` switches it to another bucket. + * So, `joinBlock` acquires shared lock and getDelayedBlocks acquires exclusive lock. + */ mutable SharedMutex current_bucket_mutex; InMemoryJoinPtr hash_join; From b96682ce32ef307c66172e70fb1f7c5093691e0c Mon Sep 17 00:00:00 2001 From: serxa Date: Fri, 3 Mar 2023 10:35:07 +0000 Subject: [PATCH 470/841] Fix markup in docs --- .../zh/engines/database-engines/replicated.md | 27 +++++++++--------- .../mergetree-family/mergetree.md | 14 ++++++---- .../table-engines/special/distributed.md | 28 ++++++++++--------- docs/zh/getting-started/tutorial.md | 5 ++-- docs/zh/interfaces/formats.md | 12 ++++---- docs/zh/interfaces/http.md | 10 ++++--- docs/zh/interfaces/third-party/index.md | 3 +- docs/zh/operations/access-rights.md | 6 ++-- docs/zh/operations/backup.md | 5 ++-- .../settings.md | 15 ++++++---- .../operations/settings/settings-profiles.md | 5 ++-- docs/zh/operations/settings/settings-users.md | 5 ++-- docs/zh/operations/settings/settings.md | 5 ++-- docs/zh/operations/system-tables/parts.md | 5 ++-- docs/zh/operations/system-tables/query_log.md | 5 ++-- .../aggregate-functions/reference/corr.md | 5 ++-- .../aggregate-functions/reference/covarpop.md | 5 ++-- .../reference/covarsamp.md | 5 ++-- .../reference/quantiletiming.md | 10 ++++--- .../reference/quantiletimingweighted.md | 10 ++++--- .../reference/stddevpop.md | 5 ++-- .../reference/stddevsamp.md | 5 ++-- .../reference/uniqcombined.md | 5 ++-- .../aggregate-functions/reference/varpop.md | 5 ++-- .../aggregate-functions/reference/varsamp.md | 5 ++-- docs/zh/sql-reference/ansi.md | 5 ++-- .../data-types/simpleaggregatefunction.md | 8 +++--- .../functions/string-search-functions.md | 25 ++++++++++------- .../sql-reference/statements/alter/delete.md | 5 ++-- .../sql-reference/statements/alter/index.md | 5 ++-- .../statements/alter/order-by.md | 5 ++-- .../sql-reference/statements/alter/setting.md | 5 ++-- .../sql-reference/statements/alter/update.md | 5 ++-- docs/zh/sql-reference/statements/exchange.md | 3 +- docs/zh/sql-reference/statements/rename.md | 3 +- .../statements/select/group-by.md | 5 ++-- .../sql-reference/statements/select/join.md | 10 ++++--- .../statements/select/limit-by.md | 5 ++-- .../sql-reference/statements/select/sample.md | 5 ++-- .../sql-reference/statements/select/where.md | 7 +++-- docs/zh/sql-reference/statements/system.md | 7 ++--- .../zh/sql-reference/table-functions/mysql.md | 5 ++-- 42 files changed, 186 insertions(+), 137 deletions(-) diff --git a/docs/zh/engines/database-engines/replicated.md b/docs/zh/engines/database-engines/replicated.md index df5872e9b19..843d7a3edd5 100644 --- a/docs/zh/engines/database-engines/replicated.md +++ b/docs/zh/engines/database-engines/replicated.md @@ -19,7 +19,6 @@ CREATE DATABASE testdb ENGINE = Replicated('zoo_path', 'shard_name', 'replica_na - `shard_name` — 分片的名字。数据库副本按`shard_name`分组到分片中。 - `replica_name` — 副本的名字。同一分片的所有副本的副本名称必须不同。 -!!! note "警告" 对于[ReplicatedMergeTree](../table-engines/mergetree-family/replication.md#table_engines-replication)表,如果没有提供参数,则使用默认参数:`/clickhouse/tables/{uuid}/{shard}`和`{replica}`。这些可以在服务器设置[default_replica_path](../../operations/server-configuration-parameters/settings.md#default_replica_path)和[default_replica_name](../../operations/server-configuration-parameters/settings.md#default_replica_name)中更改。宏`{uuid}`被展开到表的uuid, `{shard}`和`{replica}`被展开到服务器配置的值,而不是数据库引擎参数。但是在将来,可以使用Replicated数据库的`shard_name`和`replica_name`。 ## 使用方式 {#specifics-and-recommendations} @@ -52,8 +51,8 @@ CREATE TABLE r.rmt (n UInt64) ENGINE=ReplicatedMergeTree ORDER BY n; ``` ``` text -┌─────hosts────────────┬──status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐ -│ shard1|replica1 │ 0 │ │ 2 │ 0 │ +┌─────hosts────────────┬──status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐ +│ shard1|replica1 │ 0 │ │ 2 │ 0 │ │ shard1|other_replica │ 0 │ │ 1 │ 0 │ │ other_shard|r1 │ 0 │ │ 0 │ 0 │ └──────────────────────┴─────────┴───────┴─────────────────────┴──────────────────┘ @@ -62,13 +61,13 @@ CREATE TABLE r.rmt (n UInt64) ENGINE=ReplicatedMergeTree ORDER BY n; 显示系统表: ``` sql -SELECT cluster, shard_num, replica_num, host_name, host_address, port, is_local +SELECT cluster, shard_num, replica_num, host_name, host_address, port, is_local FROM system.clusters WHERE cluster='r'; ``` ``` text -┌─cluster─┬─shard_num─┬─replica_num─┬─host_name─┬─host_address─┬─port─┬─is_local─┐ -│ r │ 1 │ 1 │ node3 │ 127.0.0.1 │ 9002 │ 0 │ +┌─cluster─┬─shard_num─┬─replica_num─┬─host_name─┬─host_address─┬─port─┬─is_local─┐ +│ r │ 1 │ 1 │ node3 │ 127.0.0.1 │ 9002 │ 0 │ │ r │ 2 │ 1 │ node2 │ 127.0.0.1 │ 9001 │ 0 │ │ r │ 2 │ 2 │ node1 │ 127.0.0.1 │ 9000 │ 1 │ └─────────┴───────────┴─────────────┴───────────┴──────────────┴──────┴──────────┘ @@ -83,9 +82,9 @@ node1 :) SELECT materialize(hostName()) AS host, groupArray(n) FROM r.d GROUP BY ``` ``` text -┌─hosts─┬─groupArray(n)─┐ -│ node1 │ [1,3,5,7,9] │ -│ node2 │ [0,2,4,6,8] │ +┌─hosts─┬─groupArray(n)─┐ +│ node1 │ [1,3,5,7,9] │ +│ node2 │ [0,2,4,6,8] │ └───────┴───────────────┘ ``` @@ -98,8 +97,8 @@ node4 :) CREATE DATABASE r ENGINE=Replicated('some/path/r','other_shard','r2'); 集群配置如下所示: ``` text -┌─cluster─┬─shard_num─┬─replica_num─┬─host_name─┬─host_address─┬─port─┬─is_local─┐ -│ r │ 1 │ 1 │ node3 │ 127.0.0.1 │ 9002 │ 0 │ +┌─cluster─┬─shard_num─┬─replica_num─┬─host_name─┬─host_address─┬─port─┬─is_local─┐ +│ r │ 1 │ 1 │ node3 │ 127.0.0.1 │ 9002 │ 0 │ │ r │ 1 │ 2 │ node4 │ 127.0.0.1 │ 9003 │ 0 │ │ r │ 2 │ 1 │ node2 │ 127.0.0.1 │ 9001 │ 0 │ │ r │ 2 │ 2 │ node1 │ 127.0.0.1 │ 9000 │ 1 │ @@ -113,8 +112,8 @@ node2 :) SELECT materialize(hostName()) AS host, groupArray(n) FROM r.d GROUP BY ``` ```text -┌─hosts─┬─groupArray(n)─┐ -│ node2 │ [1,3,5,7,9] │ -│ node4 │ [0,2,4,6,8] │ +┌─hosts─┬─groupArray(n)─┐ +│ node2 │ [1,3,5,7,9] │ +│ node4 │ [0,2,4,6,8] │ └───────┴───────────────┘ ``` diff --git a/docs/zh/engines/table-engines/mergetree-family/mergetree.md b/docs/zh/engines/table-engines/mergetree-family/mergetree.md index 40aa764e2d3..1fcf64fcd25 100644 --- a/docs/zh/engines/table-engines/mergetree-family/mergetree.md +++ b/docs/zh/engines/table-engines/mergetree-family/mergetree.md @@ -1,6 +1,6 @@ ---- -slug: /zh/engines/table-engines/mergetree-family/mergetree ---- +--- +slug: /zh/engines/table-engines/mergetree-family/mergetree +--- # MergeTree {#table_engines-mergetree} Clickhouse 中最强大的表引擎当属 `MergeTree` (合并树)引擎及该系列(`*MergeTree`)中的其他引擎。 @@ -25,8 +25,9 @@ Clickhouse 中最强大的表引擎当属 `MergeTree` (合并树)引擎及 需要的话,您可以给表设置一个采样方法。 -!!! note "注意" - [合并](../special/merge.md#merge) 引擎并不属于 `*MergeTree` 系列。 +:::info +[合并](../special/merge.md#merge) 引擎并不属于 `*MergeTree` 系列。 +::: ## 建表 {#table_engine-mergetree-creating-a-table} @@ -364,7 +365,7 @@ WHERE 子句中的条件可以包含对某列数据进行运算的函数表达 常量参数小于 ngram 大小的函数不能使用 `ngrambf_v1` 进行查询优化。 -!!! note "注意" +:::note 布隆过滤器可能会包含不符合条件的匹配,所以 `ngrambf_v1`, `tokenbf_v1` 和 `bloom_filter` 索引不能用于结果返回为假的函数,例如: - 可以用来优化的场景 @@ -379,6 +380,7 @@ WHERE 子句中的条件可以包含对某列数据进行运算的函数表达 - `NOT s = 1` - `s != 1` - `NOT startsWith(s, 'test')` +::: ## 并发数据访问 {#concurrent-data-access} diff --git a/docs/zh/engines/table-engines/special/distributed.md b/docs/zh/engines/table-engines/special/distributed.md index c832e9e19ba..3c8a7a833d0 100644 --- a/docs/zh/engines/table-engines/special/distributed.md +++ b/docs/zh/engines/table-engines/special/distributed.md @@ -45,7 +45,7 @@ CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] AS [db2.]name2 - [insert_distributed_sync](../../../operations/settings/settings.md#insert_distributed_sync) 设置 - [MergeTree](../../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-multiple-volumes) 查看示例 - + **分布式设置** - `fsync_after_insert` - 对异步插入到分布式的文件数据执行`fsync`。确保操作系统将所有插入的数据刷新到启动节点**磁盘上的一个文件**中。 @@ -66,19 +66,20 @@ CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] AS [db2.]name2 - `monitor_max_sleep_time_ms` - 等同于 [distributed_directory_monitor_max_sleep_time_ms](../../../operations/settings/settings.md#distributed_directory_monitor_max_sleep_time_ms) -!!! note "备注" +::note +**稳定性设置** (`fsync_...`): - **稳定性设置** (`fsync_...`): +- 只影响异步插入(例如:`insert_distributed_sync=false`), 当数据首先存储在启动节点磁盘上,然后再异步发送到shard。 +— 可能会显著降低`insert`的性能 +- 影响将存储在分布式表文件夹中的数据写入 **接受您插入的节点** 。如果你需要保证写入数据到底层的MergeTree表中,请参阅 `system.merge_tree_settings` 中的持久性设置(`...fsync...`) - - 只影响异步插入(例如:`insert_distributed_sync=false`), 当数据首先存储在启动节点磁盘上,然后再异步发送到shard。 - — 可能会显著降低`insert`的性能 - - 影响将存储在分布式表文件夹中的数据写入 **接受您插入的节点** 。如果你需要保证写入数据到底层的MergeTree表中,请参阅 `system.merge_tree_settings` 中的持久性设置(`...fsync...`) +**插入限制设置** (`..._insert`) 请见: - **插入限制设置** (`..._insert`) 请见: +- [insert_distributed_sync](../../../operations/settings/settings.md#insert_distributed_sync) 设置 +- [prefer_localhost_replica](../../../operations/settings/settings.md#settings-prefer-localhost-replica) 设置 +- `bytes_to_throw_insert` 在 `bytes_to_delay_insert` 之前处理,所以你不应该设置它的值小于 `bytes_to_delay_insert` +::: - - [insert_distributed_sync](../../../operations/settings/settings.md#insert_distributed_sync) 设置 - - [prefer_localhost_replica](../../../operations/settings/settings.md#settings-prefer-localhost-replica) 设置 - - `bytes_to_throw_insert` 在 `bytes_to_delay_insert` 之前处理,所以你不应该设置它的值小于 `bytes_to_delay_insert` **示例** ``` sql @@ -214,7 +215,7 @@ SELECT 查询会被发送到所有分片,并且无论数据在分片中如何 ## 读取数据 {#distributed-reading-data} - + 当查询一个`Distributed`表时,`SELECT`查询被发送到所有的分片,不管数据是如何分布在分片上的(它们可以完全随机分布)。当您添加一个新分片时,您不必将旧数据传输到它。相反,您可以使用更重的权重向其写入新数据——数据的分布会稍微不均匀,但查询将正确有效地工作。 当启用`max_parallel_replicas`选项时,查询处理将在单个分片中的所有副本之间并行化。更多信息,请参见[max_parallel_replicas](../../../operations/settings/settings.md#settings-max_parallel_replicas)。 @@ -225,8 +226,9 @@ SELECT 查询会被发送到所有分片,并且无论数据在分片中如何 - `_shard_num` — 表`system.clusters` 中的 `shard_num` 值 . 数据类型: [UInt32](../../../sql-reference/data-types/int-uint.md). -!!! note "备注" - 因为 [remote](../../../sql-reference/table-functions/remote.md) 和 [cluster](../../../sql-reference/table-functions/cluster.mdx) 表方法内部创建了分布式表, `_shard_num` 对他们都有效. +:::note +因为 [remote](../../../sql-reference/table-functions/remote.md) 和 [cluster](../../../sql-reference/table-functions/cluster.mdx) 表方法内部创建了分布式表, `_shard_num` 对他们都有效. +::: **详见** - [虚拟列](../../../engines/table-engines/index.md#table_engines-virtual_columns) 描述 diff --git a/docs/zh/getting-started/tutorial.md b/docs/zh/getting-started/tutorial.md index bef3ecee35f..989cf5f57d8 100644 --- a/docs/zh/getting-started/tutorial.md +++ b/docs/zh/getting-started/tutorial.md @@ -617,8 +617,9 @@ INSERT INTO tutorial.hits_all SELECT * FROM tutorial.hits_v1; 启用本机复制[Zookeeper](http://zookeeper.apache.org/)是必需的。 ClickHouse负责所有副本的数据一致性,并在失败后自动运行恢复过程。建议将ZooKeeper集群部署在单独的服务器上(其中没有其他进程,包括运行的ClickHouse)。 -!!! note "注意" - ZooKeeper不是一个严格的要求:在某些简单的情况下,您可以通过将数据写入应用程序代码中的所有副本来复制数据。 这种方法是**不**建议的,在这种情况下,ClickHouse将无法保证所有副本上的数据一致性。 因此需要由您的应用来保证这一点。 +:::note +ZooKeeper不是一个严格的要求:在某些简单的情况下,您可以通过将数据写入应用程序代码中的所有副本来复制数据。 这种方法是**不**建议的,在这种情况下,ClickHouse将无法保证所有副本上的数据一致性。 因此需要由您的应用来保证这一点。 +::: ZooKeeper位置在配置文件中指定: diff --git a/docs/zh/interfaces/formats.md b/docs/zh/interfaces/formats.md index 852b327366b..fd3cf743818 100644 --- a/docs/zh/interfaces/formats.md +++ b/docs/zh/interfaces/formats.md @@ -685,8 +685,9 @@ CREATE TABLE IF NOT EXISTS example_table - 如果`input_format_defaults_for_omitted_fields = 0`, 那么`x`和`a`的默认值等于`0`(作为`UInt32`数据类型的默认值)。 - 如果`input_format_defaults_for_omitted_fields = 1`, 那么`x`的默认值为`0`,但`a`的默认值为`x * 2`。 -!!! note "注意" +:::warning 当使用`input_format_defaults_for_omitted_fields = 1`插入数据时,与使用`input_format_defaults_for_omitted_fields = 0`相比,ClickHouse消耗更多的计算资源。 +::: ### Selecting Data {#selecting-data} @@ -708,8 +709,9 @@ CREATE TABLE IF NOT EXISTS example_table 与[JSON](#json)格式不同,没有替换无效的UTF-8序列。值以与`JSON`相同的方式转义。 -!!! note "提示" +:::info 字符串中可以输出任意一组字节。如果您确信表中的数据可以被格式化为JSON而不会丢失任何信息,那么就使用`JSONEachRow`格式。 +::: ### Nested Structures {#jsoneachrow-nested} @@ -1216,9 +1218,9 @@ SET format_avro_schema_registry_url = 'http://schema-registry'; SELECT * FROM topic1_stream; ``` -!!! note "警告" - 设置 `format_avro_schema_registry_url` 需要写入配置文件`users.xml`以在Clickhouse重启后,该设置仍为您的设定值。您也可以在使用Kafka引擎的时候指定该设置。 - +:::warning +设置 `format_avro_schema_registry_url` 需要写入配置文件`users.xml`以在Clickhouse重启后,该设置仍为您的设定值。您也可以在使用Kafka引擎的时候指定该设置。 +::: ## Parquet {#data-format-parquet} diff --git a/docs/zh/interfaces/http.md b/docs/zh/interfaces/http.md index 11754ed3e2f..e0c12193a6a 100644 --- a/docs/zh/interfaces/http.md +++ b/docs/zh/interfaces/http.md @@ -188,8 +188,9 @@ $ curl -vsS "http://localhost:8123/?enable_http_compression=1" -d 'SELECT number $ echo "SELECT 1" | gzip -c | curl -sS --data-binary @- -H 'Content-Encoding: gzip' 'http://localhost:8123/' ``` -!!! note "警告" - 一些HTTP客户端可能会在默认情况下从服务器解压数据(使用`gzip`和`deflate`),即使您未正确地使用了压缩设置,您也可能会得到解压数据。 +:::warning +一些HTTP客户端可能会在默认情况下从服务器解压数据(使用`gzip`和`deflate`),即使您未正确地使用了压缩设置,您也可能会得到解压数据。 +::: 您可以使用`database`URL参数或`X-ClickHouse-Database`头来指定默认数据库。 @@ -447,8 +448,9 @@ $ curl -H 'XXX:TEST_HEADER_VALUE' -H 'PARAMS_XXX:max_threads' 'http://localhost: max_final_threads 2 ``` -!!! note "警告" - 在一个`predefined_query_handler`中,只支持insert类型的一个`查询`。 +:::warning +在一个`predefined_query_handler`中,只支持insert类型的一个`查询`。 +::: ### 动态查询 {#dynamic_query_handler} diff --git a/docs/zh/interfaces/third-party/index.md b/docs/zh/interfaces/third-party/index.md index 0c6b194d04a..64c0b30a9c0 100644 --- a/docs/zh/interfaces/third-party/index.md +++ b/docs/zh/interfaces/third-party/index.md @@ -13,5 +13,6 @@ sidebar_position: 24 - [GUI](../../interfaces/third-party/gui.md) - [Proxies](../../interfaces/third-party/proxy.md) -!!! note "注意" +:::note 支持通用API的通用工具[ODBC](../../interfaces/odbc.md)或[JDBC](../../interfaces/jdbc.md),通常也适用于ClickHouse,但这里没有列出,因为它们实在太多了。 +::: diff --git a/docs/zh/operations/access-rights.md b/docs/zh/operations/access-rights.md index 713cf991f47..8d640ef32c0 100644 --- a/docs/zh/operations/access-rights.md +++ b/docs/zh/operations/access-rights.md @@ -24,9 +24,9 @@ ClickHouse权限实体包括: 我们建议你使用SQL工作流的方式。当然配置的方式也可以同时起作用, 所以如果你正在用服务端配置的方式来管理权限和账户,你可以平滑的切换到SQL驱动的工作流方式。 -!!! note "警告" - 你无法同时使用两个配置的方式来管理同一个权限实体。 - +:::warning +你无法同时使用两个配置的方式来管理同一个权限实体。 +::: ## 用法 {#access-control-usage} diff --git a/docs/zh/operations/backup.md b/docs/zh/operations/backup.md index e0c5174a9a4..6d491f9c2f7 100644 --- a/docs/zh/operations/backup.md +++ b/docs/zh/operations/backup.md @@ -12,8 +12,9 @@ sidebar_label: "\u6570\u636E\u5907\u4EFD" 不同公司有不同的可用资源和业务需求,因此不存在一个通用的解决方案可以应对各种情况下的ClickHouse备份和恢复。 适用于 1GB 数据的方案可能并不适用于几十 PB 数据的情况。 有多种具备各自优缺点的可能方法,将在下面对其进行讨论。最好使用几种方法而不是仅仅使用一种方法来弥补它们的各种缺点。。 -!!! note "注" - 需要注意的是,如果您备份了某些内容并且从未尝试过还原它,那么当您实际需要它时可能无法正常恢复(或者至少需要的时间比业务能够容忍的时间更长)。 因此,无论您选择哪种备份方法,请确保自动还原过程,并定期在备用ClickHouse群集上演练。 +:::note +需要注意的是,如果您备份了某些内容并且从未尝试过还原它,那么当您实际需要它时可能无法正常恢复(或者至少需要的时间比业务能够容忍的时间更长)。 因此,无论您选择哪种备份方法,请确保自动还原过程,并定期在备用ClickHouse群集上演练。 +::: ## 将源数据复制到其它地方 {#duplicating-source-data-somewhere-else} diff --git a/docs/zh/operations/server-configuration-parameters/settings.md b/docs/zh/operations/server-configuration-parameters/settings.md index 89ae411b9e0..2fd04b1260a 100644 --- a/docs/zh/operations/server-configuration-parameters/settings.md +++ b/docs/zh/operations/server-configuration-parameters/settings.md @@ -528,8 +528,9 @@ SSL客户端/服务器配置。 包含数据的目录的路径。 -!!! note "注" - 尾部斜杠是强制性的。 +:::note +尾部斜杠是强制性的。 +::: **示例** @@ -714,8 +715,9 @@ TCP端口,用于与客户端进行安全通信。 使用它与 [OpenSSL](#serv 用于处理大型查询的临时数据的路径。 -!!! note "注" - 尾部斜杠是强制性的。 +:::note +尾部斜杠是强制性的。 +::: **示例** @@ -728,11 +730,12 @@ TCP端口,用于与客户端进行安全通信。 使用它与 [OpenSSL](#serv 从政策 [`storage_configuration`](../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-multiple-volumes) 存储临时文件。 如果没有设置 [`tmp_path`](#server-settings-tmp_path) 被使用,否则被忽略。 -!!! note "注" - - `move_factor` 被忽略 +:::note +- `move_factor` 被忽略 - `keep_free_space_bytes` 被忽略 - `max_data_part_size_bytes` 被忽略 -您必须在该政策中只有一个卷 +::: ## uncompressed_cache_size {#server-settings-uncompressed_cache_size} diff --git a/docs/zh/operations/settings/settings-profiles.md b/docs/zh/operations/settings/settings-profiles.md index 1ad394950bf..5051276607f 100644 --- a/docs/zh/operations/settings/settings-profiles.md +++ b/docs/zh/operations/settings/settings-profiles.md @@ -8,8 +8,9 @@ sidebar_label: "\u8BBE\u7F6E\u914D\u7F6E" 设置配置是设置的集合,并按照相同的名称进行分组。 -!!! note "信息" - ClickHouse 还支持用 [SQL驱动的工作流](../../operations/access-rights.md#access-control) 管理设置配置。我们建议使用它。 +:::info +ClickHouse 还支持用 [SQL驱动的工作流](../../operations/access-rights.md#access-control) 管理设置配置。我们建议使用它。 +::: 设置配置可以任意命名。你可以为不同的用户指定相同的设置配置。您可以在设置配置中写入的最重要的内容是 `readonly=1`,这将确保只读访问。 diff --git a/docs/zh/operations/settings/settings-users.md b/docs/zh/operations/settings/settings-users.md index de4aa27df69..3fb97bbddb2 100644 --- a/docs/zh/operations/settings/settings-users.md +++ b/docs/zh/operations/settings/settings-users.md @@ -10,8 +10,9 @@ sidebar_label: "\u7528\u6237\u8BBE\u7F6E" `user.xml` 中的 `users` 配置段包含了用户配置 -!!! note "提示" - ClickHouse还支持 [SQL驱动的工作流](../access-rights.md#access-control) 用于管理用户。 我们建议使用它。 +:::note +ClickHouse还支持 [SQL驱动的工作流](../access-rights.md#access-control) 用于管理用户。 我们建议使用它。 +::: `users` 配置段的结构: diff --git a/docs/zh/operations/settings/settings.md b/docs/zh/operations/settings/settings.md index 4107a499463..457b208602f 100644 --- a/docs/zh/operations/settings/settings.md +++ b/docs/zh/operations/settings/settings.md @@ -266,8 +266,9 @@ INSERT INTO test VALUES (lower('Hello')), (lower('world')), (lower('INSERT')), ( 执行时 `INSERT` 查询时,将省略的输入列值替换为相应列的默认值。 此选项仅适用于 [JSONEachRow](../../interfaces/formats.md#jsoneachrow), [CSV](../../interfaces/formats.md#csv) 和 [TabSeparated](../../interfaces/formats.md#tabseparated) 格式。 -!!! note "注" - 启用此选项后,扩展表元数据将从服务器发送到客户端。 它会消耗服务器上的额外计算资源,并可能降低性能。 +:::note +启用此选项后,扩展表元数据将从服务器发送到客户端。 它会消耗服务器上的额外计算资源,并可能降低性能。 +::: 可能的值: diff --git a/docs/zh/operations/system-tables/parts.md b/docs/zh/operations/system-tables/parts.md index 0bd728f543f..0ebac3944ff 100644 --- a/docs/zh/operations/system-tables/parts.md +++ b/docs/zh/operations/system-tables/parts.md @@ -99,8 +99,9 @@ slug: /zh/operations/system-tables/parts - `move_ttl_info.expression` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) — 表达式的数组。 每个表达式定义一个 [TTL MOVE 规则](../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-ttl). - !!! note "警告" - 保留 `move_ttl_info.expression` 数组主要是为了向后兼容,现在检查 `TTL MOVE` 规则最简单的方法是使用 `move_ttl_info.min` 和 `move_ttl_info.max` 字段。 +:::warning +保留 `move_ttl_info.expression` 数组主要是为了向后兼容,现在检查 `TTL MOVE` 规则最简单的方法是使用 `move_ttl_info.min` 和 `move_ttl_info.max` 字段。 +::: - `move_ttl_info.min` ([Array](../../sql-reference/data-types/array.md)([DateTime](../../sql-reference/data-types/datetime.md))) — 日期值和时间值的数组。数组中的每个元素都描述了一个 [TTL MOVE rule](../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-ttl) 的最小键值。 diff --git a/docs/zh/operations/system-tables/query_log.md b/docs/zh/operations/system-tables/query_log.md index 93e5771d4b5..7149282dfcc 100644 --- a/docs/zh/operations/system-tables/query_log.md +++ b/docs/zh/operations/system-tables/query_log.md @@ -8,8 +8,9 @@ machine_translated_rev: 5decc73b5dc60054f19087d3690c4eb99446a6c3 包含已执行查询的相关信息,例如:开始时间、处理持续时间、错误消息。 -!!! note "注" - 此表不包含以下内容的摄取数据 `INSERT` 查询。 +:::note +此表不包含以下内容的摄取数据 `INSERT` 查询。 +::: 您可以更改query_log的设置,在服务器配置的 [query_log](../../operations/server-configuration-parameters/settings.md#server_configuration_parameters-query-log) 部分。 diff --git a/docs/zh/sql-reference/aggregate-functions/reference/corr.md b/docs/zh/sql-reference/aggregate-functions/reference/corr.md index 01a89e428ab..48b5bf904f5 100644 --- a/docs/zh/sql-reference/aggregate-functions/reference/corr.md +++ b/docs/zh/sql-reference/aggregate-functions/reference/corr.md @@ -12,5 +12,6 @@ sidebar_position: 107 计算Pearson相关系数: `Σ((x - x̅)(y - y̅)) / sqrt(Σ((x - x̅)^2) * Σ((y - y̅)^2))`。 -!!! note "注" - 该函数使用数值不稳定的算法。 如果你需要 [数值稳定性](https://en.wikipedia.org/wiki/Numerical_stability) 在计算中,使用 `corrStable` 函数。 它的工作速度较慢,但提供较低的计算错误。 +:::note +该函数使用数值不稳定的算法。 如果你需要 [数值稳定性](https://en.wikipedia.org/wiki/Numerical_stability) 在计算中,使用 `corrStable` 函数。 它的工作速度较慢,但提供较低的计算错误。 +::: diff --git a/docs/zh/sql-reference/aggregate-functions/reference/covarpop.md b/docs/zh/sql-reference/aggregate-functions/reference/covarpop.md index 93bfee15684..e98270dc896 100644 --- a/docs/zh/sql-reference/aggregate-functions/reference/covarpop.md +++ b/docs/zh/sql-reference/aggregate-functions/reference/covarpop.md @@ -12,5 +12,6 @@ covarPop(x, y) 计算 `Σ((x - x̅)(y - y̅)) / n` 的值。 -!!! note "注" - 该函数使用数值不稳定的算法。 如果你需要 [数值稳定性](https://en.wikipedia.org/wiki/Numerical_stability) 在计算中,使用 `covarPopStable` 函数。 它的工作速度较慢,但提供了较低的计算错误。 +:::note +该函数使用数值不稳定的算法。 如果你需要 [数值稳定性](https://en.wikipedia.org/wiki/Numerical_stability) 在计算中,使用 `covarPopStable` 函数。 它的工作速度较慢,但提供了较低的计算错误。 +::: diff --git a/docs/zh/sql-reference/aggregate-functions/reference/covarsamp.md b/docs/zh/sql-reference/aggregate-functions/reference/covarsamp.md index 7c8565211b1..1b8dfc4a60f 100644 --- a/docs/zh/sql-reference/aggregate-functions/reference/covarsamp.md +++ b/docs/zh/sql-reference/aggregate-functions/reference/covarsamp.md @@ -14,5 +14,6 @@ covarSamp(x, y) 返回Float64。 当 `n <= 1`, 返回 +∞。 -!!! note "注" - 该函数使用数值不稳定的算法。 如果你需要 [数值稳定性](https://en.wikipedia.org/wiki/Numerical_stability) 在计算中,使用 `covarSampStable` 函数。 它的工作速度较慢,但提供较低的计算错误。 +:::note +该函数使用数值不稳定的算法。 如果你需要 [数值稳定性](https://en.wikipedia.org/wiki/Numerical_stability) 在计算中,使用 `covarSampStable` 函数。 它的工作速度较慢,但提供较低的计算错误。 +::: diff --git a/docs/zh/sql-reference/aggregate-functions/reference/quantiletiming.md b/docs/zh/sql-reference/aggregate-functions/reference/quantiletiming.md index 5e14ce6a11c..af7ad77c717 100644 --- a/docs/zh/sql-reference/aggregate-functions/reference/quantiletiming.md +++ b/docs/zh/sql-reference/aggregate-functions/reference/quantiletiming.md @@ -37,8 +37,9 @@ quantileTiming(level)(expr) 否则,计算结果将四舍五入到16毫秒的最接近倍数。 -!!! note "注" - 对于计算页面加载时间分位数, 此函数比[quantile](../../../sql-reference/aggregate-functions/reference/quantile.md#quantile)更有效和准确。 +:::note +对于计算页面加载时间分位数, 此函数比[quantile](../../../sql-reference/aggregate-functions/reference/quantile.md#quantile)更有效和准确。 +::: **返回值** @@ -46,8 +47,9 @@ quantileTiming(level)(expr) 类型: `Float32`。 -!!! note "注" - 如果没有值传递给函数(当使用 `quantileTimingIf`), [NaN](../../../sql-reference/data-types/float.md#data_type-float-nan-inf)被返回。 这样做的目的是将这些案例与导致零的案例区分开来。 参见 [ORDER BY clause](../../../sql-reference/statements/select/order-by.md#select-order-by) 对于 `NaN` 值排序注意事项。 +:::note +如果没有值传递给函数(当使用 `quantileTimingIf`), [NaN](../../../sql-reference/data-types/float.md#data_type-float-nan-inf)被返回。 这样做的目的是将这些案例与导致零的案例区分开来。 参见 [ORDER BY clause](../../../sql-reference/statements/select/order-by.md#select-order-by) 对于 `NaN` 值排序注意事项。 +::: **示例** diff --git a/docs/zh/sql-reference/aggregate-functions/reference/quantiletimingweighted.md b/docs/zh/sql-reference/aggregate-functions/reference/quantiletimingweighted.md index 2c28583343a..b520a0f96af 100644 --- a/docs/zh/sql-reference/aggregate-functions/reference/quantiletimingweighted.md +++ b/docs/zh/sql-reference/aggregate-functions/reference/quantiletimingweighted.md @@ -39,8 +39,9 @@ quantileTimingWeighted(level)(expr, weight) 否则,计算结果将四舍五入到16毫秒的最接近倍数。 -!!! note "注" - 对于计算页面加载时间分位数, 此函数比[quantile](../../../sql-reference/aggregate-functions/reference/quantile.md#quantile)更有效和准确。 +:::note +对于计算页面加载时间分位数, 此函数比[quantile](../../../sql-reference/aggregate-functions/reference/quantile.md#quantile)更有效和准确。 +::: **返回值** @@ -48,8 +49,9 @@ quantileTimingWeighted(level)(expr, weight) 类型: `Float32`。 -!!! note "注" - 如果没有值传递给函数(当使用 `quantileTimingIf`), [NaN](../../../sql-reference/data-types/float.md#data_type-float-nan-inf)被返回。 这样做的目的是将这些案例与导致零的案例区分开来。 参见 [ORDER BY clause](../../../sql-reference/statements/select/order-by.md#select-order-by) 对于 `NaN` 值排序注意事项。 +:::note +如果没有值传递给函数(当使用 `quantileTimingIf`), [NaN](../../../sql-reference/data-types/float.md#data_type-float-nan-inf)被返回。 这样做的目的是将这些案例与导致零的案例区分开来。 参见 [ORDER BY clause](../../../sql-reference/statements/select/order-by.md#select-order-by) 对于 `NaN` 值排序注意事项。 +::: **示例** diff --git a/docs/zh/sql-reference/aggregate-functions/reference/stddevpop.md b/docs/zh/sql-reference/aggregate-functions/reference/stddevpop.md index ea82e21e46f..a113084cdee 100644 --- a/docs/zh/sql-reference/aggregate-functions/reference/stddevpop.md +++ b/docs/zh/sql-reference/aggregate-functions/reference/stddevpop.md @@ -7,5 +7,6 @@ sidebar_position: 30 结果等于 [varPop](../../../sql-reference/aggregate-functions/reference/varpop.md)的平方根。 -!!! note "注" - 该函数使用数值不稳定的算法。 如果你需要 [数值稳定性](https://en.wikipedia.org/wiki/Numerical_stability) 在计算中,使用 `stddevPopStable` 函数。 它的工作速度较慢,但提供较低的计算错误。 +:::note +该函数使用数值不稳定的算法。 如果你需要 [数值稳定性](https://en.wikipedia.org/wiki/Numerical_stability) 在计算中,使用 `stddevPopStable` 函数。 它的工作速度较慢,但提供较低的计算错误。 +::: diff --git a/docs/zh/sql-reference/aggregate-functions/reference/stddevsamp.md b/docs/zh/sql-reference/aggregate-functions/reference/stddevsamp.md index efeafb71072..d242f4e3401 100644 --- a/docs/zh/sql-reference/aggregate-functions/reference/stddevsamp.md +++ b/docs/zh/sql-reference/aggregate-functions/reference/stddevsamp.md @@ -7,5 +7,6 @@ sidebar_position: 31 结果等于 [varSamp] (../../../sql-reference/aggregate-functions/reference/varsamp.md)的平方根。 -!!! note "注" - 该函数使用数值不稳定的算法。 如果你需要 [数值稳定性](https://en.wikipedia.org/wiki/Numerical_stability) 在计算中,使用 `stddevSampStable` 函数。 它的工作速度较慢,但提供较低的计算错误。 +:::note +该函数使用数值不稳定的算法。 如果你需要 [数值稳定性](https://en.wikipedia.org/wiki/Numerical_stability) 在计算中,使用 `stddevSampStable` 函数。 它的工作速度较慢,但提供较低的计算错误。 +::: \ No newline at end of file diff --git a/docs/zh/sql-reference/aggregate-functions/reference/uniqcombined.md b/docs/zh/sql-reference/aggregate-functions/reference/uniqcombined.md index edc790ec00f..7b4a78d662e 100644 --- a/docs/zh/sql-reference/aggregate-functions/reference/uniqcombined.md +++ b/docs/zh/sql-reference/aggregate-functions/reference/uniqcombined.md @@ -36,8 +36,9 @@ uniqCombined(HLL_precision)(x[, ...]) - 确定性地提供结果(它不依赖于查询处理顺序)。 -!!! note "注" - 由于它对非 `String` 类型使用32位哈希,对于基数显著大于`UINT_MAX` ,结果将有非常高的误差(误差将在几百亿不同值之后迅速提高), 因此这种情况,你应该使用 [uniqCombined64](../../../sql-reference/aggregate-functions/reference/uniqcombined64.md#agg_function-uniqcombined64) +:::note +由于它对非 `String` 类型使用32位哈希,对于基数显著大于`UINT_MAX` ,结果将有非常高的误差(误差将在几百亿不同值之后迅速提高), 因此这种情况,你应该使用 [uniqCombined64](../../../sql-reference/aggregate-functions/reference/uniqcombined64.md#agg_function-uniqcombined64) +::: 相比于 [uniq](../../../sql-reference/aggregate-functions/reference/uniq.md#agg_function-uniq) 函数, 该 `uniqCombined`: diff --git a/docs/zh/sql-reference/aggregate-functions/reference/varpop.md b/docs/zh/sql-reference/aggregate-functions/reference/varpop.md index eb17955210b..6d6b0acc615 100644 --- a/docs/zh/sql-reference/aggregate-functions/reference/varpop.md +++ b/docs/zh/sql-reference/aggregate-functions/reference/varpop.md @@ -9,5 +9,6 @@ sidebar_position: 32 换句话说,计算一组数据的离差。 返回 `Float64`。 -!!! note "注" - 该函数使用数值不稳定的算法。 如果你需要 [数值稳定性](https://en.wikipedia.org/wiki/Numerical_stability) 在计算中,使用 `varPopStable` 函数。 它的工作速度较慢,但提供较低的计算错误。 +:::note +该函数使用数值不稳定的算法。 如果你需要 [数值稳定性](https://en.wikipedia.org/wiki/Numerical_stability) 在计算中,使用 `varPopStable` 函数。 它的工作速度较慢,但提供较低的计算错误。 +::: diff --git a/docs/zh/sql-reference/aggregate-functions/reference/varsamp.md b/docs/zh/sql-reference/aggregate-functions/reference/varsamp.md index 9b9d0ced92d..508e35445a7 100644 --- a/docs/zh/sql-reference/aggregate-functions/reference/varsamp.md +++ b/docs/zh/sql-reference/aggregate-functions/reference/varsamp.md @@ -11,5 +11,6 @@ sidebar_position: 33 返回 `Float64`。 当 `n <= 1`,返回 `+∞`。 -!!! note "注" - 该函数使用数值不稳定的算法。 如果你需要 [数值稳定性](https://en.wikipedia.org/wiki/Numerical_stability) 在计算中,使用 `varSampStable` 函数。 它的工作速度较慢,但提供较低的计算错误。 +:::note +该函数使用数值不稳定的算法。 如果你需要 [数值稳定性](https://en.wikipedia.org/wiki/Numerical_stability) 在计算中,使用 `varSampStable` 函数。 它的工作速度较慢,但提供较低的计算错误。 +::: diff --git a/docs/zh/sql-reference/ansi.md b/docs/zh/sql-reference/ansi.md index cdccee0084f..74f13256eba 100644 --- a/docs/zh/sql-reference/ansi.md +++ b/docs/zh/sql-reference/ansi.md @@ -6,8 +6,9 @@ sidebar_label: "ANSI\u517C\u5BB9\u6027" # ClickHouse SQL方言 与ANSI SQL的兼容性{#ansi-sql-compatibility-of-clickhouse-sql-dialect} -!!! note "注" - 本文参考Annex G所著的[ISO/IEC CD 9075-2:2011](https://www.iso.org/obp/ui/#iso:std:iso-iec:9075:-2:ed-4:v1:en:sec:8)标准. +:::note +本文参考Annex G所著的[ISO/IEC CD 9075-2:2011](https://www.iso.org/obp/ui/#iso:std:iso-iec:9075:-2:ed-4:v1:en:sec:8)标准. +::: ## 行为差异 {#differences-in-behaviour} diff --git a/docs/zh/sql-reference/data-types/simpleaggregatefunction.md b/docs/zh/sql-reference/data-types/simpleaggregatefunction.md index b26994a775e..601cb602a78 100644 --- a/docs/zh/sql-reference/data-types/simpleaggregatefunction.md +++ b/docs/zh/sql-reference/data-types/simpleaggregatefunction.md @@ -25,10 +25,10 @@ slug: /zh/sql-reference/data-types/simpleaggregatefunction - [`argMax`](../../sql-reference/aggregate-functions/reference/argmax.md) -!!! note "注" - `SimpleAggregateFunction(func, Type)` 的值外观和存储方式于 `Type` 相同, 所以你不需要应用带有 `-Merge`/`-State` 后缀的函数。 - - `SimpleAggregateFunction` 的性能优于具有相同聚合函数的 `AggregateFunction` 。 +:::note +`SimpleAggregateFunction(func, Type)` 的值外观和存储方式于 `Type` 相同, 所以你不需要应用带有 `-Merge`/`-State` 后缀的函数。 +`SimpleAggregateFunction` 的性能优于具有相同聚合函数的 `AggregateFunction` 。 +::: **参数** diff --git a/docs/zh/sql-reference/functions/string-search-functions.md b/docs/zh/sql-reference/functions/string-search-functions.md index 756ac7c16c7..e4167127424 100644 --- a/docs/zh/sql-reference/functions/string-search-functions.md +++ b/docs/zh/sql-reference/functions/string-search-functions.md @@ -42,8 +42,9 @@ slug: /zh/sql-reference/functions/string-search-functions 对于不区分大小写的搜索或/和UTF-8格式,使用函数`multiSearchAnyCaseInsensitive,multiSearchAnyUTF8,multiSearchAnyCaseInsensitiveUTF8`。 -!!! note "注意" - 在所有`multiSearch*`函数中,由于实现规范,needles的数量应小于28。 +:::note +在所有`multiSearch*`函数中,由于实现规范,needles的数量应小于28。 +::: ## 匹配(大海捞针,模式) {#matchhaystack-pattern} @@ -60,8 +61,9 @@ slug: /zh/sql-reference/functions/string-search-functions 与`match`相同,但如果所有正则表达式都不匹配,则返回0;如果任何模式匹配,则返回1。它使用[超扫描](https://github.com/intel/hyperscan)库。对于在字符串中搜索子字符串的模式,最好使用«multisearchany»,因为它更高效。 -!!! note "注意" - 任何`haystack`字符串的长度必须小于232\字节,否则抛出异常。这种限制是因为hyperscan API而产生的。 +:::note +任何`haystack`字符串的长度必须小于232\字节,否则抛出异常。这种限制是因为hyperscan API而产生的。 +::: ## multiMatchAnyIndex(大海捞针,\[模式1,模式2, …, patternn\]) {#multimatchanyindexhaystack-pattern1-pattern2-patternn} @@ -75,11 +77,13 @@ slug: /zh/sql-reference/functions/string-search-functions 与`multiFuzzyMatchAny`相同,但返回匹配项的匹配能容的索引位置。 -!!! note "注意" - `multiFuzzyMatch*`函数不支持UTF-8正则表达式,由于hyperscan限制,这些表达式被按字节解析。 +:::note +`multiFuzzyMatch*`函数不支持UTF-8正则表达式,由于hyperscan限制,这些表达式被按字节解析。 +::: -!!! note "注意" - 如要关闭所有hyperscan函数的使用,请设置`SET allow_hyperscan = 0;`。 +:::note +如要关闭所有hyperscan函数的使用,请设置`SET allow_hyperscan = 0;`。 +::: ## 提取(大海捞针,图案) {#extracthaystack-pattern} @@ -119,5 +123,6 @@ slug: /zh/sql-reference/functions/string-search-functions 对于不区分大小写的搜索或/和UTF-8格式,使用函数`ngramSearchCaseInsensitive,ngramSearchUTF8,ngramSearchCaseInsensitiveUTF8`。 -!!! note "注意" - 对于UTF-8,我们使用3-gram。所有这些都不是完全公平的n-gram距离。我们使用2字节哈希来散列n-gram,然后计算这些哈希表之间的(非)对称差异 - 可能会发生冲突。对于UTF-8不区分大小写的格式,我们不使用公平的`tolower`函数 - 我们将每个Unicode字符字节的第5位(从零开始)和字节的第一位归零 - 这适用于拉丁语,主要用于所有西里尔字母。 +:::note +对于UTF-8,我们使用3-gram。所有这些都不是完全公平的n-gram距离。我们使用2字节哈希来散列n-gram,然后计算这些哈希表之间的(非)对称差异 - 可能会发生冲突。对于UTF-8不区分大小写的格式,我们不使用公平的`tolower`函数 - 我们将每个Unicode字符字节的第5位(从零开始)和字节的第一位归零 - 这适用于拉丁语,主要用于所有西里尔字母。 +::: diff --git a/docs/zh/sql-reference/statements/alter/delete.md b/docs/zh/sql-reference/statements/alter/delete.md index 85d3d3077a7..5eb77c35a93 100644 --- a/docs/zh/sql-reference/statements/alter/delete.md +++ b/docs/zh/sql-reference/statements/alter/delete.md @@ -12,8 +12,9 @@ ALTER TABLE [db.]table [ON CLUSTER cluster] DELETE WHERE filter_expr 删除匹配指定过滤表达式的数据。实现为[突变](../../../sql-reference/statements/alter/index.md#mutations). -!!! note "备注" - `ALTER TABLE`前缀使得这个语法不同于大多数其他支持SQL的系统。它的目的是表示,与OLTP数据库中的类似查询不同,这是一个不为经常使用而设计的繁重操作。 +:::note +`ALTER TABLE`前缀使得这个语法不同于大多数其他支持SQL的系统。它的目的是表示,与OLTP数据库中的类似查询不同,这是一个不为经常使用而设计的繁重操作。 +::: `filter_expr` 的类型必须是`UInt8`。该查询删除表中该表达式接受非零值的行。 diff --git a/docs/zh/sql-reference/statements/alter/index.md b/docs/zh/sql-reference/statements/alter/index.md index b0f0fc21cbe..8320b207725 100644 --- a/docs/zh/sql-reference/statements/alter/index.md +++ b/docs/zh/sql-reference/statements/alter/index.md @@ -17,8 +17,9 @@ sidebar_label: ALTER - [CONSTRAINT](../../../sql-reference/statements/alter/constraint.md) - [TTL](../../../sql-reference/statements/alter/ttl.md) -!!! note "备注" - 大多数 `ALTER TABLE` 查询只支持[\*MergeTree](../../../engines/table-engines/mergetree-family/index.md)表,以及[Merge](../../../engines/table-engines/special/merge.md)和[Distributed](../../../engines/table-engines/special/distributed.md)。 +:::note +大多数 `ALTER TABLE` 查询只支持[\*MergeTree](../../../engines/table-engines/mergetree-family/index.md)表,以及[Merge](../../../engines/table-engines/special/merge.md)和[Distributed](../../../engines/table-engines/special/distributed.md)。 +::: 这些 `ALTER` 语句操作视图: diff --git a/docs/zh/sql-reference/statements/alter/order-by.md b/docs/zh/sql-reference/statements/alter/order-by.md index e70a8b59c85..e50c4e6e805 100644 --- a/docs/zh/sql-reference/statements/alter/order-by.md +++ b/docs/zh/sql-reference/statements/alter/order-by.md @@ -14,5 +14,6 @@ ALTER TABLE [db].name [ON CLUSTER cluster] MODIFY ORDER BY new_expression 从某种意义上说,该命令是轻量级的,它只更改元数据。要保持数据部分行按排序键表达式排序的属性,您不能向排序键添加包含现有列的表达式(仅在相同的`ALTER`查询中由`ADD COLUMN`命令添加的列,没有默认的列值)。 -!!! note "备注" - 它只适用于[`MergeTree`](../../../engines/table-engines/mergetree-family/mergetree.md)表族(包括[replicated](../../../engines/table-engines/mergetree-family/replication.md)表)。 +:::note +它只适用于[`MergeTree`](../../../engines/table-engines/mergetree-family/mergetree.md)表族(包括[replicated](../../../engines/table-engines/mergetree-family/replication.md)表)。 +::: diff --git a/docs/zh/sql-reference/statements/alter/setting.md b/docs/zh/sql-reference/statements/alter/setting.md index e2d597554e7..2e1e97db331 100644 --- a/docs/zh/sql-reference/statements/alter/setting.md +++ b/docs/zh/sql-reference/statements/alter/setting.md @@ -14,8 +14,9 @@ sidebar_label: SETTING ALTER TABLE [db].name [ON CLUSTER cluster] MODIFY|RESET SETTING ... ``` -!!! note "注意" - 这些查询只能应用于 [MergeTree](../../../engines/table-engines/mergetree-family/mergetree.md) 表。 +:::note +这些查询只能应用于 [MergeTree](../../../engines/table-engines/mergetree-family/mergetree.md) 表。 +::: ## 修改设置 {#alter_modify_setting} diff --git a/docs/zh/sql-reference/statements/alter/update.md b/docs/zh/sql-reference/statements/alter/update.md index 522eb0a705b..97b2b43d889 100644 --- a/docs/zh/sql-reference/statements/alter/update.md +++ b/docs/zh/sql-reference/statements/alter/update.md @@ -12,8 +12,9 @@ ALTER TABLE [db.]table UPDATE column1 = expr1 [, ...] WHERE filter_expr 操作与指定过滤表达式相匹配的数据。作为一个[变更 mutation](../../../sql-reference/statements/alter/index.md#mutations)来实现. -!!! note "Note" - `ALTER TABLE` 的前缀使这个语法与其他大多数支持SQL的系统不同。它的目的是表明,与OLTP数据库中的类似查询不同,这是一个繁重的操作,不是为频繁使用而设计。 +:::note +`ALTER TABLE` 的前缀使这个语法与其他大多数支持SQL的系统不同。它的目的是表明,与OLTP数据库中的类似查询不同,这是一个繁重的操作,不是为频繁使用而设计。 +::: `filter_expr`必须是`UInt8`类型。这个查询将指定列的值更新为行中相应表达式的值,对于这些行,`filter_expr`取值为非零。使用`CAST`操作符将数值映射到列的类型上。不支持更新用于计算主键或分区键的列。 diff --git a/docs/zh/sql-reference/statements/exchange.md b/docs/zh/sql-reference/statements/exchange.md index e6ac1dbf1dc..47cefa0d2e6 100644 --- a/docs/zh/sql-reference/statements/exchange.md +++ b/docs/zh/sql-reference/statements/exchange.md @@ -9,8 +9,9 @@ sidebar_label: EXCHANGE 以原子方式交换两个表或字典的名称。 此任务也可以通过使用[RENAME](./rename.md)来完成,但在这种情况下操作不是原子的。 -!!! note "注意" +:::note `EXCHANGE`仅支持[Atomic](../../engines/database-engines/atomic.md)数据库引擎. +::: **语法** diff --git a/docs/zh/sql-reference/statements/rename.md b/docs/zh/sql-reference/statements/rename.md index c26dce306cc..156306fbd3e 100644 --- a/docs/zh/sql-reference/statements/rename.md +++ b/docs/zh/sql-reference/statements/rename.md @@ -9,8 +9,9 @@ sidebar_label: RENAME 重命名数据库、表或字典。 可以在单个查询中重命名多个实体。 请注意,具有多个实体的`RENAME`查询是非原子操作。 要以原子方式交换实体名称,请使用[EXCHANGE](./exchange.md)语法. -!!! note "注意" +:::note `RENAME`仅支持[Atomic](../../engines/database-engines/atomic.md)数据库引擎. +::: **语法** diff --git a/docs/zh/sql-reference/statements/select/group-by.md b/docs/zh/sql-reference/statements/select/group-by.md index 31c1649bc30..29c72ce7e45 100644 --- a/docs/zh/sql-reference/statements/select/group-by.md +++ b/docs/zh/sql-reference/statements/select/group-by.md @@ -11,8 +11,9 @@ sidebar_label: GROUP BY - 在所有的表达式在 [SELECT](../../../sql-reference/statements/select/index.md), [HAVING](../../../sql-reference/statements/select/having),和 [ORDER BY](../../../sql-reference/statements/select/order-by.md) 子句中 **必须** 基于键表达式进行计算 **或** 上 [聚合函数](../../../sql-reference/aggregate-functions/index.md) 在非键表达式(包括纯列)上。 换句话说,从表中选择的每个列必须用于键表达式或聚合函数内,但不能同时使用。 - 聚合结果 `SELECT` 查询将包含尽可能多的行,因为有唯一值 “grouping key” 在源表中。 通常这会显着减少行数,通常是数量级,但不一定:如果所有行数保持不变 “grouping key” 值是不同的。 -!!! note "注" - 还有一种额外的方法可以在表上运行聚合。 如果查询仅在聚合函数中包含表列,则 `GROUP BY` 可以省略,并且通过一个空的键集合来假定聚合。 这样的查询总是只返回一行。 +:::note +还有一种额外的方法可以在表上运行聚合。 如果查询仅在聚合函数中包含表列,则 `GROUP BY` 可以省略,并且通过一个空的键集合来假定聚合。 这样的查询总是只返回一行。 +::: ## 空处理 {#null-processing} diff --git a/docs/zh/sql-reference/statements/select/join.md b/docs/zh/sql-reference/statements/select/join.md index 08290a02de5..a2686aa5e53 100644 --- a/docs/zh/sql-reference/statements/select/join.md +++ b/docs/zh/sql-reference/statements/select/join.md @@ -39,8 +39,9 @@ ClickHouse中提供的其他联接类型: ## 严格 {#join-settings} -!!! note "注" - 可以使用以下方式复盖默认的严格性值 [join_default_strictness](../../../operations/settings/settings.md#settings-join_default_strictness) 设置。 +:::note +可以使用以下方式复盖默认的严格性值 [join_default_strictness](../../../operations/settings/settings.md#settings-join_default_strictness) 设置。 +::: Also the behavior of ClickHouse server for `ANY JOIN` operations depends on the [any_join_distinct_right_table_keys](../../../operations/settings/settings.md#any_join_distinct_right_table_keys) setting. @@ -91,8 +92,9 @@ USING (equi_column1, ... equi_columnN, asof_column) `ASOF JOIN`会从 `table_2` 中的用户事件时间戳找出和 `table_1` 中用户事件时间戳中最近的一个时间戳,来满足最接近匹配的条件。如果有得话,则相等的时间戳值是最接近的值。在此例中,`user_id` 列可用于条件匹配,`ev_time` 列可用于最接近匹配。在此例中,`event_1_1` 可以 JOIN `event_2_1`,`event_1_2` 可以JOIN `event_2_3`,但是 `event_2_2` 不能被JOIN。 -!!! note "注" - `ASOF JOIN`在 [JOIN](../../../engines/table-engines/special/join.md) 表引擎中 **不受** 支持。 +:::note +`ASOF JOIN`在 [JOIN](../../../engines/table-engines/special/join.md) 表引擎中 **不受** 支持。 +::: ## 分布式联接 {#global-join} diff --git a/docs/zh/sql-reference/statements/select/limit-by.md b/docs/zh/sql-reference/statements/select/limit-by.md index 50e3505b7fb..68b88bf8d7a 100644 --- a/docs/zh/sql-reference/statements/select/limit-by.md +++ b/docs/zh/sql-reference/statements/select/limit-by.md @@ -14,8 +14,9 @@ ClickHouse支持以下语法变体: 处理查询时,ClickHouse首先选择经由排序键排序过后的数据。排序键可以显式地使用[ORDER BY](order-by.md#select-order-by)从句指定,或隐式地使用表引擎使用的排序键(数据的顺序仅在使用[ORDER BY](order-by.md#select-order-by)时才可以保证,否则由于多线程处理,数据顺序会随机化)。然后ClickHouse执行`LIMIT n BY expressions`从句,将每一行按 `expressions` 的值进行分组,并对每一分组返回前`n`行。如果指定了`OFFSET`,那么对于每一分组,ClickHouse会跳过前`offset_value`行,接着返回前`n`行。如果`offset_value`大于某一分组的行数,ClickHouse会从分组返回0行。 -!!! note "注" - `LIMIT BY`与[LIMIT](../../../sql-reference/statements/select/limit.md)没有关系。它们可以在同一个查询中使用。 +:::note +`LIMIT BY`与[LIMIT](../../../sql-reference/statements/select/limit.md)没有关系。它们可以在同一个查询中使用。 +::: ## 例 {#examples} diff --git a/docs/zh/sql-reference/statements/select/sample.md b/docs/zh/sql-reference/statements/select/sample.md index f701bd3b805..0993958b029 100644 --- a/docs/zh/sql-reference/statements/select/sample.md +++ b/docs/zh/sql-reference/statements/select/sample.md @@ -15,8 +15,9 @@ sidebar_label: SAMPLE - 当您的原始数据不准确时,所以近似不会明显降低质量。 - 业务需求的目标是近似结果(为了成本效益,或者向高级用户推销确切结果)。 -!!! note "注" - 您只能使用采样中的表 [MergeTree](../../../engines/table-engines/mergetree-family/mergetree.md) 族,并且只有在表创建过程中指定了采样表达式(请参阅 [MergeTree引擎](../../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-creating-a-table)). +:::note +您只能使用采样中的表 [MergeTree](../../../engines/table-engines/mergetree-family/mergetree.md) 族,并且只有在表创建过程中指定了采样表达式(请参阅 [MergeTree引擎](../../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-creating-a-table)). +::: 下面列出了数据采样的功能: diff --git a/docs/zh/sql-reference/statements/select/where.md b/docs/zh/sql-reference/statements/select/where.md index fe165e8ad16..6c7183840c7 100644 --- a/docs/zh/sql-reference/statements/select/where.md +++ b/docs/zh/sql-reference/statements/select/where.md @@ -11,9 +11,10 @@ sidebar_label: WHERE 如果基础表引擎支持,`WHERE`表达式会使用索引和分区进行剪枝。 -!!! note "注" - 有一个叫做过滤优化 [prewhere](../../../sql-reference/statements/select/prewhere.md) 的东西. - +:::note +有一个叫做过滤优化 [prewhere](../../../sql-reference/statements/select/prewhere.md) 的东西. +::: + 如果需要测试一个 [NULL](../../../sql-reference/syntax.md#null-literal) 值,请使用 [IS NULL](../../operators/index.md#operator-is-null) and [IS NOT NULL](../../operators/index.md#is-not-null) 运算符或 [isNull](../../../sql-reference/functions/functions-for-nulls.md#isnull) 和 [isNotNull](../../../sql-reference/functions/functions-for-nulls.md#isnotnull) 函数。否则带有 NULL 的表达式永远不会通过。 **示例** diff --git a/docs/zh/sql-reference/statements/system.md b/docs/zh/sql-reference/statements/system.md index d8d60c28af5..1942d6fb79a 100644 --- a/docs/zh/sql-reference/statements/system.md +++ b/docs/zh/sql-reference/statements/system.md @@ -124,10 +124,9 @@ ClickHouse可以管理 [MergeTree](../../engines/table-engines/mergetree-family/ SYSTEM STOP MERGES [[db.]merge_tree_family_table_name] ``` - -!!! note "Note" - `DETACH / ATTACH` 表操作会在后台进行表的merge操作,甚至当所有MergeTree表的合并操作已经停止的情况下。 - +:::note +`DETACH / ATTACH` 表操作会在后台进行表的merge操作,甚至当所有MergeTree表的合并操作已经停止的情况下。 +::: ### START MERGES {#query_language-system-start-merges} diff --git a/docs/zh/sql-reference/table-functions/mysql.md b/docs/zh/sql-reference/table-functions/mysql.md index 6c9753b9b12..4efee2e616b 100644 --- a/docs/zh/sql-reference/table-functions/mysql.md +++ b/docs/zh/sql-reference/table-functions/mysql.md @@ -49,8 +49,9 @@ SELECT name FROM mysql(`mysql1:3306|mysql2:3306|mysql3:3306`, 'mysql_database', 与原始MySQL表具有相同列的表对象。 -!!! note "注意" - 在`INSERT`查询中为了区分`mysql(...)`与带有列名列表的表名的表函数,你必须使用关键字`FUNCTION`或`TABLE FUNCTION`。查看如下示例。 +:::note +在`INSERT`查询中为了区分`mysql(...)`与带有列名列表的表名的表函数,你必须使用关键字`FUNCTION`或`TABLE FUNCTION`。查看如下示例。 +::: ## 用法示例 {#usage-example} From 380e076e842fee30e4bd6b9729a36edbe623e61f Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Fri, 3 Mar 2023 11:19:05 +0000 Subject: [PATCH 471/841] x86 --> amd64 --- .github/workflows/backport_branches.yml | 2 +- .github/workflows/master.yml | 2 +- .github/workflows/pull_request.yml | 2 +- .github/workflows/release_branches.yml | 2 +- tests/ci/ci_config.py | 2 +- tests/ci/compatibility_check.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/backport_branches.yml b/.github/workflows/backport_branches.yml index b14a32127c4..a324d20abc9 100644 --- a/.github/workflows/backport_branches.yml +++ b/.github/workflows/backport_branches.yml @@ -103,7 +103,7 @@ jobs: sudo rm -fr "$TEMP_PATH" mkdir -p "$TEMP_PATH" cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" - cd "$REPO_COPY/tests/ci" && python3 compatibility_check.py --check-name "Compatibility check (x86)" --check-glibc --check-distributions + cd "$REPO_COPY/tests/ci" && python3 compatibility_check.py --check-name "Compatibility check (amd64)" --check-glibc --check-distributions - name: Cleanup if: always() run: | diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index e224d6cf5c3..b70fe256833 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -134,7 +134,7 @@ jobs: sudo rm -fr "$TEMP_PATH" mkdir -p "$TEMP_PATH" cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" - cd "$REPO_COPY/tests/ci" && python3 compatibility_check.py --check-name "Compatibility check (x86)" --check-glibc --check-distributions + cd "$REPO_COPY/tests/ci" && python3 compatibility_check.py --check-name "Compatibility check (amd64)" --check-glibc --check-distributions - name: Cleanup if: always() run: | diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index ae6cb1d3a83..ff98739db00 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -198,7 +198,7 @@ jobs: sudo rm -fr "$TEMP_PATH" mkdir -p "$TEMP_PATH" cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" - cd "$REPO_COPY/tests/ci" && python3 compatibility_check.py --check-name "Compatibility check (x86)" --check-glibc --check-distributions + cd "$REPO_COPY/tests/ci" && python3 compatibility_check.py --check-name "Compatibility check (amd64)" --check-glibc --check-distributions - name: Cleanup if: always() run: | diff --git a/.github/workflows/release_branches.yml b/.github/workflows/release_branches.yml index 229532efdab..74ec1163cc9 100644 --- a/.github/workflows/release_branches.yml +++ b/.github/workflows/release_branches.yml @@ -95,7 +95,7 @@ jobs: sudo rm -fr "$TEMP_PATH" mkdir -p "$TEMP_PATH" cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH" - cd "$REPO_COPY/tests/ci" && python3 compatibility_check.py --check-name "Compatibility check (x86)" --check-glibc --check-distributions + cd "$REPO_COPY/tests/ci" && python3 compatibility_check.py --check-name "Compatibility check (amd64)" --check-glibc --check-distributions - name: Cleanup if: always() run: | diff --git a/tests/ci/ci_config.py b/tests/ci/ci_config.py index 9df198430d2..2f35b337cb3 100644 --- a/tests/ci/ci_config.py +++ b/tests/ci/ci_config.py @@ -316,7 +316,7 @@ CI_CONFIG = { "Integration tests flaky check (asan)": { "required_build": "package_asan", }, - "Compatibility check (x86)": { + "Compatibility check (amd64)": { "required_build": "package_release", }, "Compatibility check (aarch64)": { diff --git a/tests/ci/compatibility_check.py b/tests/ci/compatibility_check.py index 8841bedbb18..432e9ec7c01 100644 --- a/tests/ci/compatibility_check.py +++ b/tests/ci/compatibility_check.py @@ -214,7 +214,7 @@ def main(): # See https://sourceware.org/glibc/wiki/Glibc%20Timeline max_glibc_version = "" - if "x86" in args.check_name: + if "amd64" in args.check_name: max_glibc_version = "2.4" elif "aarch64" in args.check_name: max_glibc_version = "2.18" # because of build with newer sysroot? From d34f00f4370fd548a739bda02c4d1902c464e945 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Fri, 3 Mar 2023 15:02:05 +0300 Subject: [PATCH 472/841] Update run.sh --- docker/test/upgrade/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/test/upgrade/run.sh b/docker/test/upgrade/run.sh index df32e2833e7..ce8a56c777e 100644 --- a/docker/test/upgrade/run.sh +++ b/docker/test/upgrade/run.sh @@ -162,7 +162,7 @@ rg -Fav -e "Code: 236. DB::Exception: Cancelled merging parts" \ -e "Cannot flush" \ -e "Container already exists" \ /var/log/clickhouse-server/clickhouse-server.upgrade.log | zgrep -Fa "" > /test_output/upgrade_error_messages.txt \ - && echo -e "Error message in clickhouse-server.log (see upgrade_error_messages.txt)$FAIL$(head_escaped /test_output/bc_check_error_messages.txt)" \ + && echo -e "Error message in clickhouse-server.log (see upgrade_error_messages.txt)$FAIL$(head_escaped /test_output/upgrade_error_messages.txt)" \ >> /test_output/test_results.tsv \ || echo -e "No Error messages after server upgrade$OK" >> /test_output/test_results.tsv From 56f02374f6dbbb2195279fdf9415a3275a5697c7 Mon Sep 17 00:00:00 2001 From: kssenii Date: Fri, 3 Mar 2023 12:14:05 +0100 Subject: [PATCH 473/841] Remove stateless test because it makes unfixably 02344_show_caches flaky --- tests/queries/0_stateless/02344_show_caches.reference | 1 - .../02454_create_table_with_custom_disk.reference | 1 - .../02454_create_table_with_custom_disk.sql | 10 ---------- 3 files changed, 12 deletions(-) diff --git a/tests/queries/0_stateless/02344_show_caches.reference b/tests/queries/0_stateless/02344_show_caches.reference index b321319a309..2ee4f902ba1 100644 --- a/tests/queries/0_stateless/02344_show_caches.reference +++ b/tests/queries/0_stateless/02344_show_caches.reference @@ -10,6 +10,5 @@ local_cache s3_cache_6 s3_cache_small local_cache_2 -__tmp_internal_324081342946782869538999598488311137423 local_cache_3 s3_cache_multi_2 diff --git a/tests/queries/0_stateless/02454_create_table_with_custom_disk.reference b/tests/queries/0_stateless/02454_create_table_with_custom_disk.reference index a71d52b6f57..1d8610c59c9 100644 --- a/tests/queries/0_stateless/02454_create_table_with_custom_disk.reference +++ b/tests/queries/0_stateless/02454_create_table_with_custom_disk.reference @@ -9,4 +9,3 @@ SETTINGS disk = disk(type = local, path = \'/var/lib/clickhouse/disks/local/\') CREATE TABLE default.test\n(\n `a` Int32\n)\nENGINE = MergeTree\nORDER BY tuple()\nSETTINGS disk = disk(type = local, path = \'[HIDDEN]\'), index_granularity = 8192 a Int32 200 -CREATE TABLE default.test\n(\n `a` Int32\n)\nENGINE = MergeTree\nORDER BY tuple()\nSETTINGS disk = disk(type = cache, max_size = \'[HIDDEN]\', path = \'[HIDDEN]\', disk = disk(type = local, path = \'[HIDDEN]\')), index_granularity = 8192 diff --git a/tests/queries/0_stateless/02454_create_table_with_custom_disk.sql b/tests/queries/0_stateless/02454_create_table_with_custom_disk.sql index 4909f91ccb1..6cb1c0774aa 100644 --- a/tests/queries/0_stateless/02454_create_table_with_custom_disk.sql +++ b/tests/queries/0_stateless/02454_create_table_with_custom_disk.sql @@ -26,13 +26,3 @@ DESCRIBE TABLE test; INSERT INTO test SELECT number FROM numbers(100); SELECT count() FROM test; - -DROP TABLE test; - -CREATE TABLE test (a Int32) -ENGINE = MergeTree() order by tuple() -SETTINGS disk = disk(type=cache, max_size='1Gi', path='/var/lib/clickhouse/custom_disk_cache/', disk=disk(type=local, path='/var/lib/clickhouse/disks/local/')); - -SHOW CREATE TABLE test; - -DROP TABLE test; From bc8b34f74ba8176020ba65c6d8aed44f8f53afdd Mon Sep 17 00:00:00 2001 From: Sema Checherinda Date: Fri, 3 Mar 2023 13:16:46 +0100 Subject: [PATCH 474/841] adjust test test_seekable_formats --- tests/integration/test_storage_s3/test.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/integration/test_storage_s3/test.py b/tests/integration/test_storage_s3/test.py index 54944b56919..8b20727a7b5 100644 --- a/tests/integration/test_storage_s3/test.py +++ b/tests/integration/test_storage_s3/test.py @@ -1056,13 +1056,13 @@ def test_seekable_formats(started_cluster): table_function = f"s3(s3_orc, structure='a Int32, b String', format='ORC')" exec_query_with_retry( instance, - f"insert into table function {table_function} SELECT number, randomString(100) FROM numbers(1000000) settings s3_truncate_on_insert=1", + f"insert into table function {table_function} SELECT number, randomString(100) FROM numbers(1500000) settings s3_truncate_on_insert=1", ) result = instance.query( - f"SELECT count() FROM {table_function} SETTINGS max_memory_usage='50M'" + f"SELECT count() FROM {table_function} SETTINGS max_memory_usage='60M'" ) - assert int(result) == 1000000 + assert int(result) == 1500000 instance.query(f"SELECT * FROM {table_function} FORMAT Null") @@ -1073,7 +1073,7 @@ def test_seekable_formats(started_cluster): result = result.strip() assert result.endswith("MiB") result = result[: result.index(".")] - assert int(result) > 80 + assert int(result) > 150 def test_seekable_formats_url(started_cluster): @@ -1083,23 +1083,23 @@ def test_seekable_formats_url(started_cluster): table_function = f"s3(s3_parquet, structure='a Int32, b String', format='Parquet')" exec_query_with_retry( instance, - f"insert into table function {table_function} SELECT number, randomString(100) FROM numbers(1000000) settings s3_truncate_on_insert=1", + f"insert into table function {table_function} SELECT number, randomString(100) FROM numbers(1500000) settings s3_truncate_on_insert=1", ) result = instance.query(f"SELECT count() FROM {table_function}") - assert int(result) == 1000000 + assert int(result) == 1500000 table_function = f"s3(s3_orc, structure='a Int32, b String', format='ORC')" exec_query_with_retry( instance, - f"insert into table function {table_function} SELECT number, randomString(100) FROM numbers(1000000) settings s3_truncate_on_insert=1", + f"insert into table function {table_function} SELECT number, randomString(100) FROM numbers(1500000) settings s3_truncate_on_insert=1", ) table_function = f"url('http://{started_cluster.minio_host}:{started_cluster.minio_port}/{bucket}/test_parquet', 'Parquet', 'a Int32, b String')" result = instance.query( - f"SELECT count() FROM {table_function} SETTINGS max_memory_usage='50M'" + f"SELECT count() FROM {table_function} SETTINGS max_memory_usage='60M'" ) - assert int(result) == 1000000 + assert int(result) == 1500000 def test_empty_file(started_cluster): From e2278ca70c8945b17dce8ff9698905ca33f6f847 Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Wed, 1 Mar 2023 20:59:56 +0100 Subject: [PATCH 475/841] Add code for autoscaling lambda --- tests/ci/autoscale_runners_lambda/app.py | 226 ++++++++++++++++++ .../build_and_deploy_archive.sh | 1 + .../autoscale_runners_lambda/requirements.txt | 1 + 3 files changed, 228 insertions(+) create mode 100644 tests/ci/autoscale_runners_lambda/app.py create mode 120000 tests/ci/autoscale_runners_lambda/build_and_deploy_archive.sh create mode 100644 tests/ci/autoscale_runners_lambda/requirements.txt diff --git a/tests/ci/autoscale_runners_lambda/app.py b/tests/ci/autoscale_runners_lambda/app.py new file mode 100644 index 00000000000..2777d5cf9c1 --- /dev/null +++ b/tests/ci/autoscale_runners_lambda/app.py @@ -0,0 +1,226 @@ +#!/usr/bin/env python3 + +"""The lambda to decrease/increase ASG desired capacity based on current queue""" + +import json +import logging +import time +from dataclasses import dataclass +from pprint import pformat +from typing import Any, List, Literal, Optional + +import boto3 # type: ignore +import requests # type: ignore + +RUNNER_TYPE_LABELS = [ + "builder", + "func-tester", + "func-tester-aarch64", + "fuzzer-unit-tester", + "stress-tester", + "style-checker", + "style-checker-aarch64", +] +QUEUE_QUERY = f"""SELECT + last_status AS status, + toUInt32(count()) AS length, + labels +FROM +( + SELECT + arraySort(groupArray(status))[-1] AS last_status, + labels, + id, + html_url + FROM default.workflow_jobs + WHERE has(labels, 'self-hosted') + AND hasAny({RUNNER_TYPE_LABELS}, labels) + AND started_at > now() - INTERVAL 2 DAY + GROUP BY ALL + HAVING last_status IN ('in_progress', 'queued') +) +GROUP BY ALL +ORDER BY labels, last_status""" + + +@dataclass +class Queue: + status: Literal["in_progress", "queued"] + lentgh: int + label: str + + +### VENDORING +def get_parameter_from_ssm(name, decrypt=True, client=None): + if not client: + client = boto3.client("ssm", region_name="us-east-1") + return client.get_parameter(Name=name, WithDecryption=decrypt)["Parameter"]["Value"] + + +class CHException(Exception): + pass + + +class ClickHouseHelper: + def __init__( + self, + url: Optional[str] = None, + user: Optional[str] = None, + password: Optional[str] = None, + ): + self.url = url + self.auth = {} + if user: + self.auth["X-ClickHouse-User"] = user + if password: + self.auth["X-ClickHouse-Key"] = password + + def _select_and_get_json_each_row(self, db, query): + params = { + "database": db, + "query": query, + "default_format": "JSONEachRow", + } + for i in range(5): + response = None + try: + response = requests.get(self.url, params=params, headers=self.auth) + response.raise_for_status() + return response.text + except Exception as ex: + logging.warning("Cannot fetch data with exception %s", str(ex)) + if response: + logging.warning("Reponse text %s", response.text) + time.sleep(0.1 * i) + + raise CHException("Cannot fetch data from clickhouse") + + def select_json_each_row(self, db, query): + text = self._select_and_get_json_each_row(db, query) + result = [] + for line in text.split("\n"): + if line: + result.append(json.loads(line)) + return result + + +CH_CLIENT = ClickHouseHelper(get_parameter_from_ssm("clickhouse-test-stat-url"), "play") + + +def set_capacity( + runner_type: str, queues: List[Queue], client: Any, dry_run: bool = True +) -> None: + assert len(queues) in (1, 2) + assert all(q.label == runner_type for q in queues) + as_groups = client.describe_auto_scaling_groups( + Filters=[ + {"Name": "tag-key", "Values": ["github:runner-type"]}, + {"Name": "tag-value", "Values": [runner_type]}, + ] + )["AutoScalingGroups"] + assert len(as_groups) == 1 + asg = as_groups[0] + running = 0 + queued = 0 + for q in queues: + if q.status == "in_progress": + running = q.lentgh + continue + if q.status == "queued": + queued = q.lentgh + continue + raise ValueError("Queue status is not in ['in_progress', 'queued']") + + capacity_reserve = max(0, asg["DesiredCapacity"] - running) + stop = False + if queued: + # This part is about scaling up + # First, let's check if there's enough runners to cover the queue + stop = stop or (asg["DesiredCapacity"] - running - queued) > 0 + + stop = stop or asg["MaxSize"] <= asg["DesiredCapacity"] + # Let's calculate a new desired capacity. Here the scale is used to not + # scale up and down too quickly + desired_capacity = asg["DesiredCapacity"] + ((queued - capacity_reserve) // 5) + desired_capacity = max(desired_capacity, asg["MinSize"]) + desired_capacity = min(desired_capacity, asg["MaxSize"]) + # Finally, should the capacity be even changed + stop = stop or asg["DesiredCapacity"] == desired_capacity + if stop: + return + logging.info( + "The ASG %s capacity will be increased to %s, current capacity=%s, " + "maximum capacity=%s, running jobs=%s, queue size=%s", + asg["AutoScalingGroupName"], + desired_capacity, + asg["DesiredCapacity"], + asg["MaxSize"], + running, + queued, + ) + if not dry_run: + client.set_desired_capacity( + AutoScalingGroupName=asg["AutoScalingGroupName"], + DesiredCapacity=desired_capacity, + ) + return + + # Now we will calculate if we need to scale down + stop = stop or asg["DesiredCapacity"] <= asg["MinSize"] + stop = stop or asg["DesiredCapacity"] <= running + # Scale down quicker than scale up + desired_capacity = asg["DesiredCapacity"] - (capacity_reserve // 3) + desired_capacity = max(desired_capacity, asg["MinSize"]) + desired_capacity = min(desired_capacity, asg["MaxSize"]) + stop = stop or asg["DesiredCapacity"] == desired_capacity + if stop: + return + + logging.info( + "The ASG %s capacity will be decreased to %s, current capacity=%s, " + "minimum capacity=%s, running jobs=%s, queue size=%s", + asg["AutoScalingGroupName"], + desired_capacity, + asg["DesiredCapacity"], + asg["MinSize"], + running, + queued, + ) + if not dry_run: + client.set_desired_capacity( + AutoScalingGroupName=asg["AutoScalingGroupName"], + DesiredCapacity=desired_capacity, + ) + + +def main(dry_run: bool = True) -> None: + logging.getLogger().setLevel(logging.INFO) + asg_client = boto3.client("autoscaling") + try: + global CH_CLIENT + queues = CH_CLIENT.select_json_each_row("default", QUEUE_QUERY) + except CHException as ex: + logging.exception( + "Got an exception on insert, tryuing to update the client " + "credentials and repeat", + exc_info=ex, + ) + CH_CLIENT = ClickHouseHelper( + get_parameter_from_ssm("clickhouse-test-stat-url"), "play" + ) + queues = CH_CLIENT.select_json_each_row("default", QUEUE_QUERY) + + logging.info("Received queue data:\n%s", pformat(queues, width=120)) + for runner_type in RUNNER_TYPE_LABELS: + runner_queues = [ + Queue(queue["status"], queue["length"], runner_type) + for queue in queues + if runner_type in queue["labels"] + ] + set_capacity(runner_type, runner_queues, asg_client, dry_run) + + +def handler(event: dict, context: Any) -> None: + _ = event + _ = context + return main(False) diff --git a/tests/ci/autoscale_runners_lambda/build_and_deploy_archive.sh b/tests/ci/autoscale_runners_lambda/build_and_deploy_archive.sh new file mode 120000 index 00000000000..96ba3fa024e --- /dev/null +++ b/tests/ci/autoscale_runners_lambda/build_and_deploy_archive.sh @@ -0,0 +1 @@ +../team_keys_lambda/build_and_deploy_archive.sh \ No newline at end of file diff --git a/tests/ci/autoscale_runners_lambda/requirements.txt b/tests/ci/autoscale_runners_lambda/requirements.txt new file mode 100644 index 00000000000..f2293605cf1 --- /dev/null +++ b/tests/ci/autoscale_runners_lambda/requirements.txt @@ -0,0 +1 @@ +requests From 0483de0e04af22ae9a51b1feceef86810efd2cda Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Thu, 2 Mar 2023 13:53:56 +0100 Subject: [PATCH 476/841] Reorder `status` in default.workflow_jobs --- tests/ci/workflow_jobs_lambda/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ci/workflow_jobs_lambda/app.py b/tests/ci/workflow_jobs_lambda/app.py index f6589576806..9436e01ad53 100644 --- a/tests/ci/workflow_jobs_lambda/app.py +++ b/tests/ci/workflow_jobs_lambda/app.py @@ -213,7 +213,7 @@ def send_event_workflow_job(workflow_job: WorkflowJob) -> None: # `head_sha` String, # `url` String, # `html_url` String, - # `status` Enum8('queued' = 1, 'in_progress' = 2, 'completed' = 3, 'waiting' = 4), + # `status` Enum8('waiting' = 1, 'queued' = 2, 'in_progress' = 3, 'completed' = 4), # `conclusion` LowCardinality(String), # `started_at` DateTime, # `completed_at` DateTime, From a5869e25f644551b00c034bb25efa56d4ed111d3 Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Thu, 2 Mar 2023 20:21:40 +0100 Subject: [PATCH 477/841] Add tests for autoscale_runners_lambda --- tests/ci/autoscale_runners_lambda_test.py | 133 ++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 tests/ci/autoscale_runners_lambda_test.py diff --git a/tests/ci/autoscale_runners_lambda_test.py b/tests/ci/autoscale_runners_lambda_test.py new file mode 100644 index 00000000000..e6ac157ee4a --- /dev/null +++ b/tests/ci/autoscale_runners_lambda_test.py @@ -0,0 +1,133 @@ +#!/usr/bin/env python + +import unittest +from dataclasses import dataclass +from typing import Any, List + +from autoscale_runners_lambda.app import set_capacity, Queue + + +@dataclass +class TestCase: + name: str + min_size: int + desired_capacity: int + max_size: int + queues: List[Queue] + expected_capacity: int + + +class TestSetCapacity(unittest.TestCase): + class FakeClient: + def __init__(self): + self._expected_data = {} # type: dict + self._expected_capacity = -1 + + @property + def expected_data(self) -> dict: + """a one-time property""" + data, self._expected_data = self._expected_data, {} + return data + + @expected_data.setter + def expected_data(self, value: dict) -> None: + self._expected_data = value + + @property + def expected_capacity(self) -> int: + """one-time property""" + capacity, self._expected_capacity = self._expected_capacity, -1 + return capacity + + def describe_auto_scaling_groups(self, **kwargs: Any) -> dict: + _ = kwargs + return self.expected_data + + def set_desired_capacity(self, **kwargs: Any) -> None: + self._expected_capacity = kwargs["DesiredCapacity"] + + def data_helper( + self, name: str, min_size: int, desired_capacity: int, max_size: int + ) -> None: + self.expected_data = { + "AutoScalingGroups": [ + { + "AutoScalingGroupName": name, + "DesiredCapacity": desired_capacity, + "MinSize": min_size, + "MaxSize": max_size, + } + ] + } + + def setUp(self): + self.client = self.FakeClient() + + def test_normal_cases(self): + test_cases = ( + # Do not change capacity + TestCase("noqueue", 1, 13, 20, [Queue("in_progress", 155, "noqueue")], -1), + TestCase("w/reserve", 1, 13, 20, [Queue("queued", 5, "w/reserve")], -1), + TestCase("w/reserve", 1, 13, 20, [Queue("queued", 17, "w/reserve")], -1), + TestCase("w/reserve", 1, 23, 20, [Queue("queued", 17, "w/reserve")], -1), + TestCase("less-min", 10, 3, 20, [Queue("queued", 1, "less-min")], -1), + # Increase capacity + TestCase("increase", 1, 13, 20, [Queue("queued", 23, "increase")], 15), + TestCase("increase", 1, 13, 20, [Queue("queued", 18, "increase")], 14), + TestCase("increase", 1, 13, 20, [Queue("queued", 183, "increase")], 20), + TestCase( + "increase-w/o reserve", + 1, + 13, + 20, + [ + Queue("in_progress", 11, "increase-w/o reserve"), + Queue("queued", 12, "increase-w/o reserve"), + ], + 15, + ), + TestCase("lower-min", 10, 5, 20, [Queue("queued", 5, "lower-min")], 10), + # Decrease capacity + TestCase("decrease", 1, 13, 20, [Queue("in_progress", 3, "decrease")], 10), + TestCase("decrease", 1, 13, 20, [Queue("in_progress", 5, "decrease")], 11), + ) + for t in test_cases: + self.client.data_helper(t.name, t.min_size, t.desired_capacity, t.max_size) + set_capacity(t.name, t.queues, self.client, False) + self.assertEqual(t.expected_capacity, self.client.expected_capacity, t.name) + + def test_exceptions(self): + test_cases = ( + ( + TestCase( + "different names", + 1, + 1, + 1, + [Queue("queued", 5, "another name")], + -1, + ), + AssertionError, + ), + (TestCase("wrong queue len", 1, 1, 1, [], -1), AssertionError), + ( + TestCase( + "wrong queue", 1, 1, 1, [Queue("wrong", 1, "wrong queue")], -1 # type: ignore + ), + ValueError, + ), + ) + for t, error in test_cases: + with self.assertRaises(error): + self.client.data_helper( + t.name, t.min_size, t.desired_capacity, t.max_size + ) + set_capacity(t.name, t.queues, self.client, False) + + with self.assertRaises(AssertionError): + self.client.expected_data = {"AutoScalingGroups": [1, 2]} + set_capacity( + "wrong number of ASGs", + [Queue("queued", 1, "wrong number of ASGs")], + self.client, + ) From 4e9c2462648c265646cd79055837a73ecd6b7631 Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Thu, 2 Mar 2023 20:28:27 +0100 Subject: [PATCH 478/841] Check CI python code always --- .github/workflows/pull_request.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 7d410f833c5..1efa6147c9a 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -37,7 +37,6 @@ jobs: cd "$GITHUB_WORKSPACE/tests/ci" python3 run_check.py PythonUnitTests: - needs: CheckLabels runs-on: [self-hosted, style-checker] steps: - name: Check out repository code From c1774cabd01cea086c96547e7fffd35a3a2282b2 Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Thu, 2 Mar 2023 20:29:34 +0100 Subject: [PATCH 479/841] Do not install GitPython on runners, it is preinstalled --- .github/workflows/cherry_pick.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/cherry_pick.yml b/.github/workflows/cherry_pick.yml index 065e584182b..8d1e2055978 100644 --- a/.github/workflows/cherry_pick.yml +++ b/.github/workflows/cherry_pick.yml @@ -35,7 +35,6 @@ jobs: fetch-depth: 0 - name: Cherry pick run: | - sudo pip install GitPython cd "$GITHUB_WORKSPACE/tests/ci" python3 cherry_pick.py - name: Cleanup From 6a746beff8586ebbe496089b8da4dff044b5657a Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Fri, 3 Mar 2023 09:53:21 +0100 Subject: [PATCH 480/841] Tune style-checker scaling up and down by modifiers --- tests/ci/autoscale_runners_lambda/app.py | 26 ++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/tests/ci/autoscale_runners_lambda/app.py b/tests/ci/autoscale_runners_lambda/app.py index 2777d5cf9c1..25c6c2eb9a8 100644 --- a/tests/ci/autoscale_runners_lambda/app.py +++ b/tests/ci/autoscale_runners_lambda/app.py @@ -7,7 +7,7 @@ import logging import time from dataclasses import dataclass from pprint import pformat -from typing import Any, List, Literal, Optional +from typing import Any, List, Literal, Optional, Tuple import boto3 # type: ignore import requests # type: ignore @@ -50,6 +50,19 @@ class Queue: label: str +def get_scales(runner_type: str) -> Tuple[int, int]: + "returns the multipliers for scaling down and up ASG by types" + # Scaling down is quicker on the lack of running jobs than scaling up on + # queue + scale_down = 3 + scale_up = 5 + if runner_type == "style-checker": + # the style checkers have so many noise, so it scales up too quickly + scale_down = 2 + scale_up = 10 + return scale_down, scale_up + + ### VENDORING def get_parameter_from_ssm(name, decrypt=True, client=None): if not client: @@ -131,6 +144,7 @@ def set_capacity( continue raise ValueError("Queue status is not in ['in_progress', 'queued']") + scale_down, scale_up = get_scales(runner_type) capacity_reserve = max(0, asg["DesiredCapacity"] - running) stop = False if queued: @@ -139,9 +153,10 @@ def set_capacity( stop = stop or (asg["DesiredCapacity"] - running - queued) > 0 stop = stop or asg["MaxSize"] <= asg["DesiredCapacity"] - # Let's calculate a new desired capacity. Here the scale is used to not - # scale up and down too quickly - desired_capacity = asg["DesiredCapacity"] + ((queued - capacity_reserve) // 5) + # Let's calculate a new desired capacity + desired_capacity = asg["DesiredCapacity"] + ( + (queued - capacity_reserve) // scale_up + ) desired_capacity = max(desired_capacity, asg["MinSize"]) desired_capacity = min(desired_capacity, asg["MaxSize"]) # Finally, should the capacity be even changed @@ -168,8 +183,7 @@ def set_capacity( # Now we will calculate if we need to scale down stop = stop or asg["DesiredCapacity"] <= asg["MinSize"] stop = stop or asg["DesiredCapacity"] <= running - # Scale down quicker than scale up - desired_capacity = asg["DesiredCapacity"] - (capacity_reserve // 3) + desired_capacity = asg["DesiredCapacity"] - (capacity_reserve // scale_down) desired_capacity = max(desired_capacity, asg["MinSize"]) desired_capacity = min(desired_capacity, asg["MaxSize"]) stop = stop or asg["DesiredCapacity"] == desired_capacity From a5764643604dff138150ad7719b7c0781ea75593 Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Fri, 3 Mar 2023 12:01:05 +0100 Subject: [PATCH 481/841] Reduce statisctics interval, process empty response for runners --- tests/ci/autoscale_runners_lambda/app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/ci/autoscale_runners_lambda/app.py b/tests/ci/autoscale_runners_lambda/app.py index 25c6c2eb9a8..ca173be2eab 100644 --- a/tests/ci/autoscale_runners_lambda/app.py +++ b/tests/ci/autoscale_runners_lambda/app.py @@ -35,7 +35,7 @@ FROM FROM default.workflow_jobs WHERE has(labels, 'self-hosted') AND hasAny({RUNNER_TYPE_LABELS}, labels) - AND started_at > now() - INTERVAL 2 DAY + AND started_at > now() - INTERVAL 1 DAY GROUP BY ALL HAVING last_status IN ('in_progress', 'queued') ) @@ -231,6 +231,7 @@ def main(dry_run: bool = True) -> None: for queue in queues if runner_type in queue["labels"] ] + runner_queues = runner_queues or [Queue("in_progress", 0, runner_type)] set_capacity(runner_type, runner_queues, asg_client, dry_run) From 602933ce1edd9f02ec35b47ef428a49685fa123c Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Fri, 3 Mar 2023 12:09:09 +0100 Subject: [PATCH 482/841] Make smarter scaler based on reserve/deficit --- tests/ci/autoscale_runners_lambda/app.py | 19 +++++++++---------- tests/ci/autoscale_runners_lambda_test.py | 5 ++--- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/tests/ci/autoscale_runners_lambda/app.py b/tests/ci/autoscale_runners_lambda/app.py index ca173be2eab..596e675ee24 100644 --- a/tests/ci/autoscale_runners_lambda/app.py +++ b/tests/ci/autoscale_runners_lambda/app.py @@ -145,18 +145,18 @@ def set_capacity( raise ValueError("Queue status is not in ['in_progress', 'queued']") scale_down, scale_up = get_scales(runner_type) - capacity_reserve = max(0, asg["DesiredCapacity"] - running) + # How much nodes are free (positive) or need to be added (negative) + capacity_reserve = asg["DesiredCapacity"] - running - queued stop = False - if queued: + if capacity_reserve < 0: # This part is about scaling up - # First, let's check if there's enough runners to cover the queue - stop = stop or (asg["DesiredCapacity"] - running - queued) > 0 - + capacity_deficit = -capacity_reserve + # It looks that we are still OK, since no queued jobs exist + stop = stop or queued == 0 + # Are we already at the capacity limits stop = stop or asg["MaxSize"] <= asg["DesiredCapacity"] # Let's calculate a new desired capacity - desired_capacity = asg["DesiredCapacity"] + ( - (queued - capacity_reserve) // scale_up - ) + desired_capacity = asg["DesiredCapacity"] + (capacity_deficit // scale_up) desired_capacity = max(desired_capacity, asg["MinSize"]) desired_capacity = min(desired_capacity, asg["MaxSize"]) # Finally, should the capacity be even changed @@ -181,8 +181,7 @@ def set_capacity( return # Now we will calculate if we need to scale down - stop = stop or asg["DesiredCapacity"] <= asg["MinSize"] - stop = stop or asg["DesiredCapacity"] <= running + stop = stop or asg["DesiredCapacity"] == asg["MinSize"] desired_capacity = asg["DesiredCapacity"] - (capacity_reserve // scale_down) desired_capacity = max(desired_capacity, asg["MinSize"]) desired_capacity = min(desired_capacity, asg["MaxSize"]) diff --git a/tests/ci/autoscale_runners_lambda_test.py b/tests/ci/autoscale_runners_lambda_test.py index e6ac157ee4a..7efa0004745 100644 --- a/tests/ci/autoscale_runners_lambda_test.py +++ b/tests/ci/autoscale_runners_lambda_test.py @@ -67,10 +67,7 @@ class TestSetCapacity(unittest.TestCase): test_cases = ( # Do not change capacity TestCase("noqueue", 1, 13, 20, [Queue("in_progress", 155, "noqueue")], -1), - TestCase("w/reserve", 1, 13, 20, [Queue("queued", 5, "w/reserve")], -1), TestCase("w/reserve", 1, 13, 20, [Queue("queued", 17, "w/reserve")], -1), - TestCase("w/reserve", 1, 23, 20, [Queue("queued", 17, "w/reserve")], -1), - TestCase("less-min", 10, 3, 20, [Queue("queued", 1, "less-min")], -1), # Increase capacity TestCase("increase", 1, 13, 20, [Queue("queued", 23, "increase")], 15), TestCase("increase", 1, 13, 20, [Queue("queued", 18, "increase")], 14), @@ -88,6 +85,8 @@ class TestSetCapacity(unittest.TestCase): ), TestCase("lower-min", 10, 5, 20, [Queue("queued", 5, "lower-min")], 10), # Decrease capacity + TestCase("w/reserve", 1, 13, 20, [Queue("queued", 5, "w/reserve")], 11), + TestCase("w/reserve", 1, 23, 20, [Queue("queued", 17, "w/reserve")], 20), TestCase("decrease", 1, 13, 20, [Queue("in_progress", 3, "decrease")], 10), TestCase("decrease", 1, 13, 20, [Queue("in_progress", 5, "decrease")], 11), ) From dfb3feb686a4ebb7c32c682e6657c4a5c3470188 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Fri, 3 Mar 2023 16:48:09 +0400 Subject: [PATCH 483/841] Typo at the page `/docs/ru/engines/table-engines/mergetree-family/collapsingmergetree.md` --- .../table-engines/mergetree-family/collapsingmergetree.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ru/engines/table-engines/mergetree-family/collapsingmergetree.md b/docs/ru/engines/table-engines/mergetree-family/collapsingmergetree.md index dac490468d0..e3b4238a200 100644 --- a/docs/ru/engines/table-engines/mergetree-family/collapsingmergetree.md +++ b/docs/ru/engines/table-engines/mergetree-family/collapsingmergetree.md @@ -89,7 +89,7 @@ CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] └─────────────────────┴───────────┴──────────┴──────┘ ``` -Первая строка отменяет предыдущее состояние объекта (пользователя). Она должен повторять все поля из ключа сортировки для отменённого состояния за исключением `Sign`. +Первая строка отменяет предыдущее состояние объекта (пользователя). Она должна повторять все поля из ключа сортировки для отменённого состояния за исключением `Sign`. Вторая строка содержит текущее состояние. From 5d1f3dbf4e2fec3bdf190b47d02aacee83fb6e21 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Fri, 3 Mar 2023 16:50:14 +0400 Subject: [PATCH 484/841] Typo at the page `/docs/ru/sql-reference/dictionaries/external-dictionaries/external-dicts.md` --- .../dictionaries/external-dictionaries/external-dicts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ru/sql-reference/dictionaries/external-dictionaries/external-dicts.md b/docs/ru/sql-reference/dictionaries/external-dictionaries/external-dicts.md index 314fefab5eb..a262a354889 100644 --- a/docs/ru/sql-reference/dictionaries/external-dictionaries/external-dicts.md +++ b/docs/ru/sql-reference/dictionaries/external-dictionaries/external-dicts.md @@ -14,7 +14,7 @@ ClickHouse: - Периодически обновляет их и динамически подгружает отсутствующие значения. - Позволяет создавать внешние словари с помощью xml-файлов или [DDL-запросов](../../statements/create/dictionary.md#create-dictionary-query). -Конфигурация внешних словарей может находится в одном или нескольких xml-файлах. Путь к конфигурации указывается в параметре [dictionaries_config](../../../operations/server-configuration-parameters/settings.md#server_configuration_parameters-dictionaries_config). +Конфигурация внешних словарей может находиться в одном или нескольких xml-файлах. Путь к конфигурации указывается в параметре [dictionaries_config](../../../operations/server-configuration-parameters/settings.md#server_configuration_parameters-dictionaries_config). Словари могут загружаться при старте сервера или при первом использовании, в зависимости от настройки [dictionaries_lazy_load](../../../operations/server-configuration-parameters/settings.md#server_configuration_parameters-dictionaries_lazy_load). From 1bbf5acd47b86e19f6767619d372466bca28bec2 Mon Sep 17 00:00:00 2001 From: Konstantin Bogdanov Date: Fri, 3 Mar 2023 15:55:52 +0300 Subject: [PATCH 485/841] Pass headers from StorageURL to WriteBufferFromHTTP (#46996) * Pass headers from StorageURL to WriteBufferFromHTTP * Add a test * Lint * `time.sleep(1)` * Start echo server earlier * Add proper handling for mock server start * Automatic style fix --------- Co-authored-by: robot-clickhouse --- src/IO/WriteBufferFromHTTP.cpp | 4 ++ src/IO/WriteBufferFromHTTP.h | 2 + src/Storages/StorageURL.cpp | 11 +++- src/Storages/StorageURL.h | 1 + .../test_storage_url_http_headers/__init__.py | 0 .../http_headers_echo_server.py | 31 +++++++++ .../test_storage_url_http_headers/test.py | 66 +++++++++++++++++++ 7 files changed, 113 insertions(+), 2 deletions(-) create mode 100644 tests/integration/test_storage_url_http_headers/__init__.py create mode 100644 tests/integration/test_storage_url_http_headers/http_headers_echo_server.py create mode 100644 tests/integration/test_storage_url_http_headers/test.py diff --git a/src/IO/WriteBufferFromHTTP.cpp b/src/IO/WriteBufferFromHTTP.cpp index f7456ad6b6c..355c42a23c9 100644 --- a/src/IO/WriteBufferFromHTTP.cpp +++ b/src/IO/WriteBufferFromHTTP.cpp @@ -11,6 +11,7 @@ WriteBufferFromHTTP::WriteBufferFromHTTP( const std::string & method, const std::string & content_type, const std::string & content_encoding, + const HTTPHeaderEntries & additional_headers, const ConnectionTimeouts & timeouts, size_t buffer_size_) : WriteBufferFromOStream(buffer_size_) @@ -28,6 +29,9 @@ WriteBufferFromHTTP::WriteBufferFromHTTP( if (!content_encoding.empty()) request.set("Content-Encoding", content_encoding); + for (const auto & header: additional_headers) + request.add(header.name, header.value); + LOG_TRACE((&Poco::Logger::get("WriteBufferToHTTP")), "Sending request to {}", uri.toString()); ostr = &session->sendRequest(request); diff --git a/src/IO/WriteBufferFromHTTP.h b/src/IO/WriteBufferFromHTTP.h index 6966bc8a5c5..ce5020dfa78 100644 --- a/src/IO/WriteBufferFromHTTP.h +++ b/src/IO/WriteBufferFromHTTP.h @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -22,6 +23,7 @@ public: const std::string & method = Poco::Net::HTTPRequest::HTTP_POST, // POST or PUT only const std::string & content_type = "", const std::string & content_encoding = "", + const HTTPHeaderEntries & additional_headers = {}, const ConnectionTimeouts & timeouts = {}, size_t buffer_size_ = DBMS_DEFAULT_BUFFER_SIZE); diff --git a/src/Storages/StorageURL.cpp b/src/Storages/StorageURL.cpp index 152dda8f360..c0ddb0bc48a 100644 --- a/src/Storages/StorageURL.cpp +++ b/src/Storages/StorageURL.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -458,6 +459,7 @@ StorageURLSink::StorageURLSink( ContextPtr context, const ConnectionTimeouts & timeouts, const CompressionMethod compression_method, + const HTTPHeaderEntries & headers, const String & http_method) : SinkToStorage(sample_block) { @@ -465,7 +467,7 @@ StorageURLSink::StorageURLSink( std::string content_encoding = toContentEncodingName(compression_method); write_buf = wrapWriteBufferWithCompressionMethod( - std::make_unique(Poco::URI(uri), http_method, content_type, content_encoding, timeouts), + std::make_unique(Poco::URI(uri), http_method, content_type, content_encoding, headers, timeouts), compression_method, 3); writer = FormatFactory::instance().getOutputFormat(format, *write_buf, sample_block, context, format_settings); @@ -530,6 +532,7 @@ public: ContextPtr context_, const ConnectionTimeouts & timeouts_, const CompressionMethod compression_method_, + const HTTPHeaderEntries & headers_, const String & http_method_) : PartitionedSink(partition_by, context_, sample_block_) , uri(uri_) @@ -539,6 +542,7 @@ public: , context(context_) , timeouts(timeouts_) , compression_method(compression_method_) + , headers(headers_) , http_method(http_method_) { } @@ -548,7 +552,7 @@ public: auto partition_path = PartitionedSink::replaceWildcards(uri, partition_id); context->getRemoteHostFilter().checkURL(Poco::URI(partition_path)); return std::make_shared( - partition_path, format, format_settings, sample_block, context, timeouts, compression_method, http_method); + partition_path, format, format_settings, sample_block, context, timeouts, compression_method, headers, http_method); } private: @@ -560,6 +564,7 @@ private: const ConnectionTimeouts timeouts; const CompressionMethod compression_method; + const HTTPHeaderEntries headers; const String http_method; }; @@ -821,6 +826,7 @@ SinkToStoragePtr IStorageURLBase::write(const ASTPtr & query, const StorageMetad context, getHTTPTimeouts(context), compression_method, + headers, http_method); } else @@ -833,6 +839,7 @@ SinkToStoragePtr IStorageURLBase::write(const ASTPtr & query, const StorageMetad context, getHTTPTimeouts(context), compression_method, + headers, http_method); } } diff --git a/src/Storages/StorageURL.h b/src/Storages/StorageURL.h index acf49f3cb71..1cfffc3e73a 100644 --- a/src/Storages/StorageURL.h +++ b/src/Storages/StorageURL.h @@ -137,6 +137,7 @@ public: ContextPtr context, const ConnectionTimeouts & timeouts, CompressionMethod compression_method, + const HTTPHeaderEntries & headers = {}, const String & method = Poco::Net::HTTPRequest::HTTP_POST); std::string getName() const override { return "StorageURLSink"; } diff --git a/tests/integration/test_storage_url_http_headers/__init__.py b/tests/integration/test_storage_url_http_headers/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/integration/test_storage_url_http_headers/http_headers_echo_server.py b/tests/integration/test_storage_url_http_headers/http_headers_echo_server.py new file mode 100644 index 00000000000..b1a3f6777b1 --- /dev/null +++ b/tests/integration/test_storage_url_http_headers/http_headers_echo_server.py @@ -0,0 +1,31 @@ +import http.server + +RESULT_PATH = "/headers.txt" + + +class RequestHandler(http.server.BaseHTTPRequestHandler): + def log_message(self, *args): + with open(RESULT_PATH, "w") as f: + f.write(self.headers.as_string()) + + def do_POST(self): + self.rfile.read1() + self.send_response(200) + self.end_headers() + self.wfile.write(b'{"status":"ok"}') + + +if __name__ == "__main__": + with open(RESULT_PATH, "w") as f: + f.write("") + httpd = http.server.HTTPServer( + ( + "localhost", + 8000, + ), + RequestHandler, + ) + try: + httpd.serve_forever() + finally: + httpd.server_close() diff --git a/tests/integration/test_storage_url_http_headers/test.py b/tests/integration/test_storage_url_http_headers/test.py new file mode 100644 index 00000000000..3bbf5ec81c9 --- /dev/null +++ b/tests/integration/test_storage_url_http_headers/test.py @@ -0,0 +1,66 @@ +import pytest +import os +import time + +from . import http_headers_echo_server + +from helpers.cluster import ClickHouseCluster + +cluster = ClickHouseCluster(__file__) +server = cluster.add_instance("node") + + +def run_echo_server(): + script_dir = os.path.dirname(os.path.realpath(__file__)) + + server.copy_file_to_container( + os.path.join(script_dir, "http_headers_echo_server.py"), + "/http_headers_echo_server.py", + ) + + server.exec_in_container( + [ + "bash", + "-c", + "python3 /http_headers_echo_server.py > /http_headers_echo.server.log 2>&1", + ], + detach=True, + user="root", + ) + + for _ in range(0, 10): + ping_response = server.exec_in_container( + ["curl", "-s", f"http://localhost:8000/"], + nothrow=True, + ) + + if "html" in ping_response: + return + + print(ping_response) + + raise Exception("Echo server is not responding") + + +@pytest.fixture(scope="module") +def started_cluster(): + try: + cluster.start() + run_echo_server() + yield cluster + finally: + cluster.shutdown() + + +def test_storage_url_http_headers(started_cluster): + query = "INSERT INTO TABLE FUNCTION url('http://localhost:8000/', JSON, 'a UInt64', headers('X-My-Custom-Header'='test-header')) VALUES (1)" + + server.query(query) + + result = server.exec_in_container( + ["cat", http_headers_echo_server.RESULT_PATH], user="root" + ) + + print(result) + + assert "X-My-Custom-Header: test-header" in result From 6c9225063674f01285f98a05382e9a80aee74f97 Mon Sep 17 00:00:00 2001 From: DanRoscigno Date: Fri, 3 Mar 2023 08:21:02 -0500 Subject: [PATCH 486/841] add compression types for file function --- docs/en/sql-reference/table-functions/file.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/en/sql-reference/table-functions/file.md b/docs/en/sql-reference/table-functions/file.md index d2ef66dde73..594c328c3ff 100644 --- a/docs/en/sql-reference/table-functions/file.md +++ b/docs/en/sql-reference/table-functions/file.md @@ -6,21 +6,22 @@ sidebar_label: file # file -Creates a table from a file. This table function is similar to [url](../../sql-reference/table-functions/url.md) and [hdfs](../../sql-reference/table-functions/hdfs.md) ones. +Creates a table from a file. This table function is similar to [url](/docs/en/sql-reference/table-functions/url.md) and [hdfs](/docs/en/sql-reference/table-functions/hdfs.md) ones. -`file` function can be used in `SELECT` and `INSERT` queries on data in [File](../../engines/table-engines/special/file.md) tables. +`file` function can be used in `SELECT` and `INSERT` queries on data in [File](/docs/en/engines/table-engines/special/file.md) tables. **Syntax** ``` sql -file(path [,format] [,structure]) +file(path [,format] [,structure] [,compression]) ``` **Parameters** -- `path` — The relative path to the file from [user_files_path](../../operations/server-configuration-parameters/settings.md#server_configuration_parameters-user_files_path). Path to file support following globs in read-only mode: `*`, `?`, `{abc,def}` and `{N..M}` where `N`, `M` — numbers, `'abc', 'def'` — strings. -- `format` — The [format](../../interfaces/formats.md#formats) of the file. +- `path` — The relative path to the file from [user_files_path](/docs/en/operations/server-configuration-parameters/settings.md#server_configuration_parameters-user_files_path). Path to file support following globs in read-only mode: `*`, `?`, `{abc,def}` and `{N..M}` where `N`, `M` — numbers, `'abc', 'def'` — strings. +- `format` — The [format](/docs/en/interfaces/formats.md#formats) of the file. - `structure` — Structure of the table. Format: `'column1_name column1_type, column2_name column2_type, ...'`. +- `compression` — The existing compression type when used in a `SELECT` query, or the desired compression type when used in an `INSERT` query. The supported compression types are `gz`, `br`, `xz`, `zst`, `lz4`, and `bz2`. **Returned value** @@ -53,7 +54,7 @@ SELECT * FROM file('test.csv', 'CSV', 'column1 UInt32, column2 UInt32, column3 U └─────────┴─────────┴─────────┘ ``` -Getting the first 10 lines of a table that contains 3 columns of [UInt32](../../sql-reference/data-types/int-uint.md) type from a CSV file: +Getting the first 10 lines of a table that contains 3 columns of [UInt32](/docs/en/sql-reference/data-types/int-uint.md) type from a CSV file: ``` sql SELECT * FROM file('test.csv', 'CSV', 'column1 UInt32, column2 UInt32, column3 UInt32') LIMIT 10; @@ -143,4 +144,4 @@ SELECT count(*) FROM file('big_dir/**/file002', 'CSV', 'name String, value UInt3 **See Also** -- [Virtual columns](../../engines/table-engines/index.md#table_engines-virtual_columns) +- [Virtual columns](/docs/en/engines/table-engines/index.md#table_engines-virtual_columns) From 302e076ddd93f838605bcbf71ca12bb47b17edc6 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Fri, 3 Mar 2023 17:21:52 +0400 Subject: [PATCH 487/841] Typos at the page `/docs/ru/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-polygon.md` --- .../external-dictionaries/external-dicts-dict-polygon.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ru/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-polygon.md b/docs/ru/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-polygon.md index 64637edc4a4..24f29d3bf53 100644 --- a/docs/ru/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-polygon.md +++ b/docs/ru/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-polygon.md @@ -61,7 +61,7 @@ LAYOUT(POLYGON(STORE_POLYGON_KEY_COLUMN 1)) - Мультиполигон. Представляет из себя массив полигонов. Каждый полигон задается двумерным массивом точек — первый элемент этого массива задает внешнюю границу полигона, последующие элементы могут задавать дырки, вырезаемые из него. -Точки могут задаваться массивом или кортежем из своих координат. В текущей реализации поддерживается только двумерные точки. +Точки могут задаваться массивом или кортежем из своих координат. В текущей реализации поддерживаются только двумерные точки. Пользователь может [загружать свои собственные данные](../../../sql-reference/dictionaries/external-dictionaries/external-dicts-dict-sources.md) во всех поддерживаемых ClickHouse форматах. @@ -80,7 +80,7 @@ LAYOUT(POLYGON(STORE_POLYGON_KEY_COLUMN 1)) - `POLYGON`. Синоним к `POLYGON_INDEX_CELL`. Запросы к словарю осуществляются с помощью стандартных [функций](../../../sql-reference/functions/ext-dict-functions.md) для работы со внешними словарями. -Важным отличием является то, что здесь ключами будут являются точки, для которых хочется найти содержащий их полигон. +Важным отличием является то, что здесь ключами являются точки, для которых хочется найти содержащий их полигон. **Пример** From 221ac4a1e57fa124f81a677a3b8630518bcbe4bd Mon Sep 17 00:00:00 2001 From: avogar Date: Fri, 3 Mar 2023 13:23:44 +0000 Subject: [PATCH 488/841] Better --- src/Interpreters/ProcessList.cpp | 49 ++++++++++++-------------------- 1 file changed, 18 insertions(+), 31 deletions(-) diff --git a/src/Interpreters/ProcessList.cpp b/src/Interpreters/ProcessList.cpp index 52674dc1c77..6f5553f58fd 100644 --- a/src/Interpreters/ProcessList.cpp +++ b/src/Interpreters/ProcessList.cpp @@ -362,7 +362,9 @@ QueryStatus::QueryStatus( QueryStatus::~QueryStatus() { - assert(executors.empty()); + /// Check that all executors were invalidated. + for (const auto & e : executors) + assert(!e->executor); if (auto * memory_tracker = getMemoryTracker()) { @@ -394,35 +396,21 @@ CancellationCode QueryStatus::cancelQuery(bool) is_killed.store(true); std::unique_lock lock(executors_mutex); - - /// Track all cancelled executors. - std::unordered_set cancelled; - /// We cancel executors from the left to the right, so if the last executor - /// was cancelled, then all executors were cancelled. - while (!cancelled.contains(executors.back().get())) + for (const auto & e : executors) { - size_t size = executors.size(); - /// We should create a copy of executor holder, because it can be - /// removed from vector in removePipelineExecutor from another thread - /// and reference will be invalid. - for (auto e : executors) - { - if (cancelled.contains(e.get())) - continue; - /// We should call cancel() with unlocked executors_mutex, because - /// cancel() can try to lock some internal mutex that is already locked by query executing - /// thread, and query executing thread can call removePipelineExecutor and lock executors_mutex, - /// which will lead to deadlock. - lock.unlock(); - e->cancel(); - lock.lock(); - cancelled.insert(e.get()); - /// While executors_mutex was unlocked, removePipelineExecutor could be called and - /// the size of executors could have changed. In this case we should start iterating - /// over it again to avoid using invalid iterators. - if (executors.size() != size) - break; - } + /// We should call cancel() with unlocked executors_mutex, because + /// cancel() can try to lock some internal mutex that is already locked by query executing + /// thread, and query executing thread can call removePipelineExecutor and lock executors_mutex, + /// which will lead to deadlock. + /// Note that the size and the content of executors cannot be changed while + /// executors_mutex is unlocked, because: + /// 1) We don't allow adding new executors while cancelling query in addPipelineExecutor + /// 2) We don't actually remove executor holder from executors in removePipelineExecutor, + /// just mark that executor is invalid. + /// So, it's safe to continue iteration over executors after subsequent mutex locking. + lock.unlock(); + e->cancel(); + lock.lock(); } return CancellationCode::CancelSent; @@ -446,9 +434,8 @@ void QueryStatus::removePipelineExecutor(PipelineExecutor * e) std::lock_guard lock(executors_mutex); auto it = std::find_if(executors.begin(), executors.end(), [e](const ExecutorHolderPtr & x){ return x->executor == e; }); assert(it != executors.end()); - /// Invalidate executor pointer inside holder. + /// Invalidate executor pointer inside holder, but don't remove holder from the executors (to avoid race with cancelQuery) (*it)->remove(); - executors.erase(it); } bool QueryStatus::checkTimeLimit() From e06bcf21ec9f543d9a79620ac2565c05bed62635 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Fri, 3 Mar 2023 18:11:27 +0400 Subject: [PATCH 489/841] Markup fixed at the page `/docs/ru/sql-reference/data-types/aggregatefunction.md` --- docs/ru/sql-reference/data-types/aggregatefunction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ru/sql-reference/data-types/aggregatefunction.md b/docs/ru/sql-reference/data-types/aggregatefunction.md index 21b452acb1d..e42b467e4af 100644 --- a/docs/ru/sql-reference/data-types/aggregatefunction.md +++ b/docs/ru/sql-reference/data-types/aggregatefunction.md @@ -6,7 +6,7 @@ sidebar_label: AggregateFunction # AggregateFunction {#data-type-aggregatefunction} -Агрегатные функции могут обладать определяемым реализацией промежуточным состоянием, которое может быть сериализовано в тип данных, соответствующий AggregateFunction(…), и быть записано в таблицу обычно посредством [материализованного представления] (../../sql-reference/statements/create/view.md). Чтобы получить промежуточное состояние, обычно используются агрегатные функции с суффиксом `-State`. Чтобы в дальнейшем получить агрегированные данные необходимо использовать те же агрегатные функции с суффиксом `-Merge`. +Агрегатные функции могут обладать определяемым реализацией промежуточным состоянием, которое может быть сериализовано в тип данных, соответствующий AggregateFunction(…), и быть записано в таблицу обычно посредством [материализованного представления](../../sql-reference/statements/create/view.md). Чтобы получить промежуточное состояние, обычно используются агрегатные функции с суффиксом `-State`. Чтобы в дальнейшем получить агрегированные данные необходимо использовать те же агрегатные функции с суффиксом `-Merge`. `AggregateFunction(name, types_of_arguments…)` — параметрический тип данных. From 420c79a2521d2a8358525e92df6e37861a6d2786 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Fri, 3 Mar 2023 18:16:57 +0400 Subject: [PATCH 490/841] Typo at the page `/docs/ru/sql-reference/data-types/tuple.md` --- docs/ru/sql-reference/data-types/tuple.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ru/sql-reference/data-types/tuple.md b/docs/ru/sql-reference/data-types/tuple.md index 76370d01c0d..8953134d154 100644 --- a/docs/ru/sql-reference/data-types/tuple.md +++ b/docs/ru/sql-reference/data-types/tuple.md @@ -34,7 +34,7 @@ SELECT tuple(1,'a') AS x, toTypeName(x) ## Особенности работы с типами данных {#osobennosti-raboty-s-tipami-dannykh} -При создании кортежа «на лету» ClickHouse автоматически определяет тип каждого аргументов как минимальный из типов, который может сохранить значение аргумента. Если аргумент — [NULL](../../sql-reference/data-types/tuple.md#null-literal), то тип элемента кортежа — [Nullable](nullable.md). +При создании кортежа «на лету» ClickHouse автоматически определяет тип всех аргументов как минимальный из типов, который может сохранить значение аргумента. Если аргумент — [NULL](../../sql-reference/data-types/tuple.md#null-literal), то тип элемента кортежа — [Nullable](nullable.md). Пример автоматического определения типа данных: From e44e5281182c2cda7aef51bdabff529d337d1f3a Mon Sep 17 00:00:00 2001 From: Suzy Wang Date: Fri, 3 Mar 2023 06:20:18 -0800 Subject: [PATCH 491/841] remove unnecessary reverse memcpy --- src/Common/formatIPv6.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Common/formatIPv6.h b/src/Common/formatIPv6.h index bc8f70f047c..7b88f93750b 100644 --- a/src/Common/formatIPv6.h +++ b/src/Common/formatIPv6.h @@ -82,11 +82,7 @@ inline bool parseIPv4(T * &src, EOFfunction eof, unsigned char * dst, int32_t fi break; } - if constexpr (std::endian::native == std::endian::little) - memcpy(dst, &result, sizeof(result)); - else - reverseMemcpy(dst, &result, sizeof(result)); - + memcpy(dst, &result, sizeof(result)); return true; } From dfb9258c2862af4196fa17eb213dc8cf217ea1cb Mon Sep 17 00:00:00 2001 From: Dmitry Date: Fri, 3 Mar 2023 18:22:02 +0400 Subject: [PATCH 492/841] Markup fixed a the page `/docs/ru/sql-reference/data-types/special-data-types/interval.md` --- docs/ru/sql-reference/data-types/special-data-types/interval.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/ru/sql-reference/data-types/special-data-types/interval.md b/docs/ru/sql-reference/data-types/special-data-types/interval.md index 856275ed8f2..109ceee7852 100644 --- a/docs/ru/sql-reference/data-types/special-data-types/interval.md +++ b/docs/ru/sql-reference/data-types/special-data-types/interval.md @@ -10,6 +10,7 @@ sidebar_label: Interval :::danger "Внимание" Нельзя использовать типы данных `Interval` для хранения данных в таблице. +::: Структура: From a8ceab136635a9238a431dea5d651c9731a10e6a Mon Sep 17 00:00:00 2001 From: Yakov Olkhovskiy <99031427+yakov-olkhovskiy@users.noreply.github.com> Date: Fri, 3 Mar 2023 09:24:58 -0500 Subject: [PATCH 493/841] NOLINT for getenv --- utils/self-extracting-executable/decompressor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/self-extracting-executable/decompressor.cpp b/utils/self-extracting-executable/decompressor.cpp index 39fe552dfac..8db0d95e70d 100644 --- a/utils/self-extracting-executable/decompressor.cpp +++ b/utils/self-extracting-executable/decompressor.cpp @@ -170,7 +170,7 @@ int decompress(char * input, char * output, off_t start, off_t end, size_t max_n bool isSudo() { - return getuid() == 0 && geteuid() == 0 && getenv("SUDO_USER") && getenv("SUDO_UID") && getenv("SUDO_GID"); + return getuid() == 0 && geteuid() == 0 && getenv("SUDO_USER") && getenv("SUDO_UID") && getenv("SUDO_GID"); // NOLINT(concurrency-mt-unsafe) } /// Read data about files and decomrpess them. From d55ebe74f67a6a03eec9b2034c775bd3d7d8c08c Mon Sep 17 00:00:00 2001 From: Dmitry Date: Fri, 3 Mar 2023 18:27:27 +0400 Subject: [PATCH 494/841] Markup fixed at the page `/docs/ru/sql-reference/data-types/geo.md` --- docs/ru/sql-reference/data-types/geo.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/ru/sql-reference/data-types/geo.md b/docs/ru/sql-reference/data-types/geo.md index a7c5f79b0be..24d981195f5 100644 --- a/docs/ru/sql-reference/data-types/geo.md +++ b/docs/ru/sql-reference/data-types/geo.md @@ -10,6 +10,7 @@ ClickHouse поддерживает типы данных для отображ :::danger "Предупреждение" Сейчас использование типов данных для работы с географическими структурами является экспериментальной возможностью. Чтобы использовать эти типы данных, включите настройку `allow_experimental_geo_types = 1`. +::: **См. также** - [Хранение географических структур данных](https://ru.wikipedia.org/wiki/GeoJSON). From 737cf8e14934f7b4ce4869241fb67e461143bc45 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Fri, 3 Mar 2023 15:14:49 +0000 Subject: [PATCH 495/841] Better --- src/Client/HedgedConnections.cpp | 4 +- src/Client/MultiplexedConnections.cpp | 4 +- src/Core/Settings.h | 3 +- src/Core/SettingsEnums.cpp | 5 - src/Core/SettingsEnums.h | 9 - src/Interpreters/Cluster.cpp | 2 +- src/Interpreters/Context.cpp | 23 ++- src/Interpreters/Context.h | 9 + src/Interpreters/InterpreterSelectQuery.cpp | 45 +++-- .../getCustomKeyFilterForParallelReplicas.cpp | 49 ++--- .../getCustomKeyFilterForParallelReplicas.h | 7 +- .../MergeTree/MergeTreeDataSelectExecutor.cpp | 5 +- src/Storages/SelectQueryInfo.h | 2 + src/Storages/StorageDistributed.cpp | 55 +----- .../test_parallel_replicas_custom_key/test.py | 74 ++------ ...4_shard_distributed_with_many_replicas.sql | 2 +- ...here_max_parallel_replicas_distributed.sql | 5 +- .../01034_sample_final_distributed.sql | 5 +- .../01557_max_parallel_replicas_no_sample.sql | 3 +- .../02221_parallel_replicas_bug.sh | 2 +- ...arallel_reading_from_replicas_benchmark.sh | 1 - .../02404_memory_bound_merging.sql | 3 +- ...max_parallel_replicas_custom_key.reference | 175 +++++++++++------- .../02535_max_parallel_replicas_custom_key.sh | 12 +- 24 files changed, 222 insertions(+), 282 deletions(-) diff --git a/src/Client/HedgedConnections.cpp b/src/Client/HedgedConnections.cpp index b1fa6886e84..b97f9454fa5 100644 --- a/src/Client/HedgedConnections.cpp +++ b/src/Client/HedgedConnections.cpp @@ -175,9 +175,7 @@ void HedgedConnections::sendQuery( modified_settings.group_by_two_level_threshold_bytes = 0; } - const bool enable_sample_offset_parallel_processing = settings.max_parallel_replicas > 1 - && (settings.parallel_replicas_mode != ParallelReplicasMode::READ_TASKS - || !settings.allow_experimental_parallel_reading_from_replicas); + const bool enable_sample_offset_parallel_processing = settings.max_parallel_replicas > 1 && !settings.allow_experimental_parallel_reading_from_replicas; if (offset_states.size() > 1 && enable_sample_offset_parallel_processing) { diff --git a/src/Client/MultiplexedConnections.cpp b/src/Client/MultiplexedConnections.cpp index ec6788105ca..cc260353339 100644 --- a/src/Client/MultiplexedConnections.cpp +++ b/src/Client/MultiplexedConnections.cpp @@ -141,9 +141,7 @@ void MultiplexedConnections::sendQuery( } } - const bool enable_sample_offset_parallel_processing = settings.max_parallel_replicas > 1 - && (settings.parallel_replicas_mode != ParallelReplicasMode::READ_TASKS - || !settings.allow_experimental_parallel_reading_from_replicas); + const bool enable_sample_offset_parallel_processing = settings.max_parallel_replicas > 1 && !settings.allow_experimental_parallel_reading_from_replicas; size_t num_replicas = replica_states.size(); if (num_replicas > 1) diff --git a/src/Core/Settings.h b/src/Core/Settings.h index 83aa6104996..797f57f1c04 100644 --- a/src/Core/Settings.h +++ b/src/Core/Settings.h @@ -147,9 +147,8 @@ class IColumn; M(UInt64, max_parallel_replicas, 1, "The maximum number of replicas of each shard used when the query is executed. For consistency (to get different parts of the same partition), this option only works for the specified sampling key. The lag of the replicas is not controlled.", 0) \ M(UInt64, parallel_replicas_count, 0, "This is internal setting that should not be used directly and represents an implementation detail of the 'parallel replicas' mode. This setting will be automatically set up by the initiator server for distributed queries to the number of parallel replicas participating in query processing.", 0) \ M(UInt64, parallel_replica_offset, 0, "This is internal setting that should not be used directly and represents an implementation detail of the 'parallel replicas' mode. This setting will be automatically set up by the initiator server for distributed queries to the index of the replica participating in query processing among parallel replicas.", 0) \ - M(Map, parallel_replicas_custom_key, "", "Custom key for parallel replicas using modulo operation on the key for assigning work to replicas.", 0) \ + M(String, parallel_replicas_custom_key, "", "Custom key assigning work to replicas when parallel replicas are used.", 0) \ M(ParallelReplicasCustomKeyFilterType, parallel_replicas_custom_key_filter_type, ParallelReplicasCustomKeyFilterType::DEFAULT, "Type of filter to use with custom key for parallel replicas. default - use modulo operation on the custom key, range - use range filter on custom key using all possible values for the value type of custom key.", 0) \ - M(ParallelReplicasMode, parallel_replicas_mode, ParallelReplicasMode::SAMPLE_KEY, "How to process query using multiple replicas.", 0) \ \ M(String, cluster_for_parallel_replicas, "default", "Cluster for a shard in which current server is located", 0) \ M(Bool, allow_experimental_parallel_reading_from_replicas, false, "If true, ClickHouse will send a SELECT query to all replicas of a table. It will work for any kind on MergeTree table.", 0) \ diff --git a/src/Core/SettingsEnums.cpp b/src/Core/SettingsEnums.cpp index d5bd6cb2ae6..b04757ecaa2 100644 --- a/src/Core/SettingsEnums.cpp +++ b/src/Core/SettingsEnums.cpp @@ -167,11 +167,6 @@ IMPLEMENT_SETTING_ENUM(Dialect, ErrorCodes::BAD_ARGUMENTS, {{"clickhouse", Dialect::clickhouse}, {"kusto", Dialect::kusto}}) -IMPLEMENT_SETTING_ENUM(ParallelReplicasMode, ErrorCodes::BAD_ARGUMENTS, - {{"sample_key", ParallelReplicasMode::SAMPLE_KEY}, - {"custom_key", ParallelReplicasMode::CUSTOM_KEY}, - {"read_tasks", ParallelReplicasMode::READ_TASKS}}) - IMPLEMENT_SETTING_ENUM(ParallelReplicasCustomKeyFilterType, ErrorCodes::BAD_ARGUMENTS, {{"default", ParallelReplicasCustomKeyFilterType::DEFAULT}, {"range", ParallelReplicasCustomKeyFilterType::RANGE}}) diff --git a/src/Core/SettingsEnums.h b/src/Core/SettingsEnums.h index 5bb36cec60d..ae9456cc6d7 100644 --- a/src/Core/SettingsEnums.h +++ b/src/Core/SettingsEnums.h @@ -203,15 +203,6 @@ enum class Dialect DECLARE_SETTING_ENUM(Dialect) -enum class ParallelReplicasMode : uint8_t -{ - SAMPLE_KEY, - CUSTOM_KEY, - READ_TASKS, -}; - -DECLARE_SETTING_ENUM(ParallelReplicasMode) - enum class ParallelReplicasCustomKeyFilterType : uint8_t { DEFAULT, diff --git a/src/Interpreters/Cluster.cpp b/src/Interpreters/Cluster.cpp index 1975fa29686..b419dacd523 100644 --- a/src/Interpreters/Cluster.cpp +++ b/src/Interpreters/Cluster.cpp @@ -752,7 +752,7 @@ Cluster::Cluster(Cluster::ReplicasAsShardsTag, const Cluster & from, const Setti auto shuffled_replicas = replicas; // shuffle replicas so we don't always pick the same subset shuffleReplicas(shuffled_replicas, settings); - create_shards_from_replicas(std::span{shuffled_replicas.begin(), shuffled_replicas.begin() + max_replicas_from_shard}); + create_shards_from_replicas(std::span{shuffled_replicas.begin(), max_replicas_from_shard}); } } diff --git a/src/Interpreters/Context.cpp b/src/Interpreters/Context.cpp index 08a3cf206c5..90f9c3bbac4 100644 --- a/src/Interpreters/Context.cpp +++ b/src/Interpreters/Context.cpp @@ -4056,23 +4056,34 @@ std::shared_ptr Context::getAsyncReadCounters() const return async_read_counters; } +Context::ParallelReplicasMode Context::getParallelReplicasMode() const +{ + const auto & settings = getSettingsRef(); + + using enum Context::ParallelReplicasMode; + if (!settings.parallel_replicas_custom_key.value.empty()) + return CUSTOM_KEY; + + if (settings.allow_experimental_parallel_reading_from_replicas + && !settings.use_hedged_requests) + return READ_TASKS; + + return SAMPLE_KEY; +} + bool Context::canUseParallelReplicasOnInitiator() const { const auto & settings = getSettingsRef(); - return settings.allow_experimental_parallel_reading_from_replicas - && settings.parallel_replicas_mode == ParallelReplicasMode::READ_TASKS + return getParallelReplicasMode() == ParallelReplicasMode::READ_TASKS && settings.max_parallel_replicas > 1 - && !settings.use_hedged_requests && !getClientInfo().collaborate_with_initiator; } bool Context::canUseParallelReplicasOnFollower() const { const auto & settings = getSettingsRef(); - return settings.allow_experimental_parallel_reading_from_replicas - && settings.parallel_replicas_mode == ParallelReplicasMode::READ_TASKS + return getParallelReplicasMode() == ParallelReplicasMode::READ_TASKS && settings.max_parallel_replicas > 1 - && !settings.use_hedged_requests && getClientInfo().collaborate_with_initiator; } diff --git a/src/Interpreters/Context.h b/src/Interpreters/Context.h index 19bb6868331..67594a41459 100644 --- a/src/Interpreters/Context.h +++ b/src/Interpreters/Context.h @@ -1123,6 +1123,15 @@ public: bool canUseParallelReplicasOnInitiator() const; bool canUseParallelReplicasOnFollower() const; + enum class ParallelReplicasMode : uint8_t + { + SAMPLE_KEY, + CUSTOM_KEY, + READ_TASKS, + }; + + ParallelReplicasMode getParallelReplicasMode() const; + private: std::unique_lock getLock() const; diff --git a/src/Interpreters/InterpreterSelectQuery.cpp b/src/Interpreters/InterpreterSelectQuery.cpp index e84df90c449..c53734d1e9b 100644 --- a/src/Interpreters/InterpreterSelectQuery.cpp +++ b/src/Interpreters/InterpreterSelectQuery.cpp @@ -517,29 +517,38 @@ InterpreterSelectQuery::InterpreterSelectQuery( settings.additional_table_filters, joined_tables.tablesWithColumns().front().table, *context); ASTPtr parallel_replicas_custom_filter_ast = nullptr; - if (settings.parallel_replicas_count > 1 && settings.parallel_replicas_mode == ParallelReplicasMode::CUSTOM_KEY && !joined_tables.tablesWithColumns().empty()) + if (context->getParallelReplicasMode() == Context::ParallelReplicasMode::CUSTOM_KEY && !joined_tables.tablesWithColumns().empty()) { - if (auto custom_key_ast = parseCustomKeyForTable(settings.parallel_replicas_custom_key, joined_tables.tablesWithColumns().front().table, *context)) + if (settings.parallel_replicas_count > 1) { - LOG_INFO(log, "Processing query on a replica using custom_key"); - if (!storage) - throw DB::Exception(ErrorCodes::BAD_ARGUMENTS, "Storage is unknown when trying to parse custom key for parallel replica"); + if (auto custom_key_ast = parseCustomKeyForTable(settings.parallel_replicas_custom_key, *context)) + { + LOG_INFO(log, "Processing query on a replica using custom_key"); + if (!storage) + throw DB::Exception(ErrorCodes::BAD_ARGUMENTS, "Storage is unknown when trying to parse custom key for parallel replica"); - parallel_replicas_custom_filter_ast = getCustomKeyFilterForParallelReplica( - settings.parallel_replicas_count, - settings.parallel_replica_offset, - std::move(custom_key_ast), - settings.parallel_replicas_custom_key_filter_type, - *storage, - context); + parallel_replicas_custom_filter_ast = getCustomKeyFilterForParallelReplica( + settings.parallel_replicas_count, + settings.parallel_replica_offset, + std::move(custom_key_ast), + settings.parallel_replicas_custom_key_filter_type, + *storage, + context); + } + else if (settings.parallel_replica_offset > 0) + { + LOG_DEBUG( + log, + "Will use no data on this replica because parallel replicas processing with custom_key has been requested" + " (setting 'max_parallel_replicas') but the table does not have custom_key defined for it or it's invalid (settings `parallel_replicas_custom_key`)"); + parallel_replicas_custom_filter_ast = std::make_shared(false); + } } - else if (settings.parallel_replica_offset > 0) + else if (auto * distributed = dynamic_cast(storage.get()); + distributed && canUseCustomKey(settings, *distributed->getCluster(), *context)) { - LOG_DEBUG( - log, - "Will use no data on this replica because parallel replicas processing with custom_key has been requested" - " (setting 'max_parallel_replicas') but the table does not have custom_key defined for it (settings `parallel_replicas_custom_key`)"); - parallel_replicas_custom_filter_ast = std::make_shared(false); + query_info.use_custom_key = true; + context->setSetting("distributed_group_by_no_merge", 2); } } diff --git a/src/Interpreters/getCustomKeyFilterForParallelReplicas.cpp b/src/Interpreters/getCustomKeyFilterForParallelReplicas.cpp index 229668ceff4..2a32d450497 100644 --- a/src/Interpreters/getCustomKeyFilterForParallelReplicas.cpp +++ b/src/Interpreters/getCustomKeyFilterForParallelReplicas.cpp @@ -20,6 +20,12 @@ namespace ErrorCodes extern const int ILLEGAL_TYPE_OF_COLUMN_FOR_FILTER; } +bool canUseCustomKey(const Settings & settings, const Cluster & cluster, const Context & context) +{ + return settings.max_parallel_replicas > 1 && context.getParallelReplicasMode() == Context::ParallelReplicasMode::CUSTOM_KEY + && cluster.getShardCount() == 1 && cluster.getShardsInfo()[0].getAllNodeCount() > 1; +} + ASTPtr getCustomKeyFilterForParallelReplica( size_t replicas_count, size_t replica_num, @@ -115,43 +121,14 @@ ASTPtr getCustomKeyFilterForParallelReplica( return makeASTFunction("and", std::move(lower_function), std::move(upper_function)); } -ASTPtr parseCustomKeyForTable(const Map & custom_keys, const DatabaseAndTableWithAlias & target, const Context & context) +ASTPtr parseCustomKeyForTable(const String & custom_key, const Context & context) { - for (size_t i = 0; i < custom_keys.size(); ++i) - { - const auto & tuple = custom_keys[i].safeGet(); - auto & table = tuple.at(0).safeGet(); - auto & filter = tuple.at(1).safeGet(); - - if (table == target.alias || - (table == target.table && context.getCurrentDatabase() == target.database) || - (table == target.database + '.' + target.table)) - { - /// Try to parse expression - ParserExpression parser; - const auto & settings = context.getSettingsRef(); - return parseQuery( - parser, filter.data(), filter.data() + filter.size(), - "parallel replicas custom key", settings.max_query_size, settings.max_parser_depth); - } - } - - return nullptr; -} - -bool containsCustomKeyForTable(const Map & custom_keys, const DatabaseAndTableWithAlias & target, const Context & context) -{ - for (size_t i = 0; i < custom_keys.size(); ++i) - { - const auto & tuple = custom_keys[i].safeGet(); - auto & table = tuple.at(0).safeGet(); - - if (table == target.alias || - (table == target.table && context.getCurrentDatabase() == target.database) || - (table == target.database + '.' + target.table)) - return true; - } - return false; + /// Try to parse expression + ParserExpression parser; + const auto & settings = context.getSettingsRef(); + return parseQuery( + parser, custom_key.data(), custom_key.data() + custom_key.size(), + "parallel replicas custom key", settings.max_query_size, settings.max_parser_depth); } } diff --git a/src/Interpreters/getCustomKeyFilterForParallelReplicas.h b/src/Interpreters/getCustomKeyFilterForParallelReplicas.h index fc515132487..543f1889b32 100644 --- a/src/Interpreters/getCustomKeyFilterForParallelReplicas.h +++ b/src/Interpreters/getCustomKeyFilterForParallelReplicas.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include #include #include @@ -9,6 +10,8 @@ namespace DB { +bool canUseCustomKey(const Settings & settings, const Cluster & cluster, const Context & context); + /// Get AST for filter created from custom_key /// replica_num is the number of the replica for which we are generating filter starting from 0 ASTPtr getCustomKeyFilterForParallelReplica( @@ -19,8 +22,6 @@ ASTPtr getCustomKeyFilterForParallelReplica( const IStorage & storage, const ContextPtr & context); -ASTPtr parseCustomKeyForTable(const Map & custom_keys, const DatabaseAndTableWithAlias & target, const Context & context); - -bool containsCustomKeyForTable(const Map & custom_keys, const DatabaseAndTableWithAlias & target, const Context & context); +ASTPtr parseCustomKeyForTable(const String & custom_keys, const Context & context); } diff --git a/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp b/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp index 7e914486326..07da66e4378 100644 --- a/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp +++ b/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp @@ -588,9 +588,10 @@ MergeTreeDataSelectSamplingData MergeTreeDataSelectExecutor::getSampling( * It is also important that the entire universe can be covered using SAMPLE 0.1 OFFSET 0, ... OFFSET 0.9 and similar decimals. */ + auto parallel_replicas_mode = context->getParallelReplicasMode(); /// Parallel replicas has been requested but there is no way to sample data. /// Select all data from first replica and no data from other replicas. - if (settings.parallel_replicas_count > 1 && settings.parallel_replicas_mode == ParallelReplicasMode::SAMPLE_KEY + if (settings.parallel_replicas_count > 1 && parallel_replicas_mode == Context::ParallelReplicasMode::SAMPLE_KEY && !data.supportsSampling() && settings.parallel_replica_offset > 0) { LOG_DEBUG( @@ -602,7 +603,7 @@ MergeTreeDataSelectSamplingData MergeTreeDataSelectExecutor::getSampling( } sampling.use_sampling = relative_sample_size > 0 - || (settings.parallel_replicas_count > 1 && settings.parallel_replicas_mode == ParallelReplicasMode::SAMPLE_KEY + || (settings.parallel_replicas_count > 1 && parallel_replicas_mode == Context::ParallelReplicasMode::SAMPLE_KEY && data.supportsSampling()); bool no_data = false; /// There is nothing left after sampling. diff --git a/src/Storages/SelectQueryInfo.h b/src/Storages/SelectQueryInfo.h index 7a3452f87d4..e3996950e79 100644 --- a/src/Storages/SelectQueryInfo.h +++ b/src/Storages/SelectQueryInfo.h @@ -207,6 +207,8 @@ struct SelectQueryInfo /// /// Configured in StorageDistributed::getQueryProcessingStage() ClusterPtr optimized_cluster; + /// should we use custom key with the cluster + bool use_custom_key = false; mutable ParallelReplicasReadingCoordinatorPtr coordinator; diff --git a/src/Storages/StorageDistributed.cpp b/src/Storages/StorageDistributed.cpp index b088a008b46..259caaf394a 100644 --- a/src/Storages/StorageDistributed.cpp +++ b/src/Storages/StorageDistributed.cpp @@ -264,12 +264,6 @@ size_t getClusterQueriedNodes(const Settings & settings, const ClusterPtr & clus return (num_remote_shards + num_local_shards) * settings.max_parallel_replicas; } -bool canUseCustomKey(const Settings & settings, const Cluster & cluster) -{ - return settings.max_parallel_replicas > 1 && settings.parallel_replicas_mode == ParallelReplicasMode::CUSTOM_KEY - && cluster.getShardCount() == 1 && cluster.getShardsInfo()[0].getAllNodeCount() > 1; -} - } /// For destruction of std::unique_ptr of type that is incomplete in class definition. @@ -412,36 +406,9 @@ QueryProcessingStage::Enum StorageDistributed::getQueryProcessingStage( size_t nodes = getClusterQueriedNodes(settings, cluster); - const auto use_virtual_shards = [&] - { - if (!canUseCustomKey(settings, *cluster)) - return false; - - auto distributed_table = DatabaseAndTableWithAlias( - *getTableExpression(query_info.query->as(), 0), local_context->getCurrentDatabase()); - - if (containsCustomKeyForTable(settings.parallel_replicas_custom_key, distributed_table, *local_context)) - { - LOG_INFO(log, "Found custom_key for {}", distributed_table.getQualifiedNamePrefix(false)); - return true; - } - - DatabaseAndTableWithAlias remote_table_info; - remote_table_info.database = remote_database; - remote_table_info.table = remote_table; - if (containsCustomKeyForTable(settings.parallel_replicas_custom_key, remote_table_info, *local_context)) - { - LOG_INFO(log, "Found custom_key for {}", remote_table_info.getQualifiedNamePrefix(false)); - return true; - } - - return false; - }; - - if (use_virtual_shards()) + if (query_info.use_custom_key) { LOG_INFO(log, "Single shard cluster used with custom_key, transforming replicas into virtual shards"); - query_info.cluster = cluster->getClusterWithReplicasAsShards(settings, settings.max_parallel_replicas); } else @@ -816,25 +783,9 @@ void StorageDistributed::read( auto settings = local_context->getSettingsRef(); ClusterProxy::AdditionalShardFilterGenerator additional_shard_filter_generator; - if (canUseCustomKey(settings, *getCluster())) + if (query_info.use_custom_key) { - const auto get_custom_key_ast = [&]() -> ASTPtr - { - auto distributed_table = DatabaseAndTableWithAlias( - *getTableExpression(query_info.query->as(), 0), local_context->getCurrentDatabase()); - if (auto custom_key_ast = parseCustomKeyForTable(settings.parallel_replicas_custom_key, distributed_table, *local_context)) - return custom_key_ast; - - DatabaseAndTableWithAlias remote_table_info; - remote_table_info.database = remote_database; - remote_table_info.table = remote_table; - if (auto custom_key_ast = parseCustomKeyForTable(settings.parallel_replicas_custom_key, remote_table_info, *local_context)) - return custom_key_ast; - - return nullptr; - }; - - if (auto custom_key_ast = get_custom_key_ast()) + if (auto custom_key_ast = parseCustomKeyForTable(settings.parallel_replicas_custom_key, *local_context)) { if (query_info.getCluster()->getShardCount() == 1) { diff --git a/tests/integration/test_parallel_replicas_custom_key/test.py b/tests/integration/test_parallel_replicas_custom_key/test.py index 9222f417a94..342abdcb088 100644 --- a/tests/integration/test_parallel_replicas_custom_key/test.py +++ b/tests/integration/test_parallel_replicas_custom_key/test.py @@ -44,11 +44,11 @@ def create_tables(cluster): def insert_data(cluster, row_num): create_tables(cluster) n1 = nodes[0] - n1.query(f"INSERT INTO dist_table SELECT number, number FROM numbers({row_num})") + n1.query(f"INSERT INTO dist_table SELECT number % 4, number FROM numbers({row_num})") n1.query("SYSTEM FLUSH DISTRIBUTED dist_table") -@pytest.mark.parametrize("custom_key", ["sipHash64(value)", "key"]) +@pytest.mark.parametrize("custom_key", ["sipHash64(key)", "key"]) @pytest.mark.parametrize("filter_type", ["default", "range"]) @pytest.mark.parametrize( "cluster", @@ -61,21 +61,22 @@ def test_parallel_replicas_custom_key(start_cluster, cluster, custom_key, filter row_num = 1000 insert_data(cluster, row_num) + expected_result = "" + for i in range(4): + expected_result += f"{i}\t250\n" + n1 = nodes[0] assert ( - int( - n1.query( - "SELECT count() FROM dist_table", - settings={ - "prefer_localhost_replica": 0, - "max_parallel_replicas": 4, - "parallel_replicas_mode": "custom_key", - "parallel_replicas_custom_key": f"{{'test_table': '{custom_key}'}}", - "parallel_replicas_custom_key_filter_type": filter_type, - }, - ) + n1.query( + "SELECT key, count() FROM dist_table GROUP BY key ORDER BY key", + settings={ + "prefer_localhost_replica": 0, + "max_parallel_replicas": 4, + "parallel_replicas_custom_key": custom_key, + "parallel_replicas_custom_key_filter_type": filter_type, + }, ) - == row_num + == expected_result ) if cluster == "test_multiple_shards_multiple_replicas": @@ -89,48 +90,3 @@ def test_parallel_replicas_custom_key(start_cluster, cluster, custom_key, filter assert n1.contains_in_log( "Single shard cluster used with custom_key, transforming replicas into virtual shards" ) - - -def test_custom_key_different_table_names(start_cluster): - def run(table_source, table_name_for_custom_key, should_use_virtual_shard=True): - for node in nodes: - node.rotate_logs() - - row_num = 1000 - insert_data("test_single_shard_multiple_replicas", row_num) - - n1 = nodes[0] - assert ( - int( - n1.query( - f"SELECT count() FROM {table_source}", - settings={ - "prefer_localhost_replica": 0, - "max_parallel_replicas": 4, - "parallel_replicas_mode": "custom_key", - "parallel_replicas_custom_key": f"{{'{table_name_for_custom_key}': 'sipHash64(value)'}}", - }, - ) - ) - == row_num - ) - - # we first transform all replicas into shards and then append for each shard filter - assert not should_use_virtual_shard or n1.contains_in_log( - "Single shard cluster used with custom_key, transforming replicas into virtual shards" - ) - - run("dist_table", "dist_table") - run("dist_table as d", "d") - run("dist_table as d", "dist_table") - run("dist_table as d", "test_table") - run( - "cluster('test_single_shard_multiple_replicas', default.test_table)", - "test_table", - ) - run("cluster('test_single_shard_multiple_replicas', default.test_table) as d", "d") - run( - "cluster('test_single_shard_multiple_replicas', default.test_table) as d", - "test_table", - ) - run("dist_table as d", "dist", should_use_virtual_shard=False) diff --git a/tests/queries/0_stateless/00124_shard_distributed_with_many_replicas.sql b/tests/queries/0_stateless/00124_shard_distributed_with_many_replicas.sql index 795551e5dfa..901b818cbc0 100644 --- a/tests/queries/0_stateless/00124_shard_distributed_with_many_replicas.sql +++ b/tests/queries/0_stateless/00124_shard_distributed_with_many_replicas.sql @@ -1,7 +1,7 @@ -- Tags: replica, distributed +SET allow_experimental_parallel_reading_from_replicas = 0; SET max_parallel_replicas = 2; -SET parallel_replicas_mode = 'sample_key'; DROP TABLE IF EXISTS report; set allow_deprecated_syntax_for_merge_tree=1; diff --git a/tests/queries/0_stateless/01034_prewhere_max_parallel_replicas_distributed.sql b/tests/queries/0_stateless/01034_prewhere_max_parallel_replicas_distributed.sql index 96d52d7e60e..86c84427297 100644 --- a/tests/queries/0_stateless/01034_prewhere_max_parallel_replicas_distributed.sql +++ b/tests/queries/0_stateless/01034_prewhere_max_parallel_replicas_distributed.sql @@ -1,5 +1,7 @@ -- Tags: replica, distributed +set allow_experimental_parallel_reading_from_replicas=0; + drop table if exists test_max_parallel_replicas_lr; -- If you wonder why the table is named with "_lr" suffix in this test. @@ -9,9 +11,6 @@ CREATE TABLE test_max_parallel_replicas_lr (timestamp UInt64) ENGINE = MergeTree INSERT INTO test_max_parallel_replicas_lr select number as timestamp from system.numbers limit 100; SET max_parallel_replicas = 2; -SET parallel_replicas_mode = 'sample_key'; -SET allow_experimental_parallel_reading_from_replicas = 0; - select count() FROM remote('127.0.0.{2|3}', currentDatabase(), test_max_parallel_replicas_lr) PREWHERE timestamp > 0; drop table test_max_parallel_replicas_lr; diff --git a/tests/queries/0_stateless/01034_sample_final_distributed.sql b/tests/queries/0_stateless/01034_sample_final_distributed.sql index 1b1832f7a0d..a81fef645db 100644 --- a/tests/queries/0_stateless/01034_sample_final_distributed.sql +++ b/tests/queries/0_stateless/01034_sample_final_distributed.sql @@ -1,5 +1,7 @@ -- Tags: distributed +set allow_experimental_parallel_reading_from_replicas = 0; + drop table if exists sample_final; create table sample_final (CounterID UInt32, EventDate Date, EventTime DateTime, UserID UInt64, Sign Int8) engine = CollapsingMergeTree(Sign) order by (CounterID, EventDate, intHash32(UserID), EventTime) sample by intHash32(UserID); insert into sample_final select number / (8192 * 4), toDate('2019-01-01'), toDateTime('2019-01-01 00:00:01') + number, number / (8192 * 2), number % 3 = 1 ? -1 : 1 from numbers(1000000); @@ -13,10 +15,7 @@ select count() from sample_final sample 1/2; select 'count sample final'; select count() from sample_final final sample 1/2; select 'count final max_parallel_replicas'; - -set allow_experimental_parallel_reading_from_replicas = 0; set max_parallel_replicas=2; -set parallel_replicas_mode='sample_key'; select count() from remote('127.0.0.{2|3}', currentDatabase(), sample_final) final; drop table if exists sample_final; diff --git a/tests/queries/0_stateless/01557_max_parallel_replicas_no_sample.sql b/tests/queries/0_stateless/01557_max_parallel_replicas_no_sample.sql index c44c335700f..04777f5b31c 100644 --- a/tests/queries/0_stateless/01557_max_parallel_replicas_no_sample.sql +++ b/tests/queries/0_stateless/01557_max_parallel_replicas_no_sample.sql @@ -1,10 +1,11 @@ -- Tags: replica +SET allow_experimental_parallel_reading_from_replicas=0; + DROP TABLE IF EXISTS t; CREATE TABLE t (x String) ENGINE = MergeTree ORDER BY x; INSERT INTO t VALUES ('Hello'); -SET parallel_replicas_mode = 'sample_key'; SET max_parallel_replicas = 3; SELECT * FROM remote('127.0.0.{2|3|4}', currentDatabase(), t); diff --git a/tests/queries/0_stateless/02221_parallel_replicas_bug.sh b/tests/queries/0_stateless/02221_parallel_replicas_bug.sh index 1a703b20d2a..cce32bf8272 100755 --- a/tests/queries/0_stateless/02221_parallel_replicas_bug.sh +++ b/tests/queries/0_stateless/02221_parallel_replicas_bug.sh @@ -4,4 +4,4 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) . "$CURDIR"/../shell_config.sh -${CLICKHOUSE_CLIENT} --allow_experimental_parallel_reading_from_replicas=1 --parallel_replicas_mode='read_tasks' -nm < "$CURDIR"/01099_parallel_distributed_insert_select.sql > /dev/null +${CLICKHOUSE_CLIENT} --allow_experimental_parallel_reading_from_replicas=1 -nm < "$CURDIR"/01099_parallel_distributed_insert_select.sql > /dev/null diff --git a/tests/queries/0_stateless/02226_parallel_reading_from_replicas_benchmark.sh b/tests/queries/0_stateless/02226_parallel_reading_from_replicas_benchmark.sh index 283c51cf0a2..2a163746e20 100755 --- a/tests/queries/0_stateless/02226_parallel_reading_from_replicas_benchmark.sh +++ b/tests/queries/0_stateless/02226_parallel_reading_from_replicas_benchmark.sh @@ -15,7 +15,6 @@ as select * from numbers(1); # Logical error: 'Coordinator for parallel reading from replicas is not initialized'. opts=( --allow_experimental_parallel_reading_from_replicas 1 - --parallel_replicas_mode 'read_tasks' --max_parallel_replicas 3 --iterations 1 diff --git a/tests/queries/0_stateless/02404_memory_bound_merging.sql b/tests/queries/0_stateless/02404_memory_bound_merging.sql index 6e6bc5a3b6c..b6299de9aae 100644 --- a/tests/queries/0_stateless/02404_memory_bound_merging.sql +++ b/tests/queries/0_stateless/02404_memory_bound_merging.sql @@ -1,4 +1,4 @@ --- Tags: no-parallel, long, no-random-merge-tree-settings +-- Tags: no-parallel, no-random-merge-tree-settings drop table if exists pr_t; drop table if exists dist_t_different_dbs; @@ -61,7 +61,6 @@ create table pr_t(a UInt64, b UInt64) engine=MergeTree order by a; insert into pr_t select number % 1000, number % 1000 from numbers_mt(1e6); set allow_experimental_parallel_reading_from_replicas = 1; -set parallel_replicas_mode = 'read_tasks'; set max_parallel_replicas = 3; set use_hedged_requests = 0; set cluster_for_parallel_replicas = 'test_cluster_one_shard_three_replicas_localhost'; diff --git a/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.reference b/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.reference index 21ed26b7579..9e4e24235aa 100644 --- a/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.reference +++ b/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.reference @@ -23,103 +23,150 @@ filter_type='range' max_replicas=2 prefer_localhost_replica=1 Hello filter_type='range' max_replicas=3 prefer_localhost_replica=1 Hello -query='SELECT count() FROM cluster(test_cluster_one_shard_three_replicas_localhost, currentDatabase(), 02535_custom_key)' with custom_key='cityHash64(x)' +query='SELECT y, count() FROM cluster(test_cluster_one_shard_three_replicas_localhost, currentDatabase(), 02535_custom_key) GROUP BY y ORDER BY y' with custom_key='y' filter_type='default' max_replicas=1 prefer_localhost_replica=0 -1000 +0 334 +1 333 +2 333 filter_type='default' max_replicas=2 prefer_localhost_replica=0 -1000 +0 334 +1 333 +2 333 filter_type='default' max_replicas=3 prefer_localhost_replica=0 -1000 +0 334 +1 333 +2 333 filter_type='range' max_replicas=1 prefer_localhost_replica=0 -1000 +0 334 +1 333 +2 333 filter_type='range' max_replicas=2 prefer_localhost_replica=0 -1000 +0 334 +1 333 +2 333 filter_type='range' max_replicas=3 prefer_localhost_replica=0 -1000 +0 334 +1 333 +2 333 filter_type='default' max_replicas=1 prefer_localhost_replica=1 -1000 +0 334 +1 333 +2 333 filter_type='default' max_replicas=2 prefer_localhost_replica=1 -1000 +0 334 +1 333 +2 333 filter_type='default' max_replicas=3 prefer_localhost_replica=1 -1000 +0 334 +1 333 +2 333 filter_type='range' max_replicas=1 prefer_localhost_replica=1 -1000 +0 334 +1 333 +2 333 filter_type='range' max_replicas=2 prefer_localhost_replica=1 -1000 +0 334 +1 333 +2 333 filter_type='range' max_replicas=3 prefer_localhost_replica=1 -1000 -query='SELECT count() FROM cluster(test_cluster_one_shard_three_replicas_localhost, currentDatabase(), 02535_custom_key)' with custom_key='y' +0 334 +1 333 +2 333 +query='SELECT y, count() FROM cluster(test_cluster_one_shard_three_replicas_localhost, currentDatabase(), 02535_custom_key) GROUP BY y ORDER BY y' with custom_key='cityHash64(y)' filter_type='default' max_replicas=1 prefer_localhost_replica=0 -1000 +0 334 +1 333 +2 333 filter_type='default' max_replicas=2 prefer_localhost_replica=0 -1000 +0 334 +1 333 +2 333 filter_type='default' max_replicas=3 prefer_localhost_replica=0 -1000 +0 334 +1 333 +2 333 filter_type='range' max_replicas=1 prefer_localhost_replica=0 -1000 +0 334 +1 333 +2 333 filter_type='range' max_replicas=2 prefer_localhost_replica=0 -1000 +0 334 +1 333 +2 333 filter_type='range' max_replicas=3 prefer_localhost_replica=0 -1000 +0 334 +1 333 +2 333 filter_type='default' max_replicas=1 prefer_localhost_replica=1 -1000 +0 334 +1 333 +2 333 filter_type='default' max_replicas=2 prefer_localhost_replica=1 -1000 +0 334 +1 333 +2 333 filter_type='default' max_replicas=3 prefer_localhost_replica=1 -1000 +0 334 +1 333 +2 333 filter_type='range' max_replicas=1 prefer_localhost_replica=1 -1000 +0 334 +1 333 +2 333 filter_type='range' max_replicas=2 prefer_localhost_replica=1 -1000 +0 334 +1 333 +2 333 filter_type='range' max_replicas=3 prefer_localhost_replica=1 -1000 -query='SELECT count() FROM cluster(test_cluster_one_shard_three_replicas_localhost, currentDatabase(), 02535_custom_key)' with custom_key='cityHash64(x) + y' +0 334 +1 333 +2 333 +query='SELECT y, count() FROM cluster(test_cluster_one_shard_three_replicas_localhost, currentDatabase(), 02535_custom_key) GROUP BY y ORDER BY y' with custom_key='cityHash64(y) + 1' filter_type='default' max_replicas=1 prefer_localhost_replica=0 -1000 +0 334 +1 333 +2 333 filter_type='default' max_replicas=2 prefer_localhost_replica=0 -1000 +0 334 +1 333 +2 333 filter_type='default' max_replicas=3 prefer_localhost_replica=0 -1000 +0 334 +1 333 +2 333 filter_type='range' max_replicas=1 prefer_localhost_replica=0 -1000 +0 334 +1 333 +2 333 filter_type='range' max_replicas=2 prefer_localhost_replica=0 -1000 +0 334 +1 333 +2 333 filter_type='range' max_replicas=3 prefer_localhost_replica=0 -1000 +0 334 +1 333 +2 333 filter_type='default' max_replicas=1 prefer_localhost_replica=1 -1000 +0 334 +1 333 +2 333 filter_type='default' max_replicas=2 prefer_localhost_replica=1 -1000 +0 334 +1 333 +2 333 filter_type='default' max_replicas=3 prefer_localhost_replica=1 -1000 +0 334 +1 333 +2 333 filter_type='range' max_replicas=1 prefer_localhost_replica=1 -1000 +0 334 +1 333 +2 333 filter_type='range' max_replicas=2 prefer_localhost_replica=1 -1000 +0 334 +1 333 +2 333 filter_type='range' max_replicas=3 prefer_localhost_replica=1 -1000 -query='SELECT count() FROM cluster(test_cluster_one_shard_three_replicas_localhost, currentDatabase(), 02535_custom_key)' with custom_key='cityHash64(x) + 1' -filter_type='default' max_replicas=1 prefer_localhost_replica=0 -1000 -filter_type='default' max_replicas=2 prefer_localhost_replica=0 -1000 -filter_type='default' max_replicas=3 prefer_localhost_replica=0 -1000 -filter_type='range' max_replicas=1 prefer_localhost_replica=0 -1000 -filter_type='range' max_replicas=2 prefer_localhost_replica=0 -1000 -filter_type='range' max_replicas=3 prefer_localhost_replica=0 -1000 -filter_type='default' max_replicas=1 prefer_localhost_replica=1 -1000 -filter_type='default' max_replicas=2 prefer_localhost_replica=1 -1000 -filter_type='default' max_replicas=3 prefer_localhost_replica=1 -1000 -filter_type='range' max_replicas=1 prefer_localhost_replica=1 -1000 -filter_type='range' max_replicas=2 prefer_localhost_replica=1 -1000 -filter_type='range' max_replicas=3 prefer_localhost_replica=1 -1000 +0 334 +1 333 +2 333 diff --git a/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.sh b/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.sh index b6e5c853dc2..314251be874 100755 --- a/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.sh +++ b/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.sh @@ -12,8 +12,7 @@ function run_with_custom_key { for max_replicas in {1..3}; do echo "filter_type='$filter_type' max_replicas=$max_replicas prefer_localhost_replica=$prefer_localhost_replica" query="$1 SETTINGS max_parallel_replicas=$max_replicas\ - , parallel_replicas_mode='custom_key'\ - , parallel_replicas_custom_key={'02535_custom_key': '$2'}\ + , parallel_replicas_custom_key='$2'\ , parallel_replicas_custom_key_filter_type='$filter_type'\ , prefer_localhost_replica=$prefer_localhost_replica" $CLICKHOUSE_CLIENT --query="$query" @@ -32,15 +31,14 @@ run_with_custom_key "SELECT * FROM cluster(test_cluster_one_shard_three_replicas $CLICKHOUSE_CLIENT --query="DROP TABLE 02535_custom_key" $CLICKHOUSE_CLIENT --query="CREATE TABLE 02535_custom_key (x String, y Int32) ENGINE = MergeTree ORDER BY cityHash64(x)" -$CLICKHOUSE_CLIENT --query="INSERT INTO 02535_custom_key SELECT toString(number), number FROM numbers(1000)" +$CLICKHOUSE_CLIENT --query="INSERT INTO 02535_custom_key SELECT toString(number), number % 3 FROM numbers(1000)" function run_count_with_custom_key { - run_with_custom_key "SELECT count() FROM cluster(test_cluster_one_shard_three_replicas_localhost, currentDatabase(), 02535_custom_key)" "$1" + run_with_custom_key "SELECT y, count() FROM cluster(test_cluster_one_shard_three_replicas_localhost, currentDatabase(), 02535_custom_key) GROUP BY y ORDER BY y" "$1" } -run_count_with_custom_key "cityHash64(x)" run_count_with_custom_key "y" -run_count_with_custom_key "cityHash64(x) + y" -run_count_with_custom_key "cityHash64(x) + 1" +run_count_with_custom_key "cityHash64(y)" +run_count_with_custom_key "cityHash64(y) + 1" $CLICKHOUSE_CLIENT --query="DROP TABLE 02535_custom_key" From 46667d43d88d2b30acdae30b9316df385ec20369 Mon Sep 17 00:00:00 2001 From: robot-clickhouse Date: Fri, 3 Mar 2023 15:25:25 +0000 Subject: [PATCH 496/841] Automatic style fix --- tests/integration/test_parallel_replicas_custom_key/test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/integration/test_parallel_replicas_custom_key/test.py b/tests/integration/test_parallel_replicas_custom_key/test.py index 342abdcb088..baac2661506 100644 --- a/tests/integration/test_parallel_replicas_custom_key/test.py +++ b/tests/integration/test_parallel_replicas_custom_key/test.py @@ -44,7 +44,9 @@ def create_tables(cluster): def insert_data(cluster, row_num): create_tables(cluster) n1 = nodes[0] - n1.query(f"INSERT INTO dist_table SELECT number % 4, number FROM numbers({row_num})") + n1.query( + f"INSERT INTO dist_table SELECT number % 4, number FROM numbers({row_num})" + ) n1.query("SYSTEM FLUSH DISTRIBUTED dist_table") From 0f2ae721411afc2b3150bde3a4a12c5426118f6f Mon Sep 17 00:00:00 2001 From: AVMusorin Date: Thu, 2 Mar 2023 13:51:21 +0100 Subject: [PATCH 497/841] prohibit DEFAULT/EPHEMERAL/ALIAS in KafkaEngine --- .../table-engines/integrations/kafka.md | 4 ++ .../sql-reference/statements/create/table.md | 4 ++ src/Storages/ColumnsDescription.cpp | 9 ++++ src/Storages/ColumnsDescription.h | 3 ++ src/Storages/Kafka/StorageKafka.cpp | 5 ++ tests/integration/test_storage_kafka/test.py | 50 +++++++++++++++++++ 6 files changed, 75 insertions(+) diff --git a/docs/en/engines/table-engines/integrations/kafka.md b/docs/en/engines/table-engines/integrations/kafka.md index ef422632d3e..e6134043b8e 100644 --- a/docs/en/engines/table-engines/integrations/kafka.md +++ b/docs/en/engines/table-engines/integrations/kafka.md @@ -125,6 +125,10 @@ Groups are flexible and synced on the cluster. For instance, if you have 10 topi 2. Create a table with the desired structure. 3. Create a materialized view that converts data from the engine and puts it into a previously created table. +:::info +Kafka Engine doesn't support columns with default value of type `DEFAULT/MATERIALIZED/EPHEMERAL/ALIAS`. If you need columns with any default type, they can be added at `MATERIALIZED VIEW` level. +::: + When the `MATERIALIZED VIEW` joins the engine, it starts collecting data in the background. This allows you to continually receive messages from Kafka and convert them to the required format using `SELECT`. One kafka table can have as many materialized views as you like, they do not read data from the kafka table directly, but receive new records (in blocks), this way you can write to several tables with different detail level (with grouping - aggregation and without). diff --git a/docs/en/sql-reference/statements/create/table.md b/docs/en/sql-reference/statements/create/table.md index 9e66afba613..ba495b0eed5 100644 --- a/docs/en/sql-reference/statements/create/table.md +++ b/docs/en/sql-reference/statements/create/table.md @@ -121,6 +121,10 @@ If the data type and default expression are defined explicitly, this expression Default expressions may be defined as an arbitrary expression from table constants and columns. When creating and changing the table structure, it checks that expressions do not contain loops. For INSERT, it checks that expressions are resolvable – that all columns they can be calculated from have been passed. +:::info +Kafka Engine doesn't support columns with default value of type `DEFAULT/MATERIALIZED/EPHEMERAL/ALIAS`. If you need columns with any default type, they can be added at `MATERIALIZED VIEW` level, see [Kafka Engine](../../../engines/table-engines/integrations/kafka.md#description). +::: + ### DEFAULT `DEFAULT expr` diff --git a/src/Storages/ColumnsDescription.cpp b/src/Storages/ColumnsDescription.cpp index d401840eec7..fa39e304925 100644 --- a/src/Storages/ColumnsDescription.cpp +++ b/src/Storages/ColumnsDescription.cpp @@ -383,6 +383,15 @@ NamesAndTypesList ColumnsDescription::getEphemeral() const return ret; } +NamesAndTypesList ColumnsDescription::getWithDefaultExpression() const +{ + NamesAndTypesList ret; + for (const auto & col : columns) + if (col.default_desc.expression) + ret.emplace_back(col.name, col.type); + return ret; +} + NamesAndTypesList ColumnsDescription::getAll() const { NamesAndTypesList ret; diff --git a/src/Storages/ColumnsDescription.h b/src/Storages/ColumnsDescription.h index 4f874f4b850..36109392ab6 100644 --- a/src/Storages/ColumnsDescription.h +++ b/src/Storages/ColumnsDescription.h @@ -132,6 +132,9 @@ public: NamesAndTypesList getInsertable() const; /// ordinary + ephemeral NamesAndTypesList getAliases() const; NamesAndTypesList getEphemeral() const; + // Columns with preset default expression. + // For example from `CREATE TABLE` statement + NamesAndTypesList getWithDefaultExpression() const; NamesAndTypesList getAllPhysical() const; /// ordinary + materialized. NamesAndTypesList getAll() const; /// ordinary + materialized + aliases + ephemeral /// Returns .size0/.null/... diff --git a/src/Storages/Kafka/StorageKafka.cpp b/src/Storages/Kafka/StorageKafka.cpp index 7b97273d8af..2afdc0dda8a 100644 --- a/src/Storages/Kafka/StorageKafka.cpp +++ b/src/Storages/Kafka/StorageKafka.cpp @@ -959,6 +959,11 @@ void registerStorageKafka(StorageFactory & factory) { throw Exception(ErrorCodes::BAD_ARGUMENTS, "kafka_poll_max_batch_size can not be lower than 1"); } + if (args.columns.getOrdinary() != args.columns.getAll() || !args.columns.getWithDefaultExpression().empty()) + { + throw Exception(ErrorCodes::BAD_ARGUMENTS, "KafkaEngine doesn't support DEFAULT/MATERIALIZED/EPHEMERAL/ALIAS expressions for columns. " + "See https://clickhouse.com/docs/en/engines/table-engines/integrations/kafka/#configuration"); + } return std::make_shared(args.table_id, args.getContext(), args.columns, std::move(kafka_settings), collection_name); }; diff --git a/tests/integration/test_storage_kafka/test.py b/tests/integration/test_storage_kafka/test.py index 9f617369859..51952ac1eb7 100644 --- a/tests/integration/test_storage_kafka/test.py +++ b/tests/integration/test_storage_kafka/test.py @@ -285,6 +285,56 @@ def avro_confluent_message(schema_registry_client, value): # Tests +def test_kafka_prohibited_column_types(kafka_cluster): + def assert_returned_exception(e): + assert e.value.returncode == 36 + assert ( + "KafkaEngine doesn't support DEFAULT/MATERIALIZED/EPHEMERAL/ALIAS expressions for columns." + in str(e.value) + ) + + # check column with DEFAULT expression + with pytest.raises(QueryRuntimeException) as exception: + instance.query( + """ + CREATE TABLE test.kafka (a Int, b Int DEFAULT 0) + ENGINE = Kafka('{kafka_broker}:19092', '{kafka_topic_new}', '{kafka_group_name_new}', '{kafka_format_json_each_row}', '\\n') + """ + ) + assert_returned_exception(exception) + + # check EPHEMERAL + with pytest.raises(QueryRuntimeException) as exception: + instance.query( + """ + CREATE TABLE test.kafka (a Int, b Int EPHEMERAL) + ENGINE = Kafka('{kafka_broker}:19092', '{kafka_topic_new}', '{kafka_group_name_new}', '{kafka_format_json_each_row}', '\\n') + """ + ) + assert_returned_exception(exception) + + # check ALIAS + with pytest.raises(QueryRuntimeException) as exception: + instance.query( + """ + CREATE TABLE test.kafka (a Int, b String Alias toString(a)) + ENGINE = Kafka('{kafka_broker}:19092', '{kafka_topic_new}', '{kafka_group_name_new}', '{kafka_format_json_each_row}', '\\n') + """ + ) + assert_returned_exception(exception) + + # check MATERIALIZED + # check ALIAS + with pytest.raises(QueryRuntimeException) as exception: + instance.query( + """ + CREATE TABLE test.kafka (a Int, b String MATERIALIZED toString(a)) + ENGINE = Kafka('{kafka_broker}:19092', '{kafka_topic_new}', '{kafka_group_name_new}', '{kafka_format_json_each_row}', '\\n') + """ + ) + assert_returned_exception(exception) + + def test_kafka_settings_old_syntax(kafka_cluster): assert TSV( instance.query( From 5403360924ef984e8e8d7cb517f71ab2e6ea0f5a Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Fri, 3 Mar 2023 16:25:42 +0100 Subject: [PATCH 498/841] Add real client (initiator server) address into the logs for interserver mode It is useful to understand what is going on, in some obscure cases, for instance if someone will copy configuration from the production to some docker env, and then you will see docker's private network addresses in the logs. Signed-off-by: Azat Khuzhin --- src/Server/TCPHandler.cpp | 29 +++++++++++++++++++---------- src/Server/TCPHandler.h | 2 ++ 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/src/Server/TCPHandler.cpp b/src/Server/TCPHandler.cpp index a307b472a64..f2b4284613a 100644 --- a/src/Server/TCPHandler.cpp +++ b/src/Server/TCPHandler.cpp @@ -1208,14 +1208,7 @@ void TCPHandler::receiveHello() session = makeSession(); auto & client_info = session->getClientInfo(); - - /// Extract the last entry from comma separated list of forwarded_for addresses. - /// Only the last proxy can be trusted (if any). - String forwarded_address = client_info.getLastForwardedFor(); - if (!forwarded_address.empty() && server.config().getBool("auth_use_forwarded_address", false)) - session->authenticate(user, password, Poco::Net::SocketAddress(forwarded_address, socket().peerAddress().port())); - else - session->authenticate(user, password, socket().peerAddress()); + session->authenticate(user, password, getClientAddress(client_info)); } void TCPHandler::receiveAddendum() @@ -1501,11 +1494,16 @@ void TCPHandler::receiveQuery() /// so we should not rely on that. However, in this particular case we got client_info from other clickhouse-server, so it's ok. if (client_info.initial_user.empty()) { - LOG_DEBUG(log, "User (no user, interserver mode)"); + LOG_DEBUG(log, "User (no user, interserver mode) (client: {})", getClientAddress(client_info).toString()); } else { - LOG_DEBUG(log, "User (initial, interserver mode): {}", client_info.initial_user); + LOG_DEBUG(log, "User (initial, interserver mode): {} (client: {})", client_info.initial_user, getClientAddress(client_info).toString()); + /// In case of inter-server mode authorization is done with the + /// initial address of the client, not the real address from which + /// the query was come, since the real address is the address of + /// the initiator server, while we are interested in client's + /// address. session->authenticate(AlwaysAllowCredentials{client_info.initial_user}, client_info.initial_address); } #else @@ -1991,4 +1989,15 @@ void TCPHandler::run() } } +Poco::Net::SocketAddress TCPHandler::getClientAddress(const ClientInfo & client_info) +{ + /// Extract the last entry from comma separated list of forwarded_for addresses. + /// Only the last proxy can be trusted (if any). + String forwarded_address = client_info.getLastForwardedFor(); + if (!forwarded_address.empty() && server.config().getBool("auth_use_forwarded_address", false)) + return Poco::Net::SocketAddress(forwarded_address, socket().peerAddress().port()); + else + return socket().peerAddress(); +} + } diff --git a/src/Server/TCPHandler.h b/src/Server/TCPHandler.h index f06b0b060b3..e3673b213d5 100644 --- a/src/Server/TCPHandler.h +++ b/src/Server/TCPHandler.h @@ -273,6 +273,8 @@ private: /// This function is called from different threads. void updateProgress(const Progress & value); + + Poco::Net::SocketAddress getClientAddress(const ClientInfo & client_info); }; } From b5771016f6d53f460b635f10538df60d575dac23 Mon Sep 17 00:00:00 2001 From: vdimir Date: Fri, 3 Mar 2023 15:46:41 +0000 Subject: [PATCH 499/841] Fix 01019_alter_materialized_view_consistent --- .../01019_alter_materialized_view_consistent.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/queries/0_stateless/01019_alter_materialized_view_consistent.sh b/tests/queries/0_stateless/01019_alter_materialized_view_consistent.sh index e90085f4e8e..496215ba492 100755 --- a/tests/queries/0_stateless/01019_alter_materialized_view_consistent.sh +++ b/tests/queries/0_stateless/01019_alter_materialized_view_consistent.sh @@ -50,12 +50,19 @@ function insert_thread() { function alter_thread() { trap 'exit' INT - ALTER[0]="ALTER TABLE mv MODIFY QUERY SELECT v == 1 as test, v as case FROM src_a;" - ALTER[1]="ALTER TABLE mv MODIFY QUERY SELECT v == 2 as test, v as case FROM src_b;" + # Generate random ALTERs, but make sure that at least one of them is for each source table. + for i in {0..5}; do + ALTER[$i]="ALTER TABLE mv MODIFY QUERY SELECT v == 1 as test, v as case FROM src_a;" + done + ALTER[$RANDOM % 3]="ALTER TABLE mv MODIFY QUERY SELECT v == 2 as test, v as case FROM src_b;" + ALTER[$RANDOM % 6]="ALTER TABLE mv MODIFY QUERY SELECT v == 2 as test, v as case FROM src_b;" + ALTER[$RANDOM % 6]="ALTER TABLE mv MODIFY QUERY SELECT v == 2 as test, v as case FROM src_b;" + i=0 while true; do - $CLICKHOUSE_CLIENT --allow_experimental_alter_materialized_view_structure=1 \ - -q "${ALTER[$RANDOM % 2]}" + $CLICKHOUSE_CLIENT --allow_experimental_alter_materialized_view_structure=1 -q "${ALTER[$i % 6]}" + ((i=i+1)) + sleep "0.0$RANDOM" is_done=$($CLICKHOUSE_CLIENT -q "SELECT countIf(case = 1) > 0 AND countIf(case = 2) > 0 FROM mv;") From d2dbd5f293dd52edc263adddb595b094a678a5b9 Mon Sep 17 00:00:00 2001 From: Smita Kulkarni Date: Fri, 3 Mar 2023 16:48:14 +0100 Subject: [PATCH 500/841] Updated to use tryGet instead of get for checking stage of backups/restores in concurrency check and updated tests by increasing data size to have a longer backup/restore to ensure the overlap and increased timeout correspondingly. --- src/Backups/BackupCoordinationRemote.cpp | 9 ++++-- .../test_disallow_concurrency.py | 30 +++++++++---------- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/src/Backups/BackupCoordinationRemote.cpp b/src/Backups/BackupCoordinationRemote.cpp index 8c696057755..8003eaf9f77 100644 --- a/src/Backups/BackupCoordinationRemote.cpp +++ b/src/Backups/BackupCoordinationRemote.cpp @@ -626,9 +626,12 @@ bool BackupCoordinationRemote::hasConcurrentBackups(const std::atomic &) if (existing_backup_uuid == toString(backup_uuid)) continue; - const auto status = zk->get(root_zookeeper_path + "/" + existing_backup_path + "/stage"); - if (status != Stage::COMPLETED) - return true; + String status; + if (zk->tryGet(root_zookeeper_path + "/" + existing_backup_path + "/stage", status)) + { + if (status != Stage::COMPLETED) + return true; + } } zk->createIfNotExists(backup_stage_path, ""); diff --git a/tests/integration/test_backup_restore_on_cluster/test_disallow_concurrency.py b/tests/integration/test_backup_restore_on_cluster/test_disallow_concurrency.py index 43c8adda65a..1818cd3bfc0 100644 --- a/tests/integration/test_backup_restore_on_cluster/test_disallow_concurrency.py +++ b/tests/integration/test_backup_restore_on_cluster/test_disallow_concurrency.py @@ -10,7 +10,7 @@ from helpers.test_tools import TSV, assert_eq_with_retry cluster = ClickHouseCluster(__file__) num_nodes = 10 - +ddl_task_timeout = 640 def generate_cluster_def(): path = os.path.join( @@ -85,7 +85,7 @@ def drop_after_test(): node0.query( "DROP TABLE IF EXISTS tbl ON CLUSTER 'cluster' NO DELAY", settings={ - "distributed_ddl_task_timeout": 360, + "distributed_ddl_task_timeout": ddl_task_timeout, }, ) @@ -107,7 +107,7 @@ def create_and_fill_table(): "ORDER BY x" ) for i in range(num_nodes): - nodes[i].query(f"INSERT INTO tbl SELECT number FROM numbers(40000000)") + nodes[i].query(f"INSERT INTO tbl SELECT number FROM numbers(80000000)") # All the tests have concurrent backup/restores with same backup names @@ -145,7 +145,7 @@ def test_concurrent_backups_on_same_node(): nodes[0].query( f"DROP TABLE tbl ON CLUSTER 'cluster' NO DELAY", settings={ - "distributed_ddl_task_timeout": 360, + "distributed_ddl_task_timeout": ddl_task_timeout, }, ) nodes[0].query(f"RESTORE TABLE tbl ON CLUSTER 'cluster' FROM {backup_name}") @@ -202,7 +202,7 @@ def test_concurrent_restores_on_same_node(): nodes[0].query( f"DROP TABLE tbl ON CLUSTER 'cluster' NO DELAY", settings={ - "distributed_ddl_task_timeout": 360, + "distributed_ddl_task_timeout": ddl_task_timeout, }, ) restore_id = ( @@ -226,44 +226,44 @@ def test_concurrent_restores_on_different_node(): backup_name = new_backup_name() id = ( - nodes[0] + nodes[1] .query(f"BACKUP TABLE tbl ON CLUSTER 'cluster' TO {backup_name} ASYNC") .split("\t")[0] ) assert_eq_with_retry( - nodes[0], + nodes[1], f"SELECT status FROM system.backups WHERE status == 'CREATING_BACKUP' AND id = '{id}'", "CREATING_BACKUP", ) assert_eq_with_retry( - nodes[0], + nodes[1], f"SELECT status FROM system.backups WHERE status == 'BACKUP_CREATED' AND id = '{id}'", "BACKUP_CREATED", ) - nodes[0].query( + nodes[1].query( f"DROP TABLE tbl ON CLUSTER 'cluster' NO DELAY", settings={ - "distributed_ddl_task_timeout": 360, + "distributed_ddl_task_timeout": ddl_task_timeout, }, ) restore_id = ( - nodes[0] + nodes[1] .query(f"RESTORE TABLE tbl ON CLUSTER 'cluster' FROM {backup_name} ASYNC") .split("\t")[0] ) assert_eq_with_retry( - nodes[0], - f"SELECT status FROM system.backups WHERE status == 'RESTORING'", + nodes[1], + f"SELECT status FROM system.backups WHERE status == 'RESTORING' AND id == '{restore_id}'", "RESTORING", ) - assert "Concurrent restores not supported" in nodes[1].query_and_get_error( + assert "Concurrent restores not supported" in nodes[0].query_and_get_error( f"RESTORE TABLE tbl ON CLUSTER 'cluster' FROM {backup_name}" ) assert_eq_with_retry( - nodes[0], + nodes[1], f"SELECT status FROM system.backups WHERE status == 'RESTORED' AND id == '{restore_id}'", "RESTORED", ) From 3f3091cca5536e30b955bb9d40a053ff9f9abe76 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Fri, 3 Mar 2023 19:55:44 +0400 Subject: [PATCH 501/841] Markup fixed at the page `/docs/ru/interfaces/third-party/client-libraries.md` --- docs/ru/interfaces/third-party/client-libraries.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/ru/interfaces/third-party/client-libraries.md b/docs/ru/interfaces/third-party/client-libraries.md index f55bbe2a47d..a4659e9ac4e 100644 --- a/docs/ru/interfaces/third-party/client-libraries.md +++ b/docs/ru/interfaces/third-party/client-libraries.md @@ -8,6 +8,7 @@ sidebar_label: "Клиентские библиотеки от сторонни :::danger "Disclaimer" Яндекс не поддерживает перечисленные ниже библиотеки и не проводит тщательного тестирования для проверки их качества. +::: - Python: - [infi.clickhouse_orm](https://github.com/Infinidat/infi.clickhouse_orm) From cebe323bef2720ecc39b75fac69c5d1fd60e549a Mon Sep 17 00:00:00 2001 From: robot-clickhouse Date: Fri, 3 Mar 2023 15:56:11 +0000 Subject: [PATCH 502/841] Automatic style fix --- .../test_backup_restore_on_cluster/test_disallow_concurrency.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/integration/test_backup_restore_on_cluster/test_disallow_concurrency.py b/tests/integration/test_backup_restore_on_cluster/test_disallow_concurrency.py index 1818cd3bfc0..94c6aa16497 100644 --- a/tests/integration/test_backup_restore_on_cluster/test_disallow_concurrency.py +++ b/tests/integration/test_backup_restore_on_cluster/test_disallow_concurrency.py @@ -12,6 +12,7 @@ cluster = ClickHouseCluster(__file__) num_nodes = 10 ddl_task_timeout = 640 + def generate_cluster_def(): path = os.path.join( os.path.dirname(os.path.realpath(__file__)), From a0f5756751a6cec5c03a56a5f1552113ffb57cfd Mon Sep 17 00:00:00 2001 From: vdimir Date: Fri, 3 Mar 2023 16:28:41 +0000 Subject: [PATCH 503/841] Fix DelayedJoinedBlocksWorkerTransform for grace hash join --- src/Interpreters/GraceHashJoin.cpp | 5 +--- src/Interpreters/GraceHashJoin.h | 8 ++---- .../Transforms/JoiningTransform.cpp | 27 +++++++++++++++++-- .../25340_grace_hash_limit_race.reference | 1 + .../25340_grace_hash_limit_race.sql | 4 +-- 5 files changed, 31 insertions(+), 14 deletions(-) diff --git a/src/Interpreters/GraceHashJoin.cpp b/src/Interpreters/GraceHashJoin.cpp index 1b62939ac7b..7795061072c 100644 --- a/src/Interpreters/GraceHashJoin.cpp +++ b/src/Interpreters/GraceHashJoin.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include @@ -410,8 +409,6 @@ void GraceHashJoin::initialize(const Block & sample_block) void GraceHashJoin::joinBlock(Block & block, std::shared_ptr & not_processed) { - std::shared_lock current_bucket_lock(current_bucket_mutex); - if (block.rows() == 0) { hash_join->joinBlock(block, not_processed); @@ -551,7 +548,7 @@ public: IBlocksStreamPtr GraceHashJoin::getDelayedBlocks() { - std::unique_lock current_bucket_lock(current_bucket_mutex); + std::lock_guard current_bucket_lock(current_bucket_mutex); if (current_bucket == nullptr) return nullptr; diff --git a/src/Interpreters/GraceHashJoin.h b/src/Interpreters/GraceHashJoin.h index 0d6c4741b95..cbc0f2f3266 100644 --- a/src/Interpreters/GraceHashJoin.h +++ b/src/Interpreters/GraceHashJoin.h @@ -140,12 +140,8 @@ private: FileBucket * current_bucket = nullptr; - /* Function `getDelayedBlocks` should be a critical section. - * Also some `joinBlock` calls may be in progress and we need to wait for them to finish, - * because they may may use `hash_join`, but `getDelayedBlocks` switches it to another bucket. - * So, `joinBlock` acquires shared lock and getDelayedBlocks acquires exclusive lock. - */ - mutable SharedMutex current_bucket_mutex; + /// Function `getDelayedBlocks` is a critical section, we process only one bucket at a time. + mutable std::mutex current_bucket_mutex; InMemoryJoinPtr hash_join; Block hash_join_sample_block; diff --git a/src/Processors/Transforms/JoiningTransform.cpp b/src/Processors/Transforms/JoiningTransform.cpp index c28a84e9d5d..bf80de67b42 100644 --- a/src/Processors/Transforms/JoiningTransform.cpp +++ b/src/Processors/Transforms/JoiningTransform.cpp @@ -318,12 +318,22 @@ DelayedJoinedBlocksWorkerTransform::DelayedJoinedBlocksWorkerTransform(Block out IProcessor::Status DelayedJoinedBlocksWorkerTransform::prepare() { + auto & output = outputs.front(); + auto & input = inputs.front(); + + if (output.isFinished()) + { + input.close(); + return Status::Finished; + } + + if (!output.canPush()) + return Status::PortFull; + if (inputs.size() != 1 && outputs.size() != 1) throw Exception(ErrorCodes::LOGICAL_ERROR, "DelayedJoinedBlocksWorkerTransform must have exactly one input port"); - auto & output = outputs.front(); - auto & input = inputs.front(); if (output_chunk) { @@ -397,6 +407,9 @@ DelayedJoinedBlocksTransform::DelayedJoinedBlocksTransform(size_t num_streams, J void DelayedJoinedBlocksTransform::work() { + if (finished) + return; + delayed_blocks = join->getDelayedBlocks(); finished = finished || delayed_blocks == nullptr; } @@ -406,6 +419,14 @@ IProcessor::Status DelayedJoinedBlocksTransform::prepare() { for (auto & output : outputs) { + if (output.isFinished()) + { + /// If at least one output is finished, then we have read all data from buckets. + /// Some workers can still can busy with joining the last chunk of data in memory, + /// but after that they also will finish when they will try to get next chunk. + finished = true; + continue; + } if (!output.canPush()) return Status::PortFull; } @@ -414,6 +435,8 @@ IProcessor::Status DelayedJoinedBlocksTransform::prepare() { for (auto & output : outputs) { + if (output.isFinished()) + continue; Chunk chunk; chunk.setChunkInfo(std::make_shared()); output.push(std::move(chunk)); diff --git a/tests/queries/0_stateless/25340_grace_hash_limit_race.reference b/tests/queries/0_stateless/25340_grace_hash_limit_race.reference index e69de29bb2d..83b33d238da 100644 --- a/tests/queries/0_stateless/25340_grace_hash_limit_race.reference +++ b/tests/queries/0_stateless/25340_grace_hash_limit_race.reference @@ -0,0 +1 @@ +1000 diff --git a/tests/queries/0_stateless/25340_grace_hash_limit_race.sql b/tests/queries/0_stateless/25340_grace_hash_limit_race.sql index b12dd7bdbba..55262ab2455 100644 --- a/tests/queries/0_stateless/25340_grace_hash_limit_race.sql +++ b/tests/queries/0_stateless/25340_grace_hash_limit_race.sql @@ -6,11 +6,11 @@ INSERT INTO test_grace_hash SELECT number, number % 100 = 0 FROM numbers(100000) SET join_algorithm = 'grace_hash'; -SELECT * FROM ( +SELECT count() FROM ( SELECT f.id FROM test_grace_hash AS f LEFT JOIN test_grace_hash AS d ON f.id = d.id LIMIT 1000 -) FORMAT Null; +); DROP TABLE test_grace_hash; From 9389cc29da406533ff589fde058a2f22fc1e9aa6 Mon Sep 17 00:00:00 2001 From: Anton Popov Date: Fri, 3 Mar 2023 16:48:47 +0000 Subject: [PATCH 504/841] better mutations of sparse columns --- .../Serializations/SerializationInfo.cpp | 32 +++++++++++++++++-- .../Serializations/SerializationInfo.h | 6 +++- .../Serializations/SerializationInfoTuple.cpp | 18 ++++++++--- .../Serializations/SerializationInfoTuple.h | 6 +++- src/Storages/MergeTree/MutateTask.cpp | 16 +++------- ...02662_sparse_columns_mutations_4.reference | 2 ++ .../02662_sparse_columns_mutations_4.sql | 21 ++++++++++++ ...02662_sparse_columns_mutations_5.reference | 2 ++ .../02662_sparse_columns_mutations_5.sql | 21 ++++++++++++ 9 files changed, 103 insertions(+), 21 deletions(-) create mode 100644 tests/queries/0_stateless/02662_sparse_columns_mutations_4.reference create mode 100644 tests/queries/0_stateless/02662_sparse_columns_mutations_4.sql create mode 100644 tests/queries/0_stateless/02662_sparse_columns_mutations_5.reference create mode 100644 tests/queries/0_stateless/02662_sparse_columns_mutations_5.sql diff --git a/src/DataTypes/Serializations/SerializationInfo.cpp b/src/DataTypes/Serializations/SerializationInfo.cpp index af3330d867d..4e5790ad58d 100644 --- a/src/DataTypes/Serializations/SerializationInfo.cpp +++ b/src/DataTypes/Serializations/SerializationInfo.cpp @@ -97,11 +97,37 @@ MutableSerializationInfoPtr SerializationInfo::clone() const return std::make_shared(kind, settings, data); } -std::shared_ptr SerializationInfo::createWithType(const IDataType & type, const Settings & new_settings) const +/// Returns true if all rows with default values of type 'lhs' +/// are mapped to default values of type 'rhs' after conversion. +static bool preserveDefaultsAfterConversion(const IDataType & lhs, const IDataType & rhs) +{ + if (lhs.equals(rhs)) + return true; + + bool lhs_is_columned_as_numeric = isColumnedAsNumber(lhs) || isColumnedAsDecimal(lhs); + bool rhs_is_columned_as_numeric = isColumnedAsNumber(rhs) || isColumnedAsDecimal(rhs); + + if (lhs_is_columned_as_numeric && rhs_is_columned_as_numeric) + return true; + + if (isStringOrFixedString(lhs) && isStringOrFixedString(rhs)) + return true; + + return false; +} + +std::shared_ptr SerializationInfo::createWithType( + const IDataType & old_type, + const IDataType & new_type, + const Settings & new_settings) const { auto new_kind = kind; - if (new_kind == ISerialization::Kind::SPARSE && !type.supportsSparseSerialization()) - new_kind = ISerialization::Kind::DEFAULT; + if (new_kind == ISerialization::Kind::SPARSE) + { + if (!new_type.supportsSparseSerialization() + || !preserveDefaultsAfterConversion(old_type, new_type)) + new_kind = ISerialization::Kind::DEFAULT; + } return std::make_shared(new_kind, new_settings); } diff --git a/src/DataTypes/Serializations/SerializationInfo.h b/src/DataTypes/Serializations/SerializationInfo.h index 560156980db..5b802b379e1 100644 --- a/src/DataTypes/Serializations/SerializationInfo.h +++ b/src/DataTypes/Serializations/SerializationInfo.h @@ -60,7 +60,11 @@ public: virtual void replaceData(const SerializationInfo & other); virtual std::shared_ptr clone() const; - virtual std::shared_ptr createWithType(const IDataType & type, const Settings & new_settings) const; + + virtual std::shared_ptr createWithType( + const IDataType & old_type, + const IDataType & new_type, + const Settings & new_settings) const; virtual void serialializeKindBinary(WriteBuffer & out) const; virtual void deserializeFromKindsBinary(ReadBuffer & in); diff --git a/src/DataTypes/Serializations/SerializationInfoTuple.cpp b/src/DataTypes/Serializations/SerializationInfoTuple.cpp index 5724dd7a5c3..d36668f03b6 100644 --- a/src/DataTypes/Serializations/SerializationInfoTuple.cpp +++ b/src/DataTypes/Serializations/SerializationInfoTuple.cpp @@ -97,16 +97,24 @@ MutableSerializationInfoPtr SerializationInfoTuple::clone() const return std::make_shared(std::move(elems_cloned), names, settings); } -MutableSerializationInfoPtr SerializationInfoTuple::createWithType(const IDataType & type, const Settings & new_settings) const +MutableSerializationInfoPtr SerializationInfoTuple::createWithType( + const IDataType & old_type, + const IDataType & new_type, + const Settings & new_settings) const { - const auto & type_tuple = assert_cast(type); - const auto & tuple_elements = type_tuple.getElements(); - assert(elems.size() == tuple_elements.size()); + const auto & old_tuple = assert_cast(old_type); + const auto & new_tuple = assert_cast(new_type); + + const auto & old_elements = old_tuple.getElements(); + const auto & new_elements = new_tuple.getElements(); + + assert(elems.size() == old_elements.size()); + assert(elems.size() == new_elements.size()); MutableSerializationInfos infos; infos.reserve(elems.size()); for (size_t i = 0; i < elems.size(); ++i) - infos.push_back(elems[i]->createWithType(*tuple_elements[i], new_settings)); + infos.push_back(elems[i]->createWithType(*old_elements[i], *new_elements[i], new_settings)); return std::make_shared(std::move(infos), names, new_settings); } diff --git a/src/DataTypes/Serializations/SerializationInfoTuple.h b/src/DataTypes/Serializations/SerializationInfoTuple.h index 4bcd14d34cb..a9f3bdb6c6e 100644 --- a/src/DataTypes/Serializations/SerializationInfoTuple.h +++ b/src/DataTypes/Serializations/SerializationInfoTuple.h @@ -19,7 +19,11 @@ public: void replaceData(const SerializationInfo & other) override; MutableSerializationInfoPtr clone() const override; - MutableSerializationInfoPtr createWithType(const IDataType & type, const Settings & new_settings) const override; + + MutableSerializationInfoPtr createWithType( + const IDataType & old_type, + const IDataType & new_type, + const Settings & new_settings) const override; void serialializeKindBinary(WriteBuffer & out) const override; void deserializeFromKindsBinary(ReadBuffer & in) override; diff --git a/src/Storages/MergeTree/MutateTask.cpp b/src/Storages/MergeTree/MutateTask.cpp index 1239befdd67..94715822e52 100644 --- a/src/Storages/MergeTree/MutateTask.cpp +++ b/src/Storages/MergeTree/MutateTask.cpp @@ -219,18 +219,18 @@ getColumnsForNewDataPart( continue; } - auto old_type = part_columns.getPhysical(name); + auto old_type = part_columns.getPhysical(name).type; auto new_type = updated_header.getByName(new_name).type; - if (!new_type->supportsSparseSerialization()) - continue; - SerializationInfo::Settings settings { .ratio_of_defaults_for_sparse = source_part->storage.getSettings()->ratio_of_defaults_for_sparse_serialization, .choose_kind = false }; + if (!new_type->supportsSparseSerialization() || settings.isAlwaysDefault()) + continue; + auto new_info = new_type->createSerializationInfo(settings); if (!old_info->structureEquals(*new_info)) { @@ -238,13 +238,7 @@ getColumnsForNewDataPart( continue; } - if (!old_info->hasCustomSerialization()) - { - new_serialization_infos.emplace(new_name, old_info); - continue; - } - - new_info = old_info->createWithType(*new_type, settings); + new_info = old_info->createWithType(*old_type, *new_type, settings); new_serialization_infos.emplace(new_name, std::move(new_info)); } diff --git a/tests/queries/0_stateless/02662_sparse_columns_mutations_4.reference b/tests/queries/0_stateless/02662_sparse_columns_mutations_4.reference new file mode 100644 index 00000000000..2e24ab44f9a --- /dev/null +++ b/tests/queries/0_stateless/02662_sparse_columns_mutations_4.reference @@ -0,0 +1,2 @@ +UInt64 Sparse +String Default diff --git a/tests/queries/0_stateless/02662_sparse_columns_mutations_4.sql b/tests/queries/0_stateless/02662_sparse_columns_mutations_4.sql new file mode 100644 index 00000000000..039af658489 --- /dev/null +++ b/tests/queries/0_stateless/02662_sparse_columns_mutations_4.sql @@ -0,0 +1,21 @@ +SET mutations_sync = 2; + +DROP TABLE IF EXISTS t_sparse_mutations_4; + +CREATE TABLE t_sparse_mutations_4 (k UInt64, v UInt64) +ENGINE = MergeTree ORDER BY k +SETTINGS ratio_of_defaults_for_sparse_serialization = 0.9; + +INSERT INTO t_sparse_mutations_4 SELECT number, 0 FROM numbers(10000); + +SELECT type, serialization_kind FROM system.parts_columns +WHERE database = currentDatabase() AND table = 't_sparse_mutations_4' AND column = 'v' AND active +ORDER BY name; + +ALTER TABLE t_sparse_mutations_4 MODIFY COLUMN v String; + +SELECT type, serialization_kind FROM system.parts_columns +WHERE database = currentDatabase() AND table = 't_sparse_mutations_4' AND column = 'v' AND active +ORDER BY name; + +DROP TABLE t_sparse_mutations_4; diff --git a/tests/queries/0_stateless/02662_sparse_columns_mutations_5.reference b/tests/queries/0_stateless/02662_sparse_columns_mutations_5.reference new file mode 100644 index 00000000000..698d61cbb24 --- /dev/null +++ b/tests/queries/0_stateless/02662_sparse_columns_mutations_5.reference @@ -0,0 +1,2 @@ +Tuple(UInt64, UInt64) Default ['1','2'] ['UInt64','UInt64'] ['Sparse','Sparse'] +Tuple(UInt64, String) Default ['1','2'] ['UInt64','String'] ['Sparse','Default'] diff --git a/tests/queries/0_stateless/02662_sparse_columns_mutations_5.sql b/tests/queries/0_stateless/02662_sparse_columns_mutations_5.sql new file mode 100644 index 00000000000..79bac836bdc --- /dev/null +++ b/tests/queries/0_stateless/02662_sparse_columns_mutations_5.sql @@ -0,0 +1,21 @@ +SET mutations_sync = 2; + +DROP TABLE IF EXISTS t_sparse_mutations_5; + +CREATE TABLE t_sparse_mutations_5 (k UInt64, t Tuple(UInt64, UInt64)) +ENGINE = MergeTree ORDER BY k +SETTINGS ratio_of_defaults_for_sparse_serialization = 0.9; + +INSERT INTO t_sparse_mutations_5 SELECT number, (0, 0) FROM numbers(10000); + +SELECT type, serialization_kind, subcolumns.names, subcolumns.types, subcolumns.serializations FROM system.parts_columns +WHERE database = currentDatabase() AND table = 't_sparse_mutations_5' AND column = 't' AND active +ORDER BY name; + +ALTER TABLE t_sparse_mutations_5 MODIFY COLUMN t Tuple(UInt64, String); + +SELECT type, serialization_kind, subcolumns.names, subcolumns.types, subcolumns.serializations FROM system.parts_columns +WHERE database = currentDatabase() AND table = 't_sparse_mutations_5' AND column = 't' AND active +ORDER BY name; + +DROP TABLE t_sparse_mutations_5; From e0ca12dc667ea1bff3e15cad7f38d8c47573a506 Mon Sep 17 00:00:00 2001 From: Konstantin Morozov Date: Fri, 3 Mar 2023 18:16:14 +0100 Subject: [PATCH 505/841] fix failed CI --- src/Storages/StorageMemory.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Storages/StorageMemory.cpp b/src/Storages/StorageMemory.cpp index 7fbb3e3ca78..6bdaa753ad7 100644 --- a/src/Storages/StorageMemory.cpp +++ b/src/Storages/StorageMemory.cpp @@ -193,7 +193,8 @@ private: }; -class ReadFromMemoryStorage final : public ISourceStep { +class ReadFromMemoryStorage final : public ISourceStep +{ public: ReadFromMemoryStorage(const Names & columns_to_read_, const StorageSnapshotPtr & storage_snapshot_, @@ -209,7 +210,8 @@ public: String getName() const override { return name; } - Pipe preparePipe() { + Pipe preparePipe() + { storage_snapshot->check(columns_to_read); const auto & snapshot_data = assert_cast(*storage_snapshot->data); From bbbe529e249adb3847f45571b83086fc805c6071 Mon Sep 17 00:00:00 2001 From: HarryLeeIBM Date: Fri, 3 Mar 2023 09:29:35 -0800 Subject: [PATCH 506/841] Fix farmhash for s390x --- contrib/libfarmhash/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/libfarmhash/CMakeLists.txt b/contrib/libfarmhash/CMakeLists.txt index a0533a93f17..436bc3d0108 100644 --- a/contrib/libfarmhash/CMakeLists.txt +++ b/contrib/libfarmhash/CMakeLists.txt @@ -6,6 +6,10 @@ if (MSVC) target_compile_definitions (_farmhash PRIVATE FARMHASH_NO_BUILTIN_EXPECT=1) endif () +if (ARCH_S390X) + add_compile_definitions(WORDS_BIGENDIAN) +endif () + target_include_directories (_farmhash BEFORE PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) add_library(ch_contrib::farmhash ALIAS _farmhash) From 6c929737eb4d5c62377927889988d5e5dda9ba25 Mon Sep 17 00:00:00 2001 From: Dave Lahn Date: Fri, 3 Mar 2023 18:42:10 +0000 Subject: [PATCH 507/841] Add missing policy name element The S3 cache example had a list of policies, but was missing the policy name. This caused this configuration to fail. --- docs/en/operations/storing-data.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/en/operations/storing-data.md b/docs/en/operations/storing-data.md index 203fe4e42d2..cba666f73da 100644 --- a/docs/en/operations/storing-data.md +++ b/docs/en/operations/storing-data.md @@ -135,11 +135,13 @@ Example of configuration for versions later or equal to 22.8: - -
- cache -
-
+ + +
+ cache +
+
+
``` From 7997df5739e509132a596ec4782b39e6e389970c Mon Sep 17 00:00:00 2001 From: Kseniia Sumarokova <54203879+kssenii@users.noreply.github.com> Date: Fri, 3 Mar 2023 19:50:21 +0100 Subject: [PATCH 508/841] Update storing-data.md --- docs/en/operations/storing-data.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/en/operations/storing-data.md b/docs/en/operations/storing-data.md index cba666f73da..3f9a0f67187 100644 --- a/docs/en/operations/storing-data.md +++ b/docs/en/operations/storing-data.md @@ -161,11 +161,13 @@ Example of configuration for versions earlier than 22.8:
- -
- s3 -
-
+ + +
+ s3 +
+
+
``` From 5c4da5aa4a08ea2fe1cfa279fc1ec8c4e6e7f68f Mon Sep 17 00:00:00 2001 From: Nikita Mikhaylov Date: Fri, 3 Mar 2023 20:05:42 +0100 Subject: [PATCH 509/841] Use separate thread pool for IO operations for backups (#47174) --- programs/server/Server.cpp | 6 ++++++ src/Backups/BackupIO_S3.cpp | 8 ++++---- src/Core/ServerSettings.h | 4 +++- src/IO/BackupIOThreadPool.cpp | 34 ++++++++++++++++++++++++++++++++++ src/IO/BackupsIOThreadPool.h | 20 ++++++++++++++++++++ 5 files changed, 67 insertions(+), 5 deletions(-) create mode 100644 src/IO/BackupIOThreadPool.cpp create mode 100644 src/IO/BackupsIOThreadPool.h diff --git a/programs/server/Server.cpp b/programs/server/Server.cpp index 1486a51c710..57d361886d2 100644 --- a/programs/server/Server.cpp +++ b/programs/server/Server.cpp @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -773,6 +774,11 @@ try server_settings.max_io_thread_pool_free_size, server_settings.io_thread_pool_queue_size); + BackupsIOThreadPool::initialize( + server_settings.max_backups_io_thread_pool_size, + server_settings.max_backups_io_thread_pool_free_size, + server_settings.backups_io_thread_pool_queue_size); + /// Initialize global local cache for remote filesystem. if (config().has("local_cache_for_remote_fs")) { diff --git a/src/Backups/BackupIO_S3.cpp b/src/Backups/BackupIO_S3.cpp index a303a0bc2d5..2f315e8d488 100644 --- a/src/Backups/BackupIO_S3.cpp +++ b/src/Backups/BackupIO_S3.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include #include #include @@ -167,7 +167,7 @@ void BackupWriterS3::copyFileNative(DiskPtr src_disk, const String & src_file_na std::string src_bucket = object_storage->getObjectsNamespace(); auto file_path = fs::path(s3_uri.key) / dest_file_name; copyS3File(client, src_bucket, objects[0].absolute_path, src_offset, src_size, s3_uri.bucket, file_path, request_settings, {}, - threadPoolCallbackRunner(IOThreadPool::get(), "BackupWriterS3")); + threadPoolCallbackRunner(BackupsIOThreadPool::get(), "BackupWriterS3")); } } @@ -175,7 +175,7 @@ void BackupWriterS3::copyDataToFile( const CreateReadBufferFunction & create_read_buffer, UInt64 offset, UInt64 size, const String & dest_file_name) { copyDataToS3File(create_read_buffer, offset, size, client, s3_uri.bucket, fs::path(s3_uri.key) / dest_file_name, request_settings, {}, - threadPoolCallbackRunner(IOThreadPool::get(), "BackupWriterS3")); + threadPoolCallbackRunner(BackupsIOThreadPool::get(), "BackupWriterS3")); } BackupWriterS3::~BackupWriterS3() = default; @@ -222,7 +222,7 @@ std::unique_ptr BackupWriterS3::writeFile(const String & file_name) request_settings, std::nullopt, DBMS_DEFAULT_BUFFER_SIZE, - threadPoolCallbackRunner(IOThreadPool::get(), "BackupWriterS3")); + threadPoolCallbackRunner(BackupsIOThreadPool::get(), "BackupWriterS3")); } void BackupWriterS3::removeFile(const String & file_name) diff --git a/src/Core/ServerSettings.h b/src/Core/ServerSettings.h index 1e884266c17..abc5b4d14d8 100644 --- a/src/Core/ServerSettings.h +++ b/src/Core/ServerSettings.h @@ -21,6 +21,9 @@ namespace DB M(UInt64, max_io_thread_pool_size, 100, "The maximum number of threads that would be used for IO operations", 0) \ M(UInt64, max_io_thread_pool_free_size, 0, "Max free size for IO thread pool.", 0) \ M(UInt64, io_thread_pool_queue_size, 10000, "Queue size for IO thread pool.", 0) \ + M(UInt64, max_backups_io_thread_pool_size, 1000, "The maximum number of threads that would be used for IO operations for BACKUP queries", 0) \ + M(UInt64, max_backups_io_thread_pool_free_size, 0, "Max free size for backups IO thread pool.", 0) \ + M(UInt64, backups_io_thread_pool_queue_size, 0, "Queue size for backups IO thread pool.", 0) \ M(Int32, max_connections, 1024, "Max server connections.", 0) \ M(UInt32, asynchronous_metrics_update_period_s, 1, "Period in seconds for updating asynchronous metrics.", 0) \ M(UInt32, asynchronous_heavy_metrics_update_period_s, 120, "Period in seconds for updating asynchronous metrics.", 0) \ @@ -75,4 +78,3 @@ struct ServerSettings : public BaseSettings }; } - diff --git a/src/IO/BackupIOThreadPool.cpp b/src/IO/BackupIOThreadPool.cpp new file mode 100644 index 00000000000..067fc54b1ae --- /dev/null +++ b/src/IO/BackupIOThreadPool.cpp @@ -0,0 +1,34 @@ +#include +#include "Core/Field.h" + +namespace DB +{ + +namespace ErrorCodes +{ + extern const int LOGICAL_ERROR; +} + +std::unique_ptr BackupsIOThreadPool::instance; + +void BackupsIOThreadPool::initialize(size_t max_threads, size_t max_free_threads, size_t queue_size) +{ + if (instance) + { + throw Exception(ErrorCodes::LOGICAL_ERROR, "The BackupsIO thread pool is initialized twice"); + } + + instance = std::make_unique(max_threads, max_free_threads, queue_size, false /*shutdown_on_exception*/); +} + +ThreadPool & BackupsIOThreadPool::get() +{ + if (!instance) + { + throw Exception(ErrorCodes::LOGICAL_ERROR, "The BackupsIO thread pool is not initialized"); + } + + return *instance; +} + +} diff --git a/src/IO/BackupsIOThreadPool.h b/src/IO/BackupsIOThreadPool.h new file mode 100644 index 00000000000..f5aae5741a8 --- /dev/null +++ b/src/IO/BackupsIOThreadPool.h @@ -0,0 +1,20 @@ +#pragma once + +#include + +namespace DB +{ + +/* + * ThreadPool used for the Backup IO. + */ +class BackupsIOThreadPool +{ + static std::unique_ptr instance; + +public: + static void initialize(size_t max_threads, size_t max_free_threads, size_t queue_size); + static ThreadPool & get(); +}; + +} From ea8ae193d3ae40215493e450e34dc4a188a981b4 Mon Sep 17 00:00:00 2001 From: liding1992 Date: Thu, 2 Mar 2023 17:07:10 +0800 Subject: [PATCH 510/841] Fix the problem that the 'ReplicatedMergeTree' table failed to insert two similar data when the 'part_type' is configured as 'InMemory' mode. --- src/Columns/ColumnString.h | 4 ++-- ...cated_merge_tree_insert_zookeeper_long.reference | 1 + ..._replicated_merge_tree_insert_zookeeper_long.sql | 13 +++++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 tests/queries/0_stateless/02675_replicated_merge_tree_insert_zookeeper_long.reference create mode 100644 tests/queries/0_stateless/02675_replicated_merge_tree_insert_zookeeper_long.sql diff --git a/src/Columns/ColumnString.h b/src/Columns/ColumnString.h index aa251b1fda0..fc2ac2d2385 100644 --- a/src/Columns/ColumnString.h +++ b/src/Columns/ColumnString.h @@ -187,8 +187,8 @@ public: void updateHashFast(SipHash & hash) const override { - hash.update(reinterpret_cast(offsets.data()), size() * sizeof(offsets[0])); - hash.update(reinterpret_cast(chars.data()), size() * sizeof(chars[0])); + hash.update(reinterpret_cast(offsets.data()), offsets.size() * sizeof(offsets[0])); + hash.update(reinterpret_cast(chars.data()), chars.size() * sizeof(chars[0])); } void insertRangeFrom(const IColumn & src, size_t start, size_t length) override; diff --git a/tests/queries/0_stateless/02675_replicated_merge_tree_insert_zookeeper_long.reference b/tests/queries/0_stateless/02675_replicated_merge_tree_insert_zookeeper_long.reference new file mode 100644 index 00000000000..0cfbf08886f --- /dev/null +++ b/tests/queries/0_stateless/02675_replicated_merge_tree_insert_zookeeper_long.reference @@ -0,0 +1 @@ +2 diff --git a/tests/queries/0_stateless/02675_replicated_merge_tree_insert_zookeeper_long.sql b/tests/queries/0_stateless/02675_replicated_merge_tree_insert_zookeeper_long.sql new file mode 100644 index 00000000000..df07d2e2faf --- /dev/null +++ b/tests/queries/0_stateless/02675_replicated_merge_tree_insert_zookeeper_long.sql @@ -0,0 +1,13 @@ +DROP TABLE IF EXISTS inmemory_test; + +CREATE TABLE inmemory_test (d Date, id String) +ENGINE=ReplicatedMergeTree('/clickhouse/tables/{database}/inmemory_test', 'r1') +PARTITION BY toYYYYMMDD(d) ORDER BY (d, id) +SETTINGS min_rows_for_compact_part = 10, index_granularity = 8192; + +INSERT INTO inmemory_test(d, id) VALUES('2023-01-01', 'abcdefghijklmnopqrstuvwxyz'); +INSERT INTO inmemory_test(d, id) VALUES('2023-01-01', 'a1234567890123456789012345'); + +SELECT COUNT(1) FROM inmemory_test; + +DROP TABLE inmemory_test; From b1e8b74b9cd81f6c8296b63515f91c893530b353 Mon Sep 17 00:00:00 2001 From: Sema Checherinda <104093494+CheSema@users.noreply.github.com> Date: Fri, 3 Mar 2023 15:54:41 +0100 Subject: [PATCH 511/841] Update 02675_replicated_merge_tree_insert_zookeeper_long.sql --- .../02675_replicated_merge_tree_insert_zookeeper_long.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/queries/0_stateless/02675_replicated_merge_tree_insert_zookeeper_long.sql b/tests/queries/0_stateless/02675_replicated_merge_tree_insert_zookeeper_long.sql index df07d2e2faf..194ea9bfcc1 100644 --- a/tests/queries/0_stateless/02675_replicated_merge_tree_insert_zookeeper_long.sql +++ b/tests/queries/0_stateless/02675_replicated_merge_tree_insert_zookeeper_long.sql @@ -1,3 +1,5 @@ +-- Tags: no-s3-storage + DROP TABLE IF EXISTS inmemory_test; CREATE TABLE inmemory_test (d Date, id String) From a70789c0b3ecf5384f0cd22fb214b24c9f6d5038 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 4 Mar 2023 09:15:33 +0100 Subject: [PATCH 512/841] Whitespace --- src/Backups/BackupCoordinationRemote.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Backups/BackupCoordinationRemote.cpp b/src/Backups/BackupCoordinationRemote.cpp index 8c696057755..2ca06b76dc1 100644 --- a/src/Backups/BackupCoordinationRemote.cpp +++ b/src/Backups/BackupCoordinationRemote.cpp @@ -604,7 +604,7 @@ bool BackupCoordinationRemote::hasConcurrentBackups(const std::atomic &) return false; auto zk = getZooKeeper(); - std::string backup_stage_path = zookeeper_path +"/stage"; + std::string backup_stage_path = zookeeper_path + "/stage"; if (!zk->exists(root_zookeeper_path)) zk->createAncestors(root_zookeeper_path); From 694f5eb0a830bd96a8f95e51a042607e418df330 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 4 Mar 2023 12:10:27 +0300 Subject: [PATCH 513/841] Update ProcessList.cpp --- src/Interpreters/ProcessList.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Interpreters/ProcessList.cpp b/src/Interpreters/ProcessList.cpp index 6f5553f58fd..37cb9ee599f 100644 --- a/src/Interpreters/ProcessList.cpp +++ b/src/Interpreters/ProcessList.cpp @@ -362,9 +362,11 @@ QueryStatus::QueryStatus( QueryStatus::~QueryStatus() { +#if !defined(NDEBUG) /// Check that all executors were invalidated. for (const auto & e : executors) assert(!e->executor); +#endif if (auto * memory_tracker = getMemoryTracker()) { From 7c2ccef1b9f59c64d70e5cca30deb94f0e90807b Mon Sep 17 00:00:00 2001 From: Dmitry Date: Sat, 4 Mar 2023 17:00:18 +0400 Subject: [PATCH 514/841] Markup fixed at the page `/docs/ru/sql-reference/operators/index.md` --- docs/ru/sql-reference/operators/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/ru/sql-reference/operators/index.md b/docs/ru/sql-reference/operators/index.md index 57c426cb5ad..b5fec3cb38c 100644 --- a/docs/ru/sql-reference/operators/index.md +++ b/docs/ru/sql-reference/operators/index.md @@ -263,6 +263,7 @@ SELECT toDateTime('2014-10-26 00:00:00', 'Europe/Moscow') AS time, time + 60 * 6 │ 2014-10-26 00:00:00 │ 2014-10-26 23:00:00 │ 2014-10-27 00:00:00 │ └─────────────────────┴─────────────────────┴─────────────────────┘ ``` +::: **Смотрите также** From 1d7bb4e83b405063ab74e6375aed4126a5edd690 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Sat, 4 Mar 2023 17:02:03 +0400 Subject: [PATCH 515/841] Markup fixed at the page `/docs/ru/sql-reference/operators/exists.md` --- docs/ru/sql-reference/operators/exists.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/ru/sql-reference/operators/exists.md b/docs/ru/sql-reference/operators/exists.md index 3fc085fe021..38855abbcf3 100644 --- a/docs/ru/sql-reference/operators/exists.md +++ b/docs/ru/sql-reference/operators/exists.md @@ -8,7 +8,8 @@ slug: /ru/sql-reference/operators/exists `EXISTS` может быть использован в секции [WHERE](../../sql-reference/statements/select/where.md). :::danger "Предупреждение" - Ссылки на таблицы или столбцы основного запроса не поддерживаются в подзапросе. + Ссылки на таблицы или столбцы основного запроса не поддерживаются в подзапросе. +::: **Синтаксис** From 97cbc7e7fe52cf11d6a431a9311ea94a7e1a90fe Mon Sep 17 00:00:00 2001 From: Dmitry Date: Sat, 4 Mar 2023 17:20:54 +0400 Subject: [PATCH 516/841] Typos fixed at the page `/docs/ru/sql-reference/operators/in.md` --- docs/ru/sql-reference/operators/in.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/ru/sql-reference/operators/in.md b/docs/ru/sql-reference/operators/in.md index fa679b890a7..60400fb2b31 100644 --- a/docs/ru/sql-reference/operators/in.md +++ b/docs/ru/sql-reference/operators/in.md @@ -38,9 +38,9 @@ SELECT '1' IN (SELECT 1); └──────────────────────┘ ``` -Если в качестве правой части оператора указано имя таблицы (например, `UserID IN users`), то это эквивалентно подзапросу `UserID IN (SELECT * FROM users)`. Это используется при работе с внешними данными, отправляемым вместе с запросом. Например, вместе с запросом может быть отправлено множество идентификаторов посетителей, загруженное во временную таблицу users, по которому следует выполнить фильтрацию. +Если в качестве правой части оператора указано имя таблицы (например, `UserID IN users`), то это эквивалентно подзапросу `UserID IN (SELECT * FROM users)`. Это используется при работе с внешними данными, отправляемыми вместе с запросом. Например, вместе с запросом может быть отправлено множество идентификаторов посетителей, загруженное во временную таблицу users, по которому следует выполнить фильтрацию. -Если в качестве правой части оператора, указано имя таблицы, имеющий движок Set (подготовленное множество, постоянно находящееся в оперативке), то множество не будет создаваться заново при каждом запросе. +Если в качестве правой части оператора, указано имя таблицы, имеющей движок Set (подготовленное множество, постоянно находящееся в оперативке), то множество не будет создаваться заново при каждом запросе. В подзапросе может быть указано более одного столбца для фильтрации кортежей. Пример: @@ -49,9 +49,9 @@ SELECT '1' IN (SELECT 1); SELECT (CounterID, UserID) IN (SELECT CounterID, UserID FROM ...) FROM ... ``` -Типы столбцов слева и справа оператора IN, должны совпадать. +Типы столбцов слева и справа оператора IN должны совпадать. -Оператор IN и подзапрос могут встречаться в любой части запроса, в том числе в агрегатных и лямбда функциях. +Оператор IN и подзапрос могут встречаться в любой части запроса, в том числе в агрегатных и лямбда-функциях. Пример: ``` sql @@ -122,7 +122,7 @@ FROM t_null Существует два варианта IN-ов с подзапросами (аналогично для JOIN-ов): обычный `IN` / `JOIN` и `GLOBAL IN` / `GLOBAL JOIN`. Они отличаются способом выполнения при распределённой обработке запроса. -:::note "Attention" +:::note "Внимание" Помните, что алгоритмы, описанные ниже, могут работать иначе в зависимости от [настройки](../../operations/settings/settings.md) `distributed_product_mode`. ::: При использовании обычного IN-а, запрос отправляется на удалённые серверы, и на каждом из них выполняются подзапросы в секциях `IN` / `JOIN`. @@ -228,7 +228,7 @@ SELECT CounterID, count() FROM distributed_table_1 WHERE UserID IN (SELECT UserI SETTINGS max_parallel_replicas=3 ``` -преобразуются на каждом сервере в +преобразуется на каждом сервере в ```sql SELECT CounterID, count() FROM local_table_1 WHERE UserID IN (SELECT UserID FROM local_table_2 WHERE CounterID < 100) From 849fac672ade1bfc668d785ff3875b5a9ad09156 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 4 Mar 2023 16:31:18 +0300 Subject: [PATCH 517/841] Update 02585_query_status_deadlock.sh --- tests/queries/0_stateless/02585_query_status_deadlock.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/queries/0_stateless/02585_query_status_deadlock.sh b/tests/queries/0_stateless/02585_query_status_deadlock.sh index 92dd05ef46c..227ecb1c1b2 100755 --- a/tests/queries/0_stateless/02585_query_status_deadlock.sh +++ b/tests/queries/0_stateless/02585_query_status_deadlock.sh @@ -10,6 +10,7 @@ $CLICKHOUSE_CLIENT --query_id="$QUERY_ID" -n -q " create temporary table tmp as select * from numbers(500000000); select * from remote('127.0.0.2', 'system.numbers_mt') where number in (select * from tmp);" &> /dev/null & +$CLICKHOUSE_CLIENT -q "SYSTEM FLUSH LOGS" while true do From 11930ad68503c30f8c6a91e5894c205e364b9414 Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Sat, 4 Mar 2023 17:27:47 +0000 Subject: [PATCH 518/841] Docs: Update index support of has(), hasAny(), hasAll() --- .../mergetree-family/mergetree.md | 45 ++++++++++--------- .../MergeTree/MergeTreeIndexFullText.cpp | 4 +- 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/docs/en/engines/table-engines/mergetree-family/mergetree.md b/docs/en/engines/table-engines/mergetree-family/mergetree.md index 7c0416d3ea4..fc8060077b0 100644 --- a/docs/en/engines/table-engines/mergetree-family/mergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/mergetree.md @@ -450,29 +450,32 @@ INDEX sample_index3 (lower(str), str) TYPE ngrambf_v1(3, 256, 2, 0) GRANULARITY Conditions in the `WHERE` clause contains calls of the functions that operate with columns. If the column is a part of an index, ClickHouse tries to use this index when performing the functions. ClickHouse supports different subsets of functions for using indexes. -The `set` index can be used with all functions. Function subsets for other indexes are shown in the table below. +Indexes of type `set` can be utilized by all functions. The other index types are supported as follows: | Function (operator) / Index | primary key | minmax | ngrambf_v1 | tokenbf_v1 | bloom_filter | -|------------------------------------------------------------------------------------------------------------|-------------|--------|-------------|-------------|---------------| -| [equals (=, ==)](/docs/en/sql-reference/functions/comparison-functions.md/#function-equals) | ✔ | ✔ | ✔ | ✔ | ✔ | -| [notEquals(!=, <>)](/docs/en/sql-reference/functions/comparison-functions.md/#function-notequals) | ✔ | ✔ | ✔ | ✔ | ✔ | -| [like](/docs/en/sql-reference/functions/string-search-functions.md/#function-like) | ✔ | ✔ | ✔ | ✔ | ✗ | -| [notLike](/docs/en/sql-reference/functions/string-search-functions.md/#function-notlike) | ✔ | ✔ | ✔ | ✔ | ✗ | -| [startsWith](/docs/en/sql-reference/functions/string-functions.md/#startswith) | ✔ | ✔ | ✔ | ✔ | ✗ | -| [endsWith](/docs/en/sql-reference/functions/string-functions.md/#endswith) | ✗ | ✗ | ✔ | ✔ | ✗ | -| [multiSearchAny](/docs/en/sql-reference/functions/string-search-functions.md/#function-multisearchany) | ✗ | ✗ | ✔ | ✗ | ✗ | -| [in](/docs/en/sql-reference/functions/in-functions#in-functions) | ✔ | ✔ | ✔ | ✔ | ✔ | -| [notIn](/docs/en/sql-reference/functions/in-functions#in-functions) | ✔ | ✔ | ✔ | ✔ | ✔ | -| [less (<)](/docs/en/sql-reference/functions/comparison-functions.md/#function-less) | ✔ | ✔ | ✗ | ✗ | ✗ | -| [greater (>)](/docs/en/sql-reference/functions/comparison-functions.md/#function-greater) | ✔ | ✔ | ✗ | ✗ | ✗ | -| [lessOrEquals (<=)](/docs/en/sql-reference/functions/comparison-functions.md/#function-lessorequals) | ✔ | ✔ | ✗ | ✗ | ✗ | -| [greaterOrEquals (>=)](/docs/en/sql-reference/functions/comparison-functions.md/#function-greaterorequals) | ✔ | ✔ | ✗ | ✗ | ✗ | -| [empty](/docs/en/sql-reference/functions/array-functions#function-empty) | ✔ | ✔ | ✗ | ✗ | ✗ | -| [notEmpty](/docs/en/sql-reference/functions/array-functions#function-notempty) | ✔ | ✔ | ✗ | ✗ | ✗ | -| hasToken | ✗ | ✗ | ✗ | ✔ | ✗ | -| hasTokenOrNull | ✗ | ✗ | ✗ | ✔ | ✗ | -| hasTokenCaseInsensitive | ✗ | ✗ | ✗ | ✔ | ✗ | -| hasTokenCaseInsensitiveOrNull | ✗ | ✗ | ✗ | ✔ | ✗ | +|------------------------------------------------------------------------------------------------------------|-------------|--------|------------|------------|--------------| +| [equals (=, ==)](/docs/en/sql-reference/functions/comparison-functions.md/#function-equals) | ✔ | ✔ | ✔ | ✔ | ✔ | +| [notEquals(!=, <>)](/docs/en/sql-reference/functions/comparison-functions.md/#function-notequals) | ✔ | ✔ | ✔ | ✔ | ✔ | +| [like](/docs/en/sql-reference/functions/string-search-functions.md/#function-like) | ✔ | ✔ | ✔ | ✔ | ✗ | +| [notLike](/docs/en/sql-reference/functions/string-search-functions.md/#function-notlike) | ✔ | ✔ | ✔ | ✔ | ✗ | +| [startsWith](/docs/en/sql-reference/functions/string-functions.md/#startswith) | ✔ | ✔ | ✔ | ✔ | ✗ | +| [endsWith](/docs/en/sql-reference/functions/string-functions.md/#endswith) | ✗ | ✗ | ✔ | ✔ | ✗ | +| [multiSearchAny](/docs/en/sql-reference/functions/string-search-functions.md/#function-multisearchany) | ✗ | ✗ | ✔ | ✗ | ✗ | +| [in](/docs/en/sql-reference/functions/in-functions#in-functions) | ✔ | ✔ | ✔ | ✔ | ✔ | +| [notIn](/docs/en/sql-reference/functions/in-functions#in-functions) | ✔ | ✔ | ✔ | ✔ | ✔ | +| [less (<)](/docs/en/sql-reference/functions/comparison-functions.md/#function-less) | ✔ | ✔ | ✗ | ✗ | ✗ | +| [greater (>)](/docs/en/sql-reference/functions/comparison-functions.md/#function-greater) | ✔ | ✔ | ✗ | ✗ | ✗ | +| [lessOrEquals (<=)](/docs/en/sql-reference/functions/comparison-functions.md/#function-lessorequals) | ✔ | ✔ | ✗ | ✗ | ✗ | +| [greaterOrEquals (>=)](/docs/en/sql-reference/functions/comparison-functions.md/#function-greaterorequals) | ✔ | ✔ | ✗ | ✗ | ✗ | +| [empty](/docs/en/sql-reference/functions/array-functions#function-empty) | ✔ | ✔ | ✗ | ✗ | ✗ | +| [notEmpty](/docs/en/sql-reference/functions/array-functions#function-notempty) | ✔ | ✔ | ✗ | ✗ | ✗ | +| [has](/docs/en/sql-reference/functions/array-functions#function-has) | ✗ | ✗ | ✔ | ✔ | ✔ | +| [hasAny](/docs/en/sql-reference/functions/array-functions#function-hasAny) | ✗ | ✗ | ✗ | ✗ | ✔ | +| [hasAll](/docs/en/sql-reference/functions/array-functions#function-hasAll) | ✗ | ✗ | ✗ | ✗ | ✔ | +| hasToken | ✗ | ✗ | ✗ | ✔ | ✗ | +| hasTokenOrNull | ✗ | ✗ | ✗ | ✔ | ✗ | +| hasTokenCaseInsensitive | ✗ | ✗ | ✗ | ✔ | ✗ | +| hasTokenCaseInsensitiveOrNull | ✗ | ✗ | ✗ | ✔ | ✗ | Functions with a constant argument that is less than ngram size can’t be used by `ngrambf_v1` for query optimization. diff --git a/src/Storages/MergeTree/MergeTreeIndexFullText.cpp b/src/Storages/MergeTree/MergeTreeIndexFullText.cpp index 80c4c201c3f..fa1bd36f863 100644 --- a/src/Storages/MergeTree/MergeTreeIndexFullText.cpp +++ b/src/Storages/MergeTree/MergeTreeIndexFullText.cpp @@ -748,9 +748,7 @@ void bloomFilterIndexValidator(const IndexDescription & index, bool /*attach*/) if (!data_type.isString() && !data_type.isFixedString()) throw Exception(ErrorCodes::INCORRECT_QUERY, - "Bloom filter index can be used only with `String`, `FixedString`, " - "`LowCardinality(String)`, `LowCardinality(FixedString)` column " - "or Array with `String` or `FixedString` values column."); + "Ngram and token bloom filter indexes can only be used with column types `String`, `FixedString`, `LowCardinality(String)`, `LowCardinality(FixedString)`, `Array(String)` or `Array(FixedString)`"); } if (index.type == NgramTokenExtractor::getName()) From 08ce7b031e95a6c61e965e07deb26c23174e7a95 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Sat, 4 Mar 2023 16:48:04 +0100 Subject: [PATCH 519/841] release shared ptrs after finishing a transaction --- src/Interpreters/MergeTreeTransaction.cpp | 14 ++++++++++++++ src/Interpreters/MergeTreeTransaction.h | 4 ++++ src/Interpreters/TransactionLog.cpp | 6 ++++-- src/Interpreters/TransactionLog.h | 2 +- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/Interpreters/MergeTreeTransaction.cpp b/src/Interpreters/MergeTreeTransaction.cpp index f16ece46530..50ecb061752 100644 --- a/src/Interpreters/MergeTreeTransaction.cpp +++ b/src/Interpreters/MergeTreeTransaction.cpp @@ -315,6 +315,15 @@ bool MergeTreeTransaction::rollback() noexcept return true; } +void MergeTreeTransaction::afterFinalize() +{ + std::lock_guard lock{mutex}; + /// Release shared pointers just in case + storages.clear(); + mutations.clear(); + finalized = true; +} + void MergeTreeTransaction::onException() { TransactionLog::instance().rollbackTransaction(shared_from_this()); @@ -331,6 +340,11 @@ String MergeTreeTransaction::dumpDescription() const } std::lock_guard lock{mutex}; + if (finalized) + { + res += ", cannot dump detailed description, transaction is finalized"; + return res; + } res += fmt::format(", affects {} tables:", storages.size()); diff --git a/src/Interpreters/MergeTreeTransaction.h b/src/Interpreters/MergeTreeTransaction.h index f2d8d29d244..e5a80e03e18 100644 --- a/src/Interpreters/MergeTreeTransaction.h +++ b/src/Interpreters/MergeTreeTransaction.h @@ -65,6 +65,8 @@ private: scope_guard beforeCommit(); void afterCommit(CSN assigned_csn) noexcept; bool rollback() noexcept; + void afterFinalize(); + void checkIsNotCancelled() const; mutable std::mutex mutex; @@ -74,6 +76,8 @@ private: std::atomic snapshot; const std::list::iterator snapshot_in_use_it; + bool finalized TSA_GUARDED_BY(mutex) = false; + /// Lists of changes made by transaction std::unordered_set storages TSA_GUARDED_BY(mutex); DataPartsVector creating_parts TSA_GUARDED_BY(mutex); diff --git a/src/Interpreters/TransactionLog.cpp b/src/Interpreters/TransactionLog.cpp index 827957b8749..6257e617d4a 100644 --- a/src/Interpreters/TransactionLog.cpp +++ b/src/Interpreters/TransactionLog.cpp @@ -350,7 +350,7 @@ void TransactionLog::tryFinalizeUnknownStateTransactions() /// CSNs must be already loaded, only need to check if the corresponding mapping exists. if (auto csn = getCSN(txn->tid)) { - finalizeCommittedTransaction(txn, csn, state_guard); + finalizeCommittedTransaction(txn.get(), csn, state_guard); } else { @@ -431,7 +431,7 @@ CSN TransactionLog::commitTransaction(const MergeTreeTransactionPtr & txn, bool /// The only thing we can do is to postpone its finalization. { std::lock_guard lock{running_list_mutex}; - unknown_state_list.emplace_back(txn.get(), std::move(state_guard)); + unknown_state_list.emplace_back(txn, std::move(state_guard)); } log_updated_event->set(); if (throw_on_unknown_status) @@ -487,6 +487,7 @@ CSN TransactionLog::finalizeCommittedTransaction(MergeTreeTransaction * txn, CSN } } + txn->afterFinalize(); return allocated_csn; } @@ -523,6 +524,7 @@ void TransactionLog::rollbackTransaction(const MergeTreeTransactionPtr & txn) no } tryWriteEventToSystemLog(log, global_context, TransactionsInfoLogElement::ROLLBACK, txn->tid); + txn->afterFinalize(); } MergeTreeTransactionPtr TransactionLog::tryGetRunningTransaction(const TIDHash & tid) diff --git a/src/Interpreters/TransactionLog.h b/src/Interpreters/TransactionLog.h index 64d02ad3ac5..6e8777d8519 100644 --- a/src/Interpreters/TransactionLog.h +++ b/src/Interpreters/TransactionLog.h @@ -177,7 +177,7 @@ private: /// Transactions that are currently processed TransactionsList running_list TSA_GUARDED_BY(running_list_mutex); /// If we lost connection on attempt to create csn- node then we don't know transaction's state. - using UnknownStateList = std::vector>; + using UnknownStateList = std::vector>; UnknownStateList unknown_state_list TSA_GUARDED_BY(running_list_mutex); UnknownStateList unknown_state_list_loaded TSA_GUARDED_BY(running_list_mutex); /// Ordered list of snapshots that are currently used by some transactions. Needed for background cleanup. From b8d33f4d38b688ddcaffc372a50148db84eb6d25 Mon Sep 17 00:00:00 2001 From: kssenii Date: Sun, 5 Mar 2023 13:32:04 +0100 Subject: [PATCH 520/841] Fix test --- .../test_disk_configuration/test.py | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/tests/integration/test_disk_configuration/test.py b/tests/integration/test_disk_configuration/test.py index 96cdb0213bc..6ebe994dc68 100644 --- a/tests/integration/test_disk_configuration/test.py +++ b/tests/integration/test_disk_configuration/test.py @@ -294,6 +294,12 @@ def test_merge_tree_custom_disk_setting(start_cluster): ).strip() ) + node1.query(f"DROP TABLE {TABLE_NAME} SYNC") + node1.query(f"DROP TABLE {TABLE_NAME}_2 SYNC") + node1.query(f"DROP TABLE {TABLE_NAME}_3 SYNC") + node1.query(f"DROP TABLE {TABLE_NAME}_4 SYNC") + node2.query(f"DROP TABLE {TABLE_NAME}_4 SYNC") + def test_merge_tree_nested_custom_disk_setting(start_cluster): node = cluster.instances["node1"] @@ -307,9 +313,9 @@ def test_merge_tree_nested_custom_disk_setting(start_cluster): ) node.query( - """ - DROP TABLE IF EXISTS test; - CREATE TABLE test (a Int32) + f""" + DROP TABLE IF EXISTS {TABLE_NAME} SYNC; + CREATE TABLE {TABLE_NAME} (a Int32) ENGINE = MergeTree() order by tuple() SETTINGS disk = disk( type=cache, @@ -323,13 +329,13 @@ def test_merge_tree_nested_custom_disk_setting(start_cluster): """ ) - node.query("INSERT INTO test SELECT number FROM numbers(100)") + node.query(f"INSERT INTO {TABLE_NAME} SELECT number FROM numbers(100)") node.query("SYSTEM DROP FILESYSTEM CACHE") # Check cache is filled assert 0 == int(node.query("SELECT count() FROM system.filesystem_cache")) - assert 100 == int(node.query("SELECT count() FROM test")) - node.query("SELECT * FROM test") + assert 100 == int(node.query(f"SELECT count() FROM {TABLE_NAME}")) + node.query(f"SELECT * FROM {TABLE_NAME}") assert 0 < int(node.query("SELECT count() FROM system.filesystem_cache")) # Check s3 is filled @@ -339,12 +345,13 @@ def test_merge_tree_nested_custom_disk_setting(start_cluster): node.restart_clickhouse() - assert 100 == int(node.query("SELECT count() FROM test")) + assert 100 == int(node.query(f"SELECT count() FROM {TABLE_NAME}")) expected = """ SETTINGS disk = disk(type = cache, max_size = \\'[HIDDEN]\\', path = \\'[HIDDEN]\\', disk = disk(type = s3, endpoint = \\'[HIDDEN]\\' """ - assert expected.strip() in node.query(f"SHOW CREATE TABLE test").strip() + assert expected.strip() in node.query(f"SHOW CREATE TABLE {TABLE_NAME}").strip() + node.query(f"DROP TABLE {TABLE_NAME} SYNC") def test_merge_tree_setting_override(start_cluster): @@ -419,3 +426,4 @@ def test_merge_tree_setting_override(start_cluster): assert ( len(list(minio.list_objects(cluster.minio_bucket, "data/", recursive=True))) > 0 ) + node.query(f"DROP TABLE {TABLE_NAME} SYNC") From 099013831a8f50fbb0f9cce97bde5db90251fceb Mon Sep 17 00:00:00 2001 From: Nikita Mikhaylov Date: Sun, 5 Mar 2023 16:15:03 +0100 Subject: [PATCH 521/841] Added batching for reads and retries for the most heavy function in backups (#47243) --- src/Backups/BackupCoordinationRemote.cpp | 150 +++++++++++++++++++++-- src/Backups/BackupCoordinationRemote.h | 18 ++- src/Backups/BackupsWorker.cpp | 27 +++- src/Backups/IBackupCoordination.h | 20 ++- src/Core/Settings.h | 4 + 5 files changed, 199 insertions(+), 20 deletions(-) diff --git a/src/Backups/BackupCoordinationRemote.cpp b/src/Backups/BackupCoordinationRemote.cpp index 2ca06b76dc1..029a27d2712 100644 --- a/src/Backups/BackupCoordinationRemote.cpp +++ b/src/Backups/BackupCoordinationRemote.cpp @@ -166,13 +166,25 @@ namespace } BackupCoordinationRemote::BackupCoordinationRemote( - const String & root_zookeeper_path_, const String & backup_uuid_, zkutil::GetZooKeeper get_zookeeper_, bool is_internal_) - : root_zookeeper_path(root_zookeeper_path_) + const BackupKeeperSettings & keeper_settings_, + const String & root_zookeeper_path_, + const String & backup_uuid_, + zkutil::GetZooKeeper get_zookeeper_, + bool is_internal_) + : keeper_settings(keeper_settings_) + , root_zookeeper_path(root_zookeeper_path_) , zookeeper_path(root_zookeeper_path_ + "/backup-" + backup_uuid_) , backup_uuid(backup_uuid_) , get_zookeeper(get_zookeeper_) , is_internal(is_internal_) { + zookeeper_retries_info = ZooKeeperRetriesInfo( + "BackupCoordinationRemote", + &Poco::Logger::get("BackupCoordinationRemote"), + keeper_settings.keeper_max_retries, + keeper_settings.keeper_retry_initial_backoff_ms, + keeper_settings.keeper_retry_max_backoff_ms); + createRootNodes(); stage_sync.emplace( zookeeper_path + "/stage", [this] { return getZooKeeper(); }, &Poco::Logger::get("BackupCoordination")); @@ -486,19 +498,131 @@ void BackupCoordinationRemote::updateFileInfo(const FileInfo & file_info) std::vector BackupCoordinationRemote::getAllFileInfos() const { - auto zk = getZooKeeper(); - std::vector file_infos; - Strings escaped_names = zk->getChildren(zookeeper_path + "/file_names"); - for (const String & escaped_name : escaped_names) + /// There could be tons of files inside /file_names or /file_infos + /// Thus we use MultiRead requests for processing them + /// We also use [Zoo]Keeper retries and it should be safe, because + /// this function is called at the end after the actual copying is finished. + + auto split_vector = [](Strings && vec, size_t max_batch_size) -> std::vector { - String size_and_checksum = zk->get(zookeeper_path + "/file_names/" + escaped_name); - UInt64 size = deserializeSizeAndChecksum(size_and_checksum).first; - FileInfo file_info; - if (size) /// we don't keep FileInfos for empty files - file_info = deserializeFileInfo(zk->get(zookeeper_path + "/file_infos/" + size_and_checksum)); - file_info.file_name = unescapeForFileName(escaped_name); - file_infos.emplace_back(std::move(file_info)); + std::vector result; + size_t left_border = 0; + + auto move_to_result = [&](auto && begin, auto && end) + { + auto batch = Strings(); + batch.reserve(max_batch_size); + std::move(begin, end, std::back_inserter(batch)); + result.push_back(std::move(batch)); + }; + + if (max_batch_size == 0) + { + move_to_result(vec.begin(), vec.end()); + return result; + } + + for (size_t pos = 0; pos < vec.size(); ++pos) + { + if (pos >= left_border + max_batch_size) + { + move_to_result(vec.begin() + left_border, vec.begin() + pos); + left_border = pos; + } + } + + if (vec.begin() + left_border != vec.end()) + move_to_result(vec.begin() + left_border, vec.end()); + + return result; + }; + + std::vector batched_escaped_names; + { + ZooKeeperRetriesControl retries_ctl("getAllFileInfos::getChildren", zookeeper_retries_info); + retries_ctl.retryLoop([&]() + { + auto zk = getZooKeeper(); + batched_escaped_names = split_vector(zk->getChildren(zookeeper_path + "/file_names"), keeper_settings.batch_size_for_keeper_multiread); + }); } + + std::vector file_infos; + file_infos.reserve(batched_escaped_names.size()); + + for (auto & batch : batched_escaped_names) + { + std::optional sizes_and_checksums; + { + Strings file_names_paths; + file_names_paths.reserve(batch.size()); + for (const String & escaped_name : batch) + file_names_paths.emplace_back(zookeeper_path + "/file_names/" + escaped_name); + + + ZooKeeperRetriesControl retries_ctl("getAllFileInfos::getSizesAndChecksums", zookeeper_retries_info); + retries_ctl.retryLoop([&]() + { + auto zk = getZooKeeper(); + sizes_and_checksums = zk->get(file_names_paths); + }); + } + + Strings non_empty_file_names; + Strings non_empty_file_infos_paths; + std::vector non_empty_files_infos; + + /// Process all files and understand whether there are some empty files + /// Save non empty file names for further batch processing + { + std::vector empty_files_infos; + for (size_t i = 0; i < batch.size(); ++i) + { + auto file_name = batch[i]; + if (sizes_and_checksums.value()[i].error != Coordination::Error::ZOK) + throw zkutil::KeeperException(sizes_and_checksums.value()[i].error); + auto size_and_checksum = sizes_and_checksums.value()[i].data; + auto size = deserializeSizeAndChecksum(size_and_checksum).first; + + if (size) + { + /// Save it later for batch processing + non_empty_file_names.emplace_back(file_name); + non_empty_file_infos_paths.emplace_back(zookeeper_path + "/file_infos/" + size_and_checksum); + continue; + } + + /// File is empty + FileInfo empty_file_info; + empty_file_info.file_name = unescapeForFileName(file_name); + empty_files_infos.emplace_back(std::move(empty_file_info)); + } + + std::move(empty_files_infos.begin(), empty_files_infos.end(), std::back_inserter(file_infos)); + } + + std::optional non_empty_file_infos_serialized; + ZooKeeperRetriesControl retries_ctl("getAllFileInfos::getFileInfos", zookeeper_retries_info); + retries_ctl.retryLoop([&]() + { + auto zk = getZooKeeper(); + non_empty_file_infos_serialized = zk->get(non_empty_file_infos_paths); + }); + + /// Process non empty files + for (size_t i = 0; i < non_empty_file_names.size(); ++i) + { + FileInfo file_info; + if (non_empty_file_infos_serialized.value()[i].error != Coordination::Error::ZOK) + throw zkutil::KeeperException(non_empty_file_infos_serialized.value()[i].error); + file_info = deserializeFileInfo(non_empty_file_infos_serialized.value()[i].data); + file_info.file_name = unescapeForFileName(non_empty_file_names[i]); + non_empty_files_infos.emplace_back(std::move(file_info)); + } + + std::move(non_empty_files_infos.begin(), non_empty_files_infos.end(), std::back_inserter(file_infos)); + } + return file_infos; } diff --git a/src/Backups/BackupCoordinationRemote.h b/src/Backups/BackupCoordinationRemote.h index c7260bcd237..23c76f5be47 100644 --- a/src/Backups/BackupCoordinationRemote.h +++ b/src/Backups/BackupCoordinationRemote.h @@ -4,6 +4,7 @@ #include #include #include +#include namespace DB @@ -16,7 +17,20 @@ constexpr size_t MAX_ZOOKEEPER_ATTEMPTS = 10; class BackupCoordinationRemote : public IBackupCoordination { public: - BackupCoordinationRemote(const String & root_zookeeper_path_, const String & backup_uuid_, zkutil::GetZooKeeper get_zookeeper_, bool is_internal_); + struct BackupKeeperSettings + { + UInt64 keeper_max_retries; + UInt64 keeper_retry_initial_backoff_ms; + UInt64 keeper_retry_max_backoff_ms; + UInt64 batch_size_for_keeper_multiread; + }; + + BackupCoordinationRemote( + const BackupKeeperSettings & keeper_settings_, + const String & root_zookeeper_path_, + const String & backup_uuid_, + zkutil::GetZooKeeper get_zookeeper_, + bool is_internal_); ~BackupCoordinationRemote() override; void setStage(const String & current_host, const String & new_stage, const String & message) override; @@ -68,12 +82,14 @@ private: void prepareReplicatedTables() const; void prepareReplicatedAccess() const; + const BackupKeeperSettings keeper_settings; const String root_zookeeper_path; const String zookeeper_path; const String backup_uuid; const zkutil::GetZooKeeper get_zookeeper; const bool is_internal; + mutable ZooKeeperRetriesInfo zookeeper_retries_info; std::optional stage_sync; mutable std::mutex mutex; diff --git a/src/Backups/BackupsWorker.cpp b/src/Backups/BackupsWorker.cpp index 865151cc9ec..bdcff249e7d 100644 --- a/src/Backups/BackupsWorker.cpp +++ b/src/Backups/BackupsWorker.cpp @@ -38,12 +38,14 @@ namespace Stage = BackupCoordinationStage; namespace { - std::shared_ptr makeBackupCoordination(const String & root_zk_path, const String & backup_uuid, const ContextPtr & context, bool is_internal_backup) + std::shared_ptr makeBackupCoordination(std::optional keeper_settings, String & root_zk_path, const String & backup_uuid, const ContextPtr & context, bool is_internal_backup) { if (!root_zk_path.empty()) { + if (!keeper_settings.has_value()) + throw Exception(ErrorCodes::LOGICAL_ERROR, "Parameter keeper_settings is empty while root_zk_path is not. This is bug"); auto get_zookeeper = [global_context = context->getGlobalContext()] { return global_context->getZooKeeper(); }; - return std::make_shared(root_zk_path, backup_uuid, get_zookeeper, is_internal_backup); + return std::make_shared(*keeper_settings, root_zk_path, backup_uuid, get_zookeeper, is_internal_backup); } else { @@ -169,7 +171,15 @@ OperationID BackupsWorker::startMakingBackup(const ASTPtr & query, const Context /// if it's not created here. However to handle errors better it's better to make a coordination here because this way /// if an exception will be thrown in startMakingBackup() other hosts will know about that. root_zk_path = context->getConfigRef().getString("backups.zookeeper_path", "/clickhouse/backups"); - backup_coordination = makeBackupCoordination(root_zk_path, toString(*backup_settings.backup_uuid), context, backup_settings.internal); + + BackupCoordinationRemote::BackupKeeperSettings keeper_settings + { + .keeper_max_retries = context->getSettingsRef().backup_keeper_max_retries, + .keeper_retry_initial_backoff_ms = context->getSettingsRef().backup_keeper_retry_initial_backoff_ms, + .keeper_retry_max_backoff_ms = context->getSettingsRef().backup_keeper_retry_max_backoff_ms, + .batch_size_for_keeper_multiread = context->getSettingsRef().backup_batch_size_for_keeper_multiread, + }; + backup_coordination = makeBackupCoordination(keeper_settings, root_zk_path, toString(*backup_settings.backup_uuid), context, backup_settings.internal); } auto backup_info = BackupInfo::fromAST(*backup_query->backup_name); @@ -265,10 +275,17 @@ void BackupsWorker::doBackup( context->checkAccess(required_access); String root_zk_path; - + std::optional keeper_settings; ClusterPtr cluster; if (on_cluster) { + keeper_settings = BackupCoordinationRemote::BackupKeeperSettings + { + .keeper_max_retries = context->getSettingsRef().backup_keeper_max_retries, + .keeper_retry_initial_backoff_ms = context->getSettingsRef().backup_keeper_retry_initial_backoff_ms, + .keeper_retry_max_backoff_ms = context->getSettingsRef().backup_keeper_retry_max_backoff_ms, + .batch_size_for_keeper_multiread = context->getSettingsRef().backup_batch_size_for_keeper_multiread, + }; root_zk_path = context->getConfigRef().getString("backups.zookeeper_path", "/clickhouse/backups"); backup_query->cluster = context->getMacros()->expand(backup_query->cluster); cluster = context->getCluster(backup_query->cluster); @@ -277,7 +294,7 @@ void BackupsWorker::doBackup( /// Make a backup coordination. if (!backup_coordination) - backup_coordination = makeBackupCoordination(root_zk_path, toString(*backup_settings.backup_uuid), context, backup_settings.internal); + backup_coordination = makeBackupCoordination(keeper_settings, root_zk_path, toString(*backup_settings.backup_uuid), context, backup_settings.internal); if (!allow_concurrent_backups && backup_coordination->hasConcurrentBackups(std::ref(num_active_backups))) throw Exception(ErrorCodes::CONCURRENT_ACCESS_NOT_SUPPORTED, "Concurrent backups not supported, turn on setting 'allow_concurrent_backups'"); diff --git a/src/Backups/IBackupCoordination.h b/src/Backups/IBackupCoordination.h index f5fa01a1530..b75d856b50f 100644 --- a/src/Backups/IBackupCoordination.h +++ b/src/Backups/IBackupCoordination.h @@ -1,7 +1,9 @@ #pragma once -#include #include +#include +#include +#include namespace DB @@ -85,6 +87,22 @@ public: /// Position in the archive. UInt64 pos_in_archive = static_cast(-1); + + /// Note: this format doesn't allow to parse data back + /// It is useful only for debugging purposes + [[ maybe_unused ]] String describe() + { + String result; + result += fmt::format("file_name: {};\n", file_name); + result += fmt::format("size: {};\n", size); + result += fmt::format("checksum: {};\n", getHexUIntLowercase(checksum)); + result += fmt::format("base_size: {};\n", base_size); + result += fmt::format("base_checksum: {};\n", getHexUIntLowercase(checksum)); + result += fmt::format("data_file_name: {};\n", data_file_name); + result += fmt::format("archive_suffix: {};\n", archive_suffix); + result += fmt::format("pos_in_archive: {};\n", pos_in_archive); + return result; + } }; /// Adds file information. diff --git a/src/Core/Settings.h b/src/Core/Settings.h index a65f2ccb60f..aeb6b5b1130 100644 --- a/src/Core/Settings.h +++ b/src/Core/Settings.h @@ -414,6 +414,10 @@ class IColumn; \ M(UInt64, backup_threads, 16, "The maximum number of threads to execute BACKUP requests.", 0) \ M(UInt64, restore_threads, 16, "The maximum number of threads to execute RESTORE requests.", 0) \ + M(UInt64, backup_keeper_max_retries, 20, "Max retries for keeper operations during backup", 0) \ + M(UInt64, backup_keeper_retry_initial_backoff_ms, 100, "Initial backoff timeout for [Zoo]Keeper operations during backup", 0) \ + M(UInt64, backup_keeper_retry_max_backoff_ms, 5000, "Max backoff timeout for [Zoo]Keeper operations during backup", 0) \ + M(UInt64, backup_batch_size_for_keeper_multiread, 10000, "Maximum size of batch for multiread request to [Zoo]Keeper during backup", 0) \ \ M(Bool, log_profile_events, true, "Log query performance statistics into the query_log, query_thread_log and query_views_log.", 0) \ M(Bool, log_query_settings, true, "Log query settings into the query_log.", 0) \ From c38d820d0f9b71156a01a1a20d16b8260c000c03 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Sun, 5 Mar 2023 16:45:17 +0000 Subject: [PATCH 522/841] Add 4LW for cleaning resource --- programs/keeper/CMakeLists.txt | 1 + src/Coordination/CoordinationSettings.cpp | 2 +- src/Coordination/FourLetterCommand.cpp | 9 ++++++++ src/Coordination/FourLetterCommand.h | 13 ++++++++++- src/Coordination/KeeperDispatcher.cpp | 27 ++++++++++++++++++++++- src/Coordination/KeeperDispatcher.h | 2 ++ 6 files changed, 51 insertions(+), 3 deletions(-) diff --git a/programs/keeper/CMakeLists.txt b/programs/keeper/CMakeLists.txt index 9b01e6920a4..761335fb707 100644 --- a/programs/keeper/CMakeLists.txt +++ b/programs/keeper/CMakeLists.txt @@ -128,6 +128,7 @@ if (BUILD_STANDALONE_KEEPER) ch_contrib::lz4 ch_contrib::zstd ch_contrib::cityhash + ch_contrib::jemalloc common ch_contrib::double_conversion ch_contrib::dragonbox_to_chars pcg_random diff --git a/src/Coordination/CoordinationSettings.cpp b/src/Coordination/CoordinationSettings.cpp index f5c79d3be7a..5e1ac1e2d7f 100644 --- a/src/Coordination/CoordinationSettings.cpp +++ b/src/Coordination/CoordinationSettings.cpp @@ -36,7 +36,7 @@ void CoordinationSettings::loadFromConfig(const String & config_elem, const Poco } -const String KeeperConfigurationAndSettings::DEFAULT_FOUR_LETTER_WORD_CMD = "conf,cons,crst,envi,ruok,srst,srvr,stat,wchs,dirs,mntr,isro,rcvr,apiv,csnp,lgif,rqld,rclc"; +const String KeeperConfigurationAndSettings::DEFAULT_FOUR_LETTER_WORD_CMD = "conf,cons,crst,envi,ruok,srst,srvr,stat,wchs,dirs,mntr,isro,rcvr,apiv,csnp,lgif,rqld,rclc,clrs"; KeeperConfigurationAndSettings::KeeperConfigurationAndSettings() : server_id(NOT_EXIST) diff --git a/src/Coordination/FourLetterCommand.cpp b/src/Coordination/FourLetterCommand.cpp index 6157daad1cd..8a7fdb82fb7 100644 --- a/src/Coordination/FourLetterCommand.cpp +++ b/src/Coordination/FourLetterCommand.cpp @@ -148,6 +148,9 @@ void FourLetterCommandFactory::registerCommands(KeeperDispatcher & keeper_dispat FourLetterCommandPtr recalculate_command = std::make_shared(keeper_dispatcher); factory.registerCommand(recalculate_command); + FourLetterCommandPtr clean_resources_command = std::make_shared(keeper_dispatcher); + factory.registerCommand(clean_resources_command); + factory.initializeAllowList(keeper_dispatcher); factory.setInitialize(true); } @@ -524,4 +527,10 @@ String RecalculateCommand::run() return "ok"; } +String CleanResourcesCommand::run() +{ + keeper_dispatcher.cleanResources(); + return "ok"; +} + } diff --git a/src/Coordination/FourLetterCommand.h b/src/Coordination/FourLetterCommand.h index e1fe0333081..c1a91303c05 100644 --- a/src/Coordination/FourLetterCommand.h +++ b/src/Coordination/FourLetterCommand.h @@ -377,7 +377,6 @@ struct RequestLeaderCommand : public IFourLetterCommand ~RequestLeaderCommand() override = default; }; -/// Request to be leader. struct RecalculateCommand : public IFourLetterCommand { explicit RecalculateCommand(KeeperDispatcher & keeper_dispatcher_) @@ -390,4 +389,16 @@ struct RecalculateCommand : public IFourLetterCommand ~RecalculateCommand() override = default; }; +struct CleanResourcesCommand : public IFourLetterCommand +{ + explicit CleanResourcesCommand(KeeperDispatcher & keeper_dispatcher_) + : IFourLetterCommand(keeper_dispatcher_) + { + } + + String name() override { return "clrs"; } + String run() override; + ~CleanResourcesCommand() override = default; +}; + } diff --git a/src/Coordination/KeeperDispatcher.cpp b/src/Coordination/KeeperDispatcher.cpp index 06c693e45be..a6d16334924 100644 --- a/src/Coordination/KeeperDispatcher.cpp +++ b/src/Coordination/KeeperDispatcher.cpp @@ -9,7 +9,7 @@ #include #include #include - +#include #include #include @@ -17,12 +17,26 @@ #include #include +#if USE_JEMALLOC +# include + +#define STRINGIFY_HELPER(x) #x +#define STRINGIFY(x) STRINGIFY_HELPER(x) + +#endif + namespace CurrentMetrics { extern const Metric KeeperAliveConnections; extern const Metric KeeperOutstandingRequets; } +namespace ProfileEvents +{ + extern const Event MemoryAllocatorPurge; + extern const Event MemoryAllocatorPurgeTimeMicroseconds; +} + namespace fs = std::filesystem; namespace DB @@ -753,4 +767,15 @@ Keeper4LWInfo KeeperDispatcher::getKeeper4LWInfo() const return result; } +void KeeperDispatcher::cleanResources() +{ +#if USE_JEMALLOC + LOG_TRACE(&Poco::Logger::get("KeeperDispatcher"), "Purging unused memory"); + Stopwatch watch; + mallctl("arena." STRINGIFY(MALLCTL_ARENAS_ALL) ".purge", nullptr, nullptr, nullptr, 0); + ProfileEvents::increment(ProfileEvents::MemoryAllocatorPurge); + ProfileEvents::increment(ProfileEvents::MemoryAllocatorPurgeTimeMicroseconds, watch.elapsedMicroseconds()); +#endif +} + } diff --git a/src/Coordination/KeeperDispatcher.h b/src/Coordination/KeeperDispatcher.h index 90965d0934e..9371d2fbbac 100644 --- a/src/Coordination/KeeperDispatcher.h +++ b/src/Coordination/KeeperDispatcher.h @@ -230,6 +230,8 @@ public: { return server->recalculateStorageStats(); } + + static void cleanResources(); }; } From 3a184880c6488a5027416315ec97ee06a93f1917 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Sun, 5 Mar 2023 17:18:53 +0000 Subject: [PATCH 523/841] Add test for clrs --- .../test_keeper_four_word_command/test.py | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/tests/integration/test_keeper_four_word_command/test.py b/tests/integration/test_keeper_four_word_command/test.py index 04f6800b92b..d3fcfcc3014 100644 --- a/tests/integration/test_keeper_four_word_command/test.py +++ b/tests/integration/test_keeper_four_word_command/test.py @@ -679,3 +679,41 @@ def test_cmd_rqld(started_cluster): + " does not become leader after 30s, maybe there is something wrong." ) assert keeper_utils.is_leader(cluster, node) + + +def test_cmd_clrs(started_cluster): + def get_memory_purges(): + return node1.query( + "SELECT value FROM system.events WHERE event = 'MemoryAllocatorPurge' SETTINGS system_events_show_zero_values = 1" + ) + + zk = None + try: + wait_nodes() + + zk = get_fake_zk(node1.name, timeout=30.0) + + paths = [f"/clrs_{i}" for i in range(10000)] + + # we only count the events because we cannot reliably test memory usage of Keeper + # but let's create and delete nodes so the first purge needs to release some memory + create_transaction = zk.transaction() + for path in paths: + create_transaction.create(path) + create_transaction.commit() + + delete_transaction = zk.transaction() + for path in paths: + delete_transaction.delete(path) + delete_transaction.commit() + + # repeat multiple times to make sure MemoryAllocatorPurge isn't increased because of other reasons + for _ in range(5): + prev_purges = int(get_memory_purges()) + keeper_utils.send_4lw_cmd(cluster, node1, cmd="clrs") + current_purges = int(get_memory_purges()) + assert current_purges > prev_purges + prev_purges = current_purges + + finally: + destroy_zk_client(zk) From 4f85b733f13f0b3780705e55f4e36dc910d9021b Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sun, 5 Mar 2023 20:19:33 +0300 Subject: [PATCH 524/841] Use string concatenation for XML serialization (#47251) --- src/Backups/BackupImpl.cpp | 66 ++++++++++++++++++++------------------ src/IO/Operators.h | 8 +++++ 2 files changed, 42 insertions(+), 32 deletions(-) diff --git a/src/Backups/BackupImpl.cpp b/src/Backups/BackupImpl.cpp index e4c85bec496..b5f48a1a277 100644 --- a/src/Backups/BackupImpl.cpp +++ b/src/Backups/BackupImpl.cpp @@ -16,11 +16,11 @@ #include #include #include -#include #include #include #include #include +#include #include #include #include @@ -317,11 +317,19 @@ void BackupImpl::writeBackupMetadata() { assert(!is_internal_backup); - Poco::AutoPtr config{new Poco::Util::XMLConfiguration()}; - config->setInt("version", CURRENT_BACKUP_VERSION); - config->setBool("deduplicate_files", deduplicate_files); - config->setString("timestamp", toString(LocalDateTime{timestamp})); - config->setString("uuid", toString(*uuid)); + checkLockFile(true); + + std::unique_ptr out; + if (use_archives) + out = getArchiveWriter("")->writeFile(".backup"); + else + out = writer->writeFile(".backup"); + + *out << ""; + *out << "" << CURRENT_BACKUP_VERSION << ""; + *out << "" << deduplicate_files << ""; + *out << "" << toString(LocalDateTime{timestamp}) << ""; + *out << "" << toString(*uuid) << ""; auto all_file_infos = coordination->getAllFileInfos(); @@ -336,8 +344,8 @@ void BackupImpl::writeBackupMetadata() if (base_backup_in_use) { - config->setString("base_backup", base_backup_info->toString()); - config->setString("base_backup_uuid", toString(*base_backup_uuid)); + *out << "" << xml << base_backup_info->toString() << ""; + *out << "" << toString(*base_backup_uuid) << ""; } } @@ -346,31 +354,32 @@ void BackupImpl::writeBackupMetadata() num_entries = 0; size_of_entries = 0; - for (size_t i = 0; i != all_file_infos.size(); ++i) + *out << ""; + for (const auto & info : all_file_infos) { - const auto & info = all_file_infos[i]; - String prefix = i ? "contents.file[" + std::to_string(i) + "]." : "contents.file."; - config->setString(prefix + "name", info.file_name); - config->setUInt64(prefix + "size", info.size); + *out << ""; + + *out << "" << xml << info.file_name << ""; + *out << "" << info.size << ""; if (info.size) { - config->setString(prefix + "checksum", hexChecksum(info.checksum)); + *out << "" << hexChecksum(info.checksum) << ""; if (info.base_size) { - config->setBool(prefix + "use_base", true); + *out << "true"; if (info.base_size != info.size) { - config->setUInt64(prefix + "base_size", info.base_size); - config->setString(prefix + "base_checksum", hexChecksum(info.base_checksum)); + *out << "" << info.base_size << ""; + *out << "" << hexChecksum(info.base_checksum) << ""; } } if (!info.data_file_name.empty() && (info.data_file_name != info.file_name)) - config->setString(prefix + "data_file", info.data_file_name); + *out << "" << xml << info.data_file_name << ""; if (!info.archive_suffix.empty()) - config->setString(prefix + "archive_suffix", info.archive_suffix); + *out << "" << xml << info.archive_suffix << ""; if (info.pos_in_archive != static_cast(-1)) - config->setUInt64(prefix + "pos_in_archive", info.pos_in_archive); + *out << "" << info.pos_in_archive << ""; } total_size += info.size; @@ -380,23 +389,16 @@ void BackupImpl::writeBackupMetadata() ++num_entries; size_of_entries += info.size - info.base_size; } + + *out << ""; } + *out << ""; - std::ostringstream stream; // STYLE_CHECK_ALLOW_STD_STRING_STREAM - config->save(stream); - String str = stream.str(); + *out << ""; - checkLockFile(true); - - std::unique_ptr out; - if (use_archives) - out = getArchiveWriter("")->writeFile(".backup"); - else - out = writer->writeFile(".backup"); - out->write(str.data(), str.size()); out->finalize(); - uncompressed_size = size_of_entries + str.size(); + uncompressed_size = size_of_entries + out->count(); } diff --git a/src/IO/Operators.h b/src/IO/Operators.h index 06ff20c43e8..185745e8415 100644 --- a/src/IO/Operators.h +++ b/src/IO/Operators.h @@ -30,11 +30,13 @@ enum EscapeManip { escape }; /// For strings - escape special c enum QuoteManip { quote }; /// For strings, dates, datetimes - enclose in single quotes with escaping. In the rest, as usual. enum DoubleQuoteManip { double_quote }; /// For strings, dates, datetimes - enclose in double quotes with escaping. In the rest, as usual. enum BinaryManip { binary }; /// Output in binary format. +enum XMLManip { xml }; /// Output strings with XML escaping. struct EscapeManipWriteBuffer : std::reference_wrapper { using std::reference_wrapper::reference_wrapper; }; struct QuoteManipWriteBuffer : std::reference_wrapper { using std::reference_wrapper::reference_wrapper; }; struct DoubleQuoteManipWriteBuffer : std::reference_wrapper { using std::reference_wrapper::reference_wrapper; }; struct BinaryManipWriteBuffer : std::reference_wrapper { using std::reference_wrapper::reference_wrapper; }; +struct XMLManipWriteBuffer : std::reference_wrapper { using std::reference_wrapper::reference_wrapper; }; struct EscapeManipReadBuffer : std::reference_wrapper { using std::reference_wrapper::reference_wrapper; }; struct QuoteManipReadBuffer : std::reference_wrapper { using std::reference_wrapper::reference_wrapper; }; @@ -48,11 +50,13 @@ inline EscapeManipWriteBuffer operator<< (WriteBuffer & buf, EscapeManip) inline QuoteManipWriteBuffer operator<< (WriteBuffer & buf, QuoteManip) { return buf; } inline DoubleQuoteManipWriteBuffer operator<< (WriteBuffer & buf, DoubleQuoteManip) { return buf; } inline BinaryManipWriteBuffer operator<< (WriteBuffer & buf, BinaryManip) { return buf; } +inline XMLManipWriteBuffer operator<< (WriteBuffer & buf, XMLManip) { return buf; } template WriteBuffer & operator<< (EscapeManipWriteBuffer buf, const T & x) { writeText(x, buf.get()); return buf; } template WriteBuffer & operator<< (QuoteManipWriteBuffer buf, const T & x) { writeQuoted(x, buf.get()); return buf; } template WriteBuffer & operator<< (DoubleQuoteManipWriteBuffer buf, const T & x) { writeDoubleQuoted(x, buf.get()); return buf; } template WriteBuffer & operator<< (BinaryManipWriteBuffer buf, const T & x) { writeBinary(x, buf.get()); return buf; } +template WriteBuffer & operator<< (XMLManipWriteBuffer buf, const T & x) { writeText(x, buf.get()); return buf; } inline WriteBuffer & operator<< (EscapeManipWriteBuffer buf, const String & x) { writeEscapedString(x, buf); return buf; } inline WriteBuffer & operator<< (EscapeManipWriteBuffer buf, std::string_view x) { writeEscapedString(x, buf); return buf; } @@ -63,6 +67,10 @@ inline WriteBuffer & operator<< (QuoteManipWriteBuffer buf, const char * x inline WriteBuffer & operator<< (DoubleQuoteManipWriteBuffer buf, const char * x) { writeAnyQuotedString<'"'>(x, x + strlen(x), buf.get()); return buf; } inline WriteBuffer & operator<< (BinaryManipWriteBuffer buf, const char * x) { writeStringBinary(x, buf.get()); return buf; } +inline WriteBuffer & operator<< (XMLManipWriteBuffer buf, std::string_view x) { writeXMLStringForTextElementOrAttributeValue(x, buf); return buf; } +inline WriteBuffer & operator<< (XMLManipWriteBuffer buf, StringRef x) { writeXMLStringForTextElementOrAttributeValue(x.toView(), buf); return buf; } +inline WriteBuffer & operator<< (XMLManipWriteBuffer buf, const char * x) { writeXMLStringForTextElementOrAttributeValue(std::string_view(x), buf); return buf; } + /// The manipulator calls the WriteBuffer method `next` - this makes the buffer reset. For nested buffers, the reset is not recursive. enum FlushManip { flush }; From 2aecaa7e46ef7890224aafbfa657f1ff9ca9d479 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Mon, 6 Mar 2023 10:51:51 +0400 Subject: [PATCH 525/841] Markup fixed at the page `/docs/ru/operations/server-configuration-parameters/settings.md` --- docs/ru/operations/server-configuration-parameters/settings.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/ru/operations/server-configuration-parameters/settings.md b/docs/ru/operations/server-configuration-parameters/settings.md index bffa3c39a60..e29b9def9d4 100644 --- a/docs/ru/operations/server-configuration-parameters/settings.md +++ b/docs/ru/operations/server-configuration-parameters/settings.md @@ -26,6 +26,7 @@ ClickHouse перезагружает встроенные словари с з :::danger "Внимание" Лучше не использовать, если вы только начали работать с ClickHouse. +::: Общий вид конфигурации: @@ -1064,6 +1065,7 @@ ClickHouse использует потоки из глобального пул :::danger "Обратите внимание" Завершающий слеш обязателен. +::: **Пример** @@ -1330,6 +1332,7 @@ TCP порт для защищённого обмена данными с кли :::danger "Обратите внимание" Завершающий слеш обязателен. +::: **Пример** From 7dc685f74c4f209c4856f369f3f73668ab33760b Mon Sep 17 00:00:00 2001 From: Dmitry Date: Mon, 6 Mar 2023 11:00:27 +0400 Subject: [PATCH 526/841] Markup fixed at the page `/docs/ru/operations/opentelemetry.md` --- docs/ru/operations/opentelemetry.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/ru/operations/opentelemetry.md b/docs/ru/operations/opentelemetry.md index b6c5e89bcc6..4e127e9e0f0 100644 --- a/docs/ru/operations/opentelemetry.md +++ b/docs/ru/operations/opentelemetry.md @@ -10,6 +10,7 @@ ClickHouse поддерживает [OpenTelemetry](https://opentelemetry.io/) :::danger "Предупреждение" Поддержка стандарта экспериментальная и будет со временем меняться. +::: ## Обеспечение поддержки контекста трассировки в ClickHouse From 4d75b0a0454174195f97ad0ac61db9eafee4c94e Mon Sep 17 00:00:00 2001 From: Dmitry Date: Mon, 6 Mar 2023 11:05:07 +0400 Subject: [PATCH 527/841] Typos at the page `/docs/ru/operations/clickhouse-keeper.md` --- docs/ru/operations/clickhouse-keeper.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/ru/operations/clickhouse-keeper.md b/docs/ru/operations/clickhouse-keeper.md index 67be83e13b2..3a931529b32 100644 --- a/docs/ru/operations/clickhouse-keeper.md +++ b/docs/ru/operations/clickhouse-keeper.md @@ -325,21 +325,21 @@ clickhouse-keeper-converter --zookeeper-logs-dir /var/lib/zookeeper/version-2 -- Например, для кластера из 3 нод, алгоритм кворума продолжает работать при отказе не более чем одной ноды. Конфигурация кластера может быть изменена динамически с некоторыми ограничениями. -Переконфигурация также использует Raft, поэтому для добавление новой ноды кластера или исключения старой ноды из него требуется достижения кворума в рамках текущей конфигурации кластера. +Переконфигурация также использует Raft, поэтому для добавления новой ноды кластера или исключения старой ноды требуется достижение кворума в рамках текущей конфигурации кластера. Если в вашем кластере произошел отказ большего числа нод, чем допускает Raft для вашей текущей конфигурации и у вас нет возможности восстановить их работоспособность, Raft перестанет работать и не позволит изменить конфигурацию стандартным механизмом. -Тем не менее ClickHousr Keeper имеет возможность запуститься в режиме восстановления, который позволяет переконфигурировать класте используя только одну ноду кластера. +Тем не менее ClickHouse Keeper имеет возможность запуститься в режиме восстановления, который позволяет переконфигурировать кластер используя только одну ноду кластера. Этот механизм может использоваться только как крайняя мера, когда вы не можете восстановить существующие ноды кластера или запустить новый сервер с тем же идентификатором. Важно: - Удостоверьтесь, что отказавшие ноды не смогут в дальнейшем подключиться к кластеру в будущем. -- Не запускайте новые ноды, пока не завешите процедуру ниже. +- Не запускайте новые ноды, пока не завершите процедуру ниже. После того, как выполнили действия выше выполните следующие шаги. -1. Выберете одну ноду Keeper, которая станет новым лидером. Учтите, что данные которые с этой ноды будут испольщзованы всем кластером, поэтому рекомендуется выбрать ноду с наиболее актуальным состоянием. +1. Выберете одну ноду Keeper, которая станет новым лидером. Учтите, что данные с этой ноды будут использованы всем кластером, поэтому рекомендуется выбрать ноду с наиболее актуальным состоянием. 2. Перед дальнейшими действиям сделайте резервную копию данных из директорий `log_storage_path` и `snapshot_storage_path`. 3. Измените настройки на всех нодах кластера, которые вы собираетесь использовать. -4. Отправьте команду `rcvr` на ноду, которую вы выбрали или остановите ее и запустите заново с аргументом `--force-recovery`. Это переведет ноду в режим восстановления. +4. Отправьте команду `rcvr` на ноду, которую вы выбрали, или остановите ее и запустите заново с аргументом `--force-recovery`. Это переведет ноду в режим восстановления. 5. Запускайте остальные ноды кластера по одной и проверяйте, что команда `mntr` возвращает `follower` в выводе состояния `zk_server_state` перед тем, как запустить следующую ноду. -6. Пока нода работает в режиме восстановления, лидер будет возвращать ошибку на запрос `mntr` пока кворум не будет достигнут с помощью новых нод. Любые запросы от клиентов и постедователей будут возвращать ошибку. +6. Пока нода работает в режиме восстановления, лидер будет возвращать ошибку на запрос `mntr` пока кворум не будет достигнут с помощью новых нод. Любые запросы от клиентов и последователей будут возвращать ошибку. 7. После достижения кворума лидер перейдет в нормальный режим работы и станет обрабатывать все запросы через Raft. Удостоверьтесь, что запрос `mntr` возвращает `leader` в выводе состояния `zk_server_state`. From b5bb2eb3dc17b94c83d6f1e57078526523c12de8 Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Mon, 6 Mar 2023 07:20:05 +0000 Subject: [PATCH 528/841] Add new grant CREATE ARBITRARY TEMPORARY TABLE --- src/Access/Common/AccessType.h | 2 ++ src/Access/ContextAccess.cpp | 5 +++++ src/Interpreters/InterpreterCreateQuery.cpp | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/src/Access/Common/AccessType.h b/src/Access/Common/AccessType.h index 497327c1bad..7f00e332183 100644 --- a/src/Access/Common/AccessType.h +++ b/src/Access/Common/AccessType.h @@ -88,6 +88,8 @@ enum class AccessType M(CREATE_DICTIONARY, "", DICTIONARY, CREATE) /* allows to execute {CREATE|ATTACH} DICTIONARY */\ M(CREATE_TEMPORARY_TABLE, "", GLOBAL, CREATE) /* allows to create and manipulate temporary tables; implicitly enabled by the grant CREATE_TABLE on any table */ \ + M(CREATE_ARBITRARY_TEMPORARY_TABLE, "", GLOBAL, CREATE) /* allows to create and manipulate temporary tables + with arbitrary table engine */\ M(CREATE_FUNCTION, "", GLOBAL, CREATE) /* allows to execute CREATE FUNCTION */ \ M(CREATE_NAMED_COLLECTION, "", GLOBAL, CREATE) /* allows to execute CREATE NAMED COLLECTION */ \ M(CREATE, "", GROUP, ALL) /* allows to execute {CREATE|ATTACH} */ \ diff --git a/src/Access/ContextAccess.cpp b/src/Access/ContextAccess.cpp index fbaacb2263b..cc51183c51f 100644 --- a/src/Access/ContextAccess.cpp +++ b/src/Access/ContextAccess.cpp @@ -81,6 +81,11 @@ namespace if ((level == 0) && (max_flags_with_children & create_table)) res |= create_temporary_table; + /// CREATE TABLE (on any database/table) => CREATE_ARBITRARY_TEMPORARY_TABLE (global) + static const AccessFlags create_arbitrary_temporary_table = AccessType::CREATE_ARBITRARY_TEMPORARY_TABLE; + if ((level == 0) && (max_flags_with_children & create_table)) + res |= create_arbitrary_temporary_table; + /// ALTER_TTL => ALTER_MATERIALIZE_TTL static const AccessFlags alter_ttl = AccessType::ALTER_TTL; static const AccessFlags alter_materialize_ttl = AccessType::ALTER_MATERIALIZE_TTL; diff --git a/src/Interpreters/InterpreterCreateQuery.cpp b/src/Interpreters/InterpreterCreateQuery.cpp index 47c8816e2c0..7bf8b9514c8 100644 --- a/src/Interpreters/InterpreterCreateQuery.cpp +++ b/src/Interpreters/InterpreterCreateQuery.cpp @@ -1709,7 +1709,11 @@ AccessRightsElements InterpreterCreateQuery::getRequiredAccess() const else { if (create.temporary) + { required_access.emplace_back(AccessType::CREATE_TEMPORARY_TABLE); + if (create.storage && create.storage->engine && create.storage->engine->name != "Memory") + required_access.emplace_back(AccessType::CREATE_ARBITRARY_TEMPORARY_TABLE); + } else { if (create.replace_table) From c1d6204a8c5b5b760e32c9f2cad6729aed3fefa0 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Mon, 6 Mar 2023 12:02:42 +0400 Subject: [PATCH 529/841] Misspell fixed at the page `/docs/ru/operations/storing-data.md` --- docs/ru/operations/storing-data.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ru/operations/storing-data.md b/docs/ru/operations/storing-data.md index 2f5c9c95ea4..56081c82bc9 100644 --- a/docs/ru/operations/storing-data.md +++ b/docs/ru/operations/storing-data.md @@ -82,7 +82,7 @@ sidebar_label: "Хранение данных на внешних дисках" - `type` — `encrypted`. Иначе зашифрованный диск создан не будет. - `disk` — тип диска для хранения данных. -- `key` — ключ для шифрования и расшифровки. Тип: [Uint64](../sql-reference/data-types/int-uint.md). Вы можете использовать параметр `key_hex` для шифрования в шестнадцатеричной форме. +- `key` — ключ для шифрования и расшифровки. Тип: [UInt64](../sql-reference/data-types/int-uint.md). Вы можете использовать параметр `key_hex` для шифрования в шестнадцатеричной форме. Вы можете указать несколько ключей, используя атрибут `id` (смотрите пример выше). Необязательные параметры: From 64a169014ce9b39cff3fea6c92d3d34c8982a11f Mon Sep 17 00:00:00 2001 From: Dmitry Date: Mon, 6 Mar 2023 12:07:57 +0400 Subject: [PATCH 530/841] Markup fixed at the page `/docs/ru/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-structure.md` --- .../external-dictionaries/external-dicts-dict-structure.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/ru/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-structure.md b/docs/ru/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-structure.md index 8c01b8295bf..a711287ae8e 100644 --- a/docs/ru/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-structure.md +++ b/docs/ru/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-structure.md @@ -59,6 +59,7 @@ ClickHouse поддерживает следующие виды ключей: :::danger "Обратите внимание" Ключ не надо дополнительно описывать в атрибутах. +::: ### Числовой ключ {#ext_dict-numeric-key} From b14ab0703c32bd8cbe88d0854c17b1027bf0c652 Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Mon, 6 Mar 2023 08:21:01 +0000 Subject: [PATCH 531/841] Fix failed tests --- tests/queries/0_stateless/01271_show_privileges.reference | 1 + .../0_stateless/02117_show_create_table_system.reference | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/queries/0_stateless/01271_show_privileges.reference b/tests/queries/0_stateless/01271_show_privileges.reference index 58b1cab6e20..a120e15be19 100644 --- a/tests/queries/0_stateless/01271_show_privileges.reference +++ b/tests/queries/0_stateless/01271_show_privileges.reference @@ -51,6 +51,7 @@ CREATE TABLE [] TABLE CREATE CREATE VIEW [] VIEW CREATE CREATE DICTIONARY [] DICTIONARY CREATE CREATE TEMPORARY TABLE [] GLOBAL CREATE +CREATE ARBITRARY TEMPORARY TABLE [] GLOBAL CREATE CREATE FUNCTION [] GLOBAL CREATE CREATE NAMED COLLECTION [] GLOBAL CREATE CREATE [] \N ALL diff --git a/tests/queries/0_stateless/02117_show_create_table_system.reference b/tests/queries/0_stateless/02117_show_create_table_system.reference index aabe05ea5e2..ce9cc80ec8d 100644 --- a/tests/queries/0_stateless/02117_show_create_table_system.reference +++ b/tests/queries/0_stateless/02117_show_create_table_system.reference @@ -288,7 +288,7 @@ CREATE TABLE system.grants ( `user_name` Nullable(String), `role_name` Nullable(String), - `access_type` Enum16('SHOW DATABASES' = 0, 'SHOW TABLES' = 1, 'SHOW COLUMNS' = 2, 'SHOW DICTIONARIES' = 3, 'SHOW' = 4, 'SHOW FILESYSTEM CACHES' = 5, 'SELECT' = 6, 'INSERT' = 7, 'ALTER UPDATE' = 8, 'ALTER DELETE' = 9, 'ALTER ADD COLUMN' = 10, 'ALTER MODIFY COLUMN' = 11, 'ALTER DROP COLUMN' = 12, 'ALTER COMMENT COLUMN' = 13, 'ALTER CLEAR COLUMN' = 14, 'ALTER RENAME COLUMN' = 15, 'ALTER MATERIALIZE COLUMN' = 16, 'ALTER COLUMN' = 17, 'ALTER MODIFY COMMENT' = 18, 'ALTER ORDER BY' = 19, 'ALTER SAMPLE BY' = 20, 'ALTER ADD INDEX' = 21, 'ALTER DROP INDEX' = 22, 'ALTER MATERIALIZE INDEX' = 23, 'ALTER CLEAR INDEX' = 24, 'ALTER INDEX' = 25, 'ALTER ADD PROJECTION' = 26, 'ALTER DROP PROJECTION' = 27, 'ALTER MATERIALIZE PROJECTION' = 28, 'ALTER CLEAR PROJECTION' = 29, 'ALTER PROJECTION' = 30, 'ALTER ADD CONSTRAINT' = 31, 'ALTER DROP CONSTRAINT' = 32, 'ALTER CONSTRAINT' = 33, 'ALTER TTL' = 34, 'ALTER MATERIALIZE TTL' = 35, 'ALTER SETTINGS' = 36, 'ALTER MOVE PARTITION' = 37, 'ALTER FETCH PARTITION' = 38, 'ALTER FREEZE PARTITION' = 39, 'ALTER DATABASE SETTINGS' = 40, 'ALTER NAMED COLLECTION' = 41, 'ALTER TABLE' = 42, 'ALTER DATABASE' = 43, 'ALTER VIEW REFRESH' = 44, 'ALTER VIEW MODIFY QUERY' = 45, 'ALTER VIEW' = 46, 'ALTER' = 47, 'CREATE DATABASE' = 48, 'CREATE TABLE' = 49, 'CREATE VIEW' = 50, 'CREATE DICTIONARY' = 51, 'CREATE TEMPORARY TABLE' = 52, 'CREATE FUNCTION' = 53, 'CREATE NAMED COLLECTION' = 54, 'CREATE' = 55, 'DROP DATABASE' = 56, 'DROP TABLE' = 57, 'DROP VIEW' = 58, 'DROP DICTIONARY' = 59, 'DROP FUNCTION' = 60, 'DROP NAMED COLLECTION' = 61, 'DROP' = 62, 'TRUNCATE' = 63, 'OPTIMIZE' = 64, 'BACKUP' = 65, 'KILL QUERY' = 66, 'KILL TRANSACTION' = 67, 'MOVE PARTITION BETWEEN SHARDS' = 68, 'CREATE USER' = 69, 'ALTER USER' = 70, 'DROP USER' = 71, 'CREATE ROLE' = 72, 'ALTER ROLE' = 73, 'DROP ROLE' = 74, 'ROLE ADMIN' = 75, 'CREATE ROW POLICY' = 76, 'ALTER ROW POLICY' = 77, 'DROP ROW POLICY' = 78, 'CREATE QUOTA' = 79, 'ALTER QUOTA' = 80, 'DROP QUOTA' = 81, 'CREATE SETTINGS PROFILE' = 82, 'ALTER SETTINGS PROFILE' = 83, 'DROP SETTINGS PROFILE' = 84, 'SHOW USERS' = 85, 'SHOW ROLES' = 86, 'SHOW ROW POLICIES' = 87, 'SHOW QUOTAS' = 88, 'SHOW SETTINGS PROFILES' = 89, 'SHOW ACCESS' = 90, 'SHOW NAMED COLLECTIONS' = 91, 'ACCESS MANAGEMENT' = 92, 'SYSTEM SHUTDOWN' = 93, 'SYSTEM DROP DNS CACHE' = 94, 'SYSTEM DROP MARK CACHE' = 95, 'SYSTEM DROP UNCOMPRESSED CACHE' = 96, 'SYSTEM DROP MMAP CACHE' = 97, 'SYSTEM DROP QUERY CACHE' = 98, 'SYSTEM DROP COMPILED EXPRESSION CACHE' = 99, 'SYSTEM DROP FILESYSTEM CACHE' = 100, 'SYSTEM DROP SCHEMA CACHE' = 101, 'SYSTEM DROP S3 CLIENT CACHE' = 102, 'SYSTEM DROP CACHE' = 103, 'SYSTEM RELOAD CONFIG' = 104, 'SYSTEM RELOAD USERS' = 105, 'SYSTEM RELOAD SYMBOLS' = 106, 'SYSTEM RELOAD DICTIONARY' = 107, 'SYSTEM RELOAD MODEL' = 108, 'SYSTEM RELOAD FUNCTION' = 109, 'SYSTEM RELOAD EMBEDDED DICTIONARIES' = 110, 'SYSTEM RELOAD' = 111, 'SYSTEM RESTART DISK' = 112, 'SYSTEM MERGES' = 113, 'SYSTEM TTL MERGES' = 114, 'SYSTEM FETCHES' = 115, 'SYSTEM MOVES' = 116, 'SYSTEM DISTRIBUTED SENDS' = 117, 'SYSTEM REPLICATED SENDS' = 118, 'SYSTEM SENDS' = 119, 'SYSTEM REPLICATION QUEUES' = 120, 'SYSTEM DROP REPLICA' = 121, 'SYSTEM SYNC REPLICA' = 122, 'SYSTEM RESTART REPLICA' = 123, 'SYSTEM RESTORE REPLICA' = 124, 'SYSTEM WAIT LOADING PARTS' = 125, 'SYSTEM SYNC DATABASE REPLICA' = 126, 'SYSTEM SYNC TRANSACTION LOG' = 127, 'SYSTEM SYNC FILE CACHE' = 128, 'SYSTEM FLUSH DISTRIBUTED' = 129, 'SYSTEM FLUSH LOGS' = 130, 'SYSTEM FLUSH' = 131, 'SYSTEM THREAD FUZZER' = 132, 'SYSTEM UNFREEZE' = 133, 'SYSTEM' = 134, 'dictGet' = 135, 'addressToLine' = 136, 'addressToLineWithInlines' = 137, 'addressToSymbol' = 138, 'demangle' = 139, 'INTROSPECTION' = 140, 'FILE' = 141, 'URL' = 142, 'REMOTE' = 143, 'MONGO' = 144, 'MEILISEARCH' = 145, 'MYSQL' = 146, 'POSTGRES' = 147, 'SQLITE' = 148, 'ODBC' = 149, 'JDBC' = 150, 'HDFS' = 151, 'S3' = 152, 'HIVE' = 153, 'SOURCES' = 154, 'CLUSTER' = 155, 'ALL' = 156, 'NONE' = 157), + `access_type` Enum16('SHOW DATABASES' = 0, 'SHOW TABLES' = 1, 'SHOW COLUMNS' = 2, 'SHOW DICTIONARIES' = 3, 'SHOW' = 4, 'SHOW FILESYSTEM CACHES' = 5, 'SELECT' = 6, 'INSERT' = 7, 'ALTER UPDATE' = 8, 'ALTER DELETE' = 9, 'ALTER ADD COLUMN' = 10, 'ALTER MODIFY COLUMN' = 11, 'ALTER DROP COLUMN' = 12, 'ALTER COMMENT COLUMN' = 13, 'ALTER CLEAR COLUMN' = 14, 'ALTER RENAME COLUMN' = 15, 'ALTER MATERIALIZE COLUMN' = 16, 'ALTER COLUMN' = 17, 'ALTER MODIFY COMMENT' = 18, 'ALTER ORDER BY' = 19, 'ALTER SAMPLE BY' = 20, 'ALTER ADD INDEX' = 21, 'ALTER DROP INDEX' = 22, 'ALTER MATERIALIZE INDEX' = 23, 'ALTER CLEAR INDEX' = 24, 'ALTER INDEX' = 25, 'ALTER ADD PROJECTION' = 26, 'ALTER DROP PROJECTION' = 27, 'ALTER MATERIALIZE PROJECTION' = 28, 'ALTER CLEAR PROJECTION' = 29, 'ALTER PROJECTION' = 30, 'ALTER ADD CONSTRAINT' = 31, 'ALTER DROP CONSTRAINT' = 32, 'ALTER CONSTRAINT' = 33, 'ALTER TTL' = 34, 'ALTER MATERIALIZE TTL' = 35, 'ALTER SETTINGS' = 36, 'ALTER MOVE PARTITION' = 37, 'ALTER FETCH PARTITION' = 38, 'ALTER FREEZE PARTITION' = 39, 'ALTER DATABASE SETTINGS' = 40, 'ALTER NAMED COLLECTION' = 41, 'ALTER TABLE' = 42, 'ALTER DATABASE' = 43, 'ALTER VIEW REFRESH' = 44, 'ALTER VIEW MODIFY QUERY' = 45, 'ALTER VIEW' = 46, 'ALTER' = 47, 'CREATE DATABASE' = 48, 'CREATE TABLE' = 49, 'CREATE VIEW' = 50, 'CREATE DICTIONARY' = 51, 'CREATE TEMPORARY TABLE' = 52, 'CREATE ARBITRARY TEMPORARY TABLE' = 53, 'CREATE FUNCTION' = 54, 'CREATE NAMED COLLECTION' = 55, 'CREATE' = 56, 'DROP DATABASE' = 57, 'DROP TABLE' = 58, 'DROP VIEW' = 59, 'DROP DICTIONARY' = 60, 'DROP FUNCTION' = 61, 'DROP NAMED COLLECTION' = 62, 'DROP' = 63, 'TRUNCATE' = 64, 'OPTIMIZE' = 65, 'BACKUP' = 66, 'KILL QUERY' = 67, 'KILL TRANSACTION' = 68, 'MOVE PARTITION BETWEEN SHARDS' = 69, 'CREATE USER' = 70, 'ALTER USER' = 71, 'DROP USER' = 72, 'CREATE ROLE' = 73, 'ALTER ROLE' = 74, 'DROP ROLE' = 75, 'ROLE ADMIN' = 76, 'CREATE ROW POLICY' = 77, 'ALTER ROW POLICY' = 78, 'DROP ROW POLICY' = 79, 'CREATE QUOTA' = 80, 'ALTER QUOTA' = 81, 'DROP QUOTA' = 82, 'CREATE SETTINGS PROFILE' = 83, 'ALTER SETTINGS PROFILE' = 84, 'DROP SETTINGS PROFILE' = 85, 'SHOW USERS' = 86, 'SHOW ROLES' = 87, 'SHOW ROW POLICIES' = 88, 'SHOW QUOTAS' = 89, 'SHOW SETTINGS PROFILES' = 90, 'SHOW ACCESS' = 91, 'SHOW NAMED COLLECTIONS' = 92, 'ACCESS MANAGEMENT' = 93, 'SYSTEM SHUTDOWN' = 94, 'SYSTEM DROP DNS CACHE' = 95, 'SYSTEM DROP MARK CACHE' = 96, 'SYSTEM DROP UNCOMPRESSED CACHE' = 97, 'SYSTEM DROP MMAP CACHE' = 98, 'SYSTEM DROP QUERY CACHE' = 99, 'SYSTEM DROP COMPILED EXPRESSION CACHE' = 100, 'SYSTEM DROP FILESYSTEM CACHE' = 101, 'SYSTEM DROP SCHEMA CACHE' = 102, 'SYSTEM DROP S3 CLIENT CACHE' = 103, 'SYSTEM DROP CACHE' = 104, 'SYSTEM RELOAD CONFIG' = 105, 'SYSTEM RELOAD USERS' = 106, 'SYSTEM RELOAD SYMBOLS' = 107, 'SYSTEM RELOAD DICTIONARY' = 108, 'SYSTEM RELOAD MODEL' = 109, 'SYSTEM RELOAD FUNCTION' = 110, 'SYSTEM RELOAD EMBEDDED DICTIONARIES' = 111, 'SYSTEM RELOAD' = 112, 'SYSTEM RESTART DISK' = 113, 'SYSTEM MERGES' = 114, 'SYSTEM TTL MERGES' = 115, 'SYSTEM FETCHES' = 116, 'SYSTEM MOVES' = 117, 'SYSTEM DISTRIBUTED SENDS' = 118, 'SYSTEM REPLICATED SENDS' = 119, 'SYSTEM SENDS' = 120, 'SYSTEM REPLICATION QUEUES' = 121, 'SYSTEM DROP REPLICA' = 122, 'SYSTEM SYNC REPLICA' = 123, 'SYSTEM RESTART REPLICA' = 124, 'SYSTEM RESTORE REPLICA' = 125, 'SYSTEM WAIT LOADING PARTS' = 126, 'SYSTEM SYNC DATABASE REPLICA' = 127, 'SYSTEM SYNC TRANSACTION LOG' = 128, 'SYSTEM SYNC FILE CACHE' = 129, 'SYSTEM FLUSH DISTRIBUTED' = 130, 'SYSTEM FLUSH LOGS' = 131, 'SYSTEM FLUSH' = 132, 'SYSTEM THREAD FUZZER' = 133, 'SYSTEM UNFREEZE' = 134, 'SYSTEM' = 135, 'dictGet' = 136, 'addressToLine' = 137, 'addressToLineWithInlines' = 138, 'addressToSymbol' = 139, 'demangle' = 140, 'INTROSPECTION' = 141, 'FILE' = 142, 'URL' = 143, 'REMOTE' = 144, 'MONGO' = 145, 'MEILISEARCH' = 146, 'MYSQL' = 147, 'POSTGRES' = 148, 'SQLITE' = 149, 'ODBC' = 150, 'JDBC' = 151, 'HDFS' = 152, 'S3' = 153, 'HIVE' = 154, 'SOURCES' = 155, 'CLUSTER' = 156, 'ALL' = 157, 'NONE' = 158), `database` Nullable(String), `table` Nullable(String), `column` Nullable(String), @@ -569,10 +569,10 @@ ENGINE = SystemPartsColumns COMMENT 'SYSTEM TABLE is built on the fly.' CREATE TABLE system.privileges ( - `privilege` Enum16('SHOW DATABASES' = 0, 'SHOW TABLES' = 1, 'SHOW COLUMNS' = 2, 'SHOW DICTIONARIES' = 3, 'SHOW' = 4, 'SHOW FILESYSTEM CACHES' = 5, 'SELECT' = 6, 'INSERT' = 7, 'ALTER UPDATE' = 8, 'ALTER DELETE' = 9, 'ALTER ADD COLUMN' = 10, 'ALTER MODIFY COLUMN' = 11, 'ALTER DROP COLUMN' = 12, 'ALTER COMMENT COLUMN' = 13, 'ALTER CLEAR COLUMN' = 14, 'ALTER RENAME COLUMN' = 15, 'ALTER MATERIALIZE COLUMN' = 16, 'ALTER COLUMN' = 17, 'ALTER MODIFY COMMENT' = 18, 'ALTER ORDER BY' = 19, 'ALTER SAMPLE BY' = 20, 'ALTER ADD INDEX' = 21, 'ALTER DROP INDEX' = 22, 'ALTER MATERIALIZE INDEX' = 23, 'ALTER CLEAR INDEX' = 24, 'ALTER INDEX' = 25, 'ALTER ADD PROJECTION' = 26, 'ALTER DROP PROJECTION' = 27, 'ALTER MATERIALIZE PROJECTION' = 28, 'ALTER CLEAR PROJECTION' = 29, 'ALTER PROJECTION' = 30, 'ALTER ADD CONSTRAINT' = 31, 'ALTER DROP CONSTRAINT' = 32, 'ALTER CONSTRAINT' = 33, 'ALTER TTL' = 34, 'ALTER MATERIALIZE TTL' = 35, 'ALTER SETTINGS' = 36, 'ALTER MOVE PARTITION' = 37, 'ALTER FETCH PARTITION' = 38, 'ALTER FREEZE PARTITION' = 39, 'ALTER DATABASE SETTINGS' = 40, 'ALTER NAMED COLLECTION' = 41, 'ALTER TABLE' = 42, 'ALTER DATABASE' = 43, 'ALTER VIEW REFRESH' = 44, 'ALTER VIEW MODIFY QUERY' = 45, 'ALTER VIEW' = 46, 'ALTER' = 47, 'CREATE DATABASE' = 48, 'CREATE TABLE' = 49, 'CREATE VIEW' = 50, 'CREATE DICTIONARY' = 51, 'CREATE TEMPORARY TABLE' = 52, 'CREATE FUNCTION' = 53, 'CREATE NAMED COLLECTION' = 54, 'CREATE' = 55, 'DROP DATABASE' = 56, 'DROP TABLE' = 57, 'DROP VIEW' = 58, 'DROP DICTIONARY' = 59, 'DROP FUNCTION' = 60, 'DROP NAMED COLLECTION' = 61, 'DROP' = 62, 'TRUNCATE' = 63, 'OPTIMIZE' = 64, 'BACKUP' = 65, 'KILL QUERY' = 66, 'KILL TRANSACTION' = 67, 'MOVE PARTITION BETWEEN SHARDS' = 68, 'CREATE USER' = 69, 'ALTER USER' = 70, 'DROP USER' = 71, 'CREATE ROLE' = 72, 'ALTER ROLE' = 73, 'DROP ROLE' = 74, 'ROLE ADMIN' = 75, 'CREATE ROW POLICY' = 76, 'ALTER ROW POLICY' = 77, 'DROP ROW POLICY' = 78, 'CREATE QUOTA' = 79, 'ALTER QUOTA' = 80, 'DROP QUOTA' = 81, 'CREATE SETTINGS PROFILE' = 82, 'ALTER SETTINGS PROFILE' = 83, 'DROP SETTINGS PROFILE' = 84, 'SHOW USERS' = 85, 'SHOW ROLES' = 86, 'SHOW ROW POLICIES' = 87, 'SHOW QUOTAS' = 88, 'SHOW SETTINGS PROFILES' = 89, 'SHOW ACCESS' = 90, 'SHOW NAMED COLLECTIONS' = 91, 'ACCESS MANAGEMENT' = 92, 'SYSTEM SHUTDOWN' = 93, 'SYSTEM DROP DNS CACHE' = 94, 'SYSTEM DROP MARK CACHE' = 95, 'SYSTEM DROP UNCOMPRESSED CACHE' = 96, 'SYSTEM DROP MMAP CACHE' = 97, 'SYSTEM DROP QUERY CACHE' = 98, 'SYSTEM DROP COMPILED EXPRESSION CACHE' = 99, 'SYSTEM DROP FILESYSTEM CACHE' = 100, 'SYSTEM DROP SCHEMA CACHE' = 101, 'SYSTEM DROP S3 CLIENT CACHE' = 102, 'SYSTEM DROP CACHE' = 103, 'SYSTEM RELOAD CONFIG' = 104, 'SYSTEM RELOAD USERS' = 105, 'SYSTEM RELOAD SYMBOLS' = 106, 'SYSTEM RELOAD DICTIONARY' = 107, 'SYSTEM RELOAD MODEL' = 108, 'SYSTEM RELOAD FUNCTION' = 109, 'SYSTEM RELOAD EMBEDDED DICTIONARIES' = 110, 'SYSTEM RELOAD' = 111, 'SYSTEM RESTART DISK' = 112, 'SYSTEM MERGES' = 113, 'SYSTEM TTL MERGES' = 114, 'SYSTEM FETCHES' = 115, 'SYSTEM MOVES' = 116, 'SYSTEM DISTRIBUTED SENDS' = 117, 'SYSTEM REPLICATED SENDS' = 118, 'SYSTEM SENDS' = 119, 'SYSTEM REPLICATION QUEUES' = 120, 'SYSTEM DROP REPLICA' = 121, 'SYSTEM SYNC REPLICA' = 122, 'SYSTEM RESTART REPLICA' = 123, 'SYSTEM RESTORE REPLICA' = 124, 'SYSTEM WAIT LOADING PARTS' = 125, 'SYSTEM SYNC DATABASE REPLICA' = 126, 'SYSTEM SYNC TRANSACTION LOG' = 127, 'SYSTEM SYNC FILE CACHE' = 128, 'SYSTEM FLUSH DISTRIBUTED' = 129, 'SYSTEM FLUSH LOGS' = 130, 'SYSTEM FLUSH' = 131, 'SYSTEM THREAD FUZZER' = 132, 'SYSTEM UNFREEZE' = 133, 'SYSTEM' = 134, 'dictGet' = 135, 'addressToLine' = 136, 'addressToLineWithInlines' = 137, 'addressToSymbol' = 138, 'demangle' = 139, 'INTROSPECTION' = 140, 'FILE' = 141, 'URL' = 142, 'REMOTE' = 143, 'MONGO' = 144, 'MEILISEARCH' = 145, 'MYSQL' = 146, 'POSTGRES' = 147, 'SQLITE' = 148, 'ODBC' = 149, 'JDBC' = 150, 'HDFS' = 151, 'S3' = 152, 'HIVE' = 153, 'SOURCES' = 154, 'CLUSTER' = 155, 'ALL' = 156, 'NONE' = 157), + `privilege` Enum16('SHOW DATABASES' = 0, 'SHOW TABLES' = 1, 'SHOW COLUMNS' = 2, 'SHOW DICTIONARIES' = 3, 'SHOW' = 4, 'SHOW FILESYSTEM CACHES' = 5, 'SELECT' = 6, 'INSERT' = 7, 'ALTER UPDATE' = 8, 'ALTER DELETE' = 9, 'ALTER ADD COLUMN' = 10, 'ALTER MODIFY COLUMN' = 11, 'ALTER DROP COLUMN' = 12, 'ALTER COMMENT COLUMN' = 13, 'ALTER CLEAR COLUMN' = 14, 'ALTER RENAME COLUMN' = 15, 'ALTER MATERIALIZE COLUMN' = 16, 'ALTER COLUMN' = 17, 'ALTER MODIFY COMMENT' = 18, 'ALTER ORDER BY' = 19, 'ALTER SAMPLE BY' = 20, 'ALTER ADD INDEX' = 21, 'ALTER DROP INDEX' = 22, 'ALTER MATERIALIZE INDEX' = 23, 'ALTER CLEAR INDEX' = 24, 'ALTER INDEX' = 25, 'ALTER ADD PROJECTION' = 26, 'ALTER DROP PROJECTION' = 27, 'ALTER MATERIALIZE PROJECTION' = 28, 'ALTER CLEAR PROJECTION' = 29, 'ALTER PROJECTION' = 30, 'ALTER ADD CONSTRAINT' = 31, 'ALTER DROP CONSTRAINT' = 32, 'ALTER CONSTRAINT' = 33, 'ALTER TTL' = 34, 'ALTER MATERIALIZE TTL' = 35, 'ALTER SETTINGS' = 36, 'ALTER MOVE PARTITION' = 37, 'ALTER FETCH PARTITION' = 38, 'ALTER FREEZE PARTITION' = 39, 'ALTER DATABASE SETTINGS' = 40, 'ALTER NAMED COLLECTION' = 41, 'ALTER TABLE' = 42, 'ALTER DATABASE' = 43, 'ALTER VIEW REFRESH' = 44, 'ALTER VIEW MODIFY QUERY' = 45, 'ALTER VIEW' = 46, 'ALTER' = 47, 'CREATE DATABASE' = 48, 'CREATE TABLE' = 49, 'CREATE VIEW' = 50, 'CREATE DICTIONARY' = 51, 'CREATE TEMPORARY TABLE' = 52, 'CREATE ARBITRARY TEMPORARY TABLE' = 53, 'CREATE FUNCTION' = 54, 'CREATE NAMED COLLECTION' = 55, 'CREATE' = 56, 'DROP DATABASE' = 57, 'DROP TABLE' = 58, 'DROP VIEW' = 59, 'DROP DICTIONARY' = 60, 'DROP FUNCTION' = 61, 'DROP NAMED COLLECTION' = 62, 'DROP' = 63, 'TRUNCATE' = 64, 'OPTIMIZE' = 65, 'BACKUP' = 66, 'KILL QUERY' = 67, 'KILL TRANSACTION' = 68, 'MOVE PARTITION BETWEEN SHARDS' = 69, 'CREATE USER' = 70, 'ALTER USER' = 71, 'DROP USER' = 72, 'CREATE ROLE' = 73, 'ALTER ROLE' = 74, 'DROP ROLE' = 75, 'ROLE ADMIN' = 76, 'CREATE ROW POLICY' = 77, 'ALTER ROW POLICY' = 78, 'DROP ROW POLICY' = 79, 'CREATE QUOTA' = 80, 'ALTER QUOTA' = 81, 'DROP QUOTA' = 82, 'CREATE SETTINGS PROFILE' = 83, 'ALTER SETTINGS PROFILE' = 84, 'DROP SETTINGS PROFILE' = 85, 'SHOW USERS' = 86, 'SHOW ROLES' = 87, 'SHOW ROW POLICIES' = 88, 'SHOW QUOTAS' = 89, 'SHOW SETTINGS PROFILES' = 90, 'SHOW ACCESS' = 91, 'SHOW NAMED COLLECTIONS' = 92, 'ACCESS MANAGEMENT' = 93, 'SYSTEM SHUTDOWN' = 94, 'SYSTEM DROP DNS CACHE' = 95, 'SYSTEM DROP MARK CACHE' = 96, 'SYSTEM DROP UNCOMPRESSED CACHE' = 97, 'SYSTEM DROP MMAP CACHE' = 98, 'SYSTEM DROP QUERY CACHE' = 99, 'SYSTEM DROP COMPILED EXPRESSION CACHE' = 100, 'SYSTEM DROP FILESYSTEM CACHE' = 101, 'SYSTEM DROP SCHEMA CACHE' = 102, 'SYSTEM DROP S3 CLIENT CACHE' = 103, 'SYSTEM DROP CACHE' = 104, 'SYSTEM RELOAD CONFIG' = 105, 'SYSTEM RELOAD USERS' = 106, 'SYSTEM RELOAD SYMBOLS' = 107, 'SYSTEM RELOAD DICTIONARY' = 108, 'SYSTEM RELOAD MODEL' = 109, 'SYSTEM RELOAD FUNCTION' = 110, 'SYSTEM RELOAD EMBEDDED DICTIONARIES' = 111, 'SYSTEM RELOAD' = 112, 'SYSTEM RESTART DISK' = 113, 'SYSTEM MERGES' = 114, 'SYSTEM TTL MERGES' = 115, 'SYSTEM FETCHES' = 116, 'SYSTEM MOVES' = 117, 'SYSTEM DISTRIBUTED SENDS' = 118, 'SYSTEM REPLICATED SENDS' = 119, 'SYSTEM SENDS' = 120, 'SYSTEM REPLICATION QUEUES' = 121, 'SYSTEM DROP REPLICA' = 122, 'SYSTEM SYNC REPLICA' = 123, 'SYSTEM RESTART REPLICA' = 124, 'SYSTEM RESTORE REPLICA' = 125, 'SYSTEM WAIT LOADING PARTS' = 126, 'SYSTEM SYNC DATABASE REPLICA' = 127, 'SYSTEM SYNC TRANSACTION LOG' = 128, 'SYSTEM SYNC FILE CACHE' = 129, 'SYSTEM FLUSH DISTRIBUTED' = 130, 'SYSTEM FLUSH LOGS' = 131, 'SYSTEM FLUSH' = 132, 'SYSTEM THREAD FUZZER' = 133, 'SYSTEM UNFREEZE' = 134, 'SYSTEM' = 135, 'dictGet' = 136, 'addressToLine' = 137, 'addressToLineWithInlines' = 138, 'addressToSymbol' = 139, 'demangle' = 140, 'INTROSPECTION' = 141, 'FILE' = 142, 'URL' = 143, 'REMOTE' = 144, 'MONGO' = 145, 'MEILISEARCH' = 146, 'MYSQL' = 147, 'POSTGRES' = 148, 'SQLITE' = 149, 'ODBC' = 150, 'JDBC' = 151, 'HDFS' = 152, 'S3' = 153, 'HIVE' = 154, 'SOURCES' = 155, 'CLUSTER' = 156, 'ALL' = 157, 'NONE' = 158), `aliases` Array(String), `level` Nullable(Enum8('GLOBAL' = 0, 'DATABASE' = 1, 'TABLE' = 2, 'DICTIONARY' = 3, 'VIEW' = 4, 'COLUMN' = 5)), - `parent_group` Nullable(Enum16('SHOW DATABASES' = 0, 'SHOW TABLES' = 1, 'SHOW COLUMNS' = 2, 'SHOW DICTIONARIES' = 3, 'SHOW' = 4, 'SHOW FILESYSTEM CACHES' = 5, 'SELECT' = 6, 'INSERT' = 7, 'ALTER UPDATE' = 8, 'ALTER DELETE' = 9, 'ALTER ADD COLUMN' = 10, 'ALTER MODIFY COLUMN' = 11, 'ALTER DROP COLUMN' = 12, 'ALTER COMMENT COLUMN' = 13, 'ALTER CLEAR COLUMN' = 14, 'ALTER RENAME COLUMN' = 15, 'ALTER MATERIALIZE COLUMN' = 16, 'ALTER COLUMN' = 17, 'ALTER MODIFY COMMENT' = 18, 'ALTER ORDER BY' = 19, 'ALTER SAMPLE BY' = 20, 'ALTER ADD INDEX' = 21, 'ALTER DROP INDEX' = 22, 'ALTER MATERIALIZE INDEX' = 23, 'ALTER CLEAR INDEX' = 24, 'ALTER INDEX' = 25, 'ALTER ADD PROJECTION' = 26, 'ALTER DROP PROJECTION' = 27, 'ALTER MATERIALIZE PROJECTION' = 28, 'ALTER CLEAR PROJECTION' = 29, 'ALTER PROJECTION' = 30, 'ALTER ADD CONSTRAINT' = 31, 'ALTER DROP CONSTRAINT' = 32, 'ALTER CONSTRAINT' = 33, 'ALTER TTL' = 34, 'ALTER MATERIALIZE TTL' = 35, 'ALTER SETTINGS' = 36, 'ALTER MOVE PARTITION' = 37, 'ALTER FETCH PARTITION' = 38, 'ALTER FREEZE PARTITION' = 39, 'ALTER DATABASE SETTINGS' = 40, 'ALTER NAMED COLLECTION' = 41, 'ALTER TABLE' = 42, 'ALTER DATABASE' = 43, 'ALTER VIEW REFRESH' = 44, 'ALTER VIEW MODIFY QUERY' = 45, 'ALTER VIEW' = 46, 'ALTER' = 47, 'CREATE DATABASE' = 48, 'CREATE TABLE' = 49, 'CREATE VIEW' = 50, 'CREATE DICTIONARY' = 51, 'CREATE TEMPORARY TABLE' = 52, 'CREATE FUNCTION' = 53, 'CREATE NAMED COLLECTION' = 54, 'CREATE' = 55, 'DROP DATABASE' = 56, 'DROP TABLE' = 57, 'DROP VIEW' = 58, 'DROP DICTIONARY' = 59, 'DROP FUNCTION' = 60, 'DROP NAMED COLLECTION' = 61, 'DROP' = 62, 'TRUNCATE' = 63, 'OPTIMIZE' = 64, 'BACKUP' = 65, 'KILL QUERY' = 66, 'KILL TRANSACTION' = 67, 'MOVE PARTITION BETWEEN SHARDS' = 68, 'CREATE USER' = 69, 'ALTER USER' = 70, 'DROP USER' = 71, 'CREATE ROLE' = 72, 'ALTER ROLE' = 73, 'DROP ROLE' = 74, 'ROLE ADMIN' = 75, 'CREATE ROW POLICY' = 76, 'ALTER ROW POLICY' = 77, 'DROP ROW POLICY' = 78, 'CREATE QUOTA' = 79, 'ALTER QUOTA' = 80, 'DROP QUOTA' = 81, 'CREATE SETTINGS PROFILE' = 82, 'ALTER SETTINGS PROFILE' = 83, 'DROP SETTINGS PROFILE' = 84, 'SHOW USERS' = 85, 'SHOW ROLES' = 86, 'SHOW ROW POLICIES' = 87, 'SHOW QUOTAS' = 88, 'SHOW SETTINGS PROFILES' = 89, 'SHOW ACCESS' = 90, 'SHOW NAMED COLLECTIONS' = 91, 'ACCESS MANAGEMENT' = 92, 'SYSTEM SHUTDOWN' = 93, 'SYSTEM DROP DNS CACHE' = 94, 'SYSTEM DROP MARK CACHE' = 95, 'SYSTEM DROP UNCOMPRESSED CACHE' = 96, 'SYSTEM DROP MMAP CACHE' = 97, 'SYSTEM DROP QUERY CACHE' = 98, 'SYSTEM DROP COMPILED EXPRESSION CACHE' = 99, 'SYSTEM DROP FILESYSTEM CACHE' = 100, 'SYSTEM DROP SCHEMA CACHE' = 101, 'SYSTEM DROP S3 CLIENT CACHE' = 102, 'SYSTEM DROP CACHE' = 103, 'SYSTEM RELOAD CONFIG' = 104, 'SYSTEM RELOAD USERS' = 105, 'SYSTEM RELOAD SYMBOLS' = 106, 'SYSTEM RELOAD DICTIONARY' = 107, 'SYSTEM RELOAD MODEL' = 108, 'SYSTEM RELOAD FUNCTION' = 109, 'SYSTEM RELOAD EMBEDDED DICTIONARIES' = 110, 'SYSTEM RELOAD' = 111, 'SYSTEM RESTART DISK' = 112, 'SYSTEM MERGES' = 113, 'SYSTEM TTL MERGES' = 114, 'SYSTEM FETCHES' = 115, 'SYSTEM MOVES' = 116, 'SYSTEM DISTRIBUTED SENDS' = 117, 'SYSTEM REPLICATED SENDS' = 118, 'SYSTEM SENDS' = 119, 'SYSTEM REPLICATION QUEUES' = 120, 'SYSTEM DROP REPLICA' = 121, 'SYSTEM SYNC REPLICA' = 122, 'SYSTEM RESTART REPLICA' = 123, 'SYSTEM RESTORE REPLICA' = 124, 'SYSTEM WAIT LOADING PARTS' = 125, 'SYSTEM SYNC DATABASE REPLICA' = 126, 'SYSTEM SYNC TRANSACTION LOG' = 127, 'SYSTEM SYNC FILE CACHE' = 128, 'SYSTEM FLUSH DISTRIBUTED' = 129, 'SYSTEM FLUSH LOGS' = 130, 'SYSTEM FLUSH' = 131, 'SYSTEM THREAD FUZZER' = 132, 'SYSTEM UNFREEZE' = 133, 'SYSTEM' = 134, 'dictGet' = 135, 'addressToLine' = 136, 'addressToLineWithInlines' = 137, 'addressToSymbol' = 138, 'demangle' = 139, 'INTROSPECTION' = 140, 'FILE' = 141, 'URL' = 142, 'REMOTE' = 143, 'MONGO' = 144, 'MEILISEARCH' = 145, 'MYSQL' = 146, 'POSTGRES' = 147, 'SQLITE' = 148, 'ODBC' = 149, 'JDBC' = 150, 'HDFS' = 151, 'S3' = 152, 'HIVE' = 153, 'SOURCES' = 154, 'CLUSTER' = 155, 'ALL' = 156, 'NONE' = 157)) + `parent_group` Nullable(Enum16('SHOW DATABASES' = 0, 'SHOW TABLES' = 1, 'SHOW COLUMNS' = 2, 'SHOW DICTIONARIES' = 3, 'SHOW' = 4, 'SHOW FILESYSTEM CACHES' = 5, 'SELECT' = 6, 'INSERT' = 7, 'ALTER UPDATE' = 8, 'ALTER DELETE' = 9, 'ALTER ADD COLUMN' = 10, 'ALTER MODIFY COLUMN' = 11, 'ALTER DROP COLUMN' = 12, 'ALTER COMMENT COLUMN' = 13, 'ALTER CLEAR COLUMN' = 14, 'ALTER RENAME COLUMN' = 15, 'ALTER MATERIALIZE COLUMN' = 16, 'ALTER COLUMN' = 17, 'ALTER MODIFY COMMENT' = 18, 'ALTER ORDER BY' = 19, 'ALTER SAMPLE BY' = 20, 'ALTER ADD INDEX' = 21, 'ALTER DROP INDEX' = 22, 'ALTER MATERIALIZE INDEX' = 23, 'ALTER CLEAR INDEX' = 24, 'ALTER INDEX' = 25, 'ALTER ADD PROJECTION' = 26, 'ALTER DROP PROJECTION' = 27, 'ALTER MATERIALIZE PROJECTION' = 28, 'ALTER CLEAR PROJECTION' = 29, 'ALTER PROJECTION' = 30, 'ALTER ADD CONSTRAINT' = 31, 'ALTER DROP CONSTRAINT' = 32, 'ALTER CONSTRAINT' = 33, 'ALTER TTL' = 34, 'ALTER MATERIALIZE TTL' = 35, 'ALTER SETTINGS' = 36, 'ALTER MOVE PARTITION' = 37, 'ALTER FETCH PARTITION' = 38, 'ALTER FREEZE PARTITION' = 39, 'ALTER DATABASE SETTINGS' = 40, 'ALTER NAMED COLLECTION' = 41, 'ALTER TABLE' = 42, 'ALTER DATABASE' = 43, 'ALTER VIEW REFRESH' = 44, 'ALTER VIEW MODIFY QUERY' = 45, 'ALTER VIEW' = 46, 'ALTER' = 47, 'CREATE DATABASE' = 48, 'CREATE TABLE' = 49, 'CREATE VIEW' = 50, 'CREATE DICTIONARY' = 51, 'CREATE TEMPORARY TABLE' = 52, 'CREATE ARBITRARY TEMPORARY TABLE' = 53, 'CREATE FUNCTION' = 54, 'CREATE NAMED COLLECTION' = 55, 'CREATE' = 56, 'DROP DATABASE' = 57, 'DROP TABLE' = 58, 'DROP VIEW' = 59, 'DROP DICTIONARY' = 60, 'DROP FUNCTION' = 61, 'DROP NAMED COLLECTION' = 62, 'DROP' = 63, 'TRUNCATE' = 64, 'OPTIMIZE' = 65, 'BACKUP' = 66, 'KILL QUERY' = 67, 'KILL TRANSACTION' = 68, 'MOVE PARTITION BETWEEN SHARDS' = 69, 'CREATE USER' = 70, 'ALTER USER' = 71, 'DROP USER' = 72, 'CREATE ROLE' = 73, 'ALTER ROLE' = 74, 'DROP ROLE' = 75, 'ROLE ADMIN' = 76, 'CREATE ROW POLICY' = 77, 'ALTER ROW POLICY' = 78, 'DROP ROW POLICY' = 79, 'CREATE QUOTA' = 80, 'ALTER QUOTA' = 81, 'DROP QUOTA' = 82, 'CREATE SETTINGS PROFILE' = 83, 'ALTER SETTINGS PROFILE' = 84, 'DROP SETTINGS PROFILE' = 85, 'SHOW USERS' = 86, 'SHOW ROLES' = 87, 'SHOW ROW POLICIES' = 88, 'SHOW QUOTAS' = 89, 'SHOW SETTINGS PROFILES' = 90, 'SHOW ACCESS' = 91, 'SHOW NAMED COLLECTIONS' = 92, 'ACCESS MANAGEMENT' = 93, 'SYSTEM SHUTDOWN' = 94, 'SYSTEM DROP DNS CACHE' = 95, 'SYSTEM DROP MARK CACHE' = 96, 'SYSTEM DROP UNCOMPRESSED CACHE' = 97, 'SYSTEM DROP MMAP CACHE' = 98, 'SYSTEM DROP QUERY CACHE' = 99, 'SYSTEM DROP COMPILED EXPRESSION CACHE' = 100, 'SYSTEM DROP FILESYSTEM CACHE' = 101, 'SYSTEM DROP SCHEMA CACHE' = 102, 'SYSTEM DROP S3 CLIENT CACHE' = 103, 'SYSTEM DROP CACHE' = 104, 'SYSTEM RELOAD CONFIG' = 105, 'SYSTEM RELOAD USERS' = 106, 'SYSTEM RELOAD SYMBOLS' = 107, 'SYSTEM RELOAD DICTIONARY' = 108, 'SYSTEM RELOAD MODEL' = 109, 'SYSTEM RELOAD FUNCTION' = 110, 'SYSTEM RELOAD EMBEDDED DICTIONARIES' = 111, 'SYSTEM RELOAD' = 112, 'SYSTEM RESTART DISK' = 113, 'SYSTEM MERGES' = 114, 'SYSTEM TTL MERGES' = 115, 'SYSTEM FETCHES' = 116, 'SYSTEM MOVES' = 117, 'SYSTEM DISTRIBUTED SENDS' = 118, 'SYSTEM REPLICATED SENDS' = 119, 'SYSTEM SENDS' = 120, 'SYSTEM REPLICATION QUEUES' = 121, 'SYSTEM DROP REPLICA' = 122, 'SYSTEM SYNC REPLICA' = 123, 'SYSTEM RESTART REPLICA' = 124, 'SYSTEM RESTORE REPLICA' = 125, 'SYSTEM WAIT LOADING PARTS' = 126, 'SYSTEM SYNC DATABASE REPLICA' = 127, 'SYSTEM SYNC TRANSACTION LOG' = 128, 'SYSTEM SYNC FILE CACHE' = 129, 'SYSTEM FLUSH DISTRIBUTED' = 130, 'SYSTEM FLUSH LOGS' = 131, 'SYSTEM FLUSH' = 132, 'SYSTEM THREAD FUZZER' = 133, 'SYSTEM UNFREEZE' = 134, 'SYSTEM' = 135, 'dictGet' = 136, 'addressToLine' = 137, 'addressToLineWithInlines' = 138, 'addressToSymbol' = 139, 'demangle' = 140, 'INTROSPECTION' = 141, 'FILE' = 142, 'URL' = 143, 'REMOTE' = 144, 'MONGO' = 145, 'MEILISEARCH' = 146, 'MYSQL' = 147, 'POSTGRES' = 148, 'SQLITE' = 149, 'ODBC' = 150, 'JDBC' = 151, 'HDFS' = 152, 'S3' = 153, 'HIVE' = 154, 'SOURCES' = 155, 'CLUSTER' = 156, 'ALL' = 157, 'NONE' = 158)) ) ENGINE = SystemPrivileges COMMENT 'SYSTEM TABLE is built on the fly.' From 237b5b2bfaaa3bc42848c56abe7b4643fb33af2a Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Mon, 6 Mar 2023 08:25:39 +0000 Subject: [PATCH 532/841] Update docs --- docs/en/sql-reference/statements/grant.md | 2 ++ docs/ru/sql-reference/statements/grant.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/docs/en/sql-reference/statements/grant.md b/docs/en/sql-reference/statements/grant.md index 3383ea70a2b..653c4c754a0 100644 --- a/docs/en/sql-reference/statements/grant.md +++ b/docs/en/sql-reference/statements/grant.md @@ -106,6 +106,7 @@ Hierarchy of privileges: - `CREATE DATABASE` - `CREATE TABLE` - `CREATE TEMPORARY TABLE` + - `CREATE ARBITRARY TEMPORARY TABLE` - `CREATE VIEW` - `CREATE DICTIONARY` - `CREATE FUNCTION` @@ -314,6 +315,7 @@ Allows executing [CREATE](../../sql-reference/statements/create/index.md) and [A - `CREATE DATABASE`. Level: `DATABASE` - `CREATE TABLE`. Level: `TABLE` - `CREATE TEMPORARY TABLE`. Level: `GLOBAL` + - `CREATE ARBITRARY TEMPORARY TABLE`. Level: `GLOBAL` - `CREATE VIEW`. Level: `VIEW` - `CREATE DICTIONARY`. Level: `DICTIONARY` diff --git a/docs/ru/sql-reference/statements/grant.md b/docs/ru/sql-reference/statements/grant.md index 7c281634c98..97d7454e8c9 100644 --- a/docs/ru/sql-reference/statements/grant.md +++ b/docs/ru/sql-reference/statements/grant.md @@ -108,6 +108,7 @@ GRANT SELECT(x,y) ON db.table TO john WITH GRANT OPTION - `CREATE DATABASE` - `CREATE TABLE` - `CREATE TEMPORARY TABLE` + - `CREATE ARBITRARY TEMPORARY TABLE` - `CREATE VIEW` - `CREATE DICTIONARY` - `CREATE FUNCTION` @@ -315,6 +316,7 @@ GRANT INSERT(x,y) ON db.table TO john - `CREATE DATABASE`. Уровень: `DATABASE` - `CREATE TABLE`. Уровень: `TABLE` - `CREATE TEMPORARY TABLE`. Уровень: `GLOBAL` + - `CREATE ARBITRARY TEMPORARY TABLE`. Уровень: `GLOBAL` - `CREATE VIEW`. Уровень: `VIEW` - `CREATE DICTIONARY`. Уровень: `DICTIONARY` From d4f1ac60bc2fb3a8ffb20491705c3ffa823e7b62 Mon Sep 17 00:00:00 2001 From: Vladimir C Date: Mon, 6 Mar 2023 10:30:51 +0100 Subject: [PATCH 533/841] Update comment in alter_materialized_view_consistent --- .../0_stateless/01019_alter_materialized_view_consistent.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/queries/0_stateless/01019_alter_materialized_view_consistent.sh b/tests/queries/0_stateless/01019_alter_materialized_view_consistent.sh index 496215ba492..3a2eac1f38f 100755 --- a/tests/queries/0_stateless/01019_alter_materialized_view_consistent.sh +++ b/tests/queries/0_stateless/01019_alter_materialized_view_consistent.sh @@ -54,6 +54,7 @@ function alter_thread() { for i in {0..5}; do ALTER[$i]="ALTER TABLE mv MODIFY QUERY SELECT v == 1 as test, v as case FROM src_a;" done + # Insert 3 ALTERs to src_b, one in the first half of the array and two in arbitrary positions. ALTER[$RANDOM % 3]="ALTER TABLE mv MODIFY QUERY SELECT v == 2 as test, v as case FROM src_b;" ALTER[$RANDOM % 6]="ALTER TABLE mv MODIFY QUERY SELECT v == 2 as test, v as case FROM src_b;" ALTER[$RANDOM % 6]="ALTER TABLE mv MODIFY QUERY SELECT v == 2 as test, v as case FROM src_b;" From 48f644a95859af19efa3999369214755e3f81edb Mon Sep 17 00:00:00 2001 From: Vladimir C Date: Mon, 6 Mar 2023 10:38:21 +0100 Subject: [PATCH 534/841] Fix style in JoiningTransform.cpp --- src/Processors/Transforms/JoiningTransform.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Processors/Transforms/JoiningTransform.cpp b/src/Processors/Transforms/JoiningTransform.cpp index bf80de67b42..120ff51cad1 100644 --- a/src/Processors/Transforms/JoiningTransform.cpp +++ b/src/Processors/Transforms/JoiningTransform.cpp @@ -333,8 +333,6 @@ IProcessor::Status DelayedJoinedBlocksWorkerTransform::prepare() if (inputs.size() != 1 && outputs.size() != 1) throw Exception(ErrorCodes::LOGICAL_ERROR, "DelayedJoinedBlocksWorkerTransform must have exactly one input port"); - - if (output_chunk) { input.setNotNeeded(); @@ -414,7 +412,6 @@ void DelayedJoinedBlocksTransform::work() finished = finished || delayed_blocks == nullptr; } - IProcessor::Status DelayedJoinedBlocksTransform::prepare() { for (auto & output : outputs) From 56e8547f7e1573a1f60188e6cc7223327c2c3755 Mon Sep 17 00:00:00 2001 From: Igor Nikonov Date: Mon, 6 Mar 2023 10:47:32 +0000 Subject: [PATCH 535/841] Do not apply the optimization when plan is built only for analysis --- src/Planner/PlannerJoinTree.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Planner/PlannerJoinTree.cpp b/src/Planner/PlannerJoinTree.cpp index 06dc5b70bc1..6f818e2c8f7 100644 --- a/src/Planner/PlannerJoinTree.cpp +++ b/src/Planner/PlannerJoinTree.cpp @@ -410,13 +410,12 @@ JoinTreeQueryPlan buildQueryPlanForTableExpression(const QueryTreeNodePtr & tabl } /// Apply trivial_count optimization if possible - bool is_trivial_count_applied = is_single_table_expression && table_node && select_query_info.has_aggregates + bool is_trivial_count_applied = !select_query_options.only_analyze && is_single_table_expression && table_node && select_query_info.has_aggregates && applyTrivialCountIfPossible(query_plan, *table_node, select_query_info.query_tree, planner_context->getQueryContext(), columns_names); if (is_trivial_count_applied) { - if (!select_query_options.only_analyze) - from_stage = QueryProcessingStage::WithMergeableState; + from_stage = QueryProcessingStage::WithMergeableState; } else { From eb2ed1b123f76be4d23e61a97e6a958cecee2e36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Mar=C3=ADn?= Date: Fri, 3 Mar 2023 13:40:16 +0100 Subject: [PATCH 536/841] Add support for different expected errors --- src/Client/ClientBase.cpp | 43 +++++++------- src/Client/TestHint.cpp | 45 +++++++++++---- src/Client/TestHint.h | 57 +++++++++++++++++-- .../01470_columns_transformers.sql | 8 +-- 4 files changed, 111 insertions(+), 42 deletions(-) diff --git a/src/Client/ClientBase.cpp b/src/Client/ClientBase.cpp index 53eb5080130..b5c662b4a80 100644 --- a/src/Client/ClientBase.cpp +++ b/src/Client/ClientBase.cpp @@ -1834,7 +1834,7 @@ bool ClientBase::executeMultiQuery(const String & all_queries_text) { /// disable logs if expects errors TestHint test_hint(all_queries_text); - if (test_hint.clientError() || test_hint.serverError()) + if (!test_hint.clientErrors().empty() || !test_hint.serverErrors().empty()) processTextAsSingleQuery("SET send_logs_level = 'fatal'"); } @@ -1876,17 +1876,18 @@ bool ClientBase::executeMultiQuery(const String & all_queries_text) // the query ends because we failed to parse it, so we consume // the entire line. TestHint hint(String(this_query_begin, this_query_end - this_query_begin)); - if (hint.serverError()) + if (!hint.serverErrors().empty()) { // Syntax errors are considered as client errors - current_exception->addMessage("\nExpected server error '{}'.", hint.serverError()); + current_exception->addMessage("\nExpected server error: {}.", hint.serverErrors()); current_exception->rethrow(); } - if (hint.clientError() != current_exception->code()) + if (std::find(hint.clientErrors().begin(), hint.clientErrors().end(), current_exception->code()) + == hint.clientErrors().end()) { - if (hint.clientError()) - current_exception->addMessage("\nExpected client error: " + std::to_string(hint.clientError())); + if (!hint.clientErrors().empty()) + current_exception->addMessage("\nExpected client error: {}.", hint.clientErrors()); current_exception->rethrow(); } @@ -1935,37 +1936,41 @@ bool ClientBase::executeMultiQuery(const String & all_queries_text) bool error_matches_hint = true; if (have_error) { - if (test_hint.serverError()) + if (!test_hint.serverErrors().empty()) { if (!server_exception) { error_matches_hint = false; fmt::print(stderr, "Expected server error code '{}' but got no server error (query: {}).\n", - test_hint.serverError(), full_query); + test_hint.serverErrors(), full_query); } - else if (server_exception->code() != test_hint.serverError()) + else if ( + std::find(test_hint.serverErrors().begin(), test_hint.serverErrors().end(), server_exception->code()) + == test_hint.serverErrors().end()) { error_matches_hint = false; fmt::print(stderr, "Expected server error code: {} but got: {} (query: {}).\n", - test_hint.serverError(), server_exception->code(), full_query); + test_hint.serverErrors(), server_exception->code(), full_query); } } - if (test_hint.clientError()) + if (!test_hint.clientErrors().empty()) { if (!client_exception) { error_matches_hint = false; fmt::print(stderr, "Expected client error code '{}' but got no client error (query: {}).\n", - test_hint.clientError(), full_query); + test_hint.clientErrors(), full_query); } - else if (client_exception->code() != test_hint.clientError()) + else if ( + std::find(test_hint.clientErrors().begin(), test_hint.clientErrors().end(), client_exception->code()) + == test_hint.clientErrors().end()) { error_matches_hint = false; fmt::print(stderr, "Expected client error code '{}' but got '{}' (query: {}).\n", - test_hint.clientError(), client_exception->code(), full_query); + test_hint.clientErrors(), client_exception->code(), full_query); } } - if (!test_hint.clientError() && !test_hint.serverError()) + if (test_hint.clientErrors().empty() && test_hint.serverErrors().empty()) { // No error was expected but it still occurred. This is the // default case without test hint, doesn't need additional @@ -1975,19 +1980,19 @@ bool ClientBase::executeMultiQuery(const String & all_queries_text) } else { - if (test_hint.clientError()) + if (!test_hint.clientErrors().empty()) { error_matches_hint = false; fmt::print(stderr, "The query succeeded but the client error '{}' was expected (query: {}).\n", - test_hint.clientError(), full_query); + test_hint.clientErrors(), full_query); } - if (test_hint.serverError()) + if (!test_hint.serverErrors().empty()) { error_matches_hint = false; fmt::print(stderr, "The query succeeded but the server error '{}' was expected (query: {}).\n", - test_hint.serverError(), full_query); + test_hint.serverErrors(), full_query); } } diff --git a/src/Client/TestHint.cpp b/src/Client/TestHint.cpp index f6d1e5d73c3..adaae5fe5ee 100644 --- a/src/Client/TestHint.cpp +++ b/src/Client/TestHint.cpp @@ -6,25 +6,46 @@ #include #include +namespace DB::ErrorCodes +{ +extern const int CANNOT_PARSE_TEXT; +} + namespace { /// Parse error as number or as a string (name of the error code const) -int parseErrorCode(DB::ReadBufferFromString & in) +DB::TestHint::error_vector parseErrorCode(DB::ReadBufferFromString & in) { - int code = -1; - String code_name; + DB::TestHint::error_vector error_codes{}; - auto * pos = in.position(); - tryReadText(code, in); - if (pos != in.position()) + while (!in.eof()) { - return code; + int code = -1; + String code_name; + auto * pos = in.position(); + + tryReadText(code, in); + if (pos == in.position()) + { + readStringUntilWhitespace(code_name, in); + code = DB::ErrorCodes::getErrorCodeByName(code_name); + } + error_codes.push_back(code); + + if (in.eof()) + break; + skipWhitespaceIfAny(in); + if (in.eof()) + break; + char c; + in.readStrict(c); + if (c != '|') + throw DB::Exception(DB::ErrorCodes::CANNOT_PARSE_TEXT, "Expected separator '|'. Got '{}'", c); + skipWhitespaceIfAny(in); } - /// Try parse as string - readStringUntilWhitespace(code_name, in); - return DB::ErrorCodes::getErrorCodeByName(code_name); + return error_codes; } } @@ -85,9 +106,9 @@ void TestHint::parse(const String & hint, bool is_leading_hint) if (!is_leading_hint) { if (item == "serverError") - server_error = parseErrorCode(in); + server_errors = parseErrorCode(in); else if (item == "clientError") - client_error = parseErrorCode(in); + client_errors = parseErrorCode(in); } if (item == "echo") diff --git a/src/Client/TestHint.h b/src/Client/TestHint.h index 7fa4e86c025..30b3cacd3cb 100644 --- a/src/Client/TestHint.h +++ b/src/Client/TestHint.h @@ -1,6 +1,10 @@ #pragma once #include +#include + +#include + #include @@ -12,10 +16,13 @@ namespace DB /// The following comment hints are supported: /// /// - "-- { serverError 60 }" -- in case of you are expecting server error. +/// - "-- { serverError 16 | 36 }" -- in case of you are expecting one of the 2 errors /// /// - "-- { clientError 20 }" -- in case of you are expecting client error. +/// - "-- { clientError 20 | 60 | 92 }" -- It's expected that the client will return one of the 3 errors. /// /// - "-- { serverError FUNCTION_THROW_IF_VALUE_IS_NON_ZERO }" -- by error name. +/// - "-- { serverError NO_SUCH_COLUMN_IN_TABLE | BAD_ARGUMENTS }" -- by error name. /// /// - "-- { clientError FUNCTION_THROW_IF_VALUE_IS_NON_ZERO }" -- by error name. /// @@ -43,29 +50,67 @@ namespace DB class TestHint { public: + using error_vector = std::vector; TestHint(const String & query_); - int serverError() const { return server_error; } - int clientError() const { return client_error; } + const auto & serverErrors() const { return server_errors; } + const auto & clientErrors() const { return client_errors; } std::optional echoQueries() const { return echo; } private: const String & query; - int server_error = 0; - int client_error = 0; + error_vector server_errors{}; + error_vector client_errors{}; std::optional echo; void parse(const String & hint, bool is_leading_hint); bool allErrorsExpected(int actual_server_error, int actual_client_error) const { - return (server_error || client_error) && (server_error == actual_server_error) && (client_error == actual_client_error); + if (actual_server_error && std::find(server_errors.begin(), server_errors.end(), actual_server_error) == server_errors.end()) + return false; + if (!actual_server_error && server_errors.size()) + return false; + + if (actual_client_error && std::find(client_errors.begin(), client_errors.end(), actual_client_error) == client_errors.end()) + return false; + if (!actual_client_error && client_errors.size()) + return false; + + return true; } bool lostExpectedError(int actual_server_error, int actual_client_error) const { - return (server_error && !actual_server_error) || (client_error && !actual_client_error); + return (server_errors.size() && !actual_server_error) || (client_errors.size() && !actual_client_error); } }; } + +template <> +struct fmt::formatter +{ + static constexpr auto parse(format_parse_context & ctx) + { + const auto * it = ctx.begin(); + const auto * end = ctx.end(); + + /// Only support {}. + if (it != end && *it != '}') + throw format_error("Invalid format"); + + return it; + } + + template + auto format(const DB::TestHint::error_vector & error_vector, FormatContext & ctx) + { + if (error_vector.empty()) + return format_to(ctx.out(), "{}", 0); + else if (error_vector.size() == 1) + return format_to(ctx.out(), "{}", error_vector[0]); + else + return format_to(ctx.out(), "One of [{}]", fmt::join(error_vector, ", ")); + } +}; diff --git a/tests/queries/0_stateless/01470_columns_transformers.sql b/tests/queries/0_stateless/01470_columns_transformers.sql index 22c30ed36bf..7cff1920a4e 100644 --- a/tests/queries/0_stateless/01470_columns_transformers.sql +++ b/tests/queries/0_stateless/01470_columns_transformers.sql @@ -1,5 +1,3 @@ -SET allow_experimental_analyzer = 1; - DROP TABLE IF EXISTS columns_transformers; CREATE TABLE columns_transformers (i Int64, j Int16, k Int64) Engine=TinyLog; @@ -19,15 +17,15 @@ SELECT a.* APPLY(toDate) EXCEPT(i, j) APPLY(any) from columns_transformers a; SELECT * EXCEPT STRICT i from columns_transformers; SELECT * EXCEPT STRICT (i, j) from columns_transformers; SELECT * EXCEPT STRICT i, j1 from columns_transformers; -- { serverError 47 } -SELECT * EXCEPT STRICT(i, j1) from columns_transformers; -- { serverError 36 } +SELECT * EXCEPT STRICT(i, j1) from columns_transformers; -- { serverError NO_SUCH_COLUMN_IN_TABLE | BAD_ARGUMENTS } SELECT * REPLACE STRICT i + 1 AS i from columns_transformers; -SELECT * REPLACE STRICT(i + 1 AS col) from columns_transformers; -- { serverError 36 } +SELECT * REPLACE STRICT(i + 1 AS col) from columns_transformers; -- { serverError NO_SUCH_COLUMN_IN_TABLE | BAD_ARGUMENTS } SELECT * REPLACE(i + 1 AS i) APPLY(sum) from columns_transformers; SELECT columns_transformers.* REPLACE(j + 2 AS j, i + 1 AS i) APPLY(avg) from columns_transformers; SELECT columns_transformers.* REPLACE(j + 1 AS j, j + 2 AS j) APPLY(avg) from columns_transformers; -- { serverError 43 } -- REPLACE after APPLY will not match anything SELECT a.* APPLY(toDate) REPLACE(i + 1 AS i) APPLY(any) from columns_transformers a; -SELECT a.* APPLY(toDate) REPLACE STRICT(i + 1 AS i) APPLY(any) from columns_transformers a; -- { serverError 36 } +SELECT a.* APPLY(toDate) REPLACE STRICT(i + 1 AS i) APPLY(any) from columns_transformers a; -- { serverError NO_SUCH_COLUMN_IN_TABLE | BAD_ARGUMENTS } EXPLAIN SYNTAX SELECT * APPLY(sum) from columns_transformers; EXPLAIN SYNTAX SELECT columns_transformers.* APPLY(avg) from columns_transformers; From 6c43781d116fb48512df6a966ca5bf9b3859639b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Mar=C3=ADn?= Date: Fri, 3 Mar 2023 15:13:07 +0100 Subject: [PATCH 537/841] Try manually fixing tests --- .../0_stateless/00002_system_numbers.sql | 2 +- .../0_stateless/00386_has_column_in_table.sql | 10 +++++----- .../0_stateless/00718_format_datetime.sql | 18 +++++++++--------- .../queries/0_stateless/00975_values_list.sql | 4 ++-- .../0_stateless/01056_create_table_as.sql | 6 +++--- ...mize_skip_unused_shards_const_expr_eval.sql | 16 ++++++++-------- ...timize_skip_unused_shards_type_mismatch.sql | 2 +- .../01225_drop_dictionary_as_table.sql | 2 +- ...01225_show_create_table_from_dictionary.sql | 2 +- .../0_stateless/01231_log_queries_min_type.sql | 4 ++-- ...t_block_size_rows_for_materialized_views.sh | 2 +- tests/queries/0_stateless/01284_port.sql.j2 | 6 +++--- ...ctive_elimination_dictGet_BAD_ARGUMENTS.sql | 2 +- ..._GROUP_BY_injective_elimination_dictGet.sql | 2 +- .../01402_cast_nullable_string_to_enum.sql | 8 ++++---- .../01404_roundUpToPowerOfTwoOrZero_safety.sql | 2 +- .../0_stateless/01407_lambda_arrayJoin.sql | 2 +- .../0_stateless/01408_range_overflow.sql | 2 +- ..._trivial_count_with_partition_predicate.sql | 12 ++++++------ ...timize_aggregation_in_order_memory_long.sql | 4 ++-- .../01516_create_table_primary_key.sql | 2 +- ...terministic_optimize_skip_unused_shards.sql | 2 +- .../01530_drop_database_atomic_sync.sql | 2 +- .../01555_system_distribution_queue_mask.sql | 2 +- .../0_stateless/01592_toUnixTimestamp_Date.sql | 2 +- .../queries/0_stateless/01595_countMatches.sql | 4 ++-- .../01709_inactive_parts_to_throw_insert.sql | 2 +- .../01710_projection_with_mixed_pipeline.sql | 2 +- .../0_stateless/01888_read_int_safe.sql | 16 ++++++++-------- .../02008_tuple_to_name_value_pairs.sql | 8 ++++---- 30 files changed, 75 insertions(+), 75 deletions(-) diff --git a/tests/queries/0_stateless/00002_system_numbers.sql b/tests/queries/0_stateless/00002_system_numbers.sql index 95f75573201..d5934c7d387 100644 --- a/tests/queries/0_stateless/00002_system_numbers.sql +++ b/tests/queries/0_stateless/00002_system_numbers.sql @@ -6,7 +6,7 @@ SELECT number FROM system.numbers WHERE number >= 5 LIMIT 2; SELECT * FROM system.numbers WHERE number == 7 LIMIT 1; SELECT number AS n FROM system.numbers WHERE number IN(8, 9) LIMIT 2; select number from system.numbers limit 0; -select x from system.numbers limit 1; -- { clientError 0 serverError 47 } +select x from system.numbers limit 1; -- { serverError UNKNOWN_IDENTIFIER } SELECT x, number FROM system.numbers LIMIT 1; -- { serverError 47 } SELECT * FROM system.number LIMIT 1; -- { serverError 60 } SELECT * FROM system LIMIT 1; -- { serverError 60 } diff --git a/tests/queries/0_stateless/00386_has_column_in_table.sql b/tests/queries/0_stateless/00386_has_column_in_table.sql index d543bb42ca7..7347293e05b 100644 --- a/tests/queries/0_stateless/00386_has_column_in_table.sql +++ b/tests/queries/0_stateless/00386_has_column_in_table.sql @@ -21,11 +21,11 @@ SELECT hasColumnInTable('localhost', currentDatabase(), 'has_column_in_table', ' SELECT hasColumnInTable('system', 'one', ''); /* bad queries */ -SELECT hasColumnInTable('', '', ''); -- { serverError 60; } -SELECT hasColumnInTable('', 't', 'c'); -- { serverError 81; } -SELECT hasColumnInTable(currentDatabase(), '', 'c'); -- { serverError 60; } -SELECT hasColumnInTable('d', 't', 's'); -- { serverError 81; } -SELECT hasColumnInTable(currentDatabase(), 't', 's'); -- { serverError 60; } +SELECT hasColumnInTable('', '', ''); -- { serverError 60 } +SELECT hasColumnInTable('', 't', 'c'); -- { serverError 81 } +SELECT hasColumnInTable(currentDatabase(), '', 'c'); -- { serverError 60 } +SELECT hasColumnInTable('d', 't', 's'); -- { serverError 81 } +SELECT hasColumnInTable(currentDatabase(), 't', 's'); -- { serverError 60 } DROP TABLE has_column_in_table; diff --git a/tests/queries/0_stateless/00718_format_datetime.sql b/tests/queries/0_stateless/00718_format_datetime.sql index 74ec03d83d3..3f8c927dfe7 100644 --- a/tests/queries/0_stateless/00718_format_datetime.sql +++ b/tests/queries/0_stateless/00718_format_datetime.sql @@ -1,14 +1,14 @@ SET send_logs_level = 'fatal'; -SELECT formatDateTime(); -- { serverError NUMBER_OF_ARGUMENTS_DOESNT_MATCH (42) } -SELECT formatDateTime('not a datetime', 'IGNORED'); -- { serverError ILLEGAL_TYPE_OF_ARGUMENT (43) } -SELECT formatDateTime(now(), now()); -- { serverError ILLEGAL_TYPE_OF_ARGUMENT (43) } -SELECT formatDateTime(now(), 'good format pattern', now()); -- { serverError ILLEGAL_TYPE_OF_ARGUMENT (43) } -SELECT formatDateTime(now(), 'unescaped %'); -- { serverError BAD_ARGUMENTS (36) } -SELECT formatDateTime(toDateTime('2018-01-02 22:33:44'), '%U'); -- { serverError NOT_IMPLEMENTED (48) } -SELECT formatDateTime(toDateTime('2018-01-02 22:33:44'), '%v'); -- { serverError NOT_IMPLEMENTED (48) } -SELECT formatDateTime(toDateTime('2018-01-02 22:33:44'), '%x'); -- { serverError NOT_IMPLEMENTED (48) } -SELECT formatDateTime(toDateTime('2018-01-02 22:33:44'), '%X'); -- { serverError NOT_IMPLEMENTED (48) } +SELECT formatDateTime(); -- { serverError NUMBER_OF_ARGUMENTS_DOESNT_MATCH } +SELECT formatDateTime('not a datetime', 'IGNORED'); -- { serverError ILLEGAL_TYPE_OF_ARGUMENT } +SELECT formatDateTime(now(), now()); -- { serverError ILLEGAL_TYPE_OF_ARGUMENT } +SELECT formatDateTime(now(), 'good format pattern', now()); -- { serverError ILLEGAL_TYPE_OF_ARGUMENT } +SELECT formatDateTime(now(), 'unescaped %'); -- { serverError BAD_ARGUMENTS } +SELECT formatDateTime(toDateTime('2018-01-02 22:33:44'), '%U'); -- { serverError NOT_IMPLEMENTED } +SELECT formatDateTime(toDateTime('2018-01-02 22:33:44'), '%v'); -- { serverError NOT_IMPLEMENTED } +SELECT formatDateTime(toDateTime('2018-01-02 22:33:44'), '%x'); -- { serverError NOT_IMPLEMENTED } +SELECT formatDateTime(toDateTime('2018-01-02 22:33:44'), '%X'); -- { serverError NOT_IMPLEMENTED } SELECT formatDateTime(toDateTime('2018-01-02 22:33:44'), '%a'), formatDateTime(toDate32('2018-01-02'), '%a'); SELECT formatDateTime(toDateTime('2018-01-02 22:33:44'), '%b'), formatDateTime(toDate32('2018-01-02'), '%b'); diff --git a/tests/queries/0_stateless/00975_values_list.sql b/tests/queries/0_stateless/00975_values_list.sql index 40c86898966..35afc99e93e 100644 --- a/tests/queries/0_stateless/00975_values_list.sql +++ b/tests/queries/0_stateless/00975_values_list.sql @@ -12,8 +12,8 @@ SELECT * FROM VALUES('n UInt64, s String, ss String', (1 + 22, '23', toString(23 SELECT * FROM VALUES('a Decimal(4, 4), b String, c String', (divide(toDecimal32(5, 3), 3), 'a', 'b')); -SELECT * FROM VALUES('x Float64', toUInt64(-1)); -- { serverError 69; } -SELECT * FROM VALUES('x Float64', NULL); -- { serverError 53; } +SELECT * FROM VALUES('x Float64', toUInt64(-1)); -- { serverError 69 } +SELECT * FROM VALUES('x Float64', NULL); -- { serverError 53 } SELECT * FROM VALUES('x Nullable(Float64)', NULL); DROP TABLE values_list; diff --git a/tests/queries/0_stateless/01056_create_table_as.sql b/tests/queries/0_stateless/01056_create_table_as.sql index 62db8282ac0..2e146d67ca9 100644 --- a/tests/queries/0_stateless/01056_create_table_as.sql +++ b/tests/queries/0_stateless/01056_create_table_as.sql @@ -19,12 +19,12 @@ DROP TABLE t3; -- live view SET allow_experimental_live_view=1; CREATE LIVE VIEW lv AS SELECT * FROM t1; -CREATE TABLE t3 AS lv; -- { serverError 80; } +CREATE TABLE t3 AS lv; -- { serverError 80 } DROP TABLE lv; -- view CREATE VIEW v AS SELECT * FROM t1; -CREATE TABLE t3 AS v; -- { serverError 80; } +CREATE TABLE t3 AS v; -- { serverError 80 } DROP TABLE v; -- dictionary @@ -43,7 +43,7 @@ SOURCE(CLICKHOUSE( TABLE 'dict_data' DB 'test_01056_dict_data' USER 'default' PASSWORD '')) LIFETIME(MIN 0 MAX 0) LAYOUT(SPARSE_HASHED()); -CREATE TABLE t3 AS dict; -- { serverError 80; } +CREATE TABLE t3 AS dict; -- { serverError 80 } DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t3; diff --git a/tests/queries/0_stateless/01072_optimize_skip_unused_shards_const_expr_eval.sql b/tests/queries/0_stateless/01072_optimize_skip_unused_shards_const_expr_eval.sql index 85c239765bc..24eaaacb8bd 100644 --- a/tests/queries/0_stateless/01072_optimize_skip_unused_shards_const_expr_eval.sql +++ b/tests/queries/0_stateless/01072_optimize_skip_unused_shards_const_expr_eval.sql @@ -16,16 +16,16 @@ select * from dist_01072 where key=toInt32OrZero(toString(xxHash64(0))); select * from dist_01072 where key=toInt32(xxHash32(0)); select * from dist_01072 where key=toInt32(toInt32(xxHash32(0))); select * from dist_01072 where key=toInt32(toInt32(toInt32(xxHash32(0)))); -select * from dist_01072 where key=value; -- { serverError 507; } -select * from dist_01072 where key=toInt32(value); -- { serverError 507; } +select * from dist_01072 where key=value; -- { serverError 507 } +select * from dist_01072 where key=toInt32(value); -- { serverError 507 } select * from dist_01072 where key=value settings force_optimize_skip_unused_shards=0; select * from dist_01072 where key=toInt32(value) settings force_optimize_skip_unused_shards=0; drop table dist_01072; create table dist_01072 (key Int, value Nullable(Int), str String) Engine=Distributed(test_cluster_two_shards, currentDatabase(), data_01072, key%2); select * from dist_01072 where key=toInt32(xxHash32(0)); -select * from dist_01072 where key=value; -- { serverError 507; } -select * from dist_01072 where key=toInt32(value); -- { serverError 507; } +select * from dist_01072 where key=value; -- { serverError 507 } +select * from dist_01072 where key=toInt32(value); -- { serverError 507 } select * from dist_01072 where key=value settings force_optimize_skip_unused_shards=0; select * from dist_01072 where key=toInt32(value) settings force_optimize_skip_unused_shards=0; @@ -34,16 +34,16 @@ set allow_suspicious_low_cardinality_types=1; drop table dist_01072; create table dist_01072 (key Int, value LowCardinality(Int), str String) Engine=Distributed(test_cluster_two_shards, currentDatabase(), data_01072, key%2); select * from dist_01072 where key=toInt32(xxHash32(0)); -select * from dist_01072 where key=value; -- { serverError 507; } -select * from dist_01072 where key=toInt32(value); -- { serverError 507; } +select * from dist_01072 where key=value; -- { serverError 507 } +select * from dist_01072 where key=toInt32(value); -- { serverError 507 } select * from dist_01072 where key=value settings force_optimize_skip_unused_shards=0; select * from dist_01072 where key=toInt32(value) settings force_optimize_skip_unused_shards=0; drop table dist_01072; create table dist_01072 (key Int, value LowCardinality(Nullable(Int)), str String) Engine=Distributed(test_cluster_two_shards, currentDatabase(), data_01072, key%2); select * from dist_01072 where key=toInt32(xxHash32(0)); -select * from dist_01072 where key=value; -- { serverError 507; } -select * from dist_01072 where key=toInt32(value); -- { serverError 507; } +select * from dist_01072 where key=value; -- { serverError 507 } +select * from dist_01072 where key=toInt32(value); -- { serverError 507 } select * from dist_01072 where key=value settings force_optimize_skip_unused_shards=0; select * from dist_01072 where key=toInt32(value) settings force_optimize_skip_unused_shards=0; diff --git a/tests/queries/0_stateless/01211_optimize_skip_unused_shards_type_mismatch.sql b/tests/queries/0_stateless/01211_optimize_skip_unused_shards_type_mismatch.sql index 65adaf3ad71..de41132df62 100644 --- a/tests/queries/0_stateless/01211_optimize_skip_unused_shards_type_mismatch.sql +++ b/tests/queries/0_stateless/01211_optimize_skip_unused_shards_type_mismatch.sql @@ -9,7 +9,7 @@ create table data_02000 (key Int) Engine=Null(); create table dist_02000 as data_02000 Engine=Distributed(test_cluster_two_shards, currentDatabase(), data_02000, key); select * from data_02000 where key = 0xdeadbeafdeadbeaf; -select * from dist_02000 where key = 0xdeadbeafdeadbeaf settings force_optimize_skip_unused_shards=2; -- { serverError 507; } +select * from dist_02000 where key = 0xdeadbeafdeadbeaf settings force_optimize_skip_unused_shards=2; -- { serverError 507 } select * from dist_02000 where key = 0xdeadbeafdeadbeaf; drop table data_02000; diff --git a/tests/queries/0_stateless/01225_drop_dictionary_as_table.sql b/tests/queries/0_stateless/01225_drop_dictionary_as_table.sql index 513ecbd4ed4..be2f7b2a9bf 100644 --- a/tests/queries/0_stateless/01225_drop_dictionary_as_table.sql +++ b/tests/queries/0_stateless/01225_drop_dictionary_as_table.sql @@ -16,7 +16,7 @@ LAYOUT(FLAT()); SYSTEM RELOAD DICTIONARY dict_db_01225.dict; -DROP TABLE dict_db_01225.dict; -- { serverError 520; } +DROP TABLE dict_db_01225.dict; -- { serverError 520 } DROP DICTIONARY dict_db_01225.dict; DROP DATABASE dict_db_01225; diff --git a/tests/queries/0_stateless/01225_show_create_table_from_dictionary.sql b/tests/queries/0_stateless/01225_show_create_table_from_dictionary.sql index 09cde642ed2..bc733a0c546 100644 --- a/tests/queries/0_stateless/01225_show_create_table_from_dictionary.sql +++ b/tests/queries/0_stateless/01225_show_create_table_from_dictionary.sql @@ -18,7 +18,7 @@ LIFETIME(MIN 0 MAX 0) LAYOUT(FLAT()); SHOW CREATE TABLE dict_db_01225_dictionary.`dict_db_01225.dict` FORMAT TSVRaw; -SHOW CREATE TABLE dict_db_01225_dictionary.`dict_db_01225.no_such_dict`; -- { serverError 487; } +SHOW CREATE TABLE dict_db_01225_dictionary.`dict_db_01225.no_such_dict`; -- { serverError 487 } DROP DATABASE dict_db_01225; DROP DATABASE dict_db_01225_dictionary; diff --git a/tests/queries/0_stateless/01231_log_queries_min_type.sql b/tests/queries/0_stateless/01231_log_queries_min_type.sql index c2470bb9a56..0ed5e3e605c 100644 --- a/tests/queries/0_stateless/01231_log_queries_min_type.sql +++ b/tests/queries/0_stateless/01231_log_queries_min_type.sql @@ -15,7 +15,7 @@ select count() from system.query_log where current_database = currentDatabase() set max_rows_to_read='100K'; set log_queries_min_type='EXCEPTION_WHILE_PROCESSING'; -select '01231_log_queries_min_type/EXCEPTION_WHILE_PROCESSING', max(number) from system.numbers limit 1e6; -- { serverError 158; } +select '01231_log_queries_min_type/EXCEPTION_WHILE_PROCESSING', max(number) from system.numbers limit 1e6; -- { serverError 158 } set max_rows_to_read=0; system flush logs; select count() from system.query_log where current_database = currentDatabase() @@ -23,7 +23,7 @@ select count() from system.query_log where current_database = currentDatabase() and event_date >= yesterday() and type = 'ExceptionWhileProcessing'; set max_rows_to_read='100K'; -select '01231_log_queries_min_type w/ Settings/EXCEPTION_WHILE_PROCESSING', max(number) from system.numbers limit 1e6; -- { serverError 158; } +select '01231_log_queries_min_type w/ Settings/EXCEPTION_WHILE_PROCESSING', max(number) from system.numbers limit 1e6; -- { serverError 158 } system flush logs; set max_rows_to_read=0; select count() from system.query_log where diff --git a/tests/queries/0_stateless/01278_min_insert_block_size_rows_for_materialized_views.sh b/tests/queries/0_stateless/01278_min_insert_block_size_rows_for_materialized_views.sh index 0e258bbbb09..08cc97c84bf 100755 --- a/tests/queries/0_stateless/01278_min_insert_block_size_rows_for_materialized_views.sh +++ b/tests/queries/0_stateless/01278_min_insert_block_size_rows_for_materialized_views.sh @@ -76,7 +76,7 @@ insert into data_01278 select reinterpretAsString(number), // s6 reinterpretAsString(number), // s7 reinterpretAsString(number) // s8 -from numbers(100000); -- { serverError 241; }" > /dev/null 2>&1 +from numbers(100000); -- { serverError 241 }" > /dev/null 2>&1 local ret_code=$? if [[ $ret_code -eq 0 ]]; then diff --git a/tests/queries/0_stateless/01284_port.sql.j2 b/tests/queries/0_stateless/01284_port.sql.j2 index 6f78b3b8e3b..50e096c6deb 100644 --- a/tests/queries/0_stateless/01284_port.sql.j2 +++ b/tests/queries/0_stateless/01284_port.sql.j2 @@ -19,9 +19,9 @@ select port{{ suffix }}('http://127.0.0.1/', toUInt16(80)); select port{{ suffix }}('http://foobar.com/', toUInt16(80)); -- unsupported -/* ILLEGAL_TYPE_OF_ARGUMENT */ select port(toFixedString('', 1)); -- { serverError 43; } -/* ILLEGAL_TYPE_OF_ARGUMENT */ select port{{ suffix }}('', 1); -- { serverError 43; } -/* NUMBER_OF_ARGUMENTS_DOESNT_MATCH */ select port{{ suffix }}('', 1, 1); -- { serverError 42; } +/* ILLEGAL_TYPE_OF_ARGUMENT */ select port(toFixedString('', 1)); -- { serverError 43 } +/* ILLEGAL_TYPE_OF_ARGUMENT */ select port{{ suffix }}('', 1); -- { serverError 43 } +/* NUMBER_OF_ARGUMENTS_DOESNT_MATCH */ select port{{ suffix }}('', 1, 1); -- { serverError 42 } -- -- Known limitations of domain() (getURLHost()) diff --git a/tests/queries/0_stateless/01375_GROUP_BY_injective_elimination_dictGet_BAD_ARGUMENTS.sql b/tests/queries/0_stateless/01375_GROUP_BY_injective_elimination_dictGet_BAD_ARGUMENTS.sql index 88a2b25c2db..8ff9cd2b9f2 100644 --- a/tests/queries/0_stateless/01375_GROUP_BY_injective_elimination_dictGet_BAD_ARGUMENTS.sql +++ b/tests/queries/0_stateless/01375_GROUP_BY_injective_elimination_dictGet_BAD_ARGUMENTS.sql @@ -1 +1 @@ -SELECT dictGetString(concat('default', '.countryId'), 'country', toUInt64(number)) AS country FROM numbers(2) GROUP BY country; -- { serverError 36; } +SELECT dictGetString(concat('default', '.countryId'), 'country', toUInt64(number)) AS country FROM numbers(2) GROUP BY country; -- { serverError 36 } diff --git a/tests/queries/0_stateless/01376_GROUP_BY_injective_elimination_dictGet.sql b/tests/queries/0_stateless/01376_GROUP_BY_injective_elimination_dictGet.sql index 258d96829a5..29ffcb46fbf 100644 --- a/tests/queries/0_stateless/01376_GROUP_BY_injective_elimination_dictGet.sql +++ b/tests/queries/0_stateless/01376_GROUP_BY_injective_elimination_dictGet.sql @@ -1,7 +1,7 @@ -- Tags: no-parallel -- https://github.com/ClickHouse/ClickHouse/issues/11469 -SELECT dictGet('default.countryId', 'country', toUInt64(number)) AS country FROM numbers(2) GROUP BY country; -- { serverError 36; } +SELECT dictGet('default.countryId', 'country', toUInt64(number)) AS country FROM numbers(2) GROUP BY country; -- { serverError 36 } -- with real dictionary diff --git a/tests/queries/0_stateless/01402_cast_nullable_string_to_enum.sql b/tests/queries/0_stateless/01402_cast_nullable_string_to_enum.sql index 3b53e593095..b8b5370515a 100644 --- a/tests/queries/0_stateless/01402_cast_nullable_string_to_enum.sql +++ b/tests/queries/0_stateless/01402_cast_nullable_string_to_enum.sql @@ -5,9 +5,9 @@ SELECT CAST(CAST(NULL AS Nullable(String)) AS Nullable(Enum8('Hello' = 1))); SELECT CAST(CAST(NULL AS Nullable(FixedString(1))) AS Nullable(Enum8('Hello' = 1))); -- empty string still not acceptable -SELECT CAST(CAST('' AS Nullable(String)) AS Nullable(Enum8('Hello' = 1))); -- { serverError 36; } -SELECT CAST(CAST('' AS Nullable(FixedString(1))) AS Nullable(Enum8('Hello' = 1))); -- { serverError 36; } +SELECT CAST(CAST('' AS Nullable(String)) AS Nullable(Enum8('Hello' = 1))); -- { serverError 36 } +SELECT CAST(CAST('' AS Nullable(FixedString(1))) AS Nullable(Enum8('Hello' = 1))); -- { serverError 36 } -- non-Nullable Enum() still not acceptable -SELECT CAST(CAST(NULL AS Nullable(String)) AS Enum8('Hello' = 1)); -- { serverError 349; } -SELECT CAST(CAST(NULL AS Nullable(FixedString(1))) AS Enum8('Hello' = 1)); -- { serverError 349; } +SELECT CAST(CAST(NULL AS Nullable(String)) AS Enum8('Hello' = 1)); -- { serverError 349 } +SELECT CAST(CAST(NULL AS Nullable(FixedString(1))) AS Enum8('Hello' = 1)); -- { serverError 349 } diff --git a/tests/queries/0_stateless/01404_roundUpToPowerOfTwoOrZero_safety.sql b/tests/queries/0_stateless/01404_roundUpToPowerOfTwoOrZero_safety.sql index 4ee6e1fa5e4..d61a35c9999 100644 --- a/tests/queries/0_stateless/01404_roundUpToPowerOfTwoOrZero_safety.sql +++ b/tests/queries/0_stateless/01404_roundUpToPowerOfTwoOrZero_safety.sql @@ -1,4 +1,4 @@ -- repeat() with this length and this number of rows will allocation huge enough region (MSB set), -- which will cause roundUpToPowerOfTwoOrZero() returns 0 for such allocation (before the fix), -- and later repeat() will try to use this memory and will got SIGSEGV. -SELECT repeat('0.0001048576', number * (number * (number * 255))) FROM numbers(65535); -- { serverError 131; } +SELECT repeat('0.0001048576', number * (number * (number * 255))) FROM numbers(65535); -- { serverError 131 } diff --git a/tests/queries/0_stateless/01407_lambda_arrayJoin.sql b/tests/queries/0_stateless/01407_lambda_arrayJoin.sql index 363b1d92dbb..e1b8c1d5a76 100644 --- a/tests/queries/0_stateless/01407_lambda_arrayJoin.sql +++ b/tests/queries/0_stateless/01407_lambda_arrayJoin.sql @@ -1,5 +1,5 @@ SELECT arrayFilter((a) -> ((a, arrayJoin([])) IN (Null, [Null])), []); SELECT arrayFilter((a) -> ((a, arrayJoin([[]])) IN (Null, [Null])), []); -SELECT * FROM system.one ARRAY JOIN arrayFilter((a) -> ((a, arrayJoin([])) IN (NULL)), []) AS arr_x; -- { serverError 43; } +SELECT * FROM system.one ARRAY JOIN arrayFilter((a) -> ((a, arrayJoin([])) IN (NULL)), []) AS arr_x; -- { serverError 43 } SELECT * FROM numbers(1) LEFT ARRAY JOIN arrayFilter((x_0, x_1) -> (arrayJoin([]) IN (NULL)), [], []) AS arr_x; diff --git a/tests/queries/0_stateless/01408_range_overflow.sql b/tests/queries/0_stateless/01408_range_overflow.sql index 2107e8c3f36..d26507f8358 100644 --- a/tests/queries/0_stateless/01408_range_overflow.sql +++ b/tests/queries/0_stateless/01408_range_overflow.sql @@ -1,7 +1,7 @@ -- executeGeneric() SELECT range(1025, 1048576 + 9223372036854775807, 9223372036854775807); SELECT range(1025, 1048576 + (9223372036854775807 AS i), i); -SELECT range(1025, 18446744073709551615, 1); -- { serverError 69; } +SELECT range(1025, 18446744073709551615, 1); -- { serverError 69 } -- executeConstStep() SELECT range(number, 1048576 + 9223372036854775807, 9223372036854775807) FROM system.numbers LIMIT 1 OFFSET 1025; diff --git a/tests/queries/0_stateless/01505_trivial_count_with_partition_predicate.sql b/tests/queries/0_stateless/01505_trivial_count_with_partition_predicate.sql index e4e2e3dd76a..e8643a4468c 100644 --- a/tests/queries/0_stateless/01505_trivial_count_with_partition_predicate.sql +++ b/tests/queries/0_stateless/01505_trivial_count_with_partition_predicate.sql @@ -7,16 +7,16 @@ insert into test1 values ('2020-09-01 00:01:02', 1), ('2020-09-01 20:01:03', 2), set max_rows_to_read = 1; -- non-optimized -select count() from test1 settings max_parallel_replicas = 3; -- { serverError 158; } +select count() from test1 settings max_parallel_replicas = 3; -- { serverError 158 } -- optimized (toYear is monotonic and we provide the partition expr as is) select count() from test1 where toYear(toDate(p)) = 1999; -- non-optimized (toDate(DateTime) is always monotonic, but we cannot relaxing the predicates to do trivial count()) -select count() from test1 where p > toDateTime('2020-09-01 10:00:00'); -- { serverError 158; } +select count() from test1 where p > toDateTime('2020-09-01 10:00:00'); -- { serverError 158 } -- optimized (partition expr wrapped with non-monotonic functions) select count() FROM test1 where toDate(p) = '2020-09-01' and sipHash64(toString(toDate(p))) % 2 = 1; select count() FROM test1 where toDate(p) = '2020-09-01' and sipHash64(toString(toDate(p))) % 2 = 0; -- non-optimized (some predicate depends on non-partition_expr columns) -select count() FROM test1 where toDate(p) = '2020-09-01' and k = 2; -- { serverError 158; } +select count() FROM test1 where toDate(p) = '2020-09-01' and k = 2; -- { serverError 158 } -- optimized select count() from test1 where toDate(p) > '2020-09-01'; -- non-optimized @@ -35,10 +35,10 @@ select count() from test_tuple where i > 2; -- optimized select count() from test_tuple where i < 1; -- non-optimized -select count() from test_tuple array join [p,p] as c where toDate(p) = '2020-09-01'; -- { serverError 158; } +select count() from test_tuple array join [p,p] as c where toDate(p) = '2020-09-01'; -- { serverError 158 } select count() from test_tuple array join [1,2] as c where toDate(p) = '2020-09-01' settings max_rows_to_read = 4; -- non-optimized -select count() from test_tuple array join [1,2,3] as c where toDate(p) = '2020-09-01'; -- { serverError 158; } +select count() from test_tuple array join [1,2,3] as c where toDate(p) = '2020-09-01'; -- { serverError 158 } select count() from test_tuple array join [1,2,3] as c where toDate(p) = '2020-09-01' settings max_rows_to_read = 6; create table test_two_args(i int, j int, k int) engine MergeTree partition by i + j order by k settings index_granularity = 1; @@ -48,7 +48,7 @@ insert into test_two_args values (1, 2, 3), (2, 1, 3), (0, 3, 4); -- optimized select count() from test_two_args where i + j = 3; -- non-optimized -select count() from test_two_args where i = 1; -- { serverError 158; } +select count() from test_two_args where i = 1; -- { serverError 158 } drop table test1; drop table test_tuple; diff --git a/tests/queries/0_stateless/01513_optimize_aggregation_in_order_memory_long.sql b/tests/queries/0_stateless/01513_optimize_aggregation_in_order_memory_long.sql index 228e4d73167..3d57518d0f4 100644 --- a/tests/queries/0_stateless/01513_optimize_aggregation_in_order_memory_long.sql +++ b/tests/queries/0_stateless/01513_optimize_aggregation_in_order_memory_long.sql @@ -13,9 +13,9 @@ set max_memory_usage='500M'; set max_threads=1; set max_block_size=500; -select key, groupArray(repeat('a', 200)), count() from data_01513 group by key format Null settings optimize_aggregation_in_order=0; -- { serverError 241; } +select key, groupArray(repeat('a', 200)), count() from data_01513 group by key format Null settings optimize_aggregation_in_order=0; -- { serverError 241 } select key, groupArray(repeat('a', 200)), count() from data_01513 group by key format Null settings optimize_aggregation_in_order=1; -- for WITH TOTALS previous groups should be kept. -select key, groupArray(repeat('a', 200)), count() from data_01513 group by key with totals format Null settings optimize_aggregation_in_order=1; -- { serverError 241; } +select key, groupArray(repeat('a', 200)), count() from data_01513 group by key with totals format Null settings optimize_aggregation_in_order=1; -- { serverError 241 } drop table data_01513; diff --git a/tests/queries/0_stateless/01516_create_table_primary_key.sql b/tests/queries/0_stateless/01516_create_table_primary_key.sql index b2b9f288eab..630c573c2cc 100644 --- a/tests/queries/0_stateless/01516_create_table_primary_key.sql +++ b/tests/queries/0_stateless/01516_create_table_primary_key.sql @@ -35,7 +35,7 @@ ATTACH TABLE primary_key_test(v1 Int32, v2 Int32) ENGINE=ReplacingMergeTree ORDE SELECT * FROM primary_key_test FINAL; DROP TABLE primary_key_test; -CREATE TABLE primary_key_test(v1 Int64, v2 Int32, v3 String, PRIMARY KEY(v1, gcd(v1, v2))) ENGINE=ReplacingMergeTree ORDER BY v1; -- { serverError 36; } +CREATE TABLE primary_key_test(v1 Int64, v2 Int32, v3 String, PRIMARY KEY(v1, gcd(v1, v2))) ENGINE=ReplacingMergeTree ORDER BY v1; -- { serverError 36 } CREATE TABLE primary_key_test(v1 Int64, v2 Int32, v3 String, PRIMARY KEY(v1, gcd(v1, v2))) ENGINE=ReplacingMergeTree ORDER BY (v1, gcd(v1, v2)); diff --git a/tests/queries/0_stateless/01528_allow_nondeterministic_optimize_skip_unused_shards.sql b/tests/queries/0_stateless/01528_allow_nondeterministic_optimize_skip_unused_shards.sql index 08fba7480d1..ac04178e585 100644 --- a/tests/queries/0_stateless/01528_allow_nondeterministic_optimize_skip_unused_shards.sql +++ b/tests/queries/0_stateless/01528_allow_nondeterministic_optimize_skip_unused_shards.sql @@ -5,7 +5,7 @@ create table dist_01528 as system.one engine=Distributed('test_cluster_two_shard set optimize_skip_unused_shards=1; set force_optimize_skip_unused_shards=1; -select * from dist_01528 where dummy = 2; -- { serverError 507; } +select * from dist_01528 where dummy = 2; -- { serverError 507 } select * from dist_01528 where dummy = 2 settings allow_nondeterministic_optimize_skip_unused_shards=1; drop table dist_01528; diff --git a/tests/queries/0_stateless/01530_drop_database_atomic_sync.sql b/tests/queries/0_stateless/01530_drop_database_atomic_sync.sql index 7a2e64742cf..13b4a4e331b 100644 --- a/tests/queries/0_stateless/01530_drop_database_atomic_sync.sql +++ b/tests/queries/0_stateless/01530_drop_database_atomic_sync.sql @@ -30,7 +30,7 @@ create table db_01530_atomic.data (key Int) Engine=ReplicatedMergeTree('/clickho drop database db_01530_atomic; create database db_01530_atomic Engine=Atomic; -create table db_01530_atomic.data (key Int) Engine=ReplicatedMergeTree('/clickhouse/tables/{database}/db_01530_atomic/data', 'test') order by key; -- { serverError 253; } +create table db_01530_atomic.data (key Int) Engine=ReplicatedMergeTree('/clickhouse/tables/{database}/db_01530_atomic/data', 'test') order by key; -- { serverError 253 } set database_atomic_wait_for_drop_and_detach_synchronously=1; diff --git a/tests/queries/0_stateless/01555_system_distribution_queue_mask.sql b/tests/queries/0_stateless/01555_system_distribution_queue_mask.sql index fea75e1439f..f19c77c68a3 100644 --- a/tests/queries/0_stateless/01555_system_distribution_queue_mask.sql +++ b/tests/queries/0_stateless/01555_system_distribution_queue_mask.sql @@ -17,7 +17,7 @@ create table dist_01555 (key Int) Engine=Distributed(test_cluster_with_incorrect insert into dist_01555 values (1)(2); -- since test_cluster_with_incorrect_pw contains incorrect password ignore error -system flush distributed dist_01555; -- { serverError 516; } +system flush distributed dist_01555; -- { serverError 516 } select length(splitByChar('*', data_path)), replaceRegexpOne(data_path, '^.*/([^/]*)/' , '\\1'), extract(last_exception, 'AUTHENTICATION_FAILED'), dateDiff('s', last_exception_time, now()) < 5 from system.distribution_queue where database = currentDatabase() and table = 'dist_01555' format CSV; drop table dist_01555; diff --git a/tests/queries/0_stateless/01592_toUnixTimestamp_Date.sql b/tests/queries/0_stateless/01592_toUnixTimestamp_Date.sql index 5dc87e31f75..e8411484d71 100644 --- a/tests/queries/0_stateless/01592_toUnixTimestamp_Date.sql +++ b/tests/queries/0_stateless/01592_toUnixTimestamp_Date.sql @@ -1 +1 @@ -select toUnixTimestamp(today()); -- { serverError 44; } +select toUnixTimestamp(today()); -- { serverError 44 } diff --git a/tests/queries/0_stateless/01595_countMatches.sql b/tests/queries/0_stateless/01595_countMatches.sql index 6374fe7bc5b..0b170945d44 100644 --- a/tests/queries/0_stateless/01595_countMatches.sql +++ b/tests/queries/0_stateless/01595_countMatches.sql @@ -25,5 +25,5 @@ select countMatchesCaseInsensitive('foo.com BAR.COM baz.com bam.com', '([^. ]+)\ select countMatchesCaseInsensitive('foo.com@foo.com bar.com@foo.com BAZ.com@foo.com bam.com@foo.com', '([^. ]+)\.([^. ]+)@([^. ]+)\.([^. ]+)'); select 'errors'; -select countMatches(1, 'foo') from numbers(1); -- { serverError 43; } -select countMatches('foobarfoo', toString(number)) from numbers(1); -- { serverError 44; } +select countMatches(1, 'foo') from numbers(1); -- { serverError 43 } +select countMatches('foobarfoo', toString(number)) from numbers(1); -- { serverError 44 } diff --git a/tests/queries/0_stateless/01709_inactive_parts_to_throw_insert.sql b/tests/queries/0_stateless/01709_inactive_parts_to_throw_insert.sql index 6de0d4f4e0c..2bb92aec713 100644 --- a/tests/queries/0_stateless/01709_inactive_parts_to_throw_insert.sql +++ b/tests/queries/0_stateless/01709_inactive_parts_to_throw_insert.sql @@ -7,6 +7,6 @@ insert into data_01709 values (2); optimize table data_01709 final; -insert into data_01709 values (3); -- { serverError 252; } +insert into data_01709 values (3); -- { serverError 252 } drop table data_01709; diff --git a/tests/queries/0_stateless/01710_projection_with_mixed_pipeline.sql b/tests/queries/0_stateless/01710_projection_with_mixed_pipeline.sql index 734aa659146..5169c667b81 100644 --- a/tests/queries/0_stateless/01710_projection_with_mixed_pipeline.sql +++ b/tests/queries/0_stateless/01710_projection_with_mixed_pipeline.sql @@ -4,6 +4,6 @@ create table t (x UInt32) engine = MergeTree order by tuple() settings index_gra insert into t select number from numbers(100); alter table t add projection p (select uniqHLL12(x)); insert into t select number + 100 from numbers(100); -select uniqHLL12(x) from t settings allow_experimental_projection_optimization = 1, max_bytes_to_read=400, max_block_size=8; -- { serverError 307; } +select uniqHLL12(x) from t settings allow_experimental_projection_optimization = 1, max_bytes_to_read=400, max_block_size=8; -- { serverError 307 } drop table if exists t; diff --git a/tests/queries/0_stateless/01888_read_int_safe.sql b/tests/queries/0_stateless/01888_read_int_safe.sql index 3aea8e38ab0..197338775c4 100644 --- a/tests/queries/0_stateless/01888_read_int_safe.sql +++ b/tests/queries/0_stateless/01888_read_int_safe.sql @@ -1,10 +1,10 @@ -select toInt64('--1'); -- { serverError 72; } -select toInt64('+-1'); -- { serverError 72; } -select toInt64('++1'); -- { serverError 72; } -select toInt64('++'); -- { serverError 72; } -select toInt64('+'); -- { serverError 72; } -select toInt64('1+1'); -- { serverError 6; } -select toInt64('1-1'); -- { serverError 6; } -select toInt64(''); -- { serverError 32; } +select toInt64('--1'); -- { serverError 72 } +select toInt64('+-1'); -- { serverError 72 } +select toInt64('++1'); -- { serverError 72 } +select toInt64('++'); -- { serverError 72 } +select toInt64('+'); -- { serverError 72 } +select toInt64('1+1'); -- { serverError 6 } +select toInt64('1-1'); -- { serverError 6 } +select toInt64(''); -- { serverError 32 } select toInt64('1'); select toInt64('-1'); diff --git a/tests/queries/0_stateless/02008_tuple_to_name_value_pairs.sql b/tests/queries/0_stateless/02008_tuple_to_name_value_pairs.sql index 59987a86590..1f6026bb61e 100644 --- a/tests/queries/0_stateless/02008_tuple_to_name_value_pairs.sql +++ b/tests/queries/0_stateless/02008_tuple_to_name_value_pairs.sql @@ -19,7 +19,7 @@ INSERT INTO test02008 VALUES (tuple(3.3, 5.5, 6.6)); SELECT untuple(arrayJoin(tupleToNameValuePairs(col))) from test02008; DROP TABLE IF EXISTS test02008; -SELECT tupleToNameValuePairs(tuple(1, 1.3)); -- { serverError 43; } -SELECT tupleToNameValuePairs(tuple(1, [1,2])); -- { serverError 43; } -SELECT tupleToNameValuePairs(tuple(1, 'a')); -- { serverError 43; } -SELECT tupleToNameValuePairs(33); -- { serverError 43; } +SELECT tupleToNameValuePairs(tuple(1, 1.3)); -- { serverError 43 } +SELECT tupleToNameValuePairs(tuple(1, [1,2])); -- { serverError 43 } +SELECT tupleToNameValuePairs(tuple(1, 'a')); -- { serverError 43 } +SELECT tupleToNameValuePairs(33); -- { serverError 43 } From cb3dd3c2009ac2c5ab9e397dbf91675472f0611c Mon Sep 17 00:00:00 2001 From: kssenii Date: Mon, 6 Mar 2023 13:06:31 +0100 Subject: [PATCH 538/841] Fix flaky test --- tests/integration/test_filesystem_layout/test.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/integration/test_filesystem_layout/test.py b/tests/integration/test_filesystem_layout/test.py index 898bbc40eb9..2be478f95d0 100644 --- a/tests/integration/test_filesystem_layout/test.py +++ b/tests/integration/test_filesystem_layout/test.py @@ -44,8 +44,6 @@ def test_file_path_escaping(started_cluster): ] ) - -def test_file_path_escaping_atomic_db(started_cluster): node.query("CREATE DATABASE IF NOT EXISTS `test 2` ENGINE = Atomic") node.query( """ From aa776d00fec38fc80c4ed584fe46e9d0a82ac3fd Mon Sep 17 00:00:00 2001 From: Kruglov Pavel <48961922+Avogar@users.noreply.github.com> Date: Mon, 6 Mar 2023 13:24:36 +0100 Subject: [PATCH 539/841] Use executors snapshot --- src/Interpreters/ProcessList.cpp | 33 +++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/src/Interpreters/ProcessList.cpp b/src/Interpreters/ProcessList.cpp index 37cb9ee599f..bf452775d27 100644 --- a/src/Interpreters/ProcessList.cpp +++ b/src/Interpreters/ProcessList.cpp @@ -397,23 +397,26 @@ CancellationCode QueryStatus::cancelQuery(bool) is_killed.store(true); - std::unique_lock lock(executors_mutex); - for (const auto & e : executors) + std::vector executors_snapshot; + { - /// We should call cancel() with unlocked executors_mutex, because - /// cancel() can try to lock some internal mutex that is already locked by query executing - /// thread, and query executing thread can call removePipelineExecutor and lock executors_mutex, - /// which will lead to deadlock. - /// Note that the size and the content of executors cannot be changed while - /// executors_mutex is unlocked, because: - /// 1) We don't allow adding new executors while cancelling query in addPipelineExecutor - /// 2) We don't actually remove executor holder from executors in removePipelineExecutor, - /// just mark that executor is invalid. - /// So, it's safe to continue iteration over executors after subsequent mutex locking. - lock.unlock(); - e->cancel(); - lock.lock(); + /// Create a snapshot of executors under a mutex. + std::lock_guard lock(executors_mutex); + executors_snapshot = executors; } + + /// We should call cancel() for each executor with unlocked executors_mutex, because + /// cancel() can try to lock some internal mutex that is already locked by query executing + /// thread, and query executing thread can call removePipelineExecutor and lock executors_mutex, + /// which will lead to deadlock. + /// Note that the size and the content of executors cannot be changed while + /// executors_mutex is unlocked, because: + /// 1) We don't allow adding new executors while cancelling query in addPipelineExecutor + /// 2) We don't actually remove executor holder from executors in removePipelineExecutor, + /// just mark that executor is invalid. + /// So, it's ok to use a snapshot created above under a mutex, it won't be any differ from actual executors. + for (const auto & e : executors_shapshot) + e->cancel(); return CancellationCode::CancelSent; } From 9117c7491dde2fbe4e01a90f44cd433f5521c9cc Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Mon, 6 Mar 2023 12:55:02 +0000 Subject: [PATCH 540/841] Join threads if exception happened in constructor --- src/Common/ZooKeeper/ZooKeeperImpl.cpp | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/Common/ZooKeeper/ZooKeeperImpl.cpp b/src/Common/ZooKeeper/ZooKeeperImpl.cpp index 1fbdd857379..b637bdea835 100644 --- a/src/Common/ZooKeeper/ZooKeeperImpl.cpp +++ b/src/Common/ZooKeeper/ZooKeeperImpl.cpp @@ -358,12 +358,27 @@ ZooKeeper::ZooKeeper( if (!args.auth_scheme.empty()) sendAuth(args.auth_scheme, args.identity); - send_thread = ThreadFromGlobalPool([this] { sendThread(); }); - receive_thread = ThreadFromGlobalPool([this] { receiveThread(); }); + try + { + send_thread = ThreadFromGlobalPool([this] { sendThread(); }); + receive_thread = ThreadFromGlobalPool([this] { receiveThread(); }); - initApiVersion(); + initApiVersion(); - ProfileEvents::increment(ProfileEvents::ZooKeeperInit); + ProfileEvents::increment(ProfileEvents::ZooKeeperInit); + } + catch (...) + { + tryLogCurrentException(log, "Failed to connect to ZooKeeper"); + + if (send_thread.joinable()) + send_thread.join(); + + if (receive_thread.joinable()) + receive_thread.join(); + + throw; + } } From 13bda10470f9e710bf7b6a287f33b8700f34f4a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Mar=C3=ADn?= Date: Mon, 6 Mar 2023 14:14:03 +0100 Subject: [PATCH 541/841] Reimplement hints using the parser --- src/Client/TestHint.cpp | 139 +++++++++--------- src/Client/TestHint.h | 4 +- .../01470_columns_transformers.sql | 6 +- 3 files changed, 78 insertions(+), 71 deletions(-) diff --git a/src/Client/TestHint.cpp b/src/Client/TestHint.cpp index adaae5fe5ee..c9e845f2039 100644 --- a/src/Client/TestHint.cpp +++ b/src/Client/TestHint.cpp @@ -1,55 +1,17 @@ -#include "TestHint.h" +#include +#include + +#include -#include -#include -#include -#include #include +#include +#include namespace DB::ErrorCodes { extern const int CANNOT_PARSE_TEXT; } -namespace -{ - -/// Parse error as number or as a string (name of the error code const) -DB::TestHint::error_vector parseErrorCode(DB::ReadBufferFromString & in) -{ - DB::TestHint::error_vector error_codes{}; - - while (!in.eof()) - { - int code = -1; - String code_name; - auto * pos = in.position(); - - tryReadText(code, in); - if (pos == in.position()) - { - readStringUntilWhitespace(code_name, in); - code = DB::ErrorCodes::getErrorCodeByName(code_name); - } - error_codes.push_back(code); - - if (in.eof()) - break; - skipWhitespaceIfAny(in); - if (in.eof()) - break; - char c; - in.readStrict(c); - if (c != '|') - throw DB::Exception(DB::ErrorCodes::CANNOT_PARSE_TEXT, "Expected separator '|'. Got '{}'", c); - skipWhitespaceIfAny(in); - } - - return error_codes; -} - -} - namespace DB { @@ -81,8 +43,8 @@ TestHint::TestHint(const String & query_) size_t pos_end = comment.find('}', pos_start); if (pos_end != String::npos) { - String hint(comment.begin() + pos_start + 1, comment.begin() + pos_end); - parse(hint, is_leading_hint); + Lexer comment_lexer(comment.c_str() + pos_start + 1, comment.c_str() + pos_end, 0); + parse(comment_lexer, is_leading_hint); } } } @@ -90,33 +52,76 @@ TestHint::TestHint(const String & query_) } } -void TestHint::parse(const String & hint, bool is_leading_hint) +void TestHint::parse(Lexer & comment_lexer, bool is_leading_hint) { - ReadBufferFromString in(hint); - String item; + std::unordered_set commands{"echo", "echoOn", "echoOff"}; - while (!in.eof()) + std::unordered_set command_errors{ + "serverError", + "clientError", + }; + + for (Token token = comment_lexer.nextToken(); !token.isEnd(); token = comment_lexer.nextToken()) { - readStringUntilWhitespace(item, in); - if (in.eof()) - break; - - skipWhitespaceIfAny(in); - - if (!is_leading_hint) + String item = String(token.begin, token.end); + if (token.type == TokenType::BareWord && commands.contains(item)) { - if (item == "serverError") - server_errors = parseErrorCode(in); - else if (item == "clientError") - client_errors = parseErrorCode(in); + if (item == "echo") + echo.emplace(true); + if (item == "echoOn") + echo.emplace(true); + if (item == "echoOff") + echo.emplace(false); } + else if (!is_leading_hint && token.type == TokenType::BareWord && command_errors.contains(item)) + { + /// Everything after this must be a list of errors separated by comma + error_vector error_codes; + while (!token.isEnd()) + { + token = comment_lexer.nextToken(); + if (token.type == TokenType::Whitespace) + continue; + if (token.type == TokenType::Number) + { + int code; + auto [p, ec] = std::from_chars(token.begin, token.end, code); + if (p == token.begin) + throw DB::Exception( + DB::ErrorCodes::CANNOT_PARSE_TEXT, + "Could not parse integer number for errorcode: {}", + std::string_view(token.begin, token.end)); + error_codes.push_back(code); + } + else if (token.type == TokenType::BareWord) + { + int code = code = DB::ErrorCodes::getErrorCodeByName(std::string_view(token.begin, token.end)); + error_codes.push_back(code); + } + else + throw DB::Exception( + DB::ErrorCodes::CANNOT_PARSE_TEXT, + "Could not parse error code in {}: {}", + getTokenName(token.type), + std::string_view(token.begin, token.end)); + do + { + token = comment_lexer.nextToken(); + } while (!token.isEnd() && token.type == TokenType::Whitespace); - if (item == "echo") - echo.emplace(true); - if (item == "echoOn") - echo.emplace(true); - if (item == "echoOff") - echo.emplace(false); + if (!token.isEnd() && token.type != TokenType::Comma) + throw DB::Exception( + DB::ErrorCodes::CANNOT_PARSE_TEXT, + "Could not parse error code. Expected ','. Got '{}'", + std::string_view(token.begin, token.end)); + } + + if (item == "serverError") + server_errors = error_codes; + else + client_errors = error_codes; + break; + } } } diff --git a/src/Client/TestHint.h b/src/Client/TestHint.h index 30b3cacd3cb..fff82502078 100644 --- a/src/Client/TestHint.h +++ b/src/Client/TestHint.h @@ -11,6 +11,8 @@ namespace DB { +class Lexer; + /// Checks expected server and client error codes. /// /// The following comment hints are supported: @@ -63,7 +65,7 @@ private: error_vector client_errors{}; std::optional echo; - void parse(const String & hint, bool is_leading_hint); + void parse(Lexer & comment_lexer, bool is_leading_hint); bool allErrorsExpected(int actual_server_error, int actual_client_error) const { diff --git a/tests/queries/0_stateless/01470_columns_transformers.sql b/tests/queries/0_stateless/01470_columns_transformers.sql index 7cff1920a4e..8840ce3f3b5 100644 --- a/tests/queries/0_stateless/01470_columns_transformers.sql +++ b/tests/queries/0_stateless/01470_columns_transformers.sql @@ -17,15 +17,15 @@ SELECT a.* APPLY(toDate) EXCEPT(i, j) APPLY(any) from columns_transformers a; SELECT * EXCEPT STRICT i from columns_transformers; SELECT * EXCEPT STRICT (i, j) from columns_transformers; SELECT * EXCEPT STRICT i, j1 from columns_transformers; -- { serverError 47 } -SELECT * EXCEPT STRICT(i, j1) from columns_transformers; -- { serverError NO_SUCH_COLUMN_IN_TABLE | BAD_ARGUMENTS } +SELECT * EXCEPT STRICT(i, j1) from columns_transformers; -- { serverError NO_SUCH_COLUMN_IN_TABLE , BAD_ARGUMENTS } SELECT * REPLACE STRICT i + 1 AS i from columns_transformers; -SELECT * REPLACE STRICT(i + 1 AS col) from columns_transformers; -- { serverError NO_SUCH_COLUMN_IN_TABLE | BAD_ARGUMENTS } +SELECT * REPLACE STRICT(i + 1 AS col) from columns_transformers; -- { serverError NO_SUCH_COLUMN_IN_TABLE, BAD_ARGUMENTS } SELECT * REPLACE(i + 1 AS i) APPLY(sum) from columns_transformers; SELECT columns_transformers.* REPLACE(j + 2 AS j, i + 1 AS i) APPLY(avg) from columns_transformers; SELECT columns_transformers.* REPLACE(j + 1 AS j, j + 2 AS j) APPLY(avg) from columns_transformers; -- { serverError 43 } -- REPLACE after APPLY will not match anything SELECT a.* APPLY(toDate) REPLACE(i + 1 AS i) APPLY(any) from columns_transformers a; -SELECT a.* APPLY(toDate) REPLACE STRICT(i + 1 AS i) APPLY(any) from columns_transformers a; -- { serverError NO_SUCH_COLUMN_IN_TABLE | BAD_ARGUMENTS } +SELECT a.* APPLY(toDate) REPLACE STRICT(i + 1 AS i) APPLY(any) from columns_transformers a; -- { serverError NO_SUCH_COLUMN_IN_TABLE, BAD_ARGUMENTS } EXPLAIN SYNTAX SELECT * APPLY(sum) from columns_transformers; EXPLAIN SYNTAX SELECT columns_transformers.* APPLY(avg) from columns_transformers; From 12525f768cd2375d6605a4cf9e2ebdcdda16dfd0 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Mon, 6 Mar 2023 14:18:01 +0100 Subject: [PATCH 542/841] Add default constructor for `MultiReadResponse` (#47254) * Add default constructor for MultiReadResponse * Remove optional * Fix style --- src/Backups/BackupCoordinationRemote.cpp | 18 +++++++-------- src/Common/ZooKeeper/ZooKeeper.h | 28 +++++++++++++++++++++--- 2 files changed, 34 insertions(+), 12 deletions(-) diff --git a/src/Backups/BackupCoordinationRemote.cpp b/src/Backups/BackupCoordinationRemote.cpp index 029a27d2712..c0fb4d5e066 100644 --- a/src/Backups/BackupCoordinationRemote.cpp +++ b/src/Backups/BackupCoordinationRemote.cpp @@ -552,7 +552,7 @@ std::vector BackupCoordinationRemote::getAllFileInfos() const for (auto & batch : batched_escaped_names) { - std::optional sizes_and_checksums; + zkutil::ZooKeeper::MultiGetResponse sizes_and_checksums; { Strings file_names_paths; file_names_paths.reserve(batch.size()); @@ -561,7 +561,7 @@ std::vector BackupCoordinationRemote::getAllFileInfos() const ZooKeeperRetriesControl retries_ctl("getAllFileInfos::getSizesAndChecksums", zookeeper_retries_info); - retries_ctl.retryLoop([&]() + retries_ctl.retryLoop([&] { auto zk = getZooKeeper(); sizes_and_checksums = zk->get(file_names_paths); @@ -579,9 +579,9 @@ std::vector BackupCoordinationRemote::getAllFileInfos() const for (size_t i = 0; i < batch.size(); ++i) { auto file_name = batch[i]; - if (sizes_and_checksums.value()[i].error != Coordination::Error::ZOK) - throw zkutil::KeeperException(sizes_and_checksums.value()[i].error); - auto size_and_checksum = sizes_and_checksums.value()[i].data; + if (sizes_and_checksums[i].error != Coordination::Error::ZOK) + throw zkutil::KeeperException(sizes_and_checksums[i].error); + const auto & size_and_checksum = sizes_and_checksums[i].data; auto size = deserializeSizeAndChecksum(size_and_checksum).first; if (size) @@ -601,7 +601,7 @@ std::vector BackupCoordinationRemote::getAllFileInfos() const std::move(empty_files_infos.begin(), empty_files_infos.end(), std::back_inserter(file_infos)); } - std::optional non_empty_file_infos_serialized; + zkutil::ZooKeeper::MultiGetResponse non_empty_file_infos_serialized; ZooKeeperRetriesControl retries_ctl("getAllFileInfos::getFileInfos", zookeeper_retries_info); retries_ctl.retryLoop([&]() { @@ -613,9 +613,9 @@ std::vector BackupCoordinationRemote::getAllFileInfos() const for (size_t i = 0; i < non_empty_file_names.size(); ++i) { FileInfo file_info; - if (non_empty_file_infos_serialized.value()[i].error != Coordination::Error::ZOK) - throw zkutil::KeeperException(non_empty_file_infos_serialized.value()[i].error); - file_info = deserializeFileInfo(non_empty_file_infos_serialized.value()[i].data); + if (non_empty_file_infos_serialized[i].error != Coordination::Error::ZOK) + throw zkutil::KeeperException(non_empty_file_infos_serialized[i].error); + file_info = deserializeFileInfo(non_empty_file_infos_serialized[i].data); file_info.file_name = unescapeForFileName(non_empty_file_names[i]); non_empty_files_infos.emplace_back(std::move(file_info)); } diff --git a/src/Common/ZooKeeper/ZooKeeper.h b/src/Common/ZooKeeper/ZooKeeper.h index 9de8241cfbe..d20d036f04e 100644 --- a/src/Common/ZooKeeper/ZooKeeper.h +++ b/src/Common/ZooKeeper/ZooKeeper.h @@ -33,6 +33,12 @@ namespace CurrentMetrics namespace DB { class ZooKeeperLog; + +namespace ErrorCodes +{ + extern const int LOGICAL_ERROR; +} + } namespace zkutil @@ -79,13 +85,23 @@ concept ZooKeeperResponse = std::derived_from; template struct MultiReadResponses { + MultiReadResponses() = default; + template explicit MultiReadResponses(TResponses responses_) : responses(std::move(responses_)) {} size_t size() const { - return std::visit([](auto && resp) { return resp.size(); }, responses); + return std::visit( + [&](const TResponses & resp) -> size_t + { + if constexpr (std::same_as) + throw DB::Exception(DB::ErrorCodes::LOGICAL_ERROR, "No responses set for MultiRead"); + else + return resp.size(); + }, + responses); } ResponseType & operator[](size_t index) @@ -94,8 +110,10 @@ struct MultiReadResponses [&](TResponses & resp) -> ResponseType & { if constexpr (std::same_as) + { return dynamic_cast(*resp[index]); - else + } + else if constexpr (std::same_as) { if constexpr (try_multi) { @@ -107,6 +125,10 @@ struct MultiReadResponses } return resp[index]; } + else + { + throw DB::Exception(DB::ErrorCodes::LOGICAL_ERROR, "No responses set for MultiRead"); + } }, responses); } @@ -137,7 +159,7 @@ private: size_t size() const { return future_responses.size(); } }; - std::variant responses; + std::variant responses; }; /// ZooKeeper session. The interface is substantially different from the usual libzookeeper API. From 7c14059f3f7dd2634e4dcd9336cb5fed9111262e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Mar=C3=ADn?= Date: Mon, 6 Mar 2023 14:20:45 +0100 Subject: [PATCH 543/841] Update comments --- src/Client/TestHint.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Client/TestHint.h b/src/Client/TestHint.h index fff82502078..8d6b6dfc4e0 100644 --- a/src/Client/TestHint.h +++ b/src/Client/TestHint.h @@ -18,13 +18,13 @@ class Lexer; /// The following comment hints are supported: /// /// - "-- { serverError 60 }" -- in case of you are expecting server error. -/// - "-- { serverError 16 | 36 }" -- in case of you are expecting one of the 2 errors +/// - "-- { serverError 16, 36 }" -- in case of you are expecting one of the 2 errors /// /// - "-- { clientError 20 }" -- in case of you are expecting client error. -/// - "-- { clientError 20 | 60 | 92 }" -- It's expected that the client will return one of the 3 errors. +/// - "-- { clientError 20, 60, 92 }" -- It's expected that the client will return one of the 3 errors. /// /// - "-- { serverError FUNCTION_THROW_IF_VALUE_IS_NON_ZERO }" -- by error name. -/// - "-- { serverError NO_SUCH_COLUMN_IN_TABLE | BAD_ARGUMENTS }" -- by error name. +/// - "-- { serverError NO_SUCH_COLUMN_IN_TABLE, BAD_ARGUMENTS }" -- by error name. /// /// - "-- { clientError FUNCTION_THROW_IF_VALUE_IS_NON_ZERO }" -- by error name. /// From c13638904af33b71d76e4eae0b91b894588879b9 Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Mon, 6 Mar 2023 14:38:54 +0100 Subject: [PATCH 544/841] Adjust the aggregation interval --- tests/ci/autoscale_runners_lambda/app.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/ci/autoscale_runners_lambda/app.py b/tests/ci/autoscale_runners_lambda/app.py index 596e675ee24..7e3af3f6779 100644 --- a/tests/ci/autoscale_runners_lambda/app.py +++ b/tests/ci/autoscale_runners_lambda/app.py @@ -21,6 +21,11 @@ RUNNER_TYPE_LABELS = [ "style-checker", "style-checker-aarch64", ] + +# 4 HOUR - is a balance to get the most precise values +# - Our longest possible running check is around 5h on the worst scenario +# - The long queue won't be wiped out and replaced, so the measurmenet is fine +# - If the data is spoiled by something, we are from the bills perspective QUEUE_QUERY = f"""SELECT last_status AS status, toUInt32(count()) AS length, @@ -35,7 +40,7 @@ FROM FROM default.workflow_jobs WHERE has(labels, 'self-hosted') AND hasAny({RUNNER_TYPE_LABELS}, labels) - AND started_at > now() - INTERVAL 1 DAY + AND started_at > now() - INTERVAL 4 HOUR GROUP BY ALL HAVING last_status IN ('in_progress', 'queued') ) From 43da841e1e03552e908277cdfb5465f6addbfe62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Mar=C3=ADn?= Date: Mon, 6 Mar 2023 14:53:32 +0100 Subject: [PATCH 545/841] Style --- src/Client/TestHint.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Client/TestHint.h b/src/Client/TestHint.h index 8d6b6dfc4e0..d9650b9d4d7 100644 --- a/src/Client/TestHint.h +++ b/src/Client/TestHint.h @@ -24,7 +24,7 @@ class Lexer; /// - "-- { clientError 20, 60, 92 }" -- It's expected that the client will return one of the 3 errors. /// /// - "-- { serverError FUNCTION_THROW_IF_VALUE_IS_NON_ZERO }" -- by error name. -/// - "-- { serverError NO_SUCH_COLUMN_IN_TABLE, BAD_ARGUMENTS }" -- by error name. +/// - "-- { serverError NO_SUCH_COLUMN_IN_TABLE, BAD_ARGUMENTS }" -- by error name. /// /// - "-- { clientError FUNCTION_THROW_IF_VALUE_IS_NON_ZERO }" -- by error name. /// From e4751f95e1860b52652f2c16d930ab6280d346c6 Mon Sep 17 00:00:00 2001 From: Kruglov Pavel <48961922+Avogar@users.noreply.github.com> Date: Mon, 6 Mar 2023 14:56:05 +0100 Subject: [PATCH 546/841] Fix typo --- src/Interpreters/ProcessList.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Interpreters/ProcessList.cpp b/src/Interpreters/ProcessList.cpp index bf452775d27..a26844ae73c 100644 --- a/src/Interpreters/ProcessList.cpp +++ b/src/Interpreters/ProcessList.cpp @@ -415,7 +415,7 @@ CancellationCode QueryStatus::cancelQuery(bool) /// 2) We don't actually remove executor holder from executors in removePipelineExecutor, /// just mark that executor is invalid. /// So, it's ok to use a snapshot created above under a mutex, it won't be any differ from actual executors. - for (const auto & e : executors_shapshot) + for (const auto & e : executors_snapshot) e->cancel(); return CancellationCode::CancelSent; From 9e3794f7d73b983a7cf4afb1bad9f01b650bfb71 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Mon, 6 Mar 2023 14:36:53 +0000 Subject: [PATCH 547/841] Skip for sanitizer builds --- tests/integration/test_keeper_four_word_command/test.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/integration/test_keeper_four_word_command/test.py b/tests/integration/test_keeper_four_word_command/test.py index d3fcfcc3014..412780c8f0f 100644 --- a/tests/integration/test_keeper_four_word_command/test.py +++ b/tests/integration/test_keeper_four_word_command/test.py @@ -682,6 +682,9 @@ def test_cmd_rqld(started_cluster): def test_cmd_clrs(started_cluster): + if node1.is_built_with_sanitizer(): + return + def get_memory_purges(): return node1.query( "SELECT value FROM system.events WHERE event = 'MemoryAllocatorPurge' SETTINGS system_events_show_zero_values = 1" From d8e5fb519557041dc03c64026775329720da3d2a Mon Sep 17 00:00:00 2001 From: avogar Date: Mon, 6 Mar 2023 15:12:15 +0000 Subject: [PATCH 548/841] Use switch, use lz4 by default --- src/Core/Settings.h | 6 ++-- src/Core/SettingsChangesHistory.h | 5 ++- .../Formats/Impl/ORCBlockOutputFormat.cpp | 32 ++++++++--------- .../Formats/Impl/ParquetBlockOutputFormat.cpp | 36 +++++++++---------- 4 files changed, 39 insertions(+), 40 deletions(-) diff --git a/src/Core/Settings.h b/src/Core/Settings.h index 8eaecff9708..ae5d5326031 100644 --- a/src/Core/Settings.h +++ b/src/Core/Settings.h @@ -858,7 +858,7 @@ class IColumn; M(Bool, output_format_parquet_string_as_string, false, "Use Parquet String type instead of Binary for String columns.", 0) \ M(Bool, output_format_parquet_fixed_string_as_fixed_byte_array, true, "Use Parquet FIXED_LENGTH_BYTE_ARRAY type instead of Binary for FixedString columns.", 0) \ M(ParquetVersion, output_format_parquet_version, "2.latest", "Parquet format version for output format. Supported versions: 1.0, 2.4, 2.6 and 2.latest (default)", 0) \ - M(ParquetCompression, output_format_parquet_compression_method, "snappy", "Compression method for Parquet output format. Supported codecs: snappy, lz4, brotli, zstd, gzip, none (uncompressed)", 0) \ + M(ParquetCompression, output_format_parquet_compression_method, "lz4", "Compression method for Parquet output format. Supported codecs: snappy, lz4, brotli, zstd, gzip, none (uncompressed)", 0) \ M(String, output_format_avro_codec, "", "Compression codec used for output. Possible values: 'null', 'deflate', 'snappy'.", 0) \ M(UInt64, output_format_avro_sync_interval, 16 * 1024, "Sync interval in bytes.", 0) \ M(String, output_format_avro_string_column_pattern, "", "For Avro format: regexp of String columns to select as AVRO string.", 0) \ @@ -901,10 +901,10 @@ class IColumn; M(Bool, output_format_arrow_low_cardinality_as_dictionary, false, "Enable output LowCardinality type as Dictionary Arrow type", 0) \ M(Bool, output_format_arrow_string_as_string, false, "Use Arrow String type instead of Binary for String columns", 0) \ M(Bool, output_format_arrow_fixed_string_as_fixed_byte_array, true, "Use Arrow FIXED_SIZE_BINARY type instead of Binary for FixedString columns.", 0) \ - M(ArrowCompression, output_format_arrow_compression_method, "none", "Compression method for Arrow output format. Supported codecs: lz4_frame, zstd, none (uncompressed)", 0) \ + M(ArrowCompression, output_format_arrow_compression_method, "lz4_frame", "Compression method for Arrow output format. Supported codecs: lz4_frame, zstd, none (uncompressed)", 0) \ \ M(Bool, output_format_orc_string_as_string, false, "Use ORC String type instead of Binary for String columns", 0) \ - M(ORCCompression, output_format_orc_compression_method, "none", "Compression method for ORC output format. Supported codecs: lz4, snappy, zlib, zstd, none (uncompressed)", 0) \ + M(ORCCompression, output_format_orc_compression_method, "lz4", "Compression method for ORC output format. Supported codecs: lz4, snappy, zlib, zstd, none (uncompressed)", 0) \ \ M(EnumComparingMode, format_capn_proto_enum_comparising_mode, FormatSettings::EnumComparingMode::BY_VALUES, "How to map ClickHouse Enum and CapnProto Enum", 0) \ \ diff --git a/src/Core/SettingsChangesHistory.h b/src/Core/SettingsChangesHistory.h index 04f328bb665..91b3dff3141 100644 --- a/src/Core/SettingsChangesHistory.h +++ b/src/Core/SettingsChangesHistory.h @@ -81,7 +81,10 @@ namespace SettingsChangesHistory static std::map settings_changes_history = { {"23.3", {{"output_format_parquet_version", "1.0", "2.latest", "Use latest Parquet format version for output format"}, - {"input_format_json_ignore_unknown_keys_in_named_tuple", false, true, "Improve parsing JSON objects as named tuples"}}}, + {"input_format_json_ignore_unknown_keys_in_named_tuple", false, true, "Improve parsing JSON objects as named tuples"}, + {"output_format_arrow_compression_method", "none", "lz4_frame", "Use lz4 compression in Arrow output format by default"}, + {"output_format_parquet_compression_method", "snappy", "lz4", "Use lz4 compression in Parquet output format by default"}, + {"output_format_orc_compression_method", "none", "lz4_frame", "Use lz4 compression in ORC output format by default"}}}, {"23.2", {{"output_format_parquet_fixed_string_as_fixed_byte_array", false, true, "Use Parquet FIXED_LENGTH_BYTE_ARRAY type for FixedString by default"}, {"output_format_arrow_fixed_string_as_fixed_byte_array", false, true, "Use Arrow FIXED_SIZE_BINARY type for FixedString by default"}, {"query_plan_remove_redundant_distinct", false, true, "Remove redundant Distinct step in query plan"}, diff --git a/src/Processors/Formats/Impl/ORCBlockOutputFormat.cpp b/src/Processors/Formats/Impl/ORCBlockOutputFormat.cpp index 39cacde94ed..4264e9da4d6 100644 --- a/src/Processors/Formats/Impl/ORCBlockOutputFormat.cpp +++ b/src/Processors/Formats/Impl/ORCBlockOutputFormat.cpp @@ -23,7 +23,7 @@ #include namespace DB -{ +{7 namespace ErrorCodes { @@ -36,24 +36,22 @@ namespace orc::CompressionKind getORCCompression(FormatSettings::ORCCompression method) { - if (method == FormatSettings::ORCCompression::NONE) - return orc::CompressionKind::CompressionKind_NONE; - + switch (method) + { + case FormatSettings::ORCCompression::NONE: + return orc::CompressionKind::CompressionKind_NONE; + case FormatSettings::ORCCompression::SNAPPY: #if USE_SNAPPY - if (method == FormatSettings::ORCCompression::SNAPPY) - return orc::CompressionKind::CompressionKind_SNAPPY; + return orc::CompressionKind::CompressionKind_SNAPPY; #endif - - if (method == FormatSettings::ORCCompression::ZSTD) - return orc::CompressionKind::CompressionKind_ZSTD; - - if (method == FormatSettings::ORCCompression::LZ4) - return orc::CompressionKind::CompressionKind_LZ4; - - if (method == FormatSettings::ORCCompression::ZLIB) - return orc::CompressionKind::CompressionKind_ZLIB; - - throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Unsupported compression method"); + throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Snappy compression method is not supported"); + case FormatSettings::ORCCompression::ZSTD: + return orc::CompressionKind::CompressionKind_ZSTD; + case FormatSettings::ORCCompression::LZ4: + return orc::CompressionKind::CompressionKind_LZ4; + case FormatSettings::ORCCompression::ZLIB: + return orc::CompressionKind::CompressionKind_ZLIB; + } } } diff --git a/src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp b/src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp index cedd8a9c54c..3695bb9d110 100644 --- a/src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp +++ b/src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp @@ -37,29 +37,27 @@ static parquet::ParquetVersion::type getParquetVersion(const FormatSettings & se parquet::Compression::type getParquetCompression(FormatSettings::ParquetCompression method) { - if (method == FormatSettings::ParquetCompression::NONE) - return parquet::Compression::type::UNCOMPRESSED; - + switch (method) + { + case FormatSettings::ParquetCompression::NONE: + return parquet::Compression::type::UNCOMPRESSED; + case FormatSettings::ParquetCompression::SNAPPY: #if USE_SNAPPY - if (method == FormatSettings::ParquetCompression::SNAPPY) - return parquet::Compression::type::SNAPPY; + return parquet::Compression::type::SNAPPY; #endif - + throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Snappy compression method is not supported"); + case FormatSettings::ParquetCompression::BROTLI: #if USE_BROTLI - if (method == FormatSettings::ParquetCompression::BROTLI) - return parquet::Compression::type::BROTLI; + return parquet::Compression::type::BROTLI; #endif - - if (method == FormatSettings::ParquetCompression::ZSTD) - return parquet::Compression::type::ZSTD; - - if (method == FormatSettings::ParquetCompression::LZ4) - return parquet::Compression::type::LZ4; - - if (method == FormatSettings::ParquetCompression::GZIP) - return parquet::Compression::type::GZIP; - - throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Unsupported compression method"); + throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Brotli compression method is not supported"); + case FormatSettings::ParquetCompression::ZSTD: + return parquet::Compression::type::ZSTD; + case FormatSettings::ParquetCompression::LZ4: + return parquet::Compression::type::LZ4; + case FormatSettings::ParquetCompression::GZIP: + return parquet::Compression::type::GZIP; + } } } From 1b0d0c61082574733c7281a5511184dc98a6a59d Mon Sep 17 00:00:00 2001 From: Anton Popov Date: Mon, 6 Mar 2023 15:29:13 +0000 Subject: [PATCH 549/841] fix skip indexes --- src/Storages/IndicesDescription.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Storages/IndicesDescription.cpp b/src/Storages/IndicesDescription.cpp index 591a9082f7a..a93ac248c98 100644 --- a/src/Storages/IndicesDescription.cpp +++ b/src/Storages/IndicesDescription.cpp @@ -96,8 +96,11 @@ IndexDescription IndexDescription::getIndexFromAST(const ASTPtr & definition_ast result.expression = ExpressionAnalyzer(expr_list, syntax, context).getActions(true); result.sample_block = result.expression->getSampleBlock(); - for (const auto & elem : result.sample_block) + for (auto & elem : result.sample_block) { + if (!elem.column) + elem.column = elem.type->createColumn(); + result.column_names.push_back(elem.name); result.data_types.push_back(elem.type); } From 3076e929802c56fa9e38770f56a02e0622233e02 Mon Sep 17 00:00:00 2001 From: Vladimir C Date: Mon, 6 Mar 2023 16:56:02 +0100 Subject: [PATCH 550/841] Apply suggestions from code review Co-authored-by: Igor Nikonov <954088+devcrafter@users.noreply.github.com> --- src/Interpreters/GraceHashJoin.h | 1 - src/Processors/Transforms/JoiningTransform.cpp | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Interpreters/GraceHashJoin.h b/src/Interpreters/GraceHashJoin.h index cbc0f2f3266..b8d83f4cad0 100644 --- a/src/Interpreters/GraceHashJoin.h +++ b/src/Interpreters/GraceHashJoin.h @@ -140,7 +140,6 @@ private: FileBucket * current_bucket = nullptr; - /// Function `getDelayedBlocks` is a critical section, we process only one bucket at a time. mutable std::mutex current_bucket_mutex; InMemoryJoinPtr hash_join; diff --git a/src/Processors/Transforms/JoiningTransform.cpp b/src/Processors/Transforms/JoiningTransform.cpp index 120ff51cad1..bba8ec6fa16 100644 --- a/src/Processors/Transforms/JoiningTransform.cpp +++ b/src/Processors/Transforms/JoiningTransform.cpp @@ -328,7 +328,10 @@ IProcessor::Status DelayedJoinedBlocksWorkerTransform::prepare() } if (!output.canPush()) + { + input.setNotNeeded(); return Status::PortFull; + } if (inputs.size() != 1 && outputs.size() != 1) throw Exception(ErrorCodes::LOGICAL_ERROR, "DelayedJoinedBlocksWorkerTransform must have exactly one input port"); @@ -419,7 +422,7 @@ IProcessor::Status DelayedJoinedBlocksTransform::prepare() if (output.isFinished()) { /// If at least one output is finished, then we have read all data from buckets. - /// Some workers can still can busy with joining the last chunk of data in memory, + /// Some workers can still be busy with joining the last chunk of data in memory, /// but after that they also will finish when they will try to get next chunk. finished = true; continue; From 8664a20a9e1bcca40616aba9fc7aff3d938a585c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Mar=C3=ADn?= Date: Mon, 6 Mar 2023 17:31:27 +0100 Subject: [PATCH 551/841] Fix fast tests --- tests/queries/0_stateless/02480_tlp_nan.reference | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/queries/0_stateless/02480_tlp_nan.reference b/tests/queries/0_stateless/02480_tlp_nan.reference index ea4aa44fa89..befd1f66564 100644 --- a/tests/queries/0_stateless/02480_tlp_nan.reference +++ b/tests/queries/0_stateless/02480_tlp_nan.reference @@ -1,10 +1,21 @@ +-- {echo} +SELECT sqrt(-1) as x, not(x), not(not(x)), (not(x)) IS NULL SETTINGS allow_experimental_analyzer=1; nan 0 1 0 +SELECT sqrt(-1) as x, not(x), not(not(x)), (not(x)) IS NULL SETTINGS allow_experimental_analyzer=0; nan 0 1 0 +SELECT -inf as x, not(x), not(not(x)), (not(x)) IS NULL SETTINGS allow_experimental_analyzer=1; -inf 0 1 0 +SELECT -inf as x, not(x), not(not(x)), (not(x)) IS NULL SETTINGS allow_experimental_analyzer=0; -inf 0 1 0 +SELECT NULL as x, not(x), not(not(x)), (not(x)) IS NULL SETTINGS allow_experimental_analyzer=1; \N \N \N 1 +SELECT NULL as x, not(x), not(not(x)), (not(x)) IS NULL SETTINGS allow_experimental_analyzer=0; \N \N \N 1 +SELECT inf as x, not(x), not(not(x)), (not(x)) IS NULL SETTINGS allow_experimental_analyzer=1; inf 0 1 0 +SELECT inf as x, not(x), not(not(x)), (not(x)) IS NULL SETTINGS allow_experimental_analyzer=0; inf 0 1 0 +SELECT nan as x, not(x), not(not(x)), (not(x)) IS NULL SETTINGS allow_experimental_analyzer=1; nan 0 1 0 +SELECT nan as x, not(x), not(not(x)), (not(x)) IS NULL SETTINGS allow_experimental_analyzer=0; nan 0 1 0 From 4bc443f3c757a7c3c3e61b9699b4cc57c468c178 Mon Sep 17 00:00:00 2001 From: Mike Kot Date: Fri, 3 Mar 2023 01:27:54 +0300 Subject: [PATCH 552/841] initial solution --- base/base/TypeList.h | 3 +- base/base/TypePair.h | 4 - src/Common/StackTrace.cpp | 516 ++++++++---------- src/Common/StackTrace.h | 13 +- src/Daemon/BaseDaemon.cpp | 2 +- src/DataTypes/DataTypeLowCardinality.cpp | 2 +- src/Functions/FunctionsEmbeddedDictionaries.h | 38 +- src/Functions/array/arrayIntersect.cpp | 8 +- src/Interpreters/CrashLog.cpp | 2 +- 9 files changed, 270 insertions(+), 318 deletions(-) delete mode 100644 base/base/TypePair.h diff --git a/base/base/TypeList.h b/base/base/TypeList.h index 244403b1c6b..310f0c0c586 100644 --- a/base/base/TypeList.h +++ b/base/base/TypeList.h @@ -4,7 +4,6 @@ #include #include #include "defines.h" -#include "TypePair.h" /// General-purpose typelist. Easy on compilation times as it does not use recursion. template @@ -28,7 +27,7 @@ namespace TypeListUtils /// In some contexts it's more handy to use functions in constexpr Root changeRoot(TypeList) { return {}; } template - constexpr void forEach(TypeList, F && f) { (std::forward(f)(Id{}), ...); } + constexpr void forEach(TypeList, F && f) { (std::forward(f)(TypeList{}), ...); } } template diff --git a/base/base/TypePair.h b/base/base/TypePair.h deleted file mode 100644 index 8c2f380618c..00000000000 --- a/base/base/TypePair.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once - -template struct TypePair {}; -template struct Id {}; diff --git a/src/Common/StackTrace.cpp b/src/Common/StackTrace.cpp index 0d47d3dcb92..eb6696e8c05 100644 --- a/src/Common/StackTrace.cpp +++ b/src/Common/StackTrace.cpp @@ -1,18 +1,21 @@ -#include +#include "StackTrace.h" + +#include +#include +#include #include #include -#include #include -#include +#include #include -#include #include +#include #include #include #include -#include +#include #include "config.h" @@ -20,24 +23,23 @@ # include #endif - namespace { - /// Currently this variable is set up once on server startup. - /// But we use atomic just in case, so it is possible to be modified at runtime. - std::atomic show_addresses = true; +/// Currently this variable is set up once on server startup. +/// But we use atomic just in case, so it is possible to be modified at runtime. +std::atomic show_addresses = true; - bool shouldShowAddress(const void * addr) - { - /// If the address is less than 4096, most likely it is a nullptr dereference with offset, - /// and showing this offset is secure nevertheless. - /// NOTE: 4096 is the page size on x86 and it can be different on other systems, - /// but for the purpose of this branch, it does not matter. - if (reinterpret_cast(addr) < 4096) - return true; +bool shouldShowAddress(const void * addr) +{ + /// If the address is less than 4096, most likely it is a nullptr dereference with offset, + /// and showing this offset is secure nevertheless. + /// NOTE: 4096 is the page size on x86 and it can be different on other systems, + /// but for the purpose of this branch, it does not matter. + if (reinterpret_cast(addr) < 4096) + return true; - return show_addresses.load(std::memory_order_relaxed); - } + return show_addresses.load(std::memory_order_relaxed); +} } void StackTrace::setShowAddresses(bool show) @@ -45,155 +47,129 @@ void StackTrace::setShowAddresses(bool show) show_addresses.store(show, std::memory_order_relaxed); } +std::string SigsegvErrorString(const siginfo_t & info, [[maybe_unused]] const ucontext_t & context) +{ + using namespace std::string_literals; + std::string address + = info.si_addr == nullptr ? "NULL pointer"s : (shouldShowAddress(info.si_addr) ? fmt::format("{}", info.si_addr) : ""s); + + const std::string_view access = +#if defined(__x86_64__) && !defined(OS_FREEBSD) && !defined(OS_DARWIN) && !defined(__arm__) && !defined(__powerpc__) + (context.uc_mcontext.gregs[REG_ERR] & 0x02) ? "write" : "read"; +#else + ""; +#endif + + std::string_view message; + + switch (info.si_code) + { + case SEGV_ACCERR: + message = "Attempted access has violated the permissions assigned to the memory area"; + break; + case SEGV_MAPERR: + message = "Address not mapped to object"; + break; + default: + message = "Unknown si_code"; + break; + } + + return fmt::format("Address: {}. Access: {}. {}.", std::move(address), access, message); +} + +constexpr std::string_view SigbusErrorString(int si_code) +{ + switch (si_code) + { + case BUS_ADRALN: + return "Invalid address alignment."; + case BUS_ADRERR: + return "Non-existent physical address."; + case BUS_OBJERR: + return "Object specific hardware error."; + + // Linux specific +#if defined(BUS_MCEERR_AR) + case BUS_MCEERR_AR: + return "Hardware memory error: action required."; +#endif +#if defined(BUS_MCEERR_AO) + case BUS_MCEERR_AO: + return "Hardware memory error: action optional."; +#endif + default: + return "Unknown si_code."; + } +} + +constexpr std::string_view SigfpeErrorString(int si_code) +{ + switch (si_code) + { + case FPE_INTDIV: + return "Integer divide by zero."; + case FPE_INTOVF: + return "Integer overflow."; + case FPE_FLTDIV: + return "Floating point divide by zero."; + case FPE_FLTOVF: + return "Floating point overflow."; + case FPE_FLTUND: + return "Floating point underflow."; + case FPE_FLTRES: + return "Floating point inexact result."; + case FPE_FLTINV: + return "Floating point invalid operation."; + case FPE_FLTSUB: + return "Subscript out of range."; + default: + return "Unknown si_code."; + } +} + +constexpr std::string_view SigillErrorString(int si_code) +{ + switch (si_code) + { + case ILL_ILLOPC: + return "Illegal opcode."; + case ILL_ILLOPN: + return "Illegal operand."; + case ILL_ILLADR: + return "Illegal addressing mode."; + case ILL_ILLTRP: + return "Illegal trap."; + case ILL_PRVOPC: + return "Privileged opcode."; + case ILL_PRVREG: + return "Privileged register."; + case ILL_COPROC: + return "Coprocessor error."; + case ILL_BADSTK: + return "Internal stack error."; + default: + return "Unknown si_code."; + } +} std::string signalToErrorMessage(int sig, const siginfo_t & info, [[maybe_unused]] const ucontext_t & context) { - std::stringstream error; // STYLE_CHECK_ALLOW_STD_STRING_STREAM - error.exceptions(std::ios::failbit); switch (sig) { case SIGSEGV: - { - /// Print info about address and reason. - if (nullptr == info.si_addr) - error << "Address: NULL pointer."; - else if (shouldShowAddress(info.si_addr)) - error << "Address: " << info.si_addr; - -#if defined(__x86_64__) && !defined(OS_FREEBSD) && !defined(OS_DARWIN) && !defined(__arm__) && !defined(__powerpc__) - auto err_mask = context.uc_mcontext.gregs[REG_ERR]; - if ((err_mask & 0x02)) - error << " Access: write."; - else - error << " Access: read."; -#endif - - switch (info.si_code) - { - case SEGV_ACCERR: - error << " Attempted access has violated the permissions assigned to the memory area."; - break; - case SEGV_MAPERR: - error << " Address not mapped to object."; - break; - default: - error << " Unknown si_code."; - break; - } - break; - } - + return SigsegvErrorString(info, context); case SIGBUS: - { - switch (info.si_code) - { - case BUS_ADRALN: - error << "Invalid address alignment."; - break; - case BUS_ADRERR: - error << "Non-existent physical address."; - break; - case BUS_OBJERR: - error << "Object specific hardware error."; - break; - - // Linux specific -#if defined(BUS_MCEERR_AR) - case BUS_MCEERR_AR: - error << "Hardware memory error: action required."; - break; -#endif -#if defined(BUS_MCEERR_AO) - case BUS_MCEERR_AO: - error << "Hardware memory error: action optional."; - break; -#endif - - default: - error << "Unknown si_code."; - break; - } - break; - } - + return std::string{SigbusErrorString(info.si_code)}; case SIGILL: - { - switch (info.si_code) - { - case ILL_ILLOPC: - error << "Illegal opcode."; - break; - case ILL_ILLOPN: - error << "Illegal operand."; - break; - case ILL_ILLADR: - error << "Illegal addressing mode."; - break; - case ILL_ILLTRP: - error << "Illegal trap."; - break; - case ILL_PRVOPC: - error << "Privileged opcode."; - break; - case ILL_PRVREG: - error << "Privileged register."; - break; - case ILL_COPROC: - error << "Coprocessor error."; - break; - case ILL_BADSTK: - error << "Internal stack error."; - break; - default: - error << "Unknown si_code."; - break; - } - break; - } - + return std::string{SigillErrorString(info.si_code)}; case SIGFPE: - { - switch (info.si_code) - { - case FPE_INTDIV: - error << "Integer divide by zero."; - break; - case FPE_INTOVF: - error << "Integer overflow."; - break; - case FPE_FLTDIV: - error << "Floating point divide by zero."; - break; - case FPE_FLTOVF: - error << "Floating point overflow."; - break; - case FPE_FLTUND: - error << "Floating point underflow."; - break; - case FPE_FLTRES: - error << "Floating point inexact result."; - break; - case FPE_FLTINV: - error << "Floating point invalid operation."; - break; - case FPE_FLTSUB: - error << "Subscript out of range."; - break; - default: - error << "Unknown si_code."; - break; - } - break; - } - + return std::string{SigfpeErrorString(info.si_code)}; case SIGTSTP: - { - error << "This is a signal used for debugging purposes by the user."; - break; - } + return "This is a signal used for debugging purposes by the user."; + default: + return ""; } - - return error.str(); } static void * getCallerAddress(const ucontext_t & context) @@ -207,10 +183,8 @@ static void * getCallerAddress(const ucontext_t & context) # else return reinterpret_cast(context.uc_mcontext.gregs[REG_RIP]); # endif - #elif defined(OS_DARWIN) && defined(__aarch64__) return reinterpret_cast(context.uc_mcontext->__ss.__pc); - #elif defined(OS_FREEBSD) && defined(__aarch64__) return reinterpret_cast(context.uc_mcontext.mc_gpregs.gp_elr); #elif defined(__aarch64__) @@ -228,20 +202,17 @@ static void * getCallerAddress(const ucontext_t & context) #endif } +// FIXME: looks like this is used only for Sentry but duplicates the whole algo, maybe replace? void StackTrace::symbolize( - const StackTrace::FramePointers & frame_pointers, [[maybe_unused]] size_t offset, - size_t size, StackTrace::Frames & frames) + const StackTrace::FramePointers & frame_pointers, [[maybe_unused]] size_t offset, size_t size, StackTrace::Frames & frames) { #if defined(__ELF__) && !defined(OS_FREEBSD) - auto symbol_index_ptr = DB::SymbolIndex::instance(); const DB::SymbolIndex & symbol_index = *symbol_index_ptr; std::unordered_map dwarfs; for (size_t i = 0; i < offset; ++i) - { frames[i].virtual_addr = frame_pointers[i]; - } for (size_t i = offset; i < size; ++i) { @@ -254,7 +225,7 @@ void StackTrace::symbolize( if (object) { current_frame.object = object->name; - if (std::filesystem::exists(current_frame.object.value())) + if (std::error_code ec; std::filesystem::exists(current_frame.object.value(), ec) && !ec) { auto dwarf_it = dwarfs.try_emplace(object->name, object->elf).first; @@ -269,34 +240,19 @@ void StackTrace::symbolize( } } else - { current_frame.object = "?"; - } - const auto * symbol = symbol_index.findSymbol(current_frame.virtual_addr); - if (symbol) - { - int status = 0; - current_frame.symbol = demangle(symbol->name, status); - } + if (const auto * symbol = symbol_index.findSymbol(current_frame.virtual_addr)) + current_frame.symbol = demangle(symbol->name); else - { current_frame.symbol = "?"; - } } #else for (size_t i = 0; i < size; ++i) - { frames[i].virtual_addr = frame_pointers[i]; - } #endif } -StackTrace::StackTrace() -{ - tryCapture(); -} - StackTrace::StackTrace(const ucontext_t & signal_context) { tryCapture(); @@ -325,81 +281,97 @@ StackTrace::StackTrace(const ucontext_t & signal_context) } } -StackTrace::StackTrace(NoCapture) -{ -} - void StackTrace::tryCapture() { - size = 0; #if USE_UNWIND size = unw_backtrace(frame_pointers.data(), capacity); __msan_unpoison(frame_pointers.data(), size * sizeof(frame_pointers[0])); +#else + size = 0; #endif } -size_t StackTrace::getSize() const +// Clickhouse uses bundled libc++ so type names will be same on every system thus it's save to hardcode them +constexpr std::pair replacements[] + = {{"::__1", ""}, {"std::basic_string, std::allocator>", "String"}}; + +String collapseNames(String && haystack) { - return size; + // TODO: surely there is a written version already for better in place search&replace + for (auto [needle, to] : replacements) + { + size_t pos = 0; + while ((pos = haystack.find(needle, pos)) != std::string::npos) + { + haystack.replace(pos, needle.length(), to); + pos += to.length(); + } + } + + return haystack; } -size_t StackTrace::getOffset() const +struct StackTraceRefTriple { - return offset; + const StackTrace::FramePointers & pointers; + size_t offset; + size_t size; +}; + +struct StackTraceTriple +{ + StackTrace::FramePointers pointers; + size_t offset; + size_t size; +}; + +template +concept MaybeRef = std::is_same_v || std::is_same_v; + +constexpr bool operator<(const MaybeRef auto & left, const MaybeRef auto & right) +{ + return std::tuple{left.pointers, left.size, left.offset} < std::tuple{right.pointers, right.size, right.offset}; } -const StackTrace::FramePointers & StackTrace::getFramePointers() const +static void +toStringEveryLineImpl([[maybe_unused]] bool fatal, const StackTraceRefTriple & stack_trace, Fn auto && callback) { - return frame_pointers; -} - -static void toStringEveryLineImpl( - [[maybe_unused]] bool fatal, - const StackTrace::FramePointers & frame_pointers, - size_t offset, - size_t size, - std::function callback) -{ - if (size == 0) + if (stack_trace.size == 0) return callback(""); #if defined(__ELF__) && !defined(OS_FREEBSD) - auto symbol_index_ptr = DB::SymbolIndex::instance(); - const DB::SymbolIndex & symbol_index = *symbol_index_ptr; - std::unordered_map dwarfs; - - std::stringstream out; // STYLE_CHECK_ALLOW_STD_STRING_STREAM + std::stringstream out; // STYLE_CHECK_ALLOW_STD_STRING_STREAM out.exceptions(std::ios::failbit); - for (size_t i = offset; i < size; ++i) + using enum DB::Dwarf::LocationInfoMode; + const auto mode = fatal ? FULL_WITH_INLINE : FAST; + + auto symbol_index_ptr = DB::SymbolIndex::instance(); + const DB::SymbolIndex & symbol_index = *symbol_index_ptr; + std::unordered_map dwarfs; + + for (size_t i = stack_trace.offset; i < stack_trace.size; ++i) { std::vector inline_frames; - const void * virtual_addr = frame_pointers[i]; + const void * virtual_addr = stack_trace.pointers[i]; const auto * object = symbol_index.findObject(virtual_addr); uintptr_t virtual_offset = object ? uintptr_t(object->address_begin) : 0; const void * physical_addr = reinterpret_cast(uintptr_t(virtual_addr) - virtual_offset); out << i << ". "; - if (object) + if (std::error_code ec; object && std::filesystem::exists(object->name, ec) && !ec) { - if (std::filesystem::exists(object->name)) - { - auto dwarf_it = dwarfs.try_emplace(object->name, object->elf).first; + auto dwarf_it = dwarfs.try_emplace(object->name, object->elf).first; - DB::Dwarf::LocationInfo location; - auto mode = fatal ? DB::Dwarf::LocationInfoMode::FULL_WITH_INLINE : DB::Dwarf::LocationInfoMode::FAST; - if (dwarf_it->second.findAddress(uintptr_t(physical_addr), location, mode, inline_frames)) - out << location.file.toString() << ":" << location.line << ": "; - } + DB::Dwarf::LocationInfo location; + + if (dwarf_it->second.findAddress(uintptr_t(physical_addr), location, mode, inline_frames)) + out << location.file.toString() << ":" << location.line << ": "; } - const auto * symbol = symbol_index.findSymbol(virtual_addr); - if (symbol) - { - int status = 0; - out << demangle(symbol->name, status); - } + if (const auto * const symbol = symbol_index.findSymbol(virtual_addr)) + out << collapseNames(demangle(symbol->name)); else out << "?"; @@ -411,64 +383,31 @@ static void toStringEveryLineImpl( for (size_t j = 0; j < inline_frames.size(); ++j) { const auto & frame = inline_frames[j]; - int status = 0; - callback(fmt::format("{}.{}. inlined from {}:{}: {}", - i, j+1, frame.location.file.toString(), frame.location.line, demangle(frame.name, status))); + callback(fmt::format( + "{}.{}. inlined from {}:{}: {}", + i, + j + 1, + frame.location.file.toString(), + frame.location.line, + collapseNames(demangle(frame.name)))); } callback(out.str()); out.str({}); } #else - std::stringstream out; // STYLE_CHECK_ALLOW_STD_STRING_STREAM - out.exceptions(std::ios::failbit); - - for (size_t i = offset; i < size; ++i) - { - const void * addr = frame_pointers[i]; - if (shouldShowAddress(addr)) - { - out << i << ". " << addr; - - callback(out.str()); - out.str({}); - } - } + for (size_t i = stack_trace.offset; i < stack_trace.size; ++i) + if (const void * const addr = stack_trace.pointers[i]; shouldShowAddress(addr)) + callback(fmt::format("{}. {}", i, addr)); #endif } -static std::string toStringImpl(const StackTrace::FramePointers & frame_pointers, size_t offset, size_t size) +void StackTrace::toStringEveryLine(std::function callback) const { - std::stringstream out; // STYLE_CHECK_ALLOW_STD_STRING_STREAM - out.exceptions(std::ios::failbit); - toStringEveryLineImpl(false, frame_pointers, offset, size, [&](const std::string & str) { out << str << '\n'; }); - return out.str(); + toStringEveryLineImpl(true, {frame_pointers, offset, size}, std::move(callback)); } -void StackTrace::toStringEveryLine(std::function callback) const -{ - toStringEveryLineImpl(true, frame_pointers, offset, size, std::move(callback)); -} - - -std::string StackTrace::toString() const -{ - return toStringStatic(frame_pointers, offset, size); -} - -std::string StackTrace::toString(void ** frame_pointers_, size_t offset, size_t size) -{ - __msan_unpoison(frame_pointers_, size * sizeof(*frame_pointers_)); - - StackTrace::FramePointers frame_pointers_copy{}; - for (size_t i = 0; i < size; ++i) - frame_pointers_copy[i] = frame_pointers_[i]; - - return toStringStatic(frame_pointers_copy, offset, size); -} - -using StackTraceRepresentation = std::tuple; -using StackTraceCache = std::map; +using StackTraceCache = std::map>; static StackTraceCache & cacheInstance() { @@ -478,21 +417,40 @@ static StackTraceCache & cacheInstance() static std::mutex stacktrace_cache_mutex; -std::string StackTrace::toStringStatic(const StackTrace::FramePointers & frame_pointers, size_t offset, size_t size) +String toStringCached(const StackTrace::FramePointers & pointers, size_t offset, size_t size) { /// Calculation of stack trace text is extremely slow. /// We use simple cache because otherwise the server could be overloaded by trash queries. /// Note that this cache can grow unconditionally, but practically it should be small. std::lock_guard lock{stacktrace_cache_mutex}; - StackTraceRepresentation key{frame_pointers, offset, size}; - auto & cache = cacheInstance(); - if (cache.contains(key)) - return cache[key]; + StackTraceCache & cache = cacheInstance(); - auto result = toStringImpl(frame_pointers, offset, size); - cache[key] = result; - return result; + if (auto it = cache.find(StackTraceRefTriple{pointers, offset, size}); it != cache.end()) + return it->second; + else + { + std::stringstream out; // STYLE_CHECK_ALLOW_STD_STRING_STREAM + out.exceptions(std::ios::failbit); + toStringEveryLineImpl(false, {pointers, offset, size}, [&](std::string_view str) { out << str << '\n'; }); + + return cache.emplace(StackTraceTriple{pointers, offset, size}, out.str()).first->second; + } +} + +std::string StackTrace::toString() const +{ + return toStringCached(frame_pointers, offset, size); +} + +std::string StackTrace::toString(void ** frame_pointers_raw, size_t offset, size_t size) +{ + __msan_unpoison(frame_pointers_raw, size * sizeof(*frame_pointers_raw)); + + StackTrace::FramePointers frame_pointers; + std::copy_n(frame_pointers_raw, size, frame_pointers.begin()); + + return toStringCached(frame_pointers, offset, size); } void StackTrace::dropCache() diff --git a/src/Common/StackTrace.h b/src/Common/StackTrace.h index f07c05107ee..3940c880c5b 100644 --- a/src/Common/StackTrace.h +++ b/src/Common/StackTrace.h @@ -46,26 +46,25 @@ public: using Frames = std::array; /// Tries to capture stack trace - StackTrace(); + inline StackTrace() { tryCapture(); } /// Tries to capture stack trace. Fallbacks on parsing caller address from /// signal context if no stack trace could be captured explicit StackTrace(const ucontext_t & signal_context); /// Creates empty object for deferred initialization - explicit StackTrace(NoCapture); + explicit inline StackTrace(NoCapture) {} - size_t getSize() const; - size_t getOffset() const; - const FramePointers & getFramePointers() const; + constexpr size_t getSize() const { return size; } + constexpr size_t getOffset() const { return offset; } + const FramePointers & getFramePointers() const { return frame_pointers; } std::string toString() const; static std::string toString(void ** frame_pointers, size_t offset, size_t size); - static std::string toStringStatic(const FramePointers & frame_pointers, size_t offset, size_t size); static void dropCache(); static void symbolize(const FramePointers & frame_pointers, size_t offset, size_t size, StackTrace::Frames & frames); - void toStringEveryLine(std::function callback) const; + void toStringEveryLine(std::function callback) const; /// Displaying the addresses can be disabled for security reasons. /// If you turn off addresses, it will be more secure, but we will be unable to help you with debugging. diff --git a/src/Daemon/BaseDaemon.cpp b/src/Daemon/BaseDaemon.cpp index fbfa9e68774..18c4c0d97a0 100644 --- a/src/Daemon/BaseDaemon.cpp +++ b/src/Daemon/BaseDaemon.cpp @@ -374,7 +374,7 @@ private: } /// Write symbolized stack trace line by line for better grep-ability. - stack_trace.toStringEveryLine([&](const std::string & s) { LOG_FATAL(log, fmt::runtime(s)); }); + stack_trace.toStringEveryLine([&](std::string_view s) { LOG_FATAL(log, fmt::runtime(s)); }); #if defined(OS_LINUX) /// Write information about binary checksum. It can be difficult to calculate, so do it only after printing stack trace. diff --git a/src/DataTypes/DataTypeLowCardinality.cpp b/src/DataTypes/DataTypeLowCardinality.cpp index 5e3a1cd3a0e..8293455cabc 100644 --- a/src/DataTypes/DataTypeLowCardinality.cpp +++ b/src/DataTypes/DataTypeLowCardinality.cpp @@ -55,7 +55,7 @@ namespace } template - void operator()(Id) + void operator()(TypeList) { if (typeid_cast *>(&keys_type)) column = creator(static_cast *>(nullptr)); diff --git a/src/Functions/FunctionsEmbeddedDictionaries.h b/src/Functions/FunctionsEmbeddedDictionaries.h index e54ab0277d5..af040c6ab93 100644 --- a/src/Functions/FunctionsEmbeddedDictionaries.h +++ b/src/Functions/FunctionsEmbeddedDictionaries.h @@ -166,12 +166,12 @@ public: if (arguments[0]->getName() != TypeName) throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Illegal type {} of argument of function {} (must be {})", - arguments[0]->getName(), getName(), String(TypeName)); + arguments[0]->getName(), getName(), TypeName); - if (arguments.size() == 2 && arguments[1]->getName() != TypeName) + if (arguments.size() == 2 && arguments[1]->getName() != "String") throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, - "Illegal type {} of the second ('point of view') argument of function {} (must be {})", - arguments[1]->getName(), getName(), String(TypeName)); + "Illegal type {} of the second ('point of view') argument of function {} (must be String)", + arguments[1]->getName(), getName()); return arguments[0]; } @@ -257,16 +257,16 @@ public: if (arguments[0]->getName() != TypeName) throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Illegal type {} of first argument of function {} (must be {})", - arguments[0]->getName(), getName(), String(TypeName)); + arguments[0]->getName(), getName(), TypeName); if (arguments[1]->getName() != TypeName) throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Illegal type {} of second argument of function {} (must be {})", - arguments[1]->getName(), getName(), String(TypeName)); + arguments[1]->getName(), getName(), TypeName); - if (arguments.size() == 3 && arguments[2]->getName() != TypeName) + if (arguments.size() == 3 && arguments[2]->getName() != "String") throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, - "Illegal type {} of the third ('point of view') argument of function {} (must be {})", - arguments[2]->getName(), getName(), String(TypeName)); + "Illegal type {} of the third ('point of view') argument of function {} (must be String)", + arguments[2]->getName(), getName()); return std::make_shared(); } @@ -390,12 +390,12 @@ public: if (arguments[0]->getName() != TypeName) throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Illegal type {} of argument of function {} (must be {})", - arguments[0]->getName(), getName(), String(TypeName)); + arguments[0]->getName(), getName(), TypeName); - if (arguments.size() == 2 && arguments[1]->getName() != TypeName) + if (arguments.size() == 2 && arguments[1]->getName() != "String") throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, - "Illegal type {} of the second ('point of view') argument of function {} (must be {})", - arguments[1]->getName(), getName(), String(TypeName)); + "Illegal type {} of the second ('point of view') argument of function {} (must be String)", + arguments[1]->getName(), getName()); return std::make_shared(arguments[0]); } @@ -591,15 +591,15 @@ public: "Number of arguments for function {} doesn't match: passed {}, should be 1 or 2.", getName(), arguments.size()); - if (arguments[0]->getName() != TypeName) + if (arguments[0]->getName() != "UInt32") throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, - "Illegal type {} of the first argument of function {} (must be {})", - arguments[0]->getName(), getName(), String(TypeName)); + "Illegal type {} of the first argument of function {} (must be UInt32)", + arguments[0]->getName(), getName()); - if (arguments.size() == 2 && arguments[1]->getName() != TypeName) + if (arguments.size() == 2 && arguments[1]->getName() != "String") throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, - "Illegal type {} of the second argument of function {} (must be {})", - arguments[0]->getName(), getName(), String(TypeName)); + "Illegal type {} of the second argument of function {} (must be String)", + arguments[0]->getName(), getName()); return std::make_shared(); } diff --git a/src/Functions/array/arrayIntersect.cpp b/src/Functions/array/arrayIntersect.cpp index 1a718595a3b..c6f0a5afa62 100644 --- a/src/Functions/array/arrayIntersect.cpp +++ b/src/Functions/array/arrayIntersect.cpp @@ -107,7 +107,7 @@ private: : arrays(arrays_), data_type(data_type_), result(result_) {} template - void operator()(Id); + void operator()(TypeList); }; struct DecimalExecutor @@ -120,7 +120,7 @@ private: : arrays(arrays_), data_type(data_type_), result(result_) {} template - void operator()(Id); + void operator()(TypeList); }; }; @@ -446,7 +446,7 @@ ColumnPtr FunctionArrayIntersect::executeImpl(const ColumnsWithTypeAndName & arg } template -void FunctionArrayIntersect::NumberExecutor::operator()(Id) +void FunctionArrayIntersect::NumberExecutor::operator()(TypeList) { using Container = ClearableHashMapWithStackMemory, INITIAL_SIZE_DEGREE>; @@ -456,7 +456,7 @@ void FunctionArrayIntersect::NumberExecutor::operator()(Id) } template -void FunctionArrayIntersect::DecimalExecutor::operator()(Id) +void FunctionArrayIntersect::DecimalExecutor::operator()(TypeList) { using Container = ClearableHashMapWithStackMemory, INITIAL_SIZE_DEGREE>; diff --git a/src/Interpreters/CrashLog.cpp b/src/Interpreters/CrashLog.cpp index 47a9d62fba6..f1f0ffb6f60 100644 --- a/src/Interpreters/CrashLog.cpp +++ b/src/Interpreters/CrashLog.cpp @@ -80,7 +80,7 @@ void collectCrashLog(Int32 signal, UInt64 thread_id, const String & query_id, co for (size_t i = stack_trace_offset; i < stack_trace_size; ++i) trace.push_back(reinterpret_cast(stack_trace.getFramePointers()[i])); - stack_trace.toStringEveryLine([&trace_full](const std::string & line) { trace_full.push_back(line); }); + stack_trace.toStringEveryLine([&trace_full](std::string_view line) { trace_full.push_back(line); }); CrashLogElement element{static_cast(time / 1000000000), time, signal, thread_id, query_id, trace, trace_full}; crash_log_owned->add(element); From 07a9e486e6aafa184d7a3ea244db0758137128c7 Mon Sep 17 00:00:00 2001 From: Mike Kot Date: Sat, 4 Mar 2023 21:37:28 +0300 Subject: [PATCH 553/841] memset for frame pointers' --- src/Common/StackTrace.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Common/StackTrace.cpp b/src/Common/StackTrace.cpp index eb6696e8c05..0aebaf9801c 100644 --- a/src/Common/StackTrace.cpp +++ b/src/Common/StackTrace.cpp @@ -425,14 +425,15 @@ String toStringCached(const StackTrace::FramePointers & pointers, size_t offset, std::lock_guard lock{stacktrace_cache_mutex}; StackTraceCache & cache = cacheInstance(); + const StackTraceRefTriple key{pointers, offset, size}; - if (auto it = cache.find(StackTraceRefTriple{pointers, offset, size}); it != cache.end()) + if (auto it = cache.find(key); it != cache.end()) return it->second; else { - std::stringstream out; // STYLE_CHECK_ALLOW_STD_STRING_STREAM + std::ostringstream out; // STYLE_CHECK_ALLOW_STD_STRING_STREAM out.exceptions(std::ios::failbit); - toStringEveryLineImpl(false, {pointers, offset, size}, [&](std::string_view str) { out << str << '\n'; }); + toStringEveryLineImpl(false, key, [&](std::string_view str) { out << str << '\n'; }); return cache.emplace(StackTraceTriple{pointers, offset, size}, out.str()).first->second; } @@ -447,7 +448,7 @@ std::string StackTrace::toString(void ** frame_pointers_raw, size_t offset, size { __msan_unpoison(frame_pointers_raw, size * sizeof(*frame_pointers_raw)); - StackTrace::FramePointers frame_pointers; + StackTrace::FramePointers frame_pointers{}; std::copy_n(frame_pointers_raw, size, frame_pointers.begin()); return toStringCached(frame_pointers, offset, size); From e50fd6e1ef67eaf7c69e173b9a4486c90e598f1f Mon Sep 17 00:00:00 2001 From: robot-clickhouse Date: Mon, 6 Mar 2023 16:35:17 +0000 Subject: [PATCH 554/841] Update version_date.tsv and changelogs after v23.2.3.17-stable --- docker/keeper/Dockerfile | 2 +- docker/server/Dockerfile.alpine | 2 +- docker/server/Dockerfile.ubuntu | 2 +- docs/changelogs/v23.2.3.17-stable.md | 23 +++++++++++++++++++++++ utils/list-versions/version_date.tsv | 5 +++++ 5 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 docs/changelogs/v23.2.3.17-stable.md diff --git a/docker/keeper/Dockerfile b/docker/keeper/Dockerfile index 09395befdad..500249b5bd6 100644 --- a/docker/keeper/Dockerfile +++ b/docker/keeper/Dockerfile @@ -29,7 +29,7 @@ RUN arch=${TARGETARCH:-amd64} \ esac ARG REPOSITORY="https://s3.amazonaws.com/clickhouse-builds/22.4/31c367d3cd3aefd316778601ff6565119fe36682/package_release" -ARG VERSION="23.2.1.2537" +ARG VERSION="23.2.3.17" ARG PACKAGES="clickhouse-keeper" # user/group precreated explicitly with fixed uid/gid on purpose. diff --git a/docker/server/Dockerfile.alpine b/docker/server/Dockerfile.alpine index 472f25eed2d..5f613eea4d0 100644 --- a/docker/server/Dockerfile.alpine +++ b/docker/server/Dockerfile.alpine @@ -33,7 +33,7 @@ RUN arch=${TARGETARCH:-amd64} \ # lts / testing / prestable / etc ARG REPO_CHANNEL="stable" ARG REPOSITORY="https://packages.clickhouse.com/tgz/${REPO_CHANNEL}" -ARG VERSION="23.2.1.2537" +ARG VERSION="23.2.3.17" ARG PACKAGES="clickhouse-client clickhouse-server clickhouse-common-static" # user/group precreated explicitly with fixed uid/gid on purpose. diff --git a/docker/server/Dockerfile.ubuntu b/docker/server/Dockerfile.ubuntu index 5dbb244c298..3e99bca8bc2 100644 --- a/docker/server/Dockerfile.ubuntu +++ b/docker/server/Dockerfile.ubuntu @@ -22,7 +22,7 @@ RUN sed -i "s|http://archive.ubuntu.com|${apt_archive}|g" /etc/apt/sources.list ARG REPO_CHANNEL="stable" ARG REPOSITORY="deb https://packages.clickhouse.com/deb ${REPO_CHANNEL} main" -ARG VERSION="23.2.1.2537" +ARG VERSION="23.2.3.17" ARG PACKAGES="clickhouse-client clickhouse-server clickhouse-common-static" # set non-empty deb_location_url url to create a docker image diff --git a/docs/changelogs/v23.2.3.17-stable.md b/docs/changelogs/v23.2.3.17-stable.md new file mode 100644 index 00000000000..fb2c4e394dc --- /dev/null +++ b/docs/changelogs/v23.2.3.17-stable.md @@ -0,0 +1,23 @@ +--- +sidebar_position: 1 +sidebar_label: 2023 +--- + +# 2023 Changelog + +### ClickHouse release v23.2.3.17-stable (dec18bf7281) FIXME as compared to v23.2.2.20-stable (f6c269c8df2) + +#### Bug Fix (user-visible misbehavior in official stable or prestable release) + +* Backported in [#46907](https://github.com/ClickHouse/ClickHouse/issues/46907): - Fix incorrect alias recursion in QueryNormalizer. [#46609](https://github.com/ClickHouse/ClickHouse/pull/46609) ([Raúl Marín](https://github.com/Algunenano)). +* Backported in [#47091](https://github.com/ClickHouse/ClickHouse/issues/47091): - Fix arithmetic operations in aggregate optimization with `min` and `max`. [#46705](https://github.com/ClickHouse/ClickHouse/pull/46705) ([Duc Canh Le](https://github.com/canhld94)). +* Backported in [#46885](https://github.com/ClickHouse/ClickHouse/issues/46885): Fix MSan report in the `maxIntersections` function. This closes [#43126](https://github.com/ClickHouse/ClickHouse/issues/43126). [#46847](https://github.com/ClickHouse/ClickHouse/pull/46847) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Backported in [#47067](https://github.com/ClickHouse/ClickHouse/issues/47067): Fix typo in systemd service, which causes the systemd service start to fail. [#47051](https://github.com/ClickHouse/ClickHouse/pull/47051) ([Palash Goel](https://github.com/palash-goel)). +* Backported in [#47259](https://github.com/ClickHouse/ClickHouse/issues/47259): Fix concrete columns PREWHERE support. [#47154](https://github.com/ClickHouse/ClickHouse/pull/47154) ([Azat Khuzhin](https://github.com/azat)). + +#### NOT FOR CHANGELOG / INSIGNIFICANT + +* Use /etc/default/clickhouse in systemd too [#47003](https://github.com/ClickHouse/ClickHouse/pull/47003) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* do flushUntrackedMemory when context switches [#47102](https://github.com/ClickHouse/ClickHouse/pull/47102) ([Sema Checherinda](https://github.com/CheSema)). +* Update typing for a new PyGithub version [#47123](https://github.com/ClickHouse/ClickHouse/pull/47123) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). + diff --git a/utils/list-versions/version_date.tsv b/utils/list-versions/version_date.tsv index 3814e94bf24..34bc3f646fc 100644 --- a/utils/list-versions/version_date.tsv +++ b/utils/list-versions/version_date.tsv @@ -1,7 +1,11 @@ +v23.2.3.17-stable 2023-03-06 +v23.2.2.20-stable 2023-03-01 v23.2.1.2537-stable 2023-02-23 +v23.1.4.58-stable 2023-03-01 v23.1.3.5-stable 2023-02-03 v23.1.2.9-stable 2023-01-29 v23.1.1.3077-stable 2023-01-25 +v22.12.4.76-stable 2023-03-01 v22.12.3.5-stable 2023-01-10 v22.12.2.25-stable 2023-01-06 v22.12.1.1752-stable 2022-12-15 @@ -25,6 +29,7 @@ v22.9.4.32-stable 2022-10-26 v22.9.3.18-stable 2022-09-30 v22.9.2.7-stable 2022-09-23 v22.9.1.2603-stable 2022-09-22 +v22.8.14.53-lts 2023-02-27 v22.8.13.20-lts 2023-01-29 v22.8.12.45-lts 2023-01-10 v22.8.11.15-lts 2022-12-08 From cf85915466362a5b5c5d317076f2ebac35996411 Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Mon, 6 Mar 2023 16:37:41 +0000 Subject: [PATCH 555/841] Refactor grants logic, create test for grants, update docs --- docs/en/sql-reference/statements/grant.md | 8 +++---- docs/ru/sql-reference/statements/grant.md | 8 +++---- src/Interpreters/InterpreterCreateQuery.cpp | 3 ++- .../02561_temporary_table_grants.reference | 2 ++ .../02561_temporary_table_grants.sh | 24 +++++++++++++++++++ 5 files changed, 36 insertions(+), 9 deletions(-) create mode 100644 tests/queries/0_stateless/02561_temporary_table_grants.reference create mode 100755 tests/queries/0_stateless/02561_temporary_table_grants.sh diff --git a/docs/en/sql-reference/statements/grant.md b/docs/en/sql-reference/statements/grant.md index 653c4c754a0..1d9b2c9ea30 100644 --- a/docs/en/sql-reference/statements/grant.md +++ b/docs/en/sql-reference/statements/grant.md @@ -105,8 +105,8 @@ Hierarchy of privileges: - [CREATE](#grant-create) - `CREATE DATABASE` - `CREATE TABLE` - - `CREATE TEMPORARY TABLE` - - `CREATE ARBITRARY TEMPORARY TABLE` + - `CREATE ARBITRARY TEMPORARY TABLE` + - `CREATE TEMPORARY TABLE` - `CREATE VIEW` - `CREATE DICTIONARY` - `CREATE FUNCTION` @@ -314,8 +314,8 @@ Allows executing [CREATE](../../sql-reference/statements/create/index.md) and [A - `CREATE`. Level: `GROUP` - `CREATE DATABASE`. Level: `DATABASE` - `CREATE TABLE`. Level: `TABLE` - - `CREATE TEMPORARY TABLE`. Level: `GLOBAL` - - `CREATE ARBITRARY TEMPORARY TABLE`. Level: `GLOBAL` + - `CREATE ARBITRARY TEMPORARY TABLE`. Level: `GLOBAL` + - `CREATE TEMPORARY TABLE`. Level: `GLOBAL` - `CREATE VIEW`. Level: `VIEW` - `CREATE DICTIONARY`. Level: `DICTIONARY` diff --git a/docs/ru/sql-reference/statements/grant.md b/docs/ru/sql-reference/statements/grant.md index 97d7454e8c9..73c63850750 100644 --- a/docs/ru/sql-reference/statements/grant.md +++ b/docs/ru/sql-reference/statements/grant.md @@ -107,8 +107,8 @@ GRANT SELECT(x,y) ON db.table TO john WITH GRANT OPTION - [CREATE](#grant-create) - `CREATE DATABASE` - `CREATE TABLE` - - `CREATE TEMPORARY TABLE` - - `CREATE ARBITRARY TEMPORARY TABLE` + - `CREATE ARBITRARY TEMPORARY TABLE` + - `CREATE TEMPORARY TABLE` - `CREATE VIEW` - `CREATE DICTIONARY` - `CREATE FUNCTION` @@ -315,8 +315,8 @@ GRANT INSERT(x,y) ON db.table TO john - `CREATE`. Уровень: `GROUP` - `CREATE DATABASE`. Уровень: `DATABASE` - `CREATE TABLE`. Уровень: `TABLE` - - `CREATE TEMPORARY TABLE`. Уровень: `GLOBAL` - - `CREATE ARBITRARY TEMPORARY TABLE`. Уровень: `GLOBAL` + - `CREATE ARBITRARY TEMPORARY TABLE`. Уровень: `GLOBAL` + - `CREATE TEMPORARY TABLE`. Уровень: `GLOBAL` - `CREATE VIEW`. Уровень: `VIEW` - `CREATE DICTIONARY`. Уровень: `DICTIONARY` diff --git a/src/Interpreters/InterpreterCreateQuery.cpp b/src/Interpreters/InterpreterCreateQuery.cpp index 98202595b0d..3491ba68108 100644 --- a/src/Interpreters/InterpreterCreateQuery.cpp +++ b/src/Interpreters/InterpreterCreateQuery.cpp @@ -1735,9 +1735,10 @@ AccessRightsElements InterpreterCreateQuery::getRequiredAccess() const { if (create.temporary) { - required_access.emplace_back(AccessType::CREATE_TEMPORARY_TABLE); if (create.storage && create.storage->engine && create.storage->engine->name != "Memory") required_access.emplace_back(AccessType::CREATE_ARBITRARY_TEMPORARY_TABLE); + else + required_access.emplace_back(AccessType::CREATE_TEMPORARY_TABLE); } else { diff --git a/tests/queries/0_stateless/02561_temporary_table_grants.reference b/tests/queries/0_stateless/02561_temporary_table_grants.reference new file mode 100644 index 00000000000..2c94e483710 --- /dev/null +++ b/tests/queries/0_stateless/02561_temporary_table_grants.reference @@ -0,0 +1,2 @@ +OK +OK diff --git a/tests/queries/0_stateless/02561_temporary_table_grants.sh b/tests/queries/0_stateless/02561_temporary_table_grants.sh new file mode 100755 index 00000000000..d2b2bdc5eba --- /dev/null +++ b/tests/queries/0_stateless/02561_temporary_table_grants.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +# shellcheck source=../shell_config.sh +. "$CURDIR"/../shell_config.sh + +set -e + +user=user_$CLICKHOUSE_TEST_UNIQUE_NAME +$CLICKHOUSE_CLIENT --query "DROP USER IF EXISTS $user" +$CLICKHOUSE_CLIENT --query "CREATE USER $user IDENTIFIED WITH PLAINTEXT_PASSWORD BY 'hello'" + +$CLICKHOUSE_CLIENT --user "$user" --password hello --query "CREATE TEMPORARY TABLE tmp_memory_02561(name String)" 2>&1 | grep -F "Not enough privileges. To execute this query it's necessary to have grant CREATE TEMPORARY TABLE" > /dev/null && echo "OK" + +$CLICKHOUSE_CLIENT --query "GRANT CREATE TEMPORARY TABLE ON *.* TO $user" +$CLICKHOUSE_CLIENT --user "$user" --password hello --query "CREATE TEMPORARY TABLE tmp_memory_02561(name String)" + +$CLICKHOUSE_CLIENT --user "$user" --password hello --query "CREATE TEMPORARY TABLE tmp_mergetree_02561(name String) ENGINE = MergeTree() ORDER BY name" 2>&1 | grep -F "Not enough privileges. To execute this query it's necessary to have grant CREATE ARBITRARY TEMPORARY TABLE" > /dev/null && echo "OK" + +$CLICKHOUSE_CLIENT --query "GRANT CREATE ARBITRARY TEMPORARY TABLE ON *.* TO $user" + +$CLICKHOUSE_CLIENT --user "$user" --password hello --query "CREATE TEMPORARY TABLE tmp_mergetree_02561(name String) ENGINE = MergeTree() ORDER BY name" + +$CLICKHOUSE_CLIENT --query "DROP USER $user" From 8847561fc20bead8b5cfa2435c4a275497168c8c Mon Sep 17 00:00:00 2001 From: avogar Date: Mon, 6 Mar 2023 16:49:28 +0000 Subject: [PATCH 556/841] Add optional parameters to some codecs, fix aborts in clickhouse-compressor with some codecs --- .../sql-reference/statements/create/table.md | 8 ++--- programs/compressor/Compressor.cpp | 5 ++- src/Compression/CompressionCodecDelta.cpp | 8 +++-- .../CompressionCodecDoubleDelta.cpp | 31 ++++++++++++++--- src/Compression/CompressionCodecFPC.cpp | 24 ++++++++++--- src/Compression/CompressionCodecGorilla.cpp | 30 ++++++++++++++-- src/Compression/CompressionCodecT64.cpp | 5 ++- .../02584_compressor_codecs.reference | 14 ++++++++ .../0_stateless/02584_compressor_codecs.sh | 34 +++++++++++++++++++ 9 files changed, 140 insertions(+), 19 deletions(-) create mode 100644 tests/queries/0_stateless/02584_compressor_codecs.reference create mode 100755 tests/queries/0_stateless/02584_compressor_codecs.sh diff --git a/docs/en/sql-reference/statements/create/table.md b/docs/en/sql-reference/statements/create/table.md index 54977e1b0ab..599bef6fcd1 100644 --- a/docs/en/sql-reference/statements/create/table.md +++ b/docs/en/sql-reference/statements/create/table.md @@ -390,19 +390,19 @@ These codecs are designed to make compression more effective by using specific f #### Delta -`Delta(delta_bytes)` — Compression approach in which raw values are replaced by the difference of two neighboring values, except for the first value that stays unchanged. Up to `delta_bytes` are used for storing delta values, so `delta_bytes` is the maximum size of raw values. Possible `delta_bytes` values: 1, 2, 4, 8. The default value for `delta_bytes` is `sizeof(type)` if equal to 1, 2, 4, or 8. In all other cases, it’s 1. +`Delta(delta_bytes)` — Compression approach in which raw values are replaced by the difference of two neighboring values, except for the first value that stays unchanged. Up to `delta_bytes` are used for storing delta values, so `delta_bytes` is the maximum size of raw values. Possible `delta_bytes` values: 1, 2, 4, 8. The default value for `delta_bytes` is `sizeof(type)` if equal to 1, 2, 4, or 8. #### DoubleDelta -`DoubleDelta` — Calculates delta of deltas and writes it in compact binary form. Optimal compression rates are achieved for monotonic sequences with a constant stride, such as time series data. Can be used with any fixed-width type. Implements the algorithm used in Gorilla TSDB, extending it to support 64-bit types. Uses 1 extra bit for 32-byte deltas: 5-bit prefixes instead of 4-bit prefixes. For additional information, see Compressing Time Stamps in [Gorilla: A Fast, Scalable, In-Memory Time Series Database](http://www.vldb.org/pvldb/vol8/p1816-teller.pdf). +`DoubleDelta(bytes_size)` — Calculates delta of deltas and writes it in compact binary form. Possible `bytes_size` values: 1, 2, 4, 8, the default value for is `sizeof(type)` if equal to 1, 2, 4, or 8. Optimal compression rates are achieved for monotonic sequences with a constant stride, such as time series data. Can be used with any fixed-width type. Implements the algorithm used in Gorilla TSDB, extending it to support 64-bit types. Uses 1 extra bit for 32-byte deltas: 5-bit prefixes instead of 4-bit prefixes. For additional information, see Compressing Time Stamps in [Gorilla: A Fast, Scalable, In-Memory Time Series Database](http://www.vldb.org/pvldb/vol8/p1816-teller.pdf). #### Gorilla -`Gorilla` — Calculates XOR between current and previous floating point value and writes it in compact binary form. The smaller the difference between consecutive values is, i.e. the slower the values of the series changes, the better the compression rate. Implements the algorithm used in Gorilla TSDB, extending it to support 64-bit types. For additional information, see section 4.1 in [Gorilla: A Fast, Scalable, In-Memory Time Series Database](https://doi.org/10.14778/2824032.2824078). +`Gorilla(bytes_size)` — Calculates XOR between current and previous floating point value and writes it in compact binary form. The smaller the difference between consecutive values is, i.e. the slower the values of the series changes, the better the compression rate. Implements the algorithm used in Gorilla TSDB, extending it to support 64-bit types. Possible `bytes_size` values: 1, 2, 4, 8, the default value is `sizeof(type)` if equal to 1, 2, 4, or 8. For additional information, see section 4.1 in [Gorilla: A Fast, Scalable, In-Memory Time Series Database](https://doi.org/10.14778/2824032.2824078). #### FPC -`FPC` - Repeatedly predicts the next floating point value in the sequence using the better of two predictors, then XORs the actual with the predicted value, and leading-zero compresses the result. Similar to Gorilla, this is efficient when storing a series of floating point values that change slowly. For 64-bit values (double), FPC is faster than Gorilla, for 32-bit values your mileage may vary. For a detailed description of the algorithm see [High Throughput Compression of Double-Precision Floating-Point Data](https://userweb.cs.txstate.edu/~burtscher/papers/dcc07a.pdf). +`FPC(level, float_size)` - Repeatedly predicts the next floating point value in the sequence using the better of two predictors, then XORs the actual with the predicted value, and leading-zero compresses the result. Similar to Gorilla, this is efficient when storing a series of floating point values that change slowly. For 64-bit values (double), FPC is faster than Gorilla, for 32-bit values your mileage may vary. Possible `level` values: 1-28, the default value is 12. Possible `float_size` values: 4, 8, the default value is `sizeof(type)` if type is Float. For a detailed description of the algorithm see [High Throughput Compression of Double-Precision Floating-Point Data](https://userweb.cs.txstate.edu/~burtscher/papers/dcc07a.pdf). #### T64 diff --git a/programs/compressor/Compressor.cpp b/programs/compressor/Compressor.cpp index b60138b5692..625edc44504 100644 --- a/programs/compressor/Compressor.cpp +++ b/programs/compressor/Compressor.cpp @@ -66,6 +66,7 @@ int mainEntryClickHouseCompressor(int argc, char ** argv) using namespace DB; namespace po = boost::program_options; + bool print_stacktrace = false; try { po::options_description desc = createOptionsDescription("Allowed options", getTerminalWidth()); @@ -84,6 +85,7 @@ int mainEntryClickHouseCompressor(int argc, char ** argv) ("level", po::value(), "compression level for codecs specified via flags") ("none", "use no compression instead of LZ4") ("stat", "print block statistics of compressed data") + ("stacktrace", "print stacktrace of exception") ; po::positional_options_description positional_desc; @@ -107,6 +109,7 @@ int mainEntryClickHouseCompressor(int argc, char ** argv) bool use_deflate_qpl = options.count("deflate_qpl"); bool stat_mode = options.count("stat"); bool use_none = options.count("none"); + print_stacktrace = options.count("stacktrace"); unsigned block_size = options["block-size"].as(); std::vector codecs; if (options.count("codec")) @@ -192,7 +195,7 @@ int mainEntryClickHouseCompressor(int argc, char ** argv) } catch (...) { - std::cerr << getCurrentExceptionMessage(true) << '\n'; + std::cerr << getCurrentExceptionMessage(print_stacktrace) << '\n'; return getCurrentExceptionCode(); } diff --git a/src/Compression/CompressionCodecDelta.cpp b/src/Compression/CompressionCodecDelta.cpp index 6d6078b9ee1..77979ebecf8 100644 --- a/src/Compression/CompressionCodecDelta.cpp +++ b/src/Compression/CompressionCodecDelta.cpp @@ -202,8 +202,8 @@ void registerCodecDelta(CompressionCodecFactory & factory) const auto children = arguments->children; const auto * literal = children[0]->as(); - if (!literal) - throw Exception(ErrorCodes::ILLEGAL_CODEC_PARAMETER, "Delta codec argument must be integer"); + if (!literal || literal->value.getType() != Field::Types::Which::UInt64) + throw Exception(ErrorCodes::ILLEGAL_CODEC_PARAMETER, "Delta codec argument must be unsigned integer"); size_t user_bytes_size = literal->value.safeGet(); if (user_bytes_size != 1 && user_bytes_size != 2 && user_bytes_size != 4 && user_bytes_size != 8) @@ -214,6 +214,10 @@ void registerCodecDelta(CompressionCodecFactory & factory) { delta_bytes_size = getDeltaBytesSize(column_type); } + else + { + throw Exception(ErrorCodes::BAD_ARGUMENTS, "Delta codec cannot be used without column type or delta_size argument"); + } return std::make_shared(delta_bytes_size); }; diff --git a/src/Compression/CompressionCodecDoubleDelta.cpp b/src/Compression/CompressionCodecDoubleDelta.cpp index 782675dfd32..2b815d37d1a 100644 --- a/src/Compression/CompressionCodecDoubleDelta.cpp +++ b/src/Compression/CompressionCodecDoubleDelta.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include @@ -145,6 +145,8 @@ namespace ErrorCodes extern const int CANNOT_COMPRESS; extern const int CANNOT_DECOMPRESS; extern const int BAD_ARGUMENTS; + extern const int ILLEGAL_SYNTAX_FOR_CODEC_TYPE; + extern const int ILLEGAL_CODEC_PARAMETER; } namespace @@ -549,10 +551,31 @@ void registerCodecDoubleDelta(CompressionCodecFactory & factory) factory.registerCompressionCodecWithType("DoubleDelta", method_code, [&](const ASTPtr & arguments, const IDataType * column_type) -> CompressionCodecPtr { - if (arguments) - throw Exception(ErrorCodes::BAD_ARGUMENTS, "Codec DoubleDelta does not accept any arguments"); + UInt8 data_bytes_size = 0; + if (arguments && !arguments->children.empty()) + { + if (arguments->children.size() > 1) + throw Exception(ErrorCodes::ILLEGAL_SYNTAX_FOR_CODEC_TYPE, "DoubleDelta codec must have 1 parameter, given {}", arguments->children.size()); + + const auto children = arguments->children; + const auto * literal = children[0]->as(); + if (!literal || literal->value.getType() != Field::Types::Which::UInt64) + throw Exception(ErrorCodes::ILLEGAL_CODEC_PARAMETER, "DoubleDelta codec argument must be unsigned integer"); + + size_t user_bytes_size = literal->value.safeGet(); + if (user_bytes_size != 1 && user_bytes_size != 2 && user_bytes_size != 4 && user_bytes_size != 8) + throw Exception(ErrorCodes::ILLEGAL_CODEC_PARAMETER, "Argument value for DoubleDelta codec can be 1, 2, 4 or 8, given {}", user_bytes_size); + data_bytes_size = static_cast(user_bytes_size); + } + else if (column_type) + { + data_bytes_size = getDataBytesSize(column_type); + } + else + { + throw Exception(ErrorCodes::BAD_ARGUMENTS, "DoubleDelta codec cannot be used without column type or bytes_size argument"); + } - UInt8 data_bytes_size = column_type ? getDataBytesSize(column_type) : 0; return std::make_shared(data_bytes_size); }); } diff --git a/src/Compression/CompressionCodecFPC.cpp b/src/Compression/CompressionCodecFPC.cpp index 31b12b762c8..ca746b3c085 100644 --- a/src/Compression/CompressionCodecFPC.cpp +++ b/src/Compression/CompressionCodecFPC.cpp @@ -116,21 +116,37 @@ void registerCodecFPC(CompressionCodecFactory & factory) UInt8 level = CompressionCodecFPC::DEFAULT_COMPRESSION_LEVEL; if (arguments && !arguments->children.empty()) { - if (arguments->children.size() > 1) + if (arguments->children.size() > 2) { throw Exception(ErrorCodes::ILLEGAL_SYNTAX_FOR_CODEC_TYPE, - "FPC codec must have 1 parameter, given {}", arguments->children.size()); + "FPC codec must have from 0 to 2 parameters, given {}", arguments->children.size()); } const auto * literal = arguments->children.front()->as(); - if (!literal) - throw Exception(ErrorCodes::ILLEGAL_CODEC_PARAMETER, "FPC codec argument must be integer"); + if (!literal || literal->value.getType() != Field::Types::Which::UInt64) + throw Exception(ErrorCodes::ILLEGAL_CODEC_PARAMETER, "FPC codec argument must be unsigned integer"); level = literal->value.safeGet(); if (level < 1 || level > CompressionCodecFPC::MAX_COMPRESSION_LEVEL) throw Exception(ErrorCodes::ILLEGAL_CODEC_PARAMETER, "FPC codec level must be between {} and {}", 1, static_cast(CompressionCodecFPC::MAX_COMPRESSION_LEVEL)); + + if (arguments->children.size() == 2) + { + literal = arguments->children[1]->as(); + if (!literal || !isInt64OrUInt64FieldType(literal->value.getType())) + throw Exception(ErrorCodes::ILLEGAL_CODEC_PARAMETER, "FPC codec argument must be unsigned integer"); + + size_t user_float_width = literal->value.safeGet(); + if (user_float_width != 4 && user_float_width != 8) + throw Exception(ErrorCodes::ILLEGAL_CODEC_PARAMETER, "Float size for FPC codec can be 4 or 8, given {}", user_float_width); + float_width = static_cast(user_float_width); + } } + + if (float_width == 0) + throw Exception(ErrorCodes::BAD_ARGUMENTS, "FPC codec cannot be used without column type or float size argument"); + return std::make_shared(float_width, level); }; factory.registerCompressionCodecWithType("FPC", method_code, codec_builder); diff --git a/src/Compression/CompressionCodecGorilla.cpp b/src/Compression/CompressionCodecGorilla.cpp index d68648bd83c..1c25a8ce4a0 100644 --- a/src/Compression/CompressionCodecGorilla.cpp +++ b/src/Compression/CompressionCodecGorilla.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -134,6 +135,8 @@ namespace ErrorCodes extern const int CANNOT_COMPRESS; extern const int CANNOT_DECOMPRESS; extern const int BAD_ARGUMENTS; + extern const int ILLEGAL_SYNTAX_FOR_CODEC_TYPE; + extern const int ILLEGAL_CODEC_PARAMETER; } namespace @@ -445,10 +448,31 @@ void registerCodecGorilla(CompressionCodecFactory & factory) UInt8 method_code = static_cast(CompressionMethodByte::Gorilla); auto codec_builder = [&](const ASTPtr & arguments, const IDataType * column_type) -> CompressionCodecPtr { - if (arguments) - throw Exception(ErrorCodes::BAD_ARGUMENTS, "Codec Gorilla does not accept any arguments"); + UInt8 data_bytes_size = 0; + if (arguments && !arguments->children.empty()) + { + if (arguments->children.size() > 1) + throw Exception(ErrorCodes::ILLEGAL_SYNTAX_FOR_CODEC_TYPE, "Gorilla codec must have 1 parameter, given {}", arguments->children.size()); + + const auto children = arguments->children; + const auto * literal = children[0]->as(); + if (!literal || literal->value.getType() != Field::Types::Which::UInt64) + throw Exception(ErrorCodes::ILLEGAL_CODEC_PARAMETER, "Gorilla codec argument must be unsigned integer"); + + size_t user_bytes_size = literal->value.safeGet(); + if (user_bytes_size != 1 && user_bytes_size != 2 && user_bytes_size != 4 && user_bytes_size != 8) + throw Exception(ErrorCodes::ILLEGAL_CODEC_PARAMETER, "Argument value for Gorilla codec can be 1, 2, 4 or 8, given {}", user_bytes_size); + data_bytes_size = static_cast(user_bytes_size); + } + else if (column_type) + { + data_bytes_size = getDataBytesSize(column_type); + } + else + { + throw Exception(ErrorCodes::BAD_ARGUMENTS, "Gorilla codec cannot be used without column type or bytes_size argument"); + } - UInt8 data_bytes_size = column_type ? getDataBytesSize(column_type) : 0; return std::make_shared(data_bytes_size); }; factory.registerCompressionCodecWithType("Gorilla", method_code, codec_builder); diff --git a/src/Compression/CompressionCodecT64.cpp b/src/Compression/CompressionCodecT64.cpp index e7f1615128a..9704193b712 100644 --- a/src/Compression/CompressionCodecT64.cpp +++ b/src/Compression/CompressionCodecT64.cpp @@ -720,6 +720,9 @@ void registerCodecT64(CompressionCodecFactory & factory) { auto reg_func = [&](const ASTPtr & arguments, const IDataType * type) -> CompressionCodecPtr { + if (!type) + throw Exception(ErrorCodes::ILLEGAL_SYNTAX_FOR_CODEC_TYPE, "T64 codec is not supported for use without specified column type"); + Variant variant = Variant::Byte; if (arguments && !arguments->children.empty()) @@ -743,7 +746,7 @@ void registerCodecT64(CompressionCodecFactory & factory) } auto type_idx = typeIdx(type); - if (type && type_idx == TypeIndex::Nothing) + if (type_idx == TypeIndex::Nothing) throw Exception(ErrorCodes::ILLEGAL_SYNTAX_FOR_CODEC_TYPE, "T64 codec is not supported for specified type {}", type->getName()); return std::make_shared(type_idx, variant); }; diff --git a/tests/queries/0_stateless/02584_compressor_codecs.reference b/tests/queries/0_stateless/02584_compressor_codecs.reference new file mode 100644 index 00000000000..23751ef6c1f --- /dev/null +++ b/tests/queries/0_stateless/02584_compressor_codecs.reference @@ -0,0 +1,14 @@ +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 diff --git a/tests/queries/0_stateless/02584_compressor_codecs.sh b/tests/queries/0_stateless/02584_compressor_codecs.sh new file mode 100755 index 00000000000..930d101466b --- /dev/null +++ b/tests/queries/0_stateless/02584_compressor_codecs.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +# shellcheck source=../shell_config.sh +. "$CURDIR"/../shell_config.sh + +echo "Hello, World!" > 02584_test_data + +$CLICKHOUSE_COMPRESSOR --codec 'Delta' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' 2>&1 | grep -c "BAD_ARGUMENTS"; +$CLICKHOUSE_COMPRESSOR --codec 'Delta(5)' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' 2>&1 | grep -c "ILLEGAL_CODEC_PARAMETER"; +$CLICKHOUSE_COMPRESSOR --codec 'Delta([1,2])' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' 2>&1 | grep -c "ILLEGAL_CODEC_PARAMETER"; +$CLICKHOUSE_COMPRESSOR --codec 'Delta(4)' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out'; + +$CLICKHOUSE_COMPRESSOR --codec 'DoubleDelta' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' 2>&1 | grep -c "BAD_ARGUMENTS"; +$CLICKHOUSE_COMPRESSOR --codec 'DoubleDelta(5)' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' 2>&1 | grep -c "ILLEGAL_CODEC_PARAMETER"; +$CLICKHOUSE_COMPRESSOR --codec 'DoubleDelta([1,2])' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' 2>&1 | grep -c "ILLEGAL_CODEC_PARAMETER"; +$CLICKHOUSE_COMPRESSOR --codec 'DoubleDelta(4)' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out'; + +$CLICKHOUSE_COMPRESSOR --codec 'Gorilla' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' 2>&1 | grep -c "BAD_ARGUMENTS"; +$CLICKHOUSE_COMPRESSOR --codec 'Gorilla(5)' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' 2>&1 | grep -c "ILLEGAL_CODEC_PARAMETER"; +$CLICKHOUSE_COMPRESSOR --codec 'Gorilla([1,2])' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' 2>&1 | grep -c "ILLEGAL_CODEC_PARAMETER"; +$CLICKHOUSE_COMPRESSOR --codec 'Gorilla(4)' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out'; + +$CLICKHOUSE_COMPRESSOR --codec 'FPC' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' 2>&1 | grep -c "BAD_ARGUMENTS"; +$CLICKHOUSE_COMPRESSOR --codec 'FPC(5)' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' 2>&1 | grep -c "BAD_ARGUMENTS"; +$CLICKHOUSE_COMPRESSOR --codec 'FPC(5, 1)' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' 2>&1 | grep -c "ILLEGAL_CODEC_PARAMETER"; +$CLICKHOUSE_COMPRESSOR --codec 'FPC([1,2,3])' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' 2>&1 | grep -c "ILLEGAL_CODEC_PARAMETER"; +$CLICKHOUSE_COMPRESSOR --codec 'FPC(5, 4)' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out'; + + +$CLICKHOUSE_COMPRESSOR --codec 'T64' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' 2>&1 | grep -c "ILLEGAL_SYNTAX_FOR_CODEC_TYPE"; + +rm 02584_test_data 02584_test_out + From df34ab240d19d68226b230413d0ae023d98686f7 Mon Sep 17 00:00:00 2001 From: Kruglov Pavel <48961922+Avogar@users.noreply.github.com> Date: Mon, 6 Mar 2023 18:03:17 +0100 Subject: [PATCH 557/841] Don't use switch --- .../Formats/Impl/ORCBlockOutputFormat.cpp | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/Processors/Formats/Impl/ORCBlockOutputFormat.cpp b/src/Processors/Formats/Impl/ORCBlockOutputFormat.cpp index 4264e9da4d6..7fae2c8f480 100644 --- a/src/Processors/Formats/Impl/ORCBlockOutputFormat.cpp +++ b/src/Processors/Formats/Impl/ORCBlockOutputFormat.cpp @@ -36,22 +36,24 @@ namespace orc::CompressionKind getORCCompression(FormatSettings::ORCCompression method) { - switch (method) - { - case FormatSettings::ORCCompression::NONE: - return orc::CompressionKind::CompressionKind_NONE; - case FormatSettings::ORCCompression::SNAPPY: + if (method == FormatSettings::ORCCompression::NONE) + return orc::CompressionKind::CompressionKind_NONE; + #if USE_SNAPPY - return orc::CompressionKind::CompressionKind_SNAPPY; + if (method == FormatSettings::ORCCompression::SNAPPY) + return orc::CompressionKind::CompressionKind_SNAPPY; #endif - throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Snappy compression method is not supported"); - case FormatSettings::ORCCompression::ZSTD: - return orc::CompressionKind::CompressionKind_ZSTD; - case FormatSettings::ORCCompression::LZ4: - return orc::CompressionKind::CompressionKind_LZ4; - case FormatSettings::ORCCompression::ZLIB: - return orc::CompressionKind::CompressionKind_ZLIB; - } + + if (method == FormatSettings::ORCCompression::ZSTD) + return orc::CompressionKind::CompressionKind_ZSTD; + + if (method == FormatSettings::ORCCompression::LZ4) + return orc::CompressionKind::CompressionKind_LZ4; + + if (method == FormatSettings::ORCCompression::ZLIB) + return orc::CompressionKind::CompressionKind_ZLIB; + + throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Unsupported compression method"); } } From fed645a4945efab6aa9a2b98ac2861de483be158 Mon Sep 17 00:00:00 2001 From: Kruglov Pavel <48961922+Avogar@users.noreply.github.com> Date: Mon, 6 Mar 2023 18:03:54 +0100 Subject: [PATCH 558/841] Don't use switch --- .../Formats/Impl/ParquetBlockOutputFormat.cpp | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp b/src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp index 3695bb9d110..cedd8a9c54c 100644 --- a/src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp +++ b/src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp @@ -37,27 +37,29 @@ static parquet::ParquetVersion::type getParquetVersion(const FormatSettings & se parquet::Compression::type getParquetCompression(FormatSettings::ParquetCompression method) { - switch (method) - { - case FormatSettings::ParquetCompression::NONE: - return parquet::Compression::type::UNCOMPRESSED; - case FormatSettings::ParquetCompression::SNAPPY: + if (method == FormatSettings::ParquetCompression::NONE) + return parquet::Compression::type::UNCOMPRESSED; + #if USE_SNAPPY - return parquet::Compression::type::SNAPPY; + if (method == FormatSettings::ParquetCompression::SNAPPY) + return parquet::Compression::type::SNAPPY; #endif - throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Snappy compression method is not supported"); - case FormatSettings::ParquetCompression::BROTLI: + #if USE_BROTLI - return parquet::Compression::type::BROTLI; + if (method == FormatSettings::ParquetCompression::BROTLI) + return parquet::Compression::type::BROTLI; #endif - throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Brotli compression method is not supported"); - case FormatSettings::ParquetCompression::ZSTD: - return parquet::Compression::type::ZSTD; - case FormatSettings::ParquetCompression::LZ4: - return parquet::Compression::type::LZ4; - case FormatSettings::ParquetCompression::GZIP: - return parquet::Compression::type::GZIP; - } + + if (method == FormatSettings::ParquetCompression::ZSTD) + return parquet::Compression::type::ZSTD; + + if (method == FormatSettings::ParquetCompression::LZ4) + return parquet::Compression::type::LZ4; + + if (method == FormatSettings::ParquetCompression::GZIP) + return parquet::Compression::type::GZIP; + + throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Unsupported compression method"); } } From b5dffe7417527bb11ef5979133e092ec1ca222db Mon Sep 17 00:00:00 2001 From: alesapin Date: Mon, 6 Mar 2023 19:57:09 +0100 Subject: [PATCH 559/841] Fix bug in zero copy replica which can lead to dataloss --- src/Storages/StorageReplicatedMergeTree.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Storages/StorageReplicatedMergeTree.cpp b/src/Storages/StorageReplicatedMergeTree.cpp index 54ae8aa5a7b..9e79a715610 100644 --- a/src/Storages/StorageReplicatedMergeTree.cpp +++ b/src/Storages/StorageReplicatedMergeTree.cpp @@ -8434,7 +8434,11 @@ std::pair StorageReplicatedMergeTree::unlockSharedDataByID( } else if (error_code == Coordination::Error::ZNONODE) { - LOG_TRACE(logger, "Node with parent zookeeper lock {} for part {} doesn't exist (part was unlocked before)", zookeeper_part_uniq_node, part_name); + /// We don't know what to do, because this part can be mutation part + /// with hardlinked columns. Since we don't have this information (about blobs not to remove) + /// we refuce to remove blobs. + LOG_WARNING(logger, "Node with parent zookeeper lock {} for part {} doesn't exist (part was unlocked before), refuse to remove blobs", zookeeper_part_uniq_node, part_name); + return std::make_pair{false, {}}; } else { From b5f19ee12c6f2e08ff6fadc4dab91e350ce879e6 Mon Sep 17 00:00:00 2001 From: avogar Date: Mon, 6 Mar 2023 19:34:36 +0000 Subject: [PATCH 560/841] Make better --- .../sql-reference/statements/create/table.md | 8 ++--- programs/compressor/Compressor.cpp | 1 + src/Compression/CompressionCodecDelta.cpp | 7 ++-- .../CompressionCodecDoubleDelta.cpp | 7 ++-- src/Compression/CompressionCodecFPC.cpp | 6 ++-- src/Compression/CompressionCodecGorilla.cpp | 7 ++-- src/Compression/CompressionCodecT64.cpp | 33 +++++++++++-------- .../01380_coded_delta_exception_code.sql | 4 +-- .../02584_compressor_codecs.reference | 5 --- .../0_stateless/02584_compressor_codecs.sh | 12 +++---- 10 files changed, 40 insertions(+), 50 deletions(-) diff --git a/docs/en/sql-reference/statements/create/table.md b/docs/en/sql-reference/statements/create/table.md index 599bef6fcd1..21ecb0faf62 100644 --- a/docs/en/sql-reference/statements/create/table.md +++ b/docs/en/sql-reference/statements/create/table.md @@ -390,19 +390,19 @@ These codecs are designed to make compression more effective by using specific f #### Delta -`Delta(delta_bytes)` — Compression approach in which raw values are replaced by the difference of two neighboring values, except for the first value that stays unchanged. Up to `delta_bytes` are used for storing delta values, so `delta_bytes` is the maximum size of raw values. Possible `delta_bytes` values: 1, 2, 4, 8. The default value for `delta_bytes` is `sizeof(type)` if equal to 1, 2, 4, or 8. +`Delta(delta_bytes)` — Compression approach in which raw values are replaced by the difference of two neighboring values, except for the first value that stays unchanged. Up to `delta_bytes` are used for storing delta values, so `delta_bytes` is the maximum size of raw values. Possible `delta_bytes` values: 1, 2, 4, 8. The default value for `delta_bytes` is `sizeof(type)` if equal to 1, 2, 4, or 8. In all other cases, it’s 1. #### DoubleDelta -`DoubleDelta(bytes_size)` — Calculates delta of deltas and writes it in compact binary form. Possible `bytes_size` values: 1, 2, 4, 8, the default value for is `sizeof(type)` if equal to 1, 2, 4, or 8. Optimal compression rates are achieved for monotonic sequences with a constant stride, such as time series data. Can be used with any fixed-width type. Implements the algorithm used in Gorilla TSDB, extending it to support 64-bit types. Uses 1 extra bit for 32-byte deltas: 5-bit prefixes instead of 4-bit prefixes. For additional information, see Compressing Time Stamps in [Gorilla: A Fast, Scalable, In-Memory Time Series Database](http://www.vldb.org/pvldb/vol8/p1816-teller.pdf). +`DoubleDelta(bytes_size)` — Calculates delta of deltas and writes it in compact binary form. Possible `bytes_size` values: 1, 2, 4, 8, the default value for is `sizeof(type)` if equal to 1, 2, 4, or 8. In all other cases, it’s 1. Optimal compression rates are achieved for monotonic sequences with a constant stride, such as time series data. Can be used with any fixed-width type. Implements the algorithm used in Gorilla TSDB, extending it to support 64-bit types. Uses 1 extra bit for 32-byte deltas: 5-bit prefixes instead of 4-bit prefixes. For additional information, see Compressing Time Stamps in [Gorilla: A Fast, Scalable, In-Memory Time Series Database](http://www.vldb.org/pvldb/vol8/p1816-teller.pdf). #### Gorilla -`Gorilla(bytes_size)` — Calculates XOR between current and previous floating point value and writes it in compact binary form. The smaller the difference between consecutive values is, i.e. the slower the values of the series changes, the better the compression rate. Implements the algorithm used in Gorilla TSDB, extending it to support 64-bit types. Possible `bytes_size` values: 1, 2, 4, 8, the default value is `sizeof(type)` if equal to 1, 2, 4, or 8. For additional information, see section 4.1 in [Gorilla: A Fast, Scalable, In-Memory Time Series Database](https://doi.org/10.14778/2824032.2824078). +`Gorilla(bytes_size)` — Calculates XOR between current and previous floating point value and writes it in compact binary form. The smaller the difference between consecutive values is, i.e. the slower the values of the series changes, the better the compression rate. Implements the algorithm used in Gorilla TSDB, extending it to support 64-bit types. Possible `bytes_size` values: 1, 2, 4, 8, the default value is `sizeof(type)` if equal to 1, 2, 4, or 8. In all other cases, it’s 1. For additional information, see section 4.1 in [Gorilla: A Fast, Scalable, In-Memory Time Series Database](https://doi.org/10.14778/2824032.2824078). #### FPC -`FPC(level, float_size)` - Repeatedly predicts the next floating point value in the sequence using the better of two predictors, then XORs the actual with the predicted value, and leading-zero compresses the result. Similar to Gorilla, this is efficient when storing a series of floating point values that change slowly. For 64-bit values (double), FPC is faster than Gorilla, for 32-bit values your mileage may vary. Possible `level` values: 1-28, the default value is 12. Possible `float_size` values: 4, 8, the default value is `sizeof(type)` if type is Float. For a detailed description of the algorithm see [High Throughput Compression of Double-Precision Floating-Point Data](https://userweb.cs.txstate.edu/~burtscher/papers/dcc07a.pdf). +`FPC(level, float_size)` - Repeatedly predicts the next floating point value in the sequence using the better of two predictors, then XORs the actual with the predicted value, and leading-zero compresses the result. Similar to Gorilla, this is efficient when storing a series of floating point values that change slowly. For 64-bit values (double), FPC is faster than Gorilla, for 32-bit values your mileage may vary. Possible `level` values: 1-28, the default value is 12. Possible `float_size` values: 4, 8, the default value is `sizeof(type)` if type is Float. In all other cases, it’s 4. For a detailed description of the algorithm see [High Throughput Compression of Double-Precision Floating-Point Data](https://userweb.cs.txstate.edu/~burtscher/papers/dcc07a.pdf). #### T64 diff --git a/programs/compressor/Compressor.cpp b/programs/compressor/Compressor.cpp index 625edc44504..cc25747702a 100644 --- a/programs/compressor/Compressor.cpp +++ b/programs/compressor/Compressor.cpp @@ -191,6 +191,7 @@ int mainEntryClickHouseCompressor(int argc, char ** argv) /// Compression CompressedWriteBuffer to(*wb, codec, block_size); copyData(*rb, to); + to.finalize(); } } catch (...) diff --git a/src/Compression/CompressionCodecDelta.cpp b/src/Compression/CompressionCodecDelta.cpp index 77979ebecf8..37f9230da14 100644 --- a/src/Compression/CompressionCodecDelta.cpp +++ b/src/Compression/CompressionCodecDelta.cpp @@ -193,7 +193,8 @@ void registerCodecDelta(CompressionCodecFactory & factory) UInt8 method_code = static_cast(CompressionMethodByte::Delta); auto codec_builder = [&](const ASTPtr & arguments, const IDataType * column_type) -> CompressionCodecPtr { - UInt8 delta_bytes_size = 0; + /// Default bytes size is 1. + UInt8 delta_bytes_size = 1; if (arguments && !arguments->children.empty()) { @@ -214,10 +215,6 @@ void registerCodecDelta(CompressionCodecFactory & factory) { delta_bytes_size = getDeltaBytesSize(column_type); } - else - { - throw Exception(ErrorCodes::BAD_ARGUMENTS, "Delta codec cannot be used without column type or delta_size argument"); - } return std::make_shared(delta_bytes_size); }; diff --git a/src/Compression/CompressionCodecDoubleDelta.cpp b/src/Compression/CompressionCodecDoubleDelta.cpp index 2b815d37d1a..df497d6e381 100644 --- a/src/Compression/CompressionCodecDoubleDelta.cpp +++ b/src/Compression/CompressionCodecDoubleDelta.cpp @@ -551,7 +551,8 @@ void registerCodecDoubleDelta(CompressionCodecFactory & factory) factory.registerCompressionCodecWithType("DoubleDelta", method_code, [&](const ASTPtr & arguments, const IDataType * column_type) -> CompressionCodecPtr { - UInt8 data_bytes_size = 0; + /// Default bytes size is 1. + UInt8 data_bytes_size = 1; if (arguments && !arguments->children.empty()) { if (arguments->children.size() > 1) @@ -571,10 +572,6 @@ void registerCodecDoubleDelta(CompressionCodecFactory & factory) { data_bytes_size = getDataBytesSize(column_type); } - else - { - throw Exception(ErrorCodes::BAD_ARGUMENTS, "DoubleDelta codec cannot be used without column type or bytes_size argument"); - } return std::make_shared(data_bytes_size); }); diff --git a/src/Compression/CompressionCodecFPC.cpp b/src/Compression/CompressionCodecFPC.cpp index ca746b3c085..8c3e518ed62 100644 --- a/src/Compression/CompressionCodecFPC.cpp +++ b/src/Compression/CompressionCodecFPC.cpp @@ -109,7 +109,8 @@ void registerCodecFPC(CompressionCodecFactory & factory) auto method_code = static_cast(CompressionMethodByte::FPC); auto codec_builder = [&](const ASTPtr & arguments, const IDataType * column_type) -> CompressionCodecPtr { - UInt8 float_width = 0; + /// Set default float width to 4. + UInt8 float_width = 4; if (column_type != nullptr) float_width = getFloatBytesSize(*column_type); @@ -144,9 +145,6 @@ void registerCodecFPC(CompressionCodecFactory & factory) } } - if (float_width == 0) - throw Exception(ErrorCodes::BAD_ARGUMENTS, "FPC codec cannot be used without column type or float size argument"); - return std::make_shared(float_width, level); }; factory.registerCompressionCodecWithType("FPC", method_code, codec_builder); diff --git a/src/Compression/CompressionCodecGorilla.cpp b/src/Compression/CompressionCodecGorilla.cpp index 1c25a8ce4a0..568640153ac 100644 --- a/src/Compression/CompressionCodecGorilla.cpp +++ b/src/Compression/CompressionCodecGorilla.cpp @@ -448,7 +448,8 @@ void registerCodecGorilla(CompressionCodecFactory & factory) UInt8 method_code = static_cast(CompressionMethodByte::Gorilla); auto codec_builder = [&](const ASTPtr & arguments, const IDataType * column_type) -> CompressionCodecPtr { - UInt8 data_bytes_size = 0; + /// Default bytes size is 1 + UInt8 data_bytes_size = 1; if (arguments && !arguments->children.empty()) { if (arguments->children.size() > 1) @@ -468,10 +469,6 @@ void registerCodecGorilla(CompressionCodecFactory & factory) { data_bytes_size = getDataBytesSize(column_type); } - else - { - throw Exception(ErrorCodes::BAD_ARGUMENTS, "Gorilla codec cannot be used without column type or bytes_size argument"); - } return std::make_shared(data_bytes_size); }; diff --git a/src/Compression/CompressionCodecT64.cpp b/src/Compression/CompressionCodecT64.cpp index 9704193b712..b0fe412fee2 100644 --- a/src/Compression/CompressionCodecT64.cpp +++ b/src/Compression/CompressionCodecT64.cpp @@ -33,7 +33,7 @@ public: Bit }; - CompressionCodecT64(TypeIndex type_idx_, Variant variant_); + CompressionCodecT64(std::optional type_idx_, Variant variant_); uint8_t getMethodByte() const override; @@ -53,7 +53,7 @@ protected: bool isGenericCompression() const override { return false; } private: - TypeIndex type_idx; + std::optional type_idx; Variant variant; }; @@ -91,9 +91,12 @@ enum class MagicNumber : uint8_t IPv4 = 21, }; -MagicNumber serializeTypeId(TypeIndex type_id) +MagicNumber serializeTypeId(std::optional type_id) { - switch (type_id) + if (!type_id) + throw Exception(ErrorCodes::CANNOT_COMPRESS, "T64 codec doesn't support compression without information about column type"); + + switch (*type_id) { case TypeIndex::UInt8: return MagicNumber::UInt8; case TypeIndex::UInt16: return MagicNumber::UInt16; @@ -115,7 +118,7 @@ MagicNumber serializeTypeId(TypeIndex type_id) break; } - throw Exception(ErrorCodes::LOGICAL_ERROR, "Type is not supported by T64 codec: {}", static_cast(type_id)); + throw Exception(ErrorCodes::LOGICAL_ERROR, "Type is not supported by T64 codec: {}", static_cast(*type_id)); } TypeIndex deserializeTypeId(uint8_t serialized_type_id) @@ -632,7 +635,7 @@ UInt32 CompressionCodecT64::doCompressData(const char * src, UInt32 src_size, ch memcpy(dst, &cookie, 1); dst += 1; - switch (baseType(type_idx)) + switch (baseType(*type_idx)) { case TypeIndex::Int8: return 1 + compressData(src, src_size, dst, variant); @@ -699,7 +702,7 @@ uint8_t CompressionCodecT64::getMethodByte() const return codecId(); } -CompressionCodecT64::CompressionCodecT64(TypeIndex type_idx_, Variant variant_) +CompressionCodecT64::CompressionCodecT64(std::optional type_idx_, Variant variant_) : type_idx(type_idx_) , variant(variant_) { @@ -712,7 +715,7 @@ CompressionCodecT64::CompressionCodecT64(TypeIndex type_idx_, Variant variant_) void CompressionCodecT64::updateHash(SipHash & hash) const { getCodecDesc()->updateTreeHash(hash); - hash.update(type_idx); + hash.update(type_idx ? *type_idx : TypeIndex::Nothing); hash.update(variant); } @@ -720,9 +723,6 @@ void registerCodecT64(CompressionCodecFactory & factory) { auto reg_func = [&](const ASTPtr & arguments, const IDataType * type) -> CompressionCodecPtr { - if (!type) - throw Exception(ErrorCodes::ILLEGAL_SYNTAX_FOR_CODEC_TYPE, "T64 codec is not supported for use without specified column type"); - Variant variant = Variant::Byte; if (arguments && !arguments->children.empty()) @@ -745,9 +745,14 @@ void registerCodecT64(CompressionCodecFactory & factory) throw Exception(ErrorCodes::ILLEGAL_CODEC_PARAMETER, "Wrong modification for T64: {}", name); } - auto type_idx = typeIdx(type); - if (type_idx == TypeIndex::Nothing) - throw Exception(ErrorCodes::ILLEGAL_SYNTAX_FOR_CODEC_TYPE, "T64 codec is not supported for specified type {}", type->getName()); + std::optional type_idx; + if (type) + { + type_idx = typeIdx(type); + if (type_idx == TypeIndex::Nothing) + throw Exception( + ErrorCodes::ILLEGAL_SYNTAX_FOR_CODEC_TYPE, "T64 codec is not supported for specified type {}", type->getName()); + } return std::make_shared(type_idx, variant); }; diff --git a/tests/queries/0_stateless/01380_coded_delta_exception_code.sql b/tests/queries/0_stateless/01380_coded_delta_exception_code.sql index 587fac958cd..f4b88a93904 100644 --- a/tests/queries/0_stateless/01380_coded_delta_exception_code.sql +++ b/tests/queries/0_stateless/01380_coded_delta_exception_code.sql @@ -2,5 +2,5 @@ CREATE TABLE delta_codec_synthetic (`id` Decimal(38, 10) CODEC(Delta, ZSTD(22))) CREATE TABLE delta_codec_synthetic (`id` Decimal(38, 10) CODEC(DoubleDelta, ZSTD(22))) ENGINE = MergeTree() ORDER BY tuple(); -- { serverError 36 } CREATE TABLE delta_codec_synthetic (`id` Decimal(38, 10) CODEC(Gorilla, ZSTD(22))) ENGINE = MergeTree() ORDER BY tuple(); -- { serverError 36 } -CREATE TABLE delta_codec_synthetic (`id` UInt64 CODEC(DoubleDelta(3), ZSTD(22))) ENGINE = MergeTree() ORDER BY tuple(); -- { serverError 36 } -CREATE TABLE delta_codec_synthetic (`id` UInt64 CODEC(Gorilla('hello, world'), ZSTD(22))) ENGINE = MergeTree() ORDER BY tuple(); -- { serverError 36 } +CREATE TABLE delta_codec_synthetic (`id` UInt64 CODEC(DoubleDelta(3), ZSTD(22))) ENGINE = MergeTree() ORDER BY tuple(); -- { serverError ILLEGAL_CODEC_PARAMETER } +CREATE TABLE delta_codec_synthetic (`id` UInt64 CODEC(Gorilla('hello, world'), ZSTD(22))) ENGINE = MergeTree() ORDER BY tuple(); -- { serverError ILLEGAL_CODEC_PARAMETER } diff --git a/tests/queries/0_stateless/02584_compressor_codecs.reference b/tests/queries/0_stateless/02584_compressor_codecs.reference index 23751ef6c1f..bb0850568bb 100644 --- a/tests/queries/0_stateless/02584_compressor_codecs.reference +++ b/tests/queries/0_stateless/02584_compressor_codecs.reference @@ -7,8 +7,3 @@ 1 1 1 -1 -1 -1 -1 -1 diff --git a/tests/queries/0_stateless/02584_compressor_codecs.sh b/tests/queries/0_stateless/02584_compressor_codecs.sh index 930d101466b..fad6847b792 100755 --- a/tests/queries/0_stateless/02584_compressor_codecs.sh +++ b/tests/queries/0_stateless/02584_compressor_codecs.sh @@ -6,29 +6,29 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) echo "Hello, World!" > 02584_test_data -$CLICKHOUSE_COMPRESSOR --codec 'Delta' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' 2>&1 | grep -c "BAD_ARGUMENTS"; +$CLICKHOUSE_COMPRESSOR --codec 'Delta' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' $CLICKHOUSE_COMPRESSOR --codec 'Delta(5)' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' 2>&1 | grep -c "ILLEGAL_CODEC_PARAMETER"; $CLICKHOUSE_COMPRESSOR --codec 'Delta([1,2])' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' 2>&1 | grep -c "ILLEGAL_CODEC_PARAMETER"; $CLICKHOUSE_COMPRESSOR --codec 'Delta(4)' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out'; -$CLICKHOUSE_COMPRESSOR --codec 'DoubleDelta' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' 2>&1 | grep -c "BAD_ARGUMENTS"; +$CLICKHOUSE_COMPRESSOR --codec 'DoubleDelta' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' $CLICKHOUSE_COMPRESSOR --codec 'DoubleDelta(5)' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' 2>&1 | grep -c "ILLEGAL_CODEC_PARAMETER"; $CLICKHOUSE_COMPRESSOR --codec 'DoubleDelta([1,2])' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' 2>&1 | grep -c "ILLEGAL_CODEC_PARAMETER"; $CLICKHOUSE_COMPRESSOR --codec 'DoubleDelta(4)' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out'; -$CLICKHOUSE_COMPRESSOR --codec 'Gorilla' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' 2>&1 | grep -c "BAD_ARGUMENTS"; +$CLICKHOUSE_COMPRESSOR --codec 'Gorilla' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' $CLICKHOUSE_COMPRESSOR --codec 'Gorilla(5)' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' 2>&1 | grep -c "ILLEGAL_CODEC_PARAMETER"; $CLICKHOUSE_COMPRESSOR --codec 'Gorilla([1,2])' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' 2>&1 | grep -c "ILLEGAL_CODEC_PARAMETER"; $CLICKHOUSE_COMPRESSOR --codec 'Gorilla(4)' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out'; -$CLICKHOUSE_COMPRESSOR --codec 'FPC' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' 2>&1 | grep -c "BAD_ARGUMENTS"; -$CLICKHOUSE_COMPRESSOR --codec 'FPC(5)' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' 2>&1 | grep -c "BAD_ARGUMENTS"; +$CLICKHOUSE_COMPRESSOR --codec 'FPC' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out'; +$CLICKHOUSE_COMPRESSOR --codec 'FPC(5)' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out'; $CLICKHOUSE_COMPRESSOR --codec 'FPC(5, 1)' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' 2>&1 | grep -c "ILLEGAL_CODEC_PARAMETER"; $CLICKHOUSE_COMPRESSOR --codec 'FPC([1,2,3])' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' 2>&1 | grep -c "ILLEGAL_CODEC_PARAMETER"; $CLICKHOUSE_COMPRESSOR --codec 'FPC(5, 4)' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out'; -$CLICKHOUSE_COMPRESSOR --codec 'T64' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' 2>&1 | grep -c "ILLEGAL_SYNTAX_FOR_CODEC_TYPE"; +$CLICKHOUSE_COMPRESSOR --codec 'T64' --codec 'LZ4' --input '02584_test_data' --output '02584_test_out' 2>&1 | grep -c "CANNOT_COMPRESS"; rm 02584_test_data 02584_test_out From b298af2640f28a0ae440d36a59e72d2dedaa77b0 Mon Sep 17 00:00:00 2001 From: Denny Crane Date: Mon, 6 Mar 2023 15:56:21 -0400 Subject: [PATCH 561/841] Update exponentialmovingaverage.md --- .../reference/exponentialmovingaverage.md | 36 +++++++++++++++++-- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/docs/en/sql-reference/aggregate-functions/reference/exponentialmovingaverage.md b/docs/en/sql-reference/aggregate-functions/reference/exponentialmovingaverage.md index 2587bc5533f..e99addf187c 100644 --- a/docs/en/sql-reference/aggregate-functions/reference/exponentialmovingaverage.md +++ b/docs/en/sql-reference/aggregate-functions/reference/exponentialmovingaverage.md @@ -11,15 +11,15 @@ sidebar_title: exponentialMovingAverage **Syntax** ```sql -exponentialMovingAverage(x)(value, timestamp) +exponentialMovingAverage(x)(value, timeunit) ``` -Each `value` corresponds to the determinate `timestamp`. The half-life `x` is the time lag at which the exponential weights decay by one-half. The function returns a weighted average: the older the time point, the less weight the corresponding value is considered to be. +Each `value` corresponds to the determinate `timeunit`. The half-life `x` is the time lag at which the exponential weights decay by one-half. The function returns a weighted average: the older the time point, the less weight the corresponding value is considered to be. **Arguments** - `value` — Value. [Integer](../../../sql-reference/data-types/int-uint.md), [Float](../../../sql-reference/data-types/float.md) or [Decimal](../../../sql-reference/data-types/decimal.md). -- `timestamp` — Timestamp. [Integer](../../../sql-reference/data-types/int-uint.md), [Float](../../../sql-reference/data-types/float.md) or [Decimal](../../../sql-reference/data-types/decimal.md). +- `timeunit` — Timeunit. [Integer](../../../sql-reference/data-types/int-uint.md), [Float](../../../sql-reference/data-types/float.md) or [Decimal](../../../sql-reference/data-types/decimal.md). Timeunit is not timestamp (seconds), it's -- an index of the time interval. Can be calculated using [intDiv](../../unctions/arithmetic-functions/#intdiva-b). **Parameters** @@ -148,3 +148,33 @@ Result: │ 1 │ 49 │ 0.825 │ █████████████████████████████████████████▎│ └───────┴──────┴──────────────────────┴────────────────────────────────────────────┘ ``` + +```sql +CREATE TABLE data +ENGINE = Memory AS +SELECT + 10 AS value, + toDateTime('2020-01-01') + (3600 * number) AS time +FROM numbers_mt(10); + + +SELECT + value, + time, + exponentialMovingAverage(1)(value, intDiv(toUInt32(time),3600)) OVER (ORDER BY time ASC) res +FROM data +ORDER BY time; + +┌─value─┬────────────────time─┬─────────res─┐ +│ 10 │ 2020-01-01 00:00:00 │ 5 │ +│ 10 │ 2020-01-01 01:00:00 │ 7.5 │ +│ 10 │ 2020-01-01 02:00:00 │ 8.75 │ +│ 10 │ 2020-01-01 03:00:00 │ 9.375 │ +│ 10 │ 2020-01-01 04:00:00 │ 9.6875 │ +│ 10 │ 2020-01-01 05:00:00 │ 9.84375 │ +│ 10 │ 2020-01-01 06:00:00 │ 9.921875 │ +│ 10 │ 2020-01-01 07:00:00 │ 9.9609375 │ +│ 10 │ 2020-01-01 08:00:00 │ 9.98046875 │ +│ 10 │ 2020-01-01 09:00:00 │ 9.990234375 │ +└───────┴─────────────────────┴─────────────┘ +``` From 19dfd2eb17f9aa162801835304a77983e42f8120 Mon Sep 17 00:00:00 2001 From: Denny Crane Date: Mon, 6 Mar 2023 15:59:24 -0400 Subject: [PATCH 562/841] Update exponentialmovingaverage.md --- .../reference/exponentialmovingaverage.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/en/sql-reference/aggregate-functions/reference/exponentialmovingaverage.md b/docs/en/sql-reference/aggregate-functions/reference/exponentialmovingaverage.md index e99addf187c..a789a149d1e 100644 --- a/docs/en/sql-reference/aggregate-functions/reference/exponentialmovingaverage.md +++ b/docs/en/sql-reference/aggregate-functions/reference/exponentialmovingaverage.md @@ -177,4 +177,25 @@ ORDER BY time; │ 10 │ 2020-01-01 08:00:00 │ 9.98046875 │ │ 10 │ 2020-01-01 09:00:00 │ 9.990234375 │ └───────┴─────────────────────┴─────────────┘ + + +SELECT + value, + time, + round(exponentialMovingAverage(2)(value, toRelativeHourNum(time)) OVER (ORDER BY time ASC), 2) AS res +FROM data +ORDER BY time ASC + +┌─value─┬────────────────time─┬──res─┐ +│ 10 │ 2020-01-01 00:00:00 │ 2.93 │ +│ 10 │ 2020-01-01 01:00:00 │ 5 │ +│ 10 │ 2020-01-01 02:00:00 │ 6.46 │ +│ 10 │ 2020-01-01 03:00:00 │ 7.5 │ +│ 10 │ 2020-01-01 04:00:00 │ 8.23 │ +│ 10 │ 2020-01-01 05:00:00 │ 8.75 │ +│ 10 │ 2020-01-01 06:00:00 │ 9.12 │ +│ 10 │ 2020-01-01 07:00:00 │ 9.37 │ +│ 10 │ 2020-01-01 08:00:00 │ 9.56 │ +│ 10 │ 2020-01-01 09:00:00 │ 9.69 │ +└───────┴─────────────────────┴──────┘ ``` From 683da4897ca5bd094089588ac7d8e61319d4e9aa Mon Sep 17 00:00:00 2001 From: Denny Crane Date: Mon, 6 Mar 2023 16:04:36 -0400 Subject: [PATCH 563/841] Update exponentialmovingaverage.md --- .../reference/exponentialmovingaverage.md | 60 ++++++++++--------- 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/docs/en/sql-reference/aggregate-functions/reference/exponentialmovingaverage.md b/docs/en/sql-reference/aggregate-functions/reference/exponentialmovingaverage.md index a789a149d1e..26507bedb31 100644 --- a/docs/en/sql-reference/aggregate-functions/reference/exponentialmovingaverage.md +++ b/docs/en/sql-reference/aggregate-functions/reference/exponentialmovingaverage.md @@ -158,44 +158,48 @@ SELECT FROM numbers_mt(10); +-- Calculate timeunit using intDiv SELECT value, time, - exponentialMovingAverage(1)(value, intDiv(toUInt32(time),3600)) OVER (ORDER BY time ASC) res + exponentialMovingAverage(1)(value, intDiv(toUInt32(time), 3600)) OVER (ORDER BY time ASC) AS res, + intDiv(toUInt32(time), 3600) AS timeunit FROM data -ORDER BY time; +ORDER BY time ASC; -┌─value─┬────────────────time─┬─────────res─┐ -│ 10 │ 2020-01-01 00:00:00 │ 5 │ -│ 10 │ 2020-01-01 01:00:00 │ 7.5 │ -│ 10 │ 2020-01-01 02:00:00 │ 8.75 │ -│ 10 │ 2020-01-01 03:00:00 │ 9.375 │ -│ 10 │ 2020-01-01 04:00:00 │ 9.6875 │ -│ 10 │ 2020-01-01 05:00:00 │ 9.84375 │ -│ 10 │ 2020-01-01 06:00:00 │ 9.921875 │ -│ 10 │ 2020-01-01 07:00:00 │ 9.9609375 │ -│ 10 │ 2020-01-01 08:00:00 │ 9.98046875 │ -│ 10 │ 2020-01-01 09:00:00 │ 9.990234375 │ -└───────┴─────────────────────┴─────────────┘ +┌─value─┬────────────────time─┬─────────res─┬─timeunit─┐ +│ 10 │ 2020-01-01 00:00:00 │ 5 │ 438288 │ +│ 10 │ 2020-01-01 01:00:00 │ 7.5 │ 438289 │ +│ 10 │ 2020-01-01 02:00:00 │ 8.75 │ 438290 │ +│ 10 │ 2020-01-01 03:00:00 │ 9.375 │ 438291 │ +│ 10 │ 2020-01-01 04:00:00 │ 9.6875 │ 438292 │ +│ 10 │ 2020-01-01 05:00:00 │ 9.84375 │ 438293 │ +│ 10 │ 2020-01-01 06:00:00 │ 9.921875 │ 438294 │ +│ 10 │ 2020-01-01 07:00:00 │ 9.9609375 │ 438295 │ +│ 10 │ 2020-01-01 08:00:00 │ 9.98046875 │ 438296 │ +│ 10 │ 2020-01-01 09:00:00 │ 9.990234375 │ 438297 │ +└───────┴─────────────────────┴─────────────┴──────────┘ +-- Calculate timeunit timeunit using toRelativeHourNum SELECT value, time, - round(exponentialMovingAverage(2)(value, toRelativeHourNum(time)) OVER (ORDER BY time ASC), 2) AS res + exponentialMovingAverage(1)(value, toRelativeHourNum(time)) OVER (ORDER BY time ASC) AS res, + toRelativeHourNum(time) AS timeunit FROM data -ORDER BY time ASC +ORDER BY time ASC; -┌─value─┬────────────────time─┬──res─┐ -│ 10 │ 2020-01-01 00:00:00 │ 2.93 │ -│ 10 │ 2020-01-01 01:00:00 │ 5 │ -│ 10 │ 2020-01-01 02:00:00 │ 6.46 │ -│ 10 │ 2020-01-01 03:00:00 │ 7.5 │ -│ 10 │ 2020-01-01 04:00:00 │ 8.23 │ -│ 10 │ 2020-01-01 05:00:00 │ 8.75 │ -│ 10 │ 2020-01-01 06:00:00 │ 9.12 │ -│ 10 │ 2020-01-01 07:00:00 │ 9.37 │ -│ 10 │ 2020-01-01 08:00:00 │ 9.56 │ -│ 10 │ 2020-01-01 09:00:00 │ 9.69 │ -└───────┴─────────────────────┴──────┘ +┌─value─┬────────────────time─┬─────────res─┬─timeunit─┐ +│ 10 │ 2020-01-01 00:00:00 │ 5 │ 438288 │ +│ 10 │ 2020-01-01 01:00:00 │ 7.5 │ 438289 │ +│ 10 │ 2020-01-01 02:00:00 │ 8.75 │ 438290 │ +│ 10 │ 2020-01-01 03:00:00 │ 9.375 │ 438291 │ +│ 10 │ 2020-01-01 04:00:00 │ 9.6875 │ 438292 │ +│ 10 │ 2020-01-01 05:00:00 │ 9.84375 │ 438293 │ +│ 10 │ 2020-01-01 06:00:00 │ 9.921875 │ 438294 │ +│ 10 │ 2020-01-01 07:00:00 │ 9.9609375 │ 438295 │ +│ 10 │ 2020-01-01 08:00:00 │ 9.98046875 │ 438296 │ +│ 10 │ 2020-01-01 09:00:00 │ 9.990234375 │ 438297 │ +└───────┴─────────────────────┴─────────────┴──────────┘ ``` From 0b46de317b8b6217b9e920f494509b656f102c21 Mon Sep 17 00:00:00 2001 From: Denny Crane Date: Mon, 6 Mar 2023 16:33:28 -0400 Subject: [PATCH 564/841] Update ip-address-functions.md --- docs/en/sql-reference/functions/ip-address-functions.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/en/sql-reference/functions/ip-address-functions.md b/docs/en/sql-reference/functions/ip-address-functions.md index 3843ca0fc36..cbb93ee15d7 100644 --- a/docs/en/sql-reference/functions/ip-address-functions.md +++ b/docs/en/sql-reference/functions/ip-address-functions.md @@ -286,6 +286,14 @@ Same as `toIPv4`, but if the IPv4 address has an invalid format, it returns 0. Same as `toIPv4`, but if the IPv4 address has an invalid format, it returns null. +## toIPv6OrDefault(string) + +Same as `toIPv6`, but if the IPv6 address has an invalid format, it returns 0. + +## toIPv6OrNull(string) + +Same as `toIPv6`, but if the IPv6 address has an invalid format, it returns null. + ## toIPv6 Converts a string form of IPv6 address to [IPv6](../../sql-reference/data-types/domains/ipv6.md) type. If the IPv6 address has an invalid format, returns an empty value. From d8029b7b2d092c218668826abcfdfc1f3c2f6061 Mon Sep 17 00:00:00 2001 From: Denny Crane Date: Mon, 6 Mar 2023 16:36:04 -0400 Subject: [PATCH 565/841] Update ip-address-functions.md --- docs/en/sql-reference/functions/ip-address-functions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/sql-reference/functions/ip-address-functions.md b/docs/en/sql-reference/functions/ip-address-functions.md index cbb93ee15d7..47058a28d12 100644 --- a/docs/en/sql-reference/functions/ip-address-functions.md +++ b/docs/en/sql-reference/functions/ip-address-functions.md @@ -280,7 +280,7 @@ SELECT ## toIPv4OrDefault(string) -Same as `toIPv4`, but if the IPv4 address has an invalid format, it returns 0. +Same as `toIPv4`, but if the IPv4 address has an invalid format, it returns `0.0.0.0` (0 IPv4). ## toIPv4OrNull(string) @@ -288,7 +288,7 @@ Same as `toIPv4`, but if the IPv4 address has an invalid format, it returns null ## toIPv6OrDefault(string) -Same as `toIPv6`, but if the IPv6 address has an invalid format, it returns 0. +Same as `toIPv6`, but if the IPv6 address has an invalid format, it returns `::` (0 IPv6). ## toIPv6OrNull(string) From 93ba0f4bdf45384bcbcf1296226275fe4a5ea7e6 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Tue, 7 Mar 2023 01:30:44 +0300 Subject: [PATCH 566/841] Update StackTrace.cpp --- src/Common/StackTrace.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Common/StackTrace.cpp b/src/Common/StackTrace.cpp index 0aebaf9801c..3c0bcd2f808 100644 --- a/src/Common/StackTrace.cpp +++ b/src/Common/StackTrace.cpp @@ -291,7 +291,7 @@ void StackTrace::tryCapture() #endif } -// Clickhouse uses bundled libc++ so type names will be same on every system thus it's save to hardcode them +/// ClickHouse uses bundled libc++ so type names will be the same on every system thus it's safe to hardcode them constexpr std::pair replacements[] = {{"::__1", ""}, {"std::basic_string, std::allocator>", "String"}}; From 990af0fb7977ab41b291df5c563c062ab26557e6 Mon Sep 17 00:00:00 2001 From: Nikolay Degterinsky <43110995+evillique@users.noreply.github.com> Date: Mon, 6 Mar 2023 23:44:41 +0100 Subject: [PATCH 567/841] Fix typo --- src/Databases/DatabaseAtomic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Databases/DatabaseAtomic.cpp b/src/Databases/DatabaseAtomic.cpp index 34c4fd3d5d8..eaeeb793b23 100644 --- a/src/Databases/DatabaseAtomic.cpp +++ b/src/Databases/DatabaseAtomic.cpp @@ -273,7 +273,7 @@ void DatabaseAtomic::renameTable(ContextPtr local_context, const String & table_ else renameNoReplace(old_metadata_path, new_metadata_path); - /// After metadata was successfully moved, the following methods should not throw (if them do, it's a logical error) + /// After metadata was successfully moved, the following methods should not throw (if they do, it's a logical error) table_data_path = detach(*this, table_name, table->storesDataOnDisk()); if (exchange) other_table_data_path = detach(other_db, to_table_name, other_table->storesDataOnDisk()); From 1e11348a03113a2096b1103dc0dcd651a960f5bd Mon Sep 17 00:00:00 2001 From: Denny Crane Date: Mon, 6 Mar 2023 20:42:17 -0400 Subject: [PATCH 568/841] Update exponentialmovingaverage.md --- .../aggregate-functions/reference/exponentialmovingaverage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/sql-reference/aggregate-functions/reference/exponentialmovingaverage.md b/docs/en/sql-reference/aggregate-functions/reference/exponentialmovingaverage.md index 26507bedb31..296aae41daa 100644 --- a/docs/en/sql-reference/aggregate-functions/reference/exponentialmovingaverage.md +++ b/docs/en/sql-reference/aggregate-functions/reference/exponentialmovingaverage.md @@ -19,7 +19,7 @@ Each `value` corresponds to the determinate `timeunit`. The half-life `x` is the **Arguments** - `value` — Value. [Integer](../../../sql-reference/data-types/int-uint.md), [Float](../../../sql-reference/data-types/float.md) or [Decimal](../../../sql-reference/data-types/decimal.md). -- `timeunit` — Timeunit. [Integer](../../../sql-reference/data-types/int-uint.md), [Float](../../../sql-reference/data-types/float.md) or [Decimal](../../../sql-reference/data-types/decimal.md). Timeunit is not timestamp (seconds), it's -- an index of the time interval. Can be calculated using [intDiv](../../unctions/arithmetic-functions/#intdiva-b). +- `timeunit` — Timeunit. [Integer](../../../sql-reference/data-types/int-uint.md), [Float](../../../sql-reference/data-types/float.md) or [Decimal](../../../sql-reference/data-types/decimal.md). Timeunit is not timestamp (seconds), it's -- an index of the time interval. Can be calculated using [intDiv](../../functions/arithmetic-functions/#intdiva-b). **Parameters** From aacd05e34bcc6abd44eb67613b68551b18fd4d99 Mon Sep 17 00:00:00 2001 From: Yakov Olkhovskiy <99031427+yakov-olkhovskiy@users.noreply.github.com> Date: Mon, 6 Mar 2023 21:24:04 -0500 Subject: [PATCH 569/841] bugfix + review suggestion --- .../self-extracting-executable/decompressor.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/utils/self-extracting-executable/decompressor.cpp b/utils/self-extracting-executable/decompressor.cpp index 8db0d95e70d..1374c269dc1 100644 --- a/utils/self-extracting-executable/decompressor.cpp +++ b/utils/self-extracting-executable/decompressor.cpp @@ -170,7 +170,7 @@ int decompress(char * input, char * output, off_t start, off_t end, size_t max_n bool isSudo() { - return getuid() == 0 && geteuid() == 0 && getenv("SUDO_USER") && getenv("SUDO_UID") && getenv("SUDO_GID"); // NOLINT(concurrency-mt-unsafe) + return geteuid() == 0 && getenv("SUDO_USER") && getenv("SUDO_UID") && getenv("SUDO_GID"); // NOLINT(concurrency-mt-unsafe) } /// Read data about files and decomrpess them. @@ -423,6 +423,13 @@ int main(int/* argc*/, char* argv[]) else name = file_path; + struct stat input_info; + if (0 != stat(self, &input_info)) + { + perror("stat"); + return 1; + } + #if !defined(OS_DARWIN) && !defined(OS_FREEBSD) /// get inode of this executable uint64_t inode = getInode(self); @@ -450,13 +457,6 @@ int main(int/* argc*/, char* argv[]) return 1; } - struct stat input_info; - if (0 != stat(self, &input_info)) - { - perror("stat"); - return 1; - } - /// inconsistency in WSL1 Ubuntu - inode reported in /proc/self/maps is a 64bit to /// 32bit conversion of input_info.st_ino if (input_info.st_ino & 0xFFFFFFFF00000000 && !(inode & 0xFFFFFFFF00000000)) From 951d65f2fdea0ff7027f71eecd4b5bb821c76403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Mar=C3=ADn?= Date: Tue, 7 Mar 2023 08:36:11 +0100 Subject: [PATCH 570/841] Fix debug build --- src/Client/TestHint.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Client/TestHint.cpp b/src/Client/TestHint.cpp index c9e845f2039..1500a8baf26 100644 --- a/src/Client/TestHint.cpp +++ b/src/Client/TestHint.cpp @@ -95,7 +95,7 @@ void TestHint::parse(Lexer & comment_lexer, bool is_leading_hint) } else if (token.type == TokenType::BareWord) { - int code = code = DB::ErrorCodes::getErrorCodeByName(std::string_view(token.begin, token.end)); + int code = DB::ErrorCodes::getErrorCodeByName(std::string_view(token.begin, token.end)); error_codes.push_back(code); } else From 406b0f0d663ae8171c37cfa2005b99eea61dfc7a Mon Sep 17 00:00:00 2001 From: Roman Vasin Date: Tue, 7 Mar 2023 09:06:11 +0000 Subject: [PATCH 571/841] Add tests for grants of temporary tables with File and URL engines --- .../02561_temporary_table_grants.reference | 2 ++ .../02561_temporary_table_grants.sh | 20 +++++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/tests/queries/0_stateless/02561_temporary_table_grants.reference b/tests/queries/0_stateless/02561_temporary_table_grants.reference index 2c94e483710..b462a5a7baa 100644 --- a/tests/queries/0_stateless/02561_temporary_table_grants.reference +++ b/tests/queries/0_stateless/02561_temporary_table_grants.reference @@ -1,2 +1,4 @@ OK OK +OK +OK diff --git a/tests/queries/0_stateless/02561_temporary_table_grants.sh b/tests/queries/0_stateless/02561_temporary_table_grants.sh index d2b2bdc5eba..6e0c96786e8 100755 --- a/tests/queries/0_stateless/02561_temporary_table_grants.sh +++ b/tests/queries/0_stateless/02561_temporary_table_grants.sh @@ -10,15 +10,27 @@ user=user_$CLICKHOUSE_TEST_UNIQUE_NAME $CLICKHOUSE_CLIENT --query "DROP USER IF EXISTS $user" $CLICKHOUSE_CLIENT --query "CREATE USER $user IDENTIFIED WITH PLAINTEXT_PASSWORD BY 'hello'" -$CLICKHOUSE_CLIENT --user "$user" --password hello --query "CREATE TEMPORARY TABLE tmp_memory_02561(name String)" 2>&1 | grep -F "Not enough privileges. To execute this query it's necessary to have grant CREATE TEMPORARY TABLE" > /dev/null && echo "OK" +$CLICKHOUSE_CLIENT --user $user --password hello --query "CREATE TEMPORARY TABLE table_memory_02561(name String)" 2>&1 | grep -F "Not enough privileges. To execute this query it's necessary to have grant CREATE TEMPORARY TABLE" > /dev/null && echo "OK" $CLICKHOUSE_CLIENT --query "GRANT CREATE TEMPORARY TABLE ON *.* TO $user" -$CLICKHOUSE_CLIENT --user "$user" --password hello --query "CREATE TEMPORARY TABLE tmp_memory_02561(name String)" +$CLICKHOUSE_CLIENT --user $user --password hello --query "CREATE TEMPORARY TABLE table_memory_02561(name String)" -$CLICKHOUSE_CLIENT --user "$user" --password hello --query "CREATE TEMPORARY TABLE tmp_mergetree_02561(name String) ENGINE = MergeTree() ORDER BY name" 2>&1 | grep -F "Not enough privileges. To execute this query it's necessary to have grant CREATE ARBITRARY TEMPORARY TABLE" > /dev/null && echo "OK" +$CLICKHOUSE_CLIENT --user $user --password hello --query "CREATE TEMPORARY TABLE table_merge_tree_02561(name String) ENGINE = MergeTree() ORDER BY name" 2>&1 | grep -F "Not enough privileges. To execute this query it's necessary to have grant CREATE ARBITRARY TEMPORARY TABLE" > /dev/null && echo "OK" $CLICKHOUSE_CLIENT --query "GRANT CREATE ARBITRARY TEMPORARY TABLE ON *.* TO $user" -$CLICKHOUSE_CLIENT --user "$user" --password hello --query "CREATE TEMPORARY TABLE tmp_mergetree_02561(name String) ENGINE = MergeTree() ORDER BY name" +$CLICKHOUSE_CLIENT --user $user --password hello --query "CREATE TEMPORARY TABLE table_merge_tree_02561(name String) ENGINE = MergeTree() ORDER BY name" + +$CLICKHOUSE_CLIENT --user $user --password hello --query "CREATE TEMPORARY TABLE table_file_02561(name String) ENGINE = File(TabSeparated)" 2>&1 | grep -F "Not enough privileges. To execute this query it's necessary to have grant FILE" > /dev/null && echo "OK" + +$CLICKHOUSE_CLIENT --query "GRANT FILE ON *.* TO $user" + +$CLICKHOUSE_CLIENT --user $user --password hello --query "CREATE TEMPORARY TABLE table_file_02561(name String) ENGINE = File(TabSeparated)" + +$CLICKHOUSE_CLIENT --user $user --password hello --query "CREATE TEMPORARY TABLE table_url_02561(name String) ENGINE = URL('http://127.0.0.1:8123?query=select+12', 'RawBLOB')" 2>&1 | grep -F "Not enough privileges. To execute this query it's necessary to have grant URL" > /dev/null && echo "OK" + +$CLICKHOUSE_CLIENT --query "GRANT URL ON *.* TO $user" + +$CLICKHOUSE_CLIENT --user $user --password hello --query "CREATE TEMPORARY TABLE table_url_02561(name String) ENGINE = URL('http://127.0.0.1:8123?query=select+12', 'RawBLOB')" $CLICKHOUSE_CLIENT --query "DROP USER $user" From 946dff2d04e7f7af8d3541ed7de11f195b521b6c Mon Sep 17 00:00:00 2001 From: Kruglov Pavel <48961922+Avogar@users.noreply.github.com> Date: Tue, 7 Mar 2023 10:51:06 +0100 Subject: [PATCH 572/841] Fix test 02566_ipv4_ipv6_binary_formats --- .../0_stateless/02566_ipv4_ipv6_binary_formats.reference | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/queries/0_stateless/02566_ipv4_ipv6_binary_formats.reference b/tests/queries/0_stateless/02566_ipv4_ipv6_binary_formats.reference index e228d911715..a3d8a33f757 100644 --- a/tests/queries/0_stateless/02566_ipv4_ipv6_binary_formats.reference +++ b/tests/queries/0_stateless/02566_ipv4_ipv6_binary_formats.reference @@ -6,7 +6,7 @@ Arrow 2001:db8:11a3:9d7:1f34:8a2e:7a0:765d 127.0.0.1 Parquet ipv6 Nullable(FixedString(16)) -ipv4 Nullable(Int64) +ipv4 Nullable(UInt32) 2001:db8:11a3:9d7:1f34:8a2e:7a0:765d 127.0.0.1 ORC ipv6 Nullable(String) From 0d778e693bbeb90d7a8d15c9724684e1b3766913 Mon Sep 17 00:00:00 2001 From: Kseniia Sumarokova <54203879+kssenii@users.noreply.github.com> Date: Tue, 7 Mar 2023 11:31:43 +0100 Subject: [PATCH 573/841] Update docs/en/sql-reference/statements/create/view.md --- docs/en/sql-reference/statements/create/view.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/sql-reference/statements/create/view.md b/docs/en/sql-reference/statements/create/view.md index 6e412c13291..a9e7e34dcbb 100644 --- a/docs/en/sql-reference/statements/create/view.md +++ b/docs/en/sql-reference/statements/create/view.md @@ -67,7 +67,7 @@ Materialized views in ClickHouse use **column names** instead of column order du Materialized views in ClickHouse are implemented more like insert triggers. If there’s some aggregation in the view query, it’s applied only to the batch of freshly inserted data. Any changes to existing data of source table (like update, delete, drop partition, etc.) does not change the materialized view. -Materialized views in ClickHouse does not have deterministic behaviour in case of errors. This means that blocks that had been already written will be preserved in the destination table, but all blocks after error will not. +Materialized views in ClickHouse do not have deterministic behaviour in case of errors. This means that blocks that had been already written will be preserved in the destination table, but all blocks after error will not. By default if pushing to one of views fails, then the INSERT query will fail too, and some blocks may not be written to the destination table. This can be changed using `materialized_views_ignore_errors` setting (you should set it for `INSERT` query), if you will set `materialized_views_ignore_errors=true`, then any errors while pushing to views will be ignored and all blocks will be written to the destination table. From 785128cb55712b342f5ff2d5c9324f71870cad10 Mon Sep 17 00:00:00 2001 From: Sema Checherinda <104093494+CheSema@users.noreply.github.com> Date: Tue, 7 Mar 2023 11:44:51 +0100 Subject: [PATCH 574/841] Fix index_granularity for test --- tests/queries/0_stateless/00636_partition_key_parts_pruning.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/queries/0_stateless/00636_partition_key_parts_pruning.sh b/tests/queries/0_stateless/00636_partition_key_parts_pruning.sh index fdaecd87f53..7ec4d99f028 100755 --- a/tests/queries/0_stateless/00636_partition_key_parts_pruning.sh +++ b/tests/queries/0_stateless/00636_partition_key_parts_pruning.sh @@ -7,7 +7,7 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) ${CLICKHOUSE_CLIENT} --query="SELECT '*** Single column partition key ***'" ${CLICKHOUSE_CLIENT} --query="DROP TABLE IF EXISTS single_col_partition_key" -${CLICKHOUSE_CLIENT} --query="CREATE TABLE single_col_partition_key(x UInt32) ENGINE MergeTree ORDER BY x PARTITION BY intDiv(x, 10)" +${CLICKHOUSE_CLIENT} --query="CREATE TABLE single_col_partition_key(x UInt32) ENGINE MergeTree ORDER BY x PARTITION BY intDiv(x, 10) SETTINGS index_granularity=4" ${CLICKHOUSE_CLIENT} --query="INSERT INTO single_col_partition_key VALUES (1), (2), (3), (4), (11), (12), (20)" From 20925406ba0b1d51b338dd386e28a2fef5633573 Mon Sep 17 00:00:00 2001 From: Sergei Trifonov Date: Tue, 7 Mar 2023 11:48:28 +0100 Subject: [PATCH 575/841] Docs for `BackupsIOThreadPool` 1/2 --- docs/en/development/architecture.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/development/architecture.md b/docs/en/development/architecture.md index 50b338844df..5c867c2c6b9 100644 --- a/docs/en/development/architecture.md +++ b/docs/en/development/architecture.md @@ -172,7 +172,7 @@ Global thread pool is `GlobalThreadPool` singleton class. To allocate thread fro Global pool is universal and all pools described below are implemented on top of it. This can be thought of as a hierarchy of pools. Any specialized pool takes its threads from the global pool using `ThreadPool` class. So the main purpose of any specialized pool is to apply limit on the number of simultaneous jobs and do job scheduling. If there are more jobs scheduled than threads in a pool, `ThreadPool` accumulates jobs in a queue with priorities. Each job has an integer priority. Default priority is zero. All jobs with higher priority values are started before any job with lower priority value. But there is no difference between already executing jobs, thus priority matters only when the pool in overloaded. -IO thread pool is implemented as a plain `ThreadPool` accessible via `IOThreadPool::get()` method. It is configured in the same way as global pool with `max_io_thread_pool_size`, `max_io_thread_pool_free_size` and `io_thread_pool_queue_size` settings. The main purpose of IO thread pool is to avoid exhaustion of the global pool with IO jobs, which could prevent queries from fully utilizing CPU. +IO thread pool is implemented as a plain `ThreadPool` accessible via `IOThreadPool::get()` method. It is configured in the same way as global pool with `max_io_thread_pool_size`, `max_io_thread_pool_free_size` and `io_thread_pool_queue_size` settings. The main purpose of IO thread pool is to avoid exhaustion of the global pool with IO jobs, which could prevent queries from fully utilizing CPU. Backup to S3 does significant amount of IO operations and to avoid impact on interactive queries there is separate `BackupsIOThreadPool` configured with `max_backups_io_thread_pool_size`, `max_backups_io_thread_pool_free_size` and `backups_io_thread_pool_queue_size` settings. For periodic task execution there is `BackgroundSchedulePool` class. You can register tasks using `BackgroundSchedulePool::TaskHolder` objects and the pool ensures that no task runs two jobs at the same time. It also allows you to postpone task execution to a specific instant in the future or temporarily deactivate task. Global `Context` provides a few instances of this class for different purposes. For general purpose tasks `Context::getSchedulePool()` is used. From 330aa8c35303d82477ba28f37b1f6cac5c989194 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Tue, 7 Mar 2023 14:49:21 +0400 Subject: [PATCH 576/841] Typo fixed at the page `/docs/ru/engines/table-engines/mergetree-family/mergetree.md` --- docs/ru/engines/table-engines/mergetree-family/mergetree.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/ru/engines/table-engines/mergetree-family/mergetree.md b/docs/ru/engines/table-engines/mergetree-family/mergetree.md index 7269cc023e4..24e0f8dbbb8 100644 --- a/docs/ru/engines/table-engines/mergetree-family/mergetree.md +++ b/docs/ru/engines/table-engines/mergetree-family/mergetree.md @@ -584,7 +584,7 @@ TTL d + INTERVAL 1 MONTH GROUP BY k1, k2 SET x = max(x), y = min(y); Данные с истекшим `TTL` удаляются, когда ClickHouse мёржит куски данных. -Когда ClickHouse видит, что некоторые данные устарели, он выполняет внеплановые мёржи. Для управление частотой подобных мёржей, можно задать настройку `merge_with_ttl_timeout`. Если её значение слишком низкое, придется выполнять много внеплановых мёржей, которые могут начать потреблять значительную долю ресурсов сервера. +Когда ClickHouse видит, что некоторые данные устарели, он выполняет внеплановые мёржи. Для управления частотой подобных мёржей, можно задать настройку `merge_with_ttl_timeout`. Если её значение слишком низкое, придется выполнять много внеплановых мёржей, которые могут начать потреблять значительную долю ресурсов сервера. Если вы выполните запрос `SELECT` между слияниями вы можете получить устаревшие данные. Чтобы избежать этого используйте запрос [OPTIMIZE](../../../engines/table-engines/mergetree-family/mergetree.md#misc_operations-optimize) перед `SELECT`. @@ -679,7 +679,7 @@ TTL d + INTERVAL 1 MONTH GROUP BY k1, k2 SET x = max(x), y = min(y); - `policy_name_N` — название политики. Названия политик должны быть уникальны. - `volume_name_N` — название тома. Названия томов должны быть уникальны. - `disk` — диск, находящийся внутри тома. -- `max_data_part_size_bytes` — максимальный размер куска данных, который может находится на любом из дисков этого тома. Если в результате слияния размер куска ожидается больше, чем max_data_part_size_bytes, то этот кусок будет записан в следующий том. В основном эта функция позволяет хранить новые / мелкие куски на горячем (SSD) томе и перемещать их на холодный (HDD) том, когда они достигают большого размера. Не используйте этот параметр, если политика имеет только один том. +- `max_data_part_size_bytes` — максимальный размер куска данных, который может находиться на любом из дисков этого тома. Если в результате слияния размер куска ожидается больше, чем max_data_part_size_bytes, то этот кусок будет записан в следующий том. В основном эта функция позволяет хранить новые / мелкие куски на горячем (SSD) томе и перемещать их на холодный (HDD) том, когда они достигают большого размера. Не используйте этот параметр, если политика имеет только один том. - `move_factor` — доля доступного свободного места на томе, если места становится меньше, то данные начнут перемещение на следующий том, если он есть (по умолчанию 0.1). Для перемещения куски сортируются по размеру от большего к меньшему (по убыванию) и выбираются куски, совокупный размер которых достаточен для соблюдения условия `move_factor`, если совокупный размер всех партов недостаточен, будут перемещены все парты. - `prefer_not_to_merge` — Отключает слияние кусков данных, хранящихся на данном томе. Если данная настройка включена, то слияние данных, хранящихся на данном томе, не допускается. Это позволяет контролировать работу ClickHouse с медленными дисками. @@ -730,7 +730,7 @@ TTL d + INTERVAL 1 MONTH GROUP BY k1, k2 SET x = max(x), y = min(y); В приведенном примере, политика `hdd_in_order` реализует прицип [round-robin](https://ru.wikipedia.org/wiki/Round-robin_(%D0%B0%D0%BB%D0%B3%D0%BE%D1%80%D0%B8%D1%82%D0%BC)). Так как в политике есть всего один том (`single`), то все записи производятся на его диски по круговому циклу. Такая политика может быть полезна при наличии в системе нескольких похожих дисков, но при этом не сконфигурирован RAID. Учтите, что каждый отдельный диск ненадёжен и чтобы не потерять важные данные это необходимо скомпенсировать за счет хранения данных в трёх копиях. -Если система содержит диски различных типов, то может пригодиться политика `moving_from_ssd_to_hdd`. В томе `hot` находится один SSD-диск (`fast_ssd`), а также задается ограничение на максимальный размер куска, который может храниться на этом томе (1GB). Все куски такой таблицы больше 1GB будут записываться сразу на том `cold`, в котором содержится один HDD-диск `disk1`. Также, при заполнении диска `fast_ssd` более чем на 80% данные будут переносится на диск `disk1` фоновым процессом. +Если система содержит диски различных типов, то может пригодиться политика `moving_from_ssd_to_hdd`. В томе `hot` находится один SSD-диск (`fast_ssd`), а также задается ограничение на максимальный размер куска, который может храниться на этом томе (1GB). Все куски такой таблицы больше 1GB будут записываться сразу на том `cold`, в котором содержится один HDD-диск `disk1`. Также при заполнении диска `fast_ssd` более чем на 80% данные будут переноситься на диск `disk1` фоновым процессом. Порядок томов в политиках хранения важен, при достижении условий на переполнение тома данные переносятся на следующий. Порядок дисков в томах так же важен, данные пишутся по очереди на каждый из них. From ace08ad6b26d8f1d5a48667bca270056549e95c4 Mon Sep 17 00:00:00 2001 From: Sergei Trifonov Date: Tue, 7 Mar 2023 11:49:38 +0100 Subject: [PATCH 577/841] Update docs/en/development/architecture.md --- docs/en/development/architecture.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/development/architecture.md b/docs/en/development/architecture.md index 5c867c2c6b9..dd46b294ddd 100644 --- a/docs/en/development/architecture.md +++ b/docs/en/development/architecture.md @@ -172,7 +172,7 @@ Global thread pool is `GlobalThreadPool` singleton class. To allocate thread fro Global pool is universal and all pools described below are implemented on top of it. This can be thought of as a hierarchy of pools. Any specialized pool takes its threads from the global pool using `ThreadPool` class. So the main purpose of any specialized pool is to apply limit on the number of simultaneous jobs and do job scheduling. If there are more jobs scheduled than threads in a pool, `ThreadPool` accumulates jobs in a queue with priorities. Each job has an integer priority. Default priority is zero. All jobs with higher priority values are started before any job with lower priority value. But there is no difference between already executing jobs, thus priority matters only when the pool in overloaded. -IO thread pool is implemented as a plain `ThreadPool` accessible via `IOThreadPool::get()` method. It is configured in the same way as global pool with `max_io_thread_pool_size`, `max_io_thread_pool_free_size` and `io_thread_pool_queue_size` settings. The main purpose of IO thread pool is to avoid exhaustion of the global pool with IO jobs, which could prevent queries from fully utilizing CPU. Backup to S3 does significant amount of IO operations and to avoid impact on interactive queries there is separate `BackupsIOThreadPool` configured with `max_backups_io_thread_pool_size`, `max_backups_io_thread_pool_free_size` and `backups_io_thread_pool_queue_size` settings. +IO thread pool is implemented as a plain `ThreadPool` accessible via `IOThreadPool::get()` method. It is configured in the same way as global pool with `max_io_thread_pool_size`, `max_io_thread_pool_free_size` and `io_thread_pool_queue_size` settings. The main purpose of IO thread pool is to avoid exhaustion of the global pool with IO jobs, which could prevent queries from fully utilizing CPU. Backup to S3 does significant amount of IO operations and to avoid impact on interactive queries there is a separate `BackupsIOThreadPool` configured with `max_backups_io_thread_pool_size`, `max_backups_io_thread_pool_free_size` and `backups_io_thread_pool_queue_size` settings. For periodic task execution there is `BackgroundSchedulePool` class. You can register tasks using `BackgroundSchedulePool::TaskHolder` objects and the pool ensures that no task runs two jobs at the same time. It also allows you to postpone task execution to a specific instant in the future or temporarily deactivate task. Global `Context` provides a few instances of this class for different purposes. For general purpose tasks `Context::getSchedulePool()` is used. From 2ae0bceb2b427e0e1a1d8ae3e6d30107448fad3e Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Tue, 7 Mar 2023 10:56:11 +0000 Subject: [PATCH 578/841] Address PR comments --- docs/en/operations/settings/settings.md | 53 +++++++-------------- docs/en/sql-reference/operators/in.md | 6 +-- src/Interpreters/Cluster.cpp | 26 ++++++---- src/Interpreters/InterpreterSelectQuery.cpp | 12 ++--- 4 files changed, 43 insertions(+), 54 deletions(-) diff --git a/docs/en/operations/settings/settings.md b/docs/en/operations/settings/settings.md index 809fdb17d99..94dcf159ca9 100644 --- a/docs/en/operations/settings/settings.md +++ b/docs/en/operations/settings/settings.md @@ -1248,8 +1248,8 @@ Possible values: Default value: 1. :::warning -Disable this setting if you use [max_parallel_replicas](#settings-max_parallel_replicas) with [parallel_replicas_mode](#settings-parallel_replicas_mode) set to `sample_key` or `read_tasks`. -If [parallel_replicas_mode](#settings-parallel_replicas_mode) is set to `custom_key`, disable this setting only if it's used on a cluster with multiple shards containing multiple replicas. +Disable this setting if you use [max_parallel_replicas](#settings-max_parallel_replicas) without [parallel_replicas_custom_key](#settings-parallel_replicas_custom_key). +If [parallel_replicas_custom_key](#settings-parallel_replicas_custom_key) is set, disable this setting only if it's used on a cluster with multiple shards containing multiple replicas. If it's used on a cluster with a single shard and multiple replicas, disabling this setting will have negative effects. ::: @@ -1275,11 +1275,14 @@ Default value: `1`. **Additional Info** -This options will produce different results depending on the value of [parallel_replicas_mode](#settings-parallel_replicas_mode). +This options will produce different results depending on the settings used. -### `sample_key` +:::warning +This setting will produce incorrect results when joins or subqueries are involved, and all tables don't meet certain requirements. See [Distributed Subqueries and max_parallel_replicas](../../sql-reference/operators/in.md/#max_parallel_replica-subqueries) for more details. +::: + +### Parallel processing using `SAMPLE` key -If [parallel_replicas_mode](#settings-parallel_replicas_mode) is set to `sample_key`, this setting is useful for replicated tables with a sampling key. A query may be processed faster if it is executed on several servers in parallel. But the query performance may degrade in the following cases: - The position of the sampling key in the partitioning key does not allow efficient range scans. @@ -1287,45 +1290,21 @@ A query may be processed faster if it is executed on several servers in parallel - The sampling key is an expression that is expensive to calculate. - The cluster latency distribution has a long tail, so that querying more servers increases the query overall latency. -### `custom_key` +### Parallel processing using [parallel_replicas_custom_key](#settings-parallel_replicas_custom_key) -If [parallel_replicas_mode](#settings-parallel_replicas_mode) is set to `custom_key`, this setting is useful for any replicated table. -A query may be processed faster if it is executed on several servers in parallel but it depends on the used [parallel_replicas_custom_key](#settings-parallel_replicas_custom_key) -and [parallel_replicas_custom_key_filter_type](#settings-parallel_replicas_custom_key_filter_type). - -Use `default` for [parallel_replicas_custom_key_filter_type](#settings-parallel_replicas_custom_key_filter_type) unless the data is split across the entire integer space (e.g. column contains hash values), -then `range` should be used. -Simple expressions using primary keys are preferred. - -If the `custom_key` mode is used on a cluster that consists of a single shard with multiple replicas, those replicas will be converted into virtual shards. -Otherwise, it will behave same as `sample_key` mode, it will use multiple replicas of each shard. - -:::warning -This setting will produce incorrect results when joins or subqueries are involved, and all tables don't meet certain requirements. See [Distributed Subqueries and max_parallel_replicas](../../sql-reference/operators/in.md/#max_parallel_replica-subqueries) for more details. -::: - -## parallel_replicas_mode {#settings-parallel_replicas_mode} - -Mode of splitting work between replicas. - -Possible values: - -- `sample_key` — Use `SAMPLE` key defined in the `SAMPLE BY` clause to split the work between replicas. -- `custom_key` — Define an arbitrary integer expression to use for splitting work between replicas. -- `read_tasks` — Split tasks for reading physical parts between replicas. - -Default value: `sample_key`. +This setting is useful for any replicated table. ## parallel_replicas_custom_key {#settings-parallel_replicas_custom_key} -Map of arbitrary integer expression that can be used to split work between replicas for a specific table. -If it's used with `cluster` function, the key can be name of the local table defined inside the `cluster` function. -If it's used with `Distributed` engine, the key can be name of the distributed table, alias or the local table for which the `Distributed` engine is created. +An arbitrary integer expression that can be used to split work between replicas for a specific table. The value can be any integer expression. +A query may be processed faster if it is executed on several servers in parallel but it depends on the used [parallel_replicas_custom_key](#settings-parallel_replicas_custom_key) +and [parallel_replicas_custom_key_filter_type](#settings-parallel_replicas_custom_key_filter_type). -Used only if `parallel_replicas_mode` is set to `custom_key`. +Simple expressions using primary keys are preferred. -Default value: `{}`. +If the setting is used on a cluster that consists of a single shard with multiple replicas, those replicas will be converted into virtual shards. +Otherwise, it will behave same as for `SAMPLE` key, it will use multiple replicas of each shard. ## parallel_replicas_custom_key_filter_type {#settings-parallel_replicas_custom_key_filter_type} diff --git a/docs/en/sql-reference/operators/in.md b/docs/en/sql-reference/operators/in.md index e1e4118524a..0599a50c0a4 100644 --- a/docs/en/sql-reference/operators/in.md +++ b/docs/en/sql-reference/operators/in.md @@ -235,10 +235,10 @@ If `some_predicate` is not selective enough, it will return large amount of data When [max_parallel_replicas](#settings-max_parallel_replicas) is greater than 1, distributed queries are further transformed. -For example, if [parallel_replicas_mode](#settings-parallel_replicas_mode) is set to `sample_key`, the following: +For example, the following: ```sql SELECT CounterID, count() FROM distributed_table_1 WHERE UserID IN (SELECT UserID FROM local_table_2 WHERE CounterID < 100) -SETTINGS max_parallel_replicas=3, parallel_replicas_mode='sample_key' +SETTINGS max_parallel_replicas=3 ``` is transformed on each server into @@ -256,4 +256,4 @@ Therefore adding the [max_parallel_replicas](#settings-max_parallel_replicas) se One workaround if local_table_2 does not meet the requirements, is to use `GLOBAL IN` or `GLOBAL JOIN`. -If a table doesn't have a sampling key, more flexible options for [parallel_replicas_mode](#settings-parallel_replicas_mode) can be used that can produce different and more optimal behaviour. +If a table doesn't have a sampling key, more flexible options for [parallel_replicas_custom_key](#settings-parallel_replicas_custom_key) can be used that can produce different and more optimal behaviour. diff --git a/src/Interpreters/Cluster.cpp b/src/Interpreters/Cluster.cpp index b419dacd523..0add0e427f9 100644 --- a/src/Interpreters/Cluster.cpp +++ b/src/Interpreters/Cluster.cpp @@ -671,7 +671,7 @@ std::unique_ptr Cluster::getClusterWithMultipleShards(const std::vector namespace { -void shuffleReplicas(auto & replicas, const Settings & settings) +void shuffleReplicas(std::vector & replicas, const Settings & settings, size_t replicas_needed) { std::random_device rd; std::mt19937 gen{rd()}; @@ -679,15 +679,25 @@ void shuffleReplicas(auto & replicas, const Settings & settings) if (settings.prefer_localhost_replica) { // force for local replica to always be included - auto local_replica = std::find_if(replicas.begin(), replicas.end(), [](const auto & replica) { return replica.is_local; }); - if (local_replica != replicas.end()) - { - if (local_replica != replicas.begin()) - std::swap(*replicas.begin(), *local_replica); + auto first_non_local_replica = std::partition(replicas.begin(), replicas.end(), [](const auto & replica) { return replica.is_local; }); + size_t local_replicas_count = first_non_local_replica - replicas.begin(); - std::shuffle(replicas.begin() + 1, replicas.end(), gen); + if (local_replicas_count == replicas_needed) + { + /// we have exact amount of local replicas as needed, no need to do anything return; } + + if (local_replicas_count > replicas_needed) + { + /// we can use only local replicas, shuffle them + std::shuffle(replicas.begin(), first_non_local_replica, gen); + return; + } + + /// shuffle just non local replicas + std::shuffle(first_non_local_replica, replicas.end(), gen); + return; } std::shuffle(replicas.begin(), replicas.end(), gen); @@ -751,7 +761,7 @@ Cluster::Cluster(Cluster::ReplicasAsShardsTag, const Cluster & from, const Setti { auto shuffled_replicas = replicas; // shuffle replicas so we don't always pick the same subset - shuffleReplicas(shuffled_replicas, settings); + shuffleReplicas(shuffled_replicas, settings, max_replicas_from_shard); create_shards_from_replicas(std::span{shuffled_replicas.begin(), max_replicas_from_shard}); } } diff --git a/src/Interpreters/InterpreterSelectQuery.cpp b/src/Interpreters/InterpreterSelectQuery.cpp index d016922e89e..33d362556aa 100644 --- a/src/Interpreters/InterpreterSelectQuery.cpp +++ b/src/Interpreters/InterpreterSelectQuery.cpp @@ -523,7 +523,7 @@ InterpreterSelectQuery::InterpreterSelectQuery( { if (auto custom_key_ast = parseCustomKeyForTable(settings.parallel_replicas_custom_key, *context)) { - LOG_INFO(log, "Processing query on a replica using custom_key"); + LOG_TRACE(log, "Processing query on a replica using custom_key '{}'", settings.parallel_replicas_custom_key.value); if (!storage) throw DB::Exception(ErrorCodes::BAD_ARGUMENTS, "Storage is unknown when trying to parse custom key for parallel replica"); @@ -537,11 +537,11 @@ InterpreterSelectQuery::InterpreterSelectQuery( } else if (settings.parallel_replica_offset > 0) { - LOG_DEBUG( - log, - "Will use no data on this replica because parallel replicas processing with custom_key has been requested" - " (setting 'max_parallel_replicas') but the table does not have custom_key defined for it or it's invalid (settings `parallel_replicas_custom_key`)"); - parallel_replicas_custom_filter_ast = std::make_shared(false); + throw Exception( + ErrorCodes::BAD_ARGUMENTS, + "Parallel replicas processing with custom_key has been requested " + "(setting 'max_parallel_replicas') but the table does not have custom_key defined for it " + "or it's invalid (settings `parallel_replicas_custom_key`)"); } } else if (auto * distributed = dynamic_cast(storage.get()); From 3dcdf4cd4ef72b3a8043e7533c1119efbbbfa090 Mon Sep 17 00:00:00 2001 From: Sergei Trifonov Date: Tue, 7 Mar 2023 12:12:29 +0100 Subject: [PATCH 579/841] Docs for `BackupsIOThreadPool` 2/2 --- .../settings.md | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/docs/en/operations/server-configuration-parameters/settings.md b/docs/en/operations/server-configuration-parameters/settings.md index 17d03dfa4ec..92a8270ac0f 100644 --- a/docs/en/operations/server-configuration-parameters/settings.md +++ b/docs/en/operations/server-configuration-parameters/settings.md @@ -967,6 +967,7 @@ The maximum number of jobs that can be scheduled on the Global Thread pool. Incr Possible values: - Positive integer. +- 0 — No limit. Default value: `10000`. @@ -976,6 +977,69 @@ Default value: `10000`. 12000 ``` +## max_io_thread_pool_size {#max-io-thread-pool-size} + +ClickHouse uses threads from the IO Thread pool to do some IO operations (e.g. to interact with S3). `max_io_thread_pool_size` limits the maximum number of threads in the pool. + +Possible values: + +- Positive integer. + +Default value: `100`. + +## max_io_thread_pool_free_size {#max-io-thread-pool-free-size} + +If the number of **idle** threads in the IO Thread pool is greater than `max_io_thread_pool_free_size`, then ClickHouse releases resources occupied by some threads and the pool size is decreased. Threads can be created again if necessary. + +Possible values: + +- Positive integer. + +Default value: `0`. + +## io_thread_pool_queue_size {#io-thread-pool-queue-size} + +The maximum number of jobs that can be scheduled on the IO Thread pool. + +Possible values: + +- Positive integer. +- 0 — No limit. + +Default value: `10000`. + +## max_backups_io_thread_pool_size {#max-backups-io-thread-pool-size} + +ClickHouse uses threads from the Backups IO Thread pool to do S3 backup IO operations. `max_backups_io_thread_pool_size` limits the maximum number of threads in the pool. + +Possible values: + +- Positive integer. + +Default value: `1000`. + +## max_backups_io_thread_pool_free_size {#max-backups-io-thread-pool-free-size} + +If the number of **idle** threads in the Backups IO Thread pool is greater than `max_backup_io_thread_pool_free_size`, then ClickHouse releases resources occupied by some threads and the pool size is decreased. Threads can be created again if necessary. + +Possible values: + +- Positive integer. +- Zero. + +Default value: `0`. + +## backups_io_thread_pool_queue_size {#backups-io-thread-pool-queue-size} + +The maximum number of jobs that can be scheduled on the Backups IO Thread pool. It is recommended to keep this queue unlimited due to the current S3 backup logic. + +Possible values: + +- Positive integer. +- 0 — No limit. + +Default value: `0`. + ## background_pool_size {#background_pool_size} Sets the number of threads performing background merges and mutations for tables with MergeTree engines. This setting is also could be applied at server startup from the `default` profile configuration for backward compatibility at the ClickHouse server start. You can only increase the number of threads at runtime. To lower the number of threads you have to restart the server. By adjusting this setting, you manage CPU and disk load. Smaller pool size utilizes less CPU and disk resources, but background processes advance slower which might eventually impact query performance. From f408f750ebc9a4f09224de2e027be2b0f84e2e0a Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Tue, 7 Mar 2023 11:24:46 +0000 Subject: [PATCH 580/841] Disable parallel replicas for joins --- src/Interpreters/InterpreterSelectQuery.cpp | 3 ++- .../02535_max_parallel_replicas_custom_key.reference | 1 + .../0_stateless/02535_max_parallel_replicas_custom_key.sh | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Interpreters/InterpreterSelectQuery.cpp b/src/Interpreters/InterpreterSelectQuery.cpp index 33d362556aa..2f579244b9a 100644 --- a/src/Interpreters/InterpreterSelectQuery.cpp +++ b/src/Interpreters/InterpreterSelectQuery.cpp @@ -455,10 +455,11 @@ InterpreterSelectQuery::InterpreterSelectQuery( } } - if (joined_tables.tablesCount() > 1 && settings.allow_experimental_parallel_reading_from_replicas) + if (joined_tables.tablesCount() > 1 && (!settings.parallel_replicas_custom_key.value.empty() || settings.allow_experimental_parallel_reading_from_replicas)) { LOG_WARNING(log, "Joins are not supported with parallel replicas. Query will be executed without using them."); context->setSetting("allow_experimental_parallel_reading_from_replicas", false); + context->setSetting("parallel_replicas_custom_key", String{""}); } /// Rewrite JOINs diff --git a/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.reference b/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.reference index 9e4e24235aa..8d0f56ba185 100644 --- a/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.reference +++ b/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.reference @@ -170,3 +170,4 @@ filter_type='range' max_replicas=3 prefer_localhost_replica=1 0 334 1 333 2 333 +1 diff --git a/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.sh b/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.sh index 314251be874..3035a191c8f 100755 --- a/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.sh +++ b/tests/queries/0_stateless/02535_max_parallel_replicas_custom_key.sh @@ -41,4 +41,6 @@ run_count_with_custom_key "y" run_count_with_custom_key "cityHash64(y)" run_count_with_custom_key "cityHash64(y) + 1" +$CLICKHOUSE_CLIENT --query="SELECT count() FROM cluster(test_cluster_one_shard_three_replicas_localhost, currentDatabase(), 02535_custom_key) as t1 JOIN 02535_custom_key USING y" --parallel_replicas_custom_key="y" --send_logs_level="trace" 2>&1 | grep -Fac "Joins are not supported with parallel replicas" + $CLICKHOUSE_CLIENT --query="DROP TABLE 02535_custom_key" From 1db6b9414e8b71f27bd1040f696d780f020ca1e0 Mon Sep 17 00:00:00 2001 From: alesapin Date: Tue, 7 Mar 2023 12:39:17 +0100 Subject: [PATCH 581/841] Update src/Storages/StorageReplicatedMergeTree.cpp Co-authored-by: Ilya Yatsishin <2159081+qoega@users.noreply.github.com> --- src/Storages/StorageReplicatedMergeTree.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Storages/StorageReplicatedMergeTree.cpp b/src/Storages/StorageReplicatedMergeTree.cpp index 9e79a715610..61eedc18736 100644 --- a/src/Storages/StorageReplicatedMergeTree.cpp +++ b/src/Storages/StorageReplicatedMergeTree.cpp @@ -8436,7 +8436,7 @@ std::pair StorageReplicatedMergeTree::unlockSharedDataByID( { /// We don't know what to do, because this part can be mutation part /// with hardlinked columns. Since we don't have this information (about blobs not to remove) - /// we refuce to remove blobs. + /// we refuse to remove blobs. LOG_WARNING(logger, "Node with parent zookeeper lock {} for part {} doesn't exist (part was unlocked before), refuse to remove blobs", zookeeper_part_uniq_node, part_name); return std::make_pair{false, {}}; } From c10cb436f41979e92679752d74dc5129637f932c Mon Sep 17 00:00:00 2001 From: alesapin Date: Tue, 7 Mar 2023 12:42:42 +0100 Subject: [PATCH 582/841] Fix build --- src/Storages/StorageReplicatedMergeTree.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Storages/StorageReplicatedMergeTree.cpp b/src/Storages/StorageReplicatedMergeTree.cpp index 61eedc18736..6c6ff30fd04 100644 --- a/src/Storages/StorageReplicatedMergeTree.cpp +++ b/src/Storages/StorageReplicatedMergeTree.cpp @@ -8438,7 +8438,7 @@ std::pair StorageReplicatedMergeTree::unlockSharedDataByID( /// with hardlinked columns. Since we don't have this information (about blobs not to remove) /// we refuse to remove blobs. LOG_WARNING(logger, "Node with parent zookeeper lock {} for part {} doesn't exist (part was unlocked before), refuse to remove blobs", zookeeper_part_uniq_node, part_name); - return std::make_pair{false, {}}; + return {false, {}}; } else { From ced97cefbb5dcbdb74782543281c71ccba387efc Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Tue, 7 Mar 2023 09:36:41 +0000 Subject: [PATCH 583/841] Address review comments --- .../Passes/LogicalExpressionOptimizer.cpp | 21 +++++++++++++++---- .../Passes/LogicalExpressionOptimizerPass.h | 12 +++++------ 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/src/Analyzer/Passes/LogicalExpressionOptimizer.cpp b/src/Analyzer/Passes/LogicalExpressionOptimizer.cpp index 85b44de74da..73585a4cd23 100644 --- a/src/Analyzer/Passes/LogicalExpressionOptimizer.cpp +++ b/src/Analyzer/Passes/LogicalExpressionOptimizer.cpp @@ -102,7 +102,12 @@ private: if (and_operands.size() == 1) { - assert(!function_node.getResultType()->isNullable()); + /// AND operator can have UInt8 or bool as its type. + /// bool is used if a bool constant is at least one operand. + /// Because we reduce the number of operands here by eliminating the same equality checks, + /// the only situation we can end up here is we had AND check where all the equality checks are the same so we know the type is UInt8. + /// Otherwise, we will have > 1 operands and we don't have to do anything. + assert(!function_node.getResultType()->isNullable() && and_operands[0]->getResultType()->equals(*function_node.getResultType())); node = std::move(and_operands[0]); return; } @@ -204,9 +209,17 @@ private: if (or_operands.size() == 1) { - assert(!function_node.getResultType()->isNullable()); - node = std::move(or_operands[0]); - return; + /// if the result type of operand is the same as the result type of OR + /// we can replace OR with the operand + if (or_operands[0]->getResultType()->equals(*function_node.getResultType())) + { + assert(!function_node.getResultType()->isNullable()); + node = std::move(or_operands[0]); + return; + } + + /// otherwise add a stub 0 to make OR correct + or_operands.push_back(std::make_shared(static_cast(0))); } auto or_function_resolver = FunctionFactory::instance().get("or", getContext()); diff --git a/src/Analyzer/Passes/LogicalExpressionOptimizerPass.h b/src/Analyzer/Passes/LogicalExpressionOptimizerPass.h index b436c94fe4c..05c10ddc685 100644 --- a/src/Analyzer/Passes/LogicalExpressionOptimizerPass.h +++ b/src/Analyzer/Passes/LogicalExpressionOptimizerPass.h @@ -6,9 +6,9 @@ namespace DB { /** - * This pass tries to do optimizations on logical expression + * This pass tries to do optimizations on logical expression: * - * Replaces chains of equality functions inside an OR with a single IN operator. + * 1. Replaces chains of equality functions inside an OR with a single IN operator. * The replacement is done if: * - one of the operands of the equality function is a constant * - length of chain is at least 'optimize_min_equality_disjunction_chain_length' long OR the expression has type of LowCardinality @@ -26,7 +26,7 @@ namespace DB * WHERE b = 'test' OR a IN (1, 2); * ------------------------------- * - * Removes duplicate OR checks + * 2. Removes duplicate OR checks * ------------------------------- * SELECT * * FROM table @@ -39,7 +39,7 @@ namespace DB * WHERE a = 1 OR b = 'test'; * ------------------------------- * - * Replaces AND chains with a single constant. + * 3. Replaces AND chains with a single constant. * The replacement is done if: * - one of the operands of the equality function is a constant * - constants are different for same expression @@ -55,7 +55,7 @@ namespace DB * WHERE 0; * ------------------------------- * - * Removes duplicate AND checks + * 4. Removes duplicate AND checks * ------------------------------- * SELECT * * FROM table @@ -74,7 +74,7 @@ class LogicalExpressionOptimizerPass final : public IQueryTreePass public: String getName() override { return "LogicalExpressionOptimizer"; } - String getDescription() override { return "Transform all the 'or's with equality check to a single IN function"; } + String getDescription() override { return "Transform equality chain to a single IN function or a constant if possible"; } void run(QueryTreeNodePtr query_tree_node, ContextPtr context) override; }; From 37b09ce46addcfabdfae531c93e1108a74ed0746 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Tue, 7 Mar 2023 12:16:01 +0000 Subject: [PATCH 584/841] add back trace log --- tests/config/config.d/keeper_port.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/config/config.d/keeper_port.xml b/tests/config/config.d/keeper_port.xml index cffd325e968..6c60c8936a9 100644 --- a/tests/config/config.d/keeper_port.xml +++ b/tests/config/config.d/keeper_port.xml @@ -14,6 +14,7 @@ 1000000000000000 100000 + trace 0 From bf365cec8c654bd592f32355c2ebf41c1743ee69 Mon Sep 17 00:00:00 2001 From: Arthur Passos Date: Tue, 7 Mar 2023 10:08:04 -0300 Subject: [PATCH 585/841] Modify find_first_symbols so it works as expected for find_first_not_symbols --- base/base/find_symbols.h | 32 +++++++++---------- src/Common/tests/gtest_find_symbols.cpp | 42 +++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 16 deletions(-) diff --git a/base/base/find_symbols.h b/base/base/find_symbols.h index 83f53773ae7..1315b8c26e9 100644 --- a/base/base/find_symbols.h +++ b/base/base/find_symbols.h @@ -159,22 +159,22 @@ inline const char * find_first_symbols_sse42(const char * const begin, const cha #endif for (; pos < end; ++pos) - if ( (num_chars >= 1 && maybe_negate(*pos == c01)) - || (num_chars >= 2 && maybe_negate(*pos == c02)) - || (num_chars >= 3 && maybe_negate(*pos == c03)) - || (num_chars >= 4 && maybe_negate(*pos == c04)) - || (num_chars >= 5 && maybe_negate(*pos == c05)) - || (num_chars >= 6 && maybe_negate(*pos == c06)) - || (num_chars >= 7 && maybe_negate(*pos == c07)) - || (num_chars >= 8 && maybe_negate(*pos == c08)) - || (num_chars >= 9 && maybe_negate(*pos == c09)) - || (num_chars >= 10 && maybe_negate(*pos == c10)) - || (num_chars >= 11 && maybe_negate(*pos == c11)) - || (num_chars >= 12 && maybe_negate(*pos == c12)) - || (num_chars >= 13 && maybe_negate(*pos == c13)) - || (num_chars >= 14 && maybe_negate(*pos == c14)) - || (num_chars >= 15 && maybe_negate(*pos == c15)) - || (num_chars >= 16 && maybe_negate(*pos == c16))) + if ( (num_chars == 1 && maybe_negate(is_in(*pos))) + || (num_chars == 2 && maybe_negate(is_in(*pos))) + || (num_chars == 3 && maybe_negate(is_in(*pos))) + || (num_chars == 4 && maybe_negate(is_in(*pos))) + || (num_chars == 5 && maybe_negate(is_in(*pos))) + || (num_chars == 6 && maybe_negate(is_in(*pos))) + || (num_chars == 7 && maybe_negate(is_in(*pos))) + || (num_chars == 8 && maybe_negate(is_in(*pos))) + || (num_chars == 9 && maybe_negate(is_in(*pos))) + || (num_chars == 10 && maybe_negate(is_in(*pos))) + || (num_chars == 11 && maybe_negate(is_in(*pos))) + || (num_chars == 12 && maybe_negate(is_in(*pos))) + || (num_chars == 13 && maybe_negate(is_in(*pos))) + || (num_chars == 14 && maybe_negate(is_in(*pos))) + || (num_chars == 15 && maybe_negate(is_in(*pos))) + || (num_chars == 16 && maybe_negate(is_in(*pos)))) return pos; return return_mode == ReturnMode::End ? end : nullptr; } diff --git a/src/Common/tests/gtest_find_symbols.cpp b/src/Common/tests/gtest_find_symbols.cpp index 1daab982d01..72075fcbd5b 100644 --- a/src/Common/tests/gtest_find_symbols.cpp +++ b/src/Common/tests/gtest_find_symbols.cpp @@ -4,6 +4,12 @@ #include +template +void test_find_first_not(std::string_view haystack, std::string_view::iterator expected_output) +{ + ASSERT_EQ(expected_output, find_first_not_symbols(haystack.begin(), haystack.end())); +} + TEST(FindSymbols, SimpleTest) { std::string s = "Hello, world! Goodbye..."; @@ -36,3 +42,39 @@ TEST(FindSymbols, SimpleTest) ASSERT_EQ(vals, (std::vector{"s", "String"})); } } + +TEST(FindNotSymbols, AllSymbolsPresent) +{ + std::string_view s = "hello world hello"; + test_find_first_not<'h', 'e', 'l', 'o', 'w', 'r', 'd', ' '>(s, s.end()); +} + +TEST(FindNotSymbols, NoSymbolsMatch) +{ + std::string_view s = "abcdefg"; + test_find_first_not<'h', 'i', 'j'>(s, s.begin()); +} + +TEST(FindNotSymbols, ExtraSymbols) +{ + std::string_view s = "hello_world_hello"; + test_find_first_not<'h', 'e', 'l', 'o', ' '>(s, s.begin() + 5u); +} + +TEST(FindNotSymbols, EmptyString) +{ + std::string_view s; + test_find_first_not<'h', 'e', 'l', 'o', 'w', 'r', 'd', ' '>(s, s.end()); +} + +TEST(FindNotSymbols, SingleChar) +{ + std::string_view s = "a"; + test_find_first_not<'a'>(s, s.end()); +} + +TEST(FindNotSymbols, NullCharacter) +{ + auto s = std::string_view("abcdefg\0x", 9u); + test_find_first_not<'a', 'b', 'c', 'd', 'e', 'f', 'g'>(s, s.begin() + 7u); +} From e992003b7a3cac5b043e2db181d298cf566deacc Mon Sep 17 00:00:00 2001 From: Arthur Passos Date: Tue, 7 Mar 2023 10:20:41 -0300 Subject: [PATCH 586/841] add missing c10 --- base/base/find_symbols.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/base/base/find_symbols.h b/base/base/find_symbols.h index 1315b8c26e9..01efe7046bc 100644 --- a/base/base/find_symbols.h +++ b/base/base/find_symbols.h @@ -169,12 +169,12 @@ inline const char * find_first_symbols_sse42(const char * const begin, const cha || (num_chars == 8 && maybe_negate(is_in(*pos))) || (num_chars == 9 && maybe_negate(is_in(*pos))) || (num_chars == 10 && maybe_negate(is_in(*pos))) - || (num_chars == 11 && maybe_negate(is_in(*pos))) - || (num_chars == 12 && maybe_negate(is_in(*pos))) - || (num_chars == 13 && maybe_negate(is_in(*pos))) - || (num_chars == 14 && maybe_negate(is_in(*pos))) - || (num_chars == 15 && maybe_negate(is_in(*pos))) - || (num_chars == 16 && maybe_negate(is_in(*pos)))) + || (num_chars == 11 && maybe_negate(is_in(*pos))) + || (num_chars == 12 && maybe_negate(is_in(*pos))) + || (num_chars == 13 && maybe_negate(is_in(*pos))) + || (num_chars == 14 && maybe_negate(is_in(*pos))) + || (num_chars == 15 && maybe_negate(is_in(*pos))) + || (num_chars == 16 && maybe_negate(is_in(*pos)))) return pos; return return_mode == ReturnMode::End ? end : nullptr; } From 7ce20f5cd2f702df04b2ccbc58117cee9cd974fb Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Tue, 7 Mar 2023 00:53:37 +0100 Subject: [PATCH 587/841] fix tests --- src/Interpreters/InterpreterKillQueryQuery.cpp | 4 ++++ .../Executors/PushingAsyncPipelineExecutor.cpp | 2 +- tests/integration/test_grpc_protocol/test.py | 2 -- .../02232_dist_insert_send_logs_level_hung.sh | 11 ++++++++++- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/Interpreters/InterpreterKillQueryQuery.cpp b/src/Interpreters/InterpreterKillQueryQuery.cpp index 40698386ccb..3330159aff5 100644 --- a/src/Interpreters/InterpreterKillQueryQuery.cpp +++ b/src/Interpreters/InterpreterKillQueryQuery.cpp @@ -161,6 +161,8 @@ public: if (curr_process.processed) continue; + LOG_DEBUG(&Poco::Logger::get("KillQuery"), "Will kill query {} (synchronously)", curr_process.query_id); + auto code = process_list.sendCancelToQuery(curr_process.query_id, curr_process.user, true); if (code != CancellationCode::QueryIsNotInitializedYet && code != CancellationCode::CancelSent) @@ -226,6 +228,8 @@ BlockIO InterpreterKillQueryQuery::execute() MutableColumns res_columns = header.cloneEmptyColumns(); for (const auto & query_desc : queries_to_stop) { + if (!query.test) + LOG_DEBUG(&Poco::Logger::get("KillQuery"), "Will kill query {} (asynchronously)", query_desc.query_id); auto code = (query.test) ? CancellationCode::Unknown : process_list.sendCancelToQuery(query_desc.query_id, query_desc.user, true); insertResultRow(query_desc.source_num, code, processes_block, header, res_columns); } diff --git a/src/Processors/Executors/PushingAsyncPipelineExecutor.cpp b/src/Processors/Executors/PushingAsyncPipelineExecutor.cpp index 70815bb8b3b..4478f1548a4 100644 --- a/src/Processors/Executors/PushingAsyncPipelineExecutor.cpp +++ b/src/Processors/Executors/PushingAsyncPipelineExecutor.cpp @@ -187,7 +187,7 @@ void PushingAsyncPipelineExecutor::push(Chunk chunk) if (!is_pushed) throw Exception(ErrorCodes::LOGICAL_ERROR, - "Pipeline for PushingPipelineExecutor was finished before all data was inserted"); + "Pipeline for PushingAsyncPipelineExecutor was finished before all data was inserted"); } void PushingAsyncPipelineExecutor::push(Block block) diff --git a/tests/integration/test_grpc_protocol/test.py b/tests/integration/test_grpc_protocol/test.py index a1bc0d42a46..137d585f7d1 100644 --- a/tests/integration/test_grpc_protocol/test.py +++ b/tests/integration/test_grpc_protocol/test.py @@ -594,8 +594,6 @@ def test_cancel_while_processing_input(): stub = clickhouse_grpc_pb2_grpc.ClickHouseStub(main_channel) result = stub.ExecuteQueryWithStreamInput(send_query_info()) assert result.cancelled == True - assert result.progress.written_rows == 6 - assert query("SELECT a FROM t ORDER BY a") == "1\n2\n3\n4\n5\n6\n" def test_cancel_while_generating_output(): diff --git a/tests/queries/0_stateless/02232_dist_insert_send_logs_level_hung.sh b/tests/queries/0_stateless/02232_dist_insert_send_logs_level_hung.sh index 5ed94148bc1..734cef06214 100755 --- a/tests/queries/0_stateless/02232_dist_insert_send_logs_level_hung.sh +++ b/tests/queries/0_stateless/02232_dist_insert_send_logs_level_hung.sh @@ -49,7 +49,16 @@ insert_client_opts=( timeout 250s $CLICKHOUSE_CLIENT "${client_opts[@]}" "${insert_client_opts[@]}" -q "insert into function remote('127.2', currentDatabase(), in_02232) select * from numbers(1e6)" # Kill underlying query of remote() to make KILL faster -timeout 60s $CLICKHOUSE_CLIENT "${client_opts[@]}" -q "KILL QUERY WHERE Settings['log_comment'] = '$CLICKHOUSE_LOG_COMMENT' SYNC" --format Null +# This test is reproducing very interesting bahaviour. +# The block size is 1, so the secondary query creates InterpreterSelectQuery for each row due to pushing to the MV. +# It works extremely slow, and the initial query produces new blocks and writes them to the socket much faster +# then the secondary query can read and process them. Therefore, it fills network buffers in the kernel. +# Once a buffer in the kernel is full, send(...) blocks until the secondary query will finish processing data +# that it already has in ReadBufferFromPocoSocket and call recv. +# Or until the kernel will decide to resize the buffer (seems like it has non-trivial rules for that). +# Anyway, it may look like the initial query got stuck, but actually it did not. +# Moreover, the initial query cannot be killed at that point, so KILL QUERY ... SYNC will get "stuck" as well. +timeout 30s $CLICKHOUSE_CLIENT "${client_opts[@]}" -q "KILL QUERY WHERE query like '%INSERT INTO $CLICKHOUSE_DATABASE.in_02232%' SYNC" --format Null echo $? $CLICKHOUSE_CLIENT "${client_opts[@]}" -nm -q " From 0da310c8dcf51331bc435f7cf49c69e84145286e Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Tue, 7 Mar 2023 15:30:40 +0100 Subject: [PATCH 588/841] Update ProcessList.cpp --- src/Interpreters/ProcessList.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Interpreters/ProcessList.cpp b/src/Interpreters/ProcessList.cpp index a26844ae73c..b792ea538ae 100644 --- a/src/Interpreters/ProcessList.cpp +++ b/src/Interpreters/ProcessList.cpp @@ -404,7 +404,7 @@ CancellationCode QueryStatus::cancelQuery(bool) std::lock_guard lock(executors_mutex); executors_snapshot = executors; } - + /// We should call cancel() for each executor with unlocked executors_mutex, because /// cancel() can try to lock some internal mutex that is already locked by query executing /// thread, and query executing thread can call removePipelineExecutor and lock executors_mutex, From 27e4b09f944ae450e394b2886dd557ac64ae141b Mon Sep 17 00:00:00 2001 From: vdimir Date: Tue, 7 Mar 2023 15:13:13 +0000 Subject: [PATCH 589/841] Fix 02570_fallback_from_async_insert --- tests/queries/0_stateless/02570_fallback_from_async_insert.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/queries/0_stateless/02570_fallback_from_async_insert.sh b/tests/queries/0_stateless/02570_fallback_from_async_insert.sh index 9c158d6241b..d7c8944b89d 100755 --- a/tests/queries/0_stateless/02570_fallback_from_async_insert.sh +++ b/tests/queries/0_stateless/02570_fallback_from_async_insert.sh @@ -47,6 +47,7 @@ $CLICKHOUSE_CLIENT --query "SYSTEM FLUSH LOGS" $CLICKHOUSE_CLIENT --query " SELECT 'id_' || splitByChar('_', query_id)[1] AS id FROM system.text_log WHERE query_id LIKE '%$query_id_suffix' AND message LIKE '%$message%' + ORDER BY id " $CLICKHOUSE_CLIENT --query "DROP TABLE IF EXISTS t_async_insert_fallback" From d9611dde0b12d2c7c5b5c633f028d7c625ae4d78 Mon Sep 17 00:00:00 2001 From: Anton Popov Date: Tue, 7 Mar 2023 15:23:27 +0000 Subject: [PATCH 590/841] fix test --- .../01705_normalize_create_alter_function_names.reference | 4 ++-- .../01705_normalize_create_alter_function_names.sql | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/queries/0_stateless/01705_normalize_create_alter_function_names.reference b/tests/queries/0_stateless/01705_normalize_create_alter_function_names.reference index b6f5fe99ca1..b5b93c34c00 100644 --- a/tests/queries/0_stateless/01705_normalize_create_alter_function_names.reference +++ b/tests/queries/0_stateless/01705_normalize_create_alter_function_names.reference @@ -1,2 +1,2 @@ -CREATE TABLE default.x\n(\n `i` Int32,\n INDEX mm rand() TYPE minmax GRANULARITY 1,\n INDEX nn rand() TYPE minmax GRANULARITY 1,\n PROJECTION p\n (\n SELECT max(i)\n ),\n PROJECTION p2\n (\n SELECT min(i)\n )\n)\nENGINE = ReplicatedMergeTree(\'/clickhouse/tables/default/x\', \'r\')\nORDER BY i\nSETTINGS index_granularity = 8192 -metadata format version: 1\ndate column: \nsampling expression: \nindex granularity: 8192\nmode: 0\nsign column: \nprimary key: i\ndata format version: 1\npartition key: \nindices: mm rand() TYPE minmax GRANULARITY 1, nn rand() TYPE minmax GRANULARITY 1\nprojections: p (SELECT max(i)), p2 (SELECT min(i))\ngranularity bytes: 10485760\n +CREATE TABLE default.x\n(\n `i` Int32,\n INDEX mm log2(i) TYPE minmax GRANULARITY 1,\n INDEX nn log2(i) TYPE minmax GRANULARITY 1,\n PROJECTION p\n (\n SELECT max(i)\n ),\n PROJECTION p2\n (\n SELECT min(i)\n )\n)\nENGINE = ReplicatedMergeTree(\'/clickhouse/tables/default/x\', \'r\')\nORDER BY i\nSETTINGS index_granularity = 8192 +metadata format version: 1\ndate column: \nsampling expression: \nindex granularity: 8192\nmode: 0\nsign column: \nprimary key: i\ndata format version: 1\npartition key: \nindices: mm log2(i) TYPE minmax GRANULARITY 1, nn log2(i) TYPE minmax GRANULARITY 1\nprojections: p (SELECT max(i)), p2 (SELECT min(i))\ngranularity bytes: 10485760\n diff --git a/tests/queries/0_stateless/01705_normalize_create_alter_function_names.sql b/tests/queries/0_stateless/01705_normalize_create_alter_function_names.sql index 683bd271405..be0f7e8b710 100644 --- a/tests/queries/0_stateless/01705_normalize_create_alter_function_names.sql +++ b/tests/queries/0_stateless/01705_normalize_create_alter_function_names.sql @@ -2,9 +2,9 @@ drop table if exists x; -create table x(i int, index mm RAND() type minmax granularity 1, projection p (select MAX(i))) engine ReplicatedMergeTree('/clickhouse/tables/{database}/x', 'r') order by i; +create table x(i int, index mm LOG2(i) type minmax granularity 1, projection p (select MAX(i))) engine ReplicatedMergeTree('/clickhouse/tables/{database}/x', 'r') order by i; -alter table x add index nn RAND() type minmax granularity 1, add projection p2 (select MIN(i)); +alter table x add index nn LOG2(i) type minmax granularity 1, add projection p2 (select MIN(i)); show create x; From af23c8bed07f665c0cf074b64bb10d7ad49cbb66 Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Mon, 6 Mar 2023 17:46:46 +0100 Subject: [PATCH 591/841] Get the release logs w/o delay from curl --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2ef05fe989b..4b4c7e6c70e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ jobs: - name: Deploy packages and assets run: | GITHUB_TAG="${GITHUB_REF#refs/tags/}" - curl --silent --data '' \ + curl --silent --data '' --no-buffer \ '${{ secrets.PACKAGES_RELEASE_URL }}/release/'"${GITHUB_TAG}"'?binary=binary_darwin&binary=binary_darwin_aarch64&sync=true' ############################################################################################ ##################################### Docker images ####################################### From c63be68a8fd9a18c881df656d56f17ea899280fc Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Tue, 7 Mar 2023 13:35:00 +0100 Subject: [PATCH 592/841] Use explicit docker tags and paths --- .github/workflows/backport_branches.yml | 3 ++- .github/workflows/master.yml | 3 ++- .github/workflows/pull_request.yml | 3 ++- .github/workflows/release.yml | 3 ++- .github/workflows/release_branches.yml | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/backport_branches.yml b/.github/workflows/backport_branches.yml index a324d20abc9..7cdf11fec0f 100644 --- a/.github/workflows/backport_branches.yml +++ b/.github/workflows/backport_branches.yml @@ -452,7 +452,8 @@ jobs: - name: Check docker clickhouse/clickhouse-server building run: | cd "$GITHUB_WORKSPACE/tests/ci" - python3 docker_server.py --release-type head --no-push + python3 docker_server.py --release-type head --no-push \ + --image-repo clickhouse/clickhouse-server --image-path docker/server python3 docker_server.py --release-type head --no-push --no-ubuntu \ --image-repo clickhouse/clickhouse-keeper --image-path docker/keeper - name: Cleanup diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index b70fe256833..7c5e477ab60 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -860,7 +860,8 @@ jobs: - name: Check docker clickhouse/clickhouse-server building run: | cd "$GITHUB_WORKSPACE/tests/ci" - python3 docker_server.py --release-type head + python3 docker_server.py --release-type head \ + --image-repo clickhouse/clickhouse-server --image-path docker/server python3 docker_server.py --release-type head --no-ubuntu \ --image-repo clickhouse/clickhouse-keeper --image-path docker/keeper - name: Cleanup diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index ff98739db00..e7303c7b69f 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -917,7 +917,8 @@ jobs: - name: Check docker clickhouse/clickhouse-server building run: | cd "$GITHUB_WORKSPACE/tests/ci" - python3 docker_server.py --release-type head --no-push + python3 docker_server.py --release-type head --no-push \ + --image-repo clickhouse/clickhouse-server --image-path docker/server python3 docker_server.py --release-type head --no-push --no-ubuntu \ --image-repo clickhouse/clickhouse-keeper --image-path docker/keeper - name: Cleanup diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4b4c7e6c70e..e69d189c80e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,8 @@ jobs: - name: Check docker clickhouse/clickhouse-server building run: | cd "$GITHUB_WORKSPACE/tests/ci" - python3 docker_server.py --release-type auto --version "${{ github.ref }}" + python3 docker_server.py --release-type auto --version "${{ github.ref }}" \ + --image-repo clickhouse/clickhouse-server --image-path docker/server python3 docker_server.py --release-type auto --version "${{ github.ref }}" --no-ubuntu \ --image-repo clickhouse/clickhouse-keeper --image-path docker/keeper - name: Cleanup diff --git a/.github/workflows/release_branches.yml b/.github/workflows/release_branches.yml index 74ec1163cc9..e56a1fb58fc 100644 --- a/.github/workflows/release_branches.yml +++ b/.github/workflows/release_branches.yml @@ -525,7 +525,8 @@ jobs: - name: Check docker clickhouse/clickhouse-server building run: | cd "$GITHUB_WORKSPACE/tests/ci" - python3 docker_server.py --release-type head --no-push + python3 docker_server.py --release-type head --no-push \ + --image-repo clickhouse/clickhouse-server --image-path docker/server python3 docker_server.py --release-type head --no-push --no-ubuntu \ --image-repo clickhouse/clickhouse-keeper --image-path docker/keeper - name: Cleanup From dedd242f350d9ddfb8a43eac36103f4841b57941 Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Tue, 7 Mar 2023 13:42:18 +0100 Subject: [PATCH 593/841] Add a manual trigger for release workflow --- .github/workflows/release.yml | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e69d189c80e..73246af6dfc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,14 +7,27 @@ on: # yamllint disable-line rule:truthy release: types: - published + workflow_dispatch: + inputs: + tag: + description: 'Release tag' + required: true + type: string jobs: ReleasePublish: runs-on: [self-hosted, style-checker] steps: + - name: Set tag from input + if: github.event_name == 'workflow_dispatch' + run: | + echo "GITHUB_TAG=${{ github.event.inputs.tag }}" >> "$GITHUB_ENV" + - name: Set tag from REF + if: github.event_name == 'release' + run: | + echo "GITHUB_TAG=${GITHUB_REF#refs/tags/}" >> "$GITHUB_ENV" - name: Deploy packages and assets run: | - GITHUB_TAG="${GITHUB_REF#refs/tags/}" curl --silent --data '' --no-buffer \ '${{ secrets.PACKAGES_RELEASE_URL }}/release/'"${GITHUB_TAG}"'?binary=binary_darwin&binary=binary_darwin_aarch64&sync=true' ############################################################################################ @@ -23,17 +36,26 @@ jobs: DockerServerImages: runs-on: [self-hosted, style-checker] steps: + - name: Set tag from input + if: github.event_name == 'workflow_dispatch' + run: | + echo "GITHUB_TAG=${{ github.event.inputs.tag }}" >> "$GITHUB_ENV" + - name: Set tag from REF + if: github.event_name == 'release' + run: | + echo "GITHUB_TAG=${GITHUB_REF#refs/tags/}" >> "$GITHUB_ENV" - name: Check out repository code uses: ClickHouse/checkout@v1 with: clear-repository: true fetch-depth: 0 # otherwise we will have no version info + ref: ${{ env.GITHUB_TAG }} - name: Check docker clickhouse/clickhouse-server building run: | cd "$GITHUB_WORKSPACE/tests/ci" - python3 docker_server.py --release-type auto --version "${{ github.ref }}" \ + python3 docker_server.py --release-type auto --version "$GITHUB_TAG" \ --image-repo clickhouse/clickhouse-server --image-path docker/server - python3 docker_server.py --release-type auto --version "${{ github.ref }}" --no-ubuntu \ + python3 docker_server.py --release-type auto --version "$GITHUB_TAG" --no-ubuntu \ --image-repo clickhouse/clickhouse-keeper --image-path docker/keeper - name: Cleanup if: always() From 86410a7a3f8a9241413f8a36d3bda04e003e17da Mon Sep 17 00:00:00 2001 From: vdimir Date: Tue, 7 Mar 2023 16:16:51 +0000 Subject: [PATCH 594/841] Fix MergeTreeTransaction::isReadOnly --- src/Interpreters/MergeTreeTransaction.cpp | 7 +++++++ src/Interpreters/MergeTreeTransaction.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/src/Interpreters/MergeTreeTransaction.cpp b/src/Interpreters/MergeTreeTransaction.cpp index 50ecb061752..bfdda354c9b 100644 --- a/src/Interpreters/MergeTreeTransaction.cpp +++ b/src/Interpreters/MergeTreeTransaction.cpp @@ -168,6 +168,8 @@ void MergeTreeTransaction::addMutation(const StoragePtr & table, const String & bool MergeTreeTransaction::isReadOnly() const { std::lock_guard lock{mutex}; + if (finalized) + return is_read_only; chassert((creating_parts.empty() && removing_parts.empty() && mutations.empty()) == storages.empty()); return storages.empty(); } @@ -318,6 +320,11 @@ bool MergeTreeTransaction::rollback() noexcept void MergeTreeTransaction::afterFinalize() { std::lock_guard lock{mutex}; + chassert((creating_parts.empty() && removing_parts.empty() && mutations.empty()) == storages.empty()); + + /// Remember if it was read-only transaction before we clear storages + is_read_only = storages.empty(); + /// Release shared pointers just in case storages.clear(); mutations.clear(); diff --git a/src/Interpreters/MergeTreeTransaction.h b/src/Interpreters/MergeTreeTransaction.h index e5a80e03e18..4ca36cf64ad 100644 --- a/src/Interpreters/MergeTreeTransaction.h +++ b/src/Interpreters/MergeTreeTransaction.h @@ -78,6 +78,9 @@ private: bool finalized TSA_GUARDED_BY(mutex) = false; + /// Indicates if transaction was read-only before `afterFinalize` + bool is_read_only TSA_GUARDED_BY(mutex) = false; + /// Lists of changes made by transaction std::unordered_set storages TSA_GUARDED_BY(mutex); DataPartsVector creating_parts TSA_GUARDED_BY(mutex); From 4e79df448f151a471d049c6938c06e2e690e9904 Mon Sep 17 00:00:00 2001 From: vdimir Date: Tue, 7 Mar 2023 16:17:35 +0000 Subject: [PATCH 595/841] Catch exceptions in LiveViewPeriodicRefreshTask --- src/Storages/LiveView/StorageLiveView.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Storages/LiveView/StorageLiveView.cpp b/src/Storages/LiveView/StorageLiveView.cpp index 547becf3837..3467628d081 100644 --- a/src/Storages/LiveView/StorageLiveView.cpp +++ b/src/Storages/LiveView/StorageLiveView.cpp @@ -241,7 +241,18 @@ StorageLiveView::StorageLiveView( blocks_metadata_ptr = std::make_shared(); active_ptr = std::make_shared(true); - periodic_refresh_task = getContext()->getSchedulePool().createTask("LiveViewPeriodicRefreshTask", [this]{ periodicRefreshTaskFunc(); }); + periodic_refresh_task = getContext()->getSchedulePool().createTask("LiveViewPeriodicRefreshTask", + [this] + { + try + { + periodicRefreshTaskFunc(); + } + catch (...) + { + tryLogCurrentException(log, "Exception in LiveView periodic refresh task in BackgroundSchedulePool"); + } + }); periodic_refresh_task->deactivate(); } From 5ba1b5d43c741779eeba937cb61408404a6ec4e7 Mon Sep 17 00:00:00 2001 From: Arthur Passos Date: Tue, 7 Mar 2023 14:04:48 -0300 Subject: [PATCH 596/841] add more descriptive tests --- src/Common/tests/gtest_find_symbols.cpp | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/Common/tests/gtest_find_symbols.cpp b/src/Common/tests/gtest_find_symbols.cpp index 72075fcbd5b..14e769b3595 100644 --- a/src/Common/tests/gtest_find_symbols.cpp +++ b/src/Common/tests/gtest_find_symbols.cpp @@ -45,13 +45,29 @@ TEST(FindSymbols, SimpleTest) TEST(FindNotSymbols, AllSymbolsPresent) { - std::string_view s = "hello world hello"; - test_find_first_not<'h', 'e', 'l', 'o', 'w', 'r', 'd', ' '>(s, s.end()); + std::string_view str_with_17_bytes = "hello world hello"; + std::string_view str_with_16_bytes = {str_with_17_bytes.begin(), str_with_17_bytes.end() - 1u}; + std::string_view str_with_15_bytes = {str_with_16_bytes.begin(), str_with_16_bytes.end() - 1u}; + + /* + * The below variations will choose different implementation strategies: + * 1. Loop method only because it does not contain enough bytes for SSE 4.2 + * 2. SSE4.2 only since string contains exactly 16 bytes + * 3. SSE4.2 + Loop method will take place because only first 16 bytes are treated by SSE 4.2 and remaining bytes is treated by loop + * + * Below code asserts that all calls return the ::end of the input string. This was not true prior to this fix as mentioned in PR #47304 + * */ + + test_find_first_not<'h', 'e', 'l', 'o', 'w', 'r', 'd', ' '>(str_with_15_bytes, str_with_15_bytes.end()); + test_find_first_not<'h', 'e', 'l', 'o', 'w', 'r', 'd', ' '>(str_with_16_bytes, str_with_16_bytes.end()); + test_find_first_not<'h', 'e', 'l', 'o', 'w', 'r', 'd', ' '>(str_with_17_bytes, str_with_17_bytes.end()); } TEST(FindNotSymbols, NoSymbolsMatch) { std::string_view s = "abcdefg"; + + // begin should be returned since the first character of the string does not match any of the below symbols test_find_first_not<'h', 'i', 'j'>(s, s.begin()); } @@ -75,6 +91,9 @@ TEST(FindNotSymbols, SingleChar) TEST(FindNotSymbols, NullCharacter) { + // special test to ensure only the passed template arguments are used as needles + // since current find_first_symbols implementation takes in 16 characters and defaults + // to \0. auto s = std::string_view("abcdefg\0x", 9u); test_find_first_not<'a', 'b', 'c', 'd', 'e', 'f', 'g'>(s, s.begin() + 7u); } From ba0cc954415275380c93f51c145b6ed479388aa3 Mon Sep 17 00:00:00 2001 From: Kruglov Pavel <48961922+Avogar@users.noreply.github.com> Date: Tue, 7 Mar 2023 20:04:52 +0100 Subject: [PATCH 597/841] Fix typo --- src/Processors/Formats/Impl/ORCBlockOutputFormat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Processors/Formats/Impl/ORCBlockOutputFormat.cpp b/src/Processors/Formats/Impl/ORCBlockOutputFormat.cpp index 7fae2c8f480..39cacde94ed 100644 --- a/src/Processors/Formats/Impl/ORCBlockOutputFormat.cpp +++ b/src/Processors/Formats/Impl/ORCBlockOutputFormat.cpp @@ -23,7 +23,7 @@ #include namespace DB -{7 +{ namespace ErrorCodes { From ff8fc0634ac6c27b74b7182e3307212b8b25f5bd Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Tue, 7 Mar 2023 19:50:42 +0000 Subject: [PATCH 598/841] Docs: Small cleanups after Kafka fix #47138 --- docs/en/engines/table-engines/integrations/kafka.md | 12 ++++++------ docs/en/sql-reference/statements/create/table.md | 8 ++------ src/Storages/ColumnsDescription.h | 4 +--- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/docs/en/engines/table-engines/integrations/kafka.md b/docs/en/engines/table-engines/integrations/kafka.md index e6134043b8e..255ba06f056 100644 --- a/docs/en/engines/table-engines/integrations/kafka.md +++ b/docs/en/engines/table-engines/integrations/kafka.md @@ -19,8 +19,8 @@ Kafka lets you: ``` sql CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] ( - name1 [type1] [DEFAULT|MATERIALIZED|ALIAS expr1], - name2 [type2] [DEFAULT|MATERIALIZED|ALIAS expr2], + name1 [type1], + name2 [type2], ... ) ENGINE = Kafka() SETTINGS @@ -113,6 +113,10 @@ Kafka(kafka_broker_list, kafka_topic_list, kafka_group_name, kafka_format +:::info +The Kafka table engine doesn't support columns with [default value](../../../sql-reference/statements/create/table.md#default_value). If you need columns with default value, you can add them at materialized view level (see below). +::: + ## Description {#description} The delivered messages are tracked automatically, so each message in a group is only counted once. If you want to get the data twice, then create a copy of the table with another group name. @@ -125,10 +129,6 @@ Groups are flexible and synced on the cluster. For instance, if you have 10 topi 2. Create a table with the desired structure. 3. Create a materialized view that converts data from the engine and puts it into a previously created table. -:::info -Kafka Engine doesn't support columns with default value of type `DEFAULT/MATERIALIZED/EPHEMERAL/ALIAS`. If you need columns with any default type, they can be added at `MATERIALIZED VIEW` level. -::: - When the `MATERIALIZED VIEW` joins the engine, it starts collecting data in the background. This allows you to continually receive messages from Kafka and convert them to the required format using `SELECT`. One kafka table can have as many materialized views as you like, they do not read data from the kafka table directly, but receive new records (in blocks), this way you can write to several tables with different detail level (with grouping - aggregation and without). diff --git a/docs/en/sql-reference/statements/create/table.md b/docs/en/sql-reference/statements/create/table.md index b3d5060e13c..50e74920e4b 100644 --- a/docs/en/sql-reference/statements/create/table.md +++ b/docs/en/sql-reference/statements/create/table.md @@ -110,7 +110,7 @@ If the type is not `Nullable` and if `NULL` is specified, it will be treated as See also [data_type_default_nullable](../../../operations/settings/settings.md#data_type_default_nullable) setting. -## Default Values +## Default Values {#default_values} The column description can specify an expression for a default value, in one of the following ways: `DEFAULT expr`, `MATERIALIZED expr`, `ALIAS expr`. @@ -124,10 +124,6 @@ If the data type and default expression are defined explicitly, this expression Default expressions may be defined as an arbitrary expression from table constants and columns. When creating and changing the table structure, it checks that expressions do not contain loops. For INSERT, it checks that expressions are resolvable – that all columns they can be calculated from have been passed. -:::info -Kafka Engine doesn't support columns with default value of type `DEFAULT/MATERIALIZED/EPHEMERAL/ALIAS`. If you need columns with any default type, they can be added at `MATERIALIZED VIEW` level, see [Kafka Engine](../../../engines/table-engines/integrations/kafka.md#description). -::: - ### DEFAULT `DEFAULT expr` @@ -580,7 +576,7 @@ SELECT * FROM base.t1; You can add a comment to the table when you creating it. :::note -The comment is supported for all table engines except [Kafka](../../../engines/table-engines/integrations/kafka.md), [RabbitMQ](../../../engines/table-engines/integrations/rabbitmq.md) and [EmbeddedRocksDB](../../../engines/table-engines/integrations/embedded-rocksdb.md). +The comment clause is supported by all table engines except [Kafka](../../../engines/table-engines/integrations/kafka.md), [RabbitMQ](../../../engines/table-engines/integrations/rabbitmq.md) and [EmbeddedRocksDB](../../../engines/table-engines/integrations/embedded-rocksdb.md). ::: diff --git a/src/Storages/ColumnsDescription.h b/src/Storages/ColumnsDescription.h index 36109392ab6..5551fdea2e3 100644 --- a/src/Storages/ColumnsDescription.h +++ b/src/Storages/ColumnsDescription.h @@ -132,9 +132,7 @@ public: NamesAndTypesList getInsertable() const; /// ordinary + ephemeral NamesAndTypesList getAliases() const; NamesAndTypesList getEphemeral() const; - // Columns with preset default expression. - // For example from `CREATE TABLE` statement - NamesAndTypesList getWithDefaultExpression() const; + NamesAndTypesList getWithDefaultExpression() const; // columns with default expression, for example set by `CREATE TABLE` statement NamesAndTypesList getAllPhysical() const; /// ordinary + materialized. NamesAndTypesList getAll() const; /// ordinary + materialized + aliases + ephemeral /// Returns .size0/.null/... From 9792b93a1171f8fc95479c616b236141c70af667 Mon Sep 17 00:00:00 2001 From: Vitaly Baranov Date: Thu, 23 Feb 2023 13:48:36 +0100 Subject: [PATCH 599/841] Fix changing a role which is already expired in RoleCache. --- src/Access/RoleCache.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/Access/RoleCache.cpp b/src/Access/RoleCache.cpp index 308b771243e..7a8c13636d2 100644 --- a/src/Access/RoleCache.cpp +++ b/src/Access/RoleCache.cpp @@ -163,11 +163,15 @@ void RoleCache::roleChanged(const UUID & role_id, const RolePtr & changed_role) std::lock_guard lock{mutex}; auto role_from_cache = cache.get(role_id); - if (!role_from_cache) - return; - role_from_cache->first = changed_role; - cache.update(role_id, role_from_cache); - collectEnabledRoles(¬ifications); + if (role_from_cache) + { + /// We update the role stored in a cache entry only if that entry has not expired yet. + role_from_cache->first = changed_role; + cache.update(role_id, role_from_cache); + } + + /// An enabled role for some users has been changed, we need to recalculate the access rights. + collectEnabledRoles(¬ifications); /// collectEnabledRoles() must be called with the `mutex` locked. } @@ -177,8 +181,12 @@ void RoleCache::roleRemoved(const UUID & role_id) scope_guard notifications; std::lock_guard lock{mutex}; + + /// If a cache entry with the role has expired already, that remove() will do nothing. cache.remove(role_id); - collectEnabledRoles(¬ifications); + + /// An enabled role for some users has been removed, we need to recalculate the access rights. + collectEnabledRoles(¬ifications); /// collectEnabledRoles() must be called with the `mutex` locked. } } From f8eb1fad91f0ea389e1a6f7b61270b07aa606f76 Mon Sep 17 00:00:00 2001 From: Ilya Yatsishin <2159081+qoega@users.noreply.github.com> Date: Tue, 7 Mar 2023 23:06:14 +0100 Subject: [PATCH 600/841] Disable parallel format in health check --- tests/clickhouse-test | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/clickhouse-test b/tests/clickhouse-test index e30e709f363..c1103da1552 100755 --- a/tests/clickhouse-test +++ b/tests/clickhouse-test @@ -118,6 +118,7 @@ def clickhouse_execute_http( "http_connection_timeout": timeout, "http_receive_timeout": timeout, "http_send_timeout": timeout, + "output_format_parallel_formatting": 0, } if settings is not None: params.update(settings) From 9920a52c51d177bd18ffb9a5788b29c8af9a5ac1 Mon Sep 17 00:00:00 2001 From: Mike Kot Date: Mon, 6 Mar 2023 17:53:58 +0300 Subject: [PATCH 601/841] use std::lerp, constexpr hex.h --- base/base/hex.h | 214 ++++++++++++++++++ base/base/interpolate.h | 13 ++ programs/install/Install.cpp | 2 +- src/Backups/BackupCoordinationRemote.cpp | 2 +- src/Backups/BackupImpl.cpp | 2 +- src/Backups/IBackupCoordination.h | 2 +- src/Columns/tests/gtest_weak_hash_32.cpp | 2 +- src/Common/BinStringDecodeHelper.h | 2 +- src/Common/OpenTelemetryTraceContext.cpp | 2 +- src/Common/SymbolIndex.cpp | 2 +- src/Common/escapeForFileName.cpp | 2 +- src/Common/formatIPv6.cpp | 2 +- src/Common/formatIPv6.h | 2 +- src/Common/getHashOfLoadedBinary.cpp | 2 +- src/Common/getMappedArea.cpp | 2 +- src/Common/hex.cpp | 92 -------- src/Common/hex.h | 145 ------------ src/Common/interpolate.h | 20 -- src/Compression/CompressedReadBufferBase.cpp | 2 +- src/Compression/CompressionCodecMultiple.cpp | 2 +- src/Coordination/KeeperDispatcher.cpp | 2 +- src/Coordination/KeeperStorage.cpp | 2 +- src/Daemon/SentryWriter.cpp | 2 +- .../IO/CachedOnDiskReadBufferFromFile.cpp | 2 +- src/Disks/IO/ReadBufferFromRemoteFSGather.cpp | 2 +- src/Formats/BSONTypes.cpp | 2 +- src/Formats/verbosePrintString.cpp | 2 +- src/Functions/FunctionsCodingIP.cpp | 2 +- src/Functions/FunctionsCodingUUID.cpp | 2 +- src/Functions/URL/decodeURLComponent.cpp | 2 +- src/Functions/bitShiftRight.cpp | 2 +- src/Functions/decodeXMLComponent.cpp | 2 +- src/IO/HTTPChunkedReadBuffer.cpp | 2 +- src/IO/ReadHelpers.cpp | 2 +- src/IO/WriteHelpers.cpp | 2 +- src/IO/tests/gtest_hadoop_snappy_decoder.cpp | 2 +- src/Interpreters/Cache/FileCacheKey.h | 2 +- src/Interpreters/Cache/FileSegment.cpp | 2 +- src/Interpreters/InterpreterCreateQuery.cpp | 2 +- src/Interpreters/OpenTelemetrySpanLog.cpp | 2 +- .../tests/gtest_lru_file_cache.cpp | 2 +- src/Parsers/Access/ParserCreateUserQuery.cpp | 2 +- src/Server/KeeperTCPHandler.cpp | 2 +- .../Cache/ExternalDataSourceCache.cpp | 2 +- .../DistributedAsyncInsertDirectoryQueue.cpp | 2 +- src/Storages/LiveView/LiveViewSink.h | 2 +- src/Storages/LiveView/StorageLiveView.cpp | 2 +- .../MergeTree/MergeTreeDataMergerMutator.cpp | 2 +- .../MergeTree/MergeTreeDataPartChecksum.cpp | 2 +- src/Storages/MergeTree/MergeTreePartition.cpp | 2 +- .../PartMetadataManagerWithCache.cpp | 2 +- .../MergeTree/SimpleMergeSelector.cpp | 10 +- .../MaterializedPostgreSQLConsumer.cpp | 2 +- src/Storages/StorageReplicatedMergeTree.cpp | 2 +- src/Storages/System/StorageSystemParts.cpp | 2 +- .../System/StorageSystemProjectionParts.cpp | 2 +- utils/checksum-for-compressed-block/main.cpp | 2 +- utils/wikistat-loader/main.cpp | 2 +- 58 files changed, 284 insertions(+), 314 deletions(-) create mode 100644 base/base/hex.h create mode 100644 base/base/interpolate.h delete mode 100644 src/Common/hex.cpp delete mode 100644 src/Common/hex.h delete mode 100644 src/Common/interpolate.h diff --git a/base/base/hex.h b/base/base/hex.h new file mode 100644 index 00000000000..e0c57f9dd42 --- /dev/null +++ b/base/base/hex.h @@ -0,0 +1,214 @@ +#pragma once + +#include +#include "types.h" + +/// Maps 0..15 to 0..9A..F or 0..9a..f correspondingly. + +constexpr inline std::string_view hex_digit_to_char_uppercase_table = "0123456789ABCDEF"; +constexpr inline std::string_view hex_digit_to_char_lowercase_table = "0123456789abcdef"; + +constexpr char hexDigitUppercase(unsigned char c) +{ + return hex_digit_to_char_uppercase_table[c]; +} +constexpr char hexDigitLowercase(unsigned char c) +{ + return hex_digit_to_char_lowercase_table[c]; +} + +/// Maps 0..255 to 00..FF or 00..ff correspondingly + +constexpr inline std::string_view hex_byte_to_char_uppercase_table = // + "000102030405060708090A0B0C0D0E0F" + "101112131415161718191A1B1C1D1E1F" + "202122232425262728292A2B2C2D2E2F" + "303132333435363738393A3B3C3D3E3F" + "404142434445464748494A4B4C4D4E4F" + "505152535455565758595A5B5C5D5E5F" + "606162636465666768696A6B6C6D6E6F" + "707172737475767778797A7B7C7D7E7F" + "808182838485868788898A8B8C8D8E8F" + "909192939495969798999A9B9C9D9E9F" + "A0A1A2A3A4A5A6A7A8A9AAABACADAEAF" + "B0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF" + "C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF" + "D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF" + "E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF" + "F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF"; + +constexpr inline std::string_view hex_byte_to_char_lowercase_table = // + "000102030405060708090a0b0c0d0e0f" + "101112131415161718191a1b1c1d1e1f" + "202122232425262728292a2b2c2d2e2f" + "303132333435363738393a3b3c3d3e3f" + "404142434445464748494a4b4c4d4e4f" + "505152535455565758595a5b5c5d5e5f" + "606162636465666768696a6b6c6d6e6f" + "707172737475767778797a7b7c7d7e7f" + "808182838485868788898a8b8c8d8e8f" + "909192939495969798999a9b9c9d9e9f" + "a0a1a2a3a4a5a6a7a8a9aaabacadaeaf" + "b0b1b2b3b4b5b6b7b8b9babbbcbdbebf" + "c0c1c2c3c4c5c6c7c8c9cacbcccdcecf" + "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf" + "e0e1e2e3e4e5e6e7e8e9eaebecedeeef" + "f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff"; + +inline void writeHexByteUppercase(UInt8 byte, void * out) +{ + memcpy(out, &hex_byte_to_char_uppercase_table[static_cast(byte) * 2], 2); +} + +inline void writeHexByteLowercase(UInt8 byte, void * out) +{ + memcpy(out, &hex_byte_to_char_lowercase_table[static_cast(byte) * 2], 2); +} + +constexpr inline std::string_view bin_byte_to_char_table = // + "0000000000000001000000100000001100000100000001010000011000000111" + "0000100000001001000010100000101100001100000011010000111000001111" + "0001000000010001000100100001001100010100000101010001011000010111" + "0001100000011001000110100001101100011100000111010001111000011111" + "0010000000100001001000100010001100100100001001010010011000100111" + "0010100000101001001010100010101100101100001011010010111000101111" + "0011000000110001001100100011001100110100001101010011011000110111" + "0011100000111001001110100011101100111100001111010011111000111111" + "0100000001000001010000100100001101000100010001010100011001000111" + "0100100001001001010010100100101101001100010011010100111001001111" + "0101000001010001010100100101001101010100010101010101011001010111" + "0101100001011001010110100101101101011100010111010101111001011111" + "0110000001100001011000100110001101100100011001010110011001100111" + "0110100001101001011010100110101101101100011011010110111001101111" + "0111000001110001011100100111001101110100011101010111011001110111" + "0111100001111001011110100111101101111100011111010111111001111111" + "1000000010000001100000101000001110000100100001011000011010000111" + "1000100010001001100010101000101110001100100011011000111010001111" + "1001000010010001100100101001001110010100100101011001011010010111" + "1001100010011001100110101001101110011100100111011001111010011111" + "1010000010100001101000101010001110100100101001011010011010100111" + "1010100010101001101010101010101110101100101011011010111010101111" + "1011000010110001101100101011001110110100101101011011011010110111" + "1011100010111001101110101011101110111100101111011011111010111111" + "1100000011000001110000101100001111000100110001011100011011000111" + "1100100011001001110010101100101111001100110011011100111011001111" + "1101000011010001110100101101001111010100110101011101011011010111" + "1101100011011001110110101101101111011100110111011101111011011111" + "1110000011100001111000101110001111100100111001011110011011100111" + "1110100011101001111010101110101111101100111011011110111011101111" + "1111000011110001111100101111001111110100111101011111011011110111" + "1111100011111001111110101111101111111100111111011111111011111111"; + +inline void writeBinByte(UInt8 byte, void * out) +{ + memcpy(out, &bin_byte_to_char_table[static_cast(byte) * 8], 8); +} + +/// Produces hex representation of an unsigned int with leading zeros (for checksums) +template +inline void writeHexUIntImpl(TUInt uint_, char * out, std::string_view table) +{ + union + { + TUInt value; + UInt8 uint8[sizeof(TUInt)]; + }; + + value = uint_; + + for (size_t i = 0; i < sizeof(TUInt); ++i) + { + if constexpr (std::endian::native == std::endian::little) + memcpy(out + i * 2, &table[static_cast(uint8[sizeof(TUInt) - 1 - i]) * 2], 2); + else + memcpy(out + i * 2, &table[static_cast(uint8[i]) * 2], 2); + } +} + +template +inline void writeHexUIntUppercase(TUInt uint_, char * out) +{ + writeHexUIntImpl(uint_, out, hex_byte_to_char_uppercase_table); +} + +template +inline void writeHexUIntLowercase(TUInt uint_, char * out) +{ + writeHexUIntImpl(uint_, out, hex_byte_to_char_lowercase_table); +} + +template +std::string getHexUIntUppercase(TUInt uint_) +{ + std::string res(sizeof(TUInt) * 2, '\0'); + writeHexUIntUppercase(uint_, res.data()); + return res; +} + +template +std::string getHexUIntLowercase(TUInt uint_) +{ + std::string res(sizeof(TUInt) * 2, '\0'); + writeHexUIntLowercase(uint_, res.data()); + return res; +} + +/// Maps 0..9, A..F, a..f to 0..15. Other chars are mapped to implementation specific value. + +constexpr inline std::string_view hex_char_to_digit_table + = {"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" + "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" + "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" + "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\xff\xff\xff\xff\xff\xff" //0-9 + "\xff\x0a\x0b\x0c\x0d\x0e\x0f\xff\xff\xff\xff\xff\xff\xff\xff\xff" //A-Z + "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" + "\xff\x0a\x0b\x0c\x0d\x0e\x0f\xff\xff\xff\xff\xff\xff\xff\xff\xff" //a-z + "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" + "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" + "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" + "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" + "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" + "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" + "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" + "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" + "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff", + 256}; + +constexpr UInt8 unhex(char c) +{ + return hex_char_to_digit_table[static_cast(c)]; +} + +constexpr UInt8 unhex2(const char * data) +{ + return static_cast(unhex(data[0])) * 0x10 + static_cast(unhex(data[1])); +} + +constexpr UInt16 unhex4(const char * data) +{ + return static_cast(unhex(data[0])) * 0x1000 + static_cast(unhex(data[1])) * 0x100 + + static_cast(unhex(data[2])) * 0x10 + static_cast(unhex(data[3])); +} + +template +constexpr TUInt unhexUInt(const char * data) +{ + TUInt res = 0; + if constexpr ((sizeof(TUInt) <= 8) || ((sizeof(TUInt) % 8) != 0)) + { + for (size_t i = 0; i < sizeof(TUInt) * 2; ++i, ++data) + { + res <<= 4; + res += unhex(*data); + } + } + else + { + for (size_t i = 0; i < sizeof(TUInt) / 8; ++i, data += 16) + { + res <<= 64; + res += unhexUInt(data); + } + } + return res; +} diff --git a/base/base/interpolate.h b/base/base/interpolate.h new file mode 100644 index 00000000000..1d4fc0b6257 --- /dev/null +++ b/base/base/interpolate.h @@ -0,0 +1,13 @@ +#pragma once +#include +#include + +/** Linear interpolation in logarithmic coordinates. + * Exponential interpolation is related to linear interpolation + * exactly in same way as geometric mean is related to arithmetic mean. + */ +constexpr double interpolateExponential(double min, double max, double ratio) +{ + assert(min > 0 && ratio >= 0 && ratio <= 1); + return min * std::pow(max / min, ratio); +} diff --git a/programs/install/Install.cpp b/programs/install/Install.cpp index d568012bb26..80f3b0bbc63 100644 --- a/programs/install/Install.cpp +++ b/programs/install/Install.cpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/Backups/BackupCoordinationRemote.cpp b/src/Backups/BackupCoordinationRemote.cpp index c0fb4d5e066..8e43676f59c 100644 --- a/src/Backups/BackupCoordinationRemote.cpp +++ b/src/Backups/BackupCoordinationRemote.cpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include diff --git a/src/Backups/BackupImpl.cpp b/src/Backups/BackupImpl.cpp index b5f48a1a277..fb8abee814a 100644 --- a/src/Backups/BackupImpl.cpp +++ b/src/Backups/BackupImpl.cpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/Backups/IBackupCoordination.h b/src/Backups/IBackupCoordination.h index b75d856b50f..588a20d9eeb 100644 --- a/src/Backups/IBackupCoordination.h +++ b/src/Backups/IBackupCoordination.h @@ -2,7 +2,7 @@ #include #include -#include +#include #include diff --git a/src/Columns/tests/gtest_weak_hash_32.cpp b/src/Columns/tests/gtest_weak_hash_32.cpp index 5755cc3af72..cbf47790b9f 100644 --- a/src/Columns/tests/gtest_weak_hash_32.cpp +++ b/src/Columns/tests/gtest_weak_hash_32.cpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/src/Common/BinStringDecodeHelper.h b/src/Common/BinStringDecodeHelper.h index 513a4196b6f..df3e014cfad 100644 --- a/src/Common/BinStringDecodeHelper.h +++ b/src/Common/BinStringDecodeHelper.h @@ -1,6 +1,6 @@ #pragma once -#include +#include namespace DB { diff --git a/src/Common/OpenTelemetryTraceContext.cpp b/src/Common/OpenTelemetryTraceContext.cpp index b62822ceda2..df4ee6a34bf 100644 --- a/src/Common/OpenTelemetryTraceContext.cpp +++ b/src/Common/OpenTelemetryTraceContext.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/Common/SymbolIndex.cpp b/src/Common/SymbolIndex.cpp index 6f31009b1d2..f1cace5017c 100644 --- a/src/Common/SymbolIndex.cpp +++ b/src/Common/SymbolIndex.cpp @@ -1,7 +1,7 @@ #if defined(__ELF__) && !defined(OS_FREEBSD) #include -#include +#include #include #include diff --git a/src/Common/escapeForFileName.cpp b/src/Common/escapeForFileName.cpp index bcca04706dc..a1f9bff28d0 100644 --- a/src/Common/escapeForFileName.cpp +++ b/src/Common/escapeForFileName.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/Common/formatIPv6.cpp b/src/Common/formatIPv6.cpp index 7c027a23b4d..86e33beb7c3 100644 --- a/src/Common/formatIPv6.cpp +++ b/src/Common/formatIPv6.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include diff --git a/src/Common/formatIPv6.h b/src/Common/formatIPv6.h index 7b88f93750b..be4dfc7391e 100644 --- a/src/Common/formatIPv6.h +++ b/src/Common/formatIPv6.h @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include constexpr size_t IPV4_BINARY_LENGTH = 4; diff --git a/src/Common/getHashOfLoadedBinary.cpp b/src/Common/getHashOfLoadedBinary.cpp index da053750036..cc0ad0d2143 100644 --- a/src/Common/getHashOfLoadedBinary.cpp +++ b/src/Common/getHashOfLoadedBinary.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include static int callback(dl_phdr_info * info, size_t, void * data) diff --git a/src/Common/getMappedArea.cpp b/src/Common/getMappedArea.cpp index 573d3194f3d..4f40c604c6a 100644 --- a/src/Common/getMappedArea.cpp +++ b/src/Common/getMappedArea.cpp @@ -4,7 +4,7 @@ #if defined(OS_LINUX) #include -#include +#include #include #include diff --git a/src/Common/hex.cpp b/src/Common/hex.cpp deleted file mode 100644 index e8f9b981062..00000000000 --- a/src/Common/hex.cpp +++ /dev/null @@ -1,92 +0,0 @@ -#include - -const char * const hex_digit_to_char_uppercase_table = "0123456789ABCDEF"; -const char * const hex_digit_to_char_lowercase_table = "0123456789abcdef"; - -const char * const hex_byte_to_char_uppercase_table = - "000102030405060708090A0B0C0D0E0F" - "101112131415161718191A1B1C1D1E1F" - "202122232425262728292A2B2C2D2E2F" - "303132333435363738393A3B3C3D3E3F" - "404142434445464748494A4B4C4D4E4F" - "505152535455565758595A5B5C5D5E5F" - "606162636465666768696A6B6C6D6E6F" - "707172737475767778797A7B7C7D7E7F" - "808182838485868788898A8B8C8D8E8F" - "909192939495969798999A9B9C9D9E9F" - "A0A1A2A3A4A5A6A7A8A9AAABACADAEAF" - "B0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF" - "C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF" - "D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF" - "E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF" - "F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF"; - -const char * const hex_byte_to_char_lowercase_table = - "000102030405060708090a0b0c0d0e0f" - "101112131415161718191a1b1c1d1e1f" - "202122232425262728292a2b2c2d2e2f" - "303132333435363738393a3b3c3d3e3f" - "404142434445464748494a4b4c4d4e4f" - "505152535455565758595a5b5c5d5e5f" - "606162636465666768696a6b6c6d6e6f" - "707172737475767778797a7b7c7d7e7f" - "808182838485868788898a8b8c8d8e8f" - "909192939495969798999a9b9c9d9e9f" - "a0a1a2a3a4a5a6a7a8a9aaabacadaeaf" - "b0b1b2b3b4b5b6b7b8b9babbbcbdbebf" - "c0c1c2c3c4c5c6c7c8c9cacbcccdcecf" - "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf" - "e0e1e2e3e4e5e6e7e8e9eaebecedeeef" - "f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff"; - -const char * const hex_char_to_digit_table = - "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" - "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" - "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" - "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\xff\xff\xff\xff\xff\xff" //0-9 - "\xff\x0a\x0b\x0c\x0d\x0e\x0f\xff\xff\xff\xff\xff\xff\xff\xff\xff" //A-Z - "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" - "\xff\x0a\x0b\x0c\x0d\x0e\x0f\xff\xff\xff\xff\xff\xff\xff\xff\xff" //a-z - "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" - "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" - "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" - "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" - "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" - "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" - "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" - "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" - "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"; - -const char * const bin_byte_to_char_table = - "0000000000000001000000100000001100000100000001010000011000000111" - "0000100000001001000010100000101100001100000011010000111000001111" - "0001000000010001000100100001001100010100000101010001011000010111" - "0001100000011001000110100001101100011100000111010001111000011111" - "0010000000100001001000100010001100100100001001010010011000100111" - "0010100000101001001010100010101100101100001011010010111000101111" - "0011000000110001001100100011001100110100001101010011011000110111" - "0011100000111001001110100011101100111100001111010011111000111111" - "0100000001000001010000100100001101000100010001010100011001000111" - "0100100001001001010010100100101101001100010011010100111001001111" - "0101000001010001010100100101001101010100010101010101011001010111" - "0101100001011001010110100101101101011100010111010101111001011111" - "0110000001100001011000100110001101100100011001010110011001100111" - "0110100001101001011010100110101101101100011011010110111001101111" - "0111000001110001011100100111001101110100011101010111011001110111" - "0111100001111001011110100111101101111100011111010111111001111111" - "1000000010000001100000101000001110000100100001011000011010000111" - "1000100010001001100010101000101110001100100011011000111010001111" - "1001000010010001100100101001001110010100100101011001011010010111" - "1001100010011001100110101001101110011100100111011001111010011111" - "1010000010100001101000101010001110100100101001011010011010100111" - "1010100010101001101010101010101110101100101011011010111010101111" - "1011000010110001101100101011001110110100101101011011011010110111" - "1011100010111001101110101011101110111100101111011011111010111111" - "1100000011000001110000101100001111000100110001011100011011000111" - "1100100011001001110010101100101111001100110011011100111011001111" - "1101000011010001110100101101001111010100110101011101011011010111" - "1101100011011001110110101101101111011100110111011101111011011111" - "1110000011100001111000101110001111100100111001011110011011100111" - "1110100011101001111010101110101111101100111011011110111011101111" - "1111000011110001111100101111001111110100111101011111011011110111" - "1111100011111001111110101111101111111100111111011111111011111111"; diff --git a/src/Common/hex.h b/src/Common/hex.h deleted file mode 100644 index 062a6c27f76..00000000000 --- a/src/Common/hex.h +++ /dev/null @@ -1,145 +0,0 @@ -#pragma once -#include - - -/// Maps 0..15 to 0..9A..F or 0..9a..f correspondingly. - -extern const char * const hex_digit_to_char_uppercase_table; -extern const char * const hex_digit_to_char_lowercase_table; - -inline char hexDigitUppercase(unsigned char c) -{ - return hex_digit_to_char_uppercase_table[c]; -} - -inline char hexDigitLowercase(unsigned char c) -{ - return hex_digit_to_char_lowercase_table[c]; -} - - -#include -#include - -#include - - -/// Maps 0..255 to 00..FF or 00..ff correspondingly - -extern const char * const hex_byte_to_char_uppercase_table; -extern const char * const hex_byte_to_char_lowercase_table; - -inline void writeHexByteUppercase(UInt8 byte, void * out) -{ - memcpy(out, &hex_byte_to_char_uppercase_table[static_cast(byte) * 2], 2); -} - -inline void writeHexByteLowercase(UInt8 byte, void * out) -{ - memcpy(out, &hex_byte_to_char_lowercase_table[static_cast(byte) * 2], 2); -} - -extern const char * const bin_byte_to_char_table; - -inline void writeBinByte(UInt8 byte, void * out) -{ - memcpy(out, &bin_byte_to_char_table[static_cast(byte) * 8], 8); -} - -/// Produces hex representation of an unsigned int with leading zeros (for checksums) -template -inline void writeHexUIntImpl(TUInt uint_, char * out, const char * const table) -{ - union - { - TUInt value; - UInt8 uint8[sizeof(TUInt)]; - }; - - value = uint_; - - for (size_t i = 0; i < sizeof(TUInt); ++i) - { - if constexpr (std::endian::native == std::endian::little) - memcpy(out + i * 2, &table[static_cast(uint8[sizeof(TUInt) - 1 - i]) * 2], 2); - else - memcpy(out + i * 2, &table[static_cast(uint8[i]) * 2], 2); - } -} - -template -inline void writeHexUIntUppercase(TUInt uint_, char * out) -{ - writeHexUIntImpl(uint_, out, hex_byte_to_char_uppercase_table); -} - -template -inline void writeHexUIntLowercase(TUInt uint_, char * out) -{ - writeHexUIntImpl(uint_, out, hex_byte_to_char_lowercase_table); -} - -template -std::string getHexUIntUppercase(TUInt uint_) -{ - std::string res(sizeof(TUInt) * 2, '\0'); - writeHexUIntUppercase(uint_, res.data()); - return res; -} - -template -std::string getHexUIntLowercase(TUInt uint_) -{ - std::string res(sizeof(TUInt) * 2, '\0'); - writeHexUIntLowercase(uint_, res.data()); - return res; -} - - -/// Maps 0..9, A..F, a..f to 0..15. Other chars are mapped to implementation specific value. - -extern const char * const hex_char_to_digit_table; - -inline UInt8 unhex(char c) -{ - return hex_char_to_digit_table[static_cast(c)]; -} - -inline UInt8 unhex2(const char * data) -{ - return - static_cast(unhex(data[0])) * 0x10 - + static_cast(unhex(data[1])); -} - -inline UInt16 unhex4(const char * data) -{ - return - static_cast(unhex(data[0])) * 0x1000 - + static_cast(unhex(data[1])) * 0x100 - + static_cast(unhex(data[2])) * 0x10 - + static_cast(unhex(data[3])); -} - -template -TUInt unhexUInt(const char * data) -{ - TUInt res = 0; - if constexpr ((sizeof(TUInt) <= 8) || ((sizeof(TUInt) % 8) != 0)) - { - for (size_t i = 0; i < sizeof(TUInt) * 2; ++i, ++data) - { - res <<= 4; - res += unhex(*data); - } - } - else - { - for (size_t i = 0; i < sizeof(TUInt) / 8; ++i, data += 16) - { - res <<= 64; - res += unhexUInt(data); - } - } - return res; -} diff --git a/src/Common/interpolate.h b/src/Common/interpolate.h deleted file mode 100644 index 05900563b80..00000000000 --- a/src/Common/interpolate.h +++ /dev/null @@ -1,20 +0,0 @@ -#pragma once - -#include - - -inline double interpolateLinear(double min, double max, double ratio) -{ - return min + (max - min) * ratio; -} - - -/** It is linear interpolation in logarithmic coordinates. - * Exponential interpolation is related to linear interpolation - * exactly in same way as geometric mean is related to arithmetic mean. - * 'min' must be greater than zero, 'ratio' must be from 0 to 1. - */ -inline double interpolateExponential(double min, double max, double ratio) -{ - return min * std::pow(max / min, ratio); -} diff --git a/src/Compression/CompressedReadBufferBase.cpp b/src/Compression/CompressedReadBufferBase.cpp index ab856cc9801..3111f649b26 100644 --- a/src/Compression/CompressedReadBufferBase.cpp +++ b/src/Compression/CompressedReadBufferBase.cpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/Compression/CompressionCodecMultiple.cpp b/src/Compression/CompressionCodecMultiple.cpp index 5203e349317..dba67749e4d 100644 --- a/src/Compression/CompressionCodecMultiple.cpp +++ b/src/Compression/CompressionCodecMultiple.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include namespace DB diff --git a/src/Coordination/KeeperDispatcher.cpp b/src/Coordination/KeeperDispatcher.cpp index a6d16334924..2aa11dd9eed 100644 --- a/src/Coordination/KeeperDispatcher.cpp +++ b/src/Coordination/KeeperDispatcher.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/Coordination/KeeperStorage.cpp b/src/Coordination/KeeperStorage.cpp index 33b2a91d8bf..41a6af54204 100644 --- a/src/Coordination/KeeperStorage.cpp +++ b/src/Coordination/KeeperStorage.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/Daemon/SentryWriter.cpp b/src/Daemon/SentryWriter.cpp index 9f4f18e64d1..3c62e54b117 100644 --- a/src/Daemon/SentryWriter.cpp +++ b/src/Daemon/SentryWriter.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include "config.h" #include "config_version.h" diff --git a/src/Disks/IO/CachedOnDiskReadBufferFromFile.cpp b/src/Disks/IO/CachedOnDiskReadBufferFromFile.cpp index 44a719c82bb..72346787cfb 100644 --- a/src/Disks/IO/CachedOnDiskReadBufferFromFile.cpp +++ b/src/Disks/IO/CachedOnDiskReadBufferFromFile.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/Disks/IO/ReadBufferFromRemoteFSGather.cpp b/src/Disks/IO/ReadBufferFromRemoteFSGather.cpp index 43b6544acb0..8450e740ab5 100644 --- a/src/Disks/IO/ReadBufferFromRemoteFSGather.cpp +++ b/src/Disks/IO/ReadBufferFromRemoteFSGather.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/Formats/BSONTypes.cpp b/src/Formats/BSONTypes.cpp index 813c155325a..88396fd2aba 100644 --- a/src/Formats/BSONTypes.cpp +++ b/src/Formats/BSONTypes.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include namespace DB { diff --git a/src/Formats/verbosePrintString.cpp b/src/Formats/verbosePrintString.cpp index 2f3e09ed75f..5c6111c2929 100644 --- a/src/Formats/verbosePrintString.cpp +++ b/src/Formats/verbosePrintString.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include diff --git a/src/Functions/FunctionsCodingIP.cpp b/src/Functions/FunctionsCodingIP.cpp index a941092b7d6..4784368db9b 100644 --- a/src/Functions/FunctionsCodingIP.cpp +++ b/src/Functions/FunctionsCodingIP.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/Functions/FunctionsCodingUUID.cpp b/src/Functions/FunctionsCodingUUID.cpp index dade406c801..dd9170e44ad 100644 --- a/src/Functions/FunctionsCodingUUID.cpp +++ b/src/Functions/FunctionsCodingUUID.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/Functions/URL/decodeURLComponent.cpp b/src/Functions/URL/decodeURLComponent.cpp index 9e516e73e3c..7d98ccd63a0 100644 --- a/src/Functions/URL/decodeURLComponent.cpp +++ b/src/Functions/URL/decodeURLComponent.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff --git a/src/Functions/bitShiftRight.cpp b/src/Functions/bitShiftRight.cpp index 108847f13ed..21a0f7584aa 100644 --- a/src/Functions/bitShiftRight.cpp +++ b/src/Functions/bitShiftRight.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include namespace DB { diff --git a/src/Functions/decodeXMLComponent.cpp b/src/Functions/decodeXMLComponent.cpp index 8b84bb1194e..a25e67e0e37 100644 --- a/src/Functions/decodeXMLComponent.cpp +++ b/src/Functions/decodeXMLComponent.cpp @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include diff --git a/src/IO/HTTPChunkedReadBuffer.cpp b/src/IO/HTTPChunkedReadBuffer.cpp index b9c42088c41..65ccad4aab7 100644 --- a/src/IO/HTTPChunkedReadBuffer.cpp +++ b/src/IO/HTTPChunkedReadBuffer.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include #include diff --git a/src/IO/ReadHelpers.cpp b/src/IO/ReadHelpers.cpp index 86a2b9c650e..e14b3ae9129 100644 --- a/src/IO/ReadHelpers.cpp +++ b/src/IO/ReadHelpers.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include #include diff --git a/src/IO/WriteHelpers.cpp b/src/IO/WriteHelpers.cpp index caeea0a82a3..a0eceddc6f6 100644 --- a/src/IO/WriteHelpers.cpp +++ b/src/IO/WriteHelpers.cpp @@ -2,7 +2,7 @@ #include #include #include -#include +#include namespace DB diff --git a/src/IO/tests/gtest_hadoop_snappy_decoder.cpp b/src/IO/tests/gtest_hadoop_snappy_decoder.cpp index 4db0deac08e..2847c730735 100644 --- a/src/IO/tests/gtest_hadoop_snappy_decoder.cpp +++ b/src/IO/tests/gtest_hadoop_snappy_decoder.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include using namespace DB; TEST(HadoopSnappyDecoder, repeatNeedMoreInput) { diff --git a/src/Interpreters/Cache/FileCacheKey.h b/src/Interpreters/Cache/FileCacheKey.h index fed4c7f47e0..67e1466e2d4 100644 --- a/src/Interpreters/Cache/FileCacheKey.h +++ b/src/Interpreters/Cache/FileCacheKey.h @@ -1,6 +1,6 @@ #pragma once #include -#include +#include #include namespace DB diff --git a/src/Interpreters/Cache/FileSegment.cpp b/src/Interpreters/Cache/FileSegment.cpp index f4d7b2612a5..bd4554c6532 100644 --- a/src/Interpreters/Cache/FileSegment.cpp +++ b/src/Interpreters/Cache/FileSegment.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/Interpreters/InterpreterCreateQuery.cpp b/src/Interpreters/InterpreterCreateQuery.cpp index 29b7a4db609..c352280b7ed 100644 --- a/src/Interpreters/InterpreterCreateQuery.cpp +++ b/src/Interpreters/InterpreterCreateQuery.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/Interpreters/OpenTelemetrySpanLog.cpp b/src/Interpreters/OpenTelemetrySpanLog.cpp index 57d5c11ad97..63b8ae406a6 100644 --- a/src/Interpreters/OpenTelemetrySpanLog.cpp +++ b/src/Interpreters/OpenTelemetrySpanLog.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include diff --git a/src/Interpreters/tests/gtest_lru_file_cache.cpp b/src/Interpreters/tests/gtest_lru_file_cache.cpp index 93faafb5cea..62aef2441d6 100644 --- a/src/Interpreters/tests/gtest_lru_file_cache.cpp +++ b/src/Interpreters/tests/gtest_lru_file_cache.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/Parsers/Access/ParserCreateUserQuery.cpp b/src/Parsers/Access/ParserCreateUserQuery.cpp index de83c5760c1..c1d0691d305 100644 --- a/src/Parsers/Access/ParserCreateUserQuery.cpp +++ b/src/Parsers/Access/ParserCreateUserQuery.cpp @@ -17,7 +17,7 @@ #include #include #include "config.h" -#include +#include #if USE_SSL # include # include diff --git a/src/Server/KeeperTCPHandler.cpp b/src/Server/KeeperTCPHandler.cpp index 0853c6ee62b..f9e11062906 100644 --- a/src/Server/KeeperTCPHandler.cpp +++ b/src/Server/KeeperTCPHandler.cpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include #ifdef POCO_HAVE_FD_EPOLL diff --git a/src/Storages/Cache/ExternalDataSourceCache.cpp b/src/Storages/Cache/ExternalDataSourceCache.cpp index 56b2e661836..1fc68a2d774 100644 --- a/src/Storages/Cache/ExternalDataSourceCache.cpp +++ b/src/Storages/Cache/ExternalDataSourceCache.cpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp b/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp index c6f675533c6..b47028b883a 100644 --- a/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp +++ b/src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/Storages/LiveView/LiveViewSink.h b/src/Storages/LiveView/LiveViewSink.h index 1d90e35618f..e163400f2af 100644 --- a/src/Storages/LiveView/LiveViewSink.h +++ b/src/Storages/LiveView/LiveViewSink.h @@ -3,7 +3,7 @@ #include #include #include -#include +#include namespace DB diff --git a/src/Storages/LiveView/StorageLiveView.cpp b/src/Storages/LiveView/StorageLiveView.cpp index 547becf3837..b24f5fb2c63 100644 --- a/src/Storages/LiveView/StorageLiveView.cpp +++ b/src/Storages/LiveView/StorageLiveView.cpp @@ -27,7 +27,7 @@ limitations under the License. */ #include #include #include -#include +#include #include #include diff --git a/src/Storages/MergeTree/MergeTreeDataMergerMutator.cpp b/src/Storages/MergeTree/MergeTreeDataMergerMutator.cpp index 0d123623f05..cf009a10c27 100644 --- a/src/Storages/MergeTree/MergeTreeDataMergerMutator.cpp +++ b/src/Storages/MergeTree/MergeTreeDataMergerMutator.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/Storages/MergeTree/MergeTreeDataPartChecksum.cpp b/src/Storages/MergeTree/MergeTreeDataPartChecksum.cpp index 8f4d066baa3..7a0b1d03e79 100644 --- a/src/Storages/MergeTree/MergeTreeDataPartChecksum.cpp +++ b/src/Storages/MergeTree/MergeTreeDataPartChecksum.cpp @@ -1,6 +1,6 @@ #include "MergeTreeDataPartChecksum.h" #include -#include +#include #include #include #include diff --git a/src/Storages/MergeTree/MergeTreePartition.cpp b/src/Storages/MergeTree/MergeTreePartition.cpp index 3a6908ef32d..3b28012e7d6 100644 --- a/src/Storages/MergeTree/MergeTreePartition.cpp +++ b/src/Storages/MergeTree/MergeTreePartition.cpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include diff --git a/src/Storages/MergeTree/PartMetadataManagerWithCache.cpp b/src/Storages/MergeTree/PartMetadataManagerWithCache.cpp index b6260d5edb6..3a53cf25745 100644 --- a/src/Storages/MergeTree/PartMetadataManagerWithCache.cpp +++ b/src/Storages/MergeTree/PartMetadataManagerWithCache.cpp @@ -1,7 +1,7 @@ #include "PartMetadataManagerWithCache.h" #if USE_ROCKSDB -#include +#include #include #include #include diff --git a/src/Storages/MergeTree/SimpleMergeSelector.cpp b/src/Storages/MergeTree/SimpleMergeSelector.cpp index 15291622a2a..af3373fd175 100644 --- a/src/Storages/MergeTree/SimpleMergeSelector.cpp +++ b/src/Storages/MergeTree/SimpleMergeSelector.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include #include @@ -28,7 +28,7 @@ struct Estimator { double difference = std::abs(log2(static_cast(sum_size) / size_prev_at_left)); if (difference < settings.heuristic_to_align_parts_max_absolute_difference_in_powers_of_two) - current_score *= interpolateLinear(settings.heuristic_to_align_parts_max_score_adjustment, 1, + current_score *= std::lerp(settings.heuristic_to_align_parts_max_score_adjustment, 1, difference / settings.heuristic_to_align_parts_max_absolute_difference_in_powers_of_two); } @@ -115,8 +115,8 @@ bool allow( // std::cerr << "size_normalized: " << size_normalized << "\n"; /// Calculate boundaries for age - double min_age_to_lower_base = interpolateLinear(settings.min_age_to_lower_base_at_min_size, settings.min_age_to_lower_base_at_max_size, size_normalized); - double max_age_to_lower_base = interpolateLinear(settings.max_age_to_lower_base_at_min_size, settings.max_age_to_lower_base_at_max_size, size_normalized); + double min_age_to_lower_base = std::lerp(settings.min_age_to_lower_base_at_min_size, settings.min_age_to_lower_base_at_max_size, size_normalized); + double max_age_to_lower_base = std::lerp(settings.max_age_to_lower_base_at_min_size, settings.max_age_to_lower_base_at_max_size, size_normalized); // std::cerr << "min_age_to_lower_base: " << min_age_to_lower_base << "\n"; // std::cerr << "max_age_to_lower_base: " << max_age_to_lower_base << "\n"; @@ -137,7 +137,7 @@ bool allow( // std::cerr << "combined_ratio: " << combined_ratio << "\n"; - double lowered_base = interpolateLinear(settings.base, 2.0, combined_ratio); + double lowered_base = std::lerp(settings.base, 2.0, combined_ratio); // std::cerr << "------- lowered_base: " << lowered_base << "\n"; diff --git a/src/Storages/PostgreSQL/MaterializedPostgreSQLConsumer.cpp b/src/Storages/PostgreSQL/MaterializedPostgreSQLConsumer.cpp index 9c6eeceb605..d048c94ac75 100644 --- a/src/Storages/PostgreSQL/MaterializedPostgreSQLConsumer.cpp +++ b/src/Storages/PostgreSQL/MaterializedPostgreSQLConsumer.cpp @@ -2,7 +2,7 @@ #include "StorageMaterializedPostgreSQL.h" #include -#include +#include #include #include #include diff --git a/src/Storages/StorageReplicatedMergeTree.cpp b/src/Storages/StorageReplicatedMergeTree.cpp index 54ae8aa5a7b..4c0aced0b48 100644 --- a/src/Storages/StorageReplicatedMergeTree.cpp +++ b/src/Storages/StorageReplicatedMergeTree.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/Storages/System/StorageSystemParts.cpp b/src/Storages/System/StorageSystemParts.cpp index f6854e7d5d0..86ecb336b51 100644 --- a/src/Storages/System/StorageSystemParts.cpp +++ b/src/Storages/System/StorageSystemParts.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/Storages/System/StorageSystemProjectionParts.cpp b/src/Storages/System/StorageSystemProjectionParts.cpp index 37c62ba5eb0..d2c6c3ef287 100644 --- a/src/Storages/System/StorageSystemProjectionParts.cpp +++ b/src/Storages/System/StorageSystemProjectionParts.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include namespace DB { diff --git a/utils/checksum-for-compressed-block/main.cpp b/utils/checksum-for-compressed-block/main.cpp index 27a2154340e..4f9923e7638 100644 --- a/utils/checksum-for-compressed-block/main.cpp +++ b/utils/checksum-for-compressed-block/main.cpp @@ -2,7 +2,7 @@ #include #include #include -#include +#include /** A tool to easily prove if "Checksum doesn't match: corrupted data" diff --git a/utils/wikistat-loader/main.cpp b/utils/wikistat-loader/main.cpp index 31ade014c74..493f1df05da 100644 --- a/utils/wikistat-loader/main.cpp +++ b/utils/wikistat-loader/main.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include #include #include From 429696b575a1eaa4d2206a7b0cd7d925060cc6c6 Mon Sep 17 00:00:00 2001 From: Dmitry Novik Date: Tue, 7 Mar 2023 22:57:47 +0000 Subject: [PATCH 602/841] Update reference file --- .../00173_group_by_use_nulls.reference | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/queries/1_stateful/00173_group_by_use_nulls.reference b/tests/queries/1_stateful/00173_group_by_use_nulls.reference index 02723bf14dd..e82b996ad3c 100644 --- a/tests/queries/1_stateful/00173_group_by_use_nulls.reference +++ b/tests/queries/1_stateful/00173_group_by_use_nulls.reference @@ -8,3 +8,25 @@ 59183 1336 33010362 1336 800784 1336 +-- { echoOn } +set allow_experimental_analyzer = 1; +SELECT + CounterID AS k, + quantileBFloat16(0.5)(ResolutionWidth) +FROM remote('127.0.0.{1,2}', test, hits) +GROUP BY k +ORDER BY + count() DESC, + CounterID ASC +LIMIT 10 +SETTINGS group_by_use_nulls = 1; +1704509 1384 +732797 1336 +598875 1384 +792887 1336 +3807842 1336 +25703952 1336 +716829 1384 +59183 1336 +33010362 1336 +800784 1336 From f5cf039190d547f52d718b2a16403ce8eecad8ab Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Tue, 7 Mar 2023 21:27:27 +0100 Subject: [PATCH 603/841] check if a symlink exists more carefully --- src/Common/filesystemHelpers.cpp | 8 ++++++++ src/Common/filesystemHelpers.h | 1 + src/Databases/DatabaseAtomic.cpp | 3 +++ 3 files changed, 12 insertions(+) diff --git a/src/Common/filesystemHelpers.cpp b/src/Common/filesystemHelpers.cpp index 6e1b5573bef..eabc7bdafbb 100644 --- a/src/Common/filesystemHelpers.cpp +++ b/src/Common/filesystemHelpers.cpp @@ -383,6 +383,14 @@ bool isSymlink(const fs::path & path) return fs::is_symlink(path); /// STYLE_CHECK_ALLOW_STD_FS_SYMLINK } +bool isSymlinkNoThrow(const fs::path & path) +{ + std::error_code dummy; + if (path.filename().empty()) + return fs::is_symlink(path.parent_path(), dummy); /// STYLE_CHECK_ALLOW_STD_FS_SYMLINK + return fs::is_symlink(path, dummy); /// STYLE_CHECK_ALLOW_STD_FS_SYMLINK +} + fs::path readSymlink(const fs::path & path) { /// See the comment for isSymlink diff --git a/src/Common/filesystemHelpers.h b/src/Common/filesystemHelpers.h index 14ee5f54322..8591cd6cf92 100644 --- a/src/Common/filesystemHelpers.h +++ b/src/Common/filesystemHelpers.h @@ -95,6 +95,7 @@ void setModificationTime(const std::string & path, time_t time); time_t getChangeTime(const std::string & path); bool isSymlink(const fs::path & path); +bool isSymlinkNoThrow(const fs::path & path); fs::path readSymlink(const fs::path & path); } diff --git a/src/Databases/DatabaseAtomic.cpp b/src/Databases/DatabaseAtomic.cpp index 34c4fd3d5d8..d8e746f01f9 100644 --- a/src/Databases/DatabaseAtomic.cpp +++ b/src/Databases/DatabaseAtomic.cpp @@ -509,6 +509,9 @@ void DatabaseAtomic::tryCreateMetadataSymlink() { try { + /// fs::exists could return false for broken symlink + if (FS::isSymlinkNoThrow(metadata_symlink)) + fs::remove(metadata_symlink); fs::create_directory_symlink(metadata_path, path_to_metadata_symlink); } catch (...) From 51edcf232cf2962d51d57f808ab6cea42e28327d Mon Sep 17 00:00:00 2001 From: Nikolay Degterinsky Date: Wed, 8 Mar 2023 00:52:58 +0000 Subject: [PATCH 604/841] Add support for big int types to runningDifference() function --- src/Functions/runningDifference.h | 10 +++++++- .../queries/0_stateless/00534_filimonov.data | 8 +++++++ .../00653_running_difference.reference | 24 +++++++++++++++++++ .../0_stateless/00653_running_difference.sql | 8 +++++++ 4 files changed, 49 insertions(+), 1 deletion(-) diff --git a/src/Functions/runningDifference.h b/src/Functions/runningDifference.h index 154370d4cd9..f1ec4f9e523 100644 --- a/src/Functions/runningDifference.h +++ b/src/Functions/runningDifference.h @@ -70,7 +70,7 @@ private: if (!has_prev_value) { - dst[i] = is_first_line_zero ? 0 : src[i]; + dst[i] = is_first_line_zero ? static_cast(0) : static_cast(src[i]); prev = src[i]; has_prev_value = true; } @@ -102,6 +102,10 @@ private: f(UInt32()); else if (which.isUInt64()) f(UInt64()); + else if (which.isUInt128()) + f(UInt128()); + else if (which.isUInt256()) + f(UInt256()); else if (which.isInt8()) f(Int8()); else if (which.isInt16()) @@ -110,6 +114,10 @@ private: f(Int32()); else if (which.isInt64()) f(Int64()); + else if (which.isInt128()) + f(Int128()); + else if (which.isInt256()) + f(Int256()); else if (which.isFloat32()) f(Float32()); else if (which.isFloat64()) diff --git a/tests/queries/0_stateless/00534_filimonov.data b/tests/queries/0_stateless/00534_filimonov.data index 911a8e4d1f3..eb4500877e5 100644 --- a/tests/queries/0_stateless/00534_filimonov.data +++ b/tests/queries/0_stateless/00534_filimonov.data @@ -276,10 +276,14 @@ SELECT runningDifference(CAST( 0 AS Nullable(Int8))); SELECT runningDifference(CAST( 0 AS Nullable(Int16))); SELECT runningDifference(CAST( 0 AS Nullable(Int32))); SELECT runningDifference(CAST( 0 AS Nullable(Int64))); +SELECT runningDifference(CAST( 0 AS Nullable(Int128))); +SELECT runningDifference(CAST( 0 AS Nullable(Int256))); SELECT runningDifference(CAST( 0 AS Nullable(UInt8))); SELECT runningDifference(CAST( 0 AS Nullable(UInt16))); SELECT runningDifference(CAST( 0 AS Nullable(UInt32))); SELECT runningDifference(CAST( 0 AS Nullable(UInt64))); +SELECT runningDifference(CAST( 0 AS Nullable(UInt128))); +SELECT runningDifference(CAST( 0 AS Nullable(UInt256))); SELECT runningDifference(CAST( 0 AS Nullable(Float32))); SELECT runningDifference(CAST( 0 AS Nullable(Float64))); SELECT runningDifference(CAST( 0 AS Nullable(Date))); @@ -288,10 +292,14 @@ SELECT runningDifference(CAST(NULL AS Nullable(Int8))); SELECT runningDifference(CAST(NULL AS Nullable(Int16))); SELECT runningDifference(CAST(NULL AS Nullable(Int32))); SELECT runningDifference(CAST(NULL AS Nullable(Int64))); +SELECT runningDifference(CAST(NULL AS Nullable(Int128))); +SELECT runningDifference(CAST(NULL AS Nullable(Int256))); SELECT runningDifference(CAST(NULL AS Nullable(UInt8))); SELECT runningDifference(CAST(NULL AS Nullable(UInt16))); SELECT runningDifference(CAST(NULL AS Nullable(UInt32))); SELECT runningDifference(CAST(NULL AS Nullable(UInt64))); +SELECT runningDifference(CAST(NULL AS Nullable(UInt128))); +SELECT runningDifference(CAST(NULL AS Nullable(UInt256)); SELECT runningDifference(CAST(NULL AS Nullable(Float32))); SELECT runningDifference(CAST(NULL AS Nullable(Float64))); SELECT runningDifference(CAST(NULL AS Nullable(Date))); diff --git a/tests/queries/0_stateless/00653_running_difference.reference b/tests/queries/0_stateless/00653_running_difference.reference index e2833e0bb3e..624ce92ce0f 100644 --- a/tests/queries/0_stateless/00653_running_difference.reference +++ b/tests/queries/0_stateless/00653_running_difference.reference @@ -19,6 +19,30 @@ \N \N 2 +- +0 +1 +4 +5 +170141183460469231731687303715884105717 +- +0 +1 +4 +5 +170141183460469231731687303715884105718 +- +0 +1 +4 +5 +170141183460469231731687303715884105717 +- +0 +1 +4 +5 +170141183460469231731687303715884105718 --Date Difference-- \N \N diff --git a/tests/queries/0_stateless/00653_running_difference.sql b/tests/queries/0_stateless/00653_running_difference.sql index f2b4a7300b2..1f18cfc42a7 100644 --- a/tests/queries/0_stateless/00653_running_difference.sql +++ b/tests/queries/0_stateless/00653_running_difference.sql @@ -5,6 +5,14 @@ select '-'; select runningDifference(x) from (select arrayJoin([Null, 1]) as x); select '-'; select runningDifference(x) from (select arrayJoin([Null, Null, 1, 3, Null, Null, 5]) as x); +select '-'; +select runningDifference(x) from (select arrayJoin([0, 1, 5, 10, 170141183460469231731687303715884105727]::Array(UInt128)) as x); +select '-'; +select runningDifference(x) from (select arrayJoin([0, 1, 5, 10, 170141183460469231731687303715884105728]::Array(UInt256)) as x); +select '-'; +select runningDifference(x) from (select arrayJoin([0, 1, 5, 10, 170141183460469231731687303715884105727]::Array(Int128)) as x); +select '-'; +select runningDifference(x) from (select arrayJoin([0, 1, 5, 10, 170141183460469231731687303715884105728]::Array(Int256)) as x); select '--Date Difference--'; select runningDifference(x) from (select arrayJoin([Null, Null, toDate('1970-1-1'), toDate('1970-12-31'), Null, Null, toDate('2010-8-9')]) as x); select '-'; From 927efc0f2c0e164a2884c0d2ec087fa7dfbae7c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=5B=EB=8D=B0=EC=9D=B4=ED=84=B0=ED=94=8C=EB=9E=AB=ED=8F=BC?= =?UTF-8?q?=ED=8C=80=5D=20=EC=9D=B4=ED=98=B8=EC=84=A0?= Date: Wed, 8 Mar 2023 14:01:38 +0900 Subject: [PATCH 605/841] Fix git clone command. Insert space in front of shallow option. --- docs/en/development/developer-instruction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/development/developer-instruction.md b/docs/en/development/developer-instruction.md index b46cc10f99d..ace5ab79bb4 100644 --- a/docs/en/development/developer-instruction.md +++ b/docs/en/development/developer-instruction.md @@ -67,7 +67,7 @@ It generally means that the SSH keys for connecting to GitHub are missing. These You can also clone the repository via https protocol: - git clone --recursive--shallow-submodules https://github.com/ClickHouse/ClickHouse.git + git clone --recursive --shallow-submodules https://github.com/ClickHouse/ClickHouse.git This, however, will not let you send your changes to the server. You can still use it temporarily and add the SSH keys later replacing the remote address of the repository with `git remote` command. From ce809e61fb18eb6b05105ffe2fef03124996ba75 Mon Sep 17 00:00:00 2001 From: Hosun Lee Date: Wed, 8 Mar 2023 14:09:18 +0900 Subject: [PATCH 606/841] Revert commit. --- docs/en/development/developer-instruction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/development/developer-instruction.md b/docs/en/development/developer-instruction.md index ace5ab79bb4..94834f41999 100644 --- a/docs/en/development/developer-instruction.md +++ b/docs/en/development/developer-instruction.md @@ -39,7 +39,7 @@ Next, you need to download the source files onto your working machine. This is c In the command line terminal run: - git clone --recursive --shallow-submodules git@github.com:your_github_username/ClickHouse.git + git clone --recursive--shallow-submodules git@github.com:your_github_username/ClickHouse.git cd ClickHouse Note: please, substitute *your_github_username* with what is appropriate! From aae82a73aa7ae838cdbecda5f1a305186de2fd47 Mon Sep 17 00:00:00 2001 From: Hosun Lee Date: Wed, 8 Mar 2023 14:10:12 +0900 Subject: [PATCH 607/841] Fix git clone command. Insert space in front of shallow option. --- docs/en/development/developer-instruction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/development/developer-instruction.md b/docs/en/development/developer-instruction.md index 94834f41999..ace5ab79bb4 100644 --- a/docs/en/development/developer-instruction.md +++ b/docs/en/development/developer-instruction.md @@ -39,7 +39,7 @@ Next, you need to download the source files onto your working machine. This is c In the command line terminal run: - git clone --recursive--shallow-submodules git@github.com:your_github_username/ClickHouse.git + git clone --recursive --shallow-submodules git@github.com:your_github_username/ClickHouse.git cd ClickHouse Note: please, substitute *your_github_username* with what is appropriate! From 7966c114bdbbc97f98430a44f83c41c7bfcc0d9f Mon Sep 17 00:00:00 2001 From: Yakov Olkhovskiy Date: Wed, 8 Mar 2023 05:40:10 +0000 Subject: [PATCH 608/841] analyzer - fix combine logic for limit expression and limit setting --- src/Analyzer/QueryTreeBuilder.cpp | 53 +++++++++++++++++++++++++------ 1 file changed, 44 insertions(+), 9 deletions(-) diff --git a/src/Analyzer/QueryTreeBuilder.cpp b/src/Analyzer/QueryTreeBuilder.cpp index c7b9f9aae08..ed956071d5a 100644 --- a/src/Analyzer/QueryTreeBuilder.cpp +++ b/src/Analyzer/QueryTreeBuilder.cpp @@ -355,21 +355,56 @@ QueryTreeNodePtr QueryTreeBuilder::buildSelectExpression(const ASTPtr & select_q if (select_limit_by) current_query_tree->getLimitByNode() = buildExpressionList(select_limit_by, current_context); - /// Combine limit expression with limit setting + /// Combine limit expression with limit and offset settings into final limit expression + /// select_limit - limit expression + /// limit - limit setting + /// offset - offset setting + /// + /// if select_limit + /// -- if offset >= select_limit (expr 0) + /// then (0) (0 rows) + /// -- else if limit > 0 (expr 1) + /// then min(select_limit - offset, limit) (expr 2) + /// -- else + /// then (select_limit - offset) (expr 3) + /// else if limit > 0 + /// then limit + /// + /// offset = offset + of_expr auto select_limit = select_query_typed.limitLength(); - if (select_limit && limit) + if (select_limit) { - auto function_node = std::make_shared("least"); - function_node->getArguments().getNodes().push_back(buildExpression(select_limit, current_context)); - function_node->getArguments().getNodes().push_back(std::make_shared(limit)); + /// expr 3 + auto expr_3 = std::make_shared("minus"); + expr_3->getArguments().getNodes().push_back(buildExpression(select_limit, current_context)); + expr_3->getArguments().getNodes().push_back(std::make_shared(offset)); + + /// expr 2 + auto expr_2 = std::make_shared("least"); + expr_2->getArguments().getNodes().push_back(expr_3->clone()); + expr_2->getArguments().getNodes().push_back(std::make_shared(limit)); + + /// expr 0 + auto expr_0 = std::make_shared("greaterOrEquals"); + expr_0->getArguments().getNodes().push_back(std::make_shared(offset)); + expr_0->getArguments().getNodes().push_back(buildExpression(select_limit, current_context)); + + /// expr 1 + auto expr_1 = std::make_shared(limit > 0); + + auto function_node = std::make_shared("multiIf"); + function_node->getArguments().getNodes().push_back(expr_0); + function_node->getArguments().getNodes().push_back(std::make_shared(0)); + function_node->getArguments().getNodes().push_back(expr_1); + function_node->getArguments().getNodes().push_back(expr_2); + function_node->getArguments().getNodes().push_back(expr_3); + current_query_tree->getLimit() = std::move(function_node); } - else if (limit) + else if (limit > 0) current_query_tree->getLimit() = std::make_shared(limit); - else if (select_limit) - current_query_tree->getLimit() = buildExpression(select_limit, current_context); - /// Combine offset expression with offset setting + /// Combine offset expression with offset setting into final offset expression auto select_offset = select_query_typed.limitOffset(); if (select_offset && offset) { From 036fb0b9efb6d8aef2bc2837fc6696f8ca39c4e2 Mon Sep 17 00:00:00 2001 From: Yakov Olkhovskiy Date: Wed, 8 Mar 2023 05:52:04 +0000 Subject: [PATCH 609/841] analyzer - add test --- .../02676_analyzer_limit_offset.reference | 63 +++++++++++++++++++ .../02676_analyzer_limit_offset.sql | 34 ++++++++++ 2 files changed, 97 insertions(+) create mode 100644 tests/queries/0_stateless/02676_analyzer_limit_offset.reference create mode 100644 tests/queries/0_stateless/02676_analyzer_limit_offset.sql diff --git a/tests/queries/0_stateless/02676_analyzer_limit_offset.reference b/tests/queries/0_stateless/02676_analyzer_limit_offset.reference new file mode 100644 index 00000000000..96483268d43 --- /dev/null +++ b/tests/queries/0_stateless/02676_analyzer_limit_offset.reference @@ -0,0 +1,63 @@ +0 +1 +2 +3 +4 +15 +15 +16 +16 +17 +30 +30 +31 +31 +32 +102 +103 +104 +105 +105 +106 +107 +108 +109 +105 +106 +107 +108 +109 +60 +60 +61 +61 +62 +62 +63 +63 +64 +64 +60 +35 +35 +36 +36 +37 +37 +38 +38 +39 +39 +105 +106 +107 +108 +109 +12 +13 +13 +14 +14 +15 +15 +16 diff --git a/tests/queries/0_stateless/02676_analyzer_limit_offset.sql b/tests/queries/0_stateless/02676_analyzer_limit_offset.sql new file mode 100644 index 00000000000..39c6b85f088 --- /dev/null +++ b/tests/queries/0_stateless/02676_analyzer_limit_offset.sql @@ -0,0 +1,34 @@ +set allow_experimental_analyzer=1; + +DROP TABLE IF EXISTS test; +CREATE TABLE test (i UInt64) Engine = MergeTree() order by i; +INSERT INTO test SELECT number FROM numbers(100); +INSERT INTO test SELECT number FROM numbers(10,100); +OPTIMIZE TABLE test FINAL; + +-- Only set limit +SET limit = 5; +SELECT * FROM test; -- 5 rows +SELECT * FROM test OFFSET 20; -- 5 rows +SELECT * FROM (SELECT i FROM test LIMIT 10 OFFSET 50) TMP; -- 5 rows +SELECT * FROM test LIMIT 4 OFFSET 192; -- 4 rows +SELECT * FROM test LIMIT 10 OFFSET 195; -- 5 rows + +-- Only set offset +SET limit = 0; +SET offset = 195; +SELECT * FROM test; -- 5 rows +SELECT * FROM test OFFSET 20; -- no result +SELECT * FROM test LIMIT 100; -- no result +SET offset = 10; +SELECT * FROM test LIMIT 20 OFFSET 100; -- 10 rows +SELECT * FROM test LIMIT 11 OFFSET 100; -- 1 rows + +-- offset and limit together +SET limit = 10; +SELECT * FROM test LIMIT 50 OFFSET 50; -- 10 rows +SELECT * FROM test LIMIT 50 OFFSET 190; -- 0 rows +SELECT * FROM test LIMIT 50 OFFSET 185; -- 5 rows +SELECT * FROM test LIMIT 18 OFFSET 5; -- 8 rows + +DROP TABLE test; From 31b7e6edc64689d1d682506530a426c8f06ae1b6 Mon Sep 17 00:00:00 2001 From: Vitaly Baranov Date: Tue, 7 Mar 2023 21:21:59 +0100 Subject: [PATCH 610/841] Keep subscriptions for all enabled roles. --- src/Access/EnabledRoles.h | 5 +-- src/Access/RoleCache.cpp | 71 +++++++++++++++++++++++++-------------- src/Access/RoleCache.h | 24 ++++++++++--- 3 files changed, 67 insertions(+), 33 deletions(-) diff --git a/src/Access/EnabledRoles.h b/src/Access/EnabledRoles.h index e0d773db343..5de76abe409 100644 --- a/src/Access/EnabledRoles.h +++ b/src/Access/EnabledRoles.h @@ -44,10 +44,11 @@ private: friend class RoleCache; explicit EnabledRoles(const Params & params_); - void setRolesInfo(const std::shared_ptr & info_, scope_guard * notifications); - const Params params; + /// Called by RoleCache to store `EnabledRolesInfo` in this `EnabledRoles` after the calculation is done. + void setRolesInfo(const std::shared_ptr & info_, scope_guard * notifications); + std::shared_ptr info; mutable std::mutex info_mutex; diff --git a/src/Access/RoleCache.cpp b/src/Access/RoleCache.cpp index 7a8c13636d2..bfc6200929d 100644 --- a/src/Access/RoleCache.cpp +++ b/src/Access/RoleCache.cpp @@ -57,7 +57,9 @@ namespace RoleCache::RoleCache(const AccessControl & access_control_) - : access_control(access_control_), cache(600000 /* 10 minutes */) {} + : access_control(access_control_), cache(600000 /* 10 minutes */) +{ +} RoleCache::~RoleCache() = default; @@ -70,18 +72,18 @@ RoleCache::getEnabledRoles(const std::vector & roles, const std::vectorsecond.lock(); - if (from_cache) - return from_cache; - enabled_roles.erase(it); + if (auto enabled_roles = it->second.enabled_roles.lock()) + return enabled_roles; + enabled_roles_by_params.erase(it); } auto res = std::shared_ptr(new EnabledRoles(params)); - collectEnabledRoles(*res, nullptr); - enabled_roles.emplace(std::move(params), res); + SubscriptionsOnRoles subscriptions_on_roles; + collectEnabledRoles(*res, subscriptions_on_roles, nullptr); + enabled_roles_by_params.emplace(std::move(params), EnabledRolesWithSubscriptions{res, std::move(subscriptions_on_roles)}); return res; } @@ -90,21 +92,23 @@ void RoleCache::collectEnabledRoles(scope_guard * notifications) { /// `mutex` is already locked. - for (auto i = enabled_roles.begin(), e = enabled_roles.end(); i != e;) + for (auto i = enabled_roles_by_params.begin(), e = enabled_roles_by_params.end(); i != e;) { - auto elem = i->second.lock(); - if (!elem) - i = enabled_roles.erase(i); + auto & item = i->second; + if (auto enabled_roles = item.enabled_roles.lock()) + { + collectEnabledRoles(*enabled_roles, item.subscriptions_on_roles, notifications); + ++i; + } else { - collectEnabledRoles(*elem, notifications); - ++i; + i = enabled_roles_by_params.erase(i); } } } -void RoleCache::collectEnabledRoles(EnabledRoles & enabled, scope_guard * notifications) +void RoleCache::collectEnabledRoles(EnabledRoles & enabled_roles, SubscriptionsOnRoles & subscriptions_on_roles, scope_guard * notifications) { /// `mutex` is already locked. @@ -112,43 +116,57 @@ void RoleCache::collectEnabledRoles(EnabledRoles & enabled, scope_guard * notifi auto new_info = std::make_shared(); boost::container::flat_set skip_ids; - auto get_role_function = [this](const UUID & id) { return getRole(id); }; + /// We need to collect and keep not only enabled roles but also subscriptions for them to be able to recalculate EnabledRolesInfo when some of the roles change. + SubscriptionsOnRoles new_subscriptions_on_roles; + new_subscriptions_on_roles.reserve(subscriptions_on_roles.size()); - for (const auto & current_role : enabled.params.current_roles) + auto get_role_function = [this, &subscriptions_on_roles](const UUID & id) TSA_NO_THREAD_SAFETY_ANALYSIS { return getRole(id, subscriptions_on_roles); }; + + for (const auto & current_role : enabled_roles.params.current_roles) collectRoles(*new_info, skip_ids, get_role_function, current_role, true, false); - for (const auto & current_role : enabled.params.current_roles_with_admin_option) + for (const auto & current_role : enabled_roles.params.current_roles_with_admin_option) collectRoles(*new_info, skip_ids, get_role_function, current_role, true, true); + /// Remove duplicates from `subscriptions_on_roles`. + std::sort(new_subscriptions_on_roles.begin(), new_subscriptions_on_roles.end()); + new_subscriptions_on_roles.erase(std::unique(new_subscriptions_on_roles.begin(), new_subscriptions_on_roles.end()), new_subscriptions_on_roles.end()); + subscriptions_on_roles = std::move(new_subscriptions_on_roles); + /// Collect data from the collected roles. - enabled.setRolesInfo(new_info, notifications); + enabled_roles.setRolesInfo(new_info, notifications); } -RolePtr RoleCache::getRole(const UUID & role_id) +RolePtr RoleCache::getRole(const UUID & role_id, SubscriptionsOnRoles & subscriptions_on_roles) { /// `mutex` is already locked. auto role_from_cache = cache.get(role_id); if (role_from_cache) + { + subscriptions_on_roles.emplace_back(role_from_cache->second); return role_from_cache->first; + } - auto subscription = access_control.subscribeForChanges(role_id, - [this, role_id](const UUID &, const AccessEntityPtr & entity) + auto on_role_changed_or_removed = [this, role_id](const UUID &, const AccessEntityPtr & entity) { auto changed_role = entity ? typeid_cast(entity) : nullptr; if (changed_role) roleChanged(role_id, changed_role); else roleRemoved(role_id); - }); + }; + + auto subscription_on_role = std::make_shared(access_control.subscribeForChanges(role_id, on_role_changed_or_removed)); auto role = access_control.tryRead(role_id); if (role) { - auto cache_value = Poco::SharedPtr>( - new std::pair{role, std::move(subscription)}); + auto cache_value = Poco::SharedPtr>>( + new std::pair>{role, subscription_on_role}); cache.add(role_id, cache_value); + subscriptions_on_roles.emplace_back(subscription_on_role); return role; } @@ -162,6 +180,7 @@ void RoleCache::roleChanged(const UUID & role_id, const RolePtr & changed_role) scope_guard notifications; std::lock_guard lock{mutex}; + auto role_from_cache = cache.get(role_id); if (role_from_cache) { diff --git a/src/Access/RoleCache.h b/src/Access/RoleCache.h index 51c415d4d1d..24f19cb9d94 100644 --- a/src/Access/RoleCache.h +++ b/src/Access/RoleCache.h @@ -24,15 +24,29 @@ public: const std::vector & current_roles_with_admin_option); private: - void collectEnabledRoles(scope_guard * notifications); - void collectEnabledRoles(EnabledRoles & enabled, scope_guard * notifications); - RolePtr getRole(const UUID & role_id); + using SubscriptionsOnRoles = std::vector>; + + void collectEnabledRoles(scope_guard * notifications) TSA_REQUIRES(mutex); + void collectEnabledRoles(EnabledRoles & enabled_roles, SubscriptionsOnRoles & subscriptions_on_roles, scope_guard * notifications) TSA_REQUIRES(mutex); + RolePtr getRole(const UUID & role_id, SubscriptionsOnRoles & subscriptions_on_roles) TSA_REQUIRES(mutex); void roleChanged(const UUID & role_id, const RolePtr & changed_role); void roleRemoved(const UUID & role_id); const AccessControl & access_control; - Poco::AccessExpireCache> cache; - std::map> enabled_roles; + + Poco::AccessExpireCache>> TSA_GUARDED_BY(mutex) cache; + + struct EnabledRolesWithSubscriptions + { + std::weak_ptr enabled_roles; + + /// We need to keep subscriptions for all enabled roles to be able to recalculate EnabledRolesInfo when some of the roles change. + /// `cache` also keeps subscriptions but that's not enough because values can be purged from the `cache` anytime. + SubscriptionsOnRoles subscriptions_on_roles; + }; + + std::map TSA_GUARDED_BY(mutex) enabled_roles_by_params; + mutable std::mutex mutex; }; From b2b8b7f872591714e10a702c64fd58aebd0e6457 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Fri, 3 Mar 2023 19:05:38 +0100 Subject: [PATCH 611/841] Fix RewriteArrayExistsToHasPass --- src/Analyzer/Passes/ArrayExistsToHasPass.cpp | 130 ++++++++++-------- src/Analyzer/Passes/ArrayExistsToHasPass.h | 12 +- src/Analyzer/Passes/AutoFinalOnQueryPass.cpp | 3 +- .../Passes/ShardNumColumnToFunctionPass.h | 3 + 4 files changed, 87 insertions(+), 61 deletions(-) diff --git a/src/Analyzer/Passes/ArrayExistsToHasPass.cpp b/src/Analyzer/Passes/ArrayExistsToHasPass.cpp index b4b8b5b4579..c0f958588f1 100644 --- a/src/Analyzer/Passes/ArrayExistsToHasPass.cpp +++ b/src/Analyzer/Passes/ArrayExistsToHasPass.cpp @@ -1,3 +1,5 @@ +#include + #include #include @@ -8,71 +10,85 @@ #include #include -#include "ArrayExistsToHasPass.h" - namespace DB { + namespace { - class RewriteArrayExistsToHasVisitor : public InDepthQueryTreeVisitorWithContext + +class RewriteArrayExistsToHasVisitor : public InDepthQueryTreeVisitorWithContext +{ +public: + using Base = InDepthQueryTreeVisitorWithContext; + using Base::Base; + + void visitImpl(QueryTreeNodePtr & node) { - public: - using Base = InDepthQueryTreeVisitorWithContext; - using Base::Base; + if (!getSettings().optimize_rewrite_array_exists_to_has) + return; - void visitImpl(QueryTreeNodePtr & node) + auto * array_exists_function_node = node->as(); + if (!array_exists_function_node || array_exists_function_node->getFunctionName() != "arrayExists") + return; + + auto & array_exists_function_arguments_nodes = array_exists_function_node->getArguments().getNodes(); + if (array_exists_function_arguments_nodes.size() != 2) + return; + + /// lambda function must be like: x -> x = elem + auto * lambda_node = array_exists_function_arguments_nodes[0]->as(); + if (!lambda_node) + return; + + auto & lambda_arguments_nodes = lambda_node->getArguments().getNodes(); + if (lambda_arguments_nodes.size() != 1) + return; + + const auto & lambda_argument_column_node = lambda_arguments_nodes[0]; + if (lambda_argument_column_node->getNodeType() != QueryTreeNodeType::COLUMN) + return; + + auto * filter_node = lambda_node->getExpression()->as(); + if (!filter_node || filter_node->getFunctionName() != "equals") + return; + + const auto & filter_arguments_nodes = filter_node->getArguments().getNodes(); + if (filter_arguments_nodes.size() != 2) + return; + + const auto & filter_lhs_argument_node = filter_arguments_nodes[0]; + auto filter_lhs_argument_node_type = filter_lhs_argument_node->getNodeType(); + + const auto & filter_rhs_argument_node = filter_arguments_nodes[1]; + auto filter_rhs_argument_node_type = filter_rhs_argument_node->getNodeType(); + + QueryTreeNodePtr has_constant_element_argument; + + if (filter_lhs_argument_node_type == QueryTreeNodeType::COLUMN && + filter_rhs_argument_node_type == QueryTreeNodeType::CONSTANT && + filter_lhs_argument_node->isEqual(*lambda_argument_column_node)) { - if (!getSettings().optimize_rewrite_array_exists_to_has) - return; - - auto * function_node = node->as(); - if (!function_node || function_node->getFunctionName() != "arrayExists") - return; - - auto & function_arguments_nodes = function_node->getArguments().getNodes(); - if (function_arguments_nodes.size() != 2) - return; - - /// lambda function must be like: x -> x = elem - auto * lambda_node = function_arguments_nodes[0]->as(); - if (!lambda_node) - return; - - auto & lambda_arguments_nodes = lambda_node->getArguments().getNodes(); - if (lambda_arguments_nodes.size() != 1) - return; - auto * column_node = lambda_arguments_nodes[0]->as(); - - auto * filter_node = lambda_node->getExpression()->as(); - if (!filter_node || filter_node->getFunctionName() != "equals") - return; - - auto filter_arguments_nodes = filter_node->getArguments().getNodes(); - if (filter_arguments_nodes.size() != 2) - return; - - ColumnNode * filter_column_node = nullptr; - if (filter_arguments_nodes[1]->as() && (filter_column_node = filter_arguments_nodes[0]->as()) - && filter_column_node->getColumnName() == column_node->getColumnName()) - { - /// Rewrite arrayExists(x -> x = elem, arr) -> has(arr, elem) - function_arguments_nodes[0] = std::move(function_arguments_nodes[1]); - function_arguments_nodes[1] = std::move(filter_arguments_nodes[1]); - function_node->resolveAsFunction( - FunctionFactory::instance().get("has", getContext())->build(function_node->getArgumentColumns())); - } - else if ( - filter_arguments_nodes[0]->as() && (filter_column_node = filter_arguments_nodes[1]->as()) - && filter_column_node->getColumnName() == column_node->getColumnName()) - { - /// Rewrite arrayExists(x -> elem = x, arr) -> has(arr, elem) - function_arguments_nodes[0] = std::move(function_arguments_nodes[1]); - function_arguments_nodes[1] = std::move(filter_arguments_nodes[0]); - function_node->resolveAsFunction( - FunctionFactory::instance().get("has", getContext())->build(function_node->getArgumentColumns())); - } + /// Rewrite arrayExists(x -> x = elem, arr) -> has(arr, elem) + has_constant_element_argument = filter_rhs_argument_node; } - }; + else if (filter_lhs_argument_node_type == QueryTreeNodeType::CONSTANT && + filter_rhs_argument_node_type == QueryTreeNodeType::COLUMN && + filter_rhs_argument_node->isEqual(*lambda_argument_column_node)) + { + /// Rewrite arrayExists(x -> elem = x, arr) -> has(arr, elem) + has_constant_element_argument = filter_lhs_argument_node; + } + else + { + return; + } + + auto has_function = FunctionFactory::instance().get("has", getContext()); + array_exists_function_arguments_nodes[0] = std::move(array_exists_function_arguments_nodes[1]); + array_exists_function_arguments_nodes[1] = std::move(has_constant_element_argument); + array_exists_function_node->resolveAsFunction(has_function->build(array_exists_function_node->getArgumentColumns())); + } +}; } diff --git a/src/Analyzer/Passes/ArrayExistsToHasPass.h b/src/Analyzer/Passes/ArrayExistsToHasPass.h index 7d9d1cf3d68..8f4623116e3 100644 --- a/src/Analyzer/Passes/ArrayExistsToHasPass.h +++ b/src/Analyzer/Passes/ArrayExistsToHasPass.h @@ -4,8 +4,15 @@ namespace DB { -/// Rewrite possible 'arrayExists(func, arr)' to 'has(arr, elem)' to improve performance -/// arrayExists(x -> x = 1, arr) -> has(arr, 1) + +/** Rewrite possible 'arrayExists(func, arr)' to 'has(arr, elem)' to improve performance. + * + * Example: SELECT arrayExists(x -> x = 1, arr); + * Result: SELECT has(arr, 1); + * + * Example: SELECT arrayExists(x -> 1 = x, arr); + * Result: SELECT has(arr, 1); + */ class RewriteArrayExistsToHasPass final : public IQueryTreePass { public: @@ -15,4 +22,5 @@ public: void run(QueryTreeNodePtr query_tree_node, ContextPtr context) override; }; + } diff --git a/src/Analyzer/Passes/AutoFinalOnQueryPass.cpp b/src/Analyzer/Passes/AutoFinalOnQueryPass.cpp index fdf818681d7..fa5fc0e75a8 100644 --- a/src/Analyzer/Passes/AutoFinalOnQueryPass.cpp +++ b/src/Analyzer/Passes/AutoFinalOnQueryPass.cpp @@ -22,8 +22,7 @@ public: void visitImpl(QueryTreeNodePtr & node) { - const auto & context = getContext(); - if (!context->getSettingsRef().final) + if (!getSettings().final) return; const auto * query_node = node->as(); diff --git a/src/Analyzer/Passes/ShardNumColumnToFunctionPass.h b/src/Analyzer/Passes/ShardNumColumnToFunctionPass.h index 83b974954fa..71a038bcf39 100644 --- a/src/Analyzer/Passes/ShardNumColumnToFunctionPass.h +++ b/src/Analyzer/Passes/ShardNumColumnToFunctionPass.h @@ -6,6 +6,9 @@ namespace DB { /** Rewrite _shard_num column into shardNum() function. + * + * Example: SELECT _shard_num FROM distributed_table; + * Result: SELECT shardNum() FROM distributed_table; */ class ShardNumColumnToFunctionPass final : public IQueryTreePass { From 20c0476d2fb9cc4964b8075fdc8507d6f3c467b3 Mon Sep 17 00:00:00 2001 From: Sergei Trifonov Date: Wed, 8 Mar 2023 10:51:16 +0100 Subject: [PATCH 612/841] Update docs/en/operations/server-configuration-parameters/settings.md Co-authored-by: pufit --- docs/en/operations/server-configuration-parameters/settings.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/operations/server-configuration-parameters/settings.md b/docs/en/operations/server-configuration-parameters/settings.md index 92a8270ac0f..9d8f3ba8355 100644 --- a/docs/en/operations/server-configuration-parameters/settings.md +++ b/docs/en/operations/server-configuration-parameters/settings.md @@ -989,7 +989,7 @@ Default value: `100`. ## max_io_thread_pool_free_size {#max-io-thread-pool-free-size} -If the number of **idle** threads in the IO Thread pool is greater than `max_io_thread_pool_free_size`, then ClickHouse releases resources occupied by some threads and the pool size is decreased. Threads can be created again if necessary. +If the number of **idle** threads in the IO Thread pool exceeds `max_io_thread_pool_free_size`, ClickHouse will release resources occupied by idling threads and decrease the pool size. Threads can be created again if necessary. Possible values: From 880b34fded1b8a3cee8b690309b11c9903af091a Mon Sep 17 00:00:00 2001 From: Sergei Trifonov Date: Wed, 8 Mar 2023 10:51:34 +0100 Subject: [PATCH 613/841] Update docs/en/operations/server-configuration-parameters/settings.md Co-authored-by: pufit --- docs/en/operations/server-configuration-parameters/settings.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/operations/server-configuration-parameters/settings.md b/docs/en/operations/server-configuration-parameters/settings.md index 9d8f3ba8355..3fe815bc79a 100644 --- a/docs/en/operations/server-configuration-parameters/settings.md +++ b/docs/en/operations/server-configuration-parameters/settings.md @@ -1020,7 +1020,7 @@ Default value: `1000`. ## max_backups_io_thread_pool_free_size {#max-backups-io-thread-pool-free-size} -If the number of **idle** threads in the Backups IO Thread pool is greater than `max_backup_io_thread_pool_free_size`, then ClickHouse releases resources occupied by some threads and the pool size is decreased. Threads can be created again if necessary. +If the number of **idle** threads in the Backups IO Thread pool exceeds `max_backup_io_thread_pool_free_size`, ClickHouse will release resources occupied by idling threads and decrease the pool size. Threads can be created again if necessary. Possible values: From b6f3b81403dd8051be2fc511f4ec87023ef1aca2 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Mon, 6 Mar 2023 12:50:09 +0100 Subject: [PATCH 614/841] Query plan filter push down optimization filled JOIN fix --- src/Processors/QueryPlan/JoinStep.h | 2 ++ .../QueryPlan/Optimizations/filterPushDown.cpp | 13 ++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/Processors/QueryPlan/JoinStep.h b/src/Processors/QueryPlan/JoinStep.h index a814d541574..e7185f36588 100644 --- a/src/Processors/QueryPlan/JoinStep.h +++ b/src/Processors/QueryPlan/JoinStep.h @@ -49,6 +49,8 @@ public: String getName() const override { return "FilledJoin"; } void transformPipeline(QueryPipelineBuilder & pipeline, const BuildQueryPipelineSettings &) override; + const JoinPtr & getJoin() const { return join; } + private: void updateOutputStream() override; diff --git a/src/Processors/QueryPlan/Optimizations/filterPushDown.cpp b/src/Processors/QueryPlan/Optimizations/filterPushDown.cpp index d466c52725f..37bc894339f 100644 --- a/src/Processors/QueryPlan/Optimizations/filterPushDown.cpp +++ b/src/Processors/QueryPlan/Optimizations/filterPushDown.cpp @@ -314,11 +314,14 @@ size_t tryPushDownFilter(QueryPlan::Node * parent_node, QueryPlan::Nodes & nodes if (auto updated_steps = simplePushDownOverStep(parent_node, nodes, child)) return updated_steps; - if (auto * join = typeid_cast(child.get())) + auto * join = typeid_cast(child.get()); + auto * filled_join = typeid_cast(child.get()); + + if (join || filled_join) { auto join_push_down = [&](JoinKind kind) -> size_t { - const auto & table_join = join->getJoin()->getTableJoin(); + const auto & table_join = join ? join->getJoin()->getTableJoin() : filled_join->getJoin()->getTableJoin(); /// Only inner and left(/right) join are supported. Other types may generate default values for left table keys. /// So, if we push down a condition like `key != 0`, not all rows may be filtered. @@ -326,8 +329,8 @@ size_t tryPushDownFilter(QueryPlan::Node * parent_node, QueryPlan::Nodes & nodes return 0; bool is_left = kind == JoinKind::Left; - const auto & input_header = is_left ? join->getInputStreams().front().header : join->getInputStreams().back().header; - const auto & res_header = join->getOutputStream().header; + const auto & input_header = is_left ? child->getInputStreams().front().header : child->getInputStreams().back().header; + const auto & res_header = child->getOutputStream().header; Names allowed_keys; const auto & source_columns = input_header.getNames(); for (const auto & name : source_columns) @@ -372,7 +375,7 @@ size_t tryPushDownFilter(QueryPlan::Node * parent_node, QueryPlan::Nodes & nodes return updated_steps; /// For full sorting merge join we push down both to the left and right tables, because left and right streams are not independent. - if (join->allowPushDownToRight()) + if (join && join->allowPushDownToRight()) { if (size_t updated_steps = join_push_down(JoinKind::Right)) return updated_steps; From 3aed5a4ab455ce1c6600a5a011381432e5543ba4 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Tue, 7 Mar 2023 12:35:17 +0100 Subject: [PATCH 615/841] Added tests --- ...dicate_push_down_filled_join_fix.reference | 33 +++++++++++++++++++ ...75_predicate_push_down_filled_join_fix.sql | 26 +++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 tests/queries/0_stateless/02675_predicate_push_down_filled_join_fix.reference create mode 100644 tests/queries/0_stateless/02675_predicate_push_down_filled_join_fix.sql diff --git a/tests/queries/0_stateless/02675_predicate_push_down_filled_join_fix.reference b/tests/queries/0_stateless/02675_predicate_push_down_filled_join_fix.reference new file mode 100644 index 00000000000..ecdb62c5cb5 --- /dev/null +++ b/tests/queries/0_stateless/02675_predicate_push_down_filled_join_fix.reference @@ -0,0 +1,33 @@ +Expression ((Project names + (Projection + ))) +Header: t1.id UInt64 + t1.value String + t2.value String +Actions: INPUT : 0 -> t1.id_0 UInt64 : 0 + INPUT : 1 -> t1.value_1 String : 1 + INPUT : 2 -> t2.value_2 String : 2 + ALIAS t1.id_0 :: 0 -> t1.id UInt64 : 3 + ALIAS t1.value_1 :: 1 -> t1.value String : 0 + ALIAS t2.value_2 :: 2 -> t2.value String : 1 +Positions: 3 0 1 + FilledJoin (Filled JOIN) + Header: t1.id_0 UInt64 + t1.value_1 String + t2.value_2 String + Filter (( + (JOIN actions + Change column names to column identifiers))) + Header: t1.id_0 UInt64 + t1.value_1 String + Filter column: equals(t1.id_0, 0_UInt8) (removed) + Actions: INPUT : 0 -> id UInt64 : 0 + INPUT : 1 -> value String : 1 + COLUMN Const(UInt8) -> 0_UInt8 UInt8 : 2 + ALIAS id :: 0 -> t1.id_0 UInt64 : 3 + ALIAS value :: 1 -> t1.value_1 String : 0 + FUNCTION equals(t1.id_0 : 3, 0_UInt8 :: 2) -> equals(t1.id_0, 0_UInt8) UInt8 : 1 + Positions: 1 3 0 + ReadFromMergeTree (default.test_table) + Header: id UInt64 + value String + ReadType: Default + Parts: 1 + Granules: 1 +0 Value JoinValue diff --git a/tests/queries/0_stateless/02675_predicate_push_down_filled_join_fix.sql b/tests/queries/0_stateless/02675_predicate_push_down_filled_join_fix.sql new file mode 100644 index 00000000000..78cb423216b --- /dev/null +++ b/tests/queries/0_stateless/02675_predicate_push_down_filled_join_fix.sql @@ -0,0 +1,26 @@ +SET allow_experimental_analyzer = 1; + +DROP TABLE IF EXISTS test_table; +CREATE TABLE test_table +( + id UInt64, + value String +) ENGINE=MergeTree ORDER BY id; + +INSERT INTO test_table VALUES (0, 'Value'); + +DROP TABLE IF EXISTS test_table_join; +CREATE TABLE test_table_join +( + id UInt64, + value String +) ENGINE = Join(All, inner, id); + +INSERT INTO test_table_join VALUES (0, 'JoinValue'); + +EXPLAIN header = 1, actions = 1 SELECT t1.id, t1.value, t2.value FROM test_table AS t1 INNER JOIN test_table_join AS t2 ON t1.id = t2.id WHERE t1.id = 0; + +SELECT t1.id, t1.value, t2.value FROM test_table AS t1 INNER JOIN test_table_join AS t2 ON t1.id = t2.id WHERE t1.id = 0; + +DROP TABLE test_table_join; +DROP TABLE test_table; From ff6c9916e6e511c333b33d0ece1607897a2aa75e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Mar=C3=ADn?= Date: Wed, 8 Mar 2023 12:13:28 +0100 Subject: [PATCH 616/841] Improvements based on the PR --- src/Client/ClientBase.cpp | 16 ++++++++-------- src/Client/TestHint.cpp | 8 ++++---- src/Client/TestHint.h | 23 +++++++++++++---------- 3 files changed, 25 insertions(+), 22 deletions(-) diff --git a/src/Client/ClientBase.cpp b/src/Client/ClientBase.cpp index b5c662b4a80..4476678f0f4 100644 --- a/src/Client/ClientBase.cpp +++ b/src/Client/ClientBase.cpp @@ -1834,7 +1834,7 @@ bool ClientBase::executeMultiQuery(const String & all_queries_text) { /// disable logs if expects errors TestHint test_hint(all_queries_text); - if (!test_hint.clientErrors().empty() || !test_hint.serverErrors().empty()) + if (test_hint.hasClientErrors() || test_hint.hasServerErrors()) processTextAsSingleQuery("SET send_logs_level = 'fatal'"); } @@ -1876,7 +1876,7 @@ bool ClientBase::executeMultiQuery(const String & all_queries_text) // the query ends because we failed to parse it, so we consume // the entire line. TestHint hint(String(this_query_begin, this_query_end - this_query_begin)); - if (!hint.serverErrors().empty()) + if (hint.hasServerErrors()) { // Syntax errors are considered as client errors current_exception->addMessage("\nExpected server error: {}.", hint.serverErrors()); @@ -1886,7 +1886,7 @@ bool ClientBase::executeMultiQuery(const String & all_queries_text) if (std::find(hint.clientErrors().begin(), hint.clientErrors().end(), current_exception->code()) == hint.clientErrors().end()) { - if (!hint.clientErrors().empty()) + if (hint.hasClientErrors()) current_exception->addMessage("\nExpected client error: {}.", hint.clientErrors()); current_exception->rethrow(); @@ -1936,7 +1936,7 @@ bool ClientBase::executeMultiQuery(const String & all_queries_text) bool error_matches_hint = true; if (have_error) { - if (!test_hint.serverErrors().empty()) + if (test_hint.hasServerErrors()) { if (!server_exception) { @@ -1953,7 +1953,7 @@ bool ClientBase::executeMultiQuery(const String & all_queries_text) test_hint.serverErrors(), server_exception->code(), full_query); } } - if (!test_hint.clientErrors().empty()) + if (test_hint.hasClientErrors()) { if (!client_exception) { @@ -1970,7 +1970,7 @@ bool ClientBase::executeMultiQuery(const String & all_queries_text) test_hint.clientErrors(), client_exception->code(), full_query); } } - if (test_hint.clientErrors().empty() && test_hint.serverErrors().empty()) + if (!test_hint.hasClientErrors() && !test_hint.hasServerErrors()) { // No error was expected but it still occurred. This is the // default case without test hint, doesn't need additional @@ -1980,14 +1980,14 @@ bool ClientBase::executeMultiQuery(const String & all_queries_text) } else { - if (!test_hint.clientErrors().empty()) + if (test_hint.hasClientErrors()) { error_matches_hint = false; fmt::print(stderr, "The query succeeded but the client error '{}' was expected (query: {}).\n", test_hint.clientErrors(), full_query); } - if (!test_hint.serverErrors().empty()) + if (test_hint.hasServerErrors()) { error_matches_hint = false; fmt::print(stderr, diff --git a/src/Client/TestHint.cpp b/src/Client/TestHint.cpp index 1500a8baf26..8cc91250721 100644 --- a/src/Client/TestHint.cpp +++ b/src/Client/TestHint.cpp @@ -9,7 +9,7 @@ namespace DB::ErrorCodes { -extern const int CANNOT_PARSE_TEXT; + extern const int CANNOT_PARSE_TEXT; } namespace DB @@ -54,9 +54,9 @@ TestHint::TestHint(const String & query_) void TestHint::parse(Lexer & comment_lexer, bool is_leading_hint) { - std::unordered_set commands{"echo", "echoOn", "echoOff"}; + std::unordered_set commands{"echo", "echoOn", "echoOff"}; - std::unordered_set command_errors{ + std::unordered_set command_errors{ "serverError", "clientError", }; @@ -76,7 +76,7 @@ void TestHint::parse(Lexer & comment_lexer, bool is_leading_hint) else if (!is_leading_hint && token.type == TokenType::BareWord && command_errors.contains(item)) { /// Everything after this must be a list of errors separated by comma - error_vector error_codes; + ErrorVector error_codes; while (!token.isEnd()) { token = comment_lexer.nextToken(); diff --git a/src/Client/TestHint.h b/src/Client/TestHint.h index d9650b9d4d7..fb1dbfb72dc 100644 --- a/src/Client/TestHint.h +++ b/src/Client/TestHint.h @@ -18,7 +18,7 @@ class Lexer; /// The following comment hints are supported: /// /// - "-- { serverError 60 }" -- in case of you are expecting server error. -/// - "-- { serverError 16, 36 }" -- in case of you are expecting one of the 2 errors +/// - "-- { serverError 16, 36 }" -- in case of you are expecting one of the 2 errors. /// /// - "-- { clientError 20 }" -- in case of you are expecting client error. /// - "-- { clientError 20, 60, 92 }" -- It's expected that the client will return one of the 3 errors. @@ -52,17 +52,20 @@ class Lexer; class TestHint { public: - using error_vector = std::vector; + using ErrorVector = std::vector; TestHint(const String & query_); const auto & serverErrors() const { return server_errors; } const auto & clientErrors() const { return client_errors; } std::optional echoQueries() const { return echo; } + bool hasClientErrors() { return !client_errors.empty(); } + bool hasServerErrors() { return !server_errors.empty(); } + private: const String & query; - error_vector server_errors{}; - error_vector client_errors{}; + ErrorVector server_errors{}; + ErrorVector client_errors{}; std::optional echo; void parse(Lexer & comment_lexer, bool is_leading_hint); @@ -91,7 +94,7 @@ private: } template <> -struct fmt::formatter +struct fmt::formatter { static constexpr auto parse(format_parse_context & ctx) { @@ -106,13 +109,13 @@ struct fmt::formatter } template - auto format(const DB::TestHint::error_vector & error_vector, FormatContext & ctx) + auto format(const DB::TestHint::ErrorVector & ErrorVector, FormatContext & ctx) { - if (error_vector.empty()) + if (ErrorVector.empty()) return format_to(ctx.out(), "{}", 0); - else if (error_vector.size() == 1) - return format_to(ctx.out(), "{}", error_vector[0]); + else if (ErrorVector.size() == 1) + return format_to(ctx.out(), "{}", ErrorVector[0]); else - return format_to(ctx.out(), "One of [{}]", fmt::join(error_vector, ", ")); + return format_to(ctx.out(), "[{}]", fmt::join(ErrorVector, ", ")); } }; From 969bb0e1afc8f60699b46fcbef29e69f29a211f5 Mon Sep 17 00:00:00 2001 From: avogar Date: Wed, 8 Mar 2023 12:31:55 +0000 Subject: [PATCH 617/841] Remove test 02153_native_bounds_check.sh --- .../0_stateless/02153_native_bounds_check.reference | 1 - .../queries/0_stateless/02153_native_bounds_check.sh | 11 ----------- 2 files changed, 12 deletions(-) delete mode 100644 tests/queries/0_stateless/02153_native_bounds_check.reference delete mode 100755 tests/queries/0_stateless/02153_native_bounds_check.sh diff --git a/tests/queries/0_stateless/02153_native_bounds_check.reference b/tests/queries/0_stateless/02153_native_bounds_check.reference deleted file mode 100644 index d00491fd7e5..00000000000 --- a/tests/queries/0_stateless/02153_native_bounds_check.reference +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/tests/queries/0_stateless/02153_native_bounds_check.sh b/tests/queries/0_stateless/02153_native_bounds_check.sh deleted file mode 100755 index a3475ddacae..00000000000 --- a/tests/queries/0_stateless/02153_native_bounds_check.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -# shellcheck source=../shell_config.sh -. "$CURDIR"/../shell_config.sh - -# Should correctly handle error. - -${CLICKHOUSE_LOCAL} --query "SELECT toString(number) AS a, toString(number) AS a FROM numbers(10)" --output-format Native | - ${CLICKHOUSE_LOCAL} --query "SELECT * FROM table" --input-format Native --structure 'a LowCardinality(String)' 2>&1 | - grep -c -F Exception From 79ef95bc0c2c2e983cdbb90afc75177aa8597430 Mon Sep 17 00:00:00 2001 From: avogar Date: Wed, 8 Mar 2023 12:54:22 +0000 Subject: [PATCH 618/841] Fix tests and builds --- .../Formats/Impl/ParquetBlockOutputFormat.cpp | 2 +- .../01308_orc_output_format_arrays.reference | Bin 567 -> 36 bytes .../01308_orc_output_format_arrays.sh | 2 +- .../queries/0_stateless/02426_orc_bug.reference | Bin 312 -> 36 bytes tests/queries/0_stateless/02426_orc_bug.sh | 9 +++++++++ tests/queries/0_stateless/02426_orc_bug.sql | 3 --- 6 files changed, 11 insertions(+), 5 deletions(-) create mode 100755 tests/queries/0_stateless/02426_orc_bug.sh delete mode 100644 tests/queries/0_stateless/02426_orc_bug.sql diff --git a/src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp b/src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp index cedd8a9c54c..759f773a574 100644 --- a/src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp +++ b/src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp @@ -20,7 +20,7 @@ namespace ErrorCodes namespace { -static parquet::ParquetVersion::type getParquetVersion(const FormatSettings & settings) +parquet::ParquetVersion::type getParquetVersion(const FormatSettings & settings) { switch (settings.parquet.output_version) { diff --git a/tests/queries/0_stateless/01308_orc_output_format_arrays.reference b/tests/queries/0_stateless/01308_orc_output_format_arrays.reference index 1f9646ac112132378f512bb4e3a610f6019698e1..7feea7cec35600166ea51a6950459c05eb6c7d88 100644 GIT binary patch literal 36 rcmXpqH%qZFO-ZpdOEI=INij9EFfubvv`jTIH%c@%Pfk%#(B%REtfL6? literal 567 zcmaKou}Z{15Qb-Fv+J_CUfj1(^yJ73Txpxm?(hk$eF1A9K)8pp z5ER#OZ*wFHHuLYd|I9G_i{;#AZq?1nOH zi@h-PB)k2_Z@x78PeSsIycPNP4-!J}r2;h0Sd#;1L6P@^5+4Osk&~#JS^h!#DJTY| z99adXz?c*3z$*GG`bp%3P4IQ>*K8yV+53Mj)#Y{L&fPY*Z5^i6IX{^Uqp&J}r7{({ zSCX4ST<`_rgrW2m5pNorkz6v0~6|4#a#fA`ch4R^#kxNzslh121M bv&Wk&w9hE%uGh(gAgwNH^YEtBVmaq;55+tO diff --git a/tests/queries/0_stateless/01308_orc_output_format_arrays.sh b/tests/queries/0_stateless/01308_orc_output_format_arrays.sh index 1d9aea353b6..498854874cf 100755 --- a/tests/queries/0_stateless/01308_orc_output_format_arrays.sh +++ b/tests/queries/0_stateless/01308_orc_output_format_arrays.sh @@ -11,7 +11,7 @@ $CLICKHOUSE_CLIENT --query="CREATE TABLE orc (array1 Array(Int32), array2 Array( $CLICKHOUSE_CLIENT --query="INSERT INTO orc VALUES ([1,2,3,4,5], [[1,2], [3,4], [5]]), ([42], [[42, 42], [42]])"; -$CLICKHOUSE_CLIENT --query="SELECT * FROM orc FORMAT ORC"; +$CLICKHOUSE_CLIENT --query="SELECT * FROM orc FORMAT ORC SETTINGS output_format_orc_compression_method='none'" | md5sum; $CLICKHOUSE_CLIENT --query="DROP TABLE orc"; diff --git a/tests/queries/0_stateless/02426_orc_bug.reference b/tests/queries/0_stateless/02426_orc_bug.reference index e5ad2b492892318e8fa83954efdecbb2bf287a91..baa88da215881130acc288c7ce2a15bd34f45e90 100644 GIT binary patch literal 36 rcmcCawlFudut-WXGfYc0H%zs(G)*xwOi4*gGB-9%F*jFG(B%REwulK^ literal 312 zcmeYda^~XZVrF1q5MtqA3Si*ke3ufJp+V>i>cN2mUcI{%`ot z$i>FNCcq%U3#J(*_`x)jggB690E#n#X+|*3B)}-a4CVt30n&^h!+_QT)ghBo% Date: Wed, 8 Mar 2023 13:06:10 +0000 Subject: [PATCH 619/841] Add logs --- src/Coordination/Changelog.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Coordination/Changelog.cpp b/src/Coordination/Changelog.cpp index ddedae4fa0f..13da4dffac8 100644 --- a/src/Coordination/Changelog.cpp +++ b/src/Coordination/Changelog.cpp @@ -211,13 +211,20 @@ public: void flush() { auto * file_buffer = tryGetFileBuffer(); + LOG_TRACE(log, "Trying to flush"); if (file_buffer) { /// Fsync file system if needed if (log_file_settings.force_sync) + { file_buffer->sync(); + } else + { + LOG_TRACE(log, "Flushing with next, in buffer {}", file_buffer->offset()); file_buffer->next(); + LOG_TRACE(log, "Flushed in total {}", file_buffer->count()); + } } } From 07a39887499c7eadb4198a724d024c98607065d3 Mon Sep 17 00:00:00 2001 From: Yakov Olkhovskiy <99031427+yakov-olkhovskiy@users.noreply.github.com> Date: Wed, 8 Mar 2023 08:26:07 -0500 Subject: [PATCH 620/841] geteuid is enough --- utils/self-extracting-executable/decompressor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/self-extracting-executable/decompressor.cpp b/utils/self-extracting-executable/decompressor.cpp index 1374c269dc1..d41b9b1ebe1 100644 --- a/utils/self-extracting-executable/decompressor.cpp +++ b/utils/self-extracting-executable/decompressor.cpp @@ -170,7 +170,7 @@ int decompress(char * input, char * output, off_t start, off_t end, size_t max_n bool isSudo() { - return geteuid() == 0 && getenv("SUDO_USER") && getenv("SUDO_UID") && getenv("SUDO_GID"); // NOLINT(concurrency-mt-unsafe) + return geteuid() == 0; } /// Read data about files and decomrpess them. From ed5b19f5f8b03249f757615584c39996697b0fb1 Mon Sep 17 00:00:00 2001 From: MeenaRenganathan22 Date: Wed, 8 Mar 2023 06:11:17 -0800 Subject: [PATCH 621/841] Fixed the integration test failures related with HDFS and KAFKA --- tests/integration/test_storage_kerberized_hdfs/secrets/krb.conf | 1 + tests/integration/test_storage_kerberized_kafka/secrets/krb.conf | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/integration/test_storage_kerberized_hdfs/secrets/krb.conf b/tests/integration/test_storage_kerberized_hdfs/secrets/krb.conf index b43a54b4dc5..dffdcaebe81 100644 --- a/tests/integration/test_storage_kerberized_hdfs/secrets/krb.conf +++ b/tests/integration/test_storage_kerberized_hdfs/secrets/krb.conf @@ -9,6 +9,7 @@ dns_lookup_kdc = false ticket_lifetime = 5s forwardable = true + rdns = false default_tgs_enctypes = des3-hmac-sha1 default_tkt_enctypes = des3-hmac-sha1 permitted_enctypes = des3-hmac-sha1 diff --git a/tests/integration/test_storage_kerberized_kafka/secrets/krb.conf b/tests/integration/test_storage_kerberized_kafka/secrets/krb.conf index 1efdf510f22..bda73a285cf 100644 --- a/tests/integration/test_storage_kerberized_kafka/secrets/krb.conf +++ b/tests/integration/test_storage_kerberized_kafka/secrets/krb.conf @@ -10,6 +10,7 @@ ticket_lifetime = 15s renew_lifetime = 15s forwardable = true + rdns = false [realms] TEST.CLICKHOUSE.TECH = { From df698355dff9d3b364cbbff50c6e84b5192236cc Mon Sep 17 00:00:00 2001 From: Yakov Olkhovskiy Date: Wed, 8 Mar 2023 14:25:24 +0000 Subject: [PATCH 622/841] comment --- src/Analyzer/QueryTreeBuilder.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Analyzer/QueryTreeBuilder.cpp b/src/Analyzer/QueryTreeBuilder.cpp index ed956071d5a..34a75dd0c33 100644 --- a/src/Analyzer/QueryTreeBuilder.cpp +++ b/src/Analyzer/QueryTreeBuilder.cpp @@ -356,6 +356,9 @@ QueryTreeNodePtr QueryTreeBuilder::buildSelectExpression(const ASTPtr & select_q current_query_tree->getLimitByNode() = buildExpressionList(select_limit_by, current_context); /// Combine limit expression with limit and offset settings into final limit expression + /// The sequence of application is next - offset expression, limit expression, offset setting, limit setting. + /// Since offset setting is applied after limit expression, but we want to transfer settings into expression + /// we must decrease limit expression by offset setting and then add offset setting to offset expression. /// select_limit - limit expression /// limit - limit setting /// offset - offset setting From 0fb537e8805aa54f1d951bd1b5a58d28b92c69c5 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Wed, 8 Mar 2023 15:27:43 +0100 Subject: [PATCH 623/841] suppress expected errors from test 01111 in Upgrade check --- docker/test/upgrade/run.sh | 4 +++- src/Interpreters/DDLWorker.cpp | 12 ++++++------ .../01111_create_drop_replicated_db_stress.sh | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/docker/test/upgrade/run.sh b/docker/test/upgrade/run.sh index ce8a56c777e..93f07bbb551 100644 --- a/docker/test/upgrade/run.sh +++ b/docker/test/upgrade/run.sh @@ -161,7 +161,9 @@ rg -Fav -e "Code: 236. DB::Exception: Cancelled merging parts" \ -e "Authentication failed" \ -e "Cannot flush" \ -e "Container already exists" \ - /var/log/clickhouse-server/clickhouse-server.upgrade.log | zgrep -Fa "" > /test_output/upgrade_error_messages.txt \ + clickhouse-server.upgrade.log \ + | grep -av -e "_repl_01111_.*Mapping for table with UUID" \ + | zgrep -Fa "" > /test_output/upgrade_error_messages.txt \ && echo -e "Error message in clickhouse-server.log (see upgrade_error_messages.txt)$FAIL$(head_escaped /test_output/upgrade_error_messages.txt)" \ >> /test_output/test_results.tsv \ || echo -e "No Error messages after server upgrade$OK" >> /test_output/test_results.tsv diff --git a/src/Interpreters/DDLWorker.cpp b/src/Interpreters/DDLWorker.cpp index 7179ce94e0b..537380862fa 100644 --- a/src/Interpreters/DDLWorker.cpp +++ b/src/Interpreters/DDLWorker.cpp @@ -169,11 +169,11 @@ DDLTaskPtr DDLWorker::initAndCheckTask(const String & entry_name, String & out_r return {}; } - auto write_error_status = [&](const String & host_id, const String & error_message, const String & reason) + auto write_error_status = [&](const String & host_id, const ExecutionStatus & status, const String & reason) { - LOG_ERROR(log, "Cannot parse DDL task {}: {}. Will try to send error status: {}", entry_name, reason, error_message); + LOG_ERROR(log, "Cannot parse DDL task {}: {}. Will try to send error status: {}", entry_name, reason, status.message); createStatusDirs(entry_path, zookeeper); - zookeeper->tryCreate(fs::path(entry_path) / "finished" / host_id, error_message, zkutil::CreateMode::Persistent); + zookeeper->tryCreate(fs::path(entry_path) / "finished" / host_id, status.serializeText(), zkutil::CreateMode::Persistent); }; try @@ -187,7 +187,7 @@ DDLTaskPtr DDLWorker::initAndCheckTask(const String & entry_name, String & out_r /// We can try to create fail node using FQDN if it equal to host name in cluster config attempt will be successful. /// Otherwise, that node will be ignored by DDLQueryStatusSource. out_reason = "Incorrect task format"; - write_error_status(host_fqdn_id, ExecutionStatus::fromCurrentException().serializeText(), out_reason); + write_error_status(host_fqdn_id, ExecutionStatus::fromCurrentException(), out_reason); return {}; } @@ -212,7 +212,7 @@ DDLTaskPtr DDLWorker::initAndCheckTask(const String & entry_name, String & out_r catch (...) { out_reason = "Cannot parse query or obtain cluster info"; - write_error_status(task->host_id_str, ExecutionStatus::fromCurrentException().serializeText(), out_reason); + write_error_status(task->host_id_str, ExecutionStatus::fromCurrentException(), out_reason); return {}; } @@ -650,7 +650,7 @@ void DDLWorker::processTask(DDLTaskBase & task, const ZooKeeperPtr & zookeeper) bool status_written_by_table_or_db = task.ops.empty(); if (status_written_by_table_or_db) { - throw Exception(ErrorCodes::UNFINISHED, "Unexpected error: {}", task.execution_status.serializeText()); + throw Exception(ErrorCodes::UNFINISHED, "Unexpected error: {}", task.execution_status.message); } else { diff --git a/tests/queries/0_stateless/01111_create_drop_replicated_db_stress.sh b/tests/queries/0_stateless/01111_create_drop_replicated_db_stress.sh index 8c9efb75e96..770a0780ca2 100755 --- a/tests/queries/0_stateless/01111_create_drop_replicated_db_stress.sh +++ b/tests/queries/0_stateless/01111_create_drop_replicated_db_stress.sh @@ -15,7 +15,7 @@ function create_db() # Multiple database replicas on one server are actually not supported (until we have namespaces). # So CREATE TABLE queries will fail on all replicas except one. But it's still makes sense for a stress test. $CLICKHOUSE_CLIENT --allow_experimental_database_replicated=1 --query \ - "create database if not exists ${CLICKHOUSE_DATABASE}_repl_$SUFFIX engine=Replicated('/test/01111/$CLICKHOUSE_TEST_ZOOKEEPER_PREFIX', '$SHARD', '$REPLICA')" \ + "create database if not exists ${CLICKHOUSE_DATABASE}_repl_01111_$SUFFIX engine=Replicated('/test/01111/$CLICKHOUSE_TEST_ZOOKEEPER_PREFIX', '$SHARD', '$REPLICA')" \ 2>&1| grep -Fa "Exception: " | grep -Fv "REPLICA_ALREADY_EXISTS" | grep -Fiv "Will not try to start it up" | \ grep -Fv "Coordination::Exception" | grep -Fv "already contains some data and it does not look like Replicated database path" sleep 0.$RANDOM From 9c617cbf275f74888f518f267c4b639b2911ca90 Mon Sep 17 00:00:00 2001 From: Dmitry Novik Date: Wed, 8 Mar 2023 15:19:57 +0000 Subject: [PATCH 624/841] Fix GROUPING function initialization for grouping sets --- .../Passes/GroupingFunctionsResolvePass.cpp | 9 +++++++-- .../02315_grouping_constant_folding.reference | 14 ++++++++++++++ .../02315_grouping_constant_folding.sql | 2 ++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/Analyzer/Passes/GroupingFunctionsResolvePass.cpp b/src/Analyzer/Passes/GroupingFunctionsResolvePass.cpp index 20f1713f8c2..3ed9b842333 100644 --- a/src/Analyzer/Passes/GroupingFunctionsResolvePass.cpp +++ b/src/Analyzer/Passes/GroupingFunctionsResolvePass.cpp @@ -164,12 +164,17 @@ void resolveGroupingFunctions(QueryTreeNodePtr & query_node, ContextPtr context) grouping_sets_used_aggregation_keys_list.emplace_back(); auto & grouping_sets_used_aggregation_keys = grouping_sets_used_aggregation_keys_list.back(); + QueryTreeNodePtrWithHashSet used_keys_in_set; + for (auto & grouping_set_key_node : grouping_set_keys_list_node_typed.getNodes()) { + if (used_keys_in_set.contains(grouping_set_key_node)) + continue; + used_keys_in_set.insert(grouping_set_key_node); + grouping_sets_used_aggregation_keys.push_back(grouping_set_key_node); + if (aggregation_key_to_index.contains(grouping_set_key_node)) continue; - - grouping_sets_used_aggregation_keys.push_back(grouping_set_key_node); aggregation_key_to_index.emplace(grouping_set_key_node, aggregation_node_index); ++aggregation_node_index; } diff --git a/tests/queries/0_stateless/02315_grouping_constant_folding.reference b/tests/queries/0_stateless/02315_grouping_constant_folding.reference index 6e591de2661..31816318a42 100644 --- a/tests/queries/0_stateless/02315_grouping_constant_folding.reference +++ b/tests/queries/0_stateless/02315_grouping_constant_folding.reference @@ -27,3 +27,17 @@ SELECT count() AS amount, a, b, GROUPING(a, b) FROM test02315 GROUP BY ROLLUP(a, 5 0 0 2 5 1 0 2 10 0 0 0 +SELECT count() AS amount, a, b, GROUPING(a, b) FROM test02315 GROUP BY GROUPING SETS ((a, b), (a, a), ()) ORDER BY (amount, a, b) SETTINGS force_grouping_standard_compatibility=0, allow_experimental_analyzer=1; +1 0 0 3 +1 0 2 3 +1 0 4 3 +1 0 6 3 +1 0 8 3 +1 1 1 3 +1 1 3 3 +1 1 5 3 +1 1 7 3 +1 1 9 3 +5 0 0 2 +5 1 0 2 +10 0 0 0 diff --git a/tests/queries/0_stateless/02315_grouping_constant_folding.sql b/tests/queries/0_stateless/02315_grouping_constant_folding.sql index ff259b7be79..f992aa0da32 100644 --- a/tests/queries/0_stateless/02315_grouping_constant_folding.sql +++ b/tests/queries/0_stateless/02315_grouping_constant_folding.sql @@ -9,5 +9,7 @@ SELECT count() AS amount, a, b, GROUPING(a, b) FROM test02315 GROUP BY GROUPING SELECT count() AS amount, a, b, GROUPING(a, b) FROM test02315 GROUP BY ROLLUP(a, b) ORDER BY (amount, a, b) SETTINGS force_grouping_standard_compatibility=0; +SELECT count() AS amount, a, b, GROUPING(a, b) FROM test02315 GROUP BY GROUPING SETS ((a, b), (a, a), ()) ORDER BY (amount, a, b) SETTINGS force_grouping_standard_compatibility=0, allow_experimental_analyzer=1; + -- { echoOff } DROP TABLE test02315; From e2bb5f12a1711c82414d78cef72ac3496e159a97 Mon Sep 17 00:00:00 2001 From: Dmitry Novik Date: Wed, 8 Mar 2023 15:28:23 +0000 Subject: [PATCH 625/841] Use correct context --- src/Analyzer/Passes/GroupingFunctionsResolvePass.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Analyzer/Passes/GroupingFunctionsResolvePass.cpp b/src/Analyzer/Passes/GroupingFunctionsResolvePass.cpp index 3ed9b842333..0cf5310a3ad 100644 --- a/src/Analyzer/Passes/GroupingFunctionsResolvePass.cpp +++ b/src/Analyzer/Passes/GroupingFunctionsResolvePass.cpp @@ -32,17 +32,17 @@ enum class GroupByKind GROUPING_SETS }; -class GroupingFunctionResolveVisitor : public InDepthQueryTreeVisitor +class GroupingFunctionResolveVisitor : public InDepthQueryTreeVisitorWithContext { public: GroupingFunctionResolveVisitor(GroupByKind group_by_kind_, QueryTreeNodePtrWithHashMap aggregation_key_to_index_, ColumnNumbersList grouping_sets_keys_indices_, ContextPtr context_) - : group_by_kind(group_by_kind_) + : InDepthQueryTreeVisitorWithContext(std::move(context_)) + , group_by_kind(group_by_kind_) , aggregation_key_to_index(std::move(aggregation_key_to_index_)) , grouping_sets_keys_indexes(std::move(grouping_sets_keys_indices_)) - , context(std::move(context_)) { } @@ -71,7 +71,7 @@ public: FunctionOverloadResolverPtr grouping_function_resolver; bool add_grouping_set_column = false; - bool force_grouping_standard_compatibility = context->getSettingsRef().force_grouping_standard_compatibility; + bool force_grouping_standard_compatibility = getSettings().force_grouping_standard_compatibility; size_t aggregation_keys_size = aggregation_key_to_index.size(); switch (group_by_kind) @@ -132,7 +132,6 @@ private: GroupByKind group_by_kind; QueryTreeNodePtrWithHashMap aggregation_key_to_index; ColumnNumbersList grouping_sets_keys_indexes; - ContextPtr context; }; void resolveGroupingFunctions(QueryTreeNodePtr & query_node, ContextPtr context) From debd69f03af5939b266c713c9ff9deb1884d3691 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Tue, 7 Mar 2023 20:17:09 +0100 Subject: [PATCH 626/841] fix an assertion with implicit transactions in interserver mode --- src/Interpreters/executeQuery.cpp | 60 ++++++++----------- .../02345_implicit_transaction.reference | 3 + .../02345_implicit_transaction.sql | 12 +++- 3 files changed, 38 insertions(+), 37 deletions(-) diff --git a/src/Interpreters/executeQuery.cpp b/src/Interpreters/executeQuery.cpp index e2aa2c02fc8..fb90ba2da7b 100644 --- a/src/Interpreters/executeQuery.cpp +++ b/src/Interpreters/executeQuery.cpp @@ -451,10 +451,24 @@ static std::tuple executeQueryImpl( /// Avoid early destruction of process_list_entry if it was not saved to `res` yet (in case of exception) ProcessList::EntryPtr process_list_entry; BlockIO res; - std::shared_ptr implicit_txn_control{}; + auto implicit_txn_control = std::make_shared(false); String query_database; String query_table; + auto execute_implicit_tcl_query = [implicit_txn_control](const ContextMutablePtr & query_context, ASTTransactionControl::QueryType tcl_type) + { + /// Unset the flag on COMMIT and ROLLBACK + SCOPE_EXIT({ if (tcl_type != ASTTransactionControl::BEGIN) *implicit_txn_control = false; }); + + ASTPtr tcl_ast = std::make_shared(tcl_type); + InterpreterTransactionControlQuery tc(tcl_ast, query_context); + tc.execute(); + + /// Set the flag after successful BIGIN + if (tcl_type == ASTTransactionControl::BEGIN) + *implicit_txn_control = true; + }; + try { if (auto txn = context->getCurrentTransaction()) @@ -674,14 +688,7 @@ static std::tuple executeQueryImpl( if (context->isGlobalContext()) throw Exception(ErrorCodes::LOGICAL_ERROR, "Global context cannot create transactions"); - /// If there is no session (which is the default for the HTTP Handler), set up one just for this as it is necessary - /// to control the transaction lifetime - if (!context->hasSessionContext()) - context->makeSessionContext(); - - auto tc = std::make_shared(ast, context); - tc->executeBegin(context->getSessionContext()); - implicit_txn_control = std::move(tc); + execute_implicit_tcl_query(context, ASTTransactionControl::BEGIN); } catch (Exception & e) { @@ -949,6 +956,7 @@ static std::tuple executeQueryImpl( log_processors_profiles = settings.log_processors_profiles, status_info_to_query_log, implicit_txn_control, + execute_implicit_tcl_query, pulling_pipeline = pipeline.pulling(), query_span](QueryPipeline & query_pipeline) mutable { @@ -1062,21 +1070,8 @@ static std::tuple executeQueryImpl( } } - if (implicit_txn_control) - { - try - { - implicit_txn_control->executeCommit(context->getSessionContext()); - implicit_txn_control.reset(); - } - catch (const Exception &) - { - /// An exception might happen when trying to commit the transaction. For example we might get an immediate exception - /// because ZK is down and wait_changes_become_visible_after_commit_mode == WAIT_UNKNOWN - implicit_txn_control.reset(); - throw; - } - } + if (*implicit_txn_control) + execute_implicit_tcl_query(context, ASTTransactionControl::COMMIT); } if (query_span) @@ -1104,13 +1099,11 @@ static std::tuple executeQueryImpl( quota(quota), status_info_to_query_log, implicit_txn_control, + execute_implicit_tcl_query, query_span](bool log_error) mutable { - if (implicit_txn_control) - { - implicit_txn_control->executeRollback(context->getSessionContext()); - implicit_txn_control.reset(); - } + if (*implicit_txn_control) + execute_implicit_tcl_query(context, ASTTransactionControl::ROLLBACK); else if (auto txn = context->getCurrentTransaction()) txn->onException(); @@ -1179,15 +1172,10 @@ static std::tuple executeQueryImpl( } catch (...) { - if (implicit_txn_control) - { - implicit_txn_control->executeRollback(context->getSessionContext()); - implicit_txn_control.reset(); - } + if (*implicit_txn_control) + execute_implicit_tcl_query(context, ASTTransactionControl::ROLLBACK); else if (auto txn = context->getCurrentTransaction()) - { txn->onException(); - } if (!internal) onExceptionBeforeStart(query_for_logging, context, ast, query_span, start_watch.elapsedMilliseconds()); diff --git a/tests/queries/0_stateless/02345_implicit_transaction.reference b/tests/queries/0_stateless/02345_implicit_transaction.reference index e4dd35600f7..fb4254ec5a7 100644 --- a/tests/queries/0_stateless/02345_implicit_transaction.reference +++ b/tests/queries/0_stateless/02345_implicit_transaction.reference @@ -12,3 +12,6 @@ in_transaction 10000 out_transaction 0 {"'implicit_True'":"implicit_True","all":"2","is_empty":0} {"'implicit_False'":"implicit_False","all":"2","is_empty":1} +0 +0 +0 diff --git a/tests/queries/0_stateless/02345_implicit_transaction.sql b/tests/queries/0_stateless/02345_implicit_transaction.sql index e3f9cca37d1..b0cb4ab6305 100644 --- a/tests/queries/0_stateless/02345_implicit_transaction.sql +++ b/tests/queries/0_stateless/02345_implicit_transaction.sql @@ -1,4 +1,4 @@ --- Tags: no-ordinary-database +-- Tags: no-ordinary-database, no-fasttest CREATE TABLE landing (n Int64) engine=MergeTree order by n; CREATE TABLE target (n Int64) engine=MergeTree order by n; @@ -92,3 +92,13 @@ WHERE query LIKE '-- Verify that the transaction_id column is NOT populated without transaction%' GROUP BY transaction_id FORMAT JSONEachRow; + +SET implicit_transaction=1; +SET throw_on_unsupported_query_inside_transaction=1; +SELECT * FROM system.one; +SELECT * FROM cluster('test_cluster_interserver_secret', system, one); -- { serverError NOT_IMPLEMENTED } +SELECT * FROM cluster('test_cluster_two_shards', system, one); -- { serverError NOT_IMPLEMENTED } +SET throw_on_unsupported_query_inside_transaction=0; +-- there's not session in the interserver mode +SELECT * FROM cluster('test_cluster_interserver_secret', system, one) FORMAT Null; -- { serverError INVALID_TRANSACTION } +SELECT * FROM cluster('test_cluster_two_shards', system, one); From 95beedc8a4bb3fc8bd33318b825d3718bdff945c Mon Sep 17 00:00:00 2001 From: Dmitry Novik Date: Wed, 8 Mar 2023 15:56:13 +0000 Subject: [PATCH 627/841] Fix 02343_group_by_use_nulls test --- tests/queries/0_stateless/02343_group_by_use_nulls.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/queries/0_stateless/02343_group_by_use_nulls.sql b/tests/queries/0_stateless/02343_group_by_use_nulls.sql index a979a78be0d..e1d4021a943 100644 --- a/tests/queries/0_stateless/02343_group_by_use_nulls.sql +++ b/tests/queries/0_stateless/02343_group_by_use_nulls.sql @@ -1,3 +1,4 @@ +set optimize_group_by_function_keys=0; -- { echoOn } SELECT number, number % 2, sum(number) AS val FROM numbers(10) From 52767ea186da08f8a48f5ee2941c1a86d20b0521 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Wed, 8 Mar 2023 19:25:08 +0300 Subject: [PATCH 628/841] Update 02368_cancel_write_into_hdfs.sh --- tests/queries/0_stateless/02368_cancel_write_into_hdfs.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/queries/0_stateless/02368_cancel_write_into_hdfs.sh b/tests/queries/0_stateless/02368_cancel_write_into_hdfs.sh index 8262cd7eab5..65d0b3f434f 100755 --- a/tests/queries/0_stateless/02368_cancel_write_into_hdfs.sh +++ b/tests/queries/0_stateless/02368_cancel_write_into_hdfs.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash -# Tags: no-fasttest, no-stress +# Tags: no-fasttest, no-asan, no-tsan, no-msan, no-ubsan, no-debug +# FIXME https://github.com/ClickHouse/ClickHouse/issues/47207 CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh From c3b9af96c460077d364c7d8e95e73340456d6281 Mon Sep 17 00:00:00 2001 From: Anton Popov Date: Wed, 8 Mar 2023 17:19:04 +0000 Subject: [PATCH 629/841] fix ALTER CLEAR COLUMN with sparse columns --- src/Storages/MergeTree/MergeTask.cpp | 40 ++++++++++++++++++- src/Storages/MergeTree/MutateTask.cpp | 6 +++ ...2675_sparse_columns_clear_column.reference | 6 +++ .../02675_sparse_columns_clear_column.sql | 34 ++++++++++++++++ 4 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 tests/queries/0_stateless/02675_sparse_columns_clear_column.reference create mode 100644 tests/queries/0_stateless/02675_sparse_columns_clear_column.sql diff --git a/src/Storages/MergeTree/MergeTask.cpp b/src/Storages/MergeTree/MergeTask.cpp index b961b70428e..9d9d8420e2c 100644 --- a/src/Storages/MergeTree/MergeTask.cpp +++ b/src/Storages/MergeTree/MergeTask.cpp @@ -96,6 +96,32 @@ static void extractMergingAndGatheringColumns( } } +static void addMissedColumnsToSerializationInfos( + size_t num_rows_in_parts, + const Names & part_columns, + const ColumnsDescription & storage_columns, + const SerializationInfo::Settings & info_settings, + SerializationInfoByName & new_infos) +{ + NameSet part_columns_set(part_columns.begin(), part_columns.end()); + + for (const auto & column : storage_columns) + { + if (part_columns_set.contains(column.name)) + continue; + + if (column.default_desc.kind != ColumnDefaultKind::Default) + continue; + + if (column.default_desc.expression) + continue; + + auto new_info = column.type->createSerializationInfo(info_settings); + new_info->addDefaults(num_rows_in_parts); + new_infos.emplace(column.name, std::move(new_info)); + } +} + bool MergeTask::ExecuteAndFinalizeHorizontalPart::prepare() { @@ -205,7 +231,19 @@ bool MergeTask::ExecuteAndFinalizeHorizontalPart::prepare() ctx->force_ttl = true; } - infos.add(part->getSerializationInfos()); + if (!info_settings.isAlwaysDefault()) + { + auto part_infos = part->getSerializationInfos(); + + addMissedColumnsToSerializationInfos( + part->rows_count, + part->getColumns().getNames(), + global_ctx->metadata_snapshot->getColumns(), + info_settings, + part_infos); + + infos.add(part_infos); + } } global_ctx->new_data_part->setColumns(global_ctx->storage_columns, infos); diff --git a/src/Storages/MergeTree/MutateTask.cpp b/src/Storages/MergeTree/MutateTask.cpp index bcb1d5d2c28..526f869a3ac 100644 --- a/src/Storages/MergeTree/MutateTask.cpp +++ b/src/Storages/MergeTree/MutateTask.cpp @@ -626,6 +626,12 @@ static NameToNameVector collectFilesForRenames( } } + if (!source_part->getSerializationInfos().empty() + && new_part->getSerializationInfos().empty()) + { + rename_vector.emplace_back(IMergeTreeDataPart::SERIALIZATION_FILE_NAME, ""); + } + return rename_vector; } diff --git a/tests/queries/0_stateless/02675_sparse_columns_clear_column.reference b/tests/queries/0_stateless/02675_sparse_columns_clear_column.reference new file mode 100644 index 00000000000..56fa4a9ebea --- /dev/null +++ b/tests/queries/0_stateless/02675_sparse_columns_clear_column.reference @@ -0,0 +1,6 @@ +arr Default +v Sparse +arr Default +arr Default +v Sparse +0 [] diff --git a/tests/queries/0_stateless/02675_sparse_columns_clear_column.sql b/tests/queries/0_stateless/02675_sparse_columns_clear_column.sql new file mode 100644 index 00000000000..781030ef7b4 --- /dev/null +++ b/tests/queries/0_stateless/02675_sparse_columns_clear_column.sql @@ -0,0 +1,34 @@ +DROP TABLE IF EXISTS t_sparse_columns_clear; + +CREATE TABLE t_sparse_columns_clear (arr Array(UInt64), v UInt64) +ENGINE = MergeTree ORDER BY tuple() +SETTINGS + ratio_of_defaults_for_sparse_serialization = 0.9, + min_bytes_for_wide_part=0; + +INSERT INTO t_sparse_columns_clear SELECT [number], 0 FROM numbers(1000); + +SELECT column, serialization_kind FROM system.parts_columns +WHERE database = currentDatabase() AND table = 't_sparse_columns_clear' AND active +ORDER BY column; + +SET mutations_sync = 2; +SET alter_sync = 2; + +ALTER TABLE t_sparse_columns_clear CLEAR COLUMN v; + +SELECT column, serialization_kind FROM system.parts_columns +WHERE database = currentDatabase() AND table = 't_sparse_columns_clear' AND active +ORDER BY column; + +OPTIMIZE TABLE t_sparse_columns_clear FINAL; + +SELECT column, serialization_kind FROM system.parts_columns +WHERE database = currentDatabase() AND table = 't_sparse_columns_clear' AND active +ORDER BY column; + +DROP TABLE t_sparse_columns_clear SYNC; + +SYSTEM FLUSH LOGS; + +SELECT count(), groupArray(message) FROM system.text_log WHERE logger_name LIKE '%' || currentDatabase() || '.t_sparse_columns_clear' || '%' AND level = 'Error'; From cfa7119fa70a8b615583a7825a2455b495529658 Mon Sep 17 00:00:00 2001 From: Igor Nikonov Date: Wed, 8 Mar 2023 17:56:33 +0000 Subject: [PATCH 630/841] Fix: apply reading in order for distinct + respect aliases --- .../Optimizations/distinctReadInOrder.cpp | 86 +++++++++++++++++-- 1 file changed, 80 insertions(+), 6 deletions(-) diff --git a/src/Processors/QueryPlan/Optimizations/distinctReadInOrder.cpp b/src/Processors/QueryPlan/Optimizations/distinctReadInOrder.cpp index d584a27f16e..e5a2a83c3c3 100644 --- a/src/Processors/QueryPlan/Optimizations/distinctReadInOrder.cpp +++ b/src/Processors/QueryPlan/Optimizations/distinctReadInOrder.cpp @@ -1,5 +1,7 @@ #include #include +#include +#include #include #include #include @@ -7,6 +9,54 @@ namespace DB::QueryPlanOptimizations { +/// build actions DAG from stack of steps +static ActionsDAGPtr buildActionsForPlanPath(std::vector & dag_stack) +{ + if (dag_stack.empty()) + return nullptr; + + ActionsDAGPtr path_actions = dag_stack.back()->clone(); + dag_stack.pop_back(); + while (!dag_stack.empty()) + { + ActionsDAGPtr clone = dag_stack.back()->clone(); + dag_stack.pop_back(); + path_actions->mergeInplace(std::move(*clone)); + } + return path_actions; +} + +const ActionsDAG::Node * getOriginalNodeForOutputAlias(const ActionsDAGPtr & actions, const String & output_name) +{ + /// find alias in output + const ActionsDAG::Node * output_alias = nullptr; + for (const auto * node : actions->getOutputs()) + { + if (node->result_name == output_name) + { + output_alias = node; + break; + } + } + if (!output_alias) + { + // logDebug("getOriginalNodeForOutputAlias: no output alias found", output_name); + return nullptr; + } + + /// find original(non alias) node it refers to + const ActionsDAG::Node * node = output_alias; + while (node && node->type == ActionsDAG::ActionType::ALIAS) + { + chassert(!node->children.empty()); + node = node->children.front(); + } + if (node && node->type != ActionsDAG::ActionType::INPUT) + return nullptr; + + return node; +} + size_t tryDistinctReadInOrder(QueryPlan::Node * parent_node) { /// check if it is preliminary distinct node @@ -24,6 +74,7 @@ size_t tryDistinctReadInOrder(QueryPlan::Node * parent_node) /// (2) gather transforming steps to update their sorting properties later std::vector steps_to_update; QueryPlan::Node * node = parent_node; + std::vector dag_stack; while (!node->children.empty()) { auto * step = dynamic_cast(node->step.get()); @@ -36,6 +87,11 @@ size_t tryDistinctReadInOrder(QueryPlan::Node * parent_node) steps_to_update.push_back(step); + if (const auto * const expr = typeid_cast(step); expr) + dag_stack.push_back(expr->getExpression()); + else if (const auto * const filter = typeid_cast(step); filter) + dag_stack.push_back(filter->getExpression()); + node = node->children.front(); } @@ -44,19 +100,30 @@ size_t tryDistinctReadInOrder(QueryPlan::Node * parent_node) if (!read_from_merge_tree) return 0; + LOG_DEBUG(&Poco::Logger::get(__PRETTY_FUNCTION__), "ReadFromMergeTree"); + /// if reading from merge tree doesn't provide any output order, we can do nothing /// it means that no ordering can provided or supported for a particular sorting key /// for example, tuple() or sipHash(string) if (read_from_merge_tree->getOutputStream().sort_description.empty()) return 0; - /// find non-const columns in DISTINCT + LOG_DEBUG(&Poco::Logger::get(__PRETTY_FUNCTION__), "There is sort description"); + + /// find original non-const columns in DISTINCT + auto actions = buildActionsForPlanPath(dag_stack); const ColumnsWithTypeAndName & distinct_columns = pre_distinct->getOutputStream().header.getColumnsWithTypeAndName(); - std::set non_const_columns; + std::set original_distinct_columns; for (const auto & column : distinct_columns) { - if (!isColumnConst(*column.column)) - non_const_columns.emplace(column.name); + if (isColumnConst(*column.column)) + continue; + + const auto * input_node = getOriginalNodeForOutputAlias(actions, column.name); + if (!input_node) + break; + + original_distinct_columns.insert(input_node->result_name); } const Names& sorting_key_columns = read_from_merge_tree->getStorageMetadata()->getSortingKeyColumns(); @@ -64,15 +131,19 @@ size_t tryDistinctReadInOrder(QueryPlan::Node * parent_node) size_t number_of_sorted_distinct_columns = 0; for (const auto & column_name : sorting_key_columns) { - if (non_const_columns.end() == non_const_columns.find(column_name)) + if (original_distinct_columns.end() == original_distinct_columns.find(column_name)) break; ++number_of_sorted_distinct_columns; } + /// apply optimization only when distinct columns match or form prefix of sorting key /// todo: check if reading in order optimization would be beneficial when sorting key is prefix of columns in DISTINCT - if (number_of_sorted_distinct_columns != non_const_columns.size()) + if (number_of_sorted_distinct_columns != original_distinct_columns.size()) + { + LOG_DEBUG(&Poco::Logger::get(__PRETTY_FUNCTION__), "number_of_sorted_distinct_columns != original_distinct_columns.size()"); return 0; + } /// check if another read in order optimization is already applied /// apply optimization only if another read in order one uses less sorting columns @@ -88,7 +159,10 @@ size_t tryDistinctReadInOrder(QueryPlan::Node * parent_node) const int direction = 0; /// for DISTINCT direction doesn't matter, ReadFromMergeTree will choose proper one bool can_read = read_from_merge_tree->requestReadingInOrder(number_of_sorted_distinct_columns, direction, pre_distinct->getLimitHint()); if (!can_read) + { + LOG_DEBUG(&Poco::Logger::get(__PRETTY_FUNCTION__), "Can't read in order"); return 0; + } /// update data stream's sorting properties for found transforms const DataStream * input_stream = &read_from_merge_tree->getOutputStream(); From 86afb8a72d7143c6662cdcdf2beed79c2c2315f6 Mon Sep 17 00:00:00 2001 From: Yakov Olkhovskiy Date: Thu, 9 Mar 2023 02:24:37 +0000 Subject: [PATCH 631/841] shortcut for trivial case, fix test, fix comment --- src/Analyzer/QueryTreeBuilder.cpp | 52 +++++++++++-------- .../02565_analyzer_limit_settings.reference | 1 - 2 files changed, 30 insertions(+), 23 deletions(-) diff --git a/src/Analyzer/QueryTreeBuilder.cpp b/src/Analyzer/QueryTreeBuilder.cpp index 34a75dd0c33..7dd988619ac 100644 --- a/src/Analyzer/QueryTreeBuilder.cpp +++ b/src/Analyzer/QueryTreeBuilder.cpp @@ -356,7 +356,7 @@ QueryTreeNodePtr QueryTreeBuilder::buildSelectExpression(const ASTPtr & select_q current_query_tree->getLimitByNode() = buildExpressionList(select_limit_by, current_context); /// Combine limit expression with limit and offset settings into final limit expression - /// The sequence of application is next - offset expression, limit expression, offset setting, limit setting. + /// The sequence of application is the following - offset expression, limit expression, offset setting, limit setting. /// Since offset setting is applied after limit expression, but we want to transfer settings into expression /// we must decrease limit expression by offset setting and then add offset setting to offset expression. /// select_limit - limit expression @@ -377,32 +377,40 @@ QueryTreeNodePtr QueryTreeBuilder::buildSelectExpression(const ASTPtr & select_q auto select_limit = select_query_typed.limitLength(); if (select_limit) { - /// expr 3 - auto expr_3 = std::make_shared("minus"); - expr_3->getArguments().getNodes().push_back(buildExpression(select_limit, current_context)); - expr_3->getArguments().getNodes().push_back(std::make_shared(offset)); + /// Shortcut + if (offset == 0 && limit == 0) + { + current_query_tree->getLimit() = buildExpression(select_limit, current_context); + } + else + { + /// expr 3 + auto expr_3 = std::make_shared("minus"); + expr_3->getArguments().getNodes().push_back(buildExpression(select_limit, current_context)); + expr_3->getArguments().getNodes().push_back(std::make_shared(offset)); - /// expr 2 - auto expr_2 = std::make_shared("least"); - expr_2->getArguments().getNodes().push_back(expr_3->clone()); - expr_2->getArguments().getNodes().push_back(std::make_shared(limit)); + /// expr 2 + auto expr_2 = std::make_shared("least"); + expr_2->getArguments().getNodes().push_back(expr_3->clone()); + expr_2->getArguments().getNodes().push_back(std::make_shared(limit)); - /// expr 0 - auto expr_0 = std::make_shared("greaterOrEquals"); - expr_0->getArguments().getNodes().push_back(std::make_shared(offset)); - expr_0->getArguments().getNodes().push_back(buildExpression(select_limit, current_context)); + /// expr 0 + auto expr_0 = std::make_shared("greaterOrEquals"); + expr_0->getArguments().getNodes().push_back(std::make_shared(offset)); + expr_0->getArguments().getNodes().push_back(buildExpression(select_limit, current_context)); - /// expr 1 - auto expr_1 = std::make_shared(limit > 0); + /// expr 1 + auto expr_1 = std::make_shared(limit > 0); - auto function_node = std::make_shared("multiIf"); - function_node->getArguments().getNodes().push_back(expr_0); - function_node->getArguments().getNodes().push_back(std::make_shared(0)); - function_node->getArguments().getNodes().push_back(expr_1); - function_node->getArguments().getNodes().push_back(expr_2); - function_node->getArguments().getNodes().push_back(expr_3); + auto function_node = std::make_shared("multiIf"); + function_node->getArguments().getNodes().push_back(expr_0); + function_node->getArguments().getNodes().push_back(std::make_shared(0)); + function_node->getArguments().getNodes().push_back(expr_1); + function_node->getArguments().getNodes().push_back(expr_2); + function_node->getArguments().getNodes().push_back(expr_3); - current_query_tree->getLimit() = std::move(function_node); + current_query_tree->getLimit() = std::move(function_node); + } } else if (limit > 0) current_query_tree->getLimit() = std::make_shared(limit); diff --git a/tests/queries/0_stateless/02565_analyzer_limit_settings.reference b/tests/queries/0_stateless/02565_analyzer_limit_settings.reference index 6f23097612e..87e9f407cc8 100644 --- a/tests/queries/0_stateless/02565_analyzer_limit_settings.reference +++ b/tests/queries/0_stateless/02565_analyzer_limit_settings.reference @@ -62,7 +62,6 @@ SELECT * FROM numbers(10); SELECT * FROM numbers(10) LIMIT 3 OFFSET 2; 3 4 -5 SELECT * FROM numbers(10) LIMIT 5 OFFSET 2; 3 4 From 1728d6ed2c15f363fccf2091d819a042e1ded820 Mon Sep 17 00:00:00 2001 From: Derek Chia Date: Thu, 9 Mar 2023 11:44:27 +0800 Subject: [PATCH 632/841] Update settings.md - Change Prometheus port to 9363 as listed in https://clickhouse.com/docs/en/guides/sre/network-ports/ --- .../server-configuration-parameters/settings.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/en/operations/server-configuration-parameters/settings.md b/docs/en/operations/server-configuration-parameters/settings.md index 3fe815bc79a..99daddeeb99 100644 --- a/docs/en/operations/server-configuration-parameters/settings.md +++ b/docs/en/operations/server-configuration-parameters/settings.md @@ -1318,12 +1318,12 @@ Settings: ``` xml - /metrics - 8001 - true - true - true - + /metrics + 9363 + true + true + true + ``` ## query_log {#server_configuration_parameters-query-log} From 82efbf01aa03aa144392b7d4e33e4d712cf25a18 Mon Sep 17 00:00:00 2001 From: Konstantin Morozov Date: Thu, 9 Mar 2023 08:28:55 +0100 Subject: [PATCH 633/841] fix empty pipe for read --- src/Storages/StorageMemory.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/Storages/StorageMemory.cpp b/src/Storages/StorageMemory.cpp index 6bdaa753ad7..dd5b2422edd 100644 --- a/src/Storages/StorageMemory.cpp +++ b/src/Storages/StorageMemory.cpp @@ -318,14 +318,21 @@ void StorageMemory::read( QueryPlan & query_plan, const Names & column_names, const StorageSnapshotPtr & storage_snapshot, - SelectQueryInfo & /*query_info*/, - ContextPtr /*context*/, + SelectQueryInfo & query_info, + ContextPtr context, QueryProcessingStage::Enum /*processed_stage*/, size_t /*max_block_size*/, size_t num_streams) { - auto reading = std::make_unique(column_names, storage_snapshot, num_streams, delay_read_for_global_subqueries); - query_plan.addStep(std::move(reading)); + auto read_step = std::make_unique(column_names, storage_snapshot, num_streams, delay_read_for_global_subqueries); + auto pipe = read_step->preparePipe(); + if (pipe.empty()) + { + auto header = storage_snapshot->getSampleBlockForColumns(column_names); + InterpreterSelectQuery::addEmptySourceToQueryPlan(query_plan, header, query_info, context); + return; + } + query_plan.addStep(std::move(read_step)); } From 0ad436aa2c25d534b7b05d48b14a5537ad4e1f88 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Thu, 9 Mar 2023 08:07:59 +0000 Subject: [PATCH 634/841] Revert debug changes --- src/Coordination/Changelog.cpp | 7 ------- tests/config/config.d/keeper_port.xml | 1 - 2 files changed, 8 deletions(-) diff --git a/src/Coordination/Changelog.cpp b/src/Coordination/Changelog.cpp index 13da4dffac8..ddedae4fa0f 100644 --- a/src/Coordination/Changelog.cpp +++ b/src/Coordination/Changelog.cpp @@ -211,20 +211,13 @@ public: void flush() { auto * file_buffer = tryGetFileBuffer(); - LOG_TRACE(log, "Trying to flush"); if (file_buffer) { /// Fsync file system if needed if (log_file_settings.force_sync) - { file_buffer->sync(); - } else - { - LOG_TRACE(log, "Flushing with next, in buffer {}", file_buffer->offset()); file_buffer->next(); - LOG_TRACE(log, "Flushed in total {}", file_buffer->count()); - } } } diff --git a/tests/config/config.d/keeper_port.xml b/tests/config/config.d/keeper_port.xml index 6c60c8936a9..cffd325e968 100644 --- a/tests/config/config.d/keeper_port.xml +++ b/tests/config/config.d/keeper_port.xml @@ -14,7 +14,6 @@ 1000000000000000 100000 - trace 0 From 4686eb3cdd88c96d5f3978aaf5c8b37ff41d51fc Mon Sep 17 00:00:00 2001 From: Konstantin Morozov Date: Thu, 9 Mar 2023 09:57:23 +0100 Subject: [PATCH 635/841] refactoring: create new step only once --- src/Storages/StorageMemory.cpp | 77 ++++++++++++++++++---------------- 1 file changed, 42 insertions(+), 35 deletions(-) diff --git a/src/Storages/StorageMemory.cpp b/src/Storages/StorageMemory.cpp index dd5b2422edd..b58c4dcb07d 100644 --- a/src/Storages/StorageMemory.cpp +++ b/src/Storages/StorageMemory.cpp @@ -193,31 +193,47 @@ private: }; -class ReadFromMemoryStorage final : public ISourceStep +class ReadFromMemoryStorageStep final : public ISourceStep { public: - ReadFromMemoryStorage(const Names & columns_to_read_, - const StorageSnapshotPtr & storage_snapshot_, - const size_t num_streams_, - const bool delay_read_for_global_subqueries_) : + ReadFromMemoryStorageStep(const Names & columns_to_read_, + const StorageSnapshotPtr & storage_snapshot_, + const size_t num_streams_, + const bool delay_read_for_global_subqueries_) : ISourceStep(DataStream{.header = storage_snapshot_->getSampleBlockForColumns(columns_to_read_)}), - storage_snapshot(storage_snapshot_), - columns_to_read(columns_to_read_), - num_streams(num_streams_), - delay_read_for_global_subqueries(delay_read_for_global_subqueries_) + pipe(makePipe(columns_to_read_, storage_snapshot_, num_streams_, delay_read_for_global_subqueries_)) { } + explicit ReadFromMemoryStorageStep(Pipe pipe_) : + ISourceStep(DataStream{.header = pipe_.getHeader()}), + pipe(std::move(pipe_)) + { + } + + ReadFromMemoryStorageStep() = delete; + ReadFromMemoryStorageStep(const ReadFromMemoryStorageStep&) = delete; + ReadFromMemoryStorageStep& operator=(const ReadFromMemoryStorageStep&) = delete; + String getName() const override { return name; } - Pipe preparePipe() + void initializePipeline(QueryPipelineBuilder & pipeline, const BuildQueryPipelineSettings &) override { - storage_snapshot->check(columns_to_read); + // use move - make sure that the call will only be made once. + pipeline.init(std::move(pipe)); + } - const auto & snapshot_data = assert_cast(*storage_snapshot->data); + static Pipe makePipe(const Names & columns_to_read_, + const StorageSnapshotPtr & storage_snapshot_, + size_t num_streams_, + const bool delay_read_for_global_subqueries_) + { + storage_snapshot_->check(columns_to_read_); + + const auto & snapshot_data = assert_cast(*storage_snapshot_->data); auto current_data = snapshot_data.blocks; - if (delay_read_for_global_subqueries) + if (delay_read_for_global_subqueries_) { /// Note: for global subquery we use single source. /// Mainly, the reason is that at this point table is empty, @@ -228,8 +244,8 @@ public: /// Since no other manipulation with data is done, multiple sources shouldn't give any profit. return Pipe(std::make_shared( - columns_to_read, - storage_snapshot, + columns_to_read_, + storage_snapshot_, nullptr /* data */, nullptr /* parallel execution index */, [current_data](std::shared_ptr & data_to_initialize) @@ -240,32 +256,23 @@ public: size_t size = current_data->size(); - if (num_streams > size) - num_streams = size; + if (num_streams_ > size) + num_streams_ = size; Pipes pipes; auto parallel_execution_index = std::make_shared>(0); - for (size_t stream = 0; stream < num_streams; ++stream) + for (size_t stream = 0; stream < num_streams_; ++stream) { - pipes.emplace_back(std::make_shared(columns_to_read, storage_snapshot, current_data, parallel_execution_index)); + pipes.emplace_back(std::make_shared(columns_to_read_, storage_snapshot_, current_data, parallel_execution_index)); } return Pipe::unitePipes(std::move(pipes)); } - void initializePipeline(QueryPipelineBuilder & pipeline, const BuildQueryPipelineSettings &) override - { - pipeline.init(preparePipe()); - } - private: static constexpr auto name = "ReadFromMemoryStorage"; - - StorageSnapshotPtr storage_snapshot; - Names columns_to_read; - size_t num_streams; - const bool delay_read_for_global_subqueries; + Pipe pipe; }; @@ -310,8 +317,7 @@ Pipe StorageMemory::read( size_t /*max_block_size*/, size_t num_streams) { - auto reading = std::make_unique(column_names, storage_snapshot, num_streams, delay_read_for_global_subqueries); - return reading->preparePipe(); + return ReadFromMemoryStorageStep::makePipe(column_names, storage_snapshot, num_streams, delay_read_for_global_subqueries); } void StorageMemory::read( @@ -320,18 +326,19 @@ void StorageMemory::read( const StorageSnapshotPtr & storage_snapshot, SelectQueryInfo & query_info, ContextPtr context, - QueryProcessingStage::Enum /*processed_stage*/, - size_t /*max_block_size*/, + QueryProcessingStage::Enum processed_stage, + size_t max_block_size, size_t num_streams) { - auto read_step = std::make_unique(column_names, storage_snapshot, num_streams, delay_read_for_global_subqueries); - auto pipe = read_step->preparePipe(); + // @TODO it looks like IStorage::readFromPipe. different only step's type. + auto pipe = read(column_names, storage_snapshot, query_info, context, processed_stage, max_block_size, num_streams); if (pipe.empty()) { auto header = storage_snapshot->getSampleBlockForColumns(column_names); InterpreterSelectQuery::addEmptySourceToQueryPlan(query_plan, header, query_info, context); return; } + auto read_step = std::make_unique(std::move(pipe)); query_plan.addStep(std::move(read_step)); } From 255102292c2b74f989a28f8dc36176b40a06e71f Mon Sep 17 00:00:00 2001 From: Konstantin Morozov Date: Thu, 9 Mar 2023 10:02:16 +0100 Subject: [PATCH 636/841] refactoring: remove uselees ctor --- src/Storages/StorageMemory.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/Storages/StorageMemory.cpp b/src/Storages/StorageMemory.cpp index b58c4dcb07d..5df644bf48e 100644 --- a/src/Storages/StorageMemory.cpp +++ b/src/Storages/StorageMemory.cpp @@ -196,15 +196,6 @@ private: class ReadFromMemoryStorageStep final : public ISourceStep { public: - ReadFromMemoryStorageStep(const Names & columns_to_read_, - const StorageSnapshotPtr & storage_snapshot_, - const size_t num_streams_, - const bool delay_read_for_global_subqueries_) : - ISourceStep(DataStream{.header = storage_snapshot_->getSampleBlockForColumns(columns_to_read_)}), - pipe(makePipe(columns_to_read_, storage_snapshot_, num_streams_, delay_read_for_global_subqueries_)) - { - } - explicit ReadFromMemoryStorageStep(Pipe pipe_) : ISourceStep(DataStream{.header = pipe_.getHeader()}), pipe(std::move(pipe_)) @@ -212,8 +203,11 @@ public: } ReadFromMemoryStorageStep() = delete; - ReadFromMemoryStorageStep(const ReadFromMemoryStorageStep&) = delete; - ReadFromMemoryStorageStep& operator=(const ReadFromMemoryStorageStep&) = delete; + ReadFromMemoryStorageStep(const ReadFromMemoryStorageStep &) = delete; + ReadFromMemoryStorageStep & operator=(const ReadFromMemoryStorageStep &) = delete; + + ReadFromMemoryStorageStep(ReadFromMemoryStorageStep &&) = default; + ReadFromMemoryStorageStep & operator=(ReadFromMemoryStorageStep &&) = default; String getName() const override { return name; } From feefce7de505ad64c2130952e5afd4075ca46e43 Mon Sep 17 00:00:00 2001 From: Igor Nikonov Date: Thu, 9 Mar 2023 09:23:05 +0000 Subject: [PATCH 637/841] Test + remove debug logging --- .../QueryPlan/Optimizations/distinctReadInOrder.cpp | 12 +----------- ...2676_distinct_reading_in_order_analyzer.reference | 1 + .../02676_distinct_reading_in_order_analyzer.sql | 8 ++++++++ 3 files changed, 10 insertions(+), 11 deletions(-) create mode 100644 tests/queries/0_stateless/02676_distinct_reading_in_order_analyzer.reference create mode 100644 tests/queries/0_stateless/02676_distinct_reading_in_order_analyzer.sql diff --git a/src/Processors/QueryPlan/Optimizations/distinctReadInOrder.cpp b/src/Processors/QueryPlan/Optimizations/distinctReadInOrder.cpp index e5a2a83c3c3..b29c7a9d741 100644 --- a/src/Processors/QueryPlan/Optimizations/distinctReadInOrder.cpp +++ b/src/Processors/QueryPlan/Optimizations/distinctReadInOrder.cpp @@ -26,7 +26,7 @@ static ActionsDAGPtr buildActionsForPlanPath(std::vector & dag_st return path_actions; } -const ActionsDAG::Node * getOriginalNodeForOutputAlias(const ActionsDAGPtr & actions, const String & output_name) +static const ActionsDAG::Node * getOriginalNodeForOutputAlias(const ActionsDAGPtr & actions, const String & output_name) { /// find alias in output const ActionsDAG::Node * output_alias = nullptr; @@ -39,10 +39,7 @@ const ActionsDAG::Node * getOriginalNodeForOutputAlias(const ActionsDAGPtr & act } } if (!output_alias) - { - // logDebug("getOriginalNodeForOutputAlias: no output alias found", output_name); return nullptr; - } /// find original(non alias) node it refers to const ActionsDAG::Node * node = output_alias; @@ -100,16 +97,12 @@ size_t tryDistinctReadInOrder(QueryPlan::Node * parent_node) if (!read_from_merge_tree) return 0; - LOG_DEBUG(&Poco::Logger::get(__PRETTY_FUNCTION__), "ReadFromMergeTree"); - /// if reading from merge tree doesn't provide any output order, we can do nothing /// it means that no ordering can provided or supported for a particular sorting key /// for example, tuple() or sipHash(string) if (read_from_merge_tree->getOutputStream().sort_description.empty()) return 0; - LOG_DEBUG(&Poco::Logger::get(__PRETTY_FUNCTION__), "There is sort description"); - /// find original non-const columns in DISTINCT auto actions = buildActionsForPlanPath(dag_stack); const ColumnsWithTypeAndName & distinct_columns = pre_distinct->getOutputStream().header.getColumnsWithTypeAndName(); @@ -140,10 +133,7 @@ size_t tryDistinctReadInOrder(QueryPlan::Node * parent_node) /// apply optimization only when distinct columns match or form prefix of sorting key /// todo: check if reading in order optimization would be beneficial when sorting key is prefix of columns in DISTINCT if (number_of_sorted_distinct_columns != original_distinct_columns.size()) - { - LOG_DEBUG(&Poco::Logger::get(__PRETTY_FUNCTION__), "number_of_sorted_distinct_columns != original_distinct_columns.size()"); return 0; - } /// check if another read in order optimization is already applied /// apply optimization only if another read in order one uses less sorting columns diff --git a/tests/queries/0_stateless/02676_distinct_reading_in_order_analyzer.reference b/tests/queries/0_stateless/02676_distinct_reading_in_order_analyzer.reference new file mode 100644 index 00000000000..016202cfb66 --- /dev/null +++ b/tests/queries/0_stateless/02676_distinct_reading_in_order_analyzer.reference @@ -0,0 +1 @@ +MergeTreeInOrder diff --git a/tests/queries/0_stateless/02676_distinct_reading_in_order_analyzer.sql b/tests/queries/0_stateless/02676_distinct_reading_in_order_analyzer.sql new file mode 100644 index 00000000000..f00c1322e1d --- /dev/null +++ b/tests/queries/0_stateless/02676_distinct_reading_in_order_analyzer.sql @@ -0,0 +1,8 @@ +drop table if exists t; + +set allow_experimental_analyzer=1; + +create table t (a UInt64, b UInt64) engine=MergeTree() order by (a); +insert into t select number % 2, number from numbers(10); + +select splitByChar(' ', trimBoth(explain))[1] from (explain pipeline select distinct a from t) where explain like '%MergeTreeInOrder%'; From 7161bbeb8850e2ec15010c8dda376af7e4b4a34d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Mar=C3=ADn?= Date: Thu, 9 Mar 2023 11:16:29 +0100 Subject: [PATCH 638/841] More improvements based on PR review --- src/Client/ClientBase.cpp | 11 +++-------- src/Client/TestHint.cpp | 10 ++++++++++ src/Client/TestHint.h | 3 +++ 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/Client/ClientBase.cpp b/src/Client/ClientBase.cpp index 4476678f0f4..876b1d1906d 100644 --- a/src/Client/ClientBase.cpp +++ b/src/Client/ClientBase.cpp @@ -1883,8 +1883,7 @@ bool ClientBase::executeMultiQuery(const String & all_queries_text) current_exception->rethrow(); } - if (std::find(hint.clientErrors().begin(), hint.clientErrors().end(), current_exception->code()) - == hint.clientErrors().end()) + if (!hint.hasExpectedClientError(current_exception->code())) { if (hint.hasClientErrors()) current_exception->addMessage("\nExpected client error: {}.", hint.clientErrors()); @@ -1944,9 +1943,7 @@ bool ClientBase::executeMultiQuery(const String & all_queries_text) fmt::print(stderr, "Expected server error code '{}' but got no server error (query: {}).\n", test_hint.serverErrors(), full_query); } - else if ( - std::find(test_hint.serverErrors().begin(), test_hint.serverErrors().end(), server_exception->code()) - == test_hint.serverErrors().end()) + else if (!test_hint.hasExpectedServerError(server_exception->code())) { error_matches_hint = false; fmt::print(stderr, "Expected server error code: {} but got: {} (query: {}).\n", @@ -1961,9 +1958,7 @@ bool ClientBase::executeMultiQuery(const String & all_queries_text) fmt::print(stderr, "Expected client error code '{}' but got no client error (query: {}).\n", test_hint.clientErrors(), full_query); } - else if ( - std::find(test_hint.clientErrors().begin(), test_hint.clientErrors().end(), client_exception->code()) - == test_hint.clientErrors().end()) + else if (!test_hint.hasExpectedClientError(client_exception->code())) { error_matches_hint = false; fmt::print(stderr, "Expected client error code '{}' but got '{}' (query: {}).\n", diff --git a/src/Client/TestHint.cpp b/src/Client/TestHint.cpp index 8cc91250721..b64882577ee 100644 --- a/src/Client/TestHint.cpp +++ b/src/Client/TestHint.cpp @@ -52,6 +52,16 @@ TestHint::TestHint(const String & query_) } } +bool TestHint::hasExpectedClientError(int error) +{ + return std::find(client_errors.begin(), client_errors.end(), error) != client_errors.end(); +} + +bool TestHint::hasExpectedServerError(int error) +{ + return std::find(server_errors.begin(), server_errors.end(), error) != server_errors.end(); +} + void TestHint::parse(Lexer & comment_lexer, bool is_leading_hint) { std::unordered_set commands{"echo", "echoOn", "echoOff"}; diff --git a/src/Client/TestHint.h b/src/Client/TestHint.h index fb1dbfb72dc..63f16b1dd97 100644 --- a/src/Client/TestHint.h +++ b/src/Client/TestHint.h @@ -62,6 +62,9 @@ public: bool hasClientErrors() { return !client_errors.empty(); } bool hasServerErrors() { return !server_errors.empty(); } + bool hasExpectedClientError(int error); + bool hasExpectedServerError(int error); + private: const String & query; ErrorVector server_errors{}; From 7bf1b8341440c90912db0d1c1f0f2e596bcf7de3 Mon Sep 17 00:00:00 2001 From: Sema Checherinda Date: Thu, 9 Mar 2023 12:37:57 +0100 Subject: [PATCH 639/841] add checks --- src/Functions/array/arrayReverse.cpp | 2 ++ src/Interpreters/OptimizeIfChains.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/src/Functions/array/arrayReverse.cpp b/src/Functions/array/arrayReverse.cpp index 912adbadc7c..654a6c4cebf 100644 --- a/src/Functions/array/arrayReverse.cpp +++ b/src/Functions/array/arrayReverse.cpp @@ -91,6 +91,8 @@ ColumnPtr FunctionArrayReverse::executeImpl(const ColumnsWithTypeAndName & argum || executeFixedString(*src_inner_col, offsets, *res_inner_col) || executeGeneric(*src_inner_col, offsets, *res_inner_col); + chassert(bool(src_nullable_col) == bool(res_nullable_col)); + if (src_nullable_col) if (!executeNumber(src_nullable_col->getNullMapColumn(), offsets, res_nullable_col->getNullMapColumn())) throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Illegal column {} of null map of the first argument of function {}", diff --git a/src/Interpreters/OptimizeIfChains.cpp b/src/Interpreters/OptimizeIfChains.cpp index ba4c7bcd95f..9a5f9bcb2e1 100644 --- a/src/Interpreters/OptimizeIfChains.cpp +++ b/src/Interpreters/OptimizeIfChains.cpp @@ -64,6 +64,7 @@ ASTs OptimizeIfChainsVisitor::ifChain(const ASTPtr & child) throw Exception(ErrorCodes::UNEXPECTED_AST_STRUCTURE, "Unexpected AST for function 'if'"); const auto * function_args = function_node->arguments->as(); + chassert(function_args); if (!function_args || function_args->children.size() != 3) throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, From 2ea3faf90caa428733a5a47a43464b04c4bbf816 Mon Sep 17 00:00:00 2001 From: Igor Nikonov Date: Thu, 9 Mar 2023 11:44:38 +0000 Subject: [PATCH 640/841] Remove distinct on top of MergingAggregatedStep as well --- .../QueryPlan/MergingAggregatedStep.h | 1 + .../Optimizations/removeRedundantDistinct.cpp | 37 +++---------------- 2 files changed, 6 insertions(+), 32 deletions(-) diff --git a/src/Processors/QueryPlan/MergingAggregatedStep.h b/src/Processors/QueryPlan/MergingAggregatedStep.h index 2dea289ca89..3a7e2b66183 100644 --- a/src/Processors/QueryPlan/MergingAggregatedStep.h +++ b/src/Processors/QueryPlan/MergingAggregatedStep.h @@ -27,6 +27,7 @@ public: bool memory_bound_merging_of_aggregation_results_enabled_); String getName() const override { return "MergingAggregated"; } + const Aggregator::Params & getParams() const { return params; } void transformPipeline(QueryPipelineBuilder & pipeline, const BuildQueryPipelineSettings &) override; diff --git a/src/Processors/QueryPlan/Optimizations/removeRedundantDistinct.cpp b/src/Processors/QueryPlan/Optimizations/removeRedundantDistinct.cpp index 02725dc3122..1887ec90d95 100644 --- a/src/Processors/QueryPlan/Optimizations/removeRedundantDistinct.cpp +++ b/src/Processors/QueryPlan/Optimizations/removeRedundantDistinct.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -63,37 +64,6 @@ namespace return non_const_columns; } - const ActionsDAG::Node * getOriginalNodeForOutputAlias(const ActionsDAGPtr & actions, const String & output_name) - { - /// find alias in output - const ActionsDAG::Node * output_alias = nullptr; - for (const auto * node : actions->getOutputs()) - { - if (node->result_name == output_name) - { - output_alias = node; - break; - } - } - if (!output_alias) - { - logDebug("getOriginalNodeForOutputAlias: no output alias found", output_name); - return nullptr; - } - - /// find original(non alias) node it refers to - const ActionsDAG::Node * node = output_alias; - while (node && node->type == ActionsDAG::ActionType::ALIAS) - { - chassert(!node->children.empty()); - node = node->children.front(); - } - if (node && node->type != ActionsDAG::ActionType::INPUT) - return nullptr; - - return node; - } - bool compareAggregationKeysWithDistinctColumns( const Names & aggregation_keys, const DistinctColumns & distinct_columns, const ActionsDAGPtr & path_actions) { @@ -176,7 +146,7 @@ namespace while (!node->children.empty()) { const IQueryPlanStep * current_step = node->step.get(); - if (typeid_cast(current_step)) + if (typeid_cast(current_step) || typeid_cast(current_step)) { aggregation_before_distinct = current_step; break; @@ -208,6 +178,9 @@ namespace if (const auto * aggregating_step = typeid_cast(aggregation_before_distinct); aggregating_step) return compareAggregationKeysWithDistinctColumns(aggregating_step->getParams().keys, distinct_columns, actions); + else if (const auto * merging_aggregated_step = typeid_cast(aggregation_before_distinct); + merging_aggregated_step) + return compareAggregationKeysWithDistinctColumns(merging_aggregated_step->getParams().keys, distinct_columns, actions); } return false; From acffc98bd1b8165bf2cf15ae031da055cdc1a9d5 Mon Sep 17 00:00:00 2001 From: Igor Nikonov Date: Thu, 9 Mar 2023 12:22:32 +0000 Subject: [PATCH 641/841] Fix build --- .../Optimizations/removeRedundantDistinct.cpp | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/Processors/QueryPlan/Optimizations/removeRedundantDistinct.cpp b/src/Processors/QueryPlan/Optimizations/removeRedundantDistinct.cpp index 1887ec90d95..bd46feeec60 100644 --- a/src/Processors/QueryPlan/Optimizations/removeRedundantDistinct.cpp +++ b/src/Processors/QueryPlan/Optimizations/removeRedundantDistinct.cpp @@ -64,6 +64,37 @@ namespace return non_const_columns; } + const ActionsDAG::Node * getOriginalNodeForOutputAlias(const ActionsDAGPtr & actions, const String & output_name) + { + /// find alias in output + const ActionsDAG::Node * output_alias = nullptr; + for (const auto * node : actions->getOutputs()) + { + if (node->result_name == output_name) + { + output_alias = node; + break; + } + } + if (!output_alias) + { + logDebug("getOriginalNodeForOutputAlias: no output alias found", output_name); + return nullptr; + } + + /// find original(non alias) node it refers to + const ActionsDAG::Node * node = output_alias; + while (node && node->type == ActionsDAG::ActionType::ALIAS) + { + chassert(!node->children.empty()); + node = node->children.front(); + } + if (node && node->type != ActionsDAG::ActionType::INPUT) + return nullptr; + + return node; + } + bool compareAggregationKeysWithDistinctColumns( const Names & aggregation_keys, const DistinctColumns & distinct_columns, const ActionsDAGPtr & path_actions) { From c9e48f37cbb4d8dc60503756815737f04a86808e Mon Sep 17 00:00:00 2001 From: vdimir Date: Mon, 6 Mar 2023 10:54:43 +0000 Subject: [PATCH 642/841] Forbid insert select for the same StorageJoin --- src/Common/RWLock.cpp | 14 ++++++-- src/Common/RWLock.h | 2 +- src/Storages/IStorage.cpp | 2 +- src/Storages/StorageJoin.cpp | 33 ++++++++++++++----- src/Storages/StorageJoin.h | 3 ++ ...rage_join_insert_select_deadlock.reference | 0 ...40_storage_join_insert_select_deadlock.sql | 16 +++++++++ 7 files changed, 56 insertions(+), 14 deletions(-) create mode 100644 tests/queries/0_stateless/25340_storage_join_insert_select_deadlock.reference create mode 100644 tests/queries/0_stateless/25340_storage_join_insert_select_deadlock.sql diff --git a/src/Common/RWLock.cpp b/src/Common/RWLock.cpp index c2419d0c1b7..2d0fcfa3e74 100644 --- a/src/Common/RWLock.cpp +++ b/src/Common/RWLock.cpp @@ -97,7 +97,7 @@ private: * Note: "SM" in the commentaries below stands for STATE MODIFICATION */ RWLockImpl::LockHolder -RWLockImpl::getLock(RWLockImpl::Type type, const String & query_id, const std::chrono::milliseconds & lock_timeout_ms) +RWLockImpl::getLock(RWLockImpl::Type type, const String & query_id, const std::chrono::milliseconds & lock_timeout_ms, bool throw_in_fast_path) { const auto lock_deadline_tp = (lock_timeout_ms == std::chrono::milliseconds(0)) @@ -130,11 +130,19 @@ RWLockImpl::getLock(RWLockImpl::Type type, const String & query_id, const std::c if (owner_query_it != owner_queries.end()) { if (wrlock_owner != writers_queue.end()) - throw Exception(ErrorCodes::LOGICAL_ERROR, "RWLockImpl::getLock(): RWLock is already locked in exclusive mode"); + { + if (throw_in_fast_path) + throw Exception(ErrorCodes::LOGICAL_ERROR, "RWLockImpl::getLock(): RWLock is already locked in exclusive mode"); + return nullptr; + } /// Lock upgrading is not supported if (type == Write) - throw Exception(ErrorCodes::LOGICAL_ERROR, "RWLockImpl::getLock(): Cannot acquire exclusive lock while RWLock is already locked"); + { + if (throw_in_fast_path) + throw Exception(ErrorCodes::LOGICAL_ERROR, "RWLockImpl::getLock(): Cannot acquire exclusive lock while RWLock is already locked"); + return nullptr; + } /// N.B. Type is Read here, query_id is not empty and it_query is a valid iterator ++owner_query_it->second; /// SM1: nothrow diff --git a/src/Common/RWLock.h b/src/Common/RWLock.h index cb4cf7f9200..dd965b65026 100644 --- a/src/Common/RWLock.h +++ b/src/Common/RWLock.h @@ -56,7 +56,7 @@ public: /// Empty query_id means the lock is acquired from outside of query context (e.g. in a background thread). LockHolder getLock(Type type, const String & query_id, - const std::chrono::milliseconds & lock_timeout_ms = std::chrono::milliseconds(0)); + const std::chrono::milliseconds & lock_timeout_ms = std::chrono::milliseconds(0), bool throw_in_fast_path = true); /// Use as query_id to acquire a lock outside the query context. inline static const String NO_QUERY = String(); diff --git a/src/Storages/IStorage.cpp b/src/Storages/IStorage.cpp index 9bcfff65c95..d50f335c1c9 100644 --- a/src/Storages/IStorage.cpp +++ b/src/Storages/IStorage.cpp @@ -40,7 +40,7 @@ RWLockImpl::LockHolder IStorage::tryLockTimed( { const String type_str = type == RWLockImpl::Type::Read ? "READ" : "WRITE"; throw Exception(ErrorCodes::DEADLOCK_AVOIDED, - "{} locking attempt on \"{}\" has timed out! ({}ms) Possible deadlock avoided. Client should retry.", + "{} locking attempt on \"{}\" has timed out! ({}ms) Possible deadlock avoided. Client should retry", type_str, getStorageID(), acquire_timeout.count()); } return lock_holder; diff --git a/src/Storages/StorageJoin.cpp b/src/Storages/StorageJoin.cpp index ab1406f9bd6..79194eb0d2d 100644 --- a/src/Storages/StorageJoin.cpp +++ b/src/Storages/StorageJoin.cpp @@ -21,21 +21,24 @@ #include #include #include -#include /// toLower +#include +#include +namespace fs = std::filesystem; namespace DB { namespace ErrorCodes { - extern const int NOT_IMPLEMENTED; - extern const int LOGICAL_ERROR; - extern const int UNSUPPORTED_JOIN_KEYS; - extern const int NO_SUCH_COLUMN_IN_TABLE; - extern const int INCOMPATIBLE_TYPE_OF_JOIN; - extern const int NUMBER_OF_ARGUMENTS_DOESNT_MATCH; extern const int BAD_ARGUMENTS; + extern const int DEADLOCK_AVOIDED; + extern const int INCOMPATIBLE_TYPE_OF_JOIN; + extern const int LOGICAL_ERROR; + extern const int NO_SUCH_COLUMN_IN_TABLE; + extern const int NOT_IMPLEMENTED; + extern const int NUMBER_OF_ARGUMENTS_DOESNT_MATCH; + extern const int UNSUPPORTED_JOIN_KEYS; } StorageJoin::StorageJoin( @@ -78,6 +81,14 @@ RWLockImpl::LockHolder StorageJoin::tryLockTimedWithContext(const RWLock & lock, return tryLockTimed(lock, type, query_id, acquire_timeout); } +RWLockImpl::LockHolder StorageJoin::tryLockForCurrentQueryTimedWithContext(const RWLock & lock, RWLockImpl::Type type, ContextPtr context) const +{ + const String query_id = context ? context->getInitialQueryId() : RWLockImpl::NO_QUERY; + const std::chrono::milliseconds acquire_timeout + = context ? context->getSettingsRef().lock_acquire_timeout : std::chrono::seconds(DBMS_DEFAULT_LOCK_ACQUIRE_TIMEOUT_SEC); + return lock->getLock(type, query_id, acquire_timeout, false); +} + SinkToStoragePtr StorageJoin::write(const ASTPtr & query, const StorageMetadataPtr & metadata_snapshot, ContextPtr context) { std::lock_guard mutate_lock(mutate_mutex); @@ -95,7 +106,7 @@ void StorageJoin::truncate(const ASTPtr &, const StorageMetadataPtr &, ContextPt LOG_INFO(&Poco::Logger::get("StorageJoin"), "Path {} is already removed from disk {}", path, disk->getName()); disk->createDirectories(path); - disk->createDirectories(path + "tmp/"); + disk->createDirectories(fs::path(path) / "tmp/"); increment = 0; join = std::make_shared(table_join, getRightSampleBlock(), overwrite); @@ -238,8 +249,12 @@ void StorageJoin::insertBlock(const Block & block, ContextPtr context) { Block block_to_insert = block; convertRightBlock(block_to_insert); + TableLockHolder holder = tryLockForCurrentQueryTimedWithContext(rwlock, RWLockImpl::Write, context); + + /// Protection from `INSERT INTO test_table_join SELECT * FROM test_table_join` + if (!holder) + throw Exception(ErrorCodes::DEADLOCK_AVOIDED, "StorageJoin: cannot insert data because current query tries to read from this storage"); - TableLockHolder holder = tryLockTimedWithContext(rwlock, RWLockImpl::Write, context); join->addJoinedBlock(block_to_insert, true); } diff --git a/src/Storages/StorageJoin.h b/src/Storages/StorageJoin.h index 61ea743c841..4497d737a3b 100644 --- a/src/Storages/StorageJoin.h +++ b/src/Storages/StorageJoin.h @@ -100,12 +100,15 @@ private: /// Protect state for concurrent use in insertFromBlock and joinBlock. /// Lock is stored in HashJoin instance during query and blocks concurrent insertions. mutable RWLock rwlock = RWLockImpl::create(); + mutable std::mutex mutate_mutex; void insertBlock(const Block & block, ContextPtr context) override; void finishInsert() override {} size_t getSize(ContextPtr context) const override; RWLockImpl::LockHolder tryLockTimedWithContext(const RWLock & lock, RWLockImpl::Type type, ContextPtr context) const; + /// Same as tryLockTimedWithContext, but returns `nullptr` if lock is already acquired by current query. + RWLockImpl::LockHolder tryLockForCurrentQueryTimedWithContext(const RWLock & lock, RWLockImpl::Type type, ContextPtr context) const; void convertRightBlock(Block & block) const; }; diff --git a/tests/queries/0_stateless/25340_storage_join_insert_select_deadlock.reference b/tests/queries/0_stateless/25340_storage_join_insert_select_deadlock.reference new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/queries/0_stateless/25340_storage_join_insert_select_deadlock.sql b/tests/queries/0_stateless/25340_storage_join_insert_select_deadlock.sql new file mode 100644 index 00000000000..59528511357 --- /dev/null +++ b/tests/queries/0_stateless/25340_storage_join_insert_select_deadlock.sql @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS test_table_join; + +CREATE TABLE test_table_join +( + id UInt64, + value String +) ENGINE = Join(Any, Left, id); + +INSERT INTO test_table_join VALUES (1, 'q'); + +INSERT INTO test_table_join SELECT * from test_table_join; -- { serverError DEADLOCK_AVOIDED } + +INSERT INTO test_table_join SELECT * FROM (SELECT 1 as id) AS t1 ANY LEFT JOIN test_table_join USING (id); -- { serverError DEADLOCK_AVOIDED } +INSERT INTO test_table_join SELECT id, toString(id) FROM (SELECT 1 as id) AS t1 ANY LEFT JOIN (SELECT id FROM test_table_join) AS t2 USING (id); -- { serverError DEADLOCK_AVOIDED } + +DROP TABLE IF EXISTS test_table_join; From 433c226b1fc6770729f3c3d76bf33f03140c5a27 Mon Sep 17 00:00:00 2001 From: Pradeep Chhetri <30620077+chhetripradeep@users.noreply.github.com> Date: Thu, 9 Mar 2023 20:51:45 +0800 Subject: [PATCH 643/841] Revert "Revert "Add join_algorithm='grace_hash' to stress tests"" (#47372) --- tests/ci/stress.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/ci/stress.py b/tests/ci/stress.py index 4f723dba101..12c40ea1f66 100755 --- a/tests/ci/stress.py +++ b/tests/ci/stress.py @@ -30,13 +30,15 @@ def get_options(i, upgrade_check): if i % 2 == 1: join_alg_num = i // 2 - if join_alg_num % 4 == 0: + if join_alg_num % 5 == 0: client_options.append("join_algorithm='parallel_hash'") - if join_alg_num % 4 == 1: + if join_alg_num % 5 == 1: client_options.append("join_algorithm='partial_merge'") - if join_alg_num % 4 == 2: + if join_alg_num % 5 == 2: client_options.append("join_algorithm='full_sorting_merge'") - if join_alg_num % 4 == 3: + if join_alg_num % 5 == 3: + client_options.append("join_algorithm='grace_hash'") + if join_alg_num % 5 == 4: client_options.append("join_algorithm='auto'") client_options.append("max_rows_in_join=1000") From 89de49ef3c3842ca47fd61cf93656ac99bd4b24c Mon Sep 17 00:00:00 2001 From: DanRoscigno Date: Thu, 9 Mar 2023 08:31:28 -0500 Subject: [PATCH 644/841] add tabs for GCS and S3 --- .../example-datasets/nyc-taxi.md | 82 +++++++++++++++---- 1 file changed, 64 insertions(+), 18 deletions(-) diff --git a/docs/en/getting-started/example-datasets/nyc-taxi.md b/docs/en/getting-started/example-datasets/nyc-taxi.md index 69098f63037..36bcb6f232e 100644 --- a/docs/en/getting-started/example-datasets/nyc-taxi.md +++ b/docs/en/getting-started/example-datasets/nyc-taxi.md @@ -5,17 +5,19 @@ sidebar_position: 2 description: Data for billions of taxi and for-hire vehicle (Uber, Lyft, etc.) trips originating in New York City since 2009 --- +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + # New York Taxi Data The New York taxi data consists of 3+ billion taxi and for-hire vehicle (Uber, Lyft, etc.) trips originating in New York City since 2009. The dataset can be obtained in a couple of ways: -- insert the data directly into ClickHouse Cloud from S3 +- insert the data directly into ClickHouse Cloud from S3 or GCS - download prepared partitions -## Retrieve the Data from S3 +## Create the table trips -Let's grab a small subset of the data for getting familiar with it. The data is in TSV files in AWS S3, which is easily streamed into -ClickHouse Cloud using the `s3` table function. Start by creating a table for the taxi rides: +Start by creating a table for the taxi rides: ```sql CREATE TABLE trips ( @@ -38,9 +40,50 @@ CREATE TABLE trips ( dropoff_ntaname LowCardinality(String) ) ENGINE = MergeTree -PRIMARY KEY (pickup_datetime, dropoff_datetime) +PRIMARY KEY (pickup_datetime, dropoff_datetime); ``` +## Retrieve the Data from Object Storage + +Let's grab a small subset of the data for getting familiar with it. The data is in TSV files in object storage, which is easily streamed into +ClickHouse Cloud using the `s3` table function. + +The same data is stored in both S3 and GCS; choose either tab. + + + + +The following command streams three files from a GCS bucket into the `trips` table (the `{0..2}` syntax is a wildcard for the values 0, 1, and 2): + +```sql +INSERT INTO trips +SELECT + trip_id, + pickup_datetime, + dropoff_datetime, + pickup_longitude, + pickup_latitude, + dropoff_longitude, + dropoff_latitude, + passenger_count, + trip_distance, + fare_amount, + extra, + tip_amount, + tolls_amount, + total_amount, + payment_type, + pickup_ntaname, + dropoff_ntaname +FROM s3( + 'https://storage.googleapis.com/clickhouse-public-datasets/nyc-taxi/trips_{0..2}.gz', + 'TabSeparatedWithNames' +); +``` + + + + The following command streams three files from an S3 bucket into the `trips` table (the `{0..2}` syntax is a wildcard for the values 0, 1, and 2): ```sql @@ -66,14 +109,17 @@ SELECT FROM s3( 'https://datasets-documentation.s3.eu-west-3.amazonaws.com/nyc-taxi/trips_{0..2}.gz', 'TabSeparatedWithNames' -) +); ``` + + + Let's see how many rows were inserted: ```sql SELECT count() -FROM trips +FROM trips; ``` Each TSV file has about 1M rows, and the three files have 3,000,317 rows. Let's look at a few rows: @@ -81,7 +127,7 @@ Each TSV file has about 1M rows, and the three files have 3,000,317 rows. Let's ```sql SELECT * FROM trips -LIMIT 10 +LIMIT 10; ``` Notice there are columns for the pickup and dropoff dates, geo coordinates, fare details, New York neighborhoods, and more: @@ -110,7 +156,7 @@ SELECT FROM trips GROUP BY pickup_ntaname ORDER BY count DESC -LIMIT 10 +LIMIT 10; ``` The result is: @@ -137,7 +183,7 @@ SELECT passenger_count, avg(total_amount) FROM trips -GROUP BY passenger_count +GROUP BY passenger_count; ``` ```response @@ -165,7 +211,7 @@ SELECT count(*) FROM trips GROUP BY passenger_count, year, distance -ORDER BY year, count(*) DESC +ORDER BY year, count(*) DESC; ``` The first part of the result is: @@ -211,7 +257,7 @@ If you will run the queries described below, you have to use the full table name Q1: ``` sql -SELECT cab_type, count(*) FROM trips_mergetree GROUP BY cab_type +SELECT cab_type, count(*) FROM trips_mergetree GROUP BY cab_type; ``` 0.490 seconds. @@ -219,7 +265,7 @@ SELECT cab_type, count(*) FROM trips_mergetree GROUP BY cab_type Q2: ``` sql -SELECT passenger_count, avg(total_amount) FROM trips_mergetree GROUP BY passenger_count +SELECT passenger_count, avg(total_amount) FROM trips_mergetree GROUP BY passenger_count; ``` 1.224 seconds. @@ -227,7 +273,7 @@ SELECT passenger_count, avg(total_amount) FROM trips_mergetree GROUP BY passenge Q3: ``` sql -SELECT passenger_count, toYear(pickup_date) AS year, count(*) FROM trips_mergetree GROUP BY passenger_count, year +SELECT passenger_count, toYear(pickup_date) AS year, count(*) FROM trips_mergetree GROUP BY passenger_count, year; ``` 2.104 seconds. @@ -238,7 +284,7 @@ Q4: SELECT passenger_count, toYear(pickup_date) AS year, round(trip_distance) AS distance, count(*) FROM trips_mergetree GROUP BY passenger_count, year, distance -ORDER BY year, count(*) DESC +ORDER BY year, count(*) DESC; ``` 3.593 seconds. @@ -254,19 +300,19 @@ Creating a table on three servers: On each server: ``` sql -CREATE TABLE default.trips_mergetree_third ( trip_id UInt32, vendor_id Enum8('1' = 1, '2' = 2, 'CMT' = 3, 'VTS' = 4, 'DDS' = 5, 'B02512' = 10, 'B02598' = 11, 'B02617' = 12, 'B02682' = 13, 'B02764' = 14), pickup_date Date, pickup_datetime DateTime, dropoff_date Date, dropoff_datetime DateTime, store_and_fwd_flag UInt8, rate_code_id UInt8, pickup_longitude Float64, pickup_latitude Float64, dropoff_longitude Float64, dropoff_latitude Float64, passenger_count UInt8, trip_distance Float64, fare_amount Float32, extra Float32, mta_tax Float32, tip_amount Float32, tolls_amount Float32, ehail_fee Float32, improvement_surcharge Float32, total_amount Float32, payment_type_ Enum8('UNK' = 0, 'CSH' = 1, 'CRE' = 2, 'NOC' = 3, 'DIS' = 4), trip_type UInt8, pickup FixedString(25), dropoff FixedString(25), cab_type Enum8('yellow' = 1, 'green' = 2, 'uber' = 3), pickup_nyct2010_gid UInt8, pickup_ctlabel Float32, pickup_borocode UInt8, pickup_boroname Enum8('' = 0, 'Manhattan' = 1, 'Bronx' = 2, 'Brooklyn' = 3, 'Queens' = 4, 'Staten Island' = 5), pickup_ct2010 FixedString(6), pickup_boroct2010 FixedString(7), pickup_cdeligibil Enum8(' ' = 0, 'E' = 1, 'I' = 2), pickup_ntacode FixedString(4), pickup_ntaname Enum16('' = 0, 'Airport' = 1, 'Allerton-Pelham Gardens' = 2, 'Annadale-Huguenot-Prince\'s Bay-Eltingville' = 3, 'Arden Heights' = 4, 'Astoria' = 5, 'Auburndale' = 6, 'Baisley Park' = 7, 'Bath Beach' = 8, 'Battery Park City-Lower Manhattan' = 9, 'Bay Ridge' = 10, 'Bayside-Bayside Hills' = 11, 'Bedford' = 12, 'Bedford Park-Fordham North' = 13, 'Bellerose' = 14, 'Belmont' = 15, 'Bensonhurst East' = 16, 'Bensonhurst West' = 17, 'Borough Park' = 18, 'Breezy Point-Belle Harbor-Rockaway Park-Broad Channel' = 19, 'Briarwood-Jamaica Hills' = 20, 'Brighton Beach' = 21, 'Bronxdale' = 22, 'Brooklyn Heights-Cobble Hill' = 23, 'Brownsville' = 24, 'Bushwick North' = 25, 'Bushwick South' = 26, 'Cambria Heights' = 27, 'Canarsie' = 28, 'Carroll Gardens-Columbia Street-Red Hook' = 29, 'Central Harlem North-Polo Grounds' = 30, 'Central Harlem South' = 31, 'Charleston-Richmond Valley-Tottenville' = 32, 'Chinatown' = 33, 'Claremont-Bathgate' = 34, 'Clinton' = 35, 'Clinton Hill' = 36, 'Co-op City' = 37, 'College Point' = 38, 'Corona' = 39, 'Crotona Park East' = 40, 'Crown Heights North' = 41, 'Crown Heights South' = 42, 'Cypress Hills-City Line' = 43, 'DUMBO-Vinegar Hill-Downtown Brooklyn-Boerum Hill' = 44, 'Douglas Manor-Douglaston-Little Neck' = 45, 'Dyker Heights' = 46, 'East Concourse-Concourse Village' = 47, 'East Elmhurst' = 48, 'East Flatbush-Farragut' = 49, 'East Flushing' = 50, 'East Harlem North' = 51, 'East Harlem South' = 52, 'East New York' = 53, 'East New York (Pennsylvania Ave)' = 54, 'East Tremont' = 55, 'East Village' = 56, 'East Williamsburg' = 57, 'Eastchester-Edenwald-Baychester' = 58, 'Elmhurst' = 59, 'Elmhurst-Maspeth' = 60, 'Erasmus' = 61, 'Far Rockaway-Bayswater' = 62, 'Flatbush' = 63, 'Flatlands' = 64, 'Flushing' = 65, 'Fordham South' = 66, 'Forest Hills' = 67, 'Fort Greene' = 68, 'Fresh Meadows-Utopia' = 69, 'Ft. Totten-Bay Terrace-Clearview' = 70, 'Georgetown-Marine Park-Bergen Beach-Mill Basin' = 71, 'Glen Oaks-Floral Park-New Hyde Park' = 72, 'Glendale' = 73, 'Gramercy' = 74, 'Grasmere-Arrochar-Ft. Wadsworth' = 75, 'Gravesend' = 76, 'Great Kills' = 77, 'Greenpoint' = 78, 'Grymes Hill-Clifton-Fox Hills' = 79, 'Hamilton Heights' = 80, 'Hammels-Arverne-Edgemere' = 81, 'Highbridge' = 82, 'Hollis' = 83, 'Homecrest' = 84, 'Hudson Yards-Chelsea-Flatiron-Union Square' = 85, 'Hunters Point-Sunnyside-West Maspeth' = 86, 'Hunts Point' = 87, 'Jackson Heights' = 88, 'Jamaica' = 89, 'Jamaica Estates-Holliswood' = 90, 'Kensington-Ocean Parkway' = 91, 'Kew Gardens' = 92, 'Kew Gardens Hills' = 93, 'Kingsbridge Heights' = 94, 'Laurelton' = 95, 'Lenox Hill-Roosevelt Island' = 96, 'Lincoln Square' = 97, 'Lindenwood-Howard Beach' = 98, 'Longwood' = 99, 'Lower East Side' = 100, 'Madison' = 101, 'Manhattanville' = 102, 'Marble Hill-Inwood' = 103, 'Mariner\'s Harbor-Arlington-Port Ivory-Graniteville' = 104, 'Maspeth' = 105, 'Melrose South-Mott Haven North' = 106, 'Middle Village' = 107, 'Midtown-Midtown South' = 108, 'Midwood' = 109, 'Morningside Heights' = 110, 'Morrisania-Melrose' = 111, 'Mott Haven-Port Morris' = 112, 'Mount Hope' = 113, 'Murray Hill' = 114, 'Murray Hill-Kips Bay' = 115, 'New Brighton-Silver Lake' = 116, 'New Dorp-Midland Beach' = 117, 'New Springville-Bloomfield-Travis' = 118, 'North Corona' = 119, 'North Riverdale-Fieldston-Riverdale' = 120, 'North Side-South Side' = 121, 'Norwood' = 122, 'Oakland Gardens' = 123, 'Oakwood-Oakwood Beach' = 124, 'Ocean Hill' = 125, 'Ocean Parkway South' = 126, 'Old Astoria' = 127, 'Old Town-Dongan Hills-South Beach' = 128, 'Ozone Park' = 129, 'Park Slope-Gowanus' = 130, 'Parkchester' = 131, 'Pelham Bay-Country Club-City Island' = 132, 'Pelham Parkway' = 133, 'Pomonok-Flushing Heights-Hillcrest' = 134, 'Port Richmond' = 135, 'Prospect Heights' = 136, 'Prospect Lefferts Gardens-Wingate' = 137, 'Queens Village' = 138, 'Queensboro Hill' = 139, 'Queensbridge-Ravenswood-Long Island City' = 140, 'Rego Park' = 141, 'Richmond Hill' = 142, 'Ridgewood' = 143, 'Rikers Island' = 144, 'Rosedale' = 145, 'Rossville-Woodrow' = 146, 'Rugby-Remsen Village' = 147, 'Schuylerville-Throgs Neck-Edgewater Park' = 148, 'Seagate-Coney Island' = 149, 'Sheepshead Bay-Gerritsen Beach-Manhattan Beach' = 150, 'SoHo-TriBeCa-Civic Center-Little Italy' = 151, 'Soundview-Bruckner' = 152, 'Soundview-Castle Hill-Clason Point-Harding Park' = 153, 'South Jamaica' = 154, 'South Ozone Park' = 155, 'Springfield Gardens North' = 156, 'Springfield Gardens South-Brookville' = 157, 'Spuyten Duyvil-Kingsbridge' = 158, 'St. Albans' = 159, 'Stapleton-Rosebank' = 160, 'Starrett City' = 161, 'Steinway' = 162, 'Stuyvesant Heights' = 163, 'Stuyvesant Town-Cooper Village' = 164, 'Sunset Park East' = 165, 'Sunset Park West' = 166, 'Todt Hill-Emerson Hill-Heartland Village-Lighthouse Hill' = 167, 'Turtle Bay-East Midtown' = 168, 'University Heights-Morris Heights' = 169, 'Upper East Side-Carnegie Hill' = 170, 'Upper West Side' = 171, 'Van Cortlandt Village' = 172, 'Van Nest-Morris Park-Westchester Square' = 173, 'Washington Heights North' = 174, 'Washington Heights South' = 175, 'West Brighton' = 176, 'West Concourse' = 177, 'West Farms-Bronx River' = 178, 'West New Brighton-New Brighton-St. George' = 179, 'West Village' = 180, 'Westchester-Unionport' = 181, 'Westerleigh' = 182, 'Whitestone' = 183, 'Williamsbridge-Olinville' = 184, 'Williamsburg' = 185, 'Windsor Terrace' = 186, 'Woodhaven' = 187, 'Woodlawn-Wakefield' = 188, 'Woodside' = 189, 'Yorkville' = 190, 'park-cemetery-etc-Bronx' = 191, 'park-cemetery-etc-Brooklyn' = 192, 'park-cemetery-etc-Manhattan' = 193, 'park-cemetery-etc-Queens' = 194, 'park-cemetery-etc-Staten Island' = 195), pickup_puma UInt16, dropoff_nyct2010_gid UInt8, dropoff_ctlabel Float32, dropoff_borocode UInt8, dropoff_boroname Enum8('' = 0, 'Manhattan' = 1, 'Bronx' = 2, 'Brooklyn' = 3, 'Queens' = 4, 'Staten Island' = 5), dropoff_ct2010 FixedString(6), dropoff_boroct2010 FixedString(7), dropoff_cdeligibil Enum8(' ' = 0, 'E' = 1, 'I' = 2), dropoff_ntacode FixedString(4), dropoff_ntaname Enum16('' = 0, 'Airport' = 1, 'Allerton-Pelham Gardens' = 2, 'Annadale-Huguenot-Prince\'s Bay-Eltingville' = 3, 'Arden Heights' = 4, 'Astoria' = 5, 'Auburndale' = 6, 'Baisley Park' = 7, 'Bath Beach' = 8, 'Battery Park City-Lower Manhattan' = 9, 'Bay Ridge' = 10, 'Bayside-Bayside Hills' = 11, 'Bedford' = 12, 'Bedford Park-Fordham North' = 13, 'Bellerose' = 14, 'Belmont' = 15, 'Bensonhurst East' = 16, 'Bensonhurst West' = 17, 'Borough Park' = 18, 'Breezy Point-Belle Harbor-Rockaway Park-Broad Channel' = 19, 'Briarwood-Jamaica Hills' = 20, 'Brighton Beach' = 21, 'Bronxdale' = 22, 'Brooklyn Heights-Cobble Hill' = 23, 'Brownsville' = 24, 'Bushwick North' = 25, 'Bushwick South' = 26, 'Cambria Heights' = 27, 'Canarsie' = 28, 'Carroll Gardens-Columbia Street-Red Hook' = 29, 'Central Harlem North-Polo Grounds' = 30, 'Central Harlem South' = 31, 'Charleston-Richmond Valley-Tottenville' = 32, 'Chinatown' = 33, 'Claremont-Bathgate' = 34, 'Clinton' = 35, 'Clinton Hill' = 36, 'Co-op City' = 37, 'College Point' = 38, 'Corona' = 39, 'Crotona Park East' = 40, 'Crown Heights North' = 41, 'Crown Heights South' = 42, 'Cypress Hills-City Line' = 43, 'DUMBO-Vinegar Hill-Downtown Brooklyn-Boerum Hill' = 44, 'Douglas Manor-Douglaston-Little Neck' = 45, 'Dyker Heights' = 46, 'East Concourse-Concourse Village' = 47, 'East Elmhurst' = 48, 'East Flatbush-Farragut' = 49, 'East Flushing' = 50, 'East Harlem North' = 51, 'East Harlem South' = 52, 'East New York' = 53, 'East New York (Pennsylvania Ave)' = 54, 'East Tremont' = 55, 'East Village' = 56, 'East Williamsburg' = 57, 'Eastchester-Edenwald-Baychester' = 58, 'Elmhurst' = 59, 'Elmhurst-Maspeth' = 60, 'Erasmus' = 61, 'Far Rockaway-Bayswater' = 62, 'Flatbush' = 63, 'Flatlands' = 64, 'Flushing' = 65, 'Fordham South' = 66, 'Forest Hills' = 67, 'Fort Greene' = 68, 'Fresh Meadows-Utopia' = 69, 'Ft. Totten-Bay Terrace-Clearview' = 70, 'Georgetown-Marine Park-Bergen Beach-Mill Basin' = 71, 'Glen Oaks-Floral Park-New Hyde Park' = 72, 'Glendale' = 73, 'Gramercy' = 74, 'Grasmere-Arrochar-Ft. Wadsworth' = 75, 'Gravesend' = 76, 'Great Kills' = 77, 'Greenpoint' = 78, 'Grymes Hill-Clifton-Fox Hills' = 79, 'Hamilton Heights' = 80, 'Hammels-Arverne-Edgemere' = 81, 'Highbridge' = 82, 'Hollis' = 83, 'Homecrest' = 84, 'Hudson Yards-Chelsea-Flatiron-Union Square' = 85, 'Hunters Point-Sunnyside-West Maspeth' = 86, 'Hunts Point' = 87, 'Jackson Heights' = 88, 'Jamaica' = 89, 'Jamaica Estates-Holliswood' = 90, 'Kensington-Ocean Parkway' = 91, 'Kew Gardens' = 92, 'Kew Gardens Hills' = 93, 'Kingsbridge Heights' = 94, 'Laurelton' = 95, 'Lenox Hill-Roosevelt Island' = 96, 'Lincoln Square' = 97, 'Lindenwood-Howard Beach' = 98, 'Longwood' = 99, 'Lower East Side' = 100, 'Madison' = 101, 'Manhattanville' = 102, 'Marble Hill-Inwood' = 103, 'Mariner\'s Harbor-Arlington-Port Ivory-Graniteville' = 104, 'Maspeth' = 105, 'Melrose South-Mott Haven North' = 106, 'Middle Village' = 107, 'Midtown-Midtown South' = 108, 'Midwood' = 109, 'Morningside Heights' = 110, 'Morrisania-Melrose' = 111, 'Mott Haven-Port Morris' = 112, 'Mount Hope' = 113, 'Murray Hill' = 114, 'Murray Hill-Kips Bay' = 115, 'New Brighton-Silver Lake' = 116, 'New Dorp-Midland Beach' = 117, 'New Springville-Bloomfield-Travis' = 118, 'North Corona' = 119, 'North Riverdale-Fieldston-Riverdale' = 120, 'North Side-South Side' = 121, 'Norwood' = 122, 'Oakland Gardens' = 123, 'Oakwood-Oakwood Beach' = 124, 'Ocean Hill' = 125, 'Ocean Parkway South' = 126, 'Old Astoria' = 127, 'Old Town-Dongan Hills-South Beach' = 128, 'Ozone Park' = 129, 'Park Slope-Gowanus' = 130, 'Parkchester' = 131, 'Pelham Bay-Country Club-City Island' = 132, 'Pelham Parkway' = 133, 'Pomonok-Flushing Heights-Hillcrest' = 134, 'Port Richmond' = 135, 'Prospect Heights' = 136, 'Prospect Lefferts Gardens-Wingate' = 137, 'Queens Village' = 138, 'Queensboro Hill' = 139, 'Queensbridge-Ravenswood-Long Island City' = 140, 'Rego Park' = 141, 'Richmond Hill' = 142, 'Ridgewood' = 143, 'Rikers Island' = 144, 'Rosedale' = 145, 'Rossville-Woodrow' = 146, 'Rugby-Remsen Village' = 147, 'Schuylerville-Throgs Neck-Edgewater Park' = 148, 'Seagate-Coney Island' = 149, 'Sheepshead Bay-Gerritsen Beach-Manhattan Beach' = 150, 'SoHo-TriBeCa-Civic Center-Little Italy' = 151, 'Soundview-Bruckner' = 152, 'Soundview-Castle Hill-Clason Point-Harding Park' = 153, 'South Jamaica' = 154, 'South Ozone Park' = 155, 'Springfield Gardens North' = 156, 'Springfield Gardens South-Brookville' = 157, 'Spuyten Duyvil-Kingsbridge' = 158, 'St. Albans' = 159, 'Stapleton-Rosebank' = 160, 'Starrett City' = 161, 'Steinway' = 162, 'Stuyvesant Heights' = 163, 'Stuyvesant Town-Cooper Village' = 164, 'Sunset Park East' = 165, 'Sunset Park West' = 166, 'Todt Hill-Emerson Hill-Heartland Village-Lighthouse Hill' = 167, 'Turtle Bay-East Midtown' = 168, 'University Heights-Morris Heights' = 169, 'Upper East Side-Carnegie Hill' = 170, 'Upper West Side' = 171, 'Van Cortlandt Village' = 172, 'Van Nest-Morris Park-Westchester Square' = 173, 'Washington Heights North' = 174, 'Washington Heights South' = 175, 'West Brighton' = 176, 'West Concourse' = 177, 'West Farms-Bronx River' = 178, 'West New Brighton-New Brighton-St. George' = 179, 'West Village' = 180, 'Westchester-Unionport' = 181, 'Westerleigh' = 182, 'Whitestone' = 183, 'Williamsbridge-Olinville' = 184, 'Williamsburg' = 185, 'Windsor Terrace' = 186, 'Woodhaven' = 187, 'Woodlawn-Wakefield' = 188, 'Woodside' = 189, 'Yorkville' = 190, 'park-cemetery-etc-Bronx' = 191, 'park-cemetery-etc-Brooklyn' = 192, 'park-cemetery-etc-Manhattan' = 193, 'park-cemetery-etc-Queens' = 194, 'park-cemetery-etc-Staten Island' = 195), dropoff_puma UInt16) ENGINE = MergeTree(pickup_date, pickup_datetime, 8192) +CREATE TABLE default.trips_mergetree_third ( trip_id UInt32, vendor_id Enum8('1' = 1, '2' = 2, 'CMT' = 3, 'VTS' = 4, 'DDS' = 5, 'B02512' = 10, 'B02598' = 11, 'B02617' = 12, 'B02682' = 13, 'B02764' = 14), pickup_date Date, pickup_datetime DateTime, dropoff_date Date, dropoff_datetime DateTime, store_and_fwd_flag UInt8, rate_code_id UInt8, pickup_longitude Float64, pickup_latitude Float64, dropoff_longitude Float64, dropoff_latitude Float64, passenger_count UInt8, trip_distance Float64, fare_amount Float32, extra Float32, mta_tax Float32, tip_amount Float32, tolls_amount Float32, ehail_fee Float32, improvement_surcharge Float32, total_amount Float32, payment_type_ Enum8('UNK' = 0, 'CSH' = 1, 'CRE' = 2, 'NOC' = 3, 'DIS' = 4), trip_type UInt8, pickup FixedString(25), dropoff FixedString(25), cab_type Enum8('yellow' = 1, 'green' = 2, 'uber' = 3), pickup_nyct2010_gid UInt8, pickup_ctlabel Float32, pickup_borocode UInt8, pickup_boroname Enum8('' = 0, 'Manhattan' = 1, 'Bronx' = 2, 'Brooklyn' = 3, 'Queens' = 4, 'Staten Island' = 5), pickup_ct2010 FixedString(6), pickup_boroct2010 FixedString(7), pickup_cdeligibil Enum8(' ' = 0, 'E' = 1, 'I' = 2), pickup_ntacode FixedString(4), pickup_ntaname Enum16('' = 0, 'Airport' = 1, 'Allerton-Pelham Gardens' = 2, 'Annadale-Huguenot-Prince\'s Bay-Eltingville' = 3, 'Arden Heights' = 4, 'Astoria' = 5, 'Auburndale' = 6, 'Baisley Park' = 7, 'Bath Beach' = 8, 'Battery Park City-Lower Manhattan' = 9, 'Bay Ridge' = 10, 'Bayside-Bayside Hills' = 11, 'Bedford' = 12, 'Bedford Park-Fordham North' = 13, 'Bellerose' = 14, 'Belmont' = 15, 'Bensonhurst East' = 16, 'Bensonhurst West' = 17, 'Borough Park' = 18, 'Breezy Point-Belle Harbor-Rockaway Park-Broad Channel' = 19, 'Briarwood-Jamaica Hills' = 20, 'Brighton Beach' = 21, 'Bronxdale' = 22, 'Brooklyn Heights-Cobble Hill' = 23, 'Brownsville' = 24, 'Bushwick North' = 25, 'Bushwick South' = 26, 'Cambria Heights' = 27, 'Canarsie' = 28, 'Carroll Gardens-Columbia Street-Red Hook' = 29, 'Central Harlem North-Polo Grounds' = 30, 'Central Harlem South' = 31, 'Charleston-Richmond Valley-Tottenville' = 32, 'Chinatown' = 33, 'Claremont-Bathgate' = 34, 'Clinton' = 35, 'Clinton Hill' = 36, 'Co-op City' = 37, 'College Point' = 38, 'Corona' = 39, 'Crotona Park East' = 40, 'Crown Heights North' = 41, 'Crown Heights South' = 42, 'Cypress Hills-City Line' = 43, 'DUMBO-Vinegar Hill-Downtown Brooklyn-Boerum Hill' = 44, 'Douglas Manor-Douglaston-Little Neck' = 45, 'Dyker Heights' = 46, 'East Concourse-Concourse Village' = 47, 'East Elmhurst' = 48, 'East Flatbush-Farragut' = 49, 'East Flushing' = 50, 'East Harlem North' = 51, 'East Harlem South' = 52, 'East New York' = 53, 'East New York (Pennsylvania Ave)' = 54, 'East Tremont' = 55, 'East Village' = 56, 'East Williamsburg' = 57, 'Eastchester-Edenwald-Baychester' = 58, 'Elmhurst' = 59, 'Elmhurst-Maspeth' = 60, 'Erasmus' = 61, 'Far Rockaway-Bayswater' = 62, 'Flatbush' = 63, 'Flatlands' = 64, 'Flushing' = 65, 'Fordham South' = 66, 'Forest Hills' = 67, 'Fort Greene' = 68, 'Fresh Meadows-Utopia' = 69, 'Ft. Totten-Bay Terrace-Clearview' = 70, 'Georgetown-Marine Park-Bergen Beach-Mill Basin' = 71, 'Glen Oaks-Floral Park-New Hyde Park' = 72, 'Glendale' = 73, 'Gramercy' = 74, 'Grasmere-Arrochar-Ft. Wadsworth' = 75, 'Gravesend' = 76, 'Great Kills' = 77, 'Greenpoint' = 78, 'Grymes Hill-Clifton-Fox Hills' = 79, 'Hamilton Heights' = 80, 'Hammels-Arverne-Edgemere' = 81, 'Highbridge' = 82, 'Hollis' = 83, 'Homecrest' = 84, 'Hudson Yards-Chelsea-Flatiron-Union Square' = 85, 'Hunters Point-Sunnyside-West Maspeth' = 86, 'Hunts Point' = 87, 'Jackson Heights' = 88, 'Jamaica' = 89, 'Jamaica Estates-Holliswood' = 90, 'Kensington-Ocean Parkway' = 91, 'Kew Gardens' = 92, 'Kew Gardens Hills' = 93, 'Kingsbridge Heights' = 94, 'Laurelton' = 95, 'Lenox Hill-Roosevelt Island' = 96, 'Lincoln Square' = 97, 'Lindenwood-Howard Beach' = 98, 'Longwood' = 99, 'Lower East Side' = 100, 'Madison' = 101, 'Manhattanville' = 102, 'Marble Hill-Inwood' = 103, 'Mariner\'s Harbor-Arlington-Port Ivory-Graniteville' = 104, 'Maspeth' = 105, 'Melrose South-Mott Haven North' = 106, 'Middle Village' = 107, 'Midtown-Midtown South' = 108, 'Midwood' = 109, 'Morningside Heights' = 110, 'Morrisania-Melrose' = 111, 'Mott Haven-Port Morris' = 112, 'Mount Hope' = 113, 'Murray Hill' = 114, 'Murray Hill-Kips Bay' = 115, 'New Brighton-Silver Lake' = 116, 'New Dorp-Midland Beach' = 117, 'New Springville-Bloomfield-Travis' = 118, 'North Corona' = 119, 'North Riverdale-Fieldston-Riverdale' = 120, 'North Side-South Side' = 121, 'Norwood' = 122, 'Oakland Gardens' = 123, 'Oakwood-Oakwood Beach' = 124, 'Ocean Hill' = 125, 'Ocean Parkway South' = 126, 'Old Astoria' = 127, 'Old Town-Dongan Hills-South Beach' = 128, 'Ozone Park' = 129, 'Park Slope-Gowanus' = 130, 'Parkchester' = 131, 'Pelham Bay-Country Club-City Island' = 132, 'Pelham Parkway' = 133, 'Pomonok-Flushing Heights-Hillcrest' = 134, 'Port Richmond' = 135, 'Prospect Heights' = 136, 'Prospect Lefferts Gardens-Wingate' = 137, 'Queens Village' = 138, 'Queensboro Hill' = 139, 'Queensbridge-Ravenswood-Long Island City' = 140, 'Rego Park' = 141, 'Richmond Hill' = 142, 'Ridgewood' = 143, 'Rikers Island' = 144, 'Rosedale' = 145, 'Rossville-Woodrow' = 146, 'Rugby-Remsen Village' = 147, 'Schuylerville-Throgs Neck-Edgewater Park' = 148, 'Seagate-Coney Island' = 149, 'Sheepshead Bay-Gerritsen Beach-Manhattan Beach' = 150, 'SoHo-TriBeCa-Civic Center-Little Italy' = 151, 'Soundview-Bruckner' = 152, 'Soundview-Castle Hill-Clason Point-Harding Park' = 153, 'South Jamaica' = 154, 'South Ozone Park' = 155, 'Springfield Gardens North' = 156, 'Springfield Gardens South-Brookville' = 157, 'Spuyten Duyvil-Kingsbridge' = 158, 'St. Albans' = 159, 'Stapleton-Rosebank' = 160, 'Starrett City' = 161, 'Steinway' = 162, 'Stuyvesant Heights' = 163, 'Stuyvesant Town-Cooper Village' = 164, 'Sunset Park East' = 165, 'Sunset Park West' = 166, 'Todt Hill-Emerson Hill-Heartland Village-Lighthouse Hill' = 167, 'Turtle Bay-East Midtown' = 168, 'University Heights-Morris Heights' = 169, 'Upper East Side-Carnegie Hill' = 170, 'Upper West Side' = 171, 'Van Cortlandt Village' = 172, 'Van Nest-Morris Park-Westchester Square' = 173, 'Washington Heights North' = 174, 'Washington Heights South' = 175, 'West Brighton' = 176, 'West Concourse' = 177, 'West Farms-Bronx River' = 178, 'West New Brighton-New Brighton-St. George' = 179, 'West Village' = 180, 'Westchester-Unionport' = 181, 'Westerleigh' = 182, 'Whitestone' = 183, 'Williamsbridge-Olinville' = 184, 'Williamsburg' = 185, 'Windsor Terrace' = 186, 'Woodhaven' = 187, 'Woodlawn-Wakefield' = 188, 'Woodside' = 189, 'Yorkville' = 190, 'park-cemetery-etc-Bronx' = 191, 'park-cemetery-etc-Brooklyn' = 192, 'park-cemetery-etc-Manhattan' = 193, 'park-cemetery-etc-Queens' = 194, 'park-cemetery-etc-Staten Island' = 195), pickup_puma UInt16, dropoff_nyct2010_gid UInt8, dropoff_ctlabel Float32, dropoff_borocode UInt8, dropoff_boroname Enum8('' = 0, 'Manhattan' = 1, 'Bronx' = 2, 'Brooklyn' = 3, 'Queens' = 4, 'Staten Island' = 5), dropoff_ct2010 FixedString(6), dropoff_boroct2010 FixedString(7), dropoff_cdeligibil Enum8(' ' = 0, 'E' = 1, 'I' = 2), dropoff_ntacode FixedString(4), dropoff_ntaname Enum16('' = 0, 'Airport' = 1, 'Allerton-Pelham Gardens' = 2, 'Annadale-Huguenot-Prince\'s Bay-Eltingville' = 3, 'Arden Heights' = 4, 'Astoria' = 5, 'Auburndale' = 6, 'Baisley Park' = 7, 'Bath Beach' = 8, 'Battery Park City-Lower Manhattan' = 9, 'Bay Ridge' = 10, 'Bayside-Bayside Hills' = 11, 'Bedford' = 12, 'Bedford Park-Fordham North' = 13, 'Bellerose' = 14, 'Belmont' = 15, 'Bensonhurst East' = 16, 'Bensonhurst West' = 17, 'Borough Park' = 18, 'Breezy Point-Belle Harbor-Rockaway Park-Broad Channel' = 19, 'Briarwood-Jamaica Hills' = 20, 'Brighton Beach' = 21, 'Bronxdale' = 22, 'Brooklyn Heights-Cobble Hill' = 23, 'Brownsville' = 24, 'Bushwick North' = 25, 'Bushwick South' = 26, 'Cambria Heights' = 27, 'Canarsie' = 28, 'Carroll Gardens-Columbia Street-Red Hook' = 29, 'Central Harlem North-Polo Grounds' = 30, 'Central Harlem South' = 31, 'Charleston-Richmond Valley-Tottenville' = 32, 'Chinatown' = 33, 'Claremont-Bathgate' = 34, 'Clinton' = 35, 'Clinton Hill' = 36, 'Co-op City' = 37, 'College Point' = 38, 'Corona' = 39, 'Crotona Park East' = 40, 'Crown Heights North' = 41, 'Crown Heights South' = 42, 'Cypress Hills-City Line' = 43, 'DUMBO-Vinegar Hill-Downtown Brooklyn-Boerum Hill' = 44, 'Douglas Manor-Douglaston-Little Neck' = 45, 'Dyker Heights' = 46, 'East Concourse-Concourse Village' = 47, 'East Elmhurst' = 48, 'East Flatbush-Farragut' = 49, 'East Flushing' = 50, 'East Harlem North' = 51, 'East Harlem South' = 52, 'East New York' = 53, 'East New York (Pennsylvania Ave)' = 54, 'East Tremont' = 55, 'East Village' = 56, 'East Williamsburg' = 57, 'Eastchester-Edenwald-Baychester' = 58, 'Elmhurst' = 59, 'Elmhurst-Maspeth' = 60, 'Erasmus' = 61, 'Far Rockaway-Bayswater' = 62, 'Flatbush' = 63, 'Flatlands' = 64, 'Flushing' = 65, 'Fordham South' = 66, 'Forest Hills' = 67, 'Fort Greene' = 68, 'Fresh Meadows-Utopia' = 69, 'Ft. Totten-Bay Terrace-Clearview' = 70, 'Georgetown-Marine Park-Bergen Beach-Mill Basin' = 71, 'Glen Oaks-Floral Park-New Hyde Park' = 72, 'Glendale' = 73, 'Gramercy' = 74, 'Grasmere-Arrochar-Ft. Wadsworth' = 75, 'Gravesend' = 76, 'Great Kills' = 77, 'Greenpoint' = 78, 'Grymes Hill-Clifton-Fox Hills' = 79, 'Hamilton Heights' = 80, 'Hammels-Arverne-Edgemere' = 81, 'Highbridge' = 82, 'Hollis' = 83, 'Homecrest' = 84, 'Hudson Yards-Chelsea-Flatiron-Union Square' = 85, 'Hunters Point-Sunnyside-West Maspeth' = 86, 'Hunts Point' = 87, 'Jackson Heights' = 88, 'Jamaica' = 89, 'Jamaica Estates-Holliswood' = 90, 'Kensington-Ocean Parkway' = 91, 'Kew Gardens' = 92, 'Kew Gardens Hills' = 93, 'Kingsbridge Heights' = 94, 'Laurelton' = 95, 'Lenox Hill-Roosevelt Island' = 96, 'Lincoln Square' = 97, 'Lindenwood-Howard Beach' = 98, 'Longwood' = 99, 'Lower East Side' = 100, 'Madison' = 101, 'Manhattanville' = 102, 'Marble Hill-Inwood' = 103, 'Mariner\'s Harbor-Arlington-Port Ivory-Graniteville' = 104, 'Maspeth' = 105, 'Melrose South-Mott Haven North' = 106, 'Middle Village' = 107, 'Midtown-Midtown South' = 108, 'Midwood' = 109, 'Morningside Heights' = 110, 'Morrisania-Melrose' = 111, 'Mott Haven-Port Morris' = 112, 'Mount Hope' = 113, 'Murray Hill' = 114, 'Murray Hill-Kips Bay' = 115, 'New Brighton-Silver Lake' = 116, 'New Dorp-Midland Beach' = 117, 'New Springville-Bloomfield-Travis' = 118, 'North Corona' = 119, 'North Riverdale-Fieldston-Riverdale' = 120, 'North Side-South Side' = 121, 'Norwood' = 122, 'Oakland Gardens' = 123, 'Oakwood-Oakwood Beach' = 124, 'Ocean Hill' = 125, 'Ocean Parkway South' = 126, 'Old Astoria' = 127, 'Old Town-Dongan Hills-South Beach' = 128, 'Ozone Park' = 129, 'Park Slope-Gowanus' = 130, 'Parkchester' = 131, 'Pelham Bay-Country Club-City Island' = 132, 'Pelham Parkway' = 133, 'Pomonok-Flushing Heights-Hillcrest' = 134, 'Port Richmond' = 135, 'Prospect Heights' = 136, 'Prospect Lefferts Gardens-Wingate' = 137, 'Queens Village' = 138, 'Queensboro Hill' = 139, 'Queensbridge-Ravenswood-Long Island City' = 140, 'Rego Park' = 141, 'Richmond Hill' = 142, 'Ridgewood' = 143, 'Rikers Island' = 144, 'Rosedale' = 145, 'Rossville-Woodrow' = 146, 'Rugby-Remsen Village' = 147, 'Schuylerville-Throgs Neck-Edgewater Park' = 148, 'Seagate-Coney Island' = 149, 'Sheepshead Bay-Gerritsen Beach-Manhattan Beach' = 150, 'SoHo-TriBeCa-Civic Center-Little Italy' = 151, 'Soundview-Bruckner' = 152, 'Soundview-Castle Hill-Clason Point-Harding Park' = 153, 'South Jamaica' = 154, 'South Ozone Park' = 155, 'Springfield Gardens North' = 156, 'Springfield Gardens South-Brookville' = 157, 'Spuyten Duyvil-Kingsbridge' = 158, 'St. Albans' = 159, 'Stapleton-Rosebank' = 160, 'Starrett City' = 161, 'Steinway' = 162, 'Stuyvesant Heights' = 163, 'Stuyvesant Town-Cooper Village' = 164, 'Sunset Park East' = 165, 'Sunset Park West' = 166, 'Todt Hill-Emerson Hill-Heartland Village-Lighthouse Hill' = 167, 'Turtle Bay-East Midtown' = 168, 'University Heights-Morris Heights' = 169, 'Upper East Side-Carnegie Hill' = 170, 'Upper West Side' = 171, 'Van Cortlandt Village' = 172, 'Van Nest-Morris Park-Westchester Square' = 173, 'Washington Heights North' = 174, 'Washington Heights South' = 175, 'West Brighton' = 176, 'West Concourse' = 177, 'West Farms-Bronx River' = 178, 'West New Brighton-New Brighton-St. George' = 179, 'West Village' = 180, 'Westchester-Unionport' = 181, 'Westerleigh' = 182, 'Whitestone' = 183, 'Williamsbridge-Olinville' = 184, 'Williamsburg' = 185, 'Windsor Terrace' = 186, 'Woodhaven' = 187, 'Woodlawn-Wakefield' = 188, 'Woodside' = 189, 'Yorkville' = 190, 'park-cemetery-etc-Bronx' = 191, 'park-cemetery-etc-Brooklyn' = 192, 'park-cemetery-etc-Manhattan' = 193, 'park-cemetery-etc-Queens' = 194, 'park-cemetery-etc-Staten Island' = 195), dropoff_puma UInt16) ENGINE = MergeTree(pickup_date, pickup_datetime, 8192); ``` On the source server: ``` sql -CREATE TABLE trips_mergetree_x3 AS trips_mergetree_third ENGINE = Distributed(perftest, default, trips_mergetree_third, rand()) +CREATE TABLE trips_mergetree_x3 AS trips_mergetree_third ENGINE = Distributed(perftest, default, trips_mergetree_third, rand()); ``` The following query redistributes data: ``` sql -INSERT INTO trips_mergetree_x3 SELECT * FROM trips_mergetree +INSERT INTO trips_mergetree_x3 SELECT * FROM trips_mergetree; ``` This takes 2454 seconds. From 504486e7b9f4769f41bfde17d6e4f06da07ad1c8 Mon Sep 17 00:00:00 2001 From: DanRoscigno Date: Thu, 9 Mar 2023 08:34:05 -0500 Subject: [PATCH 645/841] correct heading --- docs/en/getting-started/example-datasets/nyc-taxi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/getting-started/example-datasets/nyc-taxi.md b/docs/en/getting-started/example-datasets/nyc-taxi.md index 36bcb6f232e..aee2da5a545 100644 --- a/docs/en/getting-started/example-datasets/nyc-taxi.md +++ b/docs/en/getting-started/example-datasets/nyc-taxi.md @@ -43,7 +43,7 @@ ENGINE = MergeTree PRIMARY KEY (pickup_datetime, dropoff_datetime); ``` -## Retrieve the Data from Object Storage +## Load the Data directly from Object Storage Let's grab a small subset of the data for getting familiar with it. The data is in TSV files in object storage, which is easily streamed into ClickHouse Cloud using the `s3` table function. From c69d2c45b7d3e6a4661b7be6f05ce1aa42e56206 Mon Sep 17 00:00:00 2001 From: DanRoscigno Date: Thu, 9 Mar 2023 08:35:29 -0500 Subject: [PATCH 646/841] correct heading --- docs/en/getting-started/example-datasets/nyc-taxi.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/en/getting-started/example-datasets/nyc-taxi.md b/docs/en/getting-started/example-datasets/nyc-taxi.md index aee2da5a545..0dc317eeeae 100644 --- a/docs/en/getting-started/example-datasets/nyc-taxi.md +++ b/docs/en/getting-started/example-datasets/nyc-taxi.md @@ -115,6 +115,8 @@ FROM s3( +## Sample Queries + Let's see how many rows were inserted: ```sql From 687fe3ea5198a5fa29ca6338ea9b4065acfa8296 Mon Sep 17 00:00:00 2001 From: DanRoscigno Date: Thu, 9 Mar 2023 08:39:44 -0500 Subject: [PATCH 647/841] add note about prepared partitions --- docs/en/getting-started/example-datasets/nyc-taxi.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/en/getting-started/example-datasets/nyc-taxi.md b/docs/en/getting-started/example-datasets/nyc-taxi.md index 0dc317eeeae..9730faa873c 100644 --- a/docs/en/getting-started/example-datasets/nyc-taxi.md +++ b/docs/en/getting-started/example-datasets/nyc-taxi.md @@ -237,6 +237,10 @@ The first part of the result is: ## Download of Prepared Partitions {#download-of-prepared-partitions} +:::note +The following steps provide information about the original dataset, and a method for loading prepared partitions into a self-managed ClickHouse server environment. +::: + See https://github.com/toddwschneider/nyc-taxi-data and http://tech.marksblogg.com/billion-nyc-taxi-rides-redshift.html for the description of a dataset and instructions for downloading. Downloading will result in about 227 GB of uncompressed data in CSV files. The download takes about an hour over a 1 Gbit connection (parallel downloading from s3.amazonaws.com recovers at least half of a 1 Gbit channel). From 3aa0c32101fadf683a644f47972c117173a99e8a Mon Sep 17 00:00:00 2001 From: Sergei Trifonov Date: Thu, 9 Mar 2023 14:50:13 +0100 Subject: [PATCH 648/841] Update docs/en/sql-reference/aggregate-functions/reference/exponentialmovingaverage.md --- .../aggregate-functions/reference/exponentialmovingaverage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/sql-reference/aggregate-functions/reference/exponentialmovingaverage.md b/docs/en/sql-reference/aggregate-functions/reference/exponentialmovingaverage.md index 296aae41daa..5546ade1758 100644 --- a/docs/en/sql-reference/aggregate-functions/reference/exponentialmovingaverage.md +++ b/docs/en/sql-reference/aggregate-functions/reference/exponentialmovingaverage.md @@ -181,7 +181,7 @@ ORDER BY time ASC; └───────┴─────────────────────┴─────────────┴──────────┘ --- Calculate timeunit timeunit using toRelativeHourNum +-- Calculate timeunit using toRelativeHourNum SELECT value, time, From 6a12bda1898e8b5d98d07d6676ebebcbd3acfc53 Mon Sep 17 00:00:00 2001 From: Vladimir C Date: Thu, 9 Mar 2023 15:23:55 +0100 Subject: [PATCH 649/841] Fix style tests/clickhouse-test --- tests/clickhouse-test | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/clickhouse-test b/tests/clickhouse-test index df1351e3863..c40aec95ec6 100755 --- a/tests/clickhouse-test +++ b/tests/clickhouse-test @@ -523,7 +523,6 @@ class SettingsRandomizer: "merge_tree_coarse_index_granularity": lambda: random.randint(2, 32), "optimize_distinct_in_order": lambda: random.randint(0, 1), "optimize_sorting_by_input_stream_properties": lambda: random.randint(0, 1), - "enable_memory_bound_merging_of_aggregation_results": lambda: random.randint(0, 1), "http_response_buffer_size": lambda: random.randint(0, 10 * 1048576), "http_wait_end_of_query": lambda: random.random() > 0.5, "enable_memory_bound_merging_of_aggregation_results": lambda: random.randint( From 91428ac415a5d8eccc70e60e0175fdaed7fc1099 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Thu, 9 Mar 2023 14:26:43 +0000 Subject: [PATCH 650/841] fix test --- tests/queries/0_stateless/00646_url_engine.python | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/queries/0_stateless/00646_url_engine.python b/tests/queries/0_stateless/00646_url_engine.python index f68a2a5a260..5f3b7546dd5 100644 --- a/tests/queries/0_stateless/00646_url_engine.python +++ b/tests/queries/0_stateless/00646_url_engine.python @@ -83,7 +83,8 @@ class CSVHTTPServer(BaseHTTPRequestHandler): return def do_HEAD(self): - self.do_GET() + self._set_headers() + return def read_chunk(self): msg = '' From 1d78c1b6d9232703d4e77cc98772a5d97a04cce1 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Thu, 9 Mar 2023 14:45:26 +0000 Subject: [PATCH 651/841] Use force_sync=true in upgrade check --- docker/test/upgrade/run.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docker/test/upgrade/run.sh b/docker/test/upgrade/run.sh index ce8a56c777e..de1f92823b2 100644 --- a/docker/test/upgrade/run.sh +++ b/docker/test/upgrade/run.sh @@ -60,6 +60,13 @@ install_packages previous_release_package_folder export USE_S3_STORAGE_FOR_MERGE_TREE=1 # Previous version may not be ready for fault injections export ZOOKEEPER_FAULT_INJECTION=0 + +# force_sync=false doesn't work correctly on some older versions +sudo cat /etc/clickhouse-server/config.d/keeper_port.xml \ + | sed "s|false|true|" \ + > /etc/clickhouse-server/config.d/keeper_port.xml.tmp +sudo mv /etc/clickhouse-server/config.d/keeper_port.xml.tmp /etc/clickhouse-server/config.d/keeper_port.xml + configure # But we still need default disk because some tables loaded only into it From b0931c89675c08ec41bfc51710a7cb6bd39ecc45 Mon Sep 17 00:00:00 2001 From: Clayton McClure <103603310+cmcclure-twilio@users.noreply.github.com> Date: Thu, 9 Mar 2023 07:49:00 -0700 Subject: [PATCH 652/841] Update copier to use group by to find partitions (#47386) --- programs/copier/ClusterCopier.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/copier/ClusterCopier.cpp b/programs/copier/ClusterCopier.cpp index bc882719a08..d3696f2cf12 100644 --- a/programs/copier/ClusterCopier.cpp +++ b/programs/copier/ClusterCopier.cpp @@ -1867,8 +1867,8 @@ std::set ClusterCopier::getShardPartitions(const ConnectionTimeouts & ti String query; { WriteBufferFromOwnString wb; - wb << "SELECT DISTINCT " << partition_name << " AS partition FROM" - << " " << getQuotedTable(task_shard.table_read_shard) << " ORDER BY partition DESC"; + wb << "SELECT " << partition_name << " AS partition FROM " + << getQuotedTable(task_shard.table_read_shard) << " GROUP BY partition ORDER BY partition DESC"; query = wb.str(); } From 53277831cc07642963e6a64425700be8046022a1 Mon Sep 17 00:00:00 2001 From: Tyler Hannan Date: Thu, 9 Mar 2023 16:02:06 +0100 Subject: [PATCH 653/841] Remove dated warning scary language is inappropriately scary. --- docs/en/operations/utilities/clickhouse-local.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/en/operations/utilities/clickhouse-local.md b/docs/en/operations/utilities/clickhouse-local.md index a4fa5579638..79b8bc90634 100644 --- a/docs/en/operations/utilities/clickhouse-local.md +++ b/docs/en/operations/utilities/clickhouse-local.md @@ -14,10 +14,6 @@ Accepts data that represent tables and queries them using [ClickHouse SQL dialec By default `clickhouse-local` does not have access to data on the same host, but it supports loading server configuration using `--config-file` argument. -:::warning -It is not recommended to load production server configuration into `clickhouse-local` because data can be damaged in case of human error. -::: - For temporary data, a unique temporary data directory is created by default. ## Usage {#usage} From d81065ea646e482bd8f180d094fa20aed3be2904 Mon Sep 17 00:00:00 2001 From: Kruglov Pavel <48961922+Avogar@users.noreply.github.com> Date: Thu, 9 Mar 2023 16:14:54 +0100 Subject: [PATCH 654/841] Fix headers in schema inference docs --- docs/en/interfaces/schema-inference.md | 80 +++++++++++++------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/docs/en/interfaces/schema-inference.md b/docs/en/interfaces/schema-inference.md index 25bdb0c36a3..e028b4a6d96 100644 --- a/docs/en/interfaces/schema-inference.md +++ b/docs/en/interfaces/schema-inference.md @@ -117,7 +117,7 @@ clickhouse-local --file='hobbies.jsonl' --table='hobbies' --query='SELECT * FROM 4 47 Brayan ['movies','skydiving'] ``` -# Using structure from insertion table {#using-structure-from-insertion-table} +## Using structure from insertion table {#using-structure-from-insertion-table} When table functions `file/s3/url/hdfs` are used to insert data into a table, there is an option to use the structure from the insertion table instead of extracting it from the data. @@ -222,7 +222,7 @@ INSERT INTO hobbies4 SELECT id, empty(hobbies) ? NULL : hobbies[1] FROM file(hob In this case, there are some operations performed on the column `hobbies` in the `SELECT` query to insert it into the table, so ClickHouse cannot use the structure from the insertion table, and schema inference will be used. -# Schema inference cache {#schema-inference-cache} +## Schema inference cache {#schema-inference-cache} For most input formats schema inference reads some data to determine its structure and this process can take some time. To prevent inferring the same schema every time ClickHouse read the data from the same file, the inferred schema is cached and when accessing the same file again, ClickHouse will use the schema from the cache. @@ -326,14 +326,14 @@ SELECT count() FROM system.schema_inference_cache WHERE storage='S3' └─────────┘ ``` -# Text formats {#text-formats} +## Text formats {#text-formats} For text formats, ClickHouse reads the data row by row, extracts column values according to the format, and then uses some recursive parsers and heuristics to determine the type for each value. The maximum number of rows read from the data in schema inference is controlled by the setting `input_format_max_rows_to_read_for_schema_inference` with default value 25000. By default, all inferred types are [Nullable](../sql-reference/data-types/nullable.md), but you can change this by setting `schema_inference_make_columns_nullable` (see examples in the [settings](#settings-for-text-formats) section). -## JSON formats {#json-formats} +### JSON formats {#json-formats} In JSON formats ClickHouse parses values according to the JSON specification and then tries to find the most appropriate data type for them. @@ -464,9 +464,9 @@ most likely this column contains only Nulls or empty Arrays/Maps. ... ``` -### JSON settings {#json-settings} +#### JSON settings {#json-settings} -#### input_format_json_read_objects_as_strings +##### input_format_json_read_objects_as_strings Enabling this setting allows reading nested JSON objects as strings. This setting can be used to read nested JSON objects without using JSON object type. @@ -486,7 +486,7 @@ DESC format(JSONEachRow, $$ └──────┴──────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ ``` -#### input_format_json_try_infer_numbers_from_strings +##### input_format_json_try_infer_numbers_from_strings Enabling this setting allows inferring numbers from string values. @@ -507,7 +507,7 @@ DESC format(JSONEachRow, $$ └───────┴─────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ ``` -#### input_format_json_read_numbers_as_strings +##### input_format_json_read_numbers_as_strings Enabling this setting allows reading numeric values as strings. @@ -528,7 +528,7 @@ DESC format(JSONEachRow, $$ └───────┴──────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ ``` -#### input_format_json_read_bools_as_numbers +##### input_format_json_read_bools_as_numbers Enabling this setting allows reading Bool values as numbers. @@ -549,7 +549,7 @@ DESC format(JSONEachRow, $$ └───────┴─────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ ``` -## CSV {#csv} +### CSV {#csv} In CSV format ClickHouse extracts column values from the row according to delimiters. ClickHouse expects all types except numbers and strings to be enclosed in double quotes. If the value is in double quotes, ClickHouse tries to parse the data inside quotes using the recursive parser and then tries to find the most appropriate data type for it. If the value is not in double quotes, ClickHouse tries to parse it as a number, @@ -726,7 +726,7 @@ $$) └──────────────┴───────────────┘ ``` -## TSV/TSKV {#tsv-tskv} +### TSV/TSKV {#tsv-tskv} In TSV/TSKV formats ClickHouse extracts column value from the row according to tabular delimiters and then parses extracted value using the recursive parser to determine the most appropriate type. If the type cannot be determined, ClickHouse treats this value as String. @@ -1019,7 +1019,7 @@ DESC format(TSV, '[1,2,3] 42.42 Hello World!') └──────┴──────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ ``` -## CustomSeparated {#custom-separated} +### CustomSeparated {#custom-separated} In CustomSeparated format ClickHouse first extracts all column values from the row according to specified delimiters and then tries to infer the data type for each value according to escaping rule. @@ -1080,7 +1080,7 @@ $$) └────────┴───────────────┴────────────┘ ``` -## Template {#template} +### Template {#template} In Template format ClickHouse first extracts all column values from the row according to the specified template and then tries to infer the data type for each value according to its escaping rule. @@ -1120,7 +1120,7 @@ $$) └──────────┴────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ ``` -## Regexp {#regexp} +### Regexp {#regexp} Similar to Template, in Regexp format ClickHouse first extracts all column values from the row according to specified regular expression and then tries to infer data type for each value according to the specified escaping rule. @@ -1142,9 +1142,9 @@ Line: value_1=2, value_2="Some string 2", value_3="[4, 5, NULL]"$$) └──────┴────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ ``` -## Settings for text formats {settings-for-text-formats} +### Settings for text formats {#settings-for-text-formats} -### input_format_max_rows_to_read_for_schema_inference +#### input_format_max_rows_to_read_for_schema_inference This setting controls the maximum number of rows to be read while schema inference. The more rows are read, the more time is spent on schema inference, but the greater the chance to @@ -1152,7 +1152,7 @@ correctly determine the types (especially when the data contains a lot of nulls) Default value: `25000`. -### column_names_for_schema_inference +#### column_names_for_schema_inference The list of column names to use in schema inference for formats without explicit column names. Specified names will be used instead of default `c1,c2,c3,...`. The format: `column1,column2,column3,...`. @@ -1169,7 +1169,7 @@ DESC format(TSV, 'Hello, World! 42 [1, 2, 3]') settings column_names_for_schema_ └──────┴────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ ``` -### schema_inference_hints +#### schema_inference_hints The list of column names and types to use in schema inference instead of automatically determined types. The format: 'column_name1 column_type1, column_name2 column_type2, ...'. This setting can be used to specify the types of columns that could not be determined automatically or for optimizing the schema. @@ -1189,7 +1189,7 @@ DESC format(JSONEachRow, '{"id" : 1, "age" : 25, "name" : "Josh", "status" : nul └─────────┴─────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ ``` -### schema_inference_make_columns_nullable +#### schema_inference_make_columns_nullable Controls making inferred types `Nullable` in schema inference for formats without information about nullability. If the setting is enabled, all inferred type will be `Nullable`, if disabled, the inferred type will be `Nullable` only if the column contains `NULL` in a sample that is parsed during schema inference. @@ -1232,7 +1232,7 @@ DESC format(JSONEachRow, $$ └─────────┴──────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ ``` -### input_format_try_infer_integers +#### input_format_try_infer_integers If enabled, ClickHouse will try to infer integers instead of floats in schema inference for text formats. If all numbers in the column from sample data are integers, the result type will be `Int64`, if at least one number is float, the result type will be `Float64`. @@ -1289,7 +1289,7 @@ DESC format(JSONEachRow, $$ └────────┴───────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ ``` -### input_format_try_infer_datetimes +#### input_format_try_infer_datetimes If enabled, ClickHouse will try to infer type `DateTime64` from string fields in schema inference for text formats. If all fields from a column in sample data were successfully parsed as datetimes, the result type will be `DateTime64(9)`, @@ -1337,7 +1337,7 @@ DESC format(JSONEachRow, $$ Note: Parsing datetimes during schema inference respect setting [date_time_input_format](/docs/en/operations/settings/settings-formats.md#date_time_input_format) -### input_format_try_infer_dates +#### input_format_try_infer_dates If enabled, ClickHouse will try to infer type `Date` from string fields in schema inference for text formats. If all fields from a column in sample data were successfully parsed as dates, the result type will be `Date`, @@ -1383,14 +1383,14 @@ DESC format(JSONEachRow, $$ └──────┴──────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ ``` -# Self describing formats {#self-describing-formats} +## Self describing formats {#self-describing-formats} Self-describing formats contain information about the structure of the data in the data itself, it can be some header with a description, a binary type tree, or some kind of table. To automatically infer a schema from files in such formats, ClickHouse reads a part of the data containing information about the types and converts it into a schema of the ClickHouse table. -## Formats with -WithNamesAndTypes suffix {#formats-with-names-and-types} +### Formats with -WithNamesAndTypes suffix {#formats-with-names-and-types} ClickHouse supports some text formats with the suffix -WithNamesAndTypes. This suffix means that the data contains two additional rows with column names and types before the actual data. While schema inference for such formats, ClickHouse reads the first two rows and extracts column names and types. @@ -1412,7 +1412,7 @@ $$) └──────┴──────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ ``` -## JSON formats with metadata {#json-with-metadata} +### JSON formats with metadata {#json-with-metadata} Some JSON input formats ([JSON](formats.md#json), [JSONCompact](formats.md#json-compact), [JSONColumnsWithMetadata](formats.md#jsoncolumnswithmetadata)) contain metadata with column names and types. In schema inference for such formats, ClickHouse reads this metadata. @@ -1465,7 +1465,7 @@ $$) └──────┴──────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ ``` -## Avro {#avro} +### Avro {#avro} In Avro format ClickHouse reads its schema from the data and converts it to ClickHouse schema using the following type matches: @@ -1485,7 +1485,7 @@ In Avro format ClickHouse reads its schema from the data and converts it to Clic Other Avro types are not supported. -## Parquet {#parquet} +### Parquet {#parquet} In Parquet format ClickHouse reads its schema from the data and converts it to ClickHouse schema using the following type matches: @@ -1513,7 +1513,7 @@ In Parquet format ClickHouse reads its schema from the data and converts it to C Other Parquet types are not supported. By default, all inferred types are inside `Nullable`, but it can be changed using the setting `schema_inference_make_columns_nullable`. -## Arrow {#arrow} +### Arrow {#arrow} In Arrow format ClickHouse reads its schema from the data and converts it to ClickHouse schema using the following type matches: @@ -1541,7 +1541,7 @@ In Arrow format ClickHouse reads its schema from the data and converts it to Cli Other Arrow types are not supported. By default, all inferred types are inside `Nullable`, but it can be changed using the setting `schema_inference_make_columns_nullable`. -## ORC {#orc} +### ORC {#orc} In ORC format ClickHouse reads its schema from the data and converts it to ClickHouse schema using the following type matches: @@ -1564,17 +1564,17 @@ In ORC format ClickHouse reads its schema from the data and converts it to Click Other ORC types are not supported. By default, all inferred types are inside `Nullable`, but it can be changed using the setting `schema_inference_make_columns_nullable`. -## Native {#native} +### Native {#native} Native format is used inside ClickHouse and contains the schema in the data. In schema inference, ClickHouse reads the schema from the data without any transformations. -# Formats with external schema {#formats-with-external-schema} +## Formats with external schema {#formats-with-external-schema} Such formats require a schema describing the data in a separate file in a specific schema language. To automatically infer a schema from files in such formats, ClickHouse reads external schema from a separate file and transforms it to a ClickHouse table schema. -# Protobuf {#protobuf} +### Protobuf {#protobuf} In schema inference for Protobuf format ClickHouse uses the following type matches: @@ -1592,7 +1592,7 @@ In schema inference for Protobuf format ClickHouse uses the following type match | `repeated T` | [Array(T)](../sql-reference/data-types/array.md) | | `message`, `group` | [Tuple](../sql-reference/data-types/tuple.md) | -# CapnProto {#capnproto} +### CapnProto {#capnproto} In schema inference for CapnProto format ClickHouse uses the following type matches: @@ -1615,13 +1615,13 @@ In schema inference for CapnProto format ClickHouse uses the following type matc | `struct` | [Tuple](../sql-reference/data-types/tuple.md) | | `union(T, Void)`, `union(Void, T)` | [Nullable(T)](../sql-reference/data-types/nullable.md) | -# Strong-typed binary formats {#strong-typed-binary-formats} +## Strong-typed binary formats {#strong-typed-binary-formats} In such formats, each serialized value contains information about its type (and possibly about its name), but there is no information about the whole table. In schema inference for such formats, ClickHouse reads data row by row (up to `input_format_max_rows_to_read_for_schema_inference` rows) and extracts the type (and possibly name) for each value from the data and then converts these types to ClickHouse types. -## MsgPack {msgpack} +### MsgPack {#msgpack} In MsgPack format there is no delimiter between rows, to use schema inference for this format you should specify the number of columns in the table using the setting `input_format_msgpack_number_of_columns`. ClickHouse uses the following type matches: @@ -1641,7 +1641,7 @@ using the setting `input_format_msgpack_number_of_columns`. ClickHouse uses the By default, all inferred types are inside `Nullable`, but it can be changed using the setting `schema_inference_make_columns_nullable`. -## BSONEachRow {#bsoneachrow} +### BSONEachRow {#bsoneachrow} In BSONEachRow each row of data is presented as a BSON document. In schema inference ClickHouse reads BSON documents one by one and extracts values, names, and types from the data and then transforms these types to ClickHouse types using the following type matches: @@ -1661,11 +1661,11 @@ values, names, and types from the data and then transforms these types to ClickH By default, all inferred types are inside `Nullable`, but it can be changed using the setting `schema_inference_make_columns_nullable`. -# Formats with constant schema {#formats-with-constant-schema} +## Formats with constant schema {#formats-with-constant-schema} Data in such formats always have the same schema. -## LineAsString {#line-as-string} +### LineAsString {#line-as-string} In this format, ClickHouse reads the whole line from the data into a single column with `String` data type. The inferred type for this format is always `String` and the column name is `line`. @@ -1680,7 +1680,7 @@ DESC format(LineAsString, 'Hello\nworld!') └──────┴────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ ``` -## JSONAsString {#json-as-string} +### JSONAsString {#json-as-string} In this format, ClickHouse reads the whole JSON object from the data into a single column with `String` data type. The inferred type for this format is always `String` and the column name is `json`. @@ -1695,7 +1695,7 @@ DESC format(JSONAsString, '{"x" : 42, "y" : "Hello, World!"}') └──────┴────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ ``` -## JSONAsObject {#json-as-object} +### JSONAsObject {#json-as-object} In this format, ClickHouse reads the whole JSON object from the data into a single column with `Object('json')` data type. Inferred type for this format is always `String` and the column name is `json`. From 003bbb2685efed6bcc64e19c46d9c848b2105e29 Mon Sep 17 00:00:00 2001 From: Arthur Passos Date: Thu, 9 Mar 2023 13:19:51 -0300 Subject: [PATCH 655/841] initialize empty string_view with empty string so std::string_view::begin does not point to null --- src/Common/tests/gtest_find_symbols.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Common/tests/gtest_find_symbols.cpp b/src/Common/tests/gtest_find_symbols.cpp index 14e769b3595..dc469ee1721 100644 --- a/src/Common/tests/gtest_find_symbols.cpp +++ b/src/Common/tests/gtest_find_symbols.cpp @@ -79,7 +79,7 @@ TEST(FindNotSymbols, ExtraSymbols) TEST(FindNotSymbols, EmptyString) { - std::string_view s; + std::string_view s = ""; test_find_first_not<'h', 'e', 'l', 'o', 'w', 'r', 'd', ' '>(s, s.end()); } From 95351bc2d365843387a9709cd8b936572ab3f929 Mon Sep 17 00:00:00 2001 From: DanRoscigno Date: Thu, 9 Mar 2023 12:05:26 -0500 Subject: [PATCH 656/841] standardize admonitions --- .../database-engines/materialized-mysql.md | 4 +-- .../materialized-postgresql.md | 4 +-- docs/en/engines/database-engines/mysql.md | 2 +- .../table-engines/integrations/hdfs.md | 4 +-- .../table-engines/integrations/kafka.md | 2 +- .../integrations/materialized-postgresql.md | 2 +- .../table-engines/integrations/postgresql.md | 2 +- .../engines/table-engines/integrations/s3.md | 4 +-- .../mergetree-family/aggregatingmergetree.md | 2 +- .../mergetree-family/collapsingmergetree.md | 2 +- .../custom-partitioning-key.md | 4 +-- .../mergetree-family/graphitemergetree.md | 6 ++-- .../mergetree-family/invertedindexes.md | 2 +- .../mergetree-family/mergetree.md | 4 +-- .../mergetree-family/replacingmergetree.md | 4 +-- .../mergetree-family/replication.md | 2 +- .../mergetree-family/summingmergetree.md | 2 +- .../versionedcollapsingmergetree.md | 2 +- docs/en/interfaces/formats.md | 28 +++++++++---------- docs/en/interfaces/http.md | 4 +-- docs/en/interfaces/postgresql.md | 2 +- .../third-party/client-libraries.md | 2 +- .../en/interfaces/third-party/integrations.md | 2 +- docs/en/operations/access-rights.md | 4 +-- .../external-authenticators/kerberos.md | 6 ++-- docs/en/operations/opentelemetry.md | 2 +- docs/en/operations/query-cache.md | 2 +- .../settings.md | 4 +-- .../settings/merge-tree-settings.md | 2 +- .../operations/settings/settings-formats.md | 2 +- docs/en/operations/settings/settings-users.md | 4 +-- docs/en/operations/settings/settings.md | 18 ++++++------ docs/en/operations/storing-data.md | 2 +- docs/en/operations/system-tables/parts.md | 2 +- docs/en/operations/tips.md | 2 +- .../operations/utilities/clickhouse-copier.md | 2 +- .../parametric-functions.md | 4 +-- docs/en/sql-reference/data-types/float.md | 2 +- docs/en/sql-reference/data-types/json.md | 4 +-- .../data-types/special-data-types/interval.md | 2 +- .../external-dicts-dict-layout.md | 4 +-- .../external-dicts-dict-structure.md | 4 +-- docs/en/sql-reference/distributed-ddl.md | 4 +-- .../sql-reference/functions/hash-functions.md | 4 +-- .../sql-reference/functions/introspection.md | 2 +- .../sql-reference/functions/nlp-functions.md | 2 +- .../functions/other-functions.md | 8 +++--- docs/en/sql-reference/operators/exists.md | 2 +- docs/en/sql-reference/operators/index.md | 2 +- .../sql-reference/statements/alter/column.md | 2 +- .../statements/alter/constraint.md | 2 +- .../statements/create/row-policy.md | 2 +- .../sql-reference/statements/create/table.md | 8 +++--- .../sql-reference/statements/create/user.md | 2 +- docs/en/sql-reference/statements/delete.md | 2 +- docs/en/sql-reference/statements/optimize.md | 2 +- docs/en/sql-reference/statements/system.md | 2 +- docs/en/sql-reference/statements/watch.md | 4 +-- docs/en/sql-reference/table-functions/file.md | 2 +- docs/en/sql-reference/table-functions/hdfs.md | 2 +- .../table-functions/hdfsCluster.md | 2 +- .../en/sql-reference/table-functions/index.md | 2 +- docs/en/sql-reference/table-functions/s3.md | 2 +- .../table-functions/s3Cluster.md | 2 +- 64 files changed, 113 insertions(+), 113 deletions(-) diff --git a/docs/en/engines/database-engines/materialized-mysql.md b/docs/en/engines/database-engines/materialized-mysql.md index 899c8d024f1..9b2d1d7e1de 100644 --- a/docs/en/engines/database-engines/materialized-mysql.md +++ b/docs/en/engines/database-engines/materialized-mysql.md @@ -6,7 +6,7 @@ sidebar_position: 70 # [experimental] MaterializedMySQL -:::warning +:::important This is an experimental feature that should not be used in production. ::: @@ -245,7 +245,7 @@ extra care needs to be taken. You may specify overrides for tables that do not exist yet. -:::warning +:::important It is easy to break replication with table overrides if not used with care. For example: * If an ALIAS column is added with a table override, and a column with the same name is later added to the source diff --git a/docs/en/engines/database-engines/materialized-postgresql.md b/docs/en/engines/database-engines/materialized-postgresql.md index b43f71a7576..7be520ee25e 100644 --- a/docs/en/engines/database-engines/materialized-postgresql.md +++ b/docs/en/engines/database-engines/materialized-postgresql.md @@ -54,7 +54,7 @@ After `MaterializedPostgreSQL` database is created, it does not automatically de ATTACH TABLE postgres_database.new_table; ``` -:::warning +:::important Before version 22.1, adding a table to replication left an unremoved temporary replication slot (named `{db_name}_ch_replication_slot_tmp`). If attaching tables in ClickHouse version before 22.1, make sure to delete it manually (`SELECT pg_drop_replication_slot('{db_name}_ch_replication_slot_tmp')`). Otherwise disk usage will grow. This issue is fixed in 22.1. ::: @@ -145,7 +145,7 @@ FROM pg_class WHERE oid = 'postgres_table'::regclass; ``` -:::warning +:::important Replication of [**TOAST**](https://www.postgresql.org/docs/9.5/storage-toast.html) values is not supported. The default value for the data type will be used. ::: diff --git a/docs/en/engines/database-engines/mysql.md b/docs/en/engines/database-engines/mysql.md index e4ff734d55f..e2c4f134a90 100644 --- a/docs/en/engines/database-engines/mysql.md +++ b/docs/en/engines/database-engines/mysql.md @@ -60,7 +60,7 @@ These variables are supported: - `version` - `max_allowed_packet` -:::warning +:::important By now these variables are stubs and don't correspond to anything. ::: diff --git a/docs/en/engines/table-engines/integrations/hdfs.md b/docs/en/engines/table-engines/integrations/hdfs.md index 7c04a6594a6..c14d05aa03a 100644 --- a/docs/en/engines/table-engines/integrations/hdfs.md +++ b/docs/en/engines/table-engines/integrations/hdfs.md @@ -64,7 +64,7 @@ SELECT * FROM hdfs_engine_table LIMIT 2 - Indexes. - [Zero-copy](../../../operations/storing-data.md#zero-copy) replication is possible, but not recommended. - :::warning Zero-copy replication is not ready for production + :::important Zero-copy replication is not ready for production Zero-copy replication is disabled by default in ClickHouse version 22.8 and higher. This feature is not recommended for production use. ::: @@ -110,7 +110,7 @@ Table consists of all the files in both directories (all files should satisfy fo CREATE TABLE table_with_asterisk (name String, value UInt32) ENGINE = HDFS('hdfs://hdfs1:9000/{some,another}_dir/*', 'TSV') ``` -:::warning +:::important If the listing of files contains number ranges with leading zeros, use the construction with braces for each digit separately or use `?`. ::: diff --git a/docs/en/engines/table-engines/integrations/kafka.md b/docs/en/engines/table-engines/integrations/kafka.md index 255ba06f056..86647fb6978 100644 --- a/docs/en/engines/table-engines/integrations/kafka.md +++ b/docs/en/engines/table-engines/integrations/kafka.md @@ -102,7 +102,7 @@ Examples: Deprecated Method for Creating a Table -:::warning +:::important Do not use this method in new projects. If possible, switch old projects to the method described above. ::: diff --git a/docs/en/engines/table-engines/integrations/materialized-postgresql.md b/docs/en/engines/table-engines/integrations/materialized-postgresql.md index 11e7928c3ed..c9b3f351568 100644 --- a/docs/en/engines/table-engines/integrations/materialized-postgresql.md +++ b/docs/en/engines/table-engines/integrations/materialized-postgresql.md @@ -52,6 +52,6 @@ PRIMARY KEY key; SELECT key, value, _version FROM postgresql_db.postgresql_replica; ``` -:::warning +:::important Replication of [**TOAST**](https://www.postgresql.org/docs/9.5/storage-toast.html) values is not supported. The default value for the data type will be used. ::: diff --git a/docs/en/engines/table-engines/integrations/postgresql.md b/docs/en/engines/table-engines/integrations/postgresql.md index b73d28c8508..d338a2a58bd 100644 --- a/docs/en/engines/table-engines/integrations/postgresql.md +++ b/docs/en/engines/table-engines/integrations/postgresql.md @@ -74,7 +74,7 @@ All joins, aggregations, sorting, `IN [ array ]` conditions and the `LIMIT` samp PostgreSQL `Array` types are converted into ClickHouse arrays. -:::warning +:::important Be careful - in PostgreSQL an array data, created like a `type_name[]`, may contain multi-dimensional arrays of different dimensions in different table rows in same column. But in ClickHouse it is only allowed to have multidimensional arrays of the same count of dimensions in all table rows in same column. ::: diff --git a/docs/en/engines/table-engines/integrations/s3.md b/docs/en/engines/table-engines/integrations/s3.md index 723425429a5..8e1a4d91cac 100644 --- a/docs/en/engines/table-engines/integrations/s3.md +++ b/docs/en/engines/table-engines/integrations/s3.md @@ -63,7 +63,7 @@ For more information about virtual columns see [here](../../../engines/table-eng - Indexes. - [Zero-copy](../../../operations/storing-data.md#zero-copy) replication is possible, but not supported. - :::warning Zero-copy replication is not ready for production + :::important Zero-copy replication is not ready for production Zero-copy replication is disabled by default in ClickHouse version 22.8 and higher. This feature is not recommended for production use. ::: @@ -78,7 +78,7 @@ For more information about virtual columns see [here](../../../engines/table-eng Constructions with `{}` are similar to the [remote](../../../sql-reference/table-functions/remote.md) table function. -:::warning +:::important If the listing of files contains number ranges with leading zeros, use the construction with braces for each digit separately or use `?`. ::: diff --git a/docs/en/engines/table-engines/mergetree-family/aggregatingmergetree.md b/docs/en/engines/table-engines/mergetree-family/aggregatingmergetree.md index 9677f75a358..9b7f0cd2486 100644 --- a/docs/en/engines/table-engines/mergetree-family/aggregatingmergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/aggregatingmergetree.md @@ -43,7 +43,7 @@ When creating an `AggregatingMergeTree` table the same [clauses](../../../engine Deprecated Method for Creating a Table -:::warning +:::important Do not use this method in new projects and, if possible, switch the old projects to the method described above. ::: diff --git a/docs/en/engines/table-engines/mergetree-family/collapsingmergetree.md b/docs/en/engines/table-engines/mergetree-family/collapsingmergetree.md index 0bd665116f0..9acff099557 100644 --- a/docs/en/engines/table-engines/mergetree-family/collapsingmergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/collapsingmergetree.md @@ -45,7 +45,7 @@ When creating a `CollapsingMergeTree` table, the same [query clauses](../../../e Deprecated Method for Creating a Table -:::warning +:::important Do not use this method in new projects and, if possible, switch old projects to the method described above. ::: diff --git a/docs/en/engines/table-engines/mergetree-family/custom-partitioning-key.md b/docs/en/engines/table-engines/mergetree-family/custom-partitioning-key.md index b1e79c4c3fd..f01cd90ccf0 100644 --- a/docs/en/engines/table-engines/mergetree-family/custom-partitioning-key.md +++ b/docs/en/engines/table-engines/mergetree-family/custom-partitioning-key.md @@ -6,7 +6,7 @@ sidebar_label: Custom Partitioning Key # Custom Partitioning Key -:::warning +:::important In most cases you do not need a partition key, and in most other cases you do not need a partition key more granular than by months. You should never use too granular of partitioning. Don't partition your data by client identifiers or names. Instead, make a client identifier or name the first column in the ORDER BY expression. @@ -159,7 +159,7 @@ FROM session_log GROUP BY UserID; ``` -:::warning +:::important Performance of such a query heavily depends on the table layout. Because of that the optimisation is not enabled by default. ::: diff --git a/docs/en/engines/table-engines/mergetree-family/graphitemergetree.md b/docs/en/engines/table-engines/mergetree-family/graphitemergetree.md index 104ec049ec4..d71004135f1 100644 --- a/docs/en/engines/table-engines/mergetree-family/graphitemergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/graphitemergetree.md @@ -55,7 +55,7 @@ When creating a `GraphiteMergeTree` table, the same [clauses](../../../engines/t Deprecated Method for Creating a Table -:::warning +:::important Do not use this method in new projects and, if possible, switch old projects to the method described above. ::: @@ -129,7 +129,7 @@ default ... ``` -:::warning +:::important Patterns must be strictly ordered: 1. Patterns without `function` or `retention`. @@ -263,6 +263,6 @@ Valid values: ``` -:::warning +:::important Data rollup is performed during merges. Usually, for old partitions, merges are not started, so for rollup it is necessary to trigger an unscheduled merge using [optimize](../../../sql-reference/statements/optimize.md). Or use additional tools, for example [graphite-ch-optimizer](https://github.com/innogames/graphite-ch-optimizer). ::: diff --git a/docs/en/engines/table-engines/mergetree-family/invertedindexes.md b/docs/en/engines/table-engines/mergetree-family/invertedindexes.md index aa11258dc4a..91ee0313a69 100644 --- a/docs/en/engines/table-engines/mergetree-family/invertedindexes.md +++ b/docs/en/engines/table-engines/mergetree-family/invertedindexes.md @@ -15,7 +15,7 @@ tokenized cells of the string column. For example, the string cell "I will be a " wi", "wil", "ill", "ll ", "l b", " be" etc. The more fine-granular the input strings are tokenized, the bigger but also the more useful the resulting inverted index will be. -:::warning +:::important Inverted indexes are experimental and should not be used in production environments yet. They may change in the future in backward-incompatible ways, for example with respect to their DDL/DQL syntax or performance/compression characteristics. ::: diff --git a/docs/en/engines/table-engines/mergetree-family/mergetree.md b/docs/en/engines/table-engines/mergetree-family/mergetree.md index fc8060077b0..5dbe7602856 100644 --- a/docs/en/engines/table-engines/mergetree-family/mergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/mergetree.md @@ -192,7 +192,7 @@ The `index_granularity` setting can be omitted because 8192 is the default value Deprecated Method for Creating a Table -:::warning +:::important Do not use this method in new projects. If possible, switch old projects to the method described above. ::: @@ -1087,7 +1087,7 @@ Other parameters: Examples of working configurations can be found in integration tests directory (see e.g. [test_merge_tree_azure_blob_storage](https://github.com/ClickHouse/ClickHouse/blob/master/tests/integration/test_merge_tree_azure_blob_storage/configs/config.d/storage_conf.xml) or [test_azure_blob_storage_zero_copy_replication](https://github.com/ClickHouse/ClickHouse/blob/master/tests/integration/test_azure_blob_storage_zero_copy_replication/configs/config.d/storage_conf.xml)). - :::warning Zero-copy replication is not ready for production + :::important Zero-copy replication is not ready for production Zero-copy replication is disabled by default in ClickHouse version 22.8 and higher. This feature is not recommended for production use. ::: diff --git a/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md b/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md index f5d81182898..0b76500f2a6 100644 --- a/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md @@ -30,7 +30,7 @@ CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] For a description of request parameters, see [statement description](../../../sql-reference/statements/create/table.md). -:::warning +:::important Uniqueness of rows is determined by the `ORDER BY` table section, not `PRIMARY KEY`. ::: @@ -96,7 +96,7 @@ When creating a `ReplacingMergeTree` table the same [clauses](../../../engines/t Deprecated Method for Creating a Table -:::warning +:::important Do not use this method in new projects and, if possible, switch old projects to the method described above. ::: diff --git a/docs/en/engines/table-engines/mergetree-family/replication.md b/docs/en/engines/table-engines/mergetree-family/replication.md index 37ab8ac9fd3..f9adad0fa6d 100644 --- a/docs/en/engines/table-engines/mergetree-family/replication.md +++ b/docs/en/engines/table-engines/mergetree-family/replication.md @@ -43,7 +43,7 @@ ClickHouse uses [ClickHouse Keeper](/docs/en/guides/sre/keeper/clickhouse-keeper To use replication, set parameters in the [zookeeper](/docs/en/operations/server-configuration-parameters/settings.md/#server-settings_zookeeper) server configuration section. -:::warning +:::important Don’t neglect the security setting. ClickHouse supports the `digest` [ACL scheme](https://zookeeper.apache.org/doc/current/zookeeperProgrammers.html#sc_ZooKeeperAccessControl) of the ZooKeeper security subsystem. ::: diff --git a/docs/en/engines/table-engines/mergetree-family/summingmergetree.md b/docs/en/engines/table-engines/mergetree-family/summingmergetree.md index b2b6272c58e..bea37706939 100644 --- a/docs/en/engines/table-engines/mergetree-family/summingmergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/summingmergetree.md @@ -44,7 +44,7 @@ When creating a `SummingMergeTree` table the same [clauses](../../../engines/tab Deprecated Method for Creating a Table -:::warning +:::important Do not use this method in new projects and, if possible, switch the old projects to the method described above. ::: diff --git a/docs/en/engines/table-engines/mergetree-family/versionedcollapsingmergetree.md b/docs/en/engines/table-engines/mergetree-family/versionedcollapsingmergetree.md index 2891907f79a..1a44569711a 100644 --- a/docs/en/engines/table-engines/mergetree-family/versionedcollapsingmergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/versionedcollapsingmergetree.md @@ -58,7 +58,7 @@ When creating a `VersionedCollapsingMergeTree` table, the same [clauses](../../. Deprecated Method for Creating a Table -:::warning +:::important Do not use this method in new projects. If possible, switch old projects to the method described above. ::: diff --git a/docs/en/interfaces/formats.md b/docs/en/interfaces/formats.md index db2e773a685..fa15de16c71 100644 --- a/docs/en/interfaces/formats.md +++ b/docs/en/interfaces/formats.md @@ -205,7 +205,7 @@ Differs from the `TabSeparated` format in that the column names are written in t During parsing, the first row is expected to contain the column names. You can use column names to determine their position and to check their correctness. -:::warning +:::important If setting [input_format_with_names_use_header](/docs/en/operations/settings/settings-formats.md/#input_format_with_names_use_header) is set to 1, the columns from the input data will be mapped to the columns of the table by their names, columns with unknown names will be skipped if setting [input_format_skip_unknown_fields](/docs/en/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) is set to 1. Otherwise, the first row will be skipped. @@ -217,7 +217,7 @@ This format is also available under the name `TSVWithNames`. Differs from the `TabSeparated` format in that the column names are written to the first row, while the column types are in the second row. -:::warning +:::important If setting [input_format_with_names_use_header](/docs/en/operations/settings/settings-formats.md/#input_format_with_names_use_header) is set to 1, the columns from the input data will be mapped to the columns in the table by their names, columns with unknown names will be skipped if setting [input_format_skip_unknown_fields](/docs/en/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) is set to 1. Otherwise, the first row will be skipped. @@ -470,7 +470,7 @@ The CSV format supports the output of totals and extremes the same way as `TabSe Also prints the header row with column names, similar to [TabSeparatedWithNames](#tabseparatedwithnames). -:::warning +:::important If setting [input_format_with_names_use_header](/docs/en/operations/settings/settings-formats.md/#input_format_with_names_use_header) is set to 1, the columns from input data will be mapped to the columns from the table by their names, columns with unknown names will be skipped if setting [input_format_skip_unknown_fields](/docs/en/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) is set to 1. Otherwise, the first row will be skipped. @@ -480,7 +480,7 @@ Otherwise, the first row will be skipped. Also prints two header rows with column names and types, similar to [TabSeparatedWithNamesAndTypes](#tabseparatedwithnamesandtypes). -:::warning +:::important If setting [input_format_with_names_use_header](/docs/en/operations/settings/settings-formats.md/#input_format_with_names_use_header) is set to 1, the columns from input data will be mapped to the columns from the table by their names, columns with unknown names will be skipped if setting [input_format_skip_unknown_fields](/docs/en/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) is set to 1. Otherwise, the first row will be skipped. @@ -500,7 +500,7 @@ There is also `CustomSeparatedIgnoreSpaces` format, which is similar to [Templat Also prints the header row with column names, similar to [TabSeparatedWithNames](#tabseparatedwithnames). -:::warning +:::important If setting [input_format_with_names_use_header](/docs/en/operations/settings/settings-formats.md/#input_format_with_names_use_header) is set to 1, the columns from input data will be mapped to the columns from the table by their names, columns with unknown names will be skipped if setting [input_format_skip_unknown_fields](/docs/en/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) is set to 1. Otherwise, the first row will be skipped. @@ -510,7 +510,7 @@ Otherwise, the first row will be skipped. Also prints two header rows with column names and types, similar to [TabSeparatedWithNamesAndTypes](#tabseparatedwithnamesandtypes). -:::warning +:::important If setting [input_format_with_names_use_header](/docs/en/operations/settings/settings-formats.md/#input_format_with_names_use_header) is set to 1, the columns from input data will be mapped to the columns from the table by their names, columns with unknown names will be skipped if setting [input_format_skip_unknown_fields](/docs/en/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) is set to 1. Otherwise, the first row will be skipped. @@ -969,7 +969,7 @@ Differs from `JSONEachRow`/`JSONStringsEachRow` in that ClickHouse will also yie Differs from `JSONCompactEachRow` format in that it also prints the header row with column names, similar to [TabSeparatedWithNames](#tabseparatedwithnames). -:::warning +:::important If setting [input_format_with_names_use_header](/docs/en/operations/settings/settings-formats.md/#input_format_with_names_use_header) is set to 1, the columns from input data will be mapped to the columns from the table by their names, columns with unknown names will be skipped if setting [input_format_skip_unknown_fields](/docs/en/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) is set to 1. Otherwise, the first row will be skipped. @@ -979,7 +979,7 @@ Otherwise, the first row will be skipped. Differs from `JSONCompactEachRow` format in that it also prints two header rows with column names and types, similar to [TabSeparatedWithNamesAndTypes](#tabseparatedwithnamesandtypes). -:::warning +:::important If setting [input_format_with_names_use_header](/docs/en/operations/settings/settings-formats.md/#input_format_with_names_use_header) is set to 1, the columns from input data will be mapped to the columns from the table by their names, columns with unknown names will be skipped if setting [input_format_skip_unknown_fields](/docs/en/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) is set to 1. Otherwise, the first row will be skipped. @@ -991,7 +991,7 @@ the types from input data will be compared with the types of the corresponding c Differs from `JSONCompactStringsEachRow` in that in that it also prints the header row with column names, similar to [TabSeparatedWithNames](#tabseparatedwithnames). -:::warning +:::important If setting [input_format_with_names_use_header](/docs/en/operations/settings/settings-formats.md/#input_format_with_names_use_header) is set to 1, the columns from input data will be mapped to the columns from the table by their names, columns with unknown names will be skipped if setting [input_format_skip_unknown_fields](/docs/en/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) is set to 1. Otherwise, the first row will be skipped. @@ -1001,7 +1001,7 @@ Otherwise, the first row will be skipped. Differs from `JSONCompactStringsEachRow` in that it also prints two header rows with column names and types, similar to [TabSeparatedWithNamesAndTypes](#tabseparatedwithnamesandtypes). -:::warning +:::important If setting [input_format_with_names_use_header](/docs/en/operations/settings/settings-formats.md/#input_format_with_names_use_header) is set to 1, the columns from input data will be mapped to the columns from the table by their names, columns with unknown names will be skipped if setting [input_format_skip_unknown_fields](/docs/en/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) is set to 1. Otherwise, the first row will be skipped. @@ -1120,7 +1120,7 @@ CREATE TABLE IF NOT EXISTS example_table - If `input_format_defaults_for_omitted_fields = 0`, then the default value for `x` and `a` equals `0` (as the default value for the `UInt32` data type). - If `input_format_defaults_for_omitted_fields = 1`, then the default value for `x` equals `0`, but the default value of `a` equals `x * 2`. -:::warning +:::important When inserting data with `input_format_defaults_for_omitted_fields = 1`, ClickHouse consumes more computational resources, compared to insertion with `input_format_defaults_for_omitted_fields = 0`. ::: @@ -1450,7 +1450,7 @@ Similar to [RowBinary](#rowbinary), but with added header: - [LEB128](https://en.wikipedia.org/wiki/LEB128)-encoded number of columns (N) - N `String`s specifying column names -:::warning +:::important If setting [input_format_with_names_use_header](/docs/en/operations/settings/settings-formats.md/#input_format_with_names_use_header) is set to 1, the columns from input data will be mapped to the columns from the table by their names, columns with unknown names will be skipped if setting [input_format_skip_unknown_fields](/docs/en/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) is set to 1. Otherwise, the first row will be skipped. @@ -1464,7 +1464,7 @@ Similar to [RowBinary](#rowbinary), but with added header: - N `String`s specifying column names - N `String`s specifying column types -:::warning +:::important If setting [input_format_with_names_use_header](/docs/en/operations/settings/settings-formats.md/#input_format_with_names_use_header) is set to 1, the columns from input data will be mapped to the columns from the table by their names, columns with unknown names will be skipped if setting [input_format_skip_unknown_fields](/docs/en/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) is set to 1. Otherwise, the first row will be skipped. @@ -1912,7 +1912,7 @@ SET format_avro_schema_registry_url = 'http://schema-registry'; SELECT * FROM topic1_stream; ``` -:::warning +:::important Setting `format_avro_schema_registry_url` needs to be configured in `users.xml` to maintain it’s value after a restart. Also you can use the `format_avro_schema_registry_url` setting of the `Kafka` table engine. ::: diff --git a/docs/en/interfaces/http.md b/docs/en/interfaces/http.md index 9af6df0c87d..efa51bb34ea 100644 --- a/docs/en/interfaces/http.md +++ b/docs/en/interfaces/http.md @@ -445,7 +445,7 @@ Next are the configuration methods for different `type`. The following example defines the values of [max_threads](../operations/settings/settings.md#settings-max_threads) and `max_final_threads` settings, then queries the system table to check whether these settings were set successfully. -:::warning +:::important To keep the default `handlers` such as` query`, `play`,` ping`, add the `` rule. ::: @@ -476,7 +476,7 @@ $ curl -H 'XXX:TEST_HEADER_VALUE' -H 'PARAMS_XXX:max_threads' 'http://localhost: max_final_threads 2 ``` -:::warning +:::important In one `predefined_query_handler` only supports one `query` of an insert type. ::: diff --git a/docs/en/interfaces/postgresql.md b/docs/en/interfaces/postgresql.md index 9ff83559787..0cc70cce571 100644 --- a/docs/en/interfaces/postgresql.md +++ b/docs/en/interfaces/postgresql.md @@ -54,7 +54,7 @@ default=> And that's it! You now have a PostgreSQL client connected to ClickHouse, and all commands and queries are executed on ClickHouse. -:::caution +:::important The PostgreSQL protocol currently only supports plain-text passwords. ::: diff --git a/docs/en/interfaces/third-party/client-libraries.md b/docs/en/interfaces/third-party/client-libraries.md index 0e065cb7179..4ce63ba647b 100644 --- a/docs/en/interfaces/third-party/client-libraries.md +++ b/docs/en/interfaces/third-party/client-libraries.md @@ -6,7 +6,7 @@ sidebar_label: Client Libraries # Client Libraries from Third-party Developers -:::warning +:::important ClickHouse Inc does **not** maintain the libraries listed below and hasn’t done any extensive testing to ensure their quality. ::: diff --git a/docs/en/interfaces/third-party/integrations.md b/docs/en/interfaces/third-party/integrations.md index 90a4f088be7..8197a1d1f58 100644 --- a/docs/en/interfaces/third-party/integrations.md +++ b/docs/en/interfaces/third-party/integrations.md @@ -6,7 +6,7 @@ sidebar_label: Integrations # Integration Libraries from Third-party Developers -:::warning Disclaimer +:::important Disclaimer ClickHouse, Inc. does **not** maintain the tools and libraries listed below and haven’t done extensive testing to ensure their quality. ::: diff --git a/docs/en/operations/access-rights.md b/docs/en/operations/access-rights.md index 4c4a06dbe1e..38d32e3f1f7 100644 --- a/docs/en/operations/access-rights.md +++ b/docs/en/operations/access-rights.md @@ -24,7 +24,7 @@ You can configure access entities using: We recommend using SQL-driven workflow. Both of the configuration methods work simultaneously, so if you use the server configuration files for managing accounts and access rights, you can smoothly switch to SQL-driven workflow. -:::warning +:::important You can’t manage the same access entity by both configuration methods simultaneously. ::: @@ -102,7 +102,7 @@ Privileges can be granted to a role by the [GRANT](../sql-reference/statements/g Row policy is a filter that defines which of the rows are available to a user or a role. Row policy contains filters for one particular table, as well as a list of roles and/or users which should use this row policy. -:::warning +:::important Row policies makes sense only for users with readonly access. If user can modify table or copy partitions between tables, it defeats the restrictions of row policies. ::: diff --git a/docs/en/operations/external-authenticators/kerberos.md b/docs/en/operations/external-authenticators/kerberos.md index 95944e96194..b49291f8e2e 100644 --- a/docs/en/operations/external-authenticators/kerberos.md +++ b/docs/en/operations/external-authenticators/kerberos.md @@ -59,11 +59,11 @@ With filtering by realm: ``` -:::warning +:::important You can define only one `kerberos` section. The presence of multiple `kerberos` sections will force ClickHouse to disable Kerberos authentication. ::: -:::warning +:::important `principal` and `realm` sections cannot be specified at the same time. The presence of both `principal` and `realm` sections will force ClickHouse to disable Kerberos authentication. ::: @@ -103,7 +103,7 @@ Example (goes into `users.xml`): ``` -:::warning +:::important Note that Kerberos authentication cannot be used alongside with any other authentication mechanism. The presence of any other sections like `password` alongside `kerberos` will force ClickHouse to shutdown. ::: diff --git a/docs/en/operations/opentelemetry.md b/docs/en/operations/opentelemetry.md index 1de5a09db0c..7faa4b1ee7c 100644 --- a/docs/en/operations/opentelemetry.md +++ b/docs/en/operations/opentelemetry.md @@ -7,7 +7,7 @@ title: "[experimental] Tracing ClickHouse with OpenTelemetry" [OpenTelemetry](https://opentelemetry.io/) is an open standard for collecting traces and metrics from the distributed application. ClickHouse has some support for OpenTelemetry. -:::warning +:::important This is an experimental feature that will change in backwards-incompatible ways in future releases. ::: diff --git a/docs/en/operations/query-cache.md b/docs/en/operations/query-cache.md index 1a486de7904..a7ac011c796 100644 --- a/docs/en/operations/query-cache.md +++ b/docs/en/operations/query-cache.md @@ -29,7 +29,7 @@ Transactionally inconsistent caching is traditionally provided by client tools o the same caching logic and configuration is often duplicated. With ClickHouse's query cache, the caching logic moves to the server side. This reduces maintenance effort and avoids redundancy. -:::warning +:::important The query cache is an experimental feature that should not be used in production. There are known cases (e.g. in distributed query processing) where wrong results are returned. ::: diff --git a/docs/en/operations/server-configuration-parameters/settings.md b/docs/en/operations/server-configuration-parameters/settings.md index 3fe815bc79a..4494ad39a0e 100644 --- a/docs/en/operations/server-configuration-parameters/settings.md +++ b/docs/en/operations/server-configuration-parameters/settings.md @@ -24,7 +24,7 @@ Default value: 3600. Data compression settings for [MergeTree](../../engines/table-engines/mergetree-family/mergetree.md)-engine tables. -:::warning +:::tip Don’t use it if you have just started using ClickHouse. ::: @@ -1367,7 +1367,7 @@ The following settings are available: Changed settings take effect immediately. -:::warning +:::important Data for the query cache is allocated in DRAM. If memory is scarce, make sure to set a small value for `size` or disable the query cache altogether. ::: diff --git a/docs/en/operations/settings/merge-tree-settings.md b/docs/en/operations/settings/merge-tree-settings.md index 5bc174727ad..6290a23378c 100644 --- a/docs/en/operations/settings/merge-tree-settings.md +++ b/docs/en/operations/settings/merge-tree-settings.md @@ -289,7 +289,7 @@ Default value: 0 (seconds) When this setting has a value greater than than zero only a single replica starts the merge immediately if merged part on shared storage and `allow_remote_fs_zero_copy_replication` is enabled. -:::warning Zero-copy replication is not ready for production +:::important Zero-copy replication is not ready for production Zero-copy replication is disabled by default in ClickHouse version 22.8 and higher. This feature is not recommended for production use. ::: diff --git a/docs/en/operations/settings/settings-formats.md b/docs/en/operations/settings/settings-formats.md index 919ebaf562f..b03f922d0d4 100644 --- a/docs/en/operations/settings/settings-formats.md +++ b/docs/en/operations/settings/settings-formats.md @@ -142,7 +142,7 @@ y Nullable(String) z IPv4 ``` -:::warning +:::important If the `schema_inference_hints` is not formated properly, or if there is a typo or a wrong datatype, etc... the whole schema_inference_hints will be ignored. ::: diff --git a/docs/en/operations/settings/settings-users.md b/docs/en/operations/settings/settings-users.md index b55d64fc4f7..ac0025a1137 100644 --- a/docs/en/operations/settings/settings-users.md +++ b/docs/en/operations/settings/settings-users.md @@ -118,8 +118,8 @@ To open access for user from any network, specify: ::/0 ``` -:::warning -It’s insecure to open access from any network unless you have a firewall properly configured or the server is not directly connected to Internet. +:::important +It is insecure to open access from any network unless you have a firewall properly configured or the server is not directly connected to Internet. ::: To open access only from localhost, specify: diff --git a/docs/en/operations/settings/settings.md b/docs/en/operations/settings/settings.md index 94dcf159ca9..809c7c3e837 100644 --- a/docs/en/operations/settings/settings.md +++ b/docs/en/operations/settings/settings.md @@ -460,7 +460,7 @@ Possible values: Changes the behaviour of join operations with `ANY` strictness. -:::warning +:::important This setting applies only for `JOIN` operations with [Join](../../engines/table-engines/special/join.md) engine tables. ::: @@ -550,7 +550,7 @@ Default value: 64. Enables legacy ClickHouse server behaviour in `ANY INNER|LEFT JOIN` operations. -:::warning +:::important Use this setting only for backward compatibility if your use cases depend on legacy `JOIN` behaviour. ::: @@ -942,7 +942,7 @@ Higher values will lead to higher memory usage. The maximum size of blocks of uncompressed data before compressing for writing to a table. By default, 1,048,576 (1 MiB). Specifying a smaller block size generally leads to slightly reduced compression ratio, the compression and decompression speed increases slightly due to cache locality, and memory consumption is reduced. -:::warning +:::important This is an expert-level setting, and you shouldn't change it if you're just getting started with ClickHouse. ::: @@ -960,7 +960,7 @@ We are writing a UInt32-type column (4 bytes per value). When writing 8192 rows, We are writing a URL column with the String type (average size of 60 bytes per value). When writing 8192 rows, the average will be slightly less than 500 KB of data. Since this is more than 65,536, a compressed block will be formed for each mark. In this case, when reading data from the disk in the range of a single mark, extra data won’t be decompressed. -:::warning +:::important This is an expert-level setting, and you shouldn't change it if you're just getting started with ClickHouse. ::: @@ -1247,7 +1247,7 @@ Possible values: Default value: 1. -:::warning +:::important Disable this setting if you use [max_parallel_replicas](#settings-max_parallel_replicas) without [parallel_replicas_custom_key](#settings-parallel_replicas_custom_key). If [parallel_replicas_custom_key](#settings-parallel_replicas_custom_key) is set, disable this setting only if it's used on a cluster with multiple shards containing multiple replicas. If it's used on a cluster with a single shard and multiple replicas, disabling this setting will have negative effects. @@ -1277,7 +1277,7 @@ Default value: `1`. This options will produce different results depending on the settings used. -:::warning +:::important This setting will produce incorrect results when joins or subqueries are involved, and all tables don't meet certain requirements. See [Distributed Subqueries and max_parallel_replicas](../../sql-reference/operators/in.md/#max_parallel_replica-subqueries) for more details. ::: @@ -2186,7 +2186,7 @@ Default value: 0. This setting also affects broken batches (that may appears because of abnormal server (machine) termination and no `fsync_after_insert`/`fsync_directories` for [Distributed](../../engines/table-engines/special/distributed.md) table engine). ::: -:::warning +:::important You should not rely on automatic batch splitting, since this may hurt performance. ::: @@ -2194,7 +2194,7 @@ You should not rely on automatic batch splitting, since this may hurt performanc Sets the priority ([nice](https://en.wikipedia.org/wiki/Nice_(Unix))) for threads that execute queries. The OS scheduler considers this priority when choosing the next thread to run on each available CPU core. -:::warning +:::important To use this setting, you need to set the `CAP_SYS_NICE` capability. The `clickhouse-server` package sets it up during installation. Some virtual environments do not allow you to set the `CAP_SYS_NICE` capability. In this case, `clickhouse-server` shows a message about it at the start. ::: @@ -2858,7 +2858,7 @@ Possible values: Default value: `0`. -:::warning +:::important Nullable primary key usually indicates bad design. It is forbidden in almost all main stream DBMS. The feature is mainly for [AggregatingMergeTree](../../engines/table-engines/mergetree-family/aggregatingmergetree.md) and is not heavily tested. Use with care. ::: diff --git a/docs/en/operations/storing-data.md b/docs/en/operations/storing-data.md index 3f9a0f67187..21c3bf84250 100644 --- a/docs/en/operations/storing-data.md +++ b/docs/en/operations/storing-data.md @@ -471,6 +471,6 @@ Use [http_max_single_read_retries](/docs/en/operations/settings/settings.md/#htt Zero-copy replication is possible, but not recommended, with `S3` and `HDFS` disks. Zero-copy replication means that if the data is stored remotely on several machines and needs to be synchronized, then only the metadata is replicated (paths to the data parts), but not the data itself. -:::warning Zero-copy replication is not ready for production +:::important Zero-copy replication is not ready for production Zero-copy replication is disabled by default in ClickHouse version 22.8 and higher. This feature is not recommended for production use. ::: diff --git a/docs/en/operations/system-tables/parts.md b/docs/en/operations/system-tables/parts.md index 106d3c59dea..c9477214fd6 100644 --- a/docs/en/operations/system-tables/parts.md +++ b/docs/en/operations/system-tables/parts.md @@ -99,7 +99,7 @@ Columns: - `move_ttl_info.expression` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) — Array of expressions. Each expression defines a [TTL MOVE rule](../../engines/table-engines/mergetree-family/mergetree.md/#table_engine-mergetree-ttl). -:::warning +:::important The `move_ttl_info.expression` array is kept mostly for backward compatibility, now the simpliest way to check `TTL MOVE` rule is to use the `move_ttl_info.min` and `move_ttl_info.max` fields. ::: diff --git a/docs/en/operations/tips.md b/docs/en/operations/tips.md index da34a6b7e9c..00e7155edc1 100644 --- a/docs/en/operations/tips.md +++ b/docs/en/operations/tips.md @@ -36,7 +36,7 @@ $ echo 0 | sudo tee /proc/sys/vm/overcommit_memory Use `perf top` to watch the time spent in the kernel for memory management. Permanent huge pages also do not need to be allocated. -:::warning +:::important If your system has less than 16 GB of RAM, you may experience various memory exceptions because default settings do not match this amount of memory. The recommended amount of RAM is 32 GB or more. You can use ClickHouse in a system with a small amount of RAM, even with 2 GB of RAM, but it requires additional tuning and can ingest at a low rate. ::: diff --git a/docs/en/operations/utilities/clickhouse-copier.md b/docs/en/operations/utilities/clickhouse-copier.md index 87280bc3ba8..1b75530dda7 100644 --- a/docs/en/operations/utilities/clickhouse-copier.md +++ b/docs/en/operations/utilities/clickhouse-copier.md @@ -8,7 +8,7 @@ sidebar_label: clickhouse-copier Copies data from the tables in one cluster to tables in another (or the same) cluster. -:::warning +:::important To get a consistent copy, the data in the source tables and partitions should not change during the entire process. ::: diff --git a/docs/en/sql-reference/aggregate-functions/parametric-functions.md b/docs/en/sql-reference/aggregate-functions/parametric-functions.md index 40184c0aa02..0bd43034c1b 100644 --- a/docs/en/sql-reference/aggregate-functions/parametric-functions.md +++ b/docs/en/sql-reference/aggregate-functions/parametric-functions.md @@ -90,7 +90,7 @@ Checks whether the sequence contains an event chain that matches the pattern. sequenceMatch(pattern)(timestamp, cond1, cond2, ...) ``` -:::warning +:::important Events that occur at the same second may lay in the sequence in an undefined order affecting the result. ::: @@ -176,7 +176,7 @@ SELECT sequenceMatch('(?1)(?2)')(time, number = 1, number = 2, number = 4) FROM Counts the number of event chains that matched the pattern. The function searches event chains that do not overlap. It starts to search for the next chain after the current chain is matched. -:::warning +:::important Events that occur at the same second may lay in the sequence in an undefined order affecting the result. ::: diff --git a/docs/en/sql-reference/data-types/float.md b/docs/en/sql-reference/data-types/float.md index 38c414fa8cd..7a5fa088f6e 100644 --- a/docs/en/sql-reference/data-types/float.md +++ b/docs/en/sql-reference/data-types/float.md @@ -6,7 +6,7 @@ sidebar_label: Float32, Float64 # Float32, Float64 -:::warning +:::important If you need accurate calculations, in particular if you work with financial or business data requiring a high precision you should consider using Decimal instead. Floats might lead to inaccurate results as illustrated below: ``` diff --git a/docs/en/sql-reference/data-types/json.md b/docs/en/sql-reference/data-types/json.md index d9099ba5ad3..29d6553b888 100644 --- a/docs/en/sql-reference/data-types/json.md +++ b/docs/en/sql-reference/data-types/json.md @@ -6,7 +6,7 @@ sidebar_label: JSON # JSON -:::warning +:::important This feature is experimental and is not production ready. If you need to work with JSON documents, consider using [this guide](/docs/en/guides/developer/working-with-json/json-load-data.md) instead. ::: @@ -14,7 +14,7 @@ Stores JavaScript Object Notation (JSON) documents in a single column. `JSON` is an alias for `Object('json')`. -:::warning +:::important The JSON data type is an experimental feature. To use it, set `allow_experimental_object_type = 1`. ::: diff --git a/docs/en/sql-reference/data-types/special-data-types/interval.md b/docs/en/sql-reference/data-types/special-data-types/interval.md index 5169bc646c9..68494e52360 100644 --- a/docs/en/sql-reference/data-types/special-data-types/interval.md +++ b/docs/en/sql-reference/data-types/special-data-types/interval.md @@ -8,7 +8,7 @@ sidebar_label: Interval The family of data types representing time and date intervals. The resulting types of the [INTERVAL](../../../sql-reference/operators/index.md#operator-interval) operator. -:::warning +:::important `Interval` data type values can’t be stored in tables. ::: diff --git a/docs/en/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-layout.md b/docs/en/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-layout.md index 4dc6fd33849..7af5923e052 100644 --- a/docs/en/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-layout.md +++ b/docs/en/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-layout.md @@ -299,7 +299,7 @@ Example: The table contains discounts for each advertiser in the format: To use a sample for date ranges, define the `range_min` and `range_max` elements in the [structure](../../../sql-reference/dictionaries/external-dictionaries/external-dicts-dict-structure.md). These elements must contain elements `name` and `type` (if `type` is not specified, the default type will be used - Date). `type` can be any numeric type (Date / DateTime / UInt64 / Int32 / others). -:::warning +:::important Values of `range_min` and `range_max` should fit in `Int64` type. ::: @@ -588,7 +588,7 @@ Set a large enough cache size. You need to experiment to select the number of ce 3. Assess memory consumption using the `system.dictionaries` table. 4. Increase or decrease the number of cells until the required memory consumption is reached. -:::warning +:::important Do not use ClickHouse as a source, because it is slow to process queries with random reads. ::: diff --git a/docs/en/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-structure.md b/docs/en/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-structure.md index 8271a342941..06d1c817a13 100644 --- a/docs/en/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-structure.md +++ b/docs/en/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-structure.md @@ -60,7 +60,7 @@ ClickHouse supports the following types of keys: An xml structure can contain either `` or ``. DDL-query must contain single `PRIMARY KEY`. -:::warning +:::important You must not describe key as an attribute. ::: @@ -178,4 +178,4 @@ Configuration fields: ## Related Content -- [Using dictionaries to accelerate queries](https://clickhouse.com/blog/faster-queries-dictionaries-clickhouse) \ No newline at end of file +- [Using dictionaries to accelerate queries](https://clickhouse.com/blog/faster-queries-dictionaries-clickhouse) diff --git a/docs/en/sql-reference/distributed-ddl.md b/docs/en/sql-reference/distributed-ddl.md index ff5155391be..d170f3765c2 100644 --- a/docs/en/sql-reference/distributed-ddl.md +++ b/docs/en/sql-reference/distributed-ddl.md @@ -18,6 +18,6 @@ In order to run these queries correctly, each host must have the same cluster de The local version of the query will eventually be executed on each host in the cluster, even if some hosts are currently not available. -:::warning +:::important The order for executing queries within a single host is guaranteed. -::: \ No newline at end of file +::: diff --git a/docs/en/sql-reference/functions/hash-functions.md b/docs/en/sql-reference/functions/hash-functions.md index 69dc73e2fb0..833e0a40b2b 100644 --- a/docs/en/sql-reference/functions/hash-functions.md +++ b/docs/en/sql-reference/functions/hash-functions.md @@ -125,7 +125,7 @@ SELECT sipHash64Keyed((506097522914230528, 1084818905618843912), array('e','x',' Like [sipHash64](#hash_functions-siphash64) but produces a 128-bit hash value, i.e. the final xor-folding state is done up to 128 bits. -:::warning +:::important This 128-bit variant differs from the reference implementation and it's weaker. This version exists because, when it was written, there was no official 128-bit extension for SipHash. New projects should probably use [sipHash128Reference](#hash_functions-siphash128reference). @@ -165,7 +165,7 @@ Result: Same as [sipHash128](#hash_functions-siphash128) but additionally takes an explicit key argument instead of using a fixed key. -:::warning +:::important This 128-bit variant differs from the reference implementation and it's weaker. This version exists because, when it was written, there was no official 128-bit extension for SipHash. New projects should probably use [sipHash128ReferenceKeyed](#hash_functions-siphash128referencekeyed). diff --git a/docs/en/sql-reference/functions/introspection.md b/docs/en/sql-reference/functions/introspection.md index 9357f75b8e6..78f763318df 100644 --- a/docs/en/sql-reference/functions/introspection.md +++ b/docs/en/sql-reference/functions/introspection.md @@ -8,7 +8,7 @@ sidebar_label: Introspection You can use functions described in this chapter to introspect [ELF](https://en.wikipedia.org/wiki/Executable_and_Linkable_Format) and [DWARF](https://en.wikipedia.org/wiki/DWARF) for query profiling. -:::warning +:::important These functions are slow and may impose security considerations. ::: diff --git a/docs/en/sql-reference/functions/nlp-functions.md b/docs/en/sql-reference/functions/nlp-functions.md index f68448af2be..62116fe50a3 100644 --- a/docs/en/sql-reference/functions/nlp-functions.md +++ b/docs/en/sql-reference/functions/nlp-functions.md @@ -5,7 +5,7 @@ sidebar_label: NLP title: "[experimental] Natural Language Processing functions" --- -:::warning +:::important This is an experimental feature that is currently in development and is not ready for general use. It will change in unpredictable backwards-incompatible ways in future releases. Set `allow_experimental_nlp_functions = 1` to enable it. ::: diff --git a/docs/en/sql-reference/functions/other-functions.md b/docs/en/sql-reference/functions/other-functions.md index 7146484361e..0f95f16ffed 100644 --- a/docs/en/sql-reference/functions/other-functions.md +++ b/docs/en/sql-reference/functions/other-functions.md @@ -792,7 +792,7 @@ neighbor(column, offset[, default_value]) The result of the function depends on the affected data blocks and the order of data in the block. -:::warning +:::important It can reach the neighbor rows only inside the currently processed data block. ::: @@ -902,7 +902,7 @@ Result: Calculates the difference between successive row values ​​in the data block. Returns 0 for the first row and the difference from the previous row for each subsequent row. -:::warning +:::important It can reach the previous row only inside the currently processed data block. ::: @@ -986,7 +986,7 @@ Each event has a start time and an end time. The start time is included in the e The function calculates the total number of active (concurrent) events for each event start time. -:::warning +:::important Events must be ordered by the start time in ascending order. If this requirement is violated the function raises an exception. Every data block is processed separately. If events from different data blocks overlap then they can not be processed correctly. ::: @@ -1674,7 +1674,7 @@ Result: Accumulates states of an aggregate function for each row of a data block. -:::warning +:::important The state is reset for each new data block. ::: diff --git a/docs/en/sql-reference/operators/exists.md b/docs/en/sql-reference/operators/exists.md index 4bc29389c9c..6819048e28f 100644 --- a/docs/en/sql-reference/operators/exists.md +++ b/docs/en/sql-reference/operators/exists.md @@ -7,7 +7,7 @@ The `EXISTS` operator checks how many records are in the result of a subquery. I `EXISTS` can be used in a [WHERE](../../sql-reference/statements/select/where.md) clause. -:::warning +:::important References to main query tables and columns are not supported in a subquery. ::: diff --git a/docs/en/sql-reference/operators/index.md b/docs/en/sql-reference/operators/index.md index 0fe7ebbf4b6..98dee830cd4 100644 --- a/docs/en/sql-reference/operators/index.md +++ b/docs/en/sql-reference/operators/index.md @@ -229,7 +229,7 @@ Types of intervals: You can also use a string literal when setting the `INTERVAL` value. For example, `INTERVAL 1 HOUR` is identical to the `INTERVAL '1 hour'` or `INTERVAL '1' hour`. -:::warning +:::important Intervals with different types can’t be combined. You can’t use expressions like `INTERVAL 4 DAY 1 HOUR`. Specify intervals in units that are smaller or equal to the smallest unit of the interval, for example, `INTERVAL 25 HOUR`. You can use consecutive operations, like in the example below. ::: diff --git a/docs/en/sql-reference/statements/alter/column.md b/docs/en/sql-reference/statements/alter/column.md index d580efa4992..99958c31b92 100644 --- a/docs/en/sql-reference/statements/alter/column.md +++ b/docs/en/sql-reference/statements/alter/column.md @@ -75,7 +75,7 @@ Deletes the column with the name `name`. If the `IF EXISTS` clause is specified, Deletes data from the file system. Since this deletes entire files, the query is completed almost instantly. -:::warning +:::important You can’t delete a column if it is referenced by [materialized view](/docs/en/sql-reference/statements/create/view.md/#materialized). Otherwise, it returns an error. ::: diff --git a/docs/en/sql-reference/statements/alter/constraint.md b/docs/en/sql-reference/statements/alter/constraint.md index 844b24d7374..0b19966798b 100644 --- a/docs/en/sql-reference/statements/alter/constraint.md +++ b/docs/en/sql-reference/statements/alter/constraint.md @@ -17,7 +17,7 @@ See more on [constraints](../../../sql-reference/statements/create/table.md#cons Queries will add or remove metadata about constraints from table so they are processed immediately. -:::warning +:::important Constraint check **will not be executed** on existing data if it was added. ::: diff --git a/docs/en/sql-reference/statements/create/row-policy.md b/docs/en/sql-reference/statements/create/row-policy.md index 31ce9221eea..93bc5729c8e 100644 --- a/docs/en/sql-reference/statements/create/row-policy.md +++ b/docs/en/sql-reference/statements/create/row-policy.md @@ -7,7 +7,7 @@ title: "CREATE ROW POLICY" Creates a [row policy](../../../operations/access-rights.md#row-policy-management), i.e. a filter used to determine which rows a user can read from a table. -:::warning +:::important Row policies makes sense only for users with readonly access. If user can modify table or copy partitions between tables, it defeats the restrictions of row policies. ::: diff --git a/docs/en/sql-reference/statements/create/table.md b/docs/en/sql-reference/statements/create/table.md index 50e74920e4b..7da1c9669ff 100644 --- a/docs/en/sql-reference/statements/create/table.md +++ b/docs/en/sql-reference/statements/create/table.md @@ -286,7 +286,7 @@ ENGINE = engine PRIMARY KEY(expr1[, expr2,...]); ``` -:::warning +:::important You can't combine both ways in one query. ::: @@ -342,7 +342,7 @@ ALTER TABLE codec_example MODIFY COLUMN float_value CODEC(Default); Codecs can be combined in a pipeline, for example, `CODEC(Delta, Default)`. -:::warning +:::important You can’t decompress ClickHouse database files with external utilities like `lz4`. Instead, use the special [clickhouse-compressor](https://github.com/ClickHouse/ClickHouse/tree/master/programs/compressor) utility. ::: @@ -437,11 +437,11 @@ Encryption codecs: These codecs use a fixed nonce and encryption is therefore deterministic. This makes it compatible with deduplicating engines such as [ReplicatedMergeTree](../../../engines/table-engines/mergetree-family/replication.md) but has a weakness: when the same data block is encrypted twice, the resulting ciphertext will be exactly the same so an adversary who can read the disk can see this equivalence (although only the equivalence, without getting its content). -:::warning +:::important Most engines including the "\*MergeTree" family create index files on disk without applying codecs. This means plaintext will appear on disk if an encrypted column is indexed. ::: -:::warning +:::important If you perform a SELECT query mentioning a specific value in an encrypted column (such as in its WHERE clause), the value may appear in [system.query_log](../../../operations/system-tables/query_log.md). You may want to disable the logging. ::: diff --git a/docs/en/sql-reference/statements/create/user.md b/docs/en/sql-reference/statements/create/user.md index a756b3d4a0d..e2cf195ebd6 100644 --- a/docs/en/sql-reference/statements/create/user.md +++ b/docs/en/sql-reference/statements/create/user.md @@ -55,7 +55,7 @@ Another way of specifying host is to use `@` syntax following the username. Exam - `CREATE USER mira@'localhost'` — Equivalent to the `HOST LOCAL` syntax. - `CREATE USER mira@'192.168.%.%'` — Equivalent to the `HOST LIKE` syntax. -:::warning +:::important ClickHouse treats `user_name@'address'` as a username as a whole. Thus, technically you can create multiple users with the same `user_name` and different constructions after `@`. However, we do not recommend to do so. ::: diff --git a/docs/en/sql-reference/statements/delete.md b/docs/en/sql-reference/statements/delete.md index e1987e50af4..e5a0a8f5b2b 100644 --- a/docs/en/sql-reference/statements/delete.md +++ b/docs/en/sql-reference/statements/delete.md @@ -32,7 +32,7 @@ SET allow_experimental_lightweight_delete = true; An [alternative way to delete rows](./alter/delete.md) in ClickHouse is `ALTER TABLE ... DELETE`, which might be more efficient if you do bulk deletes only occasionally and don't need the operation to be applied instantly. In most use cases the new lightweight `DELETE FROM` behavior will be considerably faster. -:::warning +:::important Even though deletes are becoming more lightweight in ClickHouse, they should still not be used as aggressively as on an OLTP system. Lightweight deletes are currently efficient for wide parts, but for compact parts, they can be a heavyweight operation, and it may be better to use `ALTER TABLE` for some scenarios. ::: diff --git a/docs/en/sql-reference/statements/optimize.md b/docs/en/sql-reference/statements/optimize.md index 78615a2f9ad..ee5ad512dd5 100644 --- a/docs/en/sql-reference/statements/optimize.md +++ b/docs/en/sql-reference/statements/optimize.md @@ -7,7 +7,7 @@ title: "OPTIMIZE Statement" This query tries to initialize an unscheduled merge of data parts for tables. -:::warning +:::important `OPTIMIZE` can’t fix the `Too many parts` error. ::: diff --git a/docs/en/sql-reference/statements/system.md b/docs/en/sql-reference/statements/system.md index f9f55acfcec..a7fd0944593 100644 --- a/docs/en/sql-reference/statements/system.md +++ b/docs/en/sql-reference/statements/system.md @@ -312,7 +312,7 @@ One may execute query after: Replica attaches locally found parts and sends info about them to Zookeeper. Parts present on a replica before metadata loss are not re-fetched from other ones if not being outdated (so replica restoration does not mean re-downloading all data over the network). -:::warning +:::important Parts in all states are moved to `detached/` folder. Parts active before data loss (committed) are attached. ::: diff --git a/docs/en/sql-reference/statements/watch.md b/docs/en/sql-reference/statements/watch.md index 90d19e6be0e..e4220be60e9 100644 --- a/docs/en/sql-reference/statements/watch.md +++ b/docs/en/sql-reference/statements/watch.md @@ -6,7 +6,7 @@ sidebar_label: WATCH # WATCH Statement (Experimental) -:::warning +:::important This is an experimental feature that may change in backwards-incompatible ways in the future releases. Enable live views and `WATCH` query using `set allow_experimental_live_view = 1`. ::: @@ -107,4 +107,4 @@ The `FORMAT` clause works the same way as for the [SELECT](../../sql-reference/s :::note The [JSONEachRowWithProgress](../../interfaces/formats.md#jsoneachrowwithprogress) format should be used when watching [LIVE VIEW](./create/view.md#live-view) tables over the HTTP interface. The progress messages will be added to the output to keep the long-lived HTTP connection alive until the query result changes. The interval between progress messages is controlled using the [live_view_heartbeat_interval](./create/view.md#live-view-settings) setting. -::: \ No newline at end of file +::: diff --git a/docs/en/sql-reference/table-functions/file.md b/docs/en/sql-reference/table-functions/file.md index 594c328c3ff..bf0fca648a3 100644 --- a/docs/en/sql-reference/table-functions/file.md +++ b/docs/en/sql-reference/table-functions/file.md @@ -109,7 +109,7 @@ Query the number of rows in all files of these two directories: SELECT count(*) FROM file('{some,another}_dir/*', 'TSV', 'name String, value UInt32'); ``` -:::warning +:::tip If your listing of files contains number ranges with leading zeros, use the construction with braces for each digit separately or use `?`. ::: diff --git a/docs/en/sql-reference/table-functions/hdfs.md b/docs/en/sql-reference/table-functions/hdfs.md index 97a253a5356..784e45d0f81 100644 --- a/docs/en/sql-reference/table-functions/hdfs.md +++ b/docs/en/sql-reference/table-functions/hdfs.md @@ -79,7 +79,7 @@ SELECT count(*) FROM hdfs('hdfs://hdfs1:9000/{some,another}_dir/*', 'TSV', 'name String, value UInt32') ``` -:::warning +:::tip If your listing of files contains number ranges with leading zeros, use the construction with braces for each digit separately or use `?`. ::: diff --git a/docs/en/sql-reference/table-functions/hdfsCluster.md b/docs/en/sql-reference/table-functions/hdfsCluster.md index 231c552610f..78f56372310 100644 --- a/docs/en/sql-reference/table-functions/hdfsCluster.md +++ b/docs/en/sql-reference/table-functions/hdfsCluster.md @@ -50,7 +50,7 @@ SELECT count(*) FROM hdfsCluster('cluster_simple', 'hdfs://hdfs1:9000/{some,another}_dir/*', 'TSV', 'name String, value UInt32') ``` -:::warning +:::tip If your listing of files contains number ranges with leading zeros, use the construction with braces for each digit separately or use `?`. ::: diff --git a/docs/en/sql-reference/table-functions/index.md b/docs/en/sql-reference/table-functions/index.md index b49c2f8da20..940fae73b66 100644 --- a/docs/en/sql-reference/table-functions/index.md +++ b/docs/en/sql-reference/table-functions/index.md @@ -20,6 +20,6 @@ You can use table functions in: - [INSERT INTO TABLE FUNCTION](../../sql-reference/statements/insert-into.md#inserting-into-table-function) query. -:::warning +:::tip You can’t use table functions if the [allow_ddl](../../operations/settings/permissions-for-queries.md#settings_allow_ddl) setting is disabled. ::: diff --git a/docs/en/sql-reference/table-functions/s3.md b/docs/en/sql-reference/table-functions/s3.md index d7199717798..62b8150de69 100644 --- a/docs/en/sql-reference/table-functions/s3.md +++ b/docs/en/sql-reference/table-functions/s3.md @@ -112,7 +112,7 @@ FROM s3('https://clickhouse-public-datasets.s3.amazonaws.com/my-test-bucket-768/ └─────────┘ ``` -:::warning +:::tip If your listing of files contains number ranges with leading zeros, use the construction with braces for each digit separately or use `?`. ::: diff --git a/docs/en/sql-reference/table-functions/s3Cluster.md b/docs/en/sql-reference/table-functions/s3Cluster.md index f420a69596c..504f92b4dc0 100644 --- a/docs/en/sql-reference/table-functions/s3Cluster.md +++ b/docs/en/sql-reference/table-functions/s3Cluster.md @@ -42,7 +42,7 @@ SELECT * FROM s3Cluster( Count the total amount of rows in all files in the cluster `cluster_simple`: -:::warning +:::tip If your listing of files contains number ranges with leading zeros, use the construction with braces for each digit separately or use `?`. ::: From a305c6e7ab3056055d71de199206d898f7e6e503 Mon Sep 17 00:00:00 2001 From: Dmitry Novik Date: Thu, 9 Mar 2023 18:00:23 +0000 Subject: [PATCH 657/841] Fix distributed GROUPING SETS and GROUPING function --- src/Analyzer/FunctionNode.cpp | 5 ++ src/Analyzer/FunctionNode.h | 2 + src/Analyzer/ValidationUtils.cpp | 3 +- ...eGroupingFunctionForDistributedVisitor.cpp | 57 +++++++++++++++++++ ...izeGroupingFunctionForDistributedVisitor.h | 10 ++++ src/CMakeLists.txt | 1 + src/Planner/Planner.cpp | 6 +- src/Storages/StorageDistributed.cpp | 2 + .../0_stateless/02293_grouping_function.sql | 2 + .../02293_grouping_function_group_by.sql | 2 + 10 files changed, 88 insertions(+), 2 deletions(-) create mode 100644 src/Analyzer/Visitors/GeneralizeGroupingFunctionForDistributedVisitor.cpp create mode 100644 src/Analyzer/Visitors/GeneralizeGroupingFunctionForDistributedVisitor.h diff --git a/src/Analyzer/FunctionNode.cpp b/src/Analyzer/FunctionNode.cpp index 718dcf4bb58..bc54c852739 100644 --- a/src/Analyzer/FunctionNode.cpp +++ b/src/Analyzer/FunctionNode.cpp @@ -65,6 +65,11 @@ void FunctionNode::resolveAsFunction(FunctionBasePtr function_value) kind = FunctionKind::ORDINARY; } +void FunctionNode::resolveAsFunctionWithName(String name) +{ + function_name = std::move(name); +} + void FunctionNode::resolveAsAggregateFunction(AggregateFunctionPtr aggregate_function_value) { function_name = aggregate_function_value->getName(); diff --git a/src/Analyzer/FunctionNode.h b/src/Analyzer/FunctionNode.h index 89a684c1d0f..caf6227a99e 100644 --- a/src/Analyzer/FunctionNode.h +++ b/src/Analyzer/FunctionNode.h @@ -163,6 +163,8 @@ public: */ void resolveAsFunction(FunctionBasePtr function_value); + void resolveAsFunctionWithName(String name); + void resolveAsFunction(const FunctionOverloadResolverPtr & resolver) { resolveAsFunction(resolver->build(getArgumentColumns())); diff --git a/src/Analyzer/ValidationUtils.cpp b/src/Analyzer/ValidationUtils.cpp index 8ccecc9769c..ffe3845f8ca 100644 --- a/src/Analyzer/ValidationUtils.cpp +++ b/src/Analyzer/ValidationUtils.cpp @@ -14,6 +14,7 @@ namespace DB namespace ErrorCodes { + extern const int BAD_ARGUMENTS; extern const int NOT_AN_AGGREGATE; extern const int NOT_IMPLEMENTED; } @@ -55,7 +56,7 @@ public: } if (!found_argument_in_group_by_keys) - throw Exception(ErrorCodes::NOT_AN_AGGREGATE, + throw Exception(ErrorCodes::BAD_ARGUMENTS, "GROUPING function argument {} is not in GROUP BY keys. In query {}", grouping_function_arguments_node->formatASTForErrorMessage(), query_node->formatASTForErrorMessage()); diff --git a/src/Analyzer/Visitors/GeneralizeGroupingFunctionForDistributedVisitor.cpp b/src/Analyzer/Visitors/GeneralizeGroupingFunctionForDistributedVisitor.cpp new file mode 100644 index 00000000000..40d7f0caa33 --- /dev/null +++ b/src/Analyzer/Visitors/GeneralizeGroupingFunctionForDistributedVisitor.cpp @@ -0,0 +1,57 @@ +#include + +#include +#include +#include +#include + +namespace DB +{ + +namespace ErrorCodes +{ + extern const int LOGICAL_ERROR; +} + +class GeneralizeGroupingFunctionForDistributedVisitor : public InDepthQueryTreeVisitor +{ +public: + static void visitImpl(QueryTreeNodePtr & node) + { + auto * function = node->as(); + if (!function) + return; + + const auto & function_name = function->getFunctionName(); + bool ordinary_grouping = function_name == "groupingOrdinary"; + + if (!ordinary_grouping + && function_name != "groupingForRollup" + && function_name != "groupingForCube" + && function_name != "groupingForGroupingSets") + return; + + function->resolveAsFunctionWithName("GROUPING"); + if (ordinary_grouping) + return; + + auto & arguments = function->getArguments().getNodes(); + + if (arguments.empty()) + throw Exception(ErrorCodes::LOGICAL_ERROR, "Grouping function specialization must have arguments"); + auto * grouping_set_arg = arguments[0]->as(); + if (!grouping_set_arg || grouping_set_arg->getColumnName() != "__grouping_set") + throw Exception(ErrorCodes::LOGICAL_ERROR, + "The first argument of Grouping function specialization must be '__grouping_set' column but {} found", + arguments[0]->dumpTree()); + arguments.erase(arguments.begin()); + } +}; + +void removeGroupingFunctionSpecializations(QueryTreeNodePtr & node) +{ + GeneralizeGroupingFunctionForDistributedVisitor visitor; + visitor.visit(node); +} + +} diff --git a/src/Analyzer/Visitors/GeneralizeGroupingFunctionForDistributedVisitor.h b/src/Analyzer/Visitors/GeneralizeGroupingFunctionForDistributedVisitor.h new file mode 100644 index 00000000000..878b87abce7 --- /dev/null +++ b/src/Analyzer/Visitors/GeneralizeGroupingFunctionForDistributedVisitor.h @@ -0,0 +1,10 @@ +#pragma once + +#include + +namespace DB +{ + +void removeGroupingFunctionSpecializations(QueryTreeNodePtr & node); + +} diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6c5142813c5..828450c6261 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -235,6 +235,7 @@ add_object_library(clickhouse_databases_mysql Databases/MySQL) add_object_library(clickhouse_disks Disks) add_object_library(clickhouse_analyzer Analyzer) add_object_library(clickhouse_analyzer_passes Analyzer/Passes) +add_object_library(clickhouse_analyzer_visitors Analyzer/Visitors) add_object_library(clickhouse_planner Planner) add_object_library(clickhouse_interpreters Interpreters) add_object_library(clickhouse_interpreters_cache Interpreters/Cache) diff --git a/src/Planner/Planner.cpp b/src/Planner/Planner.cpp index 2ce470d9ecf..4177afa66db 100644 --- a/src/Planner/Planner.cpp +++ b/src/Planner/Planner.cpp @@ -390,7 +390,11 @@ void addMergingAggregatedStep(QueryPlan & query_plan, * but it can work more slowly. */ - Aggregator::Params params(aggregation_analysis_result.aggregation_keys, + auto keys = aggregation_analysis_result.aggregation_keys; + if (!aggregation_analysis_result.grouping_sets_parameters_list.empty()) + keys.insert(keys.begin(), "__grouping_set"); + + Aggregator::Params params(keys, aggregation_analysis_result.aggregate_descriptions, query_analysis_result.aggregate_overflow_row, settings.max_threads, diff --git a/src/Storages/StorageDistributed.cpp b/src/Storages/StorageDistributed.cpp index 0bef3784adb..be71a9e80f1 100644 --- a/src/Storages/StorageDistributed.cpp +++ b/src/Storages/StorageDistributed.cpp @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -686,6 +687,7 @@ void StorageDistributed::read( storage_snapshot, remote_storage_id, remote_table_function_ptr); + removeGroupingFunctionSpecializations(query_tree_with_replaced_distributed_table); query_ast = queryNodeToSelectQuery(query_tree_with_replaced_distributed_table); diff --git a/tests/queries/0_stateless/02293_grouping_function.sql b/tests/queries/0_stateless/02293_grouping_function.sql index cf076c8e51c..c858eae269d 100644 --- a/tests/queries/0_stateless/02293_grouping_function.sql +++ b/tests/queries/0_stateless/02293_grouping_function.sql @@ -1,3 +1,5 @@ +set optimize_group_by_function_keys=0; + SELECT number, grouping(number, number % 2, number % 3) AS gr diff --git a/tests/queries/0_stateless/02293_grouping_function_group_by.sql b/tests/queries/0_stateless/02293_grouping_function_group_by.sql index d438a8a5277..da6477a1822 100644 --- a/tests/queries/0_stateless/02293_grouping_function_group_by.sql +++ b/tests/queries/0_stateless/02293_grouping_function_group_by.sql @@ -1,3 +1,5 @@ +set optimize_group_by_function_keys=0; + SELECT number, grouping(number, number % 2, number % 3) = 6 From 46979e383f2f893c18ec2a1ef021c973cf6f0d06 Mon Sep 17 00:00:00 2001 From: avogar Date: Thu, 9 Mar 2023 18:21:47 +0000 Subject: [PATCH 658/841] Fix big numbers inference in CSV --- src/Formats/SchemaInferenceUtils.cpp | 3 +++ .../0_stateless/02587_csv_big_numbers_inference.reference | 4 ++++ .../queries/0_stateless/02587_csv_big_numbers_inference.sql | 5 +++++ 3 files changed, 12 insertions(+) create mode 100644 tests/queries/0_stateless/02587_csv_big_numbers_inference.reference create mode 100644 tests/queries/0_stateless/02587_csv_big_numbers_inference.sql diff --git a/src/Formats/SchemaInferenceUtils.cpp b/src/Formats/SchemaInferenceUtils.cpp index 00eb686385d..7bd220e529b 100644 --- a/src/Formats/SchemaInferenceUtils.cpp +++ b/src/Formats/SchemaInferenceUtils.cpp @@ -984,6 +984,9 @@ DataTypePtr tryInferNumberFromString(std::string_view field, const FormatSetting if (tryReadIntText(tmp_int, buf) && buf.eof()) return std::make_shared(); + /// We cam safely get back to the start of buffer, because we read from a string and we didn't reach eof. + buf.position() = buf.buffer().begin(); + /// In case of Int64 overflow, try to infer UInt64 UInt64 tmp_uint; if (tryReadIntText(tmp_uint, buf) && buf.eof()) diff --git a/tests/queries/0_stateless/02587_csv_big_numbers_inference.reference b/tests/queries/0_stateless/02587_csv_big_numbers_inference.reference new file mode 100644 index 00000000000..5b38606d1fd --- /dev/null +++ b/tests/queries/0_stateless/02587_csv_big_numbers_inference.reference @@ -0,0 +1,4 @@ +c1 Nullable(Float64) +100000000000000000000 +c1 Nullable(Float64) +-100000000000000000000 diff --git a/tests/queries/0_stateless/02587_csv_big_numbers_inference.sql b/tests/queries/0_stateless/02587_csv_big_numbers_inference.sql new file mode 100644 index 00000000000..45a93034524 --- /dev/null +++ b/tests/queries/0_stateless/02587_csv_big_numbers_inference.sql @@ -0,0 +1,5 @@ +desc format('CSV', '100000000000000000000'); +select * from format('CSV', '100000000000000000000'); +desc format('CSV', '-100000000000000000000'); +select * from format('CSV', '-100000000000000000000'); + From 7cbf77a178d1815e606262a9927fc62178ce782f Mon Sep 17 00:00:00 2001 From: Kseniia Sumarokova <54203879+kssenii@users.noreply.github.com> Date: Thu, 9 Mar 2023 19:55:58 +0100 Subject: [PATCH 659/841] Update LRUFileCachePriority.cpp --- src/Interpreters/Cache/LRUFileCachePriority.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Interpreters/Cache/LRUFileCachePriority.cpp b/src/Interpreters/Cache/LRUFileCachePriority.cpp index 8010b9c682b..c20379e1fc1 100644 --- a/src/Interpreters/Cache/LRUFileCachePriority.cpp +++ b/src/Interpreters/Cache/LRUFileCachePriority.cpp @@ -34,7 +34,7 @@ IFileCachePriority::WriteIterator LRUFileCachePriority::add(const Key & key, siz CurrentMetrics::add(CurrentMetrics::FilesystemCacheSize, size); CurrentMetrics::add(CurrentMetrics::FilesystemCacheElements); - LOG_TRACE(log, "Added entry into LRU queue, key: {}, offset: {}", key.toString(), offset); + LOG_TEST(log, "Added entry into LRU queue, key: {}, offset: {}", key.toString(), offset); return std::make_shared(this, iter); } @@ -54,7 +54,7 @@ void LRUFileCachePriority::removeAll(std::lock_guard &) CurrentMetrics::sub(CurrentMetrics::FilesystemCacheSize, cache_size); CurrentMetrics::sub(CurrentMetrics::FilesystemCacheElements, queue.size()); - LOG_TRACE(log, "Removed all entries from LRU queue"); + LOG_TEST(log, "Removed all entries from LRU queue"); queue.clear(); cache_size = 0; @@ -88,7 +88,7 @@ void LRUFileCachePriority::LRUFileCacheIterator::removeAndGetNext(std::lock_guar CurrentMetrics::sub(CurrentMetrics::FilesystemCacheSize, queue_iter->size); CurrentMetrics::sub(CurrentMetrics::FilesystemCacheElements); - LOG_TRACE(cache_priority->log, "Removed entry from LRU queue, key: {}, offset: {}", queue_iter->key.toString(), queue_iter->offset); + LOG_TEST(cache_priority->log, "Removed entry from LRU queue, key: {}, offset: {}", queue_iter->key.toString(), queue_iter->offset); queue_iter = cache_priority->queue.erase(queue_iter); } From de68dade71add8c4351d35ae1f8b35ec34b3fcd1 Mon Sep 17 00:00:00 2001 From: Rich Raposa Date: Thu, 9 Mar 2023 14:30:40 -0700 Subject: [PATCH 660/841] Revert "standardize admonitions" --- .../database-engines/materialized-mysql.md | 4 +-- .../materialized-postgresql.md | 4 +-- docs/en/engines/database-engines/mysql.md | 2 +- .../table-engines/integrations/hdfs.md | 4 +-- .../table-engines/integrations/kafka.md | 2 +- .../integrations/materialized-postgresql.md | 2 +- .../table-engines/integrations/postgresql.md | 2 +- .../engines/table-engines/integrations/s3.md | 4 +-- .../mergetree-family/aggregatingmergetree.md | 2 +- .../mergetree-family/collapsingmergetree.md | 2 +- .../custom-partitioning-key.md | 4 +-- .../mergetree-family/graphitemergetree.md | 6 ++-- .../mergetree-family/invertedindexes.md | 2 +- .../mergetree-family/mergetree.md | 4 +-- .../mergetree-family/replacingmergetree.md | 4 +-- .../mergetree-family/replication.md | 2 +- .../mergetree-family/summingmergetree.md | 2 +- .../versionedcollapsingmergetree.md | 2 +- docs/en/interfaces/formats.md | 28 +++++++++---------- docs/en/interfaces/http.md | 4 +-- docs/en/interfaces/postgresql.md | 2 +- .../third-party/client-libraries.md | 2 +- .../en/interfaces/third-party/integrations.md | 2 +- docs/en/operations/access-rights.md | 4 +-- .../external-authenticators/kerberos.md | 6 ++-- docs/en/operations/opentelemetry.md | 2 +- docs/en/operations/query-cache.md | 2 +- .../settings.md | 4 +-- .../settings/merge-tree-settings.md | 2 +- .../operations/settings/settings-formats.md | 2 +- docs/en/operations/settings/settings-users.md | 4 +-- docs/en/operations/settings/settings.md | 18 ++++++------ docs/en/operations/storing-data.md | 2 +- docs/en/operations/system-tables/parts.md | 2 +- docs/en/operations/tips.md | 2 +- .../operations/utilities/clickhouse-copier.md | 2 +- .../parametric-functions.md | 4 +-- docs/en/sql-reference/data-types/float.md | 2 +- docs/en/sql-reference/data-types/json.md | 4 +-- .../data-types/special-data-types/interval.md | 2 +- .../external-dicts-dict-layout.md | 4 +-- .../external-dicts-dict-structure.md | 4 +-- docs/en/sql-reference/distributed-ddl.md | 4 +-- .../sql-reference/functions/hash-functions.md | 4 +-- .../sql-reference/functions/introspection.md | 2 +- .../sql-reference/functions/nlp-functions.md | 2 +- .../functions/other-functions.md | 8 +++--- docs/en/sql-reference/operators/exists.md | 2 +- docs/en/sql-reference/operators/index.md | 2 +- .../sql-reference/statements/alter/column.md | 2 +- .../statements/alter/constraint.md | 2 +- .../statements/create/row-policy.md | 2 +- .../sql-reference/statements/create/table.md | 8 +++--- .../sql-reference/statements/create/user.md | 2 +- docs/en/sql-reference/statements/delete.md | 2 +- docs/en/sql-reference/statements/optimize.md | 2 +- docs/en/sql-reference/statements/system.md | 2 +- docs/en/sql-reference/statements/watch.md | 4 +-- docs/en/sql-reference/table-functions/file.md | 2 +- docs/en/sql-reference/table-functions/hdfs.md | 2 +- .../table-functions/hdfsCluster.md | 2 +- .../en/sql-reference/table-functions/index.md | 2 +- docs/en/sql-reference/table-functions/s3.md | 2 +- .../table-functions/s3Cluster.md | 2 +- 64 files changed, 113 insertions(+), 113 deletions(-) diff --git a/docs/en/engines/database-engines/materialized-mysql.md b/docs/en/engines/database-engines/materialized-mysql.md index 9b2d1d7e1de..899c8d024f1 100644 --- a/docs/en/engines/database-engines/materialized-mysql.md +++ b/docs/en/engines/database-engines/materialized-mysql.md @@ -6,7 +6,7 @@ sidebar_position: 70 # [experimental] MaterializedMySQL -:::important +:::warning This is an experimental feature that should not be used in production. ::: @@ -245,7 +245,7 @@ extra care needs to be taken. You may specify overrides for tables that do not exist yet. -:::important +:::warning It is easy to break replication with table overrides if not used with care. For example: * If an ALIAS column is added with a table override, and a column with the same name is later added to the source diff --git a/docs/en/engines/database-engines/materialized-postgresql.md b/docs/en/engines/database-engines/materialized-postgresql.md index 7be520ee25e..b43f71a7576 100644 --- a/docs/en/engines/database-engines/materialized-postgresql.md +++ b/docs/en/engines/database-engines/materialized-postgresql.md @@ -54,7 +54,7 @@ After `MaterializedPostgreSQL` database is created, it does not automatically de ATTACH TABLE postgres_database.new_table; ``` -:::important +:::warning Before version 22.1, adding a table to replication left an unremoved temporary replication slot (named `{db_name}_ch_replication_slot_tmp`). If attaching tables in ClickHouse version before 22.1, make sure to delete it manually (`SELECT pg_drop_replication_slot('{db_name}_ch_replication_slot_tmp')`). Otherwise disk usage will grow. This issue is fixed in 22.1. ::: @@ -145,7 +145,7 @@ FROM pg_class WHERE oid = 'postgres_table'::regclass; ``` -:::important +:::warning Replication of [**TOAST**](https://www.postgresql.org/docs/9.5/storage-toast.html) values is not supported. The default value for the data type will be used. ::: diff --git a/docs/en/engines/database-engines/mysql.md b/docs/en/engines/database-engines/mysql.md index e2c4f134a90..e4ff734d55f 100644 --- a/docs/en/engines/database-engines/mysql.md +++ b/docs/en/engines/database-engines/mysql.md @@ -60,7 +60,7 @@ These variables are supported: - `version` - `max_allowed_packet` -:::important +:::warning By now these variables are stubs and don't correspond to anything. ::: diff --git a/docs/en/engines/table-engines/integrations/hdfs.md b/docs/en/engines/table-engines/integrations/hdfs.md index c14d05aa03a..7c04a6594a6 100644 --- a/docs/en/engines/table-engines/integrations/hdfs.md +++ b/docs/en/engines/table-engines/integrations/hdfs.md @@ -64,7 +64,7 @@ SELECT * FROM hdfs_engine_table LIMIT 2 - Indexes. - [Zero-copy](../../../operations/storing-data.md#zero-copy) replication is possible, but not recommended. - :::important Zero-copy replication is not ready for production + :::warning Zero-copy replication is not ready for production Zero-copy replication is disabled by default in ClickHouse version 22.8 and higher. This feature is not recommended for production use. ::: @@ -110,7 +110,7 @@ Table consists of all the files in both directories (all files should satisfy fo CREATE TABLE table_with_asterisk (name String, value UInt32) ENGINE = HDFS('hdfs://hdfs1:9000/{some,another}_dir/*', 'TSV') ``` -:::important +:::warning If the listing of files contains number ranges with leading zeros, use the construction with braces for each digit separately or use `?`. ::: diff --git a/docs/en/engines/table-engines/integrations/kafka.md b/docs/en/engines/table-engines/integrations/kafka.md index 86647fb6978..255ba06f056 100644 --- a/docs/en/engines/table-engines/integrations/kafka.md +++ b/docs/en/engines/table-engines/integrations/kafka.md @@ -102,7 +102,7 @@ Examples: Deprecated Method for Creating a Table -:::important +:::warning Do not use this method in new projects. If possible, switch old projects to the method described above. ::: diff --git a/docs/en/engines/table-engines/integrations/materialized-postgresql.md b/docs/en/engines/table-engines/integrations/materialized-postgresql.md index c9b3f351568..11e7928c3ed 100644 --- a/docs/en/engines/table-engines/integrations/materialized-postgresql.md +++ b/docs/en/engines/table-engines/integrations/materialized-postgresql.md @@ -52,6 +52,6 @@ PRIMARY KEY key; SELECT key, value, _version FROM postgresql_db.postgresql_replica; ``` -:::important +:::warning Replication of [**TOAST**](https://www.postgresql.org/docs/9.5/storage-toast.html) values is not supported. The default value for the data type will be used. ::: diff --git a/docs/en/engines/table-engines/integrations/postgresql.md b/docs/en/engines/table-engines/integrations/postgresql.md index d338a2a58bd..b73d28c8508 100644 --- a/docs/en/engines/table-engines/integrations/postgresql.md +++ b/docs/en/engines/table-engines/integrations/postgresql.md @@ -74,7 +74,7 @@ All joins, aggregations, sorting, `IN [ array ]` conditions and the `LIMIT` samp PostgreSQL `Array` types are converted into ClickHouse arrays. -:::important +:::warning Be careful - in PostgreSQL an array data, created like a `type_name[]`, may contain multi-dimensional arrays of different dimensions in different table rows in same column. But in ClickHouse it is only allowed to have multidimensional arrays of the same count of dimensions in all table rows in same column. ::: diff --git a/docs/en/engines/table-engines/integrations/s3.md b/docs/en/engines/table-engines/integrations/s3.md index 8e1a4d91cac..723425429a5 100644 --- a/docs/en/engines/table-engines/integrations/s3.md +++ b/docs/en/engines/table-engines/integrations/s3.md @@ -63,7 +63,7 @@ For more information about virtual columns see [here](../../../engines/table-eng - Indexes. - [Zero-copy](../../../operations/storing-data.md#zero-copy) replication is possible, but not supported. - :::important Zero-copy replication is not ready for production + :::warning Zero-copy replication is not ready for production Zero-copy replication is disabled by default in ClickHouse version 22.8 and higher. This feature is not recommended for production use. ::: @@ -78,7 +78,7 @@ For more information about virtual columns see [here](../../../engines/table-eng Constructions with `{}` are similar to the [remote](../../../sql-reference/table-functions/remote.md) table function. -:::important +:::warning If the listing of files contains number ranges with leading zeros, use the construction with braces for each digit separately or use `?`. ::: diff --git a/docs/en/engines/table-engines/mergetree-family/aggregatingmergetree.md b/docs/en/engines/table-engines/mergetree-family/aggregatingmergetree.md index 9b7f0cd2486..9677f75a358 100644 --- a/docs/en/engines/table-engines/mergetree-family/aggregatingmergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/aggregatingmergetree.md @@ -43,7 +43,7 @@ When creating an `AggregatingMergeTree` table the same [clauses](../../../engine Deprecated Method for Creating a Table -:::important +:::warning Do not use this method in new projects and, if possible, switch the old projects to the method described above. ::: diff --git a/docs/en/engines/table-engines/mergetree-family/collapsingmergetree.md b/docs/en/engines/table-engines/mergetree-family/collapsingmergetree.md index 9acff099557..0bd665116f0 100644 --- a/docs/en/engines/table-engines/mergetree-family/collapsingmergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/collapsingmergetree.md @@ -45,7 +45,7 @@ When creating a `CollapsingMergeTree` table, the same [query clauses](../../../e Deprecated Method for Creating a Table -:::important +:::warning Do not use this method in new projects and, if possible, switch old projects to the method described above. ::: diff --git a/docs/en/engines/table-engines/mergetree-family/custom-partitioning-key.md b/docs/en/engines/table-engines/mergetree-family/custom-partitioning-key.md index f01cd90ccf0..b1e79c4c3fd 100644 --- a/docs/en/engines/table-engines/mergetree-family/custom-partitioning-key.md +++ b/docs/en/engines/table-engines/mergetree-family/custom-partitioning-key.md @@ -6,7 +6,7 @@ sidebar_label: Custom Partitioning Key # Custom Partitioning Key -:::important +:::warning In most cases you do not need a partition key, and in most other cases you do not need a partition key more granular than by months. You should never use too granular of partitioning. Don't partition your data by client identifiers or names. Instead, make a client identifier or name the first column in the ORDER BY expression. @@ -159,7 +159,7 @@ FROM session_log GROUP BY UserID; ``` -:::important +:::warning Performance of such a query heavily depends on the table layout. Because of that the optimisation is not enabled by default. ::: diff --git a/docs/en/engines/table-engines/mergetree-family/graphitemergetree.md b/docs/en/engines/table-engines/mergetree-family/graphitemergetree.md index d71004135f1..104ec049ec4 100644 --- a/docs/en/engines/table-engines/mergetree-family/graphitemergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/graphitemergetree.md @@ -55,7 +55,7 @@ When creating a `GraphiteMergeTree` table, the same [clauses](../../../engines/t Deprecated Method for Creating a Table -:::important +:::warning Do not use this method in new projects and, if possible, switch old projects to the method described above. ::: @@ -129,7 +129,7 @@ default ... ``` -:::important +:::warning Patterns must be strictly ordered: 1. Patterns without `function` or `retention`. @@ -263,6 +263,6 @@ Valid values: ``` -:::important +:::warning Data rollup is performed during merges. Usually, for old partitions, merges are not started, so for rollup it is necessary to trigger an unscheduled merge using [optimize](../../../sql-reference/statements/optimize.md). Or use additional tools, for example [graphite-ch-optimizer](https://github.com/innogames/graphite-ch-optimizer). ::: diff --git a/docs/en/engines/table-engines/mergetree-family/invertedindexes.md b/docs/en/engines/table-engines/mergetree-family/invertedindexes.md index 91ee0313a69..aa11258dc4a 100644 --- a/docs/en/engines/table-engines/mergetree-family/invertedindexes.md +++ b/docs/en/engines/table-engines/mergetree-family/invertedindexes.md @@ -15,7 +15,7 @@ tokenized cells of the string column. For example, the string cell "I will be a " wi", "wil", "ill", "ll ", "l b", " be" etc. The more fine-granular the input strings are tokenized, the bigger but also the more useful the resulting inverted index will be. -:::important +:::warning Inverted indexes are experimental and should not be used in production environments yet. They may change in the future in backward-incompatible ways, for example with respect to their DDL/DQL syntax or performance/compression characteristics. ::: diff --git a/docs/en/engines/table-engines/mergetree-family/mergetree.md b/docs/en/engines/table-engines/mergetree-family/mergetree.md index 5dbe7602856..fc8060077b0 100644 --- a/docs/en/engines/table-engines/mergetree-family/mergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/mergetree.md @@ -192,7 +192,7 @@ The `index_granularity` setting can be omitted because 8192 is the default value Deprecated Method for Creating a Table -:::important +:::warning Do not use this method in new projects. If possible, switch old projects to the method described above. ::: @@ -1087,7 +1087,7 @@ Other parameters: Examples of working configurations can be found in integration tests directory (see e.g. [test_merge_tree_azure_blob_storage](https://github.com/ClickHouse/ClickHouse/blob/master/tests/integration/test_merge_tree_azure_blob_storage/configs/config.d/storage_conf.xml) or [test_azure_blob_storage_zero_copy_replication](https://github.com/ClickHouse/ClickHouse/blob/master/tests/integration/test_azure_blob_storage_zero_copy_replication/configs/config.d/storage_conf.xml)). - :::important Zero-copy replication is not ready for production + :::warning Zero-copy replication is not ready for production Zero-copy replication is disabled by default in ClickHouse version 22.8 and higher. This feature is not recommended for production use. ::: diff --git a/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md b/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md index 0b76500f2a6..f5d81182898 100644 --- a/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/replacingmergetree.md @@ -30,7 +30,7 @@ CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] For a description of request parameters, see [statement description](../../../sql-reference/statements/create/table.md). -:::important +:::warning Uniqueness of rows is determined by the `ORDER BY` table section, not `PRIMARY KEY`. ::: @@ -96,7 +96,7 @@ When creating a `ReplacingMergeTree` table the same [clauses](../../../engines/t Deprecated Method for Creating a Table -:::important +:::warning Do not use this method in new projects and, if possible, switch old projects to the method described above. ::: diff --git a/docs/en/engines/table-engines/mergetree-family/replication.md b/docs/en/engines/table-engines/mergetree-family/replication.md index f9adad0fa6d..37ab8ac9fd3 100644 --- a/docs/en/engines/table-engines/mergetree-family/replication.md +++ b/docs/en/engines/table-engines/mergetree-family/replication.md @@ -43,7 +43,7 @@ ClickHouse uses [ClickHouse Keeper](/docs/en/guides/sre/keeper/clickhouse-keeper To use replication, set parameters in the [zookeeper](/docs/en/operations/server-configuration-parameters/settings.md/#server-settings_zookeeper) server configuration section. -:::important +:::warning Don’t neglect the security setting. ClickHouse supports the `digest` [ACL scheme](https://zookeeper.apache.org/doc/current/zookeeperProgrammers.html#sc_ZooKeeperAccessControl) of the ZooKeeper security subsystem. ::: diff --git a/docs/en/engines/table-engines/mergetree-family/summingmergetree.md b/docs/en/engines/table-engines/mergetree-family/summingmergetree.md index bea37706939..b2b6272c58e 100644 --- a/docs/en/engines/table-engines/mergetree-family/summingmergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/summingmergetree.md @@ -44,7 +44,7 @@ When creating a `SummingMergeTree` table the same [clauses](../../../engines/tab Deprecated Method for Creating a Table -:::important +:::warning Do not use this method in new projects and, if possible, switch the old projects to the method described above. ::: diff --git a/docs/en/engines/table-engines/mergetree-family/versionedcollapsingmergetree.md b/docs/en/engines/table-engines/mergetree-family/versionedcollapsingmergetree.md index 1a44569711a..2891907f79a 100644 --- a/docs/en/engines/table-engines/mergetree-family/versionedcollapsingmergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/versionedcollapsingmergetree.md @@ -58,7 +58,7 @@ When creating a `VersionedCollapsingMergeTree` table, the same [clauses](../../. Deprecated Method for Creating a Table -:::important +:::warning Do not use this method in new projects. If possible, switch old projects to the method described above. ::: diff --git a/docs/en/interfaces/formats.md b/docs/en/interfaces/formats.md index fa15de16c71..db2e773a685 100644 --- a/docs/en/interfaces/formats.md +++ b/docs/en/interfaces/formats.md @@ -205,7 +205,7 @@ Differs from the `TabSeparated` format in that the column names are written in t During parsing, the first row is expected to contain the column names. You can use column names to determine their position and to check their correctness. -:::important +:::warning If setting [input_format_with_names_use_header](/docs/en/operations/settings/settings-formats.md/#input_format_with_names_use_header) is set to 1, the columns from the input data will be mapped to the columns of the table by their names, columns with unknown names will be skipped if setting [input_format_skip_unknown_fields](/docs/en/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) is set to 1. Otherwise, the first row will be skipped. @@ -217,7 +217,7 @@ This format is also available under the name `TSVWithNames`. Differs from the `TabSeparated` format in that the column names are written to the first row, while the column types are in the second row. -:::important +:::warning If setting [input_format_with_names_use_header](/docs/en/operations/settings/settings-formats.md/#input_format_with_names_use_header) is set to 1, the columns from the input data will be mapped to the columns in the table by their names, columns with unknown names will be skipped if setting [input_format_skip_unknown_fields](/docs/en/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) is set to 1. Otherwise, the first row will be skipped. @@ -470,7 +470,7 @@ The CSV format supports the output of totals and extremes the same way as `TabSe Also prints the header row with column names, similar to [TabSeparatedWithNames](#tabseparatedwithnames). -:::important +:::warning If setting [input_format_with_names_use_header](/docs/en/operations/settings/settings-formats.md/#input_format_with_names_use_header) is set to 1, the columns from input data will be mapped to the columns from the table by their names, columns with unknown names will be skipped if setting [input_format_skip_unknown_fields](/docs/en/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) is set to 1. Otherwise, the first row will be skipped. @@ -480,7 +480,7 @@ Otherwise, the first row will be skipped. Also prints two header rows with column names and types, similar to [TabSeparatedWithNamesAndTypes](#tabseparatedwithnamesandtypes). -:::important +:::warning If setting [input_format_with_names_use_header](/docs/en/operations/settings/settings-formats.md/#input_format_with_names_use_header) is set to 1, the columns from input data will be mapped to the columns from the table by their names, columns with unknown names will be skipped if setting [input_format_skip_unknown_fields](/docs/en/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) is set to 1. Otherwise, the first row will be skipped. @@ -500,7 +500,7 @@ There is also `CustomSeparatedIgnoreSpaces` format, which is similar to [Templat Also prints the header row with column names, similar to [TabSeparatedWithNames](#tabseparatedwithnames). -:::important +:::warning If setting [input_format_with_names_use_header](/docs/en/operations/settings/settings-formats.md/#input_format_with_names_use_header) is set to 1, the columns from input data will be mapped to the columns from the table by their names, columns with unknown names will be skipped if setting [input_format_skip_unknown_fields](/docs/en/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) is set to 1. Otherwise, the first row will be skipped. @@ -510,7 +510,7 @@ Otherwise, the first row will be skipped. Also prints two header rows with column names and types, similar to [TabSeparatedWithNamesAndTypes](#tabseparatedwithnamesandtypes). -:::important +:::warning If setting [input_format_with_names_use_header](/docs/en/operations/settings/settings-formats.md/#input_format_with_names_use_header) is set to 1, the columns from input data will be mapped to the columns from the table by their names, columns with unknown names will be skipped if setting [input_format_skip_unknown_fields](/docs/en/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) is set to 1. Otherwise, the first row will be skipped. @@ -969,7 +969,7 @@ Differs from `JSONEachRow`/`JSONStringsEachRow` in that ClickHouse will also yie Differs from `JSONCompactEachRow` format in that it also prints the header row with column names, similar to [TabSeparatedWithNames](#tabseparatedwithnames). -:::important +:::warning If setting [input_format_with_names_use_header](/docs/en/operations/settings/settings-formats.md/#input_format_with_names_use_header) is set to 1, the columns from input data will be mapped to the columns from the table by their names, columns with unknown names will be skipped if setting [input_format_skip_unknown_fields](/docs/en/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) is set to 1. Otherwise, the first row will be skipped. @@ -979,7 +979,7 @@ Otherwise, the first row will be skipped. Differs from `JSONCompactEachRow` format in that it also prints two header rows with column names and types, similar to [TabSeparatedWithNamesAndTypes](#tabseparatedwithnamesandtypes). -:::important +:::warning If setting [input_format_with_names_use_header](/docs/en/operations/settings/settings-formats.md/#input_format_with_names_use_header) is set to 1, the columns from input data will be mapped to the columns from the table by their names, columns with unknown names will be skipped if setting [input_format_skip_unknown_fields](/docs/en/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) is set to 1. Otherwise, the first row will be skipped. @@ -991,7 +991,7 @@ the types from input data will be compared with the types of the corresponding c Differs from `JSONCompactStringsEachRow` in that in that it also prints the header row with column names, similar to [TabSeparatedWithNames](#tabseparatedwithnames). -:::important +:::warning If setting [input_format_with_names_use_header](/docs/en/operations/settings/settings-formats.md/#input_format_with_names_use_header) is set to 1, the columns from input data will be mapped to the columns from the table by their names, columns with unknown names will be skipped if setting [input_format_skip_unknown_fields](/docs/en/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) is set to 1. Otherwise, the first row will be skipped. @@ -1001,7 +1001,7 @@ Otherwise, the first row will be skipped. Differs from `JSONCompactStringsEachRow` in that it also prints two header rows with column names and types, similar to [TabSeparatedWithNamesAndTypes](#tabseparatedwithnamesandtypes). -:::important +:::warning If setting [input_format_with_names_use_header](/docs/en/operations/settings/settings-formats.md/#input_format_with_names_use_header) is set to 1, the columns from input data will be mapped to the columns from the table by their names, columns with unknown names will be skipped if setting [input_format_skip_unknown_fields](/docs/en/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) is set to 1. Otherwise, the first row will be skipped. @@ -1120,7 +1120,7 @@ CREATE TABLE IF NOT EXISTS example_table - If `input_format_defaults_for_omitted_fields = 0`, then the default value for `x` and `a` equals `0` (as the default value for the `UInt32` data type). - If `input_format_defaults_for_omitted_fields = 1`, then the default value for `x` equals `0`, but the default value of `a` equals `x * 2`. -:::important +:::warning When inserting data with `input_format_defaults_for_omitted_fields = 1`, ClickHouse consumes more computational resources, compared to insertion with `input_format_defaults_for_omitted_fields = 0`. ::: @@ -1450,7 +1450,7 @@ Similar to [RowBinary](#rowbinary), but with added header: - [LEB128](https://en.wikipedia.org/wiki/LEB128)-encoded number of columns (N) - N `String`s specifying column names -:::important +:::warning If setting [input_format_with_names_use_header](/docs/en/operations/settings/settings-formats.md/#input_format_with_names_use_header) is set to 1, the columns from input data will be mapped to the columns from the table by their names, columns with unknown names will be skipped if setting [input_format_skip_unknown_fields](/docs/en/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) is set to 1. Otherwise, the first row will be skipped. @@ -1464,7 +1464,7 @@ Similar to [RowBinary](#rowbinary), but with added header: - N `String`s specifying column names - N `String`s specifying column types -:::important +:::warning If setting [input_format_with_names_use_header](/docs/en/operations/settings/settings-formats.md/#input_format_with_names_use_header) is set to 1, the columns from input data will be mapped to the columns from the table by their names, columns with unknown names will be skipped if setting [input_format_skip_unknown_fields](/docs/en/operations/settings/settings-formats.md/#input_format_skip_unknown_fields) is set to 1. Otherwise, the first row will be skipped. @@ -1912,7 +1912,7 @@ SET format_avro_schema_registry_url = 'http://schema-registry'; SELECT * FROM topic1_stream; ``` -:::important +:::warning Setting `format_avro_schema_registry_url` needs to be configured in `users.xml` to maintain it’s value after a restart. Also you can use the `format_avro_schema_registry_url` setting of the `Kafka` table engine. ::: diff --git a/docs/en/interfaces/http.md b/docs/en/interfaces/http.md index efa51bb34ea..9af6df0c87d 100644 --- a/docs/en/interfaces/http.md +++ b/docs/en/interfaces/http.md @@ -445,7 +445,7 @@ Next are the configuration methods for different `type`. The following example defines the values of [max_threads](../operations/settings/settings.md#settings-max_threads) and `max_final_threads` settings, then queries the system table to check whether these settings were set successfully. -:::important +:::warning To keep the default `handlers` such as` query`, `play`,` ping`, add the `` rule. ::: @@ -476,7 +476,7 @@ $ curl -H 'XXX:TEST_HEADER_VALUE' -H 'PARAMS_XXX:max_threads' 'http://localhost: max_final_threads 2 ``` -:::important +:::warning In one `predefined_query_handler` only supports one `query` of an insert type. ::: diff --git a/docs/en/interfaces/postgresql.md b/docs/en/interfaces/postgresql.md index 0cc70cce571..9ff83559787 100644 --- a/docs/en/interfaces/postgresql.md +++ b/docs/en/interfaces/postgresql.md @@ -54,7 +54,7 @@ default=> And that's it! You now have a PostgreSQL client connected to ClickHouse, and all commands and queries are executed on ClickHouse. -:::important +:::caution The PostgreSQL protocol currently only supports plain-text passwords. ::: diff --git a/docs/en/interfaces/third-party/client-libraries.md b/docs/en/interfaces/third-party/client-libraries.md index 4ce63ba647b..0e065cb7179 100644 --- a/docs/en/interfaces/third-party/client-libraries.md +++ b/docs/en/interfaces/third-party/client-libraries.md @@ -6,7 +6,7 @@ sidebar_label: Client Libraries # Client Libraries from Third-party Developers -:::important +:::warning ClickHouse Inc does **not** maintain the libraries listed below and hasn’t done any extensive testing to ensure their quality. ::: diff --git a/docs/en/interfaces/third-party/integrations.md b/docs/en/interfaces/third-party/integrations.md index 8197a1d1f58..90a4f088be7 100644 --- a/docs/en/interfaces/third-party/integrations.md +++ b/docs/en/interfaces/third-party/integrations.md @@ -6,7 +6,7 @@ sidebar_label: Integrations # Integration Libraries from Third-party Developers -:::important Disclaimer +:::warning Disclaimer ClickHouse, Inc. does **not** maintain the tools and libraries listed below and haven’t done extensive testing to ensure their quality. ::: diff --git a/docs/en/operations/access-rights.md b/docs/en/operations/access-rights.md index 38d32e3f1f7..4c4a06dbe1e 100644 --- a/docs/en/operations/access-rights.md +++ b/docs/en/operations/access-rights.md @@ -24,7 +24,7 @@ You can configure access entities using: We recommend using SQL-driven workflow. Both of the configuration methods work simultaneously, so if you use the server configuration files for managing accounts and access rights, you can smoothly switch to SQL-driven workflow. -:::important +:::warning You can’t manage the same access entity by both configuration methods simultaneously. ::: @@ -102,7 +102,7 @@ Privileges can be granted to a role by the [GRANT](../sql-reference/statements/g Row policy is a filter that defines which of the rows are available to a user or a role. Row policy contains filters for one particular table, as well as a list of roles and/or users which should use this row policy. -:::important +:::warning Row policies makes sense only for users with readonly access. If user can modify table or copy partitions between tables, it defeats the restrictions of row policies. ::: diff --git a/docs/en/operations/external-authenticators/kerberos.md b/docs/en/operations/external-authenticators/kerberos.md index b49291f8e2e..95944e96194 100644 --- a/docs/en/operations/external-authenticators/kerberos.md +++ b/docs/en/operations/external-authenticators/kerberos.md @@ -59,11 +59,11 @@ With filtering by realm: ``` -:::important +:::warning You can define only one `kerberos` section. The presence of multiple `kerberos` sections will force ClickHouse to disable Kerberos authentication. ::: -:::important +:::warning `principal` and `realm` sections cannot be specified at the same time. The presence of both `principal` and `realm` sections will force ClickHouse to disable Kerberos authentication. ::: @@ -103,7 +103,7 @@ Example (goes into `users.xml`): ``` -:::important +:::warning Note that Kerberos authentication cannot be used alongside with any other authentication mechanism. The presence of any other sections like `password` alongside `kerberos` will force ClickHouse to shutdown. ::: diff --git a/docs/en/operations/opentelemetry.md b/docs/en/operations/opentelemetry.md index 7faa4b1ee7c..1de5a09db0c 100644 --- a/docs/en/operations/opentelemetry.md +++ b/docs/en/operations/opentelemetry.md @@ -7,7 +7,7 @@ title: "[experimental] Tracing ClickHouse with OpenTelemetry" [OpenTelemetry](https://opentelemetry.io/) is an open standard for collecting traces and metrics from the distributed application. ClickHouse has some support for OpenTelemetry. -:::important +:::warning This is an experimental feature that will change in backwards-incompatible ways in future releases. ::: diff --git a/docs/en/operations/query-cache.md b/docs/en/operations/query-cache.md index a7ac011c796..1a486de7904 100644 --- a/docs/en/operations/query-cache.md +++ b/docs/en/operations/query-cache.md @@ -29,7 +29,7 @@ Transactionally inconsistent caching is traditionally provided by client tools o the same caching logic and configuration is often duplicated. With ClickHouse's query cache, the caching logic moves to the server side. This reduces maintenance effort and avoids redundancy. -:::important +:::warning The query cache is an experimental feature that should not be used in production. There are known cases (e.g. in distributed query processing) where wrong results are returned. ::: diff --git a/docs/en/operations/server-configuration-parameters/settings.md b/docs/en/operations/server-configuration-parameters/settings.md index 4494ad39a0e..3fe815bc79a 100644 --- a/docs/en/operations/server-configuration-parameters/settings.md +++ b/docs/en/operations/server-configuration-parameters/settings.md @@ -24,7 +24,7 @@ Default value: 3600. Data compression settings for [MergeTree](../../engines/table-engines/mergetree-family/mergetree.md)-engine tables. -:::tip +:::warning Don’t use it if you have just started using ClickHouse. ::: @@ -1367,7 +1367,7 @@ The following settings are available: Changed settings take effect immediately. -:::important +:::warning Data for the query cache is allocated in DRAM. If memory is scarce, make sure to set a small value for `size` or disable the query cache altogether. ::: diff --git a/docs/en/operations/settings/merge-tree-settings.md b/docs/en/operations/settings/merge-tree-settings.md index 6290a23378c..5bc174727ad 100644 --- a/docs/en/operations/settings/merge-tree-settings.md +++ b/docs/en/operations/settings/merge-tree-settings.md @@ -289,7 +289,7 @@ Default value: 0 (seconds) When this setting has a value greater than than zero only a single replica starts the merge immediately if merged part on shared storage and `allow_remote_fs_zero_copy_replication` is enabled. -:::important Zero-copy replication is not ready for production +:::warning Zero-copy replication is not ready for production Zero-copy replication is disabled by default in ClickHouse version 22.8 and higher. This feature is not recommended for production use. ::: diff --git a/docs/en/operations/settings/settings-formats.md b/docs/en/operations/settings/settings-formats.md index b03f922d0d4..919ebaf562f 100644 --- a/docs/en/operations/settings/settings-formats.md +++ b/docs/en/operations/settings/settings-formats.md @@ -142,7 +142,7 @@ y Nullable(String) z IPv4 ``` -:::important +:::warning If the `schema_inference_hints` is not formated properly, or if there is a typo or a wrong datatype, etc... the whole schema_inference_hints will be ignored. ::: diff --git a/docs/en/operations/settings/settings-users.md b/docs/en/operations/settings/settings-users.md index ac0025a1137..b55d64fc4f7 100644 --- a/docs/en/operations/settings/settings-users.md +++ b/docs/en/operations/settings/settings-users.md @@ -118,8 +118,8 @@ To open access for user from any network, specify: ::/0 ``` -:::important -It is insecure to open access from any network unless you have a firewall properly configured or the server is not directly connected to Internet. +:::warning +It’s insecure to open access from any network unless you have a firewall properly configured or the server is not directly connected to Internet. ::: To open access only from localhost, specify: diff --git a/docs/en/operations/settings/settings.md b/docs/en/operations/settings/settings.md index 809c7c3e837..94dcf159ca9 100644 --- a/docs/en/operations/settings/settings.md +++ b/docs/en/operations/settings/settings.md @@ -460,7 +460,7 @@ Possible values: Changes the behaviour of join operations with `ANY` strictness. -:::important +:::warning This setting applies only for `JOIN` operations with [Join](../../engines/table-engines/special/join.md) engine tables. ::: @@ -550,7 +550,7 @@ Default value: 64. Enables legacy ClickHouse server behaviour in `ANY INNER|LEFT JOIN` operations. -:::important +:::warning Use this setting only for backward compatibility if your use cases depend on legacy `JOIN` behaviour. ::: @@ -942,7 +942,7 @@ Higher values will lead to higher memory usage. The maximum size of blocks of uncompressed data before compressing for writing to a table. By default, 1,048,576 (1 MiB). Specifying a smaller block size generally leads to slightly reduced compression ratio, the compression and decompression speed increases slightly due to cache locality, and memory consumption is reduced. -:::important +:::warning This is an expert-level setting, and you shouldn't change it if you're just getting started with ClickHouse. ::: @@ -960,7 +960,7 @@ We are writing a UInt32-type column (4 bytes per value). When writing 8192 rows, We are writing a URL column with the String type (average size of 60 bytes per value). When writing 8192 rows, the average will be slightly less than 500 KB of data. Since this is more than 65,536, a compressed block will be formed for each mark. In this case, when reading data from the disk in the range of a single mark, extra data won’t be decompressed. -:::important +:::warning This is an expert-level setting, and you shouldn't change it if you're just getting started with ClickHouse. ::: @@ -1247,7 +1247,7 @@ Possible values: Default value: 1. -:::important +:::warning Disable this setting if you use [max_parallel_replicas](#settings-max_parallel_replicas) without [parallel_replicas_custom_key](#settings-parallel_replicas_custom_key). If [parallel_replicas_custom_key](#settings-parallel_replicas_custom_key) is set, disable this setting only if it's used on a cluster with multiple shards containing multiple replicas. If it's used on a cluster with a single shard and multiple replicas, disabling this setting will have negative effects. @@ -1277,7 +1277,7 @@ Default value: `1`. This options will produce different results depending on the settings used. -:::important +:::warning This setting will produce incorrect results when joins or subqueries are involved, and all tables don't meet certain requirements. See [Distributed Subqueries and max_parallel_replicas](../../sql-reference/operators/in.md/#max_parallel_replica-subqueries) for more details. ::: @@ -2186,7 +2186,7 @@ Default value: 0. This setting also affects broken batches (that may appears because of abnormal server (machine) termination and no `fsync_after_insert`/`fsync_directories` for [Distributed](../../engines/table-engines/special/distributed.md) table engine). ::: -:::important +:::warning You should not rely on automatic batch splitting, since this may hurt performance. ::: @@ -2194,7 +2194,7 @@ You should not rely on automatic batch splitting, since this may hurt performanc Sets the priority ([nice](https://en.wikipedia.org/wiki/Nice_(Unix))) for threads that execute queries. The OS scheduler considers this priority when choosing the next thread to run on each available CPU core. -:::important +:::warning To use this setting, you need to set the `CAP_SYS_NICE` capability. The `clickhouse-server` package sets it up during installation. Some virtual environments do not allow you to set the `CAP_SYS_NICE` capability. In this case, `clickhouse-server` shows a message about it at the start. ::: @@ -2858,7 +2858,7 @@ Possible values: Default value: `0`. -:::important +:::warning Nullable primary key usually indicates bad design. It is forbidden in almost all main stream DBMS. The feature is mainly for [AggregatingMergeTree](../../engines/table-engines/mergetree-family/aggregatingmergetree.md) and is not heavily tested. Use with care. ::: diff --git a/docs/en/operations/storing-data.md b/docs/en/operations/storing-data.md index 21c3bf84250..3f9a0f67187 100644 --- a/docs/en/operations/storing-data.md +++ b/docs/en/operations/storing-data.md @@ -471,6 +471,6 @@ Use [http_max_single_read_retries](/docs/en/operations/settings/settings.md/#htt Zero-copy replication is possible, but not recommended, with `S3` and `HDFS` disks. Zero-copy replication means that if the data is stored remotely on several machines and needs to be synchronized, then only the metadata is replicated (paths to the data parts), but not the data itself. -:::important Zero-copy replication is not ready for production +:::warning Zero-copy replication is not ready for production Zero-copy replication is disabled by default in ClickHouse version 22.8 and higher. This feature is not recommended for production use. ::: diff --git a/docs/en/operations/system-tables/parts.md b/docs/en/operations/system-tables/parts.md index c9477214fd6..106d3c59dea 100644 --- a/docs/en/operations/system-tables/parts.md +++ b/docs/en/operations/system-tables/parts.md @@ -99,7 +99,7 @@ Columns: - `move_ttl_info.expression` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) — Array of expressions. Each expression defines a [TTL MOVE rule](../../engines/table-engines/mergetree-family/mergetree.md/#table_engine-mergetree-ttl). -:::important +:::warning The `move_ttl_info.expression` array is kept mostly for backward compatibility, now the simpliest way to check `TTL MOVE` rule is to use the `move_ttl_info.min` and `move_ttl_info.max` fields. ::: diff --git a/docs/en/operations/tips.md b/docs/en/operations/tips.md index 00e7155edc1..da34a6b7e9c 100644 --- a/docs/en/operations/tips.md +++ b/docs/en/operations/tips.md @@ -36,7 +36,7 @@ $ echo 0 | sudo tee /proc/sys/vm/overcommit_memory Use `perf top` to watch the time spent in the kernel for memory management. Permanent huge pages also do not need to be allocated. -:::important +:::warning If your system has less than 16 GB of RAM, you may experience various memory exceptions because default settings do not match this amount of memory. The recommended amount of RAM is 32 GB or more. You can use ClickHouse in a system with a small amount of RAM, even with 2 GB of RAM, but it requires additional tuning and can ingest at a low rate. ::: diff --git a/docs/en/operations/utilities/clickhouse-copier.md b/docs/en/operations/utilities/clickhouse-copier.md index 1b75530dda7..87280bc3ba8 100644 --- a/docs/en/operations/utilities/clickhouse-copier.md +++ b/docs/en/operations/utilities/clickhouse-copier.md @@ -8,7 +8,7 @@ sidebar_label: clickhouse-copier Copies data from the tables in one cluster to tables in another (or the same) cluster. -:::important +:::warning To get a consistent copy, the data in the source tables and partitions should not change during the entire process. ::: diff --git a/docs/en/sql-reference/aggregate-functions/parametric-functions.md b/docs/en/sql-reference/aggregate-functions/parametric-functions.md index 0bd43034c1b..40184c0aa02 100644 --- a/docs/en/sql-reference/aggregate-functions/parametric-functions.md +++ b/docs/en/sql-reference/aggregate-functions/parametric-functions.md @@ -90,7 +90,7 @@ Checks whether the sequence contains an event chain that matches the pattern. sequenceMatch(pattern)(timestamp, cond1, cond2, ...) ``` -:::important +:::warning Events that occur at the same second may lay in the sequence in an undefined order affecting the result. ::: @@ -176,7 +176,7 @@ SELECT sequenceMatch('(?1)(?2)')(time, number = 1, number = 2, number = 4) FROM Counts the number of event chains that matched the pattern. The function searches event chains that do not overlap. It starts to search for the next chain after the current chain is matched. -:::important +:::warning Events that occur at the same second may lay in the sequence in an undefined order affecting the result. ::: diff --git a/docs/en/sql-reference/data-types/float.md b/docs/en/sql-reference/data-types/float.md index 7a5fa088f6e..38c414fa8cd 100644 --- a/docs/en/sql-reference/data-types/float.md +++ b/docs/en/sql-reference/data-types/float.md @@ -6,7 +6,7 @@ sidebar_label: Float32, Float64 # Float32, Float64 -:::important +:::warning If you need accurate calculations, in particular if you work with financial or business data requiring a high precision you should consider using Decimal instead. Floats might lead to inaccurate results as illustrated below: ``` diff --git a/docs/en/sql-reference/data-types/json.md b/docs/en/sql-reference/data-types/json.md index 29d6553b888..d9099ba5ad3 100644 --- a/docs/en/sql-reference/data-types/json.md +++ b/docs/en/sql-reference/data-types/json.md @@ -6,7 +6,7 @@ sidebar_label: JSON # JSON -:::important +:::warning This feature is experimental and is not production ready. If you need to work with JSON documents, consider using [this guide](/docs/en/guides/developer/working-with-json/json-load-data.md) instead. ::: @@ -14,7 +14,7 @@ Stores JavaScript Object Notation (JSON) documents in a single column. `JSON` is an alias for `Object('json')`. -:::important +:::warning The JSON data type is an experimental feature. To use it, set `allow_experimental_object_type = 1`. ::: diff --git a/docs/en/sql-reference/data-types/special-data-types/interval.md b/docs/en/sql-reference/data-types/special-data-types/interval.md index 68494e52360..5169bc646c9 100644 --- a/docs/en/sql-reference/data-types/special-data-types/interval.md +++ b/docs/en/sql-reference/data-types/special-data-types/interval.md @@ -8,7 +8,7 @@ sidebar_label: Interval The family of data types representing time and date intervals. The resulting types of the [INTERVAL](../../../sql-reference/operators/index.md#operator-interval) operator. -:::important +:::warning `Interval` data type values can’t be stored in tables. ::: diff --git a/docs/en/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-layout.md b/docs/en/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-layout.md index 7af5923e052..4dc6fd33849 100644 --- a/docs/en/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-layout.md +++ b/docs/en/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-layout.md @@ -299,7 +299,7 @@ Example: The table contains discounts for each advertiser in the format: To use a sample for date ranges, define the `range_min` and `range_max` elements in the [structure](../../../sql-reference/dictionaries/external-dictionaries/external-dicts-dict-structure.md). These elements must contain elements `name` and `type` (if `type` is not specified, the default type will be used - Date). `type` can be any numeric type (Date / DateTime / UInt64 / Int32 / others). -:::important +:::warning Values of `range_min` and `range_max` should fit in `Int64` type. ::: @@ -588,7 +588,7 @@ Set a large enough cache size. You need to experiment to select the number of ce 3. Assess memory consumption using the `system.dictionaries` table. 4. Increase or decrease the number of cells until the required memory consumption is reached. -:::important +:::warning Do not use ClickHouse as a source, because it is slow to process queries with random reads. ::: diff --git a/docs/en/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-structure.md b/docs/en/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-structure.md index 06d1c817a13..8271a342941 100644 --- a/docs/en/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-structure.md +++ b/docs/en/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-structure.md @@ -60,7 +60,7 @@ ClickHouse supports the following types of keys: An xml structure can contain either `` or ``. DDL-query must contain single `PRIMARY KEY`. -:::important +:::warning You must not describe key as an attribute. ::: @@ -178,4 +178,4 @@ Configuration fields: ## Related Content -- [Using dictionaries to accelerate queries](https://clickhouse.com/blog/faster-queries-dictionaries-clickhouse) +- [Using dictionaries to accelerate queries](https://clickhouse.com/blog/faster-queries-dictionaries-clickhouse) \ No newline at end of file diff --git a/docs/en/sql-reference/distributed-ddl.md b/docs/en/sql-reference/distributed-ddl.md index d170f3765c2..ff5155391be 100644 --- a/docs/en/sql-reference/distributed-ddl.md +++ b/docs/en/sql-reference/distributed-ddl.md @@ -18,6 +18,6 @@ In order to run these queries correctly, each host must have the same cluster de The local version of the query will eventually be executed on each host in the cluster, even if some hosts are currently not available. -:::important +:::warning The order for executing queries within a single host is guaranteed. -::: +::: \ No newline at end of file diff --git a/docs/en/sql-reference/functions/hash-functions.md b/docs/en/sql-reference/functions/hash-functions.md index 833e0a40b2b..69dc73e2fb0 100644 --- a/docs/en/sql-reference/functions/hash-functions.md +++ b/docs/en/sql-reference/functions/hash-functions.md @@ -125,7 +125,7 @@ SELECT sipHash64Keyed((506097522914230528, 1084818905618843912), array('e','x',' Like [sipHash64](#hash_functions-siphash64) but produces a 128-bit hash value, i.e. the final xor-folding state is done up to 128 bits. -:::important +:::warning This 128-bit variant differs from the reference implementation and it's weaker. This version exists because, when it was written, there was no official 128-bit extension for SipHash. New projects should probably use [sipHash128Reference](#hash_functions-siphash128reference). @@ -165,7 +165,7 @@ Result: Same as [sipHash128](#hash_functions-siphash128) but additionally takes an explicit key argument instead of using a fixed key. -:::important +:::warning This 128-bit variant differs from the reference implementation and it's weaker. This version exists because, when it was written, there was no official 128-bit extension for SipHash. New projects should probably use [sipHash128ReferenceKeyed](#hash_functions-siphash128referencekeyed). diff --git a/docs/en/sql-reference/functions/introspection.md b/docs/en/sql-reference/functions/introspection.md index 78f763318df..9357f75b8e6 100644 --- a/docs/en/sql-reference/functions/introspection.md +++ b/docs/en/sql-reference/functions/introspection.md @@ -8,7 +8,7 @@ sidebar_label: Introspection You can use functions described in this chapter to introspect [ELF](https://en.wikipedia.org/wiki/Executable_and_Linkable_Format) and [DWARF](https://en.wikipedia.org/wiki/DWARF) for query profiling. -:::important +:::warning These functions are slow and may impose security considerations. ::: diff --git a/docs/en/sql-reference/functions/nlp-functions.md b/docs/en/sql-reference/functions/nlp-functions.md index 62116fe50a3..f68448af2be 100644 --- a/docs/en/sql-reference/functions/nlp-functions.md +++ b/docs/en/sql-reference/functions/nlp-functions.md @@ -5,7 +5,7 @@ sidebar_label: NLP title: "[experimental] Natural Language Processing functions" --- -:::important +:::warning This is an experimental feature that is currently in development and is not ready for general use. It will change in unpredictable backwards-incompatible ways in future releases. Set `allow_experimental_nlp_functions = 1` to enable it. ::: diff --git a/docs/en/sql-reference/functions/other-functions.md b/docs/en/sql-reference/functions/other-functions.md index 0f95f16ffed..7146484361e 100644 --- a/docs/en/sql-reference/functions/other-functions.md +++ b/docs/en/sql-reference/functions/other-functions.md @@ -792,7 +792,7 @@ neighbor(column, offset[, default_value]) The result of the function depends on the affected data blocks and the order of data in the block. -:::important +:::warning It can reach the neighbor rows only inside the currently processed data block. ::: @@ -902,7 +902,7 @@ Result: Calculates the difference between successive row values ​​in the data block. Returns 0 for the first row and the difference from the previous row for each subsequent row. -:::important +:::warning It can reach the previous row only inside the currently processed data block. ::: @@ -986,7 +986,7 @@ Each event has a start time and an end time. The start time is included in the e The function calculates the total number of active (concurrent) events for each event start time. -:::important +:::warning Events must be ordered by the start time in ascending order. If this requirement is violated the function raises an exception. Every data block is processed separately. If events from different data blocks overlap then they can not be processed correctly. ::: @@ -1674,7 +1674,7 @@ Result: Accumulates states of an aggregate function for each row of a data block. -:::important +:::warning The state is reset for each new data block. ::: diff --git a/docs/en/sql-reference/operators/exists.md b/docs/en/sql-reference/operators/exists.md index 6819048e28f..4bc29389c9c 100644 --- a/docs/en/sql-reference/operators/exists.md +++ b/docs/en/sql-reference/operators/exists.md @@ -7,7 +7,7 @@ The `EXISTS` operator checks how many records are in the result of a subquery. I `EXISTS` can be used in a [WHERE](../../sql-reference/statements/select/where.md) clause. -:::important +:::warning References to main query tables and columns are not supported in a subquery. ::: diff --git a/docs/en/sql-reference/operators/index.md b/docs/en/sql-reference/operators/index.md index 98dee830cd4..0fe7ebbf4b6 100644 --- a/docs/en/sql-reference/operators/index.md +++ b/docs/en/sql-reference/operators/index.md @@ -229,7 +229,7 @@ Types of intervals: You can also use a string literal when setting the `INTERVAL` value. For example, `INTERVAL 1 HOUR` is identical to the `INTERVAL '1 hour'` or `INTERVAL '1' hour`. -:::important +:::warning Intervals with different types can’t be combined. You can’t use expressions like `INTERVAL 4 DAY 1 HOUR`. Specify intervals in units that are smaller or equal to the smallest unit of the interval, for example, `INTERVAL 25 HOUR`. You can use consecutive operations, like in the example below. ::: diff --git a/docs/en/sql-reference/statements/alter/column.md b/docs/en/sql-reference/statements/alter/column.md index 99958c31b92..d580efa4992 100644 --- a/docs/en/sql-reference/statements/alter/column.md +++ b/docs/en/sql-reference/statements/alter/column.md @@ -75,7 +75,7 @@ Deletes the column with the name `name`. If the `IF EXISTS` clause is specified, Deletes data from the file system. Since this deletes entire files, the query is completed almost instantly. -:::important +:::warning You can’t delete a column if it is referenced by [materialized view](/docs/en/sql-reference/statements/create/view.md/#materialized). Otherwise, it returns an error. ::: diff --git a/docs/en/sql-reference/statements/alter/constraint.md b/docs/en/sql-reference/statements/alter/constraint.md index 0b19966798b..844b24d7374 100644 --- a/docs/en/sql-reference/statements/alter/constraint.md +++ b/docs/en/sql-reference/statements/alter/constraint.md @@ -17,7 +17,7 @@ See more on [constraints](../../../sql-reference/statements/create/table.md#cons Queries will add or remove metadata about constraints from table so they are processed immediately. -:::important +:::warning Constraint check **will not be executed** on existing data if it was added. ::: diff --git a/docs/en/sql-reference/statements/create/row-policy.md b/docs/en/sql-reference/statements/create/row-policy.md index 93bc5729c8e..31ce9221eea 100644 --- a/docs/en/sql-reference/statements/create/row-policy.md +++ b/docs/en/sql-reference/statements/create/row-policy.md @@ -7,7 +7,7 @@ title: "CREATE ROW POLICY" Creates a [row policy](../../../operations/access-rights.md#row-policy-management), i.e. a filter used to determine which rows a user can read from a table. -:::important +:::warning Row policies makes sense only for users with readonly access. If user can modify table or copy partitions between tables, it defeats the restrictions of row policies. ::: diff --git a/docs/en/sql-reference/statements/create/table.md b/docs/en/sql-reference/statements/create/table.md index 7da1c9669ff..50e74920e4b 100644 --- a/docs/en/sql-reference/statements/create/table.md +++ b/docs/en/sql-reference/statements/create/table.md @@ -286,7 +286,7 @@ ENGINE = engine PRIMARY KEY(expr1[, expr2,...]); ``` -:::important +:::warning You can't combine both ways in one query. ::: @@ -342,7 +342,7 @@ ALTER TABLE codec_example MODIFY COLUMN float_value CODEC(Default); Codecs can be combined in a pipeline, for example, `CODEC(Delta, Default)`. -:::important +:::warning You can’t decompress ClickHouse database files with external utilities like `lz4`. Instead, use the special [clickhouse-compressor](https://github.com/ClickHouse/ClickHouse/tree/master/programs/compressor) utility. ::: @@ -437,11 +437,11 @@ Encryption codecs: These codecs use a fixed nonce and encryption is therefore deterministic. This makes it compatible with deduplicating engines such as [ReplicatedMergeTree](../../../engines/table-engines/mergetree-family/replication.md) but has a weakness: when the same data block is encrypted twice, the resulting ciphertext will be exactly the same so an adversary who can read the disk can see this equivalence (although only the equivalence, without getting its content). -:::important +:::warning Most engines including the "\*MergeTree" family create index files on disk without applying codecs. This means plaintext will appear on disk if an encrypted column is indexed. ::: -:::important +:::warning If you perform a SELECT query mentioning a specific value in an encrypted column (such as in its WHERE clause), the value may appear in [system.query_log](../../../operations/system-tables/query_log.md). You may want to disable the logging. ::: diff --git a/docs/en/sql-reference/statements/create/user.md b/docs/en/sql-reference/statements/create/user.md index e2cf195ebd6..a756b3d4a0d 100644 --- a/docs/en/sql-reference/statements/create/user.md +++ b/docs/en/sql-reference/statements/create/user.md @@ -55,7 +55,7 @@ Another way of specifying host is to use `@` syntax following the username. Exam - `CREATE USER mira@'localhost'` — Equivalent to the `HOST LOCAL` syntax. - `CREATE USER mira@'192.168.%.%'` — Equivalent to the `HOST LIKE` syntax. -:::important +:::warning ClickHouse treats `user_name@'address'` as a username as a whole. Thus, technically you can create multiple users with the same `user_name` and different constructions after `@`. However, we do not recommend to do so. ::: diff --git a/docs/en/sql-reference/statements/delete.md b/docs/en/sql-reference/statements/delete.md index e5a0a8f5b2b..e1987e50af4 100644 --- a/docs/en/sql-reference/statements/delete.md +++ b/docs/en/sql-reference/statements/delete.md @@ -32,7 +32,7 @@ SET allow_experimental_lightweight_delete = true; An [alternative way to delete rows](./alter/delete.md) in ClickHouse is `ALTER TABLE ... DELETE`, which might be more efficient if you do bulk deletes only occasionally and don't need the operation to be applied instantly. In most use cases the new lightweight `DELETE FROM` behavior will be considerably faster. -:::important +:::warning Even though deletes are becoming more lightweight in ClickHouse, they should still not be used as aggressively as on an OLTP system. Lightweight deletes are currently efficient for wide parts, but for compact parts, they can be a heavyweight operation, and it may be better to use `ALTER TABLE` for some scenarios. ::: diff --git a/docs/en/sql-reference/statements/optimize.md b/docs/en/sql-reference/statements/optimize.md index ee5ad512dd5..78615a2f9ad 100644 --- a/docs/en/sql-reference/statements/optimize.md +++ b/docs/en/sql-reference/statements/optimize.md @@ -7,7 +7,7 @@ title: "OPTIMIZE Statement" This query tries to initialize an unscheduled merge of data parts for tables. -:::important +:::warning `OPTIMIZE` can’t fix the `Too many parts` error. ::: diff --git a/docs/en/sql-reference/statements/system.md b/docs/en/sql-reference/statements/system.md index a7fd0944593..f9f55acfcec 100644 --- a/docs/en/sql-reference/statements/system.md +++ b/docs/en/sql-reference/statements/system.md @@ -312,7 +312,7 @@ One may execute query after: Replica attaches locally found parts and sends info about them to Zookeeper. Parts present on a replica before metadata loss are not re-fetched from other ones if not being outdated (so replica restoration does not mean re-downloading all data over the network). -:::important +:::warning Parts in all states are moved to `detached/` folder. Parts active before data loss (committed) are attached. ::: diff --git a/docs/en/sql-reference/statements/watch.md b/docs/en/sql-reference/statements/watch.md index e4220be60e9..90d19e6be0e 100644 --- a/docs/en/sql-reference/statements/watch.md +++ b/docs/en/sql-reference/statements/watch.md @@ -6,7 +6,7 @@ sidebar_label: WATCH # WATCH Statement (Experimental) -:::important +:::warning This is an experimental feature that may change in backwards-incompatible ways in the future releases. Enable live views and `WATCH` query using `set allow_experimental_live_view = 1`. ::: @@ -107,4 +107,4 @@ The `FORMAT` clause works the same way as for the [SELECT](../../sql-reference/s :::note The [JSONEachRowWithProgress](../../interfaces/formats.md#jsoneachrowwithprogress) format should be used when watching [LIVE VIEW](./create/view.md#live-view) tables over the HTTP interface. The progress messages will be added to the output to keep the long-lived HTTP connection alive until the query result changes. The interval between progress messages is controlled using the [live_view_heartbeat_interval](./create/view.md#live-view-settings) setting. -::: +::: \ No newline at end of file diff --git a/docs/en/sql-reference/table-functions/file.md b/docs/en/sql-reference/table-functions/file.md index bf0fca648a3..594c328c3ff 100644 --- a/docs/en/sql-reference/table-functions/file.md +++ b/docs/en/sql-reference/table-functions/file.md @@ -109,7 +109,7 @@ Query the number of rows in all files of these two directories: SELECT count(*) FROM file('{some,another}_dir/*', 'TSV', 'name String, value UInt32'); ``` -:::tip +:::warning If your listing of files contains number ranges with leading zeros, use the construction with braces for each digit separately or use `?`. ::: diff --git a/docs/en/sql-reference/table-functions/hdfs.md b/docs/en/sql-reference/table-functions/hdfs.md index 784e45d0f81..97a253a5356 100644 --- a/docs/en/sql-reference/table-functions/hdfs.md +++ b/docs/en/sql-reference/table-functions/hdfs.md @@ -79,7 +79,7 @@ SELECT count(*) FROM hdfs('hdfs://hdfs1:9000/{some,another}_dir/*', 'TSV', 'name String, value UInt32') ``` -:::tip +:::warning If your listing of files contains number ranges with leading zeros, use the construction with braces for each digit separately or use `?`. ::: diff --git a/docs/en/sql-reference/table-functions/hdfsCluster.md b/docs/en/sql-reference/table-functions/hdfsCluster.md index 78f56372310..231c552610f 100644 --- a/docs/en/sql-reference/table-functions/hdfsCluster.md +++ b/docs/en/sql-reference/table-functions/hdfsCluster.md @@ -50,7 +50,7 @@ SELECT count(*) FROM hdfsCluster('cluster_simple', 'hdfs://hdfs1:9000/{some,another}_dir/*', 'TSV', 'name String, value UInt32') ``` -:::tip +:::warning If your listing of files contains number ranges with leading zeros, use the construction with braces for each digit separately or use `?`. ::: diff --git a/docs/en/sql-reference/table-functions/index.md b/docs/en/sql-reference/table-functions/index.md index 940fae73b66..b49c2f8da20 100644 --- a/docs/en/sql-reference/table-functions/index.md +++ b/docs/en/sql-reference/table-functions/index.md @@ -20,6 +20,6 @@ You can use table functions in: - [INSERT INTO TABLE FUNCTION](../../sql-reference/statements/insert-into.md#inserting-into-table-function) query. -:::tip +:::warning You can’t use table functions if the [allow_ddl](../../operations/settings/permissions-for-queries.md#settings_allow_ddl) setting is disabled. ::: diff --git a/docs/en/sql-reference/table-functions/s3.md b/docs/en/sql-reference/table-functions/s3.md index 62b8150de69..d7199717798 100644 --- a/docs/en/sql-reference/table-functions/s3.md +++ b/docs/en/sql-reference/table-functions/s3.md @@ -112,7 +112,7 @@ FROM s3('https://clickhouse-public-datasets.s3.amazonaws.com/my-test-bucket-768/ └─────────┘ ``` -:::tip +:::warning If your listing of files contains number ranges with leading zeros, use the construction with braces for each digit separately or use `?`. ::: diff --git a/docs/en/sql-reference/table-functions/s3Cluster.md b/docs/en/sql-reference/table-functions/s3Cluster.md index 504f92b4dc0..f420a69596c 100644 --- a/docs/en/sql-reference/table-functions/s3Cluster.md +++ b/docs/en/sql-reference/table-functions/s3Cluster.md @@ -42,7 +42,7 @@ SELECT * FROM s3Cluster( Count the total amount of rows in all files in the cluster `cluster_simple`: -:::tip +:::warning If your listing of files contains number ranges with leading zeros, use the construction with braces for each digit separately or use `?`. ::: From 1f59536d4af59b44b812c8f8330066d056fbcbd2 Mon Sep 17 00:00:00 2001 From: Dmitry Novik Date: Fri, 10 Mar 2023 00:03:48 +0000 Subject: [PATCH 661/841] Remove whitespaces --- .../GeneralizeGroupingFunctionForDistributedVisitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Analyzer/Visitors/GeneralizeGroupingFunctionForDistributedVisitor.cpp b/src/Analyzer/Visitors/GeneralizeGroupingFunctionForDistributedVisitor.cpp index 40d7f0caa33..4701f3369f9 100644 --- a/src/Analyzer/Visitors/GeneralizeGroupingFunctionForDistributedVisitor.cpp +++ b/src/Analyzer/Visitors/GeneralizeGroupingFunctionForDistributedVisitor.cpp @@ -30,7 +30,7 @@ public: && function_name != "groupingForCube" && function_name != "groupingForGroupingSets") return; - + function->resolveAsFunctionWithName("GROUPING"); if (ordinary_grouping) return; From 6f35d46ac8d9ee3484357015033e35c3912fff89 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Fri, 10 Mar 2023 05:01:06 +0300 Subject: [PATCH 662/841] Update SchemaInferenceUtils.cpp --- src/Formats/SchemaInferenceUtils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Formats/SchemaInferenceUtils.cpp b/src/Formats/SchemaInferenceUtils.cpp index 7bd220e529b..011860948c3 100644 --- a/src/Formats/SchemaInferenceUtils.cpp +++ b/src/Formats/SchemaInferenceUtils.cpp @@ -984,7 +984,7 @@ DataTypePtr tryInferNumberFromString(std::string_view field, const FormatSetting if (tryReadIntText(tmp_int, buf) && buf.eof()) return std::make_shared(); - /// We cam safely get back to the start of buffer, because we read from a string and we didn't reach eof. + /// We can safely get back to the start of buffer, because we read from a string and we didn't reach eof. buf.position() = buf.buffer().begin(); /// In case of Int64 overflow, try to infer UInt64 @@ -993,7 +993,7 @@ DataTypePtr tryInferNumberFromString(std::string_view field, const FormatSetting return std::make_shared(); } - /// We cam safely get back to the start of buffer, because we read from a string and we didn't reach eof. + /// We can safely get back to the start of buffer, because we read from a string and we didn't reach eof. buf.position() = buf.buffer().begin(); Float64 tmp; From 40eed939cca48687ce2fa13b721a822b908b0c0c Mon Sep 17 00:00:00 2001 From: Tyler Hannan Date: Fri, 10 Mar 2023 10:07:53 +0100 Subject: [PATCH 663/841] Update README.md Slacks invite links are unpleasant. We now redirect so we don't have to constantly change. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fcbe65e8223..17b4df154a9 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ curl https://clickhouse.com/ | sh * [Tutorial](https://clickhouse.com/docs/en/getting_started/tutorial/) shows how to set up and query a small ClickHouse cluster. * [Documentation](https://clickhouse.com/docs/en/) provides more in-depth information. * [YouTube channel](https://www.youtube.com/c/ClickHouseDB) has a lot of content about ClickHouse in video format. -* [Slack](https://join.slack.com/t/clickhousedb/shared_invite/zt-1gh9ds7f4-PgDhJAaF8ad5RbWBAAjzFg) and [Telegram](https://telegram.me/clickhouse_en) allow chatting with ClickHouse users in real-time. +* [Slack](https://clickhouse.com/slack) and [Telegram](https://telegram.me/clickhouse_en) allow chatting with ClickHouse users in real-time. * [Blog](https://clickhouse.com/blog/) contains various ClickHouse-related articles, as well as announcements and reports about events. * [Code Browser (Woboq)](https://clickhouse.com/codebrowser/ClickHouse/index.html) with syntax highlight and navigation. * [Code Browser (github.dev)](https://github.dev/ClickHouse/ClickHouse) with syntax highlight, powered by github.dev. From e82539858ad5819faddeee957c7bfae3b0d2f660 Mon Sep 17 00:00:00 2001 From: Konstantin Morozov Date: Fri, 10 Mar 2023 11:56:48 +0100 Subject: [PATCH 664/841] refactoring: update functional test --- .../02514_analyzer_drop_join_on.reference | 72 +++++++++---------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/tests/queries/0_stateless/02514_analyzer_drop_join_on.reference b/tests/queries/0_stateless/02514_analyzer_drop_join_on.reference index af6f07e3f95..0f6fa7e2e66 100644 --- a/tests/queries/0_stateless/02514_analyzer_drop_join_on.reference +++ b/tests/queries/0_stateless/02514_analyzer_drop_join_on.reference @@ -24,15 +24,15 @@ Header: count() UInt64 Header: default.a.a2_4 String default.b.b1_0 UInt64 Join (JOIN FillRightFirst) - Header: default.a.a1_1 UInt64 - default.a.a2_4 String + Header: default.a.a2_4 String + default.a.a1_1 UInt64 default.b.b1_0 UInt64 Expression ((JOIN actions + Change column names to column identifiers)) - Header: default.a.a1_1 UInt64 - default.a.a2_4 String + Header: default.a.a2_4 String + default.a.a1_1 UInt64 ReadFromStorage (Memory) - Header: a1 UInt64 - a2 String + Header: a2 String + a1 UInt64 Expression ((JOIN actions + Change column names to column identifiers)) Header: default.b.b1_0 UInt64 ReadFromStorage (Memory) @@ -52,27 +52,27 @@ Expression ((Project names + (Projection + DROP unused columns after JOIN))) Header: a2 String d2 String Join (JOIN FillRightFirst) - Header: default.a.a2_0 String - default.a.k_2 UInt64 + Header: default.a.k_2 UInt64 + default.a.a2_0 String default.d.d2_1 String Expression (DROP unused columns after JOIN) - Header: default.a.a2_0 String - default.a.k_2 UInt64 + Header: default.a.k_2 UInt64 + default.a.a2_0 String Join (JOIN FillRightFirst) - Header: default.a.a2_0 String - default.a.k_2 UInt64 + Header: default.a.k_2 UInt64 + default.a.a2_0 String Expression (DROP unused columns after JOIN) - Header: default.a.a2_0 String - default.a.k_2 UInt64 + Header: default.a.k_2 UInt64 + default.a.a2_0 String Join (JOIN FillRightFirst) - Header: default.a.a2_0 String - default.a.k_2 UInt64 + Header: default.a.k_2 UInt64 + default.a.a2_0 String Expression (Change column names to column identifiers) - Header: default.a.a2_0 String - default.a.k_2 UInt64 + Header: default.a.k_2 UInt64 + default.a.a2_0 String ReadFromStorage (Memory) - Header: a2 String - k UInt64 + Header: k UInt64 + a2 String Expression (Change column names to column identifiers) Header: default.b.k_3 UInt64 ReadFromStorage (Memory) @@ -82,11 +82,11 @@ Header: a2 String ReadFromStorage (Memory) Header: k UInt64 Expression (Change column names to column identifiers) - Header: default.d.d2_1 String - default.d.k_5 UInt64 + Header: default.d.k_5 UInt64 + default.d.d2_1 String ReadFromStorage (Memory) - Header: d2 String - k UInt64 + Header: k UInt64 + d2 String EXPLAIN PLAN header = 1 SELECT b.bx FROM a JOIN (SELECT b1, b2 || 'x' AS bx FROM b ) AS b ON b.b1 = a.a1 @@ -123,28 +123,28 @@ Header: bx String b.bx_0 String b.b1_1 UInt64 Join (JOIN FillRightFirst) - Header: default.a.a1_2 UInt64 - default.a.a2_6 String + Header: default.a.a2_6 String + default.a.a1_2 UInt64 b.bx_0 String b.b1_1 UInt64 Expression ((JOIN actions + Change column names to column identifiers)) - Header: default.a.a1_2 UInt64 - default.a.a2_6 String + Header: default.a.a2_6 String + default.a.a1_2 UInt64 ReadFromStorage (Memory) - Header: a1 UInt64 - a2 String + Header: a2 String + a1 UInt64 Expression ((JOIN actions + (Change column names to column identifiers + (Project names + (Projection + Change column names to column identifiers))))) Header: b.b1_1 UInt64 b.bx_0 String ReadFromStorage (Memory) - Header: b1 UInt64 - b2 String + Header: b2 String + b1 UInt64 Expression ((JOIN actions + Change column names to column identifiers)) - Header: default.c.c1_3 UInt64 - default.c.c2_5 String + Header: default.c.c2_5 String + default.c.c1_3 UInt64 ReadFromStorage (Memory) - Header: c1 UInt64 - c2 String + Header: c2 String + c1 UInt64 Expression ((JOIN actions + (Change column names to column identifiers + (Project names + (Projection + Change column names to column identifiers))))) Header: d.d1_4 UInt64 ReadFromStorage (SystemNumbers) From b17ba66353b1325781f5811c2d956c8370163b78 Mon Sep 17 00:00:00 2001 From: Mike Kot Date: Fri, 10 Mar 2023 14:25:54 +0300 Subject: [PATCH 665/841] Be more explicit about functional tests output location --- docs/en/development/tests.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/en/development/tests.md b/docs/en/development/tests.md index 9ae49e8f707..8402206c794 100644 --- a/docs/en/development/tests.md +++ b/docs/en/development/tests.md @@ -31,6 +31,9 @@ folder and run the following command: PATH=$PATH: tests/clickhouse-test 01428_hash_set_nan_key ``` +Test results (`stderr` and `stdout`) are written to files `01428_hash_set_nan_key.[stderr|stdout]` which +are located near the test file itself (so for `queries/0_stateless/foo.sql` output will be in `queries/0_stateless/foo.stdout`). + For more options, see `tests/clickhouse-test --help`. You can simply run all tests or run subset of tests filtered by substring in test name: `./clickhouse-test substring`. There are also options to run tests in parallel or in randomized order. ### Adding a New Test From e3d71f4f1be8a7e66d7212b5809afe74fe73697d Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Fri, 10 Mar 2023 14:36:05 +0100 Subject: [PATCH 666/841] suppress hung check with ubsan --- tests/ci/stress.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/tests/ci/stress.py b/tests/ci/stress.py index 12c40ea1f66..d571240a5a2 100755 --- a/tests/ci/stress.py +++ b/tests/ci/stress.py @@ -223,6 +223,19 @@ def prepare_for_hung_check(drop_databases): pass return True +def is_ubsan_build(): + try: + query = """clickhouse client -q "SELECT value FROM system.build_options WHERE name = 'CXX_FLAGS'" """ + output = ( + check_output(query, shell=True, stderr=STDOUT, timeout=30) + .decode("utf-8") + .strip() + ) + return b"-fsanitize=undefined" in output + except Exception as e: + logging.info("Failed to get build flags: ", str(e)) + return False + if __name__ == "__main__": logging.basicConfig(level=logging.INFO, format="%(asctime)s %(message)s") @@ -243,6 +256,10 @@ if __name__ == "__main__": args = parser.parse_args() if args.drop_databases and not args.hung_check: raise Exception("--drop-databases only used in hung check (--hung-check)") + + # FIXME Hung check with ubsan is temporarily disabled due to https://github.com/ClickHouse/ClickHouse/issues/45372 + suppress_hung_check = is_ubsan_build() + func_pipes = [] func_pipes = run_func_test( args.test_cmd, @@ -307,7 +324,7 @@ if __name__ == "__main__": res = call(cmd, shell=True, stdout=tee.stdin, stderr=STDOUT) if tee.stdin is not None: tee.stdin.close() - if res != 0 and have_long_running_queries: + if res != 0 and have_long_running_queries and not suppress_hung_check: logging.info("Hung check failed with exit code %d", res) else: hung_check_status = "No queries hung\tOK\t\\N\t\n" From dd77962048473da7343b639ecb9ed424ad23a40a Mon Sep 17 00:00:00 2001 From: Arthur Passos Date: Fri, 10 Mar 2023 10:42:22 -0300 Subject: [PATCH 667/841] refactor to use string instead of string_views --- src/Common/tests/gtest_find_symbols.cpp | 39 +++++++++++++------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/src/Common/tests/gtest_find_symbols.cpp b/src/Common/tests/gtest_find_symbols.cpp index dc469ee1721..3c19549eb75 100644 --- a/src/Common/tests/gtest_find_symbols.cpp +++ b/src/Common/tests/gtest_find_symbols.cpp @@ -5,9 +5,12 @@ template -void test_find_first_not(std::string_view haystack, std::string_view::iterator expected_output) +void test_find_first_not(const std::string & haystack, std::size_t expected_pos) { - ASSERT_EQ(expected_output, find_first_not_symbols(haystack.begin(), haystack.end())); + const char * begin = haystack.data(); + const char * end = haystack.data() + haystack.size(); + + ASSERT_EQ(begin + expected_pos, find_first_not_symbols(begin, end)); } TEST(FindSymbols, SimpleTest) @@ -45,9 +48,9 @@ TEST(FindSymbols, SimpleTest) TEST(FindNotSymbols, AllSymbolsPresent) { - std::string_view str_with_17_bytes = "hello world hello"; - std::string_view str_with_16_bytes = {str_with_17_bytes.begin(), str_with_17_bytes.end() - 1u}; - std::string_view str_with_15_bytes = {str_with_16_bytes.begin(), str_with_16_bytes.end() - 1u}; + std::string str_with_17_bytes = "hello world hello"; + std::string str_with_16_bytes = {str_with_17_bytes.begin(), str_with_17_bytes.end() - 1u}; + std::string str_with_15_bytes = {str_with_16_bytes.begin(), str_with_16_bytes.end() - 1u}; /* * The below variations will choose different implementation strategies: @@ -58,35 +61,35 @@ TEST(FindNotSymbols, AllSymbolsPresent) * Below code asserts that all calls return the ::end of the input string. This was not true prior to this fix as mentioned in PR #47304 * */ - test_find_first_not<'h', 'e', 'l', 'o', 'w', 'r', 'd', ' '>(str_with_15_bytes, str_with_15_bytes.end()); - test_find_first_not<'h', 'e', 'l', 'o', 'w', 'r', 'd', ' '>(str_with_16_bytes, str_with_16_bytes.end()); - test_find_first_not<'h', 'e', 'l', 'o', 'w', 'r', 'd', ' '>(str_with_17_bytes, str_with_17_bytes.end()); + test_find_first_not<'h', 'e', 'l', 'o', 'w', 'r', 'd', ' '>(str_with_15_bytes, str_with_15_bytes.size()); + test_find_first_not<'h', 'e', 'l', 'o', 'w', 'r', 'd', ' '>(str_with_16_bytes, str_with_16_bytes.size()); + test_find_first_not<'h', 'e', 'l', 'o', 'w', 'r', 'd', ' '>(str_with_17_bytes, str_with_17_bytes.size()); } TEST(FindNotSymbols, NoSymbolsMatch) { - std::string_view s = "abcdefg"; + std::string s = "abcdefg"; // begin should be returned since the first character of the string does not match any of the below symbols - test_find_first_not<'h', 'i', 'j'>(s, s.begin()); + test_find_first_not<'h', 'i', 'j'>(s, 0u); } TEST(FindNotSymbols, ExtraSymbols) { - std::string_view s = "hello_world_hello"; - test_find_first_not<'h', 'e', 'l', 'o', ' '>(s, s.begin() + 5u); + std::string s = "hello_world_hello"; + test_find_first_not<'h', 'e', 'l', 'o', ' '>(s, 5u); } TEST(FindNotSymbols, EmptyString) { - std::string_view s = ""; - test_find_first_not<'h', 'e', 'l', 'o', 'w', 'r', 'd', ' '>(s, s.end()); + std::string s; + test_find_first_not<'h', 'e', 'l', 'o', 'w', 'r', 'd', ' '>(s, s.size()); } TEST(FindNotSymbols, SingleChar) { - std::string_view s = "a"; - test_find_first_not<'a'>(s, s.end()); + std::string s = "a"; + test_find_first_not<'a'>(s, s.size()); } TEST(FindNotSymbols, NullCharacter) @@ -94,6 +97,6 @@ TEST(FindNotSymbols, NullCharacter) // special test to ensure only the passed template arguments are used as needles // since current find_first_symbols implementation takes in 16 characters and defaults // to \0. - auto s = std::string_view("abcdefg\0x", 9u); - test_find_first_not<'a', 'b', 'c', 'd', 'e', 'f', 'g'>(s, s.begin() + 7u); + std::string s("abcdefg\0x", 9u); + test_find_first_not<'a', 'b', 'c', 'd', 'e', 'f', 'g'>(s, 7u); } From ce3ab32d897ed605d106286ded9cd528f4bd191b Mon Sep 17 00:00:00 2001 From: robot-clickhouse Date: Fri, 10 Mar 2023 13:53:47 +0000 Subject: [PATCH 668/841] Automatic style fix --- tests/ci/stress.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/ci/stress.py b/tests/ci/stress.py index d571240a5a2..6c7118a9335 100755 --- a/tests/ci/stress.py +++ b/tests/ci/stress.py @@ -223,6 +223,7 @@ def prepare_for_hung_check(drop_databases): pass return True + def is_ubsan_build(): try: query = """clickhouse client -q "SELECT value FROM system.build_options WHERE name = 'CXX_FLAGS'" """ From 3c5cb817d7def8834840acae78120539c53c36e0 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Fri, 10 Mar 2023 17:04:38 +0300 Subject: [PATCH 669/841] Update stress.py --- tests/ci/stress.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ci/stress.py b/tests/ci/stress.py index 6c7118a9335..881b45e4a78 100755 --- a/tests/ci/stress.py +++ b/tests/ci/stress.py @@ -234,7 +234,7 @@ def is_ubsan_build(): ) return b"-fsanitize=undefined" in output except Exception as e: - logging.info("Failed to get build flags: ", str(e)) + logging.info("Failed to get build flags: " + str(e)) return False From d95b69ca768316a895be7feaecd7fccbfce0124f Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Fri, 10 Mar 2023 17:22:09 +0300 Subject: [PATCH 670/841] Update stress.py --- tests/ci/stress.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ci/stress.py b/tests/ci/stress.py index 881b45e4a78..8ced7f2e3bc 100755 --- a/tests/ci/stress.py +++ b/tests/ci/stress.py @@ -234,7 +234,7 @@ def is_ubsan_build(): ) return b"-fsanitize=undefined" in output except Exception as e: - logging.info("Failed to get build flags: " + str(e)) + logging.info("Failed to get build flags: %s", str(e)) return False From 2699ef477f899d0a6304c394541b56b3d5badc47 Mon Sep 17 00:00:00 2001 From: Dmitry Novik Date: Fri, 10 Mar 2023 14:36:56 +0000 Subject: [PATCH 671/841] Move visitor --- src/CMakeLists.txt | 1 - src/Storages/StorageDistributed.cpp | 2 +- .../removeGroupingFunctionSpecializations.cpp} | 2 +- .../removeGroupingFunctionSpecializations.h} | 0 4 files changed, 2 insertions(+), 3 deletions(-) rename src/{Analyzer/Visitors/GeneralizeGroupingFunctionForDistributedVisitor.cpp => Storages/removeGroupingFunctionSpecializations.cpp} (95%) rename src/{Analyzer/Visitors/GeneralizeGroupingFunctionForDistributedVisitor.h => Storages/removeGroupingFunctionSpecializations.h} (100%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 828450c6261..6c5142813c5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -235,7 +235,6 @@ add_object_library(clickhouse_databases_mysql Databases/MySQL) add_object_library(clickhouse_disks Disks) add_object_library(clickhouse_analyzer Analyzer) add_object_library(clickhouse_analyzer_passes Analyzer/Passes) -add_object_library(clickhouse_analyzer_visitors Analyzer/Visitors) add_object_library(clickhouse_planner Planner) add_object_library(clickhouse_interpreters Interpreters) add_object_library(clickhouse_interpreters_cache Interpreters/Cache) diff --git a/src/Storages/StorageDistributed.cpp b/src/Storages/StorageDistributed.cpp index be71a9e80f1..0638abccd41 100644 --- a/src/Storages/StorageDistributed.cpp +++ b/src/Storages/StorageDistributed.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include @@ -44,7 +45,6 @@ #include #include #include -#include #include #include diff --git a/src/Analyzer/Visitors/GeneralizeGroupingFunctionForDistributedVisitor.cpp b/src/Storages/removeGroupingFunctionSpecializations.cpp similarity index 95% rename from src/Analyzer/Visitors/GeneralizeGroupingFunctionForDistributedVisitor.cpp rename to src/Storages/removeGroupingFunctionSpecializations.cpp index 4701f3369f9..2d94f745acf 100644 --- a/src/Analyzer/Visitors/GeneralizeGroupingFunctionForDistributedVisitor.cpp +++ b/src/Storages/removeGroupingFunctionSpecializations.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/src/Analyzer/Visitors/GeneralizeGroupingFunctionForDistributedVisitor.h b/src/Storages/removeGroupingFunctionSpecializations.h similarity index 100% rename from src/Analyzer/Visitors/GeneralizeGroupingFunctionForDistributedVisitor.h rename to src/Storages/removeGroupingFunctionSpecializations.h From bb8f0cb3ab248fe242797bbbae49d7c434c76436 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Fri, 10 Mar 2023 18:09:32 +0300 Subject: [PATCH 672/841] Update stress.py --- tests/ci/stress.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ci/stress.py b/tests/ci/stress.py index 8ced7f2e3bc..37b3b1c181e 100755 --- a/tests/ci/stress.py +++ b/tests/ci/stress.py @@ -232,7 +232,7 @@ def is_ubsan_build(): .decode("utf-8") .strip() ) - return b"-fsanitize=undefined" in output + return "-fsanitize=undefined" in output except Exception as e: logging.info("Failed to get build flags: %s", str(e)) return False From 6f4833f2c3eb8cad7d2b76d1e9927ae6a63b7bf0 Mon Sep 17 00:00:00 2001 From: nellicus Date: Fri, 10 Mar 2023 16:10:31 +0100 Subject: [PATCH 673/841] add async_insert_max_query_number --- docs/en/operations/settings/settings.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/operations/settings/settings.md b/docs/en/operations/settings/settings.md index 1060eae1b0e..1ece33a7f81 100644 --- a/docs/en/operations/settings/settings.md +++ b/docs/en/operations/settings/settings.md @@ -1506,7 +1506,7 @@ Enables or disables asynchronous inserts. This makes sense only for insertion ov If enabled, the data is combined into batches before the insertion into tables, so it is possible to do small and frequent insertions into ClickHouse (up to 15000 queries per second) without buffer tables. -The data is inserted either after the [async_insert_max_data_size](#async-insert-max-data-size) is exceeded or after [async_insert_busy_timeout_ms](#async-insert-busy-timeout-ms) milliseconds since the first `INSERT` query. If the [async_insert_stale_timeout_ms](#async-insert-stale-timeout-ms) is set to a non-zero value, the data is inserted after `async_insert_stale_timeout_ms` milliseconds since the last query. +The data is inserted either after the [async_insert_max_data_size](#async-insert-max-data-size) is exceeded or after [async_insert_busy_timeout_ms](#async-insert-busy-timeout-ms) milliseconds since the first `INSERT` query. If the [async_insert_stale_timeout_ms](#async-insert-stale-timeout-ms) is set to a non-zero value, the data is inserted after `async_insert_stale_timeout_ms` milliseconds since the last query. Also the buffer will be flushed to disk if at least [async_insert_max_query_number](#async-insert-max-query-number) async insert queries per block were received.This last setting takes effect only if [async_insert_deduplicate](#async-insert-deduplicate) is enabled. If [wait_for_async_insert](#wait-for-async-insert) is enabled, every client will wait for the data to be processed and flushed to the table. Otherwise, the query would be processed almost instantly, even if the data is not inserted. From f6ac225f98d0766463045533e4b96467769025fa Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Fri, 10 Mar 2023 15:24:47 +0000 Subject: [PATCH 674/841] Apply settings for EXPLAIN earlier (in the same way we do for SELECT). --- src/Interpreters/InterpreterSetQuery.cpp | 57 ++++++++++++++++++++++++ src/Interpreters/InterpreterSetQuery.h | 3 ++ src/Interpreters/executeQuery.cpp | 45 +------------------ 3 files changed, 62 insertions(+), 43 deletions(-) diff --git a/src/Interpreters/InterpreterSetQuery.cpp b/src/Interpreters/InterpreterSetQuery.cpp index 2c8611ffb63..e009bcbc177 100644 --- a/src/Interpreters/InterpreterSetQuery.cpp +++ b/src/Interpreters/InterpreterSetQuery.cpp @@ -1,6 +1,11 @@ #include #include #include +#include +#include +#include +#include +#include namespace DB { @@ -26,4 +31,56 @@ void InterpreterSetQuery::executeForCurrentContext() getContext()->resetSettingsToDefaultValue(ast.default_settings); } +static void applySettingsFromSelectWithUnion(const ASTSelectWithUnionQuery & select_with_union, ContextMutablePtr context) +{ + const ASTs & children = select_with_union.list_of_selects->children; + if (children.empty()) + return; + + // We might have an arbitrarily complex UNION tree, so just give + // up if the last first-order child is not a plain SELECT. + // It is flattened later, when we process UNION ALL/DISTINCT. + const auto * last_select = children.back()->as(); + if (last_select && last_select->settings()) + { + InterpreterSetQuery(last_select->settings(), context).executeForCurrentContext(); + } +} + +void InterpreterSetQuery::applySettingsFromQuery(const ASTPtr & ast, ContextMutablePtr context_) +{ + if (const auto * select_query = ast->as()) + { + if (auto new_settings = select_query->settings()) + InterpreterSetQuery(new_settings, context_).executeForCurrentContext(); + } + else if (const auto * select_with_union_query = ast->as()) + { + applySettingsFromSelectWithUnion(*select_with_union_query, context_); + } + else if (const auto * explain_query = ast->as()) + { + applySettingsFromQuery(explain_query->getExplainedQuery(), context_); + } + else if (const auto * query_with_output = dynamic_cast(ast.get())) + { + if (query_with_output->settings_ast) + InterpreterSetQuery(query_with_output->settings_ast, context_).executeForCurrentContext(); + + if (const auto * create_query = ast->as()) + { + if (create_query->select) + { + applySettingsFromSelectWithUnion(create_query->select->as(), context_); + } + } + } + else if (auto * insert_query = ast->as()) + { + context_->setInsertFormat(insert_query->format); + if (insert_query->settings_ast) + InterpreterSetQuery(insert_query->settings_ast, context_).executeForCurrentContext(); + } +} + } diff --git a/src/Interpreters/InterpreterSetQuery.h b/src/Interpreters/InterpreterSetQuery.h index 39d331100d6..bcd4022f9bb 100644 --- a/src/Interpreters/InterpreterSetQuery.h +++ b/src/Interpreters/InterpreterSetQuery.h @@ -27,6 +27,9 @@ public: bool supportsTransactions() const override { return true; } + /// To apply SETTINGS clauses from query as early as possible + static void applySettingsFromQuery(const ASTPtr & ast, ContextMutablePtr context_); + private: ASTPtr query_ptr; }; diff --git a/src/Interpreters/executeQuery.cpp b/src/Interpreters/executeQuery.cpp index 435401796a0..104452d9cfd 100644 --- a/src/Interpreters/executeQuery.cpp +++ b/src/Interpreters/executeQuery.cpp @@ -303,22 +303,6 @@ static void setQuerySpecificSettings(ASTPtr & ast, ContextMutablePtr context) } } -static void applySettingsFromSelectWithUnion(const ASTSelectWithUnionQuery & select_with_union, ContextMutablePtr context) -{ - const ASTs & children = select_with_union.list_of_selects->children; - if (children.empty()) - return; - - // We might have an arbitrarily complex UNION tree, so just give - // up if the last first-order child is not a plain SELECT. - // It is flattened later, when we process UNION ALL/DISTINCT. - const auto * last_select = children.back()->as(); - if (last_select && last_select->settings()) - { - InterpreterSetQuery(last_select->settings(), context).executeForCurrentContext(); - } -} - static std::tuple executeQueryImpl( const char * begin, const char * end, @@ -466,35 +450,10 @@ static std::tuple executeQueryImpl( /// Interpret SETTINGS clauses as early as possible (before invoking the corresponding interpreter), /// to allow settings to take effect. - if (const auto * select_query = ast->as()) - { - if (auto new_settings = select_query->settings()) - InterpreterSetQuery(new_settings, context).executeForCurrentContext(); - } - else if (const auto * select_with_union_query = ast->as()) - { - applySettingsFromSelectWithUnion(*select_with_union_query, context); - } - else if (const auto * query_with_output = dynamic_cast(ast.get())) - { - if (query_with_output->settings_ast) - InterpreterSetQuery(query_with_output->settings_ast, context).executeForCurrentContext(); + InterpreterSetQuery::applySettingsFromQuery(ast, context); - if (const auto * create_query = ast->as()) - { - if (create_query->select) - { - applySettingsFromSelectWithUnion(create_query->select->as(), context); - } - } - } - else if (auto * insert_query = ast->as()) - { - context->setInsertFormat(insert_query->format); - if (insert_query->settings_ast) - InterpreterSetQuery(insert_query->settings_ast, context).executeForCurrentContext(); + if (auto * insert_query = ast->as()) insert_query->tail = istr; - } setQuerySpecificSettings(ast, context); From d20cbfe05192cfbef9adb332943cc2dcdf98ff37 Mon Sep 17 00:00:00 2001 From: kolechenkov <60389882+kolechenkov@users.noreply.github.com> Date: Fri, 10 Mar 2023 19:00:02 +0300 Subject: [PATCH 675/841] Update gui.md Update information about Yandex DataLens --- docs/ru/interfaces/third-party/gui.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/ru/interfaces/third-party/gui.md b/docs/ru/interfaces/third-party/gui.md index c34b799347b..e7190362dc4 100644 --- a/docs/ru/interfaces/third-party/gui.md +++ b/docs/ru/interfaces/third-party/gui.md @@ -177,19 +177,20 @@ sidebar_label: "Визуальные интерфейсы от сторонни ### Yandex DataLens {#yandex-datalens} -[Yandex DataLens](https://cloud.yandex.ru/services/datalens) — cервис визуализации и анализа данных. +[Yandex DataLens](https://datalens.yandex.ru) — cервис визуализации и анализа данных. Основные возможности: - Широкий выбор инструментов визуализации, от простых столбчатых диаграмм до сложных дашбордов. - Возможность опубликовать дашборды на широкую аудиторию. - Поддержка множества источников данных, включая ClickHouse. -- Хранение материализованных данных в кластере ClickHouse DataLens. -Для небольших проектов DataLens [доступен бесплатно](https://cloud.yandex.ru/docs/datalens/pricing), в том числе и для коммерческого использования. +DataLens [доступен бесплатно](https://cloud.yandex.ru/docs/datalens/pricing), в том числе и для коммерческого использования. +- [Знакомство с DataLens]((https://youtu.be/57ngi_6BINE). +- [Чат сообщества DataLens](https://t.me/YandexDataLens) - [Документация DataLens](https://cloud.yandex.ru/docs/datalens/). -- [Пособие по визуализации данных из ClickHouse](https://cloud.yandex.ru/docs/solutions/datalens/data-from-ch-visualization). +- [Сценарий по визуализации данных из ClickHouse](https://cloud.yandex.ru/docs/solutions/datalens/data-from-ch-visualization). ### Holistics Software {#holistics-software} From 9bcd93d959cfe0a64517a82fe0a9530ccc224b1b Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Fri, 10 Mar 2023 17:47:42 +0100 Subject: [PATCH 676/841] Update InterpreterInsertQuery.cpp --- src/Interpreters/InterpreterInsertQuery.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Interpreters/InterpreterInsertQuery.cpp b/src/Interpreters/InterpreterInsertQuery.cpp index 3cae219fa60..b4a19ea7403 100644 --- a/src/Interpreters/InterpreterInsertQuery.cpp +++ b/src/Interpreters/InterpreterInsertQuery.cpp @@ -161,7 +161,7 @@ Block InterpreterInsertQuery::getSampleBlock( if (table_sample_physical.has(current_name)) { if (!allow_materialized) - throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Cannot insert column {}, because it is a MATERIALIZED column", + throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Cannot insert column {}, because it is MATERIALIZED column.", current_name); res.insert(ColumnWithTypeAndName(table_sample_physical.getByName(current_name).type, current_name)); } @@ -527,7 +527,7 @@ BlockIO InterpreterInsertQuery::execute() { for (const auto & column : metadata_snapshot->getColumns()) if (column.default_desc.kind == ColumnDefaultKind::Materialized && header.has(column.name)) - throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Cannot insert column {}, because it is a MATERIALIZED column", column.name); + throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Cannot insert column {}, because it is MATERIALIZED column.", column.name); } res.pipeline = QueryPipelineBuilder::getPipeline(std::move(pipeline)); From 65890de50c89120ea876f73743d6daae5d43204b Mon Sep 17 00:00:00 2001 From: MeenaRenganathan22 Date: Fri, 10 Mar 2023 09:05:25 -0800 Subject: [PATCH 677/841] Updating the submodule to the new PR#9 --- contrib/krb5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/krb5 b/contrib/krb5 index b23ef0fa4cc..02346f7b240 160000 --- a/contrib/krb5 +++ b/contrib/krb5 @@ -1 +1 @@ -Subproject commit b23ef0fa4cca9369afd909ac9659696455fefbd2 +Subproject commit 02346f7b240fc10a1fc8bf1ae4eaad9150fa9f7d From 363989f3f86ac96662624cf2272d5875b721233b Mon Sep 17 00:00:00 2001 From: robot-clickhouse Date: Fri, 10 Mar 2023 17:56:29 +0000 Subject: [PATCH 678/841] Update version_date.tsv and changelogs after v23.2.4.12-stable --- docker/keeper/Dockerfile | 2 +- docker/server/Dockerfile.alpine | 2 +- docker/server/Dockerfile.ubuntu | 2 +- docs/changelogs/v23.2.4.12-stable.md | 20 ++++++++++++++++++++ utils/list-versions/version_date.tsv | 1 + 5 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 docs/changelogs/v23.2.4.12-stable.md diff --git a/docker/keeper/Dockerfile b/docker/keeper/Dockerfile index 500249b5bd6..34c1406b687 100644 --- a/docker/keeper/Dockerfile +++ b/docker/keeper/Dockerfile @@ -29,7 +29,7 @@ RUN arch=${TARGETARCH:-amd64} \ esac ARG REPOSITORY="https://s3.amazonaws.com/clickhouse-builds/22.4/31c367d3cd3aefd316778601ff6565119fe36682/package_release" -ARG VERSION="23.2.3.17" +ARG VERSION="23.2.4.12" ARG PACKAGES="clickhouse-keeper" # user/group precreated explicitly with fixed uid/gid on purpose. diff --git a/docker/server/Dockerfile.alpine b/docker/server/Dockerfile.alpine index 5f613eea4d0..f4ca498a7e7 100644 --- a/docker/server/Dockerfile.alpine +++ b/docker/server/Dockerfile.alpine @@ -33,7 +33,7 @@ RUN arch=${TARGETARCH:-amd64} \ # lts / testing / prestable / etc ARG REPO_CHANNEL="stable" ARG REPOSITORY="https://packages.clickhouse.com/tgz/${REPO_CHANNEL}" -ARG VERSION="23.2.3.17" +ARG VERSION="23.2.4.12" ARG PACKAGES="clickhouse-client clickhouse-server clickhouse-common-static" # user/group precreated explicitly with fixed uid/gid on purpose. diff --git a/docker/server/Dockerfile.ubuntu b/docker/server/Dockerfile.ubuntu index 3e99bca8bc2..13b3ebdb01c 100644 --- a/docker/server/Dockerfile.ubuntu +++ b/docker/server/Dockerfile.ubuntu @@ -22,7 +22,7 @@ RUN sed -i "s|http://archive.ubuntu.com|${apt_archive}|g" /etc/apt/sources.list ARG REPO_CHANNEL="stable" ARG REPOSITORY="deb https://packages.clickhouse.com/deb ${REPO_CHANNEL} main" -ARG VERSION="23.2.3.17" +ARG VERSION="23.2.4.12" ARG PACKAGES="clickhouse-client clickhouse-server clickhouse-common-static" # set non-empty deb_location_url url to create a docker image diff --git a/docs/changelogs/v23.2.4.12-stable.md b/docs/changelogs/v23.2.4.12-stable.md new file mode 100644 index 00000000000..2b6a689aee5 --- /dev/null +++ b/docs/changelogs/v23.2.4.12-stable.md @@ -0,0 +1,20 @@ +--- +sidebar_position: 1 +sidebar_label: 2023 +--- + +# 2023 Changelog + +### ClickHouse release v23.2.4.12-stable (8fe866cb035) FIXME as compared to v23.2.3.17-stable (dec18bf7281) + +#### Bug Fix (user-visible misbehavior in official stable or prestable release) + +* Backported in [#47277](https://github.com/ClickHouse/ClickHouse/issues/47277): Fix IPv4/IPv6 serialization/deserialization in binary formats that was broken in https://github.com/ClickHouse/ClickHouse/pull/43221. Closes [#46522](https://github.com/ClickHouse/ClickHouse/issues/46522). [#46616](https://github.com/ClickHouse/ClickHouse/pull/46616) ([Kruglov Pavel](https://github.com/Avogar)). +* Backported in [#47212](https://github.com/ClickHouse/ClickHouse/issues/47212): `INSERT` queries through native TCP protocol and HTTP protocol were not canceled correctly in some cases. It could lead to a partially applied query if a client canceled the query, or if a client died or, in rare cases, on network errors. As a result, it could lead to not working deduplication. Fixes [#27667](https://github.com/ClickHouse/ClickHouse/issues/27667) and [#45377](https://github.com/ClickHouse/ClickHouse/issues/45377). [#46681](https://github.com/ClickHouse/ClickHouse/pull/46681) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Backported in [#47363](https://github.com/ClickHouse/ClickHouse/issues/47363): Fix possible deadlock on distributed query cancellation. [#47161](https://github.com/ClickHouse/ClickHouse/pull/47161) ([Kruglov Pavel](https://github.com/Avogar)). + +#### NOT FOR CHANGELOG / INSIGNIFICANT + +* Follow-up to [#46681](https://github.com/ClickHouse/ClickHouse/issues/46681) [#47284](https://github.com/ClickHouse/ClickHouse/pull/47284) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Add a manual trigger for release workflow [#47302](https://github.com/ClickHouse/ClickHouse/pull/47302) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). + diff --git a/utils/list-versions/version_date.tsv b/utils/list-versions/version_date.tsv index 34bc3f646fc..50a9314bc00 100644 --- a/utils/list-versions/version_date.tsv +++ b/utils/list-versions/version_date.tsv @@ -1,3 +1,4 @@ +v23.2.4.12-stable 2023-03-10 v23.2.3.17-stable 2023-03-06 v23.2.2.20-stable 2023-03-01 v23.2.1.2537-stable 2023-02-23 From dc0858475d105d8b6a3561d972a60ef5637dabd8 Mon Sep 17 00:00:00 2001 From: Boris Kuschel Date: Fri, 10 Mar 2023 10:57:41 -0500 Subject: [PATCH 679/841] Add s390x cross build instructions --- docs/en/development/build-cross-s390x.md | 123 +++++++++++++++++++++++ docs/en/development/contrib.md | 2 +- docs/en/development/style.md | 2 +- docs/en/development/tests.md | 2 +- 4 files changed, 126 insertions(+), 3 deletions(-) create mode 100644 docs/en/development/build-cross-s390x.md diff --git a/docs/en/development/build-cross-s390x.md b/docs/en/development/build-cross-s390x.md new file mode 100644 index 00000000000..21cc563ff06 --- /dev/null +++ b/docs/en/development/build-cross-s390x.md @@ -0,0 +1,123 @@ +--- +slug: /en/development/build-cross-s390x +sidebar_position: 69 +title: How to Build, Run and Debug ClickHouse on Linux for s390x (zLinux) +sidebar_label: Build on Linux for s390x (zLinux) +--- + +As of writing (2023/3/10) building for s390x considered to be experimental. Not all features can be enabled, has broken features and is currently under active development. + + +## Building + +As s390x does not support boringSSL, it uses openSSL and has two related build options. +- By default, the s390x build will create dynamiclly link to openSSL libraries. It will build openSSL, so its not neccessary to install openSSL beforehand. This is recommended in all cases. +- Another option is to build openSSL in-tree. In this case two build options need to be supplied to cmake +```bash +-DENABLE_OPENSSL_DYNAMIC=0 -DENABLE_OPENSSL=1 +``` + +These instructions assume that the host machine is x86_64 and has all the tooling required to build natively base based on the [Build instructions](../development/build.md). It also assumes that the host is Ubuntu 22.04 but should work on Ubuntu 20.04. + +In addition to installing the tooling used to build natively the following additional pacakges need to be installed: + +```bash +apt-get install binutils-s390x-linux-gnu libc6-dev-s390x-cross gcc-s390x-linux-gnu binfmt-support qemu-user-static +``` + +If you wish to cross compile rust code.. +```bash +rustup target add s390x-unknown-linux-gnu +``` + +To build for s390x, +```bash +cmake -DCMAKE_TOOLCHAIN_FILE=cmake/linux/toolchain-s390x.cmake .. +ninja +``` + +## Running + +Once built, the binary can be run with: + +```bash +qemu-s390x-static -L /usr/s390x-linux-gnu ./clickhouse +``` + +## Debugging + +Install lldb: + +```bash +apt-get install lldb-15 +``` + +To Debug a s390x executable run clickhouse using qemu debug mode: + +```bash +qemu-s390x-static -g 31338 -L /usr/s390x-linux-gnu ./clickhouse +``` + +In antother shell run lldb and attach, replace `` and `` with the values corresponding to your environment. +```bash +lldb-15 +(lldb) target create ./clickhouse +Current executable set to '//ClickHouse//programs/clickhouse' (s390x). +(lldb) settings set target.source-map //ClickHouse +(lldb) gdb-remote 31338 +Process 1 stopped +* thread #1, stop reason = signal SIGTRAP + frame #0: 0x0000004020e74cd0 +-> 0x4020e74cd0: lgr %r2, %r15 + 0x4020e74cd4: aghi %r15, -160 + 0x4020e74cd8: xc 0(8,%r15), 0(%r15) + 0x4020e74cde: brasl %r14, 275429939040 +(lldb) b main +Breakpoint 1: 9 locations. +(lldb) c +Process 1 resuming +Process 1 stopped +* thread #1, stop reason = breakpoint 1.1 + frame #0: 0x0000004005cd9fc0 clickhouse`main(argc_=1, argv_=0x0000004020e594a8) at main.cpp:450:17 + 447 #if !defined(FUZZING_MODE) + 448 int main(int argc_, char ** argv_) + 449 { +-> 450 inside_main = true; + 451 SCOPE_EXIT({ inside_main = false; }); + 452 + 453 /// PHDR cache is required for query profiler to work reliably +``` + +## Visual Studio Code integration + +- (CodeLLDB extension)[https://github.com/vadimcn/vscode-lldb] is required for visual debugging, (Command Variable)[https://github.com/rioj7/command-variable] extension can help dynamic lauches if using cmake variants. +- Make sure to set the backend to your llvm installation ex. `"lldb.library": "/usr/lib/x86_64-linux-gnu/liblldb-15.so"` +- Launcher: +```json +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Debug", + "type": "lldb", + "request": "custom", + "targetCreateCommands": ["target create ${command:cmake.launchTargetDirectory}/clickhouse"], + "processCreateCommands": ["settings set target.source-map ${input:targetdir} ${workspaceFolder}", "gdb-remote 31338"], + "sourceMap": { "${input:targetdir}": "${workspaceFolder}" }, + } + ], + "inputs": [ + { + "id": "targetdir", + "type": "command", + "command": "extension.commandvariable.transform", + "args": { + "text": "${command:cmake.launchTargetDirectory}", + "find": ".*/([^/]+)/[^/]+$", + "replace": "$1" + } + } + ] +} +``` +- Make sure to run the clickhouse executable in debug mode prior to launch. (It is possible to create a preLaunchTask that automates this) \ No newline at end of file diff --git a/docs/en/development/contrib.md b/docs/en/development/contrib.md index 04158a0c3f7..4b296c43db4 100644 --- a/docs/en/development/contrib.md +++ b/docs/en/development/contrib.md @@ -1,6 +1,6 @@ --- slug: /en/development/contrib -sidebar_position: 71 +sidebar_position: 72 sidebar_label: Third-Party Libraries description: A list of third-party libraries used --- diff --git a/docs/en/development/style.md b/docs/en/development/style.md index 35683aa7822..78b1d1e9ebb 100644 --- a/docs/en/development/style.md +++ b/docs/en/development/style.md @@ -1,6 +1,6 @@ --- slug: /en/development/style -sidebar_position: 69 +sidebar_position: 70 sidebar_label: C++ Guide description: A list of recommendations regarding coding style, naming convention, formatting and more --- diff --git a/docs/en/development/tests.md b/docs/en/development/tests.md index 9ae49e8f707..a4f23545176 100644 --- a/docs/en/development/tests.md +++ b/docs/en/development/tests.md @@ -1,6 +1,6 @@ --- slug: /en/development/tests -sidebar_position: 70 +sidebar_position: 71 sidebar_label: Testing title: ClickHouse Testing description: Most of ClickHouse features can be tested with functional tests and they are mandatory to use for every change in ClickHouse code that can be tested that way. From 54dad1f72ae603f5365501ab7b48e72766c5291e Mon Sep 17 00:00:00 2001 From: Boris Kuschel Date: Fri, 10 Mar 2023 12:28:57 -0500 Subject: [PATCH 680/841] Fix typos --- docs/en/development/build-cross-s390x.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/en/development/build-cross-s390x.md b/docs/en/development/build-cross-s390x.md index 21cc563ff06..2e4acc68f50 100644 --- a/docs/en/development/build-cross-s390x.md +++ b/docs/en/development/build-cross-s390x.md @@ -11,13 +11,13 @@ As of writing (2023/3/10) building for s390x considered to be experimental. Not ## Building As s390x does not support boringSSL, it uses openSSL and has two related build options. -- By default, the s390x build will create dynamiclly link to openSSL libraries. It will build openSSL, so its not neccessary to install openSSL beforehand. This is recommended in all cases. +- By default, the s390x build will dyamically link to openSSL libraries. It will build openSSL shared objects, so its not neccessary to install openSSL beforehand. (This options is recommended in all cases.) - Another option is to build openSSL in-tree. In this case two build options need to be supplied to cmake ```bash -DENABLE_OPENSSL_DYNAMIC=0 -DENABLE_OPENSSL=1 ``` -These instructions assume that the host machine is x86_64 and has all the tooling required to build natively base based on the [Build instructions](../development/build.md). It also assumes that the host is Ubuntu 22.04 but should work on Ubuntu 20.04. +These instructions assume that the host machine is x86_64 and has all the tooling required to build natively based on the [Build instructions](../development/build.md). It also assumes that the host is Ubuntu 22.04 but should work on Ubuntu 20.04. In addition to installing the tooling used to build natively the following additional pacakges need to be installed: @@ -90,7 +90,7 @@ Process 1 stopped ## Visual Studio Code integration -- (CodeLLDB extension)[https://github.com/vadimcn/vscode-lldb] is required for visual debugging, (Command Variable)[https://github.com/rioj7/command-variable] extension can help dynamic lauches if using cmake variants. +- (CodeLLDB extension)[https://github.com/vadimcn/vscode-lldb] is required for visual debugging, (Command Variable)[https://github.com/rioj7/command-variable] extension can help dynamic launches if using cmake variants. - Make sure to set the backend to your llvm installation ex. `"lldb.library": "/usr/lib/x86_64-linux-gnu/liblldb-15.so"` - Launcher: ```json From d26466bab903a6dbef1aa36e99a63fb7c88e4b22 Mon Sep 17 00:00:00 2001 From: Boris Kuschel Date: Fri, 10 Mar 2023 13:00:10 -0500 Subject: [PATCH 681/841] aspell corrections --- docs/en/development/build-cross-s390x.md | 14 +++++----- .../aspell-ignore/en/aspell-dict.txt | 27 ++++++++++++------- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/docs/en/development/build-cross-s390x.md b/docs/en/development/build-cross-s390x.md index 2e4acc68f50..e02b22e6a42 100644 --- a/docs/en/development/build-cross-s390x.md +++ b/docs/en/development/build-cross-s390x.md @@ -10,16 +10,16 @@ As of writing (2023/3/10) building for s390x considered to be experimental. Not ## Building -As s390x does not support boringSSL, it uses openSSL and has two related build options. -- By default, the s390x build will dyamically link to openSSL libraries. It will build openSSL shared objects, so its not neccessary to install openSSL beforehand. (This options is recommended in all cases.) -- Another option is to build openSSL in-tree. In this case two build options need to be supplied to cmake +As s390x does not support boringssl, it uses OpenSSL and has two related build options. +- By default, the s390x build will dynamically link to OpenSSL libraries. It will build OpenSSL shared objects, so its not necessary to install OpenSSL beforehand. (This options is recommended in all cases.) +- Another option is to build OpenSSL in-tree. In this case two build options need to be supplied to cmake ```bash -DENABLE_OPENSSL_DYNAMIC=0 -DENABLE_OPENSSL=1 ``` These instructions assume that the host machine is x86_64 and has all the tooling required to build natively based on the [Build instructions](../development/build.md). It also assumes that the host is Ubuntu 22.04 but should work on Ubuntu 20.04. -In addition to installing the tooling used to build natively the following additional pacakges need to be installed: +In addition to installing the tooling used to build natively the following additional packages need to be installed: ```bash apt-get install binutils-s390x-linux-gnu libc6-dev-s390x-cross gcc-s390x-linux-gnu binfmt-support qemu-user-static @@ -46,19 +46,19 @@ qemu-s390x-static -L /usr/s390x-linux-gnu ./clickhouse ## Debugging -Install lldb: +Install LLDB: ```bash apt-get install lldb-15 ``` -To Debug a s390x executable run clickhouse using qemu debug mode: +To Debug a s390x executable run clickhouse using QEMU debug mode: ```bash qemu-s390x-static -g 31338 -L /usr/s390x-linux-gnu ./clickhouse ``` -In antother shell run lldb and attach, replace `` and `` with the values corresponding to your environment. +In another shell run LLDB and attach, replace `` and `` with the values corresponding to your environment. ```bash lldb-15 (lldb) target create ./clickhouse diff --git a/utils/check-style/aspell-ignore/en/aspell-dict.txt b/utils/check-style/aspell-ignore/en/aspell-dict.txt index 1ad7432a5bf..e2750622469 100644 --- a/utils/check-style/aspell-ignore/en/aspell-dict.txt +++ b/utils/check-style/aspell-ignore/en/aspell-dict.txt @@ -1,4 +1,4 @@ -personal_ws-1.1 en 484 +personal_ws-1.1 en 544 AArch ACLs AMQP @@ -25,6 +25,7 @@ CentOS ClickHouse ClickHouse's CodeBlock +CodeLLDB Config ConnectionDetails Contrib @@ -56,9 +57,8 @@ Hostname IPv IntN Integrations -invariants -JSONAsString JSONAsObject +JSONAsString JSONColumns JSONColumnsWithMetadata JSONCompact @@ -82,6 +82,7 @@ Jemalloc Jepsen KDevelop LGPL +LLDB LOCALTIME LOCALTIMESTAMP LibFuzzer @@ -104,10 +105,11 @@ NULLIF NVME NYPD NuRaft -ObjectId -Ok OLAP OLTP +ObjectId +Ok +OpenSSL OpenSUSE OpenStack OpenTelemetry @@ -128,10 +130,10 @@ PrettySpaceNoEscapes PrettySpaceNoEscapesMonoBlock Protobuf ProtobufSingle +QEMU QTCreator QueryCacheHits QueryCacheMisses -QEMU RBAC RawBLOB RedHat @@ -178,14 +180,14 @@ Valgrind Vectorized VirtualBox Werror +WithNamesAndTypes Woboq WriteBuffer WriteBuffers -WithNamesAndTypes XCode YAML -Yasm YYYY +Yasm Zipkin ZooKeeper ZooKeeper's @@ -200,6 +202,7 @@ autostart avro avx aws +backend backoff backticks benchmarking @@ -309,6 +312,7 @@ instantiation integrational integrations interserver +invariants jdbc jemalloc json @@ -333,8 +337,8 @@ jsonstringseachrowwithprogress kafka kafkacat konsole -latencies laion +latencies lexicographically libFuzzer libc @@ -373,9 +377,10 @@ mutex mysql mysqldump mysqljs +natively noop -nullable nullability +nullable num obfuscator odbc @@ -395,6 +400,7 @@ postfix postfixes postgresql pre +preLaunchTask prebuild prebuilt preemptable @@ -532,6 +538,7 @@ xcode xml xz zLib +zLinux zkcopy zlib znodes From 1df592b06b3733f242b6a55eae8a293b8438eb50 Mon Sep 17 00:00:00 2001 From: Boris Kuschel Date: Fri, 10 Mar 2023 13:04:32 -0500 Subject: [PATCH 682/841] Remove exclusion --- docs/en/development/build-cross-s390x.md | 2 +- utils/check-style/aspell-ignore/en/aspell-dict.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/en/development/build-cross-s390x.md b/docs/en/development/build-cross-s390x.md index e02b22e6a42..1616fde3611 100644 --- a/docs/en/development/build-cross-s390x.md +++ b/docs/en/development/build-cross-s390x.md @@ -120,4 +120,4 @@ Process 1 stopped ] } ``` -- Make sure to run the clickhouse executable in debug mode prior to launch. (It is possible to create a preLaunchTask that automates this) \ No newline at end of file +- Make sure to run the clickhouse executable in debug mode prior to launch. (It is possible to create a `preLaunchTask` that automates this) \ No newline at end of file diff --git a/utils/check-style/aspell-ignore/en/aspell-dict.txt b/utils/check-style/aspell-ignore/en/aspell-dict.txt index e2750622469..013e9b32fd4 100644 --- a/utils/check-style/aspell-ignore/en/aspell-dict.txt +++ b/utils/check-style/aspell-ignore/en/aspell-dict.txt @@ -400,7 +400,6 @@ postfix postfixes postgresql pre -preLaunchTask prebuild prebuilt preemptable From d2c28fb5554f70836d252e30d9a62800da132945 Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Fri, 10 Mar 2023 18:29:13 +0000 Subject: [PATCH 683/841] Apply settings for explain subquery as well. --- src/Interpreters/executeQuery.cpp | 13 ++++++++----- src/TableFunctions/TableFunctionExplain.cpp | 7 ++++++- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/Interpreters/executeQuery.cpp b/src/Interpreters/executeQuery.cpp index 104452d9cfd..bd5f55ede7e 100644 --- a/src/Interpreters/executeQuery.cpp +++ b/src/Interpreters/executeQuery.cpp @@ -620,6 +620,10 @@ static std::tuple executeQueryImpl( } } + bool can_use_query_cache = + settings.allow_experimental_query_cache && settings.use_query_cache + && !ast->as(); + if (!async_insert) { /// We need to start the (implicit) transaction before getting the interpreter as this will get links to the latest snapshots @@ -706,7 +710,7 @@ static std::tuple executeQueryImpl( auto query_cache = context->getQueryCache(); bool read_result_from_query_cache = false; /// a query must not read from *and* write to the query cache at the same time if (query_cache != nullptr - && (settings.allow_experimental_query_cache && settings.use_query_cache && settings.enable_reads_from_query_cache) + && (can_use_query_cache && settings.enable_reads_from_query_cache) && res.pipeline.pulling()) { QueryCache::Key key( @@ -727,7 +731,7 @@ static std::tuple executeQueryImpl( /// then add a processor on top of the pipeline which stores the result in the query cache. if (!read_result_from_query_cache && query_cache != nullptr - && settings.allow_experimental_query_cache && settings.use_query_cache && settings.enable_writes_to_query_cache + && can_use_query_cache && settings.enable_writes_to_query_cache && res.pipeline.pulling() && (!astContainsNonDeterministicFunctions(ast, context) || settings.query_cache_store_results_of_queries_with_nondeterministic_functions)) { @@ -895,8 +899,7 @@ static std::tuple executeQueryImpl( auto finish_callback = [elem, context, ast, - allow_experimental_query_cache = settings.allow_experimental_query_cache, - use_query_cache = settings.use_query_cache, + can_use_query_cache = can_use_query_cache, enable_writes_to_query_cache = settings.enable_writes_to_query_cache, query_cache_store_results_of_queries_with_nondeterministic_functions = settings.query_cache_store_results_of_queries_with_nondeterministic_functions, log_queries, @@ -913,7 +916,7 @@ static std::tuple executeQueryImpl( auto query_cache = context->getQueryCache(); if (query_cache != nullptr && pulling_pipeline - && allow_experimental_query_cache && use_query_cache && enable_writes_to_query_cache + && can_use_query_cache && enable_writes_to_query_cache && (!astContainsNonDeterministicFunctions(ast, context) || query_cache_store_results_of_queries_with_nondeterministic_functions)) { query_pipeline.finalizeWriteInQueryCache(); diff --git a/src/TableFunctions/TableFunctionExplain.cpp b/src/TableFunctions/TableFunctionExplain.cpp index 081aa4fc1dc..f93ae00cd7d 100644 --- a/src/TableFunctions/TableFunctionExplain.cpp +++ b/src/TableFunctions/TableFunctionExplain.cpp @@ -11,6 +11,8 @@ #include #include #include +#include +#include namespace DB { @@ -123,7 +125,10 @@ static Block executeMonoBlock(QueryPipeline & pipeline) StoragePtr TableFunctionExplain::executeImpl( const ASTPtr & /*ast_function*/, ContextPtr context, const std::string & table_name, ColumnsDescription /*cached_columns*/) const { - BlockIO blockio = getInterpreter(context).execute(); + /// To support settings inside explain subquery. + auto mutable_context = Context::createCopy(context); + InterpreterSetQuery::applySettingsFromQuery(query, mutable_context); + BlockIO blockio = getInterpreter(mutable_context).execute(); Block block = executeMonoBlock(blockio.pipeline); StorageID storage_id(getDatabaseName(), table_name); From f3189b89ee403653275d336d783d853e657a116f Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Fri, 10 Mar 2023 18:35:22 +0000 Subject: [PATCH 684/841] Update test. --- .../0_stateless/02226_analyzer_or_like_combine.reference | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/queries/0_stateless/02226_analyzer_or_like_combine.reference b/tests/queries/0_stateless/02226_analyzer_or_like_combine.reference index 6165079994f..baee970679a 100644 --- a/tests/queries/0_stateless/02226_analyzer_or_like_combine.reference +++ b/tests/queries/0_stateless/02226_analyzer_or_like_combine.reference @@ -77,17 +77,17 @@ SETTINGS optimize_or_like_chain = 1 SELECT materialize(\'Привет, World\') AS s1, materialize(\'Привет, World\') AS s2 -WHERE (s1 LIKE \'hell%\') OR (s2 ILIKE \'%привет%\') OR (s1 ILIKE \'world%\') +WHERE multiMatchAny(s1, [\'^hell\', \'(?i)^world\']) OR multiMatchAny(s2, [\'(?i)привет\']) SETTINGS optimize_or_like_chain = 1 SELECT materialize(\'Привет, World\') AS s1, materialize(\'Привет, World\') AS s2 -WHERE (s1 LIKE \'hell%\') OR (s2 ILIKE \'%привет%\') OR (s1 ILIKE \'world%\') +WHERE multiMatchAny(s1, [\'^hell\', \'(?i)^world\']) OR multiMatchAny(s2, [\'(?i)привет\']) SETTINGS optimize_or_like_chain = 1 SELECT materialize(\'Привет, World\') AS s1, materialize(\'Привет, World\') AS s2 -WHERE (s1 LIKE \'hell%\') OR (s2 ILIKE \'%привет%\') OR (s1 ILIKE \'world%\') +WHERE multiMatchAny(s1, [\'^hell\', \'(?i)^world\']) OR multiMatchAny(s2, [\'(?i)привет\']) SETTINGS optimize_or_like_chain = 1 SELECT materialize(\'Привет, World\') AS s1, From 348a40aa5d4cd56bcc7375c71531390bc5691dac Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Fri, 10 Mar 2023 10:54:46 +0000 Subject: [PATCH 685/841] Compile with C++23 --- CMakeLists.txt | 2 +- base/base/CMakeLists.txt | 4 ++++ .../Data/ODBC/include/Poco/Data/ODBC/Extractor.h | 2 +- base/poco/Foundation/src/Message.cpp | 3 +-- contrib/grpc-cmake/CMakeLists.txt | 3 +++ src/Common/LRUCachePolicy.h | 2 +- src/Functions/FunctionsStringSimilarity.cpp | 14 +++++++------- src/Functions/bitSlice.cpp | 6 +++--- src/IO/MemoryReadWriteBuffer.cpp | 2 +- .../Formats/Impl/PrettySpaceBlockOutputFormat.cpp | 4 ++-- src/Storages/StorageMerge.cpp | 2 +- 11 files changed, 25 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cbb666b81c3..296fb3de7a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -301,7 +301,7 @@ if (ENABLE_BUILD_PROFILING) endif () endif () -set (CMAKE_CXX_STANDARD 20) +set (CMAKE_CXX_STANDARD 23) set (CMAKE_CXX_EXTENSIONS ON) # Same as gnu++2a (ON) vs c++2a (OFF): https://cmake.org/cmake/help/latest/prop_tgt/CXX_EXTENSIONS.html set (CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/base/base/CMakeLists.txt b/base/base/CMakeLists.txt index 64785d575c5..8ab3c8a0711 100644 --- a/base/base/CMakeLists.txt +++ b/base/base/CMakeLists.txt @@ -2,6 +2,10 @@ if (USE_CLANG_TIDY) set (CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_PATH}") endif () +# TODO: Remove this. We like to compile with C++23 (set by top-level CMakeLists) but Clang crashes with our libcxx +# when instantiated from JSON.cpp. Try again when libcxx(abi) and Clang are upgraded to 16. +set (CMAKE_CXX_STANDARD 20) + set (SRCS argsToConfig.cpp coverage.cpp diff --git a/base/poco/Data/ODBC/include/Poco/Data/ODBC/Extractor.h b/base/poco/Data/ODBC/include/Poco/Data/ODBC/Extractor.h index 82e2f895638..3914f33df76 100644 --- a/base/poco/Data/ODBC/include/Poco/Data/ODBC/Extractor.h +++ b/base/poco/Data/ODBC/include/Poco/Data/ODBC/Extractor.h @@ -466,7 +466,7 @@ namespace Data bool extractManualImpl(std::size_t pos, T & val, SQLSMALLINT cType) { SQLRETURN rc = 0; - T value = (T)0; + T value; resizeLengths(pos); diff --git a/base/poco/Foundation/src/Message.cpp b/base/poco/Foundation/src/Message.cpp index 0dfe4323134..0c9a83e03ff 100644 --- a/base/poco/Foundation/src/Message.cpp +++ b/base/poco/Foundation/src/Message.cpp @@ -27,8 +27,7 @@ Message::Message(): _tid(0), _file(0), _line(0), - _pMap(0), - _fmt_str(0) + _pMap(0) { init(); } diff --git a/contrib/grpc-cmake/CMakeLists.txt b/contrib/grpc-cmake/CMakeLists.txt index b1ed7e464b6..b4cf0ad5e66 100644 --- a/contrib/grpc-cmake/CMakeLists.txt +++ b/contrib/grpc-cmake/CMakeLists.txt @@ -48,6 +48,9 @@ set(gRPC_ABSL_PROVIDER "clickhouse" CACHE STRING "" FORCE) # We don't want to build C# extensions. set(gRPC_BUILD_CSHARP_EXT OFF) +# TODO: Remove this. We generally like to compile with C++23 but grpc isn't ready yet. +set (CMAKE_CXX_STANDARD 20) + set(_gRPC_CARES_LIBRARIES ch_contrib::c-ares) set(gRPC_CARES_PROVIDER "clickhouse" CACHE STRING "" FORCE) add_subdirectory("${_gRPC_SOURCE_DIR}" "${_gRPC_BINARY_DIR}") diff --git a/src/Common/LRUCachePolicy.h b/src/Common/LRUCachePolicy.h index 3c069eb276b..b6c0ef0d3ef 100644 --- a/src/Common/LRUCachePolicy.h +++ b/src/Common/LRUCachePolicy.h @@ -31,7 +31,7 @@ public: * max_elements_size == 0 means no elements size restrictions. */ explicit LRUCachePolicy(size_t max_size_, size_t max_elements_size_ = 0, OnWeightLossFunction on_weight_loss_function_ = {}) - : max_size(std::max(static_cast(1), max_size_)), max_elements_size(max_elements_size_) + : max_size(std::max(1uz, max_size_)), max_elements_size(max_elements_size_) { Base::on_weight_loss_function = on_weight_loss_function_; } diff --git a/src/Functions/FunctionsStringSimilarity.cpp b/src/Functions/FunctionsStringSimilarity.cpp index 0cc0248baf4..faa01abb675 100644 --- a/src/Functions/FunctionsStringSimilarity.cpp +++ b/src/Functions/FunctionsStringSimilarity.cpp @@ -285,9 +285,9 @@ struct NgramDistanceImpl size_t first_size = dispatchSearcher(calculateHaystackStatsAndMetric, data.data(), data_size, common_stats.get(), distance, nullptr); /// For !symmetric version we should not use first_size. if constexpr (symmetric) - res = distance * 1.f / std::max(first_size + second_size, static_cast(1)); + res = distance * 1.f / std::max(first_size + second_size, 1uz); else - res = 1.f - distance * 1.f / std::max(second_size, static_cast(1)); + res = 1.f - distance * 1.f / std::max(second_size, 1uz); } else { @@ -353,9 +353,9 @@ struct NgramDistanceImpl /// For !symmetric version we should not use haystack_stats_size. if constexpr (symmetric) - res[i] = distance * 1.f / std::max(haystack_stats_size + needle_stats_size, static_cast(1)); + res[i] = distance * 1.f / std::max(haystack_stats_size + needle_stats_size, 1uz); else - res[i] = 1.f - distance * 1.f / std::max(needle_stats_size, static_cast(1)); + res[i] = 1.f - distance * 1.f / std::max(needle_stats_size, 1uz); } else { @@ -424,7 +424,7 @@ struct NgramDistanceImpl for (size_t j = 0; j < needle_stats_size; ++j) --common_stats[needle_ngram_storage[j]]; - res[i] = 1.f - distance * 1.f / std::max(needle_stats_size, static_cast(1)); + res[i] = 1.f - distance * 1.f / std::max(needle_stats_size, 1uz); } else { @@ -471,9 +471,9 @@ struct NgramDistanceImpl ngram_storage.get()); /// For !symmetric version we should not use haystack_stats_size. if constexpr (symmetric) - res[i] = distance * 1.f / std::max(haystack_stats_size + needle_stats_size, static_cast(1)); + res[i] = distance * 1.f / std::max(haystack_stats_size + needle_stats_size, 1uz); else - res[i] = 1.f - distance * 1.f / std::max(needle_stats_size, static_cast(1)); + res[i] = 1.f - distance * 1.f / std::max(needle_stats_size, 1uz); } else { diff --git a/src/Functions/bitSlice.cpp b/src/Functions/bitSlice.cpp index 9b0ee4d5f1e..e2b455846d8 100644 --- a/src/Functions/bitSlice.cpp +++ b/src/Functions/bitSlice.cpp @@ -291,7 +291,7 @@ public: ssize_t remain_byte = src.getElementSize() - offset_byte; if (length < 0) { - length_byte = std::max(remain_byte + (length / word_size), static_cast(0)); + length_byte = std::max(remain_byte + (length / word_size), 0z); over_bit = word_size + (length % word_size); if (length_byte == 1 && over_bit <= offset_bit) // begin and end are in same byte AND there are no gaps length_byte = 0; @@ -330,7 +330,7 @@ public: size_t size = src.getElementSize(); if (length < 0) { - length_byte = std::max(static_cast(offset_byte) + (length / word_size), static_cast(0)); + length_byte = std::max(static_cast(offset_byte) + (length / word_size), 0z); over_bit = word_size + (length % word_size); if (length_byte == 1 && over_bit <= offset_bit) // begin and end are in same byte AND there are no gaps length_byte = 0; @@ -395,7 +395,7 @@ public: } else { - length_byte = std::max(remain_byte + (static_cast(length) / word_size), static_cast(0)); + length_byte = std::max(remain_byte + (static_cast(length) / word_size), 0z); over_bit = word_size + (length % word_size); if (length_byte == 1 && over_bit <= offset_bit) // begin and end are in same byte AND there are no gaps length_byte = 0; diff --git a/src/IO/MemoryReadWriteBuffer.cpp b/src/IO/MemoryReadWriteBuffer.cpp index 8958390fe03..93ce5ce7ce9 100644 --- a/src/IO/MemoryReadWriteBuffer.cpp +++ b/src/IO/MemoryReadWriteBuffer.cpp @@ -106,7 +106,7 @@ void MemoryWriteBuffer::addChunk() } else { - next_chunk_size = std::max(static_cast(1), static_cast(chunk_tail->size() * growth_rate)); + next_chunk_size = std::max(1uz, static_cast(chunk_tail->size() * growth_rate)); next_chunk_size = std::min(next_chunk_size, max_chunk_size); } diff --git a/src/Processors/Formats/Impl/PrettySpaceBlockOutputFormat.cpp b/src/Processors/Formats/Impl/PrettySpaceBlockOutputFormat.cpp index 46d1872412c..0fb1a413a6c 100644 --- a/src/Processors/Formats/Impl/PrettySpaceBlockOutputFormat.cpp +++ b/src/Processors/Formats/Impl/PrettySpaceBlockOutputFormat.cpp @@ -45,7 +45,7 @@ void PrettySpaceBlockOutputFormat::writeChunk(const Chunk & chunk, PortKind port if (col.type->shouldAlignRightInPrettyFormats()) { - for (ssize_t k = 0; k < std::max(static_cast(0), static_cast(max_widths[i] - name_widths[i])); ++k) + for (ssize_t k = 0; k < std::max(0z, static_cast(max_widths[i] - name_widths[i])); ++k) writeChar(' ', out); if (format_settings.pretty.color) @@ -62,7 +62,7 @@ void PrettySpaceBlockOutputFormat::writeChunk(const Chunk & chunk, PortKind port if (format_settings.pretty.color) writeCString("\033[0m", out); - for (ssize_t k = 0; k < std::max(static_cast(0), static_cast(max_widths[i] - name_widths[i])); ++k) + for (ssize_t k = 0; k < std::max(0z, static_cast(max_widths[i] - name_widths[i])); ++k) writeChar(' ', out); } } diff --git a/src/Storages/StorageMerge.cpp b/src/Storages/StorageMerge.cpp index af5a32d47f7..0f7b47255f6 100644 --- a/src/Storages/StorageMerge.cpp +++ b/src/Storages/StorageMerge.cpp @@ -448,7 +448,7 @@ void ReadFromMerge::initializePipeline(QueryPipelineBuilder & pipeline, const Bu size_t current_need_streams = tables_count >= num_streams ? 1 : (num_streams / tables_count); size_t current_streams = std::min(current_need_streams, remaining_streams); remaining_streams -= current_streams; - current_streams = std::max(static_cast(1), current_streams); + current_streams = std::max(1uz, current_streams); const auto & storage = std::get<1>(table); From 2fc5864a11e808aa71e2bd2400ed01812471b7ec Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Fri, 10 Mar 2023 19:37:42 +0000 Subject: [PATCH 686/841] Fix aggregation-in-order with aliases. --- src/Processors/QueryPlan/Optimizations/optimizeReadInOrder.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Processors/QueryPlan/Optimizations/optimizeReadInOrder.cpp b/src/Processors/QueryPlan/Optimizations/optimizeReadInOrder.cpp index 0874a3771ae..9407504579b 100644 --- a/src/Processors/QueryPlan/Optimizations/optimizeReadInOrder.cpp +++ b/src/Processors/QueryPlan/Optimizations/optimizeReadInOrder.cpp @@ -519,8 +519,9 @@ AggregationInputOrder buildInputOrderInfo( enreachFixedColumns(sorting_key_dag, fixed_key_columns); - for (auto it = matches.cbegin(); it != matches.cend(); ++it) + for (const auto * output : dag->getOutputs()) { + auto it = matches.find(output); const MatchedTrees::Match * match = &it->second; if (match->node) { From 3e7510a584fdd5d5e46e4020ecb1856cfb3710fe Mon Sep 17 00:00:00 2001 From: vdimir Date: Fri, 10 Mar 2023 19:56:53 +0000 Subject: [PATCH 687/841] Fix 01429_join_on_error_messages --- tests/queries/0_stateless/01429_join_on_error_messages.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/queries/0_stateless/01429_join_on_error_messages.sql b/tests/queries/0_stateless/01429_join_on_error_messages.sql index 9b8688c8415..23aed83a66f 100644 --- a/tests/queries/0_stateless/01429_join_on_error_messages.sql +++ b/tests/queries/0_stateless/01429_join_on_error_messages.sql @@ -15,7 +15,7 @@ SET join_algorithm = 'partial_merge'; SELECT 1 FROM (select 1 a) A JOIN (select 1 b, 1 c) B ON a = b OR a = c; -- { serverError 48 } -- works for a = b OR a = b because of equivalent disjunct optimization -SET join_algorithm = 'auto'; +SET join_algorithm = 'grace_hash'; SELECT 1 FROM (select 1 a) A JOIN (select 1 b, 1 c) B ON a = b OR a = c; -- { serverError 48 } -- works for a = b OR a = b because of equivalent disjunct optimization From aaecc233b23291745eea18bd9ce1e53b019c30dc Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Fri, 10 Mar 2023 20:14:35 +0000 Subject: [PATCH 688/841] Disable logical expression optimizer for expression with aliases. Never use it with optimize_min_equality_disjunction_chain_length=0 --- src/Interpreters/LogicalExpressionsOptimizer.cpp | 9 ++++++--- .../25340_logical_optimizer_alias_bug.reference | 1 + .../0_stateless/25340_logical_optimizer_alias_bug.sql | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 tests/queries/0_stateless/25340_logical_optimizer_alias_bug.reference create mode 100644 tests/queries/0_stateless/25340_logical_optimizer_alias_bug.sql diff --git a/src/Interpreters/LogicalExpressionsOptimizer.cpp b/src/Interpreters/LogicalExpressionsOptimizer.cpp index 02594269f08..df0623ffe0b 100644 --- a/src/Interpreters/LogicalExpressionsOptimizer.cpp +++ b/src/Interpreters/LogicalExpressionsOptimizer.cpp @@ -119,7 +119,7 @@ void LogicalExpressionsOptimizer::collectDisjunctiveEqualityChains() bool found_chain = false; auto * function = to_node->as(); - if (function && function->name == "or" && function->children.size() == 1) + if (function && function->alias.empty() && function->name == "or" && function->children.size() == 1) { const auto * expression_list = function->children[0]->as(); if (expression_list) @@ -128,14 +128,14 @@ void LogicalExpressionsOptimizer::collectDisjunctiveEqualityChains() for (const auto & child : expression_list->children) { auto * equals = child->as(); - if (equals && equals->name == "equals" && equals->children.size() == 1) + if (equals && equals->alias.empty() && equals->name == "equals" && equals->children.size() == 1) { const auto * equals_expression_list = equals->children[0]->as(); if (equals_expression_list && equals_expression_list->children.size() == 2) { /// Equality expr = xN. const auto * literal = equals_expression_list->children[1]->as(); - if (literal) + if (literal && literal->alias.empty()) { auto expr_lhs = equals_expression_list->children[0]->getTreeHash(); OrWithExpression or_with_expression{function, expr_lhs, function->tryGetAlias()}; @@ -230,6 +230,9 @@ bool LogicalExpressionsOptimizer::mayOptimizeDisjunctiveEqualityChain(const Disj const auto & equalities = chain.second; const auto & equality_functions = equalities.functions; + if (settings.optimize_min_equality_disjunction_chain_length == 0) + return false; + /// For LowCardinality column, the dict is usually smaller and the index is relatively large. /// In most cases, merging OR-chain as IN is better than converting each LowCardinality into full column individually. /// For non-LowCardinality, we need to eliminate too short chains. diff --git a/tests/queries/0_stateless/25340_logical_optimizer_alias_bug.reference b/tests/queries/0_stateless/25340_logical_optimizer_alias_bug.reference new file mode 100644 index 00000000000..573541ac970 --- /dev/null +++ b/tests/queries/0_stateless/25340_logical_optimizer_alias_bug.reference @@ -0,0 +1 @@ +0 diff --git a/tests/queries/0_stateless/25340_logical_optimizer_alias_bug.sql b/tests/queries/0_stateless/25340_logical_optimizer_alias_bug.sql new file mode 100644 index 00000000000..5b13eea5e4b --- /dev/null +++ b/tests/queries/0_stateless/25340_logical_optimizer_alias_bug.sql @@ -0,0 +1,2 @@ +create table test_local (id UInt32, path LowCardinality(String)) engine = MergeTree order by id; +WITH ((position(path, '/a') > 0) AND (NOT (position(path, 'a') > 0))) OR (path = '/b') OR (path = '/b/') as alias1 SELECT max(alias1) FROM remote('127.0.0.{1,2}', currentDatabase(), test_local) WHERE (id = 299386662); From 663b4fb4a82cdd8a3bc58b84ee7146414f3236f1 Mon Sep 17 00:00:00 2001 From: Boris Kuschel Date: Fri, 10 Mar 2023 15:20:57 -0500 Subject: [PATCH 689/841] Small tweaks --- docs/en/development/build-cross-s390x.md | 22 +++++++++---------- .../aspell-ignore/en/aspell-dict.txt | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/en/development/build-cross-s390x.md b/docs/en/development/build-cross-s390x.md index 1616fde3611..bfb94ef7ed0 100644 --- a/docs/en/development/build-cross-s390x.md +++ b/docs/en/development/build-cross-s390x.md @@ -11,26 +11,26 @@ As of writing (2023/3/10) building for s390x considered to be experimental. Not ## Building As s390x does not support boringssl, it uses OpenSSL and has two related build options. -- By default, the s390x build will dynamically link to OpenSSL libraries. It will build OpenSSL shared objects, so its not necessary to install OpenSSL beforehand. (This options is recommended in all cases.) -- Another option is to build OpenSSL in-tree. In this case two build options need to be supplied to cmake +- By default, the s390x build will dynamically link to OpenSSL libraries. It will build OpenSSL shared objects, so it's not necessary to install OpenSSL beforehand. (This option is recommended in all cases.) +- Another option is to build OpenSSL in-tree. In this case two build flags need to be supplied to cmake ```bash -DENABLE_OPENSSL_DYNAMIC=0 -DENABLE_OPENSSL=1 ``` -These instructions assume that the host machine is x86_64 and has all the tooling required to build natively based on the [Build instructions](../development/build.md). It also assumes that the host is Ubuntu 22.04 but should work on Ubuntu 20.04. +These instructions assume that the host machine is x86_64 and has all the tooling required to build natively based on the [build instructions](../development/build.md). It also assumes that the host is Ubuntu 22.04 but the following instructions should also work on Ubuntu 20.04. -In addition to installing the tooling used to build natively the following additional packages need to be installed: +In addition to installing the tooling used to build natively, the following additional packages need to be installed: ```bash apt-get install binutils-s390x-linux-gnu libc6-dev-s390x-cross gcc-s390x-linux-gnu binfmt-support qemu-user-static ``` -If you wish to cross compile rust code.. +If you wish to cross compile rust code install the rust cross compile target for s390x: ```bash rustup target add s390x-unknown-linux-gnu ``` -To build for s390x, +To build for s390x: ```bash cmake -DCMAKE_TOOLCHAIN_FILE=cmake/linux/toolchain-s390x.cmake .. ninja @@ -38,7 +38,7 @@ ninja ## Running -Once built, the binary can be run with: +Once built, the binary can be run with, eg.: ```bash qemu-s390x-static -L /usr/s390x-linux-gnu ./clickhouse @@ -52,7 +52,7 @@ Install LLDB: apt-get install lldb-15 ``` -To Debug a s390x executable run clickhouse using QEMU debug mode: +To Debug a s390x executable, run clickhouse using QEMU in debug mode: ```bash qemu-s390x-static -g 31338 -L /usr/s390x-linux-gnu ./clickhouse @@ -90,8 +90,8 @@ Process 1 stopped ## Visual Studio Code integration -- (CodeLLDB extension)[https://github.com/vadimcn/vscode-lldb] is required for visual debugging, (Command Variable)[https://github.com/rioj7/command-variable] extension can help dynamic launches if using cmake variants. -- Make sure to set the backend to your llvm installation ex. `"lldb.library": "/usr/lib/x86_64-linux-gnu/liblldb-15.so"` +- (CodeLLDB extension)[https://github.com/vadimcn/vscode-lldb] is required for visual debugging, the (Command Variable)[https://github.com/rioj7/command-variable] extension can help dynamic launches if using (cmake variants)[https://github.com/microsoft/vscode-cmake-tools/blob/main/docs/variants.md]. +- Make sure to set the backend to your llvm installation eg. `"lldb.library": "/usr/lib/x86_64-linux-gnu/liblldb-15.so"` - Launcher: ```json { @@ -120,4 +120,4 @@ Process 1 stopped ] } ``` -- Make sure to run the clickhouse executable in debug mode prior to launch. (It is possible to create a `preLaunchTask` that automates this) \ No newline at end of file +- Make sure to run the clickhouse executable in debug mode prior to launch. (It is also possible to create a `preLaunchTask` that automates this) \ No newline at end of file diff --git a/utils/check-style/aspell-ignore/en/aspell-dict.txt b/utils/check-style/aspell-ignore/en/aspell-dict.txt index 013e9b32fd4..f1bba4dc2fc 100644 --- a/utils/check-style/aspell-ignore/en/aspell-dict.txt +++ b/utils/check-style/aspell-ignore/en/aspell-dict.txt @@ -1,4 +1,4 @@ -personal_ws-1.1 en 544 +personal_ws-1.1 en 543 AArch ACLs AMQP From 86abe160fabb9ca09a1d7ae1d994aff38c277f04 Mon Sep 17 00:00:00 2001 From: robot-clickhouse Date: Fri, 10 Mar 2023 20:23:57 +0000 Subject: [PATCH 690/841] Update version_date.tsv and changelogs after v23.1.5.24-stable --- docs/changelogs/v23.1.5.24-stable.md | 28 ++++++++++++++++++++++++++++ utils/list-versions/version_date.tsv | 1 + 2 files changed, 29 insertions(+) create mode 100644 docs/changelogs/v23.1.5.24-stable.md diff --git a/docs/changelogs/v23.1.5.24-stable.md b/docs/changelogs/v23.1.5.24-stable.md new file mode 100644 index 00000000000..1c2c127a8c3 --- /dev/null +++ b/docs/changelogs/v23.1.5.24-stable.md @@ -0,0 +1,28 @@ +--- +sidebar_position: 1 +sidebar_label: 2023 +--- + +# 2023 Changelog + +### ClickHouse release v23.1.5.24-stable (0e51b53ba99) FIXME as compared to v23.1.4.58-stable (9ed562163a5) + +#### Build/Testing/Packaging Improvement +* Backported in [#47060](https://github.com/ClickHouse/ClickHouse/issues/47060): Fix error during server startup on old distros (e.g. Amazon Linux 2) and on ARM that glibc 2.28 symbols are not found. [#47008](https://github.com/ClickHouse/ClickHouse/pull/47008) ([Robert Schulze](https://github.com/rschu1ze)). + +#### Bug Fix (user-visible misbehavior in official stable or prestable release) + +* Backported in [#46401](https://github.com/ClickHouse/ClickHouse/issues/46401): Fix `SYSTEM UNFREEZE` queries failing with the exception `CANNOT_PARSE_INPUT_ASSERTION_FAILED`. [#46325](https://github.com/ClickHouse/ClickHouse/pull/46325) ([Aleksei Filatov](https://github.com/aalexfvk)). +* Backported in [#46905](https://github.com/ClickHouse/ClickHouse/issues/46905): - Fix incorrect alias recursion in QueryNormalizer. [#46609](https://github.com/ClickHouse/ClickHouse/pull/46609) ([Raúl Marín](https://github.com/Algunenano)). +* Backported in [#47211](https://github.com/ClickHouse/ClickHouse/issues/47211): `INSERT` queries through native TCP protocol and HTTP protocol were not canceled correctly in some cases. It could lead to a partially applied query if a client canceled the query, or if a client died or, in rare cases, on network errors. As a result, it could lead to not working deduplication. Fixes [#27667](https://github.com/ClickHouse/ClickHouse/issues/27667) and [#45377](https://github.com/ClickHouse/ClickHouse/issues/45377). [#46681](https://github.com/ClickHouse/ClickHouse/pull/46681) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Backported in [#47118](https://github.com/ClickHouse/ClickHouse/issues/47118): - Fix arithmetic operations in aggregate optimization with `min` and `max`. [#46705](https://github.com/ClickHouse/ClickHouse/pull/46705) ([Duc Canh Le](https://github.com/canhld94)). +* Backported in [#46883](https://github.com/ClickHouse/ClickHouse/issues/46883): Fix MSan report in the `maxIntersections` function. This closes [#43126](https://github.com/ClickHouse/ClickHouse/issues/43126). [#46847](https://github.com/ClickHouse/ClickHouse/pull/46847) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Backported in [#47361](https://github.com/ClickHouse/ClickHouse/issues/47361): Fix possible deadlock on distributed query cancellation. [#47161](https://github.com/ClickHouse/ClickHouse/pull/47161) ([Kruglov Pavel](https://github.com/Avogar)). + +#### NOT FOR CHANGELOG / INSIGNIFICANT + +* Use /etc/default/clickhouse in systemd too [#47003](https://github.com/ClickHouse/ClickHouse/pull/47003) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Update typing for a new PyGithub version [#47123](https://github.com/ClickHouse/ClickHouse/pull/47123) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Follow-up to [#46681](https://github.com/ClickHouse/ClickHouse/issues/46681) [#47284](https://github.com/ClickHouse/ClickHouse/pull/47284) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Add a manual trigger for release workflow [#47302](https://github.com/ClickHouse/ClickHouse/pull/47302) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). + diff --git a/utils/list-versions/version_date.tsv b/utils/list-versions/version_date.tsv index 50a9314bc00..515c4addf83 100644 --- a/utils/list-versions/version_date.tsv +++ b/utils/list-versions/version_date.tsv @@ -2,6 +2,7 @@ v23.2.4.12-stable 2023-03-10 v23.2.3.17-stable 2023-03-06 v23.2.2.20-stable 2023-03-01 v23.2.1.2537-stable 2023-02-23 +v23.1.5.24-stable 2023-03-10 v23.1.4.58-stable 2023-03-01 v23.1.3.5-stable 2023-02-03 v23.1.2.9-stable 2023-01-29 From 73119b920bf23a18f45e9987d60b868dc657bada Mon Sep 17 00:00:00 2001 From: Igor Nikonov Date: Fri, 10 Mar 2023 20:32:09 +0000 Subject: [PATCH 691/841] Remove distinct_columns --- src/Processors/QueryPlan/AggregatingStep.cpp | 1 - src/Processors/QueryPlan/ArrayJoinStep.cpp | 1 - .../CreateSetAndFilterOnTheFlyStep.cpp | 1 - src/Processors/QueryPlan/CreatingSetsStep.cpp | 1 - src/Processors/QueryPlan/CubeStep.cpp | 8 ---- src/Processors/QueryPlan/DistinctStep.cpp | 47 +++---------------- src/Processors/QueryPlan/ExpressionStep.cpp | 3 -- src/Processors/QueryPlan/ExtremesStep.cpp | 1 - src/Processors/QueryPlan/FillingStep.cpp | 1 - src/Processors/QueryPlan/FilterStep.cpp | 3 -- src/Processors/QueryPlan/IQueryPlanStep.h | 8 +--- .../QueryPlan/ITransformingStep.cpp | 18 ------- src/Processors/QueryPlan/ITransformingStep.h | 10 ---- src/Processors/QueryPlan/JoinStep.cpp | 1 - src/Processors/QueryPlan/LimitByStep.cpp | 1 - src/Processors/QueryPlan/LimitStep.cpp | 1 - .../QueryPlan/MergingAggregatedStep.cpp | 9 ---- src/Processors/QueryPlan/OffsetStep.cpp | 1 - src/Processors/QueryPlan/RollupStep.cpp | 8 ---- src/Processors/QueryPlan/SortingStep.cpp | 1 - src/Processors/QueryPlan/TotalsHavingStep.cpp | 1 - src/Processors/QueryPlan/WindowStep.cpp | 1 - 22 files changed, 7 insertions(+), 120 deletions(-) diff --git a/src/Processors/QueryPlan/AggregatingStep.cpp b/src/Processors/QueryPlan/AggregatingStep.cpp index 9bf351442b2..69dfa05899b 100644 --- a/src/Processors/QueryPlan/AggregatingStep.cpp +++ b/src/Processors/QueryPlan/AggregatingStep.cpp @@ -38,7 +38,6 @@ static ITransformingStep::Traits getTraits(bool should_produce_results_in_order_ return ITransformingStep::Traits { { - .preserves_distinct_columns = false, /// Actually, we may check that distinct names are in aggregation keys .returns_single_stream = should_produce_results_in_order_of_bucket_number, .preserves_number_of_streams = false, .preserves_sorting = false, diff --git a/src/Processors/QueryPlan/ArrayJoinStep.cpp b/src/Processors/QueryPlan/ArrayJoinStep.cpp index bd1908a4a6d..23a0a756f0d 100644 --- a/src/Processors/QueryPlan/ArrayJoinStep.cpp +++ b/src/Processors/QueryPlan/ArrayJoinStep.cpp @@ -14,7 +14,6 @@ static ITransformingStep::Traits getTraits() return ITransformingStep::Traits { { - .preserves_distinct_columns = false, .returns_single_stream = false, .preserves_number_of_streams = true, .preserves_sorting = false, diff --git a/src/Processors/QueryPlan/CreateSetAndFilterOnTheFlyStep.cpp b/src/Processors/QueryPlan/CreateSetAndFilterOnTheFlyStep.cpp index 53dcec9ef0a..07137e87736 100644 --- a/src/Processors/QueryPlan/CreateSetAndFilterOnTheFlyStep.cpp +++ b/src/Processors/QueryPlan/CreateSetAndFilterOnTheFlyStep.cpp @@ -40,7 +40,6 @@ static ITransformingStep::Traits getTraits() return ITransformingStep::Traits { { - .preserves_distinct_columns = true, .returns_single_stream = false, .preserves_number_of_streams = true, .preserves_sorting = true, diff --git a/src/Processors/QueryPlan/CreatingSetsStep.cpp b/src/Processors/QueryPlan/CreatingSetsStep.cpp index 23e0a17a31b..b696b77ccfe 100644 --- a/src/Processors/QueryPlan/CreatingSetsStep.cpp +++ b/src/Processors/QueryPlan/CreatingSetsStep.cpp @@ -21,7 +21,6 @@ static ITransformingStep::Traits getTraits() return ITransformingStep::Traits { { - .preserves_distinct_columns = true, .returns_single_stream = false, .preserves_number_of_streams = true, .preserves_sorting = true, diff --git a/src/Processors/QueryPlan/CubeStep.cpp b/src/Processors/QueryPlan/CubeStep.cpp index 03f952ac782..0c632c346c7 100644 --- a/src/Processors/QueryPlan/CubeStep.cpp +++ b/src/Processors/QueryPlan/CubeStep.cpp @@ -14,7 +14,6 @@ static ITransformingStep::Traits getTraits() return ITransformingStep::Traits { { - .preserves_distinct_columns = false, .returns_single_stream = true, .preserves_number_of_streams = false, .preserves_sorting = false, @@ -32,9 +31,6 @@ CubeStep::CubeStep(const DataStream & input_stream_, Aggregator::Params params_, , final(final_) , use_nulls(use_nulls_) { - /// Aggregation keys are distinct - for (const auto & key : params.keys) - output_stream->distinct_columns.insert(key); } ProcessorPtr addGroupingSetForTotals(const Block & header, const Names & keys, bool use_nulls, const BuildQueryPipelineSettings & settings, UInt64 grouping_set_number) @@ -89,9 +85,5 @@ void CubeStep::updateOutputStream() { output_stream = createOutputStream( input_streams.front(), generateOutputHeader(params.getHeader(input_streams.front().header, final), params.keys, use_nulls), getDataStreamTraits()); - - /// Aggregation keys are distinct - for (const auto & key : params.keys) - output_stream->distinct_columns.insert(key); } } diff --git a/src/Processors/QueryPlan/DistinctStep.cpp b/src/Processors/QueryPlan/DistinctStep.cpp index 323ef0bbdab..15ed02b700e 100644 --- a/src/Processors/QueryPlan/DistinctStep.cpp +++ b/src/Processors/QueryPlan/DistinctStep.cpp @@ -10,28 +10,13 @@ namespace DB { -static bool checkColumnsAlreadyDistinct(const Names & columns, const NameSet & distinct_names) -{ - if (distinct_names.empty()) - return false; - - /// Now we need to check that distinct_names is a subset of columns. - std::unordered_set columns_set(columns.begin(), columns.end()); - for (const auto & name : distinct_names) - if (!columns_set.contains(name)) - return false; - - return true; -} - -static ITransformingStep::Traits getTraits(bool pre_distinct, bool already_distinct_columns) +static ITransformingStep::Traits getTraits(bool pre_distinct) { return ITransformingStep::Traits { { - .preserves_distinct_columns = already_distinct_columns, /// Will be calculated separately otherwise - .returns_single_stream = !pre_distinct && !already_distinct_columns, - .preserves_number_of_streams = pre_distinct || already_distinct_columns, + .returns_single_stream = !pre_distinct, + .preserves_number_of_streams = pre_distinct, .preserves_sorting = true, /// Sorting is preserved indeed because of implementation. }, { @@ -62,34 +47,23 @@ DistinctStep::DistinctStep( : ITransformingStep( input_stream_, input_stream_.header, - getTraits(pre_distinct_, checkColumnsAlreadyDistinct(columns_, input_stream_.distinct_columns))) + getTraits(pre_distinct_)) , set_size_limits(set_size_limits_) , limit_hint(limit_hint_) , columns(columns_) , pre_distinct(pre_distinct_) , optimize_distinct_in_order(optimize_distinct_in_order_) { - if (!output_stream->distinct_columns.empty() /// Columns already distinct, do nothing - && (!pre_distinct /// Main distinct - || input_stream_.has_single_port)) /// pre_distinct for single port works as usual one - { - /// Build distinct set. - for (const auto & name : columns) - output_stream->distinct_columns.insert(name); - } } void DistinctStep::transformPipeline(QueryPipelineBuilder & pipeline, const BuildQueryPipelineSettings &) { - const auto & input_stream = input_streams.back(); - if (checkColumnsAlreadyDistinct(columns, input_stream.distinct_columns)) - return; - if (!pre_distinct) pipeline.resize(1); if (optimize_distinct_in_order) { + const auto & input_stream = input_streams.back(); const SortDescription distinct_sort_desc = getSortDescription(input_stream.sort_description, columns); if (!distinct_sort_desc.empty()) { @@ -197,16 +171,7 @@ void DistinctStep::updateOutputStream() output_stream = createOutputStream( input_streams.front(), input_streams.front().header, - getTraits(pre_distinct, checkColumnsAlreadyDistinct(columns, input_streams.front().distinct_columns)).data_stream_traits); - - if (!output_stream->distinct_columns.empty() /// Columns already distinct, do nothing - && (!pre_distinct /// Main distinct - || input_streams.front().has_single_port)) /// pre_distinct for single port works as usual one - { - /// Build distinct set. - for (const auto & name : columns) - output_stream->distinct_columns.insert(name); - } + getTraits(pre_distinct).data_stream_traits); } } diff --git a/src/Processors/QueryPlan/ExpressionStep.cpp b/src/Processors/QueryPlan/ExpressionStep.cpp index dcfa6e5a891..2a5c5fea71b 100644 --- a/src/Processors/QueryPlan/ExpressionStep.cpp +++ b/src/Processors/QueryPlan/ExpressionStep.cpp @@ -15,7 +15,6 @@ static ITransformingStep::Traits getTraits(const ActionsDAGPtr & actions, const return ITransformingStep::Traits { { - .preserves_distinct_columns = !actions->hasArrayJoin(), .returns_single_stream = false, .preserves_number_of_streams = true, .preserves_sorting = actions->isSortingPreserved(header, sort_description), @@ -33,8 +32,6 @@ ExpressionStep::ExpressionStep(const DataStream & input_stream_, const ActionsDA getTraits(actions_dag_, input_stream_.header, input_stream_.sort_description)) , actions_dag(actions_dag_) { - /// Some columns may be removed by expression. - updateDistinctColumns(output_stream->header, output_stream->distinct_columns); } void ExpressionStep::transformPipeline(QueryPipelineBuilder & pipeline, const BuildQueryPipelineSettings & settings) diff --git a/src/Processors/QueryPlan/ExtremesStep.cpp b/src/Processors/QueryPlan/ExtremesStep.cpp index 4524b9883d6..010a82072cf 100644 --- a/src/Processors/QueryPlan/ExtremesStep.cpp +++ b/src/Processors/QueryPlan/ExtremesStep.cpp @@ -9,7 +9,6 @@ static ITransformingStep::Traits getTraits() return ITransformingStep::Traits { { - .preserves_distinct_columns = true, .returns_single_stream = false, .preserves_number_of_streams = true, .preserves_sorting = true, diff --git a/src/Processors/QueryPlan/FillingStep.cpp b/src/Processors/QueryPlan/FillingStep.cpp index dde3bdbf850..dcde6653674 100644 --- a/src/Processors/QueryPlan/FillingStep.cpp +++ b/src/Processors/QueryPlan/FillingStep.cpp @@ -17,7 +17,6 @@ static ITransformingStep::Traits getTraits() return ITransformingStep::Traits { { - .preserves_distinct_columns = false, /// TODO: it seem to actually be true. Check it later. .returns_single_stream = true, .preserves_number_of_streams = true, .preserves_sorting = true, diff --git a/src/Processors/QueryPlan/FilterStep.cpp b/src/Processors/QueryPlan/FilterStep.cpp index 4699a7c1908..389fd6a7322 100644 --- a/src/Processors/QueryPlan/FilterStep.cpp +++ b/src/Processors/QueryPlan/FilterStep.cpp @@ -23,7 +23,6 @@ static ITransformingStep::Traits getTraits(const ActionsDAGPtr & expression, con return ITransformingStep::Traits { { - .preserves_distinct_columns = !expression->hasArrayJoin(), /// I suppose it actually never happens .returns_single_stream = false, .preserves_number_of_streams = true, .preserves_sorting = preserves_sorting, @@ -51,8 +50,6 @@ FilterStep::FilterStep( , filter_column_name(std::move(filter_column_name_)) , remove_filter_column(remove_filter_column_) { - /// TODO: it would be easier to remove all expressions from filter step. It should only filter by column name. - updateDistinctColumns(output_stream->header, output_stream->distinct_columns); } void FilterStep::transformPipeline(QueryPipelineBuilder & pipeline, const BuildQueryPipelineSettings & settings) diff --git a/src/Processors/QueryPlan/IQueryPlanStep.h b/src/Processors/QueryPlan/IQueryPlanStep.h index 316ecff9c2e..a608c6f8058 100644 --- a/src/Processors/QueryPlan/IQueryPlanStep.h +++ b/src/Processors/QueryPlan/IQueryPlanStep.h @@ -23,11 +23,6 @@ class DataStream public: Block header; - /// Tuples with those columns are distinct. - /// It doesn't mean that columns are distinct separately. - /// Removing any column from this list breaks this invariant. - NameSet distinct_columns = {}; - /// QueryPipeline has single port. Totals or extremes ports are not counted. bool has_single_port = false; @@ -51,8 +46,7 @@ public: bool hasEqualPropertiesWith(const DataStream & other) const { - return distinct_columns == other.distinct_columns - && has_single_port == other.has_single_port + return has_single_port == other.has_single_port && sort_description == other.sort_description && (sort_description.empty() || sort_scope == other.sort_scope); } diff --git a/src/Processors/QueryPlan/ITransformingStep.cpp b/src/Processors/QueryPlan/ITransformingStep.cpp index 195fa9ad68c..9ecfdb0af22 100644 --- a/src/Processors/QueryPlan/ITransformingStep.cpp +++ b/src/Processors/QueryPlan/ITransformingStep.cpp @@ -20,9 +20,6 @@ DataStream ITransformingStep::createOutputStream( { DataStream output_stream{.header = std::move(output_header)}; - if (stream_traits.preserves_distinct_columns) - output_stream.distinct_columns = input_stream.distinct_columns; - output_stream.has_single_port = stream_traits.returns_single_stream || (input_stream.has_single_port && stream_traits.preserves_number_of_streams); @@ -50,21 +47,6 @@ QueryPipelineBuilderPtr ITransformingStep::updatePipeline(QueryPipelineBuilders return std::move(pipelines.front()); } -void ITransformingStep::updateDistinctColumns(const Block & res_header, NameSet & distinct_columns) -{ - if (distinct_columns.empty()) - return; - - for (const auto & column : distinct_columns) - { - if (!res_header.has(column)) - { - distinct_columns.clear(); - break; - } - } -} - void ITransformingStep::describePipeline(FormatSettings & settings) const { IQueryPlanStep::describePipeline(processors, settings); diff --git a/src/Processors/QueryPlan/ITransformingStep.h b/src/Processors/QueryPlan/ITransformingStep.h index 1513b4307f8..77de668fbdb 100644 --- a/src/Processors/QueryPlan/ITransformingStep.h +++ b/src/Processors/QueryPlan/ITransformingStep.h @@ -18,11 +18,6 @@ public: /// They are specified in constructor and cannot be changed. struct DataStreamTraits { - /// Keep distinct_columns unchanged. - /// Examples: true for LimitStep, false for ExpressionStep with ARRAY JOIN - /// It some columns may be removed from result header, call updateDistinctColumns - bool preserves_distinct_columns; - /// True if pipeline has single output port after this step. /// Examples: MergeSortingStep, AggregatingStep bool returns_single_stream; @@ -69,8 +64,6 @@ public: input_streams.emplace_back(std::move(input_stream)); updateOutputStream(); - - updateDistinctColumns(output_stream->header, output_stream->distinct_columns); } void describePipeline(FormatSettings & settings) const override; @@ -83,9 +76,6 @@ public: } protected: - /// Clear distinct_columns if res_header doesn't contain all of them. - static void updateDistinctColumns(const Block & res_header, NameSet & distinct_columns); - /// Create output stream from header and traits. static DataStream createOutputStream( const DataStream & input_stream, diff --git a/src/Processors/QueryPlan/JoinStep.cpp b/src/Processors/QueryPlan/JoinStep.cpp index 6e212a53bc6..2ff8f161e99 100644 --- a/src/Processors/QueryPlan/JoinStep.cpp +++ b/src/Processors/QueryPlan/JoinStep.cpp @@ -83,7 +83,6 @@ static ITransformingStep::Traits getStorageJoinTraits() return ITransformingStep::Traits { { - .preserves_distinct_columns = false, .returns_single_stream = false, .preserves_number_of_streams = true, .preserves_sorting = false, diff --git a/src/Processors/QueryPlan/LimitByStep.cpp b/src/Processors/QueryPlan/LimitByStep.cpp index 39086e995fc..8b4abecc12c 100644 --- a/src/Processors/QueryPlan/LimitByStep.cpp +++ b/src/Processors/QueryPlan/LimitByStep.cpp @@ -12,7 +12,6 @@ static ITransformingStep::Traits getTraits() return ITransformingStep::Traits { { - .preserves_distinct_columns = true, .returns_single_stream = true, .preserves_number_of_streams = false, .preserves_sorting = true, diff --git a/src/Processors/QueryPlan/LimitStep.cpp b/src/Processors/QueryPlan/LimitStep.cpp index 144ac16f0d5..5e5a7387832 100644 --- a/src/Processors/QueryPlan/LimitStep.cpp +++ b/src/Processors/QueryPlan/LimitStep.cpp @@ -12,7 +12,6 @@ static ITransformingStep::Traits getTraits() return ITransformingStep::Traits { { - .preserves_distinct_columns = true, .returns_single_stream = false, .preserves_number_of_streams = true, .preserves_sorting = true, diff --git a/src/Processors/QueryPlan/MergingAggregatedStep.cpp b/src/Processors/QueryPlan/MergingAggregatedStep.cpp index e4fc332a1fd..8b5f21442b1 100644 --- a/src/Processors/QueryPlan/MergingAggregatedStep.cpp +++ b/src/Processors/QueryPlan/MergingAggregatedStep.cpp @@ -24,7 +24,6 @@ static ITransformingStep::Traits getTraits(bool should_produce_results_in_order_ return ITransformingStep::Traits { { - .preserves_distinct_columns = false, .returns_single_stream = should_produce_results_in_order_of_bucket_number, .preserves_number_of_streams = false, .preserves_sorting = false, @@ -62,10 +61,6 @@ MergingAggregatedStep::MergingAggregatedStep( , should_produce_results_in_order_of_bucket_number(should_produce_results_in_order_of_bucket_number_) , memory_bound_merging_of_aggregation_results_enabled(memory_bound_merging_of_aggregation_results_enabled_) { - /// Aggregation keys are distinct - for (const auto & key : params.keys) - output_stream->distinct_columns.insert(key); - if (memoryBoundMergingWillBeUsed() && should_produce_results_in_order_of_bucket_number) { output_stream->sort_description = group_by_sort_description; @@ -157,10 +152,6 @@ void MergingAggregatedStep::describeActions(JSONBuilder::JSONMap & map) const void MergingAggregatedStep::updateOutputStream() { output_stream = createOutputStream(input_streams.front(), params.getHeader(input_streams.front().header, final), getDataStreamTraits()); - - /// Aggregation keys are distinct - for (const auto & key : params.keys) - output_stream->distinct_columns.insert(key); } bool MergingAggregatedStep::memoryBoundMergingWillBeUsed() const diff --git a/src/Processors/QueryPlan/OffsetStep.cpp b/src/Processors/QueryPlan/OffsetStep.cpp index e0c70ba2f28..4bbe81f9169 100644 --- a/src/Processors/QueryPlan/OffsetStep.cpp +++ b/src/Processors/QueryPlan/OffsetStep.cpp @@ -12,7 +12,6 @@ static ITransformingStep::Traits getTraits() return ITransformingStep::Traits { { - .preserves_distinct_columns = true, .returns_single_stream = false, .preserves_number_of_streams = true, .preserves_sorting = true, diff --git a/src/Processors/QueryPlan/RollupStep.cpp b/src/Processors/QueryPlan/RollupStep.cpp index 3305f24602f..136690ccfc0 100644 --- a/src/Processors/QueryPlan/RollupStep.cpp +++ b/src/Processors/QueryPlan/RollupStep.cpp @@ -11,7 +11,6 @@ static ITransformingStep::Traits getTraits() return ITransformingStep::Traits { { - .preserves_distinct_columns = false, .returns_single_stream = true, .preserves_number_of_streams = false, .preserves_sorting = false, @@ -29,9 +28,6 @@ RollupStep::RollupStep(const DataStream & input_stream_, Aggregator::Params para , final(final_) , use_nulls(use_nulls_) { - /// Aggregation keys are distinct - for (const auto & key : params.keys) - output_stream->distinct_columns.insert(key); } ProcessorPtr addGroupingSetForTotals(const Block & header, const Names & keys, bool use_nulls, const BuildQueryPipelineSettings & settings, UInt64 grouping_set_number); @@ -54,10 +50,6 @@ void RollupStep::updateOutputStream() { output_stream = createOutputStream( input_streams.front(), appendGroupingSetColumn(params.getHeader(input_streams.front().header, final)), getDataStreamTraits()); - - /// Aggregation keys are distinct - for (const auto & key : params.keys) - output_stream->distinct_columns.insert(key); } diff --git a/src/Processors/QueryPlan/SortingStep.cpp b/src/Processors/QueryPlan/SortingStep.cpp index 0308e320e3a..0ab8e091e05 100644 --- a/src/Processors/QueryPlan/SortingStep.cpp +++ b/src/Processors/QueryPlan/SortingStep.cpp @@ -45,7 +45,6 @@ static ITransformingStep::Traits getTraits(size_t limit) return ITransformingStep::Traits { { - .preserves_distinct_columns = true, .returns_single_stream = true, .preserves_number_of_streams = false, .preserves_sorting = false, diff --git a/src/Processors/QueryPlan/TotalsHavingStep.cpp b/src/Processors/QueryPlan/TotalsHavingStep.cpp index 63991655426..d1bd70fd0b2 100644 --- a/src/Processors/QueryPlan/TotalsHavingStep.cpp +++ b/src/Processors/QueryPlan/TotalsHavingStep.cpp @@ -14,7 +14,6 @@ static ITransformingStep::Traits getTraits(bool has_filter) return ITransformingStep::Traits { { - .preserves_distinct_columns = true, .returns_single_stream = true, .preserves_number_of_streams = false, .preserves_sorting = true, diff --git a/src/Processors/QueryPlan/WindowStep.cpp b/src/Processors/QueryPlan/WindowStep.cpp index 92e9948c4c7..d313b210854 100644 --- a/src/Processors/QueryPlan/WindowStep.cpp +++ b/src/Processors/QueryPlan/WindowStep.cpp @@ -15,7 +15,6 @@ static ITransformingStep::Traits getTraits() return ITransformingStep::Traits { { - .preserves_distinct_columns = true, .returns_single_stream = false, .preserves_number_of_streams = true, .preserves_sorting = true, From 927ba0001b988cb0d0465b9c4b2fd797c46b2f79 Mon Sep 17 00:00:00 2001 From: Konstantin Morozov Date: Fri, 10 Mar 2023 22:40:14 +0100 Subject: [PATCH 692/841] refactoring: update ref files --- .../01883_with_grouping_sets.reference | 3 +- .../02514_analyzer_drop_join_on.reference | 94 +++++++++---------- 2 files changed, 48 insertions(+), 49 deletions(-) diff --git a/tests/queries/0_stateless/01883_with_grouping_sets.reference b/tests/queries/0_stateless/01883_with_grouping_sets.reference index 8fae10a05a4..499e930541f 100644 --- a/tests/queries/0_stateless/01883_with_grouping_sets.reference +++ b/tests/queries/0_stateless/01883_with_grouping_sets.reference @@ -13,8 +13,7 @@ ExpressionTransform Copy 1 → 2 (Expression) ExpressionTransform - (ReadFromStorage) - Memory 0 → 1 + (ReadFromMemoryStorage) 1 0 1 4500 1 0 3 4700 1 0 5 4900 diff --git a/tests/queries/0_stateless/02514_analyzer_drop_join_on.reference b/tests/queries/0_stateless/02514_analyzer_drop_join_on.reference index 0f6fa7e2e66..8b4cafc3260 100644 --- a/tests/queries/0_stateless/02514_analyzer_drop_join_on.reference +++ b/tests/queries/0_stateless/02514_analyzer_drop_join_on.reference @@ -24,26 +24,26 @@ Header: count() UInt64 Header: default.a.a2_4 String default.b.b1_0 UInt64 Join (JOIN FillRightFirst) - Header: default.a.a2_4 String - default.a.a1_1 UInt64 + Header: default.a.a1_1 UInt64 + default.a.a2_4 String default.b.b1_0 UInt64 Expression ((JOIN actions + Change column names to column identifiers)) - Header: default.a.a2_4 String - default.a.a1_1 UInt64 - ReadFromStorage (Memory) - Header: a2 String - a1 UInt64 + Header: default.a.a1_1 UInt64 + default.a.a2_4 String + ReadFromMemoryStorage + Header: a1 UInt64 + a2 String Expression ((JOIN actions + Change column names to column identifiers)) Header: default.b.b1_0 UInt64 - ReadFromStorage (Memory) + ReadFromMemoryStorage Header: b1 UInt64 Expression ((JOIN actions + Change column names to column identifiers)) Header: default.c.c1_2 UInt64 - ReadFromStorage (Memory) + ReadFromMemoryStorage Header: c1 UInt64 Expression ((JOIN actions + Change column names to column identifiers)) Header: default.d.d1_3 UInt64 - ReadFromStorage (Memory) + ReadFromMemoryStorage Header: d1 UInt64 EXPLAIN PLAN header = 1 SELECT a.a2, d.d2 FROM a JOIN b USING (k) JOIN c USING (k) JOIN d USING (k) @@ -52,41 +52,41 @@ Expression ((Project names + (Projection + DROP unused columns after JOIN))) Header: a2 String d2 String Join (JOIN FillRightFirst) - Header: default.a.k_2 UInt64 - default.a.a2_0 String + Header: default.a.a2_0 String + default.a.k_2 UInt64 default.d.d2_1 String Expression (DROP unused columns after JOIN) - Header: default.a.k_2 UInt64 - default.a.a2_0 String + Header: default.a.a2_0 String + default.a.k_2 UInt64 Join (JOIN FillRightFirst) - Header: default.a.k_2 UInt64 - default.a.a2_0 String + Header: default.a.a2_0 String + default.a.k_2 UInt64 Expression (DROP unused columns after JOIN) - Header: default.a.k_2 UInt64 - default.a.a2_0 String + Header: default.a.a2_0 String + default.a.k_2 UInt64 Join (JOIN FillRightFirst) - Header: default.a.k_2 UInt64 - default.a.a2_0 String + Header: default.a.a2_0 String + default.a.k_2 UInt64 Expression (Change column names to column identifiers) - Header: default.a.k_2 UInt64 - default.a.a2_0 String - ReadFromStorage (Memory) - Header: k UInt64 - a2 String + Header: default.a.a2_0 String + default.a.k_2 UInt64 + ReadFromMemoryStorage + Header: a2 String + k UInt64 Expression (Change column names to column identifiers) Header: default.b.k_3 UInt64 - ReadFromStorage (Memory) + ReadFromMemoryStorage Header: k UInt64 Expression (Change column names to column identifiers) Header: default.c.k_4 UInt64 - ReadFromStorage (Memory) + ReadFromMemoryStorage Header: k UInt64 Expression (Change column names to column identifiers) - Header: default.d.k_5 UInt64 - default.d.d2_1 String - ReadFromStorage (Memory) - Header: k UInt64 - d2 String + Header: default.d.d2_1 String + default.d.k_5 UInt64 + ReadFromMemoryStorage + Header: d2 String + k UInt64 EXPLAIN PLAN header = 1 SELECT b.bx FROM a JOIN (SELECT b1, b2 || 'x' AS bx FROM b ) AS b ON b.b1 = a.a1 @@ -123,28 +123,28 @@ Header: bx String b.bx_0 String b.b1_1 UInt64 Join (JOIN FillRightFirst) - Header: default.a.a2_6 String - default.a.a1_2 UInt64 + Header: default.a.a1_2 UInt64 + default.a.a2_6 String b.bx_0 String b.b1_1 UInt64 Expression ((JOIN actions + Change column names to column identifiers)) - Header: default.a.a2_6 String - default.a.a1_2 UInt64 - ReadFromStorage (Memory) - Header: a2 String - a1 UInt64 + Header: default.a.a1_2 UInt64 + default.a.a2_6 String + ReadFromMemoryStorage + Header: a1 UInt64 + a2 String Expression ((JOIN actions + (Change column names to column identifiers + (Project names + (Projection + Change column names to column identifiers))))) Header: b.b1_1 UInt64 b.bx_0 String - ReadFromStorage (Memory) - Header: b2 String - b1 UInt64 + ReadFromMemoryStorage + Header: b1 UInt64 + b2 String Expression ((JOIN actions + Change column names to column identifiers)) - Header: default.c.c2_5 String - default.c.c1_3 UInt64 - ReadFromStorage (Memory) - Header: c2 String - c1 UInt64 + Header: default.c.c1_3 UInt64 + default.c.c2_5 String + ReadFromMemoryStorage + Header: c1 UInt64 + c2 String Expression ((JOIN actions + (Change column names to column identifiers + (Project names + (Projection + Change column names to column identifiers))))) Header: d.d1_4 UInt64 ReadFromStorage (SystemNumbers) From eab72044682457d7897438809277de7202c4a6fe Mon Sep 17 00:00:00 2001 From: robot-clickhouse Date: Fri, 10 Mar 2023 21:42:42 +0000 Subject: [PATCH 693/841] Update version_date.tsv and changelogs after v22.12.5.34-stable --- docs/changelogs/v22.12.5.34-stable.md | 29 +++++++++++++++++++++++++++ utils/list-versions/version_date.tsv | 1 + 2 files changed, 30 insertions(+) create mode 100644 docs/changelogs/v22.12.5.34-stable.md diff --git a/docs/changelogs/v22.12.5.34-stable.md b/docs/changelogs/v22.12.5.34-stable.md new file mode 100644 index 00000000000..95befaa88ff --- /dev/null +++ b/docs/changelogs/v22.12.5.34-stable.md @@ -0,0 +1,29 @@ +--- +sidebar_position: 1 +sidebar_label: 2023 +--- + +# 2023 Changelog + +### ClickHouse release v22.12.5.34-stable (b82d6401ca1) FIXME as compared to v22.12.4.76-stable (cb5772db805) + +#### Improvement +* Backported in [#46983](https://github.com/ClickHouse/ClickHouse/issues/46983): - Apply `ALTER TABLE table_name ON CLUSTER cluster MOVE PARTITION|PART partition_expr TO DISK|VOLUME 'disk_name'` to all replicas. Because `ALTER TABLE t MOVE` is not replicated. [#46402](https://github.com/ClickHouse/ClickHouse/pull/46402) ([lizhuoyu5](https://github.com/lzydmxy)). + +#### Bug Fix (user-visible misbehavior in official stable or prestable release) + +* Backported in [#45729](https://github.com/ClickHouse/ClickHouse/issues/45729): Fix key description when encountering duplicate primary keys. This can happen in projections. See [#45590](https://github.com/ClickHouse/ClickHouse/issues/45590) for details. [#45686](https://github.com/ClickHouse/ClickHouse/pull/45686) ([Amos Bird](https://github.com/amosbird)). +* Backported in [#46398](https://github.com/ClickHouse/ClickHouse/issues/46398): Fix `SYSTEM UNFREEZE` queries failing with the exception `CANNOT_PARSE_INPUT_ASSERTION_FAILED`. [#46325](https://github.com/ClickHouse/ClickHouse/pull/46325) ([Aleksei Filatov](https://github.com/aalexfvk)). +* Backported in [#46903](https://github.com/ClickHouse/ClickHouse/issues/46903): - Fix incorrect alias recursion in QueryNormalizer. [#46609](https://github.com/ClickHouse/ClickHouse/pull/46609) ([Raúl Marín](https://github.com/Algunenano)). +* Backported in [#47210](https://github.com/ClickHouse/ClickHouse/issues/47210): `INSERT` queries through native TCP protocol and HTTP protocol were not canceled correctly in some cases. It could lead to a partially applied query if a client canceled the query, or if a client died or, in rare cases, on network errors. As a result, it could lead to not working deduplication. Fixes [#27667](https://github.com/ClickHouse/ClickHouse/issues/27667) and [#45377](https://github.com/ClickHouse/ClickHouse/issues/45377). [#46681](https://github.com/ClickHouse/ClickHouse/pull/46681) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Backported in [#47157](https://github.com/ClickHouse/ClickHouse/issues/47157): - Fix arithmetic operations in aggregate optimization with `min` and `max`. [#46705](https://github.com/ClickHouse/ClickHouse/pull/46705) ([Duc Canh Le](https://github.com/canhld94)). +* Backported in [#46881](https://github.com/ClickHouse/ClickHouse/issues/46881): Fix MSan report in the `maxIntersections` function. This closes [#43126](https://github.com/ClickHouse/ClickHouse/issues/43126). [#46847](https://github.com/ClickHouse/ClickHouse/pull/46847) ([Alexey Milovidov](https://github.com/alexey-milovidov)). +* Backported in [#47359](https://github.com/ClickHouse/ClickHouse/issues/47359): Fix possible deadlock on distributed query cancellation. [#47161](https://github.com/ClickHouse/ClickHouse/pull/47161) ([Kruglov Pavel](https://github.com/Avogar)). + +#### NOT FOR CHANGELOG / INSIGNIFICANT + +* Use /etc/default/clickhouse in systemd too [#47003](https://github.com/ClickHouse/ClickHouse/pull/47003) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Update typing for a new PyGithub version [#47123](https://github.com/ClickHouse/ClickHouse/pull/47123) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Follow-up to [#46681](https://github.com/ClickHouse/ClickHouse/issues/46681) [#47284](https://github.com/ClickHouse/ClickHouse/pull/47284) ([Alexander Tokmakov](https://github.com/tavplubix)). +* Add a manual trigger for release workflow [#47302](https://github.com/ClickHouse/ClickHouse/pull/47302) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). + diff --git a/utils/list-versions/version_date.tsv b/utils/list-versions/version_date.tsv index 515c4addf83..9e99475523a 100644 --- a/utils/list-versions/version_date.tsv +++ b/utils/list-versions/version_date.tsv @@ -7,6 +7,7 @@ v23.1.4.58-stable 2023-03-01 v23.1.3.5-stable 2023-02-03 v23.1.2.9-stable 2023-01-29 v23.1.1.3077-stable 2023-01-25 +v22.12.5.34-stable 2023-03-10 v22.12.4.76-stable 2023-03-01 v22.12.3.5-stable 2023-01-10 v22.12.2.25-stable 2023-01-06 From 6e7ffd9a7baf5f588c9267ee9fbc12d4b8a983d9 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Sat, 11 Mar 2023 00:45:09 +0300 Subject: [PATCH 694/841] Update ReplicatedMergeTreeAttachThread.cpp --- src/Storages/MergeTree/ReplicatedMergeTreeAttachThread.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Storages/MergeTree/ReplicatedMergeTreeAttachThread.cpp b/src/Storages/MergeTree/ReplicatedMergeTreeAttachThread.cpp index 557123ddae2..c859c994818 100644 --- a/src/Storages/MergeTree/ReplicatedMergeTreeAttachThread.cpp +++ b/src/Storages/MergeTree/ReplicatedMergeTreeAttachThread.cpp @@ -60,11 +60,11 @@ void ReplicatedMergeTreeAttachThread::run() if (needs_retry) { - LOG_ERROR(log, "Initialization failed. Error: {}", e.message()); + LOG_ERROR(log, "Initialization failed. Error: {}", getCurrentExceptionMessage(/* with_stacktrace */ true)); } else { - LOG_ERROR(log, "Initialization failed, table will remain readonly. Error: {}", e.message()); + LOG_ERROR(log, "Initialization failed, table will remain readonly. Error: {}", getCurrentExceptionMessage(/* with_stacktrace */ true)); storage.initialization_done = true; } } From 96477e1ea51218a472458aae7bd4020a14334c5f Mon Sep 17 00:00:00 2001 From: robot-clickhouse Date: Fri, 10 Mar 2023 22:01:27 +0000 Subject: [PATCH 695/841] Update version_date.tsv and changelogs after v22.8.15.23-lts --- docs/changelogs/v22.8.15.23-lts.md | 28 ++++++++++++++++++++++++++++ utils/list-versions/version_date.tsv | 1 + 2 files changed, 29 insertions(+) create mode 100644 docs/changelogs/v22.8.15.23-lts.md diff --git a/docs/changelogs/v22.8.15.23-lts.md b/docs/changelogs/v22.8.15.23-lts.md new file mode 100644 index 00000000000..096a504c9c2 --- /dev/null +++ b/docs/changelogs/v22.8.15.23-lts.md @@ -0,0 +1,28 @@ +--- +sidebar_position: 1 +sidebar_label: 2023 +--- + +# 2023 Changelog + +### ClickHouse release v22.8.15.23-lts (d36fa168bbf) FIXME as compared to v22.8.14.53-lts (4ea67c40077) + +#### Improvement +* Backported in [#46981](https://github.com/ClickHouse/ClickHouse/issues/46981): - Apply `ALTER TABLE table_name ON CLUSTER cluster MOVE PARTITION|PART partition_expr TO DISK|VOLUME 'disk_name'` to all replicas. Because `ALTER TABLE t MOVE` is not replicated. [#46402](https://github.com/ClickHouse/ClickHouse/pull/46402) ([lizhuoyu5](https://github.com/lzydmxy)). + +#### Bug Fix +* Backported in [#47336](https://github.com/ClickHouse/ClickHouse/issues/47336): Sometimes after changing a role that could be not reflected on the access rights of a user who uses that role. This PR fixes that. [#46772](https://github.com/ClickHouse/ClickHouse/pull/46772) ([Vitaly Baranov](https://github.com/vitlibar)). + +#### Bug Fix (user-visible misbehavior in official stable or prestable release) + +* Backported in [#46901](https://github.com/ClickHouse/ClickHouse/issues/46901): - Fix incorrect alias recursion in QueryNormalizer. [#46609](https://github.com/ClickHouse/ClickHouse/pull/46609) ([Raúl Marín](https://github.com/Algunenano)). +* Backported in [#47156](https://github.com/ClickHouse/ClickHouse/issues/47156): - Fix arithmetic operations in aggregate optimization with `min` and `max`. [#46705](https://github.com/ClickHouse/ClickHouse/pull/46705) ([Duc Canh Le](https://github.com/canhld94)). +* Backported in [#46987](https://github.com/ClickHouse/ClickHouse/issues/46987): Fix result of LIKE predicates which translate to substring searches and contain quoted non-LIKE metacharacters. [#46875](https://github.com/ClickHouse/ClickHouse/pull/46875) ([Robert Schulze](https://github.com/rschu1ze)). +* Backported in [#47357](https://github.com/ClickHouse/ClickHouse/issues/47357): Fix possible deadlock on distributed query cancellation. [#47161](https://github.com/ClickHouse/ClickHouse/pull/47161) ([Kruglov Pavel](https://github.com/Avogar)). + +#### NOT FOR CHANGELOG / INSIGNIFICANT + +* Reduce updates of Mergeable Check [#46781](https://github.com/ClickHouse/ClickHouse/pull/46781) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Update typing for a new PyGithub version [#47123](https://github.com/ClickHouse/ClickHouse/pull/47123) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* Add a manual trigger for release workflow [#47302](https://github.com/ClickHouse/ClickHouse/pull/47302) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). + diff --git a/utils/list-versions/version_date.tsv b/utils/list-versions/version_date.tsv index 9e99475523a..c2d9781177d 100644 --- a/utils/list-versions/version_date.tsv +++ b/utils/list-versions/version_date.tsv @@ -32,6 +32,7 @@ v22.9.4.32-stable 2022-10-26 v22.9.3.18-stable 2022-09-30 v22.9.2.7-stable 2022-09-23 v22.9.1.2603-stable 2022-09-22 +v22.8.15.23-lts 2023-03-10 v22.8.14.53-lts 2023-02-27 v22.8.13.20-lts 2023-01-29 v22.8.12.45-lts 2023-01-10 From 4ae90304056de47447d881d7315179cc00870e73 Mon Sep 17 00:00:00 2001 From: Igor Nikonov Date: Fri, 10 Mar 2023 22:03:53 +0000 Subject: [PATCH 696/841] Check if aggregation keys form prefix in distinct columns --- .../Optimizations/removeRedundantDistinct.cpp | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/Processors/QueryPlan/Optimizations/removeRedundantDistinct.cpp b/src/Processors/QueryPlan/Optimizations/removeRedundantDistinct.cpp index bd46feeec60..3b66b93b72d 100644 --- a/src/Processors/QueryPlan/Optimizations/removeRedundantDistinct.cpp +++ b/src/Processors/QueryPlan/Optimizations/removeRedundantDistinct.cpp @@ -101,24 +101,29 @@ namespace logDebug("aggregation_keys", aggregation_keys); logDebug("aggregation_keys size", aggregation_keys.size()); logDebug("distinct_columns size", distinct_columns.size()); - if (aggregation_keys.size() != distinct_columns.size()) - return false; - /// compare columns of two DISTINCTs + std::set original_distinct_columns; for (const auto & column : distinct_columns) { logDebug("distinct column name", column); const auto * alias_node = getOriginalNodeForOutputAlias(path_actions, String(column)); if (!alias_node) { - logDebug("original name for alias is not found for", column); - return false; + logDebug("original name for alias is not found", column); + original_distinct_columns.insert(column); } - - logDebug("alias result name", alias_node->result_name); - if (std::find(cbegin(aggregation_keys), cend(aggregation_keys), alias_node->result_name) == aggregation_keys.cend()) + else { - logDebug("alias result name is not found in aggregation keys", alias_node->result_name); + logDebug("alias result name", alias_node->result_name); + original_distinct_columns.insert(alias_node->result_name); + } + } + /// if aggregation keys are part of distinct columns then rows already distinct + for(const auto & key : aggregation_keys) + { + if (!original_distinct_columns.contains(key)) + { + logDebug("aggregation key NOT found: {}", key); return false; } } From 542eb235613f653b0f1fa1535dc4f7fe535e23af Mon Sep 17 00:00:00 2001 From: Ilya Yatsishin <2159081+qoega@users.noreply.github.com> Date: Fri, 10 Mar 2023 23:20:24 +0100 Subject: [PATCH 697/841] Update docs/en/operations/settings/settings.md --- docs/en/operations/settings/settings.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/operations/settings/settings.md b/docs/en/operations/settings/settings.md index d11869e1685..37c6841225b 100644 --- a/docs/en/operations/settings/settings.md +++ b/docs/en/operations/settings/settings.md @@ -1548,7 +1548,7 @@ Enables or disables asynchronous inserts. This makes sense only for insertion ov If enabled, the data is combined into batches before the insertion into tables, so it is possible to do small and frequent insertions into ClickHouse (up to 15000 queries per second) without buffer tables. -The data is inserted either after the [async_insert_max_data_size](#async-insert-max-data-size) is exceeded or after [async_insert_busy_timeout_ms](#async-insert-busy-timeout-ms) milliseconds since the first `INSERT` query. If the [async_insert_stale_timeout_ms](#async-insert-stale-timeout-ms) is set to a non-zero value, the data is inserted after `async_insert_stale_timeout_ms` milliseconds since the last query. Also the buffer will be flushed to disk if at least [async_insert_max_query_number](#async-insert-max-query-number) async insert queries per block were received.This last setting takes effect only if [async_insert_deduplicate](#async-insert-deduplicate) is enabled. +The data is inserted either after the [async_insert_max_data_size](#async-insert-max-data-size) is exceeded or after [async_insert_busy_timeout_ms](#async-insert-busy-timeout-ms) milliseconds since the first `INSERT` query. If the [async_insert_stale_timeout_ms](#async-insert-stale-timeout-ms) is set to a non-zero value, the data is inserted after `async_insert_stale_timeout_ms` milliseconds since the last query. Also the buffer will be flushed to disk if at least [async_insert_max_query_number](#async-insert-max-query-number) async insert queries per block were received. This last setting takes effect only if [async_insert_deduplicate](#async-insert-deduplicate) is enabled. If [wait_for_async_insert](#wait-for-async-insert) is enabled, every client will wait for the data to be processed and flushed to the table. Otherwise, the query would be processed almost instantly, even if the data is not inserted. From a5c8f23f69adbad74b0eca35777f775daac24737 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Fri, 10 Mar 2023 23:33:56 +0100 Subject: [PATCH 698/841] Remove a feature --- src/Interpreters/InterpreterExplainQuery.cpp | 5 +- src/QueryPipeline/printPipeline.cpp | 177 ------------------- src/QueryPipeline/printPipeline.h | 7 - 3 files changed, 1 insertion(+), 188 deletions(-) delete mode 100644 src/QueryPipeline/printPipeline.cpp diff --git a/src/Interpreters/InterpreterExplainQuery.cpp b/src/Interpreters/InterpreterExplainQuery.cpp index 3c225522cc4..b2172a07e91 100644 --- a/src/Interpreters/InterpreterExplainQuery.cpp +++ b/src/Interpreters/InterpreterExplainQuery.cpp @@ -504,10 +504,7 @@ QueryPipeline InterpreterExplainQuery::executeImpl() auto pipe = QueryPipelineBuilder::getPipe(std::move(*pipeline), resources); const auto & processors = pipe.getProcessors(); - if (settings.compact) - printPipelineCompact(processors, buf, settings.query_pipeline_options.header); - else - printPipeline(processors, buf); + printPipeline(processors, buf); } else { diff --git a/src/QueryPipeline/printPipeline.cpp b/src/QueryPipeline/printPipeline.cpp deleted file mode 100644 index 40c88502ed0..00000000000 --- a/src/QueryPipeline/printPipeline.cpp +++ /dev/null @@ -1,177 +0,0 @@ -#include -#include -#include -#include - -namespace DB -{ - -void printPipelineCompact(const Processors & processors, WriteBuffer & out, bool with_header) -{ - struct Node; - - /// Group by processors name, QueryPlanStep and group in this step. - struct Key - { - size_t group; - IQueryPlanStep * step; - std::string name; - - auto getTuple() const { return std::forward_as_tuple(group, step, name); } - - bool operator<(const Key & other) const - { - return getTuple() < other.getTuple(); - } - }; - - /// Group ports by header. - struct EdgeData - { - Block header; - size_t count; - }; - - using Edge = std::vector; - - struct Node - { - size_t id = 0; - std::map edges = {}; - std::vector agents = {}; - }; - - std::map graph; - - auto get_key = [](const IProcessor & processor) - { - return Key{processor.getQueryPlanStepGroup(), processor.getQueryPlanStep(), processor.getName()}; - }; - - /// Fill nodes. - for (const auto & processor : processors) - { - auto res = graph.emplace(get_key(*processor), Node()); - auto & node = res.first->second; - node.agents.emplace_back(processor.get()); - - if (res.second) - node.id = graph.size(); - } - - Block empty_header; - - /// Fill edges. - for (const auto & processor : processors) - { - auto & from = graph[get_key(*processor)]; - - for (auto & port : processor->getOutputs()) - { - if (!port.isConnected()) - continue; - - auto & to = graph[get_key(port.getInputPort().getProcessor())]; - auto & edge = from.edges[&to]; - - /// Use empty header for each edge if with_header is false. - const auto & header = with_header ? port.getHeader() - : empty_header; - - /// Group by header. - bool found = false; - for (auto & item : edge) - { - if (blocksHaveEqualStructure(header, item.header)) - { - found = true; - ++item.count; - break; - } - } - - if (!found) - edge.emplace_back(EdgeData{header, 1}); - } - } - - /// Group processors by it's QueryPlanStep. - std::map> steps_map; - - for (const auto & item : graph) - steps_map[item.first.step].emplace_back(&item.second); - - out << "digraph\n{\n"; - out << " rankdir=\"LR\";\n"; - out << " { node [shape = rect]\n"; - - /// Nodes // TODO quoting and escaping - size_t next_step = 0; - for (const auto & item : steps_map) - { - /// Use separate clusters for each step. - if (item.first != nullptr) - { - out << " subgraph cluster_" << next_step << " {\n"; - out << " label =\"" << item.first->getName() << "\";\n"; - out << " style=filled;\n"; - out << " color=lightgrey;\n"; - out << " node [style=filled,color=white];\n"; - out << " { rank = same;\n"; - - ++next_step; - } - - for (const auto & node : item.second) - { - const auto & processor = node->agents.front(); - out << " n" << node->id << " [label=\"" << processor->getName(); - - if (node->agents.size() > 1) - out << " × " << node->agents.size(); - - const auto & description = processor->getDescription(); - if (!description.empty()) - out << ' ' << description; - - out << "\"];\n"; - } - - if (item.first != nullptr) - { - out << " }\n"; - out << " }\n"; - } - } - - out << " }\n"; - - /// Edges - for (const auto & item : graph) - { - for (const auto & edge : item.second.edges) - { - for (const auto & data : edge.second) - { - out << " n" << item.second.id << " -> " << "n" << edge.first->id << " [label=\""; - - if (data.count > 1) - out << "× " << data.count; - - if (with_header) - { - for (const auto & elem : data.header) - { - out << "\n"; - elem.dumpStructure(out); - } - } - - out << "\"];\n"; - } - } - } - out << "}\n"; -} - -} diff --git a/src/QueryPipeline/printPipeline.h b/src/QueryPipeline/printPipeline.h index 76143211875..ff3b53300ce 100644 --- a/src/QueryPipeline/printPipeline.h +++ b/src/QueryPipeline/printPipeline.h @@ -10,7 +10,6 @@ namespace DB * You can render it with: * dot -T png < pipeline.dot > pipeline.png */ - template void printPipeline(const Processors & processors, const Statuses & statuses, WriteBuffer & out) { @@ -65,10 +64,4 @@ void printPipeline(const Processors & processors, WriteBuffer & out) printPipeline(processors, std::vector(), out); } -/// Prints pipeline in compact representation. -/// Group processors by it's name, QueryPlanStep and QueryPlanStepGroup. -/// If QueryPlanStep wasn't set for processor, representation may be not correct. -/// If with_header is set, prints block header for each edge. -void printPipelineCompact(const Processors & processors, WriteBuffer & out, bool with_header); - } From eead7fcbac86d6d7736aaac7214f68a404ec62f2 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 11 Mar 2023 02:24:07 +0100 Subject: [PATCH 699/841] Fix error in `decodeURLComponent` --- src/Functions/URL/decodeURLComponent.cpp | 25 +++++++++++++------ .../02677_decode_url_component.reference | 2 ++ .../02677_decode_url_component.sql | 5 ++++ 3 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 tests/queries/0_stateless/02677_decode_url_component.reference create mode 100644 tests/queries/0_stateless/02677_decode_url_component.sql diff --git a/src/Functions/URL/decodeURLComponent.cpp b/src/Functions/URL/decodeURLComponent.cpp index 7d98ccd63a0..05e3fbea3fd 100644 --- a/src/Functions/URL/decodeURLComponent.cpp +++ b/src/Functions/URL/decodeURLComponent.cpp @@ -14,28 +14,33 @@ namespace ErrorCodes static size_t encodeURL(const char * __restrict src, size_t src_size, char * __restrict dst, bool space_as_plus) { char * dst_pos = dst; - for (size_t i = 0; i < src_size; i++) + for (size_t i = 0; i < src_size; ++i) { if ((src[i] >= '0' && src[i] <= '9') || (src[i] >= 'a' && src[i] <= 'z') || (src[i] >= 'A' && src[i] <= 'Z') || src[i] == '-' || src[i] == '_' || src[i] == '.' || src[i] == '~') { - *dst_pos++ = src[i]; + *dst_pos = src[i]; + ++dst_pos; } else if (src[i] == ' ' && space_as_plus) { - *dst_pos++ = '+'; + *dst_pos = '+'; + ++dst_pos; } else { - *dst_pos++ = '%'; - *dst_pos++ = hexDigitUppercase(src[i] >> 4); - *dst_pos++ = hexDigitUppercase(src[i] & 0xf); + dst_pos[0] = '%'; + ++dst_pos; + writeHexByteUppercase(src[i], dst_pos); + dst_pos += 2; } } - *dst_pos++ = src[src_size]; + *dst_pos = 0; + ++dst_pos; return dst_pos - dst; } + /// We assume that size of the dst buf isn't less than src_size. static size_t decodeURL(const char * __restrict src, size_t src_size, char * __restrict dst, bool plus_as_space) { @@ -120,10 +125,14 @@ struct CodeURLComponentImpl ColumnString::Chars & res_data, ColumnString::Offsets & res_offsets) { if (code_strategy == encode) - //the destination(res_data) string is at most three times the length of the source string + { + /// the destination(res_data) string is at most three times the length of the source string res_data.resize(data.size() * 3); + } else + { res_data.resize(data.size()); + } size_t size = offsets.size(); res_offsets.resize(size); diff --git a/tests/queries/0_stateless/02677_decode_url_component.reference b/tests/queries/0_stateless/02677_decode_url_component.reference new file mode 100644 index 00000000000..5f88856dc1c --- /dev/null +++ b/tests/queries/0_stateless/02677_decode_url_component.reference @@ -0,0 +1,2 @@ +%D0%BA%D0%BB%D0%B8%D0%BA%D1%85%D0%B0%D1%83%D1%81 1 +1 diff --git a/tests/queries/0_stateless/02677_decode_url_component.sql b/tests/queries/0_stateless/02677_decode_url_component.sql new file mode 100644 index 00000000000..68345b5de16 --- /dev/null +++ b/tests/queries/0_stateless/02677_decode_url_component.sql @@ -0,0 +1,5 @@ +SELECT + encodeURLComponent('кликхаус') AS encoded, + decodeURLComponent(encoded) = 'кликхаус' AS expected_EQ; + +SELECT DISTINCT decodeURLComponent(encodeURLComponent(randomString(100) AS x)) = x FROM numbers(100000); From 2fbb3660de4682e29c4501a25bb250f463c5f04c Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 11 Mar 2023 03:32:05 +0100 Subject: [PATCH 700/841] Add a test --- .../0_stateless/02678_explain_pipeline_graph.reference | 0 tests/queries/0_stateless/02678_explain_pipeline_graph.sql | 7 +++++++ 2 files changed, 7 insertions(+) create mode 100644 tests/queries/0_stateless/02678_explain_pipeline_graph.reference create mode 100644 tests/queries/0_stateless/02678_explain_pipeline_graph.sql diff --git a/tests/queries/0_stateless/02678_explain_pipeline_graph.reference b/tests/queries/0_stateless/02678_explain_pipeline_graph.reference new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/queries/0_stateless/02678_explain_pipeline_graph.sql b/tests/queries/0_stateless/02678_explain_pipeline_graph.sql new file mode 100644 index 00000000000..48cfbf2b349 --- /dev/null +++ b/tests/queries/0_stateless/02678_explain_pipeline_graph.sql @@ -0,0 +1,7 @@ +-- The server does not crash after these queries: + +DROP TABLE IF EXISTS t1; +CREATE TABLE t1(ID UInt64, name String) engine=MergeTree order by ID; +insert into t1(ID, name) values (1, 'abc'), (2, 'bbb'); +explain pipeline graph=1 select count(ID) from t1 FORMAT Null; +DROP TABLE t1; From 04b1a0cb08d5a4d3d9bbcf9f5d210dc802b68314 Mon Sep 17 00:00:00 2001 From: Igor Nikonov Date: Sat, 11 Mar 2023 09:29:50 +0000 Subject: [PATCH 701/841] Fix style --- .../QueryPlan/Optimizations/removeRedundantDistinct.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Processors/QueryPlan/Optimizations/removeRedundantDistinct.cpp b/src/Processors/QueryPlan/Optimizations/removeRedundantDistinct.cpp index 3b66b93b72d..c9a0270f6e7 100644 --- a/src/Processors/QueryPlan/Optimizations/removeRedundantDistinct.cpp +++ b/src/Processors/QueryPlan/Optimizations/removeRedundantDistinct.cpp @@ -119,7 +119,7 @@ namespace } } /// if aggregation keys are part of distinct columns then rows already distinct - for(const auto & key : aggregation_keys) + for (const auto & key : aggregation_keys) { if (!original_distinct_columns.contains(key)) { From a762112e15a7d1bd3c3c6202e55c4bc37bd44b79 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Fri, 3 Mar 2023 17:01:50 +0100 Subject: [PATCH 702/841] Analyzer support distributed JOINS and subqueries in IN functions --- src/Analyzer/FunctionNode.cpp | 30 +- src/Analyzer/InDepthQueryTreeVisitor.h | 17 +- src/Analyzer/JoinNode.h | 6 + src/Analyzer/Passes/AutoFinalOnQueryPass.cpp | 2 +- src/Analyzer/Passes/QueryAnalysisPass.cpp | 5 +- src/Analyzer/Utils.cpp | 50 +++ src/Analyzer/Utils.h | 9 + src/Planner/PlannerContext.cpp | 2 +- src/Planner/PlannerContext.h | 24 +- src/Planner/PlannerJoinTree.cpp | 170 ++++++--- src/Planner/TableExpressionData.h | 11 + src/Planner/Utils.cpp | 34 ++ src/Planner/Utils.h | 5 + src/Storages/StorageDistributed.cpp | 355 +++++++++++++++++- src/Storages/StorageMergeTree.cpp | 9 +- src/Storages/StorageView.cpp | 2 +- .../0_stateless/00858_issue_4756.reference | 2 + .../queries/0_stateless/00858_issue_4756.sql | 20 +- .../02420_final_setting_analyzer.reference | 3 - .../02420_final_setting_analyzer.sql | 3 - 20 files changed, 657 insertions(+), 102 deletions(-) diff --git a/src/Analyzer/FunctionNode.cpp b/src/Analyzer/FunctionNode.cpp index 718dcf4bb58..68bdb0f9956 100644 --- a/src/Analyzer/FunctionNode.cpp +++ b/src/Analyzer/FunctionNode.cpp @@ -2,18 +2,21 @@ #include #include -#include -#include #include #include +#include +#include + #include #include #include +#include +#include #include namespace DB @@ -44,17 +47,28 @@ const DataTypes & FunctionNode::getArgumentTypes() const ColumnsWithTypeAndName FunctionNode::getArgumentColumns() const { const auto & arguments = getArguments().getNodes(); + size_t arguments_size = arguments.size(); + ColumnsWithTypeAndName argument_columns; argument_columns.reserve(arguments.size()); - for (const auto & arg : arguments) + for (size_t i = 0; i < arguments_size; ++i) { - ColumnWithTypeAndName argument; - argument.type = arg->getResultType(); - if (auto * constant = arg->as()) - argument.column = argument.type->createColumnConst(1, constant->getValue()); - argument_columns.push_back(std::move(argument)); + const auto & argument = arguments[i]; + + ColumnWithTypeAndName argument_column; + + if (isNameOfInFunction(function_name) && i == 1) + argument_column.type = std::make_shared(); + else + argument_column.type = argument->getResultType(); + + if (auto * constant = argument->as()) + argument_column.column = argument_column.type->createColumnConst(1, constant->getValue()); + + argument_columns.push_back(std::move(argument_column)); } + return argument_columns; } diff --git a/src/Analyzer/InDepthQueryTreeVisitor.h b/src/Analyzer/InDepthQueryTreeVisitor.h index af69fc55589..1cc48fb1e53 100644 --- a/src/Analyzer/InDepthQueryTreeVisitor.h +++ b/src/Analyzer/InDepthQueryTreeVisitor.h @@ -99,8 +99,9 @@ class InDepthQueryTreeVisitorWithContext public: using VisitQueryTreeNodeType = std::conditional_t; - explicit InDepthQueryTreeVisitorWithContext(ContextPtr context) + explicit InDepthQueryTreeVisitorWithContext(ContextPtr context, size_t initial_subquery_depth = 0) : current_context(std::move(context)) + , subquery_depth(initial_subquery_depth) {} /// Return true if visitor should traverse tree top to bottom, false otherwise @@ -125,11 +126,17 @@ public: return current_context->getSettingsRef(); } + size_t getSubqueryDepth() const + { + return subquery_depth; + } + void visit(VisitQueryTreeNodeType & query_tree_node) { auto current_scope_context_ptr = current_context; SCOPE_EXIT( current_context = std::move(current_scope_context_ptr); + --subquery_depth; ); if (auto * query_node = query_tree_node->template as()) @@ -137,6 +144,8 @@ public: else if (auto * union_node = query_tree_node->template as()) current_context = union_node->getContext(); + ++subquery_depth; + bool traverse_top_to_bottom = getDerived().shouldTraverseTopToBottom(); if (!traverse_top_to_bottom) visitChildren(query_tree_node); @@ -145,7 +154,12 @@ public: if (traverse_top_to_bottom) visitChildren(query_tree_node); + + getDerived().leaveImpl(query_tree_node); } + + void leaveImpl(VisitQueryTreeNodeType & node [[maybe_unused]]) + {} private: Derived & getDerived() { @@ -172,6 +186,7 @@ private: } ContextPtr current_context; + size_t subquery_depth = 0; }; template diff --git a/src/Analyzer/JoinNode.h b/src/Analyzer/JoinNode.h index 0d856985794..f58fe3f1af5 100644 --- a/src/Analyzer/JoinNode.h +++ b/src/Analyzer/JoinNode.h @@ -106,6 +106,12 @@ public: return locality; } + /// Set join locality + void setLocality(JoinLocality locality_value) + { + locality = locality_value; + } + /// Get join strictness JoinStrictness getStrictness() const { diff --git a/src/Analyzer/Passes/AutoFinalOnQueryPass.cpp b/src/Analyzer/Passes/AutoFinalOnQueryPass.cpp index fa5fc0e75a8..15326ca1dc8 100644 --- a/src/Analyzer/Passes/AutoFinalOnQueryPass.cpp +++ b/src/Analyzer/Passes/AutoFinalOnQueryPass.cpp @@ -42,7 +42,7 @@ private: return; const auto & storage = table_node ? table_node->getStorage() : table_function_node->getStorage(); - bool is_final_supported = storage && storage->supportsFinal() && !storage->isRemote(); + bool is_final_supported = storage && storage->supportsFinal(); if (!is_final_supported) return; diff --git a/src/Analyzer/Passes/QueryAnalysisPass.cpp b/src/Analyzer/Passes/QueryAnalysisPass.cpp index 34c03a9ffb6..5a726ab4bb5 100644 --- a/src/Analyzer/Passes/QueryAnalysisPass.cpp +++ b/src/Analyzer/Passes/QueryAnalysisPass.cpp @@ -2914,7 +2914,10 @@ QueryTreeNodePtr QueryAnalyzer::tryResolveIdentifierFromTableExpression(const Id break; IdentifierLookup column_identifier_lookup = {qualified_identifier_with_removed_part, IdentifierLookupContext::EXPRESSION}; - if (tryBindIdentifierToAliases(column_identifier_lookup, scope) || + if (tryBindIdentifierToAliases(column_identifier_lookup, scope)) + break; + + if (table_expression_data.should_qualify_columns && tryBindIdentifierToTableExpressions(column_identifier_lookup, table_expression_node, scope)) break; diff --git a/src/Analyzer/Utils.cpp b/src/Analyzer/Utils.cpp index c5a5c042cbc..5c1873bd6e4 100644 --- a/src/Analyzer/Utils.cpp +++ b/src/Analyzer/Utils.cpp @@ -79,6 +79,56 @@ bool isNameOfInFunction(const std::string & function_name) return is_special_function_in; } +bool isNameOfLocalInFunction(const std::string & function_name) +{ + bool is_special_function_in = function_name == "in" || + function_name == "notIn" || + function_name == "nullIn" || + function_name == "notNullIn" || + function_name == "inIgnoreSet" || + function_name == "notInIgnoreSet" || + function_name == "nullInIgnoreSet" || + function_name == "notNullInIgnoreSet"; + + return is_special_function_in; +} + +bool isNameOfGlobalInFunction(const std::string & function_name) +{ + bool is_special_function_in = function_name == "globalIn" || + function_name == "globalNotIn" || + function_name == "globalNullIn" || + function_name == "globalNotNullIn" || + function_name == "globalInIgnoreSet" || + function_name == "globalNotInIgnoreSet" || + function_name == "globalNullInIgnoreSet" || + function_name == "globalNotNullInIgnoreSet"; + + return is_special_function_in; +} + +std::string getGlobalInFunctionNameForLocalInFunctionName(const std::string & function_name) +{ + if (function_name == "in") + return "globalIn"; + else if (function_name == "notIn") + return "globalNotIn"; + else if (function_name == "nullIn") + return "globalNullIn"; + else if (function_name == "notNullIn") + return "globalNotNullIn"; + else if (function_name == "inIgnoreSet") + return "globalInIgnoreSet"; + else if (function_name == "notInIgnoreSet") + return "globalNotInIgnoreSet"; + else if (function_name == "nullInIgnoreSet") + return "globalNullInIgnoreSet"; + else if (function_name == "notNullInIgnoreSet") + return "globalNotNullInIgnoreSet"; + + throw Exception(ErrorCodes::BAD_ARGUMENTS, "Invalid local IN function name {}", function_name); +} + QueryTreeNodePtr buildCastFunction(const QueryTreeNodePtr & expression, const DataTypePtr & type, const ContextPtr & context, diff --git a/src/Analyzer/Utils.h b/src/Analyzer/Utils.h index 3e2d95c6012..9132a1d72bc 100644 --- a/src/Analyzer/Utils.h +++ b/src/Analyzer/Utils.h @@ -13,6 +13,15 @@ bool isNodePartOfTree(const IQueryTreeNode * node, const IQueryTreeNode * root); /// Returns true if function name is name of IN function or its variations, false otherwise bool isNameOfInFunction(const std::string & function_name); +/// Returns true if function name is name of local IN function or its variations, false otherwise +bool isNameOfLocalInFunction(const std::string & function_name); + +/// Returns true if function name is name of global IN function or its variations, false otherwise +bool isNameOfGlobalInFunction(const std::string & function_name); + +/// Returns global in function name for local in function name +std::string getGlobalInFunctionNameForLocalInFunctionName(const std::string & function_name); + /** Build cast function that cast expression into type. * If resolve = true, then result cast function is resolved during build, otherwise * result cast function is not resolved during build. diff --git a/src/Planner/PlannerContext.cpp b/src/Planner/PlannerContext.cpp index 9f4a489bf5f..59ae0f20fac 100644 --- a/src/Planner/PlannerContext.cpp +++ b/src/Planner/PlannerContext.cpp @@ -45,7 +45,7 @@ bool GlobalPlannerContext::hasColumnIdentifier(const ColumnIdentifier & column_i return column_identifiers.contains(column_identifier); } -PlannerContext::PlannerContext(ContextPtr query_context_, GlobalPlannerContextPtr global_planner_context_) +PlannerContext::PlannerContext(ContextMutablePtr query_context_, GlobalPlannerContextPtr global_planner_context_) : query_context(std::move(query_context_)) , global_planner_context(std::move(global_planner_context_)) {} diff --git a/src/Planner/PlannerContext.h b/src/Planner/PlannerContext.h index 63874bf7ab9..e47198bfe5f 100644 --- a/src/Planner/PlannerContext.h +++ b/src/Planner/PlannerContext.h @@ -88,16 +88,22 @@ class PlannerContext { public: /// Create planner context with query context and global planner context - PlannerContext(ContextPtr query_context_, GlobalPlannerContextPtr global_planner_context_); + PlannerContext(ContextMutablePtr query_context_, GlobalPlannerContextPtr global_planner_context_); /// Get planner context query context - const ContextPtr & getQueryContext() const + ContextPtr getQueryContext() const { return query_context; } - /// Get planner context query context - ContextPtr & getQueryContext() + /// Get planner context mutable query context + const ContextMutablePtr & getMutableQueryContext() const + { + return query_context; + } + + /// Get planner context mutable query context + ContextMutablePtr & getMutableQueryContext() { return query_context; } @@ -137,12 +143,18 @@ public: */ TableExpressionData * getTableExpressionDataOrNull(const QueryTreeNodePtr & table_expression_node); - /// Get table expression node to data read only map + /// Get table expression node to data map const std::unordered_map & getTableExpressionNodeToData() const { return table_expression_node_to_data; } + /// Get table expression node to data map + std::unordered_map & getTableExpressionNodeToData() + { + return table_expression_node_to_data; + } + /** Get column node identifier. * For column node source check if table expression data is registered. * If table expression data is not registered exception is thrown. @@ -184,7 +196,7 @@ public: private: /// Query context - ContextPtr query_context; + ContextMutablePtr query_context; /// Global planner context GlobalPlannerContextPtr global_planner_context; diff --git a/src/Planner/PlannerJoinTree.cpp b/src/Planner/PlannerJoinTree.cpp index 6f818e2c8f7..edea51aba45 100644 --- a/src/Planner/PlannerJoinTree.cpp +++ b/src/Planner/PlannerJoinTree.cpp @@ -246,17 +246,87 @@ bool applyTrivialCountIfPossible( return true; } -JoinTreeQueryPlan buildQueryPlanForTableExpression(const QueryTreeNodePtr & table_expression, - const SelectQueryInfo & select_query_info, - const SelectQueryOptions & select_query_options, - PlannerContextPtr & planner_context, - bool is_single_table_expression) +void prepareBuildQueryPlanForTableExpression(const QueryTreeNodePtr & table_expression, PlannerContextPtr & planner_context) { const auto & query_context = planner_context->getQueryContext(); const auto & settings = query_context->getSettingsRef(); + auto & table_expression_data = planner_context->getTableExpressionDataOrThrow(table_expression); + auto columns_names = table_expression_data.getColumnNames(); + + auto * table_node = table_expression->as(); + auto * table_function_node = table_expression->as(); + auto * query_node = table_expression->as(); + auto * union_node = table_expression->as(); + + /** The current user must have the SELECT privilege. + * We do not check access rights for table functions because they have been already checked in ITableFunction::execute(). + */ + if (table_node) + { + auto column_names_with_aliases = columns_names; + const auto & alias_columns_names = table_expression_data.getAliasColumnsNames(); + column_names_with_aliases.insert(column_names_with_aliases.end(), alias_columns_names.begin(), alias_columns_names.end()); + checkAccessRights(*table_node, column_names_with_aliases, query_context); + } + + if (columns_names.empty()) + { + NameAndTypePair additional_column_to_read; + + if (table_node || table_function_node) + { + const auto & storage = table_node ? table_node->getStorage() : table_function_node->getStorage(); + const auto & storage_snapshot = table_node ? table_node->getStorageSnapshot() : table_function_node->getStorageSnapshot(); + additional_column_to_read = chooseSmallestColumnToReadFromStorage(storage, storage_snapshot); + + } + else if (query_node || union_node) + { + const auto & projection_columns = query_node ? query_node->getProjectionColumns() : union_node->computeProjectionColumns(); + NamesAndTypesList projection_columns_list(projection_columns.begin(), projection_columns.end()); + additional_column_to_read = ExpressionActions::getSmallestColumn(projection_columns_list); + } + else + { + throw Exception(ErrorCodes::LOGICAL_ERROR, "Expected table, table function, query or union. Actual {}", + table_expression->formatASTForErrorMessage()); + } + + auto & global_planner_context = planner_context->getGlobalPlannerContext(); + const auto & column_identifier = global_planner_context->createColumnIdentifier(additional_column_to_read, table_expression); + columns_names.push_back(additional_column_to_read.name); + table_expression_data.addColumn(additional_column_to_read, column_identifier); + } + + /// Limitation on the number of columns to read + if (settings.max_columns_to_read && columns_names.size() > settings.max_columns_to_read) + throw Exception(ErrorCodes::TOO_MANY_COLUMNS, + "Limit for number of columns to read exceeded. Requested: {}, maximum: {}", + columns_names.size(), + settings.max_columns_to_read); +} + +JoinTreeQueryPlan buildQueryPlanForTableExpression(QueryTreeNodePtr table_expression, + const SelectQueryInfo & select_query_info, + const SelectQueryOptions & select_query_options, + PlannerContextPtr & planner_context, + bool is_single_table_expression, + bool wrap_read_columns_in_subquery) +{ + const auto & query_context = planner_context->getQueryContext(); + const auto & settings = query_context->getSettingsRef(); + + auto & table_expression_data = planner_context->getTableExpressionDataOrThrow(table_expression); + QueryProcessingStage::Enum from_stage = QueryProcessingStage::Enum::FetchColumns; + if (wrap_read_columns_in_subquery) + { + auto columns = table_expression_data.getColumns(); + table_expression = buildSubqueryToReadColumnsFromTableExpression(columns, table_expression, query_context); + } + auto * table_node = table_expression->as(); auto * table_function_node = table_expression->as(); auto * query_node = table_expression->as(); @@ -264,8 +334,6 @@ JoinTreeQueryPlan buildQueryPlanForTableExpression(const QueryTreeNodePtr & tabl QueryPlan query_plan; - auto & table_expression_data = planner_context->getTableExpressionDataOrThrow(table_expression); - if (table_node || table_function_node) { const auto & storage = table_node ? table_node->getStorage() : table_function_node->getStorage(); @@ -362,32 +430,6 @@ JoinTreeQueryPlan buildQueryPlanForTableExpression(const QueryTreeNodePtr & tabl auto columns_names = table_expression_data.getColumnNames(); - /** The current user must have the SELECT privilege. - * We do not check access rights for table functions because they have been already checked in ITableFunction::execute(). - */ - if (table_node) - { - auto column_names_with_aliases = columns_names; - const auto & alias_columns_names = table_expression_data.getAliasColumnsNames(); - column_names_with_aliases.insert(column_names_with_aliases.end(), alias_columns_names.begin(), alias_columns_names.end()); - checkAccessRights(*table_node, column_names_with_aliases, planner_context->getQueryContext()); - } - - /// Limitation on the number of columns to read - if (settings.max_columns_to_read && columns_names.size() > settings.max_columns_to_read) - throw Exception(ErrorCodes::TOO_MANY_COLUMNS, - "Limit for number of columns to read exceeded. Requested: {}, maximum: {}", - columns_names.size(), - settings.max_columns_to_read); - - if (columns_names.empty()) - { - auto additional_column_to_read = chooseSmallestColumnToReadFromStorage(storage, storage_snapshot); - const auto & column_identifier = planner_context->getGlobalPlannerContext()->createColumnIdentifier(additional_column_to_read, table_expression); - columns_names.push_back(additional_column_to_read.name); - table_expression_data.addColumn(additional_column_to_read, column_identifier); - } - bool need_rewrite_query_with_final = storage->needRewriteQueryWithFinal(columns_names); if (need_rewrite_query_with_final) { @@ -464,16 +506,6 @@ JoinTreeQueryPlan buildQueryPlanForTableExpression(const QueryTreeNodePtr & tabl } else { - if (table_expression_data.getColumnNames().empty()) - { - const auto & projection_columns = query_node ? query_node->getProjectionColumns() : union_node->computeProjectionColumns(); - NamesAndTypesList projection_columns_list(projection_columns.begin(), projection_columns.end()); - auto additional_column_to_read = ExpressionActions::getSmallestColumn(projection_columns_list); - - const auto & column_identifier = planner_context->getGlobalPlannerContext()->createColumnIdentifier(additional_column_to_read, table_expression); - table_expression_data.addColumn(additional_column_to_read, column_identifier); - } - auto subquery_options = select_query_options.subquery(); Planner subquery_planner(table_expression, subquery_options, planner_context->getGlobalPlannerContext()); /// Propagate storage limits to subquery @@ -516,10 +548,11 @@ JoinTreeQueryPlan buildQueryPlanForTableExpression(const QueryTreeNodePtr & tabl planner.buildQueryPlanIfNeeded(); auto expected_header = planner.getQueryPlan().getCurrentDataStream().header; - materializeBlockInplace(expected_header); if (!blocksHaveEqualStructure(query_plan.getCurrentDataStream().header, expected_header)) { + materializeBlockInplace(expected_header); + auto rename_actions_dag = ActionsDAG::makeConvertingActions( query_plan.getCurrentDataStream().header.getColumnsWithTypeAndName(), expected_header.getColumnsWithTypeAndName(), @@ -1059,14 +1092,40 @@ JoinTreeQueryPlan buildJoinTreeQueryPlan(const QueryTreeNodePtr & query_node, const ColumnIdentifierSet & outer_scope_columns, PlannerContextPtr & planner_context) { - const auto & query_node_typed = query_node->as(); - auto table_expressions_stack = buildTableExpressionsStack(query_node_typed.getJoinTree()); + auto table_expressions_stack = buildTableExpressionsStack(query_node->as().getJoinTree()); size_t table_expressions_stack_size = table_expressions_stack.size(); bool is_single_table_expression = table_expressions_stack_size == 1; std::vector table_expressions_outer_scope_columns(table_expressions_stack_size); ColumnIdentifierSet current_outer_scope_columns = outer_scope_columns; + /// For each table, table function, query, union table expressions prepare before query plan build + for (size_t i = 0; i < table_expressions_stack_size; ++i) + { + const auto & table_expression = table_expressions_stack[i]; + auto table_expression_type = table_expression->getNodeType(); + if (table_expression_type == QueryTreeNodeType::JOIN || + table_expression_type == QueryTreeNodeType::ARRAY_JOIN) + continue; + + prepareBuildQueryPlanForTableExpression(table_expression, planner_context); + } + + /** If left most table expression query plan is planned to stage that is not equal to fetch columns, + * then left most table expression is responsible for providing valid JOIN TREE part of final query plan. + * + * Examples: Distributed, LiveView, Merge storages. + */ + auto left_table_expression = table_expressions_stack.front(); + auto left_table_expression_query_plan = buildQueryPlanForTableExpression(left_table_expression, + select_query_info, + select_query_options, + planner_context, + is_single_table_expression, + false /*wrap_read_columns_in_subquery*/); + if (left_table_expression_query_plan.from_stage != QueryProcessingStage::FetchColumns) + return left_table_expression_query_plan; + for (Int64 i = static_cast(table_expressions_stack_size) - 1; i >= 0; --i) { table_expressions_outer_scope_columns[i] = current_outer_scope_columns; @@ -1120,19 +1179,22 @@ JoinTreeQueryPlan buildJoinTreeQueryPlan(const QueryTreeNodePtr & query_node, } else { - const auto & table_expression_data = planner_context->getTableExpressionDataOrThrow(table_expression); - if (table_expression_data.isRemote() && i != 0) - throw Exception(ErrorCodes::UNSUPPORTED_METHOD, - "JOIN with multiple remote storages is unsupported"); + if (table_expression == left_table_expression) + { + query_plans_stack.push_back(std::move(left_table_expression_query_plan)); + continue; + } + /** If table expression is remote and it is not left most table expression, we wrap read columns from such + * table expression in subquery. + */ + bool is_remote = planner_context->getTableExpressionDataOrThrow(table_expression).isRemote(); query_plans_stack.push_back(buildQueryPlanForTableExpression(table_expression, select_query_info, select_query_options, planner_context, - is_single_table_expression)); - - if (query_plans_stack.back().from_stage != QueryProcessingStage::FetchColumns) - break; + is_single_table_expression, + is_remote /*wrap_read_columns_in_subquery*/)); } } diff --git a/src/Planner/TableExpressionData.h b/src/Planner/TableExpressionData.h index e828f128e38..0f74e671ac7 100644 --- a/src/Planner/TableExpressionData.h +++ b/src/Planner/TableExpressionData.h @@ -101,6 +101,17 @@ public: return column_names; } + NamesAndTypes getColumns() const + { + NamesAndTypes result; + result.reserve(column_names.size()); + + for (const auto & column_name : column_names) + result.push_back(column_name_to_column.at(column_name)); + + return result; + } + ColumnIdentifiers getColumnIdentifiers() const { ColumnIdentifiers result; diff --git a/src/Planner/Utils.cpp b/src/Planner/Utils.cpp index 5c5eadac55d..4f320f144df 100644 --- a/src/Planner/Utils.cpp +++ b/src/Planner/Utils.cpp @@ -4,6 +4,7 @@ #include #include +#include #include #include @@ -19,6 +20,7 @@ #include #include +#include #include #include #include @@ -391,4 +393,36 @@ QueryTreeNodePtr replaceTablesAndTableFunctionsWithDummyTables(const QueryTreeNo return query_node->cloneAndReplace(replacement_map); } +QueryTreeNodePtr buildSubqueryToReadColumnsFromTableExpression(const NamesAndTypes & columns, + const QueryTreeNodePtr & table_expression, + const ContextPtr & context) +{ + auto projection_columns = columns; + + QueryTreeNodes subquery_projection_nodes; + subquery_projection_nodes.reserve(projection_columns.size()); + + for (const auto & column : projection_columns) + subquery_projection_nodes.push_back(std::make_shared(column, table_expression)); + + if (subquery_projection_nodes.empty()) + { + auto constant_data_type = std::make_shared(); + subquery_projection_nodes.push_back(std::make_shared(1UL, constant_data_type)); + projection_columns.push_back({"1", std::move(constant_data_type)}); + } + + auto context_copy = Context::createCopy(context); + updateContextForSubqueryExecution(context_copy); + + auto query_node = std::make_shared(std::move(context_copy)); + + query_node->resolveProjectionColumns(projection_columns); + query_node->getProjection().getNodes() = std::move(subquery_projection_nodes); + query_node->getJoinTree() = table_expression; + query_node->setIsSubquery(true); + + return query_node; +} + } diff --git a/src/Planner/Utils.h b/src/Planner/Utils.h index 0520bd67d26..1e7a98b7256 100644 --- a/src/Planner/Utils.h +++ b/src/Planner/Utils.h @@ -72,4 +72,9 @@ QueryTreeNodePtr replaceTablesAndTableFunctionsWithDummyTables(const QueryTreeNo const ContextPtr & context, ResultReplacementMap * result_replacement_map = nullptr); +/// Build subquery to read specified columns from table expression +QueryTreeNodePtr buildSubqueryToReadColumnsFromTableExpression(const NamesAndTypes & columns, + const QueryTreeNodePtr & table_expression, + const ContextPtr & context); + } diff --git a/src/Storages/StorageDistributed.cpp b/src/Storages/StorageDistributed.cpp index 4eb454e5156..9f84e7d210a 100644 --- a/src/Storages/StorageDistributed.cpp +++ b/src/Storages/StorageDistributed.cpp @@ -39,11 +39,16 @@ #include #include +#include +#include #include #include #include +#include +#include #include #include +#include #include #include @@ -55,6 +60,7 @@ #include #include #include +#include #include #include #include @@ -69,12 +75,14 @@ #include #include +#include #include #include #include #include +#include #include #include #include @@ -138,6 +146,7 @@ namespace ErrorCodes extern const int DISTRIBUTED_TOO_MANY_PENDING_BYTES; extern const int ARGUMENT_OUT_OF_BOUND; extern const int TOO_LARGE_DISTRIBUTED_DEPTH; + extern const int DISTRIBUTED_IN_JOIN_SUBQUERY_DENIED; } namespace ActionLocks @@ -634,12 +643,265 @@ StorageSnapshotPtr StorageDistributed::getStorageSnapshotForQuery( namespace { -QueryTreeNodePtr buildQueryTreeDistributedTableReplacedWithLocalTable(const SelectQueryInfo & query_info, +/// Visitor that collect column source to columns mapping from query and all subqueries +class CollectColumnSourceToColumnsVisitor : public InDepthQueryTreeVisitor +{ +public: + struct Columns + { + NameSet column_names; + NamesAndTypes columns; + + void addColumn(NameAndTypePair column) + { + if (column_names.contains(column.name)) + return; + + column_names.insert(column.name); + columns.push_back(std::move(column)); + } + }; + + const std::unordered_map & getColumnSourceToColumns() const + { + return column_source_to_columns; + } + + void visitImpl(QueryTreeNodePtr & node) + { + auto * column_node = node->as(); + if (!column_node) + return; + + auto column_source = column_node->getColumnSourceOrNull(); + if (!column_source) + return; + + auto it = column_source_to_columns.find(column_source); + if (it == column_source_to_columns.end()) + { + auto [insert_it, _] = column_source_to_columns.emplace(column_source, Columns()); + it = insert_it; + } + + it->second.addColumn(column_node->getColumn()); + } + +private: + std::unordered_map column_source_to_columns; +}; + +/** Visitor that rewrites IN and JOINs in query and all subqueries according to distributed_product_mode and + * prefer_global_in_and_join settings. + * + * Additionally collects GLOBAL JOIN and GLOBAL IN query nodes. + * + * If distributed_product_mode = deny, then visitor throws exception if there are multiple distributed tables. + * If distributed_product_mode = local, then visitor collects replacement map for tables that must be replaced + * with local tables. + * If distributed_product_mode = global or prefer_global_in_and_join setting is true, then visitor rewrites JOINs and IN functions that + * contain distributed tables to GLOBAL JOINs and GLOBAL IN functions. + * If distributed_product_mode = allow, then visitor does not rewrite query if there are multiple distributed tables. + */ +class DistributedProductModeRewriteInJoinVisitor : public InDepthQueryTreeVisitorWithContext +{ +public: + using Base = InDepthQueryTreeVisitorWithContext; + using Base::Base; + + explicit DistributedProductModeRewriteInJoinVisitor(const ContextPtr & context_) + : Base(context_) + {} + + struct InFunctionOrJoin + { + QueryTreeNodePtr query_node; + size_t subquery_depth = 0; + }; + + const std::unordered_map & getReplacementMap() const + { + return replacement_map; + } + + const std::vector & getGlobalInOrJoinNodes() const + { + return global_in_or_join_nodes; + } + + bool needChildVisit(QueryTreeNodePtr & parent, QueryTreeNodePtr & child) + { + auto * function_node = parent->as(); + if (function_node && isNameOfGlobalInFunction(function_node->getFunctionName())) + return false; + + auto * join_node = parent->as(); + if (join_node && join_node->getLocality() == JoinLocality::Global && join_node->getRightTableExpression() == child) + return false; + + return true; + } + + void visitImpl(QueryTreeNodePtr & node) + { + auto * function_node = node->as(); + auto * join_node = node->as(); + + if ((function_node && isNameOfGlobalInFunction(function_node->getFunctionName())) || + (join_node && join_node->getLocality() == JoinLocality::Global)) + { + InFunctionOrJoin in_function_or_join_entry; + in_function_or_join_entry.query_node = node; + in_function_or_join_entry.subquery_depth = getSubqueryDepth(); + global_in_or_join_nodes.push_back(std::move(in_function_or_join_entry)); + return; + } + + if ((function_node && isNameOfLocalInFunction(function_node->getFunctionName())) || + (join_node && join_node->getLocality() != JoinLocality::Global)) + { + InFunctionOrJoin in_function_or_join_entry; + in_function_or_join_entry.query_node = node; + in_function_or_join_entry.subquery_depth = getSubqueryDepth(); + in_function_or_join_stack.push_back(in_function_or_join_entry); + return; + } + + if (node->getNodeType() == QueryTreeNodeType::TABLE) + tryRewriteTableNodeIfNeeded(node); + } + + void leaveImpl(QueryTreeNodePtr & node) + { + if (!in_function_or_join_stack.empty() && node.get() == in_function_or_join_stack.back().query_node.get()) + in_function_or_join_stack.pop_back(); + } + +private: + void tryRewriteTableNodeIfNeeded(const QueryTreeNodePtr & table_node) + { + const auto & table_node_typed = table_node->as(); + const auto * distributed_storage = typeid_cast(table_node_typed.getStorage().get()); + if (!distributed_storage) + return; + + bool distributed_valid_for_rewrite = distributed_storage->getShardCount() >= 2; + if (!distributed_valid_for_rewrite) + return; + + auto distributed_product_mode = getSettings().distributed_product_mode; + + if (distributed_product_mode == DistributedProductMode::LOCAL) + { + StorageID remote_storage_id = StorageID{distributed_storage->getRemoteDatabaseName(), + distributed_storage->getRemoteTableName()}; + auto resolved_remote_storage_id = getContext()->resolveStorageID(remote_storage_id); + const auto & distributed_storage_columns = table_node_typed.getStorageSnapshot()->metadata->getColumns(); + auto storage = std::make_shared(resolved_remote_storage_id, distributed_storage_columns); + auto replacement_table_expression = std::make_shared(std::move(storage), getContext()); + replacement_map.emplace(table_node.get(), std::move(replacement_table_expression)); + } + else if ((distributed_product_mode == DistributedProductMode::GLOBAL || getSettings().prefer_global_in_and_join) && + !in_function_or_join_stack.empty()) + { + auto * in_or_join_node_to_modify = in_function_or_join_stack.back().query_node.get(); + + if (auto * in_function_to_modify = in_or_join_node_to_modify->as()) + { + auto global_in_function_name = getGlobalInFunctionNameForLocalInFunctionName(in_function_to_modify->getFunctionName()); + auto global_in_function_resolver = FunctionFactory::instance().get(global_in_function_name, getContext()); + in_function_to_modify->resolveAsFunction(global_in_function_resolver->build(in_function_to_modify->getArgumentColumns())); + } + else if (auto * join_node_to_modify = in_or_join_node_to_modify->as()) + { + join_node_to_modify->setLocality(JoinLocality::Global); + } + + global_in_or_join_nodes.push_back(in_function_or_join_stack.back()); + } + else if (distributed_product_mode == DistributedProductMode::ALLOW) + { + return; + } + else if (distributed_product_mode == DistributedProductMode::DENY) + { + throw Exception(ErrorCodes::DISTRIBUTED_IN_JOIN_SUBQUERY_DENIED, + "Double-distributed IN/JOIN subqueries is denied (distributed_product_mode = 'deny'). " + "You may rewrite query to use local tables " + "in subqueries, or use GLOBAL keyword, or set distributed_product_mode to suitable value."); + } + } + + std::vector in_function_or_join_stack; + std::unordered_map replacement_map; + std::vector global_in_or_join_nodes; +}; + +/** Execute subquery node and put result in mutable context temporary table. + * Returns table node that is initialized with temporary table storage. + */ +QueryTreeNodePtr executeSubqueryNode(const QueryTreeNodePtr & subquery_node, + ContextMutablePtr & mutable_context, + size_t subquery_depth) +{ + auto subquery_hash = subquery_node->getTreeHash(); + String temporary_table_name = fmt::format("_data_{}_{}", subquery_hash.first, subquery_hash.second); + + const auto & external_tables = mutable_context->getExternalTables(); + auto external_table_it = external_tables.find(temporary_table_name); + if (external_table_it != external_tables.end()) + { + auto temporary_table_expression_node = std::make_shared(external_table_it->second, mutable_context); + temporary_table_expression_node->setTemporaryTableName(temporary_table_name); + return temporary_table_expression_node; + } + + auto subquery_ast = subquery_node->toAST(); + auto subquery_options = SelectQueryOptions(QueryProcessingStage::Complete, subquery_depth, true /*is_subquery*/); + auto context_copy = Context::createCopy(mutable_context); + updateContextForSubqueryExecution(context_copy); + + InterpreterSelectQueryAnalyzer interpreter(subquery_ast, context_copy, subquery_options); + + Block sample = interpreter.getSampleBlock(); + NamesAndTypesList columns = sample.getNamesAndTypesList(); + + auto external_storage_holder = TemporaryTableHolder( + mutable_context, + ColumnsDescription{columns}, + ConstraintsDescription{}, + nullptr /*query*/, + true /*create_for_global_subquery*/); + + StoragePtr external_storage = external_storage_holder.getTable(); + auto temporary_table_expression_node = std::make_shared(external_storage, mutable_context); + temporary_table_expression_node->setTemporaryTableName(temporary_table_name); + + auto table_out = external_storage->write({}, external_storage->getInMemoryMetadataPtr(), mutable_context); + auto io = interpreter.execute(); + io.pipeline.complete(std::move(table_out)); + CompletedPipelineExecutor executor(io.pipeline); + executor.execute(); + + mutable_context->addExternalTable(temporary_table_name, std::move(external_storage_holder)); + + return temporary_table_expression_node; +} + +QueryTreeNodePtr buildQueryTreeDistributed(SelectQueryInfo & query_info, const StorageSnapshotPtr & distributed_storage_snapshot, const StorageID & remote_storage_id, const ASTPtr & remote_table_function) { - const auto & query_context = query_info.planner_context->getQueryContext(); + auto & planner_context = query_info.planner_context; + const auto & query_context = planner_context->getQueryContext(); + + std::optional table_expression_modifiers; + + if (auto * query_info_table_node = query_info.table_expression->as()) + table_expression_modifiers = query_info_table_node->getTableExpressionModifiers(); + else if (auto * query_info_table_function_node = query_info.table_expression->as()) + table_expression_modifiers = query_info_table_function_node->getTableExpressionModifiers(); QueryTreeNodePtr replacement_table_expression; @@ -651,6 +913,9 @@ QueryTreeNodePtr buildQueryTreeDistributedTableReplacedWithLocalTable(const Sele auto table_function_node = std::make_shared(remote_table_function_node.getFunctionName()); table_function_node->getArgumentsNode() = remote_table_function_node.getArgumentsNode(); + if (table_expression_modifiers) + table_function_node->setTableExpressionModifiers(*table_expression_modifiers); + QueryAnalysisPass query_analysis_pass; query_analysis_pass.run(table_function_node, query_context); @@ -660,13 +925,85 @@ QueryTreeNodePtr buildQueryTreeDistributedTableReplacedWithLocalTable(const Sele { auto resolved_remote_storage_id = query_context->resolveStorageID(remote_storage_id); auto storage = std::make_shared(resolved_remote_storage_id, distributed_storage_snapshot->metadata->getColumns()); + auto table_node = std::make_shared(std::move(storage), query_context); - replacement_table_expression = std::make_shared(std::move(storage), query_context); + if (table_expression_modifiers) + table_node->setTableExpressionModifiers(*table_expression_modifiers); + + replacement_table_expression = std::move(table_node); } replacement_table_expression->setAlias(query_info.table_expression->getAlias()); - return query_info.query_tree->cloneAndReplace(query_info.table_expression, std::move(replacement_table_expression)); + auto query_tree_to_modify = query_info.query_tree->cloneAndReplace(query_info.table_expression, std::move(replacement_table_expression)); + + CollectColumnSourceToColumnsVisitor collect_column_source_to_columns_visitor; + collect_column_source_to_columns_visitor.visit(query_tree_to_modify); + + const auto & column_source_to_columns = collect_column_source_to_columns_visitor.getColumnSourceToColumns(); + + DistributedProductModeRewriteInJoinVisitor visitor(query_info.planner_context->getQueryContext()); + visitor.visit(query_tree_to_modify); + + auto replacement_map = visitor.getReplacementMap(); + const auto & global_in_or_join_nodes = visitor.getGlobalInOrJoinNodes(); + + for (const auto & global_in_or_join_node : global_in_or_join_nodes) + { + if (auto * join_node = global_in_or_join_node.query_node->as()) + { + auto join_right_table_expression = join_node->getRightTableExpression(); + auto join_right_table_expression_node_type = join_right_table_expression->getNodeType(); + + QueryTreeNodePtr subquery_node; + + if (join_right_table_expression_node_type == QueryTreeNodeType::QUERY || + join_right_table_expression_node_type == QueryTreeNodeType::UNION) + { + subquery_node = join_right_table_expression; + } + else if (join_right_table_expression_node_type == QueryTreeNodeType::TABLE || + join_right_table_expression_node_type == QueryTreeNodeType::TABLE_FUNCTION) + { + const auto & columns = column_source_to_columns.at(join_right_table_expression).columns; + subquery_node = buildSubqueryToReadColumnsFromTableExpression(columns, + join_right_table_expression, + planner_context->getQueryContext()); + } + else + { + throw Exception(ErrorCodes::LOGICAL_ERROR, + "Expected JOIN righ table expression to be table, table function, query or union node. Actual {}", + join_right_table_expression->formatASTForErrorMessage()); + } + + auto temporary_table_expression_node = executeSubqueryNode(subquery_node, + planner_context->getMutableQueryContext(), + global_in_or_join_node.subquery_depth); + temporary_table_expression_node->setAlias(join_right_table_expression->getAlias()); + replacement_map.emplace(join_right_table_expression.get(), std::move(temporary_table_expression_node)); + continue; + } + else if (auto * in_function_node = global_in_or_join_node.query_node->as()) + { + auto & in_function_subquery_node = in_function_node->getArguments().getNodes().at(1); + auto temporary_table_expression_node = executeSubqueryNode(in_function_subquery_node, + planner_context->getMutableQueryContext(), + global_in_or_join_node.subquery_depth); + in_function_subquery_node = std::move(temporary_table_expression_node); + } + else + { + throw Exception(ErrorCodes::LOGICAL_ERROR, + "Expected global IN or JOIN query node. Actual {}", + global_in_or_join_node.query_node->formatASTForErrorMessage()); + } + } + + if (!replacement_map.empty()) + query_tree_to_modify = query_tree_to_modify->cloneAndReplace(replacement_map); + + return query_tree_to_modify; } } @@ -694,17 +1031,13 @@ void StorageDistributed::read( if (!remote_table_function_ptr) remote_storage_id = StorageID{remote_database, remote_table}; - auto query_tree_with_replaced_distributed_table = buildQueryTreeDistributedTableReplacedWithLocalTable(query_info, + auto query_tree_distributed = buildQueryTreeDistributed(query_info, storage_snapshot, remote_storage_id, remote_table_function_ptr); - query_ast = queryNodeToSelectQuery(query_tree_with_replaced_distributed_table); - - Planner planner(query_tree_with_replaced_distributed_table, SelectQueryOptions(processed_stage).analyze()); - planner.buildQueryPlanIfNeeded(); - - header = planner.getQueryPlan().getCurrentDataStream().header; + query_ast = queryNodeToSelectQuery(query_tree_distributed); + header = InterpreterSelectQueryAnalyzer::getSampleBlock(query_ast, local_context, SelectQueryOptions(processed_stage).analyze()); } else { diff --git a/src/Storages/StorageMergeTree.cpp b/src/Storages/StorageMergeTree.cpp index aadd7b8c20a..d9bb189524c 100644 --- a/src/Storages/StorageMergeTree.cpp +++ b/src/Storages/StorageMergeTree.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -223,8 +224,12 @@ void StorageMergeTree::read( auto cluster = local_context->getCluster(local_context->getSettingsRef().cluster_for_parallel_replicas); - Block header = - InterpreterSelectQuery(modified_query_ast, local_context, SelectQueryOptions(processed_stage).analyze()).getSampleBlock(); + Block header; + + if (local_context->getSettingsRef().allow_experimental_analyzer) + header = InterpreterSelectQueryAnalyzer::getSampleBlock(modified_query_ast, local_context, SelectQueryOptions(processed_stage).analyze()); + else + header = InterpreterSelectQuery(modified_query_ast, local_context, SelectQueryOptions(processed_stage).analyze()).getSampleBlock(); ClusterProxy::SelectStreamFactory select_stream_factory = ClusterProxy::SelectStreamFactory( diff --git a/src/Storages/StorageView.cpp b/src/Storages/StorageView.cpp index 1a7050b4dff..a5c908352ee 100644 --- a/src/Storages/StorageView.cpp +++ b/src/Storages/StorageView.cpp @@ -167,7 +167,7 @@ void StorageView::read( query_plan.addStep(std::move(materializing)); /// And also convert to expected structure. - const auto & expected_header = storage_snapshot->getSampleBlockForColumns(column_names,parameter_values); + const auto & expected_header = storage_snapshot->getSampleBlockForColumns(column_names, parameter_values); const auto & header = query_plan.getCurrentDataStream().header; const auto * select_with_union = current_inner_query->as(); diff --git a/tests/queries/0_stateless/00858_issue_4756.reference b/tests/queries/0_stateless/00858_issue_4756.reference index d00491fd7e5..e8183f05f5d 100644 --- a/tests/queries/0_stateless/00858_issue_4756.reference +++ b/tests/queries/0_stateless/00858_issue_4756.reference @@ -1 +1,3 @@ 1 +1 +1 diff --git a/tests/queries/0_stateless/00858_issue_4756.sql b/tests/queries/0_stateless/00858_issue_4756.sql index 3da0766c4e9..9eacd5ef364 100644 --- a/tests/queries/0_stateless/00858_issue_4756.sql +++ b/tests/queries/0_stateless/00858_issue_4756.sql @@ -1,3 +1,4 @@ +set allow_experimental_analyzer = 1; set distributed_product_mode = 'local'; drop table if exists shard1; @@ -21,7 +22,7 @@ where distr1.id in from distr1 join distr2 on distr1.id = distr2.id where distr1.id > 0 -); -- { serverError 288 } +); select distinct(d0.id) from distr1 d0 where d0.id in @@ -32,15 +33,14 @@ where d0.id in where d1.id > 0 ); --- TODO ---select distinct(distr1.id) from distr1 ---where distr1.id in ---( --- select distr1.id --- from distr1 as d1 --- join distr2 as d2 on distr1.id = distr2.id --- where distr1.id > 0 ---); +select distinct(distr1.id) from distr1 +where distr1.id in +( + select distr1.id + from distr1 as d1 + join distr2 as d2 on distr1.id = distr2.id + where distr1.id > 0 +); drop table shard1; drop table shard2; diff --git a/tests/queries/0_stateless/02420_final_setting_analyzer.reference b/tests/queries/0_stateless/02420_final_setting_analyzer.reference index ee7c2541bcf..9a03c484765 100644 --- a/tests/queries/0_stateless/02420_final_setting_analyzer.reference +++ b/tests/queries/0_stateless/02420_final_setting_analyzer.reference @@ -108,9 +108,6 @@ select left_table.id,val_left, val_middle, val_right from left_table ORDER BY left_table.id, val_left, val_middle, val_right; 1 c a c 1 c b c --- no distributed tests because it is not currently supported: --- JOIN with remote storages is unsupported. - -- Quite exotic with Merge engine DROP TABLE IF EXISTS table_to_merge_a; DROP TABLE IF EXISTS table_to_merge_b; diff --git a/tests/queries/0_stateless/02420_final_setting_analyzer.sql b/tests/queries/0_stateless/02420_final_setting_analyzer.sql index 5937e536239..14c832cfaf5 100644 --- a/tests/queries/0_stateless/02420_final_setting_analyzer.sql +++ b/tests/queries/0_stateless/02420_final_setting_analyzer.sql @@ -79,9 +79,6 @@ select left_table.id,val_left, val_middle, val_right from left_table inner join (SELECT * FROM right_table WHERE id = 1) r on middle_table.id = r.id ORDER BY left_table.id, val_left, val_middle, val_right; --- no distributed tests because it is not currently supported: --- JOIN with remote storages is unsupported. - -- Quite exotic with Merge engine DROP TABLE IF EXISTS table_to_merge_a; DROP TABLE IF EXISTS table_to_merge_b; From 677408e02ece0be3d39c3a77672a054c0a529de6 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Fri, 3 Mar 2023 19:03:40 +0100 Subject: [PATCH 703/841] Fixed style check --- src/Analyzer/Utils.cpp | 1 + src/Storages/StorageDistributed.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Analyzer/Utils.cpp b/src/Analyzer/Utils.cpp index 5c1873bd6e4..aec4031d136 100644 --- a/src/Analyzer/Utils.cpp +++ b/src/Analyzer/Utils.cpp @@ -32,6 +32,7 @@ namespace DB namespace ErrorCodes { extern const int LOGICAL_ERROR; + extern const int BAD_ARGUMENTS; } bool isNodePartOfTree(const IQueryTreeNode * node, const IQueryTreeNode * root) diff --git a/src/Storages/StorageDistributed.cpp b/src/Storages/StorageDistributed.cpp index 9f84e7d210a..a16a98edc0a 100644 --- a/src/Storages/StorageDistributed.cpp +++ b/src/Storages/StorageDistributed.cpp @@ -973,7 +973,7 @@ QueryTreeNodePtr buildQueryTreeDistributed(SelectQueryInfo & query_info, else { throw Exception(ErrorCodes::LOGICAL_ERROR, - "Expected JOIN righ table expression to be table, table function, query or union node. Actual {}", + "Expected JOIN right table expression to be table, table function, query or union node. Actual {}", join_right_table_expression->formatASTForErrorMessage()); } From 0358cb36d878ca7744ec86f56e4d2c6b1c1c2f23 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Sat, 4 Mar 2023 18:46:40 +0100 Subject: [PATCH 704/841] Fixed tests --- src/Analyzer/Passes/QueryAnalysisPass.cpp | 18 +-- src/Analyzer/TableNode.cpp | 17 ++- src/Analyzer/Utils.cpp | 19 +++ src/Analyzer/Utils.h | 3 + src/Analyzer/WindowNode.cpp | 14 +- src/Interpreters/FullSortingMergeJoin.h | 4 + .../InterpreterSelectQueryAnalyzer.cpp | 6 + .../InterpreterSelectQueryAnalyzer.h | 2 + src/Planner/Planner.cpp | 9 +- src/Planner/PlannerJoinTree.cpp | 11 ++ src/Storages/HDFS/StorageHDFSCluster.cpp | 9 +- src/Storages/MergeTree/RPNBuilder.cpp | 2 +- src/Storages/StorageDistributed.cpp | 23 ++- src/Storages/StorageS3Cluster.cpp | 18 ++- src/Storages/StorageView.cpp | 5 + src/TableFunctions/TableFunctionMerge.cpp | 2 +- src/TableFunctions/TableFunctionURL.cpp | 20 +++ src/TableFunctions/TableFunctionURL.h | 7 +- .../00378_json_quote_64bit_integers.reference | 20 +-- .../00445_join_nullable_keys.reference | 10 +- .../0_stateless/00445_join_nullable_keys.sql | 1 + .../0_stateless/00722_inner_join.reference | 30 ++-- .../00853_join_with_nulls_crash.reference | 2 +- .../00853_join_with_nulls_crash.sql | 6 +- .../01010_pmj_right_table_memory_limits.sql | 30 +++- .../01056_predicate_optimizer_bugs.reference | 6 +- .../01056_predicate_optimizer_bugs.sql | 4 +- .../01291_aggregation_in_order.reference | 4 +- .../01291_aggregation_in_order.sql | 4 +- .../01455_opentelemetry_distributed.reference | 8 +- .../01455_opentelemetry_distributed.sh | 7 +- .../0_stateless/01457_int256_hashing.sql | 14 +- ..._explain_select_with_union_query.reference | 144 +++++++++--------- ...monotonous_functions_in_order_by.reference | 12 +- .../0_stateless/01596_full_join_chertus.sql | 4 +- .../0_stateless/01911_logical_error_minus.sql | 4 +- .../01913_names_of_tuple_literal.sql | 2 + .../02048_clickhouse_local_stage.reference | 6 +- ...2184_hash_functions_and_ip_types.reference | 100 ++++++------ .../02184_hash_functions_and_ip_types.sql | 2 + .../02227_union_match_by_name.reference | 72 +++++---- ...4_nothing_arguments_in_functions_errors.sh | 4 +- .../0_stateless/02303_query_kind.reference | 32 ++-- .../02381_join_dup_columns_in_plan.reference | 44 +++--- .../02402_external_disk_mertrics.sql | 3 +- .../02451_order_by_monotonic.reference | 32 ++-- ...cannot-find-column-in-projection.reference | 0 ...02521_cannot-find-column-in-projection.sql | 3 - ...cannot_find_column_in_projection.reference | 1 + ...02521_cannot_find_column_in_projection.sql | 7 + .../0_stateless/02579_fill_empty_chunk.sql | 2 + 51 files changed, 481 insertions(+), 328 deletions(-) delete mode 100644 tests/queries/0_stateless/02521_cannot-find-column-in-projection.reference delete mode 100644 tests/queries/0_stateless/02521_cannot-find-column-in-projection.sql create mode 100644 tests/queries/0_stateless/02521_cannot_find_column_in_projection.reference create mode 100644 tests/queries/0_stateless/02521_cannot_find_column_in_projection.sql diff --git a/src/Analyzer/Passes/QueryAnalysisPass.cpp b/src/Analyzer/Passes/QueryAnalysisPass.cpp index 5a726ab4bb5..7d60b843694 100644 --- a/src/Analyzer/Passes/QueryAnalysisPass.cpp +++ b/src/Analyzer/Passes/QueryAnalysisPass.cpp @@ -1954,21 +1954,7 @@ void QueryAnalyzer::evaluateScalarSubqueryIfNeeded(QueryTreeNodePtr & node, Iden * * Example: SELECT (SELECT 2 AS x, x) */ - NameSet block_column_names; - size_t unique_column_name_counter = 1; - - for (auto & column_with_type : block) - { - if (!block_column_names.contains(column_with_type.name)) - { - block_column_names.insert(column_with_type.name); - continue; - } - - column_with_type.name += '_'; - column_with_type.name += std::to_string(unique_column_name_counter); - ++unique_column_name_counter; - } + makeUniqueColumnNamesInBlock(block); scalar_block.insert({ ColumnTuple::create(block.getColumns()), @@ -5062,7 +5048,7 @@ ProjectionNames QueryAnalyzer::resolveFunction(QueryTreeNodePtr & node, Identifi /// Do not constant fold get scalar functions bool disable_constant_folding = function_name == "__getScalar" || function_name == "shardNum" || - function_name == "shardCount"; + function_name == "shardCount" || function_name == "hostName"; /** If function is suitable for constant folding try to convert it to constant. * Example: SELECT plus(1, 1); diff --git a/src/Analyzer/TableNode.cpp b/src/Analyzer/TableNode.cpp index a746986be04..f315d372bc9 100644 --- a/src/Analyzer/TableNode.cpp +++ b/src/Analyzer/TableNode.cpp @@ -61,12 +61,17 @@ bool TableNode::isEqualImpl(const IQueryTreeNode & rhs) const void TableNode::updateTreeHashImpl(HashState & state) const { - auto full_name = storage_id.getFullNameNotQuoted(); - state.update(full_name.size()); - state.update(full_name); - - state.update(temporary_table_name.size()); - state.update(temporary_table_name); + if (!temporary_table_name.empty()) + { + state.update(temporary_table_name.size()); + state.update(temporary_table_name); + } + else + { + auto full_name = storage_id.getFullNameNotQuoted(); + state.update(full_name.size()); + state.update(full_name); + } if (table_expression_modifiers) table_expression_modifiers->updateTreeHash(state); diff --git a/src/Analyzer/Utils.cpp b/src/Analyzer/Utils.cpp index aec4031d136..16f2e5b75e6 100644 --- a/src/Analyzer/Utils.cpp +++ b/src/Analyzer/Utils.cpp @@ -130,6 +130,25 @@ std::string getGlobalInFunctionNameForLocalInFunctionName(const std::string & fu throw Exception(ErrorCodes::BAD_ARGUMENTS, "Invalid local IN function name {}", function_name); } +void makeUniqueColumnNamesInBlock(Block & block) +{ + NameSet block_column_names; + size_t unique_column_name_counter = 1; + + for (auto & column_with_type : block) + { + if (!block_column_names.contains(column_with_type.name)) + { + block_column_names.insert(column_with_type.name); + continue; + } + + column_with_type.name += '_'; + column_with_type.name += std::to_string(unique_column_name_counter); + ++unique_column_name_counter; + } +} + QueryTreeNodePtr buildCastFunction(const QueryTreeNodePtr & expression, const DataTypePtr & type, const ContextPtr & context, diff --git a/src/Analyzer/Utils.h b/src/Analyzer/Utils.h index 9132a1d72bc..e3357c21bf2 100644 --- a/src/Analyzer/Utils.h +++ b/src/Analyzer/Utils.h @@ -22,6 +22,9 @@ bool isNameOfGlobalInFunction(const std::string & function_name); /// Returns global in function name for local in function name std::string getGlobalInFunctionNameForLocalInFunctionName(const std::string & function_name); +/// Add unique suffix to names of duplicate columns in block +void makeUniqueColumnNamesInBlock(Block & block); + /** Build cast function that cast expression into type. * If resolve = true, then result cast function is resolved during build, otherwise * result cast function is not resolved during build. diff --git a/src/Analyzer/WindowNode.cpp b/src/Analyzer/WindowNode.cpp index 3e8537302e5..d516f7a58b8 100644 --- a/src/Analyzer/WindowNode.cpp +++ b/src/Analyzer/WindowNode.cpp @@ -113,11 +113,17 @@ ASTPtr WindowNode::toASTImpl() const window_definition->parent_window_name = parent_window_name; - window_definition->children.push_back(getPartitionByNode()->toAST()); - window_definition->partition_by = window_definition->children.back(); + if (hasPartitionBy()) + { + window_definition->children.push_back(getPartitionByNode()->toAST()); + window_definition->partition_by = window_definition->children.back(); + } - window_definition->children.push_back(getOrderByNode()->toAST()); - window_definition->order_by = window_definition->children.back(); + if (hasOrderBy()) + { + window_definition->children.push_back(getOrderByNode()->toAST()); + window_definition->order_by = window_definition->children.back(); + } window_definition->frame_is_default = window_frame.is_default; window_definition->frame_type = window_frame.type; diff --git a/src/Interpreters/FullSortingMergeJoin.h b/src/Interpreters/FullSortingMergeJoin.h index fa7d0478535..a94d7a7dfc6 100644 --- a/src/Interpreters/FullSortingMergeJoin.h +++ b/src/Interpreters/FullSortingMergeJoin.h @@ -44,6 +44,10 @@ public: const auto & on_expr = table_join->getOnlyClause(); bool support_conditions = !on_expr.on_filter_condition_left && !on_expr.on_filter_condition_right; + if (!on_expr.analyzer_left_filter_condition_column_name.empty() || + !on_expr.analyzer_right_filter_condition_column_name.empty()) + support_conditions = false; + /// Key column can change nullability and it's not handled on type conversion stage, so algorithm should be aware of it bool support_using_and_nulls = !table_join->hasUsing() || !table_join->joinUseNulls(); diff --git a/src/Interpreters/InterpreterSelectQueryAnalyzer.cpp b/src/Interpreters/InterpreterSelectQueryAnalyzer.cpp index 0536ee10f7c..98f70c25dcd 100644 --- a/src/Interpreters/InterpreterSelectQueryAnalyzer.cpp +++ b/src/Interpreters/InterpreterSelectQueryAnalyzer.cpp @@ -226,6 +226,12 @@ BlockIO InterpreterSelectQueryAnalyzer::execute() return result; } +QueryPlan & InterpreterSelectQueryAnalyzer::getQueryPlan() +{ + planner.buildQueryPlanIfNeeded(); + return planner.getQueryPlan(); +} + QueryPlan && InterpreterSelectQueryAnalyzer::extractQueryPlan() && { planner.buildQueryPlanIfNeeded(); diff --git a/src/Interpreters/InterpreterSelectQueryAnalyzer.h b/src/Interpreters/InterpreterSelectQueryAnalyzer.h index 681a9cfe5a3..2c8af49cf0e 100644 --- a/src/Interpreters/InterpreterSelectQueryAnalyzer.h +++ b/src/Interpreters/InterpreterSelectQueryAnalyzer.h @@ -51,6 +51,8 @@ public: BlockIO execute() override; + QueryPlan & getQueryPlan(); + QueryPlan && extractQueryPlan() &&; QueryPipelineBuilder buildQueryPipeline(); diff --git a/src/Planner/Planner.cpp b/src/Planner/Planner.cpp index 2ce470d9ecf..37a4614bad3 100644 --- a/src/Planner/Planner.cpp +++ b/src/Planner/Planner.cpp @@ -214,9 +214,14 @@ public: { /// Constness of limit is validated during query analysis stage limit_length = query_node.getLimit()->as().getValue().safeGet(); - } - if (query_node.hasOffset()) + if (query_node.hasOffset() && limit_length) + { + /// Constness of offset is validated during query analysis stage + limit_offset = query_node.getOffset()->as().getValue().safeGet(); + } + } + else if (query_node.hasOffset()) { /// Constness of offset is validated during query analysis stage limit_offset = query_node.getOffset()->as().getValue().safeGet(); diff --git a/src/Planner/PlannerJoinTree.cpp b/src/Planner/PlannerJoinTree.cpp index edea51aba45..52a3c926f65 100644 --- a/src/Planner/PlannerJoinTree.cpp +++ b/src/Planner/PlannerJoinTree.cpp @@ -465,6 +465,17 @@ JoinTreeQueryPlan buildQueryPlanForTableExpression(QueryTreeNodePtr table_expres { from_stage = storage->getQueryProcessingStage(query_context, select_query_options.to_stage, storage_snapshot, table_expression_query_info); storage->read(query_plan, columns_names, storage_snapshot, table_expression_query_info, query_context, from_stage, max_block_size, max_streams); + + if (query_context->hasQueryContext() && !select_query_options.is_internal) + { + auto local_storage_id = storage->getStorageID(); + query_context->getQueryContext()->addQueryAccessInfo( + backQuoteIfNeed(local_storage_id.getDatabaseName()), + local_storage_id.getFullTableName(), + columns_names, + {}, + {}); + } } if (query_plan.isInitialized()) diff --git a/src/Storages/HDFS/StorageHDFSCluster.cpp b/src/Storages/HDFS/StorageHDFSCluster.cpp index 8dbaa0796e9..a88470d01c7 100644 --- a/src/Storages/HDFS/StorageHDFSCluster.cpp +++ b/src/Storages/HDFS/StorageHDFSCluster.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -83,8 +84,12 @@ Pipe StorageHDFSCluster::read( auto extension = getTaskIteratorExtension(query_info.query, context); /// Calculate the header. This is significant, because some columns could be thrown away in some cases like query with count(*) - Block header = - InterpreterSelectQuery(query_info.query, context, SelectQueryOptions(processed_stage).analyze()).getSampleBlock(); + Block header; + + if (context->getSettingsRef().allow_experimental_analyzer) + header = InterpreterSelectQueryAnalyzer::getSampleBlock(query_info.query, context, SelectQueryOptions(processed_stage).analyze()); + else + header = InterpreterSelectQuery(query_info.query, context, SelectQueryOptions(processed_stage).analyze()).getSampleBlock(); const Scalars & scalars = context->hasQueryContext() ? context->getQueryContext()->getScalars() : Scalars{}; diff --git a/src/Storages/MergeTree/RPNBuilder.cpp b/src/Storages/MergeTree/RPNBuilder.cpp index cee5038ed21..fb3592a1541 100644 --- a/src/Storages/MergeTree/RPNBuilder.cpp +++ b/src/Storages/MergeTree/RPNBuilder.cpp @@ -59,7 +59,7 @@ void appendColumnNameWithoutAlias(const ActionsDAG::Node & node, WriteBuffer & o { auto name = node.function_base->getName(); if (legacy && name == "modulo") - writeCString("moduleLegacy", out); + writeCString("moduloLegacy", out); else writeString(name, out); diff --git a/src/Storages/StorageDistributed.cpp b/src/Storages/StorageDistributed.cpp index a16a98edc0a..77972b67644 100644 --- a/src/Storages/StorageDistributed.cpp +++ b/src/Storages/StorageDistributed.cpp @@ -729,7 +729,7 @@ public: return global_in_or_join_nodes; } - bool needChildVisit(QueryTreeNodePtr & parent, QueryTreeNodePtr & child) + static bool needChildVisit(QueryTreeNodePtr & parent, QueryTreeNodePtr & child) { auto * function_node = parent->as(); if (function_node && isNameOfGlobalInFunction(function_node->getFunctionName())) @@ -856,12 +856,25 @@ QueryTreeNodePtr executeSubqueryNode(const QueryTreeNodePtr & subquery_node, return temporary_table_expression_node; } - auto subquery_ast = subquery_node->toAST(); auto subquery_options = SelectQueryOptions(QueryProcessingStage::Complete, subquery_depth, true /*is_subquery*/); auto context_copy = Context::createCopy(mutable_context); updateContextForSubqueryExecution(context_copy); - InterpreterSelectQueryAnalyzer interpreter(subquery_ast, context_copy, subquery_options); + InterpreterSelectQueryAnalyzer interpreter(subquery_node, context_copy, subquery_options); + auto & query_plan = interpreter.getQueryPlan(); + + auto sample_block_with_unique_names = query_plan.getCurrentDataStream().header; + makeUniqueColumnNamesInBlock(sample_block_with_unique_names); + + if (!blocksHaveEqualStructure(sample_block_with_unique_names, query_plan.getCurrentDataStream().header)) + { + auto actions_dag = ActionsDAG::makeConvertingActions( + query_plan.getCurrentDataStream().header.getColumnsWithTypeAndName(), + sample_block_with_unique_names.getColumnsWithTypeAndName(), + ActionsDAG::MatchColumnsMode::Position); + auto converting_step = std::make_unique(query_plan.getCurrentDataStream(), std::move(actions_dag)); + query_plan.addStep(std::move(converting_step)); + } Block sample = interpreter.getSampleBlock(); NamesAndTypesList columns = sample.getNamesAndTypesList(); @@ -987,6 +1000,10 @@ QueryTreeNodePtr buildQueryTreeDistributed(SelectQueryInfo & query_info, else if (auto * in_function_node = global_in_or_join_node.query_node->as()) { auto & in_function_subquery_node = in_function_node->getArguments().getNodes().at(1); + auto in_function_node_type = in_function_subquery_node->getNodeType(); + if (in_function_node_type != QueryTreeNodeType::QUERY && in_function_node_type != QueryTreeNodeType::UNION) + continue; + auto temporary_table_expression_node = executeSubqueryNode(in_function_subquery_node, planner_context->getMutableQueryContext(), global_in_or_join_node.subquery_depth); diff --git a/src/Storages/StorageS3Cluster.cpp b/src/Storages/StorageS3Cluster.cpp index c7535bb4550..92be3f50150 100644 --- a/src/Storages/StorageS3Cluster.cpp +++ b/src/Storages/StorageS3Cluster.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -102,7 +103,19 @@ Pipe StorageS3Cluster::read( auto extension = getTaskIteratorExtension(query_info.query, context); /// Calculate the header. This is significant, because some columns could be thrown away in some cases like query with count(*) - auto interpreter = InterpreterSelectQuery(query_info.query, context, SelectQueryOptions(processed_stage).analyze()); + + Block sample_block; + ASTPtr query_to_send = query_info.query; + + if (context->getSettingsRef().allow_experimental_analyzer) + { + sample_block = InterpreterSelectQueryAnalyzer::getSampleBlock(query_info.query, context, SelectQueryOptions(processed_stage)); + } + else + { + auto interpreter = InterpreterSelectQuery(query_info.query, context, SelectQueryOptions(processed_stage).analyze()); + query_to_send = interpreter.getQueryInfo().query->clone(); + } const Scalars & scalars = context->hasQueryContext() ? context->getQueryContext()->getScalars() : Scalars{}; @@ -110,7 +123,6 @@ Pipe StorageS3Cluster::read( const bool add_agg_info = processed_stage == QueryProcessingStage::WithMergeableState; - ASTPtr query_to_send = interpreter.getQueryInfo().query->clone(); if (!structure_argument_was_provided) addColumnsStructureToQueryWithClusterEngine( query_to_send, StorageDictionary::generateNamesAndTypesDescription(storage_snapshot->metadata->getColumns().getAll()), 5, getName()); @@ -136,7 +148,7 @@ Pipe StorageS3Cluster::read( shard_info.pool, std::vector{try_result}, queryToString(query_to_send), - interpreter.getSampleBlock(), + sample_block, context, /*throttler=*/nullptr, scalars, diff --git a/src/Storages/StorageView.cpp b/src/Storages/StorageView.cpp index a5c908352ee..7e12a972768 100644 --- a/src/Storages/StorageView.cpp +++ b/src/Storages/StorageView.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include @@ -117,6 +118,10 @@ StorageView::StorageView( SelectQueryDescription description; description.inner_query = query.select->ptr(); + + NormalizeSelectWithUnionQueryVisitor::Data data{SetOperationMode::Unspecified}; + NormalizeSelectWithUnionQueryVisitor{data}.visit(description.inner_query); + is_parameterized_view = query.isParameterizedView(); parameter_types = analyzeReceiveQueryParamsWithType(description.inner_query); storage_metadata.setSelectQuery(description); diff --git a/src/TableFunctions/TableFunctionMerge.cpp b/src/TableFunctions/TableFunctionMerge.cpp index 066caa8170d..586cee54085 100644 --- a/src/TableFunctions/TableFunctionMerge.cpp +++ b/src/TableFunctions/TableFunctionMerge.cpp @@ -53,7 +53,7 @@ std::vector TableFunctionMerge::skipAnalysisForArguments(const QueryTree result.push_back(i); } - return {0}; + return result; } void TableFunctionMerge::parseArguments(const ASTPtr & ast_function, ContextPtr context) diff --git a/src/TableFunctions/TableFunctionURL.cpp b/src/TableFunctions/TableFunctionURL.cpp index 5de6c6b4ccc..cc3a858e4dc 100644 --- a/src/TableFunctions/TableFunctionURL.cpp +++ b/src/TableFunctions/TableFunctionURL.cpp @@ -9,6 +9,8 @@ #include #include #include +#include +#include #include #include #include @@ -26,6 +28,24 @@ namespace ErrorCodes extern const int BAD_ARGUMENTS; } +std::vector TableFunctionURL::skipAnalysisForArguments(const QueryTreeNodePtr & query_node_table_function, ContextPtr) const +{ + auto & table_function_node = query_node_table_function->as(); + auto & table_function_arguments_nodes = table_function_node.getArguments().getNodes(); + size_t table_function_arguments_size = table_function_arguments_nodes.size(); + + std::vector result; + + for (size_t i = 0; i < table_function_arguments_size; ++i) + { + auto * function_node = table_function_arguments_nodes[i]->as(); + if (function_node && function_node->getFunctionName() == "headers") + result.push_back(i); + } + + return result; +} + void TableFunctionURL::parseArguments(const ASTPtr & ast, ContextPtr context) { const auto & ast_function = assert_cast(ast.get()); diff --git a/src/TableFunctions/TableFunctionURL.h b/src/TableFunctions/TableFunctionURL.h index a670bdc0682..dca5123fb69 100644 --- a/src/TableFunctions/TableFunctionURL.h +++ b/src/TableFunctions/TableFunctionURL.h @@ -12,7 +12,7 @@ class Context; /* url(source, format[, structure, compression]) - creates a temporary storage from url. */ -class TableFunctionURL : public ITableFunctionFileLike +class TableFunctionURL final: public ITableFunctionFileLike { public: static constexpr auto name = "url"; @@ -23,10 +23,11 @@ public: ColumnsDescription getActualTableStructure(ContextPtr context) const override; -protected: +private: + std::vector skipAnalysisForArguments(const QueryTreeNodePtr & query_node_table_function, ContextPtr context) const override; + void parseArguments(const ASTPtr & ast, ContextPtr context) override; -private: StoragePtr getStorage( const String & source, const String & format_, const ColumnsDescription & columns, ContextPtr global_context, const std::string & table_name, const String & compression_method_) const override; diff --git a/tests/queries/0_stateless/00378_json_quote_64bit_integers.reference b/tests/queries/0_stateless/00378_json_quote_64bit_integers.reference index 5174c13a9e0..b8d51e5d078 100644 --- a/tests/queries/0_stateless/00378_json_quote_64bit_integers.reference +++ b/tests/queries/0_stateless/00378_json_quote_64bit_integers.reference @@ -48,10 +48,10 @@ { "i0": "0", "u0": "0", - "ip": "9223372036854775807", - "in": "-9223372036854775808", - "up": "18446744073709551615", - "arr": ["0"], + "ip": "0", + "in": "0", + "up": "0", + "arr": [], "tuple": ["0","0"] }, @@ -119,7 +119,7 @@ ["0", "0", "9223372036854775807", "-9223372036854775808", "18446744073709551615", ["0"], ["0","0"]] ], - "totals": ["0", "0", "9223372036854775807", "-9223372036854775808", "18446744073709551615", ["0"], ["0","0"]], + "totals": ["0", "0", "0", "0", "0", [], ["0","0"]], "extremes": { @@ -180,10 +180,10 @@ { "i0": 0, "u0": 0, - "ip": 9223372036854775807, - "in": -9223372036854775808, - "up": 18446744073709551615, - "arr": [0], + "ip": 0, + "in": 0, + "up": 0, + "arr": [], "tuple": [0,0] }, @@ -251,7 +251,7 @@ [0, 0, 9223372036854775807, -9223372036854775808, 18446744073709551615, [0], [0,0]] ], - "totals": [0, 0, 9223372036854775807, -9223372036854775808, 18446744073709551615, [0], [0,0]], + "totals": [0, 0, 0, 0, 0, [], [0,0]], "extremes": { diff --git a/tests/queries/0_stateless/00445_join_nullable_keys.reference b/tests/queries/0_stateless/00445_join_nullable_keys.reference index afc8003910c..cc1c06d593b 100644 --- a/tests/queries/0_stateless/00445_join_nullable_keys.reference +++ b/tests/queries/0_stateless/00445_join_nullable_keys.reference @@ -22,13 +22,13 @@ 13 13 14 14 \N 8 -0 0 -0 2 -0 4 -0 6 -0 8 1 1 3 3 5 5 7 7 9 9 +\N 0 +\N 2 +\N 4 +\N 6 +\N 8 diff --git a/tests/queries/0_stateless/00445_join_nullable_keys.sql b/tests/queries/0_stateless/00445_join_nullable_keys.sql index a0453356e98..774594f90f3 100644 --- a/tests/queries/0_stateless/00445_join_nullable_keys.sql +++ b/tests/queries/0_stateless/00445_join_nullable_keys.sql @@ -1,3 +1,4 @@ +SET allow_experimental_analyzer = 1; SET join_use_nulls = 0; SET any_join_distinct_right_table_keys = 1; diff --git a/tests/queries/0_stateless/00722_inner_join.reference b/tests/queries/0_stateless/00722_inner_join.reference index 86c07e6e84e..b5e8a77a20d 100644 --- a/tests/queries/0_stateless/00722_inner_join.reference +++ b/tests/queries/0_stateless/00722_inner_join.reference @@ -16,24 +16,24 @@ ┌─x──────┬─name─┐ │ system │ one │ └────────┴──────┘ -┌─database─┬─t.name─┐ -│ system │ one │ -└──────────┴────────┘ +┌─database─┬─name─┐ +│ system │ one │ +└──────────┴──────┘ ┌─db.x───┬─name─┐ │ system │ one │ └────────┴──────┘ -┌─db.name─┬─t.name─┐ -│ system │ one │ -└─────────┴────────┘ -┌─db.name─┬─t.name─┐ -│ system │ one │ -└─────────┴────────┘ -┌─t.database─┬─t.name─┐ -│ system │ one │ -└────────────┴────────┘ -┌─database─┬─t.name─┐ -│ system │ one │ -└──────────┴────────┘ +┌─db.name─┬─name─┐ +│ system │ one │ +└─────────┴──────┘ +┌─db.name─┬─name─┐ +│ system │ one │ +└─────────┴──────┘ +┌─database─┬─name─┐ +│ system │ one │ +└──────────┴──────┘ +┌─database─┬─name─┐ +│ system │ one │ +└──────────┴──────┘ 2 2 2 diff --git a/tests/queries/0_stateless/00853_join_with_nulls_crash.reference b/tests/queries/0_stateless/00853_join_with_nulls_crash.reference index 459b73acdbf..5df14d02d5e 100644 --- a/tests/queries/0_stateless/00853_join_with_nulls_crash.reference +++ b/tests/queries/0_stateless/00853_join_with_nulls_crash.reference @@ -15,5 +15,5 @@ bar bar 1 2 String Nullable(String) \N 0 1 String Nullable(String) foo 2 0 String bar 1 2 String -test 0 1 String + 0 1 String 0 1 String diff --git a/tests/queries/0_stateless/00853_join_with_nulls_crash.sql b/tests/queries/0_stateless/00853_join_with_nulls_crash.sql index c63c2d99cba..b620b8a7902 100644 --- a/tests/queries/0_stateless/00853_join_with_nulls_crash.sql +++ b/tests/queries/0_stateless/00853_join_with_nulls_crash.sql @@ -27,7 +27,7 @@ SELECT s1.other, s2.other, count_a, count_b, toTypeName(s1.other), toTypeName(s2 ( SELECT other, count() AS count_a FROM table_a GROUP BY other ) s1 ALL FULL JOIN ( SELECT other, count() AS count_b FROM table_b GROUP BY other ) s2 -USING other +ON s1.other = s2.other ORDER BY s2.other DESC, count_a, s1.other; SELECT s1.something, s2.something, count_a, count_b, toTypeName(s1.something), toTypeName(s2.something) FROM @@ -41,7 +41,7 @@ SELECT s1.something, s2.something, count_a, count_b, toTypeName(s1.something), t ( SELECT something, count() AS count_a FROM table_a GROUP BY something ) s1 ALL RIGHT JOIN ( SELECT something, count() AS count_b FROM table_b GROUP BY something ) s2 -USING (something) +ON s1.something = s2.something ORDER BY count_a DESC, s1.something, s2.something; SET joined_subquery_requires_alias = 0; @@ -50,7 +50,7 @@ SELECT something, count_a, count_b, toTypeName(something) FROM ( SELECT something, count() AS count_a FROM table_a GROUP BY something ) as s1 ALL FULL JOIN ( SELECT something, count() AS count_b FROM table_b GROUP BY something ) as s2 -USING (something) +ON s1.something = s2.something ORDER BY count_a DESC, something DESC; DROP TABLE table_a; diff --git a/tests/queries/0_stateless/01010_pmj_right_table_memory_limits.sql b/tests/queries/0_stateless/01010_pmj_right_table_memory_limits.sql index 7804ce32a5a..f9f30b44700 100644 --- a/tests/queries/0_stateless/01010_pmj_right_table_memory_limits.sql +++ b/tests/queries/0_stateless/01010_pmj_right_table_memory_limits.sql @@ -3,7 +3,10 @@ SET max_memory_usage = 32000000; SET join_on_disk_max_files_to_merge = 4; -SELECT number * 200000 as n, j FROM numbers(5) nums +SELECT n, j FROM +( + SELECT number * 200000 as n FROM numbers(5) +) nums ANY LEFT JOIN ( SELECT number * 2 AS n, number AS j FROM numbers(1000000) @@ -13,14 +16,20 @@ USING n; -- { serverError 241 } SET join_algorithm = 'partial_merge'; SET default_max_bytes_in_join = 0; -SELECT number * 200000 as n, j FROM numbers(5) nums +SELECT n, j FROM +( + SELECT number * 200000 as n FROM numbers(5) +) nums ANY LEFT JOIN ( SELECT number * 2 AS n, number AS j FROM numbers(1000000) ) js2 USING n; -- { serverError 12 } -SELECT number * 200000 as n, j FROM numbers(5) nums +SELECT n, j FROM +( + SELECT number * 200000 as n FROM numbers(5) +) nums ANY LEFT JOIN ( SELECT number * 2 AS n, number AS j FROM numbers(1000000) @@ -28,7 +37,10 @@ ANY LEFT JOIN ( USING n SETTINGS max_bytes_in_join = 30000000; -- { serverError 241 } -SELECT number * 200000 as n, j FROM numbers(5) nums +SELECT n, j FROM +( + SELECT number * 200000 as n FROM numbers(5) +) nums ANY LEFT JOIN ( SELECT number * 2 AS n, number AS j FROM numbers(1000000) @@ -39,7 +51,10 @@ SETTINGS max_bytes_in_join = 10000000; SET partial_merge_join_optimizations = 1; -SELECT number * 200000 as n, j FROM numbers(5) nums +SELECT n, j FROM +( + SELECT number * 200000 as n FROM numbers(5) +) nums LEFT JOIN ( SELECT number * 2 AS n, number AS j FROM numbers(1000000) @@ -50,7 +65,10 @@ SETTINGS max_rows_in_join = 100000; SET default_max_bytes_in_join = 10000000; -SELECT number * 200000 as n, j FROM numbers(5) nums +SELECT n, j FROM +( + SELECT number * 200000 as n FROM numbers(5) +) nums JOIN ( SELECT number * 2 AS n, number AS j FROM numbers(1000000) diff --git a/tests/queries/0_stateless/01056_predicate_optimizer_bugs.reference b/tests/queries/0_stateless/01056_predicate_optimizer_bugs.reference index 7df4dc7ead5..dd52fd1c1b2 100644 --- a/tests/queries/0_stateless/01056_predicate_optimizer_bugs.reference +++ b/tests/queries/0_stateless/01056_predicate_optimizer_bugs.reference @@ -50,12 +50,12 @@ FROM WHERE (co != 0) AND (co2 != 2) 1 0 3 1 1 0 0 1 -SELECT alias AS name +SELECT name FROM ( - SELECT name AS alias + SELECT name FROM system.settings - WHERE alias = \'enable_optimize_predicate_expression\' + WHERE name = \'enable_optimize_predicate_expression\' ) ANY INNER JOIN ( diff --git a/tests/queries/0_stateless/01056_predicate_optimizer_bugs.sql b/tests/queries/0_stateless/01056_predicate_optimizer_bugs.sql index 6d2bb2964d6..f237768bc4c 100644 --- a/tests/queries/0_stateless/01056_predicate_optimizer_bugs.sql +++ b/tests/queries/0_stateless/01056_predicate_optimizer_bugs.sql @@ -12,8 +12,8 @@ EXPLAIN SYNTAX SELECT co,co2,co3,num FROM ( SELECT co,co2,co3,count() AS num FRO SELECT co,co2,co3,num FROM ( SELECT co,co2,co3,count() AS num FROM ( SELECT 1 AS co,2 AS co2 ,3 AS co3 ) GROUP BY cube (co,co2,co3) ) WHERE co!=0 AND co2 !=2; -- https://github.com/ClickHouse/ClickHouse/issues/6734 -EXPLAIN SYNTAX SELECT alias AS name FROM ( SELECT name AS alias FROM system.settings ) ANY INNER JOIN ( SELECT name FROM system.settings ) USING (name) WHERE name = 'enable_optimize_predicate_expression'; -SELECT alias AS name FROM ( SELECT name AS alias FROM system.settings ) ANY INNER JOIN ( SELECT name FROM system.settings ) USING (name) WHERE name = 'enable_optimize_predicate_expression'; +EXPLAIN SYNTAX SELECT name FROM ( SELECT name FROM system.settings ) ANY INNER JOIN ( SELECT name FROM system.settings ) USING (name) WHERE name = 'enable_optimize_predicate_expression'; +SELECT name FROM ( SELECT name FROM system.settings ) ANY INNER JOIN ( SELECT name FROM system.settings ) USING (name) WHERE name = 'enable_optimize_predicate_expression'; -- https://github.com/ClickHouse/ClickHouse/issues/6767 DROP TABLE IF EXISTS t1; diff --git a/tests/queries/0_stateless/01291_aggregation_in_order.reference b/tests/queries/0_stateless/01291_aggregation_in_order.reference index c072a8aed3e..cf058b9f2f5 100644 --- a/tests/queries/0_stateless/01291_aggregation_in_order.reference +++ b/tests/queries/0_stateless/01291_aggregation_in_order.reference @@ -22,8 +22,8 @@ 2 4 109 2 1 619 1 2 537 2 -1 619 1 -2 537 2 +-2 537 2 +-1 619 1 2019-05-05 00:00:00 -45363190 2019-05-05 00:00:00 -1249512288 2019-05-05 00:00:00 345522721 diff --git a/tests/queries/0_stateless/01291_aggregation_in_order.sql b/tests/queries/0_stateless/01291_aggregation_in_order.sql index c4357811520..e93eadc3329 100644 --- a/tests/queries/0_stateless/01291_aggregation_in_order.sql +++ b/tests/queries/0_stateless/01291_aggregation_in_order.sql @@ -14,7 +14,7 @@ SELECT a FROM pk_order GROUP BY a ORDER BY a; SELECT a, b, sum(c), avg(d) FROM pk_order GROUP BY a, b ORDER BY a, b; SELECT a, sum(c), avg(d) FROM pk_order GROUP BY a ORDER BY a; -SELECT a, sum(c), avg(d) FROM pk_order GROUP BY -a ORDER BY a; +SELECT -a, sum(c), avg(d) FROM pk_order GROUP BY -a ORDER BY -a; DROP TABLE IF EXISTS pk_order; @@ -27,7 +27,7 @@ INSERT INTO pk_order set max_block_size = 1; SELECT d, max(b) FROM pk_order GROUP BY d, a ORDER BY d, a LIMIT 5; -SELECT d, avg(a) FROM pk_order GROUP BY toString(d) ORDER BY toString(d) LIMIT 5; +SELECT toString(d), avg(a) FROM pk_order GROUP BY toString(d) ORDER BY toString(d) LIMIT 5; SELECT toStartOfHour(d) as d1, min(a), max(b) FROM pk_order GROUP BY d1 ORDER BY d1 LIMIT 5; DROP TABLE pk_order; diff --git a/tests/queries/0_stateless/01455_opentelemetry_distributed.reference b/tests/queries/0_stateless/01455_opentelemetry_distributed.reference index d48b3738bc2..0729dd7b881 100644 --- a/tests/queries/0_stateless/01455_opentelemetry_distributed.reference +++ b/tests/queries/0_stateless/01455_opentelemetry_distributed.reference @@ -1,10 +1,10 @@ ===http=== -{"query":"select 1 from remote('127.0.0.2', system, one) format Null\n","status":"QueryFinish","tracestate":"some custom state","sorted_by_start_time":1} +{"query":"select 1 from remote('127.0.0.2', system, one) settings allow_experimental_analyzer = 1 format Null\n","status":"QueryFinish","tracestate":"some custom state","sorted_by_start_time":1} {"query":"DESC TABLE system.one","status":"QueryFinish","tracestate":"some custom state","sorted_by_start_time":1} -{"query":"SELECT 1 FROM `system`.`one`","status":"QueryFinish","tracestate":"some custom state","sorted_by_start_time":1} +{"query":"SELECT 1 AS `1` FROM `system`.`one`","status":"QueryFinish","tracestate":"some custom state","sorted_by_start_time":1} {"query":"DESC TABLE system.one","query_status":"QueryFinish","tracestate":"some custom state","sorted_by_finish_time":1} -{"query":"SELECT 1 FROM `system`.`one`","query_status":"QueryFinish","tracestate":"some custom state","sorted_by_finish_time":1} -{"query":"select 1 from remote('127.0.0.2', system, one) format Null\n","query_status":"QueryFinish","tracestate":"some custom state","sorted_by_finish_time":1} +{"query":"SELECT 1 AS `1` FROM `system`.`one`","query_status":"QueryFinish","tracestate":"some custom state","sorted_by_finish_time":1} +{"query":"select 1 from remote('127.0.0.2', system, one) settings allow_experimental_analyzer = 1 format Null\n","query_status":"QueryFinish","tracestate":"some custom state","sorted_by_finish_time":1} {"total spans":"3","unique spans":"3","unique non-zero parent spans":"3"} {"initial query spans with proper parent":"1"} {"unique non-empty tracestate values":"1"} diff --git a/tests/queries/0_stateless/01455_opentelemetry_distributed.sh b/tests/queries/0_stateless/01455_opentelemetry_distributed.sh index b2b5ae89105..0dfec6097db 100755 --- a/tests/queries/0_stateless/01455_opentelemetry_distributed.sh +++ b/tests/queries/0_stateless/01455_opentelemetry_distributed.sh @@ -12,6 +12,7 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) function check_log { ${CLICKHOUSE_CLIENT} --format=JSONEachRow -nq " +set allow_experimental_analyzer = 1; system flush logs; -- Show queries sorted by start time. @@ -55,7 +56,7 @@ select count(*) "'"'"initial query spans with proper parent"'"'" where trace_id = UUIDNumToString(toFixedString(unhex('$trace_id'), 16)) and operation_name = 'query' - and parent_span_id in ( + and parent_span_id in ( select span_id from system.opentelemetry_span_log where trace_id = UUIDNumToString(toFixedString(unhex('$trace_id'), 16)) and parent_span_id = reinterpretAsUInt64(unhex('73')) ) ; @@ -76,7 +77,7 @@ select uniqExact(value) "'"'"unique non-empty tracestate values"'"'" # Generate some random trace id so that the prevous runs of the test do not interfere. echo "===http===" -trace_id=$(${CLICKHOUSE_CLIENT} -q "select lower(hex(reverse(reinterpretAsString(generateUUIDv4()))))") +trace_id=$(${CLICKHOUSE_CLIENT} -q "select lower(hex(reverse(reinterpretAsString(generateUUIDv4())))) settings allow_experimental_analyzer = 1") # Check that the HTTP traceparent is read, and then passed through `remote` # table function. We expect 4 queries -- one initial, one SELECT and two @@ -86,7 +87,7 @@ ${CLICKHOUSE_CURL} \ --header "traceparent: 00-$trace_id-0000000000000073-01" \ --header "tracestate: some custom state" "$CLICKHOUSE_URL" \ --get \ - --data-urlencode "query=select 1 from remote('127.0.0.2', system, one) format Null" + --data-urlencode "query=select 1 from remote('127.0.0.2', system, one) settings allow_experimental_analyzer = 1 format Null" check_log diff --git a/tests/queries/0_stateless/01457_int256_hashing.sql b/tests/queries/0_stateless/01457_int256_hashing.sql index 861e567950a..510d25f6b8c 100644 --- a/tests/queries/0_stateless/01457_int256_hashing.sql +++ b/tests/queries/0_stateless/01457_int256_hashing.sql @@ -1,13 +1,15 @@ -- Tags: no-fasttest +SET joined_subquery_requires_alias = 0; + SELECT toUInt256(123) IN (NULL); SELECT toUInt256(123) AS k GROUP BY k; -SELECT toUInt256(123) AS k FROM system.one INNER JOIN (SELECT toUInt256(123) AS k) t USING k; +SELECT k FROM (SELECT toUInt256(123) AS k FROM system.one) INNER JOIN (SELECT toUInt256(123) AS k) t USING k; SELECT arrayEnumerateUniq([toUInt256(123), toUInt256(456), toUInt256(123)]); SELECT toInt256(123) IN (NULL); SELECT toInt256(123) AS k GROUP BY k; -SELECT toInt256(123) AS k FROM system.one INNER JOIN (SELECT toInt256(123) AS k) t USING k; +SELECT k FROM (SELECT toInt256(123) AS k FROM system.one) INNER JOIN (SELECT toInt256(123) AS k) t USING k; SELECT arrayEnumerateUniq([toInt256(123), toInt256(456), toInt256(123)]); -- SELECT toUInt128(123) IN (NULL); @@ -17,17 +19,17 @@ SELECT arrayEnumerateUniq([toInt256(123), toInt256(456), toInt256(123)]); SELECT toInt128(123) IN (NULL); SELECT toInt128(123) AS k GROUP BY k; -SELECT toInt128(123) AS k FROM system.one INNER JOIN (SELECT toInt128(123) AS k) t USING k; +SELECT k FROM (SELECT toInt128(123) AS k FROM system.one) INNER JOIN (SELECT toInt128(123) AS k) t USING k; SELECT arrayEnumerateUniq([toInt128(123), toInt128(456), toInt128(123)]); SELECT toNullable(toUInt256(321)) IN (NULL); SELECT toNullable(toUInt256(321)) AS k GROUP BY k; -SELECT toNullable(toUInt256(321)) AS k FROM system.one INNER JOIN (SELECT toUInt256(321) AS k) t USING k; +SELECT k FROM (SELECT toNullable(toUInt256(321)) AS k FROM system.one) INNER JOIN (SELECT toUInt256(321) AS k) t USING k; SELECT arrayEnumerateUniq([toNullable(toUInt256(321)), toNullable(toUInt256(456)), toNullable(toUInt256(321))]); SELECT toNullable(toInt256(321)) IN (NULL); SELECT toNullable(toInt256(321)) AS k GROUP BY k; -SELECT toNullable(toInt256(321)) AS k FROM system.one INNER JOIN (SELECT toInt256(321) AS k) t USING k; +SELECT k FROM (SELECT toNullable(toInt256(321)) AS k FROM system.one) INNER JOIN (SELECT toInt256(321) AS k) t USING k; SELECT arrayEnumerateUniq([toNullable(toInt256(321)), toNullable(toInt256(456)), toNullable(toInt256(321))]); -- SELECT toNullable(toUInt128(321)) IN (NULL); @@ -37,5 +39,5 @@ SELECT arrayEnumerateUniq([toNullable(toInt256(321)), toNullable(toInt256(456)), SELECT toNullable(toInt128(321)) IN (NULL); SELECT toNullable(toInt128(321)) AS k GROUP BY k; -SELECT toNullable(toInt128(321)) AS k FROM system.one INNER JOIN (SELECT toInt128(321) AS k) t USING k; +SELECT k FROM (SELECT toNullable(toInt128(321)) AS k FROM system.one) INNER JOIN (SELECT toInt128(321) AS k) t USING k; SELECT arrayEnumerateUniq([toNullable(toInt128(321)), toNullable(toInt128(456)), toNullable(toInt128(321))]); diff --git a/tests/queries/0_stateless/01556_explain_select_with_union_query.reference b/tests/queries/0_stateless/01556_explain_select_with_union_query.reference index c18e6b70b0d..27cf4c129b1 100644 --- a/tests/queries/0_stateless/01556_explain_select_with_union_query.reference +++ b/tests/queries/0_stateless/01556_explain_select_with_union_query.reference @@ -1,180 +1,180 @@ Union - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) Union - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) Distinct Union - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) Distinct Union - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) Distinct Union - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) Distinct Union - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) Union - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) Distinct Union - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) Distinct Union - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) Distinct Union - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) Distinct Union - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) Distinct Union - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) Union - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) Union - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) Union - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) Distinct Union - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) Distinct Union - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) Distinct Union - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) Union - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) Distinct Union - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) Union - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) Union - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) Union - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) - Expression ((Projection + Before ORDER BY)) + Expression ((Project names + (Projection + Change column names to column identifiers))) ReadFromStorage (SystemOne) diff --git a/tests/queries/0_stateless/01562_optimize_monotonous_functions_in_order_by.reference b/tests/queries/0_stateless/01562_optimize_monotonous_functions_in_order_by.reference index 8c8bb73b801..49b4d22ea71 100644 --- a/tests/queries/0_stateless/01562_optimize_monotonous_functions_in_order_by.reference +++ b/tests/queries/0_stateless/01562_optimize_monotonous_functions_in_order_by.reference @@ -4,10 +4,10 @@ SELECT FROM test_order_by ORDER BY timestamp ASC LIMIT 10 -Expression (Projection) +Expression (Project names) Limit (preliminary LIMIT (without OFFSET)) Sorting (Sorting for ORDER BY) - Expression (Before ORDER BY) + Expression ((Before ORDER BY + (Projection + Change column names to column identifiers))) ReadFromMergeTree (default.test_order_by) SELECT timestamp, @@ -15,10 +15,10 @@ SELECT FROM test_order_by ORDER BY toDate(timestamp) ASC LIMIT 10 -Expression (Projection) +Expression (Project names) Limit (preliminary LIMIT (without OFFSET)) Sorting (Sorting for ORDER BY) - Expression (Before ORDER BY) + Expression ((Before ORDER BY + (Projection + Change column names to column identifiers))) ReadFromMergeTree (default.test_order_by) SELECT timestamp, @@ -28,10 +28,10 @@ ORDER BY toDate(timestamp) ASC, timestamp ASC LIMIT 10 -Expression (Projection) +Expression (Project names) Limit (preliminary LIMIT (without OFFSET)) Sorting (Sorting for ORDER BY) - Expression (Before ORDER BY) + Expression ((Before ORDER BY + (Projection + Change column names to column identifiers))) ReadFromMergeTree (default.test_order_by) SELECT timestamp, diff --git a/tests/queries/0_stateless/01596_full_join_chertus.sql b/tests/queries/0_stateless/01596_full_join_chertus.sql index 162b9f7be8f..32911abb792 100644 --- a/tests/queries/0_stateless/01596_full_join_chertus.sql +++ b/tests/queries/0_stateless/01596_full_join_chertus.sql @@ -1,9 +1,9 @@ select toTypeName(materialize(js1.k)), toTypeName(materialize(js2.k)), toTypeName(materialize(js1.s)), toTypeName(materialize(js2.s)) from (select number k, toLowCardinality(toString(number)) s from numbers(2)) as js1 full join (select toLowCardinality(number+1) k, toString(number+1) s from numbers(2)) as js2 -using k order by js1.k, js2.k; +ON js1.k = js2.k order by js1.k, js2.k; select toTypeName(js1.k), toTypeName(js2.k), toTypeName(js1.s), toTypeName(js2.s) from (select number k, toLowCardinality(toString(number)) s from numbers(2)) as js1 full join (select toLowCardinality(number+1) k, toString(number+1) s from numbers(2)) as js2 -using k order by js1.k, js2.k; +ON js1.k = js2.k order by js1.k, js2.k; diff --git a/tests/queries/0_stateless/01911_logical_error_minus.sql b/tests/queries/0_stateless/01911_logical_error_minus.sql index 3dcdedd38f5..7f371a463f8 100644 --- a/tests/queries/0_stateless/01911_logical_error_minus.sql +++ b/tests/queries/0_stateless/01911_logical_error_minus.sql @@ -26,7 +26,7 @@ INSERT INTO codecTest (key, name, ref_valueF64, valueF64, ref_valueF32, valueF32 INSERT INTO codecTest (key, name, ref_valueF64, valueF64, ref_valueF32, valueF32) SELECT number AS n, 'sin(n*n*n)*n', sin(n * n * n * n* n) AS v, v, v, v FROM system.numbers LIMIT 301, 100; -SELECT IF(-2, NULL, 0.00009999999747378752), IF(1048577, 1048576, NULL), c1.key, IF(1, NULL, NULL), c2.key FROM codecTest AS c1 , codecTest AS c2 WHERE ignore(IF(257, -2, NULL), arrayJoin([65537]), IF(3, 1024, 9223372036854775807)) AND IF(NULL, 256, NULL) AND (IF(NULL, '1048576', NULL) = (c1.key - NULL)) LIMIT 65535; +SELECT IF(2, NULL, 0.00009999999747378752), IF(104, 1048576, NULL), c1.key, IF(1, NULL, NULL), c2.key FROM codecTest AS c1 , codecTest AS c2 WHERE ignore(IF(255, -2, NULL), arrayJoin([65537]), IF(3, 1024, 9223372036854775807)) AND IF(NULL, 256, NULL) AND (IF(NULL, '1048576', NULL) = (c1.key - NULL)) LIMIT 65535; SELECT c1.key, c1.name, c1.ref_valueF64, c1.valueF64, c1.ref_valueF64 - c1.valueF64 AS dF64, '', c2.key, c2.ref_valueF64 FROM codecTest AS c1 , codecTest AS c2 WHERE (dF64 != 3) AND c1.valueF64 != 0 AND (c2.key = (c1.key - 1048576)) LIMIT 0; @@ -72,7 +72,7 @@ INSERT INTO codecTest (key, ref_valueU64, valueU64, ref_valueU32, valueU32, ref_ SELECT number as n, n + (rand64() - 9223372036854775807)/1000 as v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, toDateTime(v), toDateTime(v), toDate(v), toDate(v) FROM system.numbers LIMIT 3001, 1000; -SELECT IF(-2, NULL, 0.00009999999747378752), IF(1048577, 1048576, NULL), c1.key, IF(1, NULL, NULL), c2.key FROM codecTest AS c1 , codecTest AS c2 WHERE ignore(IF(257, -2, NULL), arrayJoin([65537]), IF(3, 1024, 9223372036854775807)) AND IF(NULL, 256, NULL) AND (IF(NULL, '1048576', NULL) = (c1.key - NULL)) LIMIT 65535; +SELECT IF(2, NULL, 0.00009999999747378752), IF(104, 1048576, NULL), c1.key, IF(1, NULL, NULL), c2.key FROM codecTest AS c1 , codecTest AS c2 WHERE ignore(IF(255, -2, NULL), arrayJoin([65537]), IF(3, 1024, 9223372036854775807)) AND IF(NULL, 256, NULL) AND (IF(NULL, '1048576', NULL) = (c1.key - NULL)) LIMIT 65535; DROP TABLE codecTest; diff --git a/tests/queries/0_stateless/01913_names_of_tuple_literal.sql b/tests/queries/0_stateless/01913_names_of_tuple_literal.sql index 09de9e8cf37..879f4c91587 100644 --- a/tests/queries/0_stateless/01913_names_of_tuple_literal.sql +++ b/tests/queries/0_stateless/01913_names_of_tuple_literal.sql @@ -1,2 +1,4 @@ +SET allow_experimental_analyzer = 0; + SELECT ((1, 2), (2, 3), (3, 4)) FORMAT TSVWithNames; SELECT ((1, 2), (2, 3), (3, 4)) FORMAT TSVWithNames SETTINGS legacy_column_name_of_tuple_literal = 1; diff --git a/tests/queries/0_stateless/02048_clickhouse_local_stage.reference b/tests/queries/0_stateless/02048_clickhouse_local_stage.reference index 44c39f2a444..676cca1e866 100644 --- a/tests/queries/0_stateless/02048_clickhouse_local_stage.reference +++ b/tests/queries/0_stateless/02048_clickhouse_local_stage.reference @@ -2,13 +2,13 @@ execute: default "foo" 1 execute: --stage fetch_columns -"dummy" +"system.one.dummy_0" 0 execute: --stage with_mergeable_state -"1" +"1_UInt8" 1 execute: --stage with_mergeable_state_after_aggregation -"1" +"1_UInt8" 1 execute: --stage complete "foo" diff --git a/tests/queries/0_stateless/02184_hash_functions_and_ip_types.reference b/tests/queries/0_stateless/02184_hash_functions_and_ip_types.reference index 07705827428..b305806cd08 100644 --- a/tests/queries/0_stateless/02184_hash_functions_and_ip_types.reference +++ b/tests/queries/0_stateless/02184_hash_functions_and_ip_types.reference @@ -1,54 +1,54 @@ Row 1: ────── -ipv4: 1.2.3.4 -halfMD5(toIPv4('1.2.3.4')): 14356538739656272800 -farmFingerprint64(toIPv4('1.2.3.4')): 5715546585361069049 -xxh3(toIPv4('1.2.3.4')): 14355428563589734825 -wyHash64(toIPv4('1.2.3.4')): 13096729196120951355 -xxHash32(toIPv4('1.2.3.4')): 2430391091 -gccMurmurHash(toIPv4('1.2.3.4')): 5478801830569062645 -murmurHash2_32(toIPv4('1.2.3.4')): 1658978282 -javaHashUTF16LE(toIPv4('1.2.3.4')): 24190 -intHash64(toIPv4('1.2.3.4')): 5715546585361069049 -intHash32(toIPv4('1.2.3.4')): 3152671896 -metroHash64(toIPv4('1.2.3.4')): 5715546585361069049 -hex(murmurHash3_128(toIPv4('1.2.3.4'))): 549E9EF692591F6BB55874EF9A0DE88E -jumpConsistentHash(toIPv4('1.2.3.4'), 42): 37 -sipHash64(toIPv4('1.2.3.4')): 10711397536826262068 -hex(sipHash128(toIPv4('1.2.3.4'))): DBB6A76B92B59789EFB42185DC32311D -kostikConsistentHash(toIPv4('1.2.3.4'), 42): 0 -xxHash64(toIPv4('1.2.3.4')): 14496144933713060978 -murmurHash2_64(toIPv4('1.2.3.4')): 10829690723193326442 -cityHash64(toIPv4('1.2.3.4')): 5715546585361069049 -hiveHash(toIPv4('1.2.3.4')): 122110 -murmurHash3_64(toIPv4('1.2.3.4')): 16570805747704317665 -murmurHash3_32(toIPv4('1.2.3.4')): 1165084099 -yandexConsistentHash(toIPv4('1.2.3.4'), 42): 0 +ipv4: 1.2.3.4 +halfMD5(ipv4): 14356538739656272800 +farmFingerprint64(ipv4): 5715546585361069049 +xxh3(ipv4): 14355428563589734825 +wyHash64(ipv4): 13096729196120951355 +xxHash32(ipv4): 2430391091 +gccMurmurHash(ipv4): 5478801830569062645 +murmurHash2_32(ipv4): 1658978282 +javaHashUTF16LE(ipv4): 24190 +intHash64(ipv4): 5715546585361069049 +intHash32(ipv4): 3152671896 +metroHash64(ipv4): 5715546585361069049 +hex(murmurHash3_128(ipv4)): 549E9EF692591F6BB55874EF9A0DE88E +jumpConsistentHash(ipv4, 42): 37 +sipHash64(ipv4): 10711397536826262068 +hex(sipHash128(ipv4)): DBB6A76B92B59789EFB42185DC32311D +kostikConsistentHash(ipv4, 42): 0 +xxHash64(ipv4): 14496144933713060978 +murmurHash2_64(ipv4): 10829690723193326442 +cityHash64(ipv4): 5715546585361069049 +hiveHash(ipv4): 122110 +murmurHash3_64(ipv4): 16570805747704317665 +murmurHash3_32(ipv4): 1165084099 +yandexConsistentHash(ipv4, 42): 0 Row 1: ────── -ipv6: fe80::62:5aff:fed1:daf0 -halfMD5(toIPv6('fe80::62:5aff:fed1:daf0')): 9503062220758009199 -hex(MD4(toIPv6('fe80::62:5aff:fed1:daf0'))): E35A1A4FB3A3953421AB348B2E1A4A1A -hex(MD5(toIPv6('fe80::62:5aff:fed1:daf0'))): 83E1A8BD8AB7456FC229208409F79798 -hex(SHA1(toIPv6('fe80::62:5aff:fed1:daf0'))): A6D5DCE882AC44804382DE4639E6001612E1C8B5 -hex(SHA224(toIPv6('fe80::62:5aff:fed1:daf0'))): F6995FD7BED2BCA21F68DAC6BBABE742DC1BA177BA8594CEF1715C52 -hex(SHA256(toIPv6('fe80::62:5aff:fed1:daf0'))): F75497BAD6F7747BD6B150B6F69BA2DEE354F1C2A34B7BEA6183973B78640250 -hex(SHA512(toIPv6('fe80::62:5aff:fed1:daf0'))): 0C2893CCBF44BC19CCF339AEED5B68CBFD5A2EF38263A48FE21C3379BA4438E7FF7A02F59D7542442C6E6ED538E6D13D65D3573DADB381651D3D8A5DEA232EAC -farmFingerprint64(toIPv6('fe80::62:5aff:fed1:daf0')): 6643158734288374888 -javaHash(toIPv6('fe80::62:5aff:fed1:daf0')): 684606770 -xxh3(toIPv6('fe80::62:5aff:fed1:daf0')): 4051340969481364358 -wyHash64(toIPv6('fe80::62:5aff:fed1:daf0')): 18071806066582739916 -xxHash32(toIPv6('fe80::62:5aff:fed1:daf0')): 3353862080 -gccMurmurHash(toIPv6('fe80::62:5aff:fed1:daf0')): 11049311547848936878 -murmurHash2_32(toIPv6('fe80::62:5aff:fed1:daf0')): 1039121047 -javaHashUTF16LE(toIPv6('fe80::62:5aff:fed1:daf0')): -666938696 -metroHash64(toIPv6('fe80::62:5aff:fed1:daf0')): 15333045864940909774 -hex(sipHash128(toIPv6('fe80::62:5aff:fed1:daf0'))): 31D50562F877B1F92A99B05B646568B7 -hex(murmurHash3_128(toIPv6('fe80::62:5aff:fed1:daf0'))): 6FFEF0C1DF8B5B472FE2EDF0C76C12B9 -sipHash64(toIPv6('fe80::62:5aff:fed1:daf0')): 5681592867096972315 -xxHash64(toIPv6('fe80::62:5aff:fed1:daf0')): 4533874364641685764 -murmurHash2_64(toIPv6('fe80::62:5aff:fed1:daf0')): 11839090601505681839 -cityHash64(toIPv6('fe80::62:5aff:fed1:daf0')): 1599722731594796935 -hiveHash(toIPv6('fe80::62:5aff:fed1:daf0')): 684606770 -murmurHash3_64(toIPv6('fe80::62:5aff:fed1:daf0')): 18323430650022796352 -murmurHash3_32(toIPv6('fe80::62:5aff:fed1:daf0')): 3971193740 +ipv6: fe80::62:5aff:fed1:daf0 +halfMD5(ipv6): 9503062220758009199 +hex(MD4(ipv6)): E35A1A4FB3A3953421AB348B2E1A4A1A +hex(MD5(ipv6)): 83E1A8BD8AB7456FC229208409F79798 +hex(SHA1(ipv6)): A6D5DCE882AC44804382DE4639E6001612E1C8B5 +hex(SHA224(ipv6)): F6995FD7BED2BCA21F68DAC6BBABE742DC1BA177BA8594CEF1715C52 +hex(SHA256(ipv6)): F75497BAD6F7747BD6B150B6F69BA2DEE354F1C2A34B7BEA6183973B78640250 +hex(SHA512(ipv6)): 0C2893CCBF44BC19CCF339AEED5B68CBFD5A2EF38263A48FE21C3379BA4438E7FF7A02F59D7542442C6E6ED538E6D13D65D3573DADB381651D3D8A5DEA232EAC +farmFingerprint64(ipv6): 6643158734288374888 +javaHash(ipv6): 684606770 +xxh3(ipv6): 4051340969481364358 +wyHash64(ipv6): 18071806066582739916 +xxHash32(ipv6): 3353862080 +gccMurmurHash(ipv6): 11049311547848936878 +murmurHash2_32(ipv6): 1039121047 +javaHashUTF16LE(ipv6): -666938696 +metroHash64(ipv6): 15333045864940909774 +hex(sipHash128(ipv6)): 31D50562F877B1F92A99B05B646568B7 +hex(murmurHash3_128(ipv6)): 6FFEF0C1DF8B5B472FE2EDF0C76C12B9 +sipHash64(ipv6): 5681592867096972315 +xxHash64(ipv6): 4533874364641685764 +murmurHash2_64(ipv6): 11839090601505681839 +cityHash64(ipv6): 1599722731594796935 +hiveHash(ipv6): 684606770 +murmurHash3_64(ipv6): 18323430650022796352 +murmurHash3_32(ipv6): 3971193740 diff --git a/tests/queries/0_stateless/02184_hash_functions_and_ip_types.sql b/tests/queries/0_stateless/02184_hash_functions_and_ip_types.sql index 67aae812144..d96574ef4fe 100644 --- a/tests/queries/0_stateless/02184_hash_functions_and_ip_types.sql +++ b/tests/queries/0_stateless/02184_hash_functions_and_ip_types.sql @@ -1,5 +1,7 @@ -- Tags: no-fasttest +SET allow_experimental_analyzer = 1; + SELECT toIPv4('1.2.3.4') AS ipv4, halfMD5(ipv4), diff --git a/tests/queries/0_stateless/02227_union_match_by_name.reference b/tests/queries/0_stateless/02227_union_match_by_name.reference index cebcc42dcba..b2c17142aa6 100644 --- a/tests/queries/0_stateless/02227_union_match_by_name.reference +++ b/tests/queries/0_stateless/02227_union_match_by_name.reference @@ -1,40 +1,52 @@ -- { echo } EXPLAIN header = 1, optimize = 0 SELECT avgWeighted(x, y) FROM (SELECT NULL, 255 AS x, 1 AS y UNION ALL SELECT y, NULL AS x, 1 AS y); -Expression (Projection) +Expression (Project names) Header: avgWeighted(x, y) Nullable(Float64) - Expression (Before ORDER BY) - Header: avgWeighted(x, y) Nullable(Float64) + Expression (Projection) + Header: avgWeighted(x_0, y_1) Nullable(Float64) Aggregating - Header: avgWeighted(x, y) Nullable(Float64) + Header: avgWeighted(x_0, y_1) Nullable(Float64) Expression (Before GROUP BY) - Header: x Nullable(UInt8) - y UInt8 - Union - Header: x Nullable(UInt8) - y UInt8 - Expression (Conversion before UNION) - Header: x Nullable(UInt8) + Header: x_0 Nullable(UInt8) + y_1 UInt8 + Expression (Change column names to column identifiers) + Header: x_0 Nullable(UInt8) + y_1 UInt8 + Union + Header: NULL Nullable(UInt8) + x Nullable(UInt8) y UInt8 - Expression (Projection) - Header: x UInt8 + Expression (Conversion before UNION) + Header: NULL Nullable(UInt8) + x Nullable(UInt8) y UInt8 - Expression (Before ORDER BY) - Header: 255 UInt8 - 1 UInt8 - dummy UInt8 - ReadFromStorage (SystemOne) - Header: dummy UInt8 - Expression (Conversion before UNION) - Header: x Nullable(UInt8) - y UInt8 - Expression (Projection) - Header: x Nullable(Nothing) + Expression (Project names) + Header: NULL Nullable(Nothing) + x UInt8 + y UInt8 + Expression (Projection) + Header: NULL_Nullable(Nothing) Nullable(Nothing) + 255_UInt8 UInt8 + 1_UInt8 UInt8 + Expression (Change column names to column identifiers) + Header: system.one.dummy_0 UInt8 + ReadFromStorage (SystemOne) + Header: dummy UInt8 + Expression (Conversion before UNION) + Header: NULL Nullable(UInt8) + x Nullable(UInt8) y UInt8 - Expression (Before ORDER BY) - Header: 1 UInt8 - NULL Nullable(Nothing) - dummy UInt8 - ReadFromStorage (SystemOne) - Header: dummy UInt8 + Expression (Project names) + Header: y UInt8 + x Nullable(Nothing) + y UInt8 + Expression (Projection) + Header: 1_UInt8 UInt8 + NULL_Nullable(Nothing) Nullable(Nothing) + 1_UInt8 UInt8 + Expression (Change column names to column identifiers) + Header: system.one.dummy_0 UInt8 + ReadFromStorage (SystemOne) + Header: dummy UInt8 SELECT avgWeighted(x, y) FROM (SELECT NULL, 255 AS x, 1 AS y UNION ALL SELECT y, NULL AS x, 1 AS y); 255 diff --git a/tests/queries/0_stateless/02294_nothing_arguments_in_functions_errors.sh b/tests/queries/0_stateless/02294_nothing_arguments_in_functions_errors.sh index 931985340c2..8c526cd8da8 100755 --- a/tests/queries/0_stateless/02294_nothing_arguments_in_functions_errors.sh +++ b/tests/queries/0_stateless/02294_nothing_arguments_in_functions_errors.sh @@ -5,6 +5,6 @@ CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) . "$CUR_DIR"/../shell_config.sh $CLICKHOUSE_LOCAL -q "SELECT assumeNotNull(NULL)" 2>&1 | grep -q "ILLEGAL_COLUMN" && echo "OK" || echo "FAIL" -$CLICKHOUSE_LOCAL -q "SELECT assumeNotNull(materialize(NULL))" 2>&1 | grep -q "ILLEGAL_TYPE_OF_ARGUMENT" && echo "OK" || echo "FAIL" -$CLICKHOUSE_LOCAL -q "SELECT assumeNotNull(materialize(NULL)) from numbers(10)" 2>&1 | grep -q "ILLEGAL_TYPE_OF_ARGUMENT" && echo "OK" || echo "FAIL" +$CLICKHOUSE_LOCAL -q "SELECT assumeNotNull(materialize(NULL)) SETTINGS allow_experimental_analyzer = 1" 2>&1 | grep -q "ILLEGAL_COLUMN" && echo "OK" || echo "FAIL" +$CLICKHOUSE_LOCAL -q "SELECT assumeNotNull(materialize(NULL)) from numbers(10) SETTINGS allow_experimental_analyzer = 1" 2>&1 | grep -q "ILLEGAL_COLUMN" && echo "OK" || echo "FAIL" diff --git a/tests/queries/0_stateless/02303_query_kind.reference b/tests/queries/0_stateless/02303_query_kind.reference index 163f8b0ed5e..b6acf3d2ee1 100644 --- a/tests/queries/0_stateless/02303_query_kind.reference +++ b/tests/queries/0_stateless/02303_query_kind.reference @@ -1,36 +1,36 @@ clickhouse-client --query_kind secondary_query -q explain plan header=1 select toString(dummy) as dummy from system.one group by dummy -Expression ((Projection + Before ORDER BY)) +Expression ((Project names + Projection)) Header: dummy String Aggregating - Header: toString(dummy) String - Expression (Before GROUP BY) - Header: toString(dummy) String + Header: toString(system.one.dummy_0) String + Expression ((Before GROUP BY + Change column names to column identifiers)) + Header: toString(system.one.dummy_0) String ReadFromStorage (SystemOne) Header: dummy UInt8 clickhouse-local --query_kind secondary_query -q explain plan header=1 select toString(dummy) as dummy from system.one group by dummy -Expression ((Projection + Before ORDER BY)) +Expression ((Project names + Projection)) Header: dummy String Aggregating - Header: toString(dummy) String - Expression (Before GROUP BY) - Header: toString(dummy) String + Header: toString(system.one.dummy_0) String + Expression ((Before GROUP BY + Change column names to column identifiers)) + Header: toString(system.one.dummy_0) String ReadFromStorage (SystemOne) Header: dummy UInt8 clickhouse-client --query_kind initial_query -q explain plan header=1 select toString(dummy) as dummy from system.one group by dummy -Expression ((Projection + Before ORDER BY)) +Expression ((Project names + Projection)) Header: dummy String Aggregating - Header: toString(dummy) String - Expression (Before GROUP BY) - Header: toString(dummy) String + Header: toString(system.one.dummy_0) String + Expression ((Before GROUP BY + Change column names to column identifiers)) + Header: toString(system.one.dummy_0) String ReadFromStorage (SystemOne) Header: dummy UInt8 clickhouse-local --query_kind initial_query -q explain plan header=1 select toString(dummy) as dummy from system.one group by dummy -Expression ((Projection + Before ORDER BY)) +Expression ((Project names + Projection)) Header: dummy String Aggregating - Header: toString(dummy) String - Expression (Before GROUP BY) - Header: toString(dummy) String + Header: toString(system.one.dummy_0) String + Expression ((Before GROUP BY + Change column names to column identifiers)) + Header: toString(system.one.dummy_0) String ReadFromStorage (SystemOne) Header: dummy UInt8 diff --git a/tests/queries/0_stateless/02381_join_dup_columns_in_plan.reference b/tests/queries/0_stateless/02381_join_dup_columns_in_plan.reference index bbf288c45d7..31a37862663 100644 --- a/tests/queries/0_stateless/02381_join_dup_columns_in_plan.reference +++ b/tests/queries/0_stateless/02381_join_dup_columns_in_plan.reference @@ -2,51 +2,51 @@ Expression Header: key String value String Join - Header: key String - value String + Header: s1.key_0 String + s2.value_1 String Expression - Header: key String + Header: s1.key_0 String ReadFromStorage Header: dummy UInt8 Union - Header: s2.key String - value String + Header: s2.key_2 String + s2.value_1 String Expression - Header: s2.key String - value String + Header: s2.key_2 String + s2.value_1 String ReadFromStorage Header: dummy UInt8 Expression - Header: s2.key String - value String + Header: s2.key_2 String + s2.value_1 String ReadFromStorage Header: dummy UInt8 Expression Header: key String value String Join - Header: key String - s2.key String - value String + Header: s1.key_0 String + s2.key_2 String + s2.value_1 String Sorting - Header: key String + Header: s1.key_0 String Expression - Header: key String + Header: s1.key_0 String ReadFromStorage Header: dummy UInt8 Sorting - Header: s2.key String - value String + Header: s2.key_2 String + s2.value_1 String Union - Header: s2.key String - value String + Header: s2.key_2 String + s2.value_1 String Expression - Header: s2.key String - value String + Header: s2.key_2 String + s2.value_1 String ReadFromStorage Header: dummy UInt8 Expression - Header: s2.key String - value String + Header: s2.key_2 String + s2.value_1 String ReadFromStorage Header: dummy UInt8 diff --git a/tests/queries/0_stateless/02402_external_disk_mertrics.sql b/tests/queries/0_stateless/02402_external_disk_mertrics.sql index b675c05f45c..e9696eb7122 100644 --- a/tests/queries/0_stateless/02402_external_disk_mertrics.sql +++ b/tests/queries/0_stateless/02402_external_disk_mertrics.sql @@ -20,7 +20,8 @@ SET join_algorithm = 'partial_merge'; SET default_max_bytes_in_join = 0; SET max_bytes_in_join = 10000000; -SELECT number * 200000 as n, j * 2097152 FROM numbers(5) nums +SELECT n, j * 2097152 FROM +(SELECT number * 200000 as n FROM numbers(5)) nums ANY LEFT JOIN ( SELECT number * 2 AS n, number AS j FROM numbers(1000000) ) js2 USING n ORDER BY n diff --git a/tests/queries/0_stateless/02451_order_by_monotonic.reference b/tests/queries/0_stateless/02451_order_by_monotonic.reference index d3de324a7e1..37256be556e 100644 --- a/tests/queries/0_stateless/02451_order_by_monotonic.reference +++ b/tests/queries/0_stateless/02451_order_by_monotonic.reference @@ -4,19 +4,19 @@ 2022-09-09 12:00:00 0x 2022-09-09 12:00:00 1 2022-09-09 12:00:00 1x - Prefix sort description: toStartOfMinute(t) ASC - Result sort description: toStartOfMinute(t) ASC, c1 ASC - Prefix sort description: toStartOfMinute(t) ASC - Result sort description: toStartOfMinute(t) ASC - Prefix sort description: negate(a) ASC - Result sort description: negate(a) ASC - Prefix sort description: negate(a) ASC, negate(b) ASC - Result sort description: negate(a) ASC, negate(b) ASC - Prefix sort description: a DESC, negate(b) ASC - Result sort description: a DESC, negate(b) ASC - Prefix sort description: negate(a) ASC, b DESC - Result sort description: negate(a) ASC, b DESC - Prefix sort description: negate(a) ASC - Result sort description: negate(a) ASC, b ASC - Prefix sort description: a ASC - Result sort description: a ASC, negate(b) ASC + Prefix sort description: toStartOfMinute(test.t_order_by_monotonic.t_0) ASC + Result sort description: toStartOfMinute(test.t_order_by_monotonic.t_0) ASC, test.t_order_by_monotonic.c1_1 ASC + Prefix sort description: toStartOfMinute(test.t_order_by_monotonic.t_0) ASC + Result sort description: toStartOfMinute(test.t_order_by_monotonic.t_0) ASC + Prefix sort description: negate(test.t_order_by_monotonic.a_0) ASC + Result sort description: negate(test.t_order_by_monotonic.a_0) ASC + Prefix sort description: negate(test.t_order_by_monotonic.a_0) ASC, negate(test.t_order_by_monotonic.b_1) ASC + Result sort description: negate(test.t_order_by_monotonic.a_0) ASC, negate(test.t_order_by_monotonic.b_1) ASC + Prefix sort description: test.t_order_by_monotonic.a_0 DESC, negate(test.t_order_by_monotonic.b_1) ASC + Result sort description: test.t_order_by_monotonic.a_0 DESC, negate(test.t_order_by_monotonic.b_1) ASC + Prefix sort description: negate(test.t_order_by_monotonic.a_0) ASC, test.t_order_by_monotonic.b_1 DESC + Result sort description: negate(test.t_order_by_monotonic.a_0) ASC, test.t_order_by_monotonic.b_1 DESC + Prefix sort description: negate(test.t_order_by_monotonic.a_0) ASC + Result sort description: negate(test.t_order_by_monotonic.a_0) ASC, test.t_order_by_monotonic.b_1 ASC + Prefix sort description: test.t_order_by_monotonic.a_0 ASC + Result sort description: test.t_order_by_monotonic.a_0 ASC, negate(test.t_order_by_monotonic.b_1) ASC diff --git a/tests/queries/0_stateless/02521_cannot-find-column-in-projection.reference b/tests/queries/0_stateless/02521_cannot-find-column-in-projection.reference deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/queries/0_stateless/02521_cannot-find-column-in-projection.sql b/tests/queries/0_stateless/02521_cannot-find-column-in-projection.sql deleted file mode 100644 index 31602c5bae2..00000000000 --- a/tests/queries/0_stateless/02521_cannot-find-column-in-projection.sql +++ /dev/null @@ -1,3 +0,0 @@ -create table test(day Date, id UInt32) engine=MergeTree partition by day order by tuple(); -insert into test select toDate('2023-01-05') AS day, number from numbers(10); -with toUInt64(id) as id_with select day, count(id_with) from test where day >= '2023-01-01' group by day limit 1000; -- { serverError NOT_FOUND_COLUMN_IN_BLOCK } diff --git a/tests/queries/0_stateless/02521_cannot_find_column_in_projection.reference b/tests/queries/0_stateless/02521_cannot_find_column_in_projection.reference new file mode 100644 index 00000000000..2cd767c8054 --- /dev/null +++ b/tests/queries/0_stateless/02521_cannot_find_column_in_projection.reference @@ -0,0 +1 @@ +2023-01-05 10 diff --git a/tests/queries/0_stateless/02521_cannot_find_column_in_projection.sql b/tests/queries/0_stateless/02521_cannot_find_column_in_projection.sql new file mode 100644 index 00000000000..255c6f56ab3 --- /dev/null +++ b/tests/queries/0_stateless/02521_cannot_find_column_in_projection.sql @@ -0,0 +1,7 @@ +SET allow_experimental_analyzer = 1; + +drop table if exists test; +create table test(day Date, id UInt32) engine=MergeTree partition by day order by tuple(); +insert into test select toDate('2023-01-05') AS day, number from numbers(10); +with toUInt64(id) as id_with select day, count(id_with) from test where day >= '2023-01-01' group by day limit 1000; +drop table test; diff --git a/tests/queries/0_stateless/02579_fill_empty_chunk.sql b/tests/queries/0_stateless/02579_fill_empty_chunk.sql index 14ae322d8c9..cbdbd7a9f84 100644 --- a/tests/queries/0_stateless/02579_fill_empty_chunk.sql +++ b/tests/queries/0_stateless/02579_fill_empty_chunk.sql @@ -1,5 +1,7 @@ -- this SELECT produces empty chunk in FillingTransform +SET enable_positional_arguments = 0; + SELECT 2 AS x, arrayJoin([NULL, NULL, NULL]) From 3d342479989c764e26d377cf55d34d76c83b2728 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Sun, 5 Mar 2023 21:45:53 +0100 Subject: [PATCH 705/841] Fixed tests --- .../OptimizeGroupByFunctionKeysPass.cpp | 4 +- src/Analyzer/Passes/QueryAnalysisPass.cpp | 101 ++++++++++++++++-- src/Analyzer/Utils.cpp | 22 ++++ src/Analyzer/Utils.h | 5 +- src/Analyzer/ValidationUtils.cpp | 49 +++++++++ src/Analyzer/ValidationUtils.h | 7 ++ src/Functions/FunctionFile.cpp | 2 + src/Planner/PlannerJoins.cpp | 3 + src/Planner/Utils.cpp | 21 ---- src/Planner/Utils.h | 3 - .../MergeTree/MergeTreeIndexInverted.cpp | 4 +- .../00848_join_use_nulls_segfault.reference | 24 ++--- .../00848_join_use_nulls_segfault.sql | 17 +-- .../00988_expansion_aliases_limit.sql | 4 +- .../01018_ambiguous_column.reference | 9 +- .../0_stateless/01018_ambiguous_column.sql | 12 ++- ...invalidate_query_switchover_long.reference | 2 +- ...ionary_invalidate_query_switchover_long.sh | 2 +- .../01561_clickhouse_client_stage.reference | 6 +- .../01591_window_functions.reference | 24 ++--- .../0_stateless/01823_explain_json.reference | 30 +++--- .../queries/0_stateless/01823_explain_json.sh | 17 +-- ...t_if_condition_and_not_existing_column.sql | 4 +- .../02160_untuple_exponential_growth.sh | 4 +- .../02174_cte_scalar_cache.reference | 6 +- .../0_stateless/02174_cte_scalar_cache.sql | 2 + ...2483_cuturlparameter_with_arrays.reference | 8 +- .../02483_cuturlparameter_with_arrays.sql | 3 + .../02494_query_cache_explain.reference | 4 +- .../0_stateless/02494_query_cache_explain.sql | 1 + .../02567_and_consistency.reference | 2 - .../0_stateless/02567_and_consistency.sql | 21 ---- 32 files changed, 277 insertions(+), 146 deletions(-) diff --git a/src/Analyzer/Passes/OptimizeGroupByFunctionKeysPass.cpp b/src/Analyzer/Passes/OptimizeGroupByFunctionKeysPass.cpp index f6c4d2bc15d..c97645219da 100644 --- a/src/Analyzer/Passes/OptimizeGroupByFunctionKeysPass.cpp +++ b/src/Analyzer/Passes/OptimizeGroupByFunctionKeysPass.cpp @@ -69,8 +69,7 @@ private: for (auto it = function_arguments.rbegin(); it != function_arguments.rend(); ++it) candidates.push_back({ *it, is_deterministic }); - // Using DFS we traverse function tree and try to find if it uses other keys as function arguments. - // TODO: Also process CONSTANT here. We can simplify GROUP BY x, x + 1 to GROUP BY x. + /// Using DFS we traverse function tree and try to find if it uses other keys as function arguments. while (!candidates.empty()) { auto [candidate, parents_are_only_deterministic] = candidates.back(); @@ -108,6 +107,7 @@ private: return false; } } + return true; } diff --git a/src/Analyzer/Passes/QueryAnalysisPass.cpp b/src/Analyzer/Passes/QueryAnalysisPass.cpp index 7d60b843694..8dc0b771cf2 100644 --- a/src/Analyzer/Passes/QueryAnalysisPass.cpp +++ b/src/Analyzer/Passes/QueryAnalysisPass.cpp @@ -193,13 +193,9 @@ namespace ErrorCodes * lookup should not be continued, and exception must be thrown because if lookup continues identifier can be resolved from parent scope. * * TODO: Update exception messages - * TODO: JOIN TREE subquery constant columns * TODO: Table identifiers with optional UUID. * TODO: Lookup functions arrayReduce(sum, [1, 2, 3]); - * TODO: SELECT (compound_expression).*, (compound_expression).COLUMNS are not supported on parser level. - * TODO: SELECT a.b.c.*, a.b.c.COLUMNS. Qualified matcher where identifier size is greater than 2 are not supported on parser level. * TODO: Support function identifier resolve from parent query scope, if lambda in parent scope does not capture any columns. - * TODO: Scalar subqueries cache. */ namespace @@ -1336,6 +1332,9 @@ private: /// Global resolve expression node to projection names map std::unordered_map resolved_expressions; + /// Global resolve expression node to tree size + std::unordered_map node_to_tree_size; + /// Global scalar subquery to scalar value map std::unordered_map scalar_subquery_to_scalar_value; @@ -1864,7 +1863,10 @@ void QueryAnalyzer::evaluateScalarSubqueryIfNeeded(QueryTreeNodePtr & node, Iden Block scalar_block; - QueryTreeNodePtrWithHash node_with_hash(node); + auto node_without_alias = node->clone(); + node_without_alias->removeAlias(); + + QueryTreeNodePtrWithHash node_with_hash(node_without_alias); auto scalar_value_it = scalar_subquery_to_scalar_value.find(node_with_hash); if (scalar_value_it != scalar_subquery_to_scalar_value.end()) @@ -2334,7 +2336,13 @@ QueryTreeNodePtr QueryAnalyzer::tryResolveTableIdentifierFromDatabaseCatalog(con storage_id = context->resolveStorageID(storage_id); bool is_temporary_table = storage_id.getDatabaseName() == DatabaseCatalog::TEMPORARY_DATABASE; - auto storage = DatabaseCatalog::instance().tryGetTable(storage_id, context); + StoragePtr storage; + + if (is_temporary_table) + storage = DatabaseCatalog::instance().getTable(storage_id, context); + else + storage = DatabaseCatalog::instance().tryGetTable(storage_id, context); + if (!storage) return {}; @@ -3007,11 +3015,39 @@ QueryTreeNodePtr QueryAnalyzer::tryResolveIdentifierFromJoin(const IdentifierLoo resolved_identifier = std::move(result_column_node); } - else if (scope.joins_count == 1 && scope.context->getSettingsRef().single_join_prefer_left_table) + else if (left_resolved_identifier->isEqual(*right_resolved_identifier, IQueryTreeNode::CompareOptions{.compare_aliases = false})) { + const auto & identifier_path_part = identifier_lookup.identifier.front(); + auto * left_resolved_identifier_column = left_resolved_identifier->as(); + auto * right_resolved_identifier_column = right_resolved_identifier->as(); + + if (left_resolved_identifier_column && right_resolved_identifier_column) + { + const auto & left_column_source_alias = left_resolved_identifier_column->getColumnSource()->getAlias(); + const auto & right_column_source_alias = right_resolved_identifier_column->getColumnSource()->getAlias(); + + /** If column from right table was resolved using alias, we prefer column from right table. + * + * Example: SELECT dummy FROM system.one JOIN system.one AS A ON A.dummy = system.one.dummy; + * + * If alias is specified for left table, and alias is not specified for right table and identifier was resolved + * without using left table alias, we prefer column from right table. + * + * Example: SELECT dummy FROM system.one AS A JOIN system.one ON A.dummy = system.one.dummy; + * + * Otherwise we prefer column from left table. + */ + if (identifier_path_part == right_column_source_alias) + return right_resolved_identifier; + else if (!left_column_source_alias.empty() && + right_column_source_alias.empty() && + identifier_path_part != left_column_source_alias) + return right_resolved_identifier; + } + return left_resolved_identifier; } - else if (left_resolved_identifier->isEqual(*right_resolved_identifier, IQueryTreeNode::CompareOptions{.compare_aliases = false})) + else if (scope.joins_count == 1 && scope.context->getSettingsRef().single_join_prefer_left_table) { return left_resolved_identifier; } @@ -4455,6 +4491,7 @@ ProjectionNames QueryAnalyzer::resolveFunction(QueryTreeNodePtr & node, Identifi bool is_special_function_dict_get = false; bool is_special_function_join_get = false; bool is_special_function_exists = false; + bool is_special_function_if = false; if (!lambda_expression_untyped) { @@ -4462,6 +4499,7 @@ ProjectionNames QueryAnalyzer::resolveFunction(QueryTreeNodePtr & node, Identifi is_special_function_dict_get = functionIsDictGet(function_name); is_special_function_join_get = functionIsJoinGet(function_name); is_special_function_exists = function_name == "exists"; + is_special_function_if = function_name == "if"; auto function_name_lowercase = Poco::toLower(function_name); @@ -4560,6 +4598,38 @@ ProjectionNames QueryAnalyzer::resolveFunction(QueryTreeNodePtr & node, Identifi is_special_function_in = true; } + if (is_special_function_if && !function_node_ptr->getArguments().getNodes().empty()) + { + /** Handle special case with constant If function, even if some of the arguments are invalid. + * + * SELECT if(hasColumnInTable('system', 'numbers', 'not_existing_column'), not_existing_column, 5) FROM system.numbers; + */ + auto & if_function_arguments = function_node_ptr->getArguments().getNodes(); + auto if_function_condition = if_function_arguments[0]; + resolveExpressionNode(if_function_condition, scope, false /*allow_lambda_expression*/, false /*allow_table_expression*/); + + QueryTreeNodePtr constant_if_result_node; + auto constant_condition = tryExtractConstantFromConditionNode(if_function_condition); + + if (constant_condition.has_value() && if_function_arguments.size() == 3) + { + if (*constant_condition) + constant_if_result_node = if_function_arguments[1]; + else + constant_if_result_node = if_function_arguments[2]; + } + + if (constant_if_result_node) + { + auto result_projection_names = resolveExpressionNode(constant_if_result_node, + scope, + false /*allow_lambda_expression*/, + false /*allow_table_expression*/); + node = std::move(constant_if_result_node); + return result_projection_names; + } + } + /// Resolve function arguments bool allow_table_expressions = is_special_function_in; @@ -5422,9 +5492,9 @@ ProjectionNames QueryAnalyzer::resolveExpressionNode(QueryTreeNodePtr & node, Id } } - if (node - && scope.nullable_group_by_keys.contains(node) - && !scope.expressions_in_resolve_process_stack.hasAggregateFunction()) + validateTreeSize(node, scope.context->getSettingsRef().max_expanded_ast_elements, node_to_tree_size); + + if (scope.nullable_group_by_keys.contains(node) && !scope.expressions_in_resolve_process_stack.hasAggregateFunction()) { node = node->clone(); node->convertToNullable(); @@ -6746,6 +6816,15 @@ void QueryAnalyzer::resolveQuery(const QueryTreeNodePtr & query_node, Identifier validateAggregates(query_node, { .group_by_use_nulls = scope.group_by_use_nulls }); + for (const auto & column : projection_columns) + { + if (isNotCreatable(column.type->getTypeId())) + throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, + "Invalid projection column with type {}. In scope {}", + column.type->getName(), + scope.scope_node->formatASTForErrorMessage()); + } + /** WITH section can be safely removed, because WITH section only can provide aliases to query expressions * and CTE for other sections to use. * diff --git a/src/Analyzer/Utils.cpp b/src/Analyzer/Utils.cpp index 16f2e5b75e6..eb7aceef1e8 100644 --- a/src/Analyzer/Utils.cpp +++ b/src/Analyzer/Utils.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -172,6 +173,27 @@ QueryTreeNodePtr buildCastFunction(const QueryTreeNodePtr & expression, return cast_function_node; } +std::optional tryExtractConstantFromConditionNode(const QueryTreeNodePtr & condition_node) +{ + const auto * constant_node = condition_node->as(); + if (!constant_node) + return {}; + + const auto & value = constant_node->getValue(); + auto constant_type = constant_node->getResultType(); + constant_type = removeNullable(removeLowCardinality(constant_type)); + + auto which_constant_type = WhichDataType(constant_type); + if (!which_constant_type.isUInt8() && !which_constant_type.isNothing()) + return {}; + + if (value.isNull()) + return false; + + UInt8 predicate_value = value.safeGet(); + return predicate_value > 0; +} + static ASTPtr convertIntoTableExpressionAST(const QueryTreeNodePtr & table_expression_node) { ASTPtr table_expression_node_ast; diff --git a/src/Analyzer/Utils.h b/src/Analyzer/Utils.h index e3357c21bf2..5802c86c462 100644 --- a/src/Analyzer/Utils.h +++ b/src/Analyzer/Utils.h @@ -19,7 +19,7 @@ bool isNameOfLocalInFunction(const std::string & function_name); /// Returns true if function name is name of global IN function or its variations, false otherwise bool isNameOfGlobalInFunction(const std::string & function_name); -/// Returns global in function name for local in function name +/// Returns global IN function name for local IN function name std::string getGlobalInFunctionNameForLocalInFunctionName(const std::string & function_name); /// Add unique suffix to names of duplicate columns in block @@ -34,6 +34,9 @@ QueryTreeNodePtr buildCastFunction(const QueryTreeNodePtr & expression, const ContextPtr & context, bool resolve = true); +/// Try extract boolean constant from condition node +std::optional tryExtractConstantFromConditionNode(const QueryTreeNodePtr & condition_node); + /** Add table expression in tables in select query children. * If table expression node is not of identifier node, table node, query node, table function node, join node or array join node type throws logical error exception. */ diff --git a/src/Analyzer/ValidationUtils.cpp b/src/Analyzer/ValidationUtils.cpp index 8ccecc9769c..d70ed1170fc 100644 --- a/src/Analyzer/ValidationUtils.cpp +++ b/src/Analyzer/ValidationUtils.cpp @@ -16,6 +16,7 @@ namespace ErrorCodes { extern const int NOT_AN_AGGREGATE; extern const int NOT_IMPLEMENTED; + extern const int BAD_ARGUMENTS; } class ValidateGroupByColumnsVisitor : public ConstInDepthQueryTreeVisitor @@ -283,4 +284,52 @@ void assertNoFunctionNodes(const QueryTreeNodePtr & node, visitor.visit(node); } +void validateTreeSize(const QueryTreeNodePtr & node, + size_t max_size, + std::unordered_map & node_to_tree_size) +{ + size_t tree_size = 0; + std::vector> nodes_to_process; + nodes_to_process.emplace_back(node, false); + + while (!nodes_to_process.empty()) + { + const auto [node_to_process, processed_children] = nodes_to_process.back(); + nodes_to_process.pop_back(); + + if (processed_children) + { + ++tree_size; + node_to_tree_size.emplace(node_to_process, tree_size); + continue; + } + + auto node_to_size_it = node_to_tree_size.find(node_to_process); + if (node_to_size_it != node_to_tree_size.end()) + { + tree_size += node_to_size_it->second; + continue; + } + + nodes_to_process.emplace_back(node_to_process, true); + + for (const auto & node_to_process_child : node_to_process->getChildren()) + { + if (!node_to_process_child) + continue; + + nodes_to_process.emplace_back(node_to_process_child, false); + } + + auto * constant_node = node_to_process->as(); + if (constant_node && constant_node->hasSourceExpression()) + nodes_to_process.emplace_back(constant_node->getSourceExpression(), false); + } + + if (tree_size > max_size) + throw Exception(ErrorCodes::BAD_ARGUMENTS, + "Query tree is too big. Maximum: {}", + max_size); +} + } diff --git a/src/Analyzer/ValidationUtils.h b/src/Analyzer/ValidationUtils.h index b8ba6b8cc10..8abd458e77c 100644 --- a/src/Analyzer/ValidationUtils.h +++ b/src/Analyzer/ValidationUtils.h @@ -31,4 +31,11 @@ void assertNoFunctionNodes(const QueryTreeNodePtr & node, std::string_view exception_function_name, std::string_view exception_place_message); +/** Validate tree size. If size of tree is greater than max size throws exception. + * Additionally for each node in tree, update node to tree size map. + */ +void validateTreeSize(const QueryTreeNodePtr & node, + size_t max_size, + std::unordered_map & node_to_tree_size); + } diff --git a/src/Functions/FunctionFile.cpp b/src/Functions/FunctionFile.cpp index 240732965f4..fa7dda82e1c 100644 --- a/src/Functions/FunctionFile.cpp +++ b/src/Functions/FunctionFile.cpp @@ -38,6 +38,8 @@ public: String getName() const override { return name; } size_t getNumberOfArguments() const override { return 0; } bool isSuitableForShortCircuitArgumentsExecution(const DataTypesWithConstInfo & /*arguments*/) const override { return true; } + bool isDeterministic() const override { return false; } + bool isDeterministicInScopeOfQuery() const override { return false; } DataTypePtr getReturnTypeImpl(const ColumnsWithTypeAndName & arguments) const override { diff --git a/src/Planner/PlannerJoins.cpp b/src/Planner/PlannerJoins.cpp index 2a7bd49d6a3..63fe3cc7b55 100644 --- a/src/Planner/PlannerJoins.cpp +++ b/src/Planner/PlannerJoins.cpp @@ -18,6 +18,7 @@ #include #include +#include #include #include #include @@ -61,6 +62,8 @@ void JoinClause::dump(WriteBuffer & buffer) const for (const auto & dag_node : dag_nodes) { dag_nodes_dump += dag_node->result_name; + dag_nodes_dump += " "; + dag_nodes_dump += dag_node->result_type->getName(); dag_nodes_dump += ", "; } diff --git a/src/Planner/Utils.cpp b/src/Planner/Utils.cpp index 4f320f144df..2018ddafcdd 100644 --- a/src/Planner/Utils.cpp +++ b/src/Planner/Utils.cpp @@ -343,27 +343,6 @@ QueryTreeNodePtr mergeConditionNodes(const QueryTreeNodes & condition_nodes, con return function_node; } -std::optional tryExtractConstantFromConditionNode(const QueryTreeNodePtr & condition_node) -{ - const auto * constant_node = condition_node->as(); - if (!constant_node) - return {}; - - const auto & value = constant_node->getValue(); - auto constant_type = constant_node->getResultType(); - constant_type = removeNullable(removeLowCardinality(constant_type)); - - auto which_constant_type = WhichDataType(constant_type); - if (!which_constant_type.isUInt8() && !which_constant_type.isNothing()) - return {}; - - if (value.isNull()) - return false; - - UInt8 predicate_value = value.safeGet(); - return predicate_value > 0; -} - QueryTreeNodePtr replaceTablesAndTableFunctionsWithDummyTables(const QueryTreeNodePtr & query_node, const ContextPtr & context, ResultReplacementMap * result_replacement_map) diff --git a/src/Planner/Utils.h b/src/Planner/Utils.h index 1e7a98b7256..0effb1d08ae 100644 --- a/src/Planner/Utils.h +++ b/src/Planner/Utils.h @@ -63,9 +63,6 @@ bool queryHasWithTotalsInAnySubqueryInJoinTree(const QueryTreeNodePtr & query_no /// Returns `and` function node that has condition nodes as its arguments QueryTreeNodePtr mergeConditionNodes(const QueryTreeNodes & condition_nodes, const ContextPtr & context); -/// Try extract boolean constant from condition node -std::optional tryExtractConstantFromConditionNode(const QueryTreeNodePtr & condition_node); - /// Replace tables nodes and table function nodes with dummy table nodes using ResultReplacementMap = std::unordered_map; QueryTreeNodePtr replaceTablesAndTableFunctionsWithDummyTables(const QueryTreeNodePtr & query_node, diff --git a/src/Storages/MergeTree/MergeTreeIndexInverted.cpp b/src/Storages/MergeTree/MergeTreeIndexInverted.cpp index e7d86f2a635..8e8409f3868 100644 --- a/src/Storages/MergeTree/MergeTreeIndexInverted.cpp +++ b/src/Storages/MergeTree/MergeTreeIndexInverted.cpp @@ -201,6 +201,7 @@ MergeTreeConditionInverted::MergeTreeConditionInverted( rpn.push_back(RPNElement::FUNCTION_UNKNOWN); return; } + rpn = std::move( RPNBuilder( query_info.filter_actions_dag->getOutputs().at(0), context_, @@ -208,10 +209,10 @@ MergeTreeConditionInverted::MergeTreeConditionInverted( { return this->traverseAtomAST(node, out); }).extractRPN()); + return; } ASTPtr filter_node = buildFilterNode(query_info.query); - if (!filter_node) { rpn.push_back(RPNElement::FUNCTION_UNKNOWN); @@ -226,7 +227,6 @@ MergeTreeConditionInverted::MergeTreeConditionInverted( query_info.prepared_sets, [&](const RPNBuilderTreeNode & node, RPNElement & out) { return traverseAtomAST(node, out); }); rpn = std::move(builder).extractRPN(); - } /// Keep in-sync with MergeTreeConditionFullText::alwaysUnknownOrTrue diff --git a/tests/queries/0_stateless/00848_join_use_nulls_segfault.reference b/tests/queries/0_stateless/00848_join_use_nulls_segfault.reference index 6bfe0db1448..43f48089b06 100644 --- a/tests/queries/0_stateless/00848_join_use_nulls_segfault.reference +++ b/tests/queries/0_stateless/00848_join_use_nulls_segfault.reference @@ -10,13 +10,13 @@ l \N \N String Nullable(String) \N \N \N \N using -l \N String Nullable(String) - \N String Nullable(String) -l \N String Nullable(String) +l \N Nullable(String) Nullable(String) +l \N Nullable(String) Nullable(String) +\N \N Nullable(String) Nullable(String) +\N \N Nullable(String) Nullable(String) +l \N Nullable(String) Nullable(String) +l \N Nullable(String) Nullable(String) \N \N Nullable(String) Nullable(String) -l \N String Nullable(String) - \N String Nullable(String) -l \N String Nullable(String) \N \N Nullable(String) Nullable(String) \N \N \N \N @@ -32,13 +32,13 @@ l \N \N Nullable(String) Nullable(String) \N \N \N \N using + join_use_nulls -l \N String Nullable(String) l \N Nullable(String) Nullable(String) -\N \N Nullable(String) Nullable(String) -\N \N Nullable(String) Nullable(String) -l \N String Nullable(String) l \N Nullable(String) Nullable(String) -\N \N Nullable(String) Nullable(String) -\N \N Nullable(String) Nullable(String) +r \N Nullable(String) Nullable(String) +r \N Nullable(String) Nullable(String) +l \N Nullable(String) Nullable(String) +l \N Nullable(String) Nullable(String) +r \N Nullable(String) Nullable(String) +r \N Nullable(String) Nullable(String) \N \N \N \N diff --git a/tests/queries/0_stateless/00848_join_use_nulls_segfault.sql b/tests/queries/0_stateless/00848_join_use_nulls_segfault.sql index 57eca0eb9e0..2f6cca0284c 100644 --- a/tests/queries/0_stateless/00848_join_use_nulls_segfault.sql +++ b/tests/queries/0_stateless/00848_join_use_nulls_segfault.sql @@ -1,4 +1,5 @@ SET any_join_distinct_right_table_keys = 1; +SET allow_experimental_analyzer = 1; DROP TABLE IF EXISTS t1_00848; DROP TABLE IF EXISTS t2_00848; @@ -53,16 +54,16 @@ SELECT t3.id = 'l', t3.not_id = 'l' FROM t1_00848 t1 LEFT JOIN t3_00848 t3 ON t1 SELECT 'using + join_use_nulls'; -SELECT *, toTypeName(t1.id), toTypeName(t3.id) FROM t1_00848 t1 ANY LEFT JOIN t3_00848 t3 USING(id) ORDER BY t1.id, t3.id; -SELECT *, toTypeName(t1.id), toTypeName(t3.id) FROM t1_00848 t1 ANY FULL JOIN t3_00848 t3 USING(id) ORDER BY t1.id, t3.id; -SELECT *, toTypeName(t2.id), toTypeName(t3.id) FROM t2_00848 t2 ANY FULL JOIN t3_00848 t3 USING(id) ORDER BY t2.id, t3.id; +SELECT *, toTypeName(t1.id), toTypeName(t3.id) FROM t1_00848 t1 ANY LEFT JOIN t3_00848 t3 USING(id) ORDER BY id; +SELECT *, toTypeName(t1.id), toTypeName(t3.id) FROM t1_00848 t1 ANY FULL JOIN t3_00848 t3 USING(id) ORDER BY id; +SELECT *, toTypeName(t2.id), toTypeName(t3.id) FROM t2_00848 t2 ANY FULL JOIN t3_00848 t3 USING(id) ORDER BY id; -SELECT *, toTypeName(t1.id), toTypeName(t3.id) FROM t1_00848 t1 LEFT JOIN t3_00848 t3 USING(id) ORDER BY t1.id, t3.id; -SELECT *, toTypeName(t1.id), toTypeName(t3.id) FROM t1_00848 t1 FULL JOIN t3_00848 t3 USING(id) ORDER BY t1.id, t3.id; -SELECT *, toTypeName(t2.id), toTypeName(t3.id) FROM t2_00848 t2 FULL JOIN t3_00848 t3 USING(id) ORDER BY t2.id, t3.id; +SELECT *, toTypeName(t1.id), toTypeName(t3.id) FROM t1_00848 t1 LEFT JOIN t3_00848 t3 USING(id) ORDER BY id; +SELECT *, toTypeName(t1.id), toTypeName(t3.id) FROM t1_00848 t1 FULL JOIN t3_00848 t3 USING(id) ORDER BY id; +SELECT *, toTypeName(t2.id), toTypeName(t3.id) FROM t2_00848 t2 FULL JOIN t3_00848 t3 USING(id) ORDER BY id; -SELECT t3.id = 'l', t3.not_id = 'l' FROM t1_00848 t1 ANY LEFT JOIN t3_00848 t3 USING(id) ORDER BY t1.id, t3.id; -SELECT t3.id = 'l', t3.not_id = 'l' FROM t1_00848 t1 LEFT JOIN t3_00848 t3 USING(id) ORDER BY t1.id, t3.id; +SELECT t3.id = 'l', t3.not_id = 'l' FROM t1_00848 t1 ANY LEFT JOIN t3_00848 t3 USING(id) ORDER BY id; +SELECT t3.id = 'l', t3.not_id = 'l' FROM t1_00848 t1 LEFT JOIN t3_00848 t3 USING(id) ORDER BY id; DROP TABLE t1_00848; DROP TABLE t2_00848; diff --git a/tests/queries/0_stateless/00988_expansion_aliases_limit.sql b/tests/queries/0_stateless/00988_expansion_aliases_limit.sql index 15c9f82da6f..e78ccf56093 100644 --- a/tests/queries/0_stateless/00988_expansion_aliases_limit.sql +++ b/tests/queries/0_stateless/00988_expansion_aliases_limit.sql @@ -1 +1,3 @@ -SELECT 1 AS a, a + a AS b, b + b AS c, c + c AS d, d + d AS e, e + e AS f, f + f AS g, g + g AS h, h + h AS i, i + i AS j, j + j AS k, k + k AS l, l + l AS m, m + m AS n, n + n AS o, o + o AS p, p + p AS q, q + q AS r, r + r AS s, s + s AS t, t + t AS u, u + u AS v, v + v AS w, w + w AS x, x + x AS y, y + y AS z; -- { serverError 168 } +SET allow_experimental_analyzer = 1; + +SELECT 1 AS a, a + a AS b, b + b AS c, c + c AS d, d + d AS e, e + e AS f, f + f AS g, g + g AS h, h + h AS i, i + i AS j, j + j AS k, k + k AS l, l + l AS m, m + m AS n, n + n AS o, o + o AS p, p + p AS q, q + q AS r, r + r AS s, s + s AS t, t + t AS u, u + u AS v, v + v AS w, w + w AS x, x + x AS y, y + y AS z; -- { serverError 36 } diff --git a/tests/queries/0_stateless/01018_ambiguous_column.reference b/tests/queries/0_stateless/01018_ambiguous_column.reference index a2a1d6ea4f6..308726fa184 100644 --- a/tests/queries/0_stateless/01018_ambiguous_column.reference +++ b/tests/queries/0_stateless/01018_ambiguous_column.reference @@ -1,12 +1,15 @@ 0 0 0 0 +0 0 0 0 0 0 -┌─one.dummy─┬─A.dummy─┬─B.dummy─┐ -│ 0 │ 0 │ 0 │ -└───────────┴─────────┴─────────┘ +0 +0 +┌─system.one.dummy─┬─A.dummy─┬─B.dummy─┐ +│ 0 │ 0 │ 0 │ +└──────────────────┴─────────┴─────────┘ ┌─A.dummy─┬─one.dummy─┬─two.dummy─┐ │ 0 │ 0 │ 0 │ └─────────┴───────────┴───────────┘ diff --git a/tests/queries/0_stateless/01018_ambiguous_column.sql b/tests/queries/0_stateless/01018_ambiguous_column.sql index 54603aab810..620bdb6ba3f 100644 --- a/tests/queries/0_stateless/01018_ambiguous_column.sql +++ b/tests/queries/0_stateless/01018_ambiguous_column.sql @@ -1,4 +1,6 @@ -select * from system.one cross join system.one; -- { serverError 352 } +SET allow_experimental_analyzer = 1; + +select * from system.one cross join system.one; select * from system.one cross join system.one r; select * from system.one l cross join system.one; select * from system.one left join system.one using dummy; @@ -8,10 +10,10 @@ USE system; SELECT dummy FROM one AS A JOIN one ON A.dummy = one.dummy; SELECT dummy FROM one JOIN one AS A ON A.dummy = one.dummy; -SELECT dummy FROM one l JOIN one r ON dummy = r.dummy; -- { serverError 352 } -SELECT dummy FROM one l JOIN one r ON l.dummy = dummy; -- { serverError 352 } -SELECT dummy FROM one l JOIN one r ON one.dummy = r.dummy; -- { serverError 352 } -SELECT dummy FROM one l JOIN one r ON l.dummy = one.dummy; -- { serverError 352 } +SELECT dummy FROM one l JOIN one r ON dummy = r.dummy; +SELECT dummy FROM one l JOIN one r ON l.dummy = dummy; -- { serverError 403 } +SELECT dummy FROM one l JOIN one r ON one.dummy = r.dummy; +SELECT dummy FROM one l JOIN one r ON l.dummy = one.dummy; -- { serverError 403 } SELECT * from one JOIN one A ON one.dummy = A.dummy diff --git a/tests/queries/0_stateless/01040_dictionary_invalidate_query_switchover_long.reference b/tests/queries/0_stateless/01040_dictionary_invalidate_query_switchover_long.reference index c89fe48d9f9..8d40aebacf2 100644 --- a/tests/queries/0_stateless/01040_dictionary_invalidate_query_switchover_long.reference +++ b/tests/queries/0_stateless/01040_dictionary_invalidate_query_switchover_long.reference @@ -1,5 +1,5 @@ 122 -Table dictdb_01041_01040.dict_invalidate doesn\'t exist +1 133 diff --git a/tests/queries/0_stateless/01040_dictionary_invalidate_query_switchover_long.sh b/tests/queries/0_stateless/01040_dictionary_invalidate_query_switchover_long.sh index 7249d5e1a82..6856f952a47 100755 --- a/tests/queries/0_stateless/01040_dictionary_invalidate_query_switchover_long.sh +++ b/tests/queries/0_stateless/01040_dictionary_invalidate_query_switchover_long.sh @@ -53,7 +53,7 @@ function check_exception_detected() export -f check_exception_detected; timeout 30 bash -c check_exception_detected 2> /dev/null -$CLICKHOUSE_CLIENT --query "SELECT last_exception FROM system.dictionaries WHERE database = 'dictdb_01041_01040' AND name = 'invalidate'" 2>&1 | grep -Eo "Table dictdb_01041_01040.dict_invalidate .* exist" +$CLICKHOUSE_CLIENT --query "SELECT last_exception FROM system.dictionaries WHERE database = 'dictdb_01041_01040' AND name = 'invalidate'" 2>&1 | grep -Eo "dictdb_01041_01040.dict_invalidate.*UNKNOWN_TABLE" | wc -l $CLICKHOUSE_CLIENT --query " CREATE TABLE dictdb_01041_01040.dict_invalidate diff --git a/tests/queries/0_stateless/01561_clickhouse_client_stage.reference b/tests/queries/0_stateless/01561_clickhouse_client_stage.reference index 44c39f2a444..676cca1e866 100644 --- a/tests/queries/0_stateless/01561_clickhouse_client_stage.reference +++ b/tests/queries/0_stateless/01561_clickhouse_client_stage.reference @@ -2,13 +2,13 @@ execute: default "foo" 1 execute: --stage fetch_columns -"dummy" +"system.one.dummy_0" 0 execute: --stage with_mergeable_state -"1" +"1_UInt8" 1 execute: --stage with_mergeable_state_after_aggregation -"1" +"1_UInt8" 1 execute: --stage complete "foo" diff --git a/tests/queries/0_stateless/01591_window_functions.reference b/tests/queries/0_stateless/01591_window_functions.reference index aaa88d66ca0..b981a46b4fd 100644 --- a/tests/queries/0_stateless/01591_window_functions.reference +++ b/tests/queries/0_stateless/01591_window_functions.reference @@ -915,12 +915,12 @@ from (select number, intDiv(number, 3) p, mod(number, 5) o from numbers(16)) t ; -Expression ((Projection + Before ORDER BY)) +Expression ((Project names + Projection)) Window (Window step for window \'\') - Window (Window step for window \'PARTITION BY p\') - Window (Window step for window \'PARTITION BY p ORDER BY o ASC\') - Sorting (Sorting for window \'PARTITION BY p ORDER BY o ASC\') - Expression ((Before window functions + (Projection + Before ORDER BY))) + Window (Window step for window \'PARTITION BY t.p_0\') + Window (Window step for window \'PARTITION BY t.p_0 ORDER BY t.o_1 ASC\') + Sorting (Sorting for window \'PARTITION BY t.p_0 ORDER BY t.o_1 ASC\') + Expression ((Before WINDOW + (Change column names to column identifiers + (Project names + (Projection + Change column names to column identifiers))))) ReadFromStorage (SystemNumbers) explain select count(*) over (order by o, number), @@ -929,13 +929,13 @@ from (select number, intDiv(number, 3) p, mod(number, 5) o from numbers(16)) t ; -Expression ((Projection + Before ORDER BY)) - Window (Window step for window \'ORDER BY o ASC, number ASC\') - Sorting (Sorting for window \'ORDER BY o ASC, number ASC\') - Window (Window step for window \'ORDER BY number ASC\') - Expression ((Before window functions + (Projection + Before ORDER BY)) [lifted up part]) - Sorting (Sorting for window \'ORDER BY number ASC\') - Expression ((Before window functions + (Projection + Before ORDER BY))) +Expression ((Project names + Projection)) + Window (Window step for window \'ORDER BY t.o_0 ASC, t.number_1 ASC\') + Sorting (Sorting for window \'ORDER BY t.o_0 ASC, t.number_1 ASC\') + Window (Window step for window \'ORDER BY t.number_1 ASC\') + Expression ((Before WINDOW + (Change column names to column identifiers + (Project names + (Projection + Change column names to column identifiers)))) [lifted up part]) + Sorting (Sorting for window \'ORDER BY t.number_1 ASC\') + Expression ((Before WINDOW + (Change column names to column identifiers + (Project names + (Projection + Change column names to column identifiers))))) ReadFromStorage (SystemNumbers) -- A test case for the sort comparator found by fuzzer. SELECT diff --git a/tests/queries/0_stateless/01823_explain_json.reference b/tests/queries/0_stateless/01823_explain_json.reference index 9df7c16e4f4..befbf82f4fb 100644 --- a/tests/queries/0_stateless/01823_explain_json.reference +++ b/tests/queries/0_stateless/01823_explain_json.reference @@ -37,63 +37,59 @@ "Node Type": "Aggregating", "Header": [ { - "Name": "number", + "Name": "number_0", "Type": "UInt64" }, { - "Name": "plus(number, 1)", - "Type": "UInt64" - }, - { - "Name": "quantile(0.2)(number)", + "Name": "quantile(0.2_Float64)(number_0)", "Type": "Float64" }, { - "Name": "sumIf(number, greater(number, 0))", + "Name": "sumIf(number_0, greater(number_0, 0_UInt8))", "Type": "UInt64" } ], - "Keys": ["number", "plus(number, 1)"], + "Keys": ["number_0"], "Aggregates": [ { - "Name": "quantile(0.2)(number)", + "Name": "quantile(0.2_Float64)(number_0)", "Function": { "Name": "quantile", "Parameters": ["0.2"], "Argument Types": ["UInt64"], "Result Type": "Float64" }, - "Arguments": ["number"] + "Arguments": ["number_0"] }, { - "Name": "sumIf(number, greater(number, 0))", + "Name": "sumIf(number_0, greater(number_0, 0_UInt8))", "Function": { "Name": "sumIf", "Argument Types": ["UInt64", "UInt8"], "Result Type": "UInt64" }, - "Arguments": ["number", "greater(number, 0)"] + "Arguments": ["number_0", "greater(number_0, 0_UInt8)"] } ], -------- "Node Type": "ArrayJoin", "Left": false, - "Columns": ["x", "y"], + "Columns": ["x_0", "y_1"], -------- "Node Type": "Distinct", - "Columns": ["intDiv(number, 3)", "intDiv(number, 2)"], + "Columns": ["intDiv(number_0, 2_UInt8)", "intDiv(number_0, 3_UInt8)"], -- "Node Type": "Distinct", - "Columns": ["intDiv(number, 3)", "intDiv(number, 2)"], + "Columns": ["intDiv(number_0, 2_UInt8)", "intDiv(number_0, 3_UInt8)"], -------- "Sort Description": [ { - "Column": "number", + "Column": "number_0", "Ascending": false, "With Fill": false }, { - "Column": "plus(number, 1)", + "Column": "plus(number_0, 1_UInt8)", "Ascending": true, "With Fill": false } diff --git a/tests/queries/0_stateless/01823_explain_json.sh b/tests/queries/0_stateless/01823_explain_json.sh index 7868bc0cc78..39128773069 100755 --- a/tests/queries/0_stateless/01823_explain_json.sh +++ b/tests/queries/0_stateless/01823_explain_json.sh @@ -5,26 +5,29 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh . "$CURDIR"/../shell_config.sh -$CLICKHOUSE_CLIENT -q "EXPLAIN json = 1, description = 0 SELECT 1 UNION ALL SELECT 2 FORMAT TSVRaw" +opts=( + "--allow_experimental_analyzer=1" +) +$CLICKHOUSE_CLIENT "${opts[@]}" -q "EXPLAIN json = 1, description = 0 SELECT 1 UNION ALL SELECT 2 FORMAT TSVRaw" echo "--------" -$CLICKHOUSE_CLIENT -q "explain json = 1, description = 0, header = 1 select 1, 2 + dummy FORMAT TSVRaw" 2> /dev/null | grep Header -m 1 -A 8 +$CLICKHOUSE_CLIENT "${opts[@]}" -q "explain json = 1, description = 0, header = 1 select 1, 2 + dummy FORMAT TSVRaw" 2> /dev/null | grep Header -m 1 -A 8 echo "--------" -$CLICKHOUSE_CLIENT -q "EXPLAIN json = 1, actions = 1, header = 1, description = 0 +$CLICKHOUSE_CLIENT "${opts[@]}" -q "EXPLAIN json = 1, actions = 1, header = 1, description = 0 SELECT quantile(0.2)(number), sumIf(number, number > 0) from numbers(2) group by number, number + 1 FORMAT TSVRaw - " | grep Aggregating -A 40 + " | grep Aggregating -A 36 echo "--------" -$CLICKHOUSE_CLIENT -q "EXPLAIN json = 1, actions = 1, description = 0 +$CLICKHOUSE_CLIENT "${opts[@]}" -q "EXPLAIN json = 1, actions = 1, description = 0 SELECT x, y from numbers(2) array join [number, 1] as x, [number + 1] as y FORMAT TSVRaw " | grep ArrayJoin -A 2 echo "--------" -$CLICKHOUSE_CLIENT -q "EXPLAIN json = 1, actions = 1, description = 0 +$CLICKHOUSE_CLIENT "${opts[@]}" -q "EXPLAIN json = 1, actions = 1, description = 0 SELECT distinct intDiv(number, 2), intDiv(number, 3) from numbers(10) FORMAT TSVRaw " | grep Distinct -A 1 echo "--------" -$CLICKHOUSE_CLIENT -q "EXPLAIN json = 1, actions = 1, description = 0 +$CLICKHOUSE_CLIENT "${opts[@]}" -q "EXPLAIN json = 1, actions = 1, description = 0 SELECT number + 1 from numbers(10) order by number desc, number + 1 limit 3 FORMAT TSVRaw " | grep "Sort Description" -A 12 diff --git a/tests/queries/0_stateless/02125_constant_if_condition_and_not_existing_column.sql b/tests/queries/0_stateless/02125_constant_if_condition_and_not_existing_column.sql index 4aad7ae3694..822ffb19764 100644 --- a/tests/queries/0_stateless/02125_constant_if_condition_and_not_existing_column.sql +++ b/tests/queries/0_stateless/02125_constant_if_condition_and_not_existing_column.sql @@ -6,9 +6,9 @@ insert into test values (0); select if(0, y, 42) from test; select if(1, 42, y) from test; select if(toUInt8(0), y, 42) from test; -select if(toInt8(0), y, 42) from test; +select if(toUInt8(0), y, 42) from test; +select if(toUInt8(1), 42, y) from test; select if(toUInt8(1), 42, y) from test; -select if(toInt8(1), 42, y) from test; select if(toUInt8(toUInt8(0)), y, 42) from test; select if(cast(cast(0, 'UInt8'), 'UInt8'), y, 42) from test; explain syntax select x, if((select hasColumnInTable(currentDatabase(), 'test', 'y')), y, x || '_') from test; diff --git a/tests/queries/0_stateless/02160_untuple_exponential_growth.sh b/tests/queries/0_stateless/02160_untuple_exponential_growth.sh index 9ec6594af69..2bc8f74a524 100755 --- a/tests/queries/0_stateless/02160_untuple_exponential_growth.sh +++ b/tests/queries/0_stateless/02160_untuple_exponential_growth.sh @@ -7,5 +7,5 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # Should finish in reasonable time (milliseconds). # In previous versions this query led to exponential complexity of query analysis. -${CLICKHOUSE_LOCAL} --query "SELECT untuple(tuple(untuple((1, untuple((untuple(tuple(untuple(tuple(untuple((untuple((1, 1, 1, 1)), 1, 1, 1)))))), 1, 1))))))" 2>&1 | grep -cF 'TOO_BIG_AST' -${CLICKHOUSE_LOCAL} --query "SELECT untuple(tuple(untuple(tuple(untuple(tuple(untuple(tuple(untuple(tuple(untuple(tuple(untuple(tuple(untuple(tuple(untuple(tuple(untuple(tuple(untuple(tuple(untuple(tuple(untuple((1, 1, 1, 1, 1))))))))))))))))))))))))))" 2>&1 | grep -cF 'TOO_BIG_AST' +${CLICKHOUSE_LOCAL} --query "SELECT untuple(tuple(untuple((1, untuple((untuple(tuple(untuple(tuple(untuple((untuple((1, 1, 1, 1)), 1, 1, 1)))))), 1, 1))))))" 2>&1 | grep -cF 'too big' +${CLICKHOUSE_LOCAL} --query "SELECT untuple(tuple(untuple(tuple(untuple(tuple(untuple(tuple(untuple(tuple(untuple(tuple(untuple(tuple(untuple(tuple(untuple(tuple(untuple(tuple(untuple(tuple(untuple(tuple(untuple((1, 1, 1, 1, 1))))))))))))))))))))))))))" 2>&1 | grep -cF 'too big' diff --git a/tests/queries/0_stateless/02174_cte_scalar_cache.reference b/tests/queries/0_stateless/02174_cte_scalar_cache.reference index 817116eda88..1acbef35325 100644 --- a/tests/queries/0_stateless/02174_cte_scalar_cache.reference +++ b/tests/queries/0_stateless/02174_cte_scalar_cache.reference @@ -1,3 +1,3 @@ -02177_CTE_GLOBAL_ON 5 500 11 0 5 -02177_CTE_GLOBAL_OFF 1 100 5 0 1 -02177_CTE_NEW_ANALYZER 2 200 3 0 2 +02177_CTE_GLOBAL_ON 1 100 4 0 1 +02177_CTE_GLOBAL_OFF 1 100 4 0 1 +02177_CTE_NEW_ANALYZER 1 100 4 0 1 diff --git a/tests/queries/0_stateless/02174_cte_scalar_cache.sql b/tests/queries/0_stateless/02174_cte_scalar_cache.sql index 9ed80d08cff..50a10834e64 100644 --- a/tests/queries/0_stateless/02174_cte_scalar_cache.sql +++ b/tests/queries/0_stateless/02174_cte_scalar_cache.sql @@ -1,3 +1,5 @@ +SET allow_experimental_analyzer = 1; + WITH ( SELECT sleep(0.0001) FROM system.one ) as a1, ( SELECT sleep(0.0001) FROM system.one ) as a2, diff --git a/tests/queries/0_stateless/02483_cuturlparameter_with_arrays.reference b/tests/queries/0_stateless/02483_cuturlparameter_with_arrays.reference index dd677873c7c..fa7f9ee7a2c 100644 --- a/tests/queries/0_stateless/02483_cuturlparameter_with_arrays.reference +++ b/tests/queries/0_stateless/02483_cuturlparameter_with_arrays.reference @@ -30,7 +30,7 @@ SELECT FORMAT Vertical; Row 1: ────── -cutURLParameter('http://bigmir.net/?a=b&c=d', []): http://bigmir.net/?a=b&c=d +cutURLParameter('http://bigmir.net/?a=b&c=d', array()): http://bigmir.net/?a=b&c=d cutURLParameter('http://bigmir.net/?a=b&c=d', ['a']): http://bigmir.net/?c=d cutURLParameter('http://bigmir.net/?a=b&c=d', ['a', 'c']): http://bigmir.net/? cutURLParameter('http://bigmir.net/?a=b&c=d', ['c']): http://bigmir.net/?a=b @@ -43,7 +43,7 @@ cutURLParameter('http://bigmir.net/?a=b&c=d#e&g=h', ['c', 'g']): http: cutURLParameter('http://bigmir.net/?a=b&c=d#e&g=h', ['e', 'g']): http://bigmir.net/?a=b&c=d#e cutURLParameter('http://bigmir.net/?a=b&c=d#test?e=f&g=h', ['test', 'e']): http://bigmir.net/?a=b&c=d#test?g=h cutURLParameter('http://bigmir.net/?a=b&c=d#test?e=f&g=h', ['test', 'g']): http://bigmir.net/?a=b&c=d#test?e=f -cutURLParameter('//bigmir.net/?a=b&c=d', []): //bigmir.net/?a=b&c=d +cutURLParameter('//bigmir.net/?a=b&c=d', array()): //bigmir.net/?a=b&c=d cutURLParameter('//bigmir.net/?a=b&c=d', ['a']): //bigmir.net/?c=d cutURLParameter('//bigmir.net/?a=b&c=d', ['a', 'c']): //bigmir.net/? cutURLParameter('//bigmir.net/?a=b&c=d#e=f', ['a', 'e']): //bigmir.net/?c=d# @@ -88,7 +88,7 @@ SELECT FORMAT Vertical; Row 1: ────── -cutURLParameter(materialize('http://bigmir.net/?a=b&c=d'), []): http://bigmir.net/?a=b&c=d +cutURLParameter(materialize('http://bigmir.net/?a=b&c=d'), array()): http://bigmir.net/?a=b&c=d cutURLParameter(materialize('http://bigmir.net/?a=b&c=d'), ['a']): http://bigmir.net/?c=d cutURLParameter(materialize('http://bigmir.net/?a=b&c=d'), ['a', 'c']): http://bigmir.net/? cutURLParameter(materialize('http://bigmir.net/?a=b&c=d'), ['c']): http://bigmir.net/?a=b @@ -101,7 +101,7 @@ cutURLParameter(materialize('http://bigmir.net/?a=b&c=d#e&g=h'), ['c', 'g']): cutURLParameter(materialize('http://bigmir.net/?a=b&c=d#e&g=h'), ['e', 'g']): http://bigmir.net/?a=b&c=d#e cutURLParameter(materialize('http://bigmir.net/?a=b&c=d#test?e=f&g=h'), ['test', 'e']): http://bigmir.net/?a=b&c=d#test?g=h cutURLParameter(materialize('http://bigmir.net/?a=b&c=d#test?e=f&g=h'), ['test', 'g']): http://bigmir.net/?a=b&c=d#test?e=f -cutURLParameter(materialize('//bigmir.net/?a=b&c=d'), []): //bigmir.net/?a=b&c=d +cutURLParameter(materialize('//bigmir.net/?a=b&c=d'), array()): //bigmir.net/?a=b&c=d cutURLParameter(materialize('//bigmir.net/?a=b&c=d'), ['a']): //bigmir.net/?c=d cutURLParameter(materialize('//bigmir.net/?a=b&c=d'), ['a', 'c']): //bigmir.net/? cutURLParameter(materialize('//bigmir.net/?a=b&c=d#e=f'), ['a', 'e']): //bigmir.net/?c=d# diff --git a/tests/queries/0_stateless/02483_cuturlparameter_with_arrays.sql b/tests/queries/0_stateless/02483_cuturlparameter_with_arrays.sql index ea2d6ae104f..6d64d2685b7 100644 --- a/tests/queries/0_stateless/02483_cuturlparameter_with_arrays.sql +++ b/tests/queries/0_stateless/02483_cuturlparameter_with_arrays.sql @@ -1,4 +1,7 @@ +SET allow_experimental_analyzer = 1; + -- { echoOn } + SELECT cutURLParameter('http://bigmir.net/?a=b&c=d', []), cutURLParameter('http://bigmir.net/?a=b&c=d', ['a']), diff --git a/tests/queries/0_stateless/02494_query_cache_explain.reference b/tests/queries/0_stateless/02494_query_cache_explain.reference index ecc965ac391..690e75bca7c 100644 --- a/tests/queries/0_stateless/02494_query_cache_explain.reference +++ b/tests/queries/0_stateless/02494_query_cache_explain.reference @@ -1,9 +1,9 @@ 1 1 -Expression ((Projection + Before ORDER BY)) +Expression ((Project names + (Projection + Change column names to column identifiers))) Limit (preliminary LIMIT (without OFFSET)) ReadFromStorage (SystemNumbers) -Expression ((Projection + Before ORDER BY)) +Expression ((Project names + (Projection + Change column names to column identifiers))) Limit (preliminary LIMIT (without OFFSET)) ReadFromStorage (SystemNumbers) (Expression) diff --git a/tests/queries/0_stateless/02494_query_cache_explain.sql b/tests/queries/0_stateless/02494_query_cache_explain.sql index 67717efde13..68b7e0005f8 100644 --- a/tests/queries/0_stateless/02494_query_cache_explain.sql +++ b/tests/queries/0_stateless/02494_query_cache_explain.sql @@ -1,6 +1,7 @@ -- Tags: no-parallel -- Tag no-parallel: Messes with internal cache +SET allow_experimental_analyzer = 1; SET allow_experimental_query_cache = true; SYSTEM DROP QUERY CACHE; diff --git a/tests/queries/0_stateless/02567_and_consistency.reference b/tests/queries/0_stateless/02567_and_consistency.reference index bcb2b5aecfb..e0014f187a8 100644 --- a/tests/queries/0_stateless/02567_and_consistency.reference +++ b/tests/queries/0_stateless/02567_and_consistency.reference @@ -6,10 +6,8 @@ true ===== true ===== -===== 1 ===== -===== allow_experimental_analyzer true #45440 diff --git a/tests/queries/0_stateless/02567_and_consistency.sql b/tests/queries/0_stateless/02567_and_consistency.sql index f02185a1a52..8ad06bd68cb 100644 --- a/tests/queries/0_stateless/02567_and_consistency.sql +++ b/tests/queries/0_stateless/02567_and_consistency.sql @@ -42,31 +42,10 @@ SETTINGS enable_optimize_predicate_expression = 0; SELECT '====='; -SELECT toBool(sin(SUM(number))) AS x -FROM -( - SELECT 1 AS number -) -GROUP BY number -HAVING 1 AND sin(sum(number)) -SETTINGS enable_optimize_predicate_expression = 1; -- { serverError 59 } - -SELECT '====='; - SELECT 1 and sin(1); SELECT '====='; -SELECT toBool(sin(SUM(number))) AS x -FROM -( - SELECT 1 AS number -) -GROUP BY number -HAVING x AND sin(1) -SETTINGS enable_optimize_predicate_expression = 0; -- { serverError 59 } - -SELECT '====='; SELECT 'allow_experimental_analyzer'; SET allow_experimental_analyzer = 1; From 25088187d409db5e883b66b63b42839d5e7a3c1b Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Mon, 6 Mar 2023 10:53:55 +0100 Subject: [PATCH 706/841] Fixed tests --- src/Analyzer/Passes/QueryAnalysisPass.cpp | 50 +++++++++++++------ src/Planner/PlannerJoinTree.cpp | 1 + ...4_nothing_arguments_in_functions_errors.sh | 4 +- .../02451_order_by_monotonic.reference | 32 ++++++------ .../0_stateless/02451_order_by_monotonic.sh | 20 ++++---- ...2483_cuturlparameter_with_arrays.reference | 1 + 6 files changed, 66 insertions(+), 42 deletions(-) diff --git a/src/Analyzer/Passes/QueryAnalysisPass.cpp b/src/Analyzer/Passes/QueryAnalysisPass.cpp index 8dc0b771cf2..c483a9983b9 100644 --- a/src/Analyzer/Passes/QueryAnalysisPass.cpp +++ b/src/Analyzer/Passes/QueryAnalysisPass.cpp @@ -4608,25 +4608,47 @@ ProjectionNames QueryAnalyzer::resolveFunction(QueryTreeNodePtr & node, Identifi auto if_function_condition = if_function_arguments[0]; resolveExpressionNode(if_function_condition, scope, false /*allow_lambda_expression*/, false /*allow_table_expression*/); - QueryTreeNodePtr constant_if_result_node; auto constant_condition = tryExtractConstantFromConditionNode(if_function_condition); if (constant_condition.has_value() && if_function_arguments.size() == 3) { - if (*constant_condition) - constant_if_result_node = if_function_arguments[1]; - else - constant_if_result_node = if_function_arguments[2]; - } + QueryTreeNodePtr constant_if_result_node; + QueryTreeNodePtr possibly_invalid_argument_node; - if (constant_if_result_node) - { - auto result_projection_names = resolveExpressionNode(constant_if_result_node, - scope, - false /*allow_lambda_expression*/, - false /*allow_table_expression*/); - node = std::move(constant_if_result_node); - return result_projection_names; + if (*constant_condition) + { + possibly_invalid_argument_node = if_function_arguments[2]; + constant_if_result_node = if_function_arguments[1]; + } + else + { + possibly_invalid_argument_node = if_function_arguments[1]; + constant_if_result_node = if_function_arguments[2]; + } + + bool apply_constant_if_optimization = false; + + try + { + resolveExpressionNode(possibly_invalid_argument_node, + scope, + false /*allow_lambda_expression*/, + false /*allow_table_expression*/); + } + catch (...) + { + apply_constant_if_optimization = true; + } + + if (apply_constant_if_optimization) + { + auto result_projection_names = resolveExpressionNode(constant_if_result_node, + scope, + false /*allow_lambda_expression*/, + false /*allow_table_expression*/); + node = std::move(constant_if_result_node); + return result_projection_names; + } } } diff --git a/src/Planner/PlannerJoinTree.cpp b/src/Planner/PlannerJoinTree.cpp index 52a3c926f65..b29c4baf1b0 100644 --- a/src/Planner/PlannerJoinTree.cpp +++ b/src/Planner/PlannerJoinTree.cpp @@ -1193,6 +1193,7 @@ JoinTreeQueryPlan buildJoinTreeQueryPlan(const QueryTreeNodePtr & query_node, if (table_expression == left_table_expression) { query_plans_stack.push_back(std::move(left_table_expression_query_plan)); + left_table_expression = {}; continue; } diff --git a/tests/queries/0_stateless/02294_nothing_arguments_in_functions_errors.sh b/tests/queries/0_stateless/02294_nothing_arguments_in_functions_errors.sh index 8c526cd8da8..931985340c2 100755 --- a/tests/queries/0_stateless/02294_nothing_arguments_in_functions_errors.sh +++ b/tests/queries/0_stateless/02294_nothing_arguments_in_functions_errors.sh @@ -5,6 +5,6 @@ CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) . "$CUR_DIR"/../shell_config.sh $CLICKHOUSE_LOCAL -q "SELECT assumeNotNull(NULL)" 2>&1 | grep -q "ILLEGAL_COLUMN" && echo "OK" || echo "FAIL" -$CLICKHOUSE_LOCAL -q "SELECT assumeNotNull(materialize(NULL)) SETTINGS allow_experimental_analyzer = 1" 2>&1 | grep -q "ILLEGAL_COLUMN" && echo "OK" || echo "FAIL" -$CLICKHOUSE_LOCAL -q "SELECT assumeNotNull(materialize(NULL)) from numbers(10) SETTINGS allow_experimental_analyzer = 1" 2>&1 | grep -q "ILLEGAL_COLUMN" && echo "OK" || echo "FAIL" +$CLICKHOUSE_LOCAL -q "SELECT assumeNotNull(materialize(NULL))" 2>&1 | grep -q "ILLEGAL_TYPE_OF_ARGUMENT" && echo "OK" || echo "FAIL" +$CLICKHOUSE_LOCAL -q "SELECT assumeNotNull(materialize(NULL)) from numbers(10)" 2>&1 | grep -q "ILLEGAL_TYPE_OF_ARGUMENT" && echo "OK" || echo "FAIL" diff --git a/tests/queries/0_stateless/02451_order_by_monotonic.reference b/tests/queries/0_stateless/02451_order_by_monotonic.reference index 37256be556e..f9f0ef38be1 100644 --- a/tests/queries/0_stateless/02451_order_by_monotonic.reference +++ b/tests/queries/0_stateless/02451_order_by_monotonic.reference @@ -4,19 +4,19 @@ 2022-09-09 12:00:00 0x 2022-09-09 12:00:00 1 2022-09-09 12:00:00 1x - Prefix sort description: toStartOfMinute(test.t_order_by_monotonic.t_0) ASC - Result sort description: toStartOfMinute(test.t_order_by_monotonic.t_0) ASC, test.t_order_by_monotonic.c1_1 ASC - Prefix sort description: toStartOfMinute(test.t_order_by_monotonic.t_0) ASC - Result sort description: toStartOfMinute(test.t_order_by_monotonic.t_0) ASC - Prefix sort description: negate(test.t_order_by_monotonic.a_0) ASC - Result sort description: negate(test.t_order_by_monotonic.a_0) ASC - Prefix sort description: negate(test.t_order_by_monotonic.a_0) ASC, negate(test.t_order_by_monotonic.b_1) ASC - Result sort description: negate(test.t_order_by_monotonic.a_0) ASC, negate(test.t_order_by_monotonic.b_1) ASC - Prefix sort description: test.t_order_by_monotonic.a_0 DESC, negate(test.t_order_by_monotonic.b_1) ASC - Result sort description: test.t_order_by_monotonic.a_0 DESC, negate(test.t_order_by_monotonic.b_1) ASC - Prefix sort description: negate(test.t_order_by_monotonic.a_0) ASC, test.t_order_by_monotonic.b_1 DESC - Result sort description: negate(test.t_order_by_monotonic.a_0) ASC, test.t_order_by_monotonic.b_1 DESC - Prefix sort description: negate(test.t_order_by_monotonic.a_0) ASC - Result sort description: negate(test.t_order_by_monotonic.a_0) ASC, test.t_order_by_monotonic.b_1 ASC - Prefix sort description: test.t_order_by_monotonic.a_0 ASC - Result sort description: test.t_order_by_monotonic.a_0 ASC, negate(test.t_order_by_monotonic.b_1) ASC + Prefix sort description: toStartOfMinute(test.t_0) ASC + Result sort description: toStartOfMinute(test.t_0) ASC, test.c1_1 ASC + Prefix sort description: toStartOfMinute(test.t_0) ASC + Result sort description: toStartOfMinute(test.t_0) ASC + Prefix sort description: negate(test.a_0) ASC + Result sort description: negate(test.a_0) ASC + Prefix sort description: negate(test.a_0) ASC, negate(test.b_1) ASC + Result sort description: negate(test.a_0) ASC, negate(test.b_1) ASC + Prefix sort description: test.a_0 DESC, negate(test.b_1) ASC + Result sort description: test.a_0 DESC, negate(test.b_1) ASC + Prefix sort description: negate(test.a_0) ASC, test.b_1 DESC + Result sort description: negate(test.a_0) ASC, test.b_1 DESC + Prefix sort description: negate(test.a_0) ASC + Result sort description: negate(test.a_0) ASC, test.b_1 ASC + Prefix sort description: test.a_0 ASC + Result sort description: test.a_0 ASC, negate(test.b_1) ASC diff --git a/tests/queries/0_stateless/02451_order_by_monotonic.sh b/tests/queries/0_stateless/02451_order_by_monotonic.sh index cc26ba91e1c..4fdc5a9a002 100755 --- a/tests/queries/0_stateless/02451_order_by_monotonic.sh +++ b/tests/queries/0_stateless/02451_order_by_monotonic.sh @@ -17,12 +17,12 @@ $CLICKHOUSE_CLIENT -q "CREATE TABLE t_order_by_monotonic (t DateTime, c1 String) SELECT '2022-09-09 12:00:30', toString(number % 2)|| 'x' FROM numbers(3)" $CLICKHOUSE_CLIENT --optimize_aggregation_in_order=1 -q "SELECT count() FROM - (SELECT toStartOfMinute(t) AS s, c1 FROM t_order_by_monotonic GROUP BY s, c1)" + (SELECT toStartOfMinute(t) AS s, c1 FROM t_order_by_monotonic AS test GROUP BY s, c1)" -$CLICKHOUSE_CLIENT --optimize_read_in_order=1 -q "SELECT toStartOfMinute(t) AS s, c1 FROM t_order_by_monotonic ORDER BY s, c1" +$CLICKHOUSE_CLIENT --optimize_read_in_order=1 -q "SELECT toStartOfMinute(t) AS s, c1 FROM t_order_by_monotonic AS test ORDER BY s, c1" -explain_sort_description "SELECT toStartOfMinute(t) AS s, c1 FROM t_order_by_monotonic ORDER BY s, c1" -explain_sort_description "SELECT toStartOfMinute(t) AS s, c1 FROM t_order_by_monotonic ORDER BY s" +explain_sort_description "SELECT toStartOfMinute(t) AS s, c1 FROM t_order_by_monotonic AS test ORDER BY s, c1" +explain_sort_description "SELECT toStartOfMinute(t) AS s, c1 FROM t_order_by_monotonic AS test ORDER BY s" $CLICKHOUSE_CLIENT -q "DROP TABLE IF EXISTS t_order_by_monotonic" @@ -30,11 +30,11 @@ $CLICKHOUSE_CLIENT -q "CREATE TABLE t_order_by_monotonic (a Int64, b Int64) ENGI $CLICKHOUSE_CLIENT -q "INSERT INTO t_order_by_monotonic VALUES (1, 1) (1, 2), (2, 1) (2, 2)" -explain_sort_description "SELECT * FROM t_order_by_monotonic ORDER BY -a" -explain_sort_description "SELECT * FROM t_order_by_monotonic ORDER BY -a, -b" -explain_sort_description "SELECT * FROM t_order_by_monotonic ORDER BY a DESC, -b" -explain_sort_description "SELECT * FROM t_order_by_monotonic ORDER BY -a, b DESC" -explain_sort_description "SELECT * FROM t_order_by_monotonic ORDER BY -a, b" -explain_sort_description "SELECT * FROM t_order_by_monotonic ORDER BY a, -b" +explain_sort_description "SELECT * FROM t_order_by_monotonic AS test ORDER BY -a" +explain_sort_description "SELECT * FROM t_order_by_monotonic AS test ORDER BY -a, -b" +explain_sort_description "SELECT * FROM t_order_by_monotonic AS test ORDER BY a DESC, -b" +explain_sort_description "SELECT * FROM t_order_by_monotonic AS test ORDER BY -a, b DESC" +explain_sort_description "SELECT * FROM t_order_by_monotonic AS test ORDER BY -a, b" +explain_sort_description "SELECT * FROM t_order_by_monotonic AS test ORDER BY a, -b" $CLICKHOUSE_CLIENT -q "DROP TABLE IF EXISTS t_order_by_monotonic" diff --git a/tests/queries/0_stateless/02483_cuturlparameter_with_arrays.reference b/tests/queries/0_stateless/02483_cuturlparameter_with_arrays.reference index fa7f9ee7a2c..348408a15cc 100644 --- a/tests/queries/0_stateless/02483_cuturlparameter_with_arrays.reference +++ b/tests/queries/0_stateless/02483_cuturlparameter_with_arrays.reference @@ -1,4 +1,5 @@ -- { echoOn } + SELECT cutURLParameter('http://bigmir.net/?a=b&c=d', []), cutURLParameter('http://bigmir.net/?a=b&c=d', ['a']), From 5d86df963e2197c33de1e6b8541de4916c39cea2 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Tue, 7 Mar 2023 12:30:54 +0100 Subject: [PATCH 707/841] Analyzer disable StorageWindowView support --- src/Storages/WindowView/StorageWindowView.cpp | 4 +++ .../01047_window_view_parser_inner_table.sql | 1 + .../0_stateless/01048_window_view_parser.sql | 1 + .../01050_window_view_parser_tumble.sql | 1 + .../01051_window_view_parser_hop.sql | 1 + .../01052_window_view_proc_tumble_to_now.sh | 16 +++++++----- .../01053_window_view_proc_hop_to_now.sh | 16 +++++++----- .../01054_window_view_proc_tumble_to.sh | 16 +++++++----- .../01055_window_view_proc_hop_to.sh | 16 +++++++----- .../01056_window_view_proc_hop_watch.py | 2 ++ ..._window_view_event_tumble_to_strict_asc.sh | 16 +++++++----- ...058_window_view_event_hop_to_strict_asc.sh | 16 +++++++----- ..._window_view_event_hop_watch_strict_asc.py | 2 ++ .../01060_window_view_event_tumble_to_asc.sh | 16 +++++++----- .../01061_window_view_event_hop_to_asc.sh | 16 +++++++----- .../01062_window_view_event_hop_watch_asc.py | 2 ++ ...063_window_view_event_tumble_to_bounded.sh | 16 +++++++----- .../01064_window_view_event_hop_to_bounded.sh | 16 +++++++----- ...065_window_view_event_hop_watch_bounded.py | 2 ++ ...iew_event_tumble_to_strict_asc_lateness.sh | 16 +++++++----- ...indow_view_event_tumble_to_asc_lateness.sh | 16 +++++++----- ...w_view_event_tumble_to_bounded_lateness.sh | 16 +++++++----- .../01069_window_view_proc_tumble_watch.py | 2 ++ .../01070_window_view_watch_events.py | 2 ++ ...01071_window_view_event_tumble_asc_join.sh | 18 ++++++++----- ...72_window_view_multiple_columns_groupby.sh | 16 +++++++----- ...indow_view_event_tumble_to_asc_populate.sh | 20 ++++++++------ ...dow_view_event_tumble_asc_join_populate.sh | 18 ++++++++----- ...window_view_proc_tumble_to_now_populate.sh | 16 +++++++----- .../01076_window_view_alter_query_to.sh | 24 ++++++++++------- ...indow_view_alter_query_to_modify_source.sh | 26 +++++++++++-------- .../01078_window_view_alter_query_watch.py | 2 ++ ...9_window_view_inner_table_memory_tumble.sh | 16 +++++++----- ...1080_window_view_inner_table_memory_hop.sh | 16 +++++++----- .../01081_window_view_target_table_engine.sh | 14 ++++++---- .../01082_window_view_watch_limit.py | 2 ++ .../0_stateless/01083_window_view_select.sh | 18 ++++++++----- ...01084_window_view_with_table_identifier.sh | 14 ++++++---- .../0_stateless/01085_window_view_attach.sql | 1 + .../0_stateless/01086_window_view_cleanup.sh | 24 ++++++++++------- .../01087_window_view_alter_query.sh | 22 +++++++++------- .../01088_window_view_default_column.sh | 16 +++++++----- .../02125_query_views_log_window_function.sql | 2 ++ .../02342_window_view_different_struct.sql | 1 + .../0_stateless/02364_window_view_segfault.sh | 6 ++++- 45 files changed, 332 insertions(+), 188 deletions(-) diff --git a/src/Storages/WindowView/StorageWindowView.cpp b/src/Storages/WindowView/StorageWindowView.cpp index 3a74fd5fc75..86fc0157bcd 100644 --- a/src/Storages/WindowView/StorageWindowView.cpp +++ b/src/Storages/WindowView/StorageWindowView.cpp @@ -1158,6 +1158,10 @@ StorageWindowView::StorageWindowView( , fire_signal_timeout_s(context_->getSettingsRef().wait_for_window_view_fire_signal_timeout.totalSeconds()) , clean_interval_usec(context_->getSettingsRef().window_view_clean_interval.totalMicroseconds()) { + if (context_->getSettingsRef().allow_experimental_analyzer) + throw Exception(ErrorCodes::UNSUPPORTED_METHOD, + "Experimental WINDOW VIEW feature is not supported with new infrastructure for query analysis (the setting 'allow_experimental_analyzer')"); + if (!query.select) throw Exception(ErrorCodes::INCORRECT_QUERY, "SELECT query is not specified for {}", getName()); diff --git a/tests/queries/0_stateless/01047_window_view_parser_inner_table.sql b/tests/queries/0_stateless/01047_window_view_parser_inner_table.sql index 2d9911287a3..bf1ac254783 100644 --- a/tests/queries/0_stateless/01047_window_view_parser_inner_table.sql +++ b/tests/queries/0_stateless/01047_window_view_parser_inner_table.sql @@ -1,5 +1,6 @@ -- Tags: no-parallel +SET allow_experimental_analyzer = 0; SET allow_experimental_window_view = 1; DROP DATABASE IF EXISTS test_01047; set allow_deprecated_database_ordinary=1; diff --git a/tests/queries/0_stateless/01048_window_view_parser.sql b/tests/queries/0_stateless/01048_window_view_parser.sql index 4c329f99f6e..f87d9aa023e 100644 --- a/tests/queries/0_stateless/01048_window_view_parser.sql +++ b/tests/queries/0_stateless/01048_window_view_parser.sql @@ -1,5 +1,6 @@ -- Tags: no-parallel +SET allow_experimental_analyzer = 0; SET allow_experimental_window_view = 1; DROP DATABASE IF EXISTS test_01048; set allow_deprecated_database_ordinary=1; diff --git a/tests/queries/0_stateless/01050_window_view_parser_tumble.sql b/tests/queries/0_stateless/01050_window_view_parser_tumble.sql index d9604bb2b52..f49fbc251fd 100644 --- a/tests/queries/0_stateless/01050_window_view_parser_tumble.sql +++ b/tests/queries/0_stateless/01050_window_view_parser_tumble.sql @@ -1,3 +1,4 @@ +SET allow_experimental_analyzer = 0; SET allow_experimental_window_view = 1; DROP TABLE IF EXISTS mt; diff --git a/tests/queries/0_stateless/01051_window_view_parser_hop.sql b/tests/queries/0_stateless/01051_window_view_parser_hop.sql index 472dc66f1a2..45877cf0647 100644 --- a/tests/queries/0_stateless/01051_window_view_parser_hop.sql +++ b/tests/queries/0_stateless/01051_window_view_parser_hop.sql @@ -1,3 +1,4 @@ +SET allow_experimental_analyzer = 0; SET allow_experimental_window_view = 1; DROP TABLE IF EXISTS mt; diff --git a/tests/queries/0_stateless/01052_window_view_proc_tumble_to_now.sh b/tests/queries/0_stateless/01052_window_view_proc_tumble_to_now.sh index 9fdc66191d7..e75b7d9570b 100755 --- a/tests/queries/0_stateless/01052_window_view_proc_tumble_to_now.sh +++ b/tests/queries/0_stateless/01052_window_view_proc_tumble_to_now.sh @@ -4,7 +4,11 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh . "$CURDIR"/../shell_config.sh -$CLICKHOUSE_CLIENT --multiquery < Date: Tue, 7 Mar 2023 12:31:32 +0100 Subject: [PATCH 708/841] Fixed tests --- src/Analyzer/Passes/QueryAnalysisPass.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Analyzer/Passes/QueryAnalysisPass.cpp b/src/Analyzer/Passes/QueryAnalysisPass.cpp index c483a9983b9..ae42e5dbd06 100644 --- a/src/Analyzer/Passes/QueryAnalysisPass.cpp +++ b/src/Analyzer/Passes/QueryAnalysisPass.cpp @@ -5166,7 +5166,8 @@ ProjectionNames QueryAnalyzer::resolveFunction(QueryTreeNodePtr & node, Identifi /** Do not perform constant folding if there are aggregate or arrayJoin functions inside function. * Example: SELECT toTypeName(sum(number)) FROM numbers(10); */ - if (column && isColumnConst(*column) && (!hasAggregateFunctionNodes(node) && !hasFunctionNode(node, "arrayJoin"))) + if (column && isColumnConst(*column) && !typeid_cast(column.get())->getDataColumn().isDummy() && + (!hasAggregateFunctionNodes(node) && !hasFunctionNode(node, "arrayJoin"))) { /// Replace function node with result constant node Field column_constant_value; From 8bc92c197f9ffbc2d7a4e7ff1321d6150653f7b8 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Wed, 8 Mar 2023 10:43:57 +0100 Subject: [PATCH 709/841] Fixed build --- src/Storages/WindowView/StorageWindowView.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Storages/WindowView/StorageWindowView.cpp b/src/Storages/WindowView/StorageWindowView.cpp index 86fc0157bcd..3471e4ea6bf 100644 --- a/src/Storages/WindowView/StorageWindowView.cpp +++ b/src/Storages/WindowView/StorageWindowView.cpp @@ -78,6 +78,7 @@ namespace ErrorCodes extern const int SUPPORT_IS_DISABLED; extern const int TABLE_WAS_NOT_DROPPED; extern const int NOT_IMPLEMENTED; + extern const int UNSUPPORTED_METHOD; } namespace From faaa1d8570dd425e3f05023ab324260789917793 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Wed, 8 Mar 2023 11:54:49 +0100 Subject: [PATCH 710/841] Fixed tests --- src/Analyzer/Passes/QueryAnalysisPass.cpp | 2 + src/Analyzer/ValidationUtils.h | 2 +- src/Planner/PlannerExpressionAnalysis.cpp | 47 +++++++++-------------- 3 files changed, 21 insertions(+), 30 deletions(-) diff --git a/src/Analyzer/Passes/QueryAnalysisPass.cpp b/src/Analyzer/Passes/QueryAnalysisPass.cpp index ae42e5dbd06..b85999523c3 100644 --- a/src/Analyzer/Passes/QueryAnalysisPass.cpp +++ b/src/Analyzer/Passes/QueryAnalysisPass.cpp @@ -697,7 +697,9 @@ struct IdentifierResolveScope } if (auto * union_node = scope_node->as()) + { context = union_node->getContext(); + } else if (auto * query_node = scope_node->as()) { context = query_node->getContext(); diff --git a/src/Analyzer/ValidationUtils.h b/src/Analyzer/ValidationUtils.h index 8abd458e77c..c15a3531c8d 100644 --- a/src/Analyzer/ValidationUtils.h +++ b/src/Analyzer/ValidationUtils.h @@ -7,7 +7,7 @@ namespace DB struct ValidationParams { - bool group_by_use_nulls; + bool group_by_use_nulls = false; }; /** Validate aggregates in query node. diff --git a/src/Planner/PlannerExpressionAnalysis.cpp b/src/Planner/PlannerExpressionAnalysis.cpp index 9a7340f936c..11444503c5f 100644 --- a/src/Planner/PlannerExpressionAnalysis.cpp +++ b/src/Planner/PlannerExpressionAnalysis.cpp @@ -34,15 +34,13 @@ namespace * It is client responsibility to update filter analysis result if filter column must be removed after chain is finalized. */ FilterAnalysisResult analyzeFilter(const QueryTreeNodePtr & filter_expression_node, - const ColumnsWithTypeAndName & current_output_columns, + const ColumnsWithTypeAndName & input_columns, const PlannerContextPtr & planner_context, ActionsChain & actions_chain) { - const auto & filter_input = current_output_columns; - FilterAnalysisResult result; - result.filter_actions = buildActionsDAGFromExpressionNode(filter_expression_node, filter_input, planner_context); + result.filter_actions = buildActionsDAGFromExpressionNode(filter_expression_node, input_columns, planner_context); result.filter_column_name = result.filter_actions->getOutputs().at(0)->result_name; actions_chain.addStep(std::make_unique(result.filter_actions)); @@ -52,8 +50,8 @@ FilterAnalysisResult analyzeFilter(const QueryTreeNodePtr & filter_expression_no /** Construct aggregation analysis result if query tree has GROUP BY or aggregates. * Actions before aggregation are added into actions chain, if result is not null optional. */ -std::pair, std::optional> analyzeAggregation(const QueryTreeNodePtr & query_tree, - const ColumnsWithTypeAndName & current_output_columns, +std::optional analyzeAggregation(const QueryTreeNodePtr & query_tree, + const ColumnsWithTypeAndName & input_columns, const PlannerContextPtr & planner_context, ActionsChain & actions_chain) { @@ -69,9 +67,7 @@ std::pair, std::optional(group_by_input); + ActionsDAGPtr before_aggregation_actions = std::make_shared(input_columns); before_aggregation_actions->getOutputs().clear(); std::unordered_set before_aggregation_actions_output_node_names; @@ -203,14 +199,14 @@ std::pair, std::optional analyzeWindow(const QueryTreeNodePtr & query_tree, - const ColumnsWithTypeAndName & current_output_columns, + const ColumnsWithTypeAndName & input_columns, const PlannerContextPtr & planner_context, ActionsChain & actions_chain) { @@ -220,11 +216,9 @@ std::optional analyzeWindow(const QueryTreeNodePtr & query auto window_descriptions = extractWindowDescriptions(window_function_nodes, *planner_context); - const auto & window_input = current_output_columns; - PlannerActionsVisitor actions_visitor(planner_context); - ActionsDAGPtr before_window_actions = std::make_shared(window_input); + ActionsDAGPtr before_window_actions = std::make_shared(input_columns); before_window_actions->getOutputs().clear(); std::unordered_set before_window_actions_output_node_names; @@ -299,12 +293,11 @@ std::optional analyzeWindow(const QueryTreeNodePtr & query * It is client responsibility to update projection analysis result with project names actions after chain is finalized. */ ProjectionAnalysisResult analyzeProjection(const QueryNode & query_node, - const ColumnsWithTypeAndName & current_output_columns, + const ColumnsWithTypeAndName & input_columns, const PlannerContextPtr & planner_context, ActionsChain & actions_chain) { - const auto & projection_input = current_output_columns; - auto projection_actions = buildActionsDAGFromExpressionNode(query_node.getProjectionNode(), projection_input, planner_context); + auto projection_actions = buildActionsDAGFromExpressionNode(query_node.getProjectionNode(), input_columns, planner_context); auto projection_columns = query_node.getProjectionColumns(); size_t projection_columns_size = projection_columns.size(); @@ -347,13 +340,11 @@ ProjectionAnalysisResult analyzeProjection(const QueryNode & query_node, * Actions before sort are added into actions chain. */ SortAnalysisResult analyzeSort(const QueryNode & query_node, - const ColumnsWithTypeAndName & current_output_columns, + const ColumnsWithTypeAndName & input_columns, const PlannerContextPtr & planner_context, ActionsChain & actions_chain) { - const auto & order_by_input = current_output_columns; - - ActionsDAGPtr before_sort_actions = std::make_shared(order_by_input); + ActionsDAGPtr before_sort_actions = std::make_shared(input_columns); auto & before_sort_actions_outputs = before_sort_actions->getOutputs(); before_sort_actions_outputs.clear(); @@ -436,13 +427,12 @@ SortAnalysisResult analyzeSort(const QueryNode & query_node, * Actions before limit by are added into actions chain. */ LimitByAnalysisResult analyzeLimitBy(const QueryNode & query_node, - const ColumnsWithTypeAndName & current_output_columns, + const ColumnsWithTypeAndName & input_columns, const PlannerContextPtr & planner_context, const NameSet & required_output_nodes_names, ActionsChain & actions_chain) { - const auto & limit_by_input = current_output_columns; - auto before_limit_by_actions = buildActionsDAGFromExpressionNode(query_node.getLimitByNode(), limit_by_input, planner_context); + auto before_limit_by_actions = buildActionsDAGFromExpressionNode(query_node.getLimitByNode(), input_columns, planner_context); NameSet limit_by_column_names_set; Names limit_by_column_names; @@ -480,8 +470,7 @@ PlannerExpressionsAnalysisResult buildExpressionAnalysisResult(const QueryTreeNo std::optional where_analysis_result_optional; std::optional where_action_step_index_optional; - const auto * input_columns = actions_chain.getLastStepAvailableOutputColumnsOrNull(); - ColumnsWithTypeAndName current_output_columns = input_columns ? *input_columns : join_tree_input_columns; + ColumnsWithTypeAndName current_output_columns = join_tree_input_columns; if (query_node.hasWhere()) { @@ -490,9 +479,9 @@ PlannerExpressionsAnalysisResult buildExpressionAnalysisResult(const QueryTreeNo current_output_columns = actions_chain.getLastStepAvailableOutputColumns(); } - auto [aggregation_analysis_result_optional, aggregated_columns_optional] = analyzeAggregation(query_tree, current_output_columns, planner_context, actions_chain); - if (aggregated_columns_optional) - current_output_columns = std::move(*aggregated_columns_optional); + auto aggregation_analysis_result_optional = analyzeAggregation(query_tree, current_output_columns, planner_context, actions_chain); + if (aggregation_analysis_result_optional) + current_output_columns = actions_chain.getLastStepAvailableOutputColumns(); std::optional having_analysis_result_optional; std::optional having_action_step_index_optional; From d6c7c2193ccdb10b4f3faf34fda19bf650168c6c Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Wed, 8 Mar 2023 14:39:48 +0100 Subject: [PATCH 711/841] Fixed tests --- src/Analyzer/FunctionNode.cpp | 3 ++- ...cpp => LogicalExpressionOptimizerPass.cpp} | 8 ++++-- src/Analyzer/Passes/QueryAnalysisPass.cpp | 26 ++++++++++++++----- 3 files changed, 28 insertions(+), 9 deletions(-) rename src/Analyzer/Passes/{LogicalExpressionOptimizer.cpp => LogicalExpressionOptimizerPass.cpp} (97%) diff --git a/src/Analyzer/FunctionNode.cpp b/src/Analyzer/FunctionNode.cpp index 68bdb0f9956..fe170c8482e 100644 --- a/src/Analyzer/FunctionNode.cpp +++ b/src/Analyzer/FunctionNode.cpp @@ -63,7 +63,8 @@ ColumnsWithTypeAndName FunctionNode::getArgumentColumns() const else argument_column.type = argument->getResultType(); - if (auto * constant = argument->as()) + auto * constant = argument->as(); + if (constant && !isNotCreatable(argument_column.type)) argument_column.column = argument_column.type->createColumnConst(1, constant->getValue()); argument_columns.push_back(std::move(argument_column)); diff --git a/src/Analyzer/Passes/LogicalExpressionOptimizer.cpp b/src/Analyzer/Passes/LogicalExpressionOptimizerPass.cpp similarity index 97% rename from src/Analyzer/Passes/LogicalExpressionOptimizer.cpp rename to src/Analyzer/Passes/LogicalExpressionOptimizerPass.cpp index 73585a4cd23..3d65035f9fd 100644 --- a/src/Analyzer/Passes/LogicalExpressionOptimizer.cpp +++ b/src/Analyzer/Passes/LogicalExpressionOptimizerPass.cpp @@ -7,8 +7,6 @@ #include #include -#include - namespace DB { @@ -100,6 +98,9 @@ private: } } + if (and_operands.size() == function_node.getArguments().getNodes().size()) + return; + if (and_operands.size() == 1) { /// AND operator can have UInt8 or bool as its type. @@ -207,6 +208,9 @@ private: or_operands.push_back(std::move(in_function)); } + if (or_operands.size() == function_node.getArguments().getNodes().size()) + return; + if (or_operands.size() == 1) { /// if the result type of operand is the same as the result type of OR diff --git a/src/Analyzer/Passes/QueryAnalysisPass.cpp b/src/Analyzer/Passes/QueryAnalysisPass.cpp index b85999523c3..38575965973 100644 --- a/src/Analyzer/Passes/QueryAnalysisPass.cpp +++ b/src/Analyzer/Passes/QueryAnalysisPass.cpp @@ -6676,6 +6676,17 @@ void QueryAnalyzer::resolveQuery(const QueryTreeNodePtr & query_node, Identifier /// Resolve query node sections. + NamesAndTypes projection_columns; + + if (!scope.group_by_use_nulls) + { + projection_columns = resolveProjectionExpressionNodeList(query_node_typed.getProjectionNode(), scope); + if (query_node_typed.getProjection().getNodes().empty()) + throw Exception(ErrorCodes::EMPTY_LIST_OF_COLUMNS_QUERIED, + "Empty list of columns in projection. In scope {}", + scope.scope_node->formatASTForErrorMessage()); + } + if (query_node_typed.hasWith()) resolveExpressionNodeList(query_node_typed.getWithNode(), scope, true /*allow_lambda_expression*/, false /*allow_table_expression*/); @@ -6770,11 +6781,14 @@ void QueryAnalyzer::resolveQuery(const QueryTreeNodePtr & query_node, Identifier convertLimitOffsetExpression(query_node_typed.getOffset(), "OFFSET", scope); } - auto projection_columns = resolveProjectionExpressionNodeList(query_node_typed.getProjectionNode(), scope); - if (query_node_typed.getProjection().getNodes().empty()) - throw Exception(ErrorCodes::EMPTY_LIST_OF_COLUMNS_QUERIED, - "Empty list of columns in projection. In scope {}", - scope.scope_node->formatASTForErrorMessage()); + if (scope.group_by_use_nulls) + { + projection_columns = resolveProjectionExpressionNodeList(query_node_typed.getProjectionNode(), scope); + if (query_node_typed.getProjection().getNodes().empty()) + throw Exception(ErrorCodes::EMPTY_LIST_OF_COLUMNS_QUERIED, + "Empty list of columns in projection. In scope {}", + scope.scope_node->formatASTForErrorMessage()); + } /** Resolve nodes with duplicate aliases. * Table expressions cannot have duplicate aliases. @@ -6843,7 +6857,7 @@ void QueryAnalyzer::resolveQuery(const QueryTreeNodePtr & query_node, Identifier for (const auto & column : projection_columns) { - if (isNotCreatable(column.type->getTypeId())) + if (isNotCreatable(column.type)) throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Invalid projection column with type {}. In scope {}", column.type->getName(), From 56adb475253ce371a6f54808c84d018528eefcd4 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Fri, 10 Mar 2023 10:45:49 +0100 Subject: [PATCH 712/841] Fixed tests --- .../01556_explain_select_with_union_query.sql | 1 + ...imize_monotonous_functions_in_order_by.sql | 1 + .../0_stateless/02227_union_match_by_name.sql | 7 +++++- .../0_stateless/02303_query_kind.reference | 8 +++---- tests/queries/0_stateless/02303_query_kind.sh | 8 +++++-- .../02381_join_dup_columns_in_plan.sql | 1 + .../0_stateless/02451_order_by_monotonic.sh | 22 +++++++++++-------- ...75_predicate_push_down_filled_join_fix.sql | 1 + 8 files changed, 33 insertions(+), 16 deletions(-) diff --git a/tests/queries/0_stateless/01556_explain_select_with_union_query.sql b/tests/queries/0_stateless/01556_explain_select_with_union_query.sql index dcd9bbe7347..bbd96ef5c69 100644 --- a/tests/queries/0_stateless/01556_explain_select_with_union_query.sql +++ b/tests/queries/0_stateless/01556_explain_select_with_union_query.sql @@ -1,3 +1,4 @@ +SET allow_experimental_analyzer = 1; SET union_default_mode = 'DISTINCT'; set enable_global_with_statement = 1; diff --git a/tests/queries/0_stateless/01562_optimize_monotonous_functions_in_order_by.sql b/tests/queries/0_stateless/01562_optimize_monotonous_functions_in_order_by.sql index 15ddb5a848f..2fe24d1662d 100644 --- a/tests/queries/0_stateless/01562_optimize_monotonous_functions_in_order_by.sql +++ b/tests/queries/0_stateless/01562_optimize_monotonous_functions_in_order_by.sql @@ -1,3 +1,4 @@ +SET allow_experimental_analyzer = 1; SET optimize_monotonous_functions_in_order_by = 1; SET optimize_read_in_order = 1; diff --git a/tests/queries/0_stateless/02227_union_match_by_name.sql b/tests/queries/0_stateless/02227_union_match_by_name.sql index cc0ab8ba5aa..6a19add1d37 100644 --- a/tests/queries/0_stateless/02227_union_match_by_name.sql +++ b/tests/queries/0_stateless/02227_union_match_by_name.sql @@ -1,3 +1,8 @@ --- { echo } +SET allow_experimental_analyzer = 1; + +-- { echoOn } + EXPLAIN header = 1, optimize = 0 SELECT avgWeighted(x, y) FROM (SELECT NULL, 255 AS x, 1 AS y UNION ALL SELECT y, NULL AS x, 1 AS y); SELECT avgWeighted(x, y) FROM (SELECT NULL, 255 AS x, 1 AS y UNION ALL SELECT y, NULL AS x, 1 AS y); + +-- { echoOff } diff --git a/tests/queries/0_stateless/02303_query_kind.reference b/tests/queries/0_stateless/02303_query_kind.reference index b6acf3d2ee1..5af8c2b743f 100644 --- a/tests/queries/0_stateless/02303_query_kind.reference +++ b/tests/queries/0_stateless/02303_query_kind.reference @@ -1,4 +1,4 @@ -clickhouse-client --query_kind secondary_query -q explain plan header=1 select toString(dummy) as dummy from system.one group by dummy +clickhouse-client --allow_experimental_analyzer=1 --query_kind secondary_query -q explain plan header=1 select toString(dummy) as dummy from system.one group by dummy Expression ((Project names + Projection)) Header: dummy String Aggregating @@ -7,7 +7,7 @@ Header: dummy String Header: toString(system.one.dummy_0) String ReadFromStorage (SystemOne) Header: dummy UInt8 -clickhouse-local --query_kind secondary_query -q explain plan header=1 select toString(dummy) as dummy from system.one group by dummy +clickhouse-local --allow_experimental_analyzer=1 --query_kind secondary_query -q explain plan header=1 select toString(dummy) as dummy from system.one group by dummy Expression ((Project names + Projection)) Header: dummy String Aggregating @@ -16,7 +16,7 @@ Header: dummy String Header: toString(system.one.dummy_0) String ReadFromStorage (SystemOne) Header: dummy UInt8 -clickhouse-client --query_kind initial_query -q explain plan header=1 select toString(dummy) as dummy from system.one group by dummy +clickhouse-client --allow_experimental_analyzer=1 --query_kind initial_query -q explain plan header=1 select toString(dummy) as dummy from system.one group by dummy Expression ((Project names + Projection)) Header: dummy String Aggregating @@ -25,7 +25,7 @@ Header: dummy String Header: toString(system.one.dummy_0) String ReadFromStorage (SystemOne) Header: dummy UInt8 -clickhouse-local --query_kind initial_query -q explain plan header=1 select toString(dummy) as dummy from system.one group by dummy +clickhouse-local --allow_experimental_analyzer=1 --query_kind initial_query -q explain plan header=1 select toString(dummy) as dummy from system.one group by dummy Expression ((Project names + Projection)) Header: dummy String Aggregating diff --git a/tests/queries/0_stateless/02303_query_kind.sh b/tests/queries/0_stateless/02303_query_kind.sh index 5ad5f9ec6f4..1d883a2dcc7 100755 --- a/tests/queries/0_stateless/02303_query_kind.sh +++ b/tests/queries/0_stateless/02303_query_kind.sh @@ -4,6 +4,10 @@ CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh . "$CUR_DIR"/../shell_config.sh +opts=( + "--allow_experimental_analyzer=1" +) + function run_query() { echo "clickhouse-client $*" @@ -12,5 +16,5 @@ function run_query() echo "clickhouse-local $*" $CLICKHOUSE_LOCAL "$@" } -run_query --query_kind secondary_query -q "explain plan header=1 select toString(dummy) as dummy from system.one group by dummy" -run_query --query_kind initial_query -q "explain plan header=1 select toString(dummy) as dummy from system.one group by dummy" +run_query "${opts[@]}" --query_kind secondary_query -q "explain plan header=1 select toString(dummy) as dummy from system.one group by dummy" +run_query "${opts[@]}" --query_kind initial_query -q "explain plan header=1 select toString(dummy) as dummy from system.one group by dummy" diff --git a/tests/queries/0_stateless/02381_join_dup_columns_in_plan.sql b/tests/queries/0_stateless/02381_join_dup_columns_in_plan.sql index 4ed6d965292..dfcd8c12e11 100644 --- a/tests/queries/0_stateless/02381_join_dup_columns_in_plan.sql +++ b/tests/queries/0_stateless/02381_join_dup_columns_in_plan.sql @@ -1,3 +1,4 @@ +SET allow_experimental_analyzer = 1; SET join_algorithm = 'hash'; EXPLAIN actions=0, description=0, header=1 diff --git a/tests/queries/0_stateless/02451_order_by_monotonic.sh b/tests/queries/0_stateless/02451_order_by_monotonic.sh index 4fdc5a9a002..7d1356b4445 100755 --- a/tests/queries/0_stateless/02451_order_by_monotonic.sh +++ b/tests/queries/0_stateless/02451_order_by_monotonic.sh @@ -4,31 +4,35 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh . "$CURDIR"/../shell_config.sh +opts=( + "--allow_experimental_analyzer=1" +) + function explain_sort_description() { - out=$($CLICKHOUSE_CLIENT --optimize_read_in_order=1 -q "EXPLAIN PLAN actions = 1 $1") + out=$($CLICKHOUSE_CLIENT "${opts[@]}" --optimize_read_in_order=1 -q "EXPLAIN PLAN actions = 1 $1") echo "$out" | grep "Prefix sort description:" echo "$out" | grep "Result sort description:" } -$CLICKHOUSE_CLIENT -q "DROP TABLE IF EXISTS t_order_by_monotonic" -$CLICKHOUSE_CLIENT -q "CREATE TABLE t_order_by_monotonic (t DateTime, c1 String) ENGINE = MergeTree ORDER BY (t, c1) +$CLICKHOUSE_CLIENT "${opts[@]}" -q "DROP TABLE IF EXISTS t_order_by_monotonic" +$CLICKHOUSE_CLIENT "${opts[@]}" -q "CREATE TABLE t_order_by_monotonic (t DateTime, c1 String) ENGINE = MergeTree ORDER BY (t, c1) AS SELECT '2022-09-09 12:00:00', toString(number % 2) FROM numbers(2) UNION ALL SELECT '2022-09-09 12:00:30', toString(number % 2)|| 'x' FROM numbers(3)" -$CLICKHOUSE_CLIENT --optimize_aggregation_in_order=1 -q "SELECT count() FROM +$CLICKHOUSE_CLIENT "${opts[@]}" --optimize_aggregation_in_order=1 -q "SELECT count() FROM (SELECT toStartOfMinute(t) AS s, c1 FROM t_order_by_monotonic AS test GROUP BY s, c1)" -$CLICKHOUSE_CLIENT --optimize_read_in_order=1 -q "SELECT toStartOfMinute(t) AS s, c1 FROM t_order_by_monotonic AS test ORDER BY s, c1" +$CLICKHOUSE_CLIENT "${opts[@]}" --optimize_read_in_order=1 -q "SELECT toStartOfMinute(t) AS s, c1 FROM t_order_by_monotonic AS test ORDER BY s, c1" explain_sort_description "SELECT toStartOfMinute(t) AS s, c1 FROM t_order_by_monotonic AS test ORDER BY s, c1" explain_sort_description "SELECT toStartOfMinute(t) AS s, c1 FROM t_order_by_monotonic AS test ORDER BY s" -$CLICKHOUSE_CLIENT -q "DROP TABLE IF EXISTS t_order_by_monotonic" +$CLICKHOUSE_CLIENT "${opts[@]}" -q "DROP TABLE IF EXISTS t_order_by_monotonic" -$CLICKHOUSE_CLIENT -q "CREATE TABLE t_order_by_monotonic (a Int64, b Int64) ENGINE = MergeTree ORDER BY (a, b)" +$CLICKHOUSE_CLIENT "${opts[@]}" -q "CREATE TABLE t_order_by_monotonic (a Int64, b Int64) ENGINE = MergeTree ORDER BY (a, b)" -$CLICKHOUSE_CLIENT -q "INSERT INTO t_order_by_monotonic VALUES (1, 1) (1, 2), (2, 1) (2, 2)" +$CLICKHOUSE_CLIENT "${opts[@]}" -q "INSERT INTO t_order_by_monotonic VALUES (1, 1) (1, 2), (2, 1) (2, 2)" explain_sort_description "SELECT * FROM t_order_by_monotonic AS test ORDER BY -a" explain_sort_description "SELECT * FROM t_order_by_monotonic AS test ORDER BY -a, -b" @@ -37,4 +41,4 @@ explain_sort_description "SELECT * FROM t_order_by_monotonic AS test ORDER BY -a explain_sort_description "SELECT * FROM t_order_by_monotonic AS test ORDER BY -a, b" explain_sort_description "SELECT * FROM t_order_by_monotonic AS test ORDER BY a, -b" -$CLICKHOUSE_CLIENT -q "DROP TABLE IF EXISTS t_order_by_monotonic" +$CLICKHOUSE_CLIENT "${opts[@]}" -q "DROP TABLE IF EXISTS t_order_by_monotonic" diff --git a/tests/queries/0_stateless/02675_predicate_push_down_filled_join_fix.sql b/tests/queries/0_stateless/02675_predicate_push_down_filled_join_fix.sql index 78cb423216b..73baad11634 100644 --- a/tests/queries/0_stateless/02675_predicate_push_down_filled_join_fix.sql +++ b/tests/queries/0_stateless/02675_predicate_push_down_filled_join_fix.sql @@ -1,4 +1,5 @@ SET allow_experimental_analyzer = 1; +SET single_join_prefer_left_table = 0; DROP TABLE IF EXISTS test_table; CREATE TABLE test_table From fcb9c07949e0a8d4db75d3ad5e50ecb2c2730a89 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Fri, 10 Mar 2023 11:36:54 +0100 Subject: [PATCH 713/841] Fixed tests --- tests/queries/0_stateless/02227_union_match_by_name.reference | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/queries/0_stateless/02227_union_match_by_name.reference b/tests/queries/0_stateless/02227_union_match_by_name.reference index b2c17142aa6..e51ea983f7f 100644 --- a/tests/queries/0_stateless/02227_union_match_by_name.reference +++ b/tests/queries/0_stateless/02227_union_match_by_name.reference @@ -1,4 +1,5 @@ --- { echo } +-- { echoOn } + EXPLAIN header = 1, optimize = 0 SELECT avgWeighted(x, y) FROM (SELECT NULL, 255 AS x, 1 AS y UNION ALL SELECT y, NULL AS x, 1 AS y); Expression (Project names) Header: avgWeighted(x, y) Nullable(Float64) From c835fa3958fc30d238569f46ec45cbc2b2b88f80 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Fri, 10 Mar 2023 17:34:40 +0100 Subject: [PATCH 714/841] Fixed tests --- src/Storages/StorageS3Cluster.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Storages/StorageS3Cluster.cpp b/src/Storages/StorageS3Cluster.cpp index 92be3f50150..a3fd24b4f98 100644 --- a/src/Storages/StorageS3Cluster.cpp +++ b/src/Storages/StorageS3Cluster.cpp @@ -114,6 +114,7 @@ Pipe StorageS3Cluster::read( else { auto interpreter = InterpreterSelectQuery(query_info.query, context, SelectQueryOptions(processed_stage).analyze()); + sample_block = interpreter.getSampleBlock(); query_to_send = interpreter.getQueryInfo().query->clone(); } From 15134cb8c5c95dcf244caa6e507b85a467e512d6 Mon Sep 17 00:00:00 2001 From: Igor Nikonov Date: Sat, 11 Mar 2023 12:03:34 +0000 Subject: [PATCH 715/841] Remove debug log --- src/Processors/QueryPlan/Optimizations/distinctReadInOrder.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Processors/QueryPlan/Optimizations/distinctReadInOrder.cpp b/src/Processors/QueryPlan/Optimizations/distinctReadInOrder.cpp index b29c7a9d741..b5a15e7e3e7 100644 --- a/src/Processors/QueryPlan/Optimizations/distinctReadInOrder.cpp +++ b/src/Processors/QueryPlan/Optimizations/distinctReadInOrder.cpp @@ -149,10 +149,7 @@ size_t tryDistinctReadInOrder(QueryPlan::Node * parent_node) const int direction = 0; /// for DISTINCT direction doesn't matter, ReadFromMergeTree will choose proper one bool can_read = read_from_merge_tree->requestReadingInOrder(number_of_sorted_distinct_columns, direction, pre_distinct->getLimitHint()); if (!can_read) - { - LOG_DEBUG(&Poco::Logger::get(__PRETTY_FUNCTION__), "Can't read in order"); return 0; - } /// update data stream's sorting properties for found transforms const DataStream * input_stream = &read_from_merge_tree->getOutputStream(); From 73d3cc6f0cd36ba664d2b63fa20ad9b79b63bd46 Mon Sep 17 00:00:00 2001 From: Igor Nikonov Date: Sat, 11 Mar 2023 12:40:44 +0000 Subject: [PATCH 716/841] some polishing --- .../Optimizations/distinctReadInOrder.cpp | 41 +++++++++++-------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/src/Processors/QueryPlan/Optimizations/distinctReadInOrder.cpp b/src/Processors/QueryPlan/Optimizations/distinctReadInOrder.cpp index b5a15e7e3e7..6334594de30 100644 --- a/src/Processors/QueryPlan/Optimizations/distinctReadInOrder.cpp +++ b/src/Processors/QueryPlan/Optimizations/distinctReadInOrder.cpp @@ -54,6 +54,26 @@ static const ActionsDAG::Node * getOriginalNodeForOutputAlias(const ActionsDAGPt return node; } +static std::set +getOriginalDistinctColumns(const ColumnsWithTypeAndName & distinct_columns, std::vector & dag_stack) +{ + auto actions = buildActionsForPlanPath(dag_stack); + std::set original_distinct_columns; + for (const auto & column : distinct_columns) + { + /// const columns doesn't affect DISTINCT, so skip them + if (isColumnConst(*column.column)) + continue; + + const auto * input_node = getOriginalNodeForOutputAlias(actions, column.name); + if (!input_node) + break; + + original_distinct_columns.insert(input_node->result_name); + } + return original_distinct_columns; +} + size_t tryDistinctReadInOrder(QueryPlan::Node * parent_node) { /// check if it is preliminary distinct node @@ -69,6 +89,7 @@ size_t tryDistinctReadInOrder(QueryPlan::Node * parent_node) /// walk through the plan /// (1) check if nodes below preliminary distinct preserve sorting /// (2) gather transforming steps to update their sorting properties later + /// (3) gather actions DAG to find original names for columns in distinct step later std::vector steps_to_update; QueryPlan::Node * node = parent_node; std::vector dag_stack; @@ -103,28 +124,16 @@ size_t tryDistinctReadInOrder(QueryPlan::Node * parent_node) if (read_from_merge_tree->getOutputStream().sort_description.empty()) return 0; - /// find original non-const columns in DISTINCT - auto actions = buildActionsForPlanPath(dag_stack); + /// get original names for DISTINCT columns const ColumnsWithTypeAndName & distinct_columns = pre_distinct->getOutputStream().header.getColumnsWithTypeAndName(); - std::set original_distinct_columns; - for (const auto & column : distinct_columns) - { - if (isColumnConst(*column.column)) - continue; + auto original_distinct_columns = getOriginalDistinctColumns(distinct_columns, dag_stack); - const auto * input_node = getOriginalNodeForOutputAlias(actions, column.name); - if (!input_node) - break; - - original_distinct_columns.insert(input_node->result_name); - } - - const Names& sorting_key_columns = read_from_merge_tree->getStorageMetadata()->getSortingKeyColumns(); /// check if DISTINCT has the same columns as sorting key + const Names & sorting_key_columns = read_from_merge_tree->getStorageMetadata()->getSortingKeyColumns(); size_t number_of_sorted_distinct_columns = 0; for (const auto & column_name : sorting_key_columns) { - if (original_distinct_columns.end() == original_distinct_columns.find(column_name)) + if (!original_distinct_columns.contains(column_name)) break; ++number_of_sorted_distinct_columns; From c331bc48a398e9689b5df0f207e75d038b248e18 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Sat, 11 Mar 2023 14:25:30 +0100 Subject: [PATCH 717/841] Fixed tests --- .../00378_json_quote_64bit_integers.sql | 1 + .../01561_clickhouse_client_stage.reference | 10 +++++----- .../0_stateless/01561_clickhouse_client_stage.sh | 14 +++++++++----- .../queries/0_stateless/01591_window_functions.sql | 2 ++ .../02048_clickhouse_local_stage.reference | 10 +++++----- .../0_stateless/02048_clickhouse_local_stage.sh | 14 +++++++++----- 6 files changed, 31 insertions(+), 20 deletions(-) diff --git a/tests/queries/0_stateless/00378_json_quote_64bit_integers.sql b/tests/queries/0_stateless/00378_json_quote_64bit_integers.sql index 3a70b64bc86..e7b59bc3f7f 100644 --- a/tests/queries/0_stateless/00378_json_quote_64bit_integers.sql +++ b/tests/queries/0_stateless/00378_json_quote_64bit_integers.sql @@ -2,6 +2,7 @@ SET output_format_write_statistics = 0; SET extremes = 1; +SET allow_experimental_analyzer = 1; SET output_format_json_quote_64bit_integers = 1; SELECT toInt64(0) as i0, toUInt64(0) as u0, toInt64(9223372036854775807) as ip, toInt64(-9223372036854775808) as in, toUInt64(18446744073709551615) as up, [toInt64(0)] as arr, (toUInt64(0), toUInt64(0)) as tuple GROUP BY i0, u0, ip, in, up, arr, tuple WITH TOTALS FORMAT JSON; diff --git a/tests/queries/0_stateless/01561_clickhouse_client_stage.reference b/tests/queries/0_stateless/01561_clickhouse_client_stage.reference index 676cca1e866..00e0f4ddb2e 100644 --- a/tests/queries/0_stateless/01561_clickhouse_client_stage.reference +++ b/tests/queries/0_stateless/01561_clickhouse_client_stage.reference @@ -1,15 +1,15 @@ -execute: default +execute: --allow_experimental_analyzer=1 "foo" 1 -execute: --stage fetch_columns +execute: --allow_experimental_analyzer=1 --stage fetch_columns "system.one.dummy_0" 0 -execute: --stage with_mergeable_state +execute: --allow_experimental_analyzer=1 --stage with_mergeable_state "1_UInt8" 1 -execute: --stage with_mergeable_state_after_aggregation +execute: --allow_experimental_analyzer=1 --stage with_mergeable_state_after_aggregation "1_UInt8" 1 -execute: --stage complete +execute: --allow_experimental_analyzer=1 --stage complete "foo" 1 diff --git a/tests/queries/0_stateless/01561_clickhouse_client_stage.sh b/tests/queries/0_stateless/01561_clickhouse_client_stage.sh index 72161333812..99267458421 100755 --- a/tests/queries/0_stateless/01561_clickhouse_client_stage.sh +++ b/tests/queries/0_stateless/01561_clickhouse_client_stage.sh @@ -5,6 +5,10 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh . "$CURDIR"/../shell_config.sh +opts=( + "--allow_experimental_analyzer=1" +) + function execute_query() { if [ $# -eq 0 ]; then @@ -15,8 +19,8 @@ function execute_query() ${CLICKHOUSE_CLIENT} "$@" --format CSVWithNames -q "SELECT 1 AS foo" } -execute_query # default -- complete -execute_query --stage fetch_columns -execute_query --stage with_mergeable_state -execute_query --stage with_mergeable_state_after_aggregation -execute_query --stage complete +execute_query "${opts[@]}" # default -- complete +execute_query "${opts[@]}" --stage fetch_columns +execute_query "${opts[@]}" --stage with_mergeable_state +execute_query "${opts[@]}" --stage with_mergeable_state_after_aggregation +execute_query "${opts[@]}" --stage complete diff --git a/tests/queries/0_stateless/01591_window_functions.sql b/tests/queries/0_stateless/01591_window_functions.sql index 3f4a028eac2..3c9c1f9cea7 100644 --- a/tests/queries/0_stateless/01591_window_functions.sql +++ b/tests/queries/0_stateless/01591_window_functions.sql @@ -1,5 +1,7 @@ -- Tags: long +SET allow_experimental_analyzer = 1; + -- { echo } -- just something basic diff --git a/tests/queries/0_stateless/02048_clickhouse_local_stage.reference b/tests/queries/0_stateless/02048_clickhouse_local_stage.reference index 676cca1e866..00e0f4ddb2e 100644 --- a/tests/queries/0_stateless/02048_clickhouse_local_stage.reference +++ b/tests/queries/0_stateless/02048_clickhouse_local_stage.reference @@ -1,15 +1,15 @@ -execute: default +execute: --allow_experimental_analyzer=1 "foo" 1 -execute: --stage fetch_columns +execute: --allow_experimental_analyzer=1 --stage fetch_columns "system.one.dummy_0" 0 -execute: --stage with_mergeable_state +execute: --allow_experimental_analyzer=1 --stage with_mergeable_state "1_UInt8" 1 -execute: --stage with_mergeable_state_after_aggregation +execute: --allow_experimental_analyzer=1 --stage with_mergeable_state_after_aggregation "1_UInt8" 1 -execute: --stage complete +execute: --allow_experimental_analyzer=1 --stage complete "foo" 1 diff --git a/tests/queries/0_stateless/02048_clickhouse_local_stage.sh b/tests/queries/0_stateless/02048_clickhouse_local_stage.sh index 5c1303b5160..182acc23a13 100755 --- a/tests/queries/0_stateless/02048_clickhouse_local_stage.sh +++ b/tests/queries/0_stateless/02048_clickhouse_local_stage.sh @@ -5,6 +5,10 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh . "$CURDIR"/../shell_config.sh +opts=( + "--allow_experimental_analyzer=1" +) + function execute_query() { if [ $# -eq 0 ]; then @@ -15,8 +19,8 @@ function execute_query() ${CLICKHOUSE_LOCAL} "$@" --format CSVWithNames -q "SELECT 1 AS foo" } -execute_query # default -- complete -execute_query --stage fetch_columns -execute_query --stage with_mergeable_state -execute_query --stage with_mergeable_state_after_aggregation -execute_query --stage complete +execute_query "${opts[@]}" # default -- complete +execute_query "${opts[@]}" --stage fetch_columns +execute_query "${opts[@]}" --stage with_mergeable_state +execute_query "${opts[@]}" --stage with_mergeable_state_after_aggregation +execute_query "${opts[@]}" --stage complete From 3687698b155f5dca42a4a1266b8027128e519dae Mon Sep 17 00:00:00 2001 From: flynn Date: Sat, 11 Mar 2023 15:03:10 +0000 Subject: [PATCH 718/841] Fix explain graph with projection --- src/Processors/QueryPlan/ISourceStep.cpp | 7 +- src/Processors/QueryPlan/ISourceStep.h | 2 + src/QueryPipeline/Pipe.cpp | 10 ++ src/QueryPipeline/Pipe.h | 2 + src/QueryPipeline/QueryPipelineBuilder.h | 2 + ... => 02677_grace_hash_limit_race.reference} | 0 ...ce.sql => 02677_grace_hash_limit_race.sql} | 0 ...78_explain_graph_with_projection.reference | 116 ++++++++++++++++++ .../02678_explain_graph_with_projection.sql | 11 ++ 9 files changed, 149 insertions(+), 1 deletion(-) rename tests/queries/0_stateless/{25340_grace_hash_limit_race.reference => 02677_grace_hash_limit_race.reference} (100%) rename tests/queries/0_stateless/{25340_grace_hash_limit_race.sql => 02677_grace_hash_limit_race.sql} (100%) create mode 100644 tests/queries/0_stateless/02678_explain_graph_with_projection.reference create mode 100644 tests/queries/0_stateless/02678_explain_graph_with_projection.sql diff --git a/src/Processors/QueryPlan/ISourceStep.cpp b/src/Processors/QueryPlan/ISourceStep.cpp index 0644d9b44eb..562f92ff63b 100644 --- a/src/Processors/QueryPlan/ISourceStep.cpp +++ b/src/Processors/QueryPlan/ISourceStep.cpp @@ -12,8 +12,13 @@ ISourceStep::ISourceStep(DataStream output_stream_) QueryPipelineBuilderPtr ISourceStep::updatePipeline(QueryPipelineBuilders, const BuildQueryPipelineSettings & settings) { auto pipeline = std::make_unique(); - QueryPipelineProcessorsCollector collector(*pipeline, this); initializePipeline(*pipeline, settings); + QueryPipelineProcessorsCollector collector(*pipeline, this); + + /// Properly collecting processors from Pipe. + /// At the creation time of a Pipe, since `collected_processors` is nullptr, + /// the processors can not be collected. + pipeline->collectProcessors(); auto added_processors = collector.detachProcessors(); processors.insert(processors.end(), added_processors.begin(), added_processors.end()); return pipeline; diff --git a/src/Processors/QueryPlan/ISourceStep.h b/src/Processors/QueryPlan/ISourceStep.h index 744b6f9b5c4..1327444697e 100644 --- a/src/Processors/QueryPlan/ISourceStep.h +++ b/src/Processors/QueryPlan/ISourceStep.h @@ -10,6 +10,8 @@ class ISourceStep : public IQueryPlanStep public: explicit ISourceStep(DataStream output_stream_); + String getName() const override { return "ISourceStep"; } + QueryPipelineBuilderPtr updatePipeline(QueryPipelineBuilders pipelines, const BuildQueryPipelineSettings & settings) override; virtual void initializePipeline(QueryPipelineBuilder & pipeline, const BuildQueryPipelineSettings & settings) = 0; diff --git a/src/QueryPipeline/Pipe.cpp b/src/QueryPipeline/Pipe.cpp index 91ba01c479f..a20b154054a 100644 --- a/src/QueryPipeline/Pipe.cpp +++ b/src/QueryPipeline/Pipe.cpp @@ -867,4 +867,14 @@ void Pipe::transform(const Transformer & transformer, bool check_ports) max_parallel_streams = std::max(max_parallel_streams, output_ports.size()); } +void Pipe::collectProcessors() +{ + if (collected_processors) + { + for (const auto & processor : *processors) + { + collected_processors->emplace_back(processor); + } + } +} } diff --git a/src/QueryPipeline/Pipe.h b/src/QueryPipeline/Pipe.h index 09931e38578..a19364f7907 100644 --- a/src/QueryPipeline/Pipe.h +++ b/src/QueryPipeline/Pipe.h @@ -104,6 +104,8 @@ public: std::shared_ptr getProcessorsPtr() { return processors; } + void collectProcessors(); + private: /// Header is common for all output below. Block header; diff --git a/src/QueryPipeline/QueryPipelineBuilder.h b/src/QueryPipeline/QueryPipelineBuilder.h index 4f984680c75..51a1aa69563 100644 --- a/src/QueryPipeline/QueryPipelineBuilder.h +++ b/src/QueryPipeline/QueryPipelineBuilder.h @@ -185,6 +185,8 @@ public: static Pipe getPipe(QueryPipelineBuilder pipeline, QueryPlanResourceHolder & resources); static QueryPipeline getPipeline(QueryPipelineBuilder builder); + void collectProcessors() { pipe.collectProcessors(); } + private: /// Destruction order: processors, header, locks, temporary storages, local contexts diff --git a/tests/queries/0_stateless/25340_grace_hash_limit_race.reference b/tests/queries/0_stateless/02677_grace_hash_limit_race.reference similarity index 100% rename from tests/queries/0_stateless/25340_grace_hash_limit_race.reference rename to tests/queries/0_stateless/02677_grace_hash_limit_race.reference diff --git a/tests/queries/0_stateless/25340_grace_hash_limit_race.sql b/tests/queries/0_stateless/02677_grace_hash_limit_race.sql similarity index 100% rename from tests/queries/0_stateless/25340_grace_hash_limit_race.sql rename to tests/queries/0_stateless/02677_grace_hash_limit_race.sql diff --git a/tests/queries/0_stateless/02678_explain_graph_with_projection.reference b/tests/queries/0_stateless/02678_explain_graph_with_projection.reference new file mode 100644 index 00000000000..0c513f735cc --- /dev/null +++ b/tests/queries/0_stateless/02678_explain_graph_with_projection.reference @@ -0,0 +1,116 @@ +digraph +{ + rankdir="LR"; + { node [shape = rect] + subgraph cluster_0 { + label ="Expression"; + style=filled; + color=lightgrey; + node [style=filled,color=white]; + { rank = same; + n4 [label="ExpressionTransform"]; + } + } + subgraph cluster_1 { + label ="ReadFromStorage"; + style=filled; + color=lightgrey; + node [style=filled,color=white]; + { rank = same; + n3 [label="AggregatingTransform"]; + n2 [label="ExpressionTransform"]; + n1 [label="SourceFromSingleChunk"]; + } + } + } + n3 -> n4 [label=""]; + n2 -> n3 [label=""]; + n1 -> n2 [label=""]; +} +digraph +{ + rankdir="LR"; + { node [shape = rect] + subgraph cluster_0 { + label ="Expression"; + style=filled; + color=lightgrey; + node [style=filled,color=white]; + { rank = same; + n4 [label="ExpressionTransform"]; + } + } + subgraph cluster_1 { + label ="ReadFromStorage"; + style=filled; + color=lightgrey; + node [style=filled,color=white]; + { rank = same; + n3 [label="AggregatingTransform"]; + n2 [label="ExpressionTransform"]; + n1 [label="SourceFromSingleChunk"]; + } + } + } + n3 -> n4 [label=""]; + n2 -> n3 [label=""]; + n1 -> n2 [label=""]; +} +digraph +{ + rankdir="LR"; + { node [shape = rect] + subgraph cluster_0 { + label ="Expression"; + style=filled; + color=lightgrey; + node [style=filled,color=white]; + { rank = same; + n4 [label="ExpressionTransform"]; + } + } + subgraph cluster_1 { + label ="ReadFromStorage"; + style=filled; + color=lightgrey; + node [style=filled,color=white]; + { rank = same; + n3 [label="AggregatingTransform"]; + n2 [label="ExpressionTransform"]; + n1 [label="SourceFromSingleChunk"]; + } + } + } + n3 -> n4 [label=""]; + n2 -> n3 [label=""]; + n1 -> n2 [label=""]; +} +digraph +{ + rankdir="LR"; + { node [shape = rect] + subgraph cluster_0 { + label ="Expression"; + style=filled; + color=lightgrey; + node [style=filled,color=white]; + { rank = same; + n4 [label="ExpressionTransform"]; + } + } + subgraph cluster_1 { + label ="ReadFromStorage"; + style=filled; + color=lightgrey; + node [style=filled,color=white]; + { rank = same; + n3 [label="AggregatingTransform"]; + n2 [label="ExpressionTransform"]; + n1 [label="SourceFromSingleChunk"]; + } + } + } + n3 -> n4 [label=""]; + n2 -> n3 [label=""]; + n1 -> n2 [label=""]; +} diff --git a/tests/queries/0_stateless/02678_explain_graph_with_projection.sql b/tests/queries/0_stateless/02678_explain_graph_with_projection.sql new file mode 100644 index 00000000000..06ee1078e74 --- /dev/null +++ b/tests/queries/0_stateless/02678_explain_graph_with_projection.sql @@ -0,0 +1,11 @@ +DROP TABLE IF EXISTS t1; +CREATE TABLE t1(ID UInt64, name String) engine=MergeTree order by ID; + +insert into t1(ID, name) values (1, 'abc'), (2, 'bbb'); + +explain pipeline graph=1 select count(ID) from t1; +explain pipeline graph=1 select sum(1) from t1; +explain pipeline graph=1 select min(ID) from t1; +explain pipeline graph=1 select max(ID) from t1; + +DROP TABLE t1; From 3e554c2925c0a8604d53bcb665ce8f1f5d2ebc9c Mon Sep 17 00:00:00 2001 From: flynn Date: Sat, 11 Mar 2023 15:24:19 +0000 Subject: [PATCH 719/841] fix --- src/Processors/QueryPlan/ISourceStep.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Processors/QueryPlan/ISourceStep.h b/src/Processors/QueryPlan/ISourceStep.h index 1327444697e..744b6f9b5c4 100644 --- a/src/Processors/QueryPlan/ISourceStep.h +++ b/src/Processors/QueryPlan/ISourceStep.h @@ -10,8 +10,6 @@ class ISourceStep : public IQueryPlanStep public: explicit ISourceStep(DataStream output_stream_); - String getName() const override { return "ISourceStep"; } - QueryPipelineBuilderPtr updatePipeline(QueryPipelineBuilders pipelines, const BuildQueryPipelineSettings & settings) override; virtual void initializePipeline(QueryPipelineBuilder & pipeline, const BuildQueryPipelineSettings & settings) = 0; From 8585fae467476d5f7830fcfc7e8773bc292e5176 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Sat, 11 Mar 2023 16:31:31 +0100 Subject: [PATCH 720/841] Fixed tests --- tests/queries/0_stateless/00722_inner_join.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/queries/0_stateless/00722_inner_join.sql b/tests/queries/0_stateless/00722_inner_join.sql index 75ef40ff2b7..0d5a543b99d 100644 --- a/tests/queries/0_stateless/00722_inner_join.sql +++ b/tests/queries/0_stateless/00722_inner_join.sql @@ -1,3 +1,5 @@ +-- Tags: no-parallel + SET allow_experimental_analyzer = 1; DROP TABLE IF EXISTS one; From 530c9ae4905fb5f52b7ac460cf09fe0568cd72ea Mon Sep 17 00:00:00 2001 From: flynn Date: Sat, 11 Mar 2023 15:43:19 +0000 Subject: [PATCH 721/841] revert --- src/Interpreters/InterpreterExplainQuery.cpp | 5 +- src/QueryPipeline/printPipeline.cpp | 173 ++++++++++++++++++ src/QueryPipeline/printPipeline.h | 5 + .../02678_explain_pipeline_graph.reference | 0 .../02678_explain_pipeline_graph.sql | 7 - ..._pipeline_graph_with_projection.reference} | 0 ...xplain_pipeline_graph_with_projection.sql} | 0 7 files changed, 182 insertions(+), 8 deletions(-) create mode 100644 src/QueryPipeline/printPipeline.cpp delete mode 100644 tests/queries/0_stateless/02678_explain_pipeline_graph.reference delete mode 100644 tests/queries/0_stateless/02678_explain_pipeline_graph.sql rename tests/queries/0_stateless/{02678_explain_graph_with_projection.reference => 02678_explain_pipeline_graph_with_projection.reference} (100%) rename tests/queries/0_stateless/{02678_explain_graph_with_projection.sql => 02678_explain_pipeline_graph_with_projection.sql} (100%) diff --git a/src/Interpreters/InterpreterExplainQuery.cpp b/src/Interpreters/InterpreterExplainQuery.cpp index b2172a07e91..3c225522cc4 100644 --- a/src/Interpreters/InterpreterExplainQuery.cpp +++ b/src/Interpreters/InterpreterExplainQuery.cpp @@ -504,7 +504,10 @@ QueryPipeline InterpreterExplainQuery::executeImpl() auto pipe = QueryPipelineBuilder::getPipe(std::move(*pipeline), resources); const auto & processors = pipe.getProcessors(); - printPipeline(processors, buf); + if (settings.compact) + printPipelineCompact(processors, buf, settings.query_pipeline_options.header); + else + printPipeline(processors, buf); } else { diff --git a/src/QueryPipeline/printPipeline.cpp b/src/QueryPipeline/printPipeline.cpp new file mode 100644 index 00000000000..de978578618 --- /dev/null +++ b/src/QueryPipeline/printPipeline.cpp @@ -0,0 +1,173 @@ +#include +#include +#include +#include + +namespace DB +{ + +void printPipelineCompact(const Processors & processors, WriteBuffer & out, bool with_header) +{ + struct Node; + + /// Group by processors name, QueryPlanStep and group in this step. + struct Key + { + size_t group; + IQueryPlanStep * step; + std::string name; + + auto getTuple() const { return std::forward_as_tuple(group, step, name); } + + bool operator<(const Key & other) const { return getTuple() < other.getTuple(); } + }; + + /// Group ports by header. + struct EdgeData + { + Block header; + size_t count; + }; + + using Edge = std::vector; + + struct Node + { + size_t id = 0; + std::map edges = {}; + std::vector agents = {}; + }; + + std::map graph; + + auto get_key = [](const IProcessor & processor) { + return Key{processor.getQueryPlanStepGroup(), processor.getQueryPlanStep(), processor.getName()}; + }; + + /// Fill nodes. + for (const auto & processor : processors) + { + auto res = graph.emplace(get_key(*processor), Node()); + auto & node = res.first->second; + node.agents.emplace_back(processor.get()); + + if (res.second) + node.id = graph.size(); + } + + Block empty_header; + + /// Fill edges. + for (const auto & processor : processors) + { + auto & from = graph[get_key(*processor)]; + + for (auto & port : processor->getOutputs()) + { + if (!port.isConnected()) + continue; + + auto & to = graph[get_key(port.getInputPort().getProcessor())]; + auto & edge = from.edges[&to]; + + /// Use empty header for each edge if with_header is false. + const auto & header = with_header ? port.getHeader() : empty_header; + + /// Group by header. + bool found = false; + for (auto & item : edge) + { + if (blocksHaveEqualStructure(header, item.header)) + { + found = true; + ++item.count; + break; + } + } + + if (!found) + edge.emplace_back(EdgeData{header, 1}); + } + } + + /// Group processors by it's QueryPlanStep. + std::map> steps_map; + + for (const auto & item : graph) + steps_map[item.first.step].emplace_back(&item.second); + + out << "digraph\n{\n"; + out << " rankdir=\"LR\";\n"; + out << " { node [shape = rect]\n"; + + /// Nodes // TODO quoting and escaping + size_t next_step = 0; + for (const auto & item : steps_map) + { + /// Use separate clusters for each step. + if (item.first != nullptr) + { + out << " subgraph cluster_" << next_step << " {\n"; + out << " label =\"" << item.first->getName() << "\";\n"; + out << " style=filled;\n"; + out << " color=lightgrey;\n"; + out << " node [style=filled,color=white];\n"; + out << " { rank = same;\n"; + + ++next_step; + } + + for (const auto & node : item.second) + { + const auto & processor = node->agents.front(); + out << " n" << node->id << " [label=\"" << processor->getName(); + + if (node->agents.size() > 1) + out << " × " << node->agents.size(); + + const auto & description = processor->getDescription(); + if (!description.empty()) + out << ' ' << description; + + out << "\"];\n"; + } + + if (item.first != nullptr) + { + out << " }\n"; + out << " }\n"; + } + } + + out << " }\n"; + + /// Edges + for (const auto & item : graph) + { + for (const auto & edge : item.second.edges) + { + for (const auto & data : edge.second) + { + out << " n" << item.second.id << " -> " + << "n" << edge.first->id << " [label=\""; + + if (data.count > 1) + out << "× " << data.count; + + if (with_header) + { + for (const auto & elem : data.header) + { + out << "\n"; + elem.dumpStructure(out); + } + } + + out << "\"];\n"; + } + } + } + out << "}\n"; +} + +} diff --git a/src/QueryPipeline/printPipeline.h b/src/QueryPipeline/printPipeline.h index ff3b53300ce..e91909cb50b 100644 --- a/src/QueryPipeline/printPipeline.h +++ b/src/QueryPipeline/printPipeline.h @@ -64,4 +64,9 @@ void printPipeline(const Processors & processors, WriteBuffer & out) printPipeline(processors, std::vector(), out); } +/// Prints pipeline in compact representation. +/// Group processors by it's name, QueryPlanStep and QueryPlanStepGroup. +/// If QueryPlanStep wasn't set for processor, representation may be not correct. +/// If with_header is set, prints block header for each edge. +void printPipelineCompact(const Processors & processors, WriteBuffer & out, bool with_header); } diff --git a/tests/queries/0_stateless/02678_explain_pipeline_graph.reference b/tests/queries/0_stateless/02678_explain_pipeline_graph.reference deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/queries/0_stateless/02678_explain_pipeline_graph.sql b/tests/queries/0_stateless/02678_explain_pipeline_graph.sql deleted file mode 100644 index 48cfbf2b349..00000000000 --- a/tests/queries/0_stateless/02678_explain_pipeline_graph.sql +++ /dev/null @@ -1,7 +0,0 @@ --- The server does not crash after these queries: - -DROP TABLE IF EXISTS t1; -CREATE TABLE t1(ID UInt64, name String) engine=MergeTree order by ID; -insert into t1(ID, name) values (1, 'abc'), (2, 'bbb'); -explain pipeline graph=1 select count(ID) from t1 FORMAT Null; -DROP TABLE t1; diff --git a/tests/queries/0_stateless/02678_explain_graph_with_projection.reference b/tests/queries/0_stateless/02678_explain_pipeline_graph_with_projection.reference similarity index 100% rename from tests/queries/0_stateless/02678_explain_graph_with_projection.reference rename to tests/queries/0_stateless/02678_explain_pipeline_graph_with_projection.reference diff --git a/tests/queries/0_stateless/02678_explain_graph_with_projection.sql b/tests/queries/0_stateless/02678_explain_pipeline_graph_with_projection.sql similarity index 100% rename from tests/queries/0_stateless/02678_explain_graph_with_projection.sql rename to tests/queries/0_stateless/02678_explain_pipeline_graph_with_projection.sql From 191bc9717e5f6dd7e6e3065e1588d98a3e0fa110 Mon Sep 17 00:00:00 2001 From: flynn Date: Sat, 11 Mar 2023 15:58:16 +0000 Subject: [PATCH 722/841] fix style --- src/QueryPipeline/printPipeline.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/QueryPipeline/printPipeline.cpp b/src/QueryPipeline/printPipeline.cpp index de978578618..40c88502ed0 100644 --- a/src/QueryPipeline/printPipeline.cpp +++ b/src/QueryPipeline/printPipeline.cpp @@ -1,7 +1,7 @@ -#include -#include -#include #include +#include +#include +#include namespace DB { @@ -19,7 +19,10 @@ void printPipelineCompact(const Processors & processors, WriteBuffer & out, bool auto getTuple() const { return std::forward_as_tuple(group, step, name); } - bool operator<(const Key & other) const { return getTuple() < other.getTuple(); } + bool operator<(const Key & other) const + { + return getTuple() < other.getTuple(); + } }; /// Group ports by header. @@ -40,7 +43,8 @@ void printPipelineCompact(const Processors & processors, WriteBuffer & out, bool std::map graph; - auto get_key = [](const IProcessor & processor) { + auto get_key = [](const IProcessor & processor) + { return Key{processor.getQueryPlanStepGroup(), processor.getQueryPlanStep(), processor.getName()}; }; @@ -60,7 +64,7 @@ void printPipelineCompact(const Processors & processors, WriteBuffer & out, bool /// Fill edges. for (const auto & processor : processors) { - auto & from = graph[get_key(*processor)]; + auto & from = graph[get_key(*processor)]; for (auto & port : processor->getOutputs()) { @@ -71,7 +75,8 @@ void printPipelineCompact(const Processors & processors, WriteBuffer & out, bool auto & edge = from.edges[&to]; /// Use empty header for each edge if with_header is false. - const auto & header = with_header ? port.getHeader() : empty_header; + const auto & header = with_header ? port.getHeader() + : empty_header; /// Group by header. bool found = false; @@ -148,8 +153,7 @@ void printPipelineCompact(const Processors & processors, WriteBuffer & out, bool { for (const auto & data : edge.second) { - out << " n" << item.second.id << " -> " - << "n" << edge.first->id << " [label=\""; + out << " n" << item.second.id << " -> " << "n" << edge.first->id << " [label=\""; if (data.count > 1) out << "× " << data.count; From 0359b3e336f3e207daca42c73286ca7b5603cfb9 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Sat, 11 Mar 2023 17:01:10 +0100 Subject: [PATCH 723/841] Revert "Merge pull request #46622 from ClickHouse/async-insert-memory-fix" This reverts commit 67469ad46b017360389ab80459682f6bffa26ed7, reversing changes made to 678e4250cd40c8849a0c01e1de70545455cf0c06. --- src/Common/CurrentThread.cpp | 19 --------- src/Common/CurrentThread.h | 6 --- src/Interpreters/AsynchronousInsertQueue.cpp | 6 +-- src/Interpreters/AsynchronousInsertQueue.h | 42 +------------------ .../test_async_insert_memory/__init__.py | 0 .../test_async_insert_memory/test.py | 40 ------------------ 6 files changed, 3 insertions(+), 110 deletions(-) delete mode 100644 tests/integration/test_async_insert_memory/__init__.py delete mode 100644 tests/integration/test_async_insert_memory/test.py diff --git a/src/Common/CurrentThread.cpp b/src/Common/CurrentThread.cpp index b54cf3b9371..188e78fe69b 100644 --- a/src/Common/CurrentThread.cpp +++ b/src/Common/CurrentThread.cpp @@ -110,23 +110,4 @@ ThreadGroupStatusPtr CurrentThread::getGroup() return current_thread->getThreadGroup(); } -MemoryTracker * CurrentThread::getUserMemoryTracker() -{ - if (unlikely(!current_thread)) - return nullptr; - - auto * tracker = current_thread->memory_tracker.getParent(); - while (tracker && tracker->level != VariableContext::User) - tracker = tracker->getParent(); - - return tracker; -} - -void CurrentThread::flushUntrackedMemory() -{ - if (unlikely(!current_thread)) - return; - current_thread->flushUntrackedMemory(); -} - } diff --git a/src/Common/CurrentThread.h b/src/Common/CurrentThread.h index ffc00c77504..f4975e800ca 100644 --- a/src/Common/CurrentThread.h +++ b/src/Common/CurrentThread.h @@ -40,12 +40,6 @@ public: /// Group to which belongs current thread static ThreadGroupStatusPtr getGroup(); - /// MemoryTracker for user that owns current thread if any - static MemoryTracker * getUserMemoryTracker(); - - /// Adjust counters in MemoryTracker hierarchy if untracked_memory is not 0. - static void flushUntrackedMemory(); - /// A logs queue used by TCPHandler to pass logs to a client static void attachInternalTextLogsQueue(const std::shared_ptr & logs_queue, LogsLevel client_logs_level); diff --git a/src/Interpreters/AsynchronousInsertQueue.cpp b/src/Interpreters/AsynchronousInsertQueue.cpp index 78b173de6dc..590cbc9ba83 100644 --- a/src/Interpreters/AsynchronousInsertQueue.cpp +++ b/src/Interpreters/AsynchronousInsertQueue.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -104,10 +103,9 @@ bool AsynchronousInsertQueue::InsertQuery::operator==(const InsertQuery & other) return query_str == other.query_str && settings == other.settings; } -AsynchronousInsertQueue::InsertData::Entry::Entry(String && bytes_, String && query_id_, MemoryTracker * user_memory_tracker_) +AsynchronousInsertQueue::InsertData::Entry::Entry(String && bytes_, String && query_id_) : bytes(std::move(bytes_)) , query_id(std::move(query_id_)) - , user_memory_tracker(user_memory_tracker_) , create_time(std::chrono::system_clock::now()) { } @@ -236,7 +234,7 @@ AsynchronousInsertQueue::push(ASTPtr query, ContextPtr query_context) if (auto quota = query_context->getQuota()) quota->used(QuotaType::WRITTEN_BYTES, bytes.size()); - auto entry = std::make_shared(std::move(bytes), query_context->getCurrentQueryId(), CurrentThread::getUserMemoryTracker()); + auto entry = std::make_shared(std::move(bytes), query_context->getCurrentQueryId()); InsertQuery key{query, settings}; InsertDataPtr data_to_process; diff --git a/src/Interpreters/AsynchronousInsertQueue.h b/src/Interpreters/AsynchronousInsertQueue.h index e6b7bff8d26..23a2860364d 100644 --- a/src/Interpreters/AsynchronousInsertQueue.h +++ b/src/Interpreters/AsynchronousInsertQueue.h @@ -1,7 +1,6 @@ #pragma once #include -#include #include #include #include @@ -60,31 +59,6 @@ private: UInt128 calculateHash() const; }; - struct UserMemoryTrackerSwitcher - { - explicit UserMemoryTrackerSwitcher(MemoryTracker * new_tracker) - { - auto * thread_tracker = CurrentThread::getMemoryTracker(); - prev_untracked_memory = current_thread->untracked_memory; - prev_memory_tracker_parent = thread_tracker->getParent(); - - current_thread->untracked_memory = 0; - thread_tracker->setParent(new_tracker); - } - - ~UserMemoryTrackerSwitcher() - { - CurrentThread::flushUntrackedMemory(); - auto * thread_tracker = CurrentThread::getMemoryTracker(); - - current_thread->untracked_memory = prev_untracked_memory; - thread_tracker->setParent(prev_memory_tracker_parent); - } - - MemoryTracker * prev_memory_tracker_parent; - Int64 prev_untracked_memory; - }; - struct InsertData { struct Entry @@ -92,10 +66,9 @@ private: public: const String bytes; const String query_id; - MemoryTracker * const user_memory_tracker; const std::chrono::time_point create_time; - Entry(String && bytes_, String && query_id_, MemoryTracker * user_memory_tracker_); + Entry(String && bytes_, String && query_id_); void finish(std::exception_ptr exception_ = nullptr); std::future getFuture() { return promise.get_future(); } @@ -106,19 +79,6 @@ private: std::atomic_bool finished = false; }; - ~InsertData() - { - auto it = entries.begin(); - // Entries must be destroyed in context of user who runs async insert. - // Each entry in the list may correspond to a different user, - // so we need to switch current thread's MemoryTracker parent on each iteration. - while (it != entries.end()) - { - UserMemoryTrackerSwitcher switcher((*it)->user_memory_tracker); - it = entries.erase(it); - } - } - using EntryPtr = std::shared_ptr; std::list entries; diff --git a/tests/integration/test_async_insert_memory/__init__.py b/tests/integration/test_async_insert_memory/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/integration/test_async_insert_memory/test.py b/tests/integration/test_async_insert_memory/test.py deleted file mode 100644 index 279542f087c..00000000000 --- a/tests/integration/test_async_insert_memory/test.py +++ /dev/null @@ -1,40 +0,0 @@ -import pytest - -from helpers.cluster import ClickHouseCluster - -cluster = ClickHouseCluster(__file__) - -node = cluster.add_instance("node") - - -@pytest.fixture(scope="module", autouse=True) -def start_cluster(): - try: - cluster.start() - yield cluster - finally: - cluster.shutdown() - - -def test_memory_usage(): - node.query( - "CREATE TABLE async_table(data Array(UInt64)) ENGINE=MergeTree() ORDER BY data" - ) - - node.get_query_request("SELECT count() FROM system.numbers") - - INSERT_QUERY = "INSERT INTO async_table SETTINGS async_insert=1, wait_for_async_insert=1 VALUES ({})" - for iter in range(10): - values = list(range(iter * 5000000, (iter + 1) * 5000000)) - node.query(INSERT_QUERY.format(values)) - - response = node.get_query_request( - "SELECT groupArray(number) FROM numbers(1000000) SETTINGS max_memory_usage_for_user={}".format( - 30 * (2**23) - ) - ) - - _, err = response.get_answer_and_error() - assert err == "", "Query failed with error {}".format(err) - - node.query("DROP TABLE async_table") From 6724bfdf389faedc95bc79a8e457883b3a1b7650 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Sat, 11 Mar 2023 19:06:07 +0300 Subject: [PATCH 724/841] Disable grace hash join in upgrade check (#47474) * Update stress.py * Update stress.py * Update stress.py --- tests/ci/stress.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/ci/stress.py b/tests/ci/stress.py index 37b3b1c181e..5e151e6c098 100755 --- a/tests/ci/stress.py +++ b/tests/ci/stress.py @@ -36,7 +36,8 @@ def get_options(i, upgrade_check): client_options.append("join_algorithm='partial_merge'") if join_alg_num % 5 == 2: client_options.append("join_algorithm='full_sorting_merge'") - if join_alg_num % 5 == 3: + if join_alg_num % 5 == 3 and not upgrade_check: + # Some crashes are not fixed in 23.2 yet, so ignore the setting in Upgrade check client_options.append("join_algorithm='grace_hash'") if join_alg_num % 5 == 4: client_options.append("join_algorithm='auto'") From bd124a24eaee49afb4c3456be65f3ba37e7a5a30 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Sat, 11 Mar 2023 17:24:38 +0100 Subject: [PATCH 725/841] Revert "Merge pull request #31965 from azat/connection-drain-pull" This reverts commit 6cb54b409277fe5534424583ca94e65ea65dc97c, reversing changes made to 42d938ffa092b50d6ed7b30c1ad5b9cd0ec88731. --- programs/server/config.xml | 4 --- src/Client/IConnections.cpp | 7 +---- src/Client/MultiplexedConnections.cpp | 2 +- src/Core/Settings.h | 3 +- src/QueryPipeline/ConnectionCollector.cpp | 10 ++----- src/QueryPipeline/ConnectionCollector.h | 2 +- src/QueryPipeline/RemoteQueryExecutor.cpp | 20 +++---------- .../02127_connection_drain.reference | 2 -- .../0_stateless/02127_connection_drain.sh | 30 ------------------- 9 files changed, 10 insertions(+), 70 deletions(-) delete mode 100644 tests/queries/0_stateless/02127_connection_drain.reference delete mode 100755 tests/queries/0_stateless/02127_connection_drain.sh diff --git a/programs/server/config.xml b/programs/server/config.xml index 85cb299e188..0ea2de18e22 100644 --- a/programs/server/config.xml +++ b/programs/server/config.xml @@ -348,10 +348,6 @@ 16 --> - - - 0.9 diff --git a/src/Client/IConnections.cpp b/src/Client/IConnections.cpp index 9cc5a62ce12..341089258f5 100644 --- a/src/Client/IConnections.cpp +++ b/src/Client/IConnections.cpp @@ -25,12 +25,7 @@ struct PocoSocketWrapper : public Poco::Net::SocketImpl void IConnections::DrainCallback::operator()(int fd, Poco::Timespan, const std::string & fd_description) const { if (!PocoSocketWrapper(fd).poll(drain_timeout, Poco::Net::Socket::SELECT_READ)) - { - throw Exception(ErrorCodes::SOCKET_TIMEOUT, - "Read timeout ({} ms) while draining from {}", - drain_timeout.totalMilliseconds(), - fd_description); - } + throw Exception(ErrorCodes::SOCKET_TIMEOUT, "Read timeout while draining from {}", fd_description); } } diff --git a/src/Client/MultiplexedConnections.cpp b/src/Client/MultiplexedConnections.cpp index cc260353339..084823d71ac 100644 --- a/src/Client/MultiplexedConnections.cpp +++ b/src/Client/MultiplexedConnections.cpp @@ -390,7 +390,7 @@ MultiplexedConnections::ReplicaState & MultiplexedConnections::getReplicaForRead Poco::Net::Socket::SocketList write_list; Poco::Net::Socket::SocketList except_list; - auto timeout = is_draining ? drain_timeout : receive_timeout; + auto timeout = receive_timeout; int n = 0; /// EINTR loop diff --git a/src/Core/Settings.h b/src/Core/Settings.h index f67ce6be9ed..6af47563c22 100644 --- a/src/Core/Settings.h +++ b/src/Core/Settings.h @@ -57,7 +57,6 @@ class IColumn; M(Milliseconds, connect_timeout_with_failover_secure_ms, 100, "Connection timeout for selecting first healthy replica (for secure connections).", 0) \ M(Seconds, receive_timeout, DBMS_DEFAULT_RECEIVE_TIMEOUT_SEC, "Timeout for receiving data from network, in seconds. If no bytes were received in this interval, exception is thrown. If you set this setting on client, the 'send_timeout' for the socket will be also set on the corresponding connection end on the server.", 0) \ M(Seconds, send_timeout, DBMS_DEFAULT_SEND_TIMEOUT_SEC, "Timeout for sending data to network, in seconds. If client needs to sent some data, but it did not able to send any bytes in this interval, exception is thrown. If you set this setting on client, the 'receive_timeout' for the socket will be also set on the corresponding connection end on the server.", 0) \ - M(Seconds, drain_timeout, 3, "Timeout for draining remote connections, -1 means synchronous drain without ignoring errors", 0) \ M(Seconds, tcp_keep_alive_timeout, 290 /* less than DBMS_DEFAULT_RECEIVE_TIMEOUT_SEC */, "The time in seconds the connection needs to remain idle before TCP starts sending keepalive probes", 0) \ M(Milliseconds, hedged_connection_timeout_ms, 100, "Connection timeout for establishing connection with replica for Hedged requests", 0) \ M(Milliseconds, receive_data_timeout_ms, 2000, "Connection timeout for receiving first packet of data or packet with positive progress from replica", 0) \ @@ -759,7 +758,7 @@ class IColumn; MAKE_OBSOLETE(M, Seconds, temporary_live_view_timeout, 1) \ MAKE_OBSOLETE(M, Milliseconds, async_insert_cleanup_timeout_ms, 1000) \ MAKE_OBSOLETE(M, Bool, optimize_fuse_sum_count_avg, 0) \ - + MAKE_OBSOLETE(M, Seconds, drain_timeout, 3) \ /** The section above is for obsolete settings. Do not add anything there. */ diff --git a/src/QueryPipeline/ConnectionCollector.cpp b/src/QueryPipeline/ConnectionCollector.cpp index 7c484dcd6e8..bcee26fa192 100644 --- a/src/QueryPipeline/ConnectionCollector.cpp +++ b/src/QueryPipeline/ConnectionCollector.cpp @@ -47,7 +47,7 @@ struct AsyncDrainTask std::shared_ptr shared_connections; void operator()() const { - ConnectionCollector::drainConnections(*shared_connections, /* throw_error= */ false); + ConnectionCollector::drainConnections(*shared_connections); } // We don't have std::unique_function yet. Wrap it in shared_ptr to make the functor copyable. @@ -72,7 +72,7 @@ std::shared_ptr ConnectionCollector::enqueueConnectionCleanup( return connections; } -void ConnectionCollector::drainConnections(IConnections & connections, bool throw_error) +void ConnectionCollector::drainConnections(IConnections & connections) noexcept { bool is_drained = false; try @@ -91,9 +91,6 @@ void ConnectionCollector::drainConnections(IConnections & connections, bool thro break; default: - /// Connection should be closed in case of unexpected packet, - /// since this means that the connection in some bad state. - is_drained = false; throw NetException( ErrorCodes::UNEXPECTED_PACKET_FROM_SERVER, "Unexpected packet {} from one of the following replicas: {}. (expected EndOfStream, Log, ProfileEvents or Exception)", @@ -115,9 +112,6 @@ void ConnectionCollector::drainConnections(IConnections & connections, bool thro tryLogCurrentException(&Poco::Logger::get("ConnectionCollector"), __PRETTY_FUNCTION__); } } - - if (throw_error) - throw; } } diff --git a/src/QueryPipeline/ConnectionCollector.h b/src/QueryPipeline/ConnectionCollector.h index 44482607277..5b6e82d000e 100644 --- a/src/QueryPipeline/ConnectionCollector.h +++ b/src/QueryPipeline/ConnectionCollector.h @@ -17,7 +17,7 @@ public: static ConnectionCollector & init(ContextMutablePtr global_context_, size_t max_threads); static std::shared_ptr enqueueConnectionCleanup(const ConnectionPoolWithFailoverPtr & pool, std::shared_ptr connections) noexcept; - static void drainConnections(IConnections & connections, bool throw_error); + static void drainConnections(IConnections & connections) noexcept; private: explicit ConnectionCollector(ContextMutablePtr global_context_, size_t max_threads); diff --git a/src/QueryPipeline/RemoteQueryExecutor.cpp b/src/QueryPipeline/RemoteQueryExecutor.cpp index a10d70d22e9..a93330dc3a0 100644 --- a/src/QueryPipeline/RemoteQueryExecutor.cpp +++ b/src/QueryPipeline/RemoteQueryExecutor.cpp @@ -534,26 +534,14 @@ void RemoteQueryExecutor::finish(std::unique_ptr * read_context) /// Send the request to abort the execution of the request, if not already sent. tryCancel("Cancelling query because enough data has been read", read_context); - - if (context->getSettingsRef().drain_timeout != Poco::Timespan(-1000000)) + /// Try to drain connections asynchronously. + if (auto conn = ConnectionCollector::enqueueConnectionCleanup(pool, connections)) { - auto connections_left = ConnectionCollector::enqueueConnectionCleanup(pool, connections); - if (connections_left) - { - /// Drain connections synchronously and suppress errors. - CurrentMetrics::Increment metric_increment(CurrentMetrics::ActiveSyncDrainedConnections); - ConnectionCollector::drainConnections(*connections_left, /* throw_error= */ false); - CurrentMetrics::add(CurrentMetrics::SyncDrainedConnections, 1); - } - } - else - { - /// Drain connections synchronously without suppressing errors. + /// Drain connections synchronously. CurrentMetrics::Increment metric_increment(CurrentMetrics::ActiveSyncDrainedConnections); - ConnectionCollector::drainConnections(*connections, /* throw_error= */ true); + ConnectionCollector::drainConnections(*conn); CurrentMetrics::add(CurrentMetrics::SyncDrainedConnections, 1); } - finished = true; } diff --git a/tests/queries/0_stateless/02127_connection_drain.reference b/tests/queries/0_stateless/02127_connection_drain.reference deleted file mode 100644 index c31f2f40f6d..00000000000 --- a/tests/queries/0_stateless/02127_connection_drain.reference +++ /dev/null @@ -1,2 +0,0 @@ -OK: sync drain -OK: async drain diff --git a/tests/queries/0_stateless/02127_connection_drain.sh b/tests/queries/0_stateless/02127_connection_drain.sh deleted file mode 100755 index 523b02d9bd5..00000000000 --- a/tests/queries/0_stateless/02127_connection_drain.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash -# Tags: no-parallel - -CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) -# shellcheck source=../shell_config.sh -. "$CUR_DIR"/../shell_config.sh - -# sync drain -for _ in {1..100}; do - prev=$(curl -d@- -sS "${CLICKHOUSE_URL}" <<<"select value from system.metrics where metric = 'SyncDrainedConnections'") - curl -d@- -sS "${CLICKHOUSE_URL}" <<<"select * from remote('127.{2,3}', view(select * from numbers(1e6))) limit 100 settings drain_timeout=-1 format Null" - now=$(curl -d@- -sS "${CLICKHOUSE_URL}" <<<"select value from system.metrics where metric = 'SyncDrainedConnections'") - if [[ "$prev" != $(( now-2 )) ]]; then - continue - fi - echo "OK: sync drain" - break -done - -# async drain -for _ in {1..100}; do - prev=$(curl -d@- -sS "${CLICKHOUSE_URL}" <<<"select value from system.metrics where metric = 'AsyncDrainedConnections'") - curl -d@- -sS "${CLICKHOUSE_URL}" <<<"select * from remote('127.{2,3}', view(select * from numbers(1e6))) limit 100 settings drain_timeout=10 format Null" - now=$(curl -d@- -sS "${CLICKHOUSE_URL}" <<<"select value from system.metrics where metric = 'AsyncDrainedConnections'") - if [[ "$prev" != $(( now-2 )) ]]; then - continue - fi - echo "OK: async drain" - break -done From 52504cc2d03d81231fa8f8cf2866c5a018ac2769 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Sat, 11 Mar 2023 17:26:30 +0100 Subject: [PATCH 726/841] Revert "Merge pull request #27774 from amosbird/distributed-fix" This reverts commit 86af58f54f0d603c18b8f35205bc6dd52cfb519c, reversing changes made to 34f5787f0a6fe78fc48bdabe9cfa9276c13b524b. --- src/Client/MultiplexedConnections.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Client/MultiplexedConnections.cpp b/src/Client/MultiplexedConnections.cpp index 084823d71ac..158f90fc50b 100644 --- a/src/Client/MultiplexedConnections.cpp +++ b/src/Client/MultiplexedConnections.cpp @@ -417,9 +417,7 @@ MultiplexedConnections::ReplicaState & MultiplexedConnections::getReplicaForRead break; } - /// We treat any error as timeout for simplicity. - /// And we also check if read_list is still empty just in case. - if (n <= 0 || read_list.empty()) + if (n == 0) { const auto & addresses = dumpAddressesUnlocked(); for (ReplicaState & state : replica_states) @@ -438,7 +436,9 @@ MultiplexedConnections::ReplicaState & MultiplexedConnections::getReplicaForRead } } - /// TODO Motivation of rand is unclear. + /// TODO Absolutely wrong code: read_list could be empty; motivation of rand is unclear. + /// This code path is disabled by default. + auto & socket = read_list[thread_local_rng() % read_list.size()]; if (fd_to_replica_state_idx.empty()) { From 13aa2ce89b8f273456d5d3f900f699b6f18955d7 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Sat, 11 Mar 2023 17:26:59 +0100 Subject: [PATCH 727/841] Revert "Merge pull request #26807 from amosbird/improvement2" This reverts commit 671c2194b30fcaeab3f821884b1f52b5a54779aa, reversing changes made to ee13f2e6bca09613e129f990c976402ba57c5ddf. --- src/QueryPipeline/RemoteQueryExecutor.cpp | 15 +++++++++------ src/QueryPipeline/RemoteQueryExecutor.h | 4 ++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/QueryPipeline/RemoteQueryExecutor.cpp b/src/QueryPipeline/RemoteQueryExecutor.cpp index a93330dc3a0..d368b5fc02f 100644 --- a/src/QueryPipeline/RemoteQueryExecutor.cpp +++ b/src/QueryPipeline/RemoteQueryExecutor.cpp @@ -534,13 +534,16 @@ void RemoteQueryExecutor::finish(std::unique_ptr * read_context) /// Send the request to abort the execution of the request, if not already sent. tryCancel("Cancelling query because enough data has been read", read_context); - /// Try to drain connections asynchronously. - if (auto conn = ConnectionCollector::enqueueConnectionCleanup(pool, connections)) { - /// Drain connections synchronously. - CurrentMetrics::Increment metric_increment(CurrentMetrics::ActiveSyncDrainedConnections); - ConnectionCollector::drainConnections(*conn); - CurrentMetrics::add(CurrentMetrics::SyncDrainedConnections, 1); + /// Finish might be called in multiple threads. Make sure we release connections in thread-safe way. + std::lock_guard guard(connection_draining_mutex); + if (auto conn = ConnectionCollector::enqueueConnectionCleanup(pool, connections)) + { + /// Drain connections synchronously. + CurrentMetrics::Increment metric_increment(CurrentMetrics::ActiveSyncDrainedConnections); + ConnectionCollector::drainConnections(*conn); + CurrentMetrics::add(CurrentMetrics::SyncDrainedConnections, 1); + } } finished = true; } diff --git a/src/QueryPipeline/RemoteQueryExecutor.h b/src/QueryPipeline/RemoteQueryExecutor.h index c67a45c7275..a5792212299 100644 --- a/src/QueryPipeline/RemoteQueryExecutor.h +++ b/src/QueryPipeline/RemoteQueryExecutor.h @@ -245,6 +245,10 @@ private: std::atomic was_cancelled { false }; std::mutex was_cancelled_mutex; + /** Thread-safe connection draining. + */ + std::mutex connection_draining_mutex; + /** An exception from replica was received. No need in receiving more packets or * requesting to cancel query execution */ From 3190b89f9aff8fc906e36634ef002bfc125feaa6 Mon Sep 17 00:00:00 2001 From: flynn Date: Sat, 11 Mar 2023 18:04:19 +0000 Subject: [PATCH 728/841] Fix --- src/Processors/QueryPlan/ISourceStep.cpp | 8 +- ...n_pipeline_graph_with_projection.reference | 116 ------------------ ...explain_pipeline_graph_with_projection.sql | 9 +- 3 files changed, 11 insertions(+), 122 deletions(-) diff --git a/src/Processors/QueryPlan/ISourceStep.cpp b/src/Processors/QueryPlan/ISourceStep.cpp index 562f92ff63b..062f6d85bac 100644 --- a/src/Processors/QueryPlan/ISourceStep.cpp +++ b/src/Processors/QueryPlan/ISourceStep.cpp @@ -12,15 +12,19 @@ ISourceStep::ISourceStep(DataStream output_stream_) QueryPipelineBuilderPtr ISourceStep::updatePipeline(QueryPipelineBuilders, const BuildQueryPipelineSettings & settings) { auto pipeline = std::make_unique(); + + /// Why we need first initializePipeline first: since it's not + /// add new Processors to `pipeline->pipe`, but make an assign + /// with new created Pipe. And Processors for the Step is added here. initializePipeline(*pipeline, settings); + QueryPipelineProcessorsCollector collector(*pipeline, this); /// Properly collecting processors from Pipe. /// At the creation time of a Pipe, since `collected_processors` is nullptr, /// the processors can not be collected. pipeline->collectProcessors(); - auto added_processors = collector.detachProcessors(); - processors.insert(processors.end(), added_processors.begin(), added_processors.end()); + collector.detachProcessors(); return pipeline; } diff --git a/tests/queries/0_stateless/02678_explain_pipeline_graph_with_projection.reference b/tests/queries/0_stateless/02678_explain_pipeline_graph_with_projection.reference index 0c513f735cc..e69de29bb2d 100644 --- a/tests/queries/0_stateless/02678_explain_pipeline_graph_with_projection.reference +++ b/tests/queries/0_stateless/02678_explain_pipeline_graph_with_projection.reference @@ -1,116 +0,0 @@ -digraph -{ - rankdir="LR"; - { node [shape = rect] - subgraph cluster_0 { - label ="Expression"; - style=filled; - color=lightgrey; - node [style=filled,color=white]; - { rank = same; - n4 [label="ExpressionTransform"]; - } - } - subgraph cluster_1 { - label ="ReadFromStorage"; - style=filled; - color=lightgrey; - node [style=filled,color=white]; - { rank = same; - n3 [label="AggregatingTransform"]; - n2 [label="ExpressionTransform"]; - n1 [label="SourceFromSingleChunk"]; - } - } - } - n3 -> n4 [label=""]; - n2 -> n3 [label=""]; - n1 -> n2 [label=""]; -} -digraph -{ - rankdir="LR"; - { node [shape = rect] - subgraph cluster_0 { - label ="Expression"; - style=filled; - color=lightgrey; - node [style=filled,color=white]; - { rank = same; - n4 [label="ExpressionTransform"]; - } - } - subgraph cluster_1 { - label ="ReadFromStorage"; - style=filled; - color=lightgrey; - node [style=filled,color=white]; - { rank = same; - n3 [label="AggregatingTransform"]; - n2 [label="ExpressionTransform"]; - n1 [label="SourceFromSingleChunk"]; - } - } - } - n3 -> n4 [label=""]; - n2 -> n3 [label=""]; - n1 -> n2 [label=""]; -} -digraph -{ - rankdir="LR"; - { node [shape = rect] - subgraph cluster_0 { - label ="Expression"; - style=filled; - color=lightgrey; - node [style=filled,color=white]; - { rank = same; - n4 [label="ExpressionTransform"]; - } - } - subgraph cluster_1 { - label ="ReadFromStorage"; - style=filled; - color=lightgrey; - node [style=filled,color=white]; - { rank = same; - n3 [label="AggregatingTransform"]; - n2 [label="ExpressionTransform"]; - n1 [label="SourceFromSingleChunk"]; - } - } - } - n3 -> n4 [label=""]; - n2 -> n3 [label=""]; - n1 -> n2 [label=""]; -} -digraph -{ - rankdir="LR"; - { node [shape = rect] - subgraph cluster_0 { - label ="Expression"; - style=filled; - color=lightgrey; - node [style=filled,color=white]; - { rank = same; - n4 [label="ExpressionTransform"]; - } - } - subgraph cluster_1 { - label ="ReadFromStorage"; - style=filled; - color=lightgrey; - node [style=filled,color=white]; - { rank = same; - n3 [label="AggregatingTransform"]; - n2 [label="ExpressionTransform"]; - n1 [label="SourceFromSingleChunk"]; - } - } - } - n3 -> n4 [label=""]; - n2 -> n3 [label=""]; - n1 -> n2 [label=""]; -} diff --git a/tests/queries/0_stateless/02678_explain_pipeline_graph_with_projection.sql b/tests/queries/0_stateless/02678_explain_pipeline_graph_with_projection.sql index 06ee1078e74..e8b7405d602 100644 --- a/tests/queries/0_stateless/02678_explain_pipeline_graph_with_projection.sql +++ b/tests/queries/0_stateless/02678_explain_pipeline_graph_with_projection.sql @@ -3,9 +3,10 @@ CREATE TABLE t1(ID UInt64, name String) engine=MergeTree order by ID; insert into t1(ID, name) values (1, 'abc'), (2, 'bbb'); -explain pipeline graph=1 select count(ID) from t1; -explain pipeline graph=1 select sum(1) from t1; -explain pipeline graph=1 select min(ID) from t1; -explain pipeline graph=1 select max(ID) from t1; +-- The returned node order is uncertain +explain pipeline graph=1 select count(ID) from t1 FORMAT Null; +explain pipeline graph=1 select sum(1) from t1 FORMAT Null; +explain pipeline graph=1 select min(ID) from t1 FORMAT Null; +explain pipeline graph=1 select max(ID) from t1 FORMAT Null; DROP TABLE t1; From 26828449518ace4433b001243052af249ea1c1fc Mon Sep 17 00:00:00 2001 From: flynn Date: Sat, 11 Mar 2023 18:06:50 +0000 Subject: [PATCH 729/841] fix --- src/Processors/QueryPlan/ISourceStep.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Processors/QueryPlan/ISourceStep.cpp b/src/Processors/QueryPlan/ISourceStep.cpp index 062f6d85bac..0ea386518b7 100644 --- a/src/Processors/QueryPlan/ISourceStep.cpp +++ b/src/Processors/QueryPlan/ISourceStep.cpp @@ -13,8 +13,8 @@ QueryPipelineBuilderPtr ISourceStep::updatePipeline(QueryPipelineBuilders, const { auto pipeline = std::make_unique(); - /// Why we need first initializePipeline first: since it's not - /// add new Processors to `pipeline->pipe`, but make an assign + /// Why we need initializePipeline first: since it's not add + /// new Processors to `pipeline->pipe`, but make an assign /// with new created Pipe. And Processors for the Step is added here. initializePipeline(*pipeline, settings); From 7b1b238d0bb1b99b9069686b0a79686e32113019 Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Sat, 11 Mar 2023 19:05:47 +0100 Subject: [PATCH 730/841] Revert "Merge pull request #25674 from amosbird/distributedreturnconnection" This reverts commit 5ffd99dfd43472e77fe2738f18d5ba9f1933db73, reversing changes made to 2796aa333fa4a5874c390aea84bb4fd93784e402. --- programs/copier/ClusterCopier.cpp | 13 +- programs/server/Server.cpp | 3 - src/Client/HedgedConnections.cpp | 10 +- src/Client/HedgedConnections.h | 8 +- src/Client/IConnections.cpp | 31 ----- src/Client/IConnections.h | 8 +- src/Client/MultiplexedConnections.cpp | 24 ++-- src/Client/MultiplexedConnections.h | 9 +- src/Common/CurrentMetrics.cpp | 4 - src/Core/Settings.h | 2 - src/Processors/QueryPlan/ReadFromRemote.cpp | 2 +- src/QueryPipeline/ConnectionCollector.cpp | 118 ------------------ src/QueryPipeline/ConnectionCollector.h | 30 ----- src/QueryPipeline/RemoteQueryExecutor.cpp | 66 +++++----- src/QueryPipeline/RemoteQueryExecutor.h | 15 +-- .../RemoteQueryExecutorReadContext.cpp | 4 +- src/Server/TCPHandler.cpp | 32 ----- src/Server/TCPHandler.h | 1 - src/Storages/HDFS/StorageHDFSCluster.cpp | 1 - src/Storages/StorageDistributed.cpp | 2 +- src/Storages/StorageS3Cluster.cpp | 1 - .../test_async_drain_connection/__init__.py | 0 .../configs/config.xml | 3 - .../test_async_drain_connection/test.py | 41 ------ .../01920_async_drain_connections.reference | 2 - .../01920_async_drain_connections.sql | 6 - .../02466_distributed_query_profiler.sql | 6 - 27 files changed, 72 insertions(+), 370 deletions(-) delete mode 100644 src/Client/IConnections.cpp delete mode 100644 src/QueryPipeline/ConnectionCollector.cpp delete mode 100644 src/QueryPipeline/ConnectionCollector.h delete mode 100644 tests/integration/test_async_drain_connection/__init__.py delete mode 100644 tests/integration/test_async_drain_connection/configs/config.xml delete mode 100644 tests/integration/test_async_drain_connection/test.py delete mode 100644 tests/queries/0_stateless/01920_async_drain_connections.reference delete mode 100644 tests/queries/0_stateless/01920_async_drain_connections.sql diff --git a/programs/copier/ClusterCopier.cpp b/programs/copier/ClusterCopier.cpp index d3696f2cf12..3a6261974d1 100644 --- a/programs/copier/ClusterCopier.cpp +++ b/programs/copier/ClusterCopier.cpp @@ -1757,8 +1757,7 @@ void ClusterCopier::dropParticularPartitionPieceFromAllHelpingTables(const TaskT LOG_INFO(log, "All helping tables dropped partition {}", partition_name); } -String ClusterCopier::getRemoteCreateTable( - const DatabaseAndTableName & table, Connection & connection, const Settings & settings) +String ClusterCopier::getRemoteCreateTable(const DatabaseAndTableName & table, Connection & connection, const Settings & settings) { auto remote_context = Context::createCopy(context); remote_context->setSettings(settings); @@ -1777,8 +1776,10 @@ ASTPtr ClusterCopier::getCreateTableForPullShard(const ConnectionTimeouts & time { /// Fetch and parse (possibly) new definition auto connection_entry = task_shard.info.pool->get(timeouts, &task_cluster->settings_pull, true); - String create_query_pull_str - = getRemoteCreateTable(task_shard.task_table.table_pull, *connection_entry, task_cluster->settings_pull); + String create_query_pull_str = getRemoteCreateTable( + task_shard.task_table.table_pull, + *connection_entry, + task_cluster->settings_pull); ParserCreateQuery parser_create_query; const auto & settings = getContext()->getSettingsRef(); @@ -2025,8 +2026,8 @@ UInt64 ClusterCopier::executeQueryOnCluster( /// For unknown reason global context is passed to IStorage::read() method /// So, task_identifier is passed as constructor argument. It is more obvious. auto remote_query_executor = std::make_shared( - *connections.back(), query, header, getContext(), - /*throttler=*/nullptr, Scalars(), Tables(), QueryProcessingStage::Complete); + *connections.back(), query, header, getContext(), + /*throttler=*/nullptr, Scalars(), Tables(), QueryProcessingStage::Complete); try { diff --git a/programs/server/Server.cpp b/programs/server/Server.cpp index 57d361886d2..711dfb3820a 100644 --- a/programs/server/Server.cpp +++ b/programs/server/Server.cpp @@ -67,7 +67,6 @@ #include #include #include -#include #include #include #include @@ -816,8 +815,6 @@ try } ); - ConnectionCollector::init(global_context, server_settings.max_threads_for_connection_collector); - bool has_zookeeper = config().has("zookeeper"); zkutil::ZooKeeperNodeCache main_config_zk_node_cache([&] { return global_context->getZooKeeper(); }); diff --git a/src/Client/HedgedConnections.cpp b/src/Client/HedgedConnections.cpp index b97f9454fa5..13e4fe75b3d 100644 --- a/src/Client/HedgedConnections.cpp +++ b/src/Client/HedgedConnections.cpp @@ -31,8 +31,6 @@ HedgedConnections::HedgedConnections( : hedged_connections_factory(pool_, &context_->getSettingsRef(), timeouts_, table_to_check_) , context(std::move(context_)) , settings(context->getSettingsRef()) - , drain_timeout(settings.drain_timeout) - , allow_changing_replica_until_first_data_packet(settings.allow_changing_replica_until_first_data_packet) , throttler(throttler_) { std::vector connections = hedged_connections_factory.getManyConnections(pool_mode); @@ -263,7 +261,7 @@ Packet HedgedConnections::drain() while (!epoll.empty()) { - ReplicaLocation location = getReadyReplicaLocation(DrainCallback{drain_timeout}); + ReplicaLocation location = getReadyReplicaLocation(); Packet packet = receivePacketFromReplica(location); switch (packet.type) { @@ -290,10 +288,10 @@ Packet HedgedConnections::drain() Packet HedgedConnections::receivePacket() { std::lock_guard lock(cancel_mutex); - return receivePacketUnlocked({}, false /* is_draining */); + return receivePacketUnlocked({}); } -Packet HedgedConnections::receivePacketUnlocked(AsyncCallback async_callback, bool /* is_draining */) +Packet HedgedConnections::receivePacketUnlocked(AsyncCallback async_callback) { if (!sent_query) throw Exception(ErrorCodes::LOGICAL_ERROR, "Cannot receive packets: no query sent."); @@ -413,7 +411,7 @@ Packet HedgedConnections::receivePacketFromReplica(const ReplicaLocation & repli { /// If we are allowed to change replica until the first data packet, /// just restart timeout (if it hasn't expired yet). Otherwise disable changing replica with this offset. - if (allow_changing_replica_until_first_data_packet && !replica.is_change_replica_timeout_expired) + if (settings.allow_changing_replica_until_first_data_packet && !replica.is_change_replica_timeout_expired) replica.change_replica_timeout.setRelative(hedged_connections_factory.getConnectionTimeouts().receive_data_timeout); else disableChangingReplica(replica_location); diff --git a/src/Client/HedgedConnections.h b/src/Client/HedgedConnections.h index 40f031a16a6..45a98a14bf0 100644 --- a/src/Client/HedgedConnections.h +++ b/src/Client/HedgedConnections.h @@ -101,7 +101,7 @@ public: Packet receivePacket() override; - Packet receivePacketUnlocked(AsyncCallback async_callback, bool is_draining) override; + Packet receivePacketUnlocked(AsyncCallback async_callback) override; void disconnect() override; @@ -196,12 +196,6 @@ private: Epoll epoll; ContextPtr context; const Settings & settings; - - /// The following two fields are from settings but can be referenced outside the lifetime of - /// settings when connection is drained asynchronously. - Poco::Timespan drain_timeout; - bool allow_changing_replica_until_first_data_packet; - ThrottlerPtr throttler; bool sent_query = false; bool cancelled = false; diff --git a/src/Client/IConnections.cpp b/src/Client/IConnections.cpp deleted file mode 100644 index 341089258f5..00000000000 --- a/src/Client/IConnections.cpp +++ /dev/null @@ -1,31 +0,0 @@ -#include -#include - -namespace DB -{ - -namespace ErrorCodes -{ - extern const int SOCKET_TIMEOUT; -} - -/// This wrapper struct allows us to use Poco's socket polling code with a raw fd. -/// The only difference from Poco::Net::SocketImpl is that we don't close the fd in the destructor. -struct PocoSocketWrapper : public Poco::Net::SocketImpl -{ - explicit PocoSocketWrapper(int fd) - { - reset(fd); - } - - // Do not close fd. - ~PocoSocketWrapper() override { reset(-1); } -}; - -void IConnections::DrainCallback::operator()(int fd, Poco::Timespan, const std::string & fd_description) const -{ - if (!PocoSocketWrapper(fd).poll(drain_timeout, Poco::Net::Socket::SELECT_READ)) - throw Exception(ErrorCodes::SOCKET_TIMEOUT, "Read timeout while draining from {}", fd_description); -} - -} diff --git a/src/Client/IConnections.h b/src/Client/IConnections.h index 0040eeb31ed..4c81617f8d6 100644 --- a/src/Client/IConnections.h +++ b/src/Client/IConnections.h @@ -13,12 +13,6 @@ namespace DB class IConnections : boost::noncopyable { public: - struct DrainCallback - { - Poco::Timespan drain_timeout; - void operator()(int fd, Poco::Timespan, const std::string & fd_description = "") const; - }; - /// Send all scalars to replicas. virtual void sendScalarsData(Scalars & data) = 0; /// Send all content of external tables to replicas. @@ -40,7 +34,7 @@ public: virtual Packet receivePacket() = 0; /// Version of `receivePacket` function without locking. - virtual Packet receivePacketUnlocked(AsyncCallback async_callback, bool is_draining) = 0; + virtual Packet receivePacketUnlocked(AsyncCallback async_callback) = 0; /// Break all active connections. virtual void disconnect() = 0; diff --git a/src/Client/MultiplexedConnections.cpp b/src/Client/MultiplexedConnections.cpp index 158f90fc50b..58568462ecc 100644 --- a/src/Client/MultiplexedConnections.cpp +++ b/src/Client/MultiplexedConnections.cpp @@ -20,7 +20,7 @@ namespace ErrorCodes MultiplexedConnections::MultiplexedConnections(Connection & connection, const Settings & settings_, const ThrottlerPtr & throttler) - : settings(settings_), drain_timeout(settings.drain_timeout), receive_timeout(settings.receive_timeout) + : settings(settings_) { connection.setThrottler(throttler); @@ -33,7 +33,7 @@ MultiplexedConnections::MultiplexedConnections(Connection & connection, const Se MultiplexedConnections::MultiplexedConnections(std::shared_ptr connection_ptr_, const Settings & settings_, const ThrottlerPtr & throttler) - : settings(settings_), drain_timeout(settings.drain_timeout), receive_timeout(settings.receive_timeout) + : settings(settings_) , connection_ptr(connection_ptr_) { connection_ptr->setThrottler(throttler); @@ -46,8 +46,9 @@ MultiplexedConnections::MultiplexedConnections(std::shared_ptr conne } MultiplexedConnections::MultiplexedConnections( - std::vector && connections, const Settings & settings_, const ThrottlerPtr & throttler) - : settings(settings_), drain_timeout(settings.drain_timeout), receive_timeout(settings.receive_timeout) + std::vector && connections, + const Settings & settings_, const ThrottlerPtr & throttler) + : settings(settings_) { /// If we didn't get any connections from pool and getMany() did not throw exceptions, this means that /// `skip_unavailable_shards` was set. Then just return. @@ -206,7 +207,7 @@ void MultiplexedConnections::sendMergeTreeReadTaskResponse(const ParallelReadRes Packet MultiplexedConnections::receivePacket() { std::lock_guard lock(cancel_mutex); - Packet packet = receivePacketUnlocked({}, false /* is_draining */); + Packet packet = receivePacketUnlocked({}); return packet; } @@ -254,7 +255,7 @@ Packet MultiplexedConnections::drain() while (hasActiveConnections()) { - Packet packet = receivePacketUnlocked(DrainCallback{drain_timeout}, true /* is_draining */); + Packet packet = receivePacketUnlocked({}); switch (packet.type) { @@ -304,14 +305,14 @@ std::string MultiplexedConnections::dumpAddressesUnlocked() const return buf.str(); } -Packet MultiplexedConnections::receivePacketUnlocked(AsyncCallback async_callback, bool is_draining) +Packet MultiplexedConnections::receivePacketUnlocked(AsyncCallback async_callback) { if (!sent_query) throw Exception(ErrorCodes::LOGICAL_ERROR, "Cannot receive packets: no query sent."); if (!hasActiveConnections()) throw Exception(ErrorCodes::LOGICAL_ERROR, "No more packets are available."); - ReplicaState & state = getReplicaForReading(is_draining); + ReplicaState & state = getReplicaForReading(); current_connection = state.connection; if (current_connection == nullptr) throw Exception(ErrorCodes::NO_AVAILABLE_REPLICA, "Logical error: no available replica"); @@ -366,10 +367,9 @@ Packet MultiplexedConnections::receivePacketUnlocked(AsyncCallback async_callbac return packet; } -MultiplexedConnections::ReplicaState & MultiplexedConnections::getReplicaForReading(bool is_draining) +MultiplexedConnections::ReplicaState & MultiplexedConnections::getReplicaForReading() { - /// Fast path when we only focus on one replica and are not draining the connection. - if (replica_states.size() == 1 && !is_draining) + if (replica_states.size() == 1) return replica_states[0]; Poco::Net::Socket::SocketList read_list; @@ -390,7 +390,7 @@ MultiplexedConnections::ReplicaState & MultiplexedConnections::getReplicaForRead Poco::Net::Socket::SocketList write_list; Poco::Net::Socket::SocketList except_list; - auto timeout = receive_timeout; + auto timeout = settings.receive_timeout; int n = 0; /// EINTR loop diff --git a/src/Client/MultiplexedConnections.h b/src/Client/MultiplexedConnections.h index dd228067ed2..a26e6dafbe5 100644 --- a/src/Client/MultiplexedConnections.h +++ b/src/Client/MultiplexedConnections.h @@ -65,7 +65,7 @@ public: void setReplicaInfo(ReplicaInfo value) override { replica_info = value; } private: - Packet receivePacketUnlocked(AsyncCallback async_callback, bool is_draining) override; + Packet receivePacketUnlocked(AsyncCallback async_callback) override; /// Internal version of `dumpAddresses` function without locking. std::string dumpAddressesUnlocked() const; @@ -78,18 +78,13 @@ private: }; /// Get a replica where you can read the data. - ReplicaState & getReplicaForReading(bool is_draining); + ReplicaState & getReplicaForReading(); /// Mark the replica as invalid. void invalidateReplica(ReplicaState & replica_state); const Settings & settings; - /// The following two fields are from settings but can be referenced outside the lifetime of - /// settings when connection is drained asynchronously. - Poco::Timespan drain_timeout; - Poco::Timespan receive_timeout; - /// The current number of valid connections to the replicas of this shard. size_t active_connection_count = 0; diff --git a/src/Common/CurrentMetrics.cpp b/src/Common/CurrentMetrics.cpp index 0395f2470af..d696070aa41 100644 --- a/src/Common/CurrentMetrics.cpp +++ b/src/Common/CurrentMetrics.cpp @@ -84,10 +84,6 @@ M(MMappedFileBytes, "Sum size of mmapped file regions.") \ M(MMappedAllocs, "Total number of mmapped allocations") \ M(MMappedAllocBytes, "Sum bytes of mmapped allocations") \ - M(AsyncDrainedConnections, "Number of connections drained asynchronously.") \ - M(ActiveAsyncDrainedConnections, "Number of active connections drained asynchronously.") \ - M(SyncDrainedConnections, "Number of connections drained synchronously.") \ - M(ActiveSyncDrainedConnections, "Number of active connections drained synchronously.") \ M(AsynchronousReadWait, "Number of threads waiting for asynchronous read.") \ M(PendingAsyncInsert, "Number of asynchronous inserts that are waiting for flush.") \ M(KafkaConsumers, "Number of active Kafka consumers") \ diff --git a/src/Core/Settings.h b/src/Core/Settings.h index 6af47563c22..2ebf50e766e 100644 --- a/src/Core/Settings.h +++ b/src/Core/Settings.h @@ -283,8 +283,6 @@ class IColumn; M(Milliseconds, sleep_in_send_data_ms, 0, "Time to sleep in sending data in TCPHandler", 0) \ M(Milliseconds, sleep_after_receiving_query_ms, 0, "Time to sleep after receiving query in TCPHandler", 0) \ M(UInt64, unknown_packet_in_send_data, 0, "Send unknown packet instead of data Nth data packet", 0) \ - /** Settings for testing connection collector */ \ - M(Milliseconds, sleep_in_receive_cancel_ms, 0, "Time to sleep in receiving cancel in TCPHandler", 0) \ \ M(Bool, insert_allow_materialized_columns, false, "If setting is enabled, Allow materialized columns in INSERT.", 0) \ M(Seconds, http_connection_timeout, DEFAULT_HTTP_READ_BUFFER_CONNECTION_TIMEOUT, "HTTP connection timeout.", 0) \ diff --git a/src/Processors/QueryPlan/ReadFromRemote.cpp b/src/Processors/QueryPlan/ReadFromRemote.cpp index 6a3670f964e..63325488e90 100644 --- a/src/Processors/QueryPlan/ReadFromRemote.cpp +++ b/src/Processors/QueryPlan/ReadFromRemote.cpp @@ -202,7 +202,7 @@ void ReadFromRemote::addLazyPipe(Pipes & pipes, const ClusterProxy::SelectStream scalars["_shard_num"] = Block{{DataTypeUInt32().createColumnConst(1, shard.shard_info.shard_num), std::make_shared(), "_shard_num"}}; auto remote_query_executor = std::make_shared( - shard.shard_info.pool, std::move(connections), query_string, header, context, throttler, scalars, external_tables, stage); + std::move(connections), query_string, header, context, throttler, scalars, external_tables, stage); auto pipe = createRemoteSourcePipe(remote_query_executor, add_agg_info, add_totals, add_extremes, async_read); QueryPipelineBuilder builder; diff --git a/src/QueryPipeline/ConnectionCollector.cpp b/src/QueryPipeline/ConnectionCollector.cpp deleted file mode 100644 index bcee26fa192..00000000000 --- a/src/QueryPipeline/ConnectionCollector.cpp +++ /dev/null @@ -1,118 +0,0 @@ -#include - -#include -#include -#include -#include -#include "Core/Protocol.h" -#include - -namespace CurrentMetrics -{ -extern const Metric AsyncDrainedConnections; -extern const Metric ActiveAsyncDrainedConnections; -} - -namespace DB -{ -namespace ErrorCodes -{ - extern const int LOGICAL_ERROR; - extern const int UNEXPECTED_PACKET_FROM_SERVER; -} - -std::unique_ptr ConnectionCollector::connection_collector; - -static constexpr UInt64 max_connection_draining_tasks_per_thread = 20; - -ConnectionCollector::ConnectionCollector(ContextMutablePtr global_context_, size_t max_threads) - : WithMutableContext(global_context_), pool(max_threads, max_threads, max_threads * max_connection_draining_tasks_per_thread) -{ -} - -ConnectionCollector & ConnectionCollector::init(ContextMutablePtr global_context_, size_t max_threads) -{ - if (connection_collector) - { - throw Exception(ErrorCodes::LOGICAL_ERROR, "Connection collector is initialized twice. This is a bug"); - } - - connection_collector.reset(new ConnectionCollector(global_context_, max_threads)); - return *connection_collector; -} - -struct AsyncDrainTask -{ - const ConnectionPoolWithFailoverPtr pool; - std::shared_ptr shared_connections; - void operator()() const - { - ConnectionCollector::drainConnections(*shared_connections); - } - - // We don't have std::unique_function yet. Wrap it in shared_ptr to make the functor copyable. - std::shared_ptr metric_increment - = std::make_shared(CurrentMetrics::ActiveAsyncDrainedConnections); -}; - -std::shared_ptr ConnectionCollector::enqueueConnectionCleanup( - const ConnectionPoolWithFailoverPtr & pool, std::shared_ptr connections) noexcept -{ - if (!connections) - return nullptr; - - if (connection_collector) - { - if (connection_collector->pool.trySchedule(AsyncDrainTask{pool, connections})) - { - CurrentMetrics::add(CurrentMetrics::AsyncDrainedConnections, 1); - return nullptr; - } - } - return connections; -} - -void ConnectionCollector::drainConnections(IConnections & connections) noexcept -{ - bool is_drained = false; - try - { - Packet packet = connections.drain(); - is_drained = true; - switch (packet.type) - { - case Protocol::Server::EndOfStream: - case Protocol::Server::Log: - case Protocol::Server::ProfileEvents: - break; - - case Protocol::Server::Exception: - packet.exception->rethrow(); - break; - - default: - throw NetException( - ErrorCodes::UNEXPECTED_PACKET_FROM_SERVER, - "Unexpected packet {} from one of the following replicas: {}. (expected EndOfStream, Log, ProfileEvents or Exception)", - Protocol::Server::toString(packet.type), - connections.dumpAddresses()); - } - } - catch (...) - { - tryLogCurrentException(&Poco::Logger::get("ConnectionCollector"), __PRETTY_FUNCTION__); - if (!is_drained) - { - try - { - connections.disconnect(); - } - catch (...) - { - tryLogCurrentException(&Poco::Logger::get("ConnectionCollector"), __PRETTY_FUNCTION__); - } - } - } -} - -} diff --git a/src/QueryPipeline/ConnectionCollector.h b/src/QueryPipeline/ConnectionCollector.h deleted file mode 100644 index 5b6e82d000e..00000000000 --- a/src/QueryPipeline/ConnectionCollector.h +++ /dev/null @@ -1,30 +0,0 @@ -#pragma once - -#include -#include -#include -#include - -namespace DB -{ - -class ConnectionPoolWithFailover; -using ConnectionPoolWithFailoverPtr = std::shared_ptr; - -class ConnectionCollector : boost::noncopyable, WithMutableContext -{ -public: - static ConnectionCollector & init(ContextMutablePtr global_context_, size_t max_threads); - static std::shared_ptr - enqueueConnectionCleanup(const ConnectionPoolWithFailoverPtr & pool, std::shared_ptr connections) noexcept; - static void drainConnections(IConnections & connections) noexcept; - -private: - explicit ConnectionCollector(ContextMutablePtr global_context_, size_t max_threads); - - static constexpr size_t reschedule_time_ms = 1000; - ThreadPool pool; - static std::unique_ptr connection_collector; -}; - -} diff --git a/src/QueryPipeline/RemoteQueryExecutor.cpp b/src/QueryPipeline/RemoteQueryExecutor.cpp index d368b5fc02f..f6797864b73 100644 --- a/src/QueryPipeline/RemoteQueryExecutor.cpp +++ b/src/QueryPipeline/RemoteQueryExecutor.cpp @@ -1,6 +1,4 @@ #include - -#include #include #include @@ -25,12 +23,6 @@ #include -namespace CurrentMetrics -{ - extern const Metric SyncDrainedConnections; - extern const Metric ActiveSyncDrainedConnections; -} - namespace ProfileEvents { extern const Event ReadTaskRequestsReceived; @@ -67,7 +59,7 @@ RemoteQueryExecutor::RemoteQueryExecutor( { create_connections = [this, &connection, throttler, extension_]() { - auto res = std::make_shared(connection, context->getSettingsRef(), throttler); + auto res = std::make_unique(connection, context->getSettingsRef(), throttler); if (extension_ && extension_->replica_info) res->setReplicaInfo(*extension_->replica_info); return res; @@ -83,7 +75,7 @@ RemoteQueryExecutor::RemoteQueryExecutor( { create_connections = [this, connection_ptr, throttler, extension_]() { - auto res = std::make_shared(connection_ptr, context->getSettingsRef(), throttler); + auto res = std::make_unique(connection_ptr, context->getSettingsRef(), throttler); if (extension_ && extension_->replica_info) res->setReplicaInfo(*extension_->replica_info); return res; @@ -91,7 +83,6 @@ RemoteQueryExecutor::RemoteQueryExecutor( } RemoteQueryExecutor::RemoteQueryExecutor( - const ConnectionPoolWithFailoverPtr & pool_, std::vector && connections_, const String & query_, const Block & header_, ContextPtr context_, const ThrottlerPtr & throttler, const Scalars & scalars_, const Tables & external_tables_, @@ -100,10 +91,9 @@ RemoteQueryExecutor::RemoteQueryExecutor( , scalars(scalars_), external_tables(external_tables_), stage(stage_) , task_iterator(extension_ ? extension_->task_iterator : nullptr) , parallel_reading_coordinator(extension_ ? extension_->parallel_reading_coordinator : nullptr) - , pool(pool_) { create_connections = [this, connections_, throttler, extension_]() mutable { - auto res = std::make_shared(std::move(connections_), context->getSettingsRef(), throttler); + auto res = std::make_unique(std::move(connections_), context->getSettingsRef(), throttler); if (extension_ && extension_->replica_info) res->setReplicaInfo(*extension_->replica_info); return res; @@ -111,7 +101,7 @@ RemoteQueryExecutor::RemoteQueryExecutor( } RemoteQueryExecutor::RemoteQueryExecutor( - const ConnectionPoolWithFailoverPtr & pool_, + const ConnectionPoolWithFailoverPtr & pool, const String & query_, const Block & header_, ContextPtr context_, const ThrottlerPtr & throttler, const Scalars & scalars_, const Tables & external_tables_, QueryProcessingStage::Enum stage_, std::optional extension_) @@ -119,9 +109,8 @@ RemoteQueryExecutor::RemoteQueryExecutor( , scalars(scalars_), external_tables(external_tables_), stage(stage_) , task_iterator(extension_ ? extension_->task_iterator : nullptr) , parallel_reading_coordinator(extension_ ? extension_->parallel_reading_coordinator : nullptr) - , pool(pool_) { - create_connections = [this, throttler, extension_]()->std::shared_ptr + create_connections = [this, pool, throttler, extension_]()->std::unique_ptr { const Settings & current_settings = context->getSettingsRef(); auto timeouts = ConnectionTimeouts::getTCPTimeoutsWithFailover(current_settings); @@ -133,7 +122,7 @@ RemoteQueryExecutor::RemoteQueryExecutor( if (main_table) table_to_check = std::make_shared(main_table.getQualifiedName()); - auto res = std::make_shared(pool, context, timeouts, throttler, pool_mode, table_to_check); + auto res = std::make_unique(pool, context, timeouts, throttler, pool_mode, table_to_check); if (extension_ && extension_->replica_info) res->setReplicaInfo(*extension_->replica_info); return res; @@ -151,7 +140,7 @@ RemoteQueryExecutor::RemoteQueryExecutor( else connection_entries = pool->getMany(timeouts, ¤t_settings, pool_mode); - auto res = std::make_shared(std::move(connection_entries), current_settings, throttler); + auto res = std::make_unique(std::move(connection_entries), current_settings, throttler); if (extension_ && extension_->replica_info) res->setReplicaInfo(*extension_->replica_info); return res; @@ -534,18 +523,39 @@ void RemoteQueryExecutor::finish(std::unique_ptr * read_context) /// Send the request to abort the execution of the request, if not already sent. tryCancel("Cancelling query because enough data has been read", read_context); + + /// Get the remaining packets so that there is no out of sync in the connections to the replicas. + Packet packet = connections->drain(); + switch (packet.type) { - /// Finish might be called in multiple threads. Make sure we release connections in thread-safe way. - std::lock_guard guard(connection_draining_mutex); - if (auto conn = ConnectionCollector::enqueueConnectionCleanup(pool, connections)) - { - /// Drain connections synchronously. - CurrentMetrics::Increment metric_increment(CurrentMetrics::ActiveSyncDrainedConnections); - ConnectionCollector::drainConnections(*conn); - CurrentMetrics::add(CurrentMetrics::SyncDrainedConnections, 1); - } + case Protocol::Server::EndOfStream: + finished = true; + break; + + case Protocol::Server::Log: + /// Pass logs from remote server to client + if (auto log_queue = CurrentThread::getInternalTextLogsQueue()) + log_queue->pushBlock(std::move(packet.block)); + break; + + case Protocol::Server::Exception: + got_exception_from_replica = true; + packet.exception->rethrow(); + break; + + case Protocol::Server::ProfileEvents: + /// Pass profile events from remote server to client + if (auto profile_queue = CurrentThread::getInternalProfileEventsQueue()) + if (!profile_queue->emplace(std::move(packet.block))) + throw Exception(ErrorCodes::SYSTEM_ERROR, "Could not push into profile queue"); + break; + + default: + got_unknown_packet_from_replica = true; + throw Exception(ErrorCodes::UNKNOWN_PACKET_FROM_SERVER, "Unknown packet {} from one of the following replicas: {}", + toString(packet.type), + connections->dumpAddresses()); } - finished = true; } void RemoteQueryExecutor::cancel(std::unique_ptr * read_context) diff --git a/src/QueryPipeline/RemoteQueryExecutor.h b/src/QueryPipeline/RemoteQueryExecutor.h index a5792212299..576efb97bb1 100644 --- a/src/QueryPipeline/RemoteQueryExecutor.h +++ b/src/QueryPipeline/RemoteQueryExecutor.h @@ -52,7 +52,6 @@ public: }; /// Takes already set connection. - /// We don't own connection, thus we have to drain it synchronously. RemoteQueryExecutor( Connection & connection, const String & query_, const Block & header_, ContextPtr context_, @@ -68,7 +67,6 @@ public: /// Accepts several connections already taken from pool. RemoteQueryExecutor( - const ConnectionPoolWithFailoverPtr & pool, std::vector && connections_, const String & query_, const Block & header_, ContextPtr context_, const ThrottlerPtr & throttler = nullptr, const Scalars & scalars_ = Scalars(), const Tables & external_tables_ = Tables(), @@ -191,6 +189,9 @@ private: Block totals; Block extremes; + std::function()> create_connections; + std::unique_ptr connections; + const String query; String query_id; ContextPtr context; @@ -213,12 +214,6 @@ private: /// about the number of the current replica or the count of replicas at all. IConnections::ReplicaInfo replica_info; - std::function()> create_connections; - /// Hold a shared reference to the connection pool so that asynchronous connection draining will - /// work safely. Make sure it's the first member so that we don't destruct it too early. - const ConnectionPoolWithFailoverPtr pool; - std::shared_ptr connections; - /// Streams for reading from temporary tables and following sending of data /// to remote servers for GLOBAL-subqueries std::vector external_tables_data; @@ -245,10 +240,6 @@ private: std::atomic was_cancelled { false }; std::mutex was_cancelled_mutex; - /** Thread-safe connection draining. - */ - std::mutex connection_draining_mutex; - /** An exception from replica was received. No need in receiving more packets or * requesting to cancel query execution */ diff --git a/src/QueryPipeline/RemoteQueryExecutorReadContext.cpp b/src/QueryPipeline/RemoteQueryExecutorReadContext.cpp index 0abf5a26794..0c84e844cb2 100644 --- a/src/QueryPipeline/RemoteQueryExecutorReadContext.cpp +++ b/src/QueryPipeline/RemoteQueryExecutorReadContext.cpp @@ -44,7 +44,7 @@ struct RemoteQueryExecutorRoutine { while (true) { - read_context.packet = connections.receivePacketUnlocked(ReadCallback{read_context, sink}, false /* is_draining */); + read_context.packet = connections.receivePacketUnlocked(ReadCallback{read_context, sink}); sink = std::move(sink).resume(); } } @@ -147,7 +147,7 @@ bool RemoteQueryExecutorReadContext::checkTimeoutImpl(bool blocking) if (is_timer_alarmed && !is_socket_ready) { - /// Socket receive timeout. Drain it in case of error, or it may be hide by timeout exception. + /// Socket receive timeout. Drain it in case or error, or it may be hide by timeout exception. timer.drain(); throw NetException(ErrorCodes::SOCKET_TIMEOUT, "Timeout exceeded"); } diff --git a/src/Server/TCPHandler.cpp b/src/Server/TCPHandler.cpp index 27b3712ffd3..c51c79a26c4 100644 --- a/src/Server/TCPHandler.cpp +++ b/src/Server/TCPHandler.cpp @@ -642,7 +642,6 @@ void TCPHandler::extractConnectionSettingsFromContext(const ContextPtr & context interactive_delay = settings.interactive_delay; sleep_in_send_tables_status = settings.sleep_in_send_tables_status_ms; unknown_packet_in_send_data = settings.unknown_packet_in_send_data; - sleep_in_receive_cancel = settings.sleep_in_receive_cancel_ms; sleep_after_receiving_query = settings.sleep_after_receiving_query_ms; } @@ -1317,19 +1316,9 @@ bool TCPHandler::receivePacket() return false; case Protocol::Client::Cancel: - { - /// For testing connection collector. - if (unlikely(sleep_in_receive_cancel.totalMilliseconds())) - { - std::chrono::milliseconds ms(sleep_in_receive_cancel.totalMilliseconds()); - std::this_thread::sleep_for(ms); - } - LOG_INFO(log, "Received 'Cancel' packet from the client, canceling the query"); state.is_cancelled = true; - return false; - } case Protocol::Client::Hello: receiveUnexpectedHello(); @@ -1371,12 +1360,6 @@ String TCPHandler::receiveReadTaskResponseAssumeLocked() { LOG_INFO(log, "Received 'Cancel' packet from the client, canceling the read task"); state.is_cancelled = true; - /// For testing connection collector. - if (unlikely(sleep_in_receive_cancel.totalMilliseconds())) - { - std::chrono::milliseconds ms(sleep_in_receive_cancel.totalMilliseconds()); - std::this_thread::sleep_for(ms); - } return {}; } else @@ -1405,12 +1388,6 @@ std::optional TCPHandler::receivePartitionMergeTreeReadTas { LOG_INFO(log, "Received 'Cancel' packet from the client, canceling the MergeTree read task"); state.is_cancelled = true; - /// For testing connection collector. - if (unlikely(sleep_in_receive_cancel.totalMilliseconds())) - { - std::chrono::milliseconds ms(sleep_in_receive_cancel.totalMilliseconds()); - std::this_thread::sleep_for(ms); - } return std::nullopt; } else @@ -1821,15 +1798,6 @@ bool TCPHandler::isQueryCancelled() throw NetException(ErrorCodes::UNEXPECTED_PACKET_FROM_CLIENT, "Unexpected packet Cancel received from client"); LOG_INFO(log, "Query was cancelled."); state.is_cancelled = true; - /// For testing connection collector. - { - if (unlikely(sleep_in_receive_cancel.totalMilliseconds())) - { - std::chrono::milliseconds ms(sleep_in_receive_cancel.totalMilliseconds()); - std::this_thread::sleep_for(ms); - } - } - return true; default: diff --git a/src/Server/TCPHandler.h b/src/Server/TCPHandler.h index e3673b213d5..47baf16a08b 100644 --- a/src/Server/TCPHandler.h +++ b/src/Server/TCPHandler.h @@ -170,7 +170,6 @@ private: UInt64 interactive_delay = 100000; Poco::Timespan sleep_in_send_tables_status; UInt64 unknown_packet_in_send_data = 0; - Poco::Timespan sleep_in_receive_cancel; Poco::Timespan sleep_after_receiving_query; std::unique_ptr session; diff --git a/src/Storages/HDFS/StorageHDFSCluster.cpp b/src/Storages/HDFS/StorageHDFSCluster.cpp index 8dbaa0796e9..faf6aac84bf 100644 --- a/src/Storages/HDFS/StorageHDFSCluster.cpp +++ b/src/Storages/HDFS/StorageHDFSCluster.cpp @@ -105,7 +105,6 @@ Pipe StorageHDFSCluster::read( for (auto & try_result : try_results) { auto remote_query_executor = std::make_shared( - shard_info.pool, std::vector{try_result}, queryToString(query_to_send), header, diff --git a/src/Storages/StorageDistributed.cpp b/src/Storages/StorageDistributed.cpp index 4eb454e5156..3302cff4f74 100644 --- a/src/Storages/StorageDistributed.cpp +++ b/src/Storages/StorageDistributed.cpp @@ -912,7 +912,7 @@ std::optional StorageDistributed::distributedWriteBetweenDistribu /// INSERT SELECT query returns empty block auto remote_query_executor - = std::make_shared(shard_info.pool, std::move(connections), new_query_str, Block{}, query_context); + = std::make_shared(std::move(connections), new_query_str, Block{}, query_context); QueryPipeline remote_pipeline(std::make_shared(remote_query_executor, false, settings.async_socket_for_remote)); remote_pipeline.complete(std::make_shared(remote_query_executor->getHeader())); diff --git a/src/Storages/StorageS3Cluster.cpp b/src/Storages/StorageS3Cluster.cpp index c7535bb4550..4a09728c05b 100644 --- a/src/Storages/StorageS3Cluster.cpp +++ b/src/Storages/StorageS3Cluster.cpp @@ -133,7 +133,6 @@ Pipe StorageS3Cluster::read( for (auto & try_result : try_results) { auto remote_query_executor = std::make_shared( - shard_info.pool, std::vector{try_result}, queryToString(query_to_send), interpreter.getSampleBlock(), diff --git a/tests/integration/test_async_drain_connection/__init__.py b/tests/integration/test_async_drain_connection/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/integration/test_async_drain_connection/configs/config.xml b/tests/integration/test_async_drain_connection/configs/config.xml deleted file mode 100644 index 88862a3001e..00000000000 --- a/tests/integration/test_async_drain_connection/configs/config.xml +++ /dev/null @@ -1,3 +0,0 @@ - - 10000 - diff --git a/tests/integration/test_async_drain_connection/test.py b/tests/integration/test_async_drain_connection/test.py deleted file mode 100644 index 66786f4a8f9..00000000000 --- a/tests/integration/test_async_drain_connection/test.py +++ /dev/null @@ -1,41 +0,0 @@ -# pylint: disable=redefined-outer-name -# pylint: disable=unused-argument - -import pytest -from helpers.cluster import ClickHouseCluster - -cluster = ClickHouseCluster(__file__) -node = cluster.add_instance("node", main_configs=["configs/config.xml"]) - - -@pytest.fixture(scope="module") -def started_cluster(): - try: - cluster.start() - node.query( - """ - create table t (number UInt64) - engine = Distributed(test_cluster_two_shards, system, numbers) - """ - ) - yield cluster - - finally: - cluster.shutdown() - - -def test_filled_async_drain_connection_pool(started_cluster): - def execute_queries(_): - for _ in range(100): - node.query( - "select * from t where number = 0 limit 2", - settings={ - "sleep_in_receive_cancel_ms": int(10e6), - "max_execution_time": 5, - # decrease drain_timeout to make test more stable - # (another way is to increase max_execution_time, but this will make test slower) - "drain_timeout": 1, - }, - ) - - any(map(execute_queries, range(10))) diff --git a/tests/queries/0_stateless/01920_async_drain_connections.reference b/tests/queries/0_stateless/01920_async_drain_connections.reference deleted file mode 100644 index aa47d0d46d4..00000000000 --- a/tests/queries/0_stateless/01920_async_drain_connections.reference +++ /dev/null @@ -1,2 +0,0 @@ -0 -0 diff --git a/tests/queries/0_stateless/01920_async_drain_connections.sql b/tests/queries/0_stateless/01920_async_drain_connections.sql deleted file mode 100644 index 827ca13fc1a..00000000000 --- a/tests/queries/0_stateless/01920_async_drain_connections.sql +++ /dev/null @@ -1,6 +0,0 @@ -drop table if exists t; - -create table t (number UInt64) engine = Distributed(test_cluster_two_shards, system, numbers); -select * from t where number = 0 limit 2 settings sleep_in_receive_cancel_ms = 10000, max_execution_time = 5; - -drop table t; diff --git a/tests/queries/0_stateless/02466_distributed_query_profiler.sql b/tests/queries/0_stateless/02466_distributed_query_profiler.sql index 9fc2fe7b4bd..1bf176865f5 100644 --- a/tests/queries/0_stateless/02466_distributed_query_profiler.sql +++ b/tests/queries/0_stateless/02466_distributed_query_profiler.sql @@ -13,9 +13,3 @@ settings query_profiler_real_time_period_ns=1, -- This is to use MultiplexedConnections use_hedged_requests=0, - -- This is to make the initiator waiting for cancel packet in MultiplexedConnections::getReplicaForReading() - -- - -- NOTE: that even smaller sleep will be enough to trigger this problem - -- with 100% probability, however just to make it more reliable, increase - -- it to 2 seconds. - sleep_in_receive_cancel_ms=2000; From e56eeac05fe4afcf3c2f73c1e28d8a5f39d09ab3 Mon Sep 17 00:00:00 2001 From: flynn Date: Sat, 11 Mar 2023 18:48:36 +0000 Subject: [PATCH 731/841] fix --- src/Processors/QueryPlan/ISourceStep.cpp | 20 ++++++++++---------- src/QueryPipeline/Pipe.cpp | 10 ---------- src/QueryPipeline/Pipe.h | 2 -- src/QueryPipeline/QueryPipelineBuilder.h | 2 -- 4 files changed, 10 insertions(+), 24 deletions(-) diff --git a/src/Processors/QueryPlan/ISourceStep.cpp b/src/Processors/QueryPlan/ISourceStep.cpp index 0ea386518b7..37f56bc7a43 100644 --- a/src/Processors/QueryPlan/ISourceStep.cpp +++ b/src/Processors/QueryPlan/ISourceStep.cpp @@ -13,18 +13,18 @@ QueryPipelineBuilderPtr ISourceStep::updatePipeline(QueryPipelineBuilders, const { auto pipeline = std::make_unique(); - /// Why we need initializePipeline first: since it's not add - /// new Processors to `pipeline->pipe`, but make an assign - /// with new created Pipe. And Processors for the Step is added here. + /// For `Source` step, since it's not add new Processors to `pipeline->pipe` + /// in `initializePipeline`, but make an assign with new created Pipe. + /// And Processors for the Step is added here. So we do not need to use + /// `QueryPipelineProcessorsCollector` to collect Processors. initializePipeline(*pipeline, settings); - QueryPipelineProcessorsCollector collector(*pipeline, this); - - /// Properly collecting processors from Pipe. - /// At the creation time of a Pipe, since `collected_processors` is nullptr, - /// the processors can not be collected. - pipeline->collectProcessors(); - collector.detachProcessors(); + /// But we need to set QueryPlanStep manually for the Processors, which + /// will be used in `EXPLAIN PIPELINE` + for (auto & processor : processors) + { + processor->setQueryPlanStep(this); + } return pipeline; } diff --git a/src/QueryPipeline/Pipe.cpp b/src/QueryPipeline/Pipe.cpp index a20b154054a..91ba01c479f 100644 --- a/src/QueryPipeline/Pipe.cpp +++ b/src/QueryPipeline/Pipe.cpp @@ -867,14 +867,4 @@ void Pipe::transform(const Transformer & transformer, bool check_ports) max_parallel_streams = std::max(max_parallel_streams, output_ports.size()); } -void Pipe::collectProcessors() -{ - if (collected_processors) - { - for (const auto & processor : *processors) - { - collected_processors->emplace_back(processor); - } - } -} } diff --git a/src/QueryPipeline/Pipe.h b/src/QueryPipeline/Pipe.h index a19364f7907..09931e38578 100644 --- a/src/QueryPipeline/Pipe.h +++ b/src/QueryPipeline/Pipe.h @@ -104,8 +104,6 @@ public: std::shared_ptr getProcessorsPtr() { return processors; } - void collectProcessors(); - private: /// Header is common for all output below. Block header; diff --git a/src/QueryPipeline/QueryPipelineBuilder.h b/src/QueryPipeline/QueryPipelineBuilder.h index 51a1aa69563..4f984680c75 100644 --- a/src/QueryPipeline/QueryPipelineBuilder.h +++ b/src/QueryPipeline/QueryPipelineBuilder.h @@ -185,8 +185,6 @@ public: static Pipe getPipe(QueryPipelineBuilder pipeline, QueryPlanResourceHolder & resources); static QueryPipeline getPipeline(QueryPipelineBuilder builder); - void collectProcessors() { pipe.collectProcessors(); } - private: /// Destruction order: processors, header, locks, temporary storages, local contexts From 1c7b36484bcc4993da98a4284d5734862afc1e1a Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Sat, 11 Mar 2023 21:56:19 +0300 Subject: [PATCH 732/841] Update 02466_distributed_query_profiler.sql --- tests/queries/0_stateless/02466_distributed_query_profiler.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/queries/0_stateless/02466_distributed_query_profiler.sql b/tests/queries/0_stateless/02466_distributed_query_profiler.sql index 1bf176865f5..171cc2a7563 100644 --- a/tests/queries/0_stateless/02466_distributed_query_profiler.sql +++ b/tests/queries/0_stateless/02466_distributed_query_profiler.sql @@ -12,4 +12,4 @@ settings -- This is to activate as much signals as possible to trigger EINTR query_profiler_real_time_period_ns=1, -- This is to use MultiplexedConnections - use_hedged_requests=0, + use_hedged_requests=0; From 4cfc040829ea169f6d25a29ef9c35431559bcd9f Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 11 Mar 2023 20:16:06 +0100 Subject: [PATCH 733/841] Fix parameterized queries --- .../ReplaceQueryParameterVisitor.cpp | 10 ++++++ src/Parsers/ASTAlterQuery.h | 5 +++ src/Parsers/ASTBackupQuery.h | 7 ++++ src/Parsers/ASTConstraintDeclaration.h | 6 ++++ src/Parsers/ASTCreateQuery.cpp | 5 +++ src/Parsers/ASTCreateQuery.h | 34 +++++++++++++++++++ src/Parsers/ASTDictionary.h | 5 +++ src/Parsers/ASTExternalDDLQuery.h | 5 +++ .../ASTFunctionWithKeyValueArguments.h | 5 +++ src/Parsers/ASTIndexDeclaration.h | 6 ++++ src/Parsers/ASTProjectionDeclaration.h | 5 +++ src/Parsers/ASTTableOverrides.h | 6 ++++ src/Parsers/IAST.h | 14 ++++++++ src/Parsers/MySQL/ASTAlterCommand.h | 9 +++++ src/Parsers/MySQL/ASTCreateDefines.h | 8 ++++- 15 files changed, 129 insertions(+), 1 deletion(-) diff --git a/src/Interpreters/ReplaceQueryParameterVisitor.cpp b/src/Interpreters/ReplaceQueryParameterVisitor.cpp index f271de26ca4..893c93f0950 100644 --- a/src/Interpreters/ReplaceQueryParameterVisitor.cpp +++ b/src/Interpreters/ReplaceQueryParameterVisitor.cpp @@ -50,7 +50,16 @@ void ReplaceQueryParameterVisitor::visit(ASTPtr & ast) void ReplaceQueryParameterVisitor::visitChildren(ASTPtr & ast) { for (auto & child : ast->children) + { + void * old_ptr = child.get(); visit(child); + void * new_ptr = child.get(); + + /// Some AST classes have naked pointers to children elements as members. + /// We have to replace them if the child was replaced. + if (new_ptr != old_ptr) + ast->updatePointerToChild(old_ptr, new_ptr); + } } const String & ReplaceQueryParameterVisitor::getParamValue(const String & name) @@ -89,6 +98,7 @@ void ReplaceQueryParameterVisitor::visitQueryParameter(ASTPtr & ast) literal = value; else literal = temp_column[0]; + ast = addTypeConversionToAST(std::make_shared(literal), type_name); /// Keep the original alias. diff --git a/src/Parsers/ASTAlterQuery.h b/src/Parsers/ASTAlterQuery.h index 2a48f5bbd9e..1400113fa9c 100644 --- a/src/Parsers/ASTAlterQuery.h +++ b/src/Parsers/ASTAlterQuery.h @@ -256,6 +256,11 @@ protected: void formatQueryImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override; bool isOneCommandTypeOnly(const ASTAlterCommand::Type & type) const; + + void forEachPointerToChild(std::function f) override + { + f(reinterpret_cast(&command_list)); + } }; } diff --git a/src/Parsers/ASTBackupQuery.h b/src/Parsers/ASTBackupQuery.h index a3e3a144c72..0201c2b14f9 100644 --- a/src/Parsers/ASTBackupQuery.h +++ b/src/Parsers/ASTBackupQuery.h @@ -94,5 +94,12 @@ public: void formatImpl(const FormatSettings & format, FormatState &, FormatStateStacked) const override; ASTPtr getRewrittenASTWithoutOnCluster(const WithoutOnClusterASTRewriteParams &) const override; QueryKind getQueryKind() const override; + + void forEachPointerToChild(std::function f) override + { + f(reinterpret_cast(&backup_name)); + f(reinterpret_cast(&base_backup_name)); + } }; + } diff --git a/src/Parsers/ASTConstraintDeclaration.h b/src/Parsers/ASTConstraintDeclaration.h index 437aab1a82d..f48d7ef77fe 100644 --- a/src/Parsers/ASTConstraintDeclaration.h +++ b/src/Parsers/ASTConstraintDeclaration.h @@ -25,5 +25,11 @@ public: ASTPtr clone() const override; void formatImpl(const FormatSettings & s, FormatState & state, FormatStateStacked frame) const override; + + void forEachPointerToChild(std::function f) override + { + f(reinterpret_cast(&expr)); + } }; + } diff --git a/src/Parsers/ASTCreateQuery.cpp b/src/Parsers/ASTCreateQuery.cpp index 955ce62b0f7..e28e863c21f 100644 --- a/src/Parsers/ASTCreateQuery.cpp +++ b/src/Parsers/ASTCreateQuery.cpp @@ -91,6 +91,11 @@ public: ASTPtr clone() const override; void formatImpl(const FormatSettings & s, FormatState & state, FormatStateStacked frame) const override; + + void forEachPointerToChild(std::function f) override + { + f(reinterpret_cast(&elem)); + } }; ASTPtr ASTColumnsElement::clone() const diff --git a/src/Parsers/ASTCreateQuery.h b/src/Parsers/ASTCreateQuery.h index 90a15e09369..230996f610e 100644 --- a/src/Parsers/ASTCreateQuery.h +++ b/src/Parsers/ASTCreateQuery.h @@ -32,6 +32,17 @@ public: void formatImpl(const FormatSettings & s, FormatState & state, FormatStateStacked frame) const override; bool isExtendedStorageDefinition() const; + + void forEachPointerToChild(std::function f) override + { + f(reinterpret_cast(&engine)); + f(reinterpret_cast(&partition_by)); + f(reinterpret_cast(&primary_key)); + f(reinterpret_cast(&order_by)); + f(reinterpret_cast(&sample_by)); + f(reinterpret_cast(&ttl_table)); + f(reinterpret_cast(&settings)); + } }; @@ -57,6 +68,16 @@ public: return (!columns || columns->children.empty()) && (!indices || indices->children.empty()) && (!constraints || constraints->children.empty()) && (!projections || projections->children.empty()); } + + void forEachPointerToChild(std::function f) override + { + f(reinterpret_cast(&columns)); + f(reinterpret_cast(&indices)); + f(reinterpret_cast(&primary_key)); + f(reinterpret_cast(&constraints)); + f(reinterpret_cast(&projections)); + f(reinterpret_cast(&primary_key)); + } }; @@ -126,6 +147,19 @@ public: protected: void formatQueryImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override; + + void forEachPointerToChild(std::function f) override + { + f(reinterpret_cast(&columns_list)); + f(reinterpret_cast(&inner_storage)); + f(reinterpret_cast(&storage)); + f(reinterpret_cast(&as_table_function)); + f(reinterpret_cast(&select)); + f(reinterpret_cast(&comment)); + f(reinterpret_cast(&table_overrides)); + f(reinterpret_cast(&dictionary_attributes_list)); + f(reinterpret_cast(&dictionary)); + } }; } diff --git a/src/Parsers/ASTDictionary.h b/src/Parsers/ASTDictionary.h index 3611621b8ad..8c332247d52 100644 --- a/src/Parsers/ASTDictionary.h +++ b/src/Parsers/ASTDictionary.h @@ -47,6 +47,11 @@ public: ASTPtr clone() const override; void formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override; + + void forEachPointerToChild(std::function f) override + { + f(reinterpret_cast(¶meters)); + } }; diff --git a/src/Parsers/ASTExternalDDLQuery.h b/src/Parsers/ASTExternalDDLQuery.h index 7913d44b970..96600b07f29 100644 --- a/src/Parsers/ASTExternalDDLQuery.h +++ b/src/Parsers/ASTExternalDDLQuery.h @@ -41,6 +41,11 @@ public: } QueryKind getQueryKind() const override { return QueryKind::ExternalDDL; } + + void forEachPointerToChild(std::function f) override + { + f(reinterpret_cast(&from)); + } }; } diff --git a/src/Parsers/ASTFunctionWithKeyValueArguments.h b/src/Parsers/ASTFunctionWithKeyValueArguments.h index 67d591dfcdc..75a8ae0415e 100644 --- a/src/Parsers/ASTFunctionWithKeyValueArguments.h +++ b/src/Parsers/ASTFunctionWithKeyValueArguments.h @@ -33,6 +33,11 @@ public: bool hasSecretParts() const override; void updateTreeHashImpl(SipHash & hash_state) const override; + + void forEachPointerToChild(std::function f) override + { + f(reinterpret_cast(&second)); + } }; diff --git a/src/Parsers/ASTIndexDeclaration.h b/src/Parsers/ASTIndexDeclaration.h index e22c1da4489..bd52a611f3f 100644 --- a/src/Parsers/ASTIndexDeclaration.h +++ b/src/Parsers/ASTIndexDeclaration.h @@ -23,6 +23,12 @@ public: ASTPtr clone() const override; void formatImpl(const FormatSettings & s, FormatState & state, FormatStateStacked frame) const override; + + void forEachPointerToChild(std::function f) override + { + f(reinterpret_cast(&expr)); + f(reinterpret_cast(&type)); + } }; } diff --git a/src/Parsers/ASTProjectionDeclaration.h b/src/Parsers/ASTProjectionDeclaration.h index 53c681c3ec1..df7a7c832a6 100644 --- a/src/Parsers/ASTProjectionDeclaration.h +++ b/src/Parsers/ASTProjectionDeclaration.h @@ -18,6 +18,11 @@ public: ASTPtr clone() const override; void formatImpl(const FormatSettings & s, FormatState & state, FormatStateStacked frame) const override; + + void forEachPointerToChild(std::function f) override + { + f(reinterpret_cast(&query)); + } }; } diff --git a/src/Parsers/ASTTableOverrides.h b/src/Parsers/ASTTableOverrides.h index c47260789d8..1df267acaa9 100644 --- a/src/Parsers/ASTTableOverrides.h +++ b/src/Parsers/ASTTableOverrides.h @@ -27,6 +27,12 @@ public: String getID(char) const override { return "TableOverride " + table_name; } ASTPtr clone() const override; void formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override; + + void forEachPointerToChild(std::function f) override + { + f(reinterpret_cast(&columns)); + f(reinterpret_cast(&storage)); + } }; /// List of table overrides, for example: diff --git a/src/Parsers/IAST.h b/src/Parsers/IAST.h index 627b1174b33..5928506aa5b 100644 --- a/src/Parsers/IAST.h +++ b/src/Parsers/IAST.h @@ -175,6 +175,16 @@ public: field = nullptr; } + /// After changing one of `children` elements, update the corresponding member pointer if needed. + void updatePointerToChild(void * old_ptr, void * new_ptr) + { + forEachPointerToChild([old_ptr, new_ptr](void ** ptr) mutable + { + if (*ptr == old_ptr) + *ptr = new_ptr; + }); + } + /// Convert to a string. /// Format settings. @@ -295,6 +305,10 @@ public: protected: bool childrenHaveSecretParts() const; + /// Some AST classes have naked pointers to children elements as members. + /// This method allows to iterate over them. + virtual void forEachPointerToChild(std::function) {} + private: size_t checkDepthImpl(size_t max_depth) const; diff --git a/src/Parsers/MySQL/ASTAlterCommand.h b/src/Parsers/MySQL/ASTAlterCommand.h index f097ed71219..87b665ec6a5 100644 --- a/src/Parsers/MySQL/ASTAlterCommand.h +++ b/src/Parsers/MySQL/ASTAlterCommand.h @@ -80,6 +80,15 @@ protected: { throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Method formatImpl is not supported by MySQLParser::ASTAlterCommand."); } + + void forEachPointerToChild(std::function f) override + { + f(reinterpret_cast(&index_decl)); + f(reinterpret_cast(&default_expression)); + f(reinterpret_cast(&additional_columns)); + f(reinterpret_cast(&order_by_columns)); + f(reinterpret_cast(&properties)); + } }; class ParserAlterCommand : public IParserBase diff --git a/src/Parsers/MySQL/ASTCreateDefines.h b/src/Parsers/MySQL/ASTCreateDefines.h index 3d2a79568ab..7c23d1cb87f 100644 --- a/src/Parsers/MySQL/ASTCreateDefines.h +++ b/src/Parsers/MySQL/ASTCreateDefines.h @@ -31,6 +31,13 @@ protected: { throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Method formatImpl is not supported by MySQLParser::ASTCreateDefines."); } + + void forEachPointerToChild(std::function f) override + { + f(reinterpret_cast(&columns)); + f(reinterpret_cast(&indices)); + f(reinterpret_cast(&constraints)); + } }; class ParserCreateDefines : public IParserBase @@ -44,4 +51,3 @@ protected: } } - From dccd919a41cfb2e0897aef5bd9b4013eb348520c Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 11 Mar 2023 20:18:01 +0100 Subject: [PATCH 734/841] Add a test --- .../02679_query_parameters_dangling_pointer.reference | 0 .../0_stateless/02679_query_parameters_dangling_pointer.sql | 4 ++++ 2 files changed, 4 insertions(+) create mode 100644 tests/queries/0_stateless/02679_query_parameters_dangling_pointer.reference create mode 100644 tests/queries/0_stateless/02679_query_parameters_dangling_pointer.sql diff --git a/tests/queries/0_stateless/02679_query_parameters_dangling_pointer.reference b/tests/queries/0_stateless/02679_query_parameters_dangling_pointer.reference new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/queries/0_stateless/02679_query_parameters_dangling_pointer.sql b/tests/queries/0_stateless/02679_query_parameters_dangling_pointer.sql new file mode 100644 index 00000000000..7705b860e8e --- /dev/null +++ b/tests/queries/0_stateless/02679_query_parameters_dangling_pointer.sql @@ -0,0 +1,4 @@ +-- There is no use-after-free in the following query: + +SET param_o = 'a'; +CREATE TABLE test.xxx (a Int64) ENGINE=MergeTree ORDER BY ({o:String}); -- { serverError 44 } From 5b11d72ce4cadd3f4d4e13c0bcdc50049a5b7ff4 Mon Sep 17 00:00:00 2001 From: Smita Kulkarni Date: Sat, 11 Mar 2023 20:39:43 +0100 Subject: [PATCH 735/841] In parameterized view, moved parameter values to SelectQueryInfo from StorageView as it can be used by multiple queries and updated column name check to avoid issues with parameter name being substring of column name. --- src/Interpreters/InterpreterSelectQuery.cpp | 9 ++++----- src/Storages/SelectQueryInfo.h | 1 + src/Storages/StorageView.cpp | 10 ++++++---- src/Storages/StorageView.h | 14 ++++---------- 4 files changed, 15 insertions(+), 19 deletions(-) diff --git a/src/Interpreters/InterpreterSelectQuery.cpp b/src/Interpreters/InterpreterSelectQuery.cpp index 2f579244b9a..20400b0e48b 100644 --- a/src/Interpreters/InterpreterSelectQuery.cpp +++ b/src/Interpreters/InterpreterSelectQuery.cpp @@ -575,14 +575,13 @@ InterpreterSelectQuery::InterpreterSelectQuery( /// and after query is replaced, we use these parameters to substitute in the parameterized view query if (query_info.is_parameterized_view) { - parameter_values = analyzeFunctionParamValues(query_ptr); - view->setParameterValues(parameter_values); - parameter_types = view->getParameterValues(); + query_info.parameter_values = analyzeFunctionParamValues(query_ptr); + parameter_types = view->getParameterTypes(); } view->replaceWithSubquery(getSelectQuery(), view_table, metadata_snapshot, view->isParameterizedView()); if (query_info.is_parameterized_view) { - view->replaceQueryParametersIfParametrizedView(query_ptr); + view->replaceQueryParametersIfParametrizedView(query_ptr, query_info.parameter_values); } } @@ -595,7 +594,7 @@ InterpreterSelectQuery::InterpreterSelectQuery( required_result_column_names, table_join, query_info.is_parameterized_view, - parameter_values, + query_info.parameter_values, parameter_types); diff --git a/src/Storages/SelectQueryInfo.h b/src/Storages/SelectQueryInfo.h index e3996950e79..db43b2fc3f8 100644 --- a/src/Storages/SelectQueryInfo.h +++ b/src/Storages/SelectQueryInfo.h @@ -254,6 +254,7 @@ struct SelectQueryInfo MergeTreeDataSelectAnalysisResultPtr merge_tree_select_result_ptr; bool is_parameterized_view = false; + NameToNameMap parameterized_view_values; // If limit is not 0, that means it's a trivial limit query. UInt64 limit = 0; diff --git a/src/Storages/StorageView.cpp b/src/Storages/StorageView.cpp index 1a7050b4dff..d1595895f67 100644 --- a/src/Storages/StorageView.cpp +++ b/src/Storages/StorageView.cpp @@ -36,6 +36,7 @@ namespace ErrorCodes extern const int LOGICAL_ERROR; } + namespace { @@ -118,7 +119,7 @@ StorageView::StorageView( description.inner_query = query.select->ptr(); is_parameterized_view = query.isParameterizedView(); - parameter_types = analyzeReceiveQueryParamsWithType(description.inner_query); + view_parameter_types = analyzeReceiveQueryParamsWithType(description.inner_query); storage_metadata.setSelectQuery(description); setInMemoryMetadata(storage_metadata); } @@ -167,7 +168,7 @@ void StorageView::read( query_plan.addStep(std::move(materializing)); /// And also convert to expected structure. - const auto & expected_header = storage_snapshot->getSampleBlockForColumns(column_names,parameter_values); + const auto & expected_header = storage_snapshot->getSampleBlockForColumns(column_names,query_info.parameter_values); const auto & header = query_plan.getCurrentDataStream().header; const auto * select_with_union = current_inner_query->as(); @@ -203,7 +204,7 @@ static ASTTableExpression * getFirstTableExpression(ASTSelectQuery & select_quer return select_element->table_expression->as(); } -void StorageView::replaceQueryParametersIfParametrizedView(ASTPtr & outer_query) +void StorageView::replaceQueryParametersIfParametrizedView(ASTPtr & outer_query, const NameToNameMap & parameter_values) { ReplaceQueryParameterVisitor visitor(parameter_values); visitor.visit(outer_query); @@ -261,7 +262,8 @@ String StorageView::replaceQueryParameterWithValue(const String & column_name, c if ((pos = name.find(parameter.first)) != std::string::npos) { auto parameter_datatype_iterator = parameter_types.find(parameter.first); - if (parameter_datatype_iterator != parameter_types.end()) + size_t parameter_end = pos+parameter.first.size(); + if (parameter_datatype_iterator != parameter_types.end() && name.size() >= parameter_end && (name[parameter_end]==',' || name[parameter_end]==')')) { String parameter_name("_CAST(" + parameter.second + ", '" + parameter_datatype_iterator->second + "')"); name.replace(pos, parameter.first.size(), parameter_name); diff --git a/src/Storages/StorageView.h b/src/Storages/StorageView.h index 6cd4bb171f5..d7ee9b664d6 100644 --- a/src/Storages/StorageView.h +++ b/src/Storages/StorageView.h @@ -35,7 +35,7 @@ public: size_t max_block_size, size_t num_streams) override; - void replaceQueryParametersIfParametrizedView(ASTPtr & outer_query); + void replaceQueryParametersIfParametrizedView(ASTPtr & outer_query, const NameToNameMap & parameter_values); static void replaceWithSubquery(ASTSelectQuery & select_query, ASTPtr & view_name, const StorageMetadataPtr & metadata_snapshot, const bool parameterized_view) { @@ -47,20 +47,14 @@ public: static String replaceQueryParameterWithValue (const String & column_name, const NameToNameMap & parameter_values, const NameToNameMap & parameter_types); static String replaceValueWithQueryParameter (const String & column_name, const NameToNameMap & parameter_values); - void setParameterValues (NameToNameMap parameter_values_) + NameToNameMap getParameterTypes() const { - parameter_values = parameter_values_; - } - - NameToNameMap getParameterValues() const - { - return parameter_types; + return view_parameter_types; } protected: bool is_parameterized_view; - NameToNameMap parameter_values; - NameToNameMap parameter_types; + NameToNameMap view_parameter_types; }; } From ff47aa1eb25c22574e7cbd06a5d1dd53c3c25905 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 11 Mar 2023 21:30:41 +0100 Subject: [PATCH 736/841] Small refinement in test --- ...x_extra_seek_on_compressed_cache.reference | 2 ++ ...test_fix_extra_seek_on_compressed_cache.sh | 21 +++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/tests/queries/0_stateless/00933_test_fix_extra_seek_on_compressed_cache.reference b/tests/queries/0_stateless/00933_test_fix_extra_seek_on_compressed_cache.reference index f1839bae259..e142c6c79fe 100644 --- a/tests/queries/0_stateless/00933_test_fix_extra_seek_on_compressed_cache.reference +++ b/tests/queries/0_stateless/00933_test_fix_extra_seek_on_compressed_cache.reference @@ -1 +1,3 @@ +99999 +99999 0 0 13 diff --git a/tests/queries/0_stateless/00933_test_fix_extra_seek_on_compressed_cache.sh b/tests/queries/0_stateless/00933_test_fix_extra_seek_on_compressed_cache.sh index 390d6a70ef1..7bf4a88e972 100755 --- a/tests/queries/0_stateless/00933_test_fix_extra_seek_on_compressed_cache.sh +++ b/tests/queries/0_stateless/00933_test_fix_extra_seek_on_compressed_cache.sh @@ -13,15 +13,24 @@ $CLICKHOUSE_CLIENT --query="CREATE TABLE small_table (a UInt64 default 0, n UInt $CLICKHOUSE_CLIENT --query="INSERT INTO small_table (n) SELECT * from system.numbers limit 100000;" $CLICKHOUSE_CLIENT --query="OPTIMIZE TABLE small_table FINAL;" -cached_query="SELECT count() FROM small_table where n > 0;" +cached_query="SELECT count() FROM small_table WHERE n > 0;" -$CLICKHOUSE_CLIENT --use_uncompressed_cache=1 --query="$cached_query" &> /dev/null - -$CLICKHOUSE_CLIENT --use_uncompressed_cache=1 --allow_prefetched_read_pool_for_remote_filesystem=0 --allow_prefetched_read_pool_for_local_filesystem=0 --query_id="test-query-uncompressed-cache" --query="$cached_query" &> /dev/null +$CLICKHOUSE_CLIENT --log_queries 1 --use_uncompressed_cache 1 --query="$cached_query" +$CLICKHOUSE_CLIENT --log_queries 1 --use_uncompressed_cache 1 --allow_prefetched_read_pool_for_remote_filesystem 0 --allow_prefetched_read_pool_for_local_filesystem 0 --query_id="test-query-uncompressed-cache" --query="$cached_query" $CLICKHOUSE_CLIENT --query="SYSTEM FLUSH LOGS" - -$CLICKHOUSE_CLIENT --query="SELECT ProfileEvents['Seek'], ProfileEvents['ReadCompressedBytes'], ProfileEvents['UncompressedCacheHits'] AS hit FROM system.query_log WHERE (query_id = 'test-query-uncompressed-cache') and current_database = currentDatabase() AND (type = 2) AND event_date >= yesterday() ORDER BY event_time DESC LIMIT 1" +$CLICKHOUSE_CLIENT --query=" + SELECT + ProfileEvents['Seek'], + ProfileEvents['ReadCompressedBytes'], + ProfileEvents['UncompressedCacheHits'] AS hit + FROM system.query_log + WHERE query_id = 'test-query-uncompressed-cache' + AND current_database = currentDatabase() + AND type = 2 + AND event_date >= yesterday() + ORDER BY event_time DESC + LIMIT 1" $CLICKHOUSE_CLIENT --query="DROP TABLE IF EXISTS small_table" From 218ac10425d6b06f1eb181bf1b660d8a3af8ecc2 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 11 Mar 2023 21:44:38 +0100 Subject: [PATCH 737/841] More detailed error messages on too many parts --- src/Storages/MergeTree/MergeTreeData.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Storages/MergeTree/MergeTreeData.cpp b/src/Storages/MergeTree/MergeTreeData.cpp index 73007e3f178..d7cea944689 100644 --- a/src/Storages/MergeTree/MergeTreeData.cpp +++ b/src/Storages/MergeTree/MergeTreeData.cpp @@ -4121,9 +4121,9 @@ void MergeTreeData::delayInsertOrThrowIfNeeded(Poco::Event * until, const Contex ProfileEvents::increment(ProfileEvents::RejectedInserts); throw Exception( ErrorCodes::TOO_MANY_PARTS, - "Too many parts ({}) in all partitions in total. This indicates wrong choice of partition key. The threshold can be modified " + "Too many parts ({}) in all partitions in total in table '{}'. This indicates wrong choice of partition key. The threshold can be modified " "with 'max_parts_in_total' setting in element in config.xml or with per-table setting.", - parts_count_in_total); + parts_count_in_total, getLogName()); } size_t outdated_parts_over_threshold = 0; @@ -4137,8 +4137,8 @@ void MergeTreeData::delayInsertOrThrowIfNeeded(Poco::Event * until, const Contex ProfileEvents::increment(ProfileEvents::RejectedInserts); throw Exception( ErrorCodes::TOO_MANY_PARTS, - "Too many inactive parts ({}). Parts cleaning are processing significantly slower than inserts", - outdated_parts_count_in_partition); + "Too many inactive parts ({}) in table '{}'. Parts cleaning are processing significantly slower than inserts", + outdated_parts_count_in_partition, getLogName()); } if (settings->inactive_parts_to_delay_insert > 0 && outdated_parts_count_in_partition >= settings->inactive_parts_to_delay_insert) outdated_parts_over_threshold = outdated_parts_count_in_partition - settings->inactive_parts_to_delay_insert + 1; @@ -4151,6 +4151,7 @@ void MergeTreeData::delayInsertOrThrowIfNeeded(Poco::Event * until, const Contex const auto active_parts_to_throw_insert = query_settings.parts_to_throw_insert ? query_settings.parts_to_throw_insert : settings->parts_to_throw_insert; size_t active_parts_over_threshold = 0; + { bool parts_are_large_enough_in_average = settings->max_avg_part_size_for_too_many_parts && average_part_size > settings->max_avg_part_size_for_too_many_parts; @@ -4160,9 +4161,10 @@ void MergeTreeData::delayInsertOrThrowIfNeeded(Poco::Event * until, const Contex ProfileEvents::increment(ProfileEvents::RejectedInserts); throw Exception( ErrorCodes::TOO_MANY_PARTS, - "Too many parts ({} with average size of {}). Merges are processing significantly slower than inserts", + "Too many parts ({} with average size of {}) in table '{}'. Merges are processing significantly slower than inserts", parts_count_in_partition, - ReadableSize(average_part_size)); + ReadableSize(average_part_size), + getLogName()); } if (active_parts_to_delay_insert > 0 && parts_count_in_partition >= active_parts_to_delay_insert && !parts_are_large_enough_in_average) From bd8277c001786d491212c35a6925f56c26a73936 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 11 Mar 2023 21:44:56 +0100 Subject: [PATCH 738/841] Fix "00933_test_fix_extra_seek_on_compressed_cache" in releases --- tests/queries/0_stateless/02286_drop_filesystem_cache.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/queries/0_stateless/02286_drop_filesystem_cache.sh b/tests/queries/0_stateless/02286_drop_filesystem_cache.sh index b563c487646..991622446b8 100755 --- a/tests/queries/0_stateless/02286_drop_filesystem_cache.sh +++ b/tests/queries/0_stateless/02286_drop_filesystem_cache.sh @@ -16,7 +16,7 @@ for STORAGE_POLICY in 's3_cache' 'local_cache'; do ORDER BY key SETTINGS storage_policy='$STORAGE_POLICY', min_bytes_for_wide_part = 10485760" - $CLICKHOUSE_CLIENT --query "SYSTEM STOP MERGES" + $CLICKHOUSE_CLIENT --query "SYSTEM STOP MERGES test_02286" $CLICKHOUSE_CLIENT --query "SYSTEM DROP FILESYSTEM CACHE" $CLICKHOUSE_CLIENT --query "SELECT count() FROM system.filesystem_cache" From 898f980b2dcef7a77195fc59acc5c338f35b66eb Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 11 Mar 2023 22:00:54 +0100 Subject: [PATCH 739/841] Fix long test 02371_select_projection_normal_agg.sql --- .../0_stateless/02371_select_projection_normal_agg.sql | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/queries/0_stateless/02371_select_projection_normal_agg.sql b/tests/queries/0_stateless/02371_select_projection_normal_agg.sql index 283aec0b122..8650fb6b843 100644 --- a/tests/queries/0_stateless/02371_select_projection_normal_agg.sql +++ b/tests/queries/0_stateless/02371_select_projection_normal_agg.sql @@ -11,7 +11,8 @@ CREATE TABLE video_log ) ENGINE = MergeTree PARTITION BY toDate(datetime) -ORDER BY (user_id, device_id); +ORDER BY (user_id, device_id) +SETTINGS index_granularity = 8192, index_granularity_bytes = '10Mi'; DROP TABLE IF EXISTS rng; @@ -57,7 +58,8 @@ CREATE TABLE video_log_result ) ENGINE = MergeTree PARTITION BY toDate(hour) -ORDER BY sum_bytes; +ORDER BY sum_bytes +SETTINGS index_granularity = 8192, index_granularity_bytes = '10Mi'; INSERT INTO video_log_result SELECT toStartOfHour(datetime) AS hour, From 5a18acde90d2ef04b4126ed6d52493c47cf94ebd Mon Sep 17 00:00:00 2001 From: avogar Date: Sat, 11 Mar 2023 21:15:14 +0000 Subject: [PATCH 740/841] Revert #45878 and add a test --- src/Core/Settings.h | 1 - src/Formats/FormatFactory.cpp | 1 - src/Formats/FormatSettings.h | 1 - .../Formats/Impl/ParquetBlockInputFormat.cpp | 58 +++++++++---------- 4 files changed, 26 insertions(+), 35 deletions(-) diff --git a/src/Core/Settings.h b/src/Core/Settings.h index f67ce6be9ed..881cbe42a02 100644 --- a/src/Core/Settings.h +++ b/src/Core/Settings.h @@ -803,7 +803,6 @@ class IColumn; M(Bool, input_format_tsv_detect_header, true, "Automatically detect header with names and types in TSV format", 0) \ M(Bool, input_format_custom_detect_header, true, "Automatically detect header with names and types in CustomSeparated format", 0) \ M(Bool, input_format_parquet_skip_columns_with_unsupported_types_in_schema_inference, false, "Skip columns with unsupported types while schema inference for format Parquet", 0) \ - M(UInt64, input_format_parquet_max_block_size, 8192, "Max block size for parquet reader.", 0) \ M(Bool, input_format_protobuf_skip_fields_with_unsupported_types_in_schema_inference, false, "Skip fields with unsupported types while schema inference for format Protobuf", 0) \ M(Bool, input_format_capn_proto_skip_fields_with_unsupported_types_in_schema_inference, false, "Skip columns with unsupported types while schema inference for format CapnProto", 0) \ M(Bool, input_format_orc_skip_columns_with_unsupported_types_in_schema_inference, false, "Skip columns with unsupported types while schema inference for format ORC", 0) \ diff --git a/src/Formats/FormatFactory.cpp b/src/Formats/FormatFactory.cpp index a951a7fdd92..a6db9d5ba0d 100644 --- a/src/Formats/FormatFactory.cpp +++ b/src/Formats/FormatFactory.cpp @@ -117,7 +117,6 @@ FormatSettings getFormatSettings(ContextPtr context, const Settings & settings) format_settings.parquet.skip_columns_with_unsupported_types_in_schema_inference = settings.input_format_parquet_skip_columns_with_unsupported_types_in_schema_inference; format_settings.parquet.output_string_as_string = settings.output_format_parquet_string_as_string; format_settings.parquet.output_fixed_string_as_fixed_byte_array = settings.output_format_parquet_fixed_string_as_fixed_byte_array; - format_settings.parquet.max_block_size = settings.input_format_parquet_max_block_size; format_settings.parquet.output_compression_method = settings.output_format_parquet_compression_method; format_settings.pretty.charset = settings.output_format_pretty_grid_charset.toString() == "ASCII" ? FormatSettings::Pretty::Charset::ASCII : FormatSettings::Pretty::Charset::UTF8; format_settings.pretty.color = settings.output_format_pretty_color; diff --git a/src/Formats/FormatSettings.h b/src/Formats/FormatSettings.h index 7be7b5b98aa..ef6be805bea 100644 --- a/src/Formats/FormatSettings.h +++ b/src/Formats/FormatSettings.h @@ -211,7 +211,6 @@ struct FormatSettings std::unordered_set skip_row_groups = {}; bool output_string_as_string = false; bool output_fixed_string_as_fixed_byte_array = true; - UInt64 max_block_size = 8192; ParquetVersion output_version; ParquetCompression output_compression_method = ParquetCompression::SNAPPY; } parquet; diff --git a/src/Processors/Formats/Impl/ParquetBlockInputFormat.cpp b/src/Processors/Formats/Impl/ParquetBlockInputFormat.cpp index fca097d8ea7..87a0fbf77a8 100644 --- a/src/Processors/Formats/Impl/ParquetBlockInputFormat.cpp +++ b/src/Processors/Formats/Impl/ParquetBlockInputFormat.cpp @@ -45,44 +45,38 @@ Chunk ParquetBlockInputFormat::generate() block_missing_values.clear(); if (!file_reader) - { prepareReader(); - file_reader->set_batch_size(format_settings.parquet.max_block_size); - std::vector row_group_indices; - for (int i = 0; i < row_group_total; ++i) - { - if (!skip_row_groups.contains(i)) - row_group_indices.emplace_back(i); - } - auto read_status = file_reader->GetRecordBatchReader(row_group_indices, column_indices, ¤t_record_batch_reader); - if (!read_status.ok()) - throw DB::ParsingException(ErrorCodes::CANNOT_READ_ALL_DATA, "Error while reading Parquet data: {}", read_status.ToString()); - } if (is_stopped) return {}; - auto batch = current_record_batch_reader->Next(); - if (!batch.ok()) - { - throw ParsingException(ErrorCodes::CANNOT_READ_ALL_DATA, "Error while reading Parquet data: {}", - batch.status().ToString()); - } - if (*batch) - { - auto tmp_table = arrow::Table::FromRecordBatches({*batch}); - /// If defaults_for_omitted_fields is true, calculate the default values from default expression for omitted fields. - /// Otherwise fill the missing columns with zero values of its type. - BlockMissingValues * block_missing_values_ptr = format_settings.defaults_for_omitted_fields ? &block_missing_values : nullptr; - arrow_column_to_ch_column->arrowTableToCHChunk(res, *tmp_table, (*tmp_table)->num_rows(), block_missing_values_ptr); - } - else - { - current_record_batch_reader.reset(); - file_reader.reset(); - return {}; - } + while (row_group_current < row_group_total && skip_row_groups.contains(row_group_current)) + ++row_group_current; + if (row_group_current >= row_group_total) + return res; + + std::shared_ptr table; + + std::unique_ptr<::arrow::RecordBatchReader> rbr; + std::vector row_group_indices { row_group_current }; + arrow::Status get_batch_reader_status = file_reader->GetRecordBatchReader(row_group_indices, column_indices, &rbr); + + if (!get_batch_reader_status.ok()) + throw ParsingException(ErrorCodes::CANNOT_READ_ALL_DATA, "Error while reading Parquet data: {}", + get_batch_reader_status.ToString()); + + arrow::Status read_status = rbr->ReadAll(&table); + + if (!read_status.ok()) + throw ParsingException(ErrorCodes::CANNOT_READ_ALL_DATA, "Error while reading Parquet data: {}", read_status.ToString()); + + ++row_group_current; + + /// If defaults_for_omitted_fields is true, calculate the default values from default expression for omitted fields. + /// Otherwise fill the missing columns with zero values of its type. + BlockMissingValues * block_missing_values_ptr = format_settings.defaults_for_omitted_fields ? &block_missing_values : nullptr; + arrow_column_to_ch_column->arrowTableToCHChunk(res, table, table->num_rows(), block_missing_values_ptr); return res; } From c915ec8a48305156a516a5ea59a21482ae0c063c Mon Sep 17 00:00:00 2001 From: avogar Date: Sat, 11 Mar 2023 21:16:05 +0000 Subject: [PATCH 741/841] Add test --- .../0_stateless/02588_parquet_bug.reference | 3 +++ .../queries/0_stateless/02588_parquet_bug.sh | 11 +++++++++++ .../data_parquet/02588_data.parquet | Bin 0 -> 2699811 bytes 3 files changed, 14 insertions(+) create mode 100644 tests/queries/0_stateless/02588_parquet_bug.reference create mode 100755 tests/queries/0_stateless/02588_parquet_bug.sh create mode 100644 tests/queries/0_stateless/data_parquet/02588_data.parquet diff --git a/tests/queries/0_stateless/02588_parquet_bug.reference b/tests/queries/0_stateless/02588_parquet_bug.reference new file mode 100644 index 00000000000..44de58ae5c3 --- /dev/null +++ b/tests/queries/0_stateless/02588_parquet_bug.reference @@ -0,0 +1,3 @@ +cta 224.0.90.10 1670964058771367936 64066044 NYSE cqs_pillar quote \N \N \N 82.92 1 R 82.97 2 R +1670964058771367936 +1670946478544048640 ARCA cqs_pillar diff --git a/tests/queries/0_stateless/02588_parquet_bug.sh b/tests/queries/0_stateless/02588_parquet_bug.sh new file mode 100755 index 00000000000..f7e4ecf5e4c --- /dev/null +++ b/tests/queries/0_stateless/02588_parquet_bug.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# Tags: no-fasttest + +CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +# shellcheck source=../shell_config.sh +. "$CURDIR"/../shell_config.sh + +$CLICKHOUSE_LOCAL -q "select * from file('$CURDIR/data_parquet/02588_data.parquet') where exchange_ts = 1670964058771367936" +$CLICKHOUSE_LOCAL -q "select exchange_ts from file('$CURDIR/data_parquet/02588_data.parquet') where exchange_ts = 1670964058771367936" +$CLICKHOUSE_LOCAL -q "select exchange_ts, market, product from file('$CURDIR/data_parquet/02588_data.parquet') where exchange_ts = 1670946478544048640" + diff --git a/tests/queries/0_stateless/data_parquet/02588_data.parquet b/tests/queries/0_stateless/data_parquet/02588_data.parquet new file mode 100644 index 0000000000000000000000000000000000000000..e00b869233d7c0a3a4484bf968f39123c9836913 GIT binary patch literal 2699811 zcmcG$2Ut|e*6&>nyI}(j-Ox0mqU4N9l3;8yA~~x_j)F)QF(Hx_1e9b%MZ`FWidiw| zgb3=WW6oK}9KL_`%sDgXeLd%%`#ksa@wa+c)v8>zD(t3x9sDgsj7USI<%tiXLWq*J zG$AA=D~f((XQhdVNKMqwOjIf@5{P6(G8#6-NE*TFR6s?+h$@y!b2z2a#9%o`L&WPl zR6u0ZcXUR~J1Ic#86+ zB@La=Gb7;}PPKTO_aXkry16V*y#3HNj(~Mod6>(R)ru^+smL;BtK`&qgH|2*%rR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