duckdb 0.7.1-dev11.0 → 0.7.1-dev137.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 +1 -1
- package/src/duckdb/extension/json/buffered_json_reader.cpp +29 -5
- package/src/duckdb/extension/json/include/buffered_json_reader.hpp +5 -1
- package/src/duckdb/extension/json/include/json_scan.hpp +17 -2
- package/src/duckdb/extension/json/json_functions/json_transform.cpp +19 -0
- package/src/duckdb/extension/json/json_functions/read_json.cpp +30 -28
- package/src/duckdb/extension/json/json_functions.cpp +6 -0
- package/src/duckdb/extension/json/json_scan.cpp +111 -23
- package/src/duckdb/extension/parquet/parquet-extension.cpp +3 -2
- package/src/duckdb/src/common/enums/logical_operator_type.cpp +2 -0
- package/src/duckdb/src/common/enums/physical_operator_type.cpp +2 -0
- package/src/duckdb/src/common/enums/statement_type.cpp +2 -0
- package/src/duckdb/src/common/file_system.cpp +14 -0
- package/src/duckdb/src/common/operator/cast_operators.cpp +14 -8
- package/src/duckdb/src/common/printer.cpp +1 -1
- package/src/duckdb/src/common/types/time.cpp +1 -1
- package/src/duckdb/src/common/types/timestamp.cpp +35 -4
- package/src/duckdb/src/common/types.cpp +36 -10
- package/src/duckdb/src/execution/column_binding_resolver.cpp +5 -2
- package/src/duckdb/src/execution/operator/persistent/base_csv_reader.cpp +6 -11
- package/src/duckdb/src/execution/operator/persistent/buffered_csv_reader.cpp +7 -13
- package/src/duckdb/src/execution/operator/persistent/parallel_csv_reader.cpp +1 -1
- package/src/duckdb/src/execution/operator/schema/physical_detach.cpp +37 -0
- package/src/duckdb/src/execution/operator/schema/physical_drop.cpp +0 -5
- package/src/duckdb/src/execution/physical_plan/plan_simple.cpp +4 -0
- package/src/duckdb/src/execution/physical_plan_generator.cpp +1 -0
- package/src/duckdb/src/function/pragma/pragma_queries.cpp +36 -9
- package/src/duckdb/src/function/table/read_csv.cpp +15 -4
- package/src/duckdb/src/function/table/version/pragma_version.cpp +2 -2
- package/src/duckdb/src/include/duckdb/common/enums/logical_operator_type.hpp +1 -0
- package/src/duckdb/src/include/duckdb/common/enums/physical_operator_type.hpp +1 -0
- package/src/duckdb/src/include/duckdb/common/enums/statement_type.hpp +2 -1
- package/src/duckdb/src/include/duckdb/common/exception.hpp +10 -0
- package/src/duckdb/src/include/duckdb/common/file_system.hpp +1 -0
- package/src/duckdb/src/include/duckdb/common/types/timestamp.hpp +5 -1
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/base_csv_reader.hpp +1 -3
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/buffered_csv_reader.hpp +0 -2
- package/src/duckdb/src/include/duckdb/execution/operator/persistent/csv_reader_options.hpp +2 -0
- package/src/duckdb/src/include/duckdb/execution/operator/schema/physical_detach.hpp +32 -0
- package/src/duckdb/src/include/duckdb/main/client_data.hpp +2 -2
- package/src/duckdb/src/include/duckdb/main/config.hpp +0 -3
- package/src/duckdb/src/include/duckdb/parser/parsed_data/create_database_info.hpp +0 -4
- package/src/duckdb/src/include/duckdb/parser/parsed_data/detach_info.hpp +32 -0
- package/src/duckdb/src/include/duckdb/parser/statement/detach_statement.hpp +29 -0
- package/src/duckdb/src/include/duckdb/parser/statement/list.hpp +1 -0
- package/src/duckdb/src/include/duckdb/parser/tokens.hpp +1 -0
- package/src/duckdb/src/include/duckdb/parser/transformer.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/binder.hpp +1 -0
- package/src/duckdb/src/include/duckdb/planner/operator/logical_execute.hpp +1 -5
- package/src/duckdb/src/include/duckdb/planner/operator/logical_show.hpp +1 -2
- package/src/duckdb/src/include/duckdb/storage/storage_extension.hpp +7 -0
- package/src/duckdb/src/include/duckdb/storage/table/update_segment.hpp +2 -0
- package/src/duckdb/src/parser/statement/copy_statement.cpp +2 -13
- package/src/duckdb/src/parser/statement/detach_statement.cpp +15 -0
- package/src/duckdb/src/parser/statement/insert_statement.cpp +3 -0
- package/src/duckdb/src/parser/transform/expression/transform_case.cpp +3 -3
- package/src/duckdb/src/parser/transform/statement/transform_create_database.cpp +0 -1
- package/src/duckdb/src/parser/transform/statement/transform_detach.cpp +19 -0
- package/src/duckdb/src/parser/transformer.cpp +2 -0
- package/src/duckdb/src/planner/binder/statement/bind_create.cpp +16 -14
- package/src/duckdb/src/planner/binder/statement/bind_detach.cpp +19 -0
- package/src/duckdb/src/planner/binder/statement/bind_drop.cpp +29 -4
- package/src/duckdb/src/planner/binder/statement/bind_insert.cpp +22 -1
- package/src/duckdb/src/planner/binder/tableref/bind_joinref.cpp +2 -1
- package/src/duckdb/src/planner/binder.cpp +2 -0
- package/src/duckdb/src/planner/expression_binder/lateral_binder.cpp +21 -5
- package/src/duckdb/src/planner/logical_operator.cpp +4 -0
- package/src/duckdb/src/planner/planner.cpp +1 -0
- package/src/duckdb/src/storage/storage_info.cpp +2 -1
- package/src/duckdb/src/storage/table/column_data.cpp +4 -2
- package/src/duckdb/src/storage/table/update_segment.cpp +15 -0
- package/src/duckdb/third_party/libpg_query/include/nodes/nodes.hpp +1 -0
- package/src/duckdb/third_party/libpg_query/include/nodes/parsenodes.hpp +14 -0
- package/src/duckdb/third_party/libpg_query/include/parser/gram.hpp +530 -1006
- package/src/duckdb/third_party/libpg_query/src_backend_parser_gram.cpp +17659 -17626
- package/src/duckdb/ub_src_execution_operator_schema.cpp +2 -0
- package/src/duckdb/ub_src_parser_statement.cpp +2 -0
- package/src/duckdb/ub_src_parser_transform_statement.cpp +2 -0
- package/src/duckdb/ub_src_planner_binder_statement.cpp +2 -0
- package/src/duckdb/src/include/duckdb/function/create_database_extension.hpp +0 -37
|
@@ -27,8 +27,10 @@ ColumnData::ColumnData(BlockManager &block_manager, DataTableInfo &info, idx_t c
|
|
|
27
27
|
|
|
28
28
|
ColumnData::ColumnData(ColumnData &other, idx_t start, ColumnData *parent)
|
|
29
29
|
: block_manager(other.block_manager), info(other.info), column_index(other.column_index), start(start),
|
|
30
|
-
type(std::move(other.type)), parent(parent),
|
|
31
|
-
|
|
30
|
+
type(std::move(other.type)), parent(parent), version(parent ? parent->version + 1 : 0) {
|
|
31
|
+
if (other.updates) {
|
|
32
|
+
updates = make_unique<UpdateSegment>(*other.updates, *this);
|
|
33
|
+
}
|
|
32
34
|
idx_t offset = 0;
|
|
33
35
|
for (auto segment = other.data.GetRootSegment(); segment; segment = segment->Next()) {
|
|
34
36
|
auto &other = (ColumnSegment &)*segment;
|
|
@@ -36,6 +36,21 @@ UpdateSegment::UpdateSegment(ColumnData &column_data)
|
|
|
36
36
|
this->statistics_update_function = GetStatisticsUpdateFunction(physical_type);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
UpdateSegment::UpdateSegment(UpdateSegment &other, ColumnData &owner)
|
|
40
|
+
: column_data(owner), root(std::move(other.root)), stats(std::move(other.stats)), type_size(other.type_size) {
|
|
41
|
+
|
|
42
|
+
this->heap.Move(other.heap);
|
|
43
|
+
|
|
44
|
+
initialize_update_function = other.initialize_update_function;
|
|
45
|
+
merge_update_function = other.merge_update_function;
|
|
46
|
+
fetch_update_function = other.fetch_update_function;
|
|
47
|
+
fetch_committed_function = other.fetch_committed_function;
|
|
48
|
+
fetch_committed_range = other.fetch_committed_range;
|
|
49
|
+
fetch_row_function = other.fetch_row_function;
|
|
50
|
+
rollback_update_function = other.rollback_update_function;
|
|
51
|
+
statistics_update_function = other.statistics_update_function;
|
|
52
|
+
}
|
|
53
|
+
|
|
39
54
|
UpdateSegment::~UpdateSegment() {
|
|
40
55
|
}
|
|
41
56
|
|
|
@@ -2070,6 +2070,20 @@ typedef struct PGAttachStmt
|
|
|
2070
2070
|
PGNode *query;
|
|
2071
2071
|
} PGAttachStmt;
|
|
2072
2072
|
|
|
2073
|
+
/* ----------------------
|
|
2074
|
+
* Dettach Statement
|
|
2075
|
+
* ----------------------
|
|
2076
|
+
*/
|
|
2077
|
+
|
|
2078
|
+
typedef struct PGDetachStmt
|
|
2079
|
+
{
|
|
2080
|
+
PGNodeTag type;
|
|
2081
|
+
char *db_name; /* list of names of attached databases */
|
|
2082
|
+
bool missing_ok;
|
|
2083
|
+
} PGDetachStmt;
|
|
2084
|
+
|
|
2085
|
+
|
|
2086
|
+
|
|
2073
2087
|
/* ----------------------
|
|
2074
2088
|
* CREATE DATABASE Statement
|
|
2075
2089
|
* ----------------------
|