Skip to content

Conversation

@TCeason
Copy link
Collaborator

@TCeason TCeason commented Jan 6, 2026

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

This PR implements the ALTER SET/UNSET TAG functionality, allowing users to manage tags on databases, tables, stages, and connections.

New Features:

  • Support ALTER DATABASE/TABLE/STAGE/CONNECTION [IF EXISTS] SET TAG key = 'value', ...
  • Support ALTER DATABASE/TABLE/STAGE/CONNECTION [IF EXISTS] UNSET TAG key, ...
  • Automatically clean up tag references when dropping tagged objects (tables, stages, connections)
  • Vacuum dropped tables also cleans up associated tag references

Restrictions:

  • Tags cannot be set on built-in databases (default, system, information_schema, system_history)
  • Tags cannot be set on tables in system databases (system, information_schema, system_history)
  • Tags cannot be set on external catalog objects
  • Tags cannot be set on temporary tables

Fix: #19220

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe):

This change is Reviewable

@TCeason TCeason requested a review from dantengsky January 6, 2026 04:47
@github-actions github-actions bot added the pr-feature this PR introduces a new feature to the codebase label Jan 6, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f459148994

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@TCeason
Copy link
Collaborator Author

TCeason commented Jan 8, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 60c5a0921e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@TCeason TCeason merged commit 4750c0e into databendlabs:main Jan 8, 2026
168 of 170 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-feature this PR introduces a new feature to the codebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Phase 2: Object Binding — ALTER ... SET/UNSET TAG, system.tag_references

2 participants