use of com.actiontech.dble.plan.common.item.function.castfunc.ItemFuncBinary in project dble by actiontech.
the class MySQLItemVisitor method endVisit.
@Override
public void endVisit(SQLUnaryExpr x) {
Item a = getItem(x.getExpr());
switch(x.getOperator()) {
case Negative:
item = new ItemFuncNeg(a);
break;
case Not:
case NOT:
item = new ItemFuncNot(a);
break;
case Compl:
item = new ItemFuncBitInversion(a);
break;
case Plus:
item = a;
break;
case BINARY:
item = new ItemFuncBinary(a, -1);
break;
default:
throw new MySQLOutPutException(ErrorCode.ER_OPTIMIZER, "", "not supported kind expression:" + x.getOperator());
}
item.setWithSubQuery(a.isWithSubQuery());
item.setCorrelatedSubQuery(a.isCorrelatedSubQuery());
initName(x);
}
Aggregations