Query

SPARQL

PREFIX tmp: <http://example/tmp/>
SELECT  *
WHERE {
  GRAPH tmp: {
      { SELECT * {
      BIND( "hello " as ?hello ) .
      BIND( CONCAT(?hello, "world") as ?helloWorld ) .
      }}
     ?s ?p ?v .
  }
} 

Parse Tree

QueryContainer
 PrefixDecl (prefix=tmp)
  IRI (http://example/tmp/)
 SelectQuery
  Select ( * )
  WhereClause
   GraphPatternGroup
    GraphGraphPattern
     IRI (http://example/tmp/)
     GraphPatternGroup
      GraphPatternGroup
       SelectQuery
        Select ( * )
        WhereClause
         GraphPatternGroup
          BasicGraphPattern
           Bind
            RDFLiteral
             String (hello )
            Var (hello)
           Bind
            Concat
             Var (hello)
             RDFLiteral
              String (world)
            Var (helloWorld)
      BasicGraphPattern
       TriplesSameSubjectPath
        Var (s)
        PropertyListPath
         Var (p)
         ObjectList
          Var (v)

Original AST

PREFIX tmp: <http://example/tmp/>
QueryType: SELECT
includeInferred=true
SELECT * 
  JoinGroupNode {
    JoinGroupNode [context=ConstantNode(TermId(6917529027909517939U)[http://example/tmp/])] {
      JoinGroupNode [context=ConstantNode(TermId(6917529027909517939U)[http://example/tmp/])] {
        QueryType: SELECT
        SELECT * 
          JoinGroupNode {
            ( ConstantNode(TermId(0L)[hello ]) AS VarNode(hello) )
            ( com.bigdata.rdf.sparql.ast.FunctionNode(VarNode(hello),ConstantNode(TermId(0L)[world]))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2006/sparql-functions#concat, valueExpr=com.bigdata.rdf.internal.constraints.ConcatBOp(hello,TermId(0L)[world])[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=chcsdata.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1]] AS VarNode(helloWorld) )
          }
        
      }
      StatementPatternNode(VarNode(s), VarNode(p), VarNode(v), ConstantNode(TermId(6917529027909517939U)[http://example/tmp/])) [scope=NAMED_CONTEXTS]
    }
  }

Optimized AST

PREFIX tmp: <http://example/tmp/>
QueryType: SELECT
includeInferred=true
SELECT VarNode(hello) VarNode(helloWorld) VarNode(s) VarNode(p) VarNode(v)
  JoinGroupNode [context=ConstantNode(TermId(6917529027909517939U)[http://example/tmp/])] {
    StatementPatternNode(VarNode(s), VarNode(p), VarNode(v), ConstantNode(TermId(6917529027909517939U)[http://example/tmp/])) [scope=NAMED_CONTEXTS]
      com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.estimatedCardinality=1
      com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.originalIndex=CSPO
    QueryType: SELECT
    SELECT VarNode(hello) VarNode(helloWorld)
      JoinGroupNode {
        ( ConstantNode(TermId(0L)[hello ]) AS VarNode(hello) )
        ( com.bigdata.rdf.sparql.ast.FunctionNode(VarNode(hello),ConstantNode(TermId(0L)[world]))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2006/sparql-functions#concat, valueExpr=com.bigdata.rdf.internal.constraints.ConcatBOp(hello,TermId(0L)[world])[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=chcsdata.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1]] AS VarNode(helloWorld) )
      }
    
  }

Query Plan

com.bigdata.bop.solutions.ProjectionOp[13](HTreeSolutionSetHashJoinOp[12])[ com.bigdata.bop.BOp.bopId=13, com.bigdata.bop.BOp.evaluationContext=CONTROLLER, com.bigdata.bop.PipelineOp.sharedState=true, com.bigdata.bop.join.JoinAnnotations.select=[hello, helloWorld, s, p, v], com.bigdata.bop.engine.QueryEngine.queryId=03289909-13c6-4119-a606-ce17c1025e6a]
  com.bigdata.bop.join.HTreeSolutionSetHashJoinOp[12](ProjectionOp[11])[ com.bigdata.bop.BOp.bopId=12, com.bigdata.bop.BOp.evaluationContext=CONTROLLER, com.bigdata.bop.PipelineOp.maxParallel=1, com.bigdata.bop.PipelineOp.sharedState=true, class com.bigdata.bop.join.SolutionSetHashJoinOp.release=false, com.bigdata.bop.PipelineOp.lastPass=false, namedSetRef=NamedSolutionSetRef{localName=--set-4,queryId=03289909-13c6-4119-a606-ce17c1025e6a,joinVars=[]}]
    com.bigdata.bop.solutions.ProjectionOp[11](ConditionalRoutingOp[8])[ com.bigdata.bop.BOp.bopId=11, com.bigdata.bop.BOp.evaluationContext=CONTROLLER, com.bigdata.bop.PipelineOp.sharedState=true, com.bigdata.bop.join.JoinAnnotations.select=[hello, helloWorld]]
      com.bigdata.bop.bset.ConditionalRoutingOp[8](ChunkedMaterializationOp[10])[ com.bigdata.bop.BOp.bopId=8, com.bigdata.bop.bset.ConditionalRoutingOp.condition=TryBeforeMaterializationConstraint, analytic=true, queryId=03289909-13c6-4119-a606-ce17c1025e6a]
        com.bigdata.bop.rdf.join.ChunkedMaterializationOp[10](ConditionalRoutingOp[9])[ com.bigdata.bop.rdf.join.ChunkedMaterializationOp.vars=[hello], com.bigdata.bop.IPredicate.relationName=[chcsdata.lex], com.bigdata.bop.IPredicate.timestamp=-1, com.bigdata.bop.PipelineOp.sharedState=false, com.bigdata.bop.BOp.bopId=10]
          com.bigdata.bop.bset.ConditionalRoutingOp[9](ConditionalRoutingOp[7])[ com.bigdata.bop.BOp.bopId=9, com.bigdata.bop.bset.ConditionalRoutingOp.condition=SPARQLConstraint, com.bigdata.bop.PipelineOp.altSinkRef=8, analytic=true, queryId=03289909-13c6-4119-a606-ce17c1025e6a]
            com.bigdata.bop.bset.ConditionalRoutingOp[7](ProjectionOp[6])[ com.bigdata.bop.BOp.bopId=7, com.bigdata.bop.bset.ConditionalRoutingOp.condition=BindingConstraint, analytic=true, queryId=03289909-13c6-4119-a606-ce17c1025e6a]
              com.bigdata.bop.solutions.ProjectionOp[6](HTreeHashIndexOp[5])[ com.bigdata.bop.BOp.bopId=6, com.bigdata.bop.BOp.evaluationContext=CONTROLLER, com.bigdata.bop.PipelineOp.sharedState=true, com.bigdata.bop.join.JoinAnnotations.select=[hello, helloWorld]]
                com.bigdata.bop.join.HTreeHashIndexOp[5](PipelineJoin[3])[ com.bigdata.bop.BOp.bopId=5, com.bigdata.bop.BOp.evaluationContext=CONTROLLER, com.bigdata.bop.PipelineOp.maxParallel=1, com.bigdata.bop.PipelineOp.lastPass=true, com.bigdata.bop.PipelineOp.sharedState=true, com.bigdata.bop.IPredicate.relationName=[chcsdata.lex], com.bigdata.bop.join.JoinAnnotations.joinType=Normal, com.bigdata.bop.join.HashJoinAnnotations.joinVars=[], com.bigdata.bop.join.JoinAnnotations.constraints=null, namedSetRef=NamedSolutionSetRef{localName=--set-4,queryId=03289909-13c6-4119-a606-ce17c1025e6a,joinVars=[]}]
                  com.bigdata.bop.join.PipelineJoin[3](StartOp[1])[ com.bigdata.bop.BOp.bopId=3, com.bigdata.bop.join.JoinAnnotations.constraints=null, com.bigdata.bop.BOp.evaluationContext=SHARDED, com.bigdata.bop.join.AccessPathJoinAnnotations.predicate=SPOPredicate[2]]
                    com.bigdata.bop.bset.StartOp[1]()[ com.bigdata.bop.BOp.bopId=1, com.bigdata.bop.BOp.evaluationContext=CONTROLLER, analytic=true, queryId=03289909-13c6-4119-a606-ce17c1025e6a]

Query Evaluation Statistics

solutions=1, chunks=1, subqueries=0, elapsed=74ms.

queryIdbeginTimedoneTimedeadlineelapsedserviceIdcauseevalOrderevalContextcontrollerbopIdpredIdbopSummarypredSummarystaticBestKeyOrderoverriddenKeyOrdernvarsfastRangeCountrunStatesumMillisopCountnumRunningfanOutqueueShardsqueueChunksqueueSolutionschunksInunitsInunitsInPerChunkchunksOutunitsOutunitsOutPerChunkmutationCounttypeErrorsjoinRatioaccessPathDupsaccessPathCountaccessPathRangeCountaccessPathChunksInaccessPathUnitsInsolutions/msmutations/ms
03289909-13c6-4119-a606-ce17c1025e6aFriday, April 11, 2014 7:04:31 AM HSTFriday, April 11, 2014 7:04:31 AM HST74be75a3dd-a186-43c0-b586-5cbba107043ctotaltotaltotalAllDone661701991.010101.0001.11111111111111120221100
03289909-13c6-4119-a606-ce17c1025e6aFriday, April 11, 2014 7:04:31 AM HSTFriday, April 11, 2014 7:04:31 AM HST74be75a3dd-a186-43c0-b586-5cbba107043c0CONTROLLERfalse1StartOp[1]AllDone10301111.0111.0001.00000000
03289909-13c6-4119-a606-ce17c1025e6aFriday, April 11, 2014 7:04:31 AM HSTFriday, April 11, 2014 7:04:31 AM HST74be75a3dd-a186-43c0-b586-5cbba107043c1SHARDEDfalse32PipelineJoin[3]SPOPredicate[2](?s, ?p, ?v, TermId(6917529027909517939U)[http://example/tmp/])CSPO31AllDone11301111.0111.0001.00111100
03289909-13c6-4119-a606-ce17c1025e6aFriday, April 11, 2014 7:04:31 AM HSTFriday, April 11, 2014 7:04:31 AM HST74be75a3dd-a186-43c0-b586-5cbba107043c2CONTROLLERfalse5HTreeHashIndexOp[5]HTreeHashJoinUtility{open=true,joinType=Normal,chunkSize=1000,joinVars=[],size=1,considered(left=1,right=1,joins=1)},namedSet=--set-4AllDone36201111.0111.0001.00000000
03289909-13c6-4119-a606-ce17c1025e6aFriday, April 11, 2014 7:04:31 AM HSTFriday, April 11, 2014 7:04:31 AM HST74be75a3dd-a186-43c0-b586-5cbba107043c3CONTROLLERfalse6ProjectionOp[6]AllDone1201111.0111.0001.00000000
03289909-13c6-4119-a606-ce17c1025e6aFriday, April 11, 2014 7:04:31 AM HSTFriday, April 11, 2014 7:04:31 AM HST74be75a3dd-a186-43c0-b586-5cbba107043c4ANYfalse7ConditionalRoutingOp[7]AllDone2301111.0111.0001.00000000
03289909-13c6-4119-a606-ce17c1025e6aFriday, April 11, 2014 7:04:31 AM HSTFriday, April 11, 2014 7:04:31 AM HST74be75a3dd-a186-43c0-b586-5cbba107043c5ANYfalse9ConditionalRoutingOp[9]AllDone1301111.0111.0001.00000000
03289909-13c6-4119-a606-ce17c1025e6aFriday, April 11, 2014 7:04:31 AM HSTFriday, April 11, 2014 7:04:31 AM HST74be75a3dd-a186-43c0-b586-5cbba107043c6ANYfalse10ChunkedMaterializationOp[10][hello]AllDone0200000.0000.000N/A0000000
03289909-13c6-4119-a606-ce17c1025e6aFriday, April 11, 2014 7:04:31 AM HSTFriday, April 11, 2014 7:04:31 AM HST74be75a3dd-a186-43c0-b586-5cbba107043c7ANYfalse8ConditionalRoutingOp[8]AllDone1301111.0111.0001.00000000
03289909-13c6-4119-a606-ce17c1025e6aFriday, April 11, 2014 7:04:31 AM HSTFriday, April 11, 2014 7:04:31 AM HST74be75a3dd-a186-43c0-b586-5cbba107043c8CONTROLLERfalse11ProjectionOp[11]AllDone1201111.0111.0001.00000000
03289909-13c6-4119-a606-ce17c1025e6aFriday, April 11, 2014 7:04:31 AM HSTFriday, April 11, 2014 7:04:31 AM HST74be75a3dd-a186-43c0-b586-5cbba107043c9CONTROLLERfalse12HTreeSolutionSetHashJoinOp[12]HTreeHashJoinUtility{open=true,joinType=Normal,chunkSize=1000,joinVars=[],size=1,considered(left=1,right=1,joins=1)},namedSet=--set-4AllDone3201000.0111.000N/A0110000
03289909-13c6-4119-a606-ce17c1025e6aFriday, April 11, 2014 7:04:31 AM HSTFriday, April 11, 2014 7:04:31 AM HST74be75a3dd-a186-43c0-b586-5cbba107043c10CONTROLLERfalse13ProjectionOp[13]AllDone0201111.0111.0001.00000000