aokolnychyi commented on a change in pull request #2048:
URL: https://github.com/apache/iceberg/pull/2048#discussion_r555826081



##########
File path: core/src/main/java/org/apache/iceberg/MetricsConfig.java
##########
@@ -74,6 +75,14 @@ public static MetricsConfig fromProperties(Map<String, 
String> props) {
     return spec;
   }
 
+  public void validateProperties(Schema schema) {

Review comment:
       I am not sure `validateProperties` is the most descriptive name in this 
case.
   
   Something like `validateReferencedColumns` or similar would probably convey 
the purpose more. For example, we don't validate the property values here (if a 
value is invalid, it will be defaulted). We just check the config refers to 
valid columns.
   
   Alternatively to changing the name, we can make this method static and 
accept both properties as well as schema. For example, we may invoke it as 
`MetricsConfig.validateProperties(props, schema)` and it will check both the 
column names as well as metrics modes (we can overload `fromProperties` so that 
it will throw an exception instead of defaulting).
   
   Thoughts, @holdenk @rdblue @RussellSpitzer @shardulm94?




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

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