Github user comnetwork commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/424#discussion_r245186554
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/expression/BaseExpression.java ---
    @@ -255,4 +255,15 @@ public boolean requiresFinalEvaluation() {
             return false;
         }
     
    +    @Override
    +    public boolean isCloneExpression()  {
    +       return isCloneExpressionByDeterminism(this);
    +    }
    +
    +    protected static boolean isCloneExpressionByDeterminism(BaseExpression 
expression) {
    --- End diff --
    
    @twdsilva , thank you for the review, I added 
BaseExpression.isCloneExpressionByDeterminism method here for the purpose that 
it can also be invoked by RandomFunction. RandomFunction is derived from 
BaseCompoundExpression , and if RandomFunction does not override 
isCloneExpression method, the isCloneExpression method of RandomFunction would 
use the isCloneExpression method of BaseCompoundExpression  and return false,   
the existing Unit Test ArithmeticOperationTest would fail. 


---

Reply via email to