Zihao Ye has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21038 )

Change subject: IMPALA-12426: Adds the Impala built-in functions 
prettyprint_duration and prettyprint_memory.
......................................................................


Patch Set 4:

(2 comments)

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

http://gerrit.cloudera.org:8080/#/c/21038/4/be/src/exprs/string-functions-ir.cc@1894
PS4, Line 1894: bool is_null, const T& val
nit: 'is_null' does not seem necessary to pass as a separate parameter. We can 
pass it within the specific wrapper type, as follows:
prettyPrint(FunctionContext* context, const T& any_val, const TUnit::type& 
unit) {
if (any_val.is_null) { … }


http://gerrit.cloudera.org:8080/#/c/21038/4/be/src/exprs/string-functions-ir.cc@1902
PS4, Line 1902: StringVal result(context, fmt_str.size());
              :   if (UNLIKELY(result.is_null)) return StringVal::null();
              :   uint8_t* ptr = result.ptr;
              :   memcpy(ptr, fmt_str.c_str(), fmt_str.size());
nit: It seems that these lines of code can be replaced with 
StringVal::CopyFrom().



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3e76632ce21ad2ca5df474160338699a542a6913
Gerrit-Change-Number: 21038
Gerrit-PatchSet: 4
Gerrit-Owner: Jason Fehr <[email protected]>
Gerrit-Reviewer: Andrew Sherman <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Jason Fehr <[email protected]>
Gerrit-Reviewer: Riza Suminto <[email protected]>
Gerrit-Reviewer: Yifan Zhang <[email protected]>
Gerrit-Reviewer: Zihao Ye <[email protected]>
Gerrit-Comment-Date: Tue, 20 Feb 2024 03:29:00 +0000
Gerrit-HasComments: Yes

Reply via email to