Uploaded image for project: 'Blazegraph (by SYSTAP)'
  1. Blazegraph (by SYSTAP)
  2. BLZG-868

Describe Limit/offset don't work as expected

    Details

    • Type: Bug
    • Status: Closed - Won't Fix
    • Resolution: Incomplete
    • Affects Version/s: BIGDATA_RELEASE_1_2_3
    • Fix Version/s: None
    • Component/s: Query Engine

      Description

      This Limit/offset of a DESCRIBE query applies to triples instead of resources.

      Give the following data:

      INSERT DATA {
        <http://www.b.com/.well-known/genid/09e00562-4ca8-450c-949e-875e8bd1976d> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.example.org/schema/Person> . 
        <http://www.b.com/.well-known/genid/09e00562-4ca8-450c-949e-875e8bd1976d> <http://www.example.org/schema/name> "Person #0"^^<http://www.w3.org/2001/XMLSchema#string> .  
      <http://www.b.com/.well-known/genid/6dd684ca-b491-46e9-87fe-f044f3ae8745> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.example.org/schema/Person> . 
       <http://www.b.com/.well-known/genid/6dd684ca-b491-46e9-87fe-f044f3ae8745> <http://www.example.org/schema/name> "Person BLZG-208"^^<http://www.w3.org/2001/XMLSchema#string> . 
      }
      

      the query:

      DESCRIBE ?s
      WHERE {
      ?s a <http://www.example.org/schema/Person> .
      
      }
      limit 2
      

      should describe first 2 persons, but instead returns first 2 triples.

      I think it should behave similar to:
      dbpedia:http://live.dbpedia.org/sparql
      with the following query:

      DESCRIBE ?movie 
      WHERE { 
        ?movie a dbpedia-owl:Film .
      }
      LIMIT 2
      

      Same issue is for offset.

        Activity

        Hide
        bryanthompson bryanthompson added a comment -

        The SPARQL QUERY specifies a different behavior than you are expecting. The following clearly indicates that LIMIT is defined in terms of solutions, not the triples returned by a DESCRIBE.

        http://www.w3.org/TR/sparql11-query/#modResultLimit

        The LIMIT clause puts an upper bound on the number of solutions returned. If the number of
        actual solutions, after OFFSET is applied, is greater than the limit, then at most the limit
        number of solutions will be returned.
        

        For some community messages about this see:


        - See http://lists.w3.org/Archives/Public/public-lod/2009Sep/0041.html

        Bigdata allows you to specify query hints that are intended to shape the behavior of DESCRIBE. See the QueryHints interface (http://www.bigdata.com/docs/api/com/bigdata/rdf/sparql/ast/QueryHints.html). In particular, look at:

        static String 	DESCRIBE_ITERATION_LIMIT
        For iterative DescribeModeEnums, this property places a limit on the number of iterative expansions that will be performed before the DESCRIBE query is cut off, providing that the limit on the maximum #of statements in the description is also satisfied (the cut off requires that both limits are reached).
        
        static String 	DESCRIBE_MODE
        Query hint controls the manner in which a DESCRIBE query is evaluated.
        
        static String 	DESCRIBE_STATEMENT_LIMIT
        For iterative DescribeModeEnums, this property places a limit on the number of statements that will be accumulated before the DESCRIBE query is cut off, providing that the limit on the maximum #of iterations in the description is also satisfied (the cut off requires that both limits are reached).
        

        Also see this wiki page about the use of query hints in bigdata:

        https://sourceforge.net/apps/mediawiki/bigdata/index.php?title=QueryHints

        ----

        I am going to close this ticket as invalid. Bigdata is implementing the correct behavior per the SPARQL specification as cited above.

        Show
        bryanthompson bryanthompson added a comment - The SPARQL QUERY specifies a different behavior than you are expecting. The following clearly indicates that LIMIT is defined in terms of solutions, not the triples returned by a DESCRIBE. http://www.w3.org/TR/sparql11-query/#modResultLimit The LIMIT clause puts an upper bound on the number of solutions returned. If the number of actual solutions, after OFFSET is applied, is greater than the limit, then at most the limit number of solutions will be returned. For some community messages about this see: - See http://lists.w3.org/Archives/Public/public-lod/2009Sep/0041.html Bigdata allows you to specify query hints that are intended to shape the behavior of DESCRIBE. See the QueryHints interface ( http://www.bigdata.com/docs/api/com/bigdata/rdf/sparql/ast/QueryHints.html ). In particular, look at: static String DESCRIBE_ITERATION_LIMIT For iterative DescribeModeEnums, this property places a limit on the number of iterative expansions that will be performed before the DESCRIBE query is cut off, providing that the limit on the maximum #of statements in the description is also satisfied (the cut off requires that both limits are reached). static String DESCRIBE_MODE Query hint controls the manner in which a DESCRIBE query is evaluated. static String DESCRIBE_STATEMENT_LIMIT For iterative DescribeModeEnums, this property places a limit on the number of statements that will be accumulated before the DESCRIBE query is cut off, providing that the limit on the maximum #of iterations in the description is also satisfied (the cut off requires that both limits are reached). Also see this wiki page about the use of query hints in bigdata: https://sourceforge.net/apps/mediawiki/bigdata/index.php?title=QueryHints ---- I am going to close this ticket as invalid. Bigdata is implementing the correct behavior per the SPARQL specification as cited above.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: