MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / getTablePath

Method getTablePath

src/Databases/DatabaseHDFS.cpp:80–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80std::string DatabaseHDFS::getTablePath(const std::string & table_name) const
81{
82 if (table_name.starts_with("hdfs://"))
83 return table_name;
84
85 if (source.empty())
86 throw Exception(ErrorCodes::BAD_ARGUMENTS, "Bad HDFS URL: {}. "
87 "It should have the following structure 'hdfs://<host_name>:<port>/path'", table_name);
88
89 return fs::path(source) / table_name;
90}
91
92bool DatabaseHDFS::checkUrl(const std::string & url, ContextPtr context_, bool throw_on_error) const
93{

Callers

nothing calls this directly

Calls 2

ExceptionClass · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected