Search in sources :

Example 71 with ProcessorFunction

use of com.alibaba.maxgraph.compiler.logical.function.ProcessorFunction in project GraphScope by alibaba.

the class AbstractUseKeyNode method processJoinZeroVertex.

/**
 * Process zero for sum and count vertex
 *
 * @param vertexIdManager     The vertex id manager
 * @param logicalSubQueryPlan The logical sub query plan
 * @param valueVertex         The value vertex
 * @param joinZeroFlag        The join zero flag
 * @return The output vertex after deal with join zero flag
 */
protected LogicalVertex processJoinZeroVertex(VertexIdManager vertexIdManager, LogicalSubQueryPlan logicalSubQueryPlan, LogicalVertex valueVertex, boolean joinZeroFlag) {
    LogicalVertex outputVertex = valueVertex;
    LogicalVertex leftVertex = getSourceVertex();
    if (joinZeroFlag && null != leftVertex) {
        ProcessorFunction joinZeroFunction = new ProcessorFunction(QueryFlowOuterClass.OperatorType.JOIN_RIGHT_ZERO_JOIN);
        LogicalBinaryVertex logicalBinaryVertex = new LogicalBinaryVertex(vertexIdManager.getId(), joinZeroFunction, false, leftVertex, valueVertex);
        logicalSubQueryPlan.addLogicalVertex(logicalBinaryVertex);
        logicalSubQueryPlan.addLogicalEdge(valueVertex, logicalBinaryVertex, new LogicalEdge());
        outputVertex = logicalBinaryVertex;
    }
    return outputVertex;
}
Also used : LogicalVertex(com.alibaba.maxgraph.compiler.logical.LogicalVertex) ProcessorFunction(com.alibaba.maxgraph.compiler.logical.function.ProcessorFunction) LogicalEdge(com.alibaba.maxgraph.compiler.logical.LogicalEdge) LogicalBinaryVertex(com.alibaba.maxgraph.compiler.logical.LogicalBinaryVertex)

Aggregations

ProcessorFunction (com.alibaba.maxgraph.compiler.logical.function.ProcessorFunction)71 LogicalVertex (com.alibaba.maxgraph.compiler.logical.LogicalVertex)38 LogicalEdge (com.alibaba.maxgraph.compiler.logical.LogicalEdge)36 LogicalSubQueryPlan (com.alibaba.maxgraph.compiler.logical.LogicalSubQueryPlan)34 VertexIdManager (com.alibaba.maxgraph.compiler.logical.VertexIdManager)34 LogicalUnaryVertex (com.alibaba.maxgraph.compiler.logical.LogicalUnaryVertex)27 QueryFlowOuterClass (com.alibaba.maxgraph.QueryFlowOuterClass)18 LogicalBinaryVertex (com.alibaba.maxgraph.compiler.logical.LogicalBinaryVertex)18 SourceDelegateNode (com.alibaba.maxgraph.compiler.tree.source.SourceDelegateNode)10 SourceTreeNode (com.alibaba.maxgraph.compiler.tree.source.SourceTreeNode)9 Message (com.alibaba.maxgraph.Message)7 LogicalQueryPlan (com.alibaba.maxgraph.compiler.logical.LogicalQueryPlan)7 TreeNode (com.alibaba.maxgraph.compiler.tree.TreeNode)5 List (java.util.List)5 ProcessorSourceFunction (com.alibaba.maxgraph.compiler.logical.function.ProcessorSourceFunction)4 CountGlobalTreeNode (com.alibaba.maxgraph.compiler.tree.CountGlobalTreeNode)4 FoldTreeNode (com.alibaba.maxgraph.compiler.tree.FoldTreeNode)4 HasTreeNode (com.alibaba.maxgraph.compiler.tree.HasTreeNode)4 MaxTreeNode (com.alibaba.maxgraph.compiler.tree.MaxTreeNode)4 MinTreeNode (com.alibaba.maxgraph.compiler.tree.MinTreeNode)4