@Test public void returnsEmbeddingWithIdProjectionId() throws Exception { DataSet<EPGMEdge> edgeDataSet = createEdgesWithProperties(Lists.newArrayList("foo", "bar", "baz")); ArrayList<String> extractedPropertyKeys = Lists.newArrayList("foo", "bar"); ProjectEdges operator = new ProjectEdges(edgeDataSet, extractedPropertyKeys, false); DataSet<Embedding> results = operator.evaluate(); assertEquals(2, results.count()); assertEveryEmbedding(results, (embedding) -> { assertEquals(3, embedding.size()); assertEquals(PropertyValue.create("foo"), embedding.getProperty(0)); assertEquals(PropertyValue.create("bar"), embedding.getProperty(1)); }); }
@Override public DataSet<Embedding> evaluate() { return input .map(new ProjectEdge(propertyKeys, isLoop)) .name(getName()); }
ProjectEdges implements PhysicalOperator { @Override public DataSet<Embedding> evaluate() { return input .map(new ProjectEdge(propertyKeys, isLoop)) .name(getName()); } }
ProjectEdges implements PhysicalOperator { @Override public DataSet<Embedding> evaluate() { return input .map(new ProjectEdge(propertyKeys, isLoop)) .name(getName()); } ProjectEdges(DataSet<EPGMEdge> input, List<String> propertyKeys, boolean isLoop);  ProjectEdges(DataSet<EPGMEdge> input, boolean isLoop); }
ProjectEdges implements PhysicalOperator { @Override public DataSet<Embedding> evaluate() { return input .map(new ProjectEdge(propertyKeys, isLoop)) .name(getName()); } ProjectEdges(DataSet<EPGMEdge> input, List<String> propertyKeys, boolean isLoop);  ProjectEdges(DataSet<EPGMEdge> input, boolean isLoop); @Override DataSet<Embedding> evaluate(); @Override void setName(String newName); @Override String getName(); }
ProjectEdges implements PhysicalOperator { @Override public DataSet<Embedding> evaluate() { return input .map(new ProjectEdge(propertyKeys, isLoop)) .name(getName()); } ProjectEdges(DataSet<EPGMEdge> input, List<String> propertyKeys, boolean isLoop);  ProjectEdges(DataSet<EPGMEdge> input, boolean isLoop); @Override DataSet<Embedding> evaluate(); @Override void setName(String newName); @Override String getName();  }