Search in sources :

Example 1 with AbstractSetOpNode

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

the class LogicalRelImplementor method visit.

/**
 * {@inheritDoc}
 */
@Override
public Node<RowT> visit(IgniteSetOp rel) {
    RelDataType rowType = rel.getRowType();
    RowFactory<RowT> rowFactory = ctx.rowHandler().factory(ctx.getTypeFactory(), rowType);
    List<Node<RowT>> inputs = Commons.transform(rel.getInputs(), this::visit);
    AbstractSetOpNode<RowT> node;
    if (rel instanceof Minus) {
        node = new MinusNode<>(ctx, rowType, rel.aggregateType(), rel.all(), rowFactory);
    } else if (rel instanceof Intersect) {
        node = new IntersectNode<>(ctx, rowType, rel.aggregateType(), rel.all(), rowFactory, rel.getInputs().size());
    } else {
        throw new AssertionError();
    }
    node.register(inputs);
    return node;
}
Also used : Intersect(org.apache.calcite.rel.core.Intersect) CorrelatedNestedLoopJoinNode(org.apache.ignite.internal.sql.engine.exec.rel.CorrelatedNestedLoopJoinNode) RexNode(org.apache.calcite.rex.RexNode) ProjectNode(org.apache.ignite.internal.sql.engine.exec.rel.ProjectNode) TableSpoolNode(org.apache.ignite.internal.sql.engine.exec.rel.TableSpoolNode) FilterNode(org.apache.ignite.internal.sql.engine.exec.rel.FilterNode) NestedLoopJoinNode(org.apache.ignite.internal.sql.engine.exec.rel.NestedLoopJoinNode) HashAggregateNode(org.apache.ignite.internal.sql.engine.exec.rel.HashAggregateNode) ModifyNode(org.apache.ignite.internal.sql.engine.exec.rel.ModifyNode) ScanNode(org.apache.ignite.internal.sql.engine.exec.rel.ScanNode) IndexSpoolNode(org.apache.ignite.internal.sql.engine.exec.rel.IndexSpoolNode) TableScanNode(org.apache.ignite.internal.sql.engine.exec.rel.TableScanNode) Node(org.apache.ignite.internal.sql.engine.exec.rel.Node) MergeJoinNode(org.apache.ignite.internal.sql.engine.exec.rel.MergeJoinNode) UnionAllNode(org.apache.ignite.internal.sql.engine.exec.rel.UnionAllNode) LimitNode(org.apache.ignite.internal.sql.engine.exec.rel.LimitNode) IntersectNode(org.apache.ignite.internal.sql.engine.exec.rel.IntersectNode) RelNode(org.apache.calcite.rel.RelNode) AbstractSetOpNode(org.apache.ignite.internal.sql.engine.exec.rel.AbstractSetOpNode) SortAggregateNode(org.apache.ignite.internal.sql.engine.exec.rel.SortAggregateNode) MinusNode(org.apache.ignite.internal.sql.engine.exec.rel.MinusNode) SortNode(org.apache.ignite.internal.sql.engine.exec.rel.SortNode) RelDataType(org.apache.calcite.rel.type.RelDataType) IntersectNode(org.apache.ignite.internal.sql.engine.exec.rel.IntersectNode) Minus(org.apache.calcite.rel.core.Minus)

Aggregations

RelNode (org.apache.calcite.rel.RelNode)1 Intersect (org.apache.calcite.rel.core.Intersect)1 Minus (org.apache.calcite.rel.core.Minus)1 RelDataType (org.apache.calcite.rel.type.RelDataType)1 RexNode (org.apache.calcite.rex.RexNode)1 AbstractSetOpNode (org.apache.ignite.internal.sql.engine.exec.rel.AbstractSetOpNode)1 CorrelatedNestedLoopJoinNode (org.apache.ignite.internal.sql.engine.exec.rel.CorrelatedNestedLoopJoinNode)1 FilterNode (org.apache.ignite.internal.sql.engine.exec.rel.FilterNode)1 HashAggregateNode (org.apache.ignite.internal.sql.engine.exec.rel.HashAggregateNode)1 IndexSpoolNode (org.apache.ignite.internal.sql.engine.exec.rel.IndexSpoolNode)1 IntersectNode (org.apache.ignite.internal.sql.engine.exec.rel.IntersectNode)1 LimitNode (org.apache.ignite.internal.sql.engine.exec.rel.LimitNode)1 MergeJoinNode (org.apache.ignite.internal.sql.engine.exec.rel.MergeJoinNode)1 MinusNode (org.apache.ignite.internal.sql.engine.exec.rel.MinusNode)1 ModifyNode (org.apache.ignite.internal.sql.engine.exec.rel.ModifyNode)1 NestedLoopJoinNode (org.apache.ignite.internal.sql.engine.exec.rel.NestedLoopJoinNode)1 Node (org.apache.ignite.internal.sql.engine.exec.rel.Node)1 ProjectNode (org.apache.ignite.internal.sql.engine.exec.rel.ProjectNode)1 ScanNode (org.apache.ignite.internal.sql.engine.exec.rel.ScanNode)1 SortAggregateNode (org.apache.ignite.internal.sql.engine.exec.rel.SortAggregateNode)1