github-actions[bot] commented on code in PR #65718:
URL: https://github.com/apache/doris/pull/65718#discussion_r3596486439
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/jdbc/client/JdbcClient.java:
##########
@@ -487,15 +490,16 @@ 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(ResultSet resultSet, String
remoteTableName) throws SQLException {
Review Comment:
[P2] Exact-filter the schema as well for schema-based clients —
`remoteDbName` is passed to `getColumns` as `schemaPattern`, so `_` and `%` are
wildcards there too. If `sales_2024` and `salesX2024` both contain `orders`,
both result rows have this same `TABLE_NAME` and pass the helper, merging
columns from two schemas. Generic inheritors, Oracle/OceanBase-Oracle, and
ClickHouse's schema mode are affected; PostgreSQL already compares
`TABLE_SCHEM` and `TABLE_NAME`. Please include the expected database identity
in the predicate and add a sibling-schema regression. This is distinct from the
existing sibling-table thread: the table names here are identical and only the
schemas differ.
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/jdbc/client/JdbcMySQLClient.java:
##########
@@ -187,6 +187,9 @@ public List<JdbcFieldSchema> getJdbcColumnsInfo(String
remoteDbName, String remo
}
while (rs.next()) {
+ if (!isExactTable(rs, remoteTableName)) {
Review Comment:
[P2] Preserve MySQL's case-insensitive table identity — With
`lower_case_table_names=1`, MySQL stores table names in lowercase and accepts
case-insensitive lookup. A direct caller such as the CDC TVF can request
`TUsers`; Connector/J's `useInformationSchema=true` path returns the stored
`TABLE_NAME=tusers`, but this new check calls the shared case-sensitive
`String.equals` and discards every column. Please make the exact filter honor
MySQL's configured identifier-case semantics while still rejecting
wildcard-matched siblings, and add a mixed-case request/canonical-lowercase
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]