Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3DBFD10FA8 for ; Mon, 2 Feb 2015 00:54:34 +0000 (UTC) Received: (qmail 86450 invoked by uid 500); 2 Feb 2015 00:54:34 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 86376 invoked by uid 500); 2 Feb 2015 00:54:34 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 86365 invoked by uid 500); 2 Feb 2015 00:54:34 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 86362 invoked by uid 99); 2 Feb 2015 00:54:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Feb 2015 00:54:34 +0000 Date: Mon, 2 Feb 2015 00:54:34 +0000 (UTC) From: "Navis (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-9528) SemanticException: Ambiguous column reference MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-9528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14300800#comment-14300800 ] Navis commented on HIVE-9528: ----------------------------- [~ychena], before HIVE-7733, column information was overwritten by last column with same name, which possibly making invalid result. Anyway, the query you've mentioned is not working in mysql either (works in psql, though). Can we resolve this as a not-problem? > SemanticException: Ambiguous column reference > --------------------------------------------- > > Key: HIVE-9528 > URL: https://issues.apache.org/jira/browse/HIVE-9528 > Project: Hive > Issue Type: Bug > Affects Versions: 0.14.0 > Reporter: Yongzhi Chen > > When running the following query: > {code} > SELECT if( COUNT(*) = 0, 'true', 'false' ) as RESULT FROM ( select * from sim a join sim2 b on a.simstr=b.simstr) app > Error: Error while compiling statement: FAILED: SemanticException [Error 10007]: Ambiguous column reference simstr in app (state=42000,code=10007) > {code} > This query works fine in hive 0.10 > In the apache trunk, following workaround will work: > {code} > SELECT if(COUNT(*) = 0, 'true', 'false') as RESULT FROM (select a.* from sim a join sim2 b on a.simstr=b.simstr) app; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)