duckdb 0.6.1-dev10.0 → 0.6.1-dev17.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/package.json +1 -1
- package/src/duckdb.cpp +36 -4
- package/src/duckdb.hpp +4 -2
- package/src/parquet-amalgamation.cpp +22822 -22822
package/package.json
CHANGED
package/src/duckdb.cpp
CHANGED
|
@@ -138304,12 +138304,19 @@ public:
|
|
|
138304
138304
|
//! Creates and caches a new DB Instance (Fails if a cached instance already exists)
|
|
138305
138305
|
shared_ptr<DuckDB> CreateInstance(const string &database, DBConfig &config_dict, bool cache_instance = true);
|
|
138306
138306
|
|
|
138307
|
+
//! Creates and caches a new DB Instance (Fails if a cached instance already exists)
|
|
138308
|
+
shared_ptr<DuckDB> GetOrCreateInstance(const string &database, DBConfig &config_dict, bool cache_instance);
|
|
138309
|
+
|
|
138307
138310
|
private:
|
|
138308
138311
|
//! A map with the cached instances <absolute_path/instance>
|
|
138309
138312
|
unordered_map<string, weak_ptr<DuckDB>> db_instances;
|
|
138310
138313
|
|
|
138311
138314
|
//! Lock to alter cache
|
|
138312
138315
|
mutex cache_lock;
|
|
138316
|
+
|
|
138317
|
+
private:
|
|
138318
|
+
shared_ptr<DuckDB> GetInstanceInternal(const string &database, const DBConfig &config_dict);
|
|
138319
|
+
shared_ptr<DuckDB> CreateInstanceInternal(const string &database, DBConfig &config_dict, bool cache_instance);
|
|
138313
138320
|
};
|
|
138314
138321
|
} // namespace duckdb
|
|
138315
138322
|
|
|
@@ -138330,8 +138337,7 @@ string GetDBAbsolutePath(const string &database) {
|
|
|
138330
138337
|
return FileSystem::JoinPath(FileSystem::GetWorkingDirectory(), database);
|
|
138331
138338
|
}
|
|
138332
138339
|
|
|
138333
|
-
shared_ptr<DuckDB> DBInstanceCache::
|
|
138334
|
-
lock_guard<mutex> l(cache_lock);
|
|
138340
|
+
shared_ptr<DuckDB> DBInstanceCache::GetInstanceInternal(const string &database, const DBConfig &config) {
|
|
138335
138341
|
shared_ptr<DuckDB> db_instance;
|
|
138336
138342
|
auto abs_database_path = GetDBAbsolutePath(database);
|
|
138337
138343
|
if (db_instances.find(abs_database_path) != db_instances.end()) {
|
|
@@ -138350,8 +138356,13 @@ shared_ptr<DuckDB> DBInstanceCache::GetInstance(const string &database, const DB
|
|
|
138350
138356
|
return db_instance;
|
|
138351
138357
|
}
|
|
138352
138358
|
|
|
138353
|
-
shared_ptr<DuckDB> DBInstanceCache::
|
|
138359
|
+
shared_ptr<DuckDB> DBInstanceCache::GetInstance(const string &database, const DBConfig &config) {
|
|
138354
138360
|
lock_guard<mutex> l(cache_lock);
|
|
138361
|
+
return GetInstanceInternal(database, config);
|
|
138362
|
+
}
|
|
138363
|
+
|
|
138364
|
+
shared_ptr<DuckDB> DBInstanceCache::CreateInstanceInternal(const string &database, DBConfig &config,
|
|
138365
|
+
bool cache_instance) {
|
|
138355
138366
|
auto abs_database_path = GetDBAbsolutePath(database);
|
|
138356
138367
|
if (db_instances.find(abs_database_path) != db_instances.end()) {
|
|
138357
138368
|
throw duckdb::Exception(ExceptionType::CONNECTION,
|
|
@@ -138369,6 +138380,23 @@ shared_ptr<DuckDB> DBInstanceCache::CreateInstance(const string &database, DBCon
|
|
|
138369
138380
|
return db_instance;
|
|
138370
138381
|
}
|
|
138371
138382
|
|
|
138383
|
+
shared_ptr<DuckDB> DBInstanceCache::CreateInstance(const string &database, DBConfig &config, bool cache_instance) {
|
|
138384
|
+
lock_guard<mutex> l(cache_lock);
|
|
138385
|
+
return CreateInstanceInternal(database, config, cache_instance);
|
|
138386
|
+
}
|
|
138387
|
+
|
|
138388
|
+
shared_ptr<DuckDB> DBInstanceCache::GetOrCreateInstance(const string &database, DBConfig &config_dict,
|
|
138389
|
+
bool cache_instance) {
|
|
138390
|
+
lock_guard<mutex> l(cache_lock);
|
|
138391
|
+
if (cache_instance) {
|
|
138392
|
+
auto instance = GetInstanceInternal(database, config_dict);
|
|
138393
|
+
if (instance) {
|
|
138394
|
+
return instance;
|
|
138395
|
+
}
|
|
138396
|
+
}
|
|
138397
|
+
return CreateInstanceInternal(database, config_dict, cache_instance);
|
|
138398
|
+
}
|
|
138399
|
+
|
|
138372
138400
|
} // namespace duckdb
|
|
138373
138401
|
|
|
138374
138402
|
|
|
@@ -155444,7 +155472,6 @@ unique_ptr<LogicalOperator> FilterPullup::PullupJoin(unique_ptr<LogicalOperator>
|
|
|
155444
155472
|
case JoinType::LEFT:
|
|
155445
155473
|
case JoinType::ANTI:
|
|
155446
155474
|
case JoinType::SEMI: {
|
|
155447
|
-
can_add_column = true;
|
|
155448
155475
|
return PullupFromLeft(move(op));
|
|
155449
155476
|
}
|
|
155450
155477
|
default:
|
|
@@ -157982,6 +158009,8 @@ unique_ptr<LogicalOperator> FilterPullup::PullupBothSide(unique_ptr<LogicalOpera
|
|
|
157982
158009
|
FilterPullup right_pullup(true, can_add_column);
|
|
157983
158010
|
op->children[0] = left_pullup.Rewrite(move(op->children[0]));
|
|
157984
158011
|
op->children[1] = right_pullup.Rewrite(move(op->children[1]));
|
|
158012
|
+
D_ASSERT(left_pullup.can_add_column == can_add_column);
|
|
158013
|
+
D_ASSERT(right_pullup.can_add_column == can_add_column);
|
|
157985
158014
|
|
|
157986
158015
|
// merging filter expressions
|
|
157987
158016
|
for (idx_t i = 0; i < right_pullup.filters_expr_pullup.size(); ++i) {
|
|
@@ -158764,6 +158793,9 @@ unique_ptr<LogicalOperator> FilterPushdown::PushdownSetOperation(unique_ptr<Logi
|
|
|
158764
158793
|
D_ASSERT(op->children.size() == 2);
|
|
158765
158794
|
auto left_bindings = op->children[0]->GetColumnBindings();
|
|
158766
158795
|
auto right_bindings = op->children[1]->GetColumnBindings();
|
|
158796
|
+
if (left_bindings.size() != right_bindings.size()) {
|
|
158797
|
+
throw InternalException("Filter pushdown - set operation LHS and RHS have incompatible counts");
|
|
158798
|
+
}
|
|
158767
158799
|
|
|
158768
158800
|
// pushdown into set operation, we can duplicate the condition and pushdown the expressions into both sides
|
|
158769
158801
|
FilterPushdown left_pushdown(optimizer), right_pushdown(optimizer);
|
package/src/duckdb.hpp
CHANGED
|
@@ -11,8 +11,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
11
11
|
#pragma once
|
|
12
12
|
#define DUCKDB_AMALGAMATION 1
|
|
13
13
|
#define DUCKDB_AMALGAMATION_EXTENDED 1
|
|
14
|
-
#define DUCKDB_SOURCE_ID "
|
|
15
|
-
#define DUCKDB_VERSION "v0.6.1-
|
|
14
|
+
#define DUCKDB_SOURCE_ID "584a573b5e"
|
|
15
|
+
#define DUCKDB_VERSION "v0.6.1-dev17"
|
|
16
16
|
//===----------------------------------------------------------------------===//
|
|
17
17
|
// DuckDB
|
|
18
18
|
//
|
|
@@ -19440,6 +19440,8 @@ DUCKDB_API const char *duckdb_result_error(duckdb_result *result);
|
|
|
19440
19440
|
/*!
|
|
19441
19441
|
Fetches a data chunk from the duckdb_result. This function should be called repeatedly until the result is exhausted.
|
|
19442
19442
|
|
|
19443
|
+
The result must be destroyed with `duckdb_destroy_data_chunk`.
|
|
19444
|
+
|
|
19443
19445
|
This function supersedes all `duckdb_value` functions, as well as the `duckdb_column_data` and `duckdb_nullmask_data`
|
|
19444
19446
|
functions. It results in significantly better performance, and should be preferred in newer code-bases.
|
|
19445
19447
|
|