reswqa commented on code in PR #35:
URL: 
https://github.com/apache/flink-connector-pulsar/pull/35#discussion_r1135570134


##########
flink-connector-pulsar/src/main/java/org/apache/flink/connector/pulsar/table/catalog/converter/CatalogTableConverter.java:
##########
@@ -0,0 +1,94 @@
+/*
+ * 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.connector.pulsar.table.catalog.converter;
+
+import 
org.apache.flink.connector.pulsar.table.catalog.config.CatalogConfiguration;
+import org.apache.flink.connector.pulsar.table.schema.SchemaTranslatorUtils;
+import org.apache.flink.table.api.Schema;
+import org.apache.flink.table.catalog.CatalogBaseTable;
+import org.apache.flink.table.catalog.CatalogTable;
+import org.apache.flink.table.catalog.ResolvedCatalogTable;
+import org.apache.flink.table.catalog.ResolvedSchema;
+
+import org.apache.flink.shaded.guava30.com.google.common.base.Converter;
+
+import org.apache.pulsar.common.schema.SchemaInfo;
+import org.apache.pulsar.common.schema.SchemaType;
+
+import java.util.Map;
+
+import static java.util.Collections.emptyList;
+import static java.util.Collections.emptyMap;
+import static org.apache.flink.util.Preconditions.checkArgument;
+
+/**
+ * A converter for converting the {@link CatalogBaseTable} to Pulsar topic 
schema's properties and
+ * backward converting.
+ *
+ * <p>We will support two types of conversion in this tool. They are the 
tables created by catalog
+ * and the tables that are not created and managed by catalog. We will use an 
internal flag {@code
+ * FLINK_TABLE_FLAG} in schema properties to mark the related tables as the 
catalog table.
+ *
+ * <p>All the tables created by the flink catalog will hava a translated 
schema which matches the
+ * given table columns.
+ */
+@SuppressWarnings("java:S2160")
+public class CatalogTableConverter extends Converter<CatalogBaseTable, 
SchemaInfo> {

Review Comment:
   ```suggestion
   public class CatalogTableToSchemaInfoConverter extends 
Converter<CatalogBaseTable, SchemaInfo> {
   ```



-- 
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]

Reply via email to