You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Marko A. Rodriguez (JIRA)" <ji...@apache.org> on 2017/02/16 20:04:41 UTC
[jira] [Assigned] (TINKERPOP-1554) has(propertyKey) should have a
corresponding step in Gremlin-Java.
[ https://issues.apache.org/jira/browse/TINKERPOP-1554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marko A. Rodriguez reassigned TINKERPOP-1554:
---------------------------------------------
Assignee: Marko A. Rodriguez
> has(propertyKey) should have a corresponding step in Gremlin-Java.
> ------------------------------------------------------------------
>
> Key: TINKERPOP-1554
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1554
> Project: TinkerPop
> Issue Type: Improvement
> Components: process
> Affects Versions: 3.2.3
> Reporter: Marko A. Rodriguez
> Assignee: Marko A. Rodriguez
>
> Currently {{has('name')}} compiles to {{filter(values('name'))}}. This is bad for a few reasons:
> 1. Its slower than a direct step.
> 2. Its nested traversals which increases reasoning time of strategies.
> 3. Its not clear from bytecode what it going on.
> I propose:
> {code}
> public class HasPropertyStep<S extends Element> implements FilterStep<S> {
> private String propertyKey;
> public boolean filter(final Traverser.Admin<S> traverser) {
> return traverser.get().properties(propertyKey).hasNext();
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)