duckdb 0.7.2-dev3515.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.
- package/configure.py +2 -0
- package/package.json +1 -1
- package/src/database.cpp +1 -0
- package/src/duckdb/extension/json/buffered_json_reader.cpp +56 -17
- package/src/duckdb/extension/json/include/buffered_json_reader.hpp +56 -31
- package/src/duckdb/extension/json/include/json_common.hpp +5 -4
- package/src/duckdb/extension/json/include/json_executors.hpp +13 -18
- package/src/duckdb/extension/json/include/json_functions.hpp +3 -0
- package/src/duckdb/extension/json/include/json_scan.hpp +106 -153
- package/src/duckdb/extension/json/include/json_transform.hpp +2 -2
- package/src/duckdb/extension/json/json_common.cpp +1 -1
- package/src/duckdb/extension/json/json_functions/copy_json.cpp +94 -38
- package/src/duckdb/extension/json/json_functions/json_contains.cpp +7 -8
- package/src/duckdb/extension/json/json_functions/json_create.cpp +7 -7
- package/src/duckdb/extension/json/json_functions/json_merge_patch.cpp +4 -4
- package/src/duckdb/extension/json/json_functions/json_serialize_sql.cpp +4 -4
- package/src/duckdb/extension/json/json_functions/json_structure.cpp +7 -5
- package/src/duckdb/extension/json/json_functions/json_transform.cpp +10 -8
- package/src/duckdb/extension/json/json_functions/json_valid.cpp +1 -1
- package/src/duckdb/extension/json/json_functions/read_json.cpp +167 -169
- package/src/duckdb/extension/json/json_functions/read_json_objects.cpp +37 -16
- package/src/duckdb/extension/json/json_functions.cpp +11 -4
- package/src/duckdb/extension/json/json_scan.cpp +593 -374
- package/src/duckdb/extension/parquet/parquet-extension.cpp +5 -0
- package/src/duckdb/src/catalog/catalog_entry/macro_catalog_entry.cpp +42 -0
- package/src/duckdb/src/catalog/catalog_search_path.cpp +5 -0
- package/src/duckdb/src/catalog/catalog_set.cpp +1 -1
- package/src/duckdb/src/common/constants.cpp +1 -0
- package/src/duckdb/src/common/file_system.cpp +26 -6
- package/src/duckdb/src/common/local_file_system.cpp +0 -13
- package/src/duckdb/src/common/types/vector.cpp +3 -3
- package/src/duckdb/src/common/types/vector_buffer.cpp +11 -3
- package/src/duckdb/src/common/types/vector_cache.cpp +5 -5
- package/src/duckdb/src/execution/operator/persistent/buffered_csv_reader.cpp +12 -6
- package/src/duckdb/src/execution/operator/persistent/csv_reader_options.cpp +10 -0
- package/src/duckdb/src/execution/operator/schema/physical_create_type.cpp +2 -2
- package/src/duckdb/src/function/macro_function.cpp +43 -0
- package/src/duckdb/src/function/pragma/pragma_queries.cpp +5 -3
- package/src/duckdb/src/function/scalar/strftime_format.cpp +1 -0
- package/src/duckdb/src/function/scalar_macro_function.cpp +10 -0
- package/src/duckdb/src/function/table/copy_csv.cpp +68 -18
- package/src/duckdb/src/function/table/read_csv.cpp +30 -3
- package/src/duckdb/src/function/table/version/pragma_version.cpp +8 -2
- package/src/duckdb/src/function/table_macro_function.cpp +10 -0
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/column_dependency_manager.hpp +1 -1
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/macro_catalog_entry.hpp +3 -1
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/scalar_macro_catalog_entry.hpp +0 -6
- package/src/duckdb/src/include/duckdb/catalog/catalog_entry/table_macro_catalog_entry.hpp +0 -6
- package/src/duckdb/src/include/duckdb/catalog/catalog_search_path.hpp +1 -1
- package/src/duckdb/src/include/duckdb/catalog/similar_catalog_entry.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/constants.hpp +2 -0
- package/src/duckdb/src/include/duckdb/common/exception.hpp +3 -3
- package/src/duckdb/src/include/duckdb/common/field_writer.hpp +3 -3
- package/src/duckdb/src/include/duckdb/common/file_system.hpp +5 -0
- package/src/duckdb/src/include/duckdb/common/http_state.hpp +2 -1
- package/src/duckdb/src/include/duckdb/common/hugeint.hpp +6 -6
- package/src/duckdb/src/include/duckdb/common/limits.hpp +46 -46
- package/src/duckdb/src/include/duckdb/common/operator/cast_operators.hpp +8 -8
- package/src/duckdb/src/include/duckdb/common/operator/comparison_operators.hpp +6 -6
- package/src/duckdb/src/include/duckdb/common/operator/convert_to_string.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/operator/decimal_cast_operators.hpp +2 -4
- package/src/duckdb/src/include/duckdb/common/operator/string_cast.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/operator/subtract.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/preserved_error.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/re2_regex.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/string_util.hpp +7 -7
- package/src/duckdb/src/include/duckdb/common/types/chunk_collection.hpp +10 -10
- package/src/duckdb/src/include/duckdb/common/types/column/column_data_collection.hpp +12 -12
- package/src/duckdb/src/include/duckdb/common/types/column/column_data_collection_iterators.hpp +2 -2
- package/src/duckdb/src/include/duckdb/common/types/value.hpp +1 -1
- package/src/duckdb/src/include/duckdb/common/types/vector_buffer.hpp +12 -2
- package/src/duckdb/src/include/duckdb/common/types.hpp +2 -2
- package/src/duckdb/src/include/duckdb/common/winapi.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/expression_executor_state.hpp +1 -1
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/csv_reader_options.hpp +9 -5
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_create_type.hpp +1 -1
- package/src/duckdb/src/include/duckdb/function/aggregate_function.hpp +10 -14
- package/src/duckdb/src/include/duckdb/function/macro_function.hpp +7 -1
- package/src/duckdb/src/include/duckdb/function/scalar/strftime_format.hpp +3 -4
- package/src/duckdb/src/include/duckdb/function/scalar_macro_function.hpp +7 -2
- package/src/duckdb/src/include/duckdb/function/table_function.hpp +1 -1
- package/src/duckdb/src/include/duckdb/function/table_macro_function.hpp +5 -0
- package/src/duckdb/src/include/duckdb/function/udf_function.hpp +56 -50
- package/src/duckdb/src/include/duckdb/main/appender.hpp +2 -2
- package/src/duckdb/src/include/duckdb/main/client_context.hpp +2 -2
- package/src/duckdb/src/include/duckdb/main/client_data.hpp +3 -1
- package/src/duckdb/src/include/duckdb/main/connection.hpp +8 -9
- package/src/duckdb/src/include/duckdb/main/extension_entries.hpp +1 -0
- package/src/duckdb/src/include/duckdb/main/query_result.hpp +3 -3
- package/src/duckdb/src/include/duckdb/main/relation.hpp +6 -7
- package/src/duckdb/src/include/duckdb/optimizer/optimizer_extension.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/column_list.hpp +7 -7
- package/src/duckdb/src/include/duckdb/parser/parsed_data/attach_info.hpp +4 -7
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_macro_info.hpp +8 -12
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_sequence_info.hpp +6 -20
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_type_info.hpp +6 -18
- package/src/duckdb/src/include/duckdb/parser/parsed_data/detach_info.hpp +4 -8
- package/src/duckdb/src/include/duckdb/parser/parsed_data/drop_info.hpp +4 -38
- package/src/duckdb/src/include/duckdb/parser/parsed_data/transaction_info.hpp +5 -2
- package/src/duckdb/src/include/duckdb/parser/parsed_data/vacuum_info.hpp +10 -10
- package/src/duckdb/src/include/duckdb/parser/parser_extension.hpp +2 -2
- package/src/duckdb/src/include/duckdb/parser/sql_statement.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/statement/select_statement.hpp +1 -1
- package/src/duckdb/src/include/duckdb/planner/operator_extension.hpp +2 -2
- package/src/duckdb/src/include/duckdb/storage/storage_extension.hpp +2 -2
- package/src/duckdb/src/parser/parsed_data/attach_info.cpp +42 -0
- package/src/duckdb/src/parser/parsed_data/create_index_info.cpp +0 -7
- package/src/duckdb/src/parser/parsed_data/create_info.cpp +19 -8
- package/src/duckdb/src/parser/parsed_data/create_macro_info.cpp +46 -0
- package/src/duckdb/src/parser/parsed_data/create_sequence_info.cpp +56 -0
- package/src/duckdb/src/parser/parsed_data/create_type_info.cpp +47 -0
- package/src/duckdb/src/parser/parsed_data/detach_info.cpp +34 -0
- package/src/duckdb/src/parser/parsed_data/drop_info.cpp +46 -0
- package/src/duckdb/src/parser/parsed_data/transaction_info.cpp +24 -0
- package/src/duckdb/src/parser/parsed_data/vacuum_info.cpp +37 -0
- package/src/duckdb/src/planner/binder/expression/bind_star_expression.cpp +27 -9
- package/src/duckdb/src/planner/binder/statement/bind_copy.cpp +9 -4
- package/src/duckdb/src/planner/binder/statement/bind_create.cpp +2 -1
- package/src/duckdb/src/planner/binder/statement/bind_create_table.cpp +1 -0
- package/src/duckdb/src/planner/binder/tableref/bind_basetableref.cpp +1 -1
- package/src/duckdb/src/planner/logical_operator.cpp +1 -2
- package/src/duckdb/src/planner/operator/logical_create_index.cpp +16 -25
- package/src/duckdb/src/planner/operator/logical_insert.cpp +30 -0
- package/src/duckdb/src/planner/operator/logical_simple.cpp +33 -5
- package/src/duckdb/src/planner/parsed_data/bound_create_table_info.cpp +6 -16
- package/src/duckdb/src/planner/planner.cpp +4 -13
- package/src/duckdb/src/storage/checkpoint_manager.cpp +12 -6
- package/src/duckdb/src/storage/single_file_block_manager.cpp +0 -4
- package/src/duckdb/src/storage/storage_info.cpp +1 -1
- package/src/duckdb/third_party/libpg_query/src_backend_parser_gram.cpp +5735 -5773
- package/src/duckdb/ub_src_catalog_catalog_entry.cpp +1 -1
- package/src/duckdb/ub_src_parser_parsed_data.cpp +16 -0
- package/src/duckdb/src/catalog/catalog_entry/scalar_macro_catalog_entry.cpp +0 -104
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
#include "src/catalog/catalog_entry/index_catalog_entry.cpp"
|
12
12
|
|
13
|
-
#include "src/catalog/catalog_entry/
|
13
|
+
#include "src/catalog/catalog_entry/macro_catalog_entry.cpp"
|
14
14
|
|
15
15
|
#include "src/catalog/catalog_entry/pragma_function_catalog_entry.cpp"
|
16
16
|
|
@@ -6,6 +6,8 @@
|
|
6
6
|
|
7
7
|
#include "src/parser/parsed_data/alter_table_info.cpp"
|
8
8
|
|
9
|
+
#include "src/parser/parsed_data/attach_info.cpp"
|
10
|
+
|
9
11
|
#include "src/parser/parsed_data/create_info.cpp"
|
10
12
|
|
11
13
|
#include "src/parser/parsed_data/create_index_info.cpp"
|
@@ -16,15 +18,29 @@
|
|
16
18
|
|
17
19
|
#include "src/parser/parsed_data/create_copy_function_info.cpp"
|
18
20
|
|
21
|
+
#include "src/parser/parsed_data/create_macro_info.cpp"
|
22
|
+
|
19
23
|
#include "src/parser/parsed_data/create_pragma_function_info.cpp"
|
20
24
|
|
25
|
+
#include "src/parser/parsed_data/create_sequence_info.cpp"
|
26
|
+
|
21
27
|
#include "src/parser/parsed_data/create_scalar_function_info.cpp"
|
22
28
|
|
23
29
|
#include "src/parser/parsed_data/create_table_function_info.cpp"
|
24
30
|
|
25
31
|
#include "src/parser/parsed_data/create_table_info.cpp"
|
26
32
|
|
33
|
+
#include "src/parser/parsed_data/create_type_info.cpp"
|
34
|
+
|
27
35
|
#include "src/parser/parsed_data/create_view_info.cpp"
|
28
36
|
|
37
|
+
#include "src/parser/parsed_data/detach_info.cpp"
|
38
|
+
|
39
|
+
#include "src/parser/parsed_data/drop_info.cpp"
|
40
|
+
|
29
41
|
#include "src/parser/parsed_data/sample_options.cpp"
|
30
42
|
|
43
|
+
#include "src/parser/parsed_data/transaction_info.cpp"
|
44
|
+
|
45
|
+
#include "src/parser/parsed_data/vacuum_info.cpp"
|
46
|
+
|
@@ -1,104 +0,0 @@
|
|
1
|
-
#include "duckdb/catalog/catalog_entry/scalar_macro_catalog_entry.hpp"
|
2
|
-
#include "duckdb/catalog/catalog_entry/table_macro_catalog_entry.hpp"
|
3
|
-
#include "duckdb/common/field_writer.hpp"
|
4
|
-
#include "duckdb/function/scalar_macro_function.hpp"
|
5
|
-
#include "duckdb/function/table_macro_function.hpp"
|
6
|
-
|
7
|
-
namespace duckdb {
|
8
|
-
|
9
|
-
MacroCatalogEntry::MacroCatalogEntry(Catalog &catalog, SchemaCatalogEntry &schema, CreateMacroInfo &info)
|
10
|
-
: FunctionEntry(
|
11
|
-
(info.function->type == MacroType::SCALAR_MACRO ? CatalogType::MACRO_ENTRY : CatalogType::TABLE_MACRO_ENTRY),
|
12
|
-
catalog, schema, info),
|
13
|
-
function(std::move(info.function)) {
|
14
|
-
this->temporary = info.temporary;
|
15
|
-
this->internal = info.internal;
|
16
|
-
}
|
17
|
-
|
18
|
-
ScalarMacroCatalogEntry::ScalarMacroCatalogEntry(Catalog &catalog, SchemaCatalogEntry &schema, CreateMacroInfo &info)
|
19
|
-
: MacroCatalogEntry(catalog, schema, info) {
|
20
|
-
}
|
21
|
-
|
22
|
-
void ScalarMacroCatalogEntry::Serialize(Serializer &main_serializer) const {
|
23
|
-
D_ASSERT(!internal);
|
24
|
-
auto &scalar_function = function->Cast<ScalarMacroFunction>();
|
25
|
-
FieldWriter writer(main_serializer);
|
26
|
-
writer.WriteString(schema.name);
|
27
|
-
writer.WriteString(name);
|
28
|
-
writer.WriteSerializable(*scalar_function.expression);
|
29
|
-
// writer.WriteSerializableList(function->parameters);
|
30
|
-
writer.WriteSerializableList(function->parameters);
|
31
|
-
writer.WriteField<uint32_t>((uint32_t)function->default_parameters.size());
|
32
|
-
auto &serializer = writer.GetSerializer();
|
33
|
-
for (auto &kv : function->default_parameters) {
|
34
|
-
serializer.WriteString(kv.first);
|
35
|
-
kv.second->Serialize(serializer);
|
36
|
-
}
|
37
|
-
writer.Finalize();
|
38
|
-
}
|
39
|
-
|
40
|
-
unique_ptr<CreateMacroInfo> ScalarMacroCatalogEntry::Deserialize(Deserializer &main_source, ClientContext &context) {
|
41
|
-
auto info = make_uniq<CreateMacroInfo>(CatalogType::MACRO_ENTRY);
|
42
|
-
FieldReader reader(main_source);
|
43
|
-
info->schema = reader.ReadRequired<string>();
|
44
|
-
info->name = reader.ReadRequired<string>();
|
45
|
-
auto expression = reader.ReadRequiredSerializable<ParsedExpression>();
|
46
|
-
auto func = make_uniq<ScalarMacroFunction>(std::move(expression));
|
47
|
-
info->function = std::move(func);
|
48
|
-
info->function->parameters = reader.ReadRequiredSerializableList<ParsedExpression>();
|
49
|
-
auto default_param_count = reader.ReadRequired<uint32_t>();
|
50
|
-
auto &source = reader.GetSource();
|
51
|
-
for (idx_t i = 0; i < default_param_count; i++) {
|
52
|
-
auto name = source.Read<string>();
|
53
|
-
info->function->default_parameters[name] = ParsedExpression::Deserialize(source);
|
54
|
-
}
|
55
|
-
// dont like this
|
56
|
-
// info->type=CatalogType::MACRO_ENTRY;
|
57
|
-
reader.Finalize();
|
58
|
-
return info;
|
59
|
-
}
|
60
|
-
|
61
|
-
TableMacroCatalogEntry::TableMacroCatalogEntry(Catalog &catalog, SchemaCatalogEntry &schema, CreateMacroInfo &info)
|
62
|
-
: MacroCatalogEntry(catalog, schema, info) {
|
63
|
-
}
|
64
|
-
|
65
|
-
void TableMacroCatalogEntry::Serialize(Serializer &main_serializer) const {
|
66
|
-
D_ASSERT(!internal);
|
67
|
-
FieldWriter writer(main_serializer);
|
68
|
-
|
69
|
-
auto &table_function = function->Cast<TableMacroFunction>();
|
70
|
-
writer.WriteString(schema.name);
|
71
|
-
writer.WriteString(name);
|
72
|
-
writer.WriteSerializable(*table_function.query_node);
|
73
|
-
writer.WriteSerializableList(function->parameters);
|
74
|
-
writer.WriteField<uint32_t>((uint32_t)function->default_parameters.size());
|
75
|
-
auto &serializer = writer.GetSerializer();
|
76
|
-
for (auto &kv : function->default_parameters) {
|
77
|
-
serializer.WriteString(kv.first);
|
78
|
-
kv.second->Serialize(serializer);
|
79
|
-
}
|
80
|
-
writer.Finalize();
|
81
|
-
}
|
82
|
-
|
83
|
-
unique_ptr<CreateMacroInfo> TableMacroCatalogEntry::Deserialize(Deserializer &main_source, ClientContext &context) {
|
84
|
-
auto info = make_uniq<CreateMacroInfo>(CatalogType::TABLE_MACRO_ENTRY);
|
85
|
-
FieldReader reader(main_source);
|
86
|
-
info->schema = reader.ReadRequired<string>();
|
87
|
-
info->name = reader.ReadRequired<string>();
|
88
|
-
auto query_node = reader.ReadRequiredSerializable<QueryNode>();
|
89
|
-
auto table_function = make_uniq<TableMacroFunction>(std::move(query_node));
|
90
|
-
info->function = std::move(table_function);
|
91
|
-
info->function->parameters = reader.ReadRequiredSerializableList<ParsedExpression>();
|
92
|
-
auto default_param_count = reader.ReadRequired<uint32_t>();
|
93
|
-
auto &source = reader.GetSource();
|
94
|
-
for (idx_t i = 0; i < default_param_count; i++) {
|
95
|
-
auto name = source.Read<string>();
|
96
|
-
info->function->default_parameters[name] = ParsedExpression::Deserialize(source);
|
97
|
-
}
|
98
|
-
|
99
|
-
reader.Finalize();
|
100
|
-
|
101
|
-
return info;
|
102
|
-
}
|
103
|
-
|
104
|
-
} // namespace duckdb
|