Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-52

GROUP_CONCAT DISTINCT on unbound variable causes NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Done
    • None
    • Jena 2.11.0
    • ARQ
    • Java

    Description

      Data:

      @prefix ex: <http://example.com/ns#> .
      ex:a ex:p1 "1" .
      ex:b ex:p1 "2" ; ex:p2 "3" .
      

      Query:

      prefix ex: <http://example.com/ns#>
      select ?s (group_concat(distinct ?p2) as ?concat) 
      { ?s ex:p1 ?p1 optional { ?s ex:p2 ?p2 } }
      group by ?s
      

      Result:

      java.lang.NullPointerException
      	at com.hp.hpl.jena.sparql.expr.aggregate.AggGroupConcatDistinct$AccGroupConcatDistinct.getValue(AggGroupConcatDistinct.java:124)
      	at com.hp.hpl.jena.sparql.expr.aggregate.AggregatorBase.getValue(AggregatorBase.java:62)
      	at com.hp.hpl.jena.sparql.engine.iterator.QueryIterGroup$1.initializeIterator(QueryIterGroup.java:147)
      	at org.openjena.atlas.iterator.IteratorDelayedInitialization.init(IteratorDelayedInitialization.java:25)
      

      Attachments

        Activity

          People

            andy Andy Seaborne
            shellac Damian Steer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: