From 7f69df63fdd80d43d1eb0a9be5d7fc17101b04af Mon Sep 17 00:00:00 2001 From: Nikita Taranov Date: Thu, 8 Aug 2024 15:00:34 +0100 Subject: [PATCH] small opt --- src/Interpreters/HashJoin/HashJoin.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Interpreters/HashJoin/HashJoin.h b/src/Interpreters/HashJoin/HashJoin.h index 45e6a739a5d..a25e6b6fb7c 100644 --- a/src/Interpreters/HashJoin/HashJoin.h +++ b/src/Interpreters/HashJoin/HashJoin.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include #include @@ -205,6 +206,10 @@ public: void filterBySelector() { chassert(block); + + if (!wasScattered()) + return; + auto columns = block.getColumns(); for (auto & col : columns) {