nzw921rx commented on code in PR #11048:
URL: https://github.com/apache/seatunnel/pull/11048#discussion_r3401423815


##########
seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/util/ConditionEvaluators.java:
##########
@@ -169,6 +169,14 @@ private static Map<ConditionOperator, Evaluator> 
createRegistry() {
                     return compareNumbers(v, other) >= 0;
                 });
 
+        // Extension (custom logic delegated to ConditionExtension)
+        m.put(
+                ConditionOperator.EXTENSION,
+                (v, c, cfg) -> {
+                    ConditionExtension<Object> ext = 
(ConditionExtension<Object>) c.getExtension();
+                    return ext.evaluate(cfg, v);

Review Comment:
   This is handled by the extension plugin itself, and exceptions are not 
encapsulated at the framework level



##########
seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/util/ConditionEvaluators.java:
##########
@@ -169,6 +169,14 @@ private static Map<ConditionOperator, Evaluator> 
createRegistry() {
                     return compareNumbers(v, other) >= 0;
                 });
 
+        // Extension (custom logic delegated to ConditionExtension)
+        m.put(
+                ConditionOperator.EXTENSION,
+                (v, c, cfg) -> {
+                    ConditionExtension<Object> ext = 
(ConditionExtension<Object>) c.getExtension();

Review Comment:
   No ClassCastException will be generated, and the Externalization operator 
will be created uniformly by Conditiones.extension without any type conversion 
issues



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