Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions be/src/olap/rowset/segment_v2/binary_dict_page.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ Status BinaryDictPageBuilder::add(const uint8_t* vals, size_t* count) {
}

for (int i = 0; i < *count; ++i, ++src) {
if (is_page_full()) {
break;
}
auto iter = _dictionary.find(*src);
if (iter != _dictionary.end()) {
value_code = iter->second;
} else {
if (_dict_builder->is_page_full()) {
break;
}
Slice dict_item(src->data, src->size);
if (src->size > 0) {
char* item_mem = (char*)_pool.allocate(src->size);
Expand Down
2 changes: 1 addition & 1 deletion be/src/olap/rowset/segment_v2/bitshuffle_page.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class BitshufflePageBuilder : public PageBuilder {
DCHECK(!_finished);
if (_remain_element_capacity <= 0) {
*count = 0;
return Status::RuntimeError("page is full.");
return Status::OK();
}
int to_add = std::min<int>(_remain_element_capacity, *count);
int to_add_size = to_add * SIZE_OF_TYPE;
Expand Down
4 changes: 3 additions & 1 deletion be/src/olap/rowset/segment_v2/page_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ class PageBuilder {
// Add a sequence of values to the page.
// The number of values actually added will be returned through count, which may be less
// than requested if the page is full.
//

// check page if full before truly add, return ok when page is full so that column write
// will switch to next page
// vals size should be decided according to the page build type
// TODO make sure vals is naturally-aligned to its type so that impls can use aligned load
// instead of memcpy to copy values.
Expand Down