mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-04 21:42:39 +00:00
fixed an edge case that index column has no data
This commit is contained in:
parent
da93210cc6
commit
64f807f31a
@ -403,7 +403,7 @@ GinIndexStorePtr GinIndexStoreFactory::get(const String& name, DataPartStoragePt
|
||||
GinIndexStorePtr store = std::make_shared<GinIndexStore>(name);
|
||||
store->SetStorage(storage_);
|
||||
if (!store->exists())
|
||||
throw Exception("Index '" + name + "' does not exist", ErrorCodes::LOGICAL_ERROR);
|
||||
return nullptr; //gin index was not generated for the part due to no data or the length of column data is less than ngramsize
|
||||
|
||||
GinIndexStoreReader reader(store);
|
||||
reader.readSegments();
|
||||
|
@ -1739,7 +1739,7 @@ MarkRanges MergeTreeDataSelectExecutor::filterMarksUsingIndex(
|
||||
if (!gin_filter_condition)
|
||||
result = condition->mayBeTrueOnGranule(granule);
|
||||
else
|
||||
result = gin_filter_condition->mayBeTrueOnGranuleInPart(granule, cache_in_store);
|
||||
result = cache_in_store.store ? gin_filter_condition->mayBeTrueOnGranuleInPart(granule, cache_in_store) : true;
|
||||
|
||||
if (!result)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user