JingsongLi commented on code in PR #1051:
URL: https://github.com/apache/incubator-paimon/pull/1051#discussion_r1185682566
##########
paimon-core/src/main/java/org/apache/paimon/schema/SchemaManager.java:
##########
@@ -68,12 +70,14 @@ public class SchemaManager implements Serializable {
private final FileIO fileIO;
private final Path tableRoot;
+ private final Identifier identifier;
@Nullable private transient Lock lock;
public SchemaManager(FileIO fileIO, Path tableRoot) {
this.fileIO = fileIO;
this.tableRoot = tableRoot;
+ this.identifier = Identifier.fromPath(tableRoot, true);
Review Comment:
Can we just create a util method?
`Identifier tableIdentifier`
##########
paimon-core/src/main/java/org/apache/paimon/catalog/Identifier.java:
##########
@@ -87,21 +88,41 @@ public static Identifier fromString(String fullName) {
}
public static Identifier fromPath(Path tablePath) {
- return fromPath(tablePath.getPath());
+ return fromPath(tablePath, false);
}
public static Identifier fromPath(String tablePath) {
+ return fromPath(tablePath, false);
+ }
+
+ public static Identifier fromPath(Path tablePath, boolean
ignoreIfUnknownDatabase) {
+ return fromPath(tablePath.getPath(), ignoreIfUnknownDatabase);
+ }
+
+ public static Identifier fromPath(String tablePath, boolean
ignoreIfUnknownDatabase) {
Review Comment:
Consider `Identifier` is a public api, can we just put these logical in
[SchemaManager.java](https://github.com/apache/incubator-paimon/pull/1051/files#diff-fdc47daefd9d3a55f45fde8385a8be476f6834c30649f7f5bae98cbe90f15dbb)?
--
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]