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

[SQL][XML] Fix issues in skipping nested structure fields not selected in schema

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0.0
    • 4.0.0
    • SQL

    Description

      Previously, the XML parser can't skip nested structure data fields effectively when they were not selected in the schema. For instance, in the below example, `df.select("struct2").collect()` returns `Seq(null)` as `struct1` wasn't effectively skipped. This PR fixes this issue.

      <ROW>
        <struct1>
          <innerStruct><field1>1</field1></innerStruct>
        </struct1>
        <struct2>
          <field2>2</field2>
        </struct2>
      </ROW>

       

      Attachments

        Issue Links

          Activity

            People

              shujing.yang Shujing Yang
              shujing.yang Shujing Yang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: