phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From comnetwork <...@git.apache.org>
Subject [GitHub] phoenix pull request #424: PHOENIX-4820
Date Fri, 04 Jan 2019 02:11:10 GMT
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. 


---

Mime
View raw message