yuqi1129 opened a new issue, #6629:
URL: https://github.com/apache/gravitino/issues/6629
### What would you like to be improved?
load method in `JdbcDatabaseOperations` will load all databases. if there
are a lot of databases, it takes a lot of time.
```java
@Override
public JdbcSchema load(String databaseName) throws NoSuchSchemaException {
// We need to load the database as needed NOT load them all.
List<String> allDatabases = listDatabases();
String dbName =
allDatabases.stream()
.filter(db -> db.equals(databaseName))
.findFirst()
.orElseThrow(
() -> new NoSuchSchemaException("Database %s could not be
found", databaseName));
return JdbcSchema.builder()
.withName(dbName)
.withProperties(ImmutableMap.of())
.withAuditInfo(AuditInfo.EMPTY)
.build();
}
```
### How should we improve?
_No response_
--
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]