Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::LogicalGet Class Reference

LogicalGet represents a scan operation from a data source. More...

Inheritance diagram for duckdb::LogicalGet:
Collaboration diagram for duckdb::LogicalGet:

Public Member Functions

 LogicalGet (idx_t table_index, TableFunction function, unique_ptr< FunctionData > bind_data, vector< LogicalType > returned_types, vector< string > returned_names, virtual_column_map_t virtual_columns=virtual_column_map_t())
string GetName () const override
InsertionOrderPreservingMap< string > ParamsToString () const override
optional_ptr< TableCatalogEntry > GetTable () const
 Returns the underlying table that is being scanned, or nullptr if there is none.
column_t GetAnyColumn () const
const LogicalType & GetColumnType (const ColumnIndex &column_index) const
const string & GetColumnName (const ColumnIndex &column_index) const
void SetColumnIds (vector< ColumnIndex > &&column_ids)
void AddColumnId (column_t column_id)
void ClearColumnIds ()
const vector< ColumnIndex > & GetColumnIds () const
vector< ColumnIndex > & GetMutableColumnIds ()
vector< ColumnBinding > GetColumnBindings () override
idx_t EstimateCardinality (ClientContext &context) override
bool TryGetStorageIndex (const ColumnIndex &column_index, StorageIndex &out_index) const
void SetScanOrder (unique_ptr< RowGroupOrderOptions > options)
vector< idx_t > GetTableIndex () const override
 Returns the set of table indexes of this operator.
bool SupportSerialization () const override
 Skips the serialization check in VerifyPlan.
void Serialize (Serializer &serializer) const override
Public Member Functions inherited from duckdb::LogicalOperator
 LogicalOperator (LogicalOperatorType type)
 LogicalOperator (LogicalOperatorType type, vector< unique_ptr< Expression > > expressions)
virtual idx_t GetRootIndex ()
void PrintColumnBindings ()
void ResolveOperatorTypes ()
 Resolve the types of the logical operator and its children.
virtual string ToString (ExplainFormat format=ExplainFormat::DEFAULT) const
DUCKDB_API void Print ()
virtual void Verify (ClientContext &context)
 Debug method: verify that the integrity of expressions & child nodes are maintained.
void AddChild (unique_ptr< LogicalOperator > child)
void SetEstimatedCardinality (idx_t _estimated_cardinality)
void SetParamsEstimatedCardinality (InsertionOrderPreservingMap< string > &result) const
virtual unique_ptr< LogicalOperator > Copy (ClientContext &context) const
virtual bool RequireOptimizer () const
virtual bool HasProjectionMap () const
template<class TARGET>
TARGET & Cast ()
template<class TARGET>
const TARGET & Cast () const

Static Public Member Functions

static unique_ptr< LogicalOperator > Deserialize (Deserializer &deserializer)
Static Public Member Functions inherited from duckdb::LogicalOperator
static string ColumnBindingsToString (const vector< ColumnBinding > &bindings)
static vector< ColumnBinding > GenerateColumnBindings (idx_t table_idx, idx_t column_count)
static vector< LogicalType > MapTypes (const vector< LogicalType > &types, const vector< idx_t > &projection_map)
static vector< ColumnBinding > MapBindings (const vector< ColumnBinding > &types, const vector< idx_t > &projection_map)
static unique_ptr< LogicalOperator > Deserialize (Deserializer &deserializer)

Public Attributes

idx_t table_index
 The table index in the current bind context.
TableFunction function
 The function that is called.
unique_ptr< FunctionData > bind_data
 The bind data of the function.
vector< LogicalType > returned_types
 The types of ALL columns that can be returned by the table function.
vector< string > names
 The names of ALL columns that can be returned by the table function.
virtual_column_map_t virtual_columns
 A mapping of column index -> type/name for all virtual columns.
vector< idx_t > projection_ids
 Columns that are used outside the scan.
TableFilterSet table_filters
 Filters pushed down for table scan.
vector< Value > parameters
 The set of input parameters for the table function.
named_parameter_map_t named_parameters
 The set of named input parameters for the table function.
vector< LogicalType > input_table_types
 The set of named input table types for the table-in table-out function.
vector< string > input_table_names
 The set of named input table names for the table-in table-out function.
vector< column_t > projected_input
 For a table-in-out function, the set of projected input columns.
ExtraOperatorInfo extra_info
shared_ptr< DynamicTableFilterSet > dynamic_filters
 Contains a reference to dynamically generated table filters (through e.g. a join up in the tree).
