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

Tajo QA commented on TAJO-1512:
-------------------------------

{color:green}*+1 overall.*{color}  Here are the results of testing the latest 
attachment 
  
http://issues.apache.org/jira/secure/attachment/12709408/TAJO-1512.Hyun.150404.0.patch
  against master revision release-0.9.0-rc0-236-g70d5fdf.

    {color:green}+1 @author.{color}  The patch does not contain any @author 
tags.

    {color:green}+1 tests included.{color}  The patch appears to include 1 new 
or modified test files.

    {color:green}+1 javac.{color}  The applied patch does not increase the 
total number of javac compiler warnings.

    {color:green}+1 javadoc.{color}  The applied patch does not increase the 
total number of javadoc warnings.

    {color:green}+1 checkstyle.{color}  The patch generated 0 code style errors.

    {color:green}+1 findbugs.{color}  The patch does not introduce any new 
Findbugs (version 2.0.3) warnings.

    {color:green}+1 release audit.{color}  The applied patch does not increase 
the total number of release audit warnings.

    {color:green}+1 core tests.{color}  The patch passed unit tests in 
tajo-algebra.

Test results: 
https://builds.apache.org/job/PreCommit-TAJO-Build/701//testReport/
Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/701//console

This message is automatically generated.

> Fix various Expr cloning bugs
> -----------------------------
>
>                 Key: TAJO-1512
>                 URL: https://issues.apache.org/jira/browse/TAJO-1512
>             Project: Tajo
>          Issue Type: Bug
>    Affects Versions: 0.10.0
>            Reporter: Dongjoon Hyun
>            Assignee: Dongjoon Hyun
>            Priority: Critical
>             Fix For: 0.10.1
>
>         Attachments: TAJO-1512.Hyun.150403.0.patch, 
> TAJO-1512.Hyun.150404.0.patch
>
>
> When `Expr.clone()` is called, various 
> errors(NPE/TypeCastingError/recursive/functional error) are occurs. This 
> issue should be solved for others issues reusing `Expr`. Please refer the 
> following code. 
> * NPE case (Aggregation.java, UnaryOperator.java, CreateTable, AlterTable)
> {code:java}
> -    aggregation.namedExprs = new NamedExpr[namedExprs.length];
> -    for (int i = 0; i < namedExprs.length; i++) {
> -      aggregation.namedExprs[i] = (NamedExpr) namedExprs[i].clone();
> +    if (namedExprs != null) {
> +      aggregation.namedExprs = new NamedExpr[namedExprs.length];
> +      for (int i = 0; i < namedExprs.length; i++) {
> +        aggregation.namedExprs[i] = (NamedExpr) namedExprs[i].clone();
> +      }
>      }
>  
> -    aggregation.groups = new GroupElement[groups.length];
> -    for (int i = 0; i < groups.length; i++) {
> -      aggregation.groups[i] = (GroupElement) groups[i].clone();
> +    if (groups != null) {
> +      aggregation.groups = new GroupElement[groups.length];
> +      for (int i = 0; i < groups.length; i++) {
> +        aggregation.groups[i] = (GroupElement) groups[i].clone();
> +      }
>      }
> {code}
> {code:java}
> -    alter.addNewColumn = (ColumnDefinition) addNewColumn.clone();
> +    if (addNewColumn != null) {
> +      alter.addNewColumn = (ColumnDefinition) addNewColumn.clone();
> +    }
> {code}
> * Recursive (BetweenPredicate.java)
> {code:java}
> -    between.begin = (Expr) between.clone();
> +    between.begin = (Expr) begin.clone();
> {code}
> * Type Casting Error (ValueListExpr.java)
> {code:java}
> -      valueListExpr.values = (Expr[]) values[i].clone();
> +      valueListExpr.values[i] = (Expr) values[i].clone();
> {code}
> * Functional Error (CreateTable.java)
> {code:java}
> -      if (range.specifiers != null) {
> +      if (specifiers != null) {
> {code}



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

Reply via email to