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 AD8D8200C78 for ; Thu, 18 May 2017 23:28:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id ABEA7160BB5; Thu, 18 May 2017 21:28:06 +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 F1A10160B9D for ; Thu, 18 May 2017 23:28:05 +0200 (CEST) Received: (qmail 31091 invoked by uid 500); 18 May 2017 21:28:04 -0000 Mailing-List: contact reviews-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@impala.incubator.apache.org Received: (qmail 31080 invoked by uid 99); 18 May 2017 21:28:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 May 2017 21:28:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 51D731A0734 for ; Thu, 18 May 2017 21:28:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-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 (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id FxsdvZEF9o69 for ; Thu, 18 May 2017 21:28:02 +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 3C2285FB98 for ; Thu, 18 May 2017 21:28:02 +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 v4ILS1el020488; Thu, 18 May 2017 21:28:01 GMT Message-Id: <201705182128.v4ILS1el020488@ip-10-146-233-104.ec2.internal> Date: Thu, 18 May 2017 21:28:01 +0000 From: "John Russell (Code Review)" To: impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Jim Apple , zi+zicl@cloudera.com, Michael Brown , Zoltan Ivanfi Reply-To: jrussell@cloudera.com X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-3973=3A_optional_3rd_and_4th_arguments_for_instr=28=29=2E=0A?= X-Gerrit-Change-Id: I17268bdb480230938f94559fe1eabe34ac2448b7 X-Gerrit-ChangeURL: X-Gerrit-Commit: 7b8aa4f82dfc674256d7b393dee00490462b601d 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.7 archived-at: Thu, 18 May 2017 21:28:06 -0000 John Russell has posted comments on this change. Change subject: IMPALA-3973: optional 3rd and 4th arguments for instr(). ...................................................................... Patch Set 2: (2 comments) Added one example that had gotten lost from previous patch set. Clarified one other example that used 2 negative arguments; wasn't clear which negative arg was causing the behavior shown in the example. http://gerrit.cloudera.org:8080/#/c/5589/2/docs/topics/impala_string_functions.xml File docs/topics/impala_string_functions.xml: PS2, Line 335: 1 > What line? I don't see it. From patch set 5 (note "or zero" text and first example with final param 0): The fourth argument cannot be negative or zero. A non-positive value for this argument causes an error: select instr('foo bar bletch', 'b', 1, 0); ERROR: UDF ERROR: Invalid occurrence parameter to instr function: 0 select instr('aaaaaaaaa','aa',-1,-1); ERROR: UDF ERROR: Invalid occurrence parameter to instr function: -1 I was mistaken in original reply thinking that the 0 would be accepted and give a 0 return value. I will change the -1,-1 final 2 args of the second example above to 1,-1 to make it clear which negative arg is causing the error. Line 406: select instr('hello world','o',-1); > What line is the negative position argument and an occurence argument on? 4 Line 413 of patch set 6. I included it in the examples for the occurrence argument because otherwise the meaning of that final argument hadn't been explained. -- To view, visit http://gerrit.cloudera.org:8080/5589 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I17268bdb480230938f94559fe1eabe34ac2448b7 Gerrit-PatchSet: 2 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: John Russell Gerrit-Reviewer: Jim Apple Gerrit-Reviewer: John Russell Gerrit-Reviewer: Michael Brown Gerrit-Reviewer: Zoltan Ivanfi Gerrit-Reviewer: zi+zicl@cloudera.com Gerrit-HasComments: Yes