924060929 commented on code in PR #11299:
URL: https://github.com/apache/doris/pull/11299#discussion_r934114530


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/TernaryExpression.java:
##########
@@ -23,17 +23,4 @@
  * Interface for all expression that have three children.
  */
 public interface TernaryExpression extends TernaryNode<Expression, Expression, 
Expression, Expression> {
-
-
-    default Expression first() {
-        return child(0);
-    }
-
-    default Expression second() {
-        return child(1);
-    }
-
-    default Expression third() {
-        return child(2);
-    }
 }

Review Comment:
   The default overwrite function that return expression is necessary, 
otherwise you will see the TernaryNode.first() return the TreeNode. Remain the 
default override function in UnaryExpression and BinaryExpression too. 
   ```java
       default Expression first() {
           return child(0);
       }
   
       default Expression second() {
           return child(1);
       }
   
       default Expression third() {
           return child(2);
       }
   ```



-- 
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-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to