Lower case JSON keys #3

Merged
merged 1 commit into from Mar 23, 2013

2 participants

@jarcec

HIVE seems to be internally lower casing all columns names even though when they are properly escaped during table creation:

hive> create table xxxx(DeviceID string);
OK
Time taken: 0.229 seconds
hive> describe xxxx;
OK
deviceid string
Time taken: 0.128 seconds

I'm attaching simple patch that will automatically lowercase all keys in the input JSON, so that the SerDe will work on keys that are not lower cased. SerDe with this patch might behave unpredictable if the input JSON have multiple columns that have same lower cased form (for example "DevideId" and "deviceId").

@joey joey merged commit 65bbc19 into cloudera:master Mar 23, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment