ClickHouse/dbms/src/Interpreters/InterpreterSelectWithUnionQuery.h
alexey-milovidov 164425d1ec
Fix performance regression with prepared sets when they are used inside another subquery. (#2677)
* Attempt to fix performance regression [#CLICKHOUSE-3796]

* Attempt to fix performance regression [#CLICKHOUSE-3796]

* Attempt to fix performance regression [#CLICKHOUSE-3796]

* Attempt to fix performance regression [#CLICKHOUSE-3796]

* Attempt to fix performance regression [#CLICKHOUSE-3796]

* Attempt to fix performance regression [#CLICKHOUSE-3796]

* Attempt to fix performance regression [#CLICKHOUSE-3796]

* Attempt to fix performance regression [#CLICKHOUSE-3796]

* Added documentation about ClickHouse testing (draft) [#CLICKHOUSE-2]

* Attempt to fix performance regression [#CLICKHOUSE-3796]

* Removed debug output [#CLICKHOUSE-3796]

* Removed debug output [#CLICKHOUSE-3796]

* Updated documentation about ClickHouse testing [#CLICKHOUSE-2]

* Revert "Updated documentation about ClickHouse testing [#CLICKHOUSE-2]"

This reverts commit 9eafc13f3b.

* Revert "Added documentation about ClickHouse testing (draft) [#CLICKHOUSE-2]"

This reverts commit e28ad4b5fe.

* Fixed test #2677

* Update InterpreterSelectQuery.cpp
2018-07-19 16:36:21 +03:00

54 lines
1.2 KiB
C++

#pragma once
#include <Core/QueryProcessingStage.h>
#include <Interpreters/Context.h>
#include <Interpreters/IInterpreter.h>
namespace DB
{
class InterpreterSelectQuery;
/** Interprets one or multiple SELECT queries inside UNION ALL chain.
*/
class InterpreterSelectWithUnionQuery : public IInterpreter
{
public:
InterpreterSelectWithUnionQuery(
const ASTPtr & query_ptr_,
const Context & context_,
const Names & required_result_column_names = Names{},
QueryProcessingStage::Enum to_stage_ = QueryProcessingStage::Complete,
size_t subquery_depth_ = 0,
bool only_analyze = false);
~InterpreterSelectWithUnionQuery();
BlockIO execute() override;
/// Execute the query without union of streams.
BlockInputStreams executeWithMultipleStreams();
Block getSampleBlock();
static Block getSampleBlock(
const ASTPtr & query_ptr_,
const Context & context_);
void ignoreWithTotals();
private:
ASTPtr query_ptr;
Context context;
QueryProcessingStage::Enum to_stage;
size_t subquery_depth;
std::vector<std::unique_ptr<InterpreterSelectQuery>> nested_interpreters;
Block result_header;
};
}