fix conflicts
diff --git a/src/main/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToEstimateAndErrorBounds.java b/src/main/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToEstimateAndErrorBounds.java
index 7b9891b..cc54265 100644
--- a/src/main/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToEstimateAndErrorBounds.java
+++ b/src/main/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToEstimateAndErrorBounds.java
@@ -43,7 +43,7 @@
@Override
public Tuple exec(final Tuple input) throws IOException {
- if ((input == null) || (input.size() == 0)) {
+ if (input == null || input.size() == 0) {
return null;
}
diff --git a/src/main/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToEstimates.java b/src/main/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToEstimates.java
index f7ff10f..108d35f 100644
--- a/src/main/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToEstimates.java
+++ b/src/main/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToEstimates.java
@@ -43,7 +43,7 @@
@Override
public Tuple exec(final Tuple input) throws IOException {
- if ((input == null) || (input.size() == 0)) {
+ if (input == null || input.size() == 0) {
return null;
}
diff --git a/src/main/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToMeans.java b/src/main/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToMeans.java
index b8abc69..d23547d 100644
--- a/src/main/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToMeans.java
+++ b/src/main/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToMeans.java
@@ -39,7 +39,7 @@
@Override
public Tuple exec(final Tuple input) throws IOException {
- if ((input == null) || (input.size() == 0)) {
+ if (input == null || input.size() == 0) {
return null;
}
diff --git a/src/main/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToNumberOfRetainedEntries.java b/src/main/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToNumberOfRetainedEntries.java
index c93a7eb..2cfa7e4 100644
--- a/src/main/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToNumberOfRetainedEntries.java
+++ b/src/main/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToNumberOfRetainedEntries.java
@@ -40,7 +40,7 @@
@Override
public Integer exec(final Tuple input) throws IOException {
- if ((input == null) || (input.size() == 0)) {
+ if (input == null || input.size() == 0) {
return null;
}
diff --git a/src/main/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToQuantilesSketch.java b/src/main/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToQuantilesSketch.java
index 5615096..6a739b9 100644
--- a/src/main/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToQuantilesSketch.java
+++ b/src/main/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToQuantilesSketch.java
@@ -59,7 +59,7 @@
@Override
public DataByteArray exec(final Tuple input) throws IOException {
- if ((input == null) || (input.size() == 0)) {
+ if (input == null || input.size() == 0) {
return null;
}
@@ -69,7 +69,7 @@
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");
}
diff --git a/src/main/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToVariances.java b/src/main/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToVariances.java
index f514a8a..9112db4 100644
--- a/src/main/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToVariances.java
+++ b/src/main/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToVariances.java
@@ -39,7 +39,7 @@
@Override
public Tuple exec(final Tuple input) throws IOException {
- if ((input == null) || (input.size() == 0)) {
+ if (input == null || input.size() == 0) {
return null;
}
diff --git a/src/main/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchesToPValueEstimates.java b/src/main/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchesToPValueEstimates.java
index 38b735d..e165606 100644
--- a/src/main/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchesToPValueEstimates.java
+++ b/src/main/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchesToPValueEstimates.java
@@ -40,7 +40,7 @@
@Override
public Tuple exec(final Tuple input) throws IOException {
- if ((input == null) || (input.size() != 2)) {
+ if (input == null || input.size() != 2) {
return null;
}
diff --git a/src/main/java/org/apache/datasketches/pig/tuple/DataToArrayOfDoublesSketchBase.java b/src/main/java/org/apache/datasketches/pig/tuple/DataToArrayOfDoublesSketchBase.java
index 56c1468..d01597c 100644
--- a/src/main/java/org/apache/datasketches/pig/tuple/DataToArrayOfDoublesSketchBase.java
+++ b/src/main/java/org/apache/datasketches/pig/tuple/DataToArrayOfDoublesSketchBase.java
@@ -101,7 +101,7 @@
Logger.getLogger(getClass()).info("exec is used");
this.isFirstCall_ = false;
}
- if ((inputTuple == null) || (inputTuple.size() == 0)) {
+ if (inputTuple == null || inputTuple.size() == 0) {
return null;
}
if (inputTuple.size() != 1) {
diff --git a/src/main/java/org/apache/datasketches/pig/tuple/UnionArrayOfDoublesSketchBase.java b/src/main/java/org/apache/datasketches/pig/tuple/UnionArrayOfDoublesSketchBase.java
index ed54294..aa51b95 100644
--- a/src/main/java/org/apache/datasketches/pig/tuple/UnionArrayOfDoublesSketchBase.java
+++ b/src/main/java/org/apache/datasketches/pig/tuple/UnionArrayOfDoublesSketchBase.java
@@ -63,7 +63,7 @@
Logger.getLogger(getClass()).info("exec is used");
this.isFirstCall_ = false;
}
- if ((inputTuple == null) || (inputTuple.size() == 0)) {
+ if (inputTuple == null || inputTuple.size() == 0) {
return null;
}
final DataBag bag = (DataBag) inputTuple.get(0);
@@ -81,7 +81,7 @@
Logger.getLogger(getClass()).info("accumulator is used");
this.isFirstCall_ = false;
}
- if ((inputTuple == null) || (inputTuple.size() != 1)) {
+ if (inputTuple == null || inputTuple.size() != 1) {
return;
}
final DataBag bag = (DataBag) inputTuple.get(0);
@@ -112,7 +112,7 @@
private static void updateUnion(final DataBag bag, final ArrayOfDoublesUnion union)
throws ExecException {
for (final Tuple innerTuple: bag) {
- if ((innerTuple.size() != 1) || (innerTuple.get(0) == null)) {
+ if (innerTuple.size() != 1 || innerTuple.get(0) == null) {
continue;
}
final DataByteArray dba = (DataByteArray) innerTuple.get(0);
diff --git a/src/test/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToEstimateAndErrorBoundsTest.java b/src/test/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToEstimateAndErrorBoundsTest.java
index bb2adfe..1f43b4e 100644
--- a/src/test/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToEstimateAndErrorBoundsTest.java
+++ b/src/test/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToEstimateAndErrorBoundsTest.java
@@ -19,6 +19,8 @@
package org.apache.datasketches.pig.tuple;
+import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketch;
+import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketchBuilder;
import org.apache.pig.EvalFunc;
import org.apache.pig.data.DataByteArray;
import org.apache.pig.data.Tuple;
@@ -26,9 +28,6 @@
import org.junit.Assert;
import org.testng.annotations.Test;
-import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketch;
-import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketchBuilder;
-
@SuppressWarnings("javadoc")
public class ArrayOfDoublesSketchToEstimateAndErrorBoundsTest {
diff --git a/src/test/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToEstimatesTest.java b/src/test/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToEstimatesTest.java
index de1253a..59f3da1 100644
--- a/src/test/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToEstimatesTest.java
+++ b/src/test/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToEstimatesTest.java
@@ -19,15 +19,15 @@
package org.apache.datasketches.pig.tuple;
-import org.testng.annotations.Test;
-import org.testng.Assert;
+import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketch;
+import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketchBuilder;
import org.apache.pig.EvalFunc;
import org.apache.pig.data.DataByteArray;
import org.apache.pig.data.Tuple;
import org.apache.pig.data.TupleFactory;
-import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketch;
-import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketchBuilder;
+import org.testng.Assert;
+import org.testng.annotations.Test;
@SuppressWarnings("javadoc")
public class ArrayOfDoublesSketchToEstimatesTest {
diff --git a/src/test/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToMeansTest.java b/src/test/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToMeansTest.java
index f25ed91..46df842 100644
--- a/src/test/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToMeansTest.java
+++ b/src/test/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToMeansTest.java
@@ -21,6 +21,8 @@
import java.util.Random;
+import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketch;
+import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketchBuilder;
import org.apache.pig.EvalFunc;
import org.apache.pig.data.DataByteArray;
import org.apache.pig.data.Tuple;
@@ -28,9 +30,6 @@
import org.testng.Assert;
import org.testng.annotations.Test;
-import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketch;
-import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketchBuilder;
-
@SuppressWarnings("javadoc")
public class ArrayOfDoublesSketchToMeansTest {
diff --git a/src/test/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToNumberOfRetainedEntriesTest.java b/src/test/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToNumberOfRetainedEntriesTest.java
index f04bf12..4a37d9a 100644
--- a/src/test/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToNumberOfRetainedEntriesTest.java
+++ b/src/test/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToNumberOfRetainedEntriesTest.java
@@ -19,15 +19,14 @@
package org.apache.datasketches.pig.tuple;
+import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketch;
+import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketchBuilder;
import org.apache.pig.EvalFunc;
import org.apache.pig.data.DataByteArray;
import org.apache.pig.data.TupleFactory;
import org.junit.Assert;
import org.testng.annotations.Test;
-import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketch;
-import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketchBuilder;
-
@SuppressWarnings("javadoc")
public class ArrayOfDoublesSketchToNumberOfRetainedEntriesTest {
diff --git a/src/test/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToQuantilesSketchTest.java b/src/test/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToQuantilesSketchTest.java
index f873f28..34bcf0d 100644
--- a/src/test/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToQuantilesSketchTest.java
+++ b/src/test/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToQuantilesSketchTest.java
@@ -21,17 +21,16 @@
import java.util.Arrays;
+import org.apache.datasketches.memory.Memory;
+import org.apache.datasketches.quantiles.DoublesSketch;
+import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketch;
+import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketchBuilder;
import org.apache.pig.EvalFunc;
import org.apache.pig.data.DataByteArray;
import org.apache.pig.data.TupleFactory;
import org.testng.Assert;
import org.testng.annotations.Test;
-import org.apache.datasketches.memory.Memory;
-import org.apache.datasketches.quantiles.DoublesSketch;
-import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketch;
-import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketchBuilder;
-
@SuppressWarnings("javadoc")
public class ArrayOfDoublesSketchToQuantilesSketchTest {
diff --git a/src/test/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToVariancesTest.java b/src/test/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToVariancesTest.java
index c7124e7..4cb1ff4 100644
--- a/src/test/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToVariancesTest.java
+++ b/src/test/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchToVariancesTest.java
@@ -21,6 +21,8 @@
import java.util.Random;
+import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketch;
+import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketchBuilder;
import org.apache.pig.EvalFunc;
import org.apache.pig.data.DataByteArray;
import org.apache.pig.data.Tuple;
@@ -28,9 +30,6 @@
import org.testng.Assert;
import org.testng.annotations.Test;
-import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketch;
-import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketchBuilder;
-
@SuppressWarnings("javadoc")
public class ArrayOfDoublesSketchToVariancesTest {
diff --git a/src/test/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchesToPValueEstimatesTest.java b/src/test/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchesToPValueEstimatesTest.java
index d8d6ba2..ee6a29e 100644
--- a/src/test/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchesToPValueEstimatesTest.java
+++ b/src/test/java/org/apache/datasketches/pig/tuple/ArrayOfDoublesSketchesToPValueEstimatesTest.java
@@ -19,20 +19,19 @@
package org.apache.datasketches.pig.tuple;
-import org.testng.annotations.Test;
-import org.testng.Assert;
+import java.io.IOException;
+import java.util.Random;
+
+import org.apache.commons.math3.stat.inference.TTest;
+import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketch;
+import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketchBuilder;
import org.apache.pig.EvalFunc;
import org.apache.pig.data.DataByteArray;
import org.apache.pig.data.Tuple;
import org.apache.pig.data.TupleFactory;
-import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketch;
-import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketchBuilder;
-
-import org.apache.commons.math3.stat.inference.TTest;
-
-import java.io.IOException;
-import java.util.Random;
+import org.testng.Assert;
+import org.testng.annotations.Test;
/**
* Test p-value estimation of two ArrayOfDoublesSketch.
diff --git a/src/test/java/org/apache/datasketches/pig/tuple/DataToArrayOfDoublesSketchTest.java b/src/test/java/org/apache/datasketches/pig/tuple/DataToArrayOfDoublesSketchTest.java
index b9a2ed0..ad059f9 100644
--- a/src/test/java/org/apache/datasketches/pig/tuple/DataToArrayOfDoublesSketchTest.java
+++ b/src/test/java/org/apache/datasketches/pig/tuple/DataToArrayOfDoublesSketchTest.java
@@ -19,6 +19,11 @@
package org.apache.datasketches.pig.tuple;
+import org.apache.datasketches.memory.Memory;
+import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesSketch;
+import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesSketches;
+import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketch;
+import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketchBuilder;
import org.apache.pig.Accumulator;
import org.apache.pig.EvalFunc;
import org.apache.pig.data.BagFactory;
@@ -29,12 +34,6 @@
import org.testng.Assert;
import org.testng.annotations.Test;
-import org.apache.datasketches.memory.Memory;
-import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesSketch;
-import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesSketches;
-import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketch;
-import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketchBuilder;
-
@SuppressWarnings("javadoc")
public class DataToArrayOfDoublesSketchTest {
diff --git a/src/test/java/org/apache/datasketches/pig/tuple/UnionArrayOfDoublesSketchTest.java b/src/test/java/org/apache/datasketches/pig/tuple/UnionArrayOfDoublesSketchTest.java
index 91b21d0..b1f406b 100644
--- a/src/test/java/org/apache/datasketches/pig/tuple/UnionArrayOfDoublesSketchTest.java
+++ b/src/test/java/org/apache/datasketches/pig/tuple/UnionArrayOfDoublesSketchTest.java
@@ -21,6 +21,11 @@
import java.util.Random;
+import org.apache.datasketches.memory.Memory;
+import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesSketch;
+import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesSketches;
+import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketch;
+import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketchBuilder;
import org.apache.pig.Accumulator;
import org.apache.pig.EvalFunc;
import org.apache.pig.data.BagFactory;
@@ -31,12 +36,6 @@
import org.testng.Assert;
import org.testng.annotations.Test;
-import org.apache.datasketches.memory.Memory;
-import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesSketch;
-import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesSketches;
-import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketch;
-import org.apache.datasketches.tuple.arrayofdoubles.ArrayOfDoublesUpdatableSketchBuilder;
-
@SuppressWarnings("javadoc")
public class UnionArrayOfDoublesSketchTest {