-
Notifications
You must be signed in to change notification settings - Fork 2.5k
refactor: Clear setup and validation in HoodieTableFactory #18010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
HoodieTableFactory| setupKeyGenRelatedOptions(conf, context.getCatalogTable()); | ||
| ResolvedSchema schema = context.getCatalogTable().getResolvedSchema(); | ||
| setupConfOptions(conf, context.getObjectIdentifier(), context.getCatalogTable(), schema); | ||
| setupAdditionalOptions(conf, context.getObjectIdentifier(), schema.toPhysicalRowDataType().notNull().getLogicalType()); |
There was a problem hiding this comment.
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.
db563d4 to
c864d96
Compare
| // 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()); |
There was a problem hiding this comment.
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.
c864d96 to
53322ff
Compare
53322ff to
2d76d83
Compare
Describe the issue this Pull Request addresses
For separate discussion of
HoodieTableFactorysimplification 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