deniskuzZ commented on code in PR #4339:
URL: https://github.com/apache/hive/pull/4339#discussion_r1198733342


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveTableUtil.java:
##########
@@ -146,8 +149,21 @@ private static List<DataFile> 
getDataFiles(RemoteIterator<LocatedFileStatus> fil
       if (fileName.startsWith(".") || fileName.startsWith("_") || 
fileName.endsWith("metadata.json")) {
         continue;
       }
-      dataFiles.addAll(TableMigrationUtil.listPartition(partitionKeys, 
fileStatus.getPath().toString(), format, spec,
-          conf, metricsConfig, nameMapping));
+      partitionKeys.replaceAll((key, value) -> 
FileUtils.escapePathName(value));
+
+      int[] stringFields = IntStream.range(0, spec.javaClasses().length)
+        .filter(i -> 
spec.javaClasses()[i].isAssignableFrom(String.class)).toArray();
+
+      dataFiles.addAll(Lists.transform(
+          TableMigrationUtil.listPartition(partitionKeys, 
fileStatus.getPath().toString(), format, spec,

Review Comment:
   getPath() returns `Path` object, not a String. 
`TableMigrationUtil.listPartition` expects String here and it's an Iceberg code.



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