Fix test_system_merges by using mutations_sync=1

After early_constant_folding started to ignore not only ignore(), but
all functions with isSuitableForConstantFolding() == false, there became
more sleep(2) calls for this test:
- MergeTreeDataSelectExecutor::readFromParts -> DB::KeyCondition::KeyCondition
- MergeTreeDataMergerMutator::mutatePartToTemporaryPart -> DB::isStorageTouchedByMutations -> FilterTransform::transform
- MergeTreeDataMergerMutator::mutatePartToTemporaryPart -> DB::MergeTreeDataMergerMutator::mutateAllPartColumns -> FilterTransform::transform

While before it was optimized to 0 during WHERE analysis.
This commit is contained in:
Azat Khuzhin 2021-02-11 22:21:46 +03:00
parent 222a0db3f4
commit 3993ad6f01

View File

@ -134,7 +134,9 @@ def test_mutation_simple(started_cluster, replicated):
result_part = "all_{}_{}_0_{}".format(starting_block, starting_block, starting_block + 1)
def alter():
node1.query("ALTER TABLE {name} UPDATE a = 42 WHERE sleep(2) OR 1".format(name=name))
node1.query("ALTER TABLE {name} UPDATE a = 42 WHERE sleep(2) OR 1".format(name=name), settings={
'mutations_sync': 1,
})
t = threading.Thread(target=alter)
t.start()
@ -159,8 +161,6 @@ def test_mutation_simple(started_cluster, replicated):
]
t.join()
time.sleep(1.5)
assert node_check.query("SELECT * FROM system.merges WHERE table = '{name}'".format(name=table_name)) == ""
finally: