You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by ao...@apache.org on 2019/11/19 14:51:39 UTC
[incubator-iceberg] branch master updated: Add back old constructor
to BinPacking (#651)
This is an automated email from the ASF dual-hosted git repository.
aokolnychyi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-iceberg.git
The following commit(s) were added to refs/heads/master by this push:
new fd3f22d Add back old constructor to BinPacking (#651)
fd3f22d is described below
commit fd3f22d54c6f33d5ba0a60dca7ff556d39f3c509
Author: Ryan Blue <rd...@users.noreply.github.com>
AuthorDate: Tue Nov 19 06:51:33 2019 -0800
Add back old constructor to BinPacking (#651)
---
core/src/main/java/org/apache/iceberg/util/BinPacking.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/core/src/main/java/org/apache/iceberg/util/BinPacking.java b/core/src/main/java/org/apache/iceberg/util/BinPacking.java
index daf023b..27d22f2 100644
--- a/core/src/main/java/org/apache/iceberg/util/BinPacking.java
+++ b/core/src/main/java/org/apache/iceberg/util/BinPacking.java
@@ -63,6 +63,11 @@ public class BinPacking {
private final boolean largestBinFirst;
public PackingIterable(Iterable<T> iterable, long targetWeight, int lookback,
+ Function<T, Long> weightFunc) {
+ this(iterable, targetWeight, lookback, weightFunc, false);
+ }
+
+ public PackingIterable(Iterable<T> iterable, long targetWeight, int lookback,
Function<T, Long> weightFunc, boolean largestBinFirst) {
Preconditions.checkArgument(lookback > 0,
"Bin look-back size must be greater than 0: %s", lookback);