ClickHouse/src/Storages/StorageInput.h

36 lines
936 B
C++
Raw Normal View History

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
class StorageInput final : public ext::shared_ptr_helper<StorageInput>, public IStorage
2019-05-28 18:27:00 +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,
const StorageMetadataPtr & /*metadata_snapshot*/,
2019-05-28 18:27:00 +00:00
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
};
}