Copilot commented on code in PR #4536:
URL: https://github.com/apache/polaris/pull/4536#discussion_r3298153645


##########
runtime/service/src/test/java/org/apache/polaris/service/task/TestSnapshot.java:
##########
@@ -116,14 +116,16 @@ public Map<String, String> summary() {
     return Map.of();
   }
 
+  @Deprecated
   @Override
   public Iterable<DataFile> addedDataFiles(FileIO io) {
-    return null;
+    throw new UnsupportedOperationException();
   }
 
+  @Deprecated
   @Override
   public Iterable<DataFile> removedDataFiles(FileIO io) {
-    return null;
+    throw new UnsupportedOperationException();
   }

Review Comment:
   Throwing UnsupportedOperationException without a message makes failures 
harder to diagnose when this test stub is accidentally used via the deprecated 
Snapshot API. Add a short message to clarify what is unsupported.



##########
runtime/service/src/test/java/org/apache/polaris/service/task/TestSnapshot.java:
##########
@@ -116,14 +116,16 @@ public Map<String, String> summary() {
     return Map.of();
   }
 
+  @Deprecated
   @Override
   public Iterable<DataFile> addedDataFiles(FileIO io) {
-    return null;
+    throw new UnsupportedOperationException();
   }

Review Comment:
   Throwing UnsupportedOperationException without a message makes failures 
harder to diagnose when this test stub is accidentally used via the deprecated 
Snapshot API. Add a short message to clarify what is unsupported.



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

Reply via email to