John Russell has posted comments on this change. Change subject: IMPALA-3973: optional 3rd and 4th arguments for instr(). ......................................................................
Patch Set 2: (12 comments) 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 > Same as the "off the end of the string" possibility below. The 'occurrence' Done PS2, Line 335: 1 > Can the occurrence argument be 0? Done PS2, Line 335: 1 > Can you add a note to say that in this doc? Done PS2, Line 349: 7 > What if occurrence is off the end of the string? Done PS2, Line 349: 7 > That one's covered by Done PS2, Line 395: negative position argument > That particular circumstance causes an error instead of a zero return value Done PS2, Line 395: negative position argument > Can the occurrence argument be zero or negative? Done PS2, Line 395: negative position argument > That's intentional. In fact, initially I returned 0 in this case as well, b OK. The "UDF error" string in the error message gave me a different impression than when I see other errors from built-in functions. Usually the messages downplay the fact that built-in functions are just UDFs behind the scenes. PS2, Line 395: negative position argument > Can the behavior be explicitly called out in this patch's contents? Done Line 406: select instr('hello world','o',-1); > I do not see a patch set 3 here yet. Are you planning on sending that in a Done Line 406: select instr('hello world','o',-1); > Sure. In general, we try to be more detailed than Hive when it comes to pro Done Line 406: select instr('hello world','o',-1); > Can you show an example with a negative position argument and an occurrence Done -- 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: Zoltan Ivanfi <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-HasComments: Yes
