Yicong-Huang commented on code in PR #6315:
URL: https://github.com/apache/texera/pull/6315#discussion_r3739200338
##########
common/workflow-core/src/test/scala/org/apache/texera/amber/core/storage/LocalInMemoryIcebergCatalog.scala:
##########
@@ -57,9 +58,9 @@ object LocalHadoopIcebergCatalog {
.forEach((p: Path) => Files.deleteIfExists(p))
catch { case _: Throwable => () }
}
- IcebergCatalogInstance.replaceInstance(
- IcebergUtil.createHadoopCatalog("wfcore-test", warehouse)
- )
+ val catalog = new InMemoryCatalog()
+ catalog.initialize("wfcore-test", Map("warehouse" ->
warehouse.toString).asJava)
Review Comment:
`InMemoryCatalog` hardwires `InMemoryFileIO` (iceberg-core 1.9.2:
`InMemoryOutputFile` writes to a `ByteArrayOutputStream`), so this warehouse
path only prefixes table location strings. The temp directory above is created,
stays empty, then gets deleted by the shutdown hook. That is all dead weight
now, and the Scaladoc's "backed by a temp-directory warehouse" sends the next
reader looking for storage that isn't there. A plain constant location string
would do. `IcebergTableWriterSpec.beforeAll` has the same leftover, where the
empty directory is never cleaned up at all.
##########
common/workflow-core/src/test/scala/org/apache/texera/amber/core/storage/result/iceberg/IcebergDocumentSpec.scala:
##########
@@ -37,9 +37,9 @@ import java.util.UUID
import java.util.zip.ZipInputStream
/**
- * Unit-level tests for [[IcebergDocument]] running against a local
Hadoop-backed
+ * Unit-level tests for [[IcebergDocument]] running against a local in-memory
* Iceberg catalog (temp `file:/` warehouse) installed into the shared
Review Comment:
The parenthetical is left over from the HadoopCatalog wording and now
contradicts the sentence it sits in. `InMemoryCatalog` serves everything
through `InMemoryFileIO`, so nothing ever reaches a `file:/` warehouse —
`warehouse` only prefixes table location strings. Line 106 carries the same
stale phrasing.
```suggestion
* Iceberg catalog installed into the shared
```
--
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]