optional_idx ordinality_idx
 Information for WITH ORDINALITY.
unique_ptr< RowGroupOrderOptions > row_group_order_options
 Row group order options (if set).
Public Attributes inherited from duckdb::LogicalOperator
LogicalOperatorType type
 The type of the logical operator.
vector< unique_ptr< LogicalOperator > > children
 The set of children of the operator.
vector< unique_ptr< Expression > > expressions
 The set of expressions contained within the operator, if any.
vector< LogicalType > types
 The types returned by this logical operator. Set by calling LogicalOperator::ResolveTypes.
idx_t estimated_cardinality
 Estimated Cardinality.
bool has_estimated_cardinality

Static Public Attributes

static constexpr const LogicalOperatorType TYPE = LogicalOperatorType::LOGICAL_GET

Protected Member Functions

void ResolveTypes () override
 Resolve types for this specific operator.

Private Attributes

vector< ColumnIndex > column_ids
 Bound column IDs.

Detailed Description

LogicalGet represents a scan operation from a data source.

Constructor & Destructor Documentation

◆ LogicalGet() [1/2]

duckdb::LogicalGet::LogicalGet ( idx_t table_index,
TableFunction function,
unique_ptr< FunctionData > bind_data,
vector< LogicalType > returned_types,
vector< string > returned_names,
virtual_column_map_t virtual_columns = virtual_column_map_t() )
382226 : LogicalOperator(LogicalOperatorType::LOGICAL_GET), table_index(table_index), function(std::move(function)),
382227 bind_data(std::move(bind_data)), returned_types(std::move(returned_types)), names(std::move(returned_names)),
382228 virtual_columns(std::move(virtual_columns_p)), extra_info() {
382229}
TableFunction function
The function that is called.
Definition duckdb.cpp:12800
unique_ptr< FunctionData > bind_data
The bind data of the function.
Definition duckdb.cpp:12802
vector< LogicalType > returned_types
The types of ALL columns that can be returned by the table function.
Definition duckdb.cpp:12804
virtual_column_map_t virtual_columns
A mapping of column index -> type/name for all virtual columns.
Definition duckdb.cpp:12808
ExtraOperatorInfo extra_info
Definition duckdb.cpp:12826
idx_t table_index
The table index in the current bind context.
Definition duckdb.cpp:12798
vector< string > names
The names of ALL columns that can be returned by the table function.
Definition duckdb.cpp:12806

◆ LogicalGet() [2/2]

duckdb::LogicalGet::LogicalGet ( )
private
382220 : LogicalOperator(LogicalOperatorType::LOGICAL_GET) {
382221}

Member Function Documentation

◆ GetName()

string duckdb::LogicalGet::GetName ( ) const
overridevirtual

Reimplemented from duckdb::LogicalOperator.

382564 {
382565#ifdef DEBUG
382567 return StringUtil::Upper(function.name) + StringUtil::Format(" #%llu", table_index);
382568 }
382569#endif
382570 return StringUtil::Upper(function.name);
382571}
static string Format(const string fmt_str, ARGS... params)
Format a string using printf semantics.
Definition duckdb.hpp:4002
static DUCKDB_API string Upper(const string &str)
Convert a string to UPPERCASE.
Definition duckdb.cpp:109624
static bool debug_print_bindings
Whether to print bindings when printing the plan (debug mode only).
Definition duckdb.hpp:40040

◆ ParamsToString()

InsertionOrderPreservingMap< string > duckdb::LogicalGet::ParamsToString ( ) const
overridevirtual

Reimplemented from duckdb::LogicalOperator.

382238 {
382239 InsertionOrderPreservingMap<string> result;
382240
382241 string filters_info;
382242 bool first_item = true;
382243 for (auto &kv : table_filters.filters) {
382244 auto &column_index = kv.first;
382245 auto &filter = kv.second;
382246 if (column_index < names.size()) {
382247 if (!first_item) {
382248 filters_info += "\n";
382249 }
382250 first_item = false;
382251 filters_info += filter->ToString(names[column_index]);
382252 }
382253 }
382254 result["Filters"] = filters_info;
382255
382256 if (extra_info.sample_options) {
382257 result["Sample Method"] = "System: " + extra_info.sample_options->sample_size.ToString() + "%";
382258 }
382259
382260 if (!extra_info.file_filters.empty()) {
382261 result["File Filters"] = extra_info.file_filters;
382262 if (extra_info.filtered_files.IsValid() && extra_info.total_files.IsValid()) {
382263 result["Scanning Files"] = StringUtil::Format("%llu/%llu", extra_info.filtered_files.GetIndex(),
382264 extra_info.total_files.GetIndex());
382265 }
382266 }
382267
382268 if (function.to_string) {
382269 TableFunctionToStringInput input(function, bind_data.get());
382270 auto to_string_result = function.to_string(input);
382271 for (const auto &it : to_string_result) {
382272 result[it.first] = it.second;
382273 }
382274 }
382275 SetParamsEstimatedCardinality(result);
382276 return result;
382277}
TableFilterSet table_filters
Filters pushed down for table scan.
Definition duckdb.cpp:12812
void filter(InputArray image, InputArray kernel, OutputArray output)

