You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/11/30 04:15:21 UTC

[GitHub] [iceberg] stevenzwu commented on a diff in pull request #6313: Flink: use correct metric config for position deletes

stevenzwu commented on code in PR #6313:
URL: https://github.com/apache/iceberg/pull/6313#discussion_r1035511519


##########
core/src/main/java/org/apache/iceberg/MetricsConfig.java:
##########
@@ -107,6 +107,30 @@ public static MetricsConfig forPositionDelete(Table table) {
     return new MetricsConfig(columnModes.build(), defaultMode);
   }
 
+  /**
+   * Creates a metrics config for a position delete file.
+   *
+   * @param props table configuration
+   */
+  public static MetricsConfig forPositionDelete(Map<String, String> props) {

Review Comment:
   should we use the method from line 91?
   ```
    public static MetricsConfig forPositionDelete(Table table) {
   ```
   
   Flink write properties allows override of table properties for write (e.g. compression configs). Do we have such use cases for metrics config?
   
   I am asking because the current `fromProperties` method (for data files) is deprecated in favor of the method `forTable`.
   ```
     /**
      * Creates a metrics config from table configuration.
      *
      * @param props table configuration
      * @deprecated use {@link MetricsConfig#forTable(Table)}
      */
     @Deprecated
     public static MetricsConfig fromProperties(Map<String, String> props) {
   ```



-- 
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-unsubscribe@iceberg.apache.org

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


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