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

Function getDatabaseAndTable

src/Interpreters/DatabaseAndTableWithAlias.cpp:128–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126}
127
128std::optional<DatabaseAndTableWithAlias> getDatabaseAndTable(const ASTSelectQuery & select, size_t table_number)
129{
130 const ASTTableExpression * table_expression = getTableExpression(select, table_number);
131 if (!table_expression)
132 return {};
133
134 ASTPtr database_and_table_name = table_expression->database_and_table_name;
135 if (!database_and_table_name || !database_and_table_name->as<ASTTableIdentifier>())
136 return {};
137
138 return DatabaseAndTableWithAlias(database_and_table_name);
139}
140
141bool TableWithColumnNamesAndTypes::hasColumn(const String & name) const
142{

Callers 10

extractDependentTableFunction · 0.85
selectGroupMethod · 0.85
allocateMethod · 0.85
checkSampleMethod · 0.85
JoinedTablesMethod · 0.85
resetMethod · 0.85
isUnlimitedQueryFunction · 0.85

Calls 2

getTableExpressionFunction · 0.85

Tested by

no test coverage detected