2020-06-17 19:30:36 +00:00
|
|
|
#include <Processors/QueryPlan/ExtremesStep.h>
|
2021-10-16 14:03:50 +00:00
|
|
|
#include <QueryPipeline/QueryPipelineBuilder.h>
|
2020-06-17 19:30:36 +00:00
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2020-07-28 13:10:48 +00:00
|
|
|
static ITransformingStep::Traits getTraits()
|
2020-06-18 13:00:16 +00:00
|
|
|
{
|
2020-07-28 13:10:48 +00:00
|
|
|
return ITransformingStep::Traits
|
2020-06-18 20:11:42 +00:00
|
|
|
{
|
2020-07-28 13:10:48 +00:00
|
|
|
{
|
2020-06-22 10:18:28 +00:00
|
|
|
.preserves_distinct_columns = true,
|
|
|
|
.returns_single_stream = false,
|
|
|
|
.preserves_number_of_streams = true,
|
2020-07-27 15:37:43 +00:00
|
|
|
.preserves_sorting = true,
|
2020-07-28 13:10:48 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
.preserves_number_of_rows = true,
|
|
|
|
}
|
2020-06-18 13:00:16 +00:00
|
|
|
};
|
|
|
|
}
|
2020-06-17 19:30:36 +00:00
|
|
|
|
2020-06-18 13:00:16 +00:00
|
|
|
ExtremesStep::ExtremesStep(const DataStream & input_stream_)
|
|
|
|
: ITransformingStep(input_stream_, input_stream_.header, getTraits())
|
|
|
|
{
|
|
|
|
}
|
2020-06-17 19:30:36 +00:00
|
|
|
|
2021-09-14 16:28:41 +00:00
|
|
|
void ExtremesStep::transformPipeline(QueryPipelineBuilder & pipeline, const BuildQueryPipelineSettings &)
|
2020-06-17 19:30:36 +00:00
|
|
|
{
|
|
|
|
pipeline.addExtremesTransform();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|