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 10 times, most recently from 7857a91 to f0b9e27 Compare January 10, 2025 01:56
@mxdzs0612 mxdzs0612 force-pushed the paimon_systable branch 5 times, most recently from 85a6c44 to 36d00f7 Compare January 16, 2025 09:46
Copy link

[FE Incremental Coverage Report]

pass : 7 / 7 (100.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/connector/paimon/PaimonMetadata.java 6 6 100.00% []
🔵 com/starrocks/connector/CatalogConnectorMetadata.java 1 1 100.00% []

@mxdzs0612
Copy link
Contributor Author

Can be pending, waiting for 1.0.1

@@ -42,7 +42,7 @@ under the License.
<fe_ut_parallel>${env.FE_UT_PARALLEL}</fe_ut_parallel>
<jacoco.version>0.8.8</jacoco.version>
<iceberg.version>1.6.0</iceberg.version>
<paimon.version>0.8.2</paimon.version>
<paimon.version>1.0.0</paimon.version>
Copy link
Contributor

Choose a reason for hiding this comment

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

is there any special reason to wait 1.0.1?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not that special, just some optimizations. Can be merged if tests pass.

Copy link

[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

[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.

2 participants