[ https://issues.apache.org/jira/browse/HIVE-2842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13224226#comment-13224226 ]
ransom.hezhiqiang commented on HIVE-2842: ----------------------------------------- SELECT a.t FROM t a; add alias to table will be success. table t alias is also t,so we must rename it or disable it when validate. > Table with column that shares name fails upon query > --------------------------------------------------- > > Key: HIVE-2842 > URL: https://issues.apache.org/jira/browse/HIVE-2842 > Project: Hive > Issue Type: Bug > Reporter: Kevin Wilfong > > CREATE TABLE t (t STRING); > SELECT t FROM t; > This will result in > FAILED: Error in semantic analysis: Line 1:7 Ambiguous table alias or column > reference 't' > Similarly > SELECT t2 FROM t t2; > will result in the same exception > SELECT t from t t2; > will succeed. > MySQL apparently supports this, so Hive should as well. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira