duckdb 0.5.2-dev1241.0 → 0.5.2-dev1246.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.5.2-dev1241.0",
5
+ "version": "0.5.2-dev1246.0",
6
6
  "description": "DuckDB node.js API",
7
7
  "gypfile": true,
8
8
  "dependencies": {
package/src/duckdb.cpp CHANGED
@@ -206266,14 +206266,22 @@ void DataTable::ScanTableSegment(idx_t row_start, idx_t count, const std::functi
206266
206266
  break;
206267
206267
  }
206268
206268
  idx_t end_row = current_row + chunk.size();
206269
+ // start of chunk is current_row
206270
+ // end of chunk is end_row
206269
206271
  // figure out if we need to write the entire chunk or just part of it
206270
206272
  idx_t chunk_start = MaxValue<idx_t>(current_row, row_start);
206271
206273
  idx_t chunk_end = MinValue<idx_t>(end_row, end);
206272
206274
  D_ASSERT(chunk_start < chunk_end);
206273
206275
  idx_t chunk_count = chunk_end - chunk_start;
206274
206276
  if (chunk_count != chunk.size()) {
206277
+ D_ASSERT(chunk_count <= chunk.size());
206275
206278
  // need to slice the chunk before insert
206276
- auto start_in_chunk = chunk_start % STANDARD_VECTOR_SIZE;
206279
+ idx_t start_in_chunk;
206280
+ if (current_row >= row_start) {
206281
+ start_in_chunk = 0;
206282
+ } else {
206283
+ start_in_chunk = row_start - current_row;
206284
+ }
206277
206285
  SelectionVector sel(start_in_chunk, chunk_count);
206278
206286
  chunk.Slice(sel, chunk_count);
206279
206287
  chunk.Verify();
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 "ed8eafda9"
15
- #define DUCKDB_VERSION "v0.5.2-dev1241"
14
+ #define DUCKDB_SOURCE_ID "bf995526f"
15
+ #define DUCKDB_VERSION "v0.5.2-dev1246"
16
16
  //===----------------------------------------------------------------------===//
17
17
  // DuckDB
18
18
  //