SML0127 commented on issue #10019:
URL: https://github.com/apache/iceberg/issues/10019#issuecomment-2016361743
@pvary
There's something strange about hive catalog.
When I check HiveCatalog.namespaceExists(namespace), it always return
`false`.
But when I create name space, it return error `Namespace already exists:
my_db`
Here is my code, and log
### code
```scala
val namespace = Namespace.of(database)
LOG.info(catalog.namespaceExists(namespace).toString)
if (!catalog.namespaceExists(namespace)) {
try {
catalog.createNamespace(namespace, namespaceProps)
} catch {
case e: Exception => LOG.info(e.getMessage)
}
}
LOG.info("TMP2: ============================")
try {
LOG.debug(catalog.loadNamespaceMetadata(namespace).toString)
} catch {
case e: Exception => LOG.info(e.getMessage)
}
```
### log
```d
2024-03-23 04:33:23.373 INFO IcebergSinkConfiguration$ [] - false
2024-03-23 04:33:23.393 INFO IcebergSinkConfiguration$ [] - Namespace
already exists: my_db
2024-03-23 04:33:23.393 INFO IcebergSinkConfiguration$ [] - TMP2:
============================
2024-03-23 04:33:23.396 INFO IcebergSinkConfiguration$ [] - Namespace does
not exist: my_db
2024-03-23 04:33:23.467 INFO org.apache.iceberg.BaseMetastoreTableOperations
[] - Refreshing table metadata from new version:
/warehouse/my_db.db/my_table/metadata/00000-4ee89001-8f63-4648-96bb-606d753e00a7.metadata.json
2024-03-23 04:33:23.761 INFO org.apache.iceberg.BaseMetastoreCatalog [] -
Table loaded by catalog: hive.my_db.my_table
```
--
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]