kinolaev commented on code in PR #16956:
URL: https://github.com/apache/iceberg/pull/16956#discussion_r4710991178
##########
core/src/main/java/org/apache/iceberg/util/BinPacking.java:
##########
@@ -26,12 +26,54 @@
import java.util.List;
import java.util.NoSuchElementException;
import java.util.function.Function;
+import java.util.function.Supplier;
import org.apache.iceberg.relocated.com.google.common.base.Preconditions;
import org.apache.iceberg.relocated.com.google.common.collect.ImmutableList;
import org.apache.iceberg.relocated.com.google.common.collect.Iterables;
import org.apache.iceberg.relocated.com.google.common.collect.Lists;
public class BinPacking {
+
+ /**
+ * Computes the weight an item contributes to a bin, with awareness of the
bin's current contents.
+ * A new instance is created for each bin, allowing stateful deduplication
of shared resources
+ * (e.g. equality delete files that apply to multiple data files in the same
bin).
+ */
+ public interface BinWeighter<T> {
Review Comment:
Done in 37301862bfa7e705ecff6989f977ad464e0e6766.
##########
data/src/test/java/org/apache/iceberg/data/TestGenericReaderDeletes.java:
##########
@@ -36,6 +41,19 @@
public class TestGenericReaderDeletes extends DeleteReadTests {
@TempDir private File tableDir;
+ @Parameter(index = 2)
+ private boolean shareEqDeletes;
+
+ @Parameters(name = "fileFormat = {0}, formatVersion = {1}, shareEqDeletes =
{2}")
+ public static Object[][] parameters() {
+ List<Object[]> parameters = Lists.newArrayList();
+ for (Object[] params : DeleteReadTests.parameters()) {
+ parameters.add(new Object[] {params[0], params[1], false});
+ }
+ parameters.add(new Object[] {FileFormat.PARQUET, 3, true});
Review Comment:
Added in 2aa662ae55f91d8a7adbd24405345c86d6cd8358. Flink needs #19124 to
pass one of the added tests.
--
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]