ClickHouse/src/Processors/QueryPlan/TotalsHavingStep.h

42 lines
977 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-03 11:28:28 +00:00
const ActionsDAGPtr & actions_,
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-03 11:28:28 +00:00
ActionsDAGPtr actions;
2020-06-17 16:54:51 +00:00
String filter_column_name;
TotalsMode totals_mode;
double auto_include_threshold;
bool final;
};
}