Skip to content

[HUDI-8097] Fix getting Schema evolution setting from hudi-defaults.conf on altering columns#11796

Merged
danny0405 merged 1 commit intoapache:masterfrom
wombatu-kun:HUDI-8097_schema_evolution_hudi-defaults
Aug 20, 2024
Merged

[HUDI-8097] Fix getting Schema evolution setting from hudi-defaults.conf on altering columns#11796
danny0405 merged 1 commit intoapache:masterfrom
wombatu-kun:HUDI-8097_schema_evolution_hudi-defaults

Conversation

@wombatu-kun
Copy link
Contributor

Change Logs

Value of hoodie.schema.on.read.enable from externalized config hudi-defaults.conf was not taken into consideration while processing commands such as alter table change column .. in Spark.
Fixed it by utilzing DFSPropertiesConfiguration.getGlobalProps in HoodieCatalog.loadTable and SparkXXResolveHudiAlterTableCommand.apply.
Removed code duplicates in SparkXXResolveHudiAlterTableCommand classes by moving common method isSchemaEvolutionEnabled to ProvidesHoodieConfig.

Impact

Schema evolution option from hudi-defaults.conf works properly now with Spark SQL alter table change colunm.

Risk level (write none, low medium or high below)

none

Documentation Update

none

  • The config description must be updated if new configs are added or the default value of the configs are changed
  • Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
    ticket number here and follow the instruction to make
    changes to the website.

Contributor's checklist

  • Read through contributor's guide
  • Change Logs and Impact were stated clearly
  • Adequate tests were added if applicable
  • CI passed

@wombatu-kun wombatu-kun force-pushed the HUDI-8097_schema_evolution_hudi-defaults branch from 1e28b34 to 35cf6b2 Compare August 19, 2024 14:13
@github-actions github-actions bot added the size:S PR with lines of changes in (10, 100] label Aug 19, 2024
@hudi-bot
Copy link
Collaborator

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

Copy link
Contributor

@danny0405 danny0405 left a comment

Choose a reason for hiding this comment

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

+1, I like the fix.

@danny0405 danny0405 merged commit e4e5bf0 into apache:master Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S PR with lines of changes in (10, 100]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants