Ken Hu created TINKERPOP-3319:
---------------------------------

             Summary: NotP does not preserve GValue parameterization
                 Key: TINKERPOP-3319
                 URL: https://issues.apache.org/jira/browse/TINKERPOP-3319
             Project: TinkerPop
          Issue Type: Bug
          Components: process
    Affects Versions: 3.8.2
            Reporter: Ken Hu


NotP wraps another predicate but does not expose or update the wrapped 
predicate’s GValues. A negated predicate therefore appears non-parameterized, 
and a cached Gremlin-language traversal continues using the value supplied 
during its first execution.

Example:

{noformat}
g.inject(1).is(eq(x).negate())
{noformat}

Execute the cached traversal twice:

{code:java}
x = 1  → []       // correct: 1 equals 1
x = 2  → []       // incorrect: still uses x = 1
{code}

The second result should be:

{code:java}
x = 2  → [1]      // correct: 1 does not equal 2
{code}

NotP should delegate isParameterized(), getGValues(), and updateVariable() to 
its wrapped predicate. This preserves logical negation; it does not replace the 
predicate with its inverse.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to