Csaba Ringhofer has posted comments on this change. ( http://gerrit.cloudera.org:8080/21441 )
Change subject: IMPALA-12562: Cast double and float to string with exact presicion ...................................................................... Patch Set 2: (3 comments) Looks great! Generally I have very good experience with gutil/numbers both in terms of speed and correctness http://gerrit.cloudera.org:8080/#/c/21441/2//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/21441/2//COMMIT_MSG@12 PS2, Line 12: fast Can you provide some benchmarks? I expect it to be an improvement, but it would be nice to verify this. http://gerrit.cloudera.org:8080/#/c/21441/2/be/src/exprs/cast-functions-ir.cc File be/src/exprs/cast-functions-ir.cc: http://gerrit.cloudera.org:8080/#/c/21441/2/be/src/exprs/cast-functions-ir.cc@344 PS2, Line 344: if (UNLIKELY(sv.is_null)) { \ At this point no allocation happened yet so this check is not useful. http://gerrit.cloudera.org:8080/#/c/21441/2/be/src/exprs/cast-functions-ir.cc@355 PS2, Line 355: SimpleFtoa I would prefer using DoubleToBuffer / FloatToBuffer as it avoids the extra heap allocation needed for the std::string. https://github.com/apache/impala/blob/bcff4df6194b2f192d937bb9c031721feccb69df/be/src/gutil/strings/numbers.h#L451 -- To view, visit http://gerrit.cloudera.org:8080/21441 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icd79c55dd57dc0fa13e4ec11c2284ef2800e8b1a Gerrit-Change-Number: 21441 Gerrit-PatchSet: 2 Gerrit-Owner: Yifan Zhang <chinazhangyi...@163.com> Gerrit-Reviewer: Csaba Ringhofer <csringho...@cloudera.com> Gerrit-Reviewer: Daniel Becker <daniel.bec...@cloudera.com> Gerrit-Reviewer: Gabor Kaszab <gaborkas...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Michael Smith <michael.sm...@cloudera.com> Gerrit-Reviewer: Yifan Zhang <chinazhangyi...@163.com> Gerrit-Comment-Date: Sat, 18 May 2024 07:35:19 +0000 Gerrit-HasComments: Yes