From bb56af0e2b80dad8bb6b3dedbb173b1fa0cd34e2 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Sun, 22 Jan 2023 15:31:04 +0100 Subject: [PATCH] MergeTreeIndexGin crash fix --- src/Storages/MergeTree/MergeTreeIndexInverted.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Storages/MergeTree/MergeTreeIndexInverted.cpp b/src/Storages/MergeTree/MergeTreeIndexInverted.cpp index 02222aa530c..fa49f53c765 100644 --- a/src/Storages/MergeTree/MergeTreeIndexInverted.cpp +++ b/src/Storages/MergeTree/MergeTreeIndexInverted.cpp @@ -655,7 +655,7 @@ bool MergeTreeConditionInverted::tryPrepareSetGinFilter( return false; ConstSetPtr prepared_set = rhs.tryGetPreparedSet(); - if (!prepared_set && !prepared_set->hasExplicitSetElements()) + if (!prepared_set || !prepared_set->hasExplicitSetElements()) return false; for (const auto & data_type : prepared_set->getDataTypes())