@Test public void testMultiColumn() throws Exception { PropertyValue a = PropertyValue.create("Foo"); PropertyValue b = PropertyValue.create(42); Embedding embedding = new Embedding(); embedding.add(GradoopId.get(), a, b); ExtractPropertyJoinColumns udf = new ExtractPropertyJoinColumns(Arrays.asList(0, 1)); Assert.assertEquals( ArrayUtils.toString(embedding.getRawProperty(0)) + ArrayUtils.toString(embedding.getRawProperty(1)), udf.getKey(embedding) ); }
@Override public String getKey(Embedding value) throws Exception { sb.delete(0, sb.length()); for (Integer property : properties) { sb.append(ArrayUtils.toString(value.getRawProperty(property))); } return sb.toString(); }
ExtractPropertyJoinColumns implements KeySelector<Embedding, String> { @Override public String getKey(Embedding value) throws Exception { sb.delete(0, sb.length()); for (Integer property : properties) { sb.append(ArrayUtils.toString(value.getRawProperty(property))); } return sb.toString(); } }
ExtractPropertyJoinColumns implements KeySelector<Embedding, String> { @Override public String getKey(Embedding value) throws Exception { sb.delete(0, sb.length()); for (Integer property : properties) { sb.append(ArrayUtils.toString(value.getRawProperty(property))); } return sb.toString(); } ExtractPropertyJoinColumns(List<Integer> properties); }
ExtractPropertyJoinColumns implements KeySelector<Embedding, String> { @Override public String getKey(Embedding value) throws Exception { sb.delete(0, sb.length()); for (Integer property : properties) { sb.append(ArrayUtils.toString(value.getRawProperty(property))); } return sb.toString(); } ExtractPropertyJoinColumns(List<Integer> properties); @Override String getKey(Embedding value); }
ExtractPropertyJoinColumns implements KeySelector<Embedding, String> { @Override public String getKey(Embedding value) throws Exception { sb.delete(0, sb.length()); for (Integer property : properties) { sb.append(ArrayUtils.toString(value.getRawProperty(property))); } return sb.toString(); } ExtractPropertyJoinColumns(List<Integer> properties); @Override String getKey(Embedding value);  }