use of org.apache.asterix.lang.common.expression.FieldBinding in project asterixdb by apache.
the class GatherFunctionCallsVisitor method visit.
@Override
public Void visit(RecordConstructor rc, Void arg) throws CompilationException {
for (FieldBinding fb : rc.getFbList()) {
fb.getLeftExpr().accept(this, arg);
fb.getRightExpr().accept(this, arg);
}
return null;
}
use of org.apache.asterix.lang.common.expression.FieldBinding in project asterixdb by apache.
the class AbstractInlineUdfsVisitor method visit.
@Override
public Boolean visit(RecordConstructor rc, List<FunctionDecl> arg) throws CompilationException {
boolean changed = false;
for (FieldBinding b : rc.getFbList()) {
Pair<Boolean, Expression> leftExprInlined = inlineUdfsInExpr(b.getLeftExpr(), arg);
b.setLeftExpr(leftExprInlined.second);
changed = changed || leftExprInlined.first;
Pair<Boolean, Expression> rightExprInlined = inlineUdfsInExpr(b.getRightExpr(), arg);
b.setRightExpr(rightExprInlined.second);
changed = changed || rightExprInlined.first;
}
return changed;
}
use of org.apache.asterix.lang.common.expression.FieldBinding in project asterixdb by apache.
the class AbstractAqlSimpleExpressionVisitor method visit.
@Override
public Expression visit(RecordConstructor rc, ILangExpression arg) throws CompilationException {
for (FieldBinding binding : rc.getFbList()) {
binding.setLeftExpr(visit(binding.getLeftExpr(), rc));
binding.setRightExpr(visit(binding.getRightExpr(), rc));
}
return rc;
}
use of org.apache.asterix.lang.common.expression.FieldBinding in project asterixdb by apache.
the class DeepCopyVisitor method visit.
@Override
public RecordConstructor visit(RecordConstructor rc, Void arg) throws CompilationException {
List<FieldBinding> bindings = new ArrayList<>();
for (FieldBinding binding : rc.getFbList()) {
FieldBinding fb = new FieldBinding((Expression) binding.getLeftExpr().accept(this, arg), (Expression) binding.getRightExpr().accept(this, arg));
bindings.add(fb);
}
return new RecordConstructor(bindings);
}
Aggregations