ClickHouse/dbms/TableFunctions/TableFunctionFile.h

30 lines
799 B
C++
Raw Normal View History

#pragma once
2018-06-11 12:13:00 +00:00
#include <TableFunctions/ITableFunctionFileLike.h>
#include <Interpreters/Context.h>
namespace DB
{
/* file(path, format, structure) - creates a temporary storage from file
*
*
* The file must be in the clickhouse data directory.
* The relative path begins with the clickhouse data directory.
*/
2018-06-11 12:13:00 +00:00
class TableFunctionFile : public ITableFunctionFileLike
{
public:
static constexpr auto name = "file";
std::string getName() const override
{
2018-06-11 12:13:00 +00:00
return name;
}
2018-06-11 12:13:00 +00:00
private:
StoragePtr getStorage(
const String & source, const String & format, const ColumnsDescription & columns, Context & global_context, const std::string & table_name, const std::string & compression_method) const override;
2020-01-24 16:20:36 +00:00
AccessType getRequiredAccessType() const override;
2018-06-11 12:13:00 +00:00
};
}