hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chao (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-7970) Operator::removeChild may remove the wrong child
Date Wed, 03 Sep 2014 22:37:51 GMT

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

Chao updated HIVE-7970:
-----------------------
    Description: 
Currently, {{Operator::removeChild}} does the following:

{code}
  public void removeChild(Operator<? extends OperatorDesc> child) {
    int childIndex = childOperators.indexOf(child);
    assert childIndex != -1;
    if (childOperators.size() == 1) {
      setChildOperators(null);
    } else {
      childOperators.remove(childIndex);
    }
    ....
{code}

However, most of the time assertion isn't turned on, and if the operator
only have one child, it may remove the wrong child.
I think we need to change the assertion to something else.

  was:
Currently, {{Operator::removeChild}} does the following:

{code}
  public void removeChild(Operator<? extends OperatorDesc> child) {
    int childIndex = childOperators.indexOf(child);
    assert childIndex != -1;
    if (childOperators.size() == 1) {
      setChildOperators(null);
    } else {
      childOperators.remove(childIndex);
    }
{code}

However, most of the time assertion isn't turned on, and if the operator
only have one child, it may remove the wrong child.
I think we need to change the assertion to something else.


> Operator::removeChild may remove the wrong child
> ------------------------------------------------
>
>                 Key: HIVE-7970
>                 URL: https://issues.apache.org/jira/browse/HIVE-7970
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Chao
>
> Currently, {{Operator::removeChild}} does the following:
> {code}
>   public void removeChild(Operator<? extends OperatorDesc> child) {
>     int childIndex = childOperators.indexOf(child);
>     assert childIndex != -1;
>     if (childOperators.size() == 1) {
>       setChildOperators(null);
>     } else {
>       childOperators.remove(childIndex);
>     }
>     ....
> {code}
> However, most of the time assertion isn't turned on, and if the operator
> only have one child, it may remove the wrong child.
> I think we need to change the assertion to something else.



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

Mime
View raw message