pvary commented on a change in pull request #2658:
URL: https://github.com/apache/iceberg/pull/2658#discussion_r648127758



##########
File path: core/src/main/java/org/apache/iceberg/InheritableMetadataFactory.java
##########
@@ -46,18 +49,28 @@ static InheritableMetadata forCopy(long snapshotId) {
     private final int specId;
     private final long snapshotId;
     private final long sequenceNumber;
+    private final String tableLocation;
+    private final Map<String, String> tableProperties;
 
-    private BaseInheritableMetadata(int specId, long snapshotId, long 
sequenceNumber) {
+    private BaseInheritableMetadata(int specId, long snapshotId, long 
sequenceNumber, String tableLocation,
+        Map<String, String> tableProperties) {
       this.specId = specId;
       this.snapshotId = snapshotId;
       this.sequenceNumber = sequenceNumber;
+      this.tableLocation = tableLocation;
+      this.tableProperties = tableProperties;
     }
 
     @Override
     public <F extends ContentFile<F>> ManifestEntry<F> apply(ManifestEntry<F> 
manifestEntry) {
       if (manifestEntry.file() instanceof BaseFile) {
         BaseFile<?> file = (BaseFile<?>) manifestEntry.file();
         file.setSpecId(specId);
+        if (MetadataPaths.useRelativePath(tableProperties)) {
+          if (!file.path().toString().startsWith(tableLocation)) {

Review comment:
       Why do not we push this logic inside the `otAbsolutePath` method?
   
   This is only a question which we might to consider, I myself not sure about 
the answer yet.




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

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