github-actions[bot] commented on code in PR #65718:
URL: https://github.com/apache/doris/pull/65718#discussion_r3597030677
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/jdbc/client/JdbcClient.java:
##########
@@ -487,15 +490,22 @@ protected String modifyTableNameIfNecessary(String
remoteTableName) {
return remoteTableName;
}
- protected boolean isTableModified(String modifiedTableName, String
actualTableName) {
- return false;
- }
-
protected ResultSet getRemoteColumns(DatabaseMetaData databaseMetaData,
String catalogName, String remoteDbName,
String remoteTableName) throws SQLException {
return databaseMetaData.getColumns(catalogName, remoteDbName,
remoteTableName, null);
}
+ protected boolean isExactTable(DatabaseMetaData databaseMetaData,
ResultSet resultSet,
+ String remoteDbName, String remoteTableName) throws SQLException {
+ // JDBC treats schema and table names as patterns, so verify both
identities on returned rows.
+ return remoteDbName.equals(getRemoteDatabaseName(resultSet))
Review Comment:
[P2] Preserve SQL Server's collation-aware identifier semantics — With Doris
lower_case_table_names=1, the legacy objects this PR repairs can have
remoteName unset while their local table name is lowercased. On a normal
case-insensitive SQL Server database, getColumns(..., "orders", ...) can
successfully return stored TABLE_NAME=Orders, but JdbcSQLServerClient inherits
this case-sensitive String.equals filter and discards the only target row,
leaving initSchema() empty. The MySQL override fixes only Connector/J. Please
make SQL Server's exact filter honor the database's identifier collation while
still rejecting wildcard-matched siblings, and add a mixed-case
stored-name/lowercase-fallback regression.
--
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]