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

Kazuaki Ishizaki updated SPARK-22668:
-------------------------------------
    Description: 
{{CodegenContext.splitExpressions()}} creates incorrect results with arguments 
that were declared as global variable.

{code}
class Test {
  int global1;

  void splittedFunction(int global1) {
    ...
    global1 = 2;
  }

  void apply() {
    global1 = 1;
    ...
    splittedFunction(global1);
    // global1 should be 2
  }
}
{code}

  was:
{{CodegenContext.splitExpression()}} creates incorrect results with arguments 
that were declared as global variable.

{code}
class Test {
  int global1;

  void splittedFunction(int global1) {
    ...
    global1 = 2;
  }

  void apply() {
    global1 = 1;
    ...
    splittedFunction(global1);
    // global1 should be 2
  }
}
{code}


> CodegenContext.splitExpressions() creates incorrect results with global 
> variable arguments 
> -------------------------------------------------------------------------------------------
>
>                 Key: SPARK-22668
>                 URL: https://issues.apache.org/jira/browse/SPARK-22668
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.3.0
>            Reporter: Kazuaki Ishizaki
>
> {{CodegenContext.splitExpressions()}} creates incorrect results with 
> arguments that were declared as global variable.
> {code}
> class Test {
>   int global1;
>   void splittedFunction(int global1) {
>     ...
>     global1 = 2;
>   }
>   void apply() {
>     global1 = 1;
>     ...
>     splittedFunction(global1);
>     // global1 should be 2
>   }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to