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

Method analyzeTableFunction

src/Analyzers/QueryAnalyzer.cpp:722–752  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

720}
721
722ScopePtr QueryAnalyzerVisitor::analyzeTableFunction(ASTFunction & table_function, const QualifiedName & column_prefix)
723{
724 // execute table function
725 StoragePtr storage = context->getQueryContext()->executeTableFunction(table_function.ptr());
726 StorageID storage_id = storage->getStorageID();
727 analysis.storage_results[&table_function]
728 = StorageAnalysis{.database = storage_id.getDatabaseName(), .table = storage_id.getTableName(), .storage = storage};
729
730 // get columns information
731 auto storage_metadata = storage->getInMemoryMetadataPtr();
732 const auto & columns_description = storage_metadata->getColumns();
733 FieldDescriptions field_descriptions;
734
735 for (const auto & column : columns_description.getAllPhysical())
736 {
737 field_descriptions.emplace_back(
738 column.name,
739 column.type,
740 column_prefix,
741 storage,
742 storage_metadata,
743 &table_function,
744 column.name,
745 field_descriptions.size(),
746 true);
747 }
748
749 const auto * table_function_scope = createScope(field_descriptions);
750 analysis.setScope(table_function, table_function_scope);
751 return table_function_scope;
752}
753
754ScopePtr QueryAnalyzerVisitor::analyzeJoin(
755 ASTTableJoin & table_join,

Callers

nothing calls this directly

Calls 12

executeTableFunctionMethod · 0.80
getAllPhysicalMethod · 0.80
setScopeMethod · 0.80
getQueryContextMethod · 0.45
ptrMethod · 0.45
getStorageIDMethod · 0.45
getDatabaseNameMethod · 0.45
getTableNameMethod · 0.45
getColumnsMethod · 0.45
emplace_backMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected