1// this file is used to instantiate symbols for LLDB so e.g.
2// std::vector and std::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/execution/aggregate_hashtable.hpp"
10#include "duckdb/execution/column_binding_resolver.hpp"
11#include "duckdb/execution/join_hashtable.hpp"
12#include "duckdb/execution/physical_operator.hpp"
13#include "duckdb/main/materialized_query_result.hpp"
14#include "duckdb/main/query_profiler.hpp"
15#include "duckdb/main/query_result.hpp"
16#include "duckdb/main/stream_query_result.hpp"
17#include "duckdb/main/relation.hpp"
18#include "duckdb/optimizer/join_order_optimizer.hpp"
19#include "duckdb/optimizer/rule.hpp"
20#include "duckdb/parser/constraint.hpp"
21#include "duckdb/parser/constraints/list.hpp"
22#include "duckdb/parser/expression/list.hpp"
23#include "duckdb/parser/query_node.hpp"
24#include "duckdb/parser/query_node/select_node.hpp"
25#include "duckdb/parser/query_node/set_operation_node.hpp"
26#include "duckdb/parser/statement/list.hpp"
27#include "duckdb/planner/expression/list.hpp"
28#include "duckdb/planner/logical_operator.hpp"
29#include "duckdb/planner/operator/list.hpp"
30#include "duckdb/planner/operator/logical_join.hpp"
31#include "duckdb/planner/query_node/bound_select_node.hpp"
32#include "duckdb/planner/query_node/bound_set_operation_node.hpp"
33#include "duckdb/storage/data_table.hpp"
34#include "duckdb/storage/write_ahead_log.hpp"
35#include "duckdb/transaction/transaction.hpp"
36#include "duckdb/parser/tableref/list.hpp"
37
38using namespace duckdb;
39using namespace std;
40template class std::unique_ptr<SQLStatement>;
41template class std::unique_ptr<AlterTableStatement>;
42template class std::unique_ptr<CopyStatement>;
43template class std::unique_ptr<CreateStatement>;
44template class std::unique_ptr<DeleteStatement>;
45template class std::unique_ptr<DropStatement>;
46template class std::unique_ptr<InsertStatement>;
47template class std::unique_ptr<SelectStatement>;
48template class std::unique_ptr<TransactionStatement>;
49template class std::unique_ptr<UpdateStatement>;
50template class std::unique_ptr<PrepareStatement>;
51template class std::unique_ptr<ExecuteStatement>;
52template class std::unique_ptr<QueryNode>;
53template class std::unique_ptr<SelectNode>;
54template class std::unique_ptr<SetOperationNode>;
55template class std::unique_ptr<ParsedExpression>;
56template class std::unique_ptr<CaseExpression>;
57template class std::unique_ptr<CastExpression>;
58template class std::unique_ptr<ColumnRefExpression>;
59template class std::unique_ptr<ComparisonExpression>;
60template class std::unique_ptr<ConjunctionExpression>;
61template class std::unique_ptr<ConstantExpression>;
62template class std::unique_ptr<DefaultExpression>;
63template class std::unique_ptr<FunctionExpression>;
64template class std::unique_ptr<OperatorExpression>;
65template class std::unique_ptr<ParameterExpression>;
66template class std::unique_ptr<PreparedStatementData>;
67template class std::unique_ptr<StarExpression>;
68template class std::unique_ptr<SubqueryExpression>;
69template class std::unique_ptr<WindowExpression>;
70template class std::unique_ptr<Constraint>;
71template class std::unique_ptr<NotNullConstraint>;
72template class std::unique_ptr<CheckConstraint>;
73template class std::unique_ptr<UniqueConstraint>;
74// template class std::unique_ptr<TableRef>;
75template class std::unique_ptr<BaseTableRef>;
76template class std::unique_ptr<CrossProductRef>;
77template class std::unique_ptr<JoinRef>;
78template class std::unique_ptr<SubqueryRef>;
79template class std::unique_ptr<TableFunctionRef>;
80
81template class std::unique_ptr<Expression>;
82template class std::unique_ptr<BoundQueryNode>;
83template class std::unique_ptr<BoundSelectNode>;
84template class std::unique_ptr<BoundSetOperationNode>;
85template class std::unique_ptr<BoundAggregateExpression>;
86template class std::unique_ptr<BoundCaseExpression>;
87template class std::unique_ptr<BoundCastExpression>;
88template class std::unique_ptr<BoundColumnRefExpression>;
89template class std::unique_ptr<BoundComparisonExpression>;
90template class std::unique_ptr<BoundConjunctionExpression>;
91template class std::unique_ptr<BoundConstantExpression>;
92template class std::unique_ptr<BoundDefaultExpression>;
93template class std::unique_ptr<BoundFunctionExpression>;
94template class std::unique_ptr<BoundOperatorExpression>;
95template class std::unique_ptr<BoundParameterExpression>;
96template class std::unique_ptr<BoundReferenceExpression>;
97template class std::unique_ptr<BoundSubqueryExpression>;
98template class std::unique_ptr<BoundWindowExpression>;
99template class std::unique_ptr<CommonSubExpression>;
100
101template class std::unique_ptr<CatalogEntry>;
102template class std::unique_ptr<BindContext>;
103template class std::unique_ptr<char[]>;
104template class std::unique_ptr<QueryResult>;
105template class std::unique_ptr<MaterializedQueryResult>;
106template class std::unique_ptr<StreamQueryResult>;
107template class std::unique_ptr<LogicalOperator>;
108template class std::unique_ptr<PhysicalOperator>;
109template class std::unique_ptr<PhysicalOperatorState>;
110template class std::unique_ptr<sel_t[]>;
111template class std::unique_ptr<StringHeap>;
112template class std::unique_ptr<SuperLargeHashTable>;
113template class std::unique_ptr<TableRef>;
114template class std::unique_ptr<Transaction>;
115template class std::unique_ptr<uint64_t[]>;
116template class std::unique_ptr<data_t[]>;
117template class std::unique_ptr<Vector[]>;
118template class std::unique_ptr<DataChunk>;
119template class std::unique_ptr<JoinHashTable>;
120template class std::unique_ptr<JoinHashTable::ScanStructure>;
121template class std::unique_ptr<data_ptr_t[]>;
122template class std::unique_ptr<Rule>;
123template class std::unique_ptr<LogicalFilter>;
124template class std::unique_ptr<LogicalJoin>;
125template class std::unique_ptr<LogicalComparisonJoin>;
126template class std::unique_ptr<FilterInfo>;
127template class std::unique_ptr<JoinOrderOptimizer::JoinNode>;
128template class std::unique_ptr<SingleJoinRelation>;
129template class std::shared_ptr<Relation>;
130template class std::unique_ptr<CatalogSet>;
131template class std::unique_ptr<PreparedStatementCatalogEntry>;
132template class std::unique_ptr<Binder>;
133
134#define INSTANTIATE_VECTOR(VECTOR_DEFINITION) \
135 template VECTOR_DEFINITION::size_type VECTOR_DEFINITION::size() const; \
136 template VECTOR_DEFINITION::const_reference VECTOR_DEFINITION::operator[](VECTOR_DEFINITION::size_type n) const; \
137 template VECTOR_DEFINITION::reference VECTOR_DEFINITION::operator[](VECTOR_DEFINITION::size_type n); \
138 template VECTOR_DEFINITION::const_reference VECTOR_DEFINITION::back() const; \
139 template VECTOR_DEFINITION::reference VECTOR_DEFINITION::back(); \
140 template VECTOR_DEFINITION::const_reference VECTOR_DEFINITION::front() const; \
141 template VECTOR_DEFINITION::reference VECTOR_DEFINITION::front();
142
143INSTANTIATE_VECTOR(std::vector<ColumnDefinition>);
144template class std::vector<ExpressionType>;
145INSTANTIATE_VECTOR(std::vector<JoinCondition>);
146INSTANTIATE_VECTOR(std::vector<OrderByNode>);
147template class std::vector<uint64_t>;
148template class std::vector<string>;
149INSTANTIATE_VECTOR(std::vector<Expression *>)
150INSTANTIATE_VECTOR(std::vector<std::unique_ptr<Expression>>)
151INSTANTIATE_VECTOR(std::vector<std::unique_ptr<DataChunk>>);
152INSTANTIATE_VECTOR(std::vector<std::unique_ptr<SQLStatement>>);
153INSTANTIATE_VECTOR(std::vector<std::unique_ptr<PhysicalOperator>>);
154INSTANTIATE_VECTOR(std::vector<std::unique_ptr<LogicalOperator>>);
155INSTANTIATE_VECTOR(std::vector<std::unique_ptr<Transaction>>);
156INSTANTIATE_VECTOR(std::vector<std::unique_ptr<JoinOrderOptimizer::JoinNode>>);
157template class std::vector<TypeId>;
158template class std::vector<Value>;
159template class std::vector<int>;
160INSTANTIATE_VECTOR(std::vector<std::unique_ptr<Rule>>);
161template class std::vector<std::vector<Expression *>>;
162template class std::vector<SQLType>;
163
164template struct std::atomic<uint64_t>;
165template class std::bitset<STANDARD_VECTOR_SIZE>;
166template class std::unordered_map<PhysicalOperator *, QueryProfiler::TreeNode *>;
167template class std::stack<PhysicalOperator *>;
168
169#define INSTANTIATE_UNORDERED_MAP(MAP_DEFINITION) \
170 template MAP_DEFINITION::mapped_type &MAP_DEFINITION::operator[](MAP_DEFINITION::key_type &&k); \
171 template MAP_DEFINITION::mapped_type &MAP_DEFINITION::operator[](const MAP_DEFINITION::key_type &k);
172
173using catalog_map = std::unordered_map<string, unique_ptr<CatalogEntry>>;
174INSTANTIATE_UNORDERED_MAP(catalog_map);
175
176template class std::unordered_map<string, uint64_t>;
177template class std::unordered_map<string, std::vector<string>>;
178template class std::unordered_map<string, std::pair<uint64_t, Expression *>>;
179// template class std::unordered_map<string, TableBinding>;
180template class std::unordered_map<string, SelectStatement *>;
181template class std::unordered_map<uint64_t, uint64_t>;
182
183#endif
184