diff --git a/src/duckdb/src/execution/physical_plan/plan_get.cpp b/src/duckdb/src/execution/physical_plan/plan_get.cpp index 056d291f..2f4c65d3 100644 --- a/src/duckdb/src/execution/physical_plan/plan_get.cpp +++ b/src/duckdb/src/execution/physical_plan/plan_get.cpp @@ -159,7 +159,7 @@ unique_ptr PhysicalPlanGenerator::CreatePlan(LogicalGet &op) { vector> expressions; for (auto &column_id : column_ids) { if (column_id == COLUMN_IDENTIFIER_ROW_ID) { - types.emplace_back(LogicalType::BIGINT); + types.emplace_back(LogicalType::ROW_TYPE); expressions.push_back(make_uniq(Value::BIGINT(0))); } else { auto type = op.returned_types[column_id]; diff --git a/src/duckdb/src/function/table/version/pragma_version.cpp b/src/duckdb/src/function/table/version/pragma_version.cpp index a04aec22..a9128fd3 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 "3-dev42" +#define DUCKDB_PATCH_VERSION "3-dev56" #endif #ifndef DUCKDB_MINOR_VERSION #define DUCKDB_MINOR_VERSION 1 @@ -8,10 +8,10 @@ #define DUCKDB_MAJOR_VERSION 1 #endif #ifndef DUCKDB_VERSION -#define DUCKDB_VERSION "v1.1.3-dev42" +#define DUCKDB_VERSION "v1.1.3-dev56" #endif #ifndef DUCKDB_SOURCE_ID -#define DUCKDB_SOURCE_ID "10c42435f1" +#define DUCKDB_SOURCE_ID "39f9863ef8" #endif #include "duckdb/function/table/system_functions.hpp" #include "duckdb/main/database.hpp" diff --git a/src/duckdb/src/include/duckdb/common/insertion_order_preserving_map.hpp b/src/duckdb/src/include/duckdb/common/insertion_order_preserving_map.hpp index 2f612631..d1ff0867 100644 --- a/src/duckdb/src/include/duckdb/common/insertion_order_preserving_map.hpp +++ b/src/duckdb/src/include/duckdb/common/insertion_order_preserving_map.hpp @@ -95,13 +95,13 @@ class InsertionOrderPreservingMap { map.resize(nz); } - void insert(const string &key, V &value) { // NOLINT: match stl API - map.push_back(make_pair(key, std::move(value))); + void insert(const string &key, V &&value) { // NOLINT: match stl API + map.emplace_back(key, std::move(value)); map_idx[key] = map.size() - 1; } - void insert(const string &key, V &&value) { // NOLINT: match stl API - map.push_back(make_pair(key, std::move(value))); + void insert(const string &key, const V &value) { // NOLINT: match stl API + map.emplace_back(key, value); map_idx[key] = map.size() - 1; } @@ -133,7 +133,7 @@ class InsertionOrderPreservingMap { V &operator[](const string &key) { if (!contains(key)) { auto v = V(); - insert(key, v); + insert(key, std::move(v)); } return map[map_idx[key]].second; } diff --git a/src/duckdb/src/main/extension/extension_install.cpp b/src/duckdb/src/main/extension/extension_install.cpp index b0ca9fb7..1258d95e 100644 --- a/src/duckdb/src/main/extension/extension_install.cpp +++ b/src/duckdb/src/main/extension/extension_install.cpp @@ -358,7 +358,15 @@ static unique_ptr InstallFromHttpUrl(DatabaseInstance &db, { auto fs = FileSystem::CreateLocal(); if (fs->FileExists(local_extension_path + ".info")) { - install_info = ExtensionInstallInfo::TryReadInfoFile(*fs, local_extension_path + ".info", extension_name); + try { + install_info = + ExtensionInstallInfo::TryReadInfoFile(*fs, local_extension_path + ".info", extension_name); + } catch (...) { + if (!options.force_install) { + // We are going to rewrite the file anyhow, so this is fine + throw; + } + } } } diff --git a/src/duckdb/src/optimizer/cte_filter_pusher.cpp b/src/duckdb/src/optimizer/cte_filter_pusher.cpp index 01063caa..b930cae0 100644 --- a/src/duckdb/src/optimizer/cte_filter_pusher.cpp +++ b/src/duckdb/src/optimizer/cte_filter_pusher.cpp @@ -39,8 +39,10 @@ unique_ptr CTEFilterPusher::Optimize(unique_ptr().table_index), - make_uniq(op)); + auto key = to_string(op.Cast().table_index); + auto value = make_uniq(op); + + cte_info_map.insert(key, std::move(value)); } else if (op.type == LogicalOperatorType::LOGICAL_FILTER && op.children[0]->type == LogicalOperatorType::LOGICAL_CTE_REF) { // We encountered a filtered CTE ref, update the according CTE info diff --git a/src/duckdb/src/planner/table_binding.cpp b/src/duckdb/src/planner/table_binding.cpp index dff3de59..7b9e65bc 100644 --- a/src/duckdb/src/planner/table_binding.cpp +++ b/src/duckdb/src/planner/table_binding.cpp @@ -202,8 +202,7 @@ BindResult TableBinding::Bind(ColumnRefExpression &colref, idx_t depth) { // fetch the type of the column LogicalType col_type; if (column_index == COLUMN_IDENTIFIER_ROW_ID) { - // row id: BIGINT type - col_type = LogicalType::BIGINT; + col_type = LogicalType::ROW_TYPE; } else { // normal column: fetch type from base column col_type = types[column_index];