kbendick commented on code in PR #4503:
URL: https://github.com/apache/iceberg/pull/4503#discussion_r845281741


##########
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/procedures/RemoveOrphanFilesProcedure.java:
##########
@@ -80,16 +81,23 @@ public StructType outputType() {
   }
 
   @Override
+  @SuppressWarnings("checkstyle:CyclomaticComplexity")
   public InternalRow[] call(InternalRow args) {
     Identifier tableIdent = toIdentifier(args.getString(0), 
PARAMETERS[0].name());
     Long olderThanMillis = args.isNullAt(1) ? null : 
DateTimeUtil.microsToMillis(args.getLong(1));
     String location = args.isNullAt(2) ? null : args.getString(2);
     boolean dryRun = args.isNullAt(3) ? false : args.getBoolean(3);
     Integer maxConcurrentDeletes = args.isNullAt(4) ? null : args.getInt(4);
+    String tableWithActualFilePaths = args.isNullAt(5) ? null : 
args.getString(5);
 
     Preconditions.checkArgument(maxConcurrentDeletes == null || 
maxConcurrentDeletes > 0,
             "max_concurrent_deletes should have value > 0,  value: " + 
maxConcurrentDeletes);
 
+    Preconditions.checkArgument(
+            tableWithActualFilePaths == null || (location == null && 
olderThanMillis == null),
+            "actual_files_table cannot be used with `location` or `older_than`"

Review Comment:
   Nit: I think this is over-indented. Code continued on the next line should 
be indented 4 spaces over from its starting point.
   
   That said, it does line up with the argument on the line above it.



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