Stephen Mallette created TINKERPOP-2493:
-------------------------------------------

             Summary: PythonTranslator should default to gremlin-groovy for 
lambdas
                 Key: TINKERPOP-2493
                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2493
             Project: TinkerPop
          Issue Type: Improvement
          Components: translator
    Affects Versions: 3.4.9
            Reporter: Stephen Mallette


The Java {{PythonTranslator}} is generating the following by default:

{code}
gremlin> 
pythonTranslator.translate(g.V().has("person",'name','marko').map(Lambda.function("x
 -> x.get()"))).script
==>g.V().has('person','name','marko').map(lambda x -> x.get())
{code}

which is a native python lambda but in 3.5.0 the {{PythonScriptEngine}} is dead 
(and likely never what the user would want/expect. We need to generate 
gremlin-groovy by default and therefore:

{code}
gremlin> 
pythonTranslator.translate(g.V().has("person",'name','marko').map(Lambda.function("x
 -> x.get()"))).script
==>g.V().has('person','name','marko').map(lambda:  "x -> x.get()")
{code}



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

Reply via email to