tinkerpop/blueprints — Issue #199: SailVertex inEdges missing cast?
Author: i000
Created: 2011-12-31 18:57:43+00:00
State: open

Hi,

I have noticed that querying for all incoming edges of a vertex vs restricting edges with a label performs ~1000x worse i.e. a query time of 0.1s vs 2 (and more) minutes (even if all labels are of the same type).

```
v.inE("some_label") // fast
v.inE // very slow
```

I am using the NativeStoreSailGraph, so this might be a bug / feature of the NativeStore, but I noticed that the SailVertex implementation for queries without labels seem to be missing a (Resource) cast:

```
if (labels.length == 0) {
return new SailEdgeSequence(this.graph.getSailConnection().get().getStatements(null, null, this.rawVertex, false), this.graph);
} else if (labels.length == 1) {
return new SailEdgeSequence(this.graph.getSailConnection().get().getStatements(null, new URIImpl(this.graph.expandPrefix(labels[0])), (Resource) this.rawVertex, false), this.graph);
```