gianm commented on a change in pull request #11004:
URL: https://github.com/apache/druid/pull/11004#discussion_r597096377
##########
File path:
processing/src/main/java/org/apache/druid/segment/data/VSizeLongSerde.java
##########
@@ -413,9 +412,81 @@ public void close() throws IOException
}
}
+ /**
+ * Unpack bitpacked long values from an underlying contiguous memory block
+ */
public interface LongDeserializer
{
+ /**
+ * Unpack long value at the specified row index
+ */
long get(int index);
+
+ /**
+ * Unpack a contiguous vector of long values at the specified start index
of length and adjust them by the supplied
+ * delta base value.
+ */
+ default void getDelta(long[] out, int outPosition, int startIndex, int
length, long base)
+ {
+ for (int i = 0; i < length; i++) {
+ out[outPosition + i] = base + get(startIndex + i);
+ }
+ }
+
+ /**
+ * Unpack a non-contiguous vector of long values at the specified indexes
and adjust them by the supplied delta base
+ * value.
+ */
+ default int getDelta(long[] out, int outPosition, int[] indexes, int
length, int indexOffset, int limit, long base)
Review comment:
Thanks for running the tests. It seems worth it to keep it this way.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]