ClickHouse/src/Interpreters/InterpreterShowProcesslistQuery.h

30 lines
757 B
C++
Raw Normal View History

#pragma once
#include <Interpreters/IInterpreter.h>
2019-03-11 14:01:45 +00:00
#include <Parsers/IAST_fwd.h>
namespace DB
{
2017-05-23 18:24:43 +00:00
/** Return list of currently executing queries.
*/
2021-05-31 14:49:02 +00:00
class InterpreterShowProcesslistQuery : public IInterpreter, WithMutableContext
{
public:
2021-05-31 14:49:02 +00:00
InterpreterShowProcesslistQuery(const ASTPtr & query_ptr_, ContextMutablePtr context_)
: WithMutableContext(context_), query_ptr(query_ptr_) {}
BlockIO execute() override;
/// We ignore the quota and limits here because execute() will rewrite a show query as a SELECT query and then
/// the SELECT query will checks the quota and limits.
bool ignoreQuota() const override { return true; }
bool ignoreLimits() const override { return true; }
private:
ASTPtr query_ptr;
};
}