spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-10245) SQLContext can't parse literal less than 0.1 (e.g. 0.01)
Date Tue, 25 Aug 2015 19:19:45 GMT

    [ https://issues.apache.org/jira/browse/SPARK-10245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14711815#comment-14711815
] 

Apache Spark commented on SPARK-10245:
--------------------------------------

User 'davies' has created a pull request for this issue:
https://github.com/apache/spark/pull/8428

> SQLContext can't parse literal less than 0.1 (e.g. 0.01)
> --------------------------------------------------------
>
>                 Key: SPARK-10245
>                 URL: https://issues.apache.org/jira/browse/SPARK-10245
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>            Reporter: Davies Liu
>            Assignee: Davies Liu
>            Priority: Blocker
>
> {code}
> scala> sqlCtx.sql("select 0.01")
> org.apache.spark.sql.AnalysisException: Decimal scale (2) cannot be greater than precision
(1).;
> 	at org.apache.spark.sql.types.PrecisionInfo.<init>(DecimalType.scala:32)
> 	at org.apache.spark.sql.types.DecimalType.<init>(DecimalType.scala:68)
> 	at org.apache.spark.sql.catalyst.expressions.Literal$.apply(literals.scala:40)
> 	at org.apache.spark.sql.catalyst.SqlParser$$anonfun$numericLiteral$2$$anonfun$apply$216.apply(SqlParser.scala:335)
> 	at org.apache.spark.sql.catalyst.SqlParser$$anonfun$numericLiteral$2$$anonfun$apply$216.apply(SqlParser.scala:334)
> 	at scala.util.parsing.combinator.Parsers$Success.map(Parsers.scala:136)
> 	at scala.util.parsing.combinator.Parsers$Success.map(Parsers.scala:135)
> 	at scala.util.parsing.combinator.Parsers$Parser$$anonfun$map$1.apply(Parsers.scala:242)
> 	at scala.util.parsing.combinator.Parsers$Parser$$anonfun$map$1.apply(Parsers.scala:242)
> 	at scala.util.parsing.combinator.Parsers$$anon$3.apply(Parsers.scala:222)
> 	at scala.util.parsing.combinator.Parsers$Parser$$anonfun$append$1$$anonfun$apply$2.apply(Parsers.scala:254)
> 	at scala.util.parsing.combinator.Parsers$Parser$$anonfun$append$1$$anonfun$apply$2.apply(Parsers.scala:254)
> 	at scala.util.parsing.combinator.Parsers$Failure.append(Parsers.scala:202)
> 	at scala.util.parsing.combinator.Parsers$Parser$$anonfun$append$1.apply(Parsers.scala:254)
> 	at scala.util.parsing.combinator.Parsers$Parser$$anonfun$append$1.apply(Parsers.scala:254)
> 	at scala.util.parsing.combinator.Parsers$$anon$3.apply(Parsers.scala:222)
> 	at scala.util.parsing.combinator.Parsers$Parser$$anonfun$append$1.apply(Parsers.scala:254)
> 	at scala.util.parsing.combinator.Parsers$Parser$$anonfun$append$1.apply(Parsers.scala:254)
> 	at scala.util.parsing.combinator.Parsers$$anon$3.apply(Parsers.scala:222)
> 	at scala.util.parsing.combinator.Parsers$Parser$$anonfun$append$1.apply(Parsers.scala:254)
> 	at scala.util.parsing.combinator.Parsers$Parser$$anonfun$append$1.apply(Parsers.scala:254)
> 	at scala.util.parsing.combinator.Parsers$$anon$3.apply(Parsers.scala:222)
> 	at scala.util.parsing.combinator.Parsers$Parser$$anonfun$append$1.apply(Parsers.scala:254)
> 	at scala.util.parsing.combinator.Parsers$Parser$$anonfun$append$1.apply(Parsers.scala:254)
> {code}



--
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


Mime
View raw message