Skip to content

[Enhancement] (nereids)implement alterCatalogCommentCommand in nereids - #45160

Merged
starocean999 merged 1 commit into
apache:masterfrom
msridhar78:alter_catalog_comment
Dec 16, 2024
Merged

starocean999 merged 1 commit into
apache:masterfrom
msridhar78:alter_catalog_comment

Conversation

@msridhar78

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: close #42790

Related PR: #xxx

Problem Summary:

[Enhancement] (nereids)implement alterCatalogCommentCommand in nereids

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@doris-robot

Copy link
Copy Markdown

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@msridhar78
msridhar78 marked this pull request as draft December 8, 2024 13:57
@msridhar78
msridhar78 force-pushed the alter_catalog_comment branch from 8a2c50d to 8ec8e5f Compare December 8, 2024 15:46
@msridhar78
msridhar78 marked this pull request as ready for review December 8, 2024 15:47
@msridhar78

Copy link
Copy Markdown
Contributor Author

run buildall

if (Strings.isNullOrEmpty(comment)) {
throw new AnalysisException("New comment is not set.");
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

some validation code from base class is missed. for example:

Util.checkCatalogAllRules(catalogName);
if (!Env.getCurrentEnv().getAccessManager().checkCtlPriv(
        ConnectContext.get(), catalogName, PrivPredicate.ALTER)) {
    ErrorReport.reportAnalysisException(ErrorCode.ERR_CATALOG_ACCESS_DENIED,
            analyzer.getQualifiedUser(), catalogName);
}

if (catalogName.equals(InternalCatalog.INTERNAL_CATALOG_NAME)) {
    throw new AnalysisException("Internal catalog can't be alter.");
}

You can create a base class AlterCatalogCommand like AlterCatalogStmt in old planner for all AlterCatalogxxx commands

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done - please review

@msridhar78
msridhar78 force-pushed the alter_catalog_comment branch from 8ec8e5f to 11c5660 Compare December 12, 2024 12:56
@msridhar78

Copy link
Copy Markdown
Contributor Author

run buildall

@github-actions github-actions Bot added the approved Indicates a PR has been approved by one committer. label Dec 16, 2024
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@starocean999
starocean999 merged commit b0ab7f1 into apache:master Dec 16, 2024
HappenLee pushed a commit to HappenLee/incubator-doris that referenced this pull request Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] (nereids)implement alterCatalogCommentCommand in nereids

4 participants