ROART icon indicating copy to clipboard operation
ROART copied to clipboard

Range query correctness

Open skyelves opened this issue 4 years ago • 0 comments

https://github.com/madsys-dev/ROART/blob/c313e0f375d55ea850c0c497e7d104009a327fa3/ART/Key.h#L25

fkey can not work on the machine using little-endian. Although insert and search can work well on both machines with big-endian or little-endian, the range query can only report the correct results on machines with big-endian.

For example, if I want to scan(0x1, 0x100), on a little-endian machine, fkey[0] of key 0x1 equals to 1 while fkey[0] of key 0x100 equals to 0. Therefore, key_key_lt returns false.

To fix this bug, defining a MACRO to get the fkey from the key works.

skyelves avatar Jan 09 '22 06:01 skyelves