mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-04 21:42:39 +00:00
52 lines
1.4 KiB
C++
52 lines
1.4 KiB
C++
#pragma once
|
|
#include <Processors/QueryPlan/ITransformingStep.h>
|
|
#include <Processors/Transforms/finalizeChunk.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
class ActionsDAG;
|
|
using ActionsDAGPtr = std::shared_ptr<ActionsDAG>;
|
|
|
|
enum class TotalsMode;
|
|
|
|
/// Execute HAVING and calculate totals. See TotalsHavingTransform.
|
|
class TotalsHavingStep : public ITransformingStep
|
|
{
|
|
public:
|
|
TotalsHavingStep(
|
|
const DataStream & input_stream_,
|
|
const AggregateDescriptions & aggregates_,
|
|
bool overflow_row_,
|
|
const ActionsDAGPtr & actions_dag_,
|
|
const std::string & filter_column_,
|
|
bool remove_filter_,
|
|
TotalsMode totals_mode_,
|
|
double auto_include_threshold_,
|
|
bool final_);
|
|
|
|
String getName() const override { return "TotalsHaving"; }
|
|
|
|
void transformPipeline(QueryPipelineBuilder & pipeline, const BuildQueryPipelineSettings & settings) override;
|
|
|
|
void describeActions(JSONBuilder::JSONMap & map) const override;
|
|
void describeActions(FormatSettings & settings) const override;
|
|
|
|
const ActionsDAGPtr & getActions() const { return actions_dag; }
|
|
|
|
private:
|
|
void updateOutputStream() override;
|
|
|
|
const AggregateDescriptions aggregates;
|
|
|
|
bool overflow_row;
|
|
ActionsDAGPtr actions_dag;
|
|
String filter_column_name;
|
|
bool remove_filter;
|
|
TotalsMode totals_mode;
|
|
double auto_include_threshold;
|
|
bool final;
|
|
};
|
|
|
|
}
|