diff --git a/src/duckdb/src/execution/physical_plan_generator.cpp b/src/duckdb/src/execution/physical_plan_generator.cpp index 74b420a3..30a28ea7 100644 --- a/src/duckdb/src/execution/physical_plan_generator.cpp +++ b/src/duckdb/src/execution/physical_plan_generator.cpp @@ -185,4 +185,11 @@ PhysicalOperator &PhysicalPlanGenerator::CreatePlan(LogicalOperator &op) { throw InternalException("Physical plan generator - no plan generated"); } +ArenaAllocator &PhysicalPlanGenerator::ArenaRef() { + if (!physical_plan) { + physical_plan = make_uniq(Allocator::Get(context)); + } + return physical_plan->ArenaRef(); +} + } // namespace duckdb diff --git a/src/duckdb/src/function/table/version/pragma_version.cpp b/src/duckdb/src/function/table/version/pragma_version.cpp index 5fa377ef..c537c62a 100644 --- a/src/duckdb/src/function/table/version/pragma_version.cpp +++ b/src/duckdb/src/function/table/version/pragma_version.cpp @@ -1,5 +1,5 @@ #ifndef DUCKDB_PATCH_VERSION -#define DUCKDB_PATCH_VERSION "0-dev5308" +#define DUCKDB_PATCH_VERSION "0-dev5310" #endif #ifndef DUCKDB_MINOR_VERSION #define DUCKDB_MINOR_VERSION 5 @@ -8,10 +8,10 @@ #define DUCKDB_MAJOR_VERSION 1 #endif #ifndef DUCKDB_VERSION -#define DUCKDB_VERSION "v1.5.0-dev5308" +#define DUCKDB_VERSION "v1.5.0-dev5310" #endif #ifndef DUCKDB_SOURCE_ID -#define DUCKDB_SOURCE_ID "48bdbbebe4" +#define DUCKDB_SOURCE_ID "5438deaaac" #endif #include "duckdb/function/table/system_functions.hpp" #include "duckdb/main/database.hpp" diff --git a/src/duckdb/src/include/duckdb/execution/physical_plan_generator.hpp b/src/duckdb/src/include/duckdb/execution/physical_plan_generator.hpp index 1a1080e7..7de6cbb0 100644 --- a/src/duckdb/src/include/duckdb/execution/physical_plan_generator.hpp +++ b/src/duckdb/src/include/duckdb/execution/physical_plan_generator.hpp @@ -100,6 +100,10 @@ class PhysicalPlanGenerator { return physical_plan->Make(std::forward(args)...); } + //! Get a reference to the ArenaAllocator of the underlying physical plan. + //! Creates a new (empty) physical plan if none exists yet. + ArenaAllocator &ArenaRef(); + public: PhysicalOperator &ResolveDefaultsProjection(LogicalInsert &op, PhysicalOperator &child);