Skip to content

hasLabel(label...),多个label时失败 #50

@zhoney

Description

@zhoney

Expected behavior 期望表现

正确查询,满足一个label即可返回

Actual behavior 实际表现

java.lang.ClassCastException: java.lang.String cannot be cast to com.baidu.hugegraph.backend.id.Id at com.baidu.hugegraph.backend.tx.GraphTransaction.optimizeQuery(GraphTransaction.java:892) ~[hugegraph-core-0.7.4.jar:0.7.4.0] at com.baidu.hugegraph.backend.tx.GraphTransaction.query(GraphTransaction.java:292) ~[hugegraph-core-0.7.4.jar:0.7.4.0] at com.baidu.hugegraph.backend.tx.GraphTransaction.queryVerticesFromBackend(GraphTransaction.java:452) ~[hugegraph-core-0.7.4.jar:0.7.4.0] at com.baidu.hugegraph.backend.tx.GraphTransaction.queryVertices(GraphTransaction.java:443) ~[hugegraph-core-0.7.4.jar:0.7.4.0] at com.baidu.hugegraph.backend.cache.CachedGraphTransaction.queryVertices(CachedGraphTransaction.java:93) ~[hugegraph-core-0.7.4.jar:0.7.4.0] at com.baidu.hugegraph.HugeGraph.vertices(HugeGraph.java:337) ~[hugegraph-core-0.7.4.jar:0.7.4.0] at com.baidu.hugegraph.traversal.optimize.HugeGraphStep.vertices(HugeGraphStep.java:94) ~[hugegraph-core-0.7.4.jar:0.7.4.0] at com.baidu.hugegraph.traversal.optimize.HugeGraphStep.lambda$new$0(HugeGraphStep.java:66) ~[hugegraph-core-0.7.4.jar:0.7.4.0] at org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep.processNextStart(GraphStep.java:139) ~[gremlin-core-3.2.5.jar:3.2.5] at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143) ~[gremlin-core-3.2.5.jar:3.2.5] at org.apache.tinkerpop.gremlin.process.traversal.step.util.ExpandableStepIterator.next(ExpandableStepIterator.java:50) ~[gremlin-core-3.2.5.jar:3.2.5] at org.apache.tinkerpop.gremlin.process.traversal.step.filter.FilterStep.processNextStart(FilterStep.java:37) ~[gremlin-core-3.2.5.jar:3.2.5] at org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep.hasNext(AbstractStep.java:143) ~[gremlin-core-3.2.5.jar:3.2.5] at org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.hasNext(DefaultTraversal.java:192) ~[gremlin-core-3.2.5.jar:3.2.5] at org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils.fill(IteratorUtils.java:62) ~[gremlin-core-3.2.5.jar:3.2.5] at org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils.list(IteratorUtils.java:85) ~[gremlin-core-3.2.5.jar:3.2.5] at org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils.asList(IteratorUtils.java:382) ~[gremlin-core-3.2.5.jar:3.2.5] at org.apache.tinkerpop.gremlin.server.handler.HttpGremlinEndpointHandler.lambda$channelRead$1(HttpGremlinEndpointHandler.java:239) ~[gremlin-server-3.2.5.jar:3.2.5] at org.apache.tinkerpop.gremlin.util.function.FunctionUtils.lambda$wrapFunction$0(FunctionUtils.java:36) ~[gremlin-core-3.2.5.jar:3.2.5] at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$2(GremlinExecutor.java:320) ~[gremlin-groovy-3.2.5.jar:3.2.5] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_181] at com.baidu.hugegraph.auth.HugeGraphAuthProxy$ContextTask.run(HugeGraphAuthProxy.java:290) [hugegraph-api-0.7.4.jar:0.27.0.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]

Steps to reproduce the problem 复现步骤

g.V().hasLabel('person', 'software')

Status of loaded data 数据状态

Vertex/Edge summary 数据量

Vertex/Edge example 数据示例

Schema(VertexLabel, EdgeLabel, IndexLabel) 元数据结构

Specifications of environment 环境信息

  • hugegraph version: v0.7.4

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions