title: Use case-sensitive partitionColumn in Spark JDBC
body: <p>When accessing to a Postgresql using the JDBC Datasource of Spark, the property partitionColumn is used as case-insensitive and a exception is thrown</p>
  
  <p><code>CREATE TABLE data USING org.apache.spark.sql.jdbc OPTIONS (url 'jdbc:postgresql://localhost:5432/postgres', dbtable 'public.datios', lowerBound '0', upperBound '10', partitionColumn 'COD_PERSON', numPartitions '4')</code></p>
  
  <p>Therefore, executing the query:</p>
  
  <p><code>SELECT * FROM data</code></p>
  
  <p>throws the next exception:</p>
  
  <pre><code>Job aborted due to stage failure: Task 1 in stage 9.0 failed 1 times, most recent failure: Lost task 1.0 in stage 9.0 (TID 19, localhost, executor driver): org.postgresql.util.PSQLException: ERROR: column "cod_person" does not exist
    Position: 386
      at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2433)
      at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2178)
      at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:306)
      at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
      at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
      at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:155)
      at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:118)
      at org.apache.spark.sql.execution.datasources.jdbc.JDBCRDD.compute(JDBCRDD.scala:301)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:323)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:287)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:38)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:323)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:287)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:38)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:323)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:287)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:38)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:323)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:287)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:38)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:323)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:287)
      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:38)
      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:323)
      at org.apache.spark.rdd.RDD.iterator(RDD.scala:287)
      at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:88)
      at org.apache.spark.scheduler.Task$$anonfun$run$2.apply(Task.scala:109)
      at org.apache.spark.scheduler.Task$$anonfun$run$2.apply(Task.scala:109)
      at org.apache.spark.scheduler.KerberosFunction$.executeSecure(KerberosFunction.scala:28)
      at org.apache.spark.scheduler.Task.run(Task.scala:109)
      at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:335)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)```
  
  Is there any workaround to use a column name in uppercase to use it as the partitionColumn?
  </code></pre>