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 53068200BA6 for ; Tue, 18 Oct 2016 08:51:25 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 51BDB160ADC; Tue, 18 Oct 2016 06:51:25 +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 9B509160ACC for ; Tue, 18 Oct 2016 08:51:24 +0200 (CEST) Received: (qmail 95709 invoked by uid 500); 18 Oct 2016 06:51:23 -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 95687 invoked by uid 99); 18 Oct 2016 06:51:23 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Oct 2016 06:51:23 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 867382C5B82; Tue, 18 Oct 2016 06:51:21 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============4919554426902340305==" MIME-Version: 1.0 Subject: Re: Review Request 52427: HIVE-14580 - Introduce || operator From: pengcheng xiong To: pengcheng xiong , Ashutosh Chauhan Cc: hive , Zoltan Haindrich Date: Tue, 18 Oct 2016 06:51:21 -0000 Message-ID: <20161018065121.5284.54723@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: pengcheng xiong X-ReviewGroup: hive X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/52427/ X-Sender: pengcheng xiong References: <20161013192540.19442.57238@reviews.apache.org> In-Reply-To: <20161013192540.19442.57238@reviews.apache.org> X-ReviewBoard-Diff-For: ql/src/test/queries/clientpositive/concat_op.q X-ReviewBoard-Diff-For: ql/src/test/results/clientpositive/concat_op.q.out Reply-To: pengcheng xiong X-ReviewRequest-Repository: hive-git archived-at: Tue, 18 Oct 2016 06:51:25 -0000 --===============4919554426902340305== 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/52427/#review153040 ----------------------------------------------------------- ql/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g (line 445) change this to {code} precedenceConcatenateExpression : (precedencePlusExpression -> precedencePlusExpression) ( precedenceConcatenateOperator plus=precedencePlusExpression -> ^(TOK_FUNCTION {adaptor.create(Identifier, "concat")} {$precedenceConcatenateExpression.tree} $plus) )* -> {$precedenceConcatenateExpression.tree} ; {code} So that we can finish the rewriting in the parser. ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java (line 10685) remove all the changes in SemanticAnalyzer. ql/src/test/queries/clientpositive/concat_op.q (line 3) Please confirm that Postgres and/Oracle returns the same result. - pengcheng xiong On Oct. 13, 2016, 7:25 p.m., Zoltan Haindrich wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/52427/ > ----------------------------------------------------------- > > (Updated Oct. 13, 2016, 7:25 p.m.) > > > Review request for hive, Ashutosh Chauhan and pengcheng xiong. > > > Bugs: HIVE-14580 > https://issues.apache.org/jira/browse/HIVE-14580 > > > Repository: hive-git > > > Description > ------- > > adds support for || text concatenation > > * reuses the concat udf for doing the real work > * same precedence as + / - ; I think this is expected > * small ast rewrite code in SemanticAnalyzer > * details about other db || operators: https://issues.apache.org/jira/browse/HIVE-14580?focusedCommentId=15546578&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15546578 > > > Diffs > ----- > > ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g 025ea10cda5b126f46226809884088caadc0a3d0 > ql/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g 13f68796e4fe262098eaf6c5f09bc7f963d0f8cf > ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 747f3876b76de195fea78d87bfd98bd0ec2b87a0 > ql/src/test/queries/clientpositive/concat_op.q PRE-CREATION > ql/src/test/results/clientpositive/concat_op.q.out PRE-CREATION > > Diff: https://reviews.apache.org/r/52427/diff/ > > > Testing > ------- > > added qtest > > > Thanks, > > Zoltan Haindrich > > --===============4919554426902340305==--