-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Enhancement] Upgrade paimon sdk to 1.0 version #54796
base: main
Are you sure you want to change the base?
Conversation
return true; | ||
} catch (Catalog.TableNotExistException e) { | ||
return false; | ||
} | ||
} | ||
|
||
@Override |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The most risky bug in this code is:
Improper handling of exceptions which might lead to incorrect flow if unexpected exceptions occur.
You can modify the code like this:
public Database getDb(String dbName) {
if (databases.containsKey(dbName)) {
return databases.get(dbName);
}
try {
// get database from paimon catalog to see if the database exists
paimonNativeCatalog.getDatabase(dbName);
Database db = new Database(CONNECTOR_ID_GENERATOR.getNextId().asInt(), dbName);
databases.put(dbName, db);
return db;
} catch (Catalog.DatabaseNotExistException e) {
LOG.error("Paimon database {}.{} does not exist.", catalogName, dbName);
return null;
} catch (Exception e) {
LOG.error("An unexpected error occurred while fetching the database: {}", e.getMessage());
return null; // or throw a more specific custom exception as needed
}
}
7ebadaa
to
6d31175
Compare
[FE Incremental Coverage Report]❌ fail : 3 / 6 (50.00%) file detail
|
Signed-off-by: Jiao Mingye <[email protected]>
6d31175
to
8d2dae2
Compare
Quality Gate passedIssues Measures |
[Java-Extensions Incremental Coverage Report]coverage check fail. please retry. 😨 Please let me know when error again. com.naver.nid.cover.parser.coverage.exception.ParseException: java.nio.file.NoSuchFileException: /home/runner/_work/starrocks/starrocks/java-extensions/result |
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
Why I'm doing:
What I'm doing:
Fixes #issue
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: