Zoltan Borok-Nagy has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/17389 )

Change subject: IMPALA-10680: Replace StringToFloatInternal using 
fast_double_parser library
......................................................................


Patch Set 5: Code-Review+1

(2 comments)

It's great to hear that the library has great perf. LGTM, only had smaller nits.

http://gerrit.cloudera.org:8080/#/c/17389/5//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/17389/5//COMMIT_MSG@12
PS5, Line 12: doesn't
            : sacrifise the accuracy for speed.
Could you please add your measurements here as well?


http://gerrit.cloudera.org:8080/#/c/17389/5/be/src/util/string-parser.h
File be/src/util/string-parser.h:

http://gerrit.cloudera.org:8080/#/c/17389/5/be/src/util/string-parser.h@501
PS5, Line 501:     while(i + 1 < len && *(s + i) == '0' &&
             :         fast_double_parser::is_integer(*(s + i + 1))) {
             :       i++;
             :     }
             :
             :     // Library doesn't handle strings starting with '.' like 
'.56' or '-.56'.
             :     // Preprocessing such strings by prefixing it with '0'
             :     if (*(s + i) == '.') {
             :       c_len = len - i + 1;
             :       c_str[0] = '0'; // Prefix '0'
             :       memcpy(c_str + 1, s + i, c_len - 1);
             :       c_str[c_len] = '\0';
             :     } else {
             :       c_len = len - i;
             :       memcpy(c_str, s + i, c_len);
             :       c_str[c_len] = '\0';
             :     }
Maybe we could put this into its own function, stg like 
'NormalizeFloatString()' and add a few unit tests for it in 
string-parser-test.cc.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic105ad38a2fcbf2fb4e8ae8af6d9a8e251a9c141
Gerrit-Change-Number: 17389
Gerrit-PatchSet: 5
Gerrit-Owner: Amogh Margoor <amarg...@gmail.com>
Gerrit-Reviewer: Amogh Margoor <amarg...@gmail.com>
Gerrit-Reviewer: Csaba Ringhofer <csringho...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <borokna...@cloudera.com>
Gerrit-Comment-Date: Wed, 19 May 2021 14:14:03 +0000
Gerrit-HasComments: Yes

Reply via email to