You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Thomas D'Silva (JIRA)" <ji...@apache.org> on 2014/09/16 02:19:34 UTC

[jira] [Updated] (PHOENIX-1030) Change Expression.isDeterministic() to return an ENUM with three values {DETERMINISTIC, UNDETERMINISTIC_ROW, UNDETERMINISTIC_STMT}

     [ https://issues.apache.org/jira/browse/PHOENIX-1030?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas D'Silva updated PHOENIX-1030:
------------------------------------
    Attachment: PHOENIX-1030-master.patch
                PHOENIX-1030-3.0.patch

[~jamestaylor]

I have attached a patch for 3.2 and a patch for master/4.2. ExpressionUtil.isConstant now just checks if the deterministic enum for an expression is ALWAYS or PER_STATEMENT.  
I also modified CurrentDateTimeFunction to return PER_STATEMENT for the DeterministicEnum . 

I had to change readFields and write in LiteralExpression because of the new DeterministicEnum (which I encoded in an int).
Please let me know if this is ok. 

Thanks,
Thomas

> Change Expression.isDeterministic() to return an ENUM with three values {DETERMINISTIC, UNDETERMINISTIC_ROW, UNDETERMINISTIC_STMT}
> ----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-1030
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1030
>             Project: Phoenix
>          Issue Type: Improvement
>            Reporter: Thomas D'Silva
>            Assignee: Thomas D'Silva
>         Attachments: PHOENIX-1030-3.0.patch, PHOENIX-1030-master.patch
>
>
> Change Expression.isDeterministic() to return an ENUM with three values
> DETERMINISTIC -  the expression returns the same output every time given the same input.
> UNDETERMINISTIC_ROW - the expression should be computed for every row
> UNDETERMINISTIC_STMT - the expression should be be computed for a given statement only once
> See PHOENIX-1001



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)