title: Cannot read case-sensitive Glue table backed by Parquet
body: <p>Spark version: 2.4.2 on Amazon EMR 5.24.0</p>
  
  <p>I have a Glue Catalog table backed by S3 Parquet directory. The Parquet files have case-sensitive column names (like <code>lastModified</code>). It doesn't matter what I do, I get lowercase column names (<code>lastmodified</code>) when reading the Glue Catalog table with Spark:</p>
  
  <pre><code>for {
    i &lt;- Seq(false, true)
    j &lt;- Seq("NEVER_INFER", "INFER_AND_SAVE", "INFER_ONLY")
    k &lt;- Seq(false, true)
  } {
    val spark = SparkSession.builder()
      .config("spark.sql.hive.convertMetastoreParquet", i)
      .config("spark.sql.hive.caseSensitiveInferenceMode", j)
      .config("spark.sql.parquet.mergeSchema", k)
      .enableHiveSupport()
      .getOrCreate()
  
    import spark.sql
  
    val df = sql("""SELECT * FROM ecs_db.test_small""")
    df.columns.foreach(println)
  }
  </code></pre>
  
  <p>[1] <a href="https://medium.com/@an_chee/why-using-mixed-case-field-names-in-hive-spark-sql-is-a-bad-idea-95da8b6ec1e0" rel="nofollow noreferrer">https://medium.com/@an_chee/why-using-mixed-case-field-names-in-hive-spark-sql-is-a-bad-idea-95da8b6ec1e0</a><br>
  [2] <a href="https://spark.apache.org/docs/latest/sql-data-sources-parquet.html" rel="nofollow noreferrer">https://spark.apache.org/docs/latest/sql-data-sources-parquet.html</a></p>