duckdb 0.8.2-dev3334.0 → 0.8.2-dev3456.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/binding.gyp +3 -1
- package/configure.py +3 -0
- package/package.json +1 -1
- package/src/duckdb/src/catalog/catalog.cpp +144 -63
- package/src/duckdb/src/common/exception.cpp +13 -0
- package/src/duckdb/src/common/file_system.cpp +21 -6
- package/src/duckdb/src/core_functions/scalar/generic/current_setting.cpp +3 -1
- package/src/duckdb/src/execution/operator/helper/physical_load.cpp +2 -1
- package/src/duckdb/src/execution/operator/helper/physical_reset.cpp +3 -1
- package/src/duckdb/src/execution/operator/helper/physical_set.cpp +3 -1
- package/src/duckdb/src/function/pragma/pragma_queries.cpp +2 -1
- package/src/duckdb/src/function/table/read_csv.cpp +8 -3
- package/src/duckdb/src/function/table/version/pragma_version.cpp +2 -2
- package/src/duckdb/src/include/duckdb/catalog/catalog.hpp +20 -5
- package/src/duckdb/src/include/duckdb/common/exception.hpp +15 -1
- package/src/duckdb/src/include/duckdb/main/client_config.hpp +2 -0
- package/src/duckdb/src/include/duckdb/main/config.hpp +12 -0
- package/src/duckdb/src/include/duckdb/main/extension/generated_extension_loader.hpp +6 -1
- package/src/duckdb/src/include/duckdb/main/extension_entries.hpp +209 -151
- package/src/duckdb/src/include/duckdb/main/extension_helper.hpp +34 -3
- package/src/duckdb/src/include/duckdb/main/settings.hpp +30 -0
- package/src/duckdb/src/include/duckdb/parser/parsed_data/load_info.hpp +4 -0
- package/src/duckdb/src/include/duckdb/planner/binder.hpp +4 -0
- package/src/duckdb/src/main/config.cpp +3 -0
- package/src/duckdb/src/main/extension/extension_helper.cpp +57 -0
- package/src/duckdb/src/main/extension/extension_install.cpp +46 -7
- package/src/duckdb/src/main/settings/settings.cpp +46 -0
- package/src/duckdb/src/parser/transform/statement/transform_load.cpp +1 -0
- package/src/duckdb/src/planner/binder/tableref/bind_basetableref.cpp +69 -23
- package/src/duckdb/src/planner/expression_binder/order_binder.cpp +5 -4
- package/src/duckdb/src/storage/serialization/serialize_parse_info.cpp +2 -0
- package/src/duckdb/third_party/libpg_query/include/nodes/parsenodes.hpp +1 -0
- package/src/duckdb/third_party/libpg_query/src_backend_parser_gram.cpp +8747 -8821
@@ -8,13 +8,18 @@
|
|
8
8
|
|
9
9
|
#pragma once
|
10
10
|
|
11
|
+
#include "duckdb/main/database.hpp"
|
12
|
+
#include "duckdb/common/string.hpp"
|
13
|
+
#include "duckdb/common/vector.hpp"
|
14
|
+
|
11
15
|
#if defined(GENERATED_EXTENSION_HEADERS) and !defined(DUCKDB_AMALGAMATION)
|
12
16
|
#include "generated_extension_headers.hpp"
|
17
|
+
#include "duckdb/common/common.hpp"
|
13
18
|
|
14
19
|
namespace duckdb {
|
15
20
|
|
16
21
|
//! Looks through the CMake-generated list of extensions that are linked into DuckDB currently to try load <extension>
|
17
|
-
bool TryLoadLinkedExtension(DuckDB &db, const
|
22
|
+
bool TryLoadLinkedExtension(DuckDB &db, const string &extension);
|
18
23
|
extern vector<string> linked_extensions;
|
19
24
|
extern vector<string> loaded_extension_test_paths;
|
20
25
|
|
@@ -10,6 +10,9 @@
|
|
10
10
|
|
11
11
|
#include "duckdb/common/unordered_map.hpp"
|
12
12
|
|
13
|
+
// NOTE: this file is generated by scripts/generate_extensions_function.py. Check out the check-load-install-extensions
|
14
|
+
// job in .github/workflows/LinuxRelease.yml on how to use it
|
15
|
+
|
13
16
|
namespace duckdb {
|
14
17
|
|
15
18
|
struct ExtensionEntry {
|
@@ -17,165 +20,172 @@ struct ExtensionEntry {
|
|
17
20
|
char extension[48];
|
18
21
|
};
|
19
22
|
|
20
|
-
static constexpr ExtensionEntry EXTENSION_FUNCTIONS[] = {
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
23
|
+
static constexpr ExtensionEntry EXTENSION_FUNCTIONS[] = {
|
24
|
+
{"->>", "json"},
|
25
|
+
{"array_to_json", "json"},
|
26
|
+
{"create_fts_index", "fts"},
|
27
|
+
{"current_localtime", "icu"},
|
28
|
+
{"current_localtimestamp", "icu"},
|
29
|
+
{"dbgen", "tpch"},
|
30
|
+
{"drop_fts_index", "fts"},
|
31
|
+
{"dsdgen", "tpcds"},
|
32
|
+
{"excel_text", "excel"},
|
33
|
+
{"from_json", "json"},
|
34
|
+
{"from_json_strict", "json"},
|
35
|
+
{"from_substrait", "substrait"},
|
36
|
+
{"from_substrait_json", "substrait"},
|
37
|
+
{"fuzz_all_functions", "sqlsmith"},
|
38
|
+
{"fuzzyduck", "sqlsmith"},
|
39
|
+
{"get_substrait", "substrait"},
|
40
|
+
{"get_substrait_json", "substrait"},
|
41
|
+
{"host", "inet"},
|
42
|
+
{"iceberg_metadata", "iceberg"},
|
43
|
+
{"iceberg_scan", "iceberg"},
|
44
|
+
{"iceberg_snapshots", "iceberg"},
|
45
|
+
{"icu_calendar_names", "icu"},
|
46
|
+
{"icu_sort_key", "icu"},
|
47
|
+
{"json", "json"},
|
48
|
+
{"json_array", "json"},
|
49
|
+
{"json_array_length", "json"},
|
50
|
+
{"json_contains", "json"},
|
51
|
+
{"json_deserialize_sql", "json"},
|
52
|
+
{"json_execute_serialized_sql", "json"},
|
53
|
+
{"json_extract", "json"},
|
54
|
+
{"json_extract_path", "json"},
|
55
|
+
{"json_extract_path_text", "json"},
|
56
|
+
{"json_extract_string", "json"},
|
57
|
+
{"json_group_array", "json"},
|
58
|
+
{"json_group_object", "json"},
|
59
|
+
{"json_group_structure", "json"},
|
60
|
+
{"json_keys", "json"},
|
61
|
+
{"json_merge_patch", "json"},
|
62
|
+
{"json_object", "json"},
|
63
|
+
{"json_quote", "json"},
|
64
|
+
{"json_serialize_sql", "json"},
|
65
|
+
{"json_structure", "json"},
|
66
|
+
{"json_transform", "json"},
|
67
|
+
{"json_transform_strict", "json"},
|
68
|
+
{"json_type", "json"},
|
69
|
+
{"json_valid", "json"},
|
70
|
+
{"load_aws_credentials", "aws"},
|
71
|
+
{"make_timestamptz", "icu"},
|
72
|
+
{"parquet_metadata", "parquet"},
|
73
|
+
{"parquet_scan", "parquet"},
|
74
|
+
{"parquet_schema", "parquet"},
|
75
|
+
{"pg_timezone_names", "icu"},
|
76
|
+
{"postgres_attach", "postgres_scanner"},
|
77
|
+
{"postgres_scan", "postgres_scanner"},
|
78
|
+
{"postgres_scan_pushdown", "postgres_scanner"},
|
79
|
+
{"read_json", "json"},
|
80
|
+
{"read_json_auto", "json"},
|
81
|
+
{"read_json_objects", "json"},
|
82
|
+
{"read_json_objects_auto", "json"},
|
83
|
+
{"read_ndjson", "json"},
|
84
|
+
{"read_ndjson_auto", "json"},
|
85
|
+
{"read_ndjson_objects", "json"},
|
86
|
+
{"read_parquet", "parquet"},
|
87
|
+
{"reduce_sql_statement", "sqlsmith"},
|
88
|
+
{"row_to_json", "json"},
|
89
|
+
{"scan_arrow_ipc", "arrow"},
|
90
|
+
{"sql_auto_complete", "autocomplete"},
|
91
|
+
{"sqlite_attach", "sqlite_scanner"},
|
92
|
+
{"sqlite_scan", "sqlite_scanner"},
|
93
|
+
{"sqlsmith", "sqlsmith"},
|
94
|
+
{"st_area", "spatial"},
|
95
|
+
{"st_area_spheroid", "spatial"},
|
96
|
+
{"st_asgeojson", "spatial"},
|
97
|
+
{"st_ashexwkb", "spatial"},
|
98
|
+
{"st_astext", "spatial"},
|
99
|
+
{"st_aswkb", "spatial"},
|
100
|
+
{"st_boundary", "spatial"},
|
101
|
+
{"st_buffer", "spatial"},
|
102
|
+
{"st_centroid", "spatial"},
|
103
|
+
{"st_collect", "spatial"},
|
104
|
+
{"st_collectionextract", "spatial"},
|
105
|
+
{"st_contains", "spatial"},
|
106
|
+
{"st_containsproperly", "spatial"},
|
107
|
+
{"st_convexhull", "spatial"},
|
108
|
+
{"st_coveredby", "spatial"},
|
109
|
+
{"st_covers", "spatial"},
|
110
|
+
{"st_crosses", "spatial"},
|
111
|
+
{"st_difference", "spatial"},
|
112
|
+
{"st_dimension", "spatial"},
|
113
|
+
{"st_disjoint", "spatial"},
|
114
|
+
{"st_distance", "spatial"},
|
115
|
+
{"st_distance_spheroid", "spatial"},
|
116
|
+
{"st_drivers", "spatial"},
|
117
|
+
{"st_dwithin", "spatial"},
|
118
|
+
{"st_dwithin_spheroid", "spatial"},
|
119
|
+
{"st_envelope", "spatial"},
|
120
|
+
{"st_equals", "spatial"},
|
121
|
+
{"st_flipcoordinates", "spatial"},
|
122
|
+
{"st_geometrytype", "spatial"},
|
123
|
+
{"st_geomfromgeojson", "spatial"},
|
124
|
+
{"st_geomfromhexewkb", "spatial"},
|
125
|
+
{"st_geomfromhexwkb", "spatial"},
|
126
|
+
{"st_geomfromtext", "spatial"},
|
127
|
+
{"st_geomfromwkb", "spatial"},
|
128
|
+
{"st_intersection", "spatial"},
|
129
|
+
{"st_intersects", "spatial"},
|
130
|
+
{"st_isclosed", "spatial"},
|
131
|
+
{"st_isempty", "spatial"},
|
132
|
+
{"st_isring", "spatial"},
|
133
|
+
{"st_issimple", "spatial"},
|
134
|
+
{"st_isvalid", "spatial"},
|
135
|
+
{"st_length", "spatial"},
|
136
|
+
{"st_length_spheroid", "spatial"},
|
137
|
+
{"st_linestring2dfromwkb", "spatial"},
|
138
|
+
{"st_list_proj_crs", "spatial"},
|
139
|
+
{"st_makeline", "spatial"},
|
140
|
+
{"st_normalize", "spatial"},
|
141
|
+
{"st_npoints", "spatial"},
|
142
|
+
{"st_numpoints", "spatial"},
|
143
|
+
{"st_overlaps", "spatial"},
|
144
|
+
{"st_perimeter", "spatial"},
|
145
|
+
{"st_perimeter_spheroid", "spatial"},
|
146
|
+
{"st_point", "spatial"},
|
147
|
+
{"st_point2d", "spatial"},
|
148
|
+
{"st_point2dfromwkb", "spatial"},
|
149
|
+
{"st_point3d", "spatial"},
|
150
|
+
{"st_point4d", "spatial"},
|
151
|
+
{"st_pointonsurface", "spatial"},
|
152
|
+
{"st_polygon2dfromwkb", "spatial"},
|
153
|
+
{"st_read", "spatial"},
|
154
|
+
{"st_readosm", "spatial"},
|
155
|
+
{"st_reduceprecision", "spatial"},
|
156
|
+
{"st_removerepeatedpoints", "spatial"},
|
157
|
+
{"st_simplify", "spatial"},
|
158
|
+
{"st_simplifypreservetopology", "spatial"},
|
159
|
+
{"st_touches", "spatial"},
|
160
|
+
{"st_transform", "spatial"},
|
161
|
+
{"st_union", "spatial"},
|
162
|
+
{"st_within", "spatial"},
|
163
|
+
{"st_x", "spatial"},
|
164
|
+
{"st_y", "spatial"},
|
165
|
+
{"stem", "fts"},
|
166
|
+
{"text", "excel"},
|
167
|
+
{"to_arrow_ipc", "arrow"},
|
168
|
+
{"to_json", "json"},
|
169
|
+
{"tpcds", "tpcds"},
|
170
|
+
{"tpcds_answers", "tpcds"},
|
171
|
+
{"tpcds_queries", "tpcds"},
|
172
|
+
{"tpch", "tpch"},
|
173
|
+
{"tpch_answers", "tpch"},
|
174
|
+
{"tpch_queries", "tpch"},
|
175
|
+
{"visualize_diff_profiling_output", "visualizer"},
|
176
|
+
{"visualize_json_profiling_output", "visualizer"},
|
177
|
+
{"visualize_last_profiling_output", "visualizer"},
|
178
|
+
}; // END_OF_EXTENSION_FUNCTIONS
|
169
179
|
|
170
180
|
static constexpr ExtensionEntry EXTENSION_SETTINGS[] = {
|
171
181
|
{"azure_storage_connection_string", "azure"},
|
172
182
|
{"binary_as_string", "parquet"},
|
173
183
|
{"calendar", "icu"},
|
184
|
+
{"force_download", "httpfs"},
|
174
185
|
{"http_retries", "httpfs"},
|
175
186
|
{"http_retry_backoff", "httpfs"},
|
176
187
|
{"http_retry_wait_ms", "httpfs"},
|
177
188
|
{"http_timeout", "httpfs"},
|
178
|
-
{"force_download", "httpfs"},
|
179
189
|
{"s3_access_key_id", "httpfs"},
|
180
190
|
{"s3_endpoint", "httpfs"},
|
181
191
|
{"s3_region", "httpfs"},
|
@@ -189,5 +199,53 @@ static constexpr ExtensionEntry EXTENSION_SETTINGS[] = {
|
|
189
199
|
{"s3_use_ssl", "httpfs"},
|
190
200
|
{"sqlite_all_varchar", "sqlite_scanner"},
|
191
201
|
{"timezone", "icu"},
|
192
|
-
};
|
202
|
+
}; // END_OF_EXTENSION_SETTINGS
|
203
|
+
|
204
|
+
// Note: these are currently hardcoded in scripts/generate_extensions_function.py
|
205
|
+
// TODO: automate by passing though to script via duckdb
|
206
|
+
static constexpr ExtensionEntry EXTENSION_COPY_FUNCTIONS[] = {{"parquet", "parquet"},
|
207
|
+
{"json", "json"}}; // END_OF_EXTENSION_COPY_FUNCTIONS
|
208
|
+
|
209
|
+
// Note: these are currently hardcoded in scripts/generate_extensions_function.py
|
210
|
+
// TODO: automate by passing though to script via duckdb
|
211
|
+
static constexpr ExtensionEntry EXTENSION_TYPES[] = {
|
212
|
+
{"json", "json"}, {"inet", "inet"}, {"geometry", "spatial"}}; // END_OF_EXTENSION_TYPES
|
213
|
+
|
214
|
+
// Note: these are currently hardcoded in scripts/generate_extensions_function.py
|
215
|
+
// TODO: automate by passing though to script via duckdb
|
216
|
+
static constexpr ExtensionEntry EXTENSION_FILE_PREFIXES[] = {
|
217
|
+
{"http://", "httpfs"}, {"https://", "httpfs"}, {"s3://", "httpfs"},
|
218
|
+
// {"azure://", "azure"}
|
219
|
+
}; // END_OF_EXTENSION_FILE_PREFIXES
|
220
|
+
|
221
|
+
// Note: these are currently hardcoded in scripts/generate_extensions_function.py
|
222
|
+
// TODO: automate by passing though to script via duckdb
|
223
|
+
static constexpr ExtensionEntry EXTENSION_FILE_POSTFIXES[] = {{".parquet", "parquet"},
|
224
|
+
{".json", "json"},
|
225
|
+
{".jsonl", "json"},
|
226
|
+
{".ndjson", "json"}}; // END_OF_EXTENSION_FILE_POSTFIXES
|
227
|
+
|
228
|
+
// Note: these are currently hardcoded in scripts/generate_extensions_function.py
|
229
|
+
// TODO: automate by passing though to script via duckdb
|
230
|
+
static constexpr ExtensionEntry EXTENSION_FILE_CONTAINS[] = {{".parquet?", "parquet"},
|
231
|
+
{".json?", "json"},
|
232
|
+
{".ndjson?", ".jsonl?"},
|
233
|
+
{".jsonl?", ".ndjson?"}}; // EXTENSION_FILE_CONTAINS
|
234
|
+
|
235
|
+
static constexpr const char *AUTOLOADABLE_EXTENSIONS[] = {
|
236
|
+
// "azure",
|
237
|
+
"autocomplete",
|
238
|
+
"excel",
|
239
|
+
"fts",
|
240
|
+
"httpfs",
|
241
|
+
// "inet",
|
242
|
+
// "icu",
|
243
|
+
"json",
|
244
|
+
"parquet",
|
245
|
+
"sqlsmith",
|
246
|
+
"tpcds",
|
247
|
+
"tpch",
|
248
|
+
"visualizer",
|
249
|
+
}; // END_OF_AUTOLOADABLE_EXTENSIONS
|
250
|
+
|
193
251
|
} // namespace duckdb
|
@@ -10,6 +10,7 @@
|
|
10
10
|
|
11
11
|
#include <string>
|
12
12
|
#include "duckdb.hpp"
|
13
|
+
#include "duckdb/main/extension_entries.hpp"
|
13
14
|
|
14
15
|
namespace duckdb {
|
15
16
|
class DuckDB;
|
@@ -40,11 +41,16 @@ public:
|
|
40
41
|
|
41
42
|
static ExtensionLoadResult LoadExtension(DuckDB &db, const std::string &extension);
|
42
43
|
|
43
|
-
static void InstallExtension(ClientContext &context, const string &extension, bool force_install
|
44
|
-
|
44
|
+
static void InstallExtension(ClientContext &context, const string &extension, bool force_install,
|
45
|
+
const string &respository = "");
|
46
|
+
static void InstallExtension(DBConfig &config, FileSystem &fs, const string &extension, bool force_install,
|
47
|
+
const string &respository = "");
|
45
48
|
static void LoadExternalExtension(ClientContext &context, const string &extension);
|
46
49
|
static void LoadExternalExtension(DatabaseInstance &db, FileSystem &fs, const string &extension);
|
47
50
|
|
51
|
+
//! Autoload an extension by name. Depending on the current settings, this will either load or install+load
|
52
|
+
static void AutoLoadExtension(ClientContext &context, const string &extension_name);
|
53
|
+
|
48
54
|
static string ExtensionDirectory(ClientContext &context);
|
49
55
|
static string ExtensionDirectory(DBConfig &config, FileSystem &fs);
|
50
56
|
|
@@ -65,9 +71,34 @@ public:
|
|
65
71
|
static string GetExtensionName(const string &extension);
|
66
72
|
static bool IsFullPath(const string &extension);
|
67
73
|
|
74
|
+
//! Lookup a name in an ExtensionEntry list
|
75
|
+
template <size_t N>
|
76
|
+
static string FindExtensionInEntries(const string &name, const ExtensionEntry (&entries)[N]) {
|
77
|
+
auto lcase = StringUtil::Lower(name);
|
78
|
+
|
79
|
+
auto it =
|
80
|
+
std::find_if(entries, entries + N, [&](const ExtensionEntry &element) { return element.name == lcase; });
|
81
|
+
|
82
|
+
if (it != entries + N && it->name == lcase) {
|
83
|
+
return it->extension;
|
84
|
+
}
|
85
|
+
return "";
|
86
|
+
}
|
87
|
+
|
88
|
+
//! Whether an extension can be autoloaded (i.e. it's registered as an autoloadable extension in
|
89
|
+
//! extension_entries.hpp)
|
90
|
+
static bool CanAutoloadExtension(const string &ext_name);
|
91
|
+
|
92
|
+
//! Utility functions for creating meaningful error messages regarding missing extensions
|
93
|
+
static string WrapAutoLoadExtensionErrorMsg(ClientContext &context, const string &base_error,
|
94
|
+
const string &extension_name);
|
95
|
+
static string AddExtensionInstallHintToErrorMsg(ClientContext &context, const string &base_error,
|
96
|
+
const string &extension_name);
|
97
|
+
|
68
98
|
private:
|
69
99
|
static void InstallExtensionInternal(DBConfig &config, ClientConfig *client_config, FileSystem &fs,
|
70
|
-
const string &local_path, const string &extension, bool force_install
|
100
|
+
const string &local_path, const string &extension, bool force_install,
|
101
|
+
const string &repository);
|
71
102
|
static const vector<string> PathComponents();
|
72
103
|
static bool AllowAutoInstall(const string &extension);
|
73
104
|
static ExtensionInitResult InitialLoad(DBConfig &config, FileSystem &fs, const string &extension);
|
@@ -188,6 +188,36 @@ struct CustomExtensionRepository {
|
|
188
188
|
static Value GetSetting(ClientContext &context);
|
189
189
|
};
|
190
190
|
|
191
|
+
struct AutoloadExtensionRepository {
|
192
|
+
static constexpr const char *Name = "autoinstall_extension_repository";
|
193
|
+
static constexpr const char *Description =
|
194
|
+
"Overrides the custom endpoint for extension installation on autoloading";
|
195
|
+
static constexpr const LogicalTypeId InputType = LogicalTypeId::VARCHAR;
|
196
|
+
static void SetLocal(ClientContext &context, const Value ¶meter);
|
197
|
+
static void ResetLocal(ClientContext &context);
|
198
|
+
static Value GetSetting(ClientContext &context);
|
199
|
+
};
|
200
|
+
|
201
|
+
struct AutoinstallKnownExtensions {
|
202
|
+
static constexpr const char *Name = "autoinstall_known_extensions";
|
203
|
+
static constexpr const char *Description =
|
204
|
+
"Whether known extensions are allowed to be automatically installed when a query depends on them";
|
205
|
+
static constexpr const LogicalTypeId InputType = LogicalTypeId::BOOLEAN;
|
206
|
+
static void SetGlobal(DatabaseInstance *db, DBConfig &config, const Value ¶meter);
|
207
|
+
static void ResetGlobal(DatabaseInstance *db, DBConfig &config);
|
208
|
+
static Value GetSetting(ClientContext &context);
|
209
|
+
};
|
210
|
+
|
211
|
+
struct AutoloadKnownExtensions {
|
212
|
+
static constexpr const char *Name = "autoload_known_extensions";
|
213
|
+
static constexpr const char *Description =
|
214
|
+
"Whether known extensions are allowed to be automatically loaded when a query depends on them";
|
215
|
+
static constexpr const LogicalTypeId InputType = LogicalTypeId::BOOLEAN;
|
216
|
+
static void SetGlobal(DatabaseInstance *db, DBConfig &config, const Value ¶meter);
|
217
|
+
static void ResetGlobal(DatabaseInstance *db, DBConfig &config);
|
218
|
+
static Value GetSetting(ClientContext &context);
|
219
|
+
};
|
220
|
+
|
191
221
|
struct EnableObjectCacheSetting {
|
192
222
|
static constexpr const char *Name = "enable_object_cache";
|
193
223
|
static constexpr const char *Description = "Whether or not object cache is used to cache e.g. Parquet metadata";
|
@@ -24,12 +24,14 @@ public:
|
|
24
24
|
}
|
25
25
|
|
26
26
|
string filename;
|
27
|
+
string repository;
|
27
28
|
LoadType load_type;
|
28
29
|
|
29
30
|
public:
|
30
31
|
unique_ptr<LoadInfo> Copy() const {
|
31
32
|
auto result = make_uniq<LoadInfo>();
|
32
33
|
result->filename = filename;
|
34
|
+
result->repository = repository;
|
33
35
|
result->load_type = load_type;
|
34
36
|
return result;
|
35
37
|
}
|
@@ -37,6 +39,7 @@ public:
|
|
37
39
|
void Serialize(Serializer &serializer) const {
|
38
40
|
FieldWriter writer(serializer);
|
39
41
|
writer.WriteString(filename);
|
42
|
+
writer.WriteString(repository);
|
40
43
|
writer.WriteField<LoadType>(load_type);
|
41
44
|
writer.Finalize();
|
42
45
|
}
|
@@ -45,6 +48,7 @@ public:
|
|
45
48
|
FieldReader reader(deserializer);
|
46
49
|
auto load_info = make_uniq<LoadInfo>();
|
47
50
|
load_info->filename = reader.ReadRequired<string>();
|
51
|
+
load_info->repository = reader.ReadRequired<string>();
|
48
52
|
load_info->load_type = reader.ReadRequired<LoadType>();
|
49
53
|
reader.Finalize();
|
50
54
|
return std::move(load_info);
|
@@ -234,6 +234,10 @@ private:
|
|
234
234
|
//! Move correlated expressions from the child binder to this binder
|
235
235
|
void MoveCorrelatedExpressions(Binder &other);
|
236
236
|
|
237
|
+
//! Tries to bind the table name with replacement scans
|
238
|
+
unique_ptr<BoundTableRef> BindWithReplacementScan(ClientContext &context, const string &table_name,
|
239
|
+
BaseTableRef &ref);
|
240
|
+
|
237
241
|
BoundStatement Bind(SelectStatement &stmt);
|
238
242
|
BoundStatement Bind(InsertStatement &stmt);
|
239
243
|
BoundStatement Bind(CopyStatement &stmt);
|
@@ -70,6 +70,9 @@ static ConfigurationOption internal_options[] = {DUCKDB_GLOBAL(AccessModeSetting
|
|
70
70
|
DUCKDB_GLOBAL(EnableFSSTVectors),
|
71
71
|
DUCKDB_GLOBAL(AllowUnsignedExtensionsSetting),
|
72
72
|
DUCKDB_LOCAL(CustomExtensionRepository),
|
73
|
+
DUCKDB_LOCAL(AutoloadExtensionRepository),
|
74
|
+
DUCKDB_GLOBAL(AutoinstallKnownExtensions),
|
75
|
+
DUCKDB_GLOBAL(AutoloadKnownExtensions),
|
73
76
|
DUCKDB_GLOBAL(EnableObjectCacheSetting),
|
74
77
|
DUCKDB_GLOBAL(EnableHTTPMetadataCacheSetting),
|
75
78
|
DUCKDB_LOCAL(EnableProfilingSetting),
|