Fix typos.
diff --git a/src/main/java/org/apache/datasketches/hive/hll/DataToSketchUDAF.java b/src/main/java/org/apache/datasketches/hive/hll/DataToSketchUDAF.java
index e86aec9..6a4da67 100644
--- a/src/main/java/org/apache/datasketches/hive/hll/DataToSketchUDAF.java
+++ b/src/main/java/org/apache/datasketches/hive/hll/DataToSketchUDAF.java
@@ -50,7 +50,7 @@
+ "> SELECT dataToSketch(val, 12) FROM src;\n"
+ "The return value is a binary blob that can be operated on by other sketch related functions."
+ " The lgK parameter controls the sketch size and rlative error expected from the sketch."
- + " It is optional an must be from 4 to 21. The default is 12, which is expected to yield errors"
+ + " It is optional and must be from 4 to 21. The default is 12, which is expected to yield errors"
+ " of roughly +-3% in the estimation of uniques with 95% confidence."
+ " The target type parameter is optional and must be 'HLL_4', 'HLL_6' or 'HLL_8'."
+ " The default is 'HLL_4'")
@@ -123,7 +123,7 @@
// so the mode_ was null. A solution was implemented to have UnionState, which can work
// in both cases, but SketchState is more space-efficient.
// HLL sketch is about compactness, so let's use SketchState if possible.
- if ((mode_ == Mode.PARTIAL1) || (mode_ == Mode.COMPLETE)) { // iterate() will be used
+ if (mode_ == Mode.PARTIAL1 || mode_ == Mode.COMPLETE) { // iterate() will be used
return new SketchState();
}
return new UnionState();
@@ -141,7 +141,7 @@
public ObjectInspector init(final Mode mode, final ObjectInspector[] parameters) throws HiveException {
super.init(mode, parameters);
mode_ = mode;
- if ((mode == Mode.PARTIAL1) || (mode == Mode.COMPLETE)) {
+ if (mode == Mode.PARTIAL1 || mode == Mode.COMPLETE) {
// input is original data
inputInspector_ = (PrimitiveObjectInspector) parameters[0];
if (parameters.length > 1) {
@@ -155,7 +155,7 @@
intermediateInspector_ = (StructObjectInspector) parameters[0];
}
- if ((mode == Mode.PARTIAL1) || (mode == Mode.PARTIAL2)) {
+ if (mode == Mode.PARTIAL1 || mode == Mode.PARTIAL2) {
// intermediate results need to include the lgK and the target HLL type
return ObjectInspectorFactory.getStandardStructObjectInspector(
Arrays.asList(LG_K_FIELD, HLL_TYPE_FIELD, SKETCH_FIELD),
diff --git a/src/main/java/org/apache/datasketches/hive/hll/SketchToStringUDF.java b/src/main/java/org/apache/datasketches/hive/hll/SketchToStringUDF.java
index 1c9a0f5..580b55d 100644
--- a/src/main/java/org/apache/datasketches/hive/hll/SketchToStringUDF.java
+++ b/src/main/java/org/apache/datasketches/hive/hll/SketchToStringUDF.java
@@ -28,7 +28,7 @@
@Description(
name = "SketchToString",
value = "_FUNC_(sketch)",
- extended = "Returns an human-readable summary of a given HllSketch.")
+ extended = "Returns a human-readable summary of a given HllSketch.")
@SuppressWarnings("javadoc")
public class SketchToStringUDF extends UDF {
diff --git a/src/main/java/org/apache/datasketches/hive/hll/UnionSketchUDAF.java b/src/main/java/org/apache/datasketches/hive/hll/UnionSketchUDAF.java
index 6277a83..7563fc9 100644
--- a/src/main/java/org/apache/datasketches/hive/hll/UnionSketchUDAF.java
+++ b/src/main/java/org/apache/datasketches/hive/hll/UnionSketchUDAF.java
@@ -51,7 +51,7 @@
+ "> SELECT UnionSketch(sketch) FROM src;\n"
+ "The return value is a binary blob that can be operated on by other sketch related functions."
+ " The lgK parameter controls the sketch size and rlative error expected from the sketch."
- + " It is optional an must be from 4 to 21. The default is 12, which is expected to yield errors"
+ + " It is optional and must be from 4 to 21. The default is 12, which is expected to yield errors"
+ " of roughly +-3% in the estimation of uniques with 95% confidence."
+ " The target type parameter is optional and must be 'HLL_4', 'HLL_6' or 'HLL_8'."
+ " The default is 'HLL_4'")
@@ -129,7 +129,7 @@
public ObjectInspector init(final Mode mode, final ObjectInspector[] parameters) throws HiveException {
super.init(mode, parameters);
- if ((mode == Mode.PARTIAL1) || (mode == Mode.COMPLETE)) {
+ if (mode == Mode.PARTIAL1 || mode == Mode.COMPLETE) {
inputInspector_ = (PrimitiveObjectInspector) parameters[0];
if (parameters.length > 1) {
lgKInspector_ = (PrimitiveObjectInspector) parameters[1];
@@ -142,7 +142,7 @@
intermediateInspector_ = (StandardStructObjectInspector) parameters[0];
}
- if ((mode == Mode.PARTIAL1) || (mode == Mode.PARTIAL2)) {
+ if (mode == Mode.PARTIAL1 || mode == Mode.PARTIAL2) {
// intermediate results need to include the lgK and the target HLL type
return ObjectInspectorFactory.getStandardStructObjectInspector(
Arrays.asList(LG_K_FIELD, HLL_TYPE_FIELD, SKETCH_FIELD),