Philip Zeyliger has posted comments on this change. ( http://gerrit.cloudera.org:8080/8900 )
Change subject: IMPALA-3282: Adds regexp_escape built-in function ...................................................................... Patch Set 4: (1 comment) Once this makes it in, we should be sure to update the documentation to add it to our list of functions. http://gerrit.cloudera.org:8080/#/c/8900/4/be/src/exprs/string-functions-ir.cc File be/src/exprs/string-functions-ir.cc: http://gerrit.cloudera.org:8080/#/c/8900/4/be/src/exprs/string-functions-ir.cc@625 PS4, Line 625: for (char const *c = start_ptr; c < end_ptr; c++) { I think this is a re-implementation of be/src/gutil/strings/escaping.cc:BackslashEscape(). The implementations are pretty-similar, except that BackslashEscape() uses a bitmap rather than the linear search that std::find() probably does. My instinct is that at least measuring the performance of this RegexpEscape() versus one that uses a bitmap is useful. I don't know if the IR functions can use the gutil functions directly without CMake changes. I only see Substitute() used, but it's on the error paths for the most part, and may be inlined. -- To view, visit http://gerrit.cloudera.org:8080/8900 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I84c3e0ded26f6eb20794c38b75be9b25cd111e4b Gerrit-Change-Number: 8900 Gerrit-PatchSet: 4 Gerrit-Owner: Kim Jin Chul <jinc...@gmail.com> Gerrit-Reviewer: Jim Apple <jbapple-imp...@apache.org> Gerrit-Reviewer: Kim Jin Chul <jinc...@gmail.com> Gerrit-Reviewer: Philip Zeyliger <phi...@cloudera.com> Gerrit-Reviewer: Tianyi Wang <tw...@cloudera.com> Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com> Gerrit-Comment-Date: Mon, 08 Jan 2018 19:17:52 +0000 Gerrit-HasComments: Yes