◆ GetTable()

optional_ptr< TableCatalogEntry > duckdb::LogicalGet::GetTable ( ) const

Returns the underlying table that is being scanned, or nullptr if there is none.

382231 {
382232 if (!function.get_bind_info) {
382233 return nullptr;
382234 }
382235 return function.get_bind_info(bind_data.get()).table;
382236}
Here is the caller graph for this function:

◆ GetAnyColumn()

column_t duckdb::LogicalGet::GetAnyColumn ( ) const

Returns any column to query - preferably the cheapest column This is used when we are running e.g. a COUNT(*) and don't care about the contents of any columns in the table

382351 {
382352 auto entry = virtual_columns.find(COLUMN_IDENTIFIER_EMPTY);
382353 if (entry != virtual_columns.end()) {
382354 // return the empty column if the projection supports it
382356 }
382358 if (entry != virtual_columns.end()) {
382359 // return the rowid column if the projection supports it
382361 }
382362 // otherwise return the first column
382363 return 0;
382364}
const column_t COLUMN_IDENTIFIER_EMPTY
Special value used to signify an empty column (used for e.g. COUNT(*)).
Definition duckdb.cpp:50304
const column_t COLUMN_IDENTIFIER_ROW_ID
Special value used to signify the ROW ID of a table.
Definition duckdb.cpp:50303
Here is the caller graph for this function:

◆ GetColumnType()

const LogicalType & duckdb::LogicalGet::GetColumnType ( const ColumnIndex & column_index) const
382326 {
382327 if (index.IsVirtualColumn()) {
382328 auto entry = virtual_columns.find(index.GetPrimaryIndex());
382329 if (entry == virtual_columns.end()) {
382330 throw InternalException("Failed to find referenced virtual column %d", index.GetPrimaryIndex());
382331 }
382332 return entry->second.type;
382333 } else if (index.HasType()) {
382334 return index.GetScanType();
382335 } else {
382336 return returned_types[index.GetPrimaryIndex()];
382337 }
382338}
index

◆ GetColumnName()

const string & duckdb::LogicalGet::GetColumnName ( const ColumnIndex & column_index) const
382340 {
382341 if (index.IsVirtualColumn()) {
382342 auto entry = virtual_columns.find(index.GetPrimaryIndex());
382343 if (entry == virtual_columns.end()) {
382344 throw InternalException("Failed to find referenced virtual column %d", index.GetPrimaryIndex());
382345 }
382346 return entry->second.name;
382347 }
382348 return names[index.GetPrimaryIndex()];
382349}

◆ SetColumnIds()

void duckdb::LogicalGet::SetColumnIds ( vector< ColumnIndex > && column_ids)
382279 {
382280 this->column_ids = std::move(column_ids);
382281}
vector< ColumnIndex > column_ids
Bound column IDs.
Definition duckdb.cpp:12873

◆ AddColumnId()

void duckdb::LogicalGet::AddColumnId ( column_t column_id)
382283 {
382284 column_ids.emplace_back(column_id);
382285}

◆ ClearColumnIds()

void duckdb::LogicalGet::ClearColumnIds ( )
382287 {
382288 column_ids.clear();
382289}

◆ GetColumnIds()

const vector< ColumnIndex > & duckdb::LogicalGet::GetColumnIds ( ) const
382291 {
382292 return column_ids;
382293}

◆ GetMutableColumnIds()

vector< ColumnIndex > & duckdb::LogicalGet::GetMutableColumnIds ( )
382295 {
382296 return column_ids;
382297}

◆ GetColumnBindings()

vector< ColumnBinding > duckdb::LogicalGet::GetColumnBindings ( )
overridevirtual

