Fix some tests.

This commit is contained in:
Nikolai Kochetov 2021-06-22 18:52:14 +03:00
parent a45e3d2e4a
commit a45290bfb3
2 changed files with 4 additions and 1 deletions

View File

@ -683,7 +683,7 @@ static const ActionsDAG::Node & cloneASTWithInversionPushDown(
return arg;
}
if (isLogicalOperator(name))
if (isLogicalOperator(name) && need_inversion)
{
ActionsDAG::NodeRawConstPtrs children(node.children);
@ -869,6 +869,8 @@ KeyCondition::KeyCondition(
{
auto inverted_dag = cloneASTWithInversionPushDown(std::move(dag_nodes.nodes), context);
// std::cerr << "========== inverted dag: " << inverted_dag->dumpDAG() << std::endl;
Block empty;
for (const auto * node : inverted_dag->getIndex())
traverseAST(Tree(node), context, empty);

View File

@ -9,6 +9,7 @@ SET max_block_size = 1000000;
INSERT INTO mt_00160 (x) SELECT number AS x FROM system.numbers LIMIT 100000;
SELECT *, b FROM mt_00160 WHERE x IN (12345, 67890) AND NOT ignore(blockSize() < 10 AS b) ORDER BY x;
SET query_plan_optimize_primary_key = 0; -- Need separate query plan step for merge
SELECT *, b FROM merge_00160 WHERE x IN (12345, 67890) AND NOT ignore(blockSize() < 10 AS b) ORDER BY x;
DROP TABLE merge_00160;