You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
feat(ddl,partitions): better partition-related commands logging
This commit is contained in:
@ -863,6 +863,32 @@ bool from_string(T& t, const std::string& s, std::ios_base& (*f)(std::ios_base&)
|
||||
return !(iss >> f >> t).fail();
|
||||
}
|
||||
|
||||
class FormatStatementString
|
||||
{
|
||||
public:
|
||||
FormatStatementString() = default;
|
||||
~FormatStatementString() = default;
|
||||
|
||||
std::string formatStatementString(const std::string& cmd, const std::string& schema,
|
||||
const std::string& table,
|
||||
const std::set<BRM::LogicalPartition>& partitions)
|
||||
{
|
||||
std::ostringstream stmt;
|
||||
stmt << cmd << "(" << schema << "," << table << ",";
|
||||
|
||||
// There must be at least one partition to drop.
|
||||
for (auto& p : partitions)
|
||||
{
|
||||
stmt << p << ",";
|
||||
}
|
||||
|
||||
auto res = stmt.str();
|
||||
res.back() = ')';
|
||||
|
||||
return res;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace ddlpackageprocessor
|
||||
|
||||
#undef EXPORT
|
||||
|
Reference in New Issue
Block a user