mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
update
update fix test fix test
This commit is contained in:
parent
fe22563465
commit
9ad405cae8
@ -62,7 +62,7 @@ void TableFunctionMerge::parseArguments(const ASTPtr & ast_function, ContextPtr
|
||||
}
|
||||
|
||||
|
||||
const std::unordered_map<String, std::unordered_set<String>> & TableFunctionMerge::getSourceDatabasesAndTables(ContextPtr context) const
|
||||
const TableFunctionMerge::DbToTableSetMap & TableFunctionMerge::getSourceDatabasesAndTables(ContextPtr context) const
|
||||
{
|
||||
if (source_databases_and_tables)
|
||||
return *source_databases_and_tables;
|
||||
@ -155,7 +155,7 @@ TableFunctionMerge::getMatchedTablesWithAccess(const String & database_name, con
|
||||
continue;
|
||||
if (!granted_select_on_all_tables)
|
||||
access->checkAccess(AccessType::SELECT, database_name, it->name());
|
||||
tables.insert(it->name());
|
||||
tables.emplace(it->name());
|
||||
}
|
||||
return tables;
|
||||
}
|
||||
|
@ -15,11 +15,13 @@ class TableFunctionMerge : public ITableFunction
|
||||
public:
|
||||
static constexpr auto name = "merge";
|
||||
std::string getName() const override { return name; }
|
||||
|
||||
private:
|
||||
StoragePtr executeImpl(const ASTPtr & ast_function, ContextPtr context, const std::string & table_name, ColumnsDescription cached_columns) const override;
|
||||
const char * getStorageTypeName() const override { return "Merge"; }
|
||||
|
||||
const std::unordered_map<String, std::unordered_set<String>> & getSourceDatabasesAndTables(ContextPtr context) const;
|
||||
using DbToTableSetMap = std::unordered_map<String, std::unordered_set<String>>;
|
||||
const DbToTableSetMap & getSourceDatabasesAndTables(ContextPtr context) const;
|
||||
ColumnsDescription getActualTableStructure(ContextPtr context) const override;
|
||||
void parseArguments(const ASTPtr & ast_function, ContextPtr context) override;
|
||||
static NameSet getMatchedTablesWithAccess(const String & database_name, const String & table_regexp, const ContextPtr & context);
|
||||
@ -27,7 +29,7 @@ private:
|
||||
String source_database_name_or_regexp;
|
||||
String source_table_regexp;
|
||||
bool database_is_regexp = false;
|
||||
mutable std::optional<std::unordered_map<String, std::unordered_set<String>>> source_databases_and_tables;
|
||||
mutable std::optional<DbToTableSetMap> source_databases_and_tables;
|
||||
};
|
||||
|
||||
|
||||
|
@ -49,9 +49,9 @@
|
||||
2018-08-01 100
|
||||
2018-08-01 200
|
||||
--------------Implicit type conversion------------
|
||||
2018-08-01 -1
|
||||
2018-08-01 1
|
||||
2018-08-01 -1
|
||||
2018-08-01 1
|
||||
2018-08-01 18446744073709551615
|
||||
2018-08-01 1
|
||||
2018-08-01 18446744073709551615
|
||||
2018-08-01 1
|
||||
2018-08-01 1
|
||||
|
Loading…
Reference in New Issue
Block a user