duckdb 0.7.2-dev3546.0 → 0.7.2-dev3666.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 (77) hide show
  1. package/package.json +1 -1
  2. package/src/database.cpp +1 -0
  3. package/src/duckdb/extension/json/buffered_json_reader.cpp +56 -17
  4. package/src/duckdb/extension/json/include/buffered_json_reader.hpp +56 -31
  5. package/src/duckdb/extension/json/include/json_common.hpp +5 -4
  6. package/src/duckdb/extension/json/include/json_executors.hpp +13 -18
  7. package/src/duckdb/extension/json/include/json_functions.hpp +3 -0
  8. package/src/duckdb/extension/json/include/json_scan.hpp +106 -153
  9. package/src/duckdb/extension/json/include/json_transform.hpp +2 -2
  10. package/src/duckdb/extension/json/json_common.cpp +1 -1
  11. package/src/duckdb/extension/json/json_functions/copy_json.cpp +94 -38
  12. package/src/duckdb/extension/json/json_functions/json_contains.cpp +7 -8
  13. package/src/duckdb/extension/json/json_functions/json_create.cpp +7 -7
  14. package/src/duckdb/extension/json/json_functions/json_merge_patch.cpp +4 -4
  15. package/src/duckdb/extension/json/json_functions/json_serialize_sql.cpp +4 -4
  16. package/src/duckdb/extension/json/json_functions/json_structure.cpp +7 -5
  17. package/src/duckdb/extension/json/json_functions/json_transform.cpp +10 -8
  18. package/src/duckdb/extension/json/json_functions/json_valid.cpp +1 -1
  19. package/src/duckdb/extension/json/json_functions/read_json.cpp +166 -169
  20. package/src/duckdb/extension/json/json_functions/read_json_objects.cpp +37 -16
  21. package/src/duckdb/extension/json/json_functions.cpp +11 -4
  22. package/src/duckdb/extension/json/json_scan.cpp +593 -374
  23. package/src/duckdb/extension/parquet/parquet-extension.cpp +5 -0
  24. package/src/duckdb/src/common/file_system.cpp +26 -6
  25. package/src/duckdb/src/common/local_file_system.cpp +0 -13
  26. package/src/duckdb/src/execution/operator/persistent/buffered_csv_reader.cpp +12 -6
  27. package/src/duckdb/src/execution/operator/persistent/csv_reader_options.cpp +10 -0
  28. package/src/duckdb/src/function/pragma/pragma_queries.cpp +5 -3
  29. package/src/duckdb/src/function/table/copy_csv.cpp +66 -12
  30. package/src/duckdb/src/function/table/read_csv.cpp +13 -3
  31. package/src/duckdb/src/function/table/version/pragma_version.cpp +8 -2
  32. package/src/duckdb/src/include/duckdb/catalog/catalog_entry/column_dependency_manager.hpp +1 -1
  33. package/src/duckdb/src/include/duckdb/catalog/catalog_search_path.hpp +1 -1
  34. package/src/duckdb/src/include/duckdb/catalog/similar_catalog_entry.hpp +1 -1
  35. package/src/duckdb/src/include/duckdb/common/exception.hpp +3 -3
  36. package/src/duckdb/src/include/duckdb/common/file_system.hpp +5 -0
  37. package/src/duckdb/src/include/duckdb/common/http_state.hpp +2 -1
  38. package/src/duckdb/src/include/duckdb/common/hugeint.hpp +6 -6
  39. package/src/duckdb/src/include/duckdb/common/limits.hpp +46 -46
  40. package/src/duckdb/src/include/duckdb/common/operator/cast_operators.hpp +8 -8
  41. package/src/duckdb/src/include/duckdb/common/operator/comparison_operators.hpp +6 -6
  42. package/src/duckdb/src/include/duckdb/common/operator/convert_to_string.hpp +1 -1
  43. package/src/duckdb/src/include/duckdb/common/operator/decimal_cast_operators.hpp +2 -4
  44. package/src/duckdb/src/include/duckdb/common/operator/string_cast.hpp +1 -1
  45. package/src/duckdb/src/include/duckdb/common/operator/subtract.hpp +1 -1
  46. package/src/duckdb/src/include/duckdb/common/preserved_error.hpp +1 -1
  47. package/src/duckdb/src/include/duckdb/common/re2_regex.hpp +1 -1
  48. package/src/duckdb/src/include/duckdb/common/string_util.hpp +7 -7
  49. package/src/duckdb/src/include/duckdb/common/types/chunk_collection.hpp +10 -10
  50. package/src/duckdb/src/include/duckdb/common/types/column/column_data_collection.hpp +12 -12
  51. package/src/duckdb/src/include/duckdb/common/types/column/column_data_collection_iterators.hpp +2 -2
  52. package/src/duckdb/src/include/duckdb/common/types/value.hpp +1 -1
  53. package/src/duckdb/src/include/duckdb/common/types.hpp +2 -2
  54. package/src/duckdb/src/include/duckdb/common/winapi.hpp +1 -1
  55. package/src/duckdb/src/include/duckdb/execution/expression_executor_state.hpp +1 -1
  56. package/src/duckdb/src/include/duckdb/execution/operator/persistent/csv_reader_options.hpp +8 -3
  57. package/src/duckdb/src/include/duckdb/function/aggregate_function.hpp +10 -14
  58. package/src/duckdb/src/include/duckdb/function/table_function.hpp +1 -1
  59. package/src/duckdb/src/include/duckdb/function/udf_function.hpp +56 -50
  60. package/src/duckdb/src/include/duckdb/main/appender.hpp +2 -2
  61. package/src/duckdb/src/include/duckdb/main/client_context.hpp +2 -2
  62. package/src/duckdb/src/include/duckdb/main/client_data.hpp +3 -1
  63. package/src/duckdb/src/include/duckdb/main/connection.hpp +8 -9
  64. package/src/duckdb/src/include/duckdb/main/extension_entries.hpp +1 -0
  65. package/src/duckdb/src/include/duckdb/main/query_result.hpp +3 -3
  66. package/src/duckdb/src/include/duckdb/main/relation.hpp +6 -7
  67. package/src/duckdb/src/include/duckdb/optimizer/optimizer_extension.hpp +1 -1
  68. package/src/duckdb/src/include/duckdb/parser/column_list.hpp +7 -7
  69. package/src/duckdb/src/include/duckdb/parser/parser_extension.hpp +2 -2
  70. package/src/duckdb/src/include/duckdb/parser/sql_statement.hpp +1 -1
  71. package/src/duckdb/src/include/duckdb/parser/statement/select_statement.hpp +1 -1
  72. package/src/duckdb/src/include/duckdb/planner/operator_extension.hpp +2 -2
  73. package/src/duckdb/src/include/duckdb/storage/storage_extension.hpp +2 -2
  74. package/src/duckdb/src/planner/binder/statement/bind_copy.cpp +9 -4
  75. package/src/duckdb/src/planner/binder/tableref/bind_basetableref.cpp +1 -1
  76. package/src/duckdb/src/storage/single_file_block_manager.cpp +0 -4
  77. package/src/duckdb/third_party/libpg_query/src_backend_parser_gram.cpp +5735 -5773
@@ -16,7 +16,7 @@ namespace duckdb {
16
16
 
17
17
  //! The OperatorExtensionInfo holds static information relevant to the operator extension
18
18
  struct OperatorExtensionInfo {
19
- DUCKDB_API virtual ~OperatorExtensionInfo() {
19
+ virtual ~OperatorExtensionInfo() {
20
20
  }
21
21
  };
22
22
 
@@ -37,7 +37,7 @@ public:
37
37
  virtual unique_ptr<LogicalExtensionOperator> Deserialize(LogicalDeserializationState &state,
38
38
  FieldReader &reader) = 0;
39
39
 
40
- DUCKDB_API virtual ~OperatorExtension() {
40
+ virtual ~OperatorExtension() {
41
41
  }
42
42
  };
43
43
 
@@ -20,7 +20,7 @@ class TransactionManager;
20
20
 
21
21
  //! The StorageExtensionInfo holds static information relevant to the storage extension
22
22
  struct StorageExtensionInfo {
23
- DUCKDB_API virtual ~StorageExtensionInfo() {
23
+ virtual ~StorageExtensionInfo() {
24
24
  }
25
25
  };
26
26
 
@@ -43,7 +43,7 @@ public:
43
43
  //! Additional info passed to the various storage functions
44
44
  shared_ptr<StorageExtensionInfo> storage_info;
45
45
 
46
- DUCKDB_API virtual ~StorageExtension() {
46
+ virtual ~StorageExtension() {
47
47
  }
48
48
  };
49
49
 
@@ -129,10 +129,15 @@ BoundStatement Binder::BindCopyTo(CopyStatement &stmt) {
129
129
  if (per_thread_output && !partition_cols.empty()) {
130
130
  throw NotImplementedException("Can't combine PER_THREAD_OUTPUT and PARTITION_BY for COPY");
131
131
  }
132
- bool is_file_and_exists = config.file_system->FileExists(stmt.info->file_path);
133
- bool is_stdout = stmt.info->file_path == "/dev/stdout";
134
- if (!user_set_use_tmp_file) {
135
- use_tmp_file = is_file_and_exists && !per_thread_output && partition_cols.empty() && !is_stdout;
132
+ bool is_remote_file = config.file_system->IsRemoteFile(stmt.info->file_path);
133
+ if (is_remote_file) {
134
+ use_tmp_file = false;
135
+ } else {
136
+ bool is_file_and_exists = config.file_system->FileExists(stmt.info->file_path);
137
+ bool is_stdout = stmt.info->file_path == "/dev/stdout";
138
+ if (!user_set_use_tmp_file) {
139
+ use_tmp_file = is_file_and_exists && !per_thread_output && partition_cols.empty() && !is_stdout;
140
+ }
136
141
  }
137
142
 
138
143
  auto unique_column_names = GetUniqueNames(select_node.names);
@@ -94,7 +94,7 @@ unique_ptr<BoundTableRef> Binder::Bind(BaseTableRef &ref) {
94
94
  for (auto &scan : config.replacement_scans) {
95
95
  auto replacement_function = scan.function(context, table_name, scan.data.get());
96
96
  if (replacement_function) {
97
- replacement_function->alias = ref.alias.empty() ? ref.table_name : ref.alias;
97
+ replacement_function->alias = ref.alias.empty() ? replacement_function->alias : ref.alias;
98
98
  if (replacement_function->type == TableReferenceType::TABLE_FUNCTION) {
99
99
  auto &table_function = replacement_function->Cast<TableFunctionRef>();
100
100
  table_function.column_name_alias = ref.column_name_alias;
@@ -241,10 +241,6 @@ void SingleFileBlockManager::Initialize(DatabaseHeader &header) {
241
241
  }
242
242
 
243
243
  void SingleFileBlockManager::LoadFreeList() {
244
- if (options.read_only) {
245
- // no need to load free list for read only db
246
- return;
247
- }
248
244
  if (free_list_id == INVALID_BLOCK) {
249
245
  // no free list
250
246
  return;