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
|
|
|
*/
|
2017-06-10 09:04:31 +00:00
|
|
|
class TableFunctionMerge : public ITableFunction
|
2014-01-28 16:45:10 +00:00
|
|
|
{
|
|
|
|
public:
|
2017-06-10 09:04:31 +00:00
|
|
|
static constexpr auto name = "merge";
|
|
|
|
std::string getName() const override { return name; }
|
2018-03-02 05:03:28 +00:00
|
|
|
private:
|
|
|
|
StoragePtr executeImpl(const ASTPtr & ast_function, const Context & context) const override;
|
2014-01-28 16:45:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
}
|