#pragma once #include #include #include #include #include "config.h" namespace DB { class ASTSystemQuery : public IAST, public ASTQueryWithOnCluster { public: enum class Type : UInt64 { UNKNOWN, SHUTDOWN, KILL, SUSPEND, DROP_DNS_CACHE, DROP_MARK_CACHE, DROP_UNCOMPRESSED_CACHE, DROP_INDEX_MARK_CACHE, DROP_INDEX_UNCOMPRESSED_CACHE, DROP_MMAP_CACHE, DROP_QUERY_CACHE, DROP_COMPILED_EXPRESSION_CACHE, DROP_FILESYSTEM_CACHE, DROP_DISK_METADATA_CACHE, DROP_SCHEMA_CACHE, DROP_FORMAT_SCHEMA_CACHE, DROP_S3_CLIENT_CACHE, STOP_LISTEN, START_LISTEN, RESTART_REPLICAS, RESTART_REPLICA, RESTORE_REPLICA, WAIT_LOADING_PARTS, DROP_REPLICA, DROP_DATABASE_REPLICA, JEMALLOC_PURGE, JEMALLOC_ENABLE_PROFILE, JEMALLOC_DISABLE_PROFILE, JEMALLOC_FLUSH_PROFILE, SYNC_REPLICA, SYNC_DATABASE_REPLICA, SYNC_TRANSACTION_LOG, SYNC_FILE_CACHE, REPLICA_READY, REPLICA_UNREADY, RELOAD_DICTIONARY, RELOAD_DICTIONARIES, RELOAD_MODEL, RELOAD_MODELS, RELOAD_FUNCTION, RELOAD_FUNCTIONS, RELOAD_EMBEDDED_DICTIONARIES, RELOAD_CONFIG, RELOAD_USERS, RELOAD_ASYNCHRONOUS_METRICS, RESTART_DISK, STOP_MERGES, START_MERGES, STOP_TTL_MERGES, START_TTL_MERGES, STOP_FETCHES, START_FETCHES, STOP_MOVES, START_MOVES, STOP_REPLICATED_SENDS, START_REPLICATED_SENDS, STOP_REPLICATION_QUEUES, START_REPLICATION_QUEUES, FLUSH_LOGS, FLUSH_DISTRIBUTED, FLUSH_ASYNC_INSERT_QUEUE, STOP_DISTRIBUTED_SENDS, START_DISTRIBUTED_SENDS, START_THREAD_FUZZER, STOP_THREAD_FUZZER, UNFREEZE, ENABLE_FAILPOINT, DISABLE_FAILPOINT, SYNC_FILESYSTEM_CACHE, STOP_PULLING_REPLICATION_LOG, START_PULLING_REPLICATION_LOG, STOP_CLEANUP, START_CLEANUP, RESET_COVERAGE, REFRESH_VIEW, START_VIEW, START_VIEWS, STOP_VIEW, STOP_VIEWS, CANCEL_VIEW, TEST_VIEW, END }; static const char * typeToString(Type type); Type type = Type::UNKNOWN; ASTPtr database; ASTPtr table; String getDatabase() const; String getTable() const; void setDatabase(const String & name); void setTable(const String & name); String target_model; String target_function; String replica; String shard; String replica_zk_path; bool is_drop_whole_replica{}; String storage_policy; String volume; String disk; UInt64 seconds{}; String filesystem_cache_name; std::string key_to_drop; std::optional offset_to_drop; String backup_name; String schema_cache_storage; String schema_cache_format; String fail_point_name; SyncReplicaMode sync_replica_mode = SyncReplicaMode::DEFAULT; std::vector src_replicas; ServerType server_type; /// For SYSTEM TEST VIEW (SET FAKE TIME