duckdb 0.2.10-dev329.0 → 0.2.10-dev331.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 +23 -0
- package/src/duckdb.hpp +2 -2
package/package.json
CHANGED
package/src/duckdb.cpp
CHANGED
|
@@ -145963,6 +145963,29 @@ idx_t LocalStorage::Delete(DataTable *table, Vector &row_ids, idx_t count) {
|
|
|
145963
145963
|
idx_t chunk_idx = GetChunk(row_ids);
|
|
145964
145964
|
D_ASSERT(chunk_idx < storage->collection.ChunkCount());
|
|
145965
145965
|
|
|
145966
|
+
// delete from unique indices (if any)
|
|
145967
|
+
if (!storage->indexes.empty()) {
|
|
145968
|
+
// Index::Delete assumes that ALL rows are being deleted, so
|
|
145969
|
+
// Slice out the rows that are being deleted from the storage Chunk
|
|
145970
|
+
auto &chunk = storage->collection.GetChunk(chunk_idx);
|
|
145971
|
+
|
|
145972
|
+
VectorData row_ids_data;
|
|
145973
|
+
row_ids.Orrify(count, row_ids_data);
|
|
145974
|
+
auto row_identifiers = (const row_t *)row_ids_data.data;
|
|
145975
|
+
SelectionVector sel(count);
|
|
145976
|
+
for (idx_t i = 0; i < count; ++i) {
|
|
145977
|
+
const auto idx = row_ids_data.sel->get_index(i);
|
|
145978
|
+
sel.set_index(i, row_identifiers[idx] - MAX_ROW_ID);
|
|
145979
|
+
}
|
|
145980
|
+
|
|
145981
|
+
DataChunk deleted;
|
|
145982
|
+
deleted.InitializeEmpty(chunk.GetTypes());
|
|
145983
|
+
deleted.Slice(chunk, sel, count);
|
|
145984
|
+
for (auto &index : storage->indexes) {
|
|
145985
|
+
index->Delete(deleted, row_ids);
|
|
145986
|
+
}
|
|
145987
|
+
}
|
|
145988
|
+
|
|
145966
145989
|
// get a pointer to the deleted entries for this chunk
|
|
145967
145990
|
bool *deleted;
|
|
145968
145991
|
auto entry = storage->deleted_entries.find(chunk_idx);
|
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 "7dd852e1d"
|
|
14
|
+
#define DUCKDB_VERSION "0.2.10-dev331"
|
|
15
15
|
//===----------------------------------------------------------------------===//
|
|
16
16
|
// DuckDB
|
|
17
17
|
//
|