AlexanderSaydakov commented on a change in pull request #369:
URL: https://github.com/apache/datasketches-java/pull/369#discussion_r740704150



##########
File path: src/main/java/org/apache/datasketches/tuple/CompactSketch.java
##########
@@ -120,7 +120,7 @@
         }
       }
     } else { // current serial format
-      offset++;
+      offset++; //skip unused byte
       final byte flags = mem.getByte(offset++);
       offset += 2;

Review comment:
       here was another "unused" comment

##########
File path: src/main/java/org/apache/datasketches/tuple/HashTables.java
##########
@@ -80,13 +78,12 @@ void fromArrays(final long[] hashArr, final S[] summaryArr, 
final int count) {
     count_ = count;
     lgTableSize_ = getLgTableSize(count);
 
-    S mySummary = null;
     summaryTable_ = null;
     hashTable_ = new long[1 << lgTableSize_];
     for (int i = 0; i < count; i++) {
       final long hash = hashArr[i];
       final int index = hashInsertOnly(hashTable_, lgTableSize_, hash);
-      mySummary = summaryArr[i];
+      final S mySummary = summaryArr[i];

Review comment:
       I suppose in this case it is fine not to make copies. The sketch can 
take ownership of the given objects, right?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to