You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/10/03 01:04:20 UTC

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=15541258#comment-15541258 ] 

ASF GitHub Bot commented on TINKERPOP-1470:
-------------------------------------------

Github user okram commented on the issue:

    https://github.com/apache/tinkerpop/pull/445
  
    Could you review this @dkuppitz? Check out `FilterRankStrategy(Test)` and tell me what you think.


> 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
>
> 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)