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 930F2200C46 for ; Wed, 15 Mar 2017 01:56:38 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 91AAA160B89; Wed, 15 Mar 2017 00:56:38 +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 DAE27160B7E for ; Wed, 15 Mar 2017 01:56:37 +0100 (CET) Received: (qmail 72814 invoked by uid 500); 15 Mar 2017 00:56:31 -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 72803 invoked by uid 99); 15 Mar 2017 00:56:31 -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; Wed, 15 Mar 2017 00:56:31 +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 AF76EC05A9; Wed, 15 Mar 2017 00:56:30 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.999 X-Spam-Level: ** X-Spam-Status: No, score=2.999 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.001] 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 1UR55P8vvuNp; Wed, 15 Mar 2017 00:56:28 +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 8D2695FAF3; Wed, 15 Mar 2017 00:56:28 +0000 (UTC) Received: from reviews.apache.org (unknown [10.41.0.12]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id CC463E026E; Wed, 15 Mar 2017 00:56:25 +0000 (UTC) Received: from reviews-vm2.apache.org (localhost [IPv6:::1]) by reviews.apache.org (ASF Mail Server at reviews-vm2.apache.org) with ESMTP id 3E2C6C40985; Wed, 15 Mar 2017 00:56:25 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============6756241061133051519==" MIME-Version: 1.0 Subject: Re: Review Request 57620: Support the named columns join From: Ashutosh Chauhan To: Ashutosh Chauhan Cc: pengcheng xiong , hive Date: Wed, 15 Mar 2017 00:56:24 -0000 Message-ID: <20170315005624.7928.47847@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Ashutosh Chauhan X-ReviewGroup: hive X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/57620/ X-Sender: Ashutosh Chauhan References: <20170314204325.7928.92143@reviews-vm2.apache.org> In-Reply-To: <20170314204325.7928.92143@reviews-vm2.apache.org> X-ReviewBoard-Diff-For: ql/src/test/results/clientpositive/named_column_join.q.out X-ReviewBoard-Diff-For: ql/src/java/org/apache/hadoop/hive/ql/exec/NamedJoinInfo.java X-ReviewBoard-Diff-For: ql/src/test/queries/clientpositive/named_column_join.q Reply-To: Ashutosh Chauhan X-ReviewRequest-Repository: hive-git archived-at: Wed, 15 Mar 2017 00:56:38 -0000 --===============6756241061133051519== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/57620/#review168961 ----------------------------------------------------------- ql/src/java/org/apache/hadoop/hive/ql/exec/NamedJoinInfo.java Lines 19 (patched) Should be in o.a.h.h.ql.parse ql/src/java/org/apache/hadoop/hive/ql/exec/NamedJoinInfo.java Lines 24 (patched) Add comments. NamedColsInJoin encapsulates information about using clause of join. e.g., select * from a join b using(c); This class describes column c. ql/src/java/org/apache/hadoop/hive/ql/exec/NamedJoinInfo.java Lines 25 (patched) Better name: NamedColInJoin. ql/src/java/org/apache/hadoop/hive/ql/exec/NamedJoinInfo.java Lines 26 (patched) Better name: tableAliases ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java Lines 1929 (patched) Comment: We will transform using clause and make it look like an on-clause. So, lets generate a valid on-clause AST from using. ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java Lines 1949 (patched) Error message: Atleast one column is expected in using() Found: 0. ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java Lines 3432 (patched) Comment: We got using() clause in previous join. Need to generate select list as per standard. For * we will have joining columns first non-repeated followed by other columns. ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java Lines 3490 (patched) Remove this comment. Its misplaced since named columns will not be always there at this point. ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java Lines 3501 (patched) Comment: we already added this column in select list. ql/src/test/queries/clientpositive/named_column_join.q Lines 29 (patched) Test for 3-way join: select * from (select t1.b b from t t1 inner join t t2 using (b)) t3 join t t4 using(b); select * from (select t2.a a from t t1 inner join t t2 using (b)) t3 join t t4 using(a); - Ashutosh Chauhan On March 14, 2017, 8:43 p.m., pengcheng xiong wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/57620/ > ----------------------------------------------------------- > > (Updated March 14, 2017, 8:43 p.m.) > > > Review request for hive and Ashutosh Chauhan. > > > Repository: hive-git > > > Description > ------- > > HIVE-15983 > > > Diffs > ----- > > ql/src/java/org/apache/hadoop/hive/ql/exec/NamedJoinInfo.java PRE-CREATION > ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java bf0a11b > ql/src/java/org/apache/hadoop/hive/ql/parse/FromClauseParser.g 558ca7f > ql/src/java/org/apache/hadoop/hive/ql/parse/RowResolver.java e14f1cf > ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 0732207 > ql/src/test/queries/clientpositive/named_column_join.q PRE-CREATION > ql/src/test/results/clientpositive/named_column_join.q.out PRE-CREATION > > > Diff: https://reviews.apache.org/r/57620/diff/1/ > > > Testing > ------- > > > Thanks, > > pengcheng xiong > > --===============6756241061133051519==--