liugddx commented on code in PR #8536:
URL: https://github.com/apache/seatunnel/pull/8536#discussion_r1922045663


##########
seatunnel-api/src/main/java/org/apache/seatunnel/api/table/factory/FactoryUtil.java:
##########
@@ -351,4 +401,29 @@ public static SeaTunnelTransform<?> 
createAndPrepareMultiTableTransform(
         
ConfigValidator.of(context.getOptions()).validate(factory.optionRule());
         return factory.createTransform(context).createTransform();
     }
+
+    private static <T extends Factory> boolean isFallback(
+            ClassLoader classLoader,
+            Class<T> factoryClass,
+            String factoryId,
+            Consumer<T> virtualCreator) {
+        Optional<T> factory =
+                FactoryUtil.discoverOptionalFactory(classLoader, factoryClass, 
factoryId);
+        if (!factory.isPresent()) {
+            return true;
+        }
+        try {
+            virtualCreator.accept(factory.get());
+        } catch (Exception e) {
+            if (e instanceof UnsupportedOperationException
+                    && "The Factory has not been implemented and the 
deprecated Plugin will be used."
+                            .equals(e.getMessage())) {
+                log.warn(
+                        "The Factory has not been implemented and the 
deprecated Plugin will be used.");

Review Comment:
   Done.



-- 
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