Dan Hecht has posted comments on this change.

Change subject: IMPALA-3973: add position and occurrence to instr()
......................................................................


Patch Set 15:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/4094/15/be/src/exprs/string-functions-ir.cc
File be/src/exprs/string-functions-ir.cc:

Line 294:     ss << "Invalid occurrence parameter to instr function: " << 
occurrence.val;
This is okay (especially since it's the style used in this file), but consider 
instead using Substitute() to do this kind of formatting.


Line 324:     }
Thanks, I find this much easier to reason about now.


Line 325:     if (search_start_pos < 0) return IntVal(0);
this implies another test case I don't see: when needle.len > haystack.len. I 
think the code works, but would be good to test that case (if it's not already 
tested).


-- 
To view, visit http://gerrit.cloudera.org:8080/4094
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie9648de458d243306fa14adc5e7f7002bf6f67fd
Gerrit-PatchSet: 15
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Zoltan Ivanfi <z...@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dhe...@cloudera.com>
Gerrit-Reviewer: Internal Jenkins
Gerrit-Reviewer: Lars Volker <l...@cloudera.com>
Gerrit-Reviewer: Marcel Kornacker <mar...@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <m...@cloudera.com>
Gerrit-Reviewer: Zoltan Ivanfi <z...@cloudera.com>
Gerrit-HasComments: Yes

Reply via email to