Search in sources :

Example 1 with ModifyNode

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

the class LogicalRelImplementor method visit.

/**
 * {@inheritDoc}
 */
@Override
public Node<RowT> visit(IgniteTableModify rel) {
    switch(rel.getOperation()) {
        case INSERT:
        case UPDATE:
        case DELETE:
        case MERGE:
            InternalIgniteTable tbl = rel.getTable().unwrap(InternalIgniteTable.class);
            assert tbl != null;
            ModifyNode<RowT> node = new ModifyNode<>(ctx, rel.getRowType(), tbl, rel.getOperation(), rel.getUpdateColumnList());
            Node<RowT> input = visit(rel.getInput());
            node.register(input);
            return node;
        default:
            throw new AssertionError("Unsupported operation: " + rel.getOperation());
    }
}
Also used : InternalIgniteTable(org.apache.ignite.internal.sql.engine.schema.InternalIgniteTable) ModifyNode(org.apache.ignite.internal.sql.engine.exec.rel.ModifyNode)

Aggregations

ModifyNode (org.apache.ignite.internal.sql.engine.exec.rel.ModifyNode)1 InternalIgniteTable (org.apache.ignite.internal.sql.engine.schema.InternalIgniteTable)1