GitHub user HyukjinKwon opened a pull request: https://github.com/apache/spark/pull/11724
[SPARK-13866][SQL] Handle decimal type in CSV inference at CSV data source. ## What changes were proposed in this pull request? https://issues.apache.org/jira/browse/SPARK-13866 This PR adds the support to infer `DecimalType`. This compares two `BigDecimal` but one of them is casted back from double. So, if the roundtrip leads to precision loss, then this means casting to double loses some values. In this way, we can recognize if casting from `String` to `Double` has a precision loss. ## How was this patch tested? Unit tests were used and `./dev/run_tests` for code style test. You can merge this pull request into a Git repository by running: $ git pull https://github.com/HyukjinKwon/spark SPARK-13866 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/11724.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 #11724 ---- commit 1d3e45ec8d43db7e3b815eb75f6fa66dad8ae671 Author: hyukjinkwon <gurwls...@gmail.com> Date: 2016-03-15T09:55:18Z Support for inferring DecimalType. commit 941549505ed78a829448d919163e311f94c03ba1 Author: hyukjinkwon <gurwls...@gmail.com> Date: 2016-03-15T09:56:38Z Remove an unused temp variable commit ed1d499e42155fa9b38289c410a3b58a1b50eebe Author: hyukjinkwon <gurwls...@gmail.com> Date: 2016-03-15T10:01:43Z Update comments ---- --- 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