Tinyint overflow issue for random query comparison.
Tinyint overflow issue for random query comparison.

When running against Postgres in Hive automation, we want to prevent
tinyint overflow arithmetic as the smallest Postgres int type is
smallint.  But still want to keep tinyint in Hive random-query tests.
So best solution would be to explicitly cast all the ints before
the arithmetic operator to get it to fit the expected range.

Note that the issue is only for tinyints, as only that type is smaller
than the range of random data values (-1000,1000).  Other types all
handle that range fine.

Change-Id: I91226a7c1d71070b1fb88a1ca30a5ce0dc15d1fb
Reviewed-on: http://gerrit.cloudera.org:8080/1205
Reviewed-by: Casey Ching <77bc9a9984e6786c5799d7a71768cf023120ef76@cloudera.com>
Tested-by: Internal Jenkins

ibmsoe/ImpalaPPC,ibmsoe/ImpalaPPC,ibmsoe/ImpalaPPC,ibmsoe/ImpalaPPC,ibmsoe/ImpalaPPC,ibmsoe/ImpalaPPC,ibmsoe/ImpalaPPC