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

Selecting one complex field and having is null predicate on another complex field can cause error

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.0, 3.0.0
    • Fix Version/s: 2.4.1, 3.0.0
    • Component/s: SQL
    • Labels:
      None

      Description

      The query below can cause error when doing schema pruning:

      val query = sql("select * from contacts")
        .where("name.middle is not null")
        .select(
          "id",
          "name.first",
          "name.middle",
          "name.last"
        )
        .where("last = 'Jones'")
        .select(count("id")
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                viirya Liang-Chi Hsieh
                Reporter:
                viirya Liang-Chi Hsieh
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: