impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Jacobs (Code Review)" <ger...@cloudera.org>
Subject [Impala-CR](cdh5-trunk) IMPALA-1731,IMPALA-3868: Float values are not parsed correctly
Date Mon, 18 Jul 2016 16:42:56 GMT
Matthew Jacobs has posted comments on this change.

Change subject: IMPALA-1731,IMPALA-3868: Float values are not parsed correctly
......................................................................


Patch Set 2:

(3 comments)

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

PS2, Line 377: We'll be a little loose
             :     // here and interpret any column with "inf" as a prefix as infinity rather
than
             :     // checking every remaining byte.
This is unfortunate behavior from Hive, but I'm not sure we should accept anything with an
inf prefix. If someone has random garbage and a value just happens to start with inf, this
could be confusing later on. To avoid making this costly on the regular path, we can at least
have a second check inside the if() block on l383 which checks the length is exactly 3 or
it's 8 and the next 5 chars are 'inity'.


PS2, Line 380:     // NaN is parsed the same way: any column with "nan" as a prefix is interpreted
             :     // as NaN.
this doesn't seem necessary, no need to accept garbage after the nan


http://gerrit.cloudera.org:8080/#/c/3622/2/testdata/workloads/functional-query/queries/QueryTest/exprs.test
File testdata/workloads/functional-query/queries/QueryTest/exprs.test:

PS2, Line 2459: cast('InFinity' as float), cast('iNf4' as double),
              :     cast('1.23inf' as double), cast('1inf' as float)
do any of these emit warnings on parsing (same for nan below)? I think they probably should
when "STRICT_MODE" is enabled.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9e17d0f051b300a22a520ce34e276c2d4460d35e
Gerrit-PatchSet: 2
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Attila Jeges <attilaj@cloudera.com>
Gerrit-Reviewer: Attila Jeges <attilaj@cloudera.com>
Gerrit-Reviewer: Jim Apple <jbapple@cloudera.com>
Gerrit-Reviewer: Lars Volker <lv@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj@cloudera.com>
Gerrit-Reviewer: Michael Ho <kwho@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message