Zach Amsden has posted comments on this change. Change subject: IMPALA-4729: Implement REPLACE() ......................................................................
Patch Set 5: (3 comments) http://gerrit.cloudera.org:8080/#/c/5776/5/be/src/exprs/string-functions-ir.cc File be/src/exprs/string-functions-ir.cc: PS5, Line 232: if (UNLIKELY(out_max > 1ULL << 18)) { > Did you measure the performance gain for that ? Any hardcoded bound still l This is why I was asking earlier about what is considered a small / large memory size in Impala. How about we just start with the next power of two above something that can fit one replacement? PS5, Line 236: haystack.len + replace.len - pattern.len > Wouldn't this be negative if haystack.len == (1 << 31) - 4 and replace.len max string size is 1 << 30 PS5, Line 240: buffer_space = out_max; > an excellent idea But makes the test sssslllloooowwww -- To view, visit http://gerrit.cloudera.org:8080/5776 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1780a7d8fee6d0db9dad148217fb6eb10f773329 Gerrit-PatchSet: 5 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Zach Amsden <zams...@cloudera.com> Gerrit-Reviewer: Alex Behm <alex.b...@cloudera.com> Gerrit-Reviewer: Dan Hecht <dhe...@cloudera.com> Gerrit-Reviewer: Michael Ho <k...@cloudera.com> Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com> Gerrit-Reviewer: Zach Amsden <zams...@cloudera.com> Gerrit-HasComments: Yes