ClickHouse/dbms/include/DB/DataStreams/RowInputStreamFromBlockInputStream.h

35 lines
736 B
C
Raw Normal View History

2010-03-04 19:20:28 +00:00
#ifndef DBMS_DATA_STREAMS_ROWINPUTSTREAMFROMBLOCKINPUTSTREAM_H
#define DBMS_DATA_STREAMS_ROWINPUTSTREAMFROMBLOCKINPUTSTREAM_H
#include <Poco/SharedPtr.h>
#include <DB/DataStreams/IBlockInputStream.h>
#include <DB/DataStreams/IRowInputStream.h>
namespace DB
{
using Poco::SharedPtr;
/** Преобразует поток для чтения данных по блокам в поток для чтения данных по строкам.
*/
class RowInputStreamFromBlockInputStream : public IRowInputStream
{
public:
explicit RowInputStreamFromBlockInputStream(IBlockInputStream & block_input_);
Row read();
private:
IBlockInputStream & block_input;
size_t pos;
size_t current_rows;
Block current_block;
};
}
#endif