From 8916b8f2e64c70095dee366dbbcd16d94c8a5887 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 30 Nov 2019 23:41:02 +0300 Subject: [PATCH] Make data skipping indices non-experimental. Make settings about data skipping indices, multiple JOINs and CROSS to INNER JOIN conversion obsolete, --- dbms/src/Core/Settings.h | 6 +- .../Interpreters/InterpreterSelectQuery.cpp | 14 ++--- dbms/src/Parsers/ASTSelectQuery.cpp | 3 +- dbms/src/Storages/MergeTree/MergeTreeData.cpp | 4 -- .../MergeTree/registerStorageMergeTree.cpp | 4 -- .../0_stateless/00820_multiple_joins.sql | 2 - ...multiple_joins_subquery_requires_alias.sql | 1 - .../0_stateless/00826_cross_to_inner_join.sql | 56 +++---------------- .../0_stateless/00836_indices_alter.sql | 1 - ...836_indices_alter_replicated_zookeeper.sql | 1 - .../queries/0_stateless/00837_minmax_index.sh | 2 - ...0837_minmax_index_replicated_zookeeper.sql | 1 - .../queries/0_stateless/00838_unique_index.sh | 2 - .../00855_join_with_array_join.sql | 8 --- .../0_stateless/00907_set_index_max_rows.sh | 1 - ...ndex_with_nullable_and_low_cardinality.sql | 1 - ..._with_nullable_and_low_cardinality_bug.sql | 1 - .../0_stateless/00908_bloom_filter_index.sh | 4 -- .../queries/0_stateless/00942_mutate_index.sh | 1 - .../0_stateless/00943_materialize_index.sh | 1 - .../00944_clear_index_in_partition.sh | 1 - ...eate_bloom_filter_index_with_merge_tree.sh | 2 +- .../queries/0_stateless/00944_minmax_null.sql | 1 - .../0_stateless/00945_bloom_filter_index.sql | 1 - .../0_stateless/00955_test_final_mark.sql | 1 - .../00964_bloom_index_string_functions.sh | 1 - .../00965_set_index_string_functions.sh | 1 - ...4_adaptive_granularity_secondary_index.sql | 1 - ...5_indices_mutation_replicated_zookeeper.sh | 1 - .../0_stateless/00979_set_index_not.sql | 1 - .../00990_hasToken_and_tokenbf.sql | 1 - .../0_stateless/00997_set_index_array.sql | 1 - ...test_skip_indices_with_alter_and_merge.sql | 1 - .../01000_bad_size_of_marks_skip_idx.sql | 1 - .../01011_test_create_as_skip_indices.sql | 1 - 35 files changed, 17 insertions(+), 113 deletions(-) diff --git a/dbms/src/Core/Settings.h b/dbms/src/Core/Settings.h index 00d7efb4a5b..4863c631dc6 100644 --- a/dbms/src/Core/Settings.h +++ b/dbms/src/Core/Settings.h @@ -361,11 +361,8 @@ struct Settings : public SettingsCollection M(SettingBool, enable_unaligned_array_join, false, "Allow ARRAY JOIN with multiple arrays that have different sizes. When this settings is enabled, arrays will be resized to the longest one.", 0) \ M(SettingBool, optimize_read_in_order, true, "Enable ORDER BY optimization for reading data in corresponding order in MergeTree tables.", 0) \ M(SettingBool, low_cardinality_allow_in_native_format, true, "Use LowCardinality type in Native format. Otherwise, convert LowCardinality columns to ordinary for select query, and convert ordinary columns to required LowCardinality for insert query.", 0) \ - M(SettingBool, allow_experimental_multiple_joins_emulation, true, "Emulate multiple joins using subselects", 0) \ - M(SettingBool, allow_experimental_cross_to_join_conversion, true, "Convert CROSS JOIN to INNER JOIN if possible", 0) \ M(SettingBool, cancel_http_readonly_queries_on_client_close, false, "Cancel HTTP readonly queries when a client closes the connection without waiting for response.", 0) \ M(SettingBool, external_table_functions_use_nulls, true, "If it is set to true, external table functions will implicitly use Nullable type if needed. Otherwise NULLs will be substituted with default values. Currently supported only by 'mysql' and 'odbc' table functions.", 0) \ - M(SettingBool, allow_experimental_data_skipping_indices, false, "If it is set to true, data skipping indices can be used in CREATE TABLE/ALTER TABLE queries.", 0) \ \ M(SettingBool, experimental_use_processors, false, "Use processors pipeline.", 0) \ \ @@ -393,6 +390,9 @@ struct Settings : public SettingsCollection \ M(SettingBool, allow_experimental_low_cardinality_type, true, "Obsolete setting, does nothing. Will be removed after 2019-08-13", 0) \ M(SettingBool, compile, false, "Whether query compilation is enabled. Will be removed after 2020-03-13", 0) \ + M(SettingBool, allow_experimental_multiple_joins_emulation, true, "Obsolete setting, does nothing. Will be removed after 2020-05-31", 0) \ + M(SettingBool, allow_experimental_cross_to_join_conversion, true, "Obsolete setting, does nothing. Will be removed after 2020-05-31", 0) \ + M(SettingBool, allow_experimental_data_skipping_indices, true, "Obsolete setting, does nothing. Will be removed after 2020-05-31", 0) \ DECLARE_SETTINGS_COLLECTION(LIST_OF_SETTINGS) diff --git a/dbms/src/Interpreters/InterpreterSelectQuery.cpp b/dbms/src/Interpreters/InterpreterSelectQuery.cpp index 0f3d5d82f96..88248b9a070 100644 --- a/dbms/src/Interpreters/InterpreterSelectQuery.cpp +++ b/dbms/src/Interpreters/InterpreterSelectQuery.cpp @@ -244,17 +244,11 @@ InterpreterSelectQuery::InterpreterSelectQuery( throw Exception("Too deep subqueries. Maximum: " + settings.max_subquery_depth.toString(), ErrorCodes::TOO_DEEP_SUBQUERIES); - if (settings.allow_experimental_cross_to_join_conversion) - { - CrossToInnerJoinVisitor::Data cross_to_inner; - CrossToInnerJoinVisitor(cross_to_inner).visit(query_ptr); - } + CrossToInnerJoinVisitor::Data cross_to_inner; + CrossToInnerJoinVisitor(cross_to_inner).visit(query_ptr); - if (settings.allow_experimental_multiple_joins_emulation) - { - JoinToSubqueryTransformVisitor::Data join_to_subs_data{*context}; - JoinToSubqueryTransformVisitor(join_to_subs_data).visit(query_ptr); - } + JoinToSubqueryTransformVisitor::Data join_to_subs_data{*context}; + JoinToSubqueryTransformVisitor(join_to_subs_data).visit(query_ptr); max_streams = settings.max_threads; auto & query = getSelectQuery(); diff --git a/dbms/src/Parsers/ASTSelectQuery.cpp b/dbms/src/Parsers/ASTSelectQuery.cpp index 6faf27e96e1..e9a4eae73c2 100644 --- a/dbms/src/Parsers/ASTSelectQuery.cpp +++ b/dbms/src/Parsers/ASTSelectQuery.cpp @@ -239,8 +239,7 @@ static const ASTTablesInSelectQueryElement * getFirstTableJoin(const ASTSelectQu if (!joined_table) joined_table = &tables_element; else - throw Exception("Multiple JOIN disabled or does not support the query. " - "'set allow_experimental_multiple_joins_emulation' to enable.", ErrorCodes::NOT_IMPLEMENTED); + throw Exception("Multiple JOIN does not support the query.", ErrorCodes::NOT_IMPLEMENTED); } } diff --git a/dbms/src/Storages/MergeTree/MergeTreeData.cpp b/dbms/src/Storages/MergeTree/MergeTreeData.cpp index 2843ff14d79..a5a21a367f9 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeData.cpp +++ b/dbms/src/Storages/MergeTree/MergeTreeData.cpp @@ -1294,10 +1294,6 @@ void MergeTreeData::checkAlter(const AlterCommands & commands, const Context & c ASTPtr new_ttl_table_ast = ttl_table_ast; SettingsChanges new_changes; commands.apply(new_columns, new_indices, new_constraints, new_order_by_ast, new_primary_key_ast, new_ttl_table_ast, new_changes); - if (getIndices().empty() && !new_indices.empty() && - !context.getSettingsRef().allow_experimental_data_skipping_indices) - throw Exception("You must set the setting `allow_experimental_data_skipping_indices` to 1 " \ - "before using data skipping indices.", ErrorCodes::BAD_ARGUMENTS); /// Set of columns that shouldn't be altered. NameSet columns_alter_forbidden; diff --git a/dbms/src/Storages/MergeTree/registerStorageMergeTree.cpp b/dbms/src/Storages/MergeTree/registerStorageMergeTree.cpp index 5458f3f7d9b..6f13122ffb6 100644 --- a/dbms/src/Storages/MergeTree/registerStorageMergeTree.cpp +++ b/dbms/src/Storages/MergeTree/registerStorageMergeTree.cpp @@ -633,10 +633,6 @@ static StoragePtr create(const StorageFactory::Arguments & args) ErrorCodes::BAD_ARGUMENTS); } - if (!args.attach && !indices_description.empty() && !args.local_context.getSettingsRef().allow_experimental_data_skipping_indices) - throw Exception("You must set the setting `allow_experimental_data_skipping_indices` to 1 " \ - "before using data skipping indices.", ErrorCodes::BAD_ARGUMENTS); - if (replicated) return StorageReplicatedMergeTree::create( zookeeper_path, replica_name, args.attach, args.database_name, args.table_name, diff --git a/dbms/tests/queries/0_stateless/00820_multiple_joins.sql b/dbms/tests/queries/0_stateless/00820_multiple_joins.sql index 309b369ade3..890d003a124 100644 --- a/dbms/tests/queries/0_stateless/00820_multiple_joins.sql +++ b/dbms/tests/queries/0_stateless/00820_multiple_joins.sql @@ -13,8 +13,6 @@ INSERT INTO table2 SELECT number * 2, number * 20 FROM numbers(11); INSERT INTO table3 SELECT number * 30, number * 300 FROM numbers(10); INSERT INTO table5 SELECT number * 5, number * 50, number * 500 FROM numbers(10); -SET allow_experimental_multiple_joins_emulation = 1; - select t1.a, t2.b, t3.c from table1 as t1 join table2 as t2 on t1.a = t2.a join table3 as t3 on t2.b = t3.b; select t1.a, t2.b, t5.c from table1 as t1 join table2 as t2 on t1.a = t2.a join table5 as t5 on t1.a = t5.a AND t2.b = t5.b; diff --git a/dbms/tests/queries/0_stateless/00820_multiple_joins_subquery_requires_alias.sql b/dbms/tests/queries/0_stateless/00820_multiple_joins_subquery_requires_alias.sql index ee7910ab41f..ad59e02ecad 100644 --- a/dbms/tests/queries/0_stateless/00820_multiple_joins_subquery_requires_alias.sql +++ b/dbms/tests/queries/0_stateless/00820_multiple_joins_subquery_requires_alias.sql @@ -13,7 +13,6 @@ INSERT INTO table2 SELECT number * 2, number * 20 FROM numbers(11); INSERT INTO table3 SELECT number * 30, number * 300 FROM numbers(10); INSERT INTO table5 SELECT number * 5, number * 50, number * 500 FROM numbers(10); -SET allow_experimental_multiple_joins_emulation = 1; SET joined_subquery_requires_alias = 1; select t1.a, t2.b, t3.c from table1 as t1 join table2 as t2 on t1.a = t2.a join table3 as t3 on t2.b = t3.b; diff --git a/dbms/tests/queries/0_stateless/00826_cross_to_inner_join.sql b/dbms/tests/queries/0_stateless/00826_cross_to_inner_join.sql index e21d257d2da..618c0374a28 100644 --- a/dbms/tests/queries/0_stateless/00826_cross_to_inner_join.sql +++ b/dbms/tests/queries/0_stateless/00826_cross_to_inner_join.sql @@ -1,9 +1,6 @@ SET enable_debug_queries = 1; SET enable_optimize_predicate_expression = 0; -set allow_experimental_cross_to_join_conversion = 0; -select * from system.one l cross join system.one r; -set allow_experimental_cross_to_join_conversion = 1; select * from system.one l cross join system.one r; DROP TABLE IF EXISTS t1_00826; @@ -17,50 +14,21 @@ INSERT INTO t2_00826 values (1,1), (1,2); INSERT INTO t2_00826 (a) values (2), (3); SELECT 'cross'; -SET allow_experimental_cross_to_join_conversion = 0; -SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.a; -SET allow_experimental_cross_to_join_conversion = 1; SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.a; SELECT 'cross nullable'; -SET allow_experimental_cross_to_join_conversion = 0; -SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.b = t2_00826.b; -SET allow_experimental_cross_to_join_conversion = 1; SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.b = t2_00826.b; SELECT 'cross nullable vs not nullable'; -SET allow_experimental_cross_to_join_conversion = 0; -SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.b; -SET allow_experimental_cross_to_join_conversion = 1; SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.b; SELECT 'cross self'; -SET allow_experimental_cross_to_join_conversion = 0; -SELECT * FROM t1_00826 x cross join t1_00826 y where x.a = y.a and x.b = y.b; -SET allow_experimental_cross_to_join_conversion = 1; SELECT * FROM t1_00826 x cross join t1_00826 y where x.a = y.a and x.b = y.b; SELECT 'cross one table expr'; -SET allow_experimental_cross_to_join_conversion = 0; -SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t1_00826.b order by (t1_00826.a, t2_00826.a, t2_00826.b); -SET allow_experimental_cross_to_join_conversion = 1; SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t1_00826.b order by (t1_00826.a, t2_00826.a, t2_00826.b); SELECT 'cross multiple ands'; -SET allow_experimental_cross_to_join_conversion = 0; ---SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.a and t1_00826.a = t2_00826.a and t1_00826.b = t2_00826.b and t1_00826.a = t2_00826.a; -SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.a and t1_00826.b = t2_00826.b; -SET allow_experimental_cross_to_join_conversion = 1; SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.a and t1_00826.b = t2_00826.b; SELECT 'cross and inside and'; -SET allow_experimental_cross_to_join_conversion = 0; ---SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.a and (t1_00826.a = t2_00826.a and (t1_00826.a = t2_00826.a and t1_00826.b = t2_00826.b)); ---SELECT * FROM t1_00826 x cross join t2_00826 y where t1_00826.a = t2_00826.a and (t1_00826.b = t2_00826.b and (x.a = y.a and x.b = y.b)); -SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.a and (t1_00826.b = t2_00826.b and 1); -SET allow_experimental_cross_to_join_conversion = 1; SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.a and (t1_00826.b = t2_00826.b and 1); SELECT 'cross split conjunction'; -SET allow_experimental_cross_to_join_conversion = 0; SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.a and t1_00826.b = t2_00826.b and t1_00826.a >= 1 and t2_00826.b = 1; -SET allow_experimental_cross_to_join_conversion = 1; -SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.a and t1_00826.b = t2_00826.b and t1_00826.a >= 1 and t2_00826.b = 1; - -SET allow_experimental_cross_to_join_conversion = 1; SELECT 'comma'; SELECT * FROM t1_00826, t2_00826 where t1_00826.a = t2_00826.a; @@ -69,30 +37,22 @@ SELECT * FROM t1_00826, t2_00826 where t1_00826.b = t2_00826.b; SELECT 'cross'; -SET allow_experimental_cross_to_join_conversion = 0; ANALYZE SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.a; -SET allow_experimental_cross_to_join_conversion = 1; ANALYZE SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.a; +ANALYZE SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.a; SELECT 'cross nullable'; -SET allow_experimental_cross_to_join_conversion = 0; ANALYZE SELECT * FROM t1_00826, t2_00826 where t1_00826.a = t2_00826.a; -SET allow_experimental_cross_to_join_conversion = 1; ANALYZE SELECT * FROM t1_00826, t2_00826 where t1_00826.a = t2_00826.a; +ANALYZE SELECT * FROM t1_00826, t2_00826 where t1_00826.a = t2_00826.a; SELECT 'cross nullable vs not nullable'; -SET allow_experimental_cross_to_join_conversion = 0; ANALYZE SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.b; -SET allow_experimental_cross_to_join_conversion = 1; ANALYZE SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.b; +ANALYZE SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.b; SELECT 'cross self'; -SET allow_experimental_cross_to_join_conversion = 0; ANALYZE SELECT * FROM t1_00826 x cross join t1_00826 y where x.a = y.a and x.b = y.b; -SET allow_experimental_cross_to_join_conversion = 1; ANALYZE SELECT * FROM t1_00826 x cross join t1_00826 y where x.a = y.a and x.b = y.b; +ANALYZE SELECT * FROM t1_00826 x cross join t1_00826 y where x.a = y.a and x.b = y.b; SELECT 'cross one table expr'; -SET allow_experimental_cross_to_join_conversion = 0; ANALYZE SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t1_00826.b; -SET allow_experimental_cross_to_join_conversion = 1; ANALYZE SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t1_00826.b; +ANALYZE SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t1_00826.b; SELECT 'cross multiple ands'; -SET allow_experimental_cross_to_join_conversion = 0; ANALYZE SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.a and t1_00826.b = t2_00826.b; -SET allow_experimental_cross_to_join_conversion = 1; ANALYZE SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.a and t1_00826.b = t2_00826.b; +ANALYZE SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.a and t1_00826.b = t2_00826.b; SELECT 'cross and inside and'; -SET allow_experimental_cross_to_join_conversion = 0; ANALYZE SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.a and (t1_00826.a = t2_00826.a and (t1_00826.a = t2_00826.a and t1_00826.b = t2_00826.b)); -SET allow_experimental_cross_to_join_conversion = 1; ANALYZE SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.a and (t1_00826.a = t2_00826.a and (t1_00826.a = t2_00826.a and t1_00826.b = t2_00826.b)); +ANALYZE SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.a and (t1_00826.a = t2_00826.a and (t1_00826.a = t2_00826.a and t1_00826.b = t2_00826.b)); SELECT 'cross split conjunction'; -SET allow_experimental_cross_to_join_conversion = 0; ANALYZE SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.a and t1_00826.b = t2_00826.b and t1_00826.a >= 1 and t2_00826.b > 0; -SET allow_experimental_cross_to_join_conversion = 1; ANALYZE SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.a and t1_00826.b = t2_00826.b and t1_00826.a >= 1 and t2_00826.b > 0; +ANALYZE SELECT * FROM t1_00826 cross join t2_00826 where t1_00826.a = t2_00826.a and t1_00826.b = t2_00826.b and t1_00826.a >= 1 and t2_00826.b > 0; DROP TABLE t1_00826; DROP TABLE t2_00826; diff --git a/dbms/tests/queries/0_stateless/00836_indices_alter.sql b/dbms/tests/queries/0_stateless/00836_indices_alter.sql index e277e0e7bb4..c059c6210da 100644 --- a/dbms/tests/queries/0_stateless/00836_indices_alter.sql +++ b/dbms/tests/queries/0_stateless/00836_indices_alter.sql @@ -1,7 +1,6 @@ DROP TABLE IF EXISTS minmax_idx; DROP TABLE IF EXISTS minmax_idx2; -SET allow_experimental_data_skipping_indices = 1; CREATE TABLE minmax_idx ( diff --git a/dbms/tests/queries/0_stateless/00836_indices_alter_replicated_zookeeper.sql b/dbms/tests/queries/0_stateless/00836_indices_alter_replicated_zookeeper.sql index 4240348f7de..a08d6a20a87 100644 --- a/dbms/tests/queries/0_stateless/00836_indices_alter_replicated_zookeeper.sql +++ b/dbms/tests/queries/0_stateless/00836_indices_alter_replicated_zookeeper.sql @@ -3,7 +3,6 @@ DROP TABLE IF EXISTS test.minmax_idx_r; DROP TABLE IF EXISTS test.minmax_idx2; DROP TABLE IF EXISTS test.minmax_idx2_r; -SET allow_experimental_data_skipping_indices = 1; CREATE TABLE test.minmax_idx ( diff --git a/dbms/tests/queries/0_stateless/00837_minmax_index.sh b/dbms/tests/queries/0_stateless/00837_minmax_index.sh index 210e36603b5..75b1d8d9725 100755 --- a/dbms/tests/queries/0_stateless/00837_minmax_index.sh +++ b/dbms/tests/queries/0_stateless/00837_minmax_index.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -CLICKHOUSE_CLIENT_OPT="--allow_experimental_data_skipping_indices=1" CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) . $CURDIR/../shell_config.sh @@ -9,7 +8,6 @@ $CLICKHOUSE_CLIENT --query="DROP TABLE IF EXISTS minmax_idx;" $CLICKHOUSE_CLIENT -n --query=" -SET allow_experimental_data_skipping_indices = 1; CREATE TABLE minmax_idx ( u64 UInt64, diff --git a/dbms/tests/queries/0_stateless/00837_minmax_index_replicated_zookeeper.sql b/dbms/tests/queries/0_stateless/00837_minmax_index_replicated_zookeeper.sql index 6c4d2b95a8e..bd7f9d91694 100644 --- a/dbms/tests/queries/0_stateless/00837_minmax_index_replicated_zookeeper.sql +++ b/dbms/tests/queries/0_stateless/00837_minmax_index_replicated_zookeeper.sql @@ -1,7 +1,6 @@ DROP TABLE IF EXISTS minmax_idx1; DROP TABLE IF EXISTS minmax_idx2; -SET allow_experimental_data_skipping_indices = 1; CREATE TABLE minmax_idx1 ( diff --git a/dbms/tests/queries/0_stateless/00838_unique_index.sh b/dbms/tests/queries/0_stateless/00838_unique_index.sh index fbc265f7a6e..c2e288b7402 100755 --- a/dbms/tests/queries/0_stateless/00838_unique_index.sh +++ b/dbms/tests/queries/0_stateless/00838_unique_index.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -CLICKHOUSE_CLIENT_OPT="--allow_experimental_data_skipping_indices=1" CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) . $CURDIR/../shell_config.sh @@ -8,7 +7,6 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) $CLICKHOUSE_CLIENT --query="DROP TABLE IF EXISTS set_idx;" $CLICKHOUSE_CLIENT -n --query=" -SET allow_experimental_data_skipping_indices = 1; CREATE TABLE set_idx ( u64 UInt64, diff --git a/dbms/tests/queries/0_stateless/00855_join_with_array_join.sql b/dbms/tests/queries/0_stateless/00855_join_with_array_join.sql index 2170e0a67d3..10b03fec062 100644 --- a/dbms/tests/queries/0_stateless/00855_join_with_array_join.sql +++ b/dbms/tests/queries/0_stateless/00855_join_with_array_join.sql @@ -1,13 +1,5 @@ SET joined_subquery_requires_alias = 0; -set allow_experimental_multiple_joins_emulation = 0; -set allow_experimental_cross_to_join_conversion = 0; -select ax, c from (select [1,2] ax, 0 c) array join ax join (select 0 c) using(c); -select ax, c from (select [3,4] ax, 0 c) join (select 0 c) using(c) array join ax; -select ax, c from (select [5,6] ax, 0 c) s1 join system.one s2 ON s1.c = s2.dummy array join ax; - -set allow_experimental_multiple_joins_emulation = 1; -set allow_experimental_cross_to_join_conversion = 1; select ax, c from (select [1,2] ax, 0 c) array join ax join (select 0 c) using(c); select ax, c from (select [3,4] ax, 0 c) join (select 0 c) using(c) array join ax; select ax, c from (select [5,6] ax, 0 c) s1 join system.one s2 ON s1.c = s2.dummy array join ax; diff --git a/dbms/tests/queries/0_stateless/00907_set_index_max_rows.sh b/dbms/tests/queries/0_stateless/00907_set_index_max_rows.sh index 98c0086488d..d32b4c22e04 100755 --- a/dbms/tests/queries/0_stateless/00907_set_index_max_rows.sh +++ b/dbms/tests/queries/0_stateless/00907_set_index_max_rows.sh @@ -6,7 +6,6 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) $CLICKHOUSE_CLIENT --query="DROP TABLE IF EXISTS set_idx;" $CLICKHOUSE_CLIENT -n --query=" -SET allow_experimental_data_skipping_indices = 1; CREATE TABLE set_idx ( u64 UInt64, diff --git a/dbms/tests/queries/0_stateless/00907_set_index_with_nullable_and_low_cardinality.sql b/dbms/tests/queries/0_stateless/00907_set_index_with_nullable_and_low_cardinality.sql index 21bbbf1e6e9..9ef5662c112 100644 --- a/dbms/tests/queries/0_stateless/00907_set_index_with_nullable_and_low_cardinality.sql +++ b/dbms/tests/queries/0_stateless/00907_set_index_with_nullable_and_low_cardinality.sql @@ -1,4 +1,3 @@ -SET allow_experimental_data_skipping_indices=1; drop table if exists nullable_set_index; create table nullable_set_index (a UInt64, b Nullable(String), INDEX b_index b TYPE set(0) GRANULARITY 8192) engine = MergeTree order by a; diff --git a/dbms/tests/queries/0_stateless/00907_set_index_with_nullable_and_low_cardinality_bug.sql b/dbms/tests/queries/0_stateless/00907_set_index_with_nullable_and_low_cardinality_bug.sql index 6af826163a3..75e0e482566 100644 --- a/dbms/tests/queries/0_stateless/00907_set_index_with_nullable_and_low_cardinality_bug.sql +++ b/dbms/tests/queries/0_stateless/00907_set_index_with_nullable_and_low_cardinality_bug.sql @@ -1,4 +1,3 @@ -SET allow_experimental_data_skipping_indices=1; drop table if exists null_lc_set_index; diff --git a/dbms/tests/queries/0_stateless/00908_bloom_filter_index.sh b/dbms/tests/queries/0_stateless/00908_bloom_filter_index.sh index bc3ae763c41..3fa0a483610 100755 --- a/dbms/tests/queries/0_stateless/00908_bloom_filter_index.sh +++ b/dbms/tests/queries/0_stateless/00908_bloom_filter_index.sh @@ -10,7 +10,6 @@ $CLICKHOUSE_CLIENT --query="DROP TABLE IF EXISTS bloom_filter_idx2;" # NGRAM BF $CLICKHOUSE_CLIENT -n --query=" -SET allow_experimental_data_skipping_indices = 1; CREATE TABLE bloom_filter_idx ( k UInt64, @@ -21,7 +20,6 @@ ORDER BY k SETTINGS index_granularity = 2;" $CLICKHOUSE_CLIENT -n --query=" -SET allow_experimental_data_skipping_indices = 1; CREATE TABLE bloom_filter_idx2 ( k UInt64, @@ -105,7 +103,6 @@ $CLICKHOUSE_CLIENT --query="SELECT * FROM bloom_filter_idx WHERE (s, lower(s)) I # TOKEN BF $CLICKHOUSE_CLIENT -n --query=" -SET allow_experimental_data_skipping_indices = 1; CREATE TABLE bloom_filter_idx3 ( k UInt64, @@ -144,7 +141,6 @@ $CLICKHOUSE_CLIENT --query="DROP TABLE bloom_filter_idx3" $CLICKHOUSE_CLIENT --query="DROP TABLE IF EXISTS bloom_filter_idx_na;" $CLICKHOUSE_CLIENT -n --query=" -SET allow_experimental_data_skipping_indices = 1; CREATE TABLE bloom_filter_idx_na ( na Array(Array(String)), diff --git a/dbms/tests/queries/0_stateless/00942_mutate_index.sh b/dbms/tests/queries/0_stateless/00942_mutate_index.sh index 467eb9ab671..30ac7e8821b 100755 --- a/dbms/tests/queries/0_stateless/00942_mutate_index.sh +++ b/dbms/tests/queries/0_stateless/00942_mutate_index.sh @@ -8,7 +8,6 @@ $CLICKHOUSE_CLIENT --query="DROP TABLE IF EXISTS test.minmax_idx;" $CLICKHOUSE_CLIENT -n --query=" -SET allow_experimental_data_skipping_indices=1; CREATE TABLE test.minmax_idx ( u64 UInt64, diff --git a/dbms/tests/queries/0_stateless/00943_materialize_index.sh b/dbms/tests/queries/0_stateless/00943_materialize_index.sh index bc59b41b005..b406f3894eb 100755 --- a/dbms/tests/queries/0_stateless/00943_materialize_index.sh +++ b/dbms/tests/queries/0_stateless/00943_materialize_index.sh @@ -35,7 +35,6 @@ $CLICKHOUSE_CLIENT --query="SELECT count() FROM test.minmax_idx WHERE i64 = 2;" $CLICKHOUSE_CLIENT --query="SELECT count() FROM test.minmax_idx WHERE i64 = 2 FORMAT JSON" | grep "rows_read" $CLICKHOUSE_CLIENT -n --query=" -SET allow_experimental_data_skipping_indices=1; ALTER TABLE test.minmax_idx ADD INDEX idx (i64, u64 * i64) TYPE minmax GRANULARITY 1;" $CLICKHOUSE_CLIENT --query="ALTER TABLE test.minmax_idx MATERIALIZE INDEX idx IN PARTITION 1;" diff --git a/dbms/tests/queries/0_stateless/00944_clear_index_in_partition.sh b/dbms/tests/queries/0_stateless/00944_clear_index_in_partition.sh index 74f15e63545..5cdf4c4bbfd 100755 --- a/dbms/tests/queries/0_stateless/00944_clear_index_in_partition.sh +++ b/dbms/tests/queries/0_stateless/00944_clear_index_in_partition.sh @@ -8,7 +8,6 @@ $CLICKHOUSE_CLIENT --query="DROP TABLE IF EXISTS test.minmax_idx;" $CLICKHOUSE_CLIENT -n --query=" -SET allow_experimental_data_skipping_indices=1; CREATE TABLE test.minmax_idx ( u64 UInt64, diff --git a/dbms/tests/queries/0_stateless/00944_create_bloom_filter_index_with_merge_tree.sh b/dbms/tests/queries/0_stateless/00944_create_bloom_filter_index_with_merge_tree.sh index 52246b50b7a..c0fee503f08 100755 --- a/dbms/tests/queries/0_stateless/00944_create_bloom_filter_index_with_merge_tree.sh +++ b/dbms/tests/queries/0_stateless/00944_create_bloom_filter_index_with_merge_tree.sh @@ -8,5 +8,5 @@ set -e for sequence in 1 10 100 1000 10000 100000 1000000 10000000 100000000 1000000000; do \ rate=`echo "1 $sequence" | awk '{printf("%0.9f\n",$1/$2)}'` $CLICKHOUSE_CLIENT --query="DROP TABLE IF EXISTS test.bloom_filter_idx"; -$CLICKHOUSE_CLIENT --allow_experimental_data_skipping_indices=1 --query="CREATE TABLE test.bloom_filter_idx ( u64 UInt64, i32 Int32, f64 Float64, d Decimal(10, 2), s String, e Enum8('a' = 1, 'b' = 2, 'c' = 3), dt Date, INDEX bloom_filter_a i32 TYPE bloom_filter($rate) GRANULARITY 1 ) ENGINE = MergeTree() ORDER BY u64 SETTINGS index_granularity = 8192" +$CLICKHOUSE_CLIENT --query="CREATE TABLE test.bloom_filter_idx ( u64 UInt64, i32 Int32, f64 Float64, d Decimal(10, 2), s String, e Enum8('a' = 1, 'b' = 2, 'c' = 3), dt Date, INDEX bloom_filter_a i32 TYPE bloom_filter($rate) GRANULARITY 1 ) ENGINE = MergeTree() ORDER BY u64 SETTINGS index_granularity = 8192" done diff --git a/dbms/tests/queries/0_stateless/00944_minmax_null.sql b/dbms/tests/queries/0_stateless/00944_minmax_null.sql index ad3cf5f5c61..01b86775481 100644 --- a/dbms/tests/queries/0_stateless/00944_minmax_null.sql +++ b/dbms/tests/queries/0_stateless/00944_minmax_null.sql @@ -1,5 +1,4 @@ DROP TABLE IF EXISTS min_max_with_nullable_string; -SET allow_experimental_data_skipping_indices = 1; CREATE TABLE min_max_with_nullable_string ( t DateTime, diff --git a/dbms/tests/queries/0_stateless/00945_bloom_filter_index.sql b/dbms/tests/queries/0_stateless/00945_bloom_filter_index.sql index 268574a609f..05a75339ee8 100755 --- a/dbms/tests/queries/0_stateless/00945_bloom_filter_index.sql +++ b/dbms/tests/queries/0_stateless/00945_bloom_filter_index.sql @@ -1,4 +1,3 @@ -SET allow_experimental_data_skipping_indices = 1; DROP TABLE IF EXISTS test.single_column_bloom_filter; diff --git a/dbms/tests/queries/0_stateless/00955_test_final_mark.sql b/dbms/tests/queries/0_stateless/00955_test_final_mark.sql index ff712b829cd..d58bdec7472 100644 --- a/dbms/tests/queries/0_stateless/00955_test_final_mark.sql +++ b/dbms/tests/queries/0_stateless/00955_test_final_mark.sql @@ -1,5 +1,4 @@ SET send_logs_level = 'none'; -SET allow_experimental_data_skipping_indices = 1; DROP TABLE IF EXISTS mt_with_pk; diff --git a/dbms/tests/queries/0_stateless/00964_bloom_index_string_functions.sh b/dbms/tests/queries/0_stateless/00964_bloom_index_string_functions.sh index 28120e782c1..ef35b3a7ff6 100755 --- a/dbms/tests/queries/0_stateless/00964_bloom_index_string_functions.sh +++ b/dbms/tests/queries/0_stateless/00964_bloom_index_string_functions.sh @@ -7,7 +7,6 @@ $CLICKHOUSE_CLIENT --query="DROP TABLE IF EXISTS bloom_filter_idx;" # NGRAM BF $CLICKHOUSE_CLIENT -n --query=" -SET allow_experimental_data_skipping_indices = 1; CREATE TABLE bloom_filter_idx ( k UInt64, diff --git a/dbms/tests/queries/0_stateless/00965_set_index_string_functions.sh b/dbms/tests/queries/0_stateless/00965_set_index_string_functions.sh index 056915c0e7c..c064f680715 100755 --- a/dbms/tests/queries/0_stateless/00965_set_index_string_functions.sh +++ b/dbms/tests/queries/0_stateless/00965_set_index_string_functions.sh @@ -6,7 +6,6 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) $CLICKHOUSE_CLIENT --query="DROP TABLE IF EXISTS set_idx;" $CLICKHOUSE_CLIENT -n --query=" -SET allow_experimental_data_skipping_indices = 1; CREATE TABLE set_idx ( k UInt64, diff --git a/dbms/tests/queries/0_stateless/00974_adaptive_granularity_secondary_index.sql b/dbms/tests/queries/0_stateless/00974_adaptive_granularity_secondary_index.sql index 328ec86f060..567bf3cf58d 100644 --- a/dbms/tests/queries/0_stateless/00974_adaptive_granularity_secondary_index.sql +++ b/dbms/tests/queries/0_stateless/00974_adaptive_granularity_secondary_index.sql @@ -1,4 +1,3 @@ -SET allow_experimental_data_skipping_indices = 1; DROP TABLE IF EXISTS indexed_table; diff --git a/dbms/tests/queries/0_stateless/00975_indices_mutation_replicated_zookeeper.sh b/dbms/tests/queries/0_stateless/00975_indices_mutation_replicated_zookeeper.sh index 765dfb6abe5..c6e16fc5148 100755 --- a/dbms/tests/queries/0_stateless/00975_indices_mutation_replicated_zookeeper.sh +++ b/dbms/tests/queries/0_stateless/00975_indices_mutation_replicated_zookeeper.sh @@ -9,7 +9,6 @@ $CLICKHOUSE_CLIENT --query="DROP TABLE IF EXISTS test.indices_mutaions2;" $CLICKHOUSE_CLIENT -n --query=" -SET allow_experimental_data_skipping_indices=1; CREATE TABLE test.indices_mutaions1 ( u64 UInt64, diff --git a/dbms/tests/queries/0_stateless/00979_set_index_not.sql b/dbms/tests/queries/0_stateless/00979_set_index_not.sql index 6b34457e575..fd8f9ce2f73 100644 --- a/dbms/tests/queries/0_stateless/00979_set_index_not.sql +++ b/dbms/tests/queries/0_stateless/00979_set_index_not.sql @@ -1,4 +1,3 @@ -SET allow_experimental_data_skipping_indices = 1; DROP TABLE IF EXISTS test.set_index_not; diff --git a/dbms/tests/queries/0_stateless/00990_hasToken_and_tokenbf.sql b/dbms/tests/queries/0_stateless/00990_hasToken_and_tokenbf.sql index 60e4d959417..ad50420b6ae 100644 --- a/dbms/tests/queries/0_stateless/00990_hasToken_and_tokenbf.sql +++ b/dbms/tests/queries/0_stateless/00990_hasToken_and_tokenbf.sql @@ -1,4 +1,3 @@ -SET allow_experimental_data_skipping_indices = 1; DROP TABLE IF EXISTS bloom_filter; diff --git a/dbms/tests/queries/0_stateless/00997_set_index_array.sql b/dbms/tests/queries/0_stateless/00997_set_index_array.sql index c57507ce22d..1692bbb2055 100644 --- a/dbms/tests/queries/0_stateless/00997_set_index_array.sql +++ b/dbms/tests/queries/0_stateless/00997_set_index_array.sql @@ -1,4 +1,3 @@ -SET allow_experimental_data_skipping_indices = 1; DROP TABLE IF EXISTS test.set_array; diff --git a/dbms/tests/queries/0_stateless/00999_test_skip_indices_with_alter_and_merge.sql b/dbms/tests/queries/0_stateless/00999_test_skip_indices_with_alter_and_merge.sql index 55b2f21dc32..596e0d9cbcb 100644 --- a/dbms/tests/queries/0_stateless/00999_test_skip_indices_with_alter_and_merge.sql +++ b/dbms/tests/queries/0_stateless/00999_test_skip_indices_with_alter_and_merge.sql @@ -1,4 +1,3 @@ -SET allow_experimental_data_skipping_indices=1; DROP TABLE IF EXISTS test_vertical_merge; CREATE TABLE test_vertical_merge ( diff --git a/dbms/tests/queries/0_stateless/01000_bad_size_of_marks_skip_idx.sql b/dbms/tests/queries/0_stateless/01000_bad_size_of_marks_skip_idx.sql index 7af19fec695..10464ca5eaf 100644 --- a/dbms/tests/queries/0_stateless/01000_bad_size_of_marks_skip_idx.sql +++ b/dbms/tests/queries/0_stateless/01000_bad_size_of_marks_skip_idx.sql @@ -1,4 +1,3 @@ -SET allow_experimental_data_skipping_indices=1; DROP TABLE IF EXISTS bad_skip_idx; diff --git a/dbms/tests/queries/0_stateless/01011_test_create_as_skip_indices.sql b/dbms/tests/queries/0_stateless/01011_test_create_as_skip_indices.sql index b702fc3654c..9ac9e2d0a70 100644 --- a/dbms/tests/queries/0_stateless/01011_test_create_as_skip_indices.sql +++ b/dbms/tests/queries/0_stateless/01011_test_create_as_skip_indices.sql @@ -1,4 +1,3 @@ -SET allow_experimental_data_skipping_indices=1; CREATE TABLE foo (key int, INDEX i1 key TYPE minmax GRANULARITY 1) Engine=MergeTree() ORDER BY key; CREATE TABLE as_foo AS foo; CREATE TABLE dist (key int, INDEX i1 key TYPE minmax GRANULARITY 1) Engine=Distributed(test_shard_localhost, currentDatabase(), 'foo'); -- { serverError 36 }