Skip to content

Commit

Permalink
Check the range of row ID in Column<Bool>::unset().
Browse files Browse the repository at this point in the history
  • Loading branch information
s-yata committed Nov 6, 2014
1 parent d23b9a1 commit f3f7cc1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/grnxx/impl/column/scalar/bool.cpp
Expand Up @@ -58,9 +58,11 @@ Int Column<Bool>::find_one(const Datum &datum) const {
}

void Column<Bool>::unset(Int row_id) {
size_t value_id = row_id.value();
values_[value_id] = Bool::na();
// TODO: Update indexes if exist.
Bool value = get(row_id);
if (!value.is_na()) {
values_[row_id.value()] = Bool::na();
// TODO: Update indexes if exist.
}
}

void Column<Bool>::read(ArrayCRef<Record> records,
Expand Down

0 comments on commit f3f7cc1

Please sign in to comment.