/** * {@inheritDoc} * <p> * Graph heads will be disposed at the moment. The following issue attempts to provide * alternatives to keep graph heads: https://github.com/dbs-leipzig/gradoop/issues/974 */ @Override public LogicalGraph getLogicalGraph() { return getGraphCollection().reduce(new ReduceCombination()); }
/** * {@inheritDoc} * <p> * Graph heads will be disposed at the moment. The following issue attempts to provide * alternatives to keep graph heads: https://github.com/dbs-leipzig/gradoop/issues/974 */ @Override public LogicalGraph getLogicalGraph() { return getGraphCollection().reduce(new ReduceCombination()); }
@Override public LogicalGraph getLogicalGraph() { return getGraphCollection().reduce(new ReduceCombination()); }
@Override public LogicalGraph getLogicalGraph() { return getGraphCollection().reduce(new ReduceCombination()); }
@Override public LogicalGraph getLogicalGraph() { return getGraphCollection().reduce(new ReduceCombination()); }
@Override public LogicalGraph getLogicalGraph() throws IOException { return getGraphCollection().reduce(new ReduceCombination()); }
@Override public LogicalGraph getLogicalGraph() throws IOException { return getGraphCollection().reduce(new ReduceCombination()); }
@Override public LogicalGraph getLogicalGraph() throws IOException { return getGraphCollection().reduce(new ReduceCombination()); }
@Override public LogicalGraph getLogicalGraph() { return getGraphCollection().reduce(new ReduceCombination()); }
@Override public LogicalGraph getLogicalGraph() { return getGraphCollection().reduce(new ReduceCombination()); }
@Override public LogicalGraph getLogicalGraph() throws IOException { return getGraphCollection().reduce(new ReduceCombination()); }
@Override public LogicalGraph getLogicalGraph() { return getGraphCollection().reduce(new ReduceCombination()); }
@Override public LogicalGraph getLogicalGraph() throws IOException { return getGraphCollection().reduce(new ReduceCombination()); }
@Override public LogicalGraph getLogicalGraph() throws IOException { return getGraphCollection().reduce(new ReduceCombination()); }
.reduce(new ReduceCombination()) .groupBy(singletonList(Grouping.LABEL_SYMBOL), singletonList(Grouping.LABEL_SYMBOL));
/** * Executes a rollUp on edges using a single grouping key and checks if the result * is correct. * * @throws Exception If the execution fails. */ @Test public void testEdgeRollUpWithSingleGroupingKey() throws Exception { FlinkAsciiGraphLoader loader = getSocialNetworkLoader(); LogicalGraph input = loader.getGraphCollectionByVariables("g0", "g1", "g2", "g3") .reduce(new ReduceCombination()); //expected loader.initDatabaseFromString("g0 {edgeRollUpGroupingKeys:\":label\"}[" + "(v0)" + "(v0)-[e_0:knows{count:10L}]->(v0)" + "(v0)-[e_1:hasModerator{count:1L}]->(v0)" + "(v0)-[e_2:hasMember{count:2L}]->(v0)" + "]"); GraphCollection expected = loader.getGraphCollection(); List<String> vertexGK = Collections.emptyList(); List<AggregateFunction> vertexAGG = Collections.emptyList(); List<String> edgeGK = Collections.singletonList(Grouping.LABEL_SYMBOL); List<AggregateFunction> edgeAGG = Collections.singletonList(new Count("count")); GraphCollection output = input.groupEdgesByRollUp(vertexGK, vertexAGG, edgeGK, edgeAGG); collectAndAssertTrue(output.equalsByGraphData(expected)); }
.reduce(new ReduceCombination());
/** * Test reading a single logical indexed csv graph. * * @throws Exception on failure */ @Test public void testReadSingleGraph() throws Exception { String csvPath = getFilePath("/data/csv/input_indexed"); String gdlPath = getFilePath("/data/csv/expected/expected_graph_collection.gdl"); DataSource dataSource = new IndexedCSVDataSource(csvPath, getConfig()); LogicalGraph input = dataSource.getLogicalGraph(); GraphCollection graphCollection = getLoaderFromFile(gdlPath) .getGraphCollectionByVariables("expected1", "expected2"); LogicalGraph expected = graphCollection.reduce(new ReduceCombination()); collectAndAssertTrue(input.equalsByElementData(expected)); }
"]"); GraphCollection sourceGraph = loader.getGraphCollectionByVariables("source"); LogicalGraph searchGraph = sourceGraph.reduce(new ReduceCombination()); GraphCollection patternGraph = sourceGraph .apply(new ApplySubgraph(null, edge -> edge.getPropertyValue("difference").getInt() == 0))