ClickHouse/src/Storages/StorageExecutable.h

44 lines
1.1 KiB
C++
Raw Normal View History

2021-04-14 17:51:55 +00:00
#pragma once
2021-08-24 19:38:42 +00:00
#include <common/logger_useful.h>
#include <common/shared_ptr_helper.h>
2021-04-14 17:51:55 +00:00
#include <Storages/IStorage.h>
#include <IO/CompressionMethod.h>
2021-08-24 19:38:42 +00:00
2021-04-14 17:51:55 +00:00
namespace DB
{
/**
* This class represents table engine for external executable files.
*/
2021-08-24 19:38:42 +00:00
class StorageExecutable final : public shared_ptr_helper<StorageExecutable>, public IStorage
2021-04-14 17:51:55 +00:00
{
2021-08-24 19:38:42 +00:00
friend struct shared_ptr_helper<StorageExecutable>;
2021-04-14 17:51:55 +00:00
public:
String getName() const override { return "Executable"; }
Pipe read(
const Names & column_names,
const StorageMetadataPtr & /*metadata_snapshot*/,
SelectQueryInfo & query_info,
2021-08-24 19:38:42 +00:00
ContextPtr context,
2021-04-14 17:51:55 +00:00
QueryProcessingStage::Enum processed_stage,
size_t max_block_size,
2021-08-24 19:38:42 +00:00
unsigned threads) override;
2021-04-14 17:51:55 +00:00
protected:
StorageExecutable(
const StorageID & table_id,
const String & file_path_,
2021-04-15 21:15:54 +00:00
const String & format_,
2021-04-14 17:51:55 +00:00
const ColumnsDescription & columns,
2021-08-24 19:38:42 +00:00
const ConstraintsDescription & constraints);
2021-04-14 17:51:55 +00:00
private:
String file_path;
2021-04-15 21:15:54 +00:00
String format;
2021-08-24 19:38:42 +00:00
Poco::Logger * log;
2021-04-14 17:51:55 +00:00
};
}