github-actions[bot] commented on code in PR #67916:
URL: https://github.com/apache/doris/pull/67916#discussion_r4002449015


##########
fe/fe-connector/fe-connector-jdbc/src/main/java/org/apache/doris/connector/jdbc/client/JdbcSQLServerConnectorClient.java:
##########
@@ -105,6 +106,74 @@ public ConnectorType jdbcTypeToConnectorType(JdbcFieldInfo 
fieldInfo) {
                 return enableMappingVarbinary
                         ? ConnectorType.of("VARBINARY", 
fieldInfo.requiredColumnSize(), -1)
                         : ConnectorType.of("STRING");
+            case "xml":
+            case "sql_variant":
+            case "geometry":
+            case "geography":
+            case "hierarchyid":
+            case "json":
+            case "vector":
+                // SQL Server system types that Doris does not support. They 
are listed explicitly
+                // so that they never reach the JDBC type code fallback below.
+                return ConnectorType.of("UNSUPPORTED");
+            default:
+                return jdbcTypeCodeToConnectorType(fieldInfo);

Review Comment:
   [P1] Route legal alias identifiers through the base-code fallback
   
   SQL Server permits alias type names to be delimited identifiers containing 
spaces or parentheses ([`CREATE 
TYPE`](https://learn.microsoft.com/en-us/sql/t-sql/statements/create-type-transact-sql?view=sql-server-ver17),
 [identifier 
rules](https://learn.microsoft.com/en-us/sql/relational-databases/databases/database-identifiers?view=sql-server-ver17)).
 For `CREATE TYPE dbo.[int alias] FROM varchar(50)`, `getColumns()` supplies 
`TYPE_NAME = int alias` and the base `DATA_TYPE = VARCHAR`; the normalization 
at line 58 reduces the name to `int`, so this fallback is never reached and FE 
exposes the VARCHAR column as INT. The legacy client has the same preemption. 
Please restrict IDENTITY normalization to a code-compatible IDENTITY form (or 
otherwise prefer unambiguous base codes before name dispatch) and cover legal 
alias names and system-name collisions in both paths.



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