CalvinKirs commented on code in PR #3353:
URL: 
https://github.com/apache/incubator-seatunnel/pull/3353#discussion_r1032190343


##########
seatunnel-api/src/main/java/org/apache/seatunnel/api/table/factory/TableSourceFactory.java:
##########
@@ -36,4 +37,21 @@ public interface TableSourceFactory extends Factory {
     default <T, SplitT extends SourceSplit, StateT extends Serializable> 
TableSource<T, SplitT, StateT> createSource(TableFactoryContext context) {
         throw new UnsupportedOperationException("unsupported now");
     }
+
+    /**
+     * This method is called by SeaTunnel Web to get the full option rule of a 
source connector.
+     * Please don't overwrite this method.
+     * @return
+     */
+    default OptionRule fullOptionRule() {
+        OptionRule optionRule = optionRule();
+        if (optionRule == null) {
+            throw new FactoryException("OptionRule can not be null");
+        }
+
+        OptionRule sourceCommonOptionRule =
+            
OptionRule.builder().optional(SourceCommonOptions.RESULT_TABLE_NAME, 
SourceCommonOptions.PARALLELISM).build();
+        
optionRule.getOptionalOptions().addAll(sourceCommonOptionRule.getOptionalOptions());
+        return optionRule;
+    }

Review Comment:
   +1



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to