Based on this wiki page:
https://cwiki.apache.org/confluence/display/Hive/Tutorial#Tutorial-TypeSystem
The string will do a implicit conversion to double, as "Double" is the only 
common ancestor between bigint and string.
So the result is unpredictable if you are talking about double.
Yong

Date: Mon, 6 Oct 2014 14:20:57 -0700
Subject: Hive Join returns incorrect results on bigint=string
From: a...@rocketfuelinc.com
To: user@hive.apache.org

Recently, by mistake, I encountered a situation where I ended up doing a join 
key comparison between a string and a bigint. The returned results are 
incorrect  even though the strings have exactly same integer values as the 
bigint values.
When I do a "Join on bigint = cast(string as bigint)", the results are correct. 
Is this the expected behavior, or Hive is supposed to do an automatic cast and 
compare as strings?  
-- 
Thanks and Regards,Ashu PachauriRocket Scientist,Rocket Fuel Inc.1- 650 - 200- 
5390
                                          

Reply via email to