| 1 | // this file is used to instantiate symbols for LLDB so e.g. |
| 2 | // vector and unique_ptr can be accessed from the debugger |
| 3 | |
| 4 | #ifdef DEBUG |
| 5 | |
| 6 | #include "duckdb/catalog/catalog.hpp" |
| 7 | #include "duckdb/catalog/catalog_entry/list.hpp" |
| 8 | #include "duckdb/common/types/chunk_collection.hpp" |
| 9 | #include "duckdb/common/vector.hpp" |
| 10 | #include "duckdb/execution/aggregate_hashtable.hpp" |
| 11 | #include "duckdb/execution/column_binding_resolver.hpp" |
| 12 | #include "duckdb/execution/join_hashtable.hpp" |
| 13 | #include "duckdb/execution/physical_operator.hpp" |
| 14 | #include "duckdb/main/materialized_query_result.hpp" |
| 15 | #include "duckdb/main/query_profiler.hpp" |
| 16 | #include "duckdb/main/query_result.hpp" |
| 17 | #include "duckdb/main/relation.hpp" |
| 18 | #include "duckdb/main/stream_query_result.hpp" |
| 19 | #include "duckdb/optimizer/join_order/join_order_optimizer.hpp" |
| 20 | #include "duckdb/optimizer/rule.hpp" |
| 21 | #include "duckdb/parallel/pipeline.hpp" |
| 22 | #include "duckdb/parallel/meta_pipeline.hpp" |
| 23 | #include "duckdb/parser/constraint.hpp" |
| 24 | #include "duckdb/parser/constraints/list.hpp" |
| 25 | #include "duckdb/parser/expression/list.hpp" |
| 26 | #include "duckdb/parser/query_node.hpp" |
| 27 | #include "duckdb/parser/query_node/select_node.hpp" |
| 28 | #include "duckdb/parser/query_node/set_operation_node.hpp" |
| 29 | #include "duckdb/parser/statement/list.hpp" |
| 30 | #include "duckdb/parser/tableref/list.hpp" |
| 31 | #include "duckdb/planner/expression/list.hpp" |
| 32 | #include "duckdb/planner/logical_operator.hpp" |
| 33 | #include "duckdb/planner/operator/list.hpp" |
| 34 | #include "duckdb/planner/operator/logical_join.hpp" |
| 35 | #include "duckdb/planner/query_node/bound_select_node.hpp" |
| 36 | #include "duckdb/planner/query_node/bound_set_operation_node.hpp" |
| 37 | #include "duckdb/storage/data_table.hpp" |
| 38 | #include "duckdb/storage/write_ahead_log.hpp" |
| 39 | #include "duckdb/transaction/transaction.hpp" |
| 40 | #include "duckdb/common/types/column/column_data_collection.hpp" |
| 41 | #include "duckdb/common/types/column/column_data_allocator.hpp" |
| 42 | #include "duckdb/common/vector.hpp" |
| 43 | |
| 44 | using namespace duckdb; |
| 45 | |
| 46 | namespace duckdb { |
| 47 | |
| 48 | template class unique_ptr<SQLStatement>; |
| 49 | template class unique_ptr<AlterStatement>; |
| 50 | template class unique_ptr<CopyStatement>; |
| 51 | template class unique_ptr<CreateStatement>; |
| 52 | template class unique_ptr<DeleteStatement>; |
| 53 | template class unique_ptr<DropStatement>; |
| 54 | template class unique_ptr<InsertStatement>; |
| 55 | template class unique_ptr<SelectStatement>; |
| 56 | template class unique_ptr<TransactionStatement>; |
| 57 | template class unique_ptr<UpdateStatement>; |
| 58 | template class unique_ptr<PrepareStatement>; |
| 59 | template class unique_ptr<ExecuteStatement>; |
| 60 | template class unique_ptr<VacuumStatement>; |
| 61 | template class unique_ptr<QueryNode>; |
| 62 | template class unique_ptr<SelectNode>; |
| 63 | template class unique_ptr<SetOperationNode>; |
| 64 | template class unique_ptr<ParsedExpression>; |
| 65 | template class unique_ptr<CaseExpression>; |
| 66 | template class unique_ptr<CastExpression>; |
| 67 | template class unique_ptr<ColumnRefExpression>; |
| 68 | template class unique_ptr<ComparisonExpression>; |
| 69 | template class unique_ptr<ConjunctionExpression>; |
| 70 | template class unique_ptr<ConstantExpression>; |
| 71 | template class unique_ptr<DefaultExpression>; |
| 72 | template class unique_ptr<FunctionExpression>; |
| 73 | template class unique_ptr<OperatorExpression>; |
| 74 | template class unique_ptr<ParameterExpression>; |
| 75 | template class unique_ptr<StarExpression>; |
| 76 | template class unique_ptr<SubqueryExpression>; |
| 77 | template class unique_ptr<WindowExpression>; |
| 78 | template class unique_ptr<Constraint>; |
| 79 | template class unique_ptr<NotNullConstraint>; |
| 80 | template class unique_ptr<CheckConstraint>; |
| 81 | template class unique_ptr<UniqueConstraint>; |
| 82 | template class unique_ptr<ForeignKeyConstraint>; |
| 83 | // template class unique_ptr<TableRef>; |
| 84 | template class unique_ptr<BaseTableRef>; |
| 85 | template class unique_ptr<JoinRef>; |
| 86 | template class unique_ptr<SubqueryRef>; |
| 87 | template class unique_ptr<TableFunctionRef>; |
| 88 | template class unique_ptr<Pipeline>; |
| 89 | template class unique_ptr<RowGroup>; |
| 90 | template class unique_ptr<RowDataBlock>; |
| 91 | template class unique_ptr<RowDataCollection>; |
| 92 | template class unique_ptr<ColumnDataCollection>; |
| 93 | template class unique_ptr<PartitionedColumnData>; |
| 94 | template class unique_ptr<VacuumInfo>; |
| 95 | |
| 96 | template class unique_ptr<Expression>; |
| 97 | template class unique_ptr<BoundQueryNode>; |
| 98 | template class unique_ptr<BoundSelectNode>; |
| 99 | template class unique_ptr<BoundSetOperationNode>; |
| 100 | template class unique_ptr<BoundAggregateExpression>; |
| 101 | template class unique_ptr<BoundCaseExpression>; |
| 102 | template class unique_ptr<BoundCastExpression>; |
| 103 | template class unique_ptr<BoundColumnRefExpression>; |
| 104 | template class unique_ptr<BoundComparisonExpression>; |
| 105 | template class unique_ptr<BoundConjunctionExpression>; |
| 106 | template class unique_ptr<BoundConstantExpression>; |
| 107 | template class unique_ptr<BoundDefaultExpression>; |
| 108 | template class unique_ptr<BoundFunctionExpression>; |
| 109 | template class unique_ptr<BoundOperatorExpression>; |
| 110 | template class unique_ptr<BoundParameterExpression>; |
| 111 | template class unique_ptr<BoundReferenceExpression>; |
| 112 | template class unique_ptr<BoundSubqueryExpression>; |
| 113 | template class unique_ptr<BoundWindowExpression>; |
| 114 | template class unique_ptr<BoundBaseTableRef>; |
| 115 | |
| 116 | template class unique_ptr<CatalogEntry>; |
| 117 | template class unique_ptr<BindContext>; |
| 118 | template class unique_ptr<char[]>; |
| 119 | template class unique_ptr<QueryResult>; |
| 120 | template class unique_ptr<MaterializedQueryResult>; |
| 121 | template class unique_ptr<StreamQueryResult>; |
| 122 | template class unique_ptr<LogicalOperator>; |
| 123 | template class unique_ptr<PhysicalOperator>; |
| 124 | template class unique_ptr<OperatorState>; |
| 125 | template class unique_ptr<sel_t[]>; |
| 126 | template class unique_ptr<StringHeap>; |
| 127 | template class unique_ptr<GroupedAggregateHashTable>; |
| 128 | template class unique_ptr<TableRef>; |
| 129 | template class unique_ptr<Transaction>; |
| 130 | template class unique_ptr<uint64_t[]>; |
| 131 | template class unique_ptr<data_t[]>; |
| 132 | template class unique_ptr<Vector[]>; |
| 133 | template class unique_ptr<DataChunk>; |
| 134 | template class unique_ptr<JoinHashTable>; |
| 135 | template class unique_ptr<JoinHashTable::ScanStructure>; |
| 136 | template class unique_ptr<JoinHashTable::ProbeSpill>; |
| 137 | template class unique_ptr<data_ptr_t[]>; |
| 138 | template class unique_ptr<Rule>; |
| 139 | template class unique_ptr<LogicalFilter>; |
| 140 | template class unique_ptr<LogicalJoin>; |
| 141 | template class unique_ptr<LogicalComparisonJoin>; |
| 142 | template class unique_ptr<FilterInfo>; |
| 143 | template class unique_ptr<JoinNode>; |
| 144 | template class unique_ptr<SingleJoinRelation>; |
| 145 | template class unique_ptr<CatalogSet>; |
| 146 | template class unique_ptr<Binder>; |
| 147 | template class unique_ptr<PrivateAllocatorData>; |
| 148 | |
| 149 | } // namespace duckdb |
| 150 | |
| 151 | #define INSTANTIATE_VECTOR(VECTOR_DEFINITION) \ |
| 152 | template std::VECTOR_DEFINITION::size_type std::VECTOR_DEFINITION::size() const; \ |
| 153 | template std::VECTOR_DEFINITION::const_reference std::VECTOR_DEFINITION::operator[]( \ |
| 154 | std::VECTOR_DEFINITION::size_type n) const; \ |
| 155 | template std::VECTOR_DEFINITION::reference std::VECTOR_DEFINITION::operator[]( \ |
| 156 | std::VECTOR_DEFINITION::size_type n); \ |
| 157 | template std::VECTOR_DEFINITION::const_reference std::VECTOR_DEFINITION::back() const; \ |
| 158 | template std::VECTOR_DEFINITION::reference std::VECTOR_DEFINITION::back(); \ |
| 159 | template std::VECTOR_DEFINITION::const_reference std::VECTOR_DEFINITION::front() const; \ |
| 160 | template std::VECTOR_DEFINITION::reference std::VECTOR_DEFINITION::front(); |
| 161 | |
| 162 | template class duckdb::vector<ExpressionType>; |
| 163 | template class duckdb::vector<uint64_t>; |
| 164 | template class duckdb::vector<string>; |
| 165 | template class duckdb::vector<PhysicalType>; |
| 166 | template class duckdb::vector<Value>; |
| 167 | template class duckdb::vector<int>; |
| 168 | template class duckdb::vector<duckdb::vector<Expression *>>; |
| 169 | template class duckdb::vector<LogicalType>; |
| 170 | |
| 171 | INSTANTIATE_VECTOR(vector<ColumnDefinition>) |
| 172 | INSTANTIATE_VECTOR(vector<JoinCondition>) |
| 173 | INSTANTIATE_VECTOR(vector<OrderByNode>) |
| 174 | INSTANTIATE_VECTOR(vector<Expression *>) |
| 175 | INSTANTIATE_VECTOR(vector<BoundParameterExpression *>) |
| 176 | INSTANTIATE_VECTOR(vector<unique_ptr<Expression>>) |
| 177 | INSTANTIATE_VECTOR(vector<unique_ptr<DataChunk>>) |
| 178 | INSTANTIATE_VECTOR(vector<unique_ptr<SQLStatement>>) |
| 179 | INSTANTIATE_VECTOR(vector<unique_ptr<PhysicalOperator>>) |
| 180 | INSTANTIATE_VECTOR(vector<unique_ptr<LogicalOperator>>) |
| 181 | INSTANTIATE_VECTOR(vector<unique_ptr<Transaction>>) |
| 182 | INSTANTIATE_VECTOR(vector<unique_ptr<JoinNode>>) |
| 183 | INSTANTIATE_VECTOR(vector<unique_ptr<Rule>>) |
| 184 | INSTANTIATE_VECTOR(vector<std::shared_ptr<Event>>) |
| 185 | INSTANTIATE_VECTOR(vector<unique_ptr<Pipeline>>) |
| 186 | INSTANTIATE_VECTOR(vector<std::shared_ptr<Pipeline>>) |
| 187 | INSTANTIATE_VECTOR(vector<std::weak_ptr<Pipeline>>) |
| 188 | INSTANTIATE_VECTOR(vector<std::shared_ptr<MetaPipeline>>) |
| 189 | INSTANTIATE_VECTOR(vector<unique_ptr<JoinHashTable>>) |
| 190 | INSTANTIATE_VECTOR(vector<unique_ptr<ColumnDataCollection>>) |
| 191 | INSTANTIATE_VECTOR(vector<std::shared_ptr<ColumnDataAllocator>>) |
| 192 | INSTANTIATE_VECTOR(vector<unique_ptr<RowDataBlock>>) |
| 193 | |
| 194 | template class std::shared_ptr<Relation>; |
| 195 | template class std::shared_ptr<Event>; |
| 196 | template class std::shared_ptr<Pipeline>; |
| 197 | template class std::shared_ptr<MetaPipeline>; |
| 198 | template class std::shared_ptr<RowGroupCollection>; |
| 199 | template class std::shared_ptr<ColumnDataAllocator>; |
| 200 | template class std::shared_ptr<PreparedStatementData>; |
| 201 | template class std::weak_ptr<Pipeline>; |
| 202 | |
| 203 | #if !defined(__clang__) |
| 204 | template struct std::atomic<uint64_t>; |
| 205 | #endif |
| 206 | |
| 207 | template class std::bitset<STANDARD_VECTOR_SIZE>; |
| 208 | template class std::unordered_map<PhysicalOperator *, QueryProfiler::TreeNode *>; |
| 209 | template class std::stack<PhysicalOperator *>; |
| 210 | |
| 211 | /* -pedantic does not like this |
| 212 | #define INSTANTIATE_UNORDERED_MAP(MAP_DEFINITION) \ |
| 213 | template MAP_DEFINITION::mapped_type &MAP_DEFINITION::operator[](MAP_DEFINITION::key_type &&k); \ |
| 214 | template MAP_DEFINITION::mapped_type &MAP_DEFINITION::operator[](const MAP_DEFINITION::key_type &k); |
| 215 | |
| 216 | using catalog_map = std::unordered_map<string, unique_ptr<CatalogEntry>>; |
| 217 | INSTANTIATE_UNORDERED_MAP(catalog_map) |
| 218 | */ |
| 219 | |
| 220 | template class std::unordered_map<string, uint64_t>; |
| 221 | template class std::unordered_map<string, vector<string>>; |
| 222 | template class std::unordered_map<string, std::pair<uint64_t, Expression *>>; |
| 223 | // template class std::unordered_map<string, TableBinding>; |
| 224 | template class std::unordered_map<string, SelectStatement *>; |
| 225 | template class std::unordered_map<uint64_t, uint64_t>; |
| 226 | |
| 227 | #endif |
| 228 | |