Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/Common/ClickHouseVersion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ ClickHouseVersion::ClickHouseVersion(std::string_view version)

for (const auto & split_element : split)
{
if (split_element == "altinityantalya")
{
/// version like '26.3.1.20001.altinityantalya'
if (components.size() != 4 || split.size() != 5)
throw Exception{ErrorCodes::BAD_ARGUMENTS, "Cannot parse ClickHouse version here: {}", version};
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd drop the word here, otherwise LGTM

is_antalya = true;
continue;
}
size_t component;
ReadBufferFromString buf(split_element);
if (!tryReadIntText(component, buf) || !buf.eof())
Expand All @@ -35,7 +43,10 @@ ClickHouseVersion::ClickHouseVersion(std::string_view version)

String ClickHouseVersion::toString() const
{
return fmt::format("{}", fmt::join(components, "."));
auto res = fmt::format("{}", fmt::join(components, "."));
if (is_antalya)
res += ".altinityantalya";
return res;
}

}
1 change: 1 addition & 0 deletions src/Common/ClickHouseVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class ClickHouseVersion

private:
std::vector<size_t> components;
bool is_antalya = false;
};

}
Loading