TINKERPOP-1887 Allow to use bindings in predicates#797
Closed
eonpatapon wants to merge 1 commit intoapache:masterfrom
Closed
TINKERPOP-1887 Allow to use bindings in predicates#797eonpatapon wants to merge 1 commit intoapache:masterfrom
eonpatapon wants to merge 1 commit intoapache:masterfrom
Conversation
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
Contributor
|
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? |
Author
|
Yes, can you point me to the test suite ? I wasn't able to find it in the repo |
Author
|
After playing with the code and tests I'm realizing this does not work at all :) Closing for now. |
Contributor
|
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. |
Author
|
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.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently the python GLV does not allow to have bindings in predicates,
eg:
This patch fixes this