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-08-03 13:54:14 +00:00
|
|
|
Pipe read(
|
2019-05-28 18:27:00 +00:00
|
|
|
const Names & column_names,
|
2020-06-15 19:08:58 +00:00
|
|
|
const StorageMetadataPtr & /*metadata_snapshot*/,
|
2020-09-20 17:52:17 +00:00
|
|
|
SelectQueryInfo & query_info,
|
2019-05-28 18:27:00 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|