mike-tr-adamson commented on code in PR #2989:
URL: https://github.com/apache/cassandra/pull/2989#discussion_r1431274105
##########
test/unit/org/apache/cassandra/index/sai/disk/v1/InvertedIndexSearcherTest.java:
##########
@@ -220,6 +220,8 @@ private List<Pair<ByteComparable, LongArrayList>>
buildTermsEnum(int terms, int
private ByteBuffer wrap(ByteComparable bc)
{
- return
ByteBuffer.wrap(ByteSourceInverse.readBytes(bc.asComparableBytes(ByteComparable.Version.OSS50)));
+// return
ByteBuffer.wrap(ByteSourceInverse.readBytes(bc.asComparableBytes(ByteComparable.Version.OSS50)));
+
+ return
ByteBuffer.wrap(ByteSourceInverse.readBytes(ByteSourceInverse.unescape(ByteSource.peekable(bc.asComparableBytes(ByteComparable.Version.OSS50)))));
Review Comment:
The main reason is (as I understand it) is that the `Trie` does not know the
difference between a BC terminated with a `0` (escape character) and a BC
ending in a `0`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]