duckdb 0.6.2-dev942.0 → 0.6.2-dev960.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 CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "duckdb",
3
3
  "main": "./lib/duckdb.js",
4
4
  "types": "./lib/duckdb.d.ts",
5
- "version": "0.6.2-dev942.0",
5
+ "version": "0.6.2-dev960.0",
6
6
  "description": "DuckDB node.js API",
7
7
  "gypfile": true,
8
8
  "dependencies": {
@@ -28,6 +28,20 @@ ColumnDataAllocator::ColumnDataAllocator(ClientContext &context, ColumnDataAlloc
28
28
  }
29
29
  }
30
30
 
31
+ ColumnDataAllocator::ColumnDataAllocator(ColumnDataAllocator &other) {
32
+ type = other.GetType();
33
+ switch (type) {
34
+ case ColumnDataAllocatorType::BUFFER_MANAGER_ALLOCATOR:
35
+ alloc.allocator = other.alloc.allocator;
36
+ break;
37
+ case ColumnDataAllocatorType::IN_MEMORY_ALLOCATOR:
38
+ alloc.buffer_manager = other.alloc.buffer_manager;
39
+ break;
40
+ default:
41
+ throw InternalException("Unrecognized column data allocator type");
42
+ }
43
+ }
44
+
31
45
  BufferHandle ColumnDataAllocator::Pin(uint32_t block_id) {
32
46
  D_ASSERT(type == ColumnDataAllocatorType::BUFFER_MANAGER_ALLOCATOR);
33
47
  shared_ptr<BlockHandle> handle;
@@ -915,6 +915,9 @@ void ColumnDataCollection::Print() const {
915
915
  void ColumnDataCollection::Reset() {
916
916
  count = 0;
917
917
  segments.clear();
918
+
919
+ // Refreshes the ColumnDataAllocator to prevent holding on to allocated data unnecessarily
920
+ allocator = make_shared<ColumnDataAllocator>(*allocator);
918
921
  }
919
922
 
920
923
  bool ColumnDataCollection::ResultEquals(const ColumnDataCollection &left, const ColumnDataCollection &right,
@@ -1,8 +1,8 @@
1
1
  #ifndef DUCKDB_VERSION
2
- #define DUCKDB_VERSION "0.6.2-dev942"
2
+ #define DUCKDB_VERSION "0.6.2-dev960"
3
3
  #endif
4
4
  #ifndef DUCKDB_SOURCE_ID
5
- #define DUCKDB_SOURCE_ID "2dcdc24556"
5
+ #define DUCKDB_SOURCE_ID "84b9e770f3"
6
6
  #endif
7
7
  #include "duckdb/function/table/system_functions.hpp"
8
8
  #include "duckdb/main/database.hpp"
@@ -31,6 +31,7 @@ public:
31
31
  ColumnDataAllocator(Allocator &allocator);
32
32
  ColumnDataAllocator(BufferManager &buffer_manager);
33
33
  ColumnDataAllocator(ClientContext &context, ColumnDataAllocatorType allocator_type);
34
+ ColumnDataAllocator(ColumnDataAllocator &allocator);
34
35
 
35
36
  //! Returns an allocator object to allocate with. This returns the allocator in IN_MEMORY_ALLOCATOR, and a buffer
36
37
  //! allocator in case of BUFFER_MANAGER_ALLOCATOR.
@@ -104,8 +104,10 @@
104
104
  #define CPPHTTPLIB_RECV_FLAGS 0
105
105
  #endif
106
106
 
107
- #ifndef CPPHTTPLIB_SEND_FLAGS
107
+ #ifndef MSG_NOSIGNAL
108
108
  #define CPPHTTPLIB_SEND_FLAGS 0
109
+ #else
110
+ #define CPPHTTPLIB_SEND_FLAGS MSG_NOSIGNAL
109
111
  #endif
110
112
 
111
113
  #ifndef CPPHTTPLIB_LISTEN_BACKLOG