imay commented on a change in pull request #1126: FE support assigning constant 
conjunct and calculating expression
URL: https://github.com/apache/incubator-doris/pull/1126#discussion_r282474138
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/analysis/Expr.java
 ##########
 @@ -1547,4 +1547,15 @@ public static Expr readIn(DataInput in) throws 
IOException {
     public boolean supportSerializable() {
         return false;
     }
+
+    /**
+     * For calculating expr.
+     * @return value returned can't be null, if this and it's children are't 
constant expr, return this.
+     * @throws AnalysisException
+     */
+    public Expr getResultValue() throws AnalysisException {
+        final Expr newExpr = ExpressionFunctions.INSTANCE.evalExpr(this);
+        return newExpr != null? newExpr : this;
 
 Review comment:
   ```suggestion
           return newExpr != null ? newExpr : this;
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to