Jim Apple has posted comments on this change. Change subject: IMPALA-889: Add support for ISO-SQL trim() ......................................................................
Patch Set 3: (5 comments) http://gerrit.cloudera.org:8080/#/c/3213/2/be/src/exprs/string-functions-ir.cc File be/src/exprs/string-functions-ir.cc: Line 785: MACRO_TRIM_CHECK > Greetings, Jim. That's about what happens if it is no tspecified, not if it is "some garbage string". http://gerrit.cloudera.org:8080/#/c/3213/3/be/src/exprs/string-functions-ir.cc File be/src/exprs/string-functions-ir.cc: Line 732: ctx->GetFunctionState(FunctionContext::THREAD_LOCAL)); Please use functions, not macros Line 790: enum class TRIM_OPTION Does the rest of our code use ALL_CAPS for enum types? Line 798: if (memcmp(reinterpret_cast<const char*>(option.ptr), "left", 4) == 0) { This does the wrong thing if option.ptr is "leftZZZ" http://gerrit.cloudera.org:8080/#/c/3213/3/be/src/exprs/string-functions.h File be/src/exprs/string-functions.h: Line 103: /// Similar to BTrimString with extra direction 'option', which has three choices: You must document what happens if it is NULL or otherwise incorrect. -- To view, visit http://gerrit.cloudera.org:8080/3213 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4753c608b0b00569bf8c5e95b132df6df358e602 Gerrit-PatchSet: 3 Gerrit-Project: Impala Gerrit-Branch: cdh5-trunk Gerrit-Owner: Youwei Wang <[email protected]> Gerrit-Reviewer: Jim Apple <[email protected]> Gerrit-Reviewer: Youwei Wang <[email protected]> Gerrit-HasComments: Yes
