From 12c4a24fd9a8c616fde824a6efcc5add5beeddfe Mon Sep 17 00:00:00 2001 From: DuckDB Labs GitHub Bot Date: Sun, 20 Oct 2024 00:36:48 +0000 Subject: [PATCH] Update vendored DuckDB sources to 5e6d0f71 --- src/duckdb/src/execution/perfect_aggregate_hashtable.cpp | 7 ++++++- src/duckdb/src/function/table/version/pragma_version.cpp | 6 +++--- src/duckdb/src/planner/expression_binder.cpp | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/duckdb/src/execution/perfect_aggregate_hashtable.cpp b/src/duckdb/src/execution/perfect_aggregate_hashtable.cpp index 4fa6f08f..c378e61e 100644 --- a/src/duckdb/src/execution/perfect_aggregate_hashtable.cpp +++ b/src/duckdb/src/execution/perfect_aggregate_hashtable.cpp @@ -130,7 +130,12 @@ void PerfectAggregateHashTable::AddChunk(DataChunk &groups, DataChunk &payload) // compute the actual pointer to the data by adding it to the base HT pointer and multiplying by the tuple size for (idx_t i = 0; i < groups.size(); i++) { const auto group = address_data[i]; - D_ASSERT(group < total_groups); + if (group >= total_groups) { + throw InvalidInputException("Perfect hash aggregate: aggregate group %llu exceeded total groups %llu. This " + "likely means that the statistics in your data source are corrupt.\n* PRAGMA " + "disable_optimizer to disable optimizations that rely on correct statistics", + group, total_groups); + } group_is_set[group] = true; address_data[i] = uintptr_t(data) + group * tuple_size; } diff --git a/src/duckdb/src/function/table/version/pragma_version.cpp b/src/duckdb/src/function/table/version/pragma_version.cpp index 308e7aac..fb75309a 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-dev31" +#define DUCKDB_PATCH_VERSION "3-dev35" #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-dev31" +#define DUCKDB_VERSION "v1.1.3-dev35" #endif #ifndef DUCKDB_SOURCE_ID -#define DUCKDB_SOURCE_ID "aed52f5cab" +#define DUCKDB_SOURCE_ID "0446ab42e9" #endif #include "duckdb/function/table/system_functions.hpp" #include "duckdb/main/database.hpp" diff --git a/src/duckdb/src/planner/expression_binder.cpp b/src/duckdb/src/planner/expression_binder.cpp index 146f1790..7d36654e 100644 --- a/src/duckdb/src/planner/expression_binder.cpp +++ b/src/duckdb/src/planner/expression_binder.cpp @@ -169,7 +169,7 @@ static bool CombineMissingColumns(ErrorData ¤t, ErrorData new_error) { // get query location QueryErrorContext context; current_entry = current_info.find("position"); - new_entry = current_info.find("position"); + new_entry = new_info.find("position"); uint64_t position; if (current_entry != current_info.end() && TryCast::Operation(current_entry->second, position)) {