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 <[email protected]>
Gerrit-Reviewer: Jim Apple <[email protected]>
Gerrit-Reviewer: John Russell <[email protected]>
Gerrit-Reviewer: Michael Brown <[email protected]>
Gerrit-Reviewer: Zoltan Ivanfi <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-HasComments: Yes

Reply via email to