rdblue commented on code in PR #19007:
URL: https://github.com/apache/iceberg/pull/19007#discussion_r4603751926
##########
core/src/main/java/org/apache/iceberg/mumbling/MutableBitmap.java:
##########
@@ -19,12 +19,38 @@
package org.apache.iceberg.mumbling;
import org.apache.iceberg.ManifestBitmap;
+import org.apache.iceberg.util.ArrayUtil;
/** Mutation methods for ManifestBitmap. */
public interface MutableBitmap extends ManifestBitmap {
/** Set the bit at {@code position}. */
boolean set(int position);
+ /**
+ * Set multiple {@code positions} in the bitmap.
+ *
+ * @param positions positions to set in the bitmap
+ * @return true if any position was set, false otherwise
+ */
+ default boolean setAll(int... positions) {
Review Comment:
We typically add these convenience methods to interfaces. They are very low
maintenance and are useful to avoid writing things like
`setAll(ImmutableList.of(1, 2, 3))`. It also gives us a way to accept `int[]`.
Instead of forcing the caller to build a collection, it is better to put that
work in the interface.
--
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]