duckdb 0.3.3-dev1273.0 → 0.3.3-dev1282.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 +34 -16
- package/src/duckdb.hpp +4 -7
- package/src/parquet-amalgamation.cpp +30820 -30820
package/package.json
CHANGED
package/src/duckdb.cpp
CHANGED
|
@@ -106099,11 +106099,21 @@ RESULT_TYPE TryCastCInternal(duckdb_result *result, idx_t col, idx_t row) {
|
|
|
106099
106099
|
return result_value;
|
|
106100
106100
|
}
|
|
106101
106101
|
|
|
106102
|
-
static bool
|
|
106102
|
+
static bool CanUseDeprecatedFetch(duckdb_result *result, idx_t col, idx_t row) {
|
|
106103
|
+
if (!result) {
|
|
106104
|
+
return false;
|
|
106105
|
+
}
|
|
106103
106106
|
if (!duckdb::deprecated_materialize_result(result)) {
|
|
106104
106107
|
return false;
|
|
106105
106108
|
}
|
|
106106
|
-
if (
|
|
106109
|
+
if (col >= result->__deprecated_column_count || row >= result->__deprecated_row_count) {
|
|
106110
|
+
return false;
|
|
106111
|
+
}
|
|
106112
|
+
return true;
|
|
106113
|
+
}
|
|
106114
|
+
|
|
106115
|
+
static bool CanFetchValue(duckdb_result *result, idx_t col, idx_t row) {
|
|
106116
|
+
if (!CanUseDeprecatedFetch(result, col, row)) {
|
|
106107
106117
|
return false;
|
|
106108
106118
|
}
|
|
106109
106119
|
if (result->__deprecated_columns[col].__deprecated_nullmask[row]) {
|
|
@@ -106285,7 +106295,7 @@ duckdb_blob duckdb_value_blob(duckdb_result *result, idx_t col, idx_t row) {
|
|
|
106285
106295
|
}
|
|
106286
106296
|
|
|
106287
106297
|
bool duckdb_value_is_null(duckdb_result *result, idx_t col, idx_t row) {
|
|
106288
|
-
if (!result
|
|
106298
|
+
if (!CanUseDeprecatedFetch(result, col, row)) {
|
|
106289
106299
|
return false;
|
|
106290
106300
|
}
|
|
106291
106301
|
return result->__deprecated_columns[col].__deprecated_nullmask[row];
|
|
@@ -164366,6 +164376,7 @@ void WriteOverflowStringsToDisk::AllocateNewBlock(block_id_t new_block_id) {
|
|
|
164366
164376
|
|
|
164367
164377
|
|
|
164368
164378
|
|
|
164379
|
+
|
|
164369
164380
|
|
|
164370
164381
|
|
|
164371
164382
|
namespace duckdb {
|
|
@@ -164515,38 +164526,41 @@ void CheckpointManager::WriteSchema(SchemaCatalogEntry &schema) {
|
|
|
164515
164526
|
}
|
|
164516
164527
|
});
|
|
164517
164528
|
|
|
164529
|
+
FieldWriter writer(*metadata_writer);
|
|
164530
|
+
writer.WriteField<uint32_t>(custom_types.size());
|
|
164531
|
+
writer.WriteField<uint32_t>(sequences.size());
|
|
164532
|
+
writer.WriteField<uint32_t>(tables.size());
|
|
164533
|
+
writer.WriteField<uint32_t>(views.size());
|
|
164534
|
+
writer.WriteField<uint32_t>(macros.size());
|
|
164535
|
+
writer.WriteField<uint32_t>(table_macros.size());
|
|
164536
|
+
writer.Finalize();
|
|
164537
|
+
|
|
164518
164538
|
// write the custom_types
|
|
164519
|
-
metadata_writer->Write<uint32_t>(custom_types.size());
|
|
164520
164539
|
for (auto &custom_type : custom_types) {
|
|
164521
164540
|
WriteType(*custom_type);
|
|
164522
164541
|
}
|
|
164523
164542
|
|
|
164524
164543
|
// write the sequences
|
|
164525
|
-
metadata_writer->Write<uint32_t>(sequences.size());
|
|
164526
164544
|
for (auto &seq : sequences) {
|
|
164527
164545
|
WriteSequence(*seq);
|
|
164528
164546
|
}
|
|
164529
164547
|
// reorder tables because of foreign key constraint
|
|
164530
164548
|
ReorderTableEntries(tables);
|
|
164531
164549
|
// now write the tables
|
|
164532
|
-
metadata_writer->Write<uint32_t>(tables.size());
|
|
164533
164550
|
for (auto &table : tables) {
|
|
164534
164551
|
WriteTable(*table);
|
|
164535
164552
|
}
|
|
164536
164553
|
// now write the views
|
|
164537
|
-
metadata_writer->Write<uint32_t>(views.size());
|
|
164538
164554
|
for (auto &view : views) {
|
|
164539
164555
|
WriteView(*view);
|
|
164540
164556
|
}
|
|
164541
164557
|
|
|
164542
164558
|
// finally write the macro's
|
|
164543
|
-
metadata_writer->Write<uint32_t>(macros.size());
|
|
164544
164559
|
for (auto ¯o : macros) {
|
|
164545
164560
|
WriteMacro(*macro);
|
|
164546
164561
|
}
|
|
164547
164562
|
|
|
164548
164563
|
// finally write the macro's
|
|
164549
|
-
metadata_writer->Write<uint32_t>(table_macros.size());
|
|
164550
164564
|
for (auto ¯o : table_macros) {
|
|
164551
164565
|
WriteTableMacro(*macro);
|
|
164552
164566
|
}
|
|
@@ -164561,35 +164575,39 @@ void CheckpointManager::ReadSchema(ClientContext &context, MetaBlockReader &read
|
|
|
164561
164575
|
info->on_conflict = OnCreateConflict::IGNORE_ON_CONFLICT;
|
|
164562
164576
|
catalog.CreateSchema(context, info.get());
|
|
164563
164577
|
|
|
164578
|
+
// first read all the counts
|
|
164579
|
+
FieldReader field_reader(reader);
|
|
164580
|
+
uint32_t enum_count = field_reader.ReadRequired<uint32_t>();
|
|
164581
|
+
uint32_t seq_count = field_reader.ReadRequired<uint32_t>();
|
|
164582
|
+
uint32_t table_count = field_reader.ReadRequired<uint32_t>();
|
|
164583
|
+
uint32_t view_count = field_reader.ReadRequired<uint32_t>();
|
|
164584
|
+
uint32_t macro_count = field_reader.ReadRequired<uint32_t>();
|
|
164585
|
+
uint32_t table_macro_count = field_reader.ReadRequired<uint32_t>();
|
|
164586
|
+
field_reader.Finalize();
|
|
164587
|
+
|
|
164564
164588
|
// now read the enums
|
|
164565
|
-
uint32_t enum_count = reader.Read<uint32_t>();
|
|
164566
164589
|
for (uint32_t i = 0; i < enum_count; i++) {
|
|
164567
164590
|
ReadType(context, reader);
|
|
164568
164591
|
}
|
|
164569
164592
|
|
|
164570
164593
|
// read the sequences
|
|
164571
|
-
uint32_t seq_count = reader.Read<uint32_t>();
|
|
164572
164594
|
for (uint32_t i = 0; i < seq_count; i++) {
|
|
164573
164595
|
ReadSequence(context, reader);
|
|
164574
164596
|
}
|
|
164575
164597
|
// read the table count and recreate the tables
|
|
164576
|
-
uint32_t table_count = reader.Read<uint32_t>();
|
|
164577
164598
|
for (uint32_t i = 0; i < table_count; i++) {
|
|
164578
164599
|
ReadTable(context, reader);
|
|
164579
164600
|
}
|
|
164580
164601
|
// now read the views
|
|
164581
|
-
uint32_t view_count = reader.Read<uint32_t>();
|
|
164582
164602
|
for (uint32_t i = 0; i < view_count; i++) {
|
|
164583
164603
|
ReadView(context, reader);
|
|
164584
164604
|
}
|
|
164585
164605
|
|
|
164586
164606
|
// finally read the macro's
|
|
164587
|
-
uint32_t macro_count = reader.Read<uint32_t>();
|
|
164588
164607
|
for (uint32_t i = 0; i < macro_count; i++) {
|
|
164589
164608
|
ReadMacro(context, reader);
|
|
164590
164609
|
}
|
|
164591
164610
|
|
|
164592
|
-
uint32_t table_macro_count = reader.Read<uint32_t>();
|
|
164593
164611
|
for (uint32_t i = 0; i < table_macro_count; i++) {
|
|
164594
164612
|
ReadTableMacro(context, reader);
|
|
164595
164613
|
}
|
|
@@ -172970,7 +172988,7 @@ string ValidityStatistics::ToString() const {
|
|
|
172970
172988
|
|
|
172971
172989
|
namespace duckdb {
|
|
172972
172990
|
|
|
172973
|
-
const uint64_t VERSION_NUMBER =
|
|
172991
|
+
const uint64_t VERSION_NUMBER = 33;
|
|
172974
172992
|
|
|
172975
172993
|
} // namespace duckdb
|
|
172976
172994
|
|
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 "a52157e01"
|
|
15
|
+
#define DUCKDB_VERSION "v0.3.3-dev1282"
|
|
16
16
|
//===----------------------------------------------------------------------===//
|
|
17
17
|
// DuckDB
|
|
18
18
|
//
|
|
@@ -5504,10 +5504,9 @@ class CycleCounter {
|
|
|
5504
5504
|
friend struct ExpressionInfo;
|
|
5505
5505
|
friend struct ExpressionRootInfo;
|
|
5506
5506
|
static constexpr int SAMPLING_RATE = 50;
|
|
5507
|
-
static constexpr int SAMPLING_VARIANCE = 100;
|
|
5508
5507
|
|
|
5509
5508
|
public:
|
|
5510
|
-
CycleCounter()
|
|
5509
|
+
CycleCounter() {
|
|
5511
5510
|
}
|
|
5512
5511
|
// Next_sample determines if a sample needs to be taken, if so start the profiler
|
|
5513
5512
|
void BeginSample() {
|
|
@@ -5522,7 +5521,7 @@ public:
|
|
|
5522
5521
|
time += Tick() - tmp;
|
|
5523
5522
|
}
|
|
5524
5523
|
if (current_count >= next_sample) {
|
|
5525
|
-
next_sample = SAMPLING_RATE
|
|
5524
|
+
next_sample = SAMPLING_RATE;
|
|
5526
5525
|
++sample_count;
|
|
5527
5526
|
sample_tuples_count += chunk_size;
|
|
5528
5527
|
current_count = 0;
|
|
@@ -5548,8 +5547,6 @@ private:
|
|
|
5548
5547
|
uint64_t sample_tuples_count = 0;
|
|
5549
5548
|
//! Count the number of ALL tuples
|
|
5550
5549
|
uint64_t tuples_count = 0;
|
|
5551
|
-
//! the random number generator used for sampling
|
|
5552
|
-
RandomEngine random;
|
|
5553
5550
|
};
|
|
5554
5551
|
|
|
5555
5552
|
} // namespace duckdb
|