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

TransformExpandOneOf is not applied as expected

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Jena 2.12.0
    • Jena 2.12.1
    • ARQ

    Description

      We ran into a strange case where TransformExpandOneOf doesn't appear to get applied properly.

      Consider the following query:

      SELECT ?x
      WHERE
      {
        FILTER(true)
        {
          SELECT ?x
          WHERE
          {
            FILTER (?x NOT IN (1, 2, 3))
          }
        }
      }
      

      Which produces the following algebra:

      (project (?x)
        (project (?x)
          (filter (exprlist true (notin ?x 1 2 3))
            (table unit))))
      

      Note that the NOT IN was left in the expression form rather than being expanded to the equivalent != expressions.

      If the first FILTER line is commented out then the following algebra is produced:

      (project (?x)
        (project (?x)
          (filter (exprlist (!= ?x 1) (!= ?x 2) (!= ?x 3))
            (table unit))))
      

      So it looks like there is something going on that somehow blocks TransformExpandOneOf from working when another filter is present in the outer query. Possibly this is something related to filter placement?

      This problem occurs as far back as 2.11.1 and can be reproduced with 2.11.2, 2.12.0 and current trunk. It does not appear in 2.11.0 so must have been introduced in 2.11.1

      Attachments

        Activity

          People

            andy Andy Seaborne
            rvesse Rob Vesse
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: