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

one-argument substr produces NPE when combined with GROUP By

    XMLWordPrintable

    Details

      Description

      The following query:

      SELECT (substr(str(?url), 3) as ?n2) WHERE {
        ?x wdt:P31 wd:Q5 .
        ?url schema:about ?x .
      } GROUP BY ?url
      LIMIT 10
      

      produces NPE when run. Adding second argument removes the NPE, so does removing GROUP BY. More complex query exhibiting same behavior:

      SELECT (concat("[[wikipedia:", substr(str(?link),31),  " | ", ?headLabel, "]]") as ?title) 
      WHERE {
        ?id wdt:P31 wd:Q35657 .
        ?id wdt:P6 ?head .
        ?head wdt:P102 ?party .
        SERVICE wikibase:label {
          bd:serviceParam wikibase:language "en" .
          ?head rdfs:label ?headLabel .
        }
        ?link schema:about ?head .
        ?link schema:isPartOf <https://en.wikipedia.org/> .
      } GROUP BY ?id ?head ?headLabel ?link 
      

      Again, using substr(..., 31, 1000) works.

        Attachments

          Activity

            People

            Assignee:
            michaelschmidt michaelschmidt
            Reporter:
            stasmalyshev stasmalyshev
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: