forked from ClickHouse/ClickHouse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed bug: resize on left pipeline cause the order by result wrong
- Loading branch information
Showing
7 changed files
with
63 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#include <Processors/QueryPlan/ResizeStreamsStep.h> | ||
#include <QueryPipeline/QueryPipelineBuilder.h> | ||
namespace DB | ||
{ | ||
static ITransformingStep::Traits getTraits() | ||
{ | ||
return ITransformingStep::Traits | ||
{ | ||
{ | ||
.preserves_distinct_columns = false, | ||
.returns_single_stream = false, | ||
.preserves_number_of_streams = true, | ||
.preserves_sorting = false, | ||
}, | ||
{ | ||
.preserves_number_of_rows = false, | ||
} | ||
}; | ||
} | ||
|
||
ResizeStreamsStep::ResizeStreamsStep(const DataStream & input_stream_, size_t pipeline_streams_) | ||
: ITransformingStep(input_stream_, input_stream_.header, getTraits()) | ||
, pipeline_streams(pipeline_streams_) | ||
{ | ||
} | ||
|
||
void ResizeStreamsStep::transformPipeline(QueryPipelineBuilder & pipeline, const BuildQueryPipelineSettings &) | ||
{ | ||
pipeline.resize(pipeline_streams); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#include <Processors/QueryPlan/IQueryPlanStep.h> | ||
#include <Processors/QueryPlan/ITransformingStep.h> | ||
|
||
namespace DB | ||
{ | ||
class ResizeStreamsStep : public ITransformingStep | ||
{ | ||
public: | ||
explicit ResizeStreamsStep(const DataStream & input_stream_, size_t pipeline_streams_); | ||
String getName() const override { return "ResizeStreamsStep"; } | ||
void transformPipeline(QueryPipelineBuilder & pipeline, const BuildQueryPipelineSettings &) override; | ||
private: | ||
size_t pipeline_streams; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters