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

[Enhancement] Upgrade paimon sdk to 1.0 version #54796

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mxdzs0612
Copy link
Contributor

Why I'm doing:

What I'm doing:

Fixes #issue

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 3.4
    • 3.3
    • 3.2
    • 3.1
    • 3.0

@mxdzs0612 mxdzs0612 requested a review from a team as a code owner January 7, 2025 12:52
return true;
} catch (Catalog.TableNotExistException e) {
return false;
}
}

@Override
Copy link

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

@mxdzs0612 mxdzs0612 changed the title [Enhancemnt] Upgrade paimon bundles to 1.0 version [Enhancement] Upgrade paimon bundles to 1.0 version Jan 7, 2025
@mxdzs0612 mxdzs0612 changed the title [Enhancement] Upgrade paimon bundles to 1.0 version [Enhancement] Upgrade paimon sdk to 1.0 version Jan 7, 2025
@mxdzs0612 mxdzs0612 force-pushed the paimon_systable branch 2 times, most recently from 7ebadaa to 6d31175 Compare January 8, 2025 03:26
Copy link

github-actions bot commented Jan 8, 2025

[FE Incremental Coverage Report]

fail : 3 / 6 (50.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/connector/paimon/PaimonMetadata.java 3 6 50.00% [199, 243, 244]

Copy link

sonarqubecloud bot commented Jan 8, 2025

Copy link

github-actions bot commented Jan 8, 2025

[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

Copy link

github-actions bot commented Jan 8, 2025

[BE Incremental Coverage Report]

pass : 0 / 0 (0%)

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

Successfully merging this pull request may close these issues.

1 participant