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

Function getSubqueryContext

src/Interpreters/InterpreterSelectQuery.cpp:391–402  ·  view source on GitHub ↗

There are no limits on the maximum size of the result for the subquery. * Since the result of the query is not the result of the entire query. */

Source from the content-addressed store, hash-verified

389 * Since the result of the query is not the result of the entire query.
390 */
391ContextPtr getSubqueryContext(const ContextPtr & context)
392{
393 auto subquery_context = Context::createCopy(context);
394 Settings subquery_settings = context->getSettingsCopy();
395 subquery_settings[Setting::max_result_rows] = 0;
396 subquery_settings[Setting::max_result_bytes] = 0;
397 subquery_settings[Setting::implicit_table_at_top_level] = "";
398 /// The calculation of extremes does not make sense and is not necessary (if you do it, then the extremes of the subquery can be taken for whole query).
399 subquery_settings[Setting::extremes] = false;
400 subquery_context->setSettings(subquery_settings);
401 return subquery_context;
402}
403
404void rewriteMultipleJoins(ASTPtr & query, const TablesWithColumns & tables, const String & database, const Settings & settings)
405{

Callers 2

executeFetchColumnsMethod · 0.85

Calls 2

getSettingsCopyMethod · 0.80
setSettingsMethod · 0.45

Tested by

no test coverage detected