Open aboodman opened 1 year ago
The obvious type to add support for is number
. However, the ordering we use is UTF8 strings. How do we encode an arbitrary number in a way that we preserve the ordering? This paper looks promising: https://www.zanopha.com/docs/elen.pdf
There is also the issue of how to deal with the secondary key in scan
I'm not following. At the basic level we can clearly encode the number however we want and decode it to compare. Is the problem that you're trying to find a way that we can avoid that and compare as a string? That's an interesting problem. It seems similar to the fracdex problem?
scan
we can pass the start key which is a tuple for index scans consisting of the [secondary: string, primary: string]
. If the index is over numbers we would want to pass a number
into secondary
This was just something we overlooked when first implementing. We would have to add some bits to the index value to distinguish types and decide on an ordering.