Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-2493

PythonTranslator should default to gremlin-groovy for lambdas

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 3.4.9
    • None
    • translator
    • None

    Description

      The Java PythonTranslator is generating the following by default:

      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())
      

      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:

      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()")
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            spmallette Stephen Mallette
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: