[
https://issues.apache.org/jira/browse/TINKERPOP-2811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17775931#comment-17775931
]
ASF GitHub Bot commented on TINKERPOP-2811:
-------------------------------------------
codecov-commenter commented on PR #2293:
URL: https://github.com/apache/tinkerpop/pull/2293#issuecomment-1765340124
##
[Codecov](https://app.codecov.io/gh/apache/tinkerpop/pull/2293?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
Report
> Merging
[#2293](https://app.codecov.io/gh/apache/tinkerpop/pull/2293?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
(8663ca7) into
[3.6-dev](https://app.codecov.io/gh/apache/tinkerpop/commit/097b32e9171164048e0e5334d83afe329eed1775?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
(097b32e) will **decrease** coverage by `4.06%`.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## 3.6-dev #2293 +/- ##
=============================================
- Coverage 75.24% 71.18% -4.06%
=============================================
Files 1056 25 -1031
Lines 63352 3766 -59586
Branches 6923 0 -6923
=============================================
- Hits 47670 2681 -44989
+ Misses 13116 898 -12218
+ Partials 2566 187 -2379
```
[see 1031 files with indirect coverage
changes](https://app.codecov.io/gh/apache/tinkerpop/pull/2293/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
:mega: We’re building smart automated test selection to slash your CI/CD
build times. [Learn
more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
> ElementIdStrategy doesn't replace all references of an element's id with the
> specified custom id property
> ---------------------------------------------------------------------------------------------------------
>
> Key: TINKERPOP-2811
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2811
> Project: TinkerPop
> Issue Type: Bug
> Components: process
> Affects Versions: 3.4.0, 3.6.1
> Reporter: Cameron Smith
> Priority: Minor
>
> When using the ElementIdStrategy, if a traversal attempts to filter graph
> elements with multiple _has_ steps and the id filter is not the first
> property to be filtered on, then the reference to the element's id is not
> replaced with the custom id property during the ElementIdStrategy's mutation
> of the traversal:
> {noformat}
> gremlin> graph = TinkerGraph.open()
> ==>tinkergraph[vertices:0 edges:0]
> gremlin> g =
> graph.traversal().withStrategies(ElementIdStrategy.build().create())
> ==>graphtraversalsource[tinkergraph[vertices:0 edges:0], standard]
> gremlin> g.V().hasId("foo").has("name", "bar").explain()
> ==>Traversal Explanation
> ===================================================================================================
> Original Traversal [GraphStep(vertex,[]),
> HasStep([~id.eq(foo), name.eq(bar)])]
> ConnectiveStrategy [D] [GraphStep(vertex,[]),
> HasStep([~id.eq(foo), name.eq(bar)])]
> ElementIdStrategy [D] [GraphStep(vertex,[]),
> HasStep([__id.eq(foo), name.eq(bar)])]
> IdentityRemovalStrategy [O] [GraphStep(vertex,[]),
> HasStep([__id.eq(foo), name.eq(bar)])]
> MatchPredicateStrategy [O] [GraphStep(vertex,[]),
> HasStep([__id.eq(foo), name.eq(bar)])]
> FilterRankingStrategy [O] [GraphStep(vertex,[]),
> HasStep([__id.eq(foo), name.eq(bar)])]
> InlineFilterStrategy [O] [GraphStep(vertex,[]),
> HasStep([__id.eq(foo), name.eq(bar)])]
> IncidentToAdjacentStrategy [O] [GraphStep(vertex,[]),
> HasStep([__id.eq(foo), name.eq(bar)])]
> AdjacentToIncidentStrategy [O] [GraphStep(vertex,[]),
> HasStep([__id.eq(foo), name.eq(bar)])]
> EarlyLimitStrategy [O] [GraphStep(vertex,[]),
> HasStep([__id.eq(foo), name.eq(bar)])]
> ByModulatorOptimizationStrategy [O] [GraphStep(vertex,[]),
> HasStep([__id.eq(foo), name.eq(bar)])]
> RepeatUnrollStrategy [O] [GraphStep(vertex,[]),
> HasStep([__id.eq(foo), name.eq(bar)])]
> CountStrategy [O] [GraphStep(vertex,[]),
> HasStep([__id.eq(foo), name.eq(bar)])]
> PathRetractionStrategy [O] [GraphStep(vertex,[]),
> HasStep([__id.eq(foo), name.eq(bar)])]
> LazyBarrierStrategy [O] [GraphStep(vertex,[]),
> HasStep([__id.eq(foo), name.eq(bar)])]
> TinkerGraphCountStrategy [P] [GraphStep(vertex,[]),
> HasStep([__id.eq(foo), name.eq(bar)])]
> TinkerGraphStepStrategy [P] [TinkerGraphStep(vertex,[__id.eq(foo),
> name.eq(bar)])]
> TinkerMergeEVStepStrategy [P] [TinkerGraphStep(vertex,[__id.eq(foo),
> name.eq(bar)])]
> ProfileStrategy [F] [TinkerGraphStep(vertex,[__id.eq(foo),
> name.eq(bar)])]
> StandardVerificationStrategy [V] [TinkerGraphStep(vertex,[__id.eq(foo),
> name.eq(bar)])]
> Final Traversal [TinkerGraphStep(vertex,[__id.eq(foo),
> name.eq(bar)])]
> gremlin> g.V().has("name", "bar").hasId("foo").explain()
> ==>Traversal Explanation
> ==================================================================================================
> Original Traversal [GraphStep(vertex,[]),
> HasStep([name.eq(bar), ~id.eq(foo)])]
> ConnectiveStrategy [D] [GraphStep(vertex,[]),
> HasStep([name.eq(bar), ~id.eq(foo)])]
> ElementIdStrategy [D] [GraphStep(vertex,[]),
> HasStep([name.eq(bar), ~id.eq(foo)])]
> IdentityRemovalStrategy [O] [GraphStep(vertex,[]),
> HasStep([name.eq(bar), ~id.eq(foo)])]
> MatchPredicateStrategy [O] [GraphStep(vertex,[]),
> HasStep([name.eq(bar), ~id.eq(foo)])]
> FilterRankingStrategy [O] [GraphStep(vertex,[]),
> HasStep([name.eq(bar), ~id.eq(foo)])]
> InlineFilterStrategy [O] [GraphStep(vertex,[]),
> HasStep([name.eq(bar), ~id.eq(foo)])]
> IncidentToAdjacentStrategy [O] [GraphStep(vertex,[]),
> HasStep([name.eq(bar), ~id.eq(foo)])]
> AdjacentToIncidentStrategy [O] [GraphStep(vertex,[]),
> HasStep([name.eq(bar), ~id.eq(foo)])]
> EarlyLimitStrategy [O] [GraphStep(vertex,[]),
> HasStep([name.eq(bar), ~id.eq(foo)])]
> ByModulatorOptimizationStrategy [O] [GraphStep(vertex,[]),
> HasStep([name.eq(bar), ~id.eq(foo)])]
> RepeatUnrollStrategy [O] [GraphStep(vertex,[]),
> HasStep([name.eq(bar), ~id.eq(foo)])]
> CountStrategy [O] [GraphStep(vertex,[]),
> HasStep([name.eq(bar), ~id.eq(foo)])]
> PathRetractionStrategy [O] [GraphStep(vertex,[]),
> HasStep([name.eq(bar), ~id.eq(foo)])]
> LazyBarrierStrategy [O] [GraphStep(vertex,[]),
> HasStep([name.eq(bar), ~id.eq(foo)])]
> TinkerGraphCountStrategy [P] [GraphStep(vertex,[]),
> HasStep([name.eq(bar), ~id.eq(foo)])]
> TinkerGraphStepStrategy [P]
> [TinkerGraphStep(vertex,[foo],[name.eq(bar)])]
> TinkerMergeEVStepStrategy [P]
> [TinkerGraphStep(vertex,[foo],[name.eq(bar)])]
> ProfileStrategy [F]
> [TinkerGraphStep(vertex,[foo],[name.eq(bar)])]
> StandardVerificationStrategy [V]
> [TinkerGraphStep(vertex,[foo],[name.eq(bar)])]
> Final Traversal
> [TinkerGraphStep(vertex,[foo],[name.eq(bar)])]{noformat}
> In the above example, the first traversal shows the behavior when id
> filtering is done first, and the second traversal demonstrates the behavior
> when id filtering is not the first filtering step.
> This was reproduced on both TinkerPop 3.6.1 and 3.4.0.
> The current workaround is to ensure that when chaining _has_ steps together
> that the first filter on id, if filtering on id is required.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)