Skip to content

Commit

Permalink
Update vendored DuckDB sources to f398776
Browse files Browse the repository at this point in the history
  • Loading branch information
duckdblabs-bot committed Oct 24, 2024
1 parent f398776 commit 0cfee1d
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/duckdb/src/execution/physical_plan/plan_get.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ unique_ptr<PhysicalOperator> PhysicalPlanGenerator::CreatePlan(LogicalGet &op) {
vector<unique_ptr<Expression>> 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<BoundConstantExpression>(Value::BIGINT(0)));
} else {
auto type = op.returned_types[column_id];
Expand Down
6 changes: 3 additions & 3 deletions src/duckdb/src/function/table/version/pragma_version.cpp
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}
Expand Down
10 changes: 9 additions & 1 deletion src/duckdb/src/main/extension/extension_install.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,15 @@ static unique_ptr<ExtensionInstallInfo> 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;
}
}
}
}

Expand Down
6 changes: 4 additions & 2 deletions src/duckdb/src/optimizer/cte_filter_pusher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ unique_ptr<LogicalOperator> CTEFilterPusher::Optimize(unique_ptr<LogicalOperator
void CTEFilterPusher::FindCandidates(LogicalOperator &op) {
if (op.type == LogicalOperatorType::LOGICAL_MATERIALIZED_CTE) {
// We encountered a new CTE, add it to the map
cte_info_map.insert(to_string(op.Cast<LogicalMaterializedCTE>().table_index),
make_uniq<MaterializedCTEInfo>(op));
auto key = to_string(op.Cast<LogicalMaterializedCTE>().table_index);
auto value = make_uniq<MaterializedCTEInfo>(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
Expand Down
3 changes: 1 addition & 2 deletions src/duckdb/src/planner/table_binding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 0cfee1d

Please sign in to comment.