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

Ambiguous reference with duplicate column names in aggregate

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 1.6.2
    • None
    • SQL
    • None

    Description

      Assuming we have a table 't' with 3 columns 'id', 'name' and 'rank', and here's the sql to re-produce issue:

      select id, count(*) from t t1 join t t2 on t1.name = t2.name group by t1.id
      

      The error message is:

      Reference 'id' is ambiguous, could be: id#3, id#9.; line 1 pos 7
      

      The sql can be parsed in Hive, since the select 'id' reference can be resolved to 't1.id', which presented in group expressions.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sunyerui Yerui Sun
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: