slfan1989 commented on code in PR #13837:
URL: https://github.com/apache/iceberg/pull/13837#discussion_r2290634804
##########
open-api/src/testFixtures/java/org/apache/iceberg/rest/RESTCatalogServer.java:
##########
@@ -86,7 +86,7 @@ private CatalogContext initializeBackendCatalog() throws
IOException {
if (warehouseLocation == null) {
File tmp =
java.nio.file.Files.createTempDirectory("iceberg_warehouse").toFile();
tmp.deleteOnExit();
- warehouseLocation = new File(tmp, "iceberg_data").getAbsolutePath();
+ warehouseLocation = new File(tmp, "iceberg_data").toURI().toString();
Review Comment:
I provided a more detailed explanation in #13882. The issue arises because
the path generated by REST uses getAbsolutePath(), while the current unit tests
use targetTableDir.toFile().toURI().toString(). Since the two paths do not
match, the unit tests fail.
```
Path
file:/var/folders/2k/21gv5vmx6z7dlr1g0_jtm8r80000ks/T/iceberg_warehouse10689209309257803697/iceberg_data/default/table/data/deletes.parquet
does not start with
/var/folders/2k/21gv5vmx6z7dlr1g0_jtm8r80000ks/T/iceberg_warehouse10689209309257803697/iceberg_data/default/table/
java.lang.IllegalArgumentException: Path
file:/var/folders/2k/21gv5vmx6z7dlr1g0_jtm8r80000ks/T/iceberg_warehouse10689209309257803697/iceberg_data/default/table/data/deletes.parquet
does not start with
/var/folders/2k/21gv5vmx6z7dlr1g0_jtm8r80000ks/T/iceberg_warehouse10689209309257803697/iceberg_data/default/table/
at
org.apache.iceberg.RewriteTablePathUtil.relativize(RewriteTablePathUtil.java:686)
at
org.apache.iceberg.RewriteTablePathUtil.newPath(RewriteTablePathUtil.java:663)
at
org.apache.iceberg.RewriteTablePathUtil.writeDeleteFileEntry(RewriteTablePathUtil.java:492)
at
org.apache.iceberg.RewriteTablePathUtil.lambda$rewriteDeleteManifest$5(RewriteTablePathUtil.java:438)
at
java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
at
java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845)
at
java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
```
--
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]