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 2016/10/03 14:29:21 UTC

[jira] [Closed] (TINKERPOP-1470) InlineFilterStrategy should try and P.or() has() children in OrSteps.

     [ https://issues.apache.org/jira/browse/TINKERPOP-1470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marko A. Rodriguez closed TINKERPOP-1470.
-----------------------------------------
       Resolution: Fixed
    Fix Version/s: 3.2.3

> InlineFilterStrategy should try and P.or() has() children in OrSteps.
> ---------------------------------------------------------------------
>
>                 Key: TINKERPOP-1470
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1470
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.2.2
>            Reporter: Marko A. Rodriguez
>            Assignee: Marko A. Rodriguez
>             Fix For: 3.2.3
>
>
> The following patterns:
> {code}
> g.V().or(has("age",gt(20)), has("age",lt(32)))
> g.V().and(or(has("age",gt(20)), has("age",lt(32))),has("age",neq(23))
> {code}
> should be re-written by {{InlineFilterStrategy}} as:
> {code}
> g.V().has("age",gt(20).or(lt(32)))
> g.V().has("age",gt(20).or(lt(32)).and(neq(23)))
> {code}
> This would then make it easier for provider strategies to fold the predicate into graph/vertex-centric push down predicates accordingly.
> Note that {{InlineFilterStep}} already has the code to flatten {{AndSteps}}. Thus, during its recursion, it would do the following rewrites to get to the final form.
> {code}
> g.V().and(or(has("age",gt(20)), has("age",lt(32))),has("age",neq(23))
> g.V().or(has("age",gt(20)), has("age",lt(32))).has("age",neq(23))
> g.V().has("age",gt(20).or(lt(32))).has("age",neq(23))
> g.V().has("age",gt(20).or(lt(32)).and(neq(23)))
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)