[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.
This commit is contained in:
@ -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"; }
|
||||
|
||||
Reference in New Issue
Block a user