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

Folding in property() step is not being optimally performed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.3.4
    • 3.3.7, 3.4.2
    • process
    • None

    Description

      Somehow we mess up the folding in property() step when it's used with tokens. I think there's just a missing if branch, but needs further investigation.

      gremlin> g = TinkerGraph.open().traversal()
      ==>graphtraversalsource[tinkergraph[vertices:0 edges:0], standard]
      gremlin> g.addV().property(T.id , 'id').property(single, 'k', 'v')
      ==>v[id]
      gremlin> g.addV().property(single, 'k', 'v').property(T.id , 'id')
      org.apache.tinkerpop.gremlin.structure.T$2 cannot be cast to java.lang.String
      Type ':help' or ':h' for help.
      Display stack trace? [yN]
      
      gremlin> g = TinkerGraph.open().traversal()
      ==>graphtraversalsource[tinkergraph[vertices:0 edges:0], standard]
      gremlin> g.addV().property(T.id , 'id').property(single, 'k', 'v').explain()
      ==>Traversal Explanation
      =========================================================================================================
      Original Traversal                 [AddVertexStartStep({id=[id]}), AddPropertyStep({key=[k], value=[v]})]
      
      ConnectiveStrategy           [D]   [AddVertexStartStep({id=[id]}), AddPropertyStep({key=[k], value=[v]})]
      MatchPredicateStrategy       [O]   [AddVertexStartStep({id=[id]}), AddPropertyStep({key=[k], value=[v]})]
      FilterRankingStrategy        [O]   [AddVertexStartStep({id=[id]}), AddPropertyStep({key=[k], value=[v]})]
      InlineFilterStrategy         [O]   [AddVertexStartStep({id=[id]}), AddPropertyStep({key=[k], value=[v]})]
      IncidentToAdjacentStrategy   [O]   [AddVertexStartStep({id=[id]}), AddPropertyStep({key=[k], value=[v]})]
      AdjacentToIncidentStrategy   [O]   [AddVertexStartStep({id=[id]}), AddPropertyStep({key=[k], value=[v]})]
      RepeatUnrollStrategy         [O]   [AddVertexStartStep({id=[id]}), AddPropertyStep({key=[k], value=[v]})]
      PathRetractionStrategy       [O]   [AddVertexStartStep({id=[id]}), AddPropertyStep({key=[k], value=[v]})]
      CountStrategy                [O]   [AddVertexStartStep({id=[id]}), AddPropertyStep({key=[k], value=[v]})]
      LazyBarrierStrategy          [O]   [AddVertexStartStep({id=[id]}), AddPropertyStep({key=[k], value=[v]})]
      TinkerGraphCountStrategy     [P]   [AddVertexStartStep({id=[id]}), AddPropertyStep({key=[k], value=[v]})]
      TinkerGraphStepStrategy      [P]   [AddVertexStartStep({id=[id]}), AddPropertyStep({key=[k], value=[v]})]
      ProfileStrategy              [F]   [AddVertexStartStep({id=[id]}), AddPropertyStep({key=[k], value=[v]})]
      StandardVerificationStrategy [V]   [AddVertexStartStep({id=[id]}), AddPropertyStep({key=[k], value=[v]})]
      
      Final Traversal                    [AddVertexStartStep({id=[id]}), AddPropertyStep({key=[k], value=[v]})]
      gremlin> g.addV().property(single, 'k', 'v').property(T.id , 'id').explain()
      ==>Traversal Explanation
      ===========================================================================================================================================
      Original Traversal                 [AddVertexStartStep({}), AddPropertyStep({key=[k], value=[v]}), AddPropertyStep({key=[id], value=[id]})]
      
      ConnectiveStrategy           [D]   [AddVertexStartStep({}), AddPropertyStep({key=[k], value=[v]}), AddPropertyStep({key=[id], value=[id]})]
      MatchPredicateStrategy       [O]   [AddVertexStartStep({}), AddPropertyStep({key=[k], value=[v]}), AddPropertyStep({key=[id], value=[id]})]
      FilterRankingStrategy        [O]   [AddVertexStartStep({}), AddPropertyStep({key=[k], value=[v]}), AddPropertyStep({key=[id], value=[id]})]
      InlineFilterStrategy         [O]   [AddVertexStartStep({}), AddPropertyStep({key=[k], value=[v]}), AddPropertyStep({key=[id], value=[id]})]
      IncidentToAdjacentStrategy   [O]   [AddVertexStartStep({}), AddPropertyStep({key=[k], value=[v]}), AddPropertyStep({key=[id], value=[id]})]
      AdjacentToIncidentStrategy   [O]   [AddVertexStartStep({}), AddPropertyStep({key=[k], value=[v]}), AddPropertyStep({key=[id], value=[id]})]
      RepeatUnrollStrategy         [O]   [AddVertexStartStep({}), AddPropertyStep({key=[k], value=[v]}), AddPropertyStep({key=[id], value=[id]})]
      PathRetractionStrategy       [O]   [AddVertexStartStep({}), AddPropertyStep({key=[k], value=[v]}), AddPropertyStep({key=[id], value=[id]})]
      CountStrategy                [O]   [AddVertexStartStep({}), AddPropertyStep({key=[k], value=[v]}), AddPropertyStep({key=[id], value=[id]})]
      LazyBarrierStrategy          [O]   [AddVertexStartStep({}), AddPropertyStep({key=[k], value=[v]}), AddPropertyStep({key=[id], value=[id]})]
      TinkerGraphCountStrategy     [P]   [AddVertexStartStep({}), AddPropertyStep({key=[k], value=[v]}), AddPropertyStep({key=[id], value=[id]})]
      TinkerGraphStepStrategy      [P]   [AddVertexStartStep({}), AddPropertyStep({key=[k], value=[v]}), AddPropertyStep({key=[id], value=[id]})]
      ProfileStrategy              [F]   [AddVertexStartStep({}), AddPropertyStep({key=[k], value=[v]}), AddPropertyStep({key=[id], value=[id]})]
      StandardVerificationStrategy [V]   [AddVertexStartStep({}), AddPropertyStep({key=[k], value=[v]}), AddPropertyStep({key=[id], value=[id]})]
      
      Final Traversal                    [AddVertexStartStep({}), AddPropertyStep({key=[k], value=[v]}), AddPropertyStep({key=[id], value=[id]})]
      

      Attachments

        Issue Links

          Activity

            People

              spmallette Stephen Mallette
              dkuppitz Daniel Kuppitz
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: