duckdb 0.8.2-dev4711.0 → 0.8.2-dev4871.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.
Files changed (49) hide show
  1. package/binding.gyp +0 -1
  2. package/binding.gyp.in +0 -1
  3. package/package.json +1 -1
  4. package/src/connection.cpp +10 -23
  5. package/src/data_chunk.cpp +1 -3
  6. package/src/database.cpp +4 -9
  7. package/src/duckdb/extension/icu/icu-datepart.cpp +12 -8
  8. package/src/duckdb/extension/json/json_functions/json_transform.cpp +8 -6
  9. package/src/duckdb/extension/json/json_functions.cpp +4 -6
  10. package/src/duckdb/src/common/enum_util.cpp +10 -5
  11. package/src/duckdb/src/common/radix_partitioning.cpp +1 -1
  12. package/src/duckdb/src/common/row_operations/row_matcher.cpp +408 -0
  13. package/src/duckdb/src/common/types/row/tuple_data_allocator.cpp +3 -3
  14. package/src/duckdb/src/common/types/row/tuple_data_collection.cpp +28 -17
  15. package/src/duckdb/src/common/types/row/tuple_data_scatter_gather.cpp +44 -43
  16. package/src/duckdb/src/common/vector_operations/vector_hash.cpp +1 -0
  17. package/src/duckdb/src/core_functions/function_list.cpp +1 -1
  18. package/src/duckdb/src/core_functions/scalar/date/date_part.cpp +86 -50
  19. package/src/duckdb/src/core_functions/scalar/generic/hash.cpp +3 -0
  20. package/src/duckdb/src/core_functions/scalar/string/repeat.cpp +8 -5
  21. package/src/duckdb/src/execution/aggregate_hashtable.cpp +5 -4
  22. package/src/duckdb/src/execution/index/fixed_size_allocator.cpp +13 -0
  23. package/src/duckdb/src/execution/join_hashtable.cpp +71 -59
  24. package/src/duckdb/src/execution/operator/join/physical_hash_join.cpp +9 -4
  25. package/src/duckdb/src/execution/physical_plan/plan_comparison_join.cpp +0 -2
  26. package/src/duckdb/src/execution/reservoir_sample.cpp +3 -9
  27. package/src/duckdb/src/function/cast/vector_cast_helpers.cpp +8 -2
  28. package/src/duckdb/src/function/function_binder.cpp +10 -9
  29. package/src/duckdb/src/function/scalar/string/like.cpp +0 -3
  30. package/src/duckdb/src/function/table/version/pragma_version.cpp +2 -2
  31. package/src/duckdb/src/include/duckdb/common/enums/date_part_specifier.hpp +11 -3
  32. package/src/duckdb/src/include/duckdb/common/row_operations/row_matcher.hpp +63 -0
  33. package/src/duckdb/src/include/duckdb/common/types/row/tuple_data_collection.hpp +6 -2
  34. package/src/duckdb/src/include/duckdb/common/types/row/tuple_data_states.hpp +2 -2
  35. package/src/duckdb/src/include/duckdb/common/types/validity_mask.hpp +4 -1
  36. package/src/duckdb/src/include/duckdb/core_functions/scalar/string_functions.hpp +1 -1
  37. package/src/duckdb/src/include/duckdb/execution/aggregate_hashtable.hpp +4 -0
  38. package/src/duckdb/src/include/duckdb/execution/join_hashtable.hpp +14 -8
  39. package/src/duckdb/src/include/duckdb/main/relation.hpp +4 -0
  40. package/src/duckdb/src/main/config.cpp +1 -1
  41. package/src/duckdb/src/main/relation.cpp +10 -0
  42. package/src/duckdb/src/optimizer/rule/date_part_simplification.cpp +0 -3
  43. package/src/duckdb/src/planner/binder/tableref/plan_joinref.cpp +12 -4
  44. package/src/duckdb/src/storage/compression/validity_uncompressed.cpp +2 -3
  45. package/src/duckdb/src/storage/data_table.cpp +10 -0
  46. package/src/duckdb/ub_src_common_row_operations.cpp +1 -1
  47. package/src/statement.cpp +2 -4
  48. package/test/database_fail.test.ts +6 -0
  49. package/src/duckdb/src/common/row_operations/row_match.cpp +0 -359
package/binding.gyp CHANGED
@@ -311,7 +311,6 @@
311
311
  "src/duckdb/extension/json/yyjson/include"
312
312
  ],
313
313
  "defines": [
314
- "NAPI_DISABLE_CPP_EXCEPTIONS=1",
315
314
  "NAPI_VERSION=6",
316
315
  "DUCKDB_EXTENSION_PARQUET_LINKED",
317
316
  "DUCKDB_EXTENSION_ICU_LINKED",
package/binding.gyp.in CHANGED
@@ -16,7 +16,6 @@
16
16
  "${INCLUDE_FILES}"
17
17
  ],
18
18
  "defines": [
19
- "NAPI_DISABLE_CPP_EXCEPTIONS=1",
20
19
  "NAPI_VERSION=6",
21
20
  "${DEFINES}"
22
21
  ],
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "duckdb",
3
3
  "main": "./lib/duckdb.js",
4
4
  "types": "./lib/duckdb.d.ts",
5
- "version": "0.8.2-dev4711.0",
5
+ "version": "0.8.2-dev4871.0",
6
6
  "description": "DuckDB node.js API",
7
7
  "gypfile": true,
8
8
  "dependencies": {
@@ -66,8 +66,7 @@ Connection::Connection(const Napi::CallbackInfo &info) : Napi::ObjectWrap<Connec
66
66
  int length = info.Length();
67
67
 
68
68
  if (length <= 0 || !Database::HasInstance(info[0])) {
69
- Napi::TypeError::New(env, "Database object expected").ThrowAsJavaScriptException();
70
- return;
69
+ throw Napi::TypeError::New(env, "Database object expected");
71
70
  }
72
71
 
73
72
  database_ref = Napi::ObjectWrap<Database>::Unwrap(info[0].As<Napi::Object>());
@@ -277,8 +276,7 @@ struct RegisterUdfTask : public Task {
277
276
  Napi::Value Connection::RegisterUdf(const Napi::CallbackInfo &info) {
278
277
  auto env = info.Env();
279
278
  if (info.Length() < 3 || !info[0].IsString() || !info[1].IsString() || !info[2].IsFunction()) {
280
- Napi::TypeError::New(env, "Holding it wrong").ThrowAsJavaScriptException();
281
- return env.Null();
279
+ throw Napi::TypeError::New(env, "Holding it wrong");
282
280
  }
283
281
 
284
282
  std::string name = info[0].As<Napi::String>();
@@ -290,8 +288,7 @@ Napi::Value Connection::RegisterUdf(const Napi::CallbackInfo &info) {
290
288
  }
291
289
 
292
290
  if (udfs.find(name) != udfs.end()) {
293
- Napi::TypeError::New(env, "UDF with this name already exists").ThrowAsJavaScriptException();
294
- return env.Null();
291
+ throw Napi::TypeError::New(env, "UDF with this name already exists");
295
292
  }
296
293
 
297
294
  auto udf = duckdb_node_udf_function_t::New(env, udf_callback, "duckdb_node_udf" + name, 0, 1, nullptr,
@@ -338,8 +335,7 @@ struct UnregisterUdfTask : public Task {
338
335
  Napi::Value Connection::UnregisterUdf(const Napi::CallbackInfo &info) {
339
336
  auto env = info.Env();
340
337
  if (info.Length() < 1 || !info[0].IsString()) {
341
- Napi::TypeError::New(env, "Holding it wrong").ThrowAsJavaScriptException();
342
- return env.Null();
338
+ throw Napi::TypeError::New(env, "Holding it wrong");
343
339
  }
344
340
  std::string name = info[0].As<Napi::String>();
345
341
 
@@ -441,8 +437,7 @@ Napi::Value Connection::Exec(const Napi::CallbackInfo &info) {
441
437
  auto env = info.Env();
442
438
 
443
439
  if (info.Length() < 1 || !info[0].IsString()) {
444
- Napi::TypeError::New(env, "SQL query expected").ThrowAsJavaScriptException();
445
- return env.Null();
440
+ throw Napi::TypeError::New(env, "SQL query expected");
446
441
  }
447
442
 
448
443
  std::string sql = info[0].As<Napi::String>();
@@ -461,8 +456,7 @@ Napi::Value Connection::RegisterBuffer(const Napi::CallbackInfo &info) {
461
456
  auto env = info.Env();
462
457
 
463
458
  if (info.Length() < 2 || !info[0].IsString() || !info[1].IsObject()) {
464
- Napi::TypeError::New(env, "Incorrect params").ThrowAsJavaScriptException();
465
- return env.Null();
459
+ throw Napi::TypeError::New(env, "Incorrect params");
466
460
  }
467
461
 
468
462
  std::string name = info[0].As<Napi::String>();
@@ -471,17 +465,13 @@ Napi::Value Connection::RegisterBuffer(const Napi::CallbackInfo &info) {
471
465
 
472
466
  if (info.Length() > 2) {
473
467
  if (!info[2].IsBoolean()) {
474
- Napi::TypeError::New(env, "Parameter 3 is of unexpected type. Expected boolean")
475
- .ThrowAsJavaScriptException();
476
- return env.Null();
468
+ throw Napi::TypeError::New(env, "Parameter 3 is of unexpected type. Expected boolean");
477
469
  }
478
470
  force_register = info[2].As<Napi::Boolean>().Value();
479
471
  }
480
472
 
481
473
  if (!force_register && array_references.find(name) != array_references.end()) {
482
- Napi::TypeError::New(env, "Buffer with this name already exists and force_register is not enabled")
483
- .ThrowAsJavaScriptException();
484
- return env.Null();
474
+ throw Napi::TypeError::New(env, "Buffer with this name already exists and force_register is not enabled");
485
475
  }
486
476
 
487
477
  array_references[name] = Napi::Persistent(array);
@@ -491,9 +481,7 @@ Napi::Value Connection::RegisterBuffer(const Napi::CallbackInfo &info) {
491
481
  for (uint64_t ipc_idx = 0; ipc_idx < array.Length(); ipc_idx++) {
492
482
  Napi::Value v = array[ipc_idx];
493
483
  if (!v.IsObject()) {
494
- Napi::TypeError::New(env, "Parameter 2 contains unexpected type at index " + std::to_string(ipc_idx))
495
- .ThrowAsJavaScriptException();
496
- return env.Null();
484
+ throw Napi::TypeError::New(env, "Parameter 2 contains unexpected type at index " + std::to_string(ipc_idx));
497
485
  }
498
486
  Napi::Uint8Array arr = v.As<Napi::Uint8Array>();
499
487
  auto raw_ptr = reinterpret_cast<uint64_t>(arr.ArrayBuffer().Data());
@@ -519,8 +507,7 @@ Napi::Value Connection::UnRegisterBuffer(const Napi::CallbackInfo &info) {
519
507
  auto env = info.Env();
520
508
 
521
509
  if (info.Length() < 1 || !info[0].IsString()) {
522
- Napi::TypeError::New(env, "Incorrect params").ThrowAsJavaScriptException();
523
- return env.Null();
510
+ throw Napi::TypeError::New(env, "Incorrect params");
524
511
  }
525
512
  std::string name = info[0].As<Napi::String>();
526
513
 
@@ -184,9 +184,7 @@ Napi::Array EncodeDataChunk(Napi::Env env, duckdb::DataChunk &chunk, bool with_t
184
184
  break;
185
185
  }
186
186
  default:
187
- Napi::TypeError::New(env, "Unsupported UDF argument type " + vec->GetType().ToString())
188
- .ThrowAsJavaScriptException();
189
- break;
187
+ throw Napi::TypeError::New(env, "Unsupported UDF argument type " + vec->GetType().ToString());
190
188
  }
191
189
  }
192
190
  col_descs.Set(col_idx, col_desc);
package/src/database.cpp CHANGED
@@ -43,9 +43,7 @@ struct OpenTask : public Task {
43
43
  try {
44
44
  duckdb_config.SetOptionByName(key, duckdb::Value(val));
45
45
  } catch (std::exception &e) {
46
- Napi::TypeError::New(env, "Failed to set configuration option " + key + ": " + e.what())
47
- .ThrowAsJavaScriptException();
48
- return;
46
+ throw Napi::TypeError::New(env, "Failed to set configuration option " + key + ": " + e.what());
49
47
  }
50
48
  }
51
49
  }
@@ -90,8 +88,7 @@ Database::Database(const Napi::CallbackInfo &info)
90
88
  auto env = info.Env();
91
89
 
92
90
  if (info.Length() < 1 || !info[0].IsString()) {
93
- Napi::TypeError::New(env, "Database location expected").ThrowAsJavaScriptException();
94
- return;
91
+ throw Napi::TypeError::New(env, "Database location expected");
95
92
  }
96
93
  std::string filename = info[0].As<Napi::String>();
97
94
  unsigned int pos = 1;
@@ -193,8 +190,7 @@ Napi::Value Database::Serialize(const Napi::CallbackInfo &info) {
193
190
  return info.This();
194
191
  }
195
192
  if (info.Length() < 1 || !info[0].IsFunction()) {
196
- Napi::TypeError::New(env, "Callback expected").ThrowAsJavaScriptException();
197
- return env.Null();
193
+ throw Napi::TypeError::New(env, "Callback expected");
198
194
  }
199
195
  Napi::HandleScope scope(env);
200
196
  info[0].As<Napi::Function>().MakeCallback(info.This(), {});
@@ -355,8 +351,7 @@ Napi::Value Database::RegisterReplacementScan(const Napi::CallbackInfo &info) {
355
351
  auto env = info.Env();
356
352
  auto deferred = Napi::Promise::Deferred::New(info.Env());
357
353
  if (info.Length() < 1) {
358
- Napi::TypeError::New(env, "Replacement scan callback expected").ThrowAsJavaScriptException();
359
- return env.Null();
354
+ throw Napi::TypeError::New(env, "Replacement scan callback expected");
360
355
  }
361
356
  Napi::Function rs_callback = info[0].As<Napi::Function>();
362
357
  auto rs =
@@ -108,10 +108,11 @@ struct ICUDatePart : public ICUDateFunc {
108
108
  return ExtractMillisecond(calendar, micros) * Interval::MICROS_PER_MSEC + micros;
109
109
  }
110
110
 
111
- static int64_t ExtractEpoch(icu::Calendar *calendar, const uint64_t micros) {
111
+ static double ExtractEpoch(icu::Calendar *calendar, const uint64_t micros) {
112
112
  UErrorCode status = U_ZERO_ERROR;
113
- // Truncate
114
- return calendar->getTime(status) / Interval::MSECS_PER_SEC;
113
+ auto result = calendar->getTime(status) / Interval::MSECS_PER_SEC;
114
+ result += micros / double(Interval::MICROS_PER_SEC);
115
+ return result;
115
116
  }
116
117
 
117
118
  static int64_t ExtractTimezone(icu::Calendar *calendar, const uint64_t micros) {
@@ -187,8 +188,6 @@ struct ICUDatePart : public ICUDateFunc {
187
188
  return ExtractQuarter;
188
189
  case DatePartSpecifier::YEARWEEK:
189
190
  return ExtractYearWeek;
190
- case DatePartSpecifier::EPOCH:
191
- return ExtractEpoch;
192
191
  case DatePartSpecifier::ERA:
193
192
  return ExtractEra;
194
193
  case DatePartSpecifier::TIMEZONE:
@@ -204,6 +203,8 @@ struct ICUDatePart : public ICUDateFunc {
204
203
 
205
204
  static part_double_t PartCodeDoubleFactory(DatePartSpecifier part) {
206
205
  switch (part) {
206
+ case DatePartSpecifier::EPOCH:
207
+ return ExtractEpoch;
207
208
  case DatePartSpecifier::JULIAN_DAY:
208
209
  return ExtractJulianDay;
209
210
  default:
@@ -262,7 +263,7 @@ struct ICUDatePart : public ICUDateFunc {
262
263
  adapters_t adapters;
263
264
 
264
265
  bool Equals(const FunctionData &other_p) const override {
265
- const auto &other = (BindAdapterData &)other_p;
266
+ const auto &other = other_p.Cast<BindAdapterData>();
266
267
  return BindData::Equals(other_p) && adapters == other.adapters;
267
268
  }
268
269
 
@@ -278,7 +279,7 @@ struct ICUDatePart : public ICUDateFunc {
278
279
  auto &date_arg = args.data[0];
279
280
 
280
281
  auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
281
- auto &info = (BIND_TYPE &)*func_expr.bind_info;
282
+ auto &info = func_expr.bind_info->Cast<BIND_TYPE>();
282
283
  CalendarPtr calendar_ptr(info.calendar->clone());
283
284
  auto calendar = calendar_ptr.get();
284
285
 
@@ -655,6 +656,8 @@ struct ICUDatePart : public ICUDateFunc {
655
656
 
656
657
  void RegisterICUDatePartFunctions(ClientContext &context) {
657
658
  // register the individual operators
659
+
660
+ // BIGINTs
658
661
  ICUDatePart::AddUnaryPartCodeFunctions("era", context);
659
662
  ICUDatePart::AddUnaryPartCodeFunctions("year", context);
660
663
  ICUDatePart::AddUnaryPartCodeFunctions("month", context);
@@ -672,12 +675,13 @@ void RegisterICUDatePartFunctions(ClientContext &context) {
672
675
  ICUDatePart::AddUnaryPartCodeFunctions("week", context); // Note that WeekOperator is ISO-8601, not US
673
676
  ICUDatePart::AddUnaryPartCodeFunctions("dayofyear", context);
674
677
  ICUDatePart::AddUnaryPartCodeFunctions("quarter", context);
675
- ICUDatePart::AddUnaryPartCodeFunctions("epoch", context);
676
678
  ICUDatePart::AddUnaryPartCodeFunctions("isoyear", context);
677
679
  ICUDatePart::AddUnaryPartCodeFunctions("timezone", context);
678
680
  ICUDatePart::AddUnaryPartCodeFunctions("timezone_hour", context);
679
681
  ICUDatePart::AddUnaryPartCodeFunctions("timezone_minute", context);
680
682
 
683
+ // DOUBLEs
684
+ ICUDatePart::AddUnaryPartCodeFunctions<double>("epoch", context, LogicalType::DOUBLE);
681
685
  ICUDatePart::AddUnaryPartCodeFunctions<double>("julian", context, LogicalType::DOUBLE);
682
686
 
683
687
  // register combinations
@@ -1,6 +1,8 @@
1
1
  #include "json_transform.hpp"
2
2
 
3
3
  #include "duckdb/common/enum_util.hpp"
4
+ #include "duckdb/common/serializer/deserializer.hpp"
5
+ #include "duckdb/common/serializer/serializer.hpp"
4
6
  #include "duckdb/common/types.hpp"
5
7
  #include "duckdb/execution/expression_executor.hpp"
6
8
  #include "duckdb/function/cast/cast_function_set.hpp"
@@ -8,8 +10,6 @@
8
10
  #include "duckdb/function/scalar/nested_functions.hpp"
9
11
  #include "json_functions.hpp"
10
12
  #include "json_scan.hpp"
11
- #include "duckdb/common/serializer/serializer.hpp"
12
- #include "duckdb/common/serializer/deserializer.hpp"
13
13
 
14
14
  namespace duckdb {
15
15
 
@@ -72,12 +72,13 @@ static unique_ptr<FunctionData> JSONTransformBind(ClientContext &context, Scalar
72
72
  if (arguments[1]->HasParameter()) {
73
73
  throw ParameterNotResolvedException();
74
74
  }
75
- if (arguments[1]->return_type == LogicalTypeId::SQLNULL) {
76
- bound_function.return_type = LogicalTypeId::SQLNULL;
77
- } else if (!arguments[1]->IsFoldable()) {
75
+ if (!arguments[1]->IsFoldable()) {
78
76
  throw BinderException("JSON structure must be a constant!");
77
+ }
78
+ auto structure_val = ExpressionExecutor::EvaluateScalar(context, *arguments[1]);
79
+ if (structure_val.IsNull() || arguments[1]->return_type == LogicalTypeId::SQLNULL) {
80
+ bound_function.return_type = LogicalTypeId::SQLNULL;
79
81
  } else {
80
- auto structure_val = ExpressionExecutor::EvaluateScalar(context, *arguments[1]);
81
82
  if (!structure_val.DefaultTryCastAs(JSONCommon::JSONType())) {
82
83
  throw BinderException("Cannot cast JSON structure to string");
83
84
  }
@@ -741,6 +742,7 @@ bool JSONTransform::Transform(yyjson_val *vals[], yyjson_alc *alc, Vector &resul
741
742
 
742
743
  switch (result_type.id()) {
743
744
  case LogicalTypeId::SQLNULL:
745
+ FlatVector::Validity(result).SetAllInvalid(count);
744
746
  return true;
745
747
  case LogicalTypeId::BOOLEAN:
746
748
  return TransformNumerical<bool>(vals, result, count, options);
@@ -15,9 +15,6 @@ namespace duckdb {
15
15
  using JSONPathType = JSONCommon::JSONPathType;
16
16
 
17
17
  static JSONPathType CheckPath(const Value &path_val, string &path, size_t &len) {
18
- if (path_val.IsNull()) {
19
- throw InvalidInputException("JSON path cannot be NULL");
20
- }
21
18
  const auto path_str_val = path_val.DefaultCastAs(LogicalType::VARCHAR);
22
19
  auto path_str = path_str_val.GetValueUnsafe<string_t>();
23
20
  len = path_str.GetSize();
@@ -49,7 +46,7 @@ unique_ptr<FunctionData> JSONReadFunctionData::Copy() const {
49
46
  }
50
47
 
51
48
  bool JSONReadFunctionData::Equals(const FunctionData &other_p) const {
52
- auto &other = (const JSONReadFunctionData &)other_p;
49
+ auto &other = other_p.Cast<JSONReadFunctionData>();
53
50
  return constant == other.constant && path == other.path && len == other.len && path_type == other.path_type;
54
51
  }
55
52
 
@@ -60,7 +57,7 @@ unique_ptr<FunctionData> JSONReadFunctionData::Bind(ClientContext &context, Scal
60
57
  string path = "";
61
58
  size_t len = 0;
62
59
  JSONPathType path_type = JSONPathType::REGULAR;
63
- if (arguments[1]->return_type.id() != LogicalTypeId::SQLNULL && arguments[1]->IsFoldable()) {
60
+ if (arguments[1]->IsFoldable()) {
64
61
  constant = true;
65
62
  const auto path_val = ExpressionExecutor::EvaluateScalar(context, *arguments[1]);
66
63
  path_type = CheckPath(path_val, path, len);
@@ -83,7 +80,7 @@ unique_ptr<FunctionData> JSONReadManyFunctionData::Copy() const {
83
80
  }
84
81
 
85
82
  bool JSONReadManyFunctionData::Equals(const FunctionData &other_p) const {
86
- auto &other = (const JSONReadManyFunctionData &)other_p;
83
+ auto &other = other_p.Cast<JSONReadManyFunctionData>();
87
84
  return paths == other.paths && lens == other.lens;
88
85
  }
89
86
 
@@ -100,6 +97,7 @@ unique_ptr<FunctionData> JSONReadManyFunctionData::Bind(ClientContext &context,
100
97
  vector<string> paths;
101
98
  vector<size_t> lens;
102
99
  auto paths_val = ExpressionExecutor::EvaluateScalar(context, *arguments[1]);
100
+
103
101
  for (auto &path_val : ListValue::GetChildren(paths_val)) {
104
102
  paths.emplace_back("");
105
103
  lens.push_back(0);
@@ -1197,8 +1197,6 @@ const char* EnumUtil::ToChars<DatePartSpecifier>(DatePartSpecifier value) {
1197
1197
  return "MINUTE";
1198
1198
  case DatePartSpecifier::HOUR:
1199
1199
  return "HOUR";
1200
- case DatePartSpecifier::EPOCH:
1201
- return "EPOCH";
1202
1200
  case DatePartSpecifier::DOW:
1203
1201
  return "DOW";
1204
1202
  case DatePartSpecifier::ISODOW:
@@ -1221,8 +1219,12 @@ const char* EnumUtil::ToChars<DatePartSpecifier>(DatePartSpecifier value) {
1221
1219
  return "TIMEZONE_HOUR";
1222
1220
  case DatePartSpecifier::TIMEZONE_MINUTE:
1223
1221
  return "TIMEZONE_MINUTE";
1222
+ case DatePartSpecifier::EPOCH:
1223
+ return "EPOCH";
1224
1224
  case DatePartSpecifier::JULIAN_DAY:
1225
1225
  return "JULIAN_DAY";
1226
+ case DatePartSpecifier::INVALID:
1227
+ return "INVALID";
1226
1228
  default:
1227
1229
  throw NotImplementedException(StringUtil::Format("Enum value: '%d' not implemented", value));
1228
1230
  }
@@ -1263,9 +1265,6 @@ DatePartSpecifier EnumUtil::FromString<DatePartSpecifier>(const char *value) {
1263
1265
  if (StringUtil::Equals(value, "HOUR")) {
1264
1266
  return DatePartSpecifier::HOUR;
1265
1267
  }
1266
- if (StringUtil::Equals(value, "EPOCH")) {
1267
- return DatePartSpecifier::EPOCH;
1268
- }
1269
1268
  if (StringUtil::Equals(value, "DOW")) {
1270
1269
  return DatePartSpecifier::DOW;
1271
1270
  }
@@ -1299,9 +1298,15 @@ DatePartSpecifier EnumUtil::FromString<DatePartSpecifier>(const char *value) {
1299
1298
  if (StringUtil::Equals(value, "TIMEZONE_MINUTE")) {
1300
1299
  return DatePartSpecifier::TIMEZONE_MINUTE;
1301
1300
  }
1301
+ if (StringUtil::Equals(value, "EPOCH")) {
1302
+ return DatePartSpecifier::EPOCH;
1303
+ }
1302
1304
  if (StringUtil::Equals(value, "JULIAN_DAY")) {
1303
1305
  return DatePartSpecifier::JULIAN_DAY;
1304
1306
  }
1307
+ if (StringUtil::Equals(value, "INVALID")) {
1308
+ return DatePartSpecifier::INVALID;
1309
+ }
1305
1310
  throw NotImplementedException(StringUtil::Format("Enum value: '%s' not implemented", value));
1306
1311
  }
1307
1312
 
@@ -188,7 +188,7 @@ void RadixPartitionedTupleData::InitializeAppendStateInternal(PartitionedTupleDa
188
188
  for (idx_t col_idx = 0; col_idx < column_count; col_idx++) {
189
189
  column_ids.emplace_back(col_idx);
190
190
  }
191
- partitions[0]->InitializeAppend(state.chunk_state, std::move(column_ids));
191
+ partitions[0]->InitializeChunkState(state.chunk_state, std::move(column_ids));
192
192
 
193
193
  // Initialize fixed-size map
194
194
  state.fixed_partition_entries.resize(RadixPartitioning::NumberOfPartitions(radix_bits));