duckdb 0.2.10-dev343.0 → 0.2.10-dev358.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 +13 -4
- package/src/duckdb.hpp +2 -2
package/package.json
CHANGED
package/src/duckdb.cpp
CHANGED
|
@@ -49217,7 +49217,6 @@ void Leaf::Insert(row_t row_id) {
|
|
|
49217
49217
|
row_ids[num_elements++] = row_id;
|
|
49218
49218
|
}
|
|
49219
49219
|
|
|
49220
|
-
//! TODO: Maybe shrink array dynamically?
|
|
49221
49220
|
void Leaf::Remove(row_t row_id) {
|
|
49222
49221
|
idx_t entry_offset = INVALID_INDEX;
|
|
49223
49222
|
for (idx_t i = 0; i < num_elements; i++) {
|
|
@@ -49230,8 +49229,19 @@ void Leaf::Remove(row_t row_id) {
|
|
|
49230
49229
|
return;
|
|
49231
49230
|
}
|
|
49232
49231
|
num_elements--;
|
|
49233
|
-
|
|
49234
|
-
|
|
49232
|
+
if (capacity > 2 && num_elements < capacity / 2) {
|
|
49233
|
+
// Shrink array, if less than half full
|
|
49234
|
+
auto new_row_id = unique_ptr<row_t[]>(new row_t[capacity / 2]);
|
|
49235
|
+
memcpy(new_row_id.get(), row_ids.get(), entry_offset * sizeof(row_t));
|
|
49236
|
+
memcpy(new_row_id.get() + entry_offset, row_ids.get() + entry_offset + 1,
|
|
49237
|
+
(num_elements - entry_offset) * sizeof(row_t));
|
|
49238
|
+
capacity /= 2;
|
|
49239
|
+
row_ids = move(new_row_id);
|
|
49240
|
+
} else {
|
|
49241
|
+
// Copy the rest
|
|
49242
|
+
for (idx_t j = entry_offset; j < num_elements; j++) {
|
|
49243
|
+
row_ids[j] = row_ids[j + 1];
|
|
49244
|
+
}
|
|
49235
49245
|
}
|
|
49236
49246
|
}
|
|
49237
49247
|
|
|
@@ -49327,7 +49337,6 @@ Node16::Node16(ART &art, size_t compression_length) : Node(art, NodeType::N16, c
|
|
|
49327
49337
|
memset(key, 16, sizeof(key));
|
|
49328
49338
|
}
|
|
49329
49339
|
|
|
49330
|
-
// TODO : In the future this can be performed using SIMD (#include <emmintrin.h> x86 SSE intrinsics)
|
|
49331
49340
|
idx_t Node16::GetChildPos(uint8_t k) {
|
|
49332
49341
|
for (idx_t pos = 0; pos < count; pos++) {
|
|
49333
49342
|
if (key[pos] == k) {
|
package/src/duckdb.hpp
CHANGED
|
@@ -10,8 +10,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
10
10
|
|
|
11
11
|
#pragma once
|
|
12
12
|
#define DUCKDB_AMALGAMATION 1
|
|
13
|
-
#define DUCKDB_SOURCE_ID "
|
|
14
|
-
#define DUCKDB_VERSION "0.2.10-
|
|
13
|
+
#define DUCKDB_SOURCE_ID "e9729b082"
|
|
14
|
+
#define DUCKDB_VERSION "0.2.10-dev358"
|
|
15
15
|
//===----------------------------------------------------------------------===//
|
|
16
16
|
// DuckDB
|
|
17
17
|
//
|