Skip to content

Commit 624e97f

Browse files
committed
Upgrade to DuckDB 1.3.0
1 parent 21c5d9e commit 624e97f

File tree

7 files changed

+45
-40
lines changed

7 files changed

+45
-40
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ OBJS += $(subst .c,.o, $(C_SRCS))
1313
# set to `make` to disable ninja
1414
DUCKDB_GEN ?= ninja
1515
# used to know what version of extensions to download
16-
DUCKDB_VERSION = v1.2.2
16+
DUCKDB_VERSION = v1.3.0
1717
# duckdb build tweaks
1818
DUCKDB_CMAKE_VARS = -DBUILD_SHELL=0 -DBUILD_PYTHON=0 -DBUILD_UNITTESTS=0
1919
# set to 1 to disable asserts in DuckDB. This is particularly useful in combinition with MotherDuck.

include/pgduckdb/catalog/pgduckdb_catalog.hpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,21 @@ class PostgresCatalog : public duckdb::Catalog {
3030
duckdb::string GetCatalogType() override;
3131
duckdb::optional_ptr<duckdb::CatalogEntry> CreateSchema(duckdb::CatalogTransaction transaction,
3232
duckdb::CreateSchemaInfo &info) override;
33-
duckdb::optional_ptr<duckdb::SchemaCatalogEntry>
34-
GetSchema(duckdb::CatalogTransaction transaction, const duckdb::string &schema_name,
35-
duckdb::OnEntryNotFound if_not_found,
36-
duckdb::QueryErrorContext error_context = duckdb::QueryErrorContext()) override;
33+
duckdb::optional_ptr<duckdb::SchemaCatalogEntry> LookupSchema(duckdb::CatalogTransaction transaction,
34+
const duckdb::EntryLookupInfo &schema_lookup,
35+
const duckdb::OnEntryNotFound if_not_found) override;
3736
void ScanSchemas(duckdb::ClientContext &context,
3837
std::function<void(duckdb::SchemaCatalogEntry &)> callback) override;
39-
duckdb::unique_ptr<duckdb::PhysicalOperator>
40-
PlanCreateTableAs(duckdb::ClientContext &context, duckdb::LogicalCreateTable &op,
41-
duckdb::unique_ptr<duckdb::PhysicalOperator> plan) override;
42-
duckdb::unique_ptr<duckdb::PhysicalOperator> PlanInsert(duckdb::ClientContext &context, duckdb::LogicalInsert &op,
43-
duckdb::unique_ptr<duckdb::PhysicalOperator> plan) override;
44-
duckdb::unique_ptr<duckdb::PhysicalOperator> PlanDelete(duckdb::ClientContext &context, duckdb::LogicalDelete &op,
45-
duckdb::unique_ptr<duckdb::PhysicalOperator> plan) override;
46-
duckdb::unique_ptr<duckdb::PhysicalOperator> PlanUpdate(duckdb::ClientContext &context, duckdb::LogicalUpdate &op,
47-
duckdb::unique_ptr<duckdb::PhysicalOperator> plan) override;
38+
duckdb::PhysicalOperator &PlanCreateTableAs(duckdb::ClientContext &context, duckdb::PhysicalPlanGenerator &planner,
39+
duckdb::LogicalCreateTable &op,
40+
duckdb::PhysicalOperator &plan) override;
41+
duckdb::PhysicalOperator &PlanInsert(duckdb::ClientContext &context, duckdb::PhysicalPlanGenerator &planner,
42+
duckdb::LogicalInsert &op,
43+
duckdb::optional_ptr<duckdb::PhysicalOperator> plan) override;
44+
duckdb::PhysicalOperator &PlanDelete(duckdb::ClientContext &context, duckdb::PhysicalPlanGenerator &planner,
45+
duckdb::LogicalDelete &op, duckdb::PhysicalOperator &plan) override;
46+
duckdb::PhysicalOperator &PlanUpdate(duckdb::ClientContext &context, duckdb::PhysicalPlanGenerator &planner,
47+
duckdb::LogicalUpdate &op, duckdb::PhysicalOperator &plan) override;
4848
duckdb::unique_ptr<duckdb::LogicalOperator>
4949
BindCreateIndex(duckdb::Binder &binder, duckdb::CreateStatement &stmt, duckdb::TableCatalogEntry &table,
5050
duckdb::unique_ptr<duckdb::LogicalOperator> plan) override;

include/pgduckdb/catalog/pgduckdb_schema.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ class PostgresSchema : public duckdb::SchemaCatalogEntry {
3737
duckdb::CreateCollationInfo &info) override;
3838
duckdb::optional_ptr<duckdb::CatalogEntry> CreateType(duckdb::CatalogTransaction transaction,
3939
duckdb::CreateTypeInfo &info) override;
40-
duckdb::optional_ptr<duckdb::CatalogEntry> GetEntry(duckdb::CatalogTransaction transaction,
41-
duckdb::CatalogType type, const duckdb::string &name) override;
40+
duckdb::optional_ptr<duckdb::CatalogEntry> LookupEntry(duckdb::CatalogTransaction transaction,
41+
const duckdb::EntryLookupInfo &lookup_info) override;
4242
void DropEntry(duckdb::ClientContext &context, duckdb::DropInfo &info) override;
4343
void Alter(duckdb::CatalogTransaction transaction, duckdb::AlterInfo &info) override;
4444

src/catalog/pgduckdb_catalog.cpp

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,15 @@ PostgresCatalog::CreateSchema(duckdb::CatalogTransaction, duckdb::CreateSchemaIn
3737
}
3838

3939
duckdb::optional_ptr<duckdb::SchemaCatalogEntry>
40-
PostgresCatalog::GetSchema(duckdb::CatalogTransaction catalog_transaction, const duckdb::string &schema_name,
41-
duckdb::OnEntryNotFound, duckdb::QueryErrorContext) {
40+
PostgresCatalog::LookupSchema(duckdb::CatalogTransaction catalog_transaction,
41+
const duckdb::EntryLookupInfo &schema_lookup, duckdb::OnEntryNotFound) {
4242
auto &pg_transaction = catalog_transaction.transaction->Cast<PostgresTransaction>();
43-
auto res = pg_transaction.GetCatalogEntry(duckdb::CatalogType::SCHEMA_ENTRY, schema_name, "");
43+
const auto catalog_type = schema_lookup.GetCatalogType();
44+
if (catalog_type != duckdb::CatalogType::SCHEMA_ENTRY) {
45+
throw duckdb::NotImplementedException("LookupSchema only supports SCHEMA_ENTRY");
46+
}
47+
48+
auto res = pg_transaction.GetCatalogEntry(catalog_type, schema_lookup.GetEntryName(), "");
4449
D_ASSERT(res);
4550
D_ASSERT(res->type == duckdb::CatalogType::SCHEMA_ENTRY);
4651
return (duckdb::SchemaCatalogEntry *)res.get();
@@ -50,27 +55,27 @@ void
5055
PostgresCatalog::ScanSchemas(duckdb::ClientContext &, std::function<void(duckdb::SchemaCatalogEntry &)>) {
5156
}
5257

53-
duckdb::unique_ptr<duckdb::PhysicalOperator>
54-
PostgresCatalog::PlanCreateTableAs(duckdb::ClientContext &, duckdb::LogicalCreateTable &,
55-
duckdb::unique_ptr<duckdb::PhysicalOperator>) {
58+
duckdb::PhysicalOperator &
59+
PostgresCatalog::PlanCreateTableAs(duckdb::ClientContext &, duckdb::PhysicalPlanGenerator &,
60+
duckdb::LogicalCreateTable &, duckdb::PhysicalOperator &) {
5661
throw duckdb::NotImplementedException("PlanCreateTableAs not supported yet");
5762
}
5863

59-
duckdb::unique_ptr<duckdb::PhysicalOperator>
60-
PostgresCatalog::PlanInsert(duckdb::ClientContext &, duckdb::LogicalInsert &,
61-
duckdb::unique_ptr<duckdb::PhysicalOperator>) {
64+
duckdb::PhysicalOperator &
65+
PostgresCatalog::PlanInsert(duckdb::ClientContext &, duckdb::PhysicalPlanGenerator &, duckdb::LogicalInsert &,
66+
duckdb::optional_ptr<duckdb::PhysicalOperator>) {
6267
throw duckdb::NotImplementedException("PlanInsert not supported yet");
6368
}
6469

65-
duckdb::unique_ptr<duckdb::PhysicalOperator>
66-
PostgresCatalog::PlanDelete(duckdb::ClientContext &, duckdb::LogicalDelete &,
67-
duckdb::unique_ptr<duckdb::PhysicalOperator>) {
70+
duckdb::PhysicalOperator &
71+
PostgresCatalog::PlanDelete(duckdb::ClientContext &, duckdb::PhysicalPlanGenerator &, duckdb::LogicalDelete &,
72+
duckdb::PhysicalOperator &) {
6873
throw duckdb::NotImplementedException("PlanDelete not supported yet");
6974
}
7075

71-
duckdb::unique_ptr<duckdb::PhysicalOperator>
72-
PostgresCatalog::PlanUpdate(duckdb::ClientContext &, duckdb::LogicalUpdate &,
73-
duckdb::unique_ptr<duckdb::PhysicalOperator>) {
76+
duckdb::PhysicalOperator &
77+
PostgresCatalog::PlanUpdate(duckdb::ClientContext &, duckdb::PhysicalPlanGenerator &, duckdb::LogicalUpdate &,
78+
duckdb::PhysicalOperator &) {
7479
throw duckdb::NotImplementedException("PlanUpdate not supported yet");
7580
}
7681

src/catalog/pgduckdb_schema.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ PostgresSchema::CreateType(duckdb::CatalogTransaction, duckdb::CreateTypeInfo &)
7171
}
7272

7373
duckdb::optional_ptr<duckdb::CatalogEntry>
74-
PostgresSchema::GetEntry(duckdb::CatalogTransaction _catalog_transaction, duckdb::CatalogType _type,
75-
const duckdb::string &_entry_name) {
74+
PostgresSchema::LookupEntry(duckdb::CatalogTransaction _catalog_transaction,
75+
const duckdb::EntryLookupInfo &lookup_info) {
7676
auto &pg_transaction = _catalog_transaction.transaction->Cast<PostgresTransaction>();
77-
return pg_transaction.GetCatalogEntry(_type, name, _entry_name);
77+
return pg_transaction.GetCatalogEntry(lookup_info.GetCatalogType(), name, lookup_info.GetEntryName());
7878
}
7979

8080
void

third_party/duckdb

Submodule duckdb updated 1644 files
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
duckdb_extension_load(json)
22
duckdb_extension_load(icu)
3-
duckdb_extension_load(httpfs
4-
GIT_URL https://github.com/duckdb/duckdb-httpfs
5-
GIT_TAG cf3584b48ddabdfb58ef69d2649896da2e466405
6-
INCLUDE_DIR extension/httpfs/include
7-
)
3+
# duckdb_extension_load(httpfs
4+
# GIT_URL https://github.com/duckdb/duckdb-httpfs
5+
# GIT_TAG c22532453e9fab8404f91729708d9f35e23d323d
6+
# INCLUDE_DIR extension/httpfs/include
7+
# )

0 commit comments

Comments
 (0)