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
44using namespace duckdb;
45
46namespace duckdb {
47
48template class unique_ptr<SQLStatement>;
49template class unique_ptr<AlterStatement>;
50template class unique_ptr<CopyStatement>;
51template class unique_ptr<CreateStatement>;
52template class unique_ptr<DeleteStatement>;
53template class unique_ptr<DropStatement>;
54template class unique_ptr<InsertStatement>;
55template class unique_ptr<SelectStatement>;
56template class unique_ptr<TransactionStatement>;
57template class unique_ptr<UpdateStatement>;
58template class unique_ptr<PrepareStatement>;
59template class unique_ptr<ExecuteStatement>;
60template class unique_ptr<VacuumStatement>;
61template class unique_ptr<QueryNode>;
62template class unique_ptr<SelectNode>;
63template class unique_ptr<SetOperationNode>;
64template class unique_ptr<ParsedExpression>;
65template class unique_ptr<CaseExpression>;
66template class unique_ptr<CastExpression>;
67template class unique_ptr<ColumnRefExpression>;
68template class unique_ptr<ComparisonExpression>;
69template class unique_ptr<ConjunctionExpression>;
70template class unique_ptr<ConstantExpression>;
71template class unique_ptr<DefaultExpression>;
72template class unique_ptr<FunctionExpression>;
73template class unique_ptr<OperatorExpression>;
74template class unique_ptr<ParameterExpression>;
75template class unique_ptr<StarExpression>;
76template class unique_ptr<SubqueryExpression>;
77template class unique_ptr<WindowExpression>;
78template class unique_ptr<Constraint>;
79template class unique_ptr<NotNullConstraint>;
80template class unique_ptr<CheckConstraint>;
81template class unique_ptr<UniqueConstraint>;
82template class unique_ptr<ForeignKeyConstraint>;
83// template class unique_ptr<TableRef>;
84template class unique_ptr<BaseTableRef>;
85template class unique_ptr<JoinRef>;
86template class unique_ptr<SubqueryRef>;
87template class unique_ptr<TableFunctionRef>;
88template class unique_ptr<Pipeline>;
89template class unique_ptr<RowGroup>;
90template class unique_ptr<RowDataBlock>;
91template class unique_ptr<RowDataCollection>;
92template class unique_ptr<ColumnDataCollection>;
93template class unique_ptr<PartitionedColumnData>;
94template class unique_ptr<VacuumInfo>;
95
96template class unique_ptr<Expression>;
97template class unique_ptr<BoundQueryNode>;
98template class unique_ptr<BoundSelectNode>;
99template class unique_ptr<BoundSetOperationNode>;
100template class unique_ptr<BoundAggregateExpression>;
101template class unique_ptr<BoundCaseExpression>;
102template class unique_ptr<BoundCastExpression>;
103template class unique_ptr<BoundColumnRefExpression>;
104template class unique_ptr<BoundComparisonExpression>;
105template class unique_ptr<BoundConjunctionExpression>;
106template class unique_ptr<BoundConstantExpression>;
107template class unique_ptr<BoundDefaultExpression>;
108template class unique_ptr<BoundFunctionExpression>;
109template class unique_ptr<BoundOperatorExpression>;
110template class unique_ptr<BoundParameterExpression>;
111template class unique_ptr<BoundReferenceExpression>;
112template class unique_ptr<BoundSubqueryExpression>;
113template class unique_ptr<BoundWindowExpression>;
114template class unique_ptr<BoundBaseTableRef>;
115
116template class unique_ptr<CatalogEntry>;
117template class unique_ptr<BindContext>;
118template class unique_ptr<char[]>;
119template class unique_ptr<QueryResult>;
120template class unique_ptr<MaterializedQueryResult>;
121template class unique_ptr<StreamQueryResult>;
122template class unique_ptr<LogicalOperator>;
123template class unique_ptr<PhysicalOperator>;
124template class unique_ptr<OperatorState>;
125template class unique_ptr<sel_t[]>;
126template class unique_ptr<StringHeap>;
127template class unique_ptr<GroupedAggregateHashTable>;
128template class unique_ptr<TableRef>;
129template class unique_ptr<Transaction>;
130template class unique_ptr<uint64_t[]>;
131template class unique_ptr<data_t[]>;
132template class unique_ptr<Vector[]>;
133template class unique_ptr<DataChunk>;
134template class unique_ptr<JoinHashTable>;
135template class unique_ptr<JoinHashTable::ScanStructure>;
136template class unique_ptr<JoinHashTable::ProbeSpill>;
137template class unique_ptr<data_ptr_t[]>;
138template class unique_ptr<Rule>;
139template class unique_ptr<LogicalFilter>;
140template class unique_ptr<LogicalJoin>;
141template class unique_ptr<LogicalComparisonJoin>;
142template class unique_ptr<FilterInfo>;
143template class unique_ptr<JoinNode>;
144template class unique_ptr<SingleJoinRelation>;
145template class unique_ptr<CatalogSet>;
146template class unique_ptr<Binder>;
147template 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
162template class duckdb::vector<ExpressionType>;
163template class duckdb::vector<uint64_t>;
164template class duckdb::vector<string>;
165template class duckdb::vector<PhysicalType>;
166template class duckdb::vector<Value>;
167template class duckdb::vector<int>;
168template class duckdb::vector<duckdb::vector<Expression *>>;
169template class duckdb::vector<LogicalType>;
170
171INSTANTIATE_VECTOR(vector<ColumnDefinition>)
172INSTANTIATE_VECTOR(vector<JoinCondition>)
173INSTANTIATE_VECTOR(vector<OrderByNode>)
174INSTANTIATE_VECTOR(vector<Expression *>)
175INSTANTIATE_VECTOR(vector<BoundParameterExpression *>)
176INSTANTIATE_VECTOR(vector<unique_ptr<Expression>>)
177INSTANTIATE_VECTOR(vector<unique_ptr<DataChunk>>)
178INSTANTIATE_VECTOR(vector<unique_ptr<SQLStatement>>)
179INSTANTIATE_VECTOR(vector<unique_ptr<PhysicalOperator>>)
180INSTANTIATE_VECTOR(vector<unique_ptr<LogicalOperator>>)
181INSTANTIATE_VECTOR(vector<unique_ptr<Transaction>>)
182INSTANTIATE_VECTOR(vector<unique_ptr<JoinNode>>)
183INSTANTIATE_VECTOR(vector<unique_ptr<Rule>>)
184INSTANTIATE_VECTOR(vector<std::shared_ptr<Event>>)
185INSTANTIATE_VECTOR(vector<unique_ptr<Pipeline>>)
186INSTANTIATE_VECTOR(vector<std::shared_ptr<Pipeline>>)
187INSTANTIATE_VECTOR(vector<std::weak_ptr<Pipeline>>)
188INSTANTIATE_VECTOR(vector<std::shared_ptr<MetaPipeline>>)
189INSTANTIATE_VECTOR(vector<unique_ptr<JoinHashTable>>)
190INSTANTIATE_VECTOR(vector<unique_ptr<ColumnDataCollection>>)
191INSTANTIATE_VECTOR(vector<std::shared_ptr<ColumnDataAllocator>>)
192INSTANTIATE_VECTOR(vector<unique_ptr<RowDataBlock>>)
193
194template class std::shared_ptr<Relation>;
195template class std::shared_ptr<Event>;
196template class std::shared_ptr<Pipeline>;
197template class std::shared_ptr<MetaPipeline>;
198template class std::shared_ptr<RowGroupCollection>;
199template class std::shared_ptr<ColumnDataAllocator>;
200template class std::shared_ptr<PreparedStatementData>;
201template class std::weak_ptr<Pipeline>;
202
203#if !defined(__clang__)
204template struct std::atomic<uint64_t>;
205#endif
206
207template class std::bitset<STANDARD_VECTOR_SIZE>;
208template class std::unordered_map<PhysicalOperator *, QueryProfiler::TreeNode *>;
209template 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
216using catalog_map = std::unordered_map<string, unique_ptr<CatalogEntry>>;
217INSTANTIATE_UNORDERED_MAP(catalog_map)
218*/
219
220template class std::unordered_map<string, uint64_t>;
221template class std::unordered_map<string, vector<string>>;
222template class std::unordered_map<string, std::pair<uint64_t, Expression *>>;
223// template class std::unordered_map<string, TableBinding>;
224template class std::unordered_map<string, SelectStatement *>;
225template class std::unordered_map<uint64_t, uint64_t>;
226
227#endif
228