lirui-apache commented on a change in pull request #3790:
URL: https://github.com/apache/iceberg/pull/3790#discussion_r774466558
##########
File path:
hive-metastore/src/test/java/org/apache/iceberg/hive/TestHiveCatalog.java
##########
@@ -287,7 +285,11 @@ public void testCreateNamespace() throws TException {
AlreadyExistsException.class, "Namespace '" + namespace1 + "' already
exists!", () -> {
catalog.createNamespace(namespace1);
});
- ImmutableMap newMeta = ImmutableMap.<String, String>builder()
+ String hiveLocalDir = temp.newFolder().toURI().toString();
+ if (hiveLocalDir.endsWith("/")) {
Review comment:
The `java.io.File::toURI` doc mentions:
```java
* <p> The exact form of the URI is system-dependent. If it can be
* determined that the file denoted by this abstract pathname is a
* directory, then the resulting URI will end with a slash.
```
Not sure if that guarantees a trailing slash, so I added the check to be
safe.
And btw the trailing slash (if any) is removed when hive converts the string
to a Hadoop Path object:
https://github.com/apache/hadoop/blob/rel/release-2.7.3/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Path.java#L237
--
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]