Skip to content

feat(index): add btree global index drop#472

Merged
JingsongLi merged 1 commit into
apache:mainfrom
QuakeWang:drop-global-index
Jul 7, 2026
Merged

feat(index): add btree global index drop#472
JingsongLi merged 1 commit into
apache:mainfrom
QuakeWang:drop-global-index

Conversation

@QuakeWang

Copy link
Copy Markdown
Member

Purpose

BTree global index already supports explicit creation, but there was no matching drop API. Once a BTree index exists, users could not remove its index manifest entries through the table/DataFusion API, which also made safe rebuild flows awkward because create rejects overlapping existing global index ranges.

Brief change log

  • Add a BTree global index drop builder on Table.
  • Drop matching current-snapshot index manifest entries via CommitMessage.deleted_index_files.
  • Keep the operation idempotent: no snapshot, no index manifest, or no matching BTree index returns success with zero dropped entries.
  • Add CALL sys.drop_global_index(table => '...', index_column => '...', index_type => 'btree').
  • Reject non-BTree index types and unsupported partitions / dry_run arguments explicitly.

Tests

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --workspace --features fulltext,vortex,mosaic -- -D warnings
  • cargo test -p paimon table::btree_global_index_drop_builder --lib
  • cargo test -p paimon-datafusion --test procedures drop_global_index
  • cargo test -p paimon-datafusion --test procedures create_global_index
  • cargo test -p paimon table::btree_global_index_build_builder --lib
  • cargo check -p paimon
  • cargo check -p paimon-datafusion

API and Format

Adds a Rust table API and DataFusion procedure for BTree global index drop.

Documentation

No docs update in this PR; this only exposes the narrow BTree drop lifecycle already represented by index manifest delete commits.

Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>

@JingsongLi JingsongLi left a comment

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.

+1

@JingsongLi JingsongLi merged commit e312ca6 into apache:main Jul 7, 2026
12 checks passed
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.

2 participants