1#include <DataStreams/MaterializingBlockInputStream.h>
2#include <DataStreams/materializeBlock.h>
3
4
5namespace DB
6{
7
8MaterializingBlockInputStream::MaterializingBlockInputStream(const BlockInputStreamPtr & input)
9{
10 children.push_back(input);
11}
12
13String MaterializingBlockInputStream::getName() const
14{
15 return "Materializing";
16}
17
18Block MaterializingBlockInputStream::getHeader() const
19{
20 return materializeBlock(children.back()->getHeader());
21}
22
23Block MaterializingBlockInputStream::readImpl()
24{
25 return materializeBlock(children.back()->read());
26}
27
28}
29