@Test
public void testInClausePredicateMatchVariable() {
String propertyKey = "views";
List<Pair<String, String>> variables = new ArrayList<>();
variables.add(new Pair<>("b", propertyKey));
List<String> literals = new ArrayList<>();
literals.add("40");
InClausePredicate inClausePredicate = TestUtils.createInClausePredicate(
new Pair<>("a", propertyKey), variables, literals);
List<QueryPredicate> queryPredicates = new ArrayList<>();
queryPredicates.add(inClausePredicate);
Map<String, Integer> descriptorIndexMap = new HashMap<>();
descriptorIndexMap.put("a." + propertyKey, 0);
descriptorIndexMap.put("b." + propertyKey, 1);
Predicate<String[]> predicate = PredicateFactory.getFilterPredicate(queryPredicates,
descriptorIndexMap);
String[] resolvedProperties = {"20", "20"};
Assert.assertTrue(predicate.test(resolvedProperties));
}
FilterPredicateFactoryTest.java 文件源码
java
阅读 18
收藏 0
点赞 0
评论 0
项目:graphflow
作者:
评论列表
文章目录