Skip to content

Commit

Permalink
Fixed static accessor
Browse files Browse the repository at this point in the history
  • Loading branch information
lrhodes committed Oct 20, 2017
1 parent 9616322 commit 6d5a43f
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 6d5a43f

Please sign in to comment.