Search in sources :

Example 1 with FilterNode

use of org.apache.ignite.internal.sql.engine.exec.rel.FilterNode in project ignite-3 by apache.

the class LogicalRelImplementor method visit.

/**
 * {@inheritDoc}
 */
@Override
public Node<RowT> visit(IgniteTrimExchange rel) {
    assert TraitUtils.distribution(rel).getType() == HASH_DISTRIBUTED;
    IgniteDistribution distr = rel.distribution();
    Destination<RowT> dest = distr.destination(ctx, affSrvc, ctx.group(rel.sourceId()));
    String localNodeId = ctx.localNodeId();
    FilterNode<RowT> node = new FilterNode<>(ctx, rel.getRowType(), r -> Objects.equals(localNodeId, first(dest.targets(r))));
    Node<RowT> input = visit(rel.getInput());
    node.register(input);
    return node;
}
Also used : FilterNode(org.apache.ignite.internal.sql.engine.exec.rel.FilterNode) IgniteDistribution(org.apache.ignite.internal.sql.engine.trait.IgniteDistribution)

Aggregations

FilterNode (org.apache.ignite.internal.sql.engine.exec.rel.FilterNode)1 IgniteDistribution (org.apache.ignite.internal.sql.engine.trait.IgniteDistribution)1