From ff13752d01019ec1327f810ff4ad7f24a7abd710 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sun, 2 Sep 2018 06:47:14 +0300 Subject: [PATCH] Addition to prev. revision [#CLICKHOUSE-2] --- dbms/src/Interpreters/Set.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dbms/src/Interpreters/Set.cpp b/dbms/src/Interpreters/Set.cpp index 9bc5d697b42..be70380f3e1 100644 --- a/dbms/src/Interpreters/Set.cpp +++ b/dbms/src/Interpreters/Set.cpp @@ -317,6 +317,9 @@ ColumnPtr Set::execute(const Block & block, bool negative) const ColumnUInt8::Container & vec_res = res->getData(); vec_res.resize(block.safeGetByPosition(0).column->size()); + if (vec_res.empty()) + return res; + std::shared_lock lock(rwlock); /// If the set is empty.