2019-03-26 18:28:37 +00:00
|
|
|
#pragma once
|
|
|
|
#include <Processors/ISource.h>
|
2019-04-11 13:04:43 +00:00
|
|
|
#include <Processors/Sources/InputStreamHolder.h>
|
2019-03-26 18:28:37 +00:00
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
class SourceFromInputStream : public ISource
|
|
|
|
{
|
|
|
|
public:
|
2019-04-12 13:09:36 +00:00
|
|
|
explicit SourceFromInputStream(InputStreamHolderPtr holder_, bool force_add_aggregating_info = false);
|
2019-03-26 18:28:37 +00:00
|
|
|
String getName() const override { return "SourceFromInputStream"; }
|
|
|
|
|
|
|
|
Chunk generate() override;
|
|
|
|
|
2019-04-11 13:04:43 +00:00
|
|
|
IBlockInputStream & getStream() { return holder->getStream(); }
|
2019-03-26 18:28:37 +00:00
|
|
|
|
|
|
|
private:
|
2019-04-05 15:45:46 +00:00
|
|
|
bool has_aggregate_functions = false;
|
2019-04-12 13:09:36 +00:00
|
|
|
bool force_add_aggregating_info;
|
2019-04-11 13:04:43 +00:00
|
|
|
InputStreamHolderPtr holder;
|
2019-03-26 18:28:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|