[
https://issues.apache.org/jira/browse/TINKERPOP-1859?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
stephen mallette updated TINKERPOP-1859:
----------------------------------------
Fix Version/s: 3.3.2
3.2.8
> Complex instance of P not serializing to bytecode properly
> ----------------------------------------------------------
>
> Key: TINKERPOP-1859
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1859
> Project: TinkerPop
> Issue Type: Bug
> Components: python
> Affects Versions: 3.2.7
> Reporter: stephen mallette
> Priority: Major
> Fix For: 3.2.8, 3.3.2
>
>
> Not sure what's happening but this traversal does not return any results with
> gremlin-python:
> {code}
> gremlin> g.V().hasLabel("person").has("age",
> P.not(P.lte(10).and(P.not(P.between(11,
> 20)))).and(P.lt(29).or(P.eq(35)))).values("name")
> ==>vadas
> ==>peter
> {code}
> When looking at the bytecode the python bytecode is different from the java
> bytecode. The java bytecode for the predicate is:
> {code}
> {
> "@type": "g:P",
> "@value": {
> "predicate": "and",
> "value": [{
> "@type": "g:P",
> "@value": {
> "predicate": "or",
> "value": [{
> "@type": "g:P",
> "@value": {
> "predicate": "gt",
> "value": {
> "@type": "g:Int32",
> "@value": 10
> }
> }
> }, {
> "@type": "g:P",
> "@value": {
> "predicate": "and",
> "value": [{
> "@type": "g:P",
> "@value": {
> "predicate":
> "gte",
> "value": {
>
> "@type": "g:Int32",
>
> "@value": 11
> }
> }
> }, {
> "@type": "g:P",
> "@value": {
> "predicate":
> "lt",
> "value": {
>
> "@type": "g:Int32",
>
> "@value": 20
> }
> }
> }]
> }
> }]
> }
> }, {
> "@type": "g:P",
> "@value": {
> "predicate": "or",
> "value": [{
> "@type": "g:P",
> "@value": {
> "predicate": "lt",
> "value": {
> "@type": "g:Int32",
> "@value": 29
> }
> }
> }, {
> "@type": "g:P",
> "@value": {
> "predicate": "eq",
> "value": {
> "@type": "g:Int32",
> "@value": 35
> }
> }
> }]
> }
> }]
> }
> }
> {code}
> The python bytecode is:
> {code}
> {
> "@type": "g:P",
> "@value": {
> "predicate": "and",
> "value": [{
> "@type": "g:P",
> "@value": {
> "predicate": "not",
> "value": {
> "@type": "g:P",
> "@value": {
> "predicate": "and",
> "value": [{
> "@type": "g:P",
> "@value": {
> "predicate":
> "lte",
> "value": {
>
> "@type": "g:Int64",
>
> "@value": 10
> }
> }
> }, {
> "@type": "g:P",
> "@value": {
> "predicate":
> "not",
> "value": {
>
> "@type": "g:P",
>
> "@value": {
>
> "predicate": "between",
>
> "value": [{
>
> "@type": "g:Int64",
>
> "@value": 11
>
> }, {
>
> "@type": "g:Int64",
>
> "@value": 20
>
> }]
> }
> }
> }
> }]
> }
> }
> }
> }, {
> "@type": "g:P",
> "@value": {
> "predicate": "or",
> "value": [{
> "@type": "g:P",
> "@value": {
> "predicate": "lt",
> "value": {
> "@type": "g:Int64",
> "@value": 29
> }
> }
> }, {
> "@type": "g:P",
> "@value": {
> "predicate": "eq",
> "value": {
> "@type": "g:Int64",
> "@value": 35
> }
> }
> }]
> }
> }]
> }
> }
> {code}
> This fix should likely be applied as part of TINKERPOP-1857 (or after it is
> merged) as there were a few modifications in that branch around {{P}} to
> resolve other issues.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
