Gremlin在执行Lambda时抛出错误

时间:2018-07-01 07:36:42

标签: gremlin amazon-neptune

g.V().hasLabel("OperatingSystem")
            .filter(Lambda.predicate("{it.get().property('name').startsWith('xyz')}")).out("dpend_on")
            .as("ast").out("depend_on").hasLabel("abc")

导致错误:

  

java.util.concurrent.CompletionException:
  org.apache.tinkerpop.gremlin.driver.exception.ResponseException:查询解析在第1行失败,字符位置为0,错误消息:输入'['期望{'''','“”','g'}不匹配

     

在java.util.concurrent.CompletableFuture.reportJoin(CompletableFuture.java:375)
  在java.util.concurrent.CompletableFuture.join(CompletableFuture.java:1934)
  在org.apache.tinkerpop.gremlin.driver.ResultSet.one(ResultSet.java:107)
  在org.apache.tinkerpop.gremlin.driver.ResultSet $ 1.hasNext(ResultSet.java:159)
  在org.apache.tinkerpop.gremlin.driver.ResultSet $ 1.next(ResultSet.java:166)
  在org.apache.tinkerpop.gremlin.driver.ResultSet $ 1.next(ResultSet.java:153)
  在org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteTraversal $ TraverserIterator.next(DriverRemoteTraversal.java:142)
  在org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteTraversal $ TraverserIterator.next(DriverRemoteTraversal.java:127)
  在org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteTraversal.nextTraverser(DriverRemoteTraversal.java:108)
  在org.apache.tinkerpop.gremlin.process.remote.traversal.step.map.RemoteStep.processNextStart(RemoteStep.java:80)
  在org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.next(AbstractStep.java:128)
  在org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.next(AbstractStep.java:38)
  org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.next(DefaultTraversal.java:200)

1 个答案:

答案 0 :(得分:1)

我刚刚看到您正在使用Amazon Neptune。根据以下文档,海王星不支持Lambda步骤:https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-gremlin-differences.html