belliottsmith commented on code in PR #1951:
URL: https://github.com/apache/cassandra/pull/1951#discussion_r1014221721


##########
src/java/org/apache/cassandra/db/marshal/ValueAccessor.java:
##########
@@ -315,6 +315,24 @@ default boolean getBoolean(V value, int offset)
     long toLong(V value);
     /** returns a long from offset {@param offset} */
     long getLong(V value, int offset);
+
+    default long getUpTo8Bytes(V value, int offset, int count)

Review Comment:
   Should not be there, sorry 



##########
src/java/org/apache/cassandra/db/marshal/ValueAccessor.java:
##########
@@ -315,6 +315,24 @@ default boolean getBoolean(V value, int offset)
     long toLong(V value);
     /** returns a long from offset {@param offset} */
     long getLong(V value, int offset);
+
+    default long getUpTo8Bytes(V value, int offset, int count)
+    {
+        switch (count)
+        {
+            default: throw new IllegalArgumentException();
+            case 0: return 0;
+            case 1: return getByte(value, offset);
+            case 2: return getShort(value, offset);
+            case 3: return (getShort(value, offset) << 8) | getByte(value, 
offset + 2);
+            case 4: return getInt(value, offset);
+            case 5: return ((long)getInt(value, offset) << 8) | getByte(value, 
offset + 4);
+            case 6: return ((long)getInt(value, offset) << 16) | 
getShort(value, offset + 4);
+            case 7: return ((long)getInt(value, offset) << 24) | 
(getShort(value, offset + 4) << 8) | getByte(value, offset + 5);

Review Comment:
   Should not be there, sorry 



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