1#pragma once
2
3#include <TableFunctions/ITableFunction.h>
4
5
6namespace DB
7{
8
9/* merge (db_name, tables_regexp) - creates a temporary StorageMerge.
10 * The structure of the table is taken from the first table that came up, suitable for regexp.
11 * If there is no such table, an exception is thrown.
12 */
13class TableFunctionMerge : public ITableFunction
14{
15public:
16 static constexpr auto name = "merge";
17 std::string getName() const override { return name; }
18private:
19 StoragePtr executeImpl(const ASTPtr & ast_function, const Context & context, const std::string & table_name) const override;
20};
21
22
23}
24