Skip to content

[hive] Add catalog option to control alter table cascade#8210

Open
wzx140 wants to merge 1 commit into
apache:masterfrom
wzx140:cp-disable-cascade
Open

[hive] Add catalog option to control alter table cascade#8210
wzx140 wants to merge 1 commit into
apache:masterfrom
wzx140:cp-disable-cascade

Conversation

@wzx140

@wzx140 wzx140 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Purpose

When Paimon alters a Hive table, it unconditionally sets StatsSetupConst.CASCADE = "true" in the EnvironmentContext, which makes Hive cascade the schema change to every partition. On large partitioned tables this can be expensive, and there is currently no way to turn it off.

This PR adds a new catalog option alter-table-cascade (default true, preserving the current behavior) to control whether the cascade is applied. Set alter-table-cascade=false to skip cascading schema changes to partitions.

Tests

  • Added HiveAlterTableUtilsTest covering the cascade and non-cascade paths.

@wzx140 wzx140 force-pushed the cp-disable-cascade branch from e394b04 to 4abddc6 Compare June 11, 2026 07:05
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