mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
update var name
This commit is contained in:
parent
df4db70bb8
commit
8221fcd5f1
@ -1171,8 +1171,8 @@ StorageWindowView::StorageWindowView(
|
||||
throw Exception(ErrorCodes::INCORRECT_QUERY, "SELECT query is not specified for {}", getName());
|
||||
|
||||
/// If the target table is not set, use inner target table
|
||||
inner_target_table = query.to_table_id.empty();
|
||||
if (inner_target_table && !query.storage)
|
||||
has_inner_target_table = query.to_table_id.empty();
|
||||
if (has_inner_target_table && !query.storage)
|
||||
throw Exception(
|
||||
"You must specify where to save results of a WindowView query: either ENGINE or an existing table in a TO clause",
|
||||
ErrorCodes::INCORRECT_QUERY);
|
||||
@ -1192,7 +1192,7 @@ StorageWindowView::StorageWindowView(
|
||||
inner_table_id = StorageID(getStorageID().database_name, generateInnerTableName(getStorageID()));
|
||||
inner_fetch_query = generateInnerFetchQuery(inner_table_id);
|
||||
|
||||
target_table_id = inner_target_table ? StorageID(table_id_.database_name, generateTargetTableName(table_id_)) : query.to_table_id;
|
||||
target_table_id = has_inner_target_table ? StorageID(table_id_.database_name, generateTargetTableName(table_id_)) : query.to_table_id;
|
||||
|
||||
if (is_proctime)
|
||||
next_fire_signal = getWindowUpperBound(std::time(nullptr));
|
||||
@ -1205,7 +1205,7 @@ StorageWindowView::StorageWindowView(
|
||||
InterpreterCreateQuery create_interpreter(inner_create_query, create_context);
|
||||
create_interpreter.setInternal(true);
|
||||
create_interpreter.execute();
|
||||
if (inner_target_table)
|
||||
if (has_inner_target_table)
|
||||
{
|
||||
/// create inner target table
|
||||
auto create_context = Context::createCopy(context_);
|
||||
@ -1621,7 +1621,7 @@ void StorageWindowView::dropInnerTableIfAny(bool no_delay, ContextPtr local_cont
|
||||
InterpreterDropQuery::executeDropQuery(
|
||||
ASTDropQuery::Kind::Drop, getContext(), local_context, inner_table_id, no_delay);
|
||||
|
||||
if (inner_target_table)
|
||||
if (has_inner_target_table)
|
||||
InterpreterDropQuery::executeDropQuery(ASTDropQuery::Kind::Drop, getContext(), local_context, target_table_id, no_delay);
|
||||
}
|
||||
catch (...)
|
||||
|
@ -201,7 +201,7 @@ private:
|
||||
std::atomic<bool> shutdown_called{false};
|
||||
std::atomic<bool> modifying_query{false};
|
||||
bool has_inner_table{true};
|
||||
bool inner_target_table{false};
|
||||
bool has_inner_target_table{false};
|
||||
mutable Block input_header;
|
||||
mutable Block output_header;
|
||||
UInt64 fire_signal_timeout_s;
|
||||
|
Loading…
Reference in New Issue
Block a user