Skip to content
Permalink
Browse files
Fixed static accessor
  • Loading branch information
leerho committed Oct 20, 2017
1 parent 9616322 commit 6d5a43f79f747e5739f31816f16e93c4aad52f83
Showing 1 changed file with 3 additions and 2 deletions.
@@ -12,6 +12,7 @@
import org.apache.pig.data.Tuple;

import com.yahoo.memory.Memory;
import com.yahoo.sketches.quantiles.DoublesSketch;
import com.yahoo.sketches.quantiles.DoublesSketchBuilder;
import com.yahoo.sketches.quantiles.UpdateDoublesSketch;
import com.yahoo.sketches.tuple.ArrayOfDoublesSketch;
@@ -55,13 +56,13 @@ public DataByteArray exec(final Tuple input) throws IOException {
int column = 1;
if (input.size() > 1) {
column = (int) input.get(1);
if (column < 1 || column > sketch.getNumValues()) {
if ((column < 1) || (column > sketch.getNumValues())) {
throw new IllegalArgumentException("Column number out of range. The given sketch has "
+ sketch.getNumValues() + " columns");
}
}

final DoublesSketchBuilder builder = UpdateDoublesSketch.builder();
final DoublesSketchBuilder builder = DoublesSketch.builder();
if (k > 0) {
builder.setK(k);
}

0 comments on commit 6d5a43f

Please sign in to comment.