pan3793 commented on code in PR #13106:
URL: https://github.com/apache/iceberg/pull/13106#discussion_r2182146580


##########
spark/v4.0/spark/src/main/java/org/apache/iceberg/spark/procedures/RemoveOrphanFilesProcedure.java:
##########
@@ -50,21 +53,28 @@
  * @see SparkActions#deleteOrphanFiles(Table)
  */
 public class RemoveOrphanFilesProcedure extends BaseProcedure {
+
+  public static final String NAME = "remove_orphan_files";
+
   private static final Logger LOG = 
LoggerFactory.getLogger(RemoveOrphanFilesProcedure.class);
 
   private static final ProcedureParameter[] PARAMETERS =
       new ProcedureParameter[] {
-        ProcedureParameter.required("table", DataTypes.StringType),
-        ProcedureParameter.optional("older_than", DataTypes.TimestampType),
-        ProcedureParameter.optional("location", DataTypes.StringType),
-        ProcedureParameter.optional("dry_run", DataTypes.BooleanType),
-        ProcedureParameter.optional("max_concurrent_deletes", 
DataTypes.IntegerType),
-        ProcedureParameter.optional("file_list_view", DataTypes.StringType),
-        ProcedureParameter.optional("equal_schemes", STRING_MAP),
-        ProcedureParameter.optional("equal_authorities", STRING_MAP),
-        ProcedureParameter.optional("prefix_mismatch_mode", 
DataTypes.StringType),
+        ProcedureParameter.in("table", DataTypes.StringType).build(),
+        ProcedureParameter.in("older_than", 
DataTypes.TimestampType).defaultValue("NULL").build(),

Review Comment:
   Created 3 helper methods in BaseProcedure
   ```
   ProcedureParameter requiredInParameter(String name, DataType dataType);
   ProcedureParameter optionalInParameter(String name, DataType dataType);
   ProcedureParameter optionalInParameter(String name, DataType dataType, 
String defaultValue);
   ```



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