This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch dev-1.0.1
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git

commit 68deb04afd8365ca5c3d82cab298788de2302af4
Author: minghong <[email protected]>
AuthorDate: Mon Mar 21 09:51:56 2022 +0800

    [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 c6171e2..d7e7598 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"; }

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to