Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10893#discussion_r50668080
  
    --- Diff: 
common/sketch/src/main/java/org/apache/spark/util/sketch/CountMinSketch.java ---
    @@ -99,19 +120,44 @@
        *
        * Note that only Count-Min sketches with the same {@code depth}, {@code 
width}, and random seed
        * can be merged.
    +   *
    +   * @exception CountMinSketchMergeException if the {@code other} {@link 
CountMinSketch} has
    +   *            incompatible depth, width, relative-error, confidence, or 
random seed.
        */
    -  public abstract CountMinSketch mergeInPlace(CountMinSketch other);
    +  public abstract CountMinSketch mergeInPlace(CountMinSketch other)
    +      throws CountMinSketchMergeException;
     
       /**
        * Writes out this {@link CountMinSketch} to an output stream in binary 
format.
        */
    -  public abstract void writeTo(OutputStream out);
    +  public abstract void writeTo(OutputStream out) throws IOException;
     
       /**
        * Reads in a {@link CountMinSketch} from an input stream.
        */
    -  public static CountMinSketch readFrom(InputStream in) {
    -    throw new UnsupportedOperationException("Not implemented yet");
    +  public static CountMinSketch readFrom(InputStream in) throws IOException 
{
    +    DataInputStream dis = new DataInputStream(in);
    --- End diff --
    
    also somewhere in CountMinSketchImpl we should document the serialization 
format.
     


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to