Uploaded image for project: 'Blazegraph (by SYSTAP)'
  1. Blazegraph (by SYSTAP)
  2. BLZG-1141 Strategies for VALUES+BIND queries
  3. BLZG-1256

Service call with values clauses create a cross product

    XMLWordPrintable

    Details

      Description

      Insert one triple into a blaze instance with the text index enabled:

      <:s> <:p> "foo" .
      

      Then run the following query:

      select ?o ?d
      where {
          service bds:search {
              ?o bds:search "foo" .
          }
          values (?d) {
              (<:a>)
              (<:b>)
              (<:c>)
          }
      }
      

      Results in:

      Selection [
      Bindings [o=foo,d=:a],
      Bindings [o=foo,d=:a],
      Bindings [o=foo,d=:a],
      Bindings [o=foo,d=:b],
      Bindings [o=foo,d=:b],
      Bindings [o=foo,d=:b],
      Bindings [o=foo,d=:c],
      Bindings [o=foo,d=:c],
      Bindings [o=foo,d=:c]
      ]
      

      For some reason, two values gives you four results, three values gives you nine results, etc. We are getting a cross product.

        Attachments

          Activity

            People

            Assignee:
            michaelschmidt michaelschmidt
            Reporter:
            mikepersonick mikepersonick
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: