You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "danny0405 (via GitHub)" <gi...@apache.org> on 2023/01/29 03:28:47 UTC
[GitHub] [hudi] danny0405 commented on a diff in pull request #7608: [HUDI-5503] Optimize flink table factory option check
danny0405 commented on code in PR #7608:
URL: https://github.com/apache/hudi/pull/7608#discussion_r1089858754
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/HoodieTableFactory.java:
##########
@@ -68,12 +72,12 @@ public class HoodieTableFactory implements DynamicTableSourceFactory, DynamicTab
@Override
public DynamicTableSource createDynamicTableSource(Context context) {
Configuration conf = FlinkOptions.fromMap(context.getCatalogTable().getOptions());
- ResolvedSchema schema = context.getCatalogTable().getResolvedSchema();
- sanityCheck(conf, schema);
- setupConfOptions(conf, context.getObjectIdentifier(), context.getCatalogTable(), schema);
-
Path path = new Path(conf.getOptional(FlinkOptions.PATH).orElseThrow(() ->
new ValidationException("Option [path] should not be empty.")));
+ setupTableOptions(conf.getString(FlinkOptions.PATH), conf);
+ ResolvedSchema schema = context.getCatalogTable().getResolvedSchema();
+ sourceSanityCheck(conf, schema);
+ setupConfOptions(conf, context.getObjectIdentifier(), context.getCatalogTable(), schema);
Review Comment:
The sanity check for source can be removed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org