Merge pull request #60227 from ClickHouse/fix-clone-ast-for-rename

Fix: IAST::clone() for RENAME
This commit is contained in:
Igor Nikonov 2024-02-23 14:48:14 +01:00 committed by GitHub
commit 90b1f8544a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 11 additions and 3 deletions

View File

@ -35,6 +35,11 @@ public:
tryGetIdentifierNameInto(table, name);
return name;
}
Table clone() const
{
return Table{.database = database->clone(), .table = table->clone()};
}
};
struct Element
@ -61,6 +66,11 @@ public:
{
auto res = std::make_shared<ASTRenameQuery>(*this);
cloneOutputOptions(*res);
for (auto & element : res->elements)
{
element.from = element.from.clone();
element.to = element.to.clone();
}
return res;
}

View File

@ -7,7 +7,6 @@
#include <Common/ConcurrencyControl.h>
#include <queue>
#include <mutex>
#include <memory>

View File

@ -11,7 +11,6 @@
#include <Common/Stopwatch.h>
#include <mutex>
#include <optional>
namespace DB

View File

@ -32,7 +32,7 @@ class HTTPHandler : public HTTPRequestHandler
{
public:
HTTPHandler(IServer & server_, const std::string & name, const std::optional<String> & content_type_override_);
virtual ~HTTPHandler() override;
~HTTPHandler() override;
void handleRequest(HTTPServerRequest & request, HTTPServerResponse & response, const ProfileEvents::Event & write_event) override;