aokolnychyi commented on code in PR #8262:
URL: https://github.com/apache/iceberg/pull/8262#discussion_r1289366666


##########
spark/v3.4/spark-extensions/src/jmh/java/org/apache/iceberg/spark/PlanningBenchmark.java:
##########
@@ -246,18 +272,19 @@ private void initDataAndDeletes() throws 
NoSuchTableException {
       RowDelta rowDelta = table.newRowDelta();
 
       for (int fileOrdinal = 0; fileOrdinal < NUM_DELETE_FILES_PER_PARTITION; 
fileOrdinal++) {
+        String replicaFileName = UUID.randomUUID() + "-replica.parquet";
         DeleteFile replicaDeleteFile =
-            FileMetadata.deleteFileBuilder(table.spec())
+            FileMetadata.deleteFileBuilder(spec)
                 .copy(deleteFile)
-                .withPath("replica-" + fileOrdinal + "-" + deleteFile.path())
+                .withPath(locations.newDataLocation(spec, 
deleteFile.partition(), replicaFileName))

Review Comment:
   Not all delete and files are fake, so there would be matches. Previously, it 
was not fair as the prefix of the replicated delete file never matched the 
table location so it was immediately discarded. In practice, however, there is 
always some common prefix so the comparison takes more time.



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

Reply via email to