From cb2484939613238a450a3370cc29c75d0c295edf Mon Sep 17 00:00:00 2001 From: Konstantin Bogdanov Date: Wed, 18 Sep 2024 15:24:48 +0200 Subject: [PATCH] Move assert --- src/Interpreters/HashJoin/HashJoin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Interpreters/HashJoin/HashJoin.cpp b/src/Interpreters/HashJoin/HashJoin.cpp index dfc41a93417..d1fa1280ed8 100644 --- a/src/Interpreters/HashJoin/HashJoin.cpp +++ b/src/Interpreters/HashJoin/HashJoin.cpp @@ -692,12 +692,12 @@ void HashJoin::shrinkStoredBlocksToFit(size_t & total_bytes_in_join, bool force_ for (auto & stored_block : data->blocks) { + doDebugAsserts(); + size_t old_size = stored_block.allocatedBytes(); stored_block = stored_block.shrinkToFit(); size_t new_size = stored_block.allocatedBytes(); - doDebugAsserts(); - if (old_size >= new_size) { if (data->blocks_allocated_size < old_size - new_size)