Return-Path: X-Original-To: apmail-hive-issues-archive@minotaur.apache.org Delivered-To: apmail-hive-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7D6FD18781 for ; Thu, 7 Jan 2016 15:57:42 +0000 (UTC) Received: (qmail 64220 invoked by uid 500); 7 Jan 2016 15:57:40 -0000 Delivered-To: apmail-hive-issues-archive@hive.apache.org Received: (qmail 64112 invoked by uid 500); 7 Jan 2016 15:57:40 -0000 Mailing-List: contact issues-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 issues@hive.apache.org Received: (qmail 63902 invoked by uid 99); 7 Jan 2016 15:57:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jan 2016 15:57:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id EFA652C1F60 for ; Thu, 7 Jan 2016 15:57:39 +0000 (UTC) Date: Thu, 7 Jan 2016 15:57:39 +0000 (UTC) From: "Yongzhi Chen (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-12784) Group by SemanticException: Invalid 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-12784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15087614#comment-15087614 ] Yongzhi Chen commented on HIVE-12784: ------------------------------------- [~xuefuz], could you review the code? Thanks > Group by SemanticException: Invalid column reference > ---------------------------------------------------- > > Key: HIVE-12784 > URL: https://issues.apache.org/jira/browse/HIVE-12784 > Project: Hive > Issue Type: Bug > Affects Versions: 2.0.0 > Reporter: Yongzhi Chen > Assignee: Yongzhi Chen > Attachments: HIVE-12784.1.patch, HIVE-12784.2.patch > > > Some queries work fine in older versions throws SemanticException, the stack trace: > {noformat} > FAILED: SemanticException [Error 10002]: Line 96:1 Invalid column reference 'key2' > 15/12/21 18:56:44 [main]: ERROR ql.Driver: FAILED: SemanticException [Error 10002]: Line 96:1 Invalid column reference 'key2' > org.apache.hadoop.hive.ql.parse.SemanticException: Line 96:1 Invalid column reference 'key2' > at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genGroupByPlanGroupByOperator1(SemanticAnalyzer.java:4228) > at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genGroupByPlanMapAggrNoSkew(SemanticAnalyzer.java:5670) > at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genBodyPlan(SemanticAnalyzer.java:9007) > at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:9884) > at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:9777) > at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genOPTree(SemanticAnalyzer.java:10250) > at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:10261) > at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:10141) > at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:222) > at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:421) > at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:305) > at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1110) > at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1158) > at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1047) > at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1037) > at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:207) > at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:159) > at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:370) > at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:305) > at org.apache.hadoop.hive.cli.CliDriver.processReader(CliDriver.java:403) > at org.apache.hadoop.hive.cli.CliDriver.processFile(CliDriver.java:419) > at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:708) > at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:675) > at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:615) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at org.apache.hadoop.util.RunJar.run(RunJar.java:221) > at org.apache.hadoop.util.RunJar.main(RunJar.java:136) > {noformat} > Reproduce: > {noformat} > create table tlb (key int, key1 int, key2 int); > create table src (key int, value string); > select key, key1, key2 from (select a.key, 0 as key1 , 0 as key2 from tlb a inner join src b on a.key = b.key) a group by key, key1, key2; > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)