Details

    • Type: Bug
    • Status: Accepted
    • Resolution: Unresolved
    • Affects Version/s: BIGDATA_RELEASE_1_2_2
    • Fix Version/s: None
    • Component/s: Static Query Optimizer
    • Labels:
      None

      Description

      Removing the two comment characters changes the result set to be incorrect, with appropriate input data
      (e.g. where "Diagonal Medicine" should match)

      select distinct ?o
      where {    
        {
           ?s skos:prefLabel | skos:altLabel ?o.    
           ?o bds:search "dia*" .
      
      #   }
      #  {
           ?s skos:prefLabel | skos:altLabel ?o.    
           ?o bds:search "med*" .
         }
         
      } ORDER BY ?o LIMIT 50
      

        Activity

        Hide
        jeremycarroll jeremycarroll added a comment -

        Oops
        - got it the wrong way round. Removing the comment chars is the work-around for the defect.
        The query as given never matches

        Show
        jeremycarroll jeremycarroll added a comment - Oops - got it the wrong way round. Removing the comment chars is the work-around for the defect. The query as given never matches
        Hide
        jeremycarroll jeremycarroll added a comment -

        This optimized query is 'obviously' incorrect
        - search for qLd case sensitively. It does not get converted into a service call.

        SPARQL
        
        base <http://localhost:8000/>
        prefix owl: <http://www.w3.org/2002/07/owl#>
        prefix bds: <http://www.bigdata.com/rdf/search#>
        prefix dc: <http://purl.org/dc/elements/1.1/>
        prefix sys: </bdm/api/kbobject/sys:>
        prefix base: </bdm/api/kbobject/base:>
        prefix sysd: </bdm/api/appindividual/sysd:>
        prefix skos: <http://www.w3.org/2004/02/skos/core#>
        prefix syapse: </graph/syapse#>
        prefix based: </bdm/api/appindividual/based:>
        prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
        prefix s: </bdm/api/>
        prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
        prefix xsd: <http://www.w3.org/2001/XMLSchema#>
        prefix sd: <http://www.w3.org/ns/sparql-service-description#>
        prefix c2: </bdm/api/kbobject/c2:>
        prefix c2d: </bdm/api/appindividual/c2d:>
        SELECT *
        FROM <http://localhost:8000/graph/vocabulary>
        FROM <http://localhost:8000/graph/syapse>
        FROM <http://localhost:8000/graph/stoogesInc/vocabulary>
        FROM NAMED <http://localhost:8000/graph/vocabulary>
        FROM NAMED <http://localhost:8000/graph/syapse>
        FROM NAMED <http://localhost:8000/graph/stoogesInc/vocabulary>
        
        WITH {
        SELECT ?term
        FROM <http://localhost:8000/graph/vocabulary>
        FROM <http://localhost:8000/graph/syapse>
        FROM <http://localhost:8000/graph/stoogesInc/vocabulary>
        FROM NAMED <http://localhost:8000/graph/vocabulary>
        FROM NAMED <http://localhost:8000/graph/syapse>
        FROM NAMED <http://localhost:8000/graph/stoogesInc/vocabulary>
        
        WHERE {
        
        { ?s skos:altLabel ?term ;
               
                  syapse:inScheme <http://localhost:8000/vocabulary/pubmed/publication#> .
               ?term bds:search "Qld" .
          FILTER ( lcase(?term) = "qld" )
        } UNION {
        
            {  ?s skos:prefLabel ?term ;
                  
                  syapse:inScheme <http://localhost:8000/vocabulary/pubmed/publication#> .
               ?term bds:search "Qld*" .
               FILTER NOT EXISTS {
                  ?s skos:altLabel ?alt .
                  FILTER ( lcase(?alt) = "qld" )
               }
            } UNION {
              # select one altLabel if no prefLabel matches
              { SELECT ( MIN(?alt) as ?term ) ( COUNT(*) AS ?c0 )
                {
                  ?s skos:altLabel ?alt ;
                     skos:prefLabel ?pref ;
                     
                     syapse:inScheme <http://localhost:8000/vocabulary/pubmed/publication#> .
                  ?alt bds:search "qLd" .
                  FILTER ( strstarts(lcase(?alt), "qld" ) )
                  FILTER ( lcase(?alt) != "qld" )
                  FILTER (  ! (
         REGEX( ?pref, "(^|\\W)Qld", "i")
         ) )
                } GROUP BY ?s
              }
              FILTER ( ?c0 > 0 )
            }
        }
        }} AS %__FullQuery
        
        WHERE {
        
        { SELECT (COUNT(*) AS $S__COUNT)
          WHERE {
            INCLUDE %__FullQuery
          }
         }
         INCLUDE %__FullQuery
        
        }
        Parse Tree
        
        QueryContainer
         BaseDecl (http://localhost:8000/)
         PrefixDecl (prefix=owl)
          IRI (http://www.w3.org/2002/07/owl#)
         PrefixDecl (prefix=bds)
          IRI (http://www.bigdata.com/rdf/search#)
         PrefixDecl (prefix=dc)
          IRI (http://purl.org/dc/elements/1.1/)
         PrefixDecl (prefix=sys)
          IRI (http://localhost:8000/bdm/api/kbobject/sys:)
         PrefixDecl (prefix=base)
          IRI (http://localhost:8000/bdm/api/kbobject/base:)
         PrefixDecl (prefix=sysd)
          IRI (http://localhost:8000/bdm/api/appindividual/sysd:)
         PrefixDecl (prefix=skos)
          IRI (http://www.w3.org/2004/02/skos/core#)
         PrefixDecl (prefix=syapse)
          IRI (http://localhost:8000/graph/syapse#)
         PrefixDecl (prefix=based)
          IRI (http://localhost:8000/bdm/api/appindividual/based:)
         PrefixDecl (prefix=rdfs)
          IRI (http://www.w3.org/2000/01/rdf-schema#)
         PrefixDecl (prefix=s)
          IRI (http://localhost:8000/bdm/api/)
         PrefixDecl (prefix=rdf)
          IRI (http://www.w3.org/1999/02/22-rdf-syntax-ns#)
         PrefixDecl (prefix=xsd)
          IRI (http://www.w3.org/2001/XMLSchema#)
         PrefixDecl (prefix=sd)
          IRI (http://www.w3.org/ns/sparql-service-description#)
         PrefixDecl (prefix=c2)
          IRI (http://localhost:8000/bdm/api/kbobject/c2:)
         PrefixDecl (prefix=c2d)
          IRI (http://localhost:8000/bdm/api/appindividual/c2d:)
         SelectQuery
          Select ( * )
          DatasetClause (named=false, virtual=false)
           IRI (http://localhost:8000/graph/vocabulary)
          DatasetClause (named=false, virtual=false)
           IRI (http://localhost:8000/graph/syapse)
          DatasetClause (named=false, virtual=false)
           IRI (http://localhost:8000/graph/stoogesInc/vocabulary)
          DatasetClause (named=true, virtual=false)
           IRI (http://localhost:8000/graph/vocabulary)
          DatasetClause (named=true, virtual=false)
           IRI (http://localhost:8000/graph/syapse)
          DatasetClause (named=true, virtual=false)
           IRI (http://localhost:8000/graph/stoogesInc/vocabulary)
          NamedSubquery
           SelectQuery
            Select
             ProjectionElem
              Var (term)
            DatasetClause (named=false, virtual=false)
             IRI (http://localhost:8000/graph/vocabulary)
            DatasetClause (named=false, virtual=false)
             IRI (http://localhost:8000/graph/syapse)
            DatasetClause (named=false, virtual=false)
             IRI (http://localhost:8000/graph/stoogesInc/vocabulary)
            DatasetClause (named=true, virtual=false)
             IRI (http://localhost:8000/graph/vocabulary)
            DatasetClause (named=true, virtual=false)
             IRI (http://localhost:8000/graph/syapse)
            DatasetClause (named=true, virtual=false)
             IRI (http://localhost:8000/graph/stoogesInc/vocabulary)
            WhereClause
             GraphPatternGroup
              UnionGraphPattern
               GraphPatternGroup
                BasicGraphPattern
                 TriplesSameSubjectPath
                  Var (s)
                  PropertyListPath
                   PathAlternative
                    PathSequence
                     PathElt
                      IRI (http://www.w3.org/2004/02/skos/core#altLabel)
                   ObjectList
                    Var (term)
                   PropertyListPath
                    PathAlternative
                     PathSequence
                      PathElt
                       IRI (http://localhost:8000/graph/syapse#inScheme)
                    ObjectList
                     IRI (http://localhost:8000/vocabulary/pubmed/publication#)
                 TriplesSameSubjectPath
                  Var (term)
                  PropertyListPath
                   PathAlternative
                    PathSequence
                     PathElt
                      IRI (http://www.bigdata.com/rdf/search#search)
                   ObjectList
                    RDFLiteral
                     String (Qld)
                 Constraint
                  Compare (EQ)
                   LowerCase
                    Var (term)
                   RDFLiteral
                    String (qld)
               GraphPatternGroup
                UnionGraphPattern
                 GraphPatternGroup
                  BasicGraphPattern
                   TriplesSameSubjectPath
                    Var (s)
                    PropertyListPath
                     PathAlternative
                      PathSequence
                       PathElt
                        IRI (http://www.w3.org/2004/02/skos/core#prefLabel)
                     ObjectList
                      Var (term)
                     PropertyListPath
                      PathAlternative
                       PathSequence
                        PathElt
                         IRI (http://localhost:8000/graph/syapse#inScheme)
                      ObjectList
                       IRI (http://localhost:8000/vocabulary/pubmed/publication#)
                   TriplesSameSubjectPath
                    Var (term)
                    PropertyListPath
                     PathAlternative
                      PathSequence
                       PathElt
                        IRI (http://www.bigdata.com/rdf/search#search)
                     ObjectList
                      RDFLiteral
                       String (Qld*)
                   Constraint
                    NotExistsFunc
                     GraphPatternGroup
                      BasicGraphPattern
                       TriplesSameSubjectPath
                        Var (s)
                        PropertyListPath
                         PathAlternative
                          PathSequence
                           PathElt
                            IRI (http://www.w3.org/2004/02/skos/core#altLabel)
                         ObjectList
                          Var (alt)
                       Constraint
                        Compare (EQ)
                         LowerCase
                          Var (alt)
                         RDFLiteral
                          String (qld)
                 GraphPatternGroup
                  GraphPatternGroup
                   SelectQuery
                    Select
                     ProjectionElem
                      Min
                       Var (alt)
                      Var (term)
                     ProjectionElem
                      Count
                      Var (c0)
                    WhereClause
                     GraphPatternGroup
                      BasicGraphPattern
                       TriplesSameSubjectPath
                        Var (s)
                        PropertyListPath
                         PathAlternative
                          PathSequence
                           PathElt
                            IRI (http://www.w3.org/2004/02/skos/core#altLabel)
                         ObjectList
                          Var (alt)
                         PropertyListPath
                          PathAlternative
                           PathSequence
                            PathElt
                             IRI (http://www.w3.org/2004/02/skos/core#prefLabel)
                          ObjectList
                           Var (pref)
                          PropertyListPath
                           PathAlternative
                            PathSequence
                             PathElt
                              IRI (http://localhost:8000/graph/syapse#inScheme)
                           ObjectList
                            IRI (http://localhost:8000/vocabulary/pubmed/publication#)
                       TriplesSameSubjectPath
                        Var (alt)
                        PropertyListPath
                         PathAlternative
                          PathSequence
                           PathElt
                            IRI (http://www.bigdata.com/rdf/search#search)
                         ObjectList
                          RDFLiteral
                           String (qLd)
                       Constraint
                        StrStarts
                         LowerCase
                          Var (alt)
                         RDFLiteral
                          String (qld)
                       Constraint
                        Compare (NE)
                         LowerCase
                          Var (alt)
                         RDFLiteral
                          String (qld)
                       Constraint
                        Not
                         RegexExpression
                          Var (pref)
                          RDFLiteral
                           String ((^|\W)Qld)
                          RDFLiteral
                           String (i)
                    GroupClause
                     GroupCondition
                      Var (s)
                  BasicGraphPattern
                   Constraint
                    Compare (GT)
                     Var (c0)
                     NumericLiteral (value=0, datatype=http://www.w3.org/2001/XMLSchema#integer)
          WhereClause
           GraphPatternGroup
            GraphPatternGroup
             SelectQuery
              Select
               ProjectionElem
                Count
                Var (S__COUNT)
              WhereClause
               GraphPatternGroup
                BasicGraphPattern
                 NamedSubqueryInclude
            BasicGraphPattern
             NamedSubqueryInclude
        Original AST
        
        PREFIX owl: <http://www.w3.org/2002/07/owl#>
        PREFIX bds: <http://www.bigdata.com/rdf/search#>
        PREFIX dc: <http://purl.org/dc/elements/1.1/>
        PREFIX sys: <http://localhost:8000/bdm/api/kbobject/sys:>
        PREFIX base: <http://localhost:8000/bdm/api/kbobject/base:>
        PREFIX sysd: <http://localhost:8000/bdm/api/appindividual/sysd:>
        PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
        PREFIX syapse: <http://localhost:8000/graph/syapse#>
        PREFIX based: <http://localhost:8000/bdm/api/appindividual/based:>
        PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
        PREFIX s: <http://localhost:8000/bdm/api/>
        PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
        PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
        PREFIX sd: <http://www.w3.org/ns/sparql-service-description#>
        PREFIX c2: <http://localhost:8000/bdm/api/kbobject/c2:>
        PREFIX c2d: <http://localhost:8000/bdm/api/appindividual/c2d:>
          defaultGraphs=DataSetSummary{ngraphs=3, nknown=3, nunknown=0, graphs=[TermId(9U)[http://localhost:8000/graph/vocabulary], TermId(25357U)[http://localhost:8000/graph/syapse], TermId(30398U)[http://localhost:8000/graph/stoogesInc/vocabulary]]}
          namedGraphs=DataSetSummary{ngraphs=3, nknown=3, nunknown=0, graphs=[TermId(9U)[http://localhost:8000/graph/vocabulary], TermId(25357U)[http://localhost:8000/graph/syapse], TermId(30398U)[http://localhost:8000/graph/stoogesInc/vocabulary]]}
        WITH {
          QueryType: SELECT
          SELECT VarNode(term)
            JoinGroupNode {
              UnionNode {
                JoinGroupNode {
                  StatementPatternNode(VarNode(s), ConstantNode(Vocab(-112)[http://www.w3.org/2004/02/skos/core#altLabel]), VarNode(term)) [scope=DEFAULT_CONTEXTS]
                  StatementPatternNode(VarNode(s), ConstantNode(TermId(6U)[http://localhost:8000/graph/syapse#inScheme]), ConstantNode(TermId(4857U)[http://localhost:8000/vocabulary/pubmed/publication#])) [scope=DEFAULT_CONTEXTS]
                  StatementPatternNode(VarNode(term), ConstantNode(TermId(0U)[http://www.bigdata.com/rdf/search#search]), ConstantNode(TermId(0L)[Qld])) [scope=DEFAULT_CONTEXTS]
                  FILTER( com.bigdata.rdf.sparql.ast.FunctionNode(FunctionNode(com.bigdata.rdf.internal.constraints.LcaseBOp(term)[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1]),ConstantNode(TermId(0L)[qld]))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2005/xpath-functions#equal-to, valueExpr=com.bigdata.rdf.internal.constraints.CompareBOp(com.bigdata.rdf.internal.constraints.LcaseBOp(term)[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1],TermId(0L)[qld])[ com.bigdata.rdf.internal.constraints.CompareBOp.op=EQ]] )
                }
                JoinGroupNode {
                  UnionNode {
                    JoinGroupNode {
                      StatementPatternNode(VarNode(s), ConstantNode(Vocab(-90)[http://www.w3.org/2004/02/skos/core#prefLabel]), VarNode(term)) [scope=DEFAULT_CONTEXTS]
                      StatementPatternNode(VarNode(s), ConstantNode(TermId(6U)[http://localhost:8000/graph/syapse#inScheme]), ConstantNode(TermId(4857U)[http://localhost:8000/vocabulary/pubmed/publication#])) [scope=DEFAULT_CONTEXTS]
                      StatementPatternNode(VarNode(term), ConstantNode(TermId(0U)[http://www.bigdata.com/rdf/search#search]), ConstantNode(TermId(0L)[Qld*])) [scope=DEFAULT_CONTEXTS]
                      FILTER( com.bigdata.rdf.sparql.ast.NotExistsNode(VarNode(-exists-1))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.bigdata.com/sparql-1.1-undefined-functionsnot-exists, graphPattern=JoinGroupNode, valueExpr=com.bigdata.rdf.internal.constraints.NotBOp(com.bigdata.rdf.internal.constraints.EBVBOp(-exists-1))] )
                    }
                    JoinGroupNode {
                      JoinGroupNode {
                        QueryType: SELECT
                        SELECT ( com.bigdata.rdf.sparql.ast.FunctionNode(VarNode(alt))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2006/sparql-functions#min, valueExpr=com.bigdata.bop.rdf.aggregate.MIN(alt)] AS VarNode(term) ) ( com.bigdata.rdf.sparql.ast.FunctionNode(VarNode(*))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2006/sparql-functions#count, valueExpr=com.bigdata.bop.rdf.aggregate.COUNT(*)] AS VarNode(c0) )
                          JoinGroupNode {
                            StatementPatternNode(VarNode(s), ConstantNode(Vocab(-112)[http://www.w3.org/2004/02/skos/core#altLabel]), VarNode(alt)) [scope=DEFAULT_CONTEXTS]
                            StatementPatternNode(VarNode(s), ConstantNode(Vocab(-90)[http://www.w3.org/2004/02/skos/core#prefLabel]), VarNode(pref)) [scope=DEFAULT_CONTEXTS]
                            StatementPatternNode(VarNode(s), ConstantNode(TermId(6U)[http://localhost:8000/graph/syapse#inScheme]), ConstantNode(TermId(4857U)[http://localhost:8000/vocabulary/pubmed/publication#])) [scope=DEFAULT_CONTEXTS]
                            StatementPatternNode(VarNode(alt), ConstantNode(TermId(0U)[http://www.bigdata.com/rdf/search#search]), ConstantNode(TermId(0L)[qLd])) [scope=DEFAULT_CONTEXTS]
                            FILTER( com.bigdata.rdf.sparql.ast.FunctionNode(FunctionNode(com.bigdata.rdf.internal.constraints.LcaseBOp(alt)[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1]),ConstantNode(TermId(0L)[qld]))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2005/xpath-functions#starts-with, valueExpr=com.bigdata.rdf.internal.constraints.StrstartsBOp(com.bigdata.rdf.internal.constraints.LcaseBOp(alt)[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1],TermId(0L)[qld])] )
                            FILTER( com.bigdata.rdf.sparql.ast.FunctionNode(FunctionNode(com.bigdata.rdf.internal.constraints.LcaseBOp(alt)[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1]),ConstantNode(TermId(0L)[qld]))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2005/xpath-functions#not-equal-to, valueExpr=com.bigdata.rdf.internal.constraints.CompareBOp(com.bigdata.rdf.internal.constraints.LcaseBOp(alt)[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1],TermId(0L)[qld])[ com.bigdata.rdf.internal.constraints.CompareBOp.op=NE]] )
                            FILTER( com.bigdata.rdf.sparql.ast.FunctionNode(FunctionNode(com.bigdata.rdf.internal.constraints.RegexBOp(pref,TermId(0L)[(^|\W)Qld],TermId(0L)[i])[ com.bigdata.rdf.internal.constraints.RegexBOp.pattern=(^|\W)Qld]))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2005/xpath-functions#not, valueExpr=com.bigdata.rdf.internal.constraints.NotBOp(com.bigdata.rdf.internal.constraints.RegexBOp(pref,TermId(0L)[(^|\W)Qld],TermId(0L)[i])[ com.bigdata.rdf.internal.constraints.RegexBOp.pattern=(^|\W)Qld])] )
                          }
                        group by VarNode(s)
                        
                      }
                      FILTER( com.bigdata.rdf.sparql.ast.FunctionNode(VarNode(c0),ConstantNode(XSDInteger(0)))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2005/xpath-functions#greater-than, valueExpr=com.bigdata.rdf.internal.constraints.CompareBOp(c0,XSDInteger(0))[ com.bigdata.rdf.internal.constraints.CompareBOp.op=GT]] )
                    }
                  }
                }
              }
            }
        } AS %__FullQuery
        QueryType: SELECT
        includeInferred=true
        SELECT * 
          JoinGroupNode {
            JoinGroupNode {
              QueryType: SELECT
              SELECT ( com.bigdata.rdf.sparql.ast.FunctionNode(VarNode(*))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2006/sparql-functions#count, valueExpr=com.bigdata.bop.rdf.aggregate.COUNT(*)] AS VarNode(S__COUNT) )
                JoinGroupNode {
                  INCLUDE %__FullQuery
                }
              
            }
            INCLUDE %__FullQuery
          }
        Optimized AST
        
        PREFIX owl: <http://www.w3.org/2002/07/owl#>
        PREFIX bds: <http://www.bigdata.com/rdf/search#>
        PREFIX dc: <http://purl.org/dc/elements/1.1/>
        PREFIX sys: <http://localhost:8000/bdm/api/kbobject/sys:>
        PREFIX base: <http://localhost:8000/bdm/api/kbobject/base:>
        PREFIX sysd: <http://localhost:8000/bdm/api/appindividual/sysd:>
        PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
        PREFIX syapse: <http://localhost:8000/graph/syapse#>
        PREFIX based: <http://localhost:8000/bdm/api/appindividual/based:>
        PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
        PREFIX s: <http://localhost:8000/bdm/api/>
        PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
        PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
        PREFIX sd: <http://www.w3.org/ns/sparql-service-description#>
        PREFIX c2: <http://localhost:8000/bdm/api/kbobject/c2:>
        PREFIX c2d: <http://localhost:8000/bdm/api/appindividual/c2d:>
          defaultGraphs=DataSetSummary{ngraphs=3, nknown=3, nunknown=0, graphs=[TermId(9U)[http://localhost:8000/graph/vocabulary], TermId(25357U)[http://localhost:8000/graph/syapse], TermId(30398U)[http://localhost:8000/graph/stoogesInc/vocabulary]]}
          namedGraphs=DataSetSummary{ngraphs=3, nknown=3, nunknown=0, graphs=[TermId(9U)[http://localhost:8000/graph/vocabulary], TermId(25357U)[http://localhost:8000/graph/syapse], TermId(30398U)[http://localhost:8000/graph/stoogesInc/vocabulary]]}
        WITH {
          QueryType: SELECT
          SELECT VarNode(term)
            JoinGroupNode {
              SERVICE <ConstantNode(TermId(0U)[http://www.bigdata.com/rdf/search#search])> {
                JoinGroupNode {
                  StatementPatternNode(VarNode(term), ConstantNode(TermId(0U)[http://www.bigdata.com/rdf/search#search]), ConstantNode(TermId(0L)[Qld])) [scope=DEFAULT_CONTEXTS]
                }
              }
            }
        } AS %-anon-service-call-0 JOIN ON () DEPENDS ON ()
        WITH {
          QueryType: SELECT
          SELECT VarNode(term)
            JoinGroupNode {
              SERVICE <ConstantNode(TermId(0U)[http://www.bigdata.com/rdf/search#search])> {
                JoinGroupNode {
                  StatementPatternNode(VarNode(term), ConstantNode(TermId(0U)[http://www.bigdata.com/rdf/search#search]), ConstantNode(TermId(0L)[Qld*])) [scope=DEFAULT_CONTEXTS]
                }
              }
            }
        } AS %-anon-service-call-1 JOIN ON () DEPENDS ON ()
        WITH {
          QueryType: SELECT
          SELECT ( com.bigdata.rdf.sparql.ast.FunctionNode(VarNode(alt))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2006/sparql-functions#min, valueExpr=com.bigdata.bop.rdf.aggregate.MIN(alt)] AS VarNode(term) ) ( com.bigdata.rdf.sparql.ast.FunctionNode(VarNode(*))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2006/sparql-functions#count, valueExpr=com.bigdata.bop.rdf.aggregate.COUNT(*)] AS VarNode(c0) )
            JoinGroupNode {
              StatementPatternNode(VarNode(alt), ConstantNode(TermId(0U)[http://www.bigdata.com/rdf/search#search]), ConstantNode(TermId(0L)[qLd])) [scope=DEFAULT_CONTEXTS] [#filters=2]
                FILTER( com.bigdata.rdf.sparql.ast.FunctionNode(FunctionNode(com.bigdata.rdf.internal.constraints.LcaseBOp(alt)[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1]),ConstantNode(TermId(0L)[qld]))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2005/xpath-functions#starts-with, valueExpr=com.bigdata.rdf.internal.constraints.StrstartsBOp(com.bigdata.rdf.internal.constraints.LcaseBOp(alt)[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1],TermId(0L)[qld])] )
                FILTER( com.bigdata.rdf.sparql.ast.FunctionNode(FunctionNode(com.bigdata.rdf.internal.constraints.LcaseBOp(alt)[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1]),ConstantNode(TermId(0L)[qld]))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2005/xpath-functions#not-equal-to, valueExpr=com.bigdata.rdf.internal.constraints.CompareBOp(com.bigdata.rdf.internal.constraints.LcaseBOp(alt)[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1],TermId(0L)[qld])[ com.bigdata.rdf.internal.constraints.CompareBOp.op=NE]] )
                com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.estimatedCardinality=0
                com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.originalIndex=POCS
              StatementPatternNode(VarNode(s), ConstantNode(Vocab(-112)[http://www.w3.org/2004/02/skos/core#altLabel]), VarNode(alt)) [scope=DEFAULT_CONTEXTS]
                com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.estimatedCardinality=4147
                com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.originalIndex=POCS
              StatementPatternNode(VarNode(s), ConstantNode(TermId(6U)[http://localhost:8000/graph/syapse#inScheme]), ConstantNode(TermId(4857U)[http://localhost:8000/vocabulary/pubmed/publication#])) [scope=DEFAULT_CONTEXTS]
                com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.estimatedCardinality=56
                com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.originalIndex=POCS
              StatementPatternNode(VarNode(s), ConstantNode(Vocab(-90)[http://www.w3.org/2004/02/skos/core#prefLabel]), VarNode(pref)) [scope=DEFAULT_CONTEXTS] [#filters=1]
                FILTER( com.bigdata.rdf.sparql.ast.FunctionNode(FunctionNode(com.bigdata.rdf.internal.constraints.RegexBOp(pref,TermId(0L)[(^|\W)Qld],TermId(0L)[i])[ com.bigdata.rdf.internal.constraints.RegexBOp.pattern=(^|\W)Qld]))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2005/xpath-functions#not, valueExpr=com.bigdata.rdf.internal.constraints.NotBOp(com.bigdata.rdf.internal.constraints.RegexBOp(pref,TermId(0L)[(^|\W)Qld],TermId(0L)[i])[ com.bigdata.rdf.internal.constraints.RegexBOp.pattern=(^|\W)Qld])] )
                com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.estimatedCardinality=8152
                com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.originalIndex=POCS
            }
          group by ( VarNode(s) AS VarNode(s) )
        } AS -subSelect-1 JOIN ON () DEPENDS ON ()
        WITH {
          QueryType: SELECT
          SELECT ( VarNode(term) AS VarNode(term) )
            UnionNode {
              JoinGroupNode [joinVars=[]] [projectInVars=[]] {
                INCLUDE %-anon-service-call-0 JOIN ON ()
                  FILTER( com.bigdata.rdf.sparql.ast.FunctionNode(FunctionNode(com.bigdata.rdf.internal.constraints.LcaseBOp(term)[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1]),ConstantNode(TermId(0L)[qld]))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2005/xpath-functions#equal-to, valueExpr=com.bigdata.rdf.internal.constraints.CompareBOp(com.bigdata.rdf.internal.constraints.LcaseBOp(term)[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1],TermId(0L)[qld])[ com.bigdata.rdf.internal.constraints.CompareBOp.op=EQ]] )
                StatementPatternNode(VarNode(s), ConstantNode(Vocab(-112)[http://www.w3.org/2004/02/skos/core#altLabel]), VarNode(term)) [scope=DEFAULT_CONTEXTS]
                  com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.estimatedCardinality=4147
                  com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.originalIndex=POCS
                StatementPatternNode(VarNode(s), ConstantNode(TermId(6U)[http://localhost:8000/graph/syapse#inScheme]), ConstantNode(TermId(4857U)[http://localhost:8000/vocabulary/pubmed/publication#])) [scope=DEFAULT_CONTEXTS]
                  com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.estimatedCardinality=56
                  com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.originalIndex=POCS
              } JOIN ON ()
              JoinGroupNode [joinVars=[]] [projectInVars=[]] {
                INCLUDE %-anon-service-call-1 JOIN ON ()
                StatementPatternNode(VarNode(s), ConstantNode(Vocab(-90)[http://www.w3.org/2004/02/skos/core#prefLabel]), VarNode(term)) [scope=DEFAULT_CONTEXTS]
                  com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.estimatedCardinality=8152
                  com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.originalIndex=POCS
                StatementPatternNode(VarNode(s), ConstantNode(TermId(6U)[http://localhost:8000/graph/syapse#inScheme]), ConstantNode(TermId(4857U)[http://localhost:8000/vocabulary/pubmed/publication#])) [scope=DEFAULT_CONTEXTS]
                  com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.estimatedCardinality=56
                  com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.originalIndex=POCS
                QueryType: ASK
                SELECT VarNode(s) VarNode(-exists-1)[anonymous]
                  JoinGroupNode {
                    StatementPatternNode(VarNode(s), ConstantNode(Vocab(-112)[http://www.w3.org/2004/02/skos/core#altLabel]), VarNode(alt)) [scope=DEFAULT_CONTEXTS] [#filters=1]
                      FILTER( com.bigdata.rdf.sparql.ast.FunctionNode(FunctionNode(com.bigdata.rdf.internal.constraints.LcaseBOp(alt)[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1]),ConstantNode(TermId(0L)[qld]))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2005/xpath-functions#equal-to, valueExpr=com.bigdata.rdf.internal.constraints.CompareBOp(com.bigdata.rdf.internal.constraints.LcaseBOp(alt)[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1],TermId(0L)[qld])[ com.bigdata.rdf.internal.constraints.CompareBOp.op=EQ]] )
                      com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.estimatedCardinality=4147
                      com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.originalIndex=POCS
                  }
                @askVar=-exists-1
                FILTER( com.bigdata.rdf.sparql.ast.NotExistsNode(VarNode(-exists-1))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.bigdata.com/sparql-1.1-undefined-functionsnot-exists, graphPattern=JoinGroupNode, valueExpr=com.bigdata.rdf.internal.constraints.NotBOp(com.bigdata.rdf.internal.constraints.EBVBOp(-exists-1))] )
              } JOIN ON ()
              JoinGroupNode [joinVars=[]] [projectInVars=[]] {
                INCLUDE -subSelect-1 JOIN ON ()
                FILTER( com.bigdata.rdf.sparql.ast.FunctionNode(VarNode(c0),ConstantNode(XSDInteger(0)))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2005/xpath-functions#greater-than, valueExpr=com.bigdata.rdf.internal.constraints.CompareBOp(c0,XSDInteger(0))[ com.bigdata.rdf.internal.constraints.CompareBOp.op=GT]] )
              } JOIN ON ()
            }
        } AS %__FullQuery JOIN ON () DEPENDS ON (%-anon-service-call-0,%-anon-service-call-1,-subSelect-1)
        WITH {
          QueryType: SELECT
          SELECT ( com.bigdata.rdf.sparql.ast.FunctionNode(VarNode(*))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2006/sparql-functions#count, valueExpr=com.bigdata.bop.rdf.aggregate.COUNT(*)] AS VarNode(S__COUNT) )
            JoinGroupNode {
              INCLUDE %__FullQuery JOIN ON ()
            }
        } AS -subSelect-2 JOIN ON () DEPENDS ON (%__FullQuery)
        QueryType: SELECT
        includeInferred=true
        SELECT VarNode(S__COUNT) VarNode(term)
          JoinGroupNode {
            INCLUDE %__FullQuery JOIN ON ()
            INCLUDE -subSelect-2 JOIN ON ()
          }
        
        
        Show
        jeremycarroll jeremycarroll added a comment - This optimized query is 'obviously' incorrect - search for qLd case sensitively. It does not get converted into a service call. SPARQL base <http://localhost:8000/> prefix owl: <http://www.w3.org/2002/07/owl#> prefix bds: <http://www.bigdata.com/rdf/search#> prefix dc: <http://purl.org/dc/elements/1.1/> prefix sys: </bdm/api/kbobject/sys:> prefix base: </bdm/api/kbobject/base:> prefix sysd: </bdm/api/appindividual/sysd:> prefix skos: <http://www.w3.org/2004/02/skos/core#> prefix syapse: </graph/syapse#> prefix based: </bdm/api/appindividual/based:> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix s: </bdm/api/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix xsd: <http://www.w3.org/2001/XMLSchema#> prefix sd: <http://www.w3.org/ns/sparql-service-description#> prefix c2: </bdm/api/kbobject/c2:> prefix c2d: </bdm/api/appindividual/c2d:> SELECT * FROM <http://localhost:8000/graph/vocabulary> FROM <http://localhost:8000/graph/syapse> FROM <http://localhost:8000/graph/stoogesInc/vocabulary> FROM NAMED <http://localhost:8000/graph/vocabulary> FROM NAMED <http://localhost:8000/graph/syapse> FROM NAMED <http://localhost:8000/graph/stoogesInc/vocabulary> WITH { SELECT ?term FROM <http://localhost:8000/graph/vocabulary> FROM <http://localhost:8000/graph/syapse> FROM <http://localhost:8000/graph/stoogesInc/vocabulary> FROM NAMED <http://localhost:8000/graph/vocabulary> FROM NAMED <http://localhost:8000/graph/syapse> FROM NAMED <http://localhost:8000/graph/stoogesInc/vocabulary> WHERE { { ?s skos:altLabel ?term ; syapse:inScheme <http://localhost:8000/vocabulary/pubmed/publication#> . ?term bds:search "Qld" . FILTER ( lcase(?term) = "qld" ) } UNION { { ?s skos:prefLabel ?term ; syapse:inScheme <http://localhost:8000/vocabulary/pubmed/publication#> . ?term bds:search "Qld*" . FILTER NOT EXISTS { ?s skos:altLabel ?alt . FILTER ( lcase(?alt) = "qld" ) } } UNION { # select one altLabel if no prefLabel matches { SELECT ( MIN(?alt) as ?term ) ( COUNT(*) AS ?c0 ) { ?s skos:altLabel ?alt ; skos:prefLabel ?pref ; syapse:inScheme <http://localhost:8000/vocabulary/pubmed/publication#> . ?alt bds:search "qLd" . FILTER ( strstarts(lcase(?alt), "qld" ) ) FILTER ( lcase(?alt) != "qld" ) FILTER ( ! ( REGEX( ?pref, "(^|\\W)Qld", "i") ) ) } GROUP BY ?s } FILTER ( ?c0 > 0 ) } } }} AS %__FullQuery WHERE { { SELECT (COUNT(*) AS $S__COUNT) WHERE { INCLUDE %__FullQuery } } INCLUDE %__FullQuery } Parse Tree QueryContainer BaseDecl (http://localhost:8000/) PrefixDecl (prefix=owl) IRI (http://www.w3.org/2002/07/owl#) PrefixDecl (prefix=bds) IRI (http://www.bigdata.com/rdf/search#) PrefixDecl (prefix=dc) IRI (http://purl.org/dc/elements/1.1/) PrefixDecl (prefix=sys) IRI (http://localhost:8000/bdm/api/kbobject/sys:) PrefixDecl (prefix=base) IRI (http://localhost:8000/bdm/api/kbobject/base:) PrefixDecl (prefix=sysd) IRI (http://localhost:8000/bdm/api/appindividual/sysd:) PrefixDecl (prefix=skos) IRI (http://www.w3.org/2004/02/skos/core#) PrefixDecl (prefix=syapse) IRI (http://localhost:8000/graph/syapse#) PrefixDecl (prefix=based) IRI (http://localhost:8000/bdm/api/appindividual/based:) PrefixDecl (prefix=rdfs) IRI (http://www.w3.org/2000/01/rdf-schema#) PrefixDecl (prefix=s) IRI (http://localhost:8000/bdm/api/) PrefixDecl (prefix=rdf) IRI (http://www.w3.org/1999/02/22-rdf-syntax-ns#) PrefixDecl (prefix=xsd) IRI (http://www.w3.org/2001/XMLSchema#) PrefixDecl (prefix=sd) IRI (http://www.w3.org/ns/sparql-service-description#) PrefixDecl (prefix=c2) IRI (http://localhost:8000/bdm/api/kbobject/c2:) PrefixDecl (prefix=c2d) IRI (http://localhost:8000/bdm/api/appindividual/c2d:) SelectQuery Select ( * ) DatasetClause (named=false, virtual=false) IRI (http://localhost:8000/graph/vocabulary) DatasetClause (named=false, virtual=false) IRI (http://localhost:8000/graph/syapse) DatasetClause (named=false, virtual=false) IRI (http://localhost:8000/graph/stoogesInc/vocabulary) DatasetClause (named=true, virtual=false) IRI (http://localhost:8000/graph/vocabulary) DatasetClause (named=true, virtual=false) IRI (http://localhost:8000/graph/syapse) DatasetClause (named=true, virtual=false) IRI (http://localhost:8000/graph/stoogesInc/vocabulary) NamedSubquery SelectQuery Select ProjectionElem Var (term) DatasetClause (named=false, virtual=false) IRI (http://localhost:8000/graph/vocabulary) DatasetClause (named=false, virtual=false) IRI (http://localhost:8000/graph/syapse) DatasetClause (named=false, virtual=false) IRI (http://localhost:8000/graph/stoogesInc/vocabulary) DatasetClause (named=true, virtual=false) IRI (http://localhost:8000/graph/vocabulary) DatasetClause (named=true, virtual=false) IRI (http://localhost:8000/graph/syapse) DatasetClause (named=true, virtual=false) IRI (http://localhost:8000/graph/stoogesInc/vocabulary) WhereClause GraphPatternGroup UnionGraphPattern GraphPatternGroup BasicGraphPattern TriplesSameSubjectPath Var (s) PropertyListPath PathAlternative PathSequence PathElt IRI (http://www.w3.org/2004/02/skos/core#altLabel) ObjectList Var (term) PropertyListPath PathAlternative PathSequence PathElt IRI (http://localhost:8000/graph/syapse#inScheme) ObjectList IRI (http://localhost:8000/vocabulary/pubmed/publication#) TriplesSameSubjectPath Var (term) PropertyListPath PathAlternative PathSequence PathElt IRI (http://www.bigdata.com/rdf/search#search) ObjectList RDFLiteral String (Qld) Constraint Compare (EQ) LowerCase Var (term) RDFLiteral String (qld) GraphPatternGroup UnionGraphPattern GraphPatternGroup BasicGraphPattern TriplesSameSubjectPath Var (s) PropertyListPath PathAlternative PathSequence PathElt IRI (http://www.w3.org/2004/02/skos/core#prefLabel) ObjectList Var (term) PropertyListPath PathAlternative PathSequence PathElt IRI (http://localhost:8000/graph/syapse#inScheme) ObjectList IRI (http://localhost:8000/vocabulary/pubmed/publication#) TriplesSameSubjectPath Var (term) PropertyListPath PathAlternative PathSequence PathElt IRI (http://www.bigdata.com/rdf/search#search) ObjectList RDFLiteral String (Qld*) Constraint NotExistsFunc GraphPatternGroup BasicGraphPattern TriplesSameSubjectPath Var (s) PropertyListPath PathAlternative PathSequence PathElt IRI (http://www.w3.org/2004/02/skos/core#altLabel) ObjectList Var (alt) Constraint Compare (EQ) LowerCase Var (alt) RDFLiteral String (qld) GraphPatternGroup GraphPatternGroup SelectQuery Select ProjectionElem Min Var (alt) Var (term) ProjectionElem Count Var (c0) WhereClause GraphPatternGroup BasicGraphPattern TriplesSameSubjectPath Var (s) PropertyListPath PathAlternative PathSequence PathElt IRI (http://www.w3.org/2004/02/skos/core#altLabel) ObjectList Var (alt) PropertyListPath PathAlternative PathSequence PathElt IRI (http://www.w3.org/2004/02/skos/core#prefLabel) ObjectList Var (pref) PropertyListPath PathAlternative PathSequence PathElt IRI (http://localhost:8000/graph/syapse#inScheme) ObjectList IRI (http://localhost:8000/vocabulary/pubmed/publication#) TriplesSameSubjectPath Var (alt) PropertyListPath PathAlternative PathSequence PathElt IRI (http://www.bigdata.com/rdf/search#search) ObjectList RDFLiteral String (qLd) Constraint StrStarts LowerCase Var (alt) RDFLiteral String (qld) Constraint Compare (NE) LowerCase Var (alt) RDFLiteral String (qld) Constraint Not RegexExpression Var (pref) RDFLiteral String ((^|\W)Qld) RDFLiteral String (i) GroupClause GroupCondition Var (s) BasicGraphPattern Constraint Compare (GT) Var (c0) NumericLiteral (value=0, datatype=http://www.w3.org/2001/XMLSchema#integer) WhereClause GraphPatternGroup GraphPatternGroup SelectQuery Select ProjectionElem Count Var (S__COUNT) WhereClause GraphPatternGroup BasicGraphPattern NamedSubqueryInclude BasicGraphPattern NamedSubqueryInclude Original AST PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX bds: <http://www.bigdata.com/rdf/search#> PREFIX dc: <http://purl.org/dc/elements/1.1/> PREFIX sys: <http://localhost:8000/bdm/api/kbobject/sys:> PREFIX base: <http://localhost:8000/bdm/api/kbobject/base:> PREFIX sysd: <http://localhost:8000/bdm/api/appindividual/sysd:> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX syapse: <http://localhost:8000/graph/syapse#> PREFIX based: <http://localhost:8000/bdm/api/appindividual/based:> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX s: <http://localhost:8000/bdm/api/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX sd: <http://www.w3.org/ns/sparql-service-description#> PREFIX c2: <http://localhost:8000/bdm/api/kbobject/c2:> PREFIX c2d: <http://localhost:8000/bdm/api/appindividual/c2d:> defaultGraphs=DataSetSummary{ngraphs=3, nknown=3, nunknown=0, graphs=[TermId(9U)[http://localhost:8000/graph/vocabulary], TermId(25357U)[http://localhost:8000/graph/syapse], TermId(30398U)[http://localhost:8000/graph/stoogesInc/vocabulary]]} namedGraphs=DataSetSummary{ngraphs=3, nknown=3, nunknown=0, graphs=[TermId(9U)[http://localhost:8000/graph/vocabulary], TermId(25357U)[http://localhost:8000/graph/syapse], TermId(30398U)[http://localhost:8000/graph/stoogesInc/vocabulary]]} WITH { QueryType: SELECT SELECT VarNode(term) JoinGroupNode { UnionNode { JoinGroupNode { StatementPatternNode(VarNode(s), ConstantNode(Vocab(-112)[http://www.w3.org/2004/02/skos/core#altLabel]), VarNode(term)) [scope=DEFAULT_CONTEXTS] StatementPatternNode(VarNode(s), ConstantNode(TermId(6U)[http://localhost:8000/graph/syapse#inScheme]), ConstantNode(TermId(4857U)[http://localhost:8000/vocabulary/pubmed/publication#])) [scope=DEFAULT_CONTEXTS] StatementPatternNode(VarNode(term), ConstantNode(TermId(0U)[http://www.bigdata.com/rdf/search#search]), ConstantNode(TermId(0L)[Qld])) [scope=DEFAULT_CONTEXTS] FILTER( com.bigdata.rdf.sparql.ast.FunctionNode(FunctionNode(com.bigdata.rdf.internal.constraints.LcaseBOp(term)[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1]),ConstantNode(TermId(0L)[qld]))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2005/xpath-functions#equal-to, valueExpr=com.bigdata.rdf.internal.constraints.CompareBOp(com.bigdata.rdf.internal.constraints.LcaseBOp(term)[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1],TermId(0L)[qld])[ com.bigdata.rdf.internal.constraints.CompareBOp.op=EQ]] ) } JoinGroupNode { UnionNode { JoinGroupNode { StatementPatternNode(VarNode(s), ConstantNode(Vocab(-90)[http://www.w3.org/2004/02/skos/core#prefLabel]), VarNode(term)) [scope=DEFAULT_CONTEXTS] StatementPatternNode(VarNode(s), ConstantNode(TermId(6U)[http://localhost:8000/graph/syapse#inScheme]), ConstantNode(TermId(4857U)[http://localhost:8000/vocabulary/pubmed/publication#])) [scope=DEFAULT_CONTEXTS] StatementPatternNode(VarNode(term), ConstantNode(TermId(0U)[http://www.bigdata.com/rdf/search#search]), ConstantNode(TermId(0L)[Qld*])) [scope=DEFAULT_CONTEXTS] FILTER( com.bigdata.rdf.sparql.ast.NotExistsNode(VarNode(-exists-1))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.bigdata.com/sparql-1.1-undefined-functionsnot-exists, graphPattern=JoinGroupNode, valueExpr=com.bigdata.rdf.internal.constraints.NotBOp(com.bigdata.rdf.internal.constraints.EBVBOp(-exists-1))] ) } JoinGroupNode { JoinGroupNode { QueryType: SELECT SELECT ( com.bigdata.rdf.sparql.ast.FunctionNode(VarNode(alt))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2006/sparql-functions#min, valueExpr=com.bigdata.bop.rdf.aggregate.MIN(alt)] AS VarNode(term) ) ( com.bigdata.rdf.sparql.ast.FunctionNode(VarNode(*))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2006/sparql-functions#count, valueExpr=com.bigdata.bop.rdf.aggregate.COUNT(*)] AS VarNode(c0) ) JoinGroupNode { StatementPatternNode(VarNode(s), ConstantNode(Vocab(-112)[http://www.w3.org/2004/02/skos/core#altLabel]), VarNode(alt)) [scope=DEFAULT_CONTEXTS] StatementPatternNode(VarNode(s), ConstantNode(Vocab(-90)[http://www.w3.org/2004/02/skos/core#prefLabel]), VarNode(pref)) [scope=DEFAULT_CONTEXTS] StatementPatternNode(VarNode(s), ConstantNode(TermId(6U)[http://localhost:8000/graph/syapse#inScheme]), ConstantNode(TermId(4857U)[http://localhost:8000/vocabulary/pubmed/publication#])) [scope=DEFAULT_CONTEXTS] StatementPatternNode(VarNode(alt), ConstantNode(TermId(0U)[http://www.bigdata.com/rdf/search#search]), ConstantNode(TermId(0L)[qLd])) [scope=DEFAULT_CONTEXTS] FILTER( com.bigdata.rdf.sparql.ast.FunctionNode(FunctionNode(com.bigdata.rdf.internal.constraints.LcaseBOp(alt)[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1]),ConstantNode(TermId(0L)[qld]))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2005/xpath-functions#starts-with, valueExpr=com.bigdata.rdf.internal.constraints.StrstartsBOp(com.bigdata.rdf.internal.constraints.LcaseBOp(alt)[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1],TermId(0L)[qld])] ) FILTER( com.bigdata.rdf.sparql.ast.FunctionNode(FunctionNode(com.bigdata.rdf.internal.constraints.LcaseBOp(alt)[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1]),ConstantNode(TermId(0L)[qld]))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2005/xpath-functions#not-equal-to, valueExpr=com.bigdata.rdf.internal.constraints.CompareBOp(com.bigdata.rdf.internal.constraints.LcaseBOp(alt)[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1],TermId(0L)[qld])[ com.bigdata.rdf.internal.constraints.CompareBOp.op=NE]] ) FILTER( com.bigdata.rdf.sparql.ast.FunctionNode(FunctionNode(com.bigdata.rdf.internal.constraints.RegexBOp(pref,TermId(0L)[(^|\W)Qld],TermId(0L)[i])[ com.bigdata.rdf.internal.constraints.RegexBOp.pattern=(^|\W)Qld]))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2005/xpath-functions#not, valueExpr=com.bigdata.rdf.internal.constraints.NotBOp(com.bigdata.rdf.internal.constraints.RegexBOp(pref,TermId(0L)[(^|\W)Qld],TermId(0L)[i])[ com.bigdata.rdf.internal.constraints.RegexBOp.pattern=(^|\W)Qld])] ) } group by VarNode(s) } FILTER( com.bigdata.rdf.sparql.ast.FunctionNode(VarNode(c0),ConstantNode(XSDInteger(0)))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2005/xpath-functions#greater-than, valueExpr=com.bigdata.rdf.internal.constraints.CompareBOp(c0,XSDInteger(0))[ com.bigdata.rdf.internal.constraints.CompareBOp.op=GT]] ) } } } } } } AS %__FullQuery QueryType: SELECT includeInferred=true SELECT * JoinGroupNode { JoinGroupNode { QueryType: SELECT SELECT ( com.bigdata.rdf.sparql.ast.FunctionNode(VarNode(*))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2006/sparql-functions#count, valueExpr=com.bigdata.bop.rdf.aggregate.COUNT(*)] AS VarNode(S__COUNT) ) JoinGroupNode { INCLUDE %__FullQuery } } INCLUDE %__FullQuery } Optimized AST PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX bds: <http://www.bigdata.com/rdf/search#> PREFIX dc: <http://purl.org/dc/elements/1.1/> PREFIX sys: <http://localhost:8000/bdm/api/kbobject/sys:> PREFIX base: <http://localhost:8000/bdm/api/kbobject/base:> PREFIX sysd: <http://localhost:8000/bdm/api/appindividual/sysd:> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX syapse: <http://localhost:8000/graph/syapse#> PREFIX based: <http://localhost:8000/bdm/api/appindividual/based:> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX s: <http://localhost:8000/bdm/api/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX sd: <http://www.w3.org/ns/sparql-service-description#> PREFIX c2: <http://localhost:8000/bdm/api/kbobject/c2:> PREFIX c2d: <http://localhost:8000/bdm/api/appindividual/c2d:> defaultGraphs=DataSetSummary{ngraphs=3, nknown=3, nunknown=0, graphs=[TermId(9U)[http://localhost:8000/graph/vocabulary], TermId(25357U)[http://localhost:8000/graph/syapse], TermId(30398U)[http://localhost:8000/graph/stoogesInc/vocabulary]]} namedGraphs=DataSetSummary{ngraphs=3, nknown=3, nunknown=0, graphs=[TermId(9U)[http://localhost:8000/graph/vocabulary], TermId(25357U)[http://localhost:8000/graph/syapse], TermId(30398U)[http://localhost:8000/graph/stoogesInc/vocabulary]]} WITH { QueryType: SELECT SELECT VarNode(term) JoinGroupNode { SERVICE <ConstantNode(TermId(0U)[http://www.bigdata.com/rdf/search#search])> { JoinGroupNode { StatementPatternNode(VarNode(term), ConstantNode(TermId(0U)[http://www.bigdata.com/rdf/search#search]), ConstantNode(TermId(0L)[Qld])) [scope=DEFAULT_CONTEXTS] } } } } AS %-anon-service-call-0 JOIN ON () DEPENDS ON () WITH { QueryType: SELECT SELECT VarNode(term) JoinGroupNode { SERVICE <ConstantNode(TermId(0U)[http://www.bigdata.com/rdf/search#search])> { JoinGroupNode { StatementPatternNode(VarNode(term), ConstantNode(TermId(0U)[http://www.bigdata.com/rdf/search#search]), ConstantNode(TermId(0L)[Qld*])) [scope=DEFAULT_CONTEXTS] } } } } AS %-anon-service-call-1 JOIN ON () DEPENDS ON () WITH { QueryType: SELECT SELECT ( com.bigdata.rdf.sparql.ast.FunctionNode(VarNode(alt))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2006/sparql-functions#min, valueExpr=com.bigdata.bop.rdf.aggregate.MIN(alt)] AS VarNode(term) ) ( com.bigdata.rdf.sparql.ast.FunctionNode(VarNode(*))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2006/sparql-functions#count, valueExpr=com.bigdata.bop.rdf.aggregate.COUNT(*)] AS VarNode(c0) ) JoinGroupNode { StatementPatternNode(VarNode(alt), ConstantNode(TermId(0U)[http://www.bigdata.com/rdf/search#search]), ConstantNode(TermId(0L)[qLd])) [scope=DEFAULT_CONTEXTS] [#filters=2] FILTER( com.bigdata.rdf.sparql.ast.FunctionNode(FunctionNode(com.bigdata.rdf.internal.constraints.LcaseBOp(alt)[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1]),ConstantNode(TermId(0L)[qld]))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2005/xpath-functions#starts-with, valueExpr=com.bigdata.rdf.internal.constraints.StrstartsBOp(com.bigdata.rdf.internal.constraints.LcaseBOp(alt)[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1],TermId(0L)[qld])] ) FILTER( com.bigdata.rdf.sparql.ast.FunctionNode(FunctionNode(com.bigdata.rdf.internal.constraints.LcaseBOp(alt)[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1]),ConstantNode(TermId(0L)[qld]))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2005/xpath-functions#not-equal-to, valueExpr=com.bigdata.rdf.internal.constraints.CompareBOp(com.bigdata.rdf.internal.constraints.LcaseBOp(alt)[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1],TermId(0L)[qld])[ com.bigdata.rdf.internal.constraints.CompareBOp.op=NE]] ) com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.estimatedCardinality=0 com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.originalIndex=POCS StatementPatternNode(VarNode(s), ConstantNode(Vocab(-112)[http://www.w3.org/2004/02/skos/core#altLabel]), VarNode(alt)) [scope=DEFAULT_CONTEXTS] com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.estimatedCardinality=4147 com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.originalIndex=POCS StatementPatternNode(VarNode(s), ConstantNode(TermId(6U)[http://localhost:8000/graph/syapse#inScheme]), ConstantNode(TermId(4857U)[http://localhost:8000/vocabulary/pubmed/publication#])) [scope=DEFAULT_CONTEXTS] com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.estimatedCardinality=56 com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.originalIndex=POCS StatementPatternNode(VarNode(s), ConstantNode(Vocab(-90)[http://www.w3.org/2004/02/skos/core#prefLabel]), VarNode(pref)) [scope=DEFAULT_CONTEXTS] [#filters=1] FILTER( com.bigdata.rdf.sparql.ast.FunctionNode(FunctionNode(com.bigdata.rdf.internal.constraints.RegexBOp(pref,TermId(0L)[(^|\W)Qld],TermId(0L)[i])[ com.bigdata.rdf.internal.constraints.RegexBOp.pattern=(^|\W)Qld]))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2005/xpath-functions#not, valueExpr=com.bigdata.rdf.internal.constraints.NotBOp(com.bigdata.rdf.internal.constraints.RegexBOp(pref,TermId(0L)[(^|\W)Qld],TermId(0L)[i])[ com.bigdata.rdf.internal.constraints.RegexBOp.pattern=(^|\W)Qld])] ) com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.estimatedCardinality=8152 com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.originalIndex=POCS } group by ( VarNode(s) AS VarNode(s) ) } AS -subSelect-1 JOIN ON () DEPENDS ON () WITH { QueryType: SELECT SELECT ( VarNode(term) AS VarNode(term) ) UnionNode { JoinGroupNode [joinVars=[]] [projectInVars=[]] { INCLUDE %-anon-service-call-0 JOIN ON () FILTER( com.bigdata.rdf.sparql.ast.FunctionNode(FunctionNode(com.bigdata.rdf.internal.constraints.LcaseBOp(term)[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1]),ConstantNode(TermId(0L)[qld]))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2005/xpath-functions#equal-to, valueExpr=com.bigdata.rdf.internal.constraints.CompareBOp(com.bigdata.rdf.internal.constraints.LcaseBOp(term)[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1],TermId(0L)[qld])[ com.bigdata.rdf.internal.constraints.CompareBOp.op=EQ]] ) StatementPatternNode(VarNode(s), ConstantNode(Vocab(-112)[http://www.w3.org/2004/02/skos/core#altLabel]), VarNode(term)) [scope=DEFAULT_CONTEXTS] com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.estimatedCardinality=4147 com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.originalIndex=POCS StatementPatternNode(VarNode(s), ConstantNode(TermId(6U)[http://localhost:8000/graph/syapse#inScheme]), ConstantNode(TermId(4857U)[http://localhost:8000/vocabulary/pubmed/publication#])) [scope=DEFAULT_CONTEXTS] com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.estimatedCardinality=56 com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.originalIndex=POCS } JOIN ON () JoinGroupNode [joinVars=[]] [projectInVars=[]] { INCLUDE %-anon-service-call-1 JOIN ON () StatementPatternNode(VarNode(s), ConstantNode(Vocab(-90)[http://www.w3.org/2004/02/skos/core#prefLabel]), VarNode(term)) [scope=DEFAULT_CONTEXTS] com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.estimatedCardinality=8152 com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.originalIndex=POCS StatementPatternNode(VarNode(s), ConstantNode(TermId(6U)[http://localhost:8000/graph/syapse#inScheme]), ConstantNode(TermId(4857U)[http://localhost:8000/vocabulary/pubmed/publication#])) [scope=DEFAULT_CONTEXTS] com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.estimatedCardinality=56 com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.originalIndex=POCS QueryType: ASK SELECT VarNode(s) VarNode(-exists-1)[anonymous] JoinGroupNode { StatementPatternNode(VarNode(s), ConstantNode(Vocab(-112)[http://www.w3.org/2004/02/skos/core#altLabel]), VarNode(alt)) [scope=DEFAULT_CONTEXTS] [#filters=1] FILTER( com.bigdata.rdf.sparql.ast.FunctionNode(FunctionNode(com.bigdata.rdf.internal.constraints.LcaseBOp(alt)[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1]),ConstantNode(TermId(0L)[qld]))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2005/xpath-functions#equal-to, valueExpr=com.bigdata.rdf.internal.constraints.CompareBOp(com.bigdata.rdf.internal.constraints.LcaseBOp(alt)[ com.bigdata.rdf.internal.constraints.IVValueExpression.namespace=.lex, com.bigdata.rdf.internal.constraints.IVValueExpression.timestamp=-1],TermId(0L)[qld])[ com.bigdata.rdf.internal.constraints.CompareBOp.op=EQ]] ) com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.estimatedCardinality=4147 com.bigdata.rdf.sparql.ast.eval.AST2BOpBase.originalIndex=POCS } @askVar=-exists-1 FILTER( com.bigdata.rdf.sparql.ast.NotExistsNode(VarNode(-exists-1))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.bigdata.com/sparql-1.1-undefined-functionsnot-exists, graphPattern=JoinGroupNode, valueExpr=com.bigdata.rdf.internal.constraints.NotBOp(com.bigdata.rdf.internal.constraints.EBVBOp(-exists-1))] ) } JOIN ON () JoinGroupNode [joinVars=[]] [projectInVars=[]] { INCLUDE -subSelect-1 JOIN ON () FILTER( com.bigdata.rdf.sparql.ast.FunctionNode(VarNode(c0),ConstantNode(XSDInteger(0)))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2005/xpath-functions#greater-than, valueExpr=com.bigdata.rdf.internal.constraints.CompareBOp(c0,XSDInteger(0))[ com.bigdata.rdf.internal.constraints.CompareBOp.op=GT]] ) } JOIN ON () } } AS %__FullQuery JOIN ON () DEPENDS ON (%-anon-service-call-0,%-anon-service-call-1,-subSelect-1) WITH { QueryType: SELECT SELECT ( com.bigdata.rdf.sparql.ast.FunctionNode(VarNode(*))[ com.bigdata.rdf.sparql.ast.FunctionNode.scalarVals=null, com.bigdata.rdf.sparql.ast.FunctionNode.functionURI=http://www.w3.org/2006/sparql-functions#count, valueExpr=com.bigdata.bop.rdf.aggregate.COUNT(*)] AS VarNode(S__COUNT) ) JoinGroupNode { INCLUDE %__FullQuery JOIN ON () } } AS -subSelect-2 JOIN ON () DEPENDS ON (%__FullQuery) QueryType: SELECT includeInferred=true SELECT VarNode(S__COUNT) VarNode(term) JoinGroupNode { INCLUDE %__FullQuery JOIN ON () INCLUDE -subSelect-2 JOIN ON () }
        Hide
        jeremycarroll jeremycarroll added a comment -

        I am reviewing the code that gave rise to this bug and I am thinking more that the current behavior is not so bad really

        Show
        jeremycarroll jeremycarroll added a comment - I am reviewing the code that gave rise to this bug and I am thinking more that the current behavior is not so bad really

          People

          • Assignee:
            jeremycarroll jeremycarroll
            Reporter:
            jeremycarroll jeremycarroll
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: