nastra commented on code in PR #14653:
URL: https://github.com/apache/iceberg/pull/14653#discussion_r2558786587
##########
core/src/test/java/org/apache/iceberg/view/ViewCatalogTests.java:
##########
@@ -63,6 +63,14 @@ public abstract class ViewCatalogTests<C extends ViewCatalog
& SupportsNamespace
@TempDir private Path tempDir;
+ protected String baseViewLocation(TableIdentifier identifier) {
+ String combinedPath = tempDir.toUri().toString();
+ combinedPath =
+ RewriteTablePathUtil.combinePaths(combinedPath,
identifier.namespace().toString());
+ combinedPath = RewriteTablePathUtil.combinePaths(combinedPath,
identifier.name());
Review Comment:
I'm not sure it's a good idea to use RewriteTablePathUtil here. I believe
the default behavior should be to do what was previously done with the pathing,
which subclasses can then override if needed. That's also what we do in the
`CatalogTests`. So this should be something like:
```
protected String viewLocation(TableIdentifier identifier) {
return tempDir.toUri() + "/" + identifier.namespace() + "/" +
identifier.name();
}
```
alternatively, `viewLocation` could take `Path` as a parameter instead of
the identifier for cases such as in `updateViewLocation()` where we just
construct a path that isn't derived from its identifier.
This should also work for subclasses by just overriding the method and
deciding what to do with the given Path/Identifier
--
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]