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

Row indexes can overshadow user-created data

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.4.0
    • None
    • SQL
    • None

    Description

      https://github.com/apache/spark/pull/37228 introduces ability to compute row indexes, which users can access through `_metadata.row_index` column. Internally this is achieved with the help of an extra column `_tmp_metadata_row_index`. When present in the schema sent to parquet reader, the reader populates it with row indexes, and the values are later placed in the `_metadata` struct.

      While relatively unlikely, it's still possible, that a user might want to include column `_tmp_metadata_row_index` in their data. In such scenario, the column will be populated with row indexes, rather than data read from the file.

      For repro, search `FileMetadataStructRowIndexSuite.scala` for this Jira ticket number.

      We could introduce some kind of countermeasure to handle this scenario.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ala.luszczak Ala Luszczak
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: