Hi,

I checked the code, it is NOT a bug, just removing the last else-if clause will 
solve it.

--
Jialin Qiao
School of Software, Tsinghua University

乔嘉林
清华大学 软件学院

> -----原始邮件-----
> 发件人: "Xiangdong Huang" <[email protected]>
> 发送时间: 2019-09-17 08:53:17 (星期二)
> 收件人: [email protected], [email protected]
> 抄送: 
> 主题: Re: [jira] [Created] (IOTDB-210) One else if branch will never be reached 
> in the method optimize of ExpressionOptimizer
> 
> Hi,
> 
> Is it a bug? or just removing the last else-if clause will solve it? Jinrui
> may know more about that.
> 
> Best,
> -----------------------------------
> Xiangdong Huang
> School of Software, Tsinghua University
> 
>  黄向东
> 清华大学 软件学院
> 
> 
> Yuan Tian (Jira) <[email protected]> 于2019年9月12日周四 上午10:01写道:
> 
> > Yuan Tian created IOTDB-210:
> > -------------------------------
> >
> >              Summary: One else if branch will never be reached in the
> > method optimize of ExpressionOptimizer
> >                  Key: IOTDB-210
> >                  URL: https://issues.apache.org/jira/browse/IOTDB-210
> >              Project: Apache IoTDB
> >           Issue Type: Bug
> >             Reporter: Yuan Tian
> >
> >
> > The code has been shown in the following. As we can see, the condition in
> > the last else if, if 'left.getType() == ExpressionType.SERIES &&
> > right.getType() == ExpressionType.SERIES' is true, the condition in the
> > previous else if which is 'left.getType() != ExpressionType.GLOBAL_TIME&&
> > right.getType() != ExpressionType.GLOBAL_TIME' must be true. Thus, the last
> > else if code block will never be executed.
> >
> >
> > {code:java}
> > else if (left.getType() != ExpressionType.GLOBAL_TIME
> >  && right.getType() != ExpressionType.GLOBAL_TIME) {
> > ....
> > } else if (left.getType() == ExpressionType.SERIES
> >  && right.getType() == ExpressionType.SERIES) {
> >  ...
> > }{code}
> >
> >
> >
> >
> > --
> > This message was sent by Atlassian Jira
> > (v8.3.2#803003)
> >

Reply via email to