maedhroz commented on code in PR #2540:
URL: https://github.com/apache/cassandra/pull/2540#discussion_r1284002763


##########
src/java/org/apache/cassandra/index/sai/utils/PrimaryKey.java:
##########
@@ -90,32 +90,27 @@ public PrimaryKey createDeferred(Token token, 
Supplier<PrimaryKey> primaryKeySup
 
         abstract class AbstractPrimaryKey implements PrimaryKey
         {
+            @Override
+            @SuppressWarnings("ConstantConditions")
             public ByteSource asComparableBytes(ByteComparable.Version version)
             {
-                ByteSource tokenComparable = 
token().asComparableBytes(version);
-                if (partitionKey() == null)
-                    return ByteSource.withTerminator(version == 
ByteComparable.Version.LEGACY ? ByteSource.END_OF_STREAM
-                                                                               
               : ByteSource.TERMINATOR,
-                                                     tokenComparable,
-                                                     null,
-                                                     null);

Review Comment:
   So much like the previous version of this patch, we ditch the token, since 
there's just nothing we need to do with it in byte-comparable space. (All we do 
is write entries to the sorted terms structure, etc.) Unlike the previous 
patch, we don't even have to buffer anything, since the trie is gone. Good 
times all around!



-- 
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]

Reply via email to