duckdb 0.6.1-dev191.0 → 0.6.1-dev201.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 +10 -6
- package/src/duckdb.hpp +2 -2
- package/src/parquet-amalgamation.cpp +36691 -36691
package/package.json
CHANGED
package/src/duckdb.cpp
CHANGED
|
@@ -208817,11 +208817,15 @@ public:
|
|
|
208817
208817
|
new_string = !LookupString(data[idx]);
|
|
208818
208818
|
}
|
|
208819
208819
|
|
|
208820
|
-
bool fits =
|
|
208820
|
+
bool fits = CalculateSpaceRequirements(new_string, string_size);
|
|
208821
208821
|
if (!fits) {
|
|
208822
208822
|
Flush();
|
|
208823
208823
|
new_string = true;
|
|
208824
|
-
|
|
208824
|
+
|
|
208825
|
+
fits = CalculateSpaceRequirements(new_string, string_size);
|
|
208826
|
+
if (!fits) {
|
|
208827
|
+
throw InternalException("Dictionary compression could not write to new segment");
|
|
208828
|
+
}
|
|
208825
208829
|
}
|
|
208826
208830
|
|
|
208827
208831
|
if (!row_is_valid) {
|
|
@@ -208849,8 +208853,8 @@ protected:
|
|
|
208849
208853
|
virtual void AddNewString(string_t str) = 0;
|
|
208850
208854
|
// Add a null value to the compression state
|
|
208851
208855
|
virtual void AddNull() = 0;
|
|
208852
|
-
//
|
|
208853
|
-
virtual bool
|
|
208856
|
+
// Needs to be called before adding a value. Will return false if a flush is required first.
|
|
208857
|
+
virtual bool CalculateSpaceRequirements(bool new_string, size_t string_size) = 0;
|
|
208854
208858
|
// Flush the segment to disk if compressing or reset the counters if analyzing
|
|
208855
208859
|
virtual void Flush(bool final = false) = 0;
|
|
208856
208860
|
};
|
|
@@ -209014,7 +209018,7 @@ public:
|
|
|
209014
209018
|
current_segment->count++;
|
|
209015
209019
|
}
|
|
209016
209020
|
|
|
209017
|
-
bool
|
|
209021
|
+
bool CalculateSpaceRequirements(bool new_string, size_t string_size) override {
|
|
209018
209022
|
if (new_string) {
|
|
209019
209023
|
next_width = BitpackingPrimitives::MinimumBitWidth(index_buffer.size() - 1 + new_string);
|
|
209020
209024
|
return DictionaryCompressionStorage::HasEnoughSpace(current_segment->count.load() + 1,
|
|
@@ -209135,7 +209139,7 @@ struct DictionaryAnalyzeState : public DictionaryCompressionState {
|
|
|
209135
209139
|
current_tuple_count++;
|
|
209136
209140
|
}
|
|
209137
209141
|
|
|
209138
|
-
bool
|
|
209142
|
+
bool CalculateSpaceRequirements(bool new_string, size_t string_size) override {
|
|
209139
209143
|
if (new_string) {
|
|
209140
209144
|
next_width =
|
|
209141
209145
|
BitpackingPrimitives::MinimumBitWidth(current_unique_count + 2); // 1 for null, one for new string
|
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.6.1-
|
|
14
|
+
#define DUCKDB_SOURCE_ID "1e7f6453c1"
|
|
15
|
+
#define DUCKDB_VERSION "v0.6.1-dev201"
|
|
16
16
|
//===----------------------------------------------------------------------===//
|
|
17
17
|
// DuckDB
|
|
18
18
|
//
|