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



##########
File path: core/src/main/java/org/apache/iceberg/MetricsConfig.java
##########
@@ -96,6 +98,28 @@ public static MetricsConfig forTable(Table table) {
     return from(table.properties(), table.sortOrder());
   }
 
+  /**
+   * Creates a metrics config for a position delete file.
+   *
+   * @param table an Iceberg table
+   */
+  public static MetricsConfig forPositionDelete(Table table) {
+    MetricsConfig config = new MetricsConfig();
+
+    config.columnModes.put(MetadataColumns.DELETE_FILE_PATH.name(), 
MetricsModes.Full.get());
+    config.columnModes.put(MetadataColumns.DELETE_FILE_POS.name(), 
MetricsModes.Full.get());
+
+    MetricsConfig tableConfig = forTable(table);
+
+    config.defaultMode = tableConfig.defaultMode;
+    tableConfig.columnModes.forEach((columnAlias, mode) -> {
+      String newColumnAlias = 
DOT.join(MetadataColumns.DELETE_FILE_ROW_FIELD_NAME, columnAlias);

Review comment:
       After thinking more, I've decided not to expose it just yet. We have 
been debating whether to switch to column IDs and since there is no clarity on 
what changes will be required and this particular functionality is not needed 
anywhere outside of this class, it seems safer to keep it internal. We can 
always expose once needed.
   
   I did change the var name, though.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to