2019-05-28 18:27:00 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Storages/IStorage.h>
|
|
|
|
#include <ext/shared_ptr_helper.h>
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
2019-05-29 21:38:28 +00:00
|
|
|
/** Internal temporary storage for table function input(...)
|
2019-05-29 20:59:03 +00:00
|
|
|
*/
|
2019-05-28 18:27:00 +00:00
|
|
|
|
2020-03-19 23:48:53 +00:00
|
|
|
class StorageInput final : public ext::shared_ptr_helper<StorageInput>, public IStorage
|
2019-05-28 18:27:00 +00:00
|
|
|
{
|
2019-09-04 12:25:20 +00:00
|
|
|
friend struct ext::shared_ptr_helper<StorageInput>;
|
2019-05-28 18:27:00 +00:00
|
|
|
public:
|
|
|
|
String getName() const override { return "Input"; }
|
2019-05-29 21:38:28 +00:00
|
|
|
|
|
|
|
/// A table will read from this stream.
|
2019-05-28 18:27:00 +00:00
|
|
|
void setInputStream(BlockInputStreamPtr input_stream_);
|
|
|
|
|
2020-02-19 16:07:28 +00:00
|
|
|
Pipes read(
|
2019-05-28 18:27:00 +00:00
|
|
|
const Names & column_names,
|
|
|
|
const SelectQueryInfo & query_info,
|
|
|
|
const Context & context,
|
|
|
|
QueryProcessingStage::Enum processed_stage,
|
|
|
|
size_t max_block_size,
|
|
|
|
unsigned num_streams) override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
BlockInputStreamPtr input_stream;
|
|
|
|
|
|
|
|
protected:
|
2020-03-10 19:36:17 +00:00
|
|
|
StorageInput(const StorageID & table_id, const ColumnsDescription & columns_);
|
2019-05-28 18:27:00 +00:00
|
|
|
};
|
|
|
|
}
|