mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Simple cleanup: interpreters and parsers
This commit is contained in:
parent
4be447f41d
commit
99de1ee109
@ -1539,7 +1539,7 @@ ActionsDAGPtr SelectQueryExpressionAnalyzer::appendOrderBy(ExpressionActionsChai
|
|||||||
|
|
||||||
if (optimize_read_in_order)
|
if (optimize_read_in_order)
|
||||||
{
|
{
|
||||||
for (auto & child : select_query->orderBy()->children)
|
for (const auto & child : select_query->orderBy()->children)
|
||||||
{
|
{
|
||||||
auto actions_dag = std::make_shared<ActionsDAG>(columns_after_join);
|
auto actions_dag = std::make_shared<ActionsDAG>(columns_after_join);
|
||||||
getRootActions(child, only_types, actions_dag);
|
getRootActions(child, only_types, actions_dag);
|
||||||
|
@ -92,12 +92,12 @@ public:
|
|||||||
BlockIO execute() override;
|
BlockIO execute() override;
|
||||||
|
|
||||||
/// Builds QueryPlan for current query.
|
/// Builds QueryPlan for current query.
|
||||||
virtual void buildQueryPlan(QueryPlan & query_plan) override;
|
void buildQueryPlan(QueryPlan & query_plan) override;
|
||||||
|
|
||||||
bool ignoreLimits() const override { return options.ignore_limits; }
|
bool ignoreLimits() const override { return options.ignore_limits; }
|
||||||
bool ignoreQuota() const override { return options.ignore_quota; }
|
bool ignoreQuota() const override { return options.ignore_quota; }
|
||||||
|
|
||||||
virtual void ignoreWithTotals() override;
|
void ignoreWithTotals() override;
|
||||||
|
|
||||||
ASTPtr getQuery() const { return query_ptr; }
|
ASTPtr getQuery() const { return query_ptr; }
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ public:
|
|||||||
~InterpreterSelectWithUnionQuery() override;
|
~InterpreterSelectWithUnionQuery() override;
|
||||||
|
|
||||||
/// Builds QueryPlan for current query.
|
/// Builds QueryPlan for current query.
|
||||||
virtual void buildQueryPlan(QueryPlan & query_plan) override;
|
void buildQueryPlan(QueryPlan & query_plan) override;
|
||||||
|
|
||||||
BlockIO execute() override;
|
BlockIO execute() override;
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ public:
|
|||||||
ContextPtr context_,
|
ContextPtr context_,
|
||||||
bool is_subquery = false);
|
bool is_subquery = false);
|
||||||
|
|
||||||
virtual void ignoreWithTotals() override;
|
void ignoreWithTotals() override;
|
||||||
|
|
||||||
bool supportsTransactions() const override { return true; }
|
bool supportsTransactions() const override { return true; }
|
||||||
|
|
||||||
|
@ -248,7 +248,7 @@ public:
|
|||||||
return removeOnCluster<ASTAlterQuery>(clone(), params.default_database);
|
return removeOnCluster<ASTAlterQuery>(clone(), params.default_database);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual QueryKind getQueryKind() const override { return QueryKind::Alter; }
|
QueryKind getQueryKind() const override { return QueryKind::Alter; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void formatQueryImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
|
void formatQueryImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
|
||||||
|
@ -120,7 +120,7 @@ public:
|
|||||||
|
|
||||||
bool isView() const { return is_ordinary_view || is_materialized_view || is_live_view || is_window_view; }
|
bool isView() const { return is_ordinary_view || is_materialized_view || is_live_view || is_window_view; }
|
||||||
|
|
||||||
virtual QueryKind getQueryKind() const override { return QueryKind::Create; }
|
QueryKind getQueryKind() const override { return QueryKind::Create; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void formatQueryImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
|
void formatQueryImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
|
||||||
|
@ -45,7 +45,7 @@ public:
|
|||||||
return removeOnCluster<ASTDropQuery>(clone(), params.default_database);
|
return removeOnCluster<ASTDropQuery>(clone(), params.default_database);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual QueryKind getQueryKind() const override { return QueryKind::Drop; }
|
QueryKind getQueryKind() const override { return QueryKind::Drop; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void formatQueryImpl(const FormatSettings & settings, FormatState &, FormatStateStacked) const override;
|
void formatQueryImpl(const FormatSettings & settings, FormatState &, FormatStateStacked) const override;
|
||||||
|
@ -66,7 +66,7 @@ public:
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual QueryKind getQueryKind() const override { return QueryKind::Insert; }
|
QueryKind getQueryKind() const override { return QueryKind::Insert; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
|
void formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
|
||||||
|
@ -65,7 +65,7 @@ public:
|
|||||||
return query_ptr;
|
return query_ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual QueryKind getQueryKind() const override { return QueryKind::Rename; }
|
QueryKind getQueryKind() const override { return QueryKind::Rename; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void formatQueryImpl(const FormatSettings & settings, FormatState &, FormatStateStacked) const override
|
void formatQueryImpl(const FormatSettings & settings, FormatState &, FormatStateStacked) const override
|
||||||
|
@ -22,7 +22,7 @@ public:
|
|||||||
|
|
||||||
void formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
|
void formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
|
||||||
|
|
||||||
virtual QueryKind getQueryKind() const override { return QueryKind::SelectIntersectExcept; }
|
QueryKind getQueryKind() const override { return QueryKind::SelectIntersectExcept; }
|
||||||
|
|
||||||
ASTs getListOfSelects() const;
|
ASTs getListOfSelects() const;
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ public:
|
|||||||
|
|
||||||
void setFinal();
|
void setFinal();
|
||||||
|
|
||||||
virtual QueryKind getQueryKind() const override { return QueryKind::Select; }
|
QueryKind getQueryKind() const override { return QueryKind::Select; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
|
void formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
|
||||||
|
@ -17,7 +17,7 @@ public:
|
|||||||
|
|
||||||
void formatQueryImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
|
void formatQueryImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
|
||||||
|
|
||||||
virtual QueryKind getQueryKind() const override { return QueryKind::Select; }
|
QueryKind getQueryKind() const override { return QueryKind::Select; }
|
||||||
|
|
||||||
SelectUnionMode union_mode;
|
SelectUnionMode union_mode;
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ public:
|
|||||||
return removeOnCluster<ASTSystemQuery>(clone(), params.default_database);
|
return removeOnCluster<ASTSystemQuery>(clone(), params.default_database);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual QueryKind getQueryKind() const override { return QueryKind::System; }
|
QueryKind getQueryKind() const override { return QueryKind::System; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -34,6 +34,6 @@ public:
|
|||||||
void replaceEmptyDatabase(const String & current_database);
|
void replaceEmptyDatabase(const String & current_database);
|
||||||
void replaceCurrentUserTag(const String & current_user_name) const;
|
void replaceCurrentUserTag(const String & current_user_name) const;
|
||||||
ASTPtr getRewrittenASTWithoutOnCluster(const WithoutOnClusterASTRewriteParams &) const override { return removeOnCluster<ASTGrantQuery>(clone()); }
|
ASTPtr getRewrittenASTWithoutOnCluster(const WithoutOnClusterASTRewriteParams &) const override { return removeOnCluster<ASTGrantQuery>(clone()); }
|
||||||
virtual QueryKind getQueryKind() const override { return is_revoke ? QueryKind::Revoke : QueryKind::Grant; }
|
QueryKind getQueryKind() const override { return is_revoke ? QueryKind::Revoke : QueryKind::Grant; }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user