the-other-tim-brown commented on code in PR #967:
URL: https://github.com/apache/incubator-xtable/pull/967#discussion_r4238990791


##########
xtable-core/src/main/java/org/apache/xtable/hudi/BaseFileUpdatesExtractor.java:
##########
@@ -288,9 +288,9 @@ private String getHudiPartitionPath(Path tableBasePath, 
InternalDataFile file) {
             prefix -> {
               Preconditions.checkArgument(
                   partitionPath.endsWith(prefix),
-                  "File %s is not under its partition subdirectory %s",
-                  file.getPhysicalPath(),
-                  prefix);
+                  String.format(

Review Comment:
   The old approach allows for lazily constructing the string, could we still 
do the same here by avoiding the use of `checkArgument` and just do something 
like:
   ```
   if (!partitionPath.endsWith(prefix)) {
     throw new IllegalArgumentException(String.format(...))
   }
   ```



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

Reply via email to