MCPcopy Create free account
hub / github.com/ByConity/ByConity / executeTableFunction

Method executeTableFunction

src/Interpreters/Context.cpp:2070–2087  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2068
2069
2070StoragePtr Context::executeTableFunction(const ASTPtr & table_expression)
2071{
2072 /// Slightly suboptimal.
2073 auto hash = table_expression->getTreeHash();
2074 String key = toString(hash.first) + '_' + toString(hash.second);
2075
2076 StoragePtr & res = table_function_results[key];
2077
2078 if (!res)
2079 {
2080 TableFunctionPtr table_function_ptr = TableFunctionFactory::instance().get(table_expression, shared_from_this());
2081
2082 /// Run it and remember the result
2083 res = table_function_ptr->execute(table_expression, shared_from_this(), table_function_ptr->getName());
2084 }
2085
2086 return res;
2087}
2088
2089
2090void Context::addViewSource(const StoragePtr & storage)

Callers 7

visitTableScanNodeMethod · 0.80
TableScanStepMethod · 0.80
getLeftTableStorageMethod · 0.80
executeQueryImplFunction · 0.80
interpretSubqueryFunction · 0.80
analyzeTableFunctionMethod · 0.80

Calls 5

getTreeHashMethod · 0.80
toStringFunction · 0.70
getMethod · 0.45
executeMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected