You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by eonpatapon <gi...@git.apache.org> on 2018/02/12 13:53:26 UTC

[GitHub] tinkerpop pull request #797: TINKERPOP-1887 Allow to use bindings in predica...

GitHub user eonpatapon opened a pull request:

    https://github.com/apache/tinkerpop/pull/797

    TINKERPOP-1887 Allow to use bindings in predicates

    Currently the python GLV does not allow to have bindings in predicates,
    eg:
    
        g.V().has('foo', lt(('bar', 10)))
        g.V().has('foo', inside(('a', 10), ('b', 20)))
    
    This patch fixes this

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/eonpatapon/tinkerpop TINKERPOP-1887

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tinkerpop/pull/797.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #797
    
----
commit 0856ab94112f100225e7211423b8d688ef693c48
Author: Jean-Philippe Braun <eo...@...>
Date:   2018-02-12T12:57:21Z

    TINKERPOP-1887 Allow to use bindings in predicates
    
    Currently the python GLV does not allow to have bindings in predicates,
    eg:
    
        g.V().has('foo', lt(('bar', 10)))
        g.V().has('foo', inside(('a', 10), ('b', 20)))
    
    This patch fixes this

----


---

[GitHub] tinkerpop issue #797: TINKERPOP-1887 Allow to use bindings in predicates

Posted by davebshow <gi...@git.apache.org>.
Github user davebshow commented on the issue:

    https://github.com/apache/tinkerpop/pull/797
  
    This needs a test to demonstrate that it works. I haven't run the code yet, but what happens to the key value of the binding? Does this generate GraphSON with bindings, or just the values of the bindings?


---

[GitHub] tinkerpop issue #797: TINKERPOP-1887 Allow to use bindings in predicates

Posted by eonpatapon <gi...@git.apache.org>.
Github user eonpatapon commented on the issue:

    https://github.com/apache/tinkerpop/pull/797
  
    After playing with the code and tests I'm realizing this does not work at all :)
    
    Closing for now.


---

[GitHub] tinkerpop issue #797: TINKERPOP-1887 Allow to use bindings in predicates

Posted by davebshow <gi...@git.apache.org>.
Github user davebshow commented on the issue:

    https://github.com/apache/tinkerpop/pull/797
  
    https://github.com/apache/tinkerpop/tree/master/gremlin-python/src/main/jython/tests


---

[GitHub] tinkerpop issue #797: TINKERPOP-1887 Allow to use bindings in predicates

Posted by eonpatapon <gi...@git.apache.org>.
Github user eonpatapon commented on the issue:

    https://github.com/apache/tinkerpop/pull/797
  
    Yes, can you point me to the test suite ? I wasn't able to find it in the repo


---

[GitHub] tinkerpop issue #797: TINKERPOP-1887 Allow to use bindings in predicates

Posted by eonpatapon <gi...@git.apache.org>.
Github user eonpatapon commented on the issue:

    https://github.com/apache/tinkerpop/pull/797
  
    After playing a bit, I'm not sure if what I want to do is supported by
    the gremlin-server. Actually I don't know how the bytecode should look.
    
    Given the following query in python GLV: 
    
        `g.V().has('foo', P.eq(('bar', 5)))`
    
    I translate it to the following bytecode:
    
        `[['V'], ['has', 'foo', ['eq', binding[bar=5]]]]`
    
    But this doesn't yield any results from the gremlin server.
    
    In tests I found some other form of query: `g.V().has('foo', ('bar', P.gt(5)))`, ie:
    
        `[['V'], ['has', 'foo', binding[bar=['eq', 5]]]]`
    
    But it doesn't yield any result either.
    
    Is there some bytecode reference somewhere to read more about it ? I
    didn't find any.



---

[GitHub] tinkerpop pull request #797: TINKERPOP-1887 Allow to use bindings in predica...

Posted by eonpatapon <gi...@git.apache.org>.
Github user eonpatapon closed the pull request at:

    https://github.com/apache/tinkerpop/pull/797


---

[GitHub] tinkerpop issue #797: TINKERPOP-1887 Allow to use bindings in predicates

Posted by davebshow <gi...@git.apache.org>.
Github user davebshow commented on the issue:

    https://github.com/apache/tinkerpop/pull/797
  
    There is a bit of a learning curve working with the Gremlin-Python source. Do you plan on giving this another try? If so, I will help you review. If not, let me know and I can give it a go.


---