[Bug] Fix the error of inaccurate checking RLE page whether is full (#6934)

Fix #5957
This commit is contained in:
Zhikai Zuo
2021-11-12 10:42:13 +08:00
committed by GitHub
parent 047b83b987
commit 553cf8fa0c

View File

@ -285,10 +285,9 @@ Status ScalarColumnWriter::append_data(const uint8_t** ptr, size_t num_rows) {
size_t num_written = remaining;
RETURN_IF_ERROR(append_data_in_current_page(ptr, &num_written));
bool is_page_full = (num_written < remaining);
remaining -= num_written;
if (is_page_full) {
if (_page_builder->is_page_full()) {
RETURN_IF_ERROR(finish_current_page());
}
}