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

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

GitHub user okram opened a pull request:

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

    TINKERPOP-1456 & TINKERPOP-1412: SubgraphStrategy updates and more!

    https://issues.apache.org/jira/browse/TINKERPOP-1456
      https://issues.apache.org/jira/browse/TINKERPOP-1412
    
      There is alot of good work here.
    
      `SubgraphStrategy` now supports vertex property filtering. Added 
`InlineFilterStrategy` which analyzes the child traversals of 
`TraversalFilterStep` and `AndStep` and if they are composed of all 
`FilterSteps`, then it inlines the child traversal into the parent traversal. 
This is huge, cause it means there is a better chance of getting vertex-centric 
index and graph-centric index provider optimizations to pull in filters 
accordingly for push-down predicates. From there I added lots of test to 
`SubgraphStrategyXXXTest` and updated the reference documentation with some 
better uses of `SubgraphStrategy`. Also, I made it so 
`AbstractLambdaTraversals` can be "bypasses" (necessary for various strategy 
introspection/mutation scenarios). `ConnectiveSteps` (and/or) extends 
`FilterStep` (should have the whole time). Added the concept that hiddel labels 
on steps are purged at execution time. Much like hidden labels in structure are 
not visible, did the same here in traversal. This makes life alot easier when 
dealing with multi-nested strategies.
    
      Here is the CHANGELOG.
    
      ```
    * Added `TraversalHelper.applySingleLevelStrategies()` which will apply a 
subset of strategies but not walk the child tree.
    * Added the concept that hidden labels using during traversal compilation 
are removed at the end during `StandardVerificationStrategy`. (*breaking*)
    * Added `InlineFilterStrategy` which will determine if a 
`TraversalFilterStep` or `AndStep` children are filters and if so, inline them.
    * Removed `IdentityRemovalStrategy` from the default listing as its not 
worth the clock cycles.
    * Removed the "!" symbol in `NotStep.toString()` as it is confusing and the 
`NotStep`-name is sufficient.
    * Fixed a bug in `TraversalVertexProgram` (OLAP) around ordering and 
connectives (i.e. `and()` and `or()`).
    * Added `AbstractGremlinProcessTest.checkOrderedResults()` to make testing 
ordered results easier.
    * `AbstractLambdaTraversal` now supports a `bypassTraversal` where it is 
possible for strategies to redefine such lambda traversals.
    * Added an internal utility `ClassFilterStep` which determines if the 
traverser object's class is an instance of the provided class.
    * `ConnectiveStep` extends `FilterStep` and thus, is more appropriately 
categorized in the step hierarchy.
    * `PropertyMapStep` supports a provided traversal for accessing the 
properties of the element.
    * `SubgraphStrategy` now supports vertex property filtering.
    ```
    
    VOTE +1

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

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

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

    https://github.com/apache/tinkerpop/pull/434.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 #434
    
----
commit 4f723eed82294b95f8409db5cc890f9f41ed84ae
Author: Marko A. Rodriguez <[email protected]>
Date:   2016-09-19T19:52:33Z

    Added support for SubgraphStrategy.vertexProperties(). Added some test 
cases to verify proper functioning. Also, cleaned up Stream-stuff in 
SubgraphStrategy. Going to do some more cleanup there to make things clean and 
efficient.

commit d2ae1aaa8bce78d260e53dc4ecc047c78f905b16
Author: Marko A. Rodriguez <[email protected]>
Date:   2016-09-20T16:04:56Z

    AbstractLambdaTraversals now support a bypassTraversal which allows 
strategies to easily change the semantics of the lambda traversal. Found a bug 
in TraversalVertexProgram around order() and the use of ConnectiveSteps. Added 
more tests to SubgraphStrategyProcessTest to test vertex properties and 
ordering. Added checkOrderedResult() to AbstractGremlinProcessTest which makes 
it easy to check ordered streams. Updated OrderTest to use this model -- much 
simpler.

commit 5fc2163df107ddae830bd68f7a3926d4fcea8211
Author: Marko A. Rodriguez <[email protected]>
Date:   2016-09-20T21:05:12Z

    SubgraphStrategy no longer filter()-wraps criteria if the criteria is a 
chain of filters or connectives. This ensures that has() folds to VertexStep 
and VertexEdgeSteps -- by most providers.

commit beaf5208ddafd90277e9c5b0f28074cf0b8cb6d4
Author: Marko A. Rodriguez <[email protected]>
Date:   2016-09-21T17:48:33Z

    added ClassFilterStep which checks the class type of a traverser object. 
this is an internal utility class not exposed at the GraphTraversal level.

commit b5ec675062ac3f1a7ea5f7af5ff12e51ffc94ead
Author: Marko A. Rodriguez <[email protected]>
Date:   2016-09-21T20:11:47Z

    PropertyMapStep now supports a propertyTraversal for accessing properties 
from the element. ConnectiveStrategy will concatenate two AND traversals if 
they are both filter based. SubgraphStrategy now handles valueMap() and 
propertyMap() correctly. Added TraversalHelper.isAllFilters() to check if a 
traversal is completely filter-based.

commit 226d7a90a01ef32c90aa29aaa4c54c2c846f8835
Author: Marko A. Rodriguez <[email protected]>
Date:   2016-09-21T21:06:12Z

    SubgraphStrategy is smart about trying to determine whether the property is 
a VertexProperty or a stanard Property. If the former, then no OrStep wrap is 
needed and the filter can be inlined and thus, likely that the graph database 
optimizers will use vertex-centric indices.

commit 0bbf6a3efb74dd4ea2e3e4384bd7ab3e22e9b9b3
Author: Marko A. Rodriguez <[email protected]>
Date:   2016-09-21T21:08:39Z

    a loop got fuggled.

commit 1f70b434b459c088c4be20d1bf9b126e31eda72c
Author: Marko A. Rodriguez <[email protected]>
Date:   2016-09-21T21:18:48Z

    added more test cases to SubgraphStrategyProcessTest and cleanedup 
SubgraphStrategy a bit.

commit 23a4e86b2992f507fdb1536060b9344c9a09d188
Author: Marko A. Rodriguez <[email protected]>
Date:   2016-09-22T19:45:33Z

    there is a bug in StarGraph property attachment/detachment that caused a 
contrived test case in SubgraphStrategyProcessTest to fail. I got the same 
effect with another traversal and have logged the StarGraph bug in JIRA.

commit 37f0606c29533555b699ea34c0a8aed402e2e0cb
Author: Marko A. Rodriguez <[email protected]>
Date:   2016-09-23T18:11:46Z

    added a better example to SugraphStategy in the reference docs. Also added 
an explain() so people can see whats going on.

commit dabeb02deb00b85d23ca8b70bfcf7f6ea8ec2ed1
Author: Marko A. Rodriguez <[email protected]>
Date:   2016-09-23T22:03:37Z

    added lots of good stuff that all revolves around SubgraphStategy. 
InlineFilterStrategy tries to inline filters. Epic. And/OrStep are now 
FilterSteps - epic. Lots of cleanup and simplification of SubgraphStrategy 
cause of it.

----


> Support SubgraphStrategy.vertexProperties().
> --------------------------------------------
>
>                 Key: TINKERPOP-1456
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1456
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.1.4, 3.2.2
>            Reporter: Marko A. Rodriguez
>
> We currently support:
> {code}
> SubgraphStrategy.build().vertices()
> SubgraphStrategy.build().edges()
> {code}
> We should also support:
> {code}
> SubgraphStrategy.build().vertexProperties()
> {code}



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

Reply via email to