BePPPower commented on code in PR #15570:
URL: https://github.com/apache/doris/pull/15570#discussion_r1060545520


##########
fe/fe-core/src/main/java/org/apache/doris/external/jdbc/JdbcClient.java:
##########
@@ -418,7 +441,72 @@ public Type mysqlTypeToDoris(JdbcFieldSchema fieldSchema) {
                 return ScalarType.createStringType();
             default:
                 throw new JdbcClientException("Can not convert mysql data type 
to doris data type for type ["
-                                                + mysqlType + "]");
+                        + mysqlType + "]");
+        }
+    }
+
+    public Type postgresqlTypeToDoris(JdbcFieldSchema fieldSchema) {
+        String pgType = fieldSchema.getDataTypeName();
+        switch (pgType) {
+            case "int2":
+            case "smallserial":
+                return Type.SMALLINT;
+            case "int4":
+            case "serial":
+                return Type.INT;
+            case "int8":
+            case "bigserial":
+                return Type.BIGINT;
+            case "numeric": {
+                int precision = fieldSchema.getColumnSize() + 1;

Review Comment:
   Oh, this is no longer need.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to