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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: