use of org.apache.ignite.internal.sql.engine.exec.rel.HashAggregateNode in project ignite-3 by apache.
the class LogicalRelImplementor method visit.
/**
* {@inheritDoc}
*/
@Override
public Node<RowT> visit(IgniteReduceHashAggregate 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);
HashAggregateNode<RowT> node = new HashAggregateNode<>(ctx, rowType, type, rel.getGroupSets(), accFactory, rowFactory);
Node<RowT> input = visit(rel.getInput());
node.register(input);
return node;
}
use of org.apache.ignite.internal.sql.engine.exec.rel.HashAggregateNode in project ignite-3 by apache.
the class LogicalRelImplementor method visit.
/**
* {@inheritDoc}
*/
@Override
public Node<RowT> visit(IgniteSingleHashAggregate 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);
HashAggregateNode<RowT> node = new HashAggregateNode<>(ctx, rowType, type, rel.getGroupSets(), accFactory, rowFactory);
Node<RowT> input = visit(rel.getInput());
node.register(input);
return node;
}
use of org.apache.ignite.internal.sql.engine.exec.rel.HashAggregateNode in project ignite-3 by apache.
the class LogicalRelImplementor method visit.
/**
* {@inheritDoc}
*/
@Override
public Node<RowT> visit(IgniteMapHashAggregate 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);
HashAggregateNode<RowT> node = new HashAggregateNode<>(ctx, rowType, type, rel.getGroupSets(), accFactory, rowFactory);
Node<RowT> input = visit(rel.getInput());
node.register(input);
return node;
}
Aggregations