You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/05/27 13:55:25 UTC

[GitHub] [spark] cloud-fan opened a new pull request #24721: [SPARK-27856][SQL] do not forcibly add cast when inserting table

cloud-fan opened a new pull request #24721: [SPARK-27856][SQL] do not forcibly add cast when inserting table
URL: https://github.com/apache/spark/pull/24721
 
 
   ## What changes were proposed in this pull request?
   
   When inserting data to a data source v1 table, Spark will forcibly cast the data type of input query to the data type of target table. This can be super confusing if users make a mistake and write string values to an int column. Users will get no error/warning and see null values in the target table.
   
   It's more reasonable to follow the behavior of data source v2 tables, which only allows "upcast", e.g. `int -> long`, `int -> string`, not `long -> int`, `string -> int`.
   
   ## How was this patch tested?
   
   new tests

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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