duckdb 0.3.5-dev1263.0 → 0.3.5-dev1274.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.cpp +11 -1
- package/src/duckdb.hpp +8 -5
- package/src/parquet-amalgamation.cpp +16335 -16335
package/package.json
CHANGED
package/src/duckdb.cpp
CHANGED
|
@@ -3951,6 +3951,7 @@ unique_ptr<CatalogEntry> TableCatalogEntry::ChangeColumnType(ClientContext &cont
|
|
|
3951
3951
|
}
|
|
3952
3952
|
auto change_idx = GetColumnIndex(info.column_name);
|
|
3953
3953
|
auto create_info = make_unique<CreateTableInfo>(schema->name, name);
|
|
3954
|
+
create_info->temporary = temporary;
|
|
3954
3955
|
|
|
3955
3956
|
for (idx_t i = 0; i < columns.size(); i++) {
|
|
3956
3957
|
auto copy = columns[i].Copy();
|
|
@@ -4032,6 +4033,7 @@ unique_ptr<CatalogEntry> TableCatalogEntry::ChangeColumnType(ClientContext &cont
|
|
|
4032
4033
|
|
|
4033
4034
|
unique_ptr<CatalogEntry> TableCatalogEntry::SetForeignKeyConstraint(ClientContext &context, AlterForeignKeyInfo &info) {
|
|
4034
4035
|
auto create_info = make_unique<CreateTableInfo>(schema->name, name);
|
|
4036
|
+
create_info->temporary = temporary;
|
|
4035
4037
|
|
|
4036
4038
|
for (idx_t i = 0; i < columns.size(); i++) {
|
|
4037
4039
|
create_info->columns.push_back(columns[i].Copy());
|
|
@@ -166062,6 +166064,8 @@ BoundStatement Binder::Bind(CreateStatement &stmt) {
|
|
|
166062
166064
|
// If there is a foreign key constraint, resolve primary key column's index from primary key column's name
|
|
166063
166065
|
auto &create_info = (CreateTableInfo &)*stmt.info;
|
|
166064
166066
|
auto &catalog = Catalog::GetCatalog(context);
|
|
166067
|
+
// We first check if there are any user types, if yes we check to which custom types they refer.
|
|
166068
|
+
unordered_set<SchemaCatalogEntry *> fk_schemas;
|
|
166065
166069
|
for (idx_t i = 0; i < create_info.constraints.size(); i++) {
|
|
166066
166070
|
auto &cond = create_info.constraints[i];
|
|
166067
166071
|
if (cond->type != ConstraintType::FOREIGN_KEY) {
|
|
@@ -166078,6 +166082,7 @@ BoundStatement Binder::Bind(CreateStatement &stmt) {
|
|
|
166078
166082
|
} else {
|
|
166079
166083
|
// have to resolve referenced table
|
|
166080
166084
|
auto pk_table_entry_ptr = catalog.GetEntry<TableCatalogEntry>(context, fk.info.schema, fk.info.table);
|
|
166085
|
+
fk_schemas.insert(pk_table_entry_ptr->schema);
|
|
166081
166086
|
D_ASSERT(fk.info.pk_keys.empty());
|
|
166082
166087
|
FindMatchingPrimaryKeyColumns(pk_table_entry_ptr->constraints, fk);
|
|
166083
166088
|
for (auto &keyname : fk.pk_columns) {
|
|
@@ -166102,10 +166107,15 @@ BoundStatement Binder::Bind(CreateStatement &stmt) {
|
|
|
166102
166107
|
if (AnyConstraintReferencesGeneratedColumn(create_info)) {
|
|
166103
166108
|
throw BinderException("Constraints on generated columns are not supported yet");
|
|
166104
166109
|
}
|
|
166105
|
-
// We first check if there are any user types, if yes we check to which custom types they refer.
|
|
166106
166110
|
auto bound_info = BindCreateTableInfo(move(stmt.info));
|
|
166107
166111
|
auto root = move(bound_info->query);
|
|
166108
166112
|
|
|
166113
|
+
for (auto &fk_schema : fk_schemas) {
|
|
166114
|
+
if (fk_schema != bound_info->schema) {
|
|
166115
|
+
throw BinderException("Creating foreign keys across different schemas is not supported");
|
|
166116
|
+
}
|
|
166117
|
+
}
|
|
166118
|
+
|
|
166109
166119
|
// create the logical operator
|
|
166110
166120
|
auto &schema = bound_info->schema;
|
|
166111
166121
|
auto create_table = make_unique<LogicalCreateTable>(schema, move(bound_info));
|
package/src/duckdb.hpp
CHANGED
|
@@ -11,8 +11,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
11
11
|
#pragma once
|
|
12
12
|
#define DUCKDB_AMALGAMATION 1
|
|
13
13
|
#define DUCKDB_AMALGAMATION_EXTENDED 1
|
|
14
|
-
#define DUCKDB_SOURCE_ID "
|
|
15
|
-
#define DUCKDB_VERSION "v0.3.5-
|
|
14
|
+
#define DUCKDB_SOURCE_ID "136e5c73b"
|
|
15
|
+
#define DUCKDB_VERSION "v0.3.5-dev1274"
|
|
16
16
|
//===----------------------------------------------------------------------===//
|
|
17
17
|
// DuckDB
|
|
18
18
|
//
|
|
@@ -18351,9 +18351,12 @@ private:
|
|
|
18351
18351
|
|
|
18352
18352
|
class Allocator {
|
|
18353
18353
|
public:
|
|
18354
|
-
Allocator();
|
|
18355
|
-
Allocator(allocate_function_ptr_t allocate_function_p, free_function_ptr_t free_function_p,
|
|
18356
|
-
|
|
18354
|
+
DUCKDB_API Allocator();
|
|
18355
|
+
DUCKDB_API Allocator(allocate_function_ptr_t allocate_function_p, free_function_ptr_t free_function_p,
|
|
18356
|
+
reallocate_function_ptr_t reallocate_function_p,
|
|
18357
|
+
unique_ptr<PrivateAllocatorData> private_data);
|
|
18358
|
+
|
|
18359
|
+
DUCKDB_API Allocator &operator=(Allocator &&allocator) noexcept = default;
|
|
18357
18360
|
|
|
18358
18361
|
data_ptr_t AllocateData(idx_t size);
|
|
18359
18362
|
void FreeData(data_ptr_t pointer, idx_t size);
|