You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "deniskuzZ (via GitHub)" <gi...@apache.org> on 2023/05/19 09:11:35 UTC
[GitHub] [hive] deniskuzZ commented on a diff in pull request #4339: Encode Iceberg partition key values to avoid unnecessary partition keys split in DataFiles.fillFromPath
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
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org