github-actions[bot] commented on code in PR #65718:
URL: https://github.com/apache/doris/pull/65718#discussion_r3595183924
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/jdbc/JdbcExternalTable.java:
##########
@@ -134,12 +134,15 @@ public boolean supportsExternalMetadataPreload() {
@Override
public Optional<SchemaCacheValue> initSchema() {
String remoteDbName = ((ExternalDatabase<?>)
this.getDatabase()).getRemoteName();
+ // A missing table pattern makes JDBC enumerate every table in the
database, so honor the
+ // effective-name fallback before any metadata or identifier-mapping
call.
+ String remoteTableName = getRemoteName();
if (DebugPointUtil.isEnable("JdbcExternalTable.initSchema.sleep")) {
Review Comment:
[P2] Apply the effective table-name fallback to row-count lookups too — This
fixes schema initialization for a missing stored name, but the same table still
puts raw `this.remoteName` into `tblName` in `fetchRowCount()`. With Commons
Text 1.10, null leaves `${tblName}` unresolved and an empty value queries an
empty table name, so each vendor query misses the intended table and returns
`UNKNOWN_ROW_COUNT`. The external row-count cache and manual analysis both
reach this path, meaning the repaired table can scan while its
cached/statistics row count remains unknown. Please use `getRemoteName()` for
that parameter as well and cover the missing-name row-count case.
--
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]