tinkerpop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (Jira)" <j...@apache.org>
Subject [jira] [Commented] (TINKERPOP-2350) clone() is not deep copying Traversal internals
Date Tue, 24 Mar 2020 19:33:00 GMT

    [ https://issues.apache.org/jira/browse/TINKERPOP-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17066131#comment-17066131
] 

ASF GitHub Bot commented on TINKERPOP-2350:
-------------------------------------------

spmallette commented on pull request #1268: TINKERPOP-2350 Fixed bug in Traversal.clone()
in gremlin-python
URL: https://github.com/apache/tinkerpop/pull/1268
 
 
   https://issues.apache.org/jira/browse/TINKERPOP-2350
   
   We weren't deep copying bytecode before. Added a test to verify things are working as expected
and manually tested the failing example in the JIRA:
   
   ```text
   >>> g = traversal().withRemote(DriverRemoteConnection('ws://localhost:8182/gremlin','g'))
   >>> t0 = g.V().hasLabel('x')
   >>> t0
   [['V'], ['hasLabel', 'x']]
   >>> t1 = t0.clone()
   >>> t1
   [['V'], ['hasLabel', 'x']]
   >>> t1.has('name','y')
   [['V'], ['hasLabel', 'x'], ['has', 'name', 'y']]
   >>> t0
   [['V'], ['hasLabel', 'x']]
   >>> 
   
   VOTE +1
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> clone() is not deep copying Traversal internals
> -----------------------------------------------
>
>                 Key: TINKERPOP-2350
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2350
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: python
>    Affects Versions: 3.3.10
>            Reporter: Stephen Mallette
>            Priority: Major
>
> I marked this for python but other GLVs should be test as well. A comment on TINKERPOP-2315
demonstrates the problem as:
> {code}
> In [12]: t0 = g.V().hasLabel('OID')
> In [13]: t0 
> Out[13]: [['V'], ['hasLabel', 'OID'], ['values', '_ipython_canary_method_should_not_exist_']]
> In [14]: t1 = t0.clone()
> In [15]: t1 
> Out[15]: [['V'], ['hasLabel', 'OID'], ['values', '_ipython_canary_method_should_not_exist_'],
['values', '_ipython_canary_method_should_not_exist_']]
> In [16]: t1 = t1.has('u1', 'v1')
> In [17]: t1 Out[17]: [['V'], ['hasLabel', 'OID'], ['values', '_ipython_canary_method_should_not_exist_'],
['values', '_ipython_canary_method_should_not_exist_'], ['has', 'u1', 'v1'], ['values', '_ipython_canary_method_should_not_exist_']]
> In [18]: t0 
> Out[18]: [['V'], ['hasLabel', 'OID'], ['values', '_ipython_canary_method_should_not_exist_'],
['values', '_ipython_canary_method_should_not_exist_'], ['has', 'u1', 'v1'], ['values', '_ipython_canary_method_should_not_exist_'],
['values', '_ipython_canary_method_should_not_exist_']]
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message