mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-30 19:42:00 +00:00
Make version enum private
This commit is contained in:
parent
0653f86de9
commit
be936b257c
@ -225,7 +225,7 @@ UInt32 GinIndexStore::getNumOfSegments()
|
||||
uint8_t version = 0;
|
||||
readBinary(version, *istr);
|
||||
|
||||
if (version > CURRENT_GIN_FILE_FORMAT_VERSION)
|
||||
if (version > static_cast<std::underlying_type_t<Format>>(CURRENT_GIN_FILE_FORMAT_VERSION))
|
||||
throw Exception(ErrorCodes::UNKNOWN_FORMAT_VERSION, "Unsupported inverted index version {}", version);
|
||||
|
||||
readVarUInt(result, *istr);
|
||||
|
@ -34,13 +34,6 @@
|
||||
|
||||
namespace DB
|
||||
{
|
||||
enum : uint8_t
|
||||
{
|
||||
GIN_VERSION_0 = 0,
|
||||
GIN_VERSION_1 = 1, /// Initial version
|
||||
};
|
||||
|
||||
static constexpr auto CURRENT_GIN_FILE_FORMAT_VERSION = GIN_VERSION_1;
|
||||
|
||||
/// GinIndexPostingsList which uses 32-bit Roaring
|
||||
using GinIndexPostingsList = roaring::Roaring;
|
||||
@ -217,6 +210,14 @@ private:
|
||||
static constexpr auto GIN_SEGMENT_FILE_TYPE = ".gin_seg";
|
||||
static constexpr auto GIN_DICTIONARY_FILE_TYPE = ".gin_dict";
|
||||
static constexpr auto GIN_POSTINGS_FILE_TYPE = ".gin_post";
|
||||
|
||||
enum class Format : uint8_t
|
||||
{
|
||||
v0 = 0,
|
||||
v1 = 1, /// Initial version
|
||||
};
|
||||
|
||||
static constexpr auto CURRENT_GIN_FILE_FORMAT_VERSION = Format::v0;
|
||||
};
|
||||
|
||||
using GinIndexStorePtr = std::shared_ptr<GinIndexStore>;
|
||||
|
Loading…
Reference in New Issue
Block a user