Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
Docs Required, Release Notes Required
Description
Motivation:
InternalTable has two operations that requires to check a stored value with a provided one. The operations are deleteExact and replace (the variant with an old value).
Currently, we are checking equality just after extract a binary row from storage according to the method:
private boolean equalValues(@NotNull BinaryRow row, @NotNull BinaryRow row2) { if (row.hasValue() ^ row2.hasValue()) { return false; } return row.valueSlice().compareTo(row2.valueSlice()) == 0; }
This approach does not work even for really same rows, because there are different implementation of BinaryRow here. Moreover, there is no bother about different schemas of the rows.
Definition of Done:
1) Necessary, ensure that the schema of requested row is greater or equals with the schema of row got from a storage.
2) Then upgrade the row from storage, in order to both rows become in the same versions (the same implementation for both rows is also here - row with schema).
3) Only after these two steps we ready to compare the rows withing the method above.