You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Herman van Hovell (JIRA)" <ji...@apache.org> on 2016/01/16 01:18:39 UTC
[jira] [Commented] (SPARK-12848) Parse number as decimal
[ https://issues.apache.org/jira/browse/SPARK-12848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15102763#comment-15102763 ]
Herman van Hovell commented on SPARK-12848:
-------------------------------------------
Assuming that we are talking about literals here. It is quite easy to change the parse defaults for that.
The way it is currently done is that when we find a decimal number, {{1.23}} for example, we will convert it into a Double (always). When a user needs a Decimal, he (or she) can use a BigDecimal literal for this by tagging the number with {{BD}}.
[~davies] I might not be getting the point you are making, but I think we have covered this by using BigDecimal literals. Could you provide an example otherwise?
> Parse number as decimal
> -----------------------
>
> Key: SPARK-12848
> URL: https://issues.apache.org/jira/browse/SPARK-12848
> Project: Spark
> Issue Type: Sub-task
> Components: SQL
> Reporter: Davies Liu
>
> Right now, Hive parser will parse 1.23 as double, when it's used with decimal columns, you will turn the decimal into double, lose the precision.
> We should follow most database had done, parse 1.23 as double, it will be converted into double when used with double.
--
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