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

Physical Plan Differences when Table Scan Having Duplicate Columns

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Incomplete
    • 2.0.0
    • None
    • SQL

    Description

      Currently, we keep two implementations for planning scans over data sources. There is one difference between two implementation when deciding whether a `Project` is needed or not.

      • `SELECT b, b FROM oneToTenPruned`: *Add `ProjectExec`.*
      • `SELECT b, b FROM oneToTenPruned`: *No `ProjectExec` is added.*

      *Note.* When alias is being used, we will always add `ProjectExec` in all the scan types.

      • `SELECT b as alias_b, b FROM oneToTenPruned`: *Add `ProjectExec`.*

      Because selecting the same column twice without adding `alias` is very weird, no clue why the code needs to behave differently here.

      Attachments

        Activity

          People

            Unassigned Unassigned
            smilegator Xiao Li
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: