Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7E725200C2D for ; Fri, 17 Feb 2017 12:10:45 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 7D2B4160B3F; Fri, 17 Feb 2017 11:10:45 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C57D4160B55 for ; Fri, 17 Feb 2017 12:10:44 +0100 (CET) Received: (qmail 17256 invoked by uid 500); 17 Feb 2017 11:10:44 -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 17191 invoked by uid 99); 17 Feb 2017 11:10:43 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Feb 2017 11:10:43 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 92BE3C002D for ; Fri, 17 Feb 2017 11:10:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id yNGGxFJsxLio for ; Fri, 17 Feb 2017 11:10:42 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id A15DD5F3BC for ; Fri, 17 Feb 2017 11:10:42 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 35DC3E0416 for ; Fri, 17 Feb 2017 11:10:42 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id E052A2411D for ; Fri, 17 Feb 2017 11:10:41 +0000 (UTC) Date: Fri, 17 Feb 2017 11:10:41 +0000 (UTC) From: "Walter Wu (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-15874) Invalid position alias in Group By when CBO failed MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 17 Feb 2017 11:10:45 -0000 [ https://issues.apache.org/jira/browse/HIVE-15874?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Walter Wu updated HIVE-15874: ----------------------------- Affects Version/s: 1.2.1 > Invalid position alias in Group By when CBO failed=20 > --------------------------------------------------- > > Key: HIVE-15874 > URL: https://issues.apache.org/jira/browse/HIVE-15874 > Project: Hive > Issue Type: Bug > Components: CBO > Affects Versions: 1.2.1, 2.1.1 > Reporter: Walter Wu > > for example=EF=BC=9A > create table alias_test_01(a INT, b STRING) ; > create table alias_test_02(a INT, b STRING) ; > create table alias_test_03(a INT, b STRING) ; > set hive.groupby.position.alias =3D true; > set hive.cbo.enable=3Dtrue; > explain=20 > select * from=20 > alias_test_01 alias01=20 > left join=20 > ( > select 2017 as a, b from alias_test_02 group by 1, 2 > ) alias02=20 > on alias01.a =3D alias02.a=20 > left join=20 > alias_test_03 alias03 > on alias01.a =3D alias03.a; > error info: > FAILED: SemanticException [Error 10220]: Invalid position alias in Group = By > Position alias: 2017 does not exist > The Select List is indexed from 1 to 2 > the first process Position Alias result: > when CBO optimize failed and reAnalyzeAST is true, position alias will be= processed twice. > 1. 'group by 1, 2' convert to 'group by 2017, b' > 2. 'group by 2017, b' 2017 column does not exist -- This message was sent by Atlassian JIRA (v6.3.15#6346)