mike-tr-adamson commented on code in PR #2540:
URL: https://github.com/apache/cassandra/pull/2540#discussion_r1288550751
##########
src/java/org/apache/cassandra/index/sai/utils/PrimaryKey.java:
##########
@@ -163,19 +159,61 @@ public String toString()
}
}
+ class TokenOnlyPrimaryKey extends AbstractPrimaryKey
+ {
+ private final Token token;
+
+ TokenOnlyPrimaryKey(Token token)
+ {
+ this.token = token;
+ }
+
+ @Override
+ public boolean isTokenOnly()
+ {
+ return true;
+ }
+
+ @Override
+ public Token token()
+ {
+ return token;
+ }
+
+ @Nullable
+ @Override
+ public DecoratedKey partitionKey()
+ {
+ return null;
+ }
+
+ @Nullable
+ @Override
+ public Clustering<?> clustering()
+ {
+ return null;
+ }
Review Comment:
Agreed.
This should also get simplified further in CASSANDRA-18734 because we will
no longer need the `createPartitionKeyOnly` method. This will allow us to
remove the `@Nullable` from the `partitionKey` and `clustering` methods.
--
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]