You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by le...@apache.org on 2021/01/09 18:37:42 UTC
[datasketches-hive] branch master updated: A few fixes related to
move to TLP.
This is an automated email from the ASF dual-hosted git repository.
leerho pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/datasketches-hive.git
The following commit(s) were added to refs/heads/master by this push:
new 9b33dda A few fixes related to move to TLP.
9b33dda is described below
commit 9b33dda46b61a4da36de3d7347e44e6774909dde
Author: Lee Rhodes <le...@users.noreply.github.com>
AuthorDate: Sat Jan 9 10:36:36 2021 -0800
A few fixes related to move to TLP.
---
.asf.yaml | 15 ---
DISCLAIMER-WIP | 26 ----
NOTICE | 2 +-
README.md | 11 +-
pom.xml | 133 +++++++++++----------
.../hive/cpc/GetEstimateAndErrorBoundsUDFTest.java | 9 +-
.../datasketches/hive/cpc/GetEstimateUDFTest.java | 5 +-
.../hll/SketchToEstimateAndErrorBoundsUDFTest.java | 9 +-
.../hive/hll/SketchToEstimateUDFTest.java | 5 +-
.../datasketches/hive/kll/GetCdfUDFTest.java | 13 +-
.../datasketches/hive/kll/GetPmfUDFTest.java | 13 +-
.../datasketches/hive/kll/GetQuantileUDFTest.java | 5 +-
.../datasketches/hive/kll/GetQuantilesUDFTest.java | 9 +-
.../datasketches/hive/kll/GetRankUDFTest.java | 5 +-
.../quantiles/GetCdfFromDoublesSketchUDFTest.java | 15 ++-
.../quantiles/GetCdfFromStringsSketchUDFTest.java | 20 ++--
.../quantiles/GetPmfFromDoublesSketchUDFTest.java | 15 ++-
.../quantiles/GetPmfFromStringsSketchUDFTest.java | 18 ++-
.../GetQuantileFromDoublesSektchUDFTest.java | 7 +-
.../GetQuantilesFromDoublesSketchUDFTest.java | 19 ++-
.../hive/theta/EstimateSketchUDFTest.java | 8 +-
...ublesSketchToEstimateAndErrorBoundsUDFTest.java | 17 ++-
.../ArrayOfDoublesSketchToEstimatesUDFTest.java | 13 +-
.../tuple/ArrayOfDoublesSketchToMeansUDFTest.java | 7 +-
.../ArrayOfDoublesSketchToVariancesUDFTest.java | 7 +-
.../DoubleSummarySketchToEstimatesUDFTest.java | 8 +-
.../DoubleSummarySketchToPercentileUDFTest.java | 2 +-
27 files changed, 176 insertions(+), 240 deletions(-)
diff --git a/.asf.yaml b/.asf.yaml
index ea5ead8..15e33a5 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -1,17 +1,2 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
github:
homepage: https://datasketches.apache.org
\ No newline at end of file
diff --git a/DISCLAIMER-WIP b/DISCLAIMER-WIP
deleted file mode 100644
index ae9f942..0000000
--- a/DISCLAIMER-WIP
+++ /dev/null
@@ -1,26 +0,0 @@
-Apache DataSketches (incubating) is an effort undergoing incubation
-at The Apache Software Foundation (ASF), sponsored by the Apache Incubator.
-
-Incubation is required of all newly accepted projects until a further review
-indicates that the infrastructure, communications, and decision making process
-have stabilized in a manner consistent with other successful ASF projects.
-
-While incubation status is not necessarily a reflection of the
-completeness or stability of the code, it does indicate that the
-project has yet to be fully endorsed by the ASF.
-
-Some of the incubating project's releases may not be fully compliant
-with ASF policy. For example, releases may have incomplete or
-un-reviewed licensing conditions. What follows is a list of known
-issues the project is currently aware of (note that this list, by
-definition, is likely to be incomplete):
-
- * No issues are known at this time.
-
-If you are planning to incorporate this work into your
-product or project, please be aware that you will need to conduct a
-thorough licensing review to determine the overall implications of
-including this work. For the current status of this project through the Apache
-Incubator visit:
-
-http://incubator.apache.org/projects/datasketches.html
diff --git a/NOTICE b/NOTICE
index e39c0b2..12da6f9 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Apache DataSketches Hive (incubating)
+Apache DataSketches Hive
Copyright 2020 The Apache Software Foundation
Copyright 2015-2018 Yahoo
diff --git a/README.md b/README.md
index 6a21f8b..37510cc 100644
--- a/README.md
+++ b/README.md
@@ -17,11 +17,11 @@
under the License.
-->
-[![Build Status](https://travis-ci.org/apache/incubator-datasketches-hive.svg?branch=master)](https://travis-ci.org/apache/incubator-datasketches-hive)
+[![Build Status](https://travis-ci.org/apache/datasketches-hive.svg?branch=master)](https://travis-ci.org/apache/datasketches-hive)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.datasketches/datasketches-hive/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.apache.datasketches/datasketches-hive)
-[![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/apache/incubator-datasketches-hive.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/incubator-datasketches-hive/context:java)
-[![Total alerts](https://img.shields.io/lgtm/alerts/g/apache/incubator-datasketches-hive.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/incubator-datasketches-hive/alerts/)
-[![Coverage Status](https://coveralls.io/repos/github/apache/incubator-datasketches-hive/badge.svg?branch=master&service=github)](https://coveralls.io/github/apache/incubator-datasketches-hive?branch=master)
+[![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/apache/datasketches-hive.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/datasketches-hive/context:java)
+[![Total alerts](https://img.shields.io/lgtm/alerts/g/apache/datasketches-hive.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/datasketches-hive/alerts/)
+[![Coverage Status](https://coveralls.io/repos/github/apache/datasketches-hive/badge.svg?branch=master&service=github)](https://coveralls.io/github/apache/datasketches-hive?branch=master)
=================
@@ -80,6 +80,3 @@ This has the following top-level dependencies:
#### Testing
See the pom.xml file for test dependencies.
-----
-
-Disclaimer: Apache DataSketches is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate [...]
diff --git a/pom.xml b/pom.xml
index a2a3570..2ca8c7d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
+
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -17,55 +18,30 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
+
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
- <version>21</version>
+ <version>23</version>
</parent>
+
<groupId>org.apache.datasketches</groupId>
-
+
<!-- UNIQUE FOR THIS JAVA COMPONENT -->
<artifactId>datasketches-hive</artifactId>
- <version>1.2.0-incubating-SNAPSHOT</version>
+ <version>1.2.0-SNAPSHOT</version>
<description>Apache Hive adaptors for the DataSketches library.</description>
<!-- END: UNIQUE FOR THIS JAVA COMPONENT -->
-
+
<url>https://datasketches.apache.org/</url>
<name>${project.artifactId}</name>
<inceptionYear>2015</inceptionYear>
- <packaging>jar</packaging>
- <!-- jar is the default -->
- <!-- With the 3.6.1 version of Maven this causes a warning to obsolete this in
- favor of using the enforcer plugin (which we do). But removing this
- causes the command "mvn versions:display-plugin-updates" to issue an error
- and not work properly. So this will stay for the time being.
- -->
- <prerequisites>
- <maven>3.2.0</maven>
- </prerequisites>
- <licenses>
- <license>
- <name>Apache License, Version 2.0</name>
- <url>https://www.apache.org/licenses/LICENSE-2.0</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
- <scm>
- <connection>scm:git:ssh://git@github.com/apache/incubator-${project.artifactId}.git</connection>
- <developerConnection>scm:git:ssh://git@github.com/apache/incubator-${project.artifactId}.git</developerConnection>
- <url>https://github.com/apache/incubator-${project.artifactId}</url>
- <tag>HEAD</tag>
- </scm>
- <issueManagement>
- <!-- <system>jira</system>
- <url>https://issues.apache.org/jira/browse/DATASKETCHES</url> -->
- <system>GitHub</system>
- <url>https://github.com/apache/incubator-${project.artifactId}/issues</url>
- </issueManagement>
+ <packaging>jar</packaging> <!-- jar is the default -->
+
<mailingLists>
<mailingList>
<name>DataSketches Developers</name>
@@ -82,6 +58,21 @@ under the License.
<post>mailto:sketches-user@googlegroups.com</post>
</mailingList>
</mailingLists>
+
+ <scm>
+ <connection>scm:git:ssh://git@github.com/apache/${project.artifactId}.git</connection>
+ <developerConnection>scm:git:ssh://git@github.com/apache/${project.artifactId}.git</developerConnection>
+ <url>https://github.com/apache/${project.artifactId}</url>
+ <tag>HEAD</tag>
+ </scm>
+
+ <issueManagement>
+ <!-- <system>jira</system>
+ <url>https://issues.apache.org/jira/browse/DATASKETCHES</url> -->
+ <system>GitHub</system>
+ <url>https://github.com/apache/${project.artifactId}/issues</url>
+ </issueManagement>
+
<developers>
<developer>
<name>The Apache DataSketches Team</name>
@@ -91,50 +82,54 @@ under the License.
<organizationUrl>http://www.apache.org</organizationUrl>
</developer>
</developers>
+
<properties>
-
<!-- UNIQUE FOR THIS JAVA COMPONENT -->
<datasketches-java.version>1.3.0-incubating</datasketches-java.version>
<hive-exec.version>2.3.4</hive-exec.version>
<hadoop-common.version>2.8.5</hadoop-common.version>
- <slf4j-simple.version>1.7.27</slf4j-simple.version>
+ <slf4j-simple.version>1.7.30</slf4j-simple.version>
<!-- END:UNIQUE FOR THIS JAVA COMPONENT -->
-
+
<!-- Test -->
- <testng.version>6.14.3</testng.version>
+ <testng.version>7.1.0</testng.version>
+
<!-- System-wide properties -->
+ <maven.version>3.0.0</maven.version>
+ <java.version>1.8</java.version>
+ <maven.compiler.source>${java.version}</maven.compiler.source>
+ <maven.compiler.target>${java.version}</maven.compiler.target>
<argLine>-Xmx4g -Duser.language=en -Duser.country=US -Dfile.encoding=UTF-8</argLine>
<charset.encoding>UTF-8</charset.encoding>
<project.build.sourceEncoding>${charset.encoding}</project.build.sourceEncoding>
<project.build.resourceEncoding>${charset.encoding}</project.build.resourceEncoding>
<project.reporting.outputEncoding>${charset.encoding}</project.reporting.outputEncoding>
- <java.version>1.8</java.version>
- <maven.compiler.source>${java.version}</maven.compiler.source>
- <maven.compiler.target>${java.version}</maven.compiler.target>
+
<!-- org.codehaus.plexus used for strict profile testing-->
- <plexus-compiler-javac-errorprone.version>2.8.5</plexus-compiler-javac-errorprone.version>
+ <plexus-compiler-javac-errorprone.version>2.8.8</plexus-compiler-javac-errorprone.version>
<!-- Maven Plugins -->
- <maven-assembly-plugin.version>3.1.1</maven-assembly-plugin.version>
- <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
- <maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version>
- <maven-enforcer-plugin.version>3.0.0-M2</maven-enforcer-plugin.version>
- <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
- <maven-jar-plugin.version>3.1.2</maven-jar-plugin.version>
- <maven-javadoc-plugin.version>3.1.1</maven-javadoc-plugin.version>
- <maven-release-plugin.version>2.5.3</maven-release-plugin.version>
- <maven-remote-resources-plugin.version>[1.0,)</maven-remote-resources-plugin.version>
- <maven-source-plugin.version>3.1.0</maven-source-plugin.version>
- <maven-surefire-plugin.version>3.0.0-M3</maven-surefire-plugin.version>
+ <maven-assembly-plugin.version>3.3.0</maven-assembly-plugin.version> <!-- overrides parent -->
+ <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version> <!-- overrides parent -->
+ <maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version> <!-- overrides parent -->
+ <maven-enforcer-plugin.version>3.0.0-M2</maven-enforcer-plugin.version> <!-- overrides parent -->
+ <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version> <!-- overrides parent -->
+ <maven-jar-plugin.version>3.2.0</maven-jar-plugin.version> <!-- overrides parent -->
+ <maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version> <!-- overrides parent -->
+ <maven-release-plugin.version>3.0.0-M1</maven-release-plugin.version> <!-- overrides parent -->
+ <maven-remote-resources-plugin.version>[1.7.0,)</maven-remote-resources-plugin.version> <!-- overrides parent -->
+ <maven-source-plugin.version>3.2.1</maven-source-plugin.version> <!-- overrides parent -->
+ <maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version> <!-- overrides parent -->
<!-- Apache Plugins -->
- <apache-rat-plugin.version>0.13</apache-rat-plugin.version>
+ <apache-rat-plugin.version>0.13</apache-rat-plugin.version> <!-- overrides parent -->
<!-- org.jacoco Maven Plugins -->
- <jacoco-maven-plugin.version>0.8.4</jacoco-maven-plugin.version>
+ <jacoco-maven-plugin.version>0.8.6</jacoco-maven-plugin.version>
<!-- org.eluder Maven Plugins -->
<coveralls-maven-plugin.version>4.3.0</coveralls-maven-plugin.version>
<!-- other -->
<lifecycle-mapping.version>1.0.0</lifecycle-mapping.version>
<git-commit-id-plugin.version>3.0.0</git-commit-id-plugin.version>
</properties>
+
<repositories>
<repository>
<id>apache.snapshots</id>
@@ -159,8 +154,8 @@ under the License.
</snapshots>
</repository>
</repositories>
+
<dependencies>
-
<!-- UNIQUE FOR THIS JAVA COMPONENT -->
<dependency>
<groupId>org.apache.datasketches</groupId>
@@ -198,10 +193,10 @@ under the License.
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
- <version>1.7.27</version>
+ <version>${slf4j-simple.version}</version>
</dependency>
<!-- END: UNIQUE FOR THIS JAVA COMPONENT -->
-
+
<!-- Test Scope -->
<dependency>
<groupId>org.testng</groupId>
@@ -210,6 +205,7 @@ under the License.
<scope>test</scope>
</dependency>
</dependencies>
+
<build>
<pluginManagement>
<plugins>
@@ -280,10 +276,10 @@ under the License.
<configuration>
<rules>
<requireJavaVersion>
- <version>1.8.0</version>
+ <version>${java.version}</version>
</requireJavaVersion>
<requireMavenVersion>
- <version>3.2,</version>
+ <version>${maven.version},</version>
</requireMavenVersion>
<bannedDependencies>
<excludes>
@@ -317,9 +313,9 @@ under the License.
<excludes>
<!-- rat uses .gitignore for excludes by default -->
<exclude>**/test/resources/**/*.txt</exclude>
+ <exclude>.asf.yaml</exclude>
<exclude>LICENSE</exclude>
<exclude>NOTICE</exclude>
- <exclude>DISCLAIMER-WIP</exclude>
</excludes>
</configuration>
</plugin>
@@ -470,6 +466,7 @@ under the License.
</pluginManagement>
</build>
</profile>
+
<profile>
<id>strict</id>
<build>
@@ -497,11 +494,12 @@ under the License.
</pluginManagement>
</build>
</profile>
+
<!-- This profile is used to release signed jars to the Apache Nexus repository.
- This must be executed from a git repository set at the proper Release branch (e.g., 1.1.X-incubating)
- and at a Release Candidate tag (e.g., 1.1.0-incubating-RC1).
- The pom version in the release branch must be properly set to something like: "1.1.0-incubating".
- The pom version in the master would be set to something like: "1.2.0-incubating-SNAPSHOT".
+ This must be executed from a git repository set at the proper Release branch (e.g., 1.1.X)
+ and at a Release Candidate tag (e.g., 1.1.0-RC1).
+ The pom version in the release branch must be properly set to something like: "1.1.0".
+ The pom version in the master would be set to something like: "1.2.0-SNAPSHOT".
Test Command: mvn clean verify -Pnexus-jars -DskipTests=true
Command: mvn clean deploy -Dnexus-jars
Verify Command (from terminal): gpg -v --verify $ASC $FILE # dashdashverify
@@ -551,6 +549,7 @@ under the License.
</gitDescribe>
</configuration>
</plugin>
+
<!-- Extends Apache Parent pom, pluginManagement-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -592,6 +591,7 @@ under the License.
</archive>
</configuration>
</plugin>
+
<!-- We want to sign the artifacts, POM, and all attached artifacts -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -616,6 +616,7 @@ under the License.
</plugin>
</plugins>
</pluginManagement>
+
<plugins>
<plugin>
<groupId>pl.project13.maven</groupId>
diff --git a/src/test/java/org/apache/datasketches/hive/cpc/GetEstimateAndErrorBoundsUDFTest.java b/src/test/java/org/apache/datasketches/hive/cpc/GetEstimateAndErrorBoundsUDFTest.java
index bdfefac..f5c5a7e 100644
--- a/src/test/java/org/apache/datasketches/hive/cpc/GetEstimateAndErrorBoundsUDFTest.java
+++ b/src/test/java/org/apache/datasketches/hive/cpc/GetEstimateAndErrorBoundsUDFTest.java
@@ -21,12 +21,11 @@ package org.apache.datasketches.hive.cpc;
import java.util.List;
+import org.apache.datasketches.cpc.CpcSketch;
import org.apache.hadoop.io.BytesWritable;
import org.testng.Assert;
import org.testng.annotations.Test;
-import org.apache.datasketches.cpc.CpcSketch;
-
@SuppressWarnings("javadoc")
public class GetEstimateAndErrorBoundsUDFTest {
@@ -42,9 +41,9 @@ public class GetEstimateAndErrorBoundsUDFTest {
final List<Double> result = new GetEstimateAndErrorBoundsUDF().evaluate(new BytesWritable(sketch.toByteArray()));
Assert.assertNotNull(result);
Assert.assertEquals(result.size(), 3);
- Assert.assertEquals(result.get(0), 0.0);
- Assert.assertEquals(result.get(1), 0.0);
- Assert.assertEquals(result.get(2), 0.0);
+ Assert.assertEquals((double)result.get(0), 0.0);
+ Assert.assertEquals((double)result.get(1), 0.0);
+ Assert.assertEquals((double)result.get(2), 0.0);
}
@Test
diff --git a/src/test/java/org/apache/datasketches/hive/cpc/GetEstimateUDFTest.java b/src/test/java/org/apache/datasketches/hive/cpc/GetEstimateUDFTest.java
index 6f5c3d1..22beeb8 100644
--- a/src/test/java/org/apache/datasketches/hive/cpc/GetEstimateUDFTest.java
+++ b/src/test/java/org/apache/datasketches/hive/cpc/GetEstimateUDFTest.java
@@ -19,12 +19,11 @@
package org.apache.datasketches.hive.cpc;
+import org.apache.datasketches.cpc.CpcSketch;
import org.apache.hadoop.io.BytesWritable;
import org.testng.Assert;
import org.testng.annotations.Test;
-import org.apache.datasketches.cpc.CpcSketch;
-
@SuppressWarnings("javadoc")
public class GetEstimateUDFTest {
@@ -39,7 +38,7 @@ public class GetEstimateUDFTest {
final CpcSketch sketch = new CpcSketch(12);
final Double result = new GetEstimateUDF().evaluate(new BytesWritable(sketch.toByteArray()));
Assert.assertNotNull(result);
- Assert.assertEquals(result, 0.0);
+ Assert.assertEquals((double)result, 0.0);
}
@Test
diff --git a/src/test/java/org/apache/datasketches/hive/hll/SketchToEstimateAndErrorBoundsUDFTest.java b/src/test/java/org/apache/datasketches/hive/hll/SketchToEstimateAndErrorBoundsUDFTest.java
index 31162fc..163c027 100644
--- a/src/test/java/org/apache/datasketches/hive/hll/SketchToEstimateAndErrorBoundsUDFTest.java
+++ b/src/test/java/org/apache/datasketches/hive/hll/SketchToEstimateAndErrorBoundsUDFTest.java
@@ -21,12 +21,11 @@ package org.apache.datasketches.hive.hll;
import java.util.List;
+import org.apache.datasketches.hll.HllSketch;
import org.apache.hadoop.io.BytesWritable;
import org.testng.Assert;
import org.testng.annotations.Test;
-import org.apache.datasketches.hll.HllSketch;
-
@SuppressWarnings("javadoc")
public class SketchToEstimateAndErrorBoundsUDFTest {
@@ -42,9 +41,9 @@ public class SketchToEstimateAndErrorBoundsUDFTest {
final List<Double> result = new SketchToEstimateAndErrorBoundsUDF().evaluate(new BytesWritable(sketch.toCompactByteArray()));
Assert.assertNotNull(result);
Assert.assertEquals(result.size(), 3);
- Assert.assertEquals(result.get(0), 0.0);
- Assert.assertEquals(result.get(1), 0.0);
- Assert.assertEquals(result.get(2), 0.0);
+ Assert.assertEquals((double)result.get(0), 0.0);
+ Assert.assertEquals((double)result.get(1), 0.0);
+ Assert.assertEquals((double)result.get(2), 0.0);
}
@Test
diff --git a/src/test/java/org/apache/datasketches/hive/hll/SketchToEstimateUDFTest.java b/src/test/java/org/apache/datasketches/hive/hll/SketchToEstimateUDFTest.java
index 761d3bf..197697f 100644
--- a/src/test/java/org/apache/datasketches/hive/hll/SketchToEstimateUDFTest.java
+++ b/src/test/java/org/apache/datasketches/hive/hll/SketchToEstimateUDFTest.java
@@ -19,12 +19,11 @@
package org.apache.datasketches.hive.hll;
+import org.apache.datasketches.hll.HllSketch;
import org.apache.hadoop.io.BytesWritable;
import org.testng.Assert;
import org.testng.annotations.Test;
-import org.apache.datasketches.hll.HllSketch;
-
@SuppressWarnings("javadoc")
public class SketchToEstimateUDFTest {
@@ -39,7 +38,7 @@ public class SketchToEstimateUDFTest {
HllSketch sketch = new HllSketch(10);
Double result = new SketchToEstimateUDF().evaluate(new BytesWritable(sketch.toCompactByteArray()));
Assert.assertNotNull(result);
- Assert.assertEquals(result, 0.0);
+ Assert.assertEquals((double)result, 0.0);
}
@Test
diff --git a/src/test/java/org/apache/datasketches/hive/kll/GetCdfUDFTest.java b/src/test/java/org/apache/datasketches/hive/kll/GetCdfUDFTest.java
index f491477..ce84bf6 100644
--- a/src/test/java/org/apache/datasketches/hive/kll/GetCdfUDFTest.java
+++ b/src/test/java/org/apache/datasketches/hive/kll/GetCdfUDFTest.java
@@ -21,12 +21,11 @@ package org.apache.datasketches.hive.kll;
import java.util.List;
+import org.apache.datasketches.kll.KllFloatsSketch;
import org.apache.hadoop.io.BytesWritable;
import org.testng.Assert;
import org.testng.annotations.Test;
-import org.apache.datasketches.kll.KllFloatsSketch;
-
@SuppressWarnings("javadoc")
public class GetCdfUDFTest {
@@ -45,7 +44,7 @@ public class GetCdfUDFTest {
List<Double> result = new GetCdfUDF().evaluate(new BytesWritable(sketch.toByteArray()));
Assert.assertNotNull(result);
Assert.assertEquals(result.size(), 1);
- Assert.assertEquals(result.get(0), 1.0);
+ Assert.assertEquals((double)result.get(0), 1.0);
}
@Test
@@ -65,10 +64,10 @@ public class GetCdfUDFTest {
List<Double> result = new GetCdfUDF().evaluate(new BytesWritable(sketch.toByteArray()), 1f, 3f, 4f);
Assert.assertNotNull(result);
Assert.assertEquals(result.size(), 4);
- Assert.assertEquals(result.get(0), 0.0);
- Assert.assertEquals(result.get(1), 0.5);
- Assert.assertEquals(result.get(2), 0.75);
- Assert.assertEquals(result.get(3), 1.0);
+ Assert.assertEquals((double)result.get(0), 0.0);
+ Assert.assertEquals((double)result.get(1), 0.5);
+ Assert.assertEquals((double)result.get(2), 0.75);
+ Assert.assertEquals((double)result.get(3), 1.0);
}
}
diff --git a/src/test/java/org/apache/datasketches/hive/kll/GetPmfUDFTest.java b/src/test/java/org/apache/datasketches/hive/kll/GetPmfUDFTest.java
index 3f525f6..2793f45 100644
--- a/src/test/java/org/apache/datasketches/hive/kll/GetPmfUDFTest.java
+++ b/src/test/java/org/apache/datasketches/hive/kll/GetPmfUDFTest.java
@@ -21,12 +21,11 @@ package org.apache.datasketches.hive.kll;
import java.util.List;
+import org.apache.datasketches.kll.KllFloatsSketch;
import org.apache.hadoop.io.BytesWritable;
import org.testng.Assert;
import org.testng.annotations.Test;
-import org.apache.datasketches.kll.KllFloatsSketch;
-
@SuppressWarnings("javadoc")
public class GetPmfUDFTest {
@@ -45,7 +44,7 @@ public class GetPmfUDFTest {
List<Double> result = new GetPmfUDF().evaluate(new BytesWritable(sketch.toByteArray()));
Assert.assertNotNull(result);
Assert.assertEquals(result.size(), 1);
- Assert.assertEquals(result.get(0), 1.0);
+ Assert.assertEquals((double)result.get(0), 1.0);
}
@Test
@@ -65,10 +64,10 @@ public class GetPmfUDFTest {
List<Double> result = new GetPmfUDF().evaluate(new BytesWritable(sketch.toByteArray()), 1f, 3f, 5f);
Assert.assertNotNull(result);
Assert.assertEquals(result.size(), 4);
- Assert.assertEquals(result.get(0), 0.0);
- Assert.assertEquals(result.get(1), 0.5);
- Assert.assertEquals(result.get(2), 0.5);
- Assert.assertEquals(result.get(3), 0.0);
+ Assert.assertEquals((double)result.get(0), 0.0);
+ Assert.assertEquals((double)result.get(1), 0.5);
+ Assert.assertEquals((double)result.get(2), 0.5);
+ Assert.assertEquals((double)result.get(3), 0.0);
}
}
diff --git a/src/test/java/org/apache/datasketches/hive/kll/GetQuantileUDFTest.java b/src/test/java/org/apache/datasketches/hive/kll/GetQuantileUDFTest.java
index c005d35..c9bdccc 100644
--- a/src/test/java/org/apache/datasketches/hive/kll/GetQuantileUDFTest.java
+++ b/src/test/java/org/apache/datasketches/hive/kll/GetQuantileUDFTest.java
@@ -19,12 +19,11 @@
package org.apache.datasketches.hive.kll;
+import org.apache.datasketches.kll.KllFloatsSketch;
import org.apache.hadoop.io.BytesWritable;
import org.testng.Assert;
import org.testng.annotations.Test;
-import org.apache.datasketches.kll.KllFloatsSketch;
-
@SuppressWarnings("javadoc")
public class GetQuantileUDFTest {
@@ -42,7 +41,7 @@ public class GetQuantileUDFTest {
sketch.update(3);
final Float result = new GetQuantileUDF().evaluate(new BytesWritable(sketch.toByteArray()), 0.5);
Assert.assertNotNull(result);
- Assert.assertEquals(result, 2f);
+ Assert.assertEquals((double)result, 2f);
}
}
diff --git a/src/test/java/org/apache/datasketches/hive/kll/GetQuantilesUDFTest.java b/src/test/java/org/apache/datasketches/hive/kll/GetQuantilesUDFTest.java
index f95b217..d471422 100644
--- a/src/test/java/org/apache/datasketches/hive/kll/GetQuantilesUDFTest.java
+++ b/src/test/java/org/apache/datasketches/hive/kll/GetQuantilesUDFTest.java
@@ -21,12 +21,11 @@ package org.apache.datasketches.hive.kll;
import java.util.List;
+import org.apache.datasketches.kll.KllFloatsSketch;
import org.apache.hadoop.io.BytesWritable;
import org.testng.Assert;
import org.testng.annotations.Test;
-import org.apache.datasketches.kll.KllFloatsSketch;
-
@SuppressWarnings("javadoc")
public class GetQuantilesUDFTest {
@@ -56,9 +55,9 @@ public class GetQuantilesUDFTest {
final List<Float> result = new GetQuantilesUDF().evaluate(new BytesWritable(sketch.toByteArray()), 0.0, 0.5, 1.0);
Assert.assertNotNull(result);
Assert.assertEquals(result.size(), 3);
- Assert.assertEquals(result.get(0), 1f);
- Assert.assertEquals(result.get(1), 2f);
- Assert.assertEquals(result.get(2), 3f);
+ Assert.assertEquals((double)result.get(0), 1f);
+ Assert.assertEquals((double)result.get(1), 2f);
+ Assert.assertEquals((double)result.get(2), 3f);
}
}
diff --git a/src/test/java/org/apache/datasketches/hive/kll/GetRankUDFTest.java b/src/test/java/org/apache/datasketches/hive/kll/GetRankUDFTest.java
index fb25de8..daa4de5 100644
--- a/src/test/java/org/apache/datasketches/hive/kll/GetRankUDFTest.java
+++ b/src/test/java/org/apache/datasketches/hive/kll/GetRankUDFTest.java
@@ -19,12 +19,11 @@
package org.apache.datasketches.hive.kll;
+import org.apache.datasketches.kll.KllFloatsSketch;
import org.apache.hadoop.io.BytesWritable;
import org.testng.Assert;
import org.testng.annotations.Test;
-import org.apache.datasketches.kll.KllFloatsSketch;
-
@SuppressWarnings("javadoc")
public class GetRankUDFTest {
@@ -43,7 +42,7 @@ public class GetRankUDFTest {
sketch.update(4);
final Double result = new GetRankUDF().evaluate(new BytesWritable(sketch.toByteArray()), 3f);
Assert.assertNotNull(result);
- Assert.assertEquals(result, 0.5);
+ Assert.assertEquals((double)result, 0.5);
}
}
diff --git a/src/test/java/org/apache/datasketches/hive/quantiles/GetCdfFromDoublesSketchUDFTest.java b/src/test/java/org/apache/datasketches/hive/quantiles/GetCdfFromDoublesSketchUDFTest.java
index 06f9fd5..84cd5db 100644
--- a/src/test/java/org/apache/datasketches/hive/quantiles/GetCdfFromDoublesSketchUDFTest.java
+++ b/src/test/java/org/apache/datasketches/hive/quantiles/GetCdfFromDoublesSketchUDFTest.java
@@ -21,13 +21,12 @@ package org.apache.datasketches.hive.quantiles;
import java.util.List;
+import org.apache.datasketches.quantiles.DoublesSketch;
+import org.apache.datasketches.quantiles.UpdateDoublesSketch;
import org.apache.hadoop.io.BytesWritable;
import org.testng.Assert;
import org.testng.annotations.Test;
-import org.apache.datasketches.quantiles.DoublesSketch;
-import org.apache.datasketches.quantiles.UpdateDoublesSketch;
-
@SuppressWarnings("javadoc")
public class GetCdfFromDoublesSketchUDFTest {
@@ -46,7 +45,7 @@ public class GetCdfFromDoublesSketchUDFTest {
List<Double> result = new GetCdfFromDoublesSketchUDF().evaluate(new BytesWritable(sketch.toByteArray()));
Assert.assertNotNull(result);
Assert.assertEquals(result.size(), 1);
- Assert.assertEquals(result.get(0), 1.0);
+ Assert.assertEquals((double)result.get(0), 1.0);
}
@Test
@@ -66,10 +65,10 @@ public class GetCdfFromDoublesSketchUDFTest {
List<Double> result = new GetCdfFromDoublesSketchUDF().evaluate(new BytesWritable(sketch.toByteArray()), 1.0, 3.0, 4.0);
Assert.assertNotNull(result);
Assert.assertEquals(result.size(), 4);
- Assert.assertEquals(result.get(0), 0.0);
- Assert.assertEquals(result.get(1), 0.5);
- Assert.assertEquals(result.get(2), 0.75);
- Assert.assertEquals(result.get(3), 1.0);
+ Assert.assertEquals((double)result.get(0), 0.0);
+ Assert.assertEquals((double)result.get(1), 0.5);
+ Assert.assertEquals((double)result.get(2), 0.75);
+ Assert.assertEquals((double)result.get(3), 1.0);
}
}
diff --git a/src/test/java/org/apache/datasketches/hive/quantiles/GetCdfFromStringsSketchUDFTest.java b/src/test/java/org/apache/datasketches/hive/quantiles/GetCdfFromStringsSketchUDFTest.java
index 83a96ec..68d5eb5 100644
--- a/src/test/java/org/apache/datasketches/hive/quantiles/GetCdfFromStringsSketchUDFTest.java
+++ b/src/test/java/org/apache/datasketches/hive/quantiles/GetCdfFromStringsSketchUDFTest.java
@@ -22,14 +22,12 @@ package org.apache.datasketches.hive.quantiles;
import java.util.Comparator;
import java.util.List;
-import org.apache.hadoop.io.BytesWritable;
-
-import org.testng.annotations.Test;
-import org.testng.Assert;
-
import org.apache.datasketches.ArrayOfItemsSerDe;
import org.apache.datasketches.ArrayOfStringsSerDe;
import org.apache.datasketches.quantiles.ItemsSketch;
+import org.apache.hadoop.io.BytesWritable;
+import org.testng.Assert;
+import org.testng.annotations.Test;
@SuppressWarnings("javadoc")
public class GetCdfFromStringsSketchUDFTest {
@@ -52,7 +50,7 @@ public class GetCdfFromStringsSketchUDFTest {
List<Double> result = new GetCdfFromStringsSketchUDF().evaluate(new BytesWritable(sketch.toByteArray(serDe)));
Assert.assertNotNull(result);
Assert.assertEquals(result.size(), 1);
- Assert.assertEquals(result.get(0), 1.0);
+ Assert.assertEquals((double)result.get(0), 1.0);
}
@Test
@@ -71,11 +69,11 @@ public class GetCdfFromStringsSketchUDFTest {
sketch.update("d");
List<Double> result = new GetCdfFromStringsSketchUDF().evaluate(new BytesWritable(sketch.toByteArray(serDe)), "a", "c", "d");
Assert.assertNotNull(result);
- Assert.assertEquals(result.size(), 4);
- Assert.assertEquals(result.get(0), 0.0);
- Assert.assertEquals(result.get(1), 0.5);
- Assert.assertEquals(result.get(2), 0.75);
- Assert.assertEquals(result.get(3), 1.0);
+ Assert.assertEquals((double)result.size(), 4);
+ Assert.assertEquals((double)result.get(0), 0.0);
+ Assert.assertEquals((double)result.get(1), 0.5);
+ Assert.assertEquals((double)result.get(2), 0.75);
+ Assert.assertEquals((double)result.get(3), 1.0);
}
}
diff --git a/src/test/java/org/apache/datasketches/hive/quantiles/GetPmfFromDoublesSketchUDFTest.java b/src/test/java/org/apache/datasketches/hive/quantiles/GetPmfFromDoublesSketchUDFTest.java
index 45cd365..64a0d73 100644
--- a/src/test/java/org/apache/datasketches/hive/quantiles/GetPmfFromDoublesSketchUDFTest.java
+++ b/src/test/java/org/apache/datasketches/hive/quantiles/GetPmfFromDoublesSketchUDFTest.java
@@ -21,13 +21,12 @@ package org.apache.datasketches.hive.quantiles;
import java.util.List;
+import org.apache.datasketches.quantiles.DoublesSketch;
+import org.apache.datasketches.quantiles.UpdateDoublesSketch;
import org.apache.hadoop.io.BytesWritable;
import org.testng.Assert;
import org.testng.annotations.Test;
-import org.apache.datasketches.quantiles.DoublesSketch;
-import org.apache.datasketches.quantiles.UpdateDoublesSketch;
-
@SuppressWarnings("javadoc")
public class GetPmfFromDoublesSketchUDFTest {
@@ -46,7 +45,7 @@ public class GetPmfFromDoublesSketchUDFTest {
List<Double> result = new GetPmfFromDoublesSketchUDF().evaluate(new BytesWritable(sketch.toByteArray()));
Assert.assertNotNull(result);
Assert.assertEquals(result.size(), 1);
- Assert.assertEquals(result.get(0), 1.0);
+ Assert.assertEquals((double)result.get(0), 1.0);
}
@Test
@@ -66,10 +65,10 @@ public class GetPmfFromDoublesSketchUDFTest {
List<Double> result = new GetPmfFromDoublesSketchUDF().evaluate(new BytesWritable(sketch.toByteArray()), 1.0, 3.0, 5.0);
Assert.assertNotNull(result);
Assert.assertEquals(result.size(), 4);
- Assert.assertEquals(result.get(0), 0.0);
- Assert.assertEquals(result.get(1), 0.5);
- Assert.assertEquals(result.get(2), 0.5);
- Assert.assertEquals(result.get(3), 0.0);
+ Assert.assertEquals((double)result.get(0), 0.0);
+ Assert.assertEquals((double)result.get(1), 0.5);
+ Assert.assertEquals((double)result.get(2), 0.5);
+ Assert.assertEquals((double)result.get(3), 0.0);
}
}
diff --git a/src/test/java/org/apache/datasketches/hive/quantiles/GetPmfFromStringsSketchUDFTest.java b/src/test/java/org/apache/datasketches/hive/quantiles/GetPmfFromStringsSketchUDFTest.java
index 4e2cad1..7d2dd7b 100644
--- a/src/test/java/org/apache/datasketches/hive/quantiles/GetPmfFromStringsSketchUDFTest.java
+++ b/src/test/java/org/apache/datasketches/hive/quantiles/GetPmfFromStringsSketchUDFTest.java
@@ -22,14 +22,12 @@ package org.apache.datasketches.hive.quantiles;
import java.util.Comparator;
import java.util.List;
-import org.apache.hadoop.io.BytesWritable;
-
-import org.testng.annotations.Test;
-import org.testng.Assert;
-
import org.apache.datasketches.ArrayOfItemsSerDe;
import org.apache.datasketches.ArrayOfStringsSerDe;
import org.apache.datasketches.quantiles.ItemsSketch;
+import org.apache.hadoop.io.BytesWritable;
+import org.testng.Assert;
+import org.testng.annotations.Test;
@SuppressWarnings("javadoc")
public class GetPmfFromStringsSketchUDFTest {
@@ -52,7 +50,7 @@ public class GetPmfFromStringsSketchUDFTest {
List<Double> result = new GetPmfFromStringsSketchUDF().evaluate(new BytesWritable(sketch.toByteArray(serDe)));
Assert.assertNotNull(result);
Assert.assertEquals(result.size(), 1);
- Assert.assertEquals(result.get(0), 1.0);
+ Assert.assertEquals((double)result.get(0), 1.0);
}
@Test
@@ -72,10 +70,10 @@ public class GetPmfFromStringsSketchUDFTest {
List<Double> result = new GetPmfFromStringsSketchUDF().evaluate(new BytesWritable(sketch.toByteArray(serDe)), "a", "c", "e");
Assert.assertNotNull(result);
Assert.assertEquals(result.size(), 4);
- Assert.assertEquals(result.get(0), 0.0);
- Assert.assertEquals(result.get(1), 0.5);
- Assert.assertEquals(result.get(2), 0.5);
- Assert.assertEquals(result.get(3), 0.0);
+ Assert.assertEquals((double)result.get(0), 0.0);
+ Assert.assertEquals((double)result.get(1), 0.5);
+ Assert.assertEquals((double)result.get(2), 0.5);
+ Assert.assertEquals((double)result.get(3), 0.0);
}
}
diff --git a/src/test/java/org/apache/datasketches/hive/quantiles/GetQuantileFromDoublesSektchUDFTest.java b/src/test/java/org/apache/datasketches/hive/quantiles/GetQuantileFromDoublesSektchUDFTest.java
index 7fb757f..33825ce 100644
--- a/src/test/java/org/apache/datasketches/hive/quantiles/GetQuantileFromDoublesSektchUDFTest.java
+++ b/src/test/java/org/apache/datasketches/hive/quantiles/GetQuantileFromDoublesSektchUDFTest.java
@@ -19,13 +19,12 @@
package org.apache.datasketches.hive.quantiles;
+import org.apache.datasketches.quantiles.DoublesSketch;
+import org.apache.datasketches.quantiles.UpdateDoublesSketch;
import org.apache.hadoop.io.BytesWritable;
import org.testng.Assert;
import org.testng.annotations.Test;
-import org.apache.datasketches.quantiles.DoublesSketch;
-import org.apache.datasketches.quantiles.UpdateDoublesSketch;
-
@SuppressWarnings("javadoc")
public class GetQuantileFromDoublesSektchUDFTest {
@@ -43,7 +42,7 @@ public class GetQuantileFromDoublesSektchUDFTest {
sketch.update(3);
Double result = new GetQuantileFromDoublesSketchUDF().evaluate(new BytesWritable(sketch.toByteArray()), 0.5);
Assert.assertNotNull(result);
- Assert.assertEquals(result, 2.0);
+ Assert.assertEquals((double)result, 2.0);
}
}
diff --git a/src/test/java/org/apache/datasketches/hive/quantiles/GetQuantilesFromDoublesSketchUDFTest.java b/src/test/java/org/apache/datasketches/hive/quantiles/GetQuantilesFromDoublesSketchUDFTest.java
index 8ca1d8b..c399969 100644
--- a/src/test/java/org/apache/datasketches/hive/quantiles/GetQuantilesFromDoublesSketchUDFTest.java
+++ b/src/test/java/org/apache/datasketches/hive/quantiles/GetQuantilesFromDoublesSketchUDFTest.java
@@ -21,13 +21,12 @@ package org.apache.datasketches.hive.quantiles;
import java.util.List;
-import org.apache.hadoop.io.BytesWritable;
-import org.testng.Assert;
-import org.testng.annotations.Test;
-
import org.apache.datasketches.SketchesArgumentException;
import org.apache.datasketches.quantiles.DoublesSketch;
import org.apache.datasketches.quantiles.UpdateDoublesSketch;
+import org.apache.hadoop.io.BytesWritable;
+import org.testng.Assert;
+import org.testng.annotations.Test;
@SuppressWarnings("javadoc")
public class GetQuantilesFromDoublesSketchUDFTest {
@@ -58,9 +57,9 @@ public class GetQuantilesFromDoublesSketchUDFTest {
List<Double> result = new GetQuantilesFromDoublesSketchUDF().evaluate(new BytesWritable(sketch.toByteArray()), 0.0, 0.5, 1.0);
Assert.assertNotNull(result);
Assert.assertEquals(result.size(), 3);
- Assert.assertEquals(result.get(0), 1.0);
- Assert.assertEquals(result.get(1), 2.0);
- Assert.assertEquals(result.get(2), 3.0);
+ Assert.assertEquals((double)result.get(0), 1.0);
+ Assert.assertEquals((double)result.get(1), 2.0);
+ Assert.assertEquals((double)result.get(2), 3.0);
}
@Test
@@ -86,9 +85,9 @@ public class GetQuantilesFromDoublesSketchUDFTest {
List<Double> result = new GetQuantilesFromDoublesSketchUDF().evaluate(new BytesWritable(sketch.toByteArray()), 3);
Assert.assertNotNull(result);
Assert.assertEquals(result.size(), 3);
- Assert.assertEquals(result.get(0), 1.0);
- Assert.assertEquals(result.get(1), 2.0);
- Assert.assertEquals(result.get(2), 3.0);
+ Assert.assertEquals((double)result.get(0), 1.0);
+ Assert.assertEquals((double)result.get(1), 2.0);
+ Assert.assertEquals((double)result.get(2), 3.0);
}
}
diff --git a/src/test/java/org/apache/datasketches/hive/theta/EstimateSketchUDFTest.java b/src/test/java/org/apache/datasketches/hive/theta/EstimateSketchUDFTest.java
index f337a60..25ae4e8 100644
--- a/src/test/java/org/apache/datasketches/hive/theta/EstimateSketchUDFTest.java
+++ b/src/test/java/org/apache/datasketches/hive/theta/EstimateSketchUDFTest.java
@@ -99,11 +99,11 @@ public class EstimateSketchUDFTest {
@Test
public void evaluateRespectsByteLength() {
- // From Issue 50: https://github.com/apache/incubator-datasketches-hive/issues/50
- // In some instances, the BytesWritable buffer returned by getBytes() might be larger than the actual sketch bytes.
- // getLength() should give the correct length to use.
+ // From Issue 50: https://github.com/apache/datasketches-hive/issues/50
+ // In some instances, the BytesWritable buffer returned by getBytes() might be larger than the
+ // actual sketch bytes. getLength() should give the correct length to use.
//
- // https://github.com/apache/incubator-datasketches-hive/issues/50
+ // https://github.com/apache/datasketches-hive/issues/50
byte[] inputBytes = new byte[]{
(byte) 0x01, (byte) 0x03, (byte) 0x03, (byte) 0x00,
(byte) 0x00, (byte) 0x3a, (byte) 0xcc, (byte) 0x93,
diff --git a/src/test/java/org/apache/datasketches/hive/tuple/ArrayOfDoublesSketchToEstimateAndErrorBoundsUDFTest.java b/src/test/java/org/apache/datasketches/hive/tuple/ArrayOfDoublesSketchToEstimateAndErrorBoundsUDFTest.java
index 7e8ce64..652e8f3 100644
--- a/src/test/java/org/apache/datasketches/hive/tuple/ArrayOfDoublesSketchToEstimateAndErrorBoundsUDFTest.java
+++ b/src/test/java/org/apache/datasketches/hive/tuple/ArrayOfDoublesSketchToEstimateAndErrorBoundsUDFTest.java
@@ -21,13 +21,12 @@ package org.apache.datasketches.hive.tuple;
import java.util.List;
+import org.apache.datasketches.tuple.ArrayOfDoublesUpdatableSketch;
+import org.apache.datasketches.tuple.ArrayOfDoublesUpdatableSketchBuilder;
import org.apache.hadoop.io.BytesWritable;
import org.testng.Assert;
import org.testng.annotations.Test;
-import org.apache.datasketches.tuple.ArrayOfDoublesUpdatableSketch;
-import org.apache.datasketches.tuple.ArrayOfDoublesUpdatableSketchBuilder;
-
@SuppressWarnings("javadoc")
public class ArrayOfDoublesSketchToEstimateAndErrorBoundsUDFTest {
@@ -43,9 +42,9 @@ public class ArrayOfDoublesSketchToEstimateAndErrorBoundsUDFTest {
List<Double> result = new ArrayOfDoublesSketchToEstimateAndErrorBoundsUDF().evaluate(new BytesWritable(sketch.compact().toByteArray()));
Assert.assertNotNull(result);
Assert.assertEquals(result.size(), 3);
- Assert.assertEquals(result.get(0), 0.0);
- Assert.assertEquals(result.get(1), 0.0);
- Assert.assertEquals(result.get(2), 0.0);
+ Assert.assertEquals((double)result.get(0), 0.0);
+ Assert.assertEquals((double)result.get(1), 0.0);
+ Assert.assertEquals((double)result.get(2), 0.0);
}
@Test
@@ -56,9 +55,9 @@ public class ArrayOfDoublesSketchToEstimateAndErrorBoundsUDFTest {
List<Double> result = new ArrayOfDoublesSketchToEstimateAndErrorBoundsUDF().evaluate(new BytesWritable(sketch.compact().toByteArray()));
Assert.assertNotNull(result);
Assert.assertEquals(result.size(), 3);
- Assert.assertEquals(result.get(0), 2.0);
- Assert.assertEquals(result.get(1), 2.0);
- Assert.assertEquals(result.get(2), 2.0);
+ Assert.assertEquals((double)result.get(0), 2.0);
+ Assert.assertEquals((double)result.get(1), 2.0);
+ Assert.assertEquals((double)result.get(2), 2.0);
}
@Test
diff --git a/src/test/java/org/apache/datasketches/hive/tuple/ArrayOfDoublesSketchToEstimatesUDFTest.java b/src/test/java/org/apache/datasketches/hive/tuple/ArrayOfDoublesSketchToEstimatesUDFTest.java
index 2ec6a61..19f4ff3 100644
--- a/src/test/java/org/apache/datasketches/hive/tuple/ArrayOfDoublesSketchToEstimatesUDFTest.java
+++ b/src/test/java/org/apache/datasketches/hive/tuple/ArrayOfDoublesSketchToEstimatesUDFTest.java
@@ -21,13 +21,12 @@ package org.apache.datasketches.hive.tuple;
import java.util.List;
+import org.apache.datasketches.tuple.ArrayOfDoublesUpdatableSketch;
+import org.apache.datasketches.tuple.ArrayOfDoublesUpdatableSketchBuilder;
import org.apache.hadoop.io.BytesWritable;
import org.testng.Assert;
import org.testng.annotations.Test;
-import org.apache.datasketches.tuple.ArrayOfDoublesUpdatableSketch;
-import org.apache.datasketches.tuple.ArrayOfDoublesUpdatableSketchBuilder;
-
@SuppressWarnings("javadoc")
public class ArrayOfDoublesSketchToEstimatesUDFTest {
@@ -43,8 +42,8 @@ public class ArrayOfDoublesSketchToEstimatesUDFTest {
List<Double> result = new ArrayOfDoublesSketchToEstimatesUDF().evaluate(new BytesWritable(sketch.compact().toByteArray()));
Assert.assertNotNull(result);
Assert.assertEquals(result.size(), 2);
- Assert.assertEquals(result.get(0), 0.0);
- Assert.assertEquals(result.get(1), 0.0);
+ Assert.assertEquals((double)result.get(0), 0.0);
+ Assert.assertEquals((double)result.get(1), 0.0);
}
@Test
@@ -55,8 +54,8 @@ public class ArrayOfDoublesSketchToEstimatesUDFTest {
List<Double> result = new ArrayOfDoublesSketchToEstimatesUDF().evaluate(new BytesWritable(sketch.compact().toByteArray()));
Assert.assertNotNull(result);
Assert.assertEquals(result.size(), 2);
- Assert.assertEquals(result.get(0), 2.0);
- Assert.assertEquals(result.get(1), 2.0);
+ Assert.assertEquals((double)result.get(0), 2.0);
+ Assert.assertEquals((double)result.get(1), 2.0);
}
}
diff --git a/src/test/java/org/apache/datasketches/hive/tuple/ArrayOfDoublesSketchToMeansUDFTest.java b/src/test/java/org/apache/datasketches/hive/tuple/ArrayOfDoublesSketchToMeansUDFTest.java
index 34db089..5997d87 100644
--- a/src/test/java/org/apache/datasketches/hive/tuple/ArrayOfDoublesSketchToMeansUDFTest.java
+++ b/src/test/java/org/apache/datasketches/hive/tuple/ArrayOfDoublesSketchToMeansUDFTest.java
@@ -22,13 +22,12 @@ package org.apache.datasketches.hive.tuple;
import java.util.List;
import java.util.Random;
+import org.apache.datasketches.tuple.ArrayOfDoublesUpdatableSketch;
+import org.apache.datasketches.tuple.ArrayOfDoublesUpdatableSketchBuilder;
import org.apache.hadoop.io.BytesWritable;
import org.testng.Assert;
import org.testng.annotations.Test;
-import org.apache.datasketches.tuple.ArrayOfDoublesUpdatableSketch;
-import org.apache.datasketches.tuple.ArrayOfDoublesUpdatableSketchBuilder;
-
@SuppressWarnings("javadoc")
public class ArrayOfDoublesSketchToMeansUDFTest {
@@ -52,7 +51,7 @@ public class ArrayOfDoublesSketchToMeansUDFTest {
List<Double> result = new ArrayOfDoublesSketchToMeansUDF().evaluate(new BytesWritable(sketch.compact().toByteArray()));
Assert.assertNotNull(result);
Assert.assertEquals(result.size(), 1);
- Assert.assertEquals(result.get(0), 1.0);
+ Assert.assertEquals((double)result.get(0), 1.0);
}
@Test
diff --git a/src/test/java/org/apache/datasketches/hive/tuple/ArrayOfDoublesSketchToVariancesUDFTest.java b/src/test/java/org/apache/datasketches/hive/tuple/ArrayOfDoublesSketchToVariancesUDFTest.java
index a6f0493..e019d83 100644
--- a/src/test/java/org/apache/datasketches/hive/tuple/ArrayOfDoublesSketchToVariancesUDFTest.java
+++ b/src/test/java/org/apache/datasketches/hive/tuple/ArrayOfDoublesSketchToVariancesUDFTest.java
@@ -22,13 +22,12 @@ package org.apache.datasketches.hive.tuple;
import java.util.List;
import java.util.Random;
+import org.apache.datasketches.tuple.ArrayOfDoublesUpdatableSketch;
+import org.apache.datasketches.tuple.ArrayOfDoublesUpdatableSketchBuilder;
import org.apache.hadoop.io.BytesWritable;
import org.testng.Assert;
import org.testng.annotations.Test;
-import org.apache.datasketches.tuple.ArrayOfDoublesUpdatableSketch;
-import org.apache.datasketches.tuple.ArrayOfDoublesUpdatableSketchBuilder;
-
@SuppressWarnings("javadoc")
public class ArrayOfDoublesSketchToVariancesUDFTest {
@@ -52,7 +51,7 @@ public class ArrayOfDoublesSketchToVariancesUDFTest {
List<Double> result = new ArrayOfDoublesSketchToVariancesUDF().evaluate(new BytesWritable(sketch.compact().toByteArray()));
Assert.assertNotNull(result);
Assert.assertEquals(result.size(), 1);
- Assert.assertEquals(result.get(0), 0.0);
+ Assert.assertEquals((double)result.get(0), 0.0);
}
@Test
diff --git a/src/test/java/org/apache/datasketches/hive/tuple/DoubleSummarySketchToEstimatesUDFTest.java b/src/test/java/org/apache/datasketches/hive/tuple/DoubleSummarySketchToEstimatesUDFTest.java
index 735491c..3fcae2b 100644
--- a/src/test/java/org/apache/datasketches/hive/tuple/DoubleSummarySketchToEstimatesUDFTest.java
+++ b/src/test/java/org/apache/datasketches/hive/tuple/DoubleSummarySketchToEstimatesUDFTest.java
@@ -45,8 +45,8 @@ public class DoubleSummarySketchToEstimatesUDFTest {
List<Double> result = new DoubleSummarySketchToEstimatesUDF().evaluate(new BytesWritable(sketch.compact().toByteArray()));
Assert.assertNotNull(result);
Assert.assertEquals(result.size(), 2);
- Assert.assertEquals(result.get(0), 0.0);
- Assert.assertEquals(result.get(1), 0.0);
+ Assert.assertEquals((double)result.get(0), 0.0);
+ Assert.assertEquals((double)result.get(1), 0.0);
}
@Test
@@ -58,8 +58,8 @@ public class DoubleSummarySketchToEstimatesUDFTest {
List<Double> result = new DoubleSummarySketchToEstimatesUDF().evaluate(new BytesWritable(sketch.compact().toByteArray()));
Assert.assertNotNull(result);
Assert.assertEquals(result.size(), 2);
- Assert.assertEquals(result.get(0), 2.0);
- Assert.assertEquals(result.get(1), 2.0);
+ Assert.assertEquals((double)result.get(0), 2.0);
+ Assert.assertEquals((double)result.get(1), 2.0);
}
}
diff --git a/src/test/java/org/apache/datasketches/hive/tuple/DoubleSummarySketchToPercentileUDFTest.java b/src/test/java/org/apache/datasketches/hive/tuple/DoubleSummarySketchToPercentileUDFTest.java
index 3374566..85dfa0a 100644
--- a/src/test/java/org/apache/datasketches/hive/tuple/DoubleSummarySketchToPercentileUDFTest.java
+++ b/src/test/java/org/apache/datasketches/hive/tuple/DoubleSummarySketchToPercentileUDFTest.java
@@ -42,7 +42,7 @@ public class DoubleSummarySketchToPercentileUDFTest {
new UpdatableSketchBuilder<>(new DoubleSummaryFactory(DoubleSummary.Mode.Sum)).build();
Double result = new DoubleSummarySketchToPercentileUDF().evaluate(new BytesWritable(sketch.compact().toByteArray()), 0.0);
Assert.assertNotNull(result);
- Assert.assertEquals(result, Double.NaN);
+ Assert.assertEquals((double)result, Double.NaN);
}
@Test
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org