Copilot commented on code in PR #682:
URL: https://github.com/apache/datasketches-java/pull/682#discussion_r2252809332


##########
src/main/java/org/apache/datasketches/quantiles/DirectUpdateDoublesSketchR.java:
##########
@@ -176,41 +175,46 @@ MemorySegment getMemorySegment() {
     return seg_;
   }
 
+  @Override
+  UpdateDoublesSketch getSketchAndReset() {
+    throw new SketchesReadOnlyException("Call to getResultAndReset() on 
read-only sketch");
+  }
+
   //Puts
 
   @Override
   void putMinItem(final double minQuantile) {
-    throw new SketchesReadOnlyException("Call to putMinQuantile() on read-only 
buffer");
+    throw new SketchesReadOnlyException("Call to putMinQuantile() on read-only 
sketch");
   }
 
   @Override
   void putMaxItem(final double maxQuantile) {
-    throw new SketchesReadOnlyException("Call to putMaxQuantile() on read-only 
buffer");
+    throw new SketchesReadOnlyException("Call to putMaxQuantile() on read-only 
sketch");
   }
 
   @Override
   void putN(final long n) {
-    throw new SketchesReadOnlyException("Call to putN() on read-only buffer");
+    throw new SketchesReadOnlyException("Call to putN() on read-only sketch");
   }
 
   @Override
   void putCombinedBuffer(final double[] combinedBuffer) {
-    throw new SketchesReadOnlyException("Call to putCombinedBuffer() on 
read-only buffer");
+    throw new SketchesReadOnlyException("Call to putCombinedBuffer() on 
read-only sketch");
   }
 
   @Override
   void putBaseBufferCount(final int baseBufferCount) {
-    throw new SketchesReadOnlyException("Call to putBaseBufferCount() on 
read-only buffer");
+    throw new SketchesReadOnlyException("Call to putBaseBufferCount() on 
read-only sketch");
   }
 
   @Override
   void putBitPattern(final long bitPattern) {
-    throw new SketchesReadOnlyException("Call to putBaseBufferCount() on 
read-only buffer");
+    throw new SketchesReadOnlyException("Call to putBaseBufferCount() on 
read-only sketch");

Review Comment:
   The error message refers to 'putBaseBufferCount()' but this is in the 
'putBitPattern()' method. The message should be 'Call to putBitPattern() on 
read-only sketch'.
   ```suggestion
       throw new SketchesReadOnlyException("Call to putBitPattern() on 
read-only sketch");
   ```



##########
src/main/java/org/apache/datasketches/quantiles/ItemsUnion.java:
##########
@@ -180,16 +178,13 @@ public ItemsSketch<T> getResult() {
   }
 
   /**
-   * Gets the result of this Union operation (without a copy) and resets this 
Union to the
-   * virgin state.
+   * Gets the sketch result of this Union operation and resets this Union to 
the virgin state.
    *
    * @return the result of this Union operation and reset.
    */
-  public ItemsSketch<T> getResultAndReset() {
+  public ItemsSketch<T> getResultAndReset() { //TODO

Review Comment:
   Remove the TODO comment as the implementation appears to be complete and 
functional.
   ```suggestion
     public ItemsSketch<T> getResultAndReset() {
   ```



-- 
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: dev-unsubscr...@datasketches.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@datasketches.apache.org
For additional commands, e-mail: dev-h...@datasketches.apache.org

Reply via email to