GitHub user wangyum opened a pull request: https://github.com/apache/spark/pull/20064
[SPARK-22893][SQL] Unified the data type mismatch message ## What changes were proposed in this pull request? We should use `dataType.simpleString` to unified the data type mismatch message: Before: ``` spark-sql> select cast(1 as binary); Error in query: cannot resolve 'CAST(1 AS BINARY)' due to data type mismatch: cannot cast IntegerType to BinaryType; line 1 pos 7; ``` After: ``` park-sql> select cast(1 as binary); Error in query: cannot resolve 'CAST(1 AS BINARY)' due to data type mismatch: cannot cast int to binary; line 1 pos 7; ``` ## How was this patch tested? Exist test. You can merge this pull request into a Git repository by running: $ git pull https://github.com/wangyum/spark SPARK-22893 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/20064.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #20064 ---- commit 8540b912e8e846f9e0fb8c94a8dcc48a05be6a57 Author: Yuming Wang <wgyumg@...> Date: 2017-12-23T11:45:45Z Unified the data type mismatch message. ---- --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org