Class DdlCommandExecutor

class DdlCommandExecutor

Public Functions

DdlCommandExecutor(const std::string &ddl_statement, std::shared_ptr<Catalog_Namespace::SessionInfo const> session_ptr)
ExecutionResult execute()

Parses given JSON string and routes resulting payload to appropriate DDL command class for execution.

Parameters

bool isShowUserSessions()

Returns true if this command is SHOW USER SESSIONS

bool isShowQueries()

Returns true if this command is SHOW QUERIES

bool isShowCreateTable()

Returns true if this command is SHOW CREATE TABLE

bool isKillQuery()

Returns true if this command is KILL QUERY

bool isAlterSystemClear()

Returns true if this command is ALTER SYSTEM CLEAR

std::string returnCacheType()

Returns which kind of caches if to clear ALTER SYSTEM CLEAR

const std::string getTargetQuerySessionToKill()

Returns target query session if this command is KILL QUERY

DistributedExecutionDetails getDistributedExecutionDetails()

Returns an object indicating where command execution should take place and how results should be aggregated for distributed setups.

const std::string commandStr()

Returns command string, can be useful for logging, conversion

Private Members

std::string ddl_statement_
std::string ddl_command_
std::unique_ptr<DdlCommandData> ddl_data_
std::shared_ptr<Catalog_Namespace::SessionInfo const> session_ptr_