use of org.apache.ignite.internal.sql.engine.exec.rel.SortAggregateNode in project ignite-3 by apache.
the class LogicalRelImplementor method visit.
/**
* {@inheritDoc}
*/
@Override
public Node<RowT> visit(IgniteSingleSortAggregate rel) {
AggregateType type = AggregateType.SINGLE;
RelDataType rowType = rel.getRowType();
RelDataType inputType = rel.getInput().getRowType();
Supplier<List<AccumulatorWrapper<RowT>>> accFactory = expressionFactory.accumulatorsFactory(type, rel.getAggCallList(), inputType);
RowFactory<RowT> rowFactory = ctx.rowHandler().factory(ctx.getTypeFactory(), rowType);
SortAggregateNode<RowT> node = new SortAggregateNode<>(ctx, rowType, type, rel.getGroupSet(), accFactory, rowFactory, expressionFactory.comparator(rel.collation()));
Node<RowT> input = visit(rel.getInput());
node.register(input);
return node;
}
use of org.apache.ignite.internal.sql.engine.exec.rel.SortAggregateNode in project ignite-3 by apache.
the class LogicalRelImplementor method visit.
/**
* {@inheritDoc}
*/
@Override
public Node<RowT> visit(IgniteReduceSortAggregate rel) {
AggregateType type = AggregateType.REDUCE;
RelDataType rowType = rel.getRowType();
Supplier<List<AccumulatorWrapper<RowT>>> accFactory = expressionFactory.accumulatorsFactory(type, rel.getAggregateCalls(), null);
RowFactory<RowT> rowFactory = ctx.rowHandler().factory(ctx.getTypeFactory(), rowType);
SortAggregateNode<RowT> node = new SortAggregateNode<>(ctx, rowType, type, rel.getGroupSet(), accFactory, rowFactory, expressionFactory.comparator(rel.collation()));
Node<RowT> input = visit(rel.getInput());
node.register(input);
return node;
}
use of org.apache.ignite.internal.sql.engine.exec.rel.SortAggregateNode in project ignite-3 by apache.
the class LogicalRelImplementor method visit.
/**
* {@inheritDoc}
*/
@Override
public Node<RowT> visit(IgniteMapSortAggregate rel) {
AggregateType type = AggregateType.MAP;
RelDataType rowType = rel.getRowType();
RelDataType inputType = rel.getInput().getRowType();
Supplier<List<AccumulatorWrapper<RowT>>> accFactory = expressionFactory.accumulatorsFactory(type, rel.getAggCallList(), inputType);
RowFactory<RowT> rowFactory = ctx.rowHandler().factory(ctx.getTypeFactory(), rowType);
SortAggregateNode<RowT> node = new SortAggregateNode<>(ctx, rowType, type, rel.getGroupSet(), accFactory, rowFactory, expressionFactory.comparator(rel.collation()));
Node<RowT> input = visit(rel.getInput());
node.register(input);
return node;
}
Aggregations