venkatsambath / hive-json-serde

Automatically exported from code.google.com/p/hive-json-serde
0 stars 0 forks source link

Upper case column names #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.  Try to create a table with a JSON file that has an upper case field.  For 
example, {"TEST":1,"case":2}, create external table test1 (TEST int, case int).
2.  Doing select * test1 will give you NULL for TEST and 2 for case

What is the expected output? What do you see instead?

I would expect it to return 1 for TEST rather than NULL

Original issue reported on code.google.com by ohy...@gmail.com on 8 Oct 2010 at 10:39

GoogleCodeExporter commented 8 years ago
This actually fails for any column name that has an upper case character, ie:

Test, tEst, TEST, test

Only 'test' will return the actual values for me

Original comment by ohy...@gmail.com on 8 Oct 2010 at 10:41

GoogleCodeExporter commented 8 years ago
This may not be the mot elegant way of handling this, but it is simple.  
Technically this would cause problems if you had two keys with the same value 
but different cases; however, since you can't have two columns with the same 
name, this may be irrelevant in this situation.

Original comment by mathos.m...@gmail.com on 14 Oct 2010 at 4:52

Attachments:

GoogleCodeExporter commented 8 years ago
This fix works, thank you very much!

Original comment by ohy...@gmail.com on 14 Oct 2010 at 11:38

GoogleCodeExporter commented 8 years ago
Thank you for the patch. I am applying it and will check it in shortly.

Original comment by pas...@gmail.com on 21 Dec 2010 at 11:55

GoogleCodeExporter commented 8 years ago
Fixed with check in r12

Original comment by pas...@gmail.com on 22 Dec 2010 at 12:09