Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-49275

Fix return type nullness of the xpath expression

    XMLWordPrintableJSON

Details

    Description

      The `xpath` expression incorrectly marks its return type as array of non-null strings. However, it can actually return an array containing nulls. This can cause NPE in code generation, such as query `select coalesce(xpath(repeat('<a></a>', id), 'a')[0], '') from range(1, 2)`.

      Attachments

        Activity

          People

            mashplant Chenhao Li
            mashplant Chenhao Li
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: