duckdb 1.4.1 → 1.4.2

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 (148) hide show
  1. package/.github/workflows/NodeJS.yml +9 -6
  2. package/package.json +2 -2
  3. package/scripts/node_version.sh +1 -1
  4. package/src/duckdb/extension/icu/icu_extension.cpp +67 -6
  5. package/src/duckdb/extension/icu/third_party/icu/common/putil.cpp +9 -3
  6. package/src/duckdb/extension/json/include/json_serializer.hpp +12 -0
  7. package/src/duckdb/extension/json/json_functions/json_create.cpp +10 -10
  8. package/src/duckdb/extension/parquet/decoder/delta_length_byte_array_decoder.cpp +19 -5
  9. package/src/duckdb/extension/parquet/include/decoder/delta_length_byte_array_decoder.hpp +1 -1
  10. package/src/duckdb/extension/parquet/include/parquet_dbp_decoder.hpp +11 -2
  11. package/src/duckdb/extension/parquet/include/reader/string_column_reader.hpp +2 -1
  12. package/src/duckdb/extension/parquet/parquet_reader.cpp +3 -1
  13. package/src/duckdb/extension/parquet/parquet_writer.cpp +16 -1
  14. package/src/duckdb/extension/parquet/reader/string_column_reader.cpp +1 -1
  15. package/src/duckdb/extension/parquet/writer/primitive_column_writer.cpp +1 -1
  16. package/src/duckdb/src/catalog/default/default_table_functions.cpp +1 -1
  17. package/src/duckdb/src/common/adbc/adbc.cpp +8 -6
  18. package/src/duckdb/src/common/csv_writer.cpp +1 -13
  19. package/src/duckdb/src/common/encryption_key_manager.cpp +10 -9
  20. package/src/duckdb/src/common/enum_util.cpp +19 -0
  21. package/src/duckdb/src/common/enums/compression_type.cpp +51 -16
  22. package/src/duckdb/src/common/exception/binder_exception.cpp +7 -2
  23. package/src/duckdb/src/common/progress_bar/unscented_kalman_filter.cpp +2 -2
  24. package/src/duckdb/src/common/random_engine.cpp +10 -0
  25. package/src/duckdb/src/execution/expression_executor/execute_comparison.cpp +13 -2
  26. package/src/duckdb/src/execution/index/art/art.cpp +6 -3
  27. package/src/duckdb/src/execution/index/bound_index.cpp +32 -21
  28. package/src/duckdb/src/execution/index/unbound_index.cpp +20 -9
  29. package/src/duckdb/src/execution/join_hashtable.cpp +9 -3
  30. package/src/duckdb/src/execution/operator/helper/physical_buffered_batch_collector.cpp +1 -1
  31. package/src/duckdb/src/execution/operator/helper/physical_buffered_collector.cpp +1 -1
  32. package/src/duckdb/src/execution/operator/join/physical_hash_join.cpp +5 -0
  33. package/src/duckdb/src/function/cast/cast_function_set.cpp +3 -1
  34. package/src/duckdb/src/function/macro_function.cpp +1 -1
  35. package/src/duckdb/src/function/scalar/compressed_materialization/compress_string.cpp +1 -1
  36. package/src/duckdb/src/function/scalar/create_sort_key.cpp +5 -3
  37. package/src/duckdb/src/function/scalar/operator/arithmetic.cpp +1 -1
  38. package/src/duckdb/src/function/scalar/system/parse_log_message.cpp +4 -2
  39. package/src/duckdb/src/function/table/copy_csv.cpp +28 -4
  40. package/src/duckdb/src/function/table/direct_file_reader.cpp +10 -0
  41. package/src/duckdb/src/function/table/read_file.cpp +65 -1
  42. package/src/duckdb/src/function/table/version/pragma_version.cpp +3 -3
  43. package/src/duckdb/src/include/duckdb/common/csv_writer.hpp +0 -3
  44. package/src/duckdb/src/include/duckdb/common/encryption_key_manager.hpp +2 -0
  45. package/src/duckdb/src/include/duckdb/common/encryption_state.hpp +5 -0
  46. package/src/duckdb/src/include/duckdb/common/enum_util.hpp +8 -0
  47. package/src/duckdb/src/include/duckdb/common/enums/compression_type.hpp +42 -2
  48. package/src/duckdb/src/include/duckdb/common/http_util.hpp +7 -0
  49. package/src/duckdb/src/include/duckdb/common/hugeint.hpp +1 -1
  50. package/src/duckdb/src/include/duckdb/common/operator/comparison_operators.hpp +0 -11
  51. package/src/duckdb/src/include/duckdb/common/random_engine.hpp +2 -0
  52. package/src/duckdb/src/include/duckdb/common/sort/duckdb_pdqsort.hpp +1 -0
  53. package/src/duckdb/src/include/duckdb/common/types/hugeint.hpp +6 -6
  54. package/src/duckdb/src/include/duckdb/common/types/row/block_iterator.hpp +115 -97
  55. package/src/duckdb/src/include/duckdb/execution/index/art/art_operator.hpp +54 -0
  56. package/src/duckdb/src/include/duckdb/execution/index/bound_index.hpp +21 -2
  57. package/src/duckdb/src/include/duckdb/execution/index/unbound_index.hpp +26 -8
  58. package/src/duckdb/src/include/duckdb/execution/join_hashtable.hpp +2 -0
  59. package/src/duckdb/src/include/duckdb/function/table/read_file.hpp +0 -49
  60. package/src/duckdb/src/include/duckdb/logging/log_manager.hpp +1 -1
  61. package/src/duckdb/src/include/duckdb/logging/log_type.hpp +14 -0
  62. package/src/duckdb/src/include/duckdb/main/attached_database.hpp +2 -1
  63. package/src/duckdb/src/include/duckdb/main/buffered_data/batched_buffered_data.hpp +1 -1
  64. package/src/duckdb/src/include/duckdb/main/buffered_data/buffered_data.hpp +1 -1
  65. package/src/duckdb/src/include/duckdb/main/buffered_data/simple_buffered_data.hpp +1 -1
  66. package/src/duckdb/src/include/duckdb/main/capi/capi_internal.hpp +2 -0
  67. package/src/duckdb/src/include/duckdb/main/database.hpp +2 -2
  68. package/src/duckdb/src/include/duckdb/main/database_file_path_manager.hpp +10 -6
  69. package/src/duckdb/src/include/duckdb/main/extension_entries.hpp +4 -0
  70. package/src/duckdb/src/include/duckdb/main/profiling_info.hpp +1 -0
  71. package/src/duckdb/src/include/duckdb/main/query_profiler.hpp +1 -0
  72. package/src/duckdb/src/include/duckdb/main/relation/create_table_relation.hpp +3 -0
  73. package/src/duckdb/src/include/duckdb/main/relation/insert_relation.hpp +2 -0
  74. package/src/duckdb/src/include/duckdb/main/relation/table_relation.hpp +2 -0
  75. package/src/duckdb/src/include/duckdb/main/relation.hpp +10 -2
  76. package/src/duckdb/src/include/duckdb/main/settings.hpp +9 -0
  77. package/src/duckdb/src/include/duckdb/optimizer/filter_pullup.hpp +10 -14
  78. package/src/duckdb/src/include/duckdb/optimizer/join_order/relation_manager.hpp +5 -1
  79. package/src/duckdb/src/include/duckdb/parser/query_node.hpp +3 -0
  80. package/src/duckdb/src/include/duckdb/planner/bound_statement.hpp +1 -0
  81. package/src/duckdb/src/include/duckdb/storage/block.hpp +9 -0
  82. package/src/duckdb/src/include/duckdb/storage/block_manager.hpp +9 -2
  83. package/src/duckdb/src/include/duckdb/storage/index.hpp +8 -2
  84. package/src/duckdb/src/include/duckdb/storage/metadata/metadata_manager.hpp +2 -0
  85. package/src/duckdb/src/include/duckdb/storage/metadata/metadata_reader.hpp +1 -1
  86. package/src/duckdb/src/include/duckdb/storage/storage_options.hpp +0 -7
  87. package/src/duckdb/src/include/duckdb/storage/table/row_group.hpp +6 -2
  88. package/src/duckdb/src/include/duckdb/verification/deserialized_statement_verifier.hpp +6 -0
  89. package/src/duckdb/src/logging/log_manager.cpp +2 -1
  90. package/src/duckdb/src/logging/log_types.cpp +30 -1
  91. package/src/duckdb/src/main/attached_database.cpp +4 -7
  92. package/src/duckdb/src/main/buffered_data/batched_buffered_data.cpp +2 -3
  93. package/src/duckdb/src/main/buffered_data/buffered_data.cpp +2 -3
  94. package/src/duckdb/src/main/buffered_data/simple_buffered_data.cpp +1 -2
  95. package/src/duckdb/src/main/capi/prepared-c.cpp +9 -2
  96. package/src/duckdb/src/main/config.cpp +6 -5
  97. package/src/duckdb/src/main/database.cpp +9 -3
  98. package/src/duckdb/src/main/database_file_path_manager.cpp +43 -14
  99. package/src/duckdb/src/main/database_manager.cpp +1 -1
  100. package/src/duckdb/src/main/http/http_util.cpp +19 -1
  101. package/src/duckdb/src/main/profiling_info.cpp +11 -0
  102. package/src/duckdb/src/main/query_profiler.cpp +16 -0
  103. package/src/duckdb/src/main/relation/create_table_relation.cpp +9 -0
  104. package/src/duckdb/src/main/relation/insert_relation.cpp +7 -0
  105. package/src/duckdb/src/main/relation/table_relation.cpp +14 -0
  106. package/src/duckdb/src/main/relation.cpp +28 -12
  107. package/src/duckdb/src/main/settings/custom_settings.cpp +9 -3
  108. package/src/duckdb/src/optimizer/filter_pullup.cpp +14 -0
  109. package/src/duckdb/src/optimizer/join_order/relation_manager.cpp +29 -10
  110. package/src/duckdb/src/optimizer/rule/regex_optimizations.cpp +7 -0
  111. package/src/duckdb/src/parallel/task_executor.cpp +4 -2
  112. package/src/duckdb/src/parser/query_node/cte_node.cpp +79 -0
  113. package/src/duckdb/src/parser/transform/expression/transform_cast.cpp +3 -1
  114. package/src/duckdb/src/planner/binder/expression/bind_macro_expression.cpp +1 -0
  115. package/src/duckdb/src/planner/binder/statement/bind_create_table.cpp +12 -4
  116. package/src/duckdb/src/planner/binder/statement/bind_insert.cpp +16 -12
  117. package/src/duckdb/src/planner/binder/statement/bind_merge_into.cpp +42 -5
  118. package/src/duckdb/src/planner/binder/tableref/bind_basetableref.cpp +0 -24
  119. package/src/duckdb/src/planner/binder/tableref/bind_table_function.cpp +1 -1
  120. package/src/duckdb/src/planner/binder.cpp +0 -1
  121. package/src/duckdb/src/planner/expression_binder/having_binder.cpp +1 -2
  122. package/src/duckdb/src/storage/buffer/block_manager.cpp +20 -6
  123. package/src/duckdb/src/storage/checkpoint/table_data_writer.cpp +8 -6
  124. package/src/duckdb/src/storage/checkpoint_manager.cpp +24 -22
  125. package/src/duckdb/src/storage/compression/validity_uncompressed.cpp +7 -0
  126. package/src/duckdb/src/storage/compression/zstd.cpp +34 -12
  127. package/src/duckdb/src/storage/data_table.cpp +1 -1
  128. package/src/duckdb/src/storage/local_storage.cpp +15 -2
  129. package/src/duckdb/src/storage/metadata/metadata_manager.cpp +29 -6
  130. package/src/duckdb/src/storage/metadata/metadata_reader.cpp +11 -15
  131. package/src/duckdb/src/storage/metadata/metadata_writer.cpp +1 -1
  132. package/src/duckdb/src/storage/serialization/serialize_query_node.cpp +1 -19
  133. package/src/duckdb/src/storage/single_file_block_manager.cpp +33 -3
  134. package/src/duckdb/src/storage/standard_buffer_manager.cpp +3 -1
  135. package/src/duckdb/src/storage/storage_info.cpp +4 -0
  136. package/src/duckdb/src/storage/storage_manager.cpp +8 -0
  137. package/src/duckdb/src/storage/table/array_column_data.cpp +1 -1
  138. package/src/duckdb/src/storage/table/column_data.cpp +3 -2
  139. package/src/duckdb/src/storage/table/column_data_checkpointer.cpp +3 -2
  140. package/src/duckdb/src/storage/table/row_group.cpp +41 -24
  141. package/src/duckdb/src/storage/table/row_group_collection.cpp +114 -11
  142. package/src/duckdb/src/storage/table_index_list.cpp +18 -5
  143. package/src/duckdb/src/transaction/cleanup_state.cpp +7 -2
  144. package/src/duckdb/third_party/mbedtls/include/mbedtls_wrapper.hpp +5 -0
  145. package/src/duckdb/third_party/mbedtls/mbedtls_wrapper.cpp +8 -21
  146. package/src/duckdb/third_party/parquet/parquet_types.cpp +57 -35
  147. package/src/duckdb/third_party/parquet/parquet_types.h +9 -2
  148. package/src/duckdb/ub_src_common_types_row.cpp +0 -2
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Autogenerated by Thrift Compiler (0.21.0)
2
+ * Autogenerated by Thrift Compiler (0.22.0)
3
3
  *
4
4
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  * @generated
@@ -13,6 +13,14 @@
13
13
 
14
14
  namespace duckdb_parquet {
15
15
 
16
+ template <class ENUM>
17
+ static typename ENUM::type SafeEnumCast(const std::map<int, const char*> &values_to_names, const int &ecast) {
18
+ if (values_to_names.find(ecast) == values_to_names.end()) {
19
+ throw duckdb_apache::thrift::protocol::TProtocolException(duckdb_apache::thrift::protocol::TProtocolException::INVALID_DATA);
20
+ }
21
+ return static_cast<typename ENUM::type>(ecast);
22
+ }
23
+
16
24
  int _kTypeValues[] = {
17
25
  Type::BOOLEAN,
18
26
  Type::INT32,
@@ -176,7 +184,14 @@ int _kConvertedTypeValues[] = {
176
184
  * the provided duration. This duration of time is independent of any
177
185
  * particular timezone or date.
178
186
  */
179
- ConvertedType::INTERVAL
187
+ ConvertedType::INTERVAL,
188
+ /**
189
+ * Non-standard NULL value
190
+ *
191
+ * This was written by old writers - it is kept here for compatibility purposes.
192
+ * See https://github.com/duckdb/duckdb/pull/11774
193
+ */
194
+ ConvertedType::PARQUET_NULL
180
195
  };
181
196
  const char* _kConvertedTypeNames[] = {
182
197
  /**
@@ -300,9 +315,16 @@ const char* _kConvertedTypeNames[] = {
300
315
  * the provided duration. This duration of time is independent of any
301
316
  * particular timezone or date.
302
317
  */
303
- "INTERVAL"
318
+ "INTERVAL",
319
+ /**
320
+ * Non-standard NULL value
321
+ *
322
+ * This was written by old writers - it is kept here for compatibility purposes.
323
+ * See https://github.com/duckdb/duckdb/pull/11774
324
+ */
325
+ "PARQUET_NULL"
304
326
  };
305
- const std::map<int, const char*> _ConvertedType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(22, _kConvertedTypeValues, _kConvertedTypeNames), ::apache::thrift::TEnumIterator(-1, nullptr, nullptr));
327
+ const std::map<int, const char*> _ConvertedType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(23, _kConvertedTypeValues, _kConvertedTypeNames), ::apache::thrift::TEnumIterator(-1, nullptr, nullptr));
306
328
 
