Merge pull request #52754 from ClickHouse/analyzer-set-index-not

Analyzer: fix 00979_set_index_not.sql
This commit is contained in:
Alexey Milovidov 2023-07-31 12:13:59 +03:00 committed by GitHub
commit bd3af7ebe6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 2 deletions

View File

@ -457,8 +457,11 @@ const ActionsDAG::Node * MergeTreeIndexConditionSet::operatorFromDAG(const Actio
if (arguments_size != 1)
return nullptr;
auto bit_wrapper_function = FunctionFactory::instance().get("__bitWrapperFunc", context);
const auto & bit_wrapper_func_node = result_dag->addFunction(bit_wrapper_function, {arguments[0]}, {});
auto bit_swap_last_two_function = FunctionFactory::instance().get("__bitSwapLastTwo", context);
return &result_dag->addFunction(bit_swap_last_two_function, {arguments[0]}, {});
return &result_dag->addFunction(bit_swap_last_two_function, {&bit_wrapper_func_node}, {});
}
else if (function_name == "and" || function_name == "indexHint" || function_name == "or")
{

View File

@ -11,7 +11,6 @@
00927_asof_joins
00940_order_by_read_in_order_query_plan
00945_bloom_filter_index
00979_set_index_not
00981_in_subquery_with_tuple
01049_join_low_card_bug_long
01062_pm_all_join_with_block_continuation

View File

@ -1,2 +1,4 @@
Jon alive
Jon alive
Ramsey rip
Ramsey rip

View File

@ -11,5 +11,7 @@ insert into set_index_not values ('Jon','alive'),('Ramsey','rip');
select * from set_index_not where status!='rip';
select * from set_index_not where NOT (status ='rip');
select * from set_index_not where NOT (status!='rip');
select * from set_index_not where NOT (NOT (status ='rip'));
DROP TABLE set_index_not;