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 2019/08/23 03:35:45 UTC

[incubator-datasketches-java] branch master updated (f92a3c9 -> 0ba8f4c)

This is an automated email from the ASF dual-hosted git repository.

leerho pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-datasketches-java.git.


    from f92a3c9  Merge pull request #266 from apache/array_of_doubles_union_fix
     new eef1dc6  Add final
     new be1cded  Minor updates to pom
     new 0ba8f4c  Minor comment update

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 pom.xml                                                           | 2 +-
 src/main/java/com/yahoo/sketches/fdt/PostProcessor.java           | 2 ++
 src/main/java/com/yahoo/sketches/theta/UnionImpl.java             | 2 +-
 .../java/com/yahoo/sketches/tuple/HeapArrayOfDoublesAnotB.java    | 8 ++++----
 4 files changed, 8 insertions(+), 6 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org


[incubator-datasketches-java] 02/03: Minor updates to pom

Posted by le...@apache.org.
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/incubator-datasketches-java.git

commit be1cded7b97c942f46b09c67f18d23c870a05d43
Author: Lee Rhodes <le...@users.noreply.github.com>
AuthorDate: Thu Aug 22 20:30:59 2019 -0700

    Minor updates to pom
---
 pom.xml                                                 | 2 +-
 src/main/java/com/yahoo/sketches/fdt/PostProcessor.java | 1 +
 src/main/java/com/yahoo/sketches/theta/UnionImpl.java   | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index 767d9bc..e79e42a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@ under the License.
     </parent>
 
     <groupId>org.apache.datasketches</groupId>
-    <artifactId>datasketches-core</artifactId>
+    <artifactId>datasketches-java</artifactId>
     <packaging>jar</packaging>
     <version>0.13.5-incubating-SNAPSHOT</version>
 
diff --git a/src/main/java/com/yahoo/sketches/fdt/PostProcessor.java b/src/main/java/com/yahoo/sketches/fdt/PostProcessor.java
index c113cd0..85977cb 100644
--- a/src/main/java/com/yahoo/sketches/fdt/PostProcessor.java
+++ b/src/main/java/com/yahoo/sketches/fdt/PostProcessor.java
@@ -33,6 +33,7 @@ import com.yahoo.sketches.tuple.strings.ArrayOfStringsSummary;
 /**
  * This processes the contents of a FDT sketch to extract the
  * primary keys with the most frequent unique combinations of the non-primary dimensions.
+ * The source sketch is not modified.
  *
  * @author Lee Rhodes
  */
diff --git a/src/main/java/com/yahoo/sketches/theta/UnionImpl.java b/src/main/java/com/yahoo/sketches/theta/UnionImpl.java
index 3b74801..9a4e6c2 100644
--- a/src/main/java/com/yahoo/sketches/theta/UnionImpl.java
+++ b/src/main/java/com/yahoo/sketches/theta/UnionImpl.java
@@ -310,7 +310,7 @@ final class UnionImpl extends Union {
           final long hashIn = cacheIn[i];
           if ((hashIn <= 0L) || (hashIn >= unionThetaLong_)) { continue; } //rejects dirty values
           gadget_.hashUpdate(hashIn); //backdoor update, hash function is bypassed
-          c++; //insures against invalid state inside the incoming sketch
+          c++; //ensures against invalid state inside the incoming sketch
         }
       }
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org


[incubator-datasketches-java] 01/03: Add final

Posted by le...@apache.org.
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/incubator-datasketches-java.git

commit eef1dc648858e210f14351247bbfd8620f67eca1
Author: Lee Rhodes <le...@users.noreply.github.com>
AuthorDate: Thu Aug 22 20:19:24 2019 -0700

    Add final
---
 .../java/com/yahoo/sketches/tuple/HeapArrayOfDoublesAnotB.java    | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/yahoo/sketches/tuple/HeapArrayOfDoublesAnotB.java b/src/main/java/com/yahoo/sketches/tuple/HeapArrayOfDoublesAnotB.java
index 6e228a2..1d8d00d 100644
--- a/src/main/java/com/yahoo/sketches/tuple/HeapArrayOfDoublesAnotB.java
+++ b/src/main/java/com/yahoo/sketches/tuple/HeapArrayOfDoublesAnotB.java
@@ -62,8 +62,8 @@ final class HeapArrayOfDoublesAnotB extends ArrayOfDoublesAnotB {
     final long thetaA = a == null ? Long.MAX_VALUE : a.getThetaLong();
     final long thetaB = b == null ? Long.MAX_VALUE : b.getThetaLong();
     theta_ = Math.min(thetaA, thetaB);
-    if (a == null || a.getRetainedEntries() == 0) { return; }
-    if (b == null || b.getRetainedEntries() == 0) {
+    if ((a == null) || (a.getRetainedEntries() == 0)) { return; }
+    if ((b == null) || (b.getRetainedEntries() == 0)) {
       getNoMatchSetFromSketch(a);
     } else {
       final long[] hashTable;
@@ -106,7 +106,7 @@ final class HeapArrayOfDoublesAnotB extends ArrayOfDoublesAnotB {
 
   @Override
   public ArrayOfDoublesCompactSketch getResult(final WritableMemory mem) {
-    if (mem == null || count_ == 0) { return getResult(); }
+    if ((mem == null) || (count_ == 0)) { return getResult(); }
     final ArrayOfDoublesCompactSketch result = new DirectArrayOfDoublesCompactSketch(
       Arrays.copyOfRange(keys_, 0, count_),
       Arrays.copyOfRange(values_, 0, count_ * numValues_),
@@ -120,7 +120,7 @@ final class HeapArrayOfDoublesAnotB extends ArrayOfDoublesAnotB {
     return result;
   }
 
-  private static long[] convertToHashTable(final ArrayOfDoublesSketch sketch, long theta) {
+  private static long[] convertToHashTable(final ArrayOfDoublesSketch sketch, final long theta) {
     final int size = Math.max(
       ceilingPowerOf2((int) Math.ceil(sketch.getRetainedEntries() / REBUILD_THRESHOLD)),
       1 << MIN_LG_NOM_LONGS


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org


[incubator-datasketches-java] 03/03: Minor comment update

Posted by le...@apache.org.
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/incubator-datasketches-java.git

commit 0ba8f4c904ba252e60473cf90a84ed363c7db594
Author: Lee Rhodes <le...@users.noreply.github.com>
AuthorDate: Thu Aug 22 20:35:18 2019 -0700

    Minor comment update
---
 src/main/java/com/yahoo/sketches/fdt/PostProcessor.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/main/java/com/yahoo/sketches/fdt/PostProcessor.java b/src/main/java/com/yahoo/sketches/fdt/PostProcessor.java
index 85977cb..1a3bf08 100644
--- a/src/main/java/com/yahoo/sketches/fdt/PostProcessor.java
+++ b/src/main/java/com/yahoo/sketches/fdt/PostProcessor.java
@@ -106,6 +106,7 @@ public class PostProcessor {
     final int lgMapArrSize = Integer.numberOfTrailingZeros(mapArrSize);
 
     while (it.next()) {
+      //getSummary() is not a copy, but getValue() is
       final String[] arr = it.getSummary().getValue();
       final String priKey = getPrimaryKey(arr, priKeyIndices, sep);
       final long hash = stringHash(priKey);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org