Reimplemented from duckdb::LogicalOperator.

382299 {
382300 if (column_ids.empty()) {
382301 return {ColumnBinding(table_index, 0)};
382302 }
382303 vector<ColumnBinding> result;
382304 if (projection_ids.empty()) {
382305 for (idx_t col_idx = 0; col_idx < column_ids.size(); col_idx++) {
382306 result.emplace_back(table_index, col_idx);
382307 }
382308 } else {
382309 for (auto proj_id : projection_ids) {
382310 result.emplace_back(table_index, proj_id);
382311 }
382312 }
382313 if (!projected_input.empty()) {
382314 if (children.size() != 1) {
382315 throw InternalException("LogicalGet::project_input can only be set for table-in-out functions");
382316 }
382317 auto child_bindings = children[0]->GetColumnBindings();
382318 for (auto entry : projected_input) {
382319 D_ASSERT(entry < child_bindings.size());
382320 result.emplace_back(child_bindings[entry]);
382321 }
382322 }
382323 return result;
382324}
vector< idx_t > projection_ids
Columns that are used outside the scan.
Definition duckdb.cpp:12810
vector< column_t > projected_input
For a table-in-out function, the set of projected input columns.
Definition duckdb.cpp:12822
vector< unique_ptr< LogicalOperator > > children
The set of children of the operator.
Definition duckdb.hpp:21262
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237

◆ EstimateCardinality()

idx_t duckdb::LogicalGet::EstimateCardinality ( ClientContext & context)
overridevirtual

Reimplemented from duckdb::LogicalOperator.

382418 {
382419 // join order optimizer does better cardinality estimation.
382420 if (has_estimated_cardinality) {
382421 return estimated_cardinality;
382422 }
382423 if (function.cardinality) {
382424 auto node_stats = function.cardinality(context, bind_data.get());
382425 if (node_stats && node_stats->has_estimated_cardinality) {
382426 return node_stats->estimated_cardinality;
382427 }
382428 }
382429 if (!children.empty()) {
382430 return children[0]->EstimateCardinality(context);
382431 }
382432 return 1;
382433}
idx_t estimated_cardinality
Estimated Cardinality.
Definition duckdb.hpp:21268

◆ TryGetStorageIndex()

bool duckdb::LogicalGet::TryGetStorageIndex ( const ColumnIndex & column_index,
StorageIndex & out_index ) const

If there's no table we assume there's no mismatch between logical/storage index

This is a generated column, can't use the row group pruner

382393 {
382394 if (column_index.IsRowIdColumn()) {
382395 return false;
382396 }
382397 if (column_index.IsVirtualColumn()) {
382398 return false;
382399 }
382400
382401 auto table = GetTable();
382402 if (!table) {
382405 out_index = StorageIndex::FromColumnIndex(column_index);
382406 return true;
382407 }
382408
382409 auto &column = table->GetColumn(LogicalIndex(column_index.GetPrimaryIndex()));
382410 if (column.Generated()) {
382412 return false;
382413 }
382414 out_index = table->GetStorageIndex(column_index);
382415 return true;
382416}
optional_ptr< TableCatalogEntry > GetTable() const
Returns the underlying table that is being scanned, or nullptr if there is none.
Definition duckdb.cpp:382231
Here is the call graph for this function:

◆ SetScanOrder()

void duckdb::LogicalGet::SetScanOrder ( unique_ptr< RowGroupOrderOptions > options)
382435 {
382436 if (!function.set_scan_order) {
382437 throw InternalException("LogicalGet::SetScanOrder called but function does not have scan order defined");
382438 }
382439 row_group_order_options = make_uniq<RowGroupOrderOptions>(*options);
382440 function.set_scan_order(std::move(options), bind_data.get());
382441}
unique_ptr< RowGroupOrderOptions > row_group_order_options
Row group order options (if set).
Definition duckdb.cpp:12832

◆ GetTableIndex()

vector< idx_t > duckdb::LogicalGet::GetTableIndex ( ) const
overridevirtual

Returns the set of table indexes of this operator.

Reimplemented from duckdb::LogicalOperator.

382560 {
382561 return vector<idx_t> {table_index};
382562}

◆ SupportSerialization()

bool duckdb::LogicalGet::SupportSerialization ( ) const
inlineoverridevirtual

Skips the serialization check in VerifyPlan.

Reimplemented from duckdb::LogicalOperator.

12858 {
12859 return function.verify_serialization;
12860 }

