385782 {
385783 auto &column_name = colref.GetColumnName();
385785 bool success = false;
385786 success = TryGetBindingIndex(column_name, column_index);
385787 if (!success) {
385788 return BindResult(ColumnNotFoundError(column_name));
385789 }
385790 auto entry = GetStandardEntry();
385791 if (
entry && !IsVirtualColumn(column_index)) {
385792 D_ASSERT(
entry->type == CatalogType::TABLE_ENTRY);
385793
385794 auto &table_entry =
entry->Cast<TableCatalogEntry>();
385795 auto &column_entry = table_entry.GetColumn(LogicalIndex(column_index));
385796 (void)table_entry;
385797 (void)column_entry;
385798 D_ASSERT(column_entry.Category() == TableColumnType::STANDARD);
385799 }
385800
385801 LogicalType col_type;
385804
385805 col_type = ventry->second.type;
385806 } else {
385807
385808 col_type =
types[column_index];
385809 if (colref.GetAlias().empty()) {
385810 colref.SetAlias(
names[column_index]);
385811 }
385812 }
385813 ColumnBinding binding = GetColumnBinding(column_index);
385814 return BindResult(make_uniq<BoundColumnRefExpression>(colref.GetName(), col_type, binding, depth));
385815}
idx_t column_t
Type used for column identifiers.
Definition duckdb.hpp:259
vector< LogicalType > types
The types of the bound columns.
Definition duckdb.cpp:1345
vector< string > names
Column names of the subquery.
Definition duckdb.cpp:1347