You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/06/07 08:20:39 UTC

[GitHub] [flink] twalthr commented on a change in pull request #8651: [FLINK-12769][table-common] Simplify expression design for symbols

twalthr commented on a change in pull request #8651: [FLINK-12769][table-common] Simplify expression design for symbols
URL: https://github.com/apache/flink/pull/8651#discussion_r291494533
 
 

 ##########
 File path: flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/ObjectIdentifier.java
 ##########
 @@ -0,0 +1,132 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.catalog;
+
+import org.apache.flink.util.Preconditions;
+
+import javax.annotation.Nullable;
+
+import java.io.Serializable;
+import java.util.Objects;
+import java.util.Optional;
+
+import static org.apache.flink.table.utils.EncodingUtils.escapeIdentifier;
+
+/**
+ * Identifies an object in a catalog. It allows to identify objects such as tables, views, function,
+ * or types in a catalog. An identifier must not be fully qualified. It is the responsibility of the
+ * catalog manager to resolve an identifier to an object; e.g. by assuming default catalog/database.
+ *
+ * <p>While {@link ObjectPath} is used within the same catalog, instances of this class can be used
+ * across catalogs.
+ *
+ * <p>Two objects are considered equal if they share the same type identifier in a stable session context.
+ */
+public final class ObjectIdentifier implements Serializable {
+
+	private @Nullable String catalogName;
+
+	private @Nullable String databaseName;
+
+	private String objectName;
+
+	public static ObjectIdentifier of(String catalogName, String databaseName, String objectName) {
 
 Review comment:
   I thought about that again. I agree. We should have it always fully qualified.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services