2014-01-28 16:45:10 +00:00
|
|
|
#pragma once
|
|
|
|
|
2017-04-01 09:19:00 +00:00
|
|
|
#include <TableFunctions/ITableFunction.h>
|
2014-01-28 16:45:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2017-05-23 18:44:36 +00:00
|
|
|
/* merge (db_name, tables_regexp) - creates a temporary StorageMerge.
|
2017-04-16 15:00:33 +00:00
|
|
|
* The structure of the table is taken from the first table that came up, suitable for regexp.
|
|
|
|
* If there is no such table, an exception is thrown.
|
2014-01-28 16:45:10 +00:00
|
|
|
*/
|
|
|
|
class TableFunctionMerge: public ITableFunction
|
|
|
|
{
|
|
|
|
public:
|
2017-04-01 07:20:54 +00:00
|
|
|
std::string getName() const override { return "merge"; }
|
2017-05-23 18:44:36 +00:00
|
|
|
StoragePtr execute(ASTPtr ast_function, const Context & context) const override;
|
2014-01-28 16:45:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
}
|