[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:
minghong
2022-03-21 09:51:56 +08:00
committed by GitHub
parent dde50fb2bf
commit c772020db4

View File

@ -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"; }