2017-04-01 09:19:00 +00:00
|
|
|
#include <DataStreams/MaterializingBlockInputStream.h>
|
2017-11-01 03:09:06 +00:00
|
|
|
#include <DataStreams/materializeBlock.h>
|
|
|
|
|
2016-08-10 19:12:29 +00:00
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2017-09-08 02:29:47 +00:00
|
|
|
MaterializingBlockInputStream::MaterializingBlockInputStream(const BlockInputStreamPtr & input)
|
2016-08-10 19:12:29 +00:00
|
|
|
{
|
2017-09-08 02:29:47 +00:00
|
|
|
children.push_back(input);
|
2016-08-10 19:12:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
String MaterializingBlockInputStream::getName() const
|
|
|
|
{
|
2017-04-01 07:20:54 +00:00
|
|
|
return "Materializing";
|
2016-08-10 19:12:29 +00:00
|
|
|
}
|
|
|
|
|
2018-02-18 03:23:48 +00:00
|
|
|
Block MaterializingBlockInputStream::getHeader() const
|
2018-01-06 18:10:44 +00:00
|
|
|
{
|
2018-01-09 00:19:58 +00:00
|
|
|
return materializeBlock(children.back()->getHeader());
|
2018-01-06 18:10:44 +00:00
|
|
|
}
|
|
|
|
|
2016-08-10 19:12:29 +00:00
|
|
|
Block MaterializingBlockInputStream::readImpl()
|
|
|
|
{
|
2017-11-01 03:09:06 +00:00
|
|
|
return materializeBlock(children.back()->read());
|
2016-08-10 19:12:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|