duckdb 0.3.3-dev1381.0 → 0.3.3-dev1387.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 +14 -6
- package/src/duckdb.hpp +7 -7
- package/src/parquet-amalgamation.cpp +27463 -27463
package/package.json
CHANGED
package/src/duckdb.cpp
CHANGED
|
@@ -153253,6 +153253,9 @@ namespace duckdb {
|
|
|
153253
153253
|
|
|
153254
153254
|
BindResult ExpressionBinder::BindExpression(ParameterExpression &expr, idx_t depth) {
|
|
153255
153255
|
auto bound_parameter = make_unique<BoundParameterExpression>(expr.parameter_nr);
|
|
153256
|
+
if (!binder.parameters) {
|
|
153257
|
+
throw std::runtime_error("Unexpected prepared parameter. This type of statement can't be prepared!");
|
|
153258
|
+
}
|
|
153256
153259
|
binder.parameters->push_back(bound_parameter.get());
|
|
153257
153260
|
return BindResult(move(bound_parameter));
|
|
153258
153261
|
}
|
|
@@ -169563,7 +169566,12 @@ void ValidityScanPartial(ColumnSegment &segment, ColumnScanState &state, idx_t s
|
|
|
169563
169566
|
// the bitwise ops we use below don't work if the vector size is too small
|
|
169564
169567
|
ValidityMask source_mask(input_data);
|
|
169565
169568
|
for (idx_t i = 0; i < scan_count; i++) {
|
|
169566
|
-
|
|
169569
|
+
if (!source_mask.RowIsValid(start + i)) {
|
|
169570
|
+
if (result_mask.AllValid()) {
|
|
169571
|
+
result_mask.Initialize(MaxValue<idx_t>(STANDARD_VECTOR_SIZE, result_offset + scan_count));
|
|
169572
|
+
}
|
|
169573
|
+
result_mask.SetInvalid(result_offset + i);
|
|
169574
|
+
}
|
|
169567
169575
|
}
|
|
169568
169576
|
#else
|
|
169569
169577
|
// the code below does what the fallback code above states, but using bitwise ops:
|
|
@@ -171292,7 +171300,7 @@ void LocalTableStorage::InitializeScan(LocalScanState &state, TableFilterSet *ta
|
|
|
171292
171300
|
// nothing to scan
|
|
171293
171301
|
return;
|
|
171294
171302
|
}
|
|
171295
|
-
state.SetStorage(
|
|
171303
|
+
state.SetStorage(shared_from_this());
|
|
171296
171304
|
|
|
171297
171305
|
state.chunk_index = 0;
|
|
171298
171306
|
state.max_index = collection.ChunkCount() - 1;
|
|
@@ -171316,12 +171324,12 @@ LocalScanState::~LocalScanState() {
|
|
|
171316
171324
|
SetStorage(nullptr);
|
|
171317
171325
|
}
|
|
171318
171326
|
|
|
171319
|
-
void LocalScanState::SetStorage(LocalTableStorage
|
|
171320
|
-
if (storage
|
|
171327
|
+
void LocalScanState::SetStorage(shared_ptr<LocalTableStorage> new_storage) {
|
|
171328
|
+
if (storage) {
|
|
171321
171329
|
D_ASSERT(storage->active_scans > 0);
|
|
171322
171330
|
storage->active_scans--;
|
|
171323
171331
|
}
|
|
171324
|
-
storage = new_storage;
|
|
171332
|
+
storage = move(new_storage);
|
|
171325
171333
|
if (storage) {
|
|
171326
171334
|
storage->active_scans++;
|
|
171327
171335
|
}
|
|
@@ -171435,7 +171443,7 @@ void LocalStorage::Append(DataTable *table, DataChunk &chunk) {
|
|
|
171435
171443
|
auto entry = table_storage.find(table);
|
|
171436
171444
|
LocalTableStorage *storage;
|
|
171437
171445
|
if (entry == table_storage.end()) {
|
|
171438
|
-
auto new_storage =
|
|
171446
|
+
auto new_storage = make_shared<LocalTableStorage>(*table);
|
|
171439
171447
|
storage = new_storage.get();
|
|
171440
171448
|
table_storage.insert(make_pair(table, move(new_storage)));
|
|
171441
171449
|
} else {
|
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 "
|
|
15
|
-
#define DUCKDB_VERSION "v0.3.3-
|
|
14
|
+
#define DUCKDB_SOURCE_ID "a69a377f6"
|
|
15
|
+
#define DUCKDB_VERSION "v0.3.3-dev1387"
|
|
16
16
|
//===----------------------------------------------------------------------===//
|
|
17
17
|
// DuckDB
|
|
18
18
|
//
|
|
@@ -14435,9 +14435,9 @@ struct ColumnFetchState {
|
|
|
14435
14435
|
struct LocalScanState {
|
|
14436
14436
|
~LocalScanState();
|
|
14437
14437
|
|
|
14438
|
-
void SetStorage(LocalTableStorage
|
|
14438
|
+
void SetStorage(shared_ptr<LocalTableStorage> storage);
|
|
14439
14439
|
LocalTableStorage *GetStorage() {
|
|
14440
|
-
return storage;
|
|
14440
|
+
return storage.get();
|
|
14441
14441
|
}
|
|
14442
14442
|
|
|
14443
14443
|
idx_t chunk_index;
|
|
@@ -14446,7 +14446,7 @@ struct LocalScanState {
|
|
|
14446
14446
|
TableFilterSet *table_filters;
|
|
14447
14447
|
|
|
14448
14448
|
private:
|
|
14449
|
-
LocalTableStorage
|
|
14449
|
+
shared_ptr<LocalTableStorage> storage;
|
|
14450
14450
|
};
|
|
14451
14451
|
|
|
14452
14452
|
class RowGroupScanState {
|
|
@@ -14507,7 +14507,7 @@ class DataTable;
|
|
|
14507
14507
|
class WriteAheadLog;
|
|
14508
14508
|
struct TableAppendState;
|
|
14509
14509
|
|
|
14510
|
-
class LocalTableStorage {
|
|
14510
|
+
class LocalTableStorage : public std::enable_shared_from_this<LocalTableStorage> {
|
|
14511
14511
|
public:
|
|
14512
14512
|
explicit LocalTableStorage(DataTable &table);
|
|
14513
14513
|
~LocalTableStorage();
|
|
@@ -14590,7 +14590,7 @@ private:
|
|
|
14590
14590
|
|
|
14591
14591
|
private:
|
|
14592
14592
|
Transaction &transaction;
|
|
14593
|
-
unordered_map<DataTable *,
|
|
14593
|
+
unordered_map<DataTable *, shared_ptr<LocalTableStorage>> table_storage;
|
|
14594
14594
|
|
|
14595
14595
|
void Flush(DataTable &table, LocalTableStorage &storage);
|
|
14596
14596
|
};
|