michaelsembwever commented on code in PR #4506:
URL: https://github.com/apache/cassandra/pull/4506#discussion_r2616546886


##########
src/java/org/apache/cassandra/cql3/terms/Term.java:
##########
@@ -89,6 +89,23 @@ public int size()
      */
     ByteBuffer bindAndGet(QueryOptions options);
 
+    /**
+     * return true if an optimized bindAndGetByteArray() method can be used 
for this type of Term
+     * to retrieve a value as byte[] instead of default ByteBuffer provided by 
bindAndGet()
+     */
+    default boolean isByteArrayGetSupported(QueryOptions options)
+    {
+        return false;
+    }
+
+    /**
+     * an allocation-optimized version of bindAndGet() method
+     */
+    default byte[] bindAndGetByteArray(QueryOptions options) throws 
InvalidRequestException
+    {
+        throw new UnsupportedOperationException();

Review Comment:
   msg ? (and isn't it more an IllegalStateException  or AssertionError– the 
code is always supposed to guard this with a call first 
toisByteArrayGetSupported(options) …?)



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