Attila Jeges has uploaded a new change for review. http://gerrit.cloudera.org:8080/3622
Change subject: IMPALA-1731: StringToFloatInternal() does not handle inf correctly ...................................................................... IMPALA-1731: StringToFloatInternal() does not handle inf correctly Fixed StringToFloatInternal() not to parse strings like "1.23inf" with leading garbage as Infinity anymore. These strings are now rejected with PARSE_FAILURE. Only strings with "inf" prefix are interpreted as infinity. Note that this also means that strings like “inf456” are parsed as infinity too. This behavior is kept for backward compatibility reasons. "NaN" values are handled similarly: only strings with "nan" prefix are accepted as NaN. Other changes: - StringToFloatInternal() was cleaned up a bit. Parsing inf and NaN strings was moved out of the main loop. - Use std::numeric_limits<T>::infinity() instead of INFINITY macro and std::numeric_limits<T>::quiet_NaN() instead of NAN macro. - New BE and E2E tests were added. Change-Id: I9e17d0f051b300a22a520ce34e276c2d4460d35e --- M be/src/exprs/expr-test.cc M be/src/util/string-parser-test.cc M be/src/util/string-parser.h M testdata/workloads/functional-query/queries/QueryTest/exprs.test 4 files changed, 148 insertions(+), 39 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/22/3622/1 -- To view, visit http://gerrit.cloudera.org:8080/3622 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9e17d0f051b300a22a520ce34e276c2d4460d35e Gerrit-PatchSet: 1 Gerrit-Project: Impala Gerrit-Branch: cdh5-trunk Gerrit-Owner: Attila Jeges <[email protected]>
