mirror of
https://github.com/apache/impala.git
synced 2025-12-30 12:02:10 -05:00
This patch allows the text scanner to read 'inf' or 'Infinity' from a row and correctly translate it into floating-point infinity. It also adds is_inf() and is_nan() builtins. Finally, we change the text table writer to write Infinity and NaN for compatibility with Hive. In the future, we might consider adding nan / inf literals to our grammar (postgres has this, see: http://www.postgresql.org/docs/9.3/static/datatype-numeric.html). Change-Id: I796f2852b3c6c3b72e9aae9dd5ad228d188a6ea3 Reviewed-on: http://gerrit.ent.cloudera.com:8080/2393 Reviewed-by: Henry Robinson <henry@cloudera.com> Tested-by: jenkins (cherry picked from commit 58091355142cadd2b74874d9aa7c8ab6bf3efe2f) Reviewed-on: http://gerrit.ent.cloudera.com:8080/2483
12 lines
261 B
Plaintext
12 lines
261 B
Plaintext
====
|
|
---- QUERY
|
|
# Tests overflow
|
|
select * from Overflow
|
|
---- TYPES
|
|
tinyint, smallint, int, bigint, float, double
|
|
---- RESULTS
|
|
-128,-32768,-2147483648,-9223372036854775808,-Infinity,-Infinity
|
|
1,2,3,4,5.5,6.6
|
|
127,32767,2147483647,9223372036854775807,inf,inf
|
|
====
|