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 2023/02/03 20:32:00 UTC
[jira] [Commented] (TINKERPOP-2865) Add has steps injected by PartitionStrategy at the end of the filter
[ https://issues.apache.org/jira/browse/TINKERPOP-2865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17684021#comment-17684021 ]
ASF GitHub Bot commented on TINKERPOP-2865:
-------------------------------------------
spmallette opened a new pull request, #1962:
URL: https://github.com/apache/tinkerpop/pull/1962
https://issues.apache.org/jira/browse/TINKERPOP-2865
```text
gremlin> gB.V().out().hasLabel("person").has('name','stephen').explain()
==>Traversal Explanation
=================================================================================================================================================================================
Original Traversal [GraphStep(vertex,[]), VertexStep(OUT,vertex), HasStep([~label.eq(person), name.eq(stephen)])]
ConnectiveStrategy [D] [GraphStep(vertex,[]), VertexStep(OUT,vertex), HasStep([~label.eq(person), name.eq(stephen)])]
PartitionStrategy [D] [GraphStep(vertex,[]), HasStep([_partition.within([b])]), VertexStep(OUT,vertex), HasStep([~label.eq(person), name.eq(stephen)]), HasStep([
_partition.within([b])])]
IdentityRemovalStrategy [O] [GraphStep(vertex,[]), HasStep([_partition.within([b])]), VertexStep(OUT,vertex), HasStep([~label.eq(person), name.eq(stephen)]), HasStep([
_partition.within([b])])]
ByModulatorOptimizationStrategy [O] [GraphStep(vertex,[]), HasStep([_partition.within([b])]), VertexStep(OUT,vertex), HasStep([~label.eq(person), name.eq(stephen)]), HasStep([
_partition.within([b])])]
RepeatUnrollStrategy [O] [GraphStep(vertex,[]), HasStep([_partition.within([b])]), VertexStep(OUT,vertex), HasStep([~label.eq(person), name.eq(stephen)]), HasStep([
_partition.within([b])])]
MatchPredicateStrategy [O] [GraphStep(vertex,[]), HasStep([_partition.within([b])]), VertexStep(OUT,vertex), HasStep([~label.eq(person), name.eq(stephen)]), HasStep([
_partition.within([b])])]
EarlyLimitStrategy [O] [GraphStep(vertex,[]), HasStep([_partition.within([b])]), VertexStep(OUT,vertex), HasStep([~label.eq(person), name.eq(stephen)]), HasStep([
_partition.within([b])])]
CountStrategy [O] [GraphStep(vertex,[]), HasStep([_partition.within([b])]), VertexStep(OUT,vertex), HasStep([~label.eq(person), name.eq(stephen)]), HasStep([
_partition.within([b])])]
FilterRankingStrategy [O] [GraphStep(vertex,[]), HasStep([_partition.within([b])]), VertexStep(OUT,vertex), HasStep([~label.eq(person), name.eq(stephen)]), HasStep([
_partition.within([b])])]
InlineFilterStrategy [O] [GraphStep(vertex,[]), HasStep([_partition.within([b])]), VertexStep(OUT,vertex), HasStep([~label.eq(person), name.eq(stephen), _partition.
within([b])])]
ProductiveByStrategy [O] [GraphStep(vertex,[]), HasStep([_partition.within([b])]), VertexStep(OUT,vertex), HasStep([~label.eq(person), name.eq(stephen), _partition.
within([b])])]
IncidentToAdjacentStrategy [O] [GraphStep(vertex,[]), HasStep([_partition.within([b])]), VertexStep(OUT,vertex), HasStep([~label.eq(person), name.eq(stephen), _partition.
within([b])])]
PathRetractionStrategy [O] [GraphStep(vertex,[]), HasStep([_partition.within([b])]), VertexStep(OUT,vertex), HasStep([~label.eq(person), name.eq(stephen), _partition.
within([b])])]
AdjacentToIncidentStrategy [O] [GraphStep(vertex,[]), HasStep([_partition.within([b])]), VertexStep(OUT,vertex), HasStep([~label.eq(person), name.eq(stephen), _partition.
within([b])])]
LazyBarrierStrategy [O] [GraphStep(vertex,[]), HasStep([_partition.within([b])]), VertexStep(OUT,vertex), HasStep([~label.eq(person), name.eq(stephen), _partition.
within([b])])]
TinkerGraphCountStrategy [P] [GraphStep(vertex,[]), HasStep([_partition.within([b])]), VertexStep(OUT,vertex), HasStep([~label.eq(person), name.eq(stephen), _partition.
within([b])])]
TinkerGraphStepStrategy [P] [TinkerGraphStep(vertex,[_partition.within([b])]), VertexStep(OUT,vertex), HasStep([~label.eq(person), name.eq(stephen), _partition.within(
[b])])]
ProfileStrategy [F] [TinkerGraphStep(vertex,[_partition.within([b])]), VertexStep(OUT,vertex), HasStep([~label.eq(person), name.eq(stephen), _partition.within(
[b])])]
StandardVerificationStrategy [V] [TinkerGraphStep(vertex,[_partition.within([b])]), VertexStep(OUT,vertex), HasStep([~label.eq(person), name.eq(stephen), _partition.within(
[b])])]
Final Traversal [TinkerGraphStep(vertex,[_partition.within([b])]), VertexStep(OUT,vertex), HasStep([~label.eq(person), name.eq(stephen), _partition.within(
[b])])]
```
VOTE +1
> Add has steps injected by PartitionStrategy at the end of the filter
> --------------------------------------------------------------------
>
> Key: TINKERPOP-2865
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2865
> Project: TinkerPop
> Issue Type: Improvement
> Components: process
> Affects Versions: 3.5.5
> Reporter: Stephen Mallette
> Assignee: Stephen Mallette
> Priority: Major
>
> Currently, {{PartitionStrategy}} will add the {{HasStep}} for the partition key right after the step that triggers is, like:
> {code}
> g.V().hasLabel("person") -> g.V().has("_p","A").hasLabel("person")
> {code}
> It seems better in these cases to be slightly less invasive to the traversal and push the partition has to the end to therefore preserve the order of the previous filters:
> {code}
> g.V().hasLabel("person") -> g.V().hasLabel("person").has("_p","A")
> {code}
> This change probably matters most to {{Vertex}} and {{Edge}} read steps.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)