Skip to content

Conversation

@nastra
Copy link
Contributor

@nastra nastra commented Nov 28, 2025

Purpose

This aligns the error msg that is thrown when altering table properties of a non-existing table. Previously the error msg contained a paimon-specific identifier and I've changed it to show the TablePath instead. I've also added a test

Brief change log

Tests

Added a unit test to verify the error msg

API and Format

Documentation

@nastra nastra force-pushed the fix-paimon-alter-exception-msg branch from d176209 to 06e5c57 Compare November 28, 2025 08:33
@nastra nastra closed this Nov 28, 2025
@nastra nastra reopened this Nov 28, 2025
@nastra nastra force-pushed the fix-paimon-alter-exception-msg branch from 06e5c57 to ee8d1c3 Compare November 28, 2025 12:56
@nastra nastra closed this Nov 28, 2025
@nastra nastra reopened this Nov 28, 2025
@MehulBatra MehulBatra requested a review from Copilot November 30, 2025 19:03
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aligns the error message format when altering properties of a non-existing table. The error message now uses the Fluss TablePath format instead of the Paimon-specific identifier format, and the message text is updated from "not exists" to "does not exist" for grammatical correctness.

Key changes:

  • Updated error message to use TablePath instead of Paimon Identifier format
  • Corrected grammar in error message from "not exists" to "does not exist"
  • Added comprehensive test coverage for the error message in both scenarios (non-existing database and non-existing table)

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
PaimonLakeCatalog.java Refactored alterTable method to accept TablePath parameter and convert to Paimon format internally, ensuring error messages display the Fluss table path
PaimonLakeCatalogTest.java Added test cases verifying the error message format when attempting to alter properties of non-existing tables

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@LiebingYu
Copy link
Contributor

@nastra Thanks for the PR. LGTM overall, but I think we can also change the msg in createTable.

    private void createTable(Identifier tablePath, Schema schema, boolean isCreatingFlussTable)
            throws Catalog.DatabaseNotExistException {
        try {
            // not ignore if table exists
            paimonCatalog.createTable(tablePath, schema, false);
        } catch (Catalog.TableAlreadyExistException e) {
            try {
                Table table = paimonCatalog.getTable(tablePath);
                FileStoreTable fileStoreTable = (FileStoreTable) table;
                validatePaimonSchemaCompatible(
                        tablePath, fileStoreTable.schema().toSchema(), schema);
                // if creating a new fluss table, we should ensure the lake table is empty
                if (isCreatingFlussTable) {
                    checkTableIsEmpty(tablePath, fileStoreTable);
                }
            } catch (Catalog.TableNotExistException tableNotExistException) {
                // shouldn't happen in normal cases
                throw new RuntimeException(
                        String.format(
                                "Failed to create table %s in Paimon. The table already existed "
                                        + "during the initial creation attempt, but subsequently "
                                        + "could not be found when trying to get it. "
                                        + "Please check whether the Paimon table was manually deleted, and try again.",
                                tablePath));
            }
        }
    }

@nastra nastra force-pushed the fix-paimon-alter-exception-msg branch from ee8d1c3 to 0e0f551 Compare December 2, 2025 06:52
@nastra
Copy link
Contributor Author

nastra commented Dec 2, 2025

@LiebingYu I've updated the error msg of createTable to include TablePath instead of Identifier

@nastra nastra force-pushed the fix-paimon-alter-exception-msg branch from 0e0f551 to 6db1b21 Compare December 2, 2025 08:31
Copy link
Contributor

@luoyuxia luoyuxia left a comment

Choose a reason for hiding this comment

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

@nastra Thanks. LGTM

@luoyuxia luoyuxia merged commit b0a4124 into apache:main Dec 5, 2025
5 checks passed
@nastra nastra deleted the fix-paimon-alter-exception-msg branch December 5, 2025 06:44
LiebingYu pushed a commit to LiebingYu/fluss that referenced this pull request Dec 5, 2025
rionmonster pushed a commit to rionmonster/fluss that referenced this pull request Dec 6, 2025
[FLUSS-2113] Upgrade Deployed Maven to Latest Stable Release (3.9.11)

[FLUSS-2113] Upgrade Deployed Maven to Latest Stable Release (3.9.11)
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.

3 participants