[ 
https://issues.apache.org/jira/browse/SPARK-9192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14637124#comment-14637124
 ] 

Wenchen Fan commented on SPARK-9192:
------------------------------------

hi [~lian cheng], sorry about leaving the description empty at the beginning, 
as it's a result of an offline discussion with rxin. I have updated it, does 
this make sense to you?

> add initialization phase for nondeterministic expression
> --------------------------------------------------------
>
>                 Key: SPARK-9192
>                 URL: https://issues.apache.org/jira/browse/SPARK-9192
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Wenchen Fan
>
> Currently nondeterministic expression is broken without a explicit 
> initialization phase.
> Let me take `MonotonicallyIncreasingID` as an example. This expression need a 
> mutable state to remember how many times it has been evaluated, so we use 
> `@transient var count: Long` there. By being transient, the `count` will be 
> reset to 0 and **only** to 0 when serialize and deserialize it, as 
> deserialize transient variable will result to default value. There is *no 
> way* to use another initial value for `count`, until we add a a explicit 
> initialization phase.
> For now no nondeterministic expression need this feature, but we may add new 
> ones with the need of a different initial value for mutable state in the 
> future.



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

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

Reply via email to