[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.
This commit is contained in:
@ -711,7 +711,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;
|
||||
|
||||
Reference in New Issue
Block a user