4 ms·
Definitely! If the integers are (truncated) hashes, ranges are completely meaningless. But what would a range over strings even represent? Perhaps if you e.g.
by throw-qqqqq 2y ago
Definitely! If the integers are (truncated) hashes, ranges are completely meaningless.
But what would a range over strings even represent?
Perhaps if you e.g. use string indices into an array of sorted strings (by length, by prefix or whatever), you could use it for something. Depends on the application I guess :)
- vlovich123 2y agoRange queries over strings are extremely common. For example, databases like cockroachdb and yuggabytedb use the table name as a prefix which then requires a range query to narrow down queries against a specific table.
- throw-qqqqq 2y agoAh, I misunderstood what you meant by range :) For such prefix queries, I think a radix-tree/Trie or ordered collections are more useful (than the index-based collection I initially mentioned). Thanks for following up :)
- vlovich123 2y agoBut then why bother with any of this at all instead of building a perfect hash function like BoomPHF