From c772020db4edb14323011deaaa4e083d3b732f71 Mon Sep 17 00:00:00 2001 From: minghong Date: Mon, 21 Mar 2022 09:51:56 +0800 Subject: [PATCH] [fix] fix bug in WindowFunctionLastData::data, it keeps the first data not the last. (#8536) WindowFunctionLastData::add should keep the last value, but current implementation keeps the first one. Obviously, this code is copied from WindowFunctionFirstData::add. --- be/src/vec/aggregate_functions/aggregate_function_window.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/be/src/vec/aggregate_functions/aggregate_function_window.h b/be/src/vec/aggregate_functions/aggregate_function_window.h index c6171e2d6f..d7e75981d0 100644 --- a/be/src/vec/aggregate_functions/aggregate_function_window.h +++ b/be/src/vec/aggregate_functions/aggregate_function_window.h @@ -358,9 +358,6 @@ struct WindowFunctionLastData : Data { this->set_value(columns, frame_end - 1); } void add(int64_t row, const IColumn** columns) { - if (this->has_set_value()) { - return; - } this->set_value(columns, row); } static const char* name() { return "last_value"; }