2013-08-07 13:07:42 +00:00
|
|
|
#pragma once
|
|
|
|
|
2017-04-01 09:19:00 +00:00
|
|
|
#include <Interpreters/IInterpreter.h>
|
2019-03-11 14:01:45 +00:00
|
|
|
#include <Parsers/IAST_fwd.h>
|
2017-01-21 04:24:28 +00:00
|
|
|
|
2013-08-07 13:07:42 +00:00
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
2018-12-25 23:11:36 +00:00
|
|
|
class Context;
|
2020-01-24 16:20:36 +00:00
|
|
|
class AccessRightsElements;
|
|
|
|
|
2018-12-25 23:11:36 +00:00
|
|
|
|
2017-06-02 21:37:28 +00:00
|
|
|
/** Allows you add or remove a column in the table.
|
|
|
|
* It also allows you to manipulate the partitions of the MergeTree family tables.
|
2013-08-07 13:07:42 +00:00
|
|
|
*/
|
2015-06-18 02:11:05 +00:00
|
|
|
class InterpreterAlterQuery : public IInterpreter
|
2013-08-07 13:07:42 +00:00
|
|
|
{
|
|
|
|
public:
|
2017-05-23 18:01:50 +00:00
|
|
|
InterpreterAlterQuery(const ASTPtr & query_ptr_, const Context & context_);
|
2013-08-07 13:07:42 +00:00
|
|
|
|
2017-04-01 07:20:54 +00:00
|
|
|
BlockIO execute() override;
|
2013-08-07 13:07:42 +00:00
|
|
|
|
2014-07-11 08:12:03 +00:00
|
|
|
private:
|
2020-01-24 16:20:36 +00:00
|
|
|
AccessRightsElements getRequiredAccess() const;
|
|
|
|
|
2017-04-01 07:20:54 +00:00
|
|
|
ASTPtr query_ptr;
|
|
|
|
|
2017-09-04 17:49:39 +00:00
|
|
|
const Context & context;
|
2013-08-07 13:07:42 +00:00
|
|
|
};
|
2014-10-16 13:37:01 +00:00
|
|
|
|
2013-08-07 13:07:42 +00:00
|
|
|
}
|