mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-11 17:02:25 +00:00
45 lines
966 B
C++
45 lines
966 B
C++
#pragma once
|
|
|
|
#include <DataStreams/IProfilingBlockInputStream.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
/** Adds to one thread additional block information that is specified
|
|
* as the constructor parameter.
|
|
*/
|
|
class BlockExtraInfoInputStream : public IProfilingBlockInputStream
|
|
{
|
|
public:
|
|
BlockExtraInfoInputStream(const BlockInputStreamPtr & input, const BlockExtraInfo & block_extra_info_)
|
|
: block_extra_info(block_extra_info_)
|
|
{
|
|
children.push_back(input);
|
|
}
|
|
|
|
BlockExtraInfo getBlockExtraInfo() const override
|
|
{
|
|
return block_extra_info;
|
|
}
|
|
|
|
String getName() const override { return "BlockExtraInfoInput"; }
|
|
|
|
String getID() const override
|
|
{
|
|
std::stringstream res;
|
|
res << "BlockExtraInfoInput(" << children.back()->getID() << ")";
|
|
return res.str();
|
|
}
|
|
|
|
protected:
|
|
Block readImpl() override
|
|
{
|
|
return children.back()->read();
|
|
}
|
|
|
|
private:
|
|
BlockExtraInfo block_extra_info;
|
|
};
|
|
|
|
}
|