MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / InterpreterInsertQuery

Method InterpreterInsertQuery

src/Interpreters/InterpreterInsertQuery.cpp:120–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120InterpreterInsertQuery::InterpreterInsertQuery(
121 const ASTPtr & query_ptr_, ContextMutablePtr context_, bool allow_materialized_, bool no_squash_, bool no_destination_, bool async_insert_)
122 : WithMutableContext(context_)
123 , logger(getLogger("InterpreterInsertQuery"))
124 , query_ptr(query_ptr_)
125 , allow_materialized(allow_materialized_)
126 , no_squash(no_squash_)
127 , no_destination(no_destination_)
128 , async_insert(async_insert_)
129{
130 checkStackSize();
131 if (auto quota = getContext()->getQuota())
132 quota->checkExceeded(QuotaType::WRITTEN_BYTES);
133
134 const Settings & settings = getContext()->getSettingsRef();
135 max_threads = getMaxThreadsForAvailableMemory(
136 std::max<size_t>(1, settings[Setting::max_threads]),
137 settings[Setting::max_threads_min_free_memory_per_thread]);
138 max_insert_threads = getMaxThreadsForAvailableMemory(
139 std::min(std::max<size_t>(1, settings[Setting::max_insert_threads]), max_threads),
140 settings[Setting::max_insert_threads_min_free_memory_per_thread]);
141}
142
143StoragePtr InterpreterInsertQuery::getTable(ASTInsertQuery & query)
144{

Callers

nothing calls this directly

Calls 7

checkStackSizeFunction · 0.85
getLoggerFunction · 0.70
getContextFunction · 0.50
minFunction · 0.50
getQuotaMethod · 0.45
checkExceededMethod · 0.45

Tested by

no test coverage detected