[
https://issues.apache.org/jira/browse/TINKERPOP-2893?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stephen Mallette updated TINKERPOP-2893:
----------------------------------------
Component/s: process
Affects Version/s: 3.5.5
Priority: Minor (was: Major)
Looks like bounds need to be better checked in {{CountStrategy}}:
{code}
gremlin> g.V().filter(__.in('knows').count().is(lt(-1l))).explain()
==>Traversal Explanation
===================================================================================================================================================
Original Traversal [GraphStep(vertex,[]),
TraversalFilterStep([VertexStep(IN,[knows],vertex), CountGlobalStep,
IsStep(lt(-1))])]
ConnectiveStrategy [D] [GraphStep(vertex,[]),
TraversalFilterStep([VertexStep(IN,[knows],vertex), CountGlobalStep,
IsStep(lt(-1))])]
IdentityRemovalStrategy [O] [GraphStep(vertex,[]),
TraversalFilterStep([VertexStep(IN,[knows],vertex), CountGlobalStep,
IsStep(lt(-1))])]
MatchPredicateStrategy [O] [GraphStep(vertex,[]),
TraversalFilterStep([VertexStep(IN,[knows],vertex), CountGlobalStep,
IsStep(lt(-1))])]
FilterRankingStrategy [O] [GraphStep(vertex,[]),
TraversalFilterStep([VertexStep(IN,[knows],vertex), CountGlobalStep,
IsStep(lt(-1))])]
InlineFilterStrategy [O] [GraphStep(vertex,[]),
TraversalFilterStep([VertexStep(IN,[knows],vertex), CountGlobalStep,
IsStep(lt(-1))])]
IncidentToAdjacentStrategy [O] [GraphStep(vertex,[]),
TraversalFilterStep([VertexStep(IN,[knows],vertex), CountGlobalStep,
IsStep(lt(-1))])]
RepeatUnrollStrategy [O] [GraphStep(vertex,[]),
TraversalFilterStep([VertexStep(IN,[knows],vertex), CountGlobalStep,
IsStep(lt(-1))])]
PathRetractionStrategy [O] [GraphStep(vertex,[]),
TraversalFilterStep([VertexStep(IN,[knows],vertex), CountGlobalStep,
IsStep(lt(-1))])]
ByModulatorOptimizationStrategy [O] [GraphStep(vertex,[]),
TraversalFilterStep([VertexStep(IN,[knows],vertex), CountGlobalStep,
IsStep(lt(-1))])]
AdjacentToIncidentStrategy [O] [GraphStep(vertex,[]),
TraversalFilterStep([VertexStep(IN,[knows],edge), CountGlobalStep,
IsStep(lt(-1))])]
EarlyLimitStrategy [O] [GraphStep(vertex,[]),
TraversalFilterStep([VertexStep(IN,[knows],edge), CountGlobalStep,
IsStep(lt(-1))])]
CountStrategy [O] [GraphStep(vertex,[]),
NotStep([VertexStep(IN,[knows],edge)])]
LazyBarrierStrategy [O] [GraphStep(vertex,[]),
NotStep([VertexStep(IN,[knows],edge)])]
TinkerGraphCountStrategy [P] [GraphStep(vertex,[]),
NotStep([VertexStep(IN,[knows],edge)])]
TinkerGraphStepStrategy [P] [TinkerGraphStep(vertex,[]),
NotStep([VertexStep(IN,[knows],edge)])]
ProfileStrategy [F] [TinkerGraphStep(vertex,[]),
NotStep([VertexStep(IN,[knows],edge)])]
StandardVerificationStrategy [V] [TinkerGraphStep(vertex,[]),
NotStep([VertexStep(IN,[knows],edge)])]
Final Traversal [TinkerGraphStep(vertex,[]),
NotStep([VertexStep(IN,[knows],edge)])]
{code}
If you are able, feel free to submit a PR to fix that one.
> Incorrectly comparing a counted value with multiple predicates
> --------------------------------------------------------------
>
> Key: TINKERPOP-2893
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2893
> Project: TinkerPop
> Issue Type: Bug
> Components: process
> Affects Versions: 3.5.5
> Reporter: Lei Tang
> Priority: Minor
>
> We use a composition of two predicates inside(-1,1).and(lt(-1)) to filter
> numbers that are greater than -1 and less -1. Obviously, no values satisfy
> this condition. Therefore, we expect Tinkergraph returns an empty set.
> However, a vertex is returned.
> {code:java}
> gremlin> :> g.V().where(__.in('knows').count().is(inside(-1,1).and(lt(-1))))
> ==>v[0] {code}
> The graph of this example is as following.
> {code:java}
> Vertex bob = g.addV("person").property("name", "Bob").next(); // v[0]
> Vertex alice = g.addV("person").property("name", "Alice").next(); // v[1]
> Edge edge1 = g.addE("knows").from(bob).to(alice).next();{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)