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

Add Traversal class to CoreImports

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.3.3
    • 3.4.0, 3.3.5
    • server
    • None

    Description

      Apparently, some people like to copy Gremlin queries they've written in Java and paste them into the Gremlin console. This should usually work pretty well, however, there are some oddities in particular with union() step which requires you to cast the child traversals to Traversal if they have different return types, e.g.:

      g.V().
      union(
        __.identity(),
        (Traversal)__.outE()
      )
      

      This works in a local console session but fails if the query is sent to a server as Traversal is not part of the core imports.

      Attachments

        Issue Links

          Activity

            People

              dkuppitz Daniel Kuppitz
              dkuppitz Daniel Kuppitz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: