duckdb 0.3.3-dev891.0 → 0.3.3-dev931.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 +39 -7
- package/src/duckdb.hpp +4 -2
- package/src/parquet-amalgamation.cpp +36797 -36638
- package/src/parquet-amalgamation.hpp +27 -9
package/package.json
CHANGED
package/src/duckdb.cpp
CHANGED
|
@@ -53208,7 +53208,7 @@ private:
|
|
|
53208
53208
|
};
|
|
53209
53209
|
|
|
53210
53210
|
template <typename T, typename OP>
|
|
53211
|
-
struct OperationCompare : public std::
|
|
53211
|
+
struct OperationCompare : public std::function<bool(T, T)> {
|
|
53212
53212
|
inline bool operator()(const T &lhs, const T &val) const {
|
|
53213
53213
|
return OP::template Operation(lhs, val);
|
|
53214
53214
|
}
|
|
@@ -104974,21 +104974,26 @@ public:
|
|
|
104974
104974
|
|
|
104975
104975
|
void AddConnection(ClientContext &context) {
|
|
104976
104976
|
lock_guard<mutex> lock(connections_lock);
|
|
104977
|
-
connections.
|
|
104977
|
+
connections.insert(make_pair(&context, weak_ptr<ClientContext>(context.shared_from_this())));
|
|
104978
|
+
}
|
|
104979
|
+
|
|
104980
|
+
void RemoveConnection(ClientContext &context) {
|
|
104981
|
+
lock_guard<mutex> lock(connections_lock);
|
|
104982
|
+
connections.erase(&context);
|
|
104978
104983
|
}
|
|
104979
104984
|
|
|
104980
104985
|
vector<shared_ptr<ClientContext>> GetConnectionList() {
|
|
104981
104986
|
vector<shared_ptr<ClientContext>> result;
|
|
104982
|
-
for (
|
|
104983
|
-
auto connection =
|
|
104987
|
+
for (auto &it : connections) {
|
|
104988
|
+
auto connection = it.second.lock();
|
|
104984
104989
|
if (!connection) {
|
|
104985
|
-
connections.erase(
|
|
104986
|
-
i--;
|
|
104990
|
+
connections.erase(it.first);
|
|
104987
104991
|
continue;
|
|
104988
104992
|
} else {
|
|
104989
104993
|
result.push_back(move(connection));
|
|
104990
104994
|
}
|
|
104991
104995
|
}
|
|
104996
|
+
|
|
104992
104997
|
return result;
|
|
104993
104998
|
}
|
|
104994
104999
|
|
|
@@ -104997,7 +105002,7 @@ public:
|
|
|
104997
105002
|
|
|
104998
105003
|
public:
|
|
104999
105004
|
mutex connections_lock;
|
|
105000
|
-
|
|
105005
|
+
unordered_map<ClientContext *, weak_ptr<ClientContext>> connections;
|
|
105001
105006
|
};
|
|
105002
105007
|
|
|
105003
105008
|
} // namespace duckdb
|
|
@@ -105016,6 +105021,10 @@ Connection::Connection(DatabaseInstance &database) : context(make_shared<ClientC
|
|
|
105016
105021
|
Connection::Connection(DuckDB &database) : Connection(*database.instance) {
|
|
105017
105022
|
}
|
|
105018
105023
|
|
|
105024
|
+
Connection::~Connection() {
|
|
105025
|
+
ConnectionManager::Get(*context->db).RemoveConnection(*context);
|
|
105026
|
+
}
|
|
105027
|
+
|
|
105019
105028
|
string Connection::GetProfilingInformation(ProfilerPrintFormat format) {
|
|
105020
105029
|
auto &profiler = QueryProfiler::Get(*context);
|
|
105021
105030
|
if (format == ProfilerPrintFormat::JSON) {
|
|
@@ -120984,6 +120993,8 @@ private:
|
|
|
120984
120993
|
unique_ptr<LogicalOperator> PushdownSetOperation(unique_ptr<LogicalOperator> op);
|
|
120985
120994
|
//! Push down a LogicalGet op
|
|
120986
120995
|
unique_ptr<LogicalOperator> PushdownGet(unique_ptr<LogicalOperator> op);
|
|
120996
|
+
//! Push down a LogicalLimit op
|
|
120997
|
+
unique_ptr<LogicalOperator> PushdownLimit(unique_ptr<LogicalOperator> op);
|
|
120987
120998
|
// Pushdown an inner join
|
|
120988
120999
|
unique_ptr<LogicalOperator> PushdownInnerJoin(unique_ptr<LogicalOperator> op, unordered_set<idx_t> &left_bindings,
|
|
120989
121000
|
unordered_set<idx_t> &right_bindings);
|
|
@@ -121049,6 +121060,8 @@ unique_ptr<LogicalOperator> FilterPushdown::Rewrite(unique_ptr<LogicalOperator>
|
|
|
121049
121060
|
}
|
|
121050
121061
|
case LogicalOperatorType::LOGICAL_GET:
|
|
121051
121062
|
return PushdownGet(move(op));
|
|
121063
|
+
case LogicalOperatorType::LOGICAL_LIMIT:
|
|
121064
|
+
return PushdownLimit(move(op));
|
|
121052
121065
|
default:
|
|
121053
121066
|
return FinishPushdown(move(op));
|
|
121054
121067
|
}
|
|
@@ -123979,6 +123992,25 @@ unique_ptr<LogicalOperator> FilterPushdown::PushdownLeftJoin(unique_ptr<LogicalO
|
|
|
123979
123992
|
|
|
123980
123993
|
|
|
123981
123994
|
|
|
123995
|
+
|
|
123996
|
+
|
|
123997
|
+
namespace duckdb {
|
|
123998
|
+
|
|
123999
|
+
unique_ptr<LogicalOperator> FilterPushdown::PushdownLimit(unique_ptr<LogicalOperator> op) {
|
|
124000
|
+
auto &limit = (LogicalLimit &)*op;
|
|
124001
|
+
|
|
124002
|
+
if (!limit.limit && limit.limit_val == 0) {
|
|
124003
|
+
return make_unique<LogicalEmptyResult>(move(op));
|
|
124004
|
+
}
|
|
124005
|
+
|
|
124006
|
+
return FinishPushdown(move(op));
|
|
124007
|
+
}
|
|
124008
|
+
|
|
124009
|
+
} // namespace duckdb
|
|
124010
|
+
|
|
124011
|
+
|
|
124012
|
+
|
|
124013
|
+
|
|
123982
124014
|
namespace duckdb {
|
|
123983
124015
|
|
|
123984
124016
|
using Filter = FilterPushdown::Filter;
|
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.3.3-
|
|
14
|
+
#define DUCKDB_SOURCE_ID "55bfb5139"
|
|
15
|
+
#define DUCKDB_VERSION "v0.3.3-dev931"
|
|
16
16
|
//===----------------------------------------------------------------------===//
|
|
17
17
|
// DuckDB
|
|
18
18
|
//
|
|
@@ -16647,6 +16647,7 @@ class Connection {
|
|
|
16647
16647
|
public:
|
|
16648
16648
|
DUCKDB_API explicit Connection(DuckDB &database);
|
|
16649
16649
|
DUCKDB_API explicit Connection(DatabaseInstance &database);
|
|
16650
|
+
DUCKDB_API ~Connection();
|
|
16650
16651
|
|
|
16651
16652
|
shared_ptr<ClientContext> context;
|
|
16652
16653
|
warning_callback warning_cb;
|
|
@@ -16828,6 +16829,7 @@ private:
|
|
|
16828
16829
|
};
|
|
16829
16830
|
|
|
16830
16831
|
} // namespace duckdb
|
|
16832
|
+
|
|
16831
16833
|
//===----------------------------------------------------------------------===//
|
|
16832
16834
|
// DuckDB
|
|
16833
16835
|
//
|