slinkydeveloper commented on a change in pull request #18370:
URL: https://github.com/apache/flink/pull/18370#discussion_r785007423
##########
File path:
flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/ObjectIdentifier.java
##########
@@ -42,50 +45,88 @@
@PublicEvolving
public final class ObjectIdentifier implements Serializable {
- private final String catalogName;
-
- private final String databaseName;
+ static final String UNKNOWN = "<UNKNOWN>";
+ @Nullable private final String catalogName;
+ @Nullable private final String databaseName;
private final String objectName;
public static ObjectIdentifier of(String catalogName, String databaseName,
String objectName) {
- return new ObjectIdentifier(catalogName, databaseName, objectName);
+ if (Objects.equals(catalogName, UNKNOWN) ||
Objects.equals(databaseName, UNKNOWN)) {
+ throw new IllegalArgumentException(
Review comment:
Also, returning anonymous in if the user passes `<UNKNOWN>` for catalog
and database name case means exposing the `ofAnonymous` functionality
--
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]