Skip to content

Commit

Permalink
Unify some calls in older changes
Browse files Browse the repository at this point in the history
Signed-off-by: JaySon-Huang <jayson.hjs@gmail.com>
  • Loading branch information
JaySon-Huang committed Feb 14, 2022
1 parent 1d78543 commit 5dafba0
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
8 changes: 4 additions & 4 deletions dbms/src/DataStreams/AggregatingBlockInputStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ namespace DB
*/
class AggregatingBlockInputStream : public IProfilingBlockInputStream
{
static constexpr auto NAME = "Aggregating";

public:
/** keys are taken from the GROUP BY part of the query
* Aggregate functions are searched everywhere in the expression.
Expand All @@ -28,7 +30,7 @@ class AggregatingBlockInputStream : public IProfilingBlockInputStream
const FileProviderPtr & file_provider_,
bool final_,
const LogWithPrefixPtr & log_)
: log(getMPPTaskLog(log_, name))
: log(getMPPTaskLog(log_, NAME))
, params(params_)
, aggregator(params, log)
, file_provider{file_provider_}
Expand All @@ -37,9 +39,7 @@ class AggregatingBlockInputStream : public IProfilingBlockInputStream
children.push_back(input);
}

static constexpr auto name = "Aggregating";

String getName() const override { return name; }
String getName() const override { return NAME; }

Block getHeader() const override;

Expand Down
12 changes: 6 additions & 6 deletions dbms/src/DataStreams/ConcatBlockInputStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ namespace DB
*/
class ConcatBlockInputStream : public IProfilingBlockInputStream
{
static constexpr auto NAME = "Concat";

public:
ConcatBlockInputStream(BlockInputStreams inputs_, const LogWithPrefixPtr & log_)
: log(getMPPTaskLog(log_, name))
: log(getMPPTaskLog(log_, NAME))
{
children.insert(children.end(), inputs_.begin(), inputs_.end());
current_stream = children.begin();
}

static constexpr auto name = "Concat";

String getName() const override { return name; }
String getName() const override { return NAME; }

Block getHeader() const override { return children.at(0)->getHeader(); }

protected:
Block readImpl() override
{
FilterPtr filter_;
return readImpl(filter_, false);
FilterPtr filter_ignored;
return readImpl(filter_ignored, false);
}

Block readImpl(FilterPtr & res_filter, bool return_filter) override
Expand Down
7 changes: 4 additions & 3 deletions dbms/src/DataStreams/HashJoinBuildBlockInputStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,21 @@ namespace DB
{
class HashJoinBuildBlockInputStream : public IProfilingBlockInputStream
{
static constexpr auto NAME = "HashJoinBuildBlockInputStream";

public:
HashJoinBuildBlockInputStream(
const BlockInputStreamPtr & input,
JoinPtr join_,
size_t stream_index_,
const LogWithPrefixPtr & log_)
: stream_index(stream_index_)
, log(getMPPTaskLog(log_, name))
, log(getMPPTaskLog(log_, NAME))
{
children.push_back(input);
join = join_;
}
static constexpr auto name = "HashJoinBuildBlockInputStream";
String getName() const override { return name; }
String getName() const override { return NAME; }
Block getHeader() const override { return children.back()->getHeader(); }

protected:
Expand Down
8 changes: 4 additions & 4 deletions dbms/src/DataStreams/PartialSortingBlockInputStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ namespace DB
*/
class PartialSortingBlockInputStream : public IProfilingBlockInputStream
{
static constexpr auto NAME = "PartialSorting";

public:
/// limit - if not 0, then you can sort each block not completely, but only `limit` first rows by order.
PartialSortingBlockInputStream(
Expand All @@ -21,14 +23,12 @@ class PartialSortingBlockInputStream : public IProfilingBlockInputStream
size_t limit_ = 0)
: description(description_)
, limit(limit_)
, log(getMPPTaskLog(log_, name))
, log(getMPPTaskLog(log_, NAME))
{
children.push_back(input_);
}

static constexpr auto name = "PartialSorting";

String getName() const override { return name; }
String getName() const override { return NAME; }

bool isGroupedOutput() const override { return true; }
bool isSortedOutput() const override { return true; }
Expand Down

0 comments on commit 5dafba0

Please sign in to comment.