Skip to content

Fix schema change docs: NOT NULL to NULL is supported - #4107

Open
ixzc wants to merge 2 commits into
apache:masterfrom
ixzc:fix/schema-change-nullable-docs
Open

Fix schema change docs: NOT NULL to NULL is supported#4107
ixzc wants to merge 2 commits into
apache:masterfrom
ixzc:fix/schema-change-nullable-docs

Conversation

@ixzc

@ixzc ixzc commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Clarify nullable modification rules in the Schema Change documentation: NOT NULL → NULL is supported (heavyweight Schema Change); NULL → NOT NULL is not supported.
  • Remove the incorrect blanket limitation that all Nullable attribute changes are unsupported, which contradicted examples on the same page and actual Doris behavior (Column.checkSchemaChangeAllowed()).
  • Add an explicit MODIFY COLUMN ... NULL example and list NOT NULL → NULL under heavyweight Schema Change operations.

Motivation

The current Limitations table states:

Modifying the aggregation type, Nullable attribute, and default value is not supported

This is misleading for operators changing columns to nullable (e.g. MODIFY COLUMN col INT NULL), which triggers a heavyweight Schema Change job and is covered by regression tests (test_alter_table_column_nullable.groovy).

Files changed

  • docs/table-design/schema-change.md (dev/current, EN)
  • i18n/zh-CN/.../current/table-design/schema-change.md (dev/current, ZH)
  • versioned_docs/version-4.x/table-design/schema-change.md (4.x, EN)
  • i18n/zh-CN/.../version-4.x/table-design/schema-change.md (4.x, ZH)

Test plan

  • Verified wording against Doris FE source: fe/fe-core/src/main/java/org/apache/doris/catalog/Column.java (checkSchemaChangeAllowed)
  • Aligned with existing doc example MODIFY COLUMN col3 varchar(50) KEY NULL
  • Aligned with regression test regression-test/suites/schema_change_p0/test_alter_table_column_nullable.groovy

Made with Cursor

ixzc and others added 2 commits September 2, 2026 05:14
Clarify that changing NOT NULL to NULL is supported via heavyweight Schema
Change, while NULL to NOT NULL is not. Remove the incorrect blanket statement
that all Nullable attribute changes are unsupported, which contradicted the
page examples and Doris behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
Apply the same NOT NULL to NULL clarification to 3.x English and Chinese
schema-change pages, matching the updates already made for dev/current and
4.x.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant