From 6d5a43f79f747e5739f31816f16e93c4aad52f83 Mon Sep 17 00:00:00 2001 From: lrhodes Date: Thu, 19 Oct 2017 17:15:16 -0700 Subject: [PATCH] Fixed static accessor --- .../pig/tuple/ArrayOfDoublesSketchToQuantilesSketch.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/yahoo/sketches/pig/tuple/ArrayOfDoublesSketchToQuantilesSketch.java b/src/main/java/com/yahoo/sketches/pig/tuple/ArrayOfDoublesSketchToQuantilesSketch.java index 6e8fd02..ea57557 100644 --- a/src/main/java/com/yahoo/sketches/pig/tuple/ArrayOfDoublesSketchToQuantilesSketch.java +++ b/src/main/java/com/yahoo/sketches/pig/tuple/ArrayOfDoublesSketchToQuantilesSketch.java @@ -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); }