Skip to content

Commit

Permalink
modify Validates the options of the factory
Browse files Browse the repository at this point in the history
  • Loading branch information
hnrainll committed Oct 6, 2023
1 parent d3dbacc commit 095ca3c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,12 @@ public DynamicTableSource createDynamicTableSource(Context context) {
final DecodingFormat<DeserializationSchema<RowData>> valueDecodingFormat =
getValueDecodingFormat(helper);

helper.validateExcept(PROPERTIES_PREFIX);

final ReadableConfig tableOptions = helper.getOptions();

final String valueFormatPrefix = tableOptions.getOptional(FORMAT).orElse(tableOptions.get(VALUE_FORMAT));
LOG.info("valueFormatPrefix is {}", valueFormatPrefix);
helper.validateExcept(PROPERTIES_PREFIX, Constants.DIRTY_PREFIX, valueFormatPrefix);

validateTableSourceOptions(tableOptions);

validatePKConstraints(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public DynamicTableSource createDynamicTableSource(Context context) {
helper.discoverDecodingFormat(DeserializationFormatFactory.class, VALUE_FORMAT);

// Validate the option data type.
helper.validateExcept(PROPERTIES_PREFIX);
helper.validateExcept(PROPERTIES_PREFIX, Constants.DIRTY_PREFIX);
validateSource(
tableOptions,
keyDecodingFormat,
Expand Down

0 comments on commit 095ca3c

Please sign in to comment.