duckdb 0.7.2-dev2320.0 → 0.7.2-dev2366.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/data_chunk.cpp +1 -1
- package/src/duckdb/extension/icu/icu-extension.cpp +2 -2
- package/src/duckdb/extension/icu/icu-makedate.cpp +52 -0
- package/src/duckdb/extension/icu/icu-strptime.cpp +1 -1
- package/src/duckdb/extension/icu/third_party/icu/i18n/calendar.cpp +4 -0
- package/src/duckdb/extension/icu/third_party/icu/i18n/dangical.cpp +28 -28
- package/src/duckdb/extension/icu/third_party/icu/i18n/dangical.h +4 -4
- package/src/duckdb/extension/json/include/json_common.hpp +1 -1
- package/src/duckdb/extension/json/json_functions/json_create.cpp +1 -1
- package/src/duckdb/extension/json/json_functions/json_transform.cpp +1 -1
- package/src/duckdb/extension/json/json_functions.cpp +2 -2
- package/src/duckdb/extension/json/json_serializer.cpp +1 -1
- package/src/duckdb/extension/parquet/column_reader.cpp +1 -1
- package/src/duckdb/extension/parquet/column_writer.cpp +3 -3
- package/src/duckdb/src/catalog/catalog_entry/scalar_macro_catalog_entry.cpp +2 -2
- package/src/duckdb/src/common/arrow/arrow_appender.cpp +2 -2
- package/src/duckdb/src/common/operator/cast_operators.cpp +24 -25
- package/src/duckdb/src/common/row_operations/row_heap_scatter.cpp +2 -2
- package/src/duckdb/src/common/row_operations/row_scatter.cpp +1 -1
- package/src/duckdb/src/common/types/bit.cpp +18 -18
- package/src/duckdb/src/common/types/blob.cpp +7 -7
- package/src/duckdb/src/common/types/column/column_data_allocator.cpp +1 -1
- package/src/duckdb/src/common/types/column/column_data_collection.cpp +1 -1
- package/src/duckdb/src/common/types/hash.cpp +1 -1
- package/src/duckdb/src/common/types/hyperloglog.cpp +1 -1
- package/src/duckdb/src/common/types/row/tuple_data_scatter_gather.cpp +2 -2
- package/src/duckdb/src/common/types/string_heap.cpp +2 -2
- package/src/duckdb/src/common/types/string_type.cpp +2 -2
- package/src/duckdb/src/common/types/timestamp.cpp +1 -1
- package/src/duckdb/src/common/types/vector.cpp +7 -7
- package/src/duckdb/src/execution/index/art/art_key.cpp +2 -2
- package/src/duckdb/src/execution/operator/persistent/base_csv_reader.cpp +1 -1
- package/src/duckdb/src/execution/operator/schema/physical_create_type.cpp +1 -1
- package/src/duckdb/src/function/aggregate/distributive/arg_min_max.cpp +2 -2
- package/src/duckdb/src/function/aggregate/distributive/bitagg.cpp +2 -2
- package/src/duckdb/src/function/aggregate/distributive/bitstring_agg.cpp +2 -2
- package/src/duckdb/src/function/aggregate/distributive/first.cpp +2 -2
- package/src/duckdb/src/function/aggregate/distributive/kurtosis.cpp +3 -2
- package/src/duckdb/src/function/aggregate/distributive/minmax.cpp +2 -2
- package/src/duckdb/src/function/aggregate/distributive/skew.cpp +5 -1
- package/src/duckdb/src/function/aggregate/distributive/string_agg.cpp +1 -1
- package/src/duckdb/src/function/cast/list_casts.cpp +1 -1
- package/src/duckdb/src/function/cast/struct_cast.cpp +1 -1
- package/src/duckdb/src/function/cast/vector_cast_helpers.cpp +3 -3
- package/src/duckdb/src/function/scalar/bit/bitstring.cpp +1 -1
- package/src/duckdb/src/function/scalar/blob/encode.cpp +1 -1
- package/src/duckdb/src/function/scalar/date/strftime.cpp +3 -3
- package/src/duckdb/src/function/scalar/generic/current_setting.cpp +1 -1
- package/src/duckdb/src/function/scalar/string/ascii.cpp +1 -1
- package/src/duckdb/src/function/scalar/string/caseconvert.cpp +2 -2
- package/src/duckdb/src/function/scalar/string/concat.cpp +6 -6
- package/src/duckdb/src/function/scalar/string/contains.cpp +2 -2
- package/src/duckdb/src/function/scalar/string/damerau_levenshtein.cpp +2 -2
- package/src/duckdb/src/function/scalar/string/hex.cpp +4 -4
- package/src/duckdb/src/function/scalar/string/instr.cpp +1 -1
- package/src/duckdb/src/function/scalar/string/jaccard.cpp +1 -1
- package/src/duckdb/src/function/scalar/string/jaro_winkler.cpp +5 -5
- package/src/duckdb/src/function/scalar/string/length.cpp +1 -1
- package/src/duckdb/src/function/scalar/string/levenshtein.cpp +2 -2
- package/src/duckdb/src/function/scalar/string/like.cpp +10 -11
- package/src/duckdb/src/function/scalar/string/mismatches.cpp +2 -2
- package/src/duckdb/src/function/scalar/string/nfc_normalize.cpp +1 -1
- package/src/duckdb/src/function/scalar/string/pad.cpp +3 -3
- package/src/duckdb/src/function/scalar/string/prefix.cpp +2 -2
- package/src/duckdb/src/function/scalar/string/printf.cpp +1 -1
- package/src/duckdb/src/function/scalar/string/regexp/regexp_extract_all.cpp +4 -4
- package/src/duckdb/src/function/scalar/string/repeat.cpp +1 -1
- package/src/duckdb/src/function/scalar/string/replace.cpp +3 -3
- package/src/duckdb/src/function/scalar/string/reverse.cpp +1 -1
- package/src/duckdb/src/function/scalar/string/starts_with.cpp +2 -2
- package/src/duckdb/src/function/scalar/string/string_split.cpp +3 -3
- package/src/duckdb/src/function/scalar/string/strip_accents.cpp +2 -2
- package/src/duckdb/src/function/scalar/string/substring.cpp +3 -3
- package/src/duckdb/src/function/scalar/string/suffix.cpp +2 -2
- package/src/duckdb/src/function/scalar/string/translate.cpp +3 -3
- package/src/duckdb/src/function/scalar/string/trim.cpp +3 -3
- package/src/duckdb/src/function/scalar/struct/struct_extract.cpp +1 -1
- package/src/duckdb/src/function/scalar/system/aggregate_export.cpp +5 -7
- package/src/duckdb/src/function/scalar/union/union_extract.cpp +1 -1
- package/src/duckdb/src/function/table/copy_csv.cpp +1 -1
- package/src/duckdb/src/function/table/system/duckdb_functions.cpp +2 -2
- package/src/duckdb/src/function/table/version/pragma_version.cpp +2 -2
- package/src/duckdb/src/include/duckdb/common/crypto/md5.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/radix.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/types/string_type.hpp +8 -6
- package/src/duckdb/src/include/duckdb/common/types/vector_buffer.hpp +1 -1
- package/src/duckdb/src/include/duckdb/function/macro_function.hpp +17 -0
- package/src/duckdb/src/include/duckdb/function/scalar/regexp.hpp +1 -1
- package/src/duckdb/src/include/duckdb/function/scalar/string_functions.hpp +2 -2
- package/src/duckdb/src/include/duckdb/function/scalar_macro_function.hpp +3 -0
- package/src/duckdb/src/include/duckdb/function/table_macro_function.hpp +3 -0
- package/src/duckdb/src/include/duckdb/main/capi/cast/utils.hpp +1 -1
- package/src/duckdb/src/include/duckdb/optimizer/cse_optimizer.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/transformer.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/binder.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression_binder/aggregate_binder.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression_binder/alter_binder.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression_binder/base_select_binder.hpp +4 -3
- package/src/duckdb/src/include/duckdb/planner/expression_binder/check_binder.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression_binder/constant_binder.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression_binder/group_binder.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression_binder/having_binder.hpp +2 -2
- package/src/duckdb/src/include/duckdb/planner/expression_binder/index_binder.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression_binder/insert_binder.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression_binder/lateral_binder.hpp +2 -2
- package/src/duckdb/src/include/duckdb/planner/expression_binder/qualify_binder.hpp +2 -2
- package/src/duckdb/src/include/duckdb/planner/expression_binder/relation_binder.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression_binder/returning_binder.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression_binder/table_function_binder.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression_binder/update_binder.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/expression_binder/where_binder.hpp +2 -2
- package/src/duckdb/src/include/duckdb/planner/expression_binder.hpp +12 -9
- package/src/duckdb/src/include/duckdb/storage/string_uncompressed.hpp +1 -1
- package/src/duckdb/src/main/capi/cast/from_decimal-c.cpp +1 -1
- package/src/duckdb/src/main/capi/result-c.cpp +2 -2
- package/src/duckdb/src/optimizer/cse_optimizer.cpp +9 -8
- package/src/duckdb/src/parser/expression/subquery_expression.cpp +1 -1
- package/src/duckdb/src/parser/transform/statement/transform_pivot_stmt.cpp +2 -0
- package/src/duckdb/src/parser/transform/statement/transform_select_node.cpp +33 -29
- package/src/duckdb/src/planner/binder/expression/bind_aggregate_expression.cpp +6 -5
- package/src/duckdb/src/planner/binder/expression/bind_cast_expression.cpp +1 -1
- package/src/duckdb/src/planner/binder/expression/bind_collate_expression.cpp +2 -2
- package/src/duckdb/src/planner/binder/expression/bind_columnref_expression.cpp +1 -1
- package/src/duckdb/src/planner/binder/expression/bind_function_expression.cpp +8 -7
- package/src/duckdb/src/planner/binder/expression/bind_lambda.cpp +2 -2
- package/src/duckdb/src/planner/binder/expression/bind_macro_expression.cpp +6 -6
- package/src/duckdb/src/planner/binder/expression/bind_operator_expression.cpp +2 -2
- package/src/duckdb/src/planner/binder/expression/bind_subquery_expression.cpp +1 -1
- package/src/duckdb/src/planner/binder/query_node/bind_table_macro_node.cpp +1 -1
- package/src/duckdb/src/planner/binder/query_node/plan_select_node.cpp +8 -8
- package/src/duckdb/src/planner/binder/query_node/plan_subquery.cpp +5 -5
- package/src/duckdb/src/planner/binder/statement/bind_create.cpp +2 -2
- package/src/duckdb/src/planner/binder/statement/bind_delete.cpp +1 -1
- package/src/duckdb/src/planner/binder/statement/bind_update.cpp +2 -2
- package/src/duckdb/src/planner/binder/tableref/plan_expressionlistref.cpp +1 -1
- package/src/duckdb/src/planner/binder/tableref/plan_joinref.cpp +4 -4
- package/src/duckdb/src/planner/expression.cpp +2 -1
- package/src/duckdb/src/planner/expression_binder/aggregate_binder.cpp +2 -2
- package/src/duckdb/src/planner/expression_binder/alter_binder.cpp +2 -2
- package/src/duckdb/src/planner/expression_binder/base_select_binder.cpp +4 -4
- package/src/duckdb/src/planner/expression_binder/check_binder.cpp +4 -4
- package/src/duckdb/src/planner/expression_binder/column_alias_binder.cpp +1 -1
- package/src/duckdb/src/planner/expression_binder/constant_binder.cpp +3 -3
- package/src/duckdb/src/planner/expression_binder/group_binder.cpp +2 -2
- package/src/duckdb/src/planner/expression_binder/having_binder.cpp +4 -4
- package/src/duckdb/src/planner/expression_binder/index_binder.cpp +2 -2
- package/src/duckdb/src/planner/expression_binder/insert_binder.cpp +2 -2
- package/src/duckdb/src/planner/expression_binder/lateral_binder.cpp +3 -3
- package/src/duckdb/src/planner/expression_binder/qualify_binder.cpp +4 -4
- package/src/duckdb/src/planner/expression_binder/relation_binder.cpp +2 -2
- package/src/duckdb/src/planner/expression_binder/returning_binder.cpp +2 -2
- package/src/duckdb/src/planner/expression_binder/table_function_binder.cpp +3 -3
- package/src/duckdb/src/planner/expression_binder/update_binder.cpp +2 -2
- package/src/duckdb/src/planner/expression_binder/where_binder.cpp +4 -4
- package/src/duckdb/src/planner/expression_binder.cpp +12 -12
- package/src/duckdb/src/storage/checkpoint/write_overflow_strings_to_disk.cpp +2 -2
- package/src/duckdb/src/storage/compression/dictionary_compression.cpp +1 -1
- package/src/duckdb/src/storage/compression/fsst.cpp +3 -3
- package/src/duckdb/src/storage/compression/string_uncompressed.cpp +1 -1
- package/src/duckdb/src/storage/statistics/string_stats.cpp +2 -2
- package/src/statement.cpp +3 -3
@@ -20,7 +20,7 @@ idx_t Bit::ComputeBitstringLen(idx_t len) {
|
|
20
20
|
}
|
21
21
|
|
22
22
|
static inline idx_t GetBitPadding(const string_t &bit_string) {
|
23
|
-
auto data = (const_data_ptr_t)bit_string.
|
23
|
+
auto data = (const_data_ptr_t)bit_string.GetData();
|
24
24
|
D_ASSERT(idx_t(data[0]) <= 8);
|
25
25
|
return data[0];
|
26
26
|
}
|
@@ -46,7 +46,7 @@ void Bit::Finalize(string_t &str) {
|
|
46
46
|
|
47
47
|
void Bit::SetEmptyBitString(string_t &target, string_t &input) {
|
48
48
|
char *res_buf = target.GetDataWriteable();
|
49
|
-
const char *buf = input.
|
49
|
+
const char *buf = input.GetData();
|
50
50
|
memset(res_buf, 0, input.GetSize());
|
51
51
|
res_buf[0] = buf[0];
|
52
52
|
Bit::Finalize(target);
|
@@ -61,7 +61,7 @@ void Bit::SetEmptyBitString(string_t &target, idx_t len) {
|
|
61
61
|
|
62
62
|
// **** casting functions ****
|
63
63
|
void Bit::ToString(string_t bits, char *output) {
|
64
|
-
auto data = (const_data_ptr_t)bits.
|
64
|
+
auto data = (const_data_ptr_t)bits.GetData();
|
65
65
|
auto len = bits.GetSize();
|
66
66
|
|
67
67
|
idx_t padding = GetBitPadding(bits);
|
@@ -84,7 +84,7 @@ string Bit::ToString(string_t str) {
|
|
84
84
|
}
|
85
85
|
|
86
86
|
bool Bit::TryGetBitStringSize(string_t str, idx_t &str_len, string *error_message) {
|
87
|
-
auto data = (const_data_ptr_t)str.
|
87
|
+
auto data = (const_data_ptr_t)str.GetData();
|
88
88
|
auto len = str.GetSize();
|
89
89
|
str_len = 0;
|
90
90
|
for (idx_t i = 0; i < len; i++) {
|
@@ -107,7 +107,7 @@ bool Bit::TryGetBitStringSize(string_t str, idx_t &str_len, string *error_messag
|
|
107
107
|
}
|
108
108
|
|
109
109
|
void Bit::ToBit(string_t str, string_t &output_str) {
|
110
|
-
auto data = (const_data_ptr_t)str.
|
110
|
+
auto data = (const_data_ptr_t)str.GetData();
|
111
111
|
auto len = str.GetSize();
|
112
112
|
auto output = output_str.GetDataWriteable();
|
113
113
|
|
@@ -149,7 +149,7 @@ string Bit::ToBit(string_t str) {
|
|
149
149
|
// **** scalar functions ****
|
150
150
|
void Bit::BitString(const string_t &input, const idx_t &bit_length, string_t &result) {
|
151
151
|
char *res_buf = result.GetDataWriteable();
|
152
|
-
const char *buf = input.
|
152
|
+
const char *buf = input.GetData();
|
153
153
|
|
154
154
|
auto padding = ComputePadding(bit_length);
|
155
155
|
res_buf[0] = padding;
|
@@ -174,7 +174,7 @@ idx_t Bit::OctetLength(string_t bits) {
|
|
174
174
|
|
175
175
|
idx_t Bit::BitCount(string_t bits) {
|
176
176
|
idx_t count = 0;
|
177
|
-
const char *buf = bits.
|
177
|
+
const char *buf = bits.GetData();
|
178
178
|
for (idx_t byte_idx = 1; byte_idx < OctetLength(bits) + 1; byte_idx++) {
|
179
179
|
for (idx_t bit_idx = 0; bit_idx < 8; bit_idx++) {
|
180
180
|
count += (buf[byte_idx] & (1 << bit_idx)) ? 1 : 0;
|
@@ -184,7 +184,7 @@ idx_t Bit::BitCount(string_t bits) {
|
|
184
184
|
}
|
185
185
|
|
186
186
|
idx_t Bit::BitPosition(string_t substring, string_t bits) {
|
187
|
-
const char *buf = bits.
|
187
|
+
const char *buf = bits.GetData();
|
188
188
|
auto len = bits.GetSize();
|
189
189
|
auto substr_len = BitLength(substring);
|
190
190
|
idx_t substr_idx = 0;
|
@@ -226,7 +226,7 @@ idx_t Bit::GetBitIndex(idx_t n) {
|
|
226
226
|
}
|
227
227
|
|
228
228
|
idx_t Bit::GetBitInternal(string_t bit_string, idx_t n) {
|
229
|
-
const char *buf = bit_string.
|
229
|
+
const char *buf = bit_string.GetData();
|
230
230
|
auto idx = Bit::GetBitIndex(n);
|
231
231
|
D_ASSERT(idx < bit_string.GetSize());
|
232
232
|
char byte = buf[idx] >> (7 - (n % 8));
|
@@ -254,7 +254,7 @@ void Bit::SetBitInternal(string_t &bit_string, idx_t n, idx_t new_value) {
|
|
254
254
|
// **** BITWISE operators ****
|
255
255
|
void Bit::RightShift(const string_t &bit_string, const idx_t &shift, string_t &result) {
|
256
256
|
char *res_buf = result.GetDataWriteable();
|
257
|
-
const char *buf = bit_string.
|
257
|
+
const char *buf = bit_string.GetData();
|
258
258
|
res_buf[0] = buf[0];
|
259
259
|
for (idx_t i = 0; i < Bit::BitLength(result); i++) {
|
260
260
|
if (i < shift) {
|
@@ -269,7 +269,7 @@ void Bit::RightShift(const string_t &bit_string, const idx_t &shift, string_t &r
|
|
269
269
|
|
270
270
|
void Bit::LeftShift(const string_t &bit_string, const idx_t &shift, string_t &result) {
|
271
271
|
char *res_buf = result.GetDataWriteable();
|
272
|
-
const char *buf = bit_string.
|
272
|
+
const char *buf = bit_string.GetData();
|
273
273
|
res_buf[0] = buf[0];
|
274
274
|
for (idx_t i = 0; i < Bit::BitLength(bit_string); i++) {
|
275
275
|
if (i < (Bit::BitLength(bit_string) - shift)) {
|
@@ -289,8 +289,8 @@ void Bit::BitwiseAnd(const string_t &rhs, const string_t &lhs, string_t &result)
|
|
289
289
|
}
|
290
290
|
|
291
291
|
char *buf = result.GetDataWriteable();
|
292
|
-
const char *r_buf = rhs.
|
293
|
-
const char *l_buf = lhs.
|
292
|
+
const char *r_buf = rhs.GetData();
|
293
|
+
const char *l_buf = lhs.GetData();
|
294
294
|
|
295
295
|
buf[0] = l_buf[0];
|
296
296
|
for (idx_t i = 1; i < lhs.GetSize(); i++) {
|
@@ -306,8 +306,8 @@ void Bit::BitwiseOr(const string_t &rhs, const string_t &lhs, string_t &result)
|
|
306
306
|
}
|
307
307
|
|
308
308
|
char *buf = result.GetDataWriteable();
|
309
|
-
const char *r_buf = rhs.
|
310
|
-
const char *l_buf = lhs.
|
309
|
+
const char *r_buf = rhs.GetData();
|
310
|
+
const char *l_buf = lhs.GetData();
|
311
311
|
|
312
312
|
buf[0] = l_buf[0];
|
313
313
|
for (idx_t i = 1; i < lhs.GetSize(); i++) {
|
@@ -323,8 +323,8 @@ void Bit::BitwiseXor(const string_t &rhs, const string_t &lhs, string_t &result)
|
|
323
323
|
}
|
324
324
|
|
325
325
|
char *buf = result.GetDataWriteable();
|
326
|
-
const char *r_buf = rhs.
|
327
|
-
const char *l_buf = lhs.
|
326
|
+
const char *r_buf = rhs.GetData();
|
327
|
+
const char *l_buf = lhs.GetData();
|
328
328
|
|
329
329
|
buf[0] = l_buf[0];
|
330
330
|
for (idx_t i = 1; i < lhs.GetSize(); i++) {
|
@@ -335,7 +335,7 @@ void Bit::BitwiseXor(const string_t &rhs, const string_t &lhs, string_t &result)
|
|
335
335
|
|
336
336
|
void Bit::BitwiseNot(const string_t &input, string_t &result) {
|
337
337
|
char *result_buf = result.GetDataWriteable();
|
338
|
-
const char *buf = input.
|
338
|
+
const char *buf = input.GetData();
|
339
339
|
|
340
340
|
result_buf[0] = buf[0];
|
341
341
|
for (idx_t i = 1; i < input.GetSize(); i++) {
|
@@ -24,7 +24,7 @@ bool IsRegularCharacter(data_t c) {
|
|
24
24
|
}
|
25
25
|
|
26
26
|
idx_t Blob::GetStringSize(string_t blob) {
|
27
|
-
auto data = (const_data_ptr_t)blob.
|
27
|
+
auto data = (const_data_ptr_t)blob.GetData();
|
28
28
|
auto len = blob.GetSize();
|
29
29
|
idx_t str_len = 0;
|
30
30
|
for (idx_t i = 0; i < len; i++) {
|
@@ -40,7 +40,7 @@ idx_t Blob::GetStringSize(string_t blob) {
|
|
40
40
|
}
|
41
41
|
|
42
42
|
void Blob::ToString(string_t blob, char *output) {
|
43
|
-
auto data = (const_data_ptr_t)blob.
|
43
|
+
auto data = (const_data_ptr_t)blob.GetData();
|
44
44
|
auto len = blob.GetSize();
|
45
45
|
idx_t str_idx = 0;
|
46
46
|
for (idx_t i = 0; i < len; i++) {
|
@@ -70,7 +70,7 @@ string Blob::ToString(string_t blob) {
|
|
70
70
|
}
|
71
71
|
|
72
72
|
bool Blob::TryGetBlobSize(string_t str, idx_t &str_len, string *error_message) {
|
73
|
-
auto data = (const_data_ptr_t)str.
|
73
|
+
auto data = (const_data_ptr_t)str.GetData();
|
74
74
|
auto len = str.GetSize();
|
75
75
|
str_len = 0;
|
76
76
|
for (idx_t i = 0; i < len; i++) {
|
@@ -112,7 +112,7 @@ idx_t Blob::GetBlobSize(string_t str) {
|
|
112
112
|
}
|
113
113
|
|
114
114
|
void Blob::ToBlob(string_t str, data_ptr_t output) {
|
115
|
-
auto data = (const_data_ptr_t)str.
|
115
|
+
auto data = (const_data_ptr_t)str.GetData();
|
116
116
|
auto len = str.GetSize();
|
117
117
|
idx_t blob_idx = 0;
|
118
118
|
for (idx_t i = 0; i < len; i++) {
|
@@ -149,7 +149,7 @@ idx_t Blob::ToBase64Size(string_t blob) {
|
|
149
149
|
}
|
150
150
|
|
151
151
|
void Blob::ToBase64(string_t blob, char *output) {
|
152
|
-
auto input_data = (const_data_ptr_t)blob.
|
152
|
+
auto input_data = (const_data_ptr_t)blob.GetData();
|
153
153
|
auto input_size = blob.GetSize();
|
154
154
|
idx_t out_idx = 0;
|
155
155
|
idx_t i;
|
@@ -192,7 +192,7 @@ static constexpr int BASE64_DECODING_TABLE[256] = {
|
|
192
192
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
|
193
193
|
|
194
194
|
idx_t Blob::FromBase64Size(string_t str) {
|
195
|
-
auto input_data = str.
|
195
|
+
auto input_data = str.GetData();
|
196
196
|
auto input_size = str.GetSize();
|
197
197
|
if (input_size % 4 != 0) {
|
198
198
|
// valid base64 needs to always be cleanly divisible by 4
|
@@ -239,7 +239,7 @@ uint32_t DecodeBase64Bytes(const string_t &str, const_data_ptr_t input_data, idx
|
|
239
239
|
|
240
240
|
void Blob::FromBase64(string_t str, data_ptr_t output, idx_t output_size) {
|
241
241
|
D_ASSERT(output_size == FromBase64Size(str));
|
242
|
-
auto input_data = (const_data_ptr_t)str.
|
242
|
+
auto input_data = (const_data_ptr_t)str.GetData();
|
243
243
|
auto input_size = str.GetSize();
|
244
244
|
if (input_size == 0) {
|
245
245
|
return;
|
@@ -197,7 +197,7 @@ void ColumnDataAllocator::UnswizzlePointers(ChunkManagementState &state, Vector
|
|
197
197
|
D_ASSERT(i < end);
|
198
198
|
|
199
199
|
auto base_ptr = (char *)GetDataPointer(state, block_id, offset);
|
200
|
-
if (strings[i].
|
200
|
+
if (strings[i].GetData() == base_ptr) {
|
201
201
|
// pointers are still valid
|
202
202
|
return;
|
203
203
|
}
|
@@ -519,7 +519,7 @@ void ColumnDataCopy<string_t>(ColumnDataMetaData &meta_data, const UnifiedVector
|
|
519
519
|
target_entry = source_entry;
|
520
520
|
} else {
|
521
521
|
D_ASSERT(heap_ptr != nullptr);
|
522
|
-
memcpy(heap_ptr, source_entry.
|
522
|
+
memcpy(heap_ptr, source_entry.GetData(), source_entry.GetSize());
|
523
523
|
target_entry = string_t((const char *)heap_ptr, source_entry.GetSize());
|
524
524
|
heap_ptr += source_entry.GetSize();
|
525
525
|
}
|
@@ -169,7 +169,7 @@ inline uint64_t HashOtherSize(const data_ptr_t &data, const idx_t &len) {
|
|
169
169
|
|
170
170
|
template <>
|
171
171
|
inline uint64_t TemplatedHash(const string_t &elem) {
|
172
|
-
data_ptr_t data = (data_ptr_t)elem.
|
172
|
+
data_ptr_t data = (data_ptr_t)elem.GetData();
|
173
173
|
const auto &len = elem.GetSize();
|
174
174
|
uint64_t h = 0;
|
175
175
|
for (idx_t i = 0; i + sizeof(uint64_t) <= len; i += sizeof(uint64_t)) {
|
@@ -28,7 +28,7 @@ inline void TupleDataValueStore(const string_t &source, const data_ptr_t &row_lo
|
|
28
28
|
if (source.IsInlined()) {
|
29
29
|
Store<string_t>(source, row_location + offset_in_row);
|
30
30
|
} else {
|
31
|
-
memcpy(heap_location, source.
|
31
|
+
memcpy(heap_location, source.GetData(), source.GetSize());
|
32
32
|
Store<string_t>(string_t((const char *)heap_location, source.GetSize()), row_location + offset_in_row);
|
33
33
|
heap_location += source.GetSize();
|
34
34
|
}
|
@@ -44,7 +44,7 @@ template <>
|
|
44
44
|
inline void TupleDataWithinListValueStore(const string_t &source, const data_ptr_t &location,
|
45
45
|
data_ptr_t &heap_location) {
|
46
46
|
Store<uint32_t>(source.GetSize(), location);
|
47
|
-
memcpy(heap_location, source.
|
47
|
+
memcpy(heap_location, source.GetData(), source.GetSize());
|
48
48
|
heap_location += source.GetSize();
|
49
49
|
}
|
50
50
|
|
@@ -34,7 +34,7 @@ string_t StringHeap::AddString(const string &data) {
|
|
34
34
|
}
|
35
35
|
|
36
36
|
string_t StringHeap::AddString(const string_t &data) {
|
37
|
-
return AddString(data.
|
37
|
+
return AddString(data.GetData(), data.GetSize());
|
38
38
|
}
|
39
39
|
|
40
40
|
string_t StringHeap::AddBlob(const char *data, idx_t len) {
|
@@ -46,7 +46,7 @@ string_t StringHeap::AddBlob(const char *data, idx_t len) {
|
|
46
46
|
}
|
47
47
|
|
48
48
|
string_t StringHeap::AddBlob(const string_t &data) {
|
49
|
-
return AddBlob(data.
|
49
|
+
return AddBlob(data.GetData(), data.GetSize());
|
50
50
|
}
|
51
51
|
|
52
52
|
string_t StringHeap::EmptyString(idx_t len) {
|
@@ -7,7 +7,7 @@
|
|
7
7
|
namespace duckdb {
|
8
8
|
|
9
9
|
void string_t::Verify() const {
|
10
|
-
auto dataptr =
|
10
|
+
auto dataptr = GetData();
|
11
11
|
(void)dataptr;
|
12
12
|
D_ASSERT(dataptr);
|
13
13
|
|
@@ -22,7 +22,7 @@ void string_t::Verify() const {
|
|
22
22
|
}
|
23
23
|
// verify that for strings with length <= INLINE_LENGTH, the rest of the string is zero
|
24
24
|
for (idx_t i = GetSize(); i < INLINE_LENGTH; i++) {
|
25
|
-
D_ASSERT(
|
25
|
+
D_ASSERT(GetData()[i] == '\0');
|
26
26
|
}
|
27
27
|
}
|
28
28
|
|
@@ -102,7 +102,7 @@ TimestampCastResult Timestamp::TryConvertTimestamp(const char *str, idx_t len, t
|
|
102
102
|
}
|
103
103
|
if (tz.GetSize() == 3) {
|
104
104
|
// we can ONLY handle UTC without ICU being loaded
|
105
|
-
auto tz_ptr = tz.
|
105
|
+
auto tz_ptr = tz.GetData();
|
106
106
|
if ((tz_ptr[0] == 'u' || tz_ptr[0] == 'U') && (tz_ptr[1] == 't' || tz_ptr[1] == 'T') &&
|
107
107
|
(tz_ptr[2] == 'c' || tz_ptr[2] == 'C')) {
|
108
108
|
return TimestampCastResult::SUCCESS;
|
@@ -456,7 +456,7 @@ Value Vector::GetValueInternal(const Vector &v_p, idx_t index_p) {
|
|
456
456
|
auto str_compressed = ((string_t *)data)[index];
|
457
457
|
Value result =
|
458
458
|
FSSTPrimitives::DecompressValue(FSSTVector::GetDecoder(const_cast<Vector &>(*vector)),
|
459
|
-
(unsigned char *)str_compressed.
|
459
|
+
(unsigned char *)str_compressed.GetData(), str_compressed.GetSize());
|
460
460
|
return result;
|
461
461
|
}
|
462
462
|
|
@@ -543,11 +543,11 @@ Value Vector::GetValueInternal(const Vector &v_p, idx_t index_p) {
|
|
543
543
|
case LogicalTypeId::AGGREGATE_STATE:
|
544
544
|
case LogicalTypeId::BLOB: {
|
545
545
|
auto str = ((string_t *)data)[index];
|
546
|
-
return Value::BLOB((const_data_ptr_t)str.
|
546
|
+
return Value::BLOB((const_data_ptr_t)str.GetData(), str.GetSize());
|
547
547
|
}
|
548
548
|
case LogicalTypeId::BIT: {
|
549
549
|
auto str = ((string_t *)data)[index];
|
550
|
-
return Value::BIT((const_data_ptr_t)str.
|
550
|
+
return Value::BIT((const_data_ptr_t)str.GetData(), str.GetSize());
|
551
551
|
}
|
552
552
|
case LogicalTypeId::MAP: {
|
553
553
|
auto offlen = ((list_entry_t *)data)[index];
|
@@ -637,7 +637,7 @@ string Vector::ToString(idx_t count) const {
|
|
637
637
|
for (idx_t i = 0; i < count; i++) {
|
638
638
|
string_t compressed_string = ((string_t *)data)[i];
|
639
639
|
Value val = FSSTPrimitives::DecompressValue(FSSTVector::GetDecoder(const_cast<Vector &>(*this)),
|
640
|
-
(unsigned char *)compressed_string.
|
640
|
+
(unsigned char *)compressed_string.GetData(),
|
641
641
|
compressed_string.GetSize());
|
642
642
|
retval += GetValue(i).ToString() + (i == count - 1 ? "" : ", ");
|
643
643
|
}
|
@@ -924,7 +924,7 @@ void Vector::Serialize(idx_t count, Serializer &serializer) {
|
|
924
924
|
for (idx_t i = 0; i < count; i++) {
|
925
925
|
auto idx = vdata.sel->get_index(i);
|
926
926
|
auto source = !vdata.validity.RowIsValid(idx) ? NullValue<string_t>() : strings[idx];
|
927
|
-
serializer.WriteStringLen((const_data_ptr_t)source.
|
927
|
+
serializer.WriteStringLen((const_data_ptr_t)source.GetData(), source.GetSize());
|
928
928
|
}
|
929
929
|
break;
|
930
930
|
}
|
@@ -1321,7 +1321,7 @@ void Vector::Verify(Vector &vector_p, const SelectionVector &sel_p, idx_t count)
|
|
1321
1321
|
for (idx_t i = 0; i < count; i++) {
|
1322
1322
|
auto oidx = sel->get_index(i);
|
1323
1323
|
if (validity.RowIsValid(oidx)) {
|
1324
|
-
auto buf = strings[oidx].
|
1324
|
+
auto buf = strings[oidx].GetData();
|
1325
1325
|
D_ASSERT(*buf >= 0 && *buf < 8);
|
1326
1326
|
Bit::Verify(strings[oidx]);
|
1327
1327
|
}
|
@@ -1706,7 +1706,7 @@ void FSSTVector::DecompressVector(const Vector &src, Vector &dst, idx_t src_offs
|
|
1706
1706
|
string_t compressed_string = ldata[source_idx];
|
1707
1707
|
if (dst_mask.RowIsValid(target_idx) && compressed_string.GetSize() > 0) {
|
1708
1708
|
tdata[target_idx] = FSSTPrimitives::DecompressValue(FSSTVector::GetDecoder(src), dst,
|
1709
|
-
(unsigned char *)compressed_string.
|
1709
|
+
(unsigned char *)compressed_string.GetData(),
|
1710
1710
|
compressed_string.GetSize());
|
1711
1711
|
} else {
|
1712
1712
|
tdata[target_idx] = string_t(nullptr, 0);
|
@@ -18,7 +18,7 @@ template <>
|
|
18
18
|
Key Key::CreateKey(ArenaAllocator &allocator, const LogicalType &type, string_t value) {
|
19
19
|
idx_t len = value.GetSize() + 1;
|
20
20
|
auto data = allocator.Allocate(len);
|
21
|
-
memcpy(data, value.
|
21
|
+
memcpy(data, value.GetData(), len - 1);
|
22
22
|
|
23
23
|
// FIXME: rethink this
|
24
24
|
if (type == LogicalType::BLOB || type == LogicalType::VARCHAR) {
|
@@ -43,7 +43,7 @@ template <>
|
|
43
43
|
void Key::CreateKey(ArenaAllocator &allocator, const LogicalType &type, Key &key, string_t value) {
|
44
44
|
key.len = value.GetSize() + 1;
|
45
45
|
key.data = allocator.Allocate(key.len);
|
46
|
-
memcpy(key.data, value.
|
46
|
+
memcpy(key.data, value.GetData(), key.len - 1);
|
47
47
|
|
48
48
|
// FIXME: rethink this
|
49
49
|
if (type == LogicalType::BLOB || type == LogicalType::VARCHAR) {
|
@@ -381,7 +381,7 @@ void BaseCSVReader::VerifyUTF8(idx_t col_idx, idx_t row_idx, DataChunk &chunk, i
|
|
381
381
|
|
382
382
|
auto parse_data = FlatVector::GetData<string_t>(chunk.data[col_idx]);
|
383
383
|
auto s = parse_data[row_idx];
|
384
|
-
auto utf_type = Utf8Proc::Analyze(s.
|
384
|
+
auto utf_type = Utf8Proc::Analyze(s.GetData(), s.GetSize());
|
385
385
|
if (utf_type == UnicodeType::INVALID) {
|
386
386
|
string col_name = to_string(col_idx);
|
387
387
|
if (col_idx < names.size()) {
|
@@ -52,7 +52,7 @@ SinkResultType PhysicalCreateType::Sink(ExecutionContext &context, GlobalSinkSta
|
|
52
52
|
throw InvalidInputException("Attempted to create ENUM type with NULL value!");
|
53
53
|
}
|
54
54
|
result_ptr[gstate.size++] =
|
55
|
-
StringVector::AddStringOrBlob(gstate.result, src_ptr[idx].
|
55
|
+
StringVector::AddStringOrBlob(gstate.result, src_ptr[idx].GetData(), src_ptr[idx].GetSize());
|
56
56
|
}
|
57
57
|
return SinkResultType::NEED_MORE_INPUT;
|
58
58
|
}
|
@@ -41,7 +41,7 @@ void ArgMinMaxStateBase::CreateValue(Vector *&value) {
|
|
41
41
|
template <>
|
42
42
|
void ArgMinMaxStateBase::DestroyValue(string_t &value) {
|
43
43
|
if (!value.IsInlined()) {
|
44
|
-
delete[] value.
|
44
|
+
delete[] value.GetData();
|
45
45
|
}
|
46
46
|
}
|
47
47
|
|
@@ -62,7 +62,7 @@ void ArgMinMaxStateBase::AssignValue(string_t &target, string_t new_value, bool
|
|
62
62
|
// non-inlined string, need to allocate space for it
|
63
63
|
auto len = new_value.GetSize();
|
64
64
|
auto ptr = new char[len];
|
65
|
-
memcpy(ptr, new_value.
|
65
|
+
memcpy(ptr, new_value.GetData(), len);
|
66
66
|
|
67
67
|
target = string_t(ptr, len);
|
68
68
|
}
|
@@ -130,7 +130,7 @@ struct BitStringBitwiseOperation : public BitwiseOperation {
|
|
130
130
|
template <class STATE>
|
131
131
|
static void Destroy(AggregateInputData &aggr_input_data, STATE *state) {
|
132
132
|
if (state->is_set && !state->value.IsInlined()) {
|
133
|
-
delete[] state->value.
|
133
|
+
delete[] state->value.GetData();
|
134
134
|
}
|
135
135
|
}
|
136
136
|
|
@@ -142,7 +142,7 @@ struct BitStringBitwiseOperation : public BitwiseOperation {
|
|
142
142
|
} else { // non-inlined string, need to allocate space for it
|
143
143
|
auto len = input.GetSize();
|
144
144
|
auto ptr = new char[len];
|
145
|
-
memcpy(ptr, input.
|
145
|
+
memcpy(ptr, input.GetData(), len);
|
146
146
|
|
147
147
|
state->value = string_t(ptr, len);
|
148
148
|
}
|
@@ -134,7 +134,7 @@ struct BitStringAggOperation {
|
|
134
134
|
} else { // non-inlined string, need to allocate space for it
|
135
135
|
auto len = input.GetSize();
|
136
136
|
auto ptr = new char[len];
|
137
|
-
memcpy(ptr, input.
|
137
|
+
memcpy(ptr, input.GetData(), len);
|
138
138
|
state->value = string_t(ptr, len);
|
139
139
|
}
|
140
140
|
}
|
@@ -151,7 +151,7 @@ struct BitStringAggOperation {
|
|
151
151
|
template <class STATE>
|
152
152
|
static void Destroy(AggregateInputData &aggr_input_data, STATE *state) {
|
153
153
|
if (state->is_set && !state->value.IsInlined()) {
|
154
|
-
delete[] state->value.
|
154
|
+
delete[] state->value.GetData();
|
155
155
|
}
|
156
156
|
}
|
157
157
|
|
@@ -86,7 +86,7 @@ struct FirstFunctionString : public FirstFunctionBase {
|
|
86
86
|
// non-inlined string, need to allocate space for it
|
87
87
|
auto len = value.GetSize();
|
88
88
|
auto ptr = new char[len];
|
89
|
-
memcpy(ptr, value.
|
89
|
+
memcpy(ptr, value.GetData(), len);
|
90
90
|
|
91
91
|
state->value = string_t(ptr, len);
|
92
92
|
}
|
@@ -126,7 +126,7 @@ struct FirstFunctionString : public FirstFunctionBase {
|
|
126
126
|
template <class STATE>
|
127
127
|
static void Destroy(AggregateInputData &aggr_input_data, STATE *state) {
|
128
128
|
if (state->is_set && !state->is_null && !state->value.IsInlined()) {
|
129
|
-
delete[] state->value.
|
129
|
+
delete[] state->value.GetData();
|
130
130
|
}
|
131
131
|
}
|
132
132
|
};
|
@@ -70,9 +70,10 @@ struct KurtosisOperation {
|
|
70
70
|
6 * state->sum_sqr * state->sum * state->sum * temp * temp - 3 * pow(state->sum, 4) * pow(temp, 3));
|
71
71
|
|
72
72
|
double m2 = temp * (state->sum_sqr - state->sum * state->sum * temp);
|
73
|
-
if (
|
73
|
+
if (m2 <= 0 || ((n - 2) * (n - 3)) == 0) { // m2 shouldn't be below 0 but floating points are weird
|
74
74
|
mask.SetInvalid(idx);
|
75
|
-
|
75
|
+
return;
|
76
|
+
}
|
76
77
|
target[idx] = (n - 1) * ((n + 1) * m4 / (m2 * m2) - 3 * (n - 1)) / ((n - 2) * (n - 3));
|
77
78
|
if (!Value::DoubleIsFinite(target[idx])) {
|
78
79
|
throw OutOfRangeException("Kurtosis is out of range!");
|
@@ -144,7 +144,7 @@ struct StringMinMaxBase : public MinMaxBase {
|
|
144
144
|
template <class STATE>
|
145
145
|
static void Destroy(AggregateInputData &aggr_input_data, STATE *state) {
|
146
146
|
if (state->isset && !state->value.IsInlined()) {
|
147
|
-
delete[] state->value.
|
147
|
+
delete[] state->value.GetData();
|
148
148
|
}
|
149
149
|
}
|
150
150
|
|
@@ -157,7 +157,7 @@ struct StringMinMaxBase : public MinMaxBase {
|
|
157
157
|
// non-inlined string, need to allocate space for it
|
158
158
|
auto len = input.GetSize();
|
159
159
|
auto ptr = new char[len];
|
160
|
-
memcpy(ptr, input.
|
160
|
+
memcpy(ptr, input.GetData(), len);
|
161
161
|
|
162
162
|
state->value = string_t(ptr, len);
|
163
163
|
}
|
@@ -56,7 +56,11 @@ struct SkewnessOperation {
|
|
56
56
|
}
|
57
57
|
double n = state->n;
|
58
58
|
double temp = 1 / n;
|
59
|
-
|
59
|
+
auto p = std::pow(temp * (state->sum_sqr - state->sum * state->sum * temp), 3);
|
60
|
+
if (p < 0) {
|
61
|
+
p = 0; // Shouldn't be below 0 but floating points are weird
|
62
|
+
}
|
63
|
+
double div = std::sqrt(p);
|
60
64
|
if (div == 0) {
|
61
65
|
mask.SetInvalid(idx);
|
62
66
|
return;
|
@@ -90,7 +90,7 @@ struct StringAggFunction {
|
|
90
90
|
|
91
91
|
static inline void PerformOperation(StringAggState *state, string_t str, FunctionData *data_p) {
|
92
92
|
auto &data = data_p->Cast<StringAggBindData>();
|
93
|
-
PerformOperation(state, str.
|
93
|
+
PerformOperation(state, str.GetData(), data.sep.c_str(), str.GetSize(), data.sep.size());
|
94
94
|
}
|
95
95
|
|
96
96
|
template <class INPUT_TYPE, class STATE, class OP>
|
@@ -106,7 +106,7 @@ static bool ListToVarcharCast(Vector &source, Vector &result, idx_t count, CastP
|
|
106
106
|
}
|
107
107
|
if (child_validity.RowIsValid(idx)) {
|
108
108
|
auto len = child_data[idx].GetSize();
|
109
|
-
memcpy(dataptr + offset, child_data[idx].
|
109
|
+
memcpy(dataptr + offset, child_data[idx].GetData(), len);
|
110
110
|
offset += len;
|
111
111
|
} else {
|
112
112
|
memcpy(dataptr + offset, "NULL", NULL_LENGTH);
|
@@ -118,7 +118,7 @@ static bool StructToVarcharCast(Vector &source, Vector &result, idx_t count, Cas
|
|
118
118
|
// value
|
119
119
|
if (child_validity.RowIsValid(i)) {
|
120
120
|
auto len = data[i].GetSize();
|
121
|
-
memcpy(dataptr + offset, data[i].
|
121
|
+
memcpy(dataptr + offset, data[i].GetData(), len);
|
122
122
|
offset += len;
|
123
123
|
} else {
|
124
124
|
memcpy(dataptr + offset, "NULL", NULL_LENGTH);
|
@@ -105,7 +105,7 @@ struct SplitStringListOperation {
|
|
105
105
|
|
106
106
|
template <class OP>
|
107
107
|
static bool SplitStringListInternal(const string_t &input, OP &state) {
|
108
|
-
const char *buf = input.
|
108
|
+
const char *buf = input.GetData();
|
109
109
|
idx_t len = input.GetSize();
|
110
110
|
idx_t lvl = 1;
|
111
111
|
idx_t pos = 0;
|
@@ -221,7 +221,7 @@ static bool FindKeyOrValueMap(const char *buf, idx_t len, idx_t &pos, OP &state,
|
|
221
221
|
|
222
222
|
template <class OP>
|
223
223
|
static bool SplitStringMapInternal(const string_t &input, OP &state) {
|
224
|
-
const char *buf = input.
|
224
|
+
const char *buf = input.GetData();
|
225
225
|
idx_t len = input.GetSize();
|
226
226
|
idx_t pos = 0;
|
227
227
|
|
@@ -301,7 +301,7 @@ static bool FindValueStruct(const char *buf, idx_t len, idx_t &pos, Vector &varc
|
|
301
301
|
|
302
302
|
bool VectorStringToStruct::SplitStruct(string_t &input, vector<unique_ptr<Vector>> &varchar_vectors, idx_t &row_idx,
|
303
303
|
string_map_t<idx_t> &child_names, vector<ValidityMask *> &child_masks) {
|
304
|
-
const char *buf = input.
|
304
|
+
const char *buf = input.GetData();
|
305
305
|
idx_t len = input.GetSize();
|
306
306
|
idx_t pos = 0;
|
307
307
|
idx_t child_idx;
|
@@ -68,7 +68,7 @@ static void SetBitOperation(DataChunk &args, ExpressionState &state, Vector &res
|
|
68
68
|
NumericHelper::ToString(Bit::BitLength(input) - 1));
|
69
69
|
}
|
70
70
|
string_t target = StringVector::EmptyString(result, input.GetSize());
|
71
|
-
memcpy(target.GetDataWriteable(), input.
|
71
|
+
memcpy(target.GetDataWriteable(), input.GetData(), input.GetSize());
|
72
72
|
Bit::SetBit(target, n, new_value);
|
73
73
|
return target;
|
74
74
|
});
|
@@ -12,7 +12,7 @@ static void EncodeFunction(DataChunk &args, ExpressionState &state, Vector &resu
|
|
12
12
|
struct BlobDecodeOperator {
|
13
13
|
template <class INPUT_TYPE, class RESULT_TYPE>
|
14
14
|
static RESULT_TYPE Operation(INPUT_TYPE input) {
|
15
|
-
auto input_data = input.
|
15
|
+
auto input_data = input.GetData();
|
16
16
|
auto input_length = input.GetSize();
|
17
17
|
if (Utf8Proc::Analyze(input_data, input_length) == UnicodeType::INVALID) {
|
18
18
|
throw ConversionException(
|
@@ -154,7 +154,7 @@ idx_t StrfTimeFormat::GetLength(date_t date, dtime_t time, int32_t utc_offset, c
|
|
154
154
|
|
155
155
|
char *StrfTimeFormat::WriteString(char *target, const string_t &str) {
|
156
156
|
idx_t size = str.GetSize();
|
157
|
-
memcpy(target, str.
|
157
|
+
memcpy(target, str.GetData(), size);
|
158
158
|
return target + size;
|
159
159
|
}
|
160
160
|
|
@@ -766,7 +766,7 @@ int32_t StrpTimeFormat::TryParseCollection(const char *data, idx_t &pos, idx_t s
|
|
766
766
|
idx_t collection_count) {
|
767
767
|
for (idx_t c = 0; c < collection_count; c++) {
|
768
768
|
auto &entry = collection[c];
|
769
|
-
auto entry_data = entry.
|
769
|
+
auto entry_data = entry.GetData();
|
770
770
|
auto entry_size = entry.GetSize();
|
771
771
|
// check if this entry matches
|
772
772
|
if (pos + entry_size > size) {
|
@@ -805,7 +805,7 @@ bool StrpTimeFormat::Parse(string_t str, ParseResult &result) {
|
|
805
805
|
result_data[6] = 0;
|
806
806
|
result_data[7] = 0;
|
807
807
|
|
808
|
-
auto data = str.
|
808
|
+
auto data = str.GetData();
|
809
809
|
idx_t size = str.GetSize();
|
810
810
|
// skip leading spaces
|
811
811
|
while (StringUtil::CharacterIsSpace(*data)) {
|
@@ -41,7 +41,7 @@ unique_ptr<FunctionData> CurrentSettingBind(ClientContext &context, ScalarFuncti
|
|
41
41
|
key_child->return_type.id() != LogicalTypeId::VARCHAR || !key_child->IsFoldable()) {
|
42
42
|
throw ParserException("Key name for current_setting needs to be a constant string");
|
43
43
|
}
|
44
|
-
Value key_val = ExpressionExecutor::EvaluateScalar(context, *key_child
|
44
|
+
Value key_val = ExpressionExecutor::EvaluateScalar(context, *key_child);
|
45
45
|
D_ASSERT(key_val.type().id() == LogicalTypeId::VARCHAR);
|
46
46
|
auto &key_str = StringValue::Get(key_val);
|
47
47
|
if (key_val.IsNull() || key_str.empty()) {
|
@@ -7,7 +7,7 @@ namespace duckdb {
|
|
7
7
|
struct AsciiOperator {
|
8
8
|
template <class TA, class TR>
|
9
9
|
static inline TR Operation(const TA &input) {
|
10
|
-
auto str = input.
|
10
|
+
auto str = input.GetData();
|
11
11
|
if (Utf8Proc::Analyze(str, input.GetSize()) == UnicodeType::ASCII) {
|
12
12
|
return str[0];
|
13
13
|
}
|