307
329
  std::ostream& operator<<(std::ostream& out, const ConvertedType::type& val) {
308
330
  std::map<int, const char*>::const_iterator it = _ConvertedType_VALUES_TO_NAMES.find(val);
@@ -3446,7 +3468,7 @@ GeographyType::~GeographyType() noexcept {
3446
3468
 
3447
3469
  GeographyType::GeographyType() noexcept
3448
3470
  : crs(),
3449
- algorithm(static_cast<EdgeInterpolationAlgorithm::type>(0)) {
3471
+ algorithm(SafeEnumCast<EdgeInterpolationAlgorithm>(_EdgeInterpolationAlgorithm_VALUES_TO_NAMES, 0)) {
3450
3472
  }
3451
3473
 
3452
3474
  void GeographyType::__set_crs(const std::string& val) {
@@ -3498,7 +3520,7 @@ uint32_t GeographyType::read(::apache::thrift::protocol::TProtocol* iprot) {
3498
3520
  if (ftype == ::apache::thrift::protocol::T_I32) {
3499
3521
  int32_t ecast114;
3500
3522
  xfer += iprot->readI32(ecast114);
3501
- this->algorithm = static_cast<EdgeInterpolationAlgorithm::type>(ecast114);
3523
+ this->algorithm = SafeEnumCast<EdgeInterpolationAlgorithm>(_EdgeInterpolationAlgorithm_VALUES_TO_NAMES, ecast114);
3502
3524
  this->__isset.algorithm = true;
3503
3525
  } else {
3504
3526
  xfer += iprot->skip(ftype);
@@ -4067,12 +4089,12 @@ SchemaElement::~SchemaElement() noexcept {
4067
4089
  }
4068
4090
 
4069
4091
  SchemaElement::SchemaElement() noexcept
4070
- : type(static_cast<Type::type>(0)),
4092
+ : type(SafeEnumCast<Type>(_Type_VALUES_TO_NAMES, 0)),
4071
4093
  type_length(0),
4072
- repetition_type(static_cast<FieldRepetitionType::type>(0)),
4094
+ repetition_type(SafeEnumCast<FieldRepetitionType>(_FieldRepetitionType_VALUES_TO_NAMES, 0)),
4073
4095
  name(),
4074
4096
  num_children(0),
4075
- converted_type(static_cast<ConvertedType::type>(0)),
4097
+ converted_type(SafeEnumCast<ConvertedType>(_ConvertedType_VALUES_TO_NAMES, 0)),
4076
4098
  scale(0),
4077
4099
  precision(0),
4078
4100
  field_id(0) {
@@ -4159,7 +4181,7 @@ uint32_t SchemaElement::read(::apache::thrift::protocol::TProtocol* iprot) {
4159
4181
  if (ftype == ::apache::thrift::protocol::T_I32) {
4160
4182
  int32_t ecast123;
4161
4183
  xfer += iprot->readI32(ecast123);
4162
- this->type = static_cast<Type::type>(ecast123);
4184
+ this->type = SafeEnumCast<Type>(_Type_VALUES_TO_NAMES, ecast123);
4163
4185
  this->__isset.type = true;
4164
4186
  } else {
4165
4187
  xfer += iprot->skip(ftype);
@@ -4177,7 +4199,7 @@ uint32_t SchemaElement::read(::apache::thrift::protocol::TProtocol* iprot) {
4177
4199
  if (ftype == ::apache::thrift::protocol::T_I32) {
4178
4200
  int32_t ecast124;
4179
4201
  xfer += iprot->readI32(ecast124);
4180
- this->repetition_type = static_cast<FieldRepetitionType::type>(ecast124);
4202
+ this->repetition_type = SafeEnumCast<FieldRepetitionType>(_FieldRepetitionType_VALUES_TO_NAMES, ecast124);
4181
4203
  this->__isset.repetition_type = true;
4182
4204
  } else {
4183
4205
  xfer += iprot->skip(ftype);
@@ -4203,7 +4225,7 @@ uint32_t SchemaElement::read(::apache::thrift::protocol::TProtocol* iprot) {
4203
4225
  if (ftype == ::apache::thrift::protocol::T_I32) {
4204
4226
  int32_t ecast125;
4205
4227
  xfer += iprot->readI32(ecast125);
4206
- this->converted_type = static_cast<ConvertedType::type>(ecast125);
4228
+ this->converted_type = SafeEnumCast<ConvertedType>(_ConvertedType_VALUES_TO_NAMES, ecast125);
4207
4229
  this->__isset.converted_type = true;
4208
4230
  } else {
4209
4231
  xfer += iprot->skip(ftype);
@@ -4405,9 +4427,9 @@ DataPageHeader::~DataPageHeader() noexcept {
4405
4427
 
4406
4428
  DataPageHeader::DataPageHeader() noexcept
4407
4429
  : num_values(0),
4408
- encoding(static_cast<Encoding::type>(0)),
4409
- definition_level_encoding(static_cast<Encoding::type>(0)),
4410
- repetition_level_encoding(static_cast<Encoding::type>(0)) {
4430
+ encoding(SafeEnumCast<Encoding>(_Encoding_VALUES_TO_NAMES, 0)),
4431
+ definition_level_encoding(SafeEnumCast<Encoding>(_Encoding_VALUES_TO_NAMES, 0)),
4432
+ repetition_level_encoding(SafeEnumCast<Encoding>(_Encoding_VALUES_TO_NAMES, 0)) {
4411
4433
  }
4412
4434
 
4413
4435
  void DataPageHeader::__set_num_values(const int32_t val) {
@@ -4474,7 +4496,7 @@ uint32_t DataPageHeader::read(::apache::thrift::protocol::TProtocol* iprot) {
4474
4496
  if (ftype == ::apache::thrift::protocol::T_I32) {
4475
4497
  int32_t ecast130;
4476
4498
  xfer += iprot->readI32(ecast130);
4477
- this->encoding = static_cast<Encoding::type>(ecast130);
4499
+ this->encoding = SafeEnumCast<Encoding>(_Encoding_VALUES_TO_NAMES, ecast130);
4478
4500
  isset_encoding = true;
4479
4501
  } else {
4480
4502
  xfer += iprot->skip(ftype);
@@ -4484,7 +4506,7 @@ uint32_t DataPageHeader::read(::apache::thrift::protocol::TProtocol* iprot) {
4484
4506
  if (ftype == ::apache::thrift::protocol::T_I32) {
4485
4507
  int32_t ecast131;
4486
4508
  xfer += iprot->readI32(ecast131);
4487
- this->definition_level_encoding = static_cast<Encoding::type>(ecast131);
4509
+ this->definition_level_encoding = SafeEnumCast<Encoding>(_Encoding_VALUES_TO_NAMES, ecast131);
4488
4510
  isset_definition_level_encoding = true;
4489
4511
  } else {
4490
4512
  xfer += iprot->skip(ftype);
@@ -4494,7 +4516,7 @@ uint32_t DataPageHeader::read(::apache::thrift::protocol::TProtocol* iprot) {
4494
4516
  if (ftype == ::apache::thrift::protocol::T_I32) {
4495
4517
  int32_t ecast132;
4496
4518
  xfer += iprot->readI32(ecast132);
4497
- this->repetition_level_encoding = static_cast<Encoding::type>(ecast132);
4519
+ this->repetition_level_encoding = SafeEnumCast<Encoding>(_Encoding_VALUES_TO_NAMES, ecast132);
4498
4520
  isset_repetition_level_encoding = true;
4499
4521
  } else {
4500
4522
  xfer += iprot->skip(ftype);
@@ -4697,7 +4719,7 @@ DictionaryPageHeader::~DictionaryPageHeader() noexcept {
4697
4719
 
4698
4720
  DictionaryPageHeader::DictionaryPageHeader() noexcept
4699
4721
  : num_values(0),
4700
- encoding(static_cast<Encoding::type>(0)),
4722
+ encoding(SafeEnumCast<Encoding>(_Encoding_VALUES_TO_NAMES, 0)),
4701
4723
  is_sorted(0) {
4702
4724
  }
4703
4725
 
@@ -4755,7 +4777,7 @@ uint32_t DictionaryPageHeader::read(::apache::thrift::protocol::TProtocol* iprot
4755
4777
  if (ftype == ::apache::thrift::protocol::T_I32) {
4756
4778
  int32_t ecast141;
4757
4779
  xfer += iprot->readI32(ecast141);
4758
- this->encoding = static_cast<Encoding::type>(ecast141);
4780
+ this->encoding = SafeEnumCast<Encoding>(_Encoding_VALUES_TO_NAMES, ecast141);
4759
4781
  isset_encoding = true;
4760
4782
  } else {
4761
4783
  xfer += iprot->skip(ftype);
@@ -4859,7 +4881,7 @@ DataPageHeaderV2::DataPageHeaderV2() noexcept
4859
4881
  : num_values(0),
4860
4882
  num_nulls(0),
4861
4883
  num_rows(0),
4862
- encoding(static_cast<Encoding::type>(0)),
4884
+ encoding(SafeEnumCast<Encoding>(_Encoding_VALUES_TO_NAMES, 0)),
4863
4885
  definition_levels_byte_length(0),
4864
4886
  repetition_levels_byte_length(0),
4865
4887
  is_compressed(true) {
@@ -4960,7 +4982,7 @@ uint32_t DataPageHeaderV2::read(::apache::thrift::protocol::TProtocol* iprot) {
4960
4982
  if (ftype == ::apache::thrift::protocol::T_I32) {
4961
4983
  int32_t ecast146;
4962
4984
  xfer += iprot->readI32(ecast146);
4963
- this->encoding = static_cast<Encoding::type>(ecast146);
4985
+ this->encoding = SafeEnumCast<Encoding>(_Encoding_VALUES_TO_NAMES, ecast146);
4964
4986
  isset_encoding = true;
4965
4987
  } else {
4966
4988
  xfer += iprot->skip(ftype);
@@ -5867,7 +5889,7 @@ PageHeader::~PageHeader() noexcept {
5867
5889
  }
5868
5890
 
5869
5891
  PageHeader::PageHeader() noexcept
5870
- : type(static_cast<PageType::type>(0)),
5892
+ : type(SafeEnumCast<PageType>(_PageType_VALUES_TO_NAMES, 0)),
5871
5893
  uncompressed_page_size(0),
5872
5894
  compressed_page_size(0),
5873
5895
  crc(0) {
@@ -5944,7 +5966,7 @@ uint32_t PageHeader::read(::apache::thrift::protocol::TProtocol* iprot) {
5944
5966
  if (ftype == ::apache::thrift::protocol::T_I32) {
5945
5967
  int32_t ecast179;
5946
5968
  xfer += iprot->readI32(ecast179);
5947
- this->type = static_cast<PageType::type>(ecast179);
5969
+ this->type = SafeEnumCast<PageType>(_PageType_VALUES_TO_NAMES, ecast179);
5948
5970
  isset_type = true;
5949
5971
  } else {
5950
5972
  xfer += iprot->skip(ftype);
@@ -6435,8 +6457,8 @@ PageEncodingStats::~PageEncodingStats() noexcept {
6435
6457
  }
6436
6458
 
6437
6459
  PageEncodingStats::PageEncodingStats() noexcept
6438
- : page_type(static_cast<PageType::type>(0)),
6439
- encoding(static_cast<Encoding::type>(0)),
6460
+ : page_type(SafeEnumCast<PageType>(_PageType_VALUES_TO_NAMES, 0)),
6461
+ encoding(SafeEnumCast<Encoding>(_Encoding_VALUES_TO_NAMES, 0)),
6440
6462
  count(0) {
6441
6463
  }
6442
6464
 
@@ -6486,7 +6508,7 @@ uint32_t PageEncodingStats::read(::apache::thrift::protocol::TProtocol* iprot) {
6486
6508
  if (ftype == ::apache::thrift::protocol::T_I32) {
6487
6509
  int32_t ecast192;
6488
6510
  xfer += iprot->readI32(ecast192);
6489
- this->page_type = static_cast<PageType::type>(ecast192);
6511
+ this->page_type = SafeEnumCast<PageType>(_PageType_VALUES_TO_NAMES, ecast192);
6490
6512
  isset_page_type = true;
6491
6513
  } else {
6492
6514
  xfer += iprot->skip(ftype);
@@ -6496,7 +6518,7 @@ uint32_t PageEncodingStats::read(::apache::thrift::protocol::TProtocol* iprot) {
6496
6518
  if (ftype == ::apache::thrift::protocol::T_I32) {
6497
6519
  int32_t ecast193;
6498
6520
  xfer += iprot->readI32(ecast193);
6499
- this->encoding = static_cast<Encoding::type>(ecast193);
6521
+ this->encoding = SafeEnumCast<Encoding>(_Encoding_VALUES_TO_NAMES, ecast193);
6500
6522
  isset_encoding = true;
6501
6523
  } else {
6502
6524
  xfer += iprot->skip(ftype);
@@ -6593,8 +6615,8 @@ ColumnMetaData::~ColumnMetaData() noexcept {
6593
6615
  }
6594
6616
 
6595
6617
  ColumnMetaData::ColumnMetaData() noexcept
6596
- : type(static_cast<Type::type>(0)),
6597
- codec(static_cast<CompressionCodec::type>(0)),
6618
+ : type(SafeEnumCast<Type>(_Type_VALUES_TO_NAMES, 0)),
6619
+ codec(SafeEnumCast<CompressionCodec>(_CompressionCodec_VALUES_TO_NAMES, 0)),
6598
6620
  num_values(0),
6599
6621
  total_uncompressed_size(0),
6600
6622
  total_compressed_size(0),
@@ -6721,7 +6743,7 @@ uint32_t ColumnMetaData::read(::apache::thrift::protocol::TProtocol* iprot) {
6721
6743
  if (ftype == ::apache::thrift::protocol::T_I32) {
6722
6744
  int32_t ecast198;
6723
6745
  xfer += iprot->readI32(ecast198);
6724
- this->type = static_cast<Type::type>(ecast198);
6746
+ this->type = SafeEnumCast<Type>(_Type_VALUES_TO_NAMES, ecast198);
6725
6747
  isset_type = true;
6726
6748
  } else {
6727
6749
  xfer += iprot->skip(ftype);
@@ -6740,7 +6762,7 @@ uint32_t ColumnMetaData::read(::apache::thrift::protocol::TProtocol* iprot) {
6740
6762
  {
6741
6763
  int32_t ecast204;
6742
6764
  xfer += iprot->readI32(ecast204);
6743
- this->encodings[_i203] = static_cast<Encoding::type>(ecast204);
6765
+ this->encodings[_i203] = SafeEnumCast<Encoding>(_Encoding_VALUES_TO_NAMES, ecast204);
6744
6766
  }
6745
6767
  xfer += iprot->readListEnd();
6746
6768
  }
@@ -6773,7 +6795,7 @@ uint32_t ColumnMetaData::read(::apache::thrift::protocol::TProtocol* iprot) {
6773
6795
  if (ftype == ::apache::thrift::protocol::T_I32) {
6774
6796
  int32_t ecast210;
6775
6797
  xfer += iprot->readI32(ecast210);
6776
- this->codec = static_cast<CompressionCodec::type>(ecast210);
6798
+ this->codec = SafeEnumCast<CompressionCodec>(_CompressionCodec_VALUES_TO_NAMES, ecast210);
6777
6799
  isset_codec = true;
6778
6800
  } else {
6779
6801
  xfer += iprot->skip(ftype);
@@ -8651,7 +8673,7 @@ ColumnIndex::~ColumnIndex() noexcept {
8651
8673
  }
8652
8674
 
8653
8675
  ColumnIndex::ColumnIndex() noexcept
8654
- : boundary_order(static_cast<BoundaryOrder::type>(0)) {
8676
+ : boundary_order(SafeEnumCast<BoundaryOrder>(_BoundaryOrder_VALUES_TO_NAMES, 0)) {
8655
8677
  }
8656
8678
 
8657
8679
  void ColumnIndex::__set_null_pages(const duckdb::vector<bool> & val) {
@@ -8780,7 +8802,7 @@ uint32_t ColumnIndex::read(::apache::thrift::protocol::TProtocol* iprot) {
8780
8802
  if (ftype == ::apache::thrift::protocol::T_I32) {
8781
8803
  int32_t ecast310;
8782
8804
  xfer += iprot->readI32(ecast310);
8783
- this->boundary_order = static_cast<BoundaryOrder::type>(ecast310);
8805
+ this->boundary_order = SafeEnumCast<BoundaryOrder>(_BoundaryOrder_VALUES_TO_NAMES, ecast310);
8784
8806
  isset_boundary_order = true;
8785
8807
  } else {
8786
8808
  xfer += iprot->skip(ftype);
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Autogenerated by Thrift Compiler (0.21.0)
2
+ * Autogenerated by Thrift Compiler (0.22.0)
3
3
  *
4
4
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  * @generated
@@ -178,7 +178,14 @@ struct ConvertedType {
178
178
  * the provided duration. This duration of time is independent of any
179
179
  * particular timezone or date.
180
180
  */
181
- INTERVAL = 21
181
+ INTERVAL = 21,
182
+ /**
183
+ * Non-standard NULL value
184
+ *
185
+ * This was written by old writers - it is kept here for compatibility purposes.
186
+ * See https://github.com/duckdb/duckdb/pull/11774
187
+ */
188
+ PARQUET_NULL = 24
182
189
  };
183
190
  };
184
191
 
@@ -1,5 +1,3 @@
1
- #include "src/common/types/row/block_iterator.cpp"
2
-
3
1
  #include "src/common/types/row/partitioned_tuple_data.cpp"
4
2
 
5
3
  #include "src/common/types/row/row_data_collection.cpp"