use of io.dingodb.exec.base.Operator in project dingo by dingodb.
the class DingoJobVisitor method visit.
@Override
public Collection<Output> visit(@Nonnull DingoAggregate rel) {
Collection<Output> inputs = dingo(rel.getInput()).accept(this);
List<Output> outputs = new LinkedList<>();
for (Output input : inputs) {
Operator operator = new AggregateOperator(rel.getKeys(), rel.getAggList());
Task task = input.getTask();
operator.setId(idGenerator.get());
task.putOperator(operator);
input.setLink(operator.getInput(0));
outputs.addAll(operator.getOutputs());
}
return outputs;
}
use of io.dingodb.exec.base.Operator in project dingo by dingodb.
the class DingoJobVisitor method visit.
@Override
public Collection<Output> visit(@Nonnull DingoProject rel) {
Collection<Output> inputs = dingo(rel.getInput()).accept(this);
List<Output> outputs = new ArrayList<>(inputs.size());
for (Output input : inputs) {
Operator operator = new ProjectOperator(RexConverter.toString(rel.getProjects()), TupleSchema.fromRelDataType(rel.getInput().getRowType()));
Task task = input.getTask();
operator.setId(idGenerator.get());
task.putOperator(operator);
input.setLink(operator.getInput(0));
operator.getSoleOutput().copyHint(input);
outputs.addAll(operator.getOutputs());
}
return outputs;
}
Aggregations