[ 
https://issues.apache.org/jira/browse/TINKERPOP-1473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15628684#comment-15628684
 ] 

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

GitHub user okram opened a pull request:

    https://github.com/apache/tinkerpop/pull/477

    TINKERPOP-1473: Given PathRetractionStrategy, PathProcessorStrategy can be 
extended to support partial where() inlining.

    https://issues.apache.org/jira/browse/TINKERPOP-1473
    
    Extended `PathProcessStrategy` to support the following translations which 
expose more traversals to OLAP processing (works around local star graph 
violations).
    
    ```
    where(as(a).out().as(b)) => as(xyz).select(a).where(out().as(b)).select(xyz)
    where(as(a).out())          => as(xyz).select(a).filter(out()).select(xyz)
    ```
    
    Next, given that `PathProcessStrategy` is prior to `InlineFilterStrategy` 
you get this effect:
    
    where(as(a).has(z))          => as(xyz).select(a).has(z).select(xyz)
    ```
    
    You can see why `PathRetractionStrategy` is important. Without it `xyz` 
(which are UUIDs in practice) would remain in the traverser's path data.
    
    VOTE +1.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/tinkerpop TINKERPOP-1473

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tinkerpop/pull/477.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #477
    
----
commit a69efffef138b036581fdb8c5bcd22c8075aa846
Author: Marko A. Rodriguez <okramma...@gmail.com>
Date:   2016-11-02T10:50:57Z

    Added where(a.out.b) => select(a).where(out.b) AND where(a.out) => 
select(a).filter(out) to PathProcessorStrategy (an OLAP strategy). This opens 
up more traversals that would otherwise break the star-graph local child 
constraint in OLAP.

----


> Given PathRetractionStrategy, PathProcessorStrategy can be extended to 
> support partial where() inlining.
> --------------------------------------------------------------------------------------------------------
>
>                 Key: TINKERPOP-1473
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1473
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.2.2
>            Reporter: Marko A. Rodriguez
>            Assignee: Marko A. Rodriguez
>
> {{PathProcessorStrategy}} has a big chunk of code commented out in it that 
> says: "todo: need to be able to drop path labels for this to work."
> Given {{PathRetractionStrategy}}, we can now support:
> {code}
> where(as('a').out().as('b')) => select('a').where(out().as('b'))
> {code}
> This is useful for OLAP when you can only process the local star graph and 
> thus, if {{where()}} selects arbitrarily from a path, this rewrite will 
> ensure that the {{where()}} starts at a local star graph and not a "reference 
> element" in the path object.
> Note that {{PathProcessorStrategy}} already has test cases for this too 
> (commented out). Just uncomment stuff and go!



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

Reply via email to