There's code which, after the numeric type for a constant in where clause has been chosen as the most restricted one or based on suffix, tries to change the type to match the numeric column which the constant is being compared with. However, due to a hack from
HIVE-3059 every column type shows up as string in that code, causing it to always change the constant type to double. This should not be done (regardless of the hack).
HIVE-2702, large number of query outputs change so it will be a big patch