aturoczy commented on code in PR #4339:
URL: https://github.com/apache/hive/pull/4339#discussion_r1198013966
##########
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:
It is just my idiot style, but when a method returns a string I personally
do not invoke the toString() method, because eventually a method could return a
complex object and with this toString method it could hide the protentional
issue in compile time. I know a getPath will never returns differently. This is
just my way of thinking about it. (Also I see it was with the previous version)
--
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]