Github user lianhuiwang commented on the issue:

    https://github.com/apache/spark/pull/14363
  
    @cloud-fan There is a case that i met.  The varchar(length)/char(length) 
type is not a String Type. But now SparkSQL consider them a string type. So 
there are different result with the following example:
    TestHive.sessionState.metadataHive.runSqlHive("CREATE TABLE test (id 
varchar(50))")
    TestHive.sessionState.metadataHive.runSqlHive("INSERT INTO TABLE test 
VALUES ('abcdef')")
    TestHive.sessionState.metadataHive.runSqlHive("CREATE TABLE test_parquet 
(id varchar(2) stored as  parquet)")
    TestHive.sessionState.metadataHive.runSqlHive("insert overwrite table 
varchar_parquet1 select * from test")
    the result of varchar_parquet1 are 'ab'.
    spark.sql("insert overwrite table varchar_parquet1 select * from 
test").show()
    the result of varchar_parquet1 are 'abcdef'.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to