Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-2863

Ambiguous table name or column reference message displays when table and column names are the same

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.9.0
    • None
    • None
    • Reviewed

    Description

      Given the following table:

      CREATE TABLE `Y` (`y` DOUBLE) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\001' STORED AS TEXTFILE;

      The following query fails:

      SELECT `Y`.`y` FROM `Y` WHERE ( `y` = 1 )
      ERROR: java.sql.SQLException: Query returned non-zero code: 10, cause: FAILED: Error in
      semantic analysis: Line 1:36 Ambiguous table alias or column reference '`y`'
      ERROR: Unable to execute Hadoop query.
      ERROR: Prepare error. SQL statement: SELECT `Y`.`y` FROM `Y` WHERE ( `y` = 1 ).

      The problem goes away if the table and column names do not match.

      Attachments

        Issue Links

          Activity

            People

              navis Navis Ryu
              mcazzari Mauro Cazzari
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: