yuanoOo commented on code in PR #5013:
URL: https://github.com/apache/gravitino/pull/5013#discussion_r1776452196
##########
catalogs/catalog-jdbc-oceanbase/src/main/java/org/apache/gravitino/catalog/oceanbase/operation/OceanBaseDatabaseOperations.java:
##########
@@ -45,17 +55,62 @@ private static Set<String>
createSysOceanBaseDatabaseNames() {
public String generateCreateDatabaseSql(
String databaseName, String comment, Map<String, String> properties) {
- throw new UnsupportedOperationException("Not implemented yet.");
+ String originComment = StringIdentifier.removeIdFromComment(comment);
Review Comment:
Get it.
I tried refactoring the code:
org.apache.gravitino.catalog.jdbc.operation.JdbcDatabaseOperations#create
```
@Override
public void create(String databaseName, String comment, Map<String,
String> properties)
throws SchemaAlreadyExistsException {
LOG.info("Beginning to create database {}", databaseName);
try (final Connection connection = getConnection()) {
String createDatabaseSql = generateCreateDatabaseSql(databaseName,
comment, properties);
if (!supportSchemaComment()) {
createDatabaseSql = generateCreateDatabaseSql(databaseName,
properties);
}
JdbcConnectorUtils.executeUpdate(connection, createDatabaseSql);
LOG.info("Finished creating database {}", databaseName);
} catch (final SQLException se) {
throw this.exceptionMapper.toGravitinoException(se);
}
}
```
Do I need to open a new PR for it?
--
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]