@Test public void testExecute() throws Exception { GradoopId a = GradoopId.get(); GradoopId b = GradoopId.get(); GradoopId c = GradoopId.get(); GradoopId d = GradoopId.get(); GradoopId e = GradoopId.get(); GradoopId f = GradoopId.get(); GradoopId g = GradoopId.get(); GradoopId h = GradoopId.get(); EmbeddingMetaData leftInputMetaData = new EmbeddingMetaData(); leftInputMetaData.setEntryColumn("v1", EntryType.VERTEX, 0); leftInputMetaData.setPropertyColumn("v1", "age", 0); Embedding embedding1 = createEmbedding(singletonList(Pair.of(a, singletonList(42)))); Embedding embedding2 = createEmbedding(singletonList(Pair.of(b, singletonList(21)))); DataSet<Embedding> leftEmbeddings = getExecutionEnvironment() .fromElements(embedding1, embedding2); EmbeddingMetaData rightInputMetaData = new EmbeddingMetaData(); rightInputMetaData.setEntryColumn("v2", EntryType.VERTEX, 0); rightInputMetaData.setEntryColumn("e1", EntryType.EDGE, 1); rightInputMetaData.setEntryColumn("v3", EntryType.VERTEX, 2); rightInputMetaData.setPropertyColumn("v3", "age", 0); Embedding embedding3 = createEmbedding(asList( Pair.of(c, emptyList()), Pair.of(d, emptyList()), Pair.of(e, singletonList(42)) )); Embedding embedding4 = createEmbedding(asList( Pair.of(f, emptyList()), Pair.of(g, emptyList()), Pair.of(h, singletonList(21)) )); DataSet<Embedding> rightEmbeddings = getExecutionEnvironment() .fromElements(embedding3, embedding4); MockPlanNode leftChild = new MockPlanNode(leftEmbeddings, leftInputMetaData); MockPlanNode rightChild = new MockPlanNode(rightEmbeddings, rightInputMetaData); CartesianProductNode node = new CartesianProductNode(leftChild, rightChild, MatchStrategy.ISOMORPHISM, MatchStrategy.ISOMORPHISM); DataSet<Embedding> result = node.execute(); assertThat(result.count(), is(4L)); assertEmbeddingExists(result, a, f, g, h); assertEmbeddingExists(result, b, f, g, h); assertEmbeddingExists(result, a, c, d, e); assertEmbeddingExists(result, b, c, d, e); }
@Override public DataSet<Embedding> execute() { CartesianProduct op = new CartesianProduct(getLeftChild().execute(), getRightChild().execute(), getRightChild().getEmbeddingMetaData().getEntryCount(), getDistinctVertexColumnsLeft(), getDistinctVertexColumnsRight(), getDistinctEdgeColumnsLeft(), getDistinctEdgeColumnsRight(), crossHint); op.setName(this.toString()); return op.evaluate(); }
CartesianProductNode extends BinaryNode implements JoinNode { @Override public DataSet<Embedding> execute() { CartesianProduct op = new CartesianProduct(getLeftChild().execute(), getRightChild().execute(), getRightChild().getEmbeddingMetaData().getEntryCount(), getDistinctVertexColumnsLeft(), getDistinctVertexColumnsRight(), getDistinctEdgeColumnsLeft(), getDistinctEdgeColumnsRight(), crossHint); op.setName(this.toString()); return op.evaluate(); } }
CartesianProductNode extends BinaryNode implements JoinNode { @Override public DataSet<Embedding> execute() { CartesianProduct op = new CartesianProduct(getLeftChild().execute(), getRightChild().execute(), getRightChild().getEmbeddingMetaData().getEntryCount(), getDistinctVertexColumnsLeft(), getDistinctVertexColumnsRight(), getDistinctEdgeColumnsLeft(), getDistinctEdgeColumnsRight(), crossHint); op.setName(this.toString()); return op.evaluate(); } CartesianProductNode(PlanNode leftChild, PlanNode rightChild,
    MatchStrategy vertexStrategy, MatchStrategy edgeStrategy);  CartesianProductNode(PlanNode leftChild, PlanNode rightChild,
    MatchStrategy vertexStrategy, MatchStrategy edgeStrategy,
    CrossOperatorBase.CrossHint crossHint); }
CartesianProductNode extends BinaryNode implements JoinNode { @Override public DataSet<Embedding> execute() { CartesianProduct op = new CartesianProduct(getLeftChild().execute(), getRightChild().execute(), getRightChild().getEmbeddingMetaData().getEntryCount(), getDistinctVertexColumnsLeft(), getDistinctVertexColumnsRight(), getDistinctEdgeColumnsLeft(), getDistinctEdgeColumnsRight(), crossHint); op.setName(this.toString()); return op.evaluate(); } CartesianProductNode(PlanNode leftChild, PlanNode rightChild,
    MatchStrategy vertexStrategy, MatchStrategy edgeStrategy);  CartesianProductNode(PlanNode leftChild, PlanNode rightChild,
    MatchStrategy vertexStrategy, MatchStrategy edgeStrategy,
    CrossOperatorBase.CrossHint crossHint); @Override DataSet<Embedding> execute(); @Override String toString(); }
CartesianProductNode extends BinaryNode implements JoinNode { @Override public DataSet<Embedding> execute() { CartesianProduct op = new CartesianProduct(getLeftChild().execute(), getRightChild().execute(), getRightChild().getEmbeddingMetaData().getEntryCount(), getDistinctVertexColumnsLeft(), getDistinctVertexColumnsRight(), getDistinctEdgeColumnsLeft(), getDistinctEdgeColumnsRight(), crossHint); op.setName(this.toString()); return op.evaluate(); } CartesianProductNode(PlanNode leftChild, PlanNode rightChild,
    MatchStrategy vertexStrategy, MatchStrategy edgeStrategy);  CartesianProductNode(PlanNode leftChild, PlanNode rightChild,
    MatchStrategy vertexStrategy, MatchStrategy edgeStrategy,
    CrossOperatorBase.CrossHint crossHint); @Override DataSet<Embedding> execute(); @Override String toString();  }