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 B5C0A200B2A for ; Sat, 25 Jun 2016 16:09:13 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B4559160A66; Sat, 25 Jun 2016 14:09:13 +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 08843160A49 for ; Sat, 25 Jun 2016 16:09:12 +0200 (CEST) Received: (qmail 45539 invoked by uid 500); 25 Jun 2016 14:09:12 -0000 Mailing-List: contact dev-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@impala.incubator.apache.org Delivered-To: mailing list dev@impala.incubator.apache.org Received: (qmail 45528 invoked by uid 99); 25 Jun 2016 14:09:11 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Jun 2016 14:09:11 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 4BF5F180662 for ; Sat, 25 Jun 2016 14:09:11 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.362 X-Spam-Level: X-Spam-Status: No, score=0.362 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id SO4Mj9TVuUwc for ; Sat, 25 Jun 2016 14:09:07 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 8C53A5F4E3 for ; Sat, 25 Jun 2016 14:09:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id u5PE96mh014885; Sat, 25 Jun 2016 14:09:06 GMT Message-Id: <201606251409.u5PE96mh014885@ip-10-146-233-104.ec2.internal> Date: Sat, 25 Jun 2016 14:08:58 +0000 From: "Youwei Wang (Code Review)" To: Youwei Wang , impala-cr@cloudera.com, dev@impala.incubator.apache.org CC: Jim Apple Reply-To: youwei.a.wang@intel.com X-Gerrit-MessageType: newpatchset Subject: =?UTF-8?Q?=5BImpala-CR=5D=28cdh5-trunk=29_IMPALA-889=3A_Add_support_for_ISO-SQL_trim=28=29=0A?= X-Gerrit-Change-Id: I4753c608b0b00569bf8c5e95b132df6df358e602 X-Gerrit-ChangeURL: X-Gerrit-Commit: e65029ac64caa5e5f2d8af11567a39707c3cb192 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.12.2 archived-at: Sat, 25 Jun 2016 14:09:13 -0000 Youwei Wang has uploaded a new patch set (#7). Change subject: IMPALA-889: Add support for ISO-SQL trim() ...................................................................... IMPALA-889: Add support for ISO-SQL trim() Add support for an ISO-SQL compliant trim() function. Syntax: select trim(source_string, chars_to_trim, option); source_string: the source string to trim; chars_to_trim: the characters to trim, which is represented as a string; option: enumerate values, available choices are: left/right/both: left means trimming characters from the start of the source string; right means trimming characters from the end of the source string; both means trimming characters from both ends of the source string; Note: option is case-insensitive, which means 'left' equals 'LeFt'. Example: select btrim('abc%%defg%%%%%', 'a%', 'left'); returns 'bc%%defg%%%%%'; select btrim('abc%%defg%%%%%', 'fg%', 'right'); returns 'abc%%de'; select btrim('abc%%defg%%%%%', 'ab%', 'leading'); returns 'c%%defg%%%%%'; select btrim('abc%%defg%%%%%', 'bfg%', 'trailing'); returns 'abc%%de'; select btrim('abc%%defg%%%%%', 'abfg%', 'both'); returns 'c%%de'; Change-Id: I4753c608b0b00569bf8c5e95b132df6df358e602 --- M be/src/exprs/expr-test.cc M be/src/exprs/string-functions-ir.cc M be/src/exprs/string-functions.h M common/function-registry/impala_functions.py 4 files changed, 138 insertions(+), 9 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/13/3213/7 -- To view, visit http://gerrit.cloudera.org:8080/3213 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4753c608b0b00569bf8c5e95b132df6df358e602 Gerrit-PatchSet: 7 Gerrit-Project: Impala Gerrit-Branch: cdh5-trunk Gerrit-Owner: Youwei Wang Gerrit-Reviewer: Jim Apple Gerrit-Reviewer: Youwei Wang