Skip to content

feat(datafusion): support alter column - #625

Merged
JingsongLi merged 1 commit into
apache:mainfrom
QuakeWang:datafusion-alter-column
Jul 28, 2026
Merged

feat(datafusion): support alter column#625
JingsongLi merged 1 commit into
apache:mainfrom
QuakeWang:datafusion-alter-column

Conversation

@QuakeWang

Copy link
Copy Markdown
Member

Purpose

DataFusion SQL supports adding, dropping, and renaming columns, but rejects ALTER COLUMN even though the core schema layer already supports type and nullability changes.

This change exposes the existing schema evolution capabilities through SQL while preserving schema and primary-key index consistency.

Brief change log

  • Support ALTER COLUMN ... TYPE and SET DATA TYPE.
  • Support SET NOT NULL and DROP NOT NULL.
  • Preserve existing nullability for type-only changes.
  • Reject unsupported conversion expressions and non-atomic mixed ALTER operations.
  • Prevent destructive changes to primary-key vector and full-text index columns.

Tests

  • Added SQL mapping and validation unit tests.
  • Added a filesystem catalog integration test.
  • Added primary-key index schema guard tests.
  • Passed formatting, Clippy, and affected test suites.

API and Format

Adds DataFusion SQL DDL support. No storage format changes.

Documentation

Updated the supported SQL statement list.

@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 7810abe into apache:main Jul 28, 2026
13 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