You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (JIRA)" <ji...@apache.org> on 2016/02/24 07:40:18 UTC
[jira] [Commented] (SPARK-12997) Use cast expression to perform
type cast in csv
[ https://issues.apache.org/jira/browse/SPARK-12997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15160270#comment-15160270 ]
Hyukjin Kwon commented on SPARK-12997:
--------------------------------------
If I got this correctly, I think the issue itself is a little bit questionable at the end. If we can apply the same rules for casting, then it would be great to re-use the {{Cast()}} but both CSV and JSON data sources are dealing with data types differently.
As long as we are not going to change this behaviour for backwards compatibility, I believe this issue is invalid or this will end up with some additional logics like I just did in the PR above with some cases to deal with the differences.
> Use cast expression to perform type cast in csv
> -----------------------------------------------
>
> Key: SPARK-12997
> URL: https://issues.apache.org/jira/browse/SPARK-12997
> Project: Spark
> Issue Type: Sub-task
> Components: SQL
> Reporter: Reynold Xin
>
> CSVTypeCast.castTo should probably be removed, and just replace its usage with a projection that uses a sequence of Cast expressions.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org