title: Case sensitive column names in Hive
body: <p>I am trying to create an external HIVE table with partitions. Some of my
  column names have Upper case letters. This caused a problem while creating
  tables since the values of column names with upper case letters were
  returned as NULL. I then modified the ParquetSerDe in order for it to
  handle this by using SERDEPROPERTIES and this was working with external tables (not partitioned). Now I am
  trying to create an external table WITH partitions, and whenever I try to
  access the upper case columns (Eg FieldName) I get this error.
  select FieldName from tablename;</p>
  
  <pre><code>    FAILED: RuntimeException Java. Lang.RuntimeException: cannot find field
      FieldName from
      [org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@4f45884b,
      org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@8f11f27,
      org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@77e8eb0e,
      org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@1dae4cd,
     org.apache.hadoop.hive.serde2.objectinspector.UnionStructObjectInspector$MyField@623e336d
     ]
  </code></pre>
  
  <p>Are there any suggestions you can think of?  I cannot change the schema of the data source.</p>
  
  <p>This is the command I use to create tables -</p>
  
  <pre><code>    CREATE EXTERNAL TABLE tablename (fieldname string)
      PARTITIONED BY (partion_name string)
      ROW FORMAT SERDE 'path.ModifiedParquetSerDeLatest'
      WITH SERDEPROPERTIES ("casesensitive"="FieldName")
      STORED AS INPUTFORMAT 'parquet.hive.DeprecatedParquetInputFormat'
      OUTPUTFORMAT 'parquet.hive.DeprecatedParquetOutputFormat'
  </code></pre>
  
  <p>And then add partition:</p>
  
  <pre><code>    ALTER TABLE tablename ADD PARTITION (partition_name='partitionvalue')
      LOCATION '/path/to/data'
  </code></pre>