ClickHouse/dbms/src/TableFunctions/TableFunctionRemote.h

23 lines
711 B
C++
Raw Normal View History

#pragma once
#include <TableFunctions/ITableFunction.h>
namespace DB
{
/* remote ('address', db, table) - creates a temporary StorageDistributed.
2017-04-16 15:00:33 +00:00
* To get the table structure, a DESC TABLE request is made to the remote server.
* For example
* SELECT count() FROM remote('example01-01-1', merge, hits) - go to `example01-01-1`, in the merge database, the hits table.
* An expression that generates a lot of shards and replicas can also be specified as the host name - see below.
*/
class TableFunctionRemote : public ITableFunction
{
public:
std::string getName() const override { return "remote"; }
2017-05-23 18:46:52 +00:00
StoragePtr execute(const ASTPtr & ast_function, const Context & context) const override;
};
}