You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by "chestnut-c (via GitHub)" <gi...@apache.org> on 2023/06/13 07:52:41 UTC

[GitHub] [inlong] chestnut-c opened a new pull request, #8223: [INLONG-8222][Manager] Adopt strategist mode to support different types of data type mapping for different data sources

chestnut-c opened a new pull request, #8223:
URL: https://github.com/apache/inlong/pull/8223

   [INLONG-8222][Manager] Adopt strategist mode to support different types of data type mapping for different data sources.
   
   - Fixes #8222
   
   ### Motivation
   
   Using strategist mode to support the mapping relationship between different data source custom data types and flink data types , It supports the mapping of different data types from different data sources as a whole, supplementing the deficiencies of the current types and fix bug ( https://github.com/apache/inlong/issues/8091 ).


-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] gong commented on pull request #8223: [INLONG-8222][Manager] Adopt strategist mode to support different types of data type mapping for different data sources

Posted by "gong (via GitHub)" <gi...@apache.org>.
gong commented on PR #8223:
URL: https://github.com/apache/inlong/pull/8223#issuecomment-1588796827

   > > @chestnut-c It need add type precision support. Only add simple type mapping is not enough. You can see `org.apache.inlong.manager.pojo.sort.util.FieldFormatUtils` to implement this function.
   > 
   > Make the basic type first to ensure that each source can run normally, and then further supplement the accuracy of the type.
   
   ok


-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] chestnut-c commented on a diff in pull request #8223: [INLONG-8222][Manager] Adopt strategist mode to support different types of data type mapping for different data sources

Posted by "chestnut-c (via GitHub)" <gi...@apache.org>.
chestnut-c commented on code in PR #8223:
URL: https://github.com/apache/inlong/pull/8223#discussion_r1227725968


##########
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/datatype/datasource/BaseDataType.java:
##########
@@ -0,0 +1,38 @@
+/*
+ * 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.inlong.manager.common.datatype.datasource;
+
+/**
+ * The interface of base data type mapping
+ */
+public interface BaseDataType {
+
+    /**
+     * Get the original data type.
+     *
+     * @return The original data type
+     */
+    String getOriginalType();
+
+    /**
+     * Get the target data type of flink data type mapping
+     *
+     * @return The target data type

Review Comment:
   > It should be inlong type. inlong will convert to flink type for sort.
   
   ok, i will change it



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] chestnut-c commented on a diff in pull request #8223: [INLONG-8222][Manager] Adopt strategist mode to support different types of data type mapping for different data sources

Posted by "chestnut-c (via GitHub)" <gi...@apache.org>.
chestnut-c commented on code in PR #8223:
URL: https://github.com/apache/inlong/pull/8223#discussion_r1227943624


##########
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/datatype/DataTypeMappingStrategyEnum.java:
##########
@@ -0,0 +1,41 @@
+/*
+ * 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.inlong.manager.common.datatype;
+
+import org.apache.inlong.manager.common.datatype.datasource.PostgreSQLDataType;
+
+/**
+ * The enum of data type mapping strategies for different data sources.
+ */
+public enum DataTypeMappingStrategyEnum implements DataTypeMappingStrategy {
+
+    /**
+     * postgresql data type mapping operation strategy
+     */
+    POSTGRESQL_DATA_TYPE_STRATEGY {

Review Comment:
   > Why use Enum?Can we use a better method?
   
   
   It has been modified.



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] gong commented on pull request #8223: [INLONG-8222][Manager] Adopt strategist mode to support different types of data type mapping for different data sources

Posted by "gong (via GitHub)" <gi...@apache.org>.
gong commented on PR #8223:
URL: https://github.com/apache/inlong/pull/8223#issuecomment-1588768219

   @chestnut-c It need add type precision support. Only add simple type mapping is not enough.


-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] chestnut-c commented on a diff in pull request #8223: [INLONG-8222][Manager] Adopt strategist mode to support different types of data type mapping for different data sources

Posted by "chestnut-c (via GitHub)" <gi...@apache.org>.
chestnut-c commented on code in PR #8223:
URL: https://github.com/apache/inlong/pull/8223#discussion_r1227933811


##########
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/sort/node/base/ExtractNodeProvider.java:
##########
@@ -60,8 +61,23 @@ public interface ExtractNodeProvider extends NodeProvider {
      */
     default List<FieldInfo> parseStreamFieldInfos(List<StreamField> streamFields, String nodeId) {
         // Filter constant fields
+        return parseStreamFieldInfos(streamFields, nodeId, null);

Review Comment:
   > Why is the `dataTypeMappingStrategy` set to empty? I don't think you should do this if you want to use the original fieldtype. There should be a class to handle cases where the current type does not support mapping.
   
   Overload the current method, I think both will work



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] healchow commented on a diff in pull request #8223: [INLONG-8222][Manager] Support different data types mapping for different data sources by the strategy pattern

Posted by "healchow (via GitHub)" <gi...@apache.org>.
healchow commented on code in PR #8223:
URL: https://github.com/apache/inlong/pull/8223#discussion_r1228906336


##########
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/fieldtype/datasource/PostgreSQLFieldTypeMapping.java:
##########
@@ -0,0 +1,161 @@
+/*
+ * 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.inlong.manager.common.fieldtype.datasource;
+
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.stream.Stream;
+
+import static org.apache.inlong.manager.common.consts.InlongConstants.LEFT_BRACKET;
+
+/**
+ * The enum of PostgreSQL field type mapping.
+ */
+public enum PostgreSQLFieldTypeMapping implements BaseFieldTypeMapping {
+
+    /**
+     * SMALLINT TYPE
+     */
+    SMALLINT("SMALLINT", "SMALLINT"),
+
+    INT2("INT2", "SMALLINT"),
+
+    SMALL_SERIAL("SMALLSERIAL", "SMALLINT"),
+
+    SERIAL2("SERIAL2", "SMALLINT"),
+
+    /**
+     * INT TYPE
+     */
+    SERIAL("SERIAL", "INT"),
+
+    INT4("INT4", "INT"),
+
+    INT("INT", "INT"),
+
+    INTEGER("INTEGER", "INT"),
+
+    INT8("INT8", "BIGINT"),
+
+    /**
+     * BIGINT TYPE
+     */
+    BIGINT("BIGINT", "BIGINT"),
+
+    BIGSERIAL("BIGSERIAL", "BIGINT"),
+
+    /**
+     * FLOAT TYPE
+     */
+    REAL("REAL", "FLOAT"),
+
+    FLOAT4("FLOAT4", "FLOAT"),
+
+    /**
+     * DOUBLE TYPE
+     */
+    FLOAT8("FLOAT8", "DOUBLE"),
+
+    DOUBLE("DOUBLE", "DOUBLE"),
+
+    DOUBLE_PRECISION("DOUBLE PRECISION", "DOUBLE"),
+
+    /**
+     * DECIMAL TYPE
+     */
+    NUMERIC("NUMERIC", "DECIMAL"),
+
+    DECIMAL("DECIMAL", "DECIMAL"),
+
+    /**
+     * BOOLEAN TYPE
+     */
+    BOOLEAN("BOOLEAN", "BOOLEAN"),
+
+    /**
+     * DATE TYPE
+     */
+    DATE("DATE", "DATE"),
+
+    /**
+     * TIME TYPE
+     */
+    TIME("TIME", "TIME"),
+
+    TIMESTAMP("TIMESTAMP", "TIMESTAMP"),
+
+    /**
+     * STRING TYPE
+     */
+    CHAR("CHAR", "STRING"),
+
+    CHARACTER("CHARACTER", "STRING"),
+
+    VARCHAR("VARCHAR", "STRING"),
+
+    CHARACTER_VARYING("CHARACTER VARYING", "STRING"),
+
+    TEXT("TEXT", "STRING"),
+
+    /**
+     * BYTES TYPE
+     */
+    BYTEA("BYTEA", "VARBINARY"),
+
+    /**
+     * ARRAY TYPE
+     */
+    ARRAY("ARRAY", "ARRAY");
+
+    /**
+     * The original data type
+     */
+    private final String originalType;
+
+    /**
+     * The target data type
+     */
+    private final String targetType;
+
+    PostgreSQLFieldTypeMapping(String originalType, String targetType) {
+        this.originalType = originalType;
+        this.targetType = targetType;
+    }
+
+    @Override
+    public String getOriginalType() {
+        return originalType;
+    }
+
+    @Override
+    public String getTargetType() {
+        return targetType;
+    }
+
+    /**
+     * Get the field type of inlong field type mapping by the original field type.
+     *
+     * @param originalType the original field type
+     * @return the target field type of inlong field type mapping
+     */
+    public static String getFieldTypeMapping(String originalType) {
+        String dataType = StringUtils.substringBefore(originalType, LEFT_BRACKET).toUpperCase();
+        return Stream.of(values()).filter(v -> v.getOriginalType().equals(dataType))

Review Comment:
   Is it possible to construct a Map and then `get` it directly when using it?
   
   The current way is to loop through it every time it is used, which is too inefficient.



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] healchow commented on a diff in pull request #8223: [INLONG-8222][Manager] Support different data types mapping for different data sources by the strategy pattern

Posted by "healchow (via GitHub)" <gi...@apache.org>.
healchow commented on code in PR #8223:
URL: https://github.com/apache/inlong/pull/8223#discussion_r1228908566


##########
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/fieldtype/strategy/DefaultFieldTypeStrategy.java:
##########
@@ -0,0 +1,29 @@
+/*
+ * 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.inlong.manager.common.fieldtype.strategy;
+
+/**
+ * The default field type mapping strategy
+ */
+public class DefaultFieldTypeStrategy implements FieldTypeMappingStrategy {
+
+    @Override
+    public String getFieldTypeMapping(String originalType) {

Review Comment:
   `originalType` -> `sourceType`?



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] fuweng11 commented on a diff in pull request #8223: [INLONG-8222][Manager] Adopt strategist mode to support different types of data type mapping for different data sources

Posted by "fuweng11 (via GitHub)" <gi...@apache.org>.
fuweng11 commented on code in PR #8223:
URL: https://github.com/apache/inlong/pull/8223#discussion_r1227903781


##########
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/datatype/DataTypeMappingStrategyEnum.java:
##########
@@ -0,0 +1,41 @@
+/*
+ * 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.inlong.manager.common.datatype;
+
+import org.apache.inlong.manager.common.datatype.datasource.PostgreSQLDataType;
+
+/**
+ * The enum of data type mapping strategies for different data sources.
+ */
+public enum DataTypeMappingStrategyEnum implements DataTypeMappingStrategy {
+
+    /**
+     * postgresql data type mapping operation strategy
+     */
+    POSTGRESQL_DATA_TYPE_STRATEGY {

Review Comment:
   Why use Enum?Can we use a better method?



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] chestnut-c commented on a diff in pull request #8223: [INLONG-8222][Manager] Adopt strategist mode to support different types of data type mapping for different data sources

Posted by "chestnut-c (via GitHub)" <gi...@apache.org>.
chestnut-c commented on code in PR #8223:
URL: https://github.com/apache/inlong/pull/8223#discussion_r1228009022


##########
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/datatype/datasource/BaseDataType.java:
##########
@@ -0,0 +1,38 @@
+/*
+ * 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.inlong.manager.common.datatype.datasource;
+
+/**
+ * The interface of base data type mapping
+ */
+public interface BaseDataType {

Review Comment:
   > Maybe `BaseFieldType`.
   
   i will change dataType to fieldType



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] dockerzhang merged pull request #8223: [INLONG-8222][Manager] Support different data types mapping for different data sources by the strategy pattern

Posted by "dockerzhang (via GitHub)" <gi...@apache.org>.
dockerzhang merged PR #8223:
URL: https://github.com/apache/inlong/pull/8223


-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] chestnut-c commented on pull request #8223: [INLONG-8222][Manager] Adopt strategist mode to support different types of data type mapping for different data sources

Posted by "chestnut-c (via GitHub)" <gi...@apache.org>.
chestnut-c commented on PR #8223:
URL: https://github.com/apache/inlong/pull/8223#issuecomment-1588897164

   Current PR also fixes https://github.com/apache/inlong/issues/8091


-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] chestnut-c commented on a diff in pull request #8223: [INLONG-8222][Manager] Support different data types mapping for different data sources by the strategy pattern

Posted by "chestnut-c (via GitHub)" <gi...@apache.org>.
chestnut-c commented on code in PR #8223:
URL: https://github.com/apache/inlong/pull/8223#discussion_r1228944976


##########
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/fieldtype/datasource/BaseFieldTypeMapping.java:
##########
@@ -0,0 +1,38 @@
+/*
+ * 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.inlong.manager.common.fieldtype.datasource;
+
+/**
+ * The interface of base field type mapping
+ */
+public interface BaseFieldTypeMapping {
+
+    /**
+     * Get the original field type.
+     *
+     * @return The original field type
+     */
+    String getOriginalType();

Review Comment:
   > Maybe `sourceType` is more clearly to mapping `targetType`.
   
   almost the same meaning,i will change it.



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] chestnut-c commented on a diff in pull request #8223: [INLONG-8222][Manager] Support different data types mapping for different data sources by the strategy pattern

Posted by "chestnut-c (via GitHub)" <gi...@apache.org>.
chestnut-c commented on code in PR #8223:
URL: https://github.com/apache/inlong/pull/8223#discussion_r1228944892


##########
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/fieldtype/datasource/PostgreSQLFieldTypeMapping.java:
##########
@@ -0,0 +1,161 @@
+/*
+ * 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.inlong.manager.common.fieldtype.datasource;
+
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.stream.Stream;
+
+import static org.apache.inlong.manager.common.consts.InlongConstants.LEFT_BRACKET;
+
+/**
+ * The enum of PostgreSQL field type mapping.
+ */
+public enum PostgreSQLFieldTypeMapping implements BaseFieldTypeMapping {
+
+    /**
+     * SMALLINT TYPE
+     */
+    SMALLINT("SMALLINT", "SMALLINT"),
+
+    INT2("INT2", "SMALLINT"),
+
+    SMALL_SERIAL("SMALLSERIAL", "SMALLINT"),
+
+    SERIAL2("SERIAL2", "SMALLINT"),
+
+    /**
+     * INT TYPE
+     */
+    SERIAL("SERIAL", "INT"),
+
+    INT4("INT4", "INT"),
+
+    INT("INT", "INT"),
+
+    INTEGER("INTEGER", "INT"),
+
+    INT8("INT8", "BIGINT"),
+
+    /**
+     * BIGINT TYPE
+     */
+    BIGINT("BIGINT", "BIGINT"),
+
+    BIGSERIAL("BIGSERIAL", "BIGINT"),
+
+    /**
+     * FLOAT TYPE
+     */
+    REAL("REAL", "FLOAT"),
+
+    FLOAT4("FLOAT4", "FLOAT"),
+
+    /**
+     * DOUBLE TYPE
+     */
+    FLOAT8("FLOAT8", "DOUBLE"),
+
+    DOUBLE("DOUBLE", "DOUBLE"),
+
+    DOUBLE_PRECISION("DOUBLE PRECISION", "DOUBLE"),
+
+    /**
+     * DECIMAL TYPE
+     */
+    NUMERIC("NUMERIC", "DECIMAL"),
+
+    DECIMAL("DECIMAL", "DECIMAL"),
+
+    /**
+     * BOOLEAN TYPE
+     */
+    BOOLEAN("BOOLEAN", "BOOLEAN"),
+
+    /**
+     * DATE TYPE
+     */
+    DATE("DATE", "DATE"),
+
+    /**
+     * TIME TYPE
+     */
+    TIME("TIME", "TIME"),
+
+    TIMESTAMP("TIMESTAMP", "TIMESTAMP"),
+
+    /**
+     * STRING TYPE
+     */
+    CHAR("CHAR", "STRING"),
+
+    CHARACTER("CHARACTER", "STRING"),
+
+    VARCHAR("VARCHAR", "STRING"),
+
+    CHARACTER_VARYING("CHARACTER VARYING", "STRING"),
+
+    TEXT("TEXT", "STRING"),
+
+    /**
+     * BYTES TYPE
+     */
+    BYTEA("BYTEA", "VARBINARY"),
+
+    /**
+     * ARRAY TYPE
+     */
+    ARRAY("ARRAY", "ARRAY");
+
+    /**
+     * The original data type
+     */
+    private final String originalType;
+
+    /**
+     * The target data type
+     */
+    private final String targetType;
+
+    PostgreSQLFieldTypeMapping(String originalType, String targetType) {
+        this.originalType = originalType;
+        this.targetType = targetType;
+    }
+
+    @Override
+    public String getOriginalType() {
+        return originalType;
+    }
+
+    @Override
+    public String getTargetType() {
+        return targetType;
+    }
+
+    /**
+     * Get the field type of inlong field type mapping by the original field type.
+     *
+     * @param originalType the original field type
+     * @return the target field type of inlong field type mapping
+     */
+    public static String getFieldTypeMapping(String originalType) {
+        String dataType = StringUtils.substringBefore(originalType, LEFT_BRACKET).toUpperCase();
+        return Stream.of(values()).filter(v -> v.getOriginalType().equals(dataType))

Review Comment:
   > Is it possible to construct a Map and then `get` it directly when using it?
   > 
   > The current way is to loop through it every time it is used, which is too inefficient.
   
   it's ok



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] chestnut-c commented on a diff in pull request #8223: [INLONG-8222][Manager] Support different data types mapping for different data sources by the strategy pattern

Posted by "chestnut-c (via GitHub)" <gi...@apache.org>.
chestnut-c commented on code in PR #8223:
URL: https://github.com/apache/inlong/pull/8223#discussion_r1228947797


##########
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/fieldtype/datasource/PostgreSQLFieldTypeMapping.java:
##########
@@ -0,0 +1,161 @@
+/*
+ * 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.inlong.manager.common.fieldtype.datasource;
+
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.stream.Stream;
+
+import static org.apache.inlong.manager.common.consts.InlongConstants.LEFT_BRACKET;
+
+/**
+ * The enum of PostgreSQL field type mapping.
+ */
+public enum PostgreSQLFieldTypeMapping implements BaseFieldTypeMapping {

Review Comment:
   > The enumeration class is still not easy to expand.
   > 
   > Is it possible to add the type mapping to the configuration file, and then the code reads and parses it?
   > 
   > Of course, in this issue, you can use the enumeration method first, and then you can take the time to see how to optimize it through the configuration file.
   
   It is really better to add the configuration file, and then optimize it in the next PR



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] healchow commented on a diff in pull request #8223: [INLONG-8222][Manager] Support different data types mapping for different data sources by the strategy pattern

Posted by "healchow (via GitHub)" <gi...@apache.org>.
healchow commented on code in PR #8223:
URL: https://github.com/apache/inlong/pull/8223#discussion_r1228907651


##########
inlong-manager/manager-pojo/src/test/java/org/apache/inlong/manager/pojo/sort/util/FieldInfoUtilsTest.java:
##########
@@ -0,0 +1,42 @@
+/*
+ * 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.inlong.manager.pojo.sort.util;
+
+import org.apache.inlong.manager.common.fieldtype.strategy.PostgreSQLFieldTypeStrategy;
+import org.apache.inlong.manager.pojo.stream.StreamField;
+import org.apache.inlong.sort.formats.common.IntTypeInfo;
+import org.apache.inlong.sort.formats.common.TypeInfo;
+import org.apache.inlong.sort.protocol.FieldInfo;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+public class FieldInfoUtilsTest {

Review Comment:
   Add javadoc please.



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] chestnut-c commented on a diff in pull request #8223: [INLONG-8222][Manager] Support different data types mapping for different data sources by the strategy pattern

Posted by "chestnut-c (via GitHub)" <gi...@apache.org>.
chestnut-c commented on code in PR #8223:
URL: https://github.com/apache/inlong/pull/8223#discussion_r1228944613


##########
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/fieldtype/strategy/DefaultFieldTypeStrategy.java:
##########
@@ -0,0 +1,29 @@
+/*
+ * 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.inlong.manager.common.fieldtype.strategy;
+
+/**
+ * The default field type mapping strategy
+ */
+public class DefaultFieldTypeStrategy implements FieldTypeMappingStrategy {
+
+    @Override
+    public String getFieldTypeMapping(String originalType) {

Review Comment:
   > `originalType` -> `sourceType`?
   
   
   almost the same meaning,i will change it.



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] fuweng11 commented on a diff in pull request #8223: [INLONG-8222][Manager] Adopt strategist mode to support different types of data type mapping for different data sources

Posted by "fuweng11 (via GitHub)" <gi...@apache.org>.
fuweng11 commented on code in PR #8223:
URL: https://github.com/apache/inlong/pull/8223#discussion_r1227964120


##########
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/sort/node/base/ExtractNodeProvider.java:
##########
@@ -60,8 +61,23 @@ public interface ExtractNodeProvider extends NodeProvider {
      */
     default List<FieldInfo> parseStreamFieldInfos(List<StreamField> streamFields, String nodeId) {
         // Filter constant fields
+        return parseStreamFieldInfos(streamFields, nodeId, null);
+    }
+
+    /**
+     * Parse StreamFieldInfos
+     *
+     * @param streamFields The stream fields
+     * @param nodeId The node id
+     * @param dataTypeMappingStrategy The data type mapping operation strategy
+     * @return FieldInfo list
+     */
+    default List<FieldInfo> parseStreamFieldInfos(List<StreamField> streamFields, String nodeId,

Review Comment:
   This method is redundant.Just rewrite `parseStreamFieldInfos(List<StreamField> streamFields, String nodeId)`



##########
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/datatype/datasource/BaseDataType.java:
##########
@@ -0,0 +1,38 @@
+/*
+ * 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.inlong.manager.common.datatype.datasource;
+
+/**
+ * The interface of base data type mapping
+ */
+public interface BaseDataType {

Review Comment:
   Maybe `BaseFieldType`.



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] healchow commented on a diff in pull request #8223: [INLONG-8222][Manager] Support different data types mapping for different data sources by the strategy pattern

Posted by "healchow (via GitHub)" <gi...@apache.org>.
healchow commented on code in PR #8223:
URL: https://github.com/apache/inlong/pull/8223#discussion_r1228905061


##########
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/fieldtype/datasource/BaseFieldTypeMapping.java:
##########
@@ -0,0 +1,38 @@
+/*
+ * 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.inlong.manager.common.fieldtype.datasource;
+
+/**
+ * The interface of base field type mapping
+ */
+public interface BaseFieldTypeMapping {
+
+    /**
+     * Get the original field type.
+     *
+     * @return The original field type
+     */
+    String getOriginalType();

Review Comment:
   Maybe `sourceType` is more clearly to mapping `targetType`.



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] chestnut-c commented on pull request #8223: [INLONG-8222][Manager] Adopt strategist mode to support different types of data type mapping for different data sources

Posted by "chestnut-c (via GitHub)" <gi...@apache.org>.
chestnut-c commented on PR #8223:
URL: https://github.com/apache/inlong/pull/8223#issuecomment-1588788135

   > @chestnut-c It need add type precision support. Only add simple type mapping is not enough. You can see `org.apache.inlong.manager.pojo.sort.util.FieldFormatUtils` to implement this function.
   
   
   Make the basic type first to ensure that each source can run normally, and then further supplement the accuracy of the type.


-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] gong commented on pull request #8223: [INLONG-8222][Manager] Adopt strategist mode to support different types of data type mapping for different data sources

Posted by "gong (via GitHub)" <gi...@apache.org>.
gong commented on PR #8223:
URL: https://github.com/apache/inlong/pull/8223#issuecomment-1588822873

   @chestnut-c It will improve INLONG usability when collaborating with long dashboard. Because many datasource have different type. Thanks for your contribution.


-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] healchow commented on a diff in pull request #8223: [INLONG-8222][Manager] Support different data types mapping for different data sources by the strategy pattern

Posted by "healchow (via GitHub)" <gi...@apache.org>.
healchow commented on code in PR #8223:
URL: https://github.com/apache/inlong/pull/8223#discussion_r1228907474


##########
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/fieldtype/datasource/PostgreSQLFieldTypeMapping.java:
##########
@@ -0,0 +1,161 @@
+/*
+ * 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.inlong.manager.common.fieldtype.datasource;
+
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.stream.Stream;
+
+import static org.apache.inlong.manager.common.consts.InlongConstants.LEFT_BRACKET;
+
+/**
+ * The enum of PostgreSQL field type mapping.
+ */
+public enum PostgreSQLFieldTypeMapping implements BaseFieldTypeMapping {

Review Comment:
   The enumeration class is still not easy to expand.
   
   Is it possible to add the type mapping to the configuration file, and then the code reads and parses it?
   
   Of course, in this issue, you can use the enumeration method first, and then you can take the time to see how to optimize it through the configuration file.



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] chestnut-c commented on a diff in pull request #8223: [INLONG-8222][Manager] Support different data types mapping for different data sources by the strategy pattern

Posted by "chestnut-c (via GitHub)" <gi...@apache.org>.
chestnut-c commented on code in PR #8223:
URL: https://github.com/apache/inlong/pull/8223#discussion_r1228944712


##########
inlong-manager/manager-pojo/src/test/java/org/apache/inlong/manager/pojo/sort/util/FieldInfoUtilsTest.java:
##########
@@ -0,0 +1,42 @@
+/*
+ * 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.inlong.manager.pojo.sort.util;
+
+import org.apache.inlong.manager.common.fieldtype.strategy.PostgreSQLFieldTypeStrategy;
+import org.apache.inlong.manager.pojo.stream.StreamField;
+import org.apache.inlong.sort.formats.common.IntTypeInfo;
+import org.apache.inlong.sort.formats.common.TypeInfo;
+import org.apache.inlong.sort.protocol.FieldInfo;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+public class FieldInfoUtilsTest {

Review Comment:
   > Add javadoc please.
   
   okk.



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] fuweng11 commented on a diff in pull request #8223: [INLONG-8222][Manager] Adopt strategist mode to support different types of data type mapping for different data sources

Posted by "fuweng11 (via GitHub)" <gi...@apache.org>.
fuweng11 commented on code in PR #8223:
URL: https://github.com/apache/inlong/pull/8223#discussion_r1227916317


##########
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/sort/node/base/ExtractNodeProvider.java:
##########
@@ -60,8 +61,23 @@ public interface ExtractNodeProvider extends NodeProvider {
      */
     default List<FieldInfo> parseStreamFieldInfos(List<StreamField> streamFields, String nodeId) {
         // Filter constant fields
+        return parseStreamFieldInfos(streamFields, nodeId, null);

Review Comment:
   Why is the `dataTypeMappingStrategy` set to empty? I don't think you should do this if you want to use the original fieldtype. There should be a class to handle cases where the current type does not support mapping.



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] chestnut-c commented on a diff in pull request #8223: [INLONG-8222][Manager] Adopt strategist mode to support different types of data type mapping for different data sources

Posted by "chestnut-c (via GitHub)" <gi...@apache.org>.
chestnut-c commented on code in PR #8223:
URL: https://github.com/apache/inlong/pull/8223#discussion_r1227933811


##########
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/sort/node/base/ExtractNodeProvider.java:
##########
@@ -60,8 +61,23 @@ public interface ExtractNodeProvider extends NodeProvider {
      */
     default List<FieldInfo> parseStreamFieldInfos(List<StreamField> streamFields, String nodeId) {
         // Filter constant fields
+        return parseStreamFieldInfos(streamFields, nodeId, null);

Review Comment:
   > Why is the `dataTypeMappingStrategy` set to empty? I don't think you should do this if you want to use the original fieldtype. There should be a class to handle cases where the current type does not support mapping.
   
   Overload the current method, I think both will work,currently in an overloaded way, to avoid instantiation and introduce some unnecessary instances, and compatible with the previous way
   



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] chestnut-c commented on a diff in pull request #8223: [INLONG-8222][Manager] Adopt strategist mode to support different types of data type mapping for different data sources

Posted by "chestnut-c (via GitHub)" <gi...@apache.org>.
chestnut-c commented on code in PR #8223:
URL: https://github.com/apache/inlong/pull/8223#discussion_r1227992867


##########
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/sort/node/base/ExtractNodeProvider.java:
##########
@@ -60,8 +61,23 @@ public interface ExtractNodeProvider extends NodeProvider {
      */
     default List<FieldInfo> parseStreamFieldInfos(List<StreamField> streamFields, String nodeId) {
         // Filter constant fields
+        return parseStreamFieldInfos(streamFields, nodeId, null);
+    }
+
+    /**
+     * Parse StreamFieldInfos
+     *
+     * @param streamFields The stream fields
+     * @param nodeId The node id
+     * @param dataTypeMappingStrategy The data type mapping operation strategy
+     * @return FieldInfo list
+     */
+    default List<FieldInfo> parseStreamFieldInfos(List<StreamField> streamFields, String nodeId,

Review Comment:
   > parseStreamFieldInfos
   
   overloaded method



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] gong commented on a diff in pull request #8223: [INLONG-8222][Manager] Adopt strategist mode to support different types of data type mapping for different data sources

Posted by "gong (via GitHub)" <gi...@apache.org>.
gong commented on code in PR #8223:
URL: https://github.com/apache/inlong/pull/8223#discussion_r1227720078


##########
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/datatype/datasource/BaseDataType.java:
##########
@@ -0,0 +1,38 @@
+/*
+ * 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.inlong.manager.common.datatype.datasource;
+
+/**
+ * The interface of base data type mapping
+ */
+public interface BaseDataType {
+
+    /**
+     * Get the original data type.
+     *
+     * @return The original data type
+     */
+    String getOriginalType();
+
+    /**
+     * Get the target data type of flink data type mapping
+     *
+     * @return The target data type

Review Comment:
   It should be inlong type. inlong will convert to flink type for sort.



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org