duckdb 0.6.2-dev1017.0 → 0.6.2-dev1025.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
|
@@ -1050,22 +1050,23 @@ static bool TryIntegerCast(const char *buf, idx_t len, T &result, bool strict) {
|
|
|
1050
1050
|
}
|
|
1051
1051
|
return IntegerCastLoop<T, true, ALLOW_EXPONENT, OP>(buf, len, result, strict);
|
|
1052
1052
|
}
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1053
|
+
if (len > 1 && *buf == '0') {
|
|
1054
|
+
if (buf[1] == 'x' || buf[1] == 'X') {
|
|
1055
|
+
// If it starts with 0x or 0X, we parse it as a hex value
|
|
1056
|
+
buf++;
|
|
1057
|
+
len--;
|
|
1058
|
+
return IntegerHexCastLoop<T, false, false, OP>(buf, len, result, strict);
|
|
1059
|
+
} else if (buf[1] == 'b' || buf[1] == 'B') {
|
|
1060
|
+
// If it starts with 0b or 0B, we parse it as a binary value
|
|
1061
|
+
buf++;
|
|
1062
|
+
len--;
|
|
1063
|
+
return IntegerBinaryCastLoop<T, false, false, OP>(buf, len, result, strict);
|
|
1064
|
+
} else if (strict && StringUtil::CharacterIsDigit(buf[1])) {
|
|
1065
|
+
// leading zeros are not allowed in strict mode
|
|
1066
|
+
return false;
|
|
1067
|
+
}
|
|
1068
1068
|
}
|
|
1069
|
+
return IntegerCastLoop<T, false, ALLOW_EXPONENT, OP>(buf, len, result, strict);
|
|
1069
1070
|
}
|
|
1070
1071
|
|
|
1071
1072
|
template <typename T, bool IS_SIGNED = true>
|
|
@@ -1170,6 +1171,12 @@ static bool TryDoubleCast(const char *buf, idx_t len, T &result, bool strict) {
|
|
|
1170
1171
|
buf++;
|
|
1171
1172
|
len--;
|
|
1172
1173
|
}
|
|
1174
|
+
if (strict && len >= 2) {
|
|
1175
|
+
if (buf[0] == '0' && StringUtil::CharacterIsDigit(buf[1])) {
|
|
1176
|
+
// leading zeros are not allowed in strict mode
|
|
1177
|
+
return false;
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1173
1180
|
auto endptr = buf + len;
|
|
1174
1181
|
auto parse_result = duckdb_fast_float::from_chars(buf, buf + len, result);
|
|
1175
1182
|
if (parse_result.ec != std::errc()) {
|
|
@@ -144,7 +144,6 @@ struct UniqueFunctor {
|
|
|
144
144
|
|
|
145
145
|
template <class FUNCTION_FUNCTOR, bool IS_AGGR = false>
|
|
146
146
|
static void ListAggregatesFunction(DataChunk &args, ExpressionState &state, Vector &result) {
|
|
147
|
-
|
|
148
147
|
auto count = args.size();
|
|
149
148
|
Vector &lists = args.data[0];
|
|
150
149
|
|
|
@@ -167,6 +166,7 @@ static void ListAggregatesFunction(DataChunk &args, ExpressionState &state, Vect
|
|
|
167
166
|
|
|
168
167
|
auto lists_size = ListVector::GetListSize(lists);
|
|
169
168
|
auto &child_vector = ListVector::GetEntry(lists);
|
|
169
|
+
child_vector.Flatten(lists_size);
|
|
170
170
|
|
|
171
171
|
UnifiedVectorFormat child_data;
|
|
172
172
|
child_vector.ToUnifiedFormat(lists_size, child_data);
|
|
@@ -216,7 +216,7 @@ static void ListAggregatesFunction(DataChunk &args, ExpressionState &state, Vect
|
|
|
216
216
|
// states vector is full, update
|
|
217
217
|
if (states_idx == STANDARD_VECTOR_SIZE) {
|
|
218
218
|
// update the aggregate state(s)
|
|
219
|
-
Vector slice
|
|
219
|
+
Vector slice(child_vector, sel_vector, states_idx);
|
|
220
220
|
aggr.function.update(&slice, aggr_input_data, 1, state_vector_update, states_idx);
|
|
221
221
|
|
|
222
222
|
// reset values
|
|
@@ -232,7 +232,7 @@ static void ListAggregatesFunction(DataChunk &args, ExpressionState &state, Vect
|
|
|
232
232
|
|
|
233
233
|
// update the remaining elements of the last list(s)
|
|
234
234
|
if (states_idx != 0) {
|
|
235
|
-
Vector slice
|
|
235
|
+
Vector slice(child_vector, sel_vector, states_idx);
|
|
236
236
|
aggr.function.update(&slice, aggr_input_data, 1, state_vector_update, states_idx);
|
|
237
237
|
}
|
|
238
238
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#ifndef DUCKDB_VERSION
|
|
2
|
-
#define DUCKDB_VERSION "0.6.2-
|
|
2
|
+
#define DUCKDB_VERSION "0.6.2-dev1025"
|
|
3
3
|
#endif
|
|
4
4
|
#ifndef DUCKDB_SOURCE_ID
|
|
5
|
-
#define DUCKDB_SOURCE_ID "
|
|
5
|
+
#define DUCKDB_SOURCE_ID "6e671f398d"
|
|
6
6
|
#endif
|
|
7
7
|
#include "duckdb/function/table/system_functions.hpp"
|
|
8
8
|
#include "duckdb/main/database.hpp"
|