Riza Suminto has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/17980 )

Change subject: IMPALA-10984: Improve performance of TimestampValue::ToString
......................................................................


Patch Set 2:

(4 comments)

Thank you, Csaba, for the comments! Will address them in next patch set.

http://gerrit.cloudera.org:8080/#/c/17980/2//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/17980/2//COMMIT_MSG@49
PS2, Line 49:      4.91     4.91     0.128X     0.128X     0.128X
            : from_unixtime(0,'yyyy-MM-dd HH:mm:ss')
> Wonder why this became slow during the last patch.
Some unoptimal change in patch set 2. Might be the reinterpret_cast thing from 
uint8_t* to char* in TimestampValue::ToStringVal. Will take a look at it during 
next iteration.


http://gerrit.cloudera.org:8080/#/c/17980/2/be/src/runtime/timestamp-parse-util.cc
File be/src/runtime/timestamp-parse-util.cc:

http://gerrit.cloudera.org:8080/#/c/17980/2/be/src/runtime/timestamp-parse-util.cc@341
PS2, Line 341: tmp_buff
> I think that we can easily avoid using the tmp_buff here.
Good point. Having on-stack char array should also drop the necessity of 
tmp_string_ in FunctionContextImpl. Will try it in next patch set.


http://gerrit.cloudera.org:8080/#/c/17980/2/be/src/runtime/timestamp-parse-util.cc@344
PS2, Line 344:         for (int i = written_length; i < tok.len; i++) {
             :           *(dst + pos) = '0';
             :           pos++;
             :         }
> If I understand this correctly, then we are writing to the end of the buffe
That is correct.


http://gerrit.cloudera.org:8080/#/c/17980/2/be/src/runtime/timestamp-parse-util.cc@351
PS2, Line 351:     DCHECK_LE(pos, max_length) << "Maximum buffer length 
exceeded!";
> I am a bit concerned that at the time we hit this DCHECK, we have already w
Will do.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4fcb4545d9c9a3fdb38c4db58bb4b1321a429d61
Gerrit-Change-Number: 17980
Gerrit-PatchSet: 2
Gerrit-Owner: Riza Suminto <riza.sumi...@cloudera.com>
Gerrit-Reviewer: Bikramjeet Vig <bikramjeet....@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <csringho...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Kurt Deschler <kdesc...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <riza.sumi...@cloudera.com>
Gerrit-Comment-Date: Thu, 28 Oct 2021 15:38:55 +0000
Gerrit-HasComments: Yes

Reply via email to