rdblue commented on a change in pull request #3387:
URL: https://github.com/apache/iceberg/pull/3387#discussion_r749816989
##########
File path: core/src/main/java/org/apache/iceberg/TableProperties.java
##########
@@ -244,4 +245,41 @@ private TableProperties() {
public static final String UPSERT_MODE_ENABLE = "write.upsert.enable";
public static final boolean UPSERT_MODE_ENABLE_DEFAULT = false;
+
+ /**
+ * Get a table property for a specific Iceberg action's config option.
+ * <p>
+ * For example, {@link
org.apache.iceberg.actions.RewriteDataFiles#TARGET_FILE_SIZE_BYTES} corresponds
to
+ * table property actions.rewrite-data-files.target-file-size-bytes
+ *
+ * @param action name of the iceberg action, retrieved from the NAME
variable of the specific action if exists.
+ * The name is assumed to be in lower-case-kebab-style.
+ * @param option config option name, typically defined as public static
variables in the specific action.
+ * The name is assumed to be in lower-case-kebab-style.
+ * @return table property name
+ */
+ public static String actionTableProperty(String action, String option) {
Review comment:
Updating `TableProperties` like this seems overkill to me. I don't think
it is a good idea for anyone to use these methods, so I'd either hide them in a
different util class or just have the method that does the resolution build the
property itself.
--
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]