yuqi1129 opened a new pull request, #13418:
URL: https://github.com/apache/gravitino/pull/13418

   ### What changes were proposed in this pull request?
   
   When a JDBC catalog does not support schema comments, 
`JdbcDatabaseOperations.create` (and the duplicated check in 
`ClickHouseDatabaseOperations`) now rejects a create request that carries one 
with
   
   ```
   Schema <name>: catalog does not support schema comments
   ```
   
   instead of `Doesn't support setting schema comment: <comment value>`.
   
   Updated the assertions in `CatalogMysqlIT` and `CatalogOceanBaseIT` that 
pinned the old wording, and added 
`TestJdbcDatabaseOperations#testCreateWithCommentNamesSchemaInRejection`, which 
exercises the shared check through a minimal subclass (the SQLite test double 
overrides `create()`) and verifies the request is rejected before a connection 
is opened.
   
   ### Why are the changes needed?
   
   The old message appended the comment VALUE where the schema name belongs and 
read as a fragment, e.g. `reason [Doesn't support setting schema comment: 
probe]` on Oracle.
   
   Fix: #13417
   
   ### Does this PR introduce _any_ user-facing change?
   
   Only the wording of the `UnsupportedOperationException` message.
   
   ### How was this patch tested?
   
   `TestJdbcDatabaseOperations` locally; `catalog-jdbc-mysql`, 
`catalog-jdbc-clickhouse` and `catalog-jdbc-oceanbase` test sources compile. 
The MySQL/OceanBase ITs run in CI.
   


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

Reply via email to