From 378af7e0c1871b39eaa3e31d44a839d34e60ad51 Mon Sep 17 00:00:00 2001 From: DuckDB Labs GitHub Bot Date: Fri, 18 Oct 2024 00:33:16 +0000 Subject: [PATCH] Update vendored DuckDB sources to 898a81ee --- src/duckdb/src/execution/window_executor.cpp | 6 +++--- src/duckdb/src/function/table/version/pragma_version.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/duckdb/src/execution/window_executor.cpp b/src/duckdb/src/execution/window_executor.cpp index 56397f7a..93774105 100644 --- a/src/duckdb/src/execution/window_executor.cpp +++ b/src/duckdb/src/execution/window_executor.cpp @@ -1671,23 +1671,23 @@ void WindowLeadLagExecutor::EvaluateInternal(WindowExecutorGlobalState &gstate, // else offset is zero, so don't move. if (can_shift) { + const auto target_limit = MinValue(partition_end[i], row_end) - row_idx; if (!delta) { // Copy source[index:index+width] => result[i:] const auto index = NumericCast(val_idx); const auto source_limit = partition_end[i] - index; - const auto target_limit = MinValue(partition_end[i], row_end) - row_idx; const auto width = MinValue(source_limit, target_limit); auto &source = payload_collection.data[0]; VectorOperations::Copy(source, result, index + width, index, i); i += width; row_idx += width; } else if (wexpr.default_expr) { - const auto width = MinValue(delta, count - i); + const auto width = MinValue(delta, target_limit); llstate.leadlag_default.CopyCell(result, i, width); i += width; row_idx += width; } else { - for (idx_t nulls = MinValue(delta, count - i); nulls--; ++i, ++row_idx) { + for (idx_t nulls = MinValue(delta, target_limit); nulls--; ++i, ++row_idx) { FlatVector::SetNull(result, i, true); } } diff --git a/src/duckdb/src/function/table/version/pragma_version.cpp b/src/duckdb/src/function/table/version/pragma_version.cpp index a3b475db..dfd6d9e8 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-dev23" +#define DUCKDB_PATCH_VERSION "3-dev25" #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-dev23" +#define DUCKDB_VERSION "v1.1.3-dev25" #endif #ifndef DUCKDB_SOURCE_ID -#define DUCKDB_SOURCE_ID "1bb332c9c5" +#define DUCKDB_SOURCE_ID "98d4ad28be" #endif #include "duckdb/function/table/system_functions.hpp" #include "duckdb/main/database.hpp"