@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); ValueJoinNode node = new ValueJoinNode(leftChild, rightChild, singletonList(Pair.of("v1", "age")), singletonList(Pair.of("v3", "age")), MatchStrategy.ISOMORPHISM, MatchStrategy.ISOMORPHISM); List<Embedding> result = node.execute().collect(); result.sort(Comparator.comparing(o -> o.getProperty(0))); assertThat(result.size(), is(2)); assertEmbedding(result.get(0), asList(b, f, g, h), asList(PropertyValue.create(21), PropertyValue.create(21))); assertEmbedding(result.get(1), asList(a, c, d, e), asList(PropertyValue.create(42), PropertyValue.create(42))); }
@Override public DataSet<Embedding> execute() { ValueJoin op = new ValueJoin(getLeftChild().execute(), getRightChild().execute(), getJoinPropertiesLeft(), getJoinPropertiesRight(), getRightChild().getEmbeddingMetaData().getEntryCount(), getDistinctVertexColumnsLeft(), getDistinctVertexColumnsRight(), getDistinctEdgeColumnsLeft(), getDistinctEdgeColumnsRight(), joinHint); op.setName(this.toString()); return op.evaluate(); }
ValueJoinNode extends BinaryNode implements JoinNode { @Override public DataSet<Embedding> execute() { ValueJoin op = new ValueJoin(getLeftChild().execute(), getRightChild().execute(), getJoinPropertiesLeft(), getJoinPropertiesRight(), getRightChild().getEmbeddingMetaData().getEntryCount(), getDistinctVertexColumnsLeft(), getDistinctVertexColumnsRight(), getDistinctEdgeColumnsLeft(), getDistinctEdgeColumnsRight(), joinHint); op.setName(this.toString()); return op.evaluate(); } }
ValueJoinNode extends BinaryNode implements JoinNode { @Override public DataSet<Embedding> execute() { ValueJoin op = new ValueJoin(getLeftChild().execute(), getRightChild().execute(), getJoinPropertiesLeft(), getJoinPropertiesRight(), getRightChild().getEmbeddingMetaData().getEntryCount(), getDistinctVertexColumnsLeft(), getDistinctVertexColumnsRight(), getDistinctEdgeColumnsLeft(), getDistinctEdgeColumnsRight(), joinHint); op.setName(this.toString()); return op.evaluate(); } ValueJoinNode(PlanNode leftChild, PlanNode rightChild,
    List<Pair<String, String>> leftJoinProperties, List<Pair<String, String>> rightJoinProperties,
    MatchStrategy vertexStrategy, MatchStrategy edgeStrategy);  ValueJoinNode(PlanNode leftChild, PlanNode rightChild,
    List<Pair<String, String>> leftJoinProperties, List<Pair<String, String>> rightJoinProperties,
    MatchStrategy vertexStrategy, MatchStrategy edgeStrategy,
    JoinOperatorBase.JoinHint joinHint); }
ValueJoinNode extends BinaryNode implements JoinNode { @Override public DataSet<Embedding> execute() { ValueJoin op = new ValueJoin(getLeftChild().execute(), getRightChild().execute(), getJoinPropertiesLeft(), getJoinPropertiesRight(), getRightChild().getEmbeddingMetaData().getEntryCount(), getDistinctVertexColumnsLeft(), getDistinctVertexColumnsRight(), getDistinctEdgeColumnsLeft(), getDistinctEdgeColumnsRight(), joinHint); op.setName(this.toString()); return op.evaluate(); } ValueJoinNode(PlanNode leftChild, PlanNode rightChild,
    List<Pair<String, String>> leftJoinProperties, List<Pair<String, String>> rightJoinProperties,
    MatchStrategy vertexStrategy, MatchStrategy edgeStrategy);  ValueJoinNode(PlanNode leftChild, PlanNode rightChild,
    List<Pair<String, String>> leftJoinProperties, List<Pair<String, String>> rightJoinProperties,
    MatchStrategy vertexStrategy, MatchStrategy edgeStrategy,
    JoinOperatorBase.JoinHint joinHint); @Override DataSet<Embedding> execute(); @Override String toString(); }
ValueJoinNode extends BinaryNode implements JoinNode { @Override public DataSet<Embedding> execute() { ValueJoin op = new ValueJoin(getLeftChild().execute(), getRightChild().execute(), getJoinPropertiesLeft(), getJoinPropertiesRight(), getRightChild().getEmbeddingMetaData().getEntryCount(), getDistinctVertexColumnsLeft(), getDistinctVertexColumnsRight(), getDistinctEdgeColumnsLeft(), getDistinctEdgeColumnsRight(), joinHint); op.setName(this.toString()); return op.evaluate(); } ValueJoinNode(PlanNode leftChild, PlanNode rightChild,
    List<Pair<String, String>> leftJoinProperties, List<Pair<String, String>> rightJoinProperties,
    MatchStrategy vertexStrategy, MatchStrategy edgeStrategy);  ValueJoinNode(PlanNode leftChild, PlanNode rightChild,
    List<Pair<String, String>> leftJoinProperties, List<Pair<String, String>> rightJoinProperties,
    MatchStrategy vertexStrategy, MatchStrategy edgeStrategy,
    JoinOperatorBase.JoinHint joinHint); @Override DataSet<Embedding> execute(); @Override String toString();  }