2012-07-31 19:08:49 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <DB/Parsers/IAST.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
/** OPTIMIZE запрос
|
|
|
|
*/
|
|
|
|
class ASTOptimizeQuery : public IAST
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
String database;
|
|
|
|
String table;
|
|
|
|
|
2014-12-17 15:26:24 +00:00
|
|
|
ASTOptimizeQuery() = default;
|
|
|
|
ASTOptimizeQuery(const StringRange range_) : IAST(range_) {}
|
2015-04-30 05:45:34 +00:00
|
|
|
|
2012-07-31 19:08:49 +00:00
|
|
|
/** Получить текст, который идентифицирует этот элемент. */
|
2014-12-17 15:26:24 +00:00
|
|
|
String getID() const override { return "OptimizeQuery_" + database + "_" + table; };
|
2012-07-31 19:08:49 +00:00
|
|
|
|
2015-04-30 05:45:34 +00:00
|
|
|
void updateHashWith(SipHash & hash) const override
|
|
|
|
{
|
|
|
|
hash.update("OptimizeQuery", strlen("OptimizeQuery") + 1);
|
|
|
|
hash.update(database.data(), database.size() + 1);
|
|
|
|
hash.update(table.data(), table.size() + 1);
|
|
|
|
}
|
|
|
|
|
2014-12-17 15:26:24 +00:00
|
|
|
ASTPtr clone() const override { return new ASTOptimizeQuery(*this); }
|
2012-07-31 19:08:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|