◆ Serialize()

void duckdb::LogicalGet::Serialize ( Serializer & serializer) const
overridevirtual

Reimplemented from duckdb::LogicalOperator.

382443 {
382444 LogicalOperator::Serialize(serializer);
382445 serializer.WriteProperty(200, "table_index", table_index);
382446 serializer.WriteProperty(201, "returned_types", returned_types);
382447 serializer.WriteProperty(202, "names", names);
382448 /* [Deleted] (vector<column_t>) "column_ids" */
382449 serializer.WriteProperty(204, "projection_ids", projection_ids);
382450 serializer.WriteProperty(205, "table_filters", table_filters);
382451 FunctionSerializer::Serialize(serializer, function, bind_data.get());
382452 if (!function.serialize) {
382453 D_ASSERT(!function.serialize);
382454 // no serialize method: serialize input values and named_parameters for rebinding purposes
382455 serializer.WriteProperty(206, "parameters", parameters);
382456 serializer.WriteProperty(207, "named_parameters", named_parameters);
382457 serializer.WriteProperty(208, "input_table_types", input_table_types);
382458 serializer.WriteProperty(209, "input_table_names", input_table_names);
382459 }
382460 serializer.WriteProperty(210, "projected_input", projected_input);
382461 serializer.WritePropertyWithDefault(211, "column_indexes", column_ids);
382462 serializer.WritePropertyWithDefault(212, "extra_info", extra_info, ExtraOperatorInfo {});
382463 serializer.WritePropertyWithDefault<optional_idx>(213, "ordinality_idx", ordinality_idx);
382464 serializer.WritePropertyWithDefault<unique_ptr<RowGroupOrderOptions>>(214, "row_group_order_options",
382466}
vector< LogicalType > input_table_types
The set of named input table types for the table-in table-out function.
Definition duckdb.cpp:12818
named_parameter_map_t named_parameters
The set of named input parameters for the table function.
Definition duckdb.cpp:12816
optional_idx ordinality_idx
Information for WITH ORDINALITY.
Definition duckdb.cpp:12830
vector< Value > parameters
The set of input parameters for the table function.
Definition duckdb.cpp:12814
vector< string > input_table_names
The set of named input table names for the table-in table-out function.
Definition duckdb.cpp:12820

◆ Deserialize()

unique_ptr< LogicalOperator > duckdb::LogicalGet::Deserialize ( Deserializer & deserializer)
static
382468 {
382469 vector<column_t> legacy_column_ids;
382470
382471 auto result = unique_ptr<LogicalGet>(new LogicalGet());
382472 deserializer.ReadProperty(200, "table_index", result->table_index);
382473 deserializer.ReadProperty(201, "returned_types", result->returned_types);
382474 deserializer.ReadProperty(202, "names", result->names);
382475 deserializer.ReadPropertyWithDefault(203, "column_ids", legacy_column_ids);
382476 deserializer.ReadProperty(204, "projection_ids", result->projection_ids);
382477 deserializer.ReadProperty(205, "table_filters", result->table_filters);
382478 auto entry = FunctionSerializer::DeserializeBase<TableFunction, TableFunctionCatalogEntry>(
382479 deserializer, CatalogType::TABLE_FUNCTION_ENTRY);
382480 result->function = entry.first;
382481 auto &function = result->function;
382482 auto has_serialize = entry.second;
382483 unique_ptr<FunctionData> bind_data;
382484 if (!has_serialize) {
382485 deserializer.ReadProperty(206, "parameters", result->parameters);
382486 deserializer.ReadProperty(207, "named_parameters", result->named_parameters);
382487 deserializer.ReadProperty(208, "input_table_types", result->input_table_types);
382488 deserializer.ReadProperty(209, "input_table_names", result->input_table_names);
382489 } else {
382490 bind_data = FunctionSerializer::FunctionDeserialize(deserializer, function);
382491 }
382492 deserializer.ReadProperty(210, "projected_input", result->projected_input);
382493 deserializer.ReadPropertyWithDefault(211, "column_indexes", result->column_ids);
382494 result->extra_info = deserializer.ReadPropertyWithExplicitDefault<ExtraOperatorInfo>(212, "extra_info", {});
382495 deserializer.ReadPropertyWithDefault<optional_idx>(213, "ordinality_idx", result->ordinality_idx);
382497 deserializer.ReadPropertyWithDefault<unique_ptr<RowGroupOrderOptions>>(214, "row_group_order_options");
382498 if (!legacy_column_ids.empty()) {
382499 if (!result->column_ids.empty()) {
382500 throw SerializationException(
382501 "LogicalGet::Deserialize - either column_ids or column_indexes should be set - not both");
382502 }
382503 for (auto &col_id : legacy_column_ids) {
382504 result->column_ids.emplace_back(col_id);
382505 }
382506 }
382507 auto &context = deserializer.Get<ClientContext &>();
382508 virtual_column_map_t virtual_columns;
382509 if (!has_serialize) {
382510 TableFunctionRef empty_ref;
382511 TableFunctionBindInput input(result->parameters, result->named_parameters, result->input_table_types,
382512 result->input_table_names, function.function_info.get(), nullptr, result->function,
382513 empty_ref);
382514
382515 vector<LogicalType> bind_return_types;
382516 vector<string> bind_names;
382517 if (!function.bind) {
382518 throw InternalException("Table function \"%s\" has neither bind nor (de)serialize", function.name);
382519 }
382520 bind_data = function.bind(context, input, bind_return_types, bind_names);
382521 if (result->ordinality_idx.IsValid()) {
382522 auto ordinality_pos = bind_return_types.begin() + NumericCast<int64_t>(result->ordinality_idx.GetIndex());
382523 bind_return_types.emplace(ordinality_pos, LogicalType::BIGINT);
382524 }
382525 if (function.get_virtual_columns) {
382526 virtual_columns = function.get_virtual_columns(context, bind_data.get());
382527 }
382528 for (auto &col_id : result->column_ids) {
382529 if (col_id.IsVirtualColumn()) {
382530 auto idx = col_id.GetPrimaryIndex();
382531 auto ventry = virtual_columns.find(idx);
382532 if (ventry == virtual_columns.end()) {
382533 throw SerializationException(
382534 "Table function deserialization failure - could not find virtual column with id %d", idx);
382535 }
382536 } else {
382537 auto idx = col_id.GetPrimaryIndex();
382538 auto &ret_type = result->returned_types[idx];
382539 auto &col_name = result->names[idx];
382540 if (bind_return_types[idx] != ret_type) {
382541 throw SerializationException(
382542 "Table function deserialization failure in function \"%s\" - column with "
382543 "name %s was serialized with type %s, but now has type %s",
382544 function.name, col_name, ret_type, bind_return_types[idx]);
382545 }
382546 }
382547 }
382548 result->returned_types = std::move(bind_return_types);
382549 } else if (function.get_virtual_columns) {
382550 virtual_columns = function.get_virtual_columns(context, bind_data.get());
382551 }
382552 result->virtual_columns = std::move(virtual_columns);
382553 result->bind_data = std::move(bind_data);
382555 result->SetScanOrder(std::move(row_group_order_options));
382556 }
382557 return std::move(result);
382558}

