nastra commented on code in PR #6474:
URL: https://github.com/apache/iceberg/pull/6474#discussion_r1081008028


##########
core/src/main/java/org/apache/iceberg/BaseTable.java:
##########
@@ -48,6 +49,7 @@ public BaseTable(TableOperations ops, String name) {
   }
 
   public BaseTable(TableOperations ops, String name, MetricsReporter reporter) 
{
+    Preconditions.checkNotNull(reporter, "reporter cannot be null");

Review Comment:
   the reason why I made the suggestion is mainly because the error msg should 
be updated to `Invalid metrics reporter: null`. Additionally I checked the code 
around table scans and scan metrics. Since those places all use  
`Preconditions.checkArgument` it seems more appropriate to use the same here 
IMO.



-- 
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: issues-unsubscr...@iceberg.apache.org

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


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

Reply via email to