impala-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Jacobs (Code Review)" <>
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:

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
             :     // 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
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
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I9e17d0f051b300a22a520ce34e276c2d4460d35e
Gerrit-PatchSet: 2
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Attila Jeges <>
Gerrit-Reviewer: Attila Jeges <>
Gerrit-Reviewer: Jim Apple <>
Gerrit-Reviewer: Lars Volker <>
Gerrit-Reviewer: Matthew Jacobs <>
Gerrit-Reviewer: Michael Ho <>
Gerrit-HasComments: Yes

View raw message