GitHub user HyukjinKwon opened a pull request:
https://github.com/apache/spark/pull/10980
[SPARK-12997][SQL] Use cast expression to perform type cast in csv
https://issues.apache.org/jira/browse/SPARK-12997
CSVTypeCast.castTo should probably be removed, and just replace its usage
with a projection that uses a sequence of Cast expressions.
This PR resamples
[SimpleTextRelation.scala#L115-L121](https://github.com/apache/spark/blob/master/sql/hive/src/test/scala/org/apache/spark/sql/sources/SimpleTextRelation.scala#L115-L121).
For backword compatibility, it checks `,` for `DecimalType` and remove
those for casting.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/HyukjinKwon/spark SPARK-12997
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/10980.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 #10980
----
commit 171c7fb00858973c7f831f3ee197d8aeba994149
Author: hyukjinkwon <[email protected]>
Date: 2016-01-29T08:30:08Z
Use cast expression to perform type cast in csv
commit 6b9cd0e39c9f9190d7cfbe3df29f573c8519355f
Author: hyukjinkwon <[email protected]>
Date: 2016-01-29T08:30:51Z
Rename InferSchema reference
commit 62a39ee2306499b797636df02ca7a770a5244b41
Author: hyukjinkwon <[email protected]>
Date: 2016-01-29T08:34:18Z
Correct import orders
----
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]