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



##########
File path: 
src/test/java/org/apache/datasketches/tuple/aninteger/MikhailsBugTuple.java
##########
@@ -0,0 +1,74 @@
+/*
+ * 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.
+ */
+
+package org.apache.datasketches.tuple.aninteger;
+
+import org.apache.datasketches.tuple.AnotB;
+import org.apache.datasketches.tuple.CompactSketch;
+import org.apache.datasketches.tuple.Intersection;
+import org.testng.annotations.Test;
+
+/**
+ * Issue #368, from Mikhail Lavrinovich 12 OCT 2021
+ * The failure was AnotB(estimating {<1.0,1,F}, 
Intersect(estimating{<1.0,1,F}, newDegenerative{<1.0,0,T},
+ * Which should be equal to AnotB(estimating{<1.0,1,F}, new{1.0,0,T} = 
estimating{<1.0, 1, F}. The AnotB
+ * threw a null pointer exception because it was not properly handling 
sketches with zero entries.
+ */

Review comment:
       > degenerate (technical definition): lacking some property, order, or 
distinctness of structure previously or usually present.
   
   The use of the term in the datasketches-java dictionary apply to sketches 
that are in exact mode, because they are _not_ sketching. They are essentially 
a list of hashes.  The property that is missing is the sketching property of 
probabilistic estimation. 
   
   Here I'm using degenerate in a different sense.  Sketches where Theta < 1.0 
and have zero entries.  The property that is missing are the entries! 




-- 
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