mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Fix compile error
This commit is contained in:
parent
81b0fa2989
commit
a0083e23d6
@ -111,7 +111,7 @@ String getObjectDefinitionFromCreateQuery(const ASTPtr & query)
|
||||
create->replace_view = false;
|
||||
|
||||
/// For views it is necessary to save the SELECT query itself, for the rest - on the contrary
|
||||
if (!create->is_view && !create->is_materialized_view && !create->is_live_view)
|
||||
if (!create->isView())
|
||||
create->select = nullptr;
|
||||
|
||||
create->format = nullptr;
|
||||
|
@ -624,7 +624,7 @@ void InterpreterCreateQuery::setEngine(ASTCreateQuery & create) const
|
||||
|
||||
const String qualified_name = backQuoteIfNeed(as_database_name) + "." + backQuoteIfNeed(as_table_name);
|
||||
|
||||
if (as_create.is_view)
|
||||
if (as_create.is_ordinary_view)
|
||||
throw Exception(
|
||||
"Cannot CREATE a table AS " + qualified_name + ", it is a View",
|
||||
ErrorCodes::INCORRECT_QUERY);
|
||||
@ -1030,7 +1030,7 @@ AccessRightsElements InterpreterCreateQuery::getRequiredAccess() const
|
||||
{
|
||||
required_access.emplace_back(AccessType::CREATE_DICTIONARY, create.database, create.table);
|
||||
}
|
||||
else if (create.is_view || create.is_materialized_view || create.is_live_view)
|
||||
else if (create.isView())
|
||||
{
|
||||
if (create.temporary)
|
||||
required_access.emplace_back(AccessType::CREATE_TEMPORARY_TABLE);
|
||||
|
@ -231,7 +231,7 @@ void ASTCreateQuery::formatQueryImpl(const FormatSettings & settings, FormatStat
|
||||
if (!is_dictionary)
|
||||
{
|
||||
std::string what = "TABLE";
|
||||
if (is_view)
|
||||
if (is_ordinary_view)
|
||||
what = "VIEW";
|
||||
if (is_materialized_view)
|
||||
what = "MATERIALIZED VIEW";
|
||||
|
@ -91,7 +91,7 @@ public:
|
||||
return removeOnCluster<ASTCreateQuery>(clone(), new_database);
|
||||
}
|
||||
|
||||
bool isView() { return is_view || is_materialized_view || is_live_view; }
|
||||
bool isView() const { return is_ordinary_view || is_materialized_view || is_live_view; }
|
||||
|
||||
protected:
|
||||
void formatQueryImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
|
||||
|
@ -35,7 +35,7 @@ ASTPtr CreateViewQuery::convertToOld() const
|
||||
query->attach = attach;
|
||||
query->replace_view = replace;
|
||||
query->if_not_exists = if_not_exists;
|
||||
query->is_view = true;
|
||||
query->is_ordinary_view = true;
|
||||
query->cluster = cluster_name;
|
||||
|
||||
if (has(SCHEMA)) query->set(query->columns_list, get(SCHEMA)->convertToOld());
|
||||
|
Loading…
Reference in New Issue
Block a user