Search in sources :

Example 1 with UnaryExpr

use of org.apache.asterix.lang.common.expression.UnaryExpr in project asterixdb by apache.

the class CloneAndSubstituteVariablesVisitor method visit.

@Override
public Pair<ILangExpression, VariableSubstitutionEnvironment> visit(UnaryExpr u, VariableSubstitutionEnvironment env) throws CompilationException {
    Pair<ILangExpression, VariableSubstitutionEnvironment> p1 = u.getExpr().accept(this, env);
    UnaryExpr newU = new UnaryExpr(u.getExprType(), (Expression) p1.first);
    return new Pair<>(newU, env);
}
Also used : VariableSubstitutionEnvironment(org.apache.asterix.lang.common.rewrites.VariableSubstitutionEnvironment) ILangExpression(org.apache.asterix.lang.common.base.ILangExpression) UnaryExpr(org.apache.asterix.lang.common.expression.UnaryExpr) GbyVariableExpressionPair(org.apache.asterix.lang.common.expression.GbyVariableExpressionPair) Pair(org.apache.hyracks.algebricks.common.utils.Pair) QuantifiedPair(org.apache.asterix.lang.common.struct.QuantifiedPair)

Aggregations

ILangExpression (org.apache.asterix.lang.common.base.ILangExpression)1 GbyVariableExpressionPair (org.apache.asterix.lang.common.expression.GbyVariableExpressionPair)1 UnaryExpr (org.apache.asterix.lang.common.expression.UnaryExpr)1 VariableSubstitutionEnvironment (org.apache.asterix.lang.common.rewrites.VariableSubstitutionEnvironment)1 QuantifiedPair (org.apache.asterix.lang.common.struct.QuantifiedPair)1 Pair (org.apache.hyracks.algebricks.common.utils.Pair)1