morningman opened a new issue, #70530:
URL: https://github.com/apache/doris/issues/70530

   ### Search before asking
   
   - [x] I searched the issues for JDBC table comments and Oracle/HANA and 
found no issue tracking this specific metadata limitation.
   
   ### Description
   
   Track the remaining Oracle and SAP HANA table-comment limitation reported in 
https://github.com/apache/doris-website/issues/2285#issuecomment-2826227614.
   
   The original report was on Doris 3.0 and also mentioned MySQL. These cases 
need to be distinguished:
   
   - On `branch-3.0` (`4090f6c40d2238b7aff73185bcada48f96fbd6be`), 
`ExternalTable.getComment()` returns `""`, and `JdbcExternalTable` does not 
override it. The empty comment is therefore produced in the FE metadata path, 
independently of Arrow Flight SQL.
   - MySQL support was added by https://github.com/apache/doris/pull/54088 
(commit `908f020952445f61a94e504532c571180cb9ce94`, included in 4.0.0-rc01 and 
later). I verified both `SHOW TABLE STATUS` and catalog-qualified 
`information_schema.tables` against Doris 4.1.5, MySQL 8.0.33, and Connector/J 
8.0.33; both returned the original Chinese table comment correctly.
   - Oracle and SAP HANA still inherit `JdbcClient.getTableComment()` returning 
`""` on `branch-4.1`. The corresponding connector clients also inherit the 
empty base implementation on current master. This is a missing table-metadata 
capability, rather than a SHOW TABLE STATUS syntax problem.
   
   Source references:
   
   - [4.1 
JdbcExternalTable.getComment](https://github.com/apache/doris/blob/df8ed67a8e5dbdc91f1065b50dae23d834117800/fe/fe-core/src/main/java/org/apache/doris/datasource/jdbc/JdbcExternalTable.java#L104)
   - [4.1 
JdbcClient.getTableComment](https://github.com/apache/doris/blob/df8ed67a8e5dbdc91f1065b50dae23d834117800/fe/fe-core/src/main/java/org/apache/doris/datasource/jdbc/client/JdbcClient.java#L391)
   - [Master 
JdbcConnectorClient.getTableComment](https://github.com/apache/doris/blob/172120cbaa46b0a2eff6c37d86fb438c3a307375/fe/fe-connector/fe-connector-jdbc/src/main/java/org/apache/doris/connector/jdbc/client/JdbcConnectorClient.java#L489)
   - [Master JDBC connector delegates table-comment lookup to the 
client](https://github.com/apache/doris/blob/172120cbaa46b0a2eff6c37d86fb438c3a307375/fe/fe-connector/fe-connector-jdbc/src/main/java/org/apache/doris/connector/jdbc/JdbcConnectorMetadata.java#L252)
   
   The affected SQL forms are:
   
   ```sql
   SHOW TABLE STATUS FROM oracle_catalog.remote_schema LIKE 'table_name';
   SELECT table_name, table_comment
   FROM oracle_catalog.information_schema.tables
   WHERE table_schema = 'remote_schema' AND table_name = 'table_name';
   ```
   
   Use the actual catalog, schema, and table names. `SHOW TABLE STATUS FROM 
catalog.db.table` is not valid syntax. The catalog's `information_schema` is 
Doris-generated metadata, so it does not bypass this limitation by reading the 
upstream database's TABLES view directly.
   
   I did not run an Oracle or SAP HANA server for this follow-up. The missing 
implementation above is confirmed by source inspection; 
database/driver-specific comment retrieval and permissions still need 
integration validation.
   
   ### Solution
   
   Implement table-comment lookup for Oracle and SAP HANA in their JDBC 
connector clients, including any necessary driver metadata settings, caching 
behavior, and database permissions. Add integration coverage for `SHOW CREATE 
TABLE`, `SHOW TABLE STATUS`, and `information_schema.tables`, including Chinese 
comments, empty comments, and tables with underscores in their names. Keep the 
supported-database scope explicit rather than treating the MySQL implementation 
as support for every JDBC catalog.
   
   ### Are you willing to submit PR?
   
   - [ ] Yes, I am willing to submit a PR.
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct).
   


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