Better exception for unsupported full_text index with non-full parts

This commit is contained in:
vdimir 2024-08-29 12:23:45 +00:00
parent 674cddc969
commit 538ebe2309
No known key found for this signature in database
GPG Key ID: 6EE4CE2BEDC51862

View File

@ -24,6 +24,7 @@ namespace ErrorCodes
{
extern const int LOGICAL_ERROR;
extern const int UNKNOWN_FORMAT_VERSION;
extern const int NOT_IMPLEMENTED;
};
GinIndexPostingsBuilder::GinIndexPostingsBuilder(UInt64 limit)
@ -153,13 +154,18 @@ GinIndexStore::GinIndexStore(const String & name_, DataPartStoragePtr storage_)
: name(name_)
, storage(storage_)
{
if (storage->getType() != MergeTreeDataPartStorageType::Full)
throw Exception(ErrorCodes::NOT_IMPLEMENTED, "INDEX {} with 'full_text' type supports only full storage", name);
}
GinIndexStore::GinIndexStore(const String & name_, DataPartStoragePtr storage_, MutableDataPartStoragePtr data_part_storage_builder_, UInt64 max_digestion_size_)
: name(name_)
, storage(storage_)
, data_part_storage_builder(data_part_storage_builder_)
, max_digestion_size(max_digestion_size_)
{
if (storage->getType() != MergeTreeDataPartStorageType::Full)
throw Exception(ErrorCodes::NOT_IMPLEMENTED, "INDEX {} with 'full_text' type supports only full storage", name);
}
bool GinIndexStore::exists() const