ClickHouse/src/Processors/QueryPlan/TotalsHavingStep.h

42 lines
985 B
C++
Raw Normal View History

2020-06-17 16:54:51 +00:00
#pragma once
#include <Processors/QueryPlan/ITransformingStep.h>
namespace DB
{
2020-11-03 11:28:28 +00:00
class ActionsDAG;
using ActionsDAGPtr = std::shared_ptr<ActionsDAG>;
2020-06-17 16:54:51 +00:00
enum class TotalsMode;
/// Execute HAVING and calculate totals. See TotalsHavingTransform.
2020-06-17 16:54:51 +00:00
class TotalsHavingStep : public ITransformingStep
{
public:
TotalsHavingStep(
const DataStream & input_stream_,
bool overflow_row_,
2020-11-11 16:52:27 +00:00
const ActionsDAGPtr & actions_dag_,
2020-06-17 16:54:51 +00:00
const std::string & filter_column_,
TotalsMode totals_mode_,
double auto_include_threshold_,
bool final_);
String getName() const override { return "TotalsHaving"; }
void transformPipeline(QueryPipeline & pipeline) override;
2020-06-27 14:02:24 +00:00
void describeActions(FormatSettings & settings) const override;
2020-06-24 12:09:01 +00:00
2020-06-17 16:54:51 +00:00
private:
bool overflow_row;
2020-11-11 16:52:27 +00:00
ActionsDAGPtr actions_dag;
2020-06-17 16:54:51 +00:00
String filter_column_name;
TotalsMode totals_mode;
double auto_include_threshold;
bool final;
};
}