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



##########
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 validateReferencedColumns(Schema schema) {
+    for (String column : columnModes.keySet()) {
+      ValidationException.check(
+          schema.findField(column) != null,
+          "Could not find column %s from metrics in schema %s", column, 
schema);

Review comment:
       Just thinking out loud: will be clear for an inexperienced user what is 
wrong?
   Is `from metrics` descriptive enough? Should we make it `from metrics 
config`?
   Or make it as `Invalid metrics config: could not find column %s in schema 
%s`?
   




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