vinishjail97 commented on code in PR #835:
URL: https://github.com/apache/incubator-xtable/pull/835#discussion_r4108955456


##########
xtable-core/src/main/java/org/apache/xtable/hudi/BaseFileUpdatesExtractor.java:
##########
@@ -273,17 +315,31 @@ private WriteStatus toWriteStatus(
     WriteStatus writeStatus = new WriteStatus();
     Path path = new CachingPath(file.getPhysicalPath());
     String partitionPath =
-        partitionPathOptional.orElseGet(() -> 
HudiPathUtils.getPartitionPath(tableBasePath, path));
+        partitionPathOptional.orElseGet(() -> truePartitionPath(tableBasePath, 
path));
     String fileId = getFileId(path);
     String filePath =
         
path.toUri().getPath().substring(tableBasePath.toUri().getPath().length() + 1);
     String fileName = path.getName();
+    Optional<String> fileGroupPrefix = externalFileGroupPrefix(path);
+    // For external bucketed files encode the file-group prefix in the marker 
and keep the file name
+    // (not the bucket-relative path) as the marked name; otherwise fall back 
to the plain marker on
+    // the full relative path. In both cases the directory portion is 
preserved as-is.
+    String markedPath =
+        fileGroupPrefix
+            .map(
+                prefix ->
+                    filePath.substring(0, filePath.length() - 
fileName.length())
+                        + 
ExternalFilePathUtil.appendCommitTimeAndExternalFileMarker(
+                            fileName, commitTime, prefix))

Review Comment:
   Tracking this in 0.5.0 release notes. 



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