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

ConcurrentModificationException when using aggregates in projection

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: BLAZEGRAPH_2_1_4
    • Fix Version/s: None
    • Component/s: Wikidata Query Service
    • Labels:
      None

      Description

      This query:

      SELECT (COUNT(*) AS ?total) (COUNT(?status) AS ?mandatory) (?mandatory/?total AS ?ratio) WHERE {
        ?property p:P2302 ?statement.
        OPTIONAL { ?statement pq:P2316 ?status. }
      }
      

      produces ConcurrentModificationException. Even shorted example is:

      SELECT (COUNT(*) AS ?a) (COUNT(?x) AS ?b) (?b/?a AS ?r) {}
      

      The key seems to be using result of an aggregate into an expression in the same projection. This however works:

      SELECT ?total ?mandatory (?mandatory/?total AS ?ratio) WHERE {
      {
      SELECT (COUNT(*) AS ?total) (COUNT(?status) AS ?mandatory)  WHERE {
        ?property p:P2302 ?statement.
        OPTIONAL { ?statement pq:P2316 ?status. }
      }
      }
      }
      

        Attachments

          Activity

            People

            Assignee:
            beebs Brad Bebee
            Reporter:
            stasmalyshev stasmalyshev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: