Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[update][Connector]oracle list database optimization #6823

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

chl-wxp
Copy link
Contributor

@chl-wxp chl-wxp commented May 9, 2024

Check list

  • When executing the "SELECT NAME FROM V $ DataBase" statement, there may be no authority, but you can return the current connected database

Comment on lines +118 to +132
@Override
public List<String> listDatabases() throws CatalogException {
try {
return queryString(
defaultUrl,
getListDatabaseSql(),
rs -> {
String s = rs.getString(1).trim();
return SYS_DATABASES.contains(s) ? null : s;
});
} catch (Exception e) {
log.info("Failed listing database in catalog oracle", e);
return Collections.singletonList(defaultDatabase);
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a test case?

@chl-wxp chl-wxp closed this May 11, 2024
@chl-wxp chl-wxp reopened this May 11, 2024
@Hisoka-X
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants