Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/22343
  
    Thank you for the pointer, @seancxmao . And thank you for clarification, 
@cloud-fan .
    
    It looks like we are re-creating correctness issue somewhat in this PR when 
`caseSensitive=true`. 
    
    **BEFORE THIS PR (master)**
    ```scala
    scala> sql("INSERT OVERWRITE DIRECTORY '/tmp/hive_t' STORED AS PARQUET 
SELECT 'A', 'a'")
    scala> sql("CREATE TABLE hive_t(a STRING) STORED AS PARQUET LOCATION 
'/tmp/hive_t'")
    scala> sql("CREATE TABLE spark_t(a STRING) USING PARQUET LOCATION 
'/tmp/hive_t'")
    scala> sql("set spark.sql.caseSensitive=true")
    scala> spark.table("hive_t").show
    +---+
    |  a|
    +---+
    |  a|
    +---+
    
    scala> spark.table("spark_t").show
    +---+
    |  a|
    +---+
    |  a|
    +---+
    ```
    
    **AFTER THIS PR**
    ```scala
    scala> sql("set spark.sql.caseSensitive=true")
    scala> spark.table("hive_t").show
    +---+
    |  a|
    +---+
    |  A|
    +---+
    
    scala> spark.table("spark_t").show
    +---+
    |  a|
    +---+
    |  a|
    +---+
    ```


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to