You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by GitBox <gi...@apache.org> on 2021/10/21 18:43:10 UTC

[GitHub] [datasketches-java] leerho commented on a change in pull request #370: serial version 3 for compatibility with C++

leerho commented on a change in pull request #370:
URL: https://github.com/apache/datasketches-java/pull/370#discussion_r733955001



##########
File path: src/main/java/org/apache/datasketches/tuple/CompactSketch.java
##########
@@ -41,11 +41,14 @@
  */
 public class CompactSketch<S extends Summary> extends Sketch<S> {
   private static final byte serialVersionWithSummaryClassNameUID = 1;
-  private static final byte serialVersionUID = 2;
+  private static final byte serialVersionUID2 = 2;
+  private static final byte serialVersionUID = 3;
+  private static final short defaultSeedHash = (short) 37836; // for compatibility with C++
   private long[] hashArr_;
   private S[] summaryArr_;
 
-  private enum Flags { IS_BIG_ENDIAN, IS_EMPTY, HAS_ENTRIES, IS_THETA_INCLUDED }
+  private enum FlagsV2 { IS_BIG_ENDIAN, IS_EMPTY, HAS_ENTRIES, IS_THETA_INCLUDED }
+  private enum Flags { IS_BIG_ENDIAN, IS_READ_ONLY, IS_EMPTY, IS_COMPACT, IS_ORDERED }

Review comment:
       I would rename FlagsV2 as FlagsOld or FlagsM1 (for minus 1).  V2 sounds like a later version.




-- 
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: commits-unsubscribe@datasketches.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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