After upgrading hive from 0.10 to 0.12, we find that we need to put single quotes around the mid partition. It doesn't seem to be treated an an int datatype but as a string. What's strange is that it seems to have worked for 2 months on hive 0.12 without quotes. Is this the expected behavior and is there anything we can do to have the same behavior as 0.10 or do we need to tell everyone to start using quotes.
# hive -e "show create table fracture_act"; CREATE EXTERNAL TABLE fracture_act( ----------------- PARTITIONED BY ( hit_date int, mid int) ------------------ # hive -e "show partitions fracture_act" | tail -5 hit_date=20140729/mid=003185 hit_date=20140729/mid=003198 hit_date=20140729/mid=003205 hit_date=20140729/mid=003206 hit_date=20140729/mid=003207 hive-0.10 ======== works: select count(1) from fracture_act where hit_date=20140729 and mid=003207; works: select count(1) from fracture_act where hit_date=20140729 and mid=3207; works: select count(1) from fracture_act where hit_date=20140729 and mid='003207'; fails: select count(1) from fracture_act where hit_date=20140729 and mid='3207'; hive-0.12 ======== fails: select count(1) from fracture_act where hit_date=20140729 and mid=003207; fails: select count(1) from fracture_act where hit_date=20140729 and mid=3207; works: select count(1) from fracture_act where hit_date=20140729 and mid='003207'; fails: select count(1) from fracture_act where hit_date=20140729 and mid='3207'; Thanks, Hang
