Skip to content

Conversation

@geserdugarov
Copy link
Contributor

Describe the issue this Pull Request addresses

For separate discussion of HoodieTableFactory simplification started in #17994.

Summary and Changelog

This PR is intended to simplify understanding the flow of Hoodie options set and validation in HoodieTableFactory.

Impact

No impact

Risk Level

None

Documentation Update

No need

Contributor's checklist

  • Read through contributor's guide
  • Enough context is provided in the sections above
  • Adequate tests were added if applicable

@github-actions github-actions bot added the size:M PR with lines of changes in (100, 300] label Jan 27, 2026
@geserdugarov geserdugarov changed the title refactor: Clear setup and validation in HoodieTableFactory refactor: Clear setup and validation in HoodieTableFactory Jan 27, 2026
setupKeyGenRelatedOptions(conf, context.getCatalogTable());
ResolvedSchema schema = context.getCatalogTable().getResolvedSchema();
setupConfOptions(conf, context.getObjectIdentifier(), context.getCatalogTable(), schema);
setupAdditionalOptions(conf, context.getObjectIdentifier(), schema.toPhysicalRowDataType().notNull().getLogicalType());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The code block up to this line is repeated in createDynamicTableSink, but I suppose it's simpler to understand of what is going on here this way.

@geserdugarov geserdugarov force-pushed the master-refac-factory branch 3 times, most recently from db563d4 to c864d96 Compare January 27, 2026 11:45
// set common parameters
conf.setString(FlinkOptions.TABLE_NAME.key(), context.getObjectIdentifier().getObjectName());
conf.setString(FlinkOptions.DATABASE_NAME.key(), context.getObjectIdentifier().getDatabaseName());
setupKeyGenRelatedOptions(conf, context.getCatalogTable());
Copy link
Contributor Author

@geserdugarov geserdugarov Jan 27, 2026

Choose a reason for hiding this comment

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

The principal change is here, where we setup key related options first with possible overwrites, and only then check them in sanityCheck.

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M PR with lines of changes in (100, 300]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants