use of org.apache.drill.common.expression.IfExpression in project drill by apache.
the class ConditionalExprOptimizer method visitIfExpression.
@Override
public LogicalExpression visitIfExpression(IfExpression ifExpr, Void value) throws RuntimeException {
LogicalExpression newElseExpr = ifExpr.elseExpression.accept(this, value);
IfCondition conditions = ifExpr.ifCondition;
LogicalExpression newCondition = conditions.condition.accept(this, value);
LogicalExpression newExpr = conditions.expression.accept(this, value);
conditions = new IfExpression.IfCondition(newCondition, newExpr);
return IfExpression.newBuilder().setElse(newElseExpr).setIfCondition(conditions).build();
}
Aggregations