the-other-tim-brown commented on code in PR #728:
URL: https://github.com/apache/incubator-xtable/pull/728#discussion_r2298077680
##########
xtable-core/src/main/java/org/apache/xtable/hudi/HudiPathUtils.java:
##########
@@ -28,4 +28,8 @@ public static String getPartitionPath(Path tableBasePath,
Path filePath) {
int endIndex = pathStr.length() - fileName.length() - 1;
return endIndex <= startIndex ? "" : pathStr.substring(startIndex,
endIndex);
}
+
+ public static String getPartitionPathValue(Path tableBasePath, Path
filePath) {
+ return getPartitionPath(tableBasePath, filePath).split("=")[1];
+ }
Review Comment:
We use the user provided partition spec for Hudi to determine the mapping of
field in the data to the partition path pattern. For example, a field in the
data called `ts` is mapped to `year=YYYY/month=MM/day=DD` with a config
`ts:DAY:year=YYYY/month=MM/day=DD`.
--
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]