@Test public void emptyvertexAndEmptyToEmptyvertex() throws Exception { FlinkAsciiGraphLoader loader = getLoaderFromString("emptyVertex:G {emptyVertex : \"graph\"}[()]" + "empty:G[]"); LogicalGraph searchGraph = loader.getLogicalGraphByVariable("emptyVertex"); LogicalGraph patternGraph = loader.getLogicalGraphByVariable("empty"); VertexFusion f = new VertexFusion(); LogicalGraph output = f.execute(searchGraph, patternGraph); LogicalGraph expected = loader.getLogicalGraphByVariable("emptyVertex"); collectAndAssertTrue(output.equalsByData(expected)); if (deepSearch) { collectAndAssertTrue(VertexFusionUtils.myInducedEdgeSubgraphForFusion(searchGraph, expected) .equalsByElementIds(VertexFusionUtils.myInducedEdgeSubgraphForFusion(expected, searchGraph))); } }
@Override public LogicalGraph execute(LogicalGraph searchGraph, LogicalGraph graphPatterns) { return execute(searchGraph, graphPatterns.getCollectionFactory() .fromDataSets( graphPatterns.getGraphHead(), graphPatterns.getVertices(), graphPatterns.getEdges())); }
VertexFusion implements BinaryBaseGraphToBaseGraphOperator<LogicalGraph> { @Override public LogicalGraph execute(LogicalGraph searchGraph, LogicalGraph graphPatterns) { return execute(searchGraph, graphPatterns.getCollectionFactory() .fromDataSets( graphPatterns.getGraphHead(), graphPatterns.getVertices(), graphPatterns.getEdges())); } }
VertexFusion implements BinaryBaseGraphToBaseGraphOperator<LogicalGraph> { @Override public LogicalGraph execute(LogicalGraph searchGraph, LogicalGraph graphPatterns) { return execute(searchGraph, graphPatterns.getCollectionFactory() .fromDataSets( graphPatterns.getGraphHead(), graphPatterns.getVertices(), graphPatterns.getEdges())); }  }
VertexFusion implements BinaryBaseGraphToBaseGraphOperator<LogicalGraph> { @Override public LogicalGraph execute(LogicalGraph searchGraph, LogicalGraph graphPatterns) { return execute(searchGraph, graphPatterns.getCollectionFactory() .fromDataSets( graphPatterns.getGraphHead(), graphPatterns.getVertices(), graphPatterns.getEdges())); }  @Override LogicalGraph execute(LogicalGraph searchGraph, LogicalGraph graphPatterns); LogicalGraph execute(LogicalGraph searchGraph, GraphCollection graphPatterns); }
VertexFusion implements BinaryBaseGraphToBaseGraphOperator<LogicalGraph> { @Override public LogicalGraph execute(LogicalGraph searchGraph, LogicalGraph graphPatterns) { return execute(searchGraph, graphPatterns.getCollectionFactory() .fromDataSets( graphPatterns.getGraphHead(), graphPatterns.getVertices(), graphPatterns.getEdges())); }  @Override LogicalGraph execute(LogicalGraph searchGraph, LogicalGraph graphPatterns); LogicalGraph execute(LogicalGraph searchGraph, GraphCollection graphPatterns);  }