@Test
public void testTwoVertexPropertyPredicate() {
String propertyKey = "age";
ComparisonPredicate comparisonPredicate = TestUtils.createComparisonPredicate(
new Pair<>("a", propertyKey), new Pair<>("b", propertyKey), null, ComparisonOperator.
GREATER_THAN);
List<QueryPredicate> queryPredicates = new ArrayList<>();
queryPredicates.add(comparisonPredicate);
Map<String, Integer> descriptorIndexMap = new HashMap<>();
descriptorIndexMap.put("a." + propertyKey, 0);
descriptorIndexMap.put("b." + propertyKey, 2);
Predicate<String[]> predicate = PredicateFactory.getFilterPredicate(queryPredicates,
descriptorIndexMap);
String[] resolvedProperties = {"15", "20", "10"};
Assert.assertTrue(predicate.test(resolvedProperties));
}
FilterPredicateFactoryTest.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:graphflow
作者:
评论列表
文章目录