◆ ResolveTypes()

void duckdb::LogicalGet::ResolveTypes ( )
overrideprotectedvirtual

Resolve types for this specific operator.

Implements duckdb::LogicalOperator.

382366 {
382367 if (column_ids.empty()) {
382368 // no projection - we need to push a column
382369 column_ids.emplace_back(GetAnyColumn());
382370 }
382371 types.clear();
382372 if (projection_ids.empty()) {
382373 for (auto &index : column_ids) {
382374 types.push_back(GetColumnType(index));
382375 }
382376 } else {
382377 for (auto &proj_index : projection_ids) {
382378 auto &index = column_ids[proj_index];
382379 types.push_back(GetColumnType(index));
382380 }
382381 }
382382 if (!projected_input.empty()) {
382383 if (children.size() != 1) {
382384 throw InternalException("LogicalGet::project_input can only be set for table-in-out functions");
382385 }
382386 for (auto entry : projected_input) {
382387 D_ASSERT(entry < children[0]->types.size());
382388 types.push_back(children[0]->types[entry]);
382389 }
382390 }
382391}
column_t GetAnyColumn() const
Definition duckdb.cpp:382351
vector< LogicalType > types
The types returned by this logical operator. Set by calling LogicalOperator::ResolveTypes.
Definition duckdb.hpp:21266
Here is the call graph for this function:

Member Data Documentation

◆ extra_info

ExtraOperatorInfo duckdb::LogicalGet::extra_info

Currently stores File Filters (as strings) applied by hive partitioning/complex filter pushdown and sample rate pushed down into the table scan Stored so the can be included in explain output


The documentation for this class was generated from the following file: