Merge branch 'master' into new-nav

This commit is contained in:
Rich Raposa 2023-03-16 21:26:16 -06:00 committed by GitHub
commit 9b3e0a7b47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 0 deletions

View File

@ -46,6 +46,10 @@ void MergeTreeDataPartChecksum::checkEqual(const MergeTreeDataPartChecksum & rhs
void MergeTreeDataPartChecksum::checkSize(const IDataPartStorage & storage, const String & name) const void MergeTreeDataPartChecksum::checkSize(const IDataPartStorage & storage, const String & name) const
{ {
/// Skip inverted index files, these have a default MergeTreeDataPartChecksum with file_size == 0
if (name.ends_with(".gin_dict") || name.ends_with(".gin_post") || name.ends_with(".gin_seg") || name.ends_with(".gin_sid"))
return;
if (!storage.exists(name)) if (!storage.exists(name))
throw Exception(ErrorCodes::FILE_DOESNT_EXIST, "{} doesn't exist", fs::path(storage.getRelativePath()) / name); throw Exception(ErrorCodes::FILE_DOESNT_EXIST, "{} doesn't exist", fs::path(storage.getRelativePath()) / name);

View File

@ -0,0 +1,16 @@
SET allow_experimental_inverted_index = 1;
CREATE TABLE t
(
`key` UInt64,
`str` String,
INDEX inv_idx str TYPE inverted(0) GRANULARITY 1
)
ENGINE = MergeTree
ORDER BY key;
INSERT INTO t VALUES (1, 'Hello World');
ALTER TABLE t DETACH PART 'all_1_1_0';
ALTER TABLE t ATTACH PART 'all_1_1_0';