Description
select cast(' 1 ' as tinyint), cast(' 1 ' as smallint), cast(' 1 ' as int), cast(' 1 ' as bigint), cast(' 1 ' as float), cast(' 1 ' as double), cast(' 1 ' as decimal(10,2)) NULL NULL NULL NULL 1.0 1.0 1
Looks like integer types (short, int, etc) fail the conversion due to the leading/trailing spaces and return NULL, while float/double/decimal do not. In fact, Decimal used to also return NULL in previous versions up until HIVE-10799.
Let's try to make this behavior consistent across all of these types, should be simple enough to strip spaces before passing to number formatter.