duckdb 0.3.5-dev602.0 → 0.3.5-dev609.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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "duckdb",
3
3
  "main": "./lib/duckdb.js",
4
- "version": "0.3.5-dev602.0",
4
+ "version": "0.3.5-dev609.0",
5
5
  "description": "DuckDB node.js API",
6
6
  "gypfile": true,
7
7
  "dependencies": {
package/src/duckdb.cpp CHANGED
@@ -4681,6 +4681,7 @@ CatalogEntry *CatalogSet::CreateEntryInternal(ClientContext &context, unique_ptr
4681
4681
  auto entry_index = current_entry++;
4682
4682
  auto catalog_entry = entry.get();
4683
4683
 
4684
+ entry->set = this;
4684
4685
  entry->timestamp = 0;
4685
4686
 
4686
4687
  PutMapping(context, name, entry_index);
@@ -5376,6 +5377,9 @@ void DependencyManager::AddObject(ClientContext &context, CatalogEntry *object,
5376
5377
  for (auto &dependency : dependencies) {
5377
5378
  idx_t entry_index;
5378
5379
  CatalogEntry *catalog_entry;
5380
+ if (!dependency->set) {
5381
+ throw InternalException("Dependency has no set");
5382
+ }
5379
5383
  if (!dependency->set->GetEntryInternal(context, dependency->name, entry_index, catalog_entry)) {
5380
5384
  throw InternalException("Dependency has already been deleted?");
5381
5385
  }
@@ -175454,8 +175458,20 @@ void FixedSizeScanPartial(ColumnSegment &segment, ColumnScanState &state, idx_t
175454
175458
 
175455
175459
  template <class T>
175456
175460
  void FixedSizeScan(ColumnSegment &segment, ColumnScanState &state, idx_t scan_count, Vector &result) {
175457
- // FIXME: we should be able to do a zero-copy here
175458
- FixedSizeScanPartial<T>(segment, state, scan_count, result, 0);
175461
+ auto &scan_state = (FixedSizeScanState &)*state.scan_state;
175462
+ auto start = segment.GetRelativeIndex(state.row_index);
175463
+
175464
+ auto data = scan_state.handle->node->buffer + segment.GetBlockOffset();
175465
+ auto source_data = data + start * sizeof(T);
175466
+
175467
+ result.SetVectorType(VectorType::FLAT_VECTOR);
175468
+ if (std::is_same<T, list_entry_t>()) {
175469
+ // list columns are modified in-place during the scans to correct the offsets
175470
+ // so we can't do a zero-copy there
175471
+ memcpy(FlatVector::GetData(result), source_data, scan_count * sizeof(T));
175472
+ } else {
175473
+ FlatVector::SetData(result, source_data);
175474
+ }
175459
175475
  }
175460
175476
 
175461
175477
  //===--------------------------------------------------------------------===//
@@ -182865,6 +182881,7 @@ idx_t ListColumnData::ScanCount(ColumnScanState &state, Vector &result, idx_t co
182865
182881
  D_ASSERT(!updates);
182866
182882
 
182867
182883
  idx_t scan_count = ScanVector(state, result, count);
182884
+ D_ASSERT(scan_count > 0);
182868
182885
  validity.ScanCount(state.child_states[0], result, count);
182869
182886
 
182870
182887
  auto data = FlatVector::GetData<list_entry_t>(result);
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 "ee6a6986d"
15
- #define DUCKDB_VERSION "v0.3.5-dev602"
14
+ #define DUCKDB_SOURCE_ID "256c1992f"
15
+ #define DUCKDB_VERSION "v0.3.5-dev609"
16
16
  //===----------------------------------------------------------------------===//
17
17
  // DuckDB
18
18
  //