Query

SPARQL

SELECT  *
WHERE {
  GRAPH ?g {
      BIND( "hello " as ?hello ) .
      BIND( CONCAT(?hello, "world") as ?helloWorld ) .
     ?member a ?class .
  }
} 
LIMIT 1

Parse Tree

QueryContainer
 SelectQuery
  Select ( * )
  WhereClause
   GraphPatternGroup
    GraphGraphPattern
     Var (g)
     GraphPatternGroup
      BasicGraphPattern
       Bind
        RDFLiteral
         String (hello )
        Var (hello)
       Bind
        Concat
         Var (hello)
         RDFLiteral
          String (world)
        Var (helloWorld)
       TriplesSameSubjectPath
        Var (member)
        PropertyListPath
         PathAlternative
          PathSequence
           PathElt
            IRI (http://www.w3.org/1999/02/22-rdf-syntax-ns#type)
         ObjectList
          Var (class)
  Limit (1)

Original AST

QueryType: SELECT
includeInferred=true
SELECT * 
  JoinGroupNode {
    JoinGroupNode [context=VarNode(g)] {
      ( 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(member), ConstantNode(Vocab(14)[http://www.w3.org/1999/02/22-rdf-syntax-ns#type]), VarNode(class), VarNode(g)) [scope=NAMED_CONTEXTS]
    }
  }
slice(limit=1)

Optimized AST

QueryType: SELECT
includeInferred=true
SELECT VarNode(hello) VarNode(helloWorld) VarNode(member) VarNode(class) VarNode(g)
  JoinGroupNode [context=VarNode(g)] {
    ( ConstantNode(TermId(0L)[hello ]) AS VarNode(hello) )
    StatementPatternNode(VarNode(member), ConstantNode(Vocab(14)[http://www.w3.org/1999/02/22-rdf-syntax-ns#type]), VarNode(class), VarNode(g)) [scope=NAMED_CONTEXTS]
      com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.estimatedCardinality=1691868
      com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.originalIndex=POCS
    ( 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) )
  }
slice(limit=1)

Query Plan

com.bigdata.bop.solutions.SliceOp[9](ProjectionOp[8])[ com.bigdata.bop.BOp.bopId=9, com.bigdata.bop.solutions.SliceOp.offset=0, com.bigdata.bop.solutions.SliceOp.limit=1, com.bigdata.bop.BOp.evaluationContext=CONTROLLER, com.bigdata.bop.PipelineOp.pipelined=true, com.bigdata.bop.PipelineOp.maxParallel=1, com.bigdata.bop.PipelineOp.sharedState=true, analytic=true, queryId=b7552adb-a6e4-424d-8bd1-0114c9f13d22, com.bigdata.bop.engine.QueryEngine.queryId=b7552adb-a6e4-424d-8bd1-0114c9f13d22]
  com.bigdata.bop.solutions.ProjectionOp[8](ConditionalRoutingOp[5])[ com.bigdata.bop.BOp.bopId=8, com.bigdata.bop.BOp.evaluationContext=CONTROLLER, com.bigdata.bop.PipelineOp.sharedState=true, com.bigdata.bop.join.JoinAnnotations.select=[hello, helloWorld, member, class, g]]
    com.bigdata.bop.bset.ConditionalRoutingOp[5](ChunkedMaterializationOp[7])[ com.bigdata.bop.BOp.bopId=5, com.bigdata.bop.bset.ConditionalRoutingOp.condition=TryBeforeMaterializationConstraint, analytic=true, queryId=b7552adb-a6e4-424d-8bd1-0114c9f13d22]
      com.bigdata.bop.rdf.join.ChunkedMaterializationOp[7](ConditionalRoutingOp[6])[ 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=7]
        com.bigdata.bop.bset.ConditionalRoutingOp[6](PipelineJoin[4])[ com.bigdata.bop.BOp.bopId=6, com.bigdata.bop.bset.ConditionalRoutingOp.condition=SPARQLConstraint, com.bigdata.bop.PipelineOp.altSinkRef=5, analytic=true, queryId=b7552adb-a6e4-424d-8bd1-0114c9f13d22]
          com.bigdata.bop.join.PipelineJoin[4](ConditionalRoutingOp[2])[ com.bigdata.bop.BOp.bopId=4, com.bigdata.bop.join.JoinAnnotations.constraints=null, com.bigdata.bop.BOp.evaluationContext=SHARDED, com.bigdata.bop.join.AccessPathJoinAnnotations.predicate=SPOPredicate[3]]
            com.bigdata.bop.bset.ConditionalRoutingOp[2](StartOp[1])[ com.bigdata.bop.BOp.bopId=2, com.bigdata.bop.bset.ConditionalRoutingOp.condition=BindingConstraint, analytic=true, queryId=b7552adb-a6e4-424d-8bd1-0114c9f13d22]
              com.bigdata.bop.bset.StartOp[1]()[ com.bigdata.bop.BOp.bopId=1, com.bigdata.bop.BOp.evaluationContext=CONTROLLER, analytic=true, queryId=b7552adb-a6e4-424d-8bd1-0114c9f13d22]

Query Evaluation Statistics

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

queryIdbeginTimedoneTimedeadlineelapsedserviceIdcauseevalOrderevalContextcontrollerbopIdpredIdbopSummarypredSummarystaticBestKeyOrderoverriddenKeyOrdernvarsfastRangeCountrunStatesumMillisopCountnumRunningfanOutqueueShardsqueueChunksqueueSolutionschunksInunitsInunitsInPerChunkchunksOutunitsOutunitsOutPerChunkmutationCounttypeErrorsjoinRatioaccessPathDupsaccessPathCountaccessPathRangeCountaccessPathChunksInaccessPathUnitsInsolutions/msmutations/ms
b7552adb-a6e4-424d-8bd1-0114c9f13d22Friday, April 11, 2014 5:43:25 AM HSTFriday, April 11, 2014 5:43:25 AM HST137be75a3dd-a186-43c0-b586-5cbba107043ctotaltotaltotalRunning2561601850362.875850362.875001.00000030
b7552adb-a6e4-424d-8bd1-0114c9f13d22Friday, April 11, 2014 5:43:25 AM HSTFriday, April 11, 2014 5:43:25 AM HST137be75a3dd-a186-43c0-b586-5cbba107043c0CONTROLLERfalse1StartOp[1]AllDone2301111.0111.0001.00000000
b7552adb-a6e4-424d-8bd1-0114c9f13d22Friday, April 11, 2014 5:43:25 AM HSTFriday, April 11, 2014 5:43:25 AM HST137be75a3dd-a186-43c0-b586-5cbba107043c1ANYfalse2ConditionalRoutingOp[2]AllDone139301111.0111.0001.00000000
b7552adb-a6e4-424d-8bd1-0114c9f13d22Friday, April 11, 2014 5:43:25 AM HSTFriday, April 11, 2014 5:43:25 AM HST137be75a3dd-a186-43c0-b586-5cbba107043c2SHARDEDfalse43PipelineJoin[4]SPOPredicate[3](?member, Vocab(14)[http://www.w3.org/1999/02/22-rdf-syntax-ns#type], ?class, ?g)POCS31691868Running0211000.0000.000N/A0000000
b7552adb-a6e4-424d-8bd1-0114c9f13d22Friday, April 11, 2014 5:43:25 AM HSTFriday, April 11, 2014 5:43:25 AM HST137be75a3dd-a186-43c0-b586-5cbba107043c3ANYfalse6ConditionalRoutingOp[6]Running615213300100.03300100.0001.00000020
b7552adb-a6e4-424d-8bd1-0114c9f13d22Friday, April 11, 2014 5:43:25 AM HSTFriday, April 11, 2014 5:43:25 AM HST137be75a3dd-a186-43c0-b586-5cbba107043c4ANYfalse7ChunkedMaterializationOp[7][hello]Running0200000.0000.000N/A0000000
b7552adb-a6e4-424d-8bd1-0114c9f13d22Friday, April 11, 2014 5:43:25 AM HSTFriday, April 11, 2014 5:43:25 AM HST137be75a3dd-a186-43c0-b586-5cbba107043c5ANYfalse5ConditionalRoutingOp[5]Running434211100100.01100100.0001.00000000
b7552adb-a6e4-424d-8bd1-0114c9f13d22Friday, April 11, 2014 5:43:25 AM HSTFriday, April 11, 2014 5:43:25 AM HST137be75a3dd-a186-43c0-b586-5cbba107043c6CONTROLLERfalse8ProjectionOp[8]Running02011100100.01100100.0001.00000000
b7552adb-a6e4-424d-8bd1-0114c9f13d22Friday, April 11, 2014 5:43:25 AM HSTFriday, April 11, 2014 5:43:25 AM HST137be75a3dd-a186-43c0-b586-5cbba107043c7CONTROLLERfalse9SliceOp[9]Running11201111.0111.0001.00000000