Uploaded image for project: 'Apache AsterixDB'
  1. Apache AsterixDB
  2. ASTERIXDB-2452

ListifyUnnestingFunctionRule didn't recompute type environment properly after firing

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      The following query trigger a NPE during query optimization

      set import-private-functions 'true'
      
      let $nullstring := [null, null, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
      
      let $prefix1 := subset-collection($nullstring, 0, prefix-len-jaccard(len($nullstring), 0.1f))
      let $prefix4 := subset-collection($nullstring, 0, prefix-len-jaccard(len($nullstring), 0.4f))
      
      let $joinpair :=
        for $s in $prefix4
        for $r in $prefix1
        where $s = $r
        return $s
      
      return [$joinpair]
      

      The problem is that after ListifyUnnestingFunctionRule is fired, the parent operator's type environment is not recomputed, and thus it still points to the old operator.

        Attachments

          Activity

            People

            • Assignee:
              luochen01 Chen Luo
              Reporter:
              luochen01 Chen Luo
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: