This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch branch-1.2-lts in repository https://gitbox.apache.org/repos/asf/doris.git
commit d3731904c7903d8c2f25551438cf853637c79beb Author: Tiewei Fang <[email protected]> AuthorDate: Wed Apr 12 19:58:30 2023 +0800 [FixBug](jdbc Catalog) fix sqlserver column type mapping (#18518) For type int identity of sqlserver, the column type read from JDBC is called int indentity. So we need deal with this case. --- .../src/main/java/org/apache/doris/external/jdbc/JdbcClient.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/external/jdbc/JdbcClient.java b/fe/fe-core/src/main/java/org/apache/doris/external/jdbc/JdbcClient.java index fb5c6dd23c..ffeec31e20 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/external/jdbc/JdbcClient.java +++ b/fe/fe-core/src/main/java/org/apache/doris/external/jdbc/JdbcClient.java @@ -706,7 +706,10 @@ public class JdbcClient { } public Type sqlserverTypeToDoris(JdbcFieldSchema fieldSchema) { - String sqlserverType = fieldSchema.getDataTypeName(); + String originSqlserverType = fieldSchema.getDataTypeName(); + // For sqlserver IDENTITY type, such as 'INT IDENTITY' + // originSqlserverType is "int identity", so we only get "int". + String sqlserverType = originSqlserverType.split(" ")[0]; switch (sqlserverType) { case "bit": return Type.BOOLEAN; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
