ClickHouse/dbms/src/TableFunctions/TableFunctionFile.h

30 lines
688 B
C++
Raw Normal View History

#pragma once
2018-06-11 12:13:00 +00:00
#include <TableFunctions/ITableFunctionFileLike.h>
#include <Interpreters/Context.h>
#include <Core/Block.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 Block & sample_block, Context & global_context) const override;
};
}