[ https://issues.apache.org/jira/browse/TINKERPOP-1293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15278723#comment-15278723 ]
ASF GitHub Bot commented on TINKERPOP-1293: ------------------------------------------- Github user okram commented on the pull request: https://github.com/apache/incubator-tinkerpop/pull/310#issuecomment-218266032 CHANGELOG ``` * `GraphFilter` helper methods are now more intelligent when determining edge direction/label legality. * Added `GraphFilterStrategy` to automatically construct `GraphFilters` via traversal introspection. ``` UPDATE ``` GraphFilter and GraphFilterStrategy ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `GraphFilter` has been significantly advanced where the determination of an edge direction/label legality is more stringent. Along with this, `GraphFilter.getLegallyPositiveEdgeLabels()` has been added as a helper method to make it easier for providers to know the space of labels being accessed by the traversal. Note that `GraphFilterStrategy` is a default `TraversalStrategy` registered with `GraphComputer.` If `GraphFilter` is expensive for the underlying `GraphComputer` implementation, it can be deactivated accordingly as is done for `TinkerGraphComputer`. [source,java] ---- static { TraversalStrategies.GlobalCache.registerStrategies(TinkerGraphComputer.class, TraversalStrategies.GlobalCache.getStrategies(GraphComputer.class).clone().removeStrategies(GraphFilterStrategy.class)); } ---- ``` > Implement GraphFilterStrategy as a default registration for GraphComputer > ------------------------------------------------------------------------- > > Key: TINKERPOP-1293 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1293 > Project: TinkerPop > Issue Type: Improvement > Components: process > Affects Versions: 3.2.0-incubating > Reporter: Marko A. Rodriguez > Assignee: Marko A. Rodriguez > Fix For: 3.2.1 > > > {{GraphFilterStrategy}} would be a {{TraversalStrategy}} for > {{GraphComputers}}. It will inspect the {{Traversal}} and decide the > {{computer.vertices(...).edges(...)}} to use. > Some rules: > 1. If the traversal is part of an OLAP chain, don't apply strategy. > 2. If the traversal is persist edges, then don't {{edges(...)}} or > {{vertices(...)}}. > 3. If the traversal is persist vertex properties, then don't do > {{vertices(...)}}. > Shouldn't be too difficult. Basically looking for: > 1. {{VertexStep}} labels for edges. > 2. {{HasStep}} containers for vertices and edges. > From there, we can get fancy with {{outE().has("stars",gt(4))}}-style > {{edges(...)}}. However, basic element-label based filtering should be easy. -- This message was sent by Atlassian JIRA (v6.3